.login-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: #0c0610;
    overflow: hidden;
}

/* ---------- Left: animated visual panel ---------- */

.login-visual {
    position: relative;
    flex: 1 1 60%;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    padding: 2.5rem 3rem;
}

.login-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 0;
    transition: opacity 1.1s ease-in-out;
}

    .login-bg-slide.active {
        opacity: 1;
    }

.login-visual-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: linear-gradient(120deg, rgba(44, 14, 48, 0.93) 0%, rgba(20, 8, 24, 0.9) 55%, rgba(5, 2, 6, 0.97) 100%);
}

.login-visual-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    color: white;
    gap: 1.5rem;
}

.login-visual-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.login-logo {
    height: 2.1rem;
    width: auto;
}

.login-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
}

    .login-status-badge .bi {
        color: #2ecc71;
        font-size: 0.55rem;
    }

.login-visual-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 34rem;
}

.login-eyebrow {
    color: var(--brand-pink);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.login-visual-middle h1 {
    font-size: 2.9rem;
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 1.1rem;
}

.text-accent {
    color: var(--brand-pink);
}

.login-visual-middle p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 30rem;
}

.login-stats {
    display: flex;
    gap: 1rem;
}

.login-stat {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
}

.login-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
}

.login-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.2rem 0;
}

.login-stat-trend {
    font-size: 0.75rem;
}

    .login-stat-trend.up {
        color: #2ecc71;
    }

    .login-stat-trend.neutral {
        color: rgba(255, 255, 255, 0.5);
    }

.login-carousel-dots {
    display: flex;
    gap: 0.45rem;
}

.login-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dot {
    width: 1.6rem;
    height: 0.22rem;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background-color 0.2s ease, width 0.2s ease;
}

    .dot:hover {
        background-color: rgba(255, 255, 255, 0.5);
    }

    .dot.active {
        background-color: var(--brand-pink);
        width: 2.2rem;
    }

.login-carousel-arrows {
    display: flex;
    gap: 0.6rem;
}

.carousel-arrow {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

    .carousel-arrow:hover {
        background-color: var(--brand-pink);
        border-color: var(--brand-pink);
        color: white;
    }

/* ---------- Right: form panel (shared by login + OTP) ---------- */

.login-form-panel {
    flex: 1 1 40%;
    min-height: 100vh;
    background-color: #0a0610;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form-card {
    width: 100%;
    max-width: 27rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.login-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: color-mix(in srgb, var(--brand-pink) 12%, transparent);
    color: var(--brand-pink);
    border: 1px solid color-mix(in srgb, var(--brand-pink) 35%, transparent);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
}

.form-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.back-to-login-link {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

    .back-to-login-link:hover {
        color: white;
        text-decoration: underline;
    }

.login-form-card h2 {
    color: white;
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.login-subtext {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

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

    .form-field label {
        display: block;
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.8rem;
        font-weight: 600;
        margin-bottom: 0.45rem;
    }

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 0 0.9rem;
    height: 3rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .input-with-icon .bi {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.9rem;
    }

    .input-with-icon input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        color: white;
        font-size: 0.9rem;
        height: 100%;
        letter-spacing: 0.05em;
    }

        .input-with-icon input::placeholder {
            color: rgba(255, 255, 255, 0.3);
        }

    .input-with-icon:focus-within {
        border-color: var(--brand-pink);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-pink) 18%, transparent);
    }

.toggle-password {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
}

    .toggle-password:hover {
        color: white;
    }

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 1.6rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

    .remember-me input {
        accent-color: var(--brand-pink);
    }

.forgot-link {
    color: var(--brand-pink);
    font-weight: 600;
    text-decoration: none;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

.otp-resend-row {
    margin-bottom: 1.6rem;
    font-size: 0.85rem;
}

.otp-resend-text {
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

    .otp-resend-text strong {
        color: white;
    }

.otp-resend-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--brand-pink);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

    .otp-resend-link:hover {
        text-decoration: underline;
    }

.btn-signin {
    width: 100%;
    height: 3.1rem;
    border: none;
    border-radius: 8px;
    background-image: linear-gradient(120deg, var(--brand-pink) 0%, var(--brand-pink-dark) 100%);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-pink) 35%, transparent);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

    .btn-signin:hover {
        opacity: 0.92;
    }

    .btn-signin:active {
        transform: translateY(1px);
    }

    .btn-signin:disabled {
        opacity: 0.75;
        cursor: not-allowed;
        transform: none;
    }

    .btn-signin .btn-spinner {
        width: 1rem;
        height: 1rem;
        border: 2px solid rgba(255, 255, 255, 0.4);
        border-top-color: #fff;
        border-radius: 50%;
        animation: btn-spinner-rotate 0.7s linear infinite;
    }

@keyframes btn-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.login-footer {
    margin-top: 2.25rem;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

    .login-footer p {
        margin: 0.3rem 0;
    }

    .login-footer a {
        color: var(--brand-pink);
        font-weight: 600;
        text-decoration: none;
    }

        .login-footer a:hover {
            text-decoration: underline;
        }

/* ── Two-factor verification page (VerifyOtp.razor) ─────────────────────── */
.otp-card { max-width: 30rem; }

.otp-loading {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    margin: 0.5rem 0 1.5rem;
}

.otp-enroll {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.otp-enroll-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0 0 1rem;
    text-align: left;
}

.otp-qr-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.9rem;
}

.otp-qr {
    width: 172px;
    height: 172px;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
}

.otp-manual-key {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    margin: 0;
    word-break: break-all;
}

.otp-box-group {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 1.4rem;
}

.otp-box {
    width: 3rem;
    height: 3.4rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    color: white;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .otp-box:focus {
        outline: none;
        border-color: var(--brand-pink);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-pink) 20%, transparent);
    }

    .otp-box:disabled {
        opacity: 0.5;
    }

.login-attempts-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f0a93e;
    font-size: 0.8rem;
    margin: -0.6rem 0 1.2rem;
}

.otp-back-link {
    display: block;
    text-align: center;
    margin-top: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

    .otp-back-link:hover {
        color: white;
        text-decoration: underline;
    }

@media (max-width: 1024px) {
    .login-visual-middle h1 {
        font-size: 2.3rem;
    }

    .login-stats {
        flex-wrap: wrap;
    }
}

@media (max-width: 860px) {
    .login-page {
        flex-direction: column;
    }

    .login-visual, .login-form-panel {
        min-height: auto;
    }

    .login-visual {
        padding: 2rem;
    }

    .login-stats {
        display: none;
    }
}

/* ── Busy / processing feedback (Login.razor + VerifyOtp.razor) ─────────────
   The spinner used to be styled only as `.btn-signin .btn-spinner`, so the
   standalone one on the "Preparing verification…" line rendered as nothing.
   This is the shared base; the .btn-signin rule above just inherits it.      */
.btn-spinner {
    display: inline-block;
    flex: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -0.15rem;
    animation: btn-spinner-rotate 0.7s linear infinite;
}

.btn-spinner--dark {
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: var(--brand-pink);
}

/* Dims + locks the whole card while a sign-in / OTP check is in flight, so the
   operator can plainly see the request is being processed and can't fire a
   second one. The busy button itself stays interactive-looking (spinner). */
.login-form-card.is-busy .form-field,
.login-form-card.is-busy .form-row,
.login-form-card.is-busy .otp-box-group,
.login-form-card.is-busy .otp-back-link {
    opacity: 0.55;
    pointer-events: none;
}

.otp-box[readonly] {
    opacity: 0.6;
    cursor: progress;
}

.auth-busy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0.85rem 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

    .auth-busy-note i {
        color: var(--brand-pink);
    }
