/*
 | Auth screens: login, register, password reset, email verification.
 |
 | Plain CSS on purpose. Only the secretary panel compiles a Vite theme; the
 | others load stock Filament, so anything written in Tailwind here would
 | render on one panel and silently do nothing on the other three.
 |
 | Scoped to .fi-simple-layout, which Filament uses only for these pages, so
 | none of it reaches the application interior. That is also why the navy is
 | declared here rather than through ->colors(): the brand belongs on the front
 | door, and recolouring the whole panel is a separate decision.
 */

.fi-simple-layout {
    --cm-navy: #13385f;
    --cm-navy-deep: #0a1e33;
    --cm-navy-600: #1e4874;
    --cm-accent: #3498db;
    --cm-ink: #0e2a47;

    background: #f7f9fc !important;
    min-height: 100vh !important;
}

.dark .fi-simple-layout {
    background: #0b1320 !important;
}

/* ---------------------------------------------------------------- the split */

@media (min-width: 64rem) {
    .fi-simple-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        align-items: stretch;
    }

    /*
     | Everything Filament puts in this container goes in the right column, and
     | the aside claims the left. Stated for `> *` rather than per element
     | because the layout emits a variable number of children — a header only
     | once signed in, a footer hook that may render nothing — and grid
     | auto-placement would scatter them across the two columns.
     */
    .fi-simple-layout > * {
        grid-column: 2;
        min-width: 0;
    }

    .fi-simple-layout > .cm-auth-aside {
        grid-column: 1;
        grid-row: 1 / -1;
    }

    .fi-simple-main-ctn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 3rem 2rem;
    }
}

/* ----------------------------------------------------------- branded panel */

.cm-auth-aside {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.09) 1px, transparent 0) 0 0 / 22px 22px,
        linear-gradient(150deg, var(--cm-navy-600) 0%, var(--cm-navy) 45%, var(--cm-navy-deep) 100%);
}

/* A cool wash so the flat navy reads as lit rather than printed. */
.cm-auth-aside::after {
    content: '';
    position: absolute;
    inset: auto -20% -35% -20%;
    height: 70%;
    background: radial-gradient(ellipse at center, rgba(52, 152, 219, 0.35), transparent 70%);
    pointer-events: none;
}

.cm-auth-aside__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    height: 100%;
    max-width: 30rem;
    margin-inline: auto;
    padding: 3.5rem 3rem;
}

.cm-auth-aside__logo {
    width: auto;
    height: 4.5rem;
    max-width: 100%;
    object-fit: contain;
    align-self: center;
}

.cm-auth-aside__title {
    font-size: clamp(1.6rem, 2.4vw, 2.15rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
}

.cm-auth-aside__lead {
    margin: 0.9rem 0 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.cm-auth-aside__list {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.cm-auth-aside__list li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.cm-auth-aside__list svg {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0.15rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(52, 152, 219, 0.85);
}

.cm-auth-aside__foot {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
}

/* On a narrow screen the panel becomes a header: the form is what the visitor
   came for, and it should not start below a screenful of marketing. */
@media (max-width: 63.99rem) {
    .cm-auth-aside__inner {
        gap: 1.1rem;
        padding: 1.75rem 1.5rem 2rem;
        max-width: none;
    }

    .cm-auth-aside__logo {
        height: 3rem;
    }

    .cm-auth-aside__title {
        font-size: 1.3rem;
    }

    .cm-auth-aside__lead,
    .cm-auth-aside__list,
    .cm-auth-aside__foot {
        display: none;
    }
}

/* ------------------------------------------------------------- the form card */

.fi-simple-main {
    width: 100%;
    max-width: 26rem;
    padding: 2.25rem !important;
    border: 1px solid rgba(19, 56, 95, 0.08) !important;
    border-radius: 1rem !important;
    background: #fff !important;
    box-shadow:
        0 1px 2px rgba(10, 30, 51, 0.04),
        0 12px 32px -12px rgba(10, 30, 51, 0.15) !important;
}

.dark .fi-simple-main {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: #131c2b !important;
}

.fi-simple-layout .fi-header-heading {
    font-size: 1.5rem;
    letter-spacing: -0.015em;
    color: var(--cm-ink);
}

.dark .fi-simple-layout .fi-header-heading {
    color: #f1f5f9;
}

.fi-simple-layout .fi-header-subheading {
    margin-top: 0.35rem;
    color: #5b7189;
}

/* Inputs: a visible resting border and a brand focus ring. Filament's default
   ring is the panel's primary, which is green here and would fight the navy. */
.fi-simple-layout .fi-input-wrp {
    border-radius: 0.6rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.fi-simple-layout .fi-input-wrp:not(.fi-invalid):focus-within {
    outline: none;
    border-color: var(--cm-accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.18);
}

.fi-simple-layout .fi-input {
    padding-block: 0.65rem;
}

.fi-simple-layout .fi-fo-field-lbl {
    font-weight: 550;
    color: var(--cm-ink);
}

.dark .fi-simple-layout .fi-fo-field-lbl {
    color: #cbd5e1;
}

/* The submit button carries the brand, whatever the panel's primary is. */
.fi-simple-layout .fi-form .fi-btn.fi-color-primary,
.fi-simple-layout .fi-form button[type='submit'] {
    width: 100%;
    padding-block: 0.7rem;
    border-radius: 0.6rem;
    font-weight: 600;
    background: var(--cm-navy) !important;
    border-color: var(--cm-navy) !important;
    color: #fff !important;
    box-shadow: 0 1px 2px rgba(10, 30, 51, 0.2);
    transition: background-color 120ms ease, transform 120ms ease;
}

.fi-simple-layout .fi-form .fi-btn.fi-color-primary:hover,
.fi-simple-layout .fi-form button[type='submit']:hover {
    background: var(--cm-navy-600) !important;
}

.fi-simple-layout .fi-form button[type='submit']:active {
    transform: translateY(1px);
}

/* Secondary links (forgot password, register, back to sign in). */
.fi-simple-layout .fi-link {
    color: var(--cm-navy-600);
    font-weight: 550;
}

.fi-simple-layout .fi-link:hover {
    color: var(--cm-accent);
}

.dark .fi-simple-layout .fi-link {
    color: #7db8e8;
}

/*
 | Filament repeats the brand logo above the card, at brandLogoHeight — 10rem
 | for a guest. The branded panel already carries it at every width, including
 | the compact bar on mobile, so this one is always the duplicate.
 */
.fi-simple-layout .fi-logo {
    display: none;
}

.fi-simple-layout .fi-simple-header {
    gap: 0.35rem;
}
