/* Страница входа DashaCRM: сплит-макет, картины слева, форма справа.
   Подключается только на /admin/login через render hook в AdminPanelProvider. */

:root {
    --dl-accent: #a78bfa;         /* violet-400, акцент на тёмном фоне */
    --dl-primary: #7c3aed;        /* violet-600, совпадает с primary панели */
    --dl-primary-hover: #6d28d9;
    --dl-ink: #18181b;
    --dl-muted: #52525b;
    --dl-form-bg: #ffffff;
    --dl-brand-bg: #0f0c1c;
    --dl-chip-bg: rgba(255, 255, 255, 0.10);
    --dl-chip-border: rgba(255, 255, 255, 0.14);
}

.dark {
    --dl-ink: #fafafa;
    --dl-muted: #a1a1aa;
    --dl-form-bg: #0f0f14;
}

[x-cloak] { display: none !important; }

.fi-body:has(.dl-root) {
    margin: 0;
    background: var(--dl-form-bg);
}

.dl-root {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100dvh;
    color: var(--dl-ink);
}

/* ---------- Левая колонка: картины и слоганы ---------- */

.dl-brand {
    position: relative;
    overflow: hidden;
    background: var(--dl-brand-bg);
    color: #fff;
    isolation: isolate;
}

.dl-slides,
.dl-slide,
.dl-texture,
.dl-shade {
    position: absolute;
    inset: 0;
}

.dl-slide {
    margin: 0;
    opacity: 0;
    transition: opacity 1.4s ease;
    z-index: 0;
}

.dl-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.dl-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 12s linear;
}

.dl-slide.is-active img {
    transform: scale(1);
}

.dl-texture {
    z-index: 2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 46px 46px;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.dl-shade {
    z-index: 3;
    background:
        radial-gradient(60% 50% at 20% 90%, rgba(124, 58, 237, 0.35), transparent 70%),
        linear-gradient(to top, rgba(15, 12, 28, 0.96) 0%, rgba(15, 12, 28, 0.78) 38%, rgba(15, 12, 28, 0.30) 70%, rgba(15, 12, 28, 0.35) 100%);
    pointer-events: none;
}

.dl-inner {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    gap: 2rem;
}

.dl-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: inherit;
    text-decoration: none;
    width: max-content;
}

.dl-logo-mark {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 8px 24px rgba(109, 40, 217, 0.45);
}

.dl-hero {
    max-width: 38rem;
}

.dl-hero-stack {
    display: grid;
}

.dl-hero-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.9s ease, transform 0.9s ease;
    pointer-events: none;
}

.dl-hero-slide.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.dl-h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.2vw, 3.6rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.dl-accent {
    display: block;
    color: var(--dl-accent);
}

.dl-lead {
    margin: 0;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.dl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.75rem;
}

.dl-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: var(--dl-chip-bg);
    border: 1px solid var(--dl-chip-border);
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.dl-chip-ic {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    color: var(--dl-accent);
}

.dl-chip-ic svg {
    width: 100%;
    height: 100%;
}

.dl-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem 1.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.dl-caption-stack {
    display: grid;
    font-style: italic;
}

.dl-caption {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.dl-caption.is-active {
    opacity: 1;
}

.dl-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.dl-live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}

/* ---------- Правая колонка: форма ---------- */

.dl-form-side {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 5vw, 4rem);
    background: var(--dl-form-bg);
}

.dl-theme {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(113, 113, 122, 0.25);
    background: transparent;
    color: var(--dl-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.dl-theme:hover {
    background: rgba(124, 58, 237, 0.08);
    color: var(--dl-primary);
}

.dl-theme svg {
    width: 1.15rem;
    height: 1.15rem;
}

.dl-form {
    width: 100%;
    max-width: 26rem;
}

.dl-logo-mobile {
    display: none;
    margin-bottom: 2rem;
    color: var(--dl-ink);
}

.dl-title {
    margin: 0 0 0.5rem;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.dl-sub {
    margin: 0 0 1.75rem;
    color: var(--dl-muted);
    line-height: 1.55;
}

/* Мягкие правки штатных элементов Filament внутри формы */

.dl-form .fi-input-wrp {
    border-radius: 0.75rem;
}

.dl-form .fi-input-wrp .fi-input {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.dl-form .fi-fo-field-label,
.dl-form .fi-fo-field-label-content {
    font-weight: 600;
}

.dl-form .fi-btn {
    border-radius: 0.75rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    font-size: 0.95rem;
}

.dl-form .fi-btn.fi-color-primary {
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.28);
}

.dl-form .fi-btn.fi-color-primary:hover {
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.38);
}

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
    .dl-root {
        grid-template-columns: minmax(0, 1fr);
    }

    .dl-brand {
        min-height: 42vh;
    }

    .dl-inner {
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .dl-chips,
    .dl-foot .dl-copy {
        display: none;
    }

    .dl-h1 {
        font-size: clamp(1.7rem, 6.5vw, 2.4rem);
        margin-bottom: 0.5rem;
    }

    .dl-lead {
        font-size: 0.95rem;
    }

    .dl-form-side {
        align-items: flex-start;
        padding: 2rem 1.25rem 3rem;
    }

    .dl-theme {
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .dl-brand {
        display: none;
    }

    .dl-logo-mobile {
        display: inline-flex;
    }

    .dl-form-side {
        padding-top: 4.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dl-slide,
    .dl-slide img,
    .dl-hero-slide,
    .dl-caption {
        transition: none;
    }

    .dl-slide img {
        transform: none;
    }
}
