html, body,
[data-bs-theme="dark"] body {
    background-color: #F3F5F8;
    background-image: none;
}

.login-stage {
    --ink: #F3F5F8;
    --midnight: #0F2238;
    --gold: #C8A45D;
    --gold-deep: #8F7233;
    --gold-line: #B8913F;
    --mist: #4F6073;
    --line: #D8DEE6;
    --text: #0F2238;
    --muted: #5B6B7F;
    --danger: #B42318;
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    color: var(--text);
    font-family: 'Manrope', Inter, 'Segoe UI', Tahoma, Arial, sans-serif;
    background: radial-gradient(900px 620px at 20% 45%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%), var(--ink);
}

/* ---------- Geometric lattice ---------- */
.login-pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .75;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 70% 90% at 24% 50%, #000 10%, transparent 72%);
    mask-image: radial-gradient(ellipse 70% 90% at 24% 50%, #000 10%, transparent 72%);
}

/* ---------- Layout ---------- */
.login-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    padding: 2rem 1.25rem;
}

.login-statement {
    display: none;
}

@media (min-width: 992px) {
    .login-content {
        grid-template-columns: minmax(0, 1fr) 480px;
        justify-items: stretch;
        column-gap: 5rem;
        padding: 3rem 6vw 3rem 7vw;
    }

    .login-statement {
        display: block;
    }

    .login-card {
        justify-self: end;
    }
}

/* ---------- Statement ---------- */
.login-statement::before {
    content: "";
    display: block;
    width: 56px;
    height: 2px;
    margin-bottom: 2rem;
    background: var(--gold-deep);
}

.login-statement h5 {
    max-width: 34ch;
    margin: 0;
    font-size: clamp(0.75rem, 2.6vw, 2.25rem);
    font-weight: 400;
    line-height: 1.07;
    letter-spacing: -.035em;
    color: var(--gold);
}


.login-points {
    max-width: 33rem;
    margin: 3.25rem 0 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid rgba(184, 145, 63, .4);
}

    .login-points li {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem 0;
        border-top: 1px solid rgba(184, 145, 63, .4);
    }

.login-point-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(184, 145, 63, .5);
    border-radius: 10px;
    background: #fff;
    color: var(--gold-deep);
}

.login-points strong {
    display: block;
    margin-bottom: .2rem;
    font-size: .8375rem;
    font-weight: 600;
    color: var(--gold);
}

.login-points span {
    font-size: .875rem;
    line-height: 1.55;
    color: var(--gold-deep);
}

/* ---------- Card ---------- */
.login-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 2.75rem 2.75rem 2.5rem;
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 0 0 1px rgba(184, 145, 63, .35), 0 30px 70px -24px rgba(15, 34, 56, .35);
    animation: login-rise .7s cubic-bezier(.2, .7, .2, 1) both;
}

    .login-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 2.75rem;
        right: 2.75rem;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--gold);
    }

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

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

@media (prefers-reduced-motion: reduce) {
    .login-card {
        animation: none;
    }
}

.login-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 56px;
    margin: .75rem auto 1.75rem;
}

.login-card, .login-card * {
    box-sizing: border-box;
}

    .login-card h1 {
        margin: 0 0 .5rem;
        font-size: 1.625rem;
        font-weight: 700;
        letter-spacing: -.02em;
        text-align: center;
        color: var(--text);
    }

.login-lead {
    margin: 0 0 2rem;
    font-size: .95rem;
    text-align: center;
    color: var(--muted);
}

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

.login-label {
    display: block;
    margin-bottom: .5rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
}

.login-input {
    display: block;
    width: 100%;
    height: 3.1rem;
    padding: 0 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s;
}

    .login-input:hover {
        border-color: #B7C1CE;
    }

    .login-input:focus {
        outline: none;
        border-color: var(--midnight);
        box-shadow: 0 0 0 4px rgba(200, 164, 93, .28);
    }

    .login-input.input-validation-error {
        border-color: var(--danger);
    }

.login-error {
    display: block;
    margin-top: .4rem;
    font-size: .8125rem;
    color: var(--danger);
}

.password-wrap {
    position: relative;
}

    .password-wrap .login-input {
        padding-right: 3rem;
    }

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 3rem;
    height: 3.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

    .password-toggle:hover {
        color: var(--text);
    }

    .password-toggle:focus-visible {
        outline: 2px solid var(--midnight);
        outline-offset: -4px;
        border-radius: 10px;
    }

.login-alert {
    margin-bottom: 1.25rem;
    padding: .8rem 1rem;
    border: 1px solid #F4C7C3;
    border-radius: 10px;
    background: #FEF3F2;
    font-size: .875rem;
    color: var(--danger);
}

    .login-alert.validation-summary-valid,
    .login-alert:empty {
        display: none;
    }

    .login-alert ul {
        margin: 0;
        padding-left: 1.1rem;
    }

.login-forgot {
    display: flex;
    justify-content: flex-end;
    margin: -.25rem 0 1.75rem;
    font-size: .875rem;
    font-weight: 600;
}

    .login-forgot a {
        color: var(--text);
        text-decoration: underline;
        text-decoration-color: var(--gold);
        text-underline-offset: 4px;
        text-decoration-thickness: 2px;
    }

        .login-forgot a:hover {
            color: var(--gold-deep);
        }

/* Own button styles: avoids fighting the theme's .btn rules */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 3.25rem;
    border: 0;
    border-radius: 10px;
    background: var(--midnight);
    box-shadow: inset 0 -3px 0 var(--gold);
    color: #fff;
    font: inherit;
    font-size: .975rem;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background-color .15s;
}

    .login-btn:hover {
        background: #183452;
    }

    .login-btn:focus-visible {
        outline: 3px solid rgba(200, 164, 93, .6);
        outline-offset: 3px;
    }

    .login-btn:disabled {
        opacity: .8;
        cursor: progress;
    }

    .login-btn .indicator-progress {
        display: none;
    }

    .login-btn[data-kt-indicator="on"] .indicator-label {
        display: none;
    }

    .login-btn[data-kt-indicator="on"] .indicator-progress {
        display: inline-flex;
        align-items: center;
    }

@media (max-width: 575.98px) {
    .login-card {
        padding: 2.25rem 1.5rem 2rem;
        border-radius: 16px;
    }

        .login-card::before {
            left: 1.5rem;
            right: 1.5rem;
        }
}

/* =====================================================================
   Shared components for the other account pages
   (forgot / reset password, 2FA, register, confirmations, lockout ...)
   ===================================================================== */

/* Lattice drawn by CSS, for pages without the inline <svg class="login-pattern"> */
.login-stage--lattice::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cg fill='none' stroke='%23B8913F' stroke-width='.8' stroke-opacity='.5'%3E%3Crect x='25' y='25' width='50' height='50'/%3E%3Crect x='25' y='25' width='50' height='50' transform='rotate(45 50 50)'/%3E%3Crect x='-25' y='-25' width='50' height='50'/%3E%3Crect x='-25' y='-25' width='50' height='50' transform='rotate(45 0 0)'/%3E%3Crect x='75' y='-25' width='50' height='50'/%3E%3Crect x='75' y='-25' width='50' height='50' transform='rotate(45 100 0)'/%3E%3Crect x='-25' y='75' width='50' height='50'/%3E%3Crect x='-25' y='75' width='50' height='50' transform='rotate(45 0 100)'/%3E%3Crect x='75' y='75' width='50' height='50'/%3E%3Crect x='75' y='75' width='50' height='50' transform='rotate(45 100 100)'/%3E%3Cpath d='M85.36 50H100M0 50H14.64M50 85.36V100M50 0V14.64M35.36 0H64.64M35.36 100H64.64M0 35.36V64.64M100 35.36V64.64'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100px 100px;
    opacity: .75;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 70% 90% at 24% 50%, #000 10%, transparent 72%);
    mask-image: radial-gradient(ellipse 70% 90% at 24% 50%, #000 10%, transparent 72%);
}

/* Status icon at the top of a card */
.login-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: .75rem auto 1.5rem;
    border: 1px solid rgba(184, 145, 63, .5);
    border-radius: 14px;
    background: #fff;
    color: var(--gold-deep);
}

.login-icon svg {
    width: 28px;
    height: 28px;
}

.login-icon--danger {
    border-color: #F4C7C3;
    background: #FEF3F2;
    color: var(--danger);
}

/* Body text and notes */
.login-text {
    margin: 0 0 1.75rem;
    font-size: .95rem;
    line-height: 1.65;
    text-align: center;
    color: var(--muted);
}

.login-text a,
.login-note a,
.login-switch a {
    font-weight: 600;
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.login-text a:hover,
.login-note a:hover,
.login-switch a:hover {
    color: var(--gold-deep);
}

.login-note {
    margin-bottom: 1.5rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(184, 145, 63, .35);
    border-radius: 10px;
    background: #FBF7EE;
    font-size: .875rem;
    line-height: 1.6;
    color: var(--text);
}

.login-hint {
    margin: .5rem 0 0;
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--muted);
}

/* Buttons: link version and secondary */
a.login-btn {
    text-decoration: none;
}

a.login-btn:hover {
    color: #fff;
}

.login-btn.login-btn--ghost {
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--text);
}

.login-btn.login-btn--ghost:hover {
    background: #F3F5F8;
    box-shadow: inset 0 0 0 1px var(--gold-line);
    color: var(--text);
}

.login-actions {
    display: grid;
    gap: .75rem;
    margin-top: 1.75rem;
}

/* Fields */
.login-check {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0 0 1.5rem;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
}

.login-check input {
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: var(--midnight);
}

.login-input--code {
    text-align: center;
    letter-spacing: .4em;
    font-size: 1.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.password-toggle .icon-off {
    display: none;
}

.password-toggle.is-visible .icon-on {
    display: none;
}

.password-toggle.is-visible .icon-off {
    display: block;
}

/* Password strength meter (driven by js/AuthPage.js) */
.login-meter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .4rem;
    margin-top: .75rem;
}

.login-meter span {
    height: 5px;
    border-radius: 3px;
    background: #E3E8EF;
    transition: background-color .2s;
}

.login-meter[data-level="1"] span:nth-child(-n+1) { background: #B42318; }
.login-meter[data-level="2"] span:nth-child(-n+2) { background: #D08A1E; }
.login-meter[data-level="3"] span:nth-child(-n+3) { background: var(--gold); }
.login-meter[data-level="4"] span { background: #1F7A4D; }

/* Dividers and switch links */
.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0 1.25rem;
    font-size: .8125rem;
    color: var(--muted);
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.login-switch {
    margin: 1.75rem 0 0;
    text-align: center;
    font-size: .9rem;
    color: var(--muted);
}

/* Status messages rendered by the _StatusMessage partial */
.login-card .alert {
    margin-bottom: 1.25rem;
    padding: .8rem 1rem;
    border-radius: 10px;
    font-size: .875rem;
}

.login-card .alert-success {
    border: 1px solid #BFE3CF;
    background: #F0FAF4;
    color: #1F7A4D;
}

.login-card .alert-danger {
    border: 1px solid #F4C7C3;
    background: #FEF3F2;
    color: var(--danger);
}
