/* ============================================================
   Staff sign-in.

   The login runs on its own small token set (--c-*) rather than the portal's
   phoenix layer, so the dark palette is declared here. Only the values change
   under [data-theme="dark"]; every rule below is written once.

   The brand plate on the left stays navy in both themes: it is the brand,
   not a surface, and inverting it would leave the logo floating on nothing.
   ============================================================ */

:root {
    --c-primary: #123C61;
    --c-primary-hover: #1D5A8C;
    --c-primary-rgb: 18, 60, 97;
    --c-on-primary: #FFFFFF;
    --c-gold: #F2B33D;
    --c-gold-rgb: 242, 179, 61;
    --c-error: #A11616;
    --c-text: #12263A;
    --c-muted: #51637A;
    --c-faint: #7F91A6;
    --c-border: #D4DDE8;
    --c-card: #FFFFFF;
    --c-field: #FFFFFF;
    --c-page: linear-gradient(160deg, #F6F8FC 0%, #E9EFF7 100%);
    --c-card-shadow: 0 2px 4px rgba(10, 37, 64, .05), 0 24px 60px rgba(10, 37, 64, .12);
    --c-ring: rgba(242, 179, 61, .35);
    --c-font-heading: "Hanken Grotesk", "Inter", system-ui, sans-serif;
    --c-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
    --c-primary: #FFCE5C;
    --c-primary-hover: #F2B33D;
    --c-primary-rgb: 255, 206, 92;
    --c-on-primary: #06192E;
    --c-error: #F87171;
    --c-text: #E8EEF6;
    --c-muted: #9DB1C8;
    --c-faint: #6E8299;
    --c-border: #1E4468;
    --c-card: #0C2440;
    --c-field: rgba(255, 255, 255, .04);
    --c-page: linear-gradient(160deg, #06192E 0%, #0A2540 100%);
    --c-card-shadow: 0 0 0 1px rgba(255, 206, 92, .08), 0 28px 70px rgba(0, 0, 0, .55);
    --c-ring: rgba(255, 206, 92, .25);
}

/* ── Frame ─────────────────────────────────────────────────── */
.login-container {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
    background: var(--c-page);
    color: var(--c-text);
    font-family: var(--c-font-body);
}

.login-theme-switch {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
}

/* ── Brand plate ───────────────────────────────────────────── */
.left-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem clamp(1.5rem, 4vw, 4rem);
    color: #FFFFFF;
    background:
        radial-gradient(900px 600px at 15% 10%, rgba(29, 90, 140, .55), transparent 60%),
        linear-gradient(150deg, #0A2540 0%, #123C61 55%, #0A2540 100%);
}

    /* Diagonal pin-stripe, the same quiet texture as the public site heroes. */
    .left-panel::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 22px);
        pointer-events: none;
    }

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    pointer-events: none;
    animation: orb-drift 18s ease-in-out infinite alternate;
}

.login-orb-a {
    width: 420px;
    height: 420px;
    right: -120px;
    top: -140px;
    background: radial-gradient(circle, rgba(242, 179, 61, .55), transparent 65%);
}

.login-orb-b {
    width: 360px;
    height: 360px;
    left: -100px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(111, 179, 242, .45), transparent 65%);
    animation-delay: -7s;
}

@keyframes orb-drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-30px, 26px, 0) scale(1.08);
    }
}

.left-panel-inner {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
    animation: login-rise .7s cubic-bezier(.22, .61, .36, 1) both;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-brand-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 20px;
    background: #FFFFFF;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 18px 40px rgba(0, 0, 0, .35);
    flex-shrink: 0;
}

.login-logo {
    width: 60px;
    height: auto;
    display: block;
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.login-brand-name {
    font-family: var(--c-font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.login-brand-sub {
    margin-top: .3rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.quote-container {
    margin: 0;
    padding: 1.25rem 1.4rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

    .quote-container .bi-quote {
        display: block;
        font-size: 1.8rem;
        line-height: 1;
        color: var(--c-gold);
        margin-bottom: .4rem;
    }

    .quote-container p {
        margin: 0;
        font-size: 1.05rem;
        line-height: 1.55;
        font-style: italic;
        color: rgba(255, 255, 255, .92);
    }

.login-pillars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

    .login-pillars li {
        display: flex;
        align-items: center;
        gap: .8rem;
        font-size: .92rem;
        color: rgba(255, 255, 255, .85);
    }

    .login-pillars i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        background: rgba(242, 179, 61, .16);
        color: var(--c-gold);
        font-size: 1rem;
        flex-shrink: 0;
    }

/* ── Form side ─────────────────────────────────────────────── */
.right-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 1.25rem 2.5rem;
}

.login-card {
    width: min(420px, 100%);
    padding: 2rem 2rem 1.6rem;
    border-radius: 20px;
    background: var(--c-card) !important;
    border: 1px solid var(--c-border) !important;
    box-shadow: var(--c-card-shadow) !important;
    color: var(--c-text);
    animation: login-rise .6s cubic-bezier(.22, .61, .36, 1) .08s both;
}

.login-card-brand {
    display: none;
    justify-content: center;
    margin-bottom: 1.25rem;
}

    .login-card-brand img {
        height: 44px;
        width: auto;
        padding: 6px 10px;
        border-radius: 12px;
        background: #FFFFFF;
    }

.login-title {
    margin: 0 0 .25rem;
    font-family: var(--c-font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--c-text);
}

.login-lede {
    margin: 0 0 1.5rem;
    font-size: .88rem;
    color: var(--c-muted);
}

.login-field {
    margin-bottom: 1rem;
}

.login-container .form-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--c-muted);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-faint);
    pointer-events: none;
    font-size: 1rem;
    transition: color .18s ease;
}

.input-wrapper:focus-within .input-icon {
    color: var(--c-primary);
}

.input-with-icon {
    padding-left: 2.5rem !important;
}

.login-container .form-control {
    height: 46px;
    border-radius: 11px;
    background-color: var(--c-field);
    border: 1px solid var(--c-border);
    color: var(--c-text);
    font-size: .92rem;
    transition: border-color .18s ease, box-shadow .22s ease, background-color .18s ease;
}

    .login-container .form-control::placeholder {
        color: var(--c-faint);
        opacity: 1;
    }

    .login-container .form-control:hover {
        border-color: rgba(var(--c-primary-rgb), .45);
    }

    .login-container .form-control:focus {
        background-color: var(--c-field);
        color: var(--c-text);
        border-color: var(--c-primary);
        box-shadow: 0 0 0 4px var(--c-ring);
        outline: none;
    }

.toggle-btn {
    position: absolute;
    right: .4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--c-faint);
    cursor: pointer;
    font-size: 1.05rem;
    transition: color .18s ease, background-color .18s ease;
}

    .toggle-btn:hover {
        color: var(--c-primary);
        background: rgba(var(--c-primary-rgb), .08);
    }

    .toggle-btn:focus-visible {
        outline: 2px solid var(--c-primary);
        outline-offset: 2px;
    }

.err-msg {
    display: block;
    margin-top: .35rem;
    font-size: .76rem;
    color: var(--c-error);
}

    .err-msg.d-none {
        display: none;
    }

.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: 48px;
    margin-top: .5rem;
    border: 0;
    border-radius: 12px;
    background: var(--c-primary);
    color: var(--c-on-primary);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .01em;
    box-shadow: 0 10px 24px rgba(var(--c-primary-rgb), .28);
    transition: background-color .18s ease, transform .15s ease, box-shadow .22s ease;
}

    .btn-brand:hover {
        background: var(--c-primary-hover);
        color: var(--c-on-primary);
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(var(--c-primary-rgb), .34);
    }

    .btn-brand:active {
        transform: translateY(0) scale(.985);
    }

    .btn-brand:disabled {
        opacity: .7;
        transform: none;
        cursor: progress;
    }

    .btn-brand:focus-visible {
        outline: 2px solid var(--c-primary);
        outline-offset: 3px;
    }

.login-foot {
    margin: 1.4rem 0 0;
    text-align: center;
    font-size: .78rem;
    color: var(--c-faint);
}

@keyframes login-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .login-container {
        grid-template-columns: 1fr;
    }

    .left-panel {
        display: none;
    }

    .login-card-brand {
        display: flex;
    }

    .right-panel {
        padding-top: 5rem;
    }
}

@media (max-width: 575.98px) {
    .login-card {
        padding: 1.6rem 1.25rem 1.3rem;
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-orb,
    .left-panel-inner,
    .login-card {
        animation: none;
    }

    .btn-brand,
    .login-container .form-control,
    .toggle-btn {
        transition: none;
    }
}
