/* =============================================================================
   FINO AUTH — Light Design System v2
   Palette: White · Light Gray (#F0F4F8) · Sky Blue (#0891B2) · Teal (#0D9488)
   Text: Dark Slate on light backgrounds
   ============================================================================= */

/* ─── Design tokens ────────────────────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --f-page:         #F0F4F8;
    --f-left:         #F0F9FF;
    --f-form:         #FFFFFF;

    /* Brand accent */
    --f-accent:       #0891B2;
    --f-accent-lt:    #E0F2FE;
    --f-accent-dk:    #0E7490;
    --f-teal:         #0D9488;
    --f-teal-lt:      #CCFBF1;

    /* Typography */
    --f-text:         #0F172A;
    --f-text-sec:     #64748B;
    --f-text-muted:   #94A3B8;

    /* Inputs */
    --f-input-bg:     #F8FAFC;
    --f-input-bdr:    #E2E8F0;
    --f-divider:      #E2E8F0;

    /* Status */
    --f-danger:       #EF4444;
    --f-danger-lt:    #FEF2F2;
    --f-success:      #10B981;
    --f-success-lt:   #ECFDF5;
    --f-warning:      #F59E0B;
    --f-warning-lt:   #FFFBEB;

    /* Radii */
    --f-r-input:      10px;
    --f-r-card:       14px;

    /* Shadows */
    --f-shadow-xs:    0 1px 2px rgba(15,23,42,0.05);
    --f-shadow-sm:    0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
    --f-shadow-md:    0 4px 16px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
    --f-shadow-lg:    0 12px 40px rgba(15,23,42,0.10), 0 4px 8px rgba(15,23,42,0.04);
    --f-shadow-btn:   0 2px 8px rgba(8,145,178,0.28);
    --f-shadow-btn-h: 0 4px 18px rgba(8,145,178,0.40);
}

/* ─── Body ─────────────────────────────────────────────────────────────────── */
body {
    background: var(--f-page);
    margin: 0;
}

/* ─── Root container ────────────────────────────────────────────────────────── */
.fino-auth-root {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--f-page);
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =============================================================================
   LEFT BRAND PANEL — light gradient
   ============================================================================= */
.fino-auth-brand {
    flex: 1 1 50%;
    min-width: 340px;
    background: linear-gradient(145deg, #EFF6FF 0%, #E0F2FE 50%, #CCFBF1 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

/* Large radial blobs for depth */
.fino-auth-brand::before {
    content: '';
    position: absolute;
    top: -140px;
    right: -80px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(8,145,178,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.fino-auth-brand::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13,148,136,0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Dot-grid decoration */
.fino-brand-dot-grid {
    position: absolute;
    top: 0;
    right: 0;
    width: 220px;
    height: 220px;
    opacity: 0.18;
    pointer-events: none;
}

.fino-brand-dot-grid circle { fill: #0891B2; }

/* Wave decoration */
.fino-brand-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    opacity: 0.14;
    pointer-events: none;
}

.fino-brand-wave path { fill: #0D9488; }

/* Inner content */
.fino-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ── Logo ── */
.fino-brand-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fino-brand-logo-img {
    height: 44px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(37%) sepia(70%) saturate(520%) hue-rotate(166deg) brightness(93%) contrast(99%);
}

/* ── Tagline ── */
.fino-brand-headline {
    font-size: clamp(28px, 3.2vw, 44px);
    font-weight: 700;
    line-height: 1.16;
    color: #0F172A;
    margin: 0;
    letter-spacing: -0.03em;
}

.fino-brand-headline em {
    font-style: normal;
    background: linear-gradient(135deg, #0891B2 0%, #0D9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fino-brand-para {
    margin: 10px 0 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
    color: #64748B;
}

/* ── Trust badges ── */
.fino-brand-trust {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 0;
    font-size: 13px;
    font-weight: 400;
    color: #94A3B8;
}

.fino-brand-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #64748B;
}

.fino-brand-trust-item i {
    font-size: 15px;
    color: #0891B2;
}

.fino-brand-trust-sep {
    margin: 0 12px;
    color: #CBD5E1;
}

/* ── Stats grid ── */
.fino-brand-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.fino-stat-card {
    background: rgba(255,255,255,0.80);
    border: 1px solid rgba(255,255,255,0.95);
    border-radius: var(--f-r-card);
    padding: 18px 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--f-shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.fino-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--f-shadow-md);
}

.fino-stat-label {
    font-size: 12px;
    font-weight: 400;
    color: #64748B;
    letter-spacing: 0.2px;
    margin-bottom: 6px;
}

.fino-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.2;
    margin-bottom: 6px;
    letter-spacing: -0.025em;
}

.fino-stat-change {
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.fino-stat-change.up   { color: #059669; }
.fino-stat-change.down { color: #DC2626; }

/* ── Bar chart ── */
.fino-brand-chart-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.90);
    border-radius: var(--f-r-card);
    padding: 16px 18px 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--f-shadow-sm);
}

.fino-brand-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fino-brand-chart-label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.fino-brand-chart-badge {
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 6px;
    padding: 3px 9px;
}

.fino-brand-chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 80px;
}

.fino-brand-bar {
    flex: 1;
    border-radius: 4px 4px 2px 2px;
    background: rgba(8,145,178,0.14);
    transition: background 0.2s ease;
}

.fino-brand-bar:hover {
    background: rgba(8,145,178,0.26);
}

.fino-brand-bar--accent {
    background: linear-gradient(180deg, #0891B2 0%, #0D9488 100%);
    box-shadow: 0 4px 14px rgba(8,145,178,0.32);
}

.fino-brand-chart-days {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 400;
    color: #94A3B8;
    margin-top: -2px;
}

/* =============================================================================
   RIGHT FORM PANEL
   ============================================================================= */
.fino-auth-form-side {
    flex: 1 1 50%;
    min-width: 340px;
    background: var(--f-form);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    border-left: 1px solid #F1F5F9;
}

/* Subtle background glows */
.fino-form-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.fino-form-glow--tr {
    top: -120px;
    right: -120px;
    background: radial-gradient(circle, rgba(8,145,178,0.06) 0%, transparent 70%);
}

.fino-form-glow--bl {
    bottom: -120px;
    left: -120px;
    background: radial-gradient(circle, rgba(13,148,136,0.06) 0%, transparent 70%);
}

/* ── Theme toggle ── */
.fino-login-mode-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1.5px solid var(--f-input-bdr);
    border-radius: var(--f-r-input);
    background: var(--f-input-bg);
    color: var(--f-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fino-login-mode-toggle:hover {
    border-color: var(--f-accent);
    color: var(--f-accent);
    background: var(--f-accent-lt);
}

.fino-login-mode-toggle i { font-size: 16px; }

/* ── Small logo bar ── */
.fino-form-logo-bar {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    padding: 28px 44px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fino-form-logo {
    height: 30px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
}

/* ── Main form area ── */
.fino-auth-form-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 44px;
    position: relative;
    z-index: 2;
    overflow-y: auto;
    min-height: 0;
}

.fino-auth-form-wrap {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

/* ── Form page header ── */
.fino-auth-page-header {
    margin-bottom: 32px;
}

.fino-auth-page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--f-text);
    margin: 0 0 8px;
    letter-spacing: -0.03em;
    line-height: 1.18;
}

.fino-auth-page-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--f-text-sec);
    margin: 0;
    line-height: 1.6;
}

/* ── Trust row ── */
.fino-form-trust-row {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    padding: 0 44px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    font-weight: 400;
    color: var(--f-text-muted);
}

.fino-form-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fino-form-trust-row i {
    font-size: 12px;
    color: var(--f-accent);
}

.fino-form-trust-sep { color: #CBD5E1; }

/* ── Copyright footer ── */
.fino-auth-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    padding: 0 44px 20px;
    text-align: center;
    font-size: 11px;
    font-weight: 400;
    color: var(--f-text-muted);
}

/* =============================================================================
   SHARED FORM COMPONENTS
   ============================================================================= */

/* Form group */
.fino-form-group {
    margin-bottom: 20px;
}

.fino-form-group:last-child {
    margin-bottom: 0;
}

/* Label */
.fino-auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--f-text);
    letter-spacing: 0.05px;
    margin-bottom: 7px;
}

/* Input wrapper */
.fino-field {
    position: relative;
    display: flex;
    align-items: center;
}

.fino-field-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--f-text-muted);
    pointer-events: none;
    flex-shrink: 0;
    z-index: 1;
    transition: color 0.18s ease;
}

.fino-field:focus-within .fino-field-icon {
    color: var(--f-accent);
}

/* Core input */
.fino-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    font-size: 14px;
    font-weight: 400;
    color: var(--f-text);
    background: var(--f-input-bg);
    border: 1.5px solid var(--f-input-bdr);
    border-radius: var(--f-r-input);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.fino-input::placeholder {
    color: var(--f-text-muted);
    font-weight: 400;
}

.fino-input:hover:not(:focus):not(.is-invalid) {
    border-color: #CBD5E1;
    background: #FFFFFF;
}

.fino-input:focus {
    border-color: var(--f-accent);
    box-shadow: 0 0 0 3px rgba(8,145,178,0.12);
    background: #FFFFFF;
}

.fino-input.is-invalid {
    border-color: var(--f-danger) !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.08) !important;
    background: var(--f-danger-lt) !important;
}

.fino-input.fino-input--no-icon {
    padding-left: 14px;
}

/* Eye toggle */
.fino-eye-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    color: var(--f-text-muted);
    cursor: pointer;
    padding: 0;
    z-index: 2;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.fino-eye-btn:hover {
    color: var(--f-text-sec);
    background: var(--f-input-bdr);
}

.fino-eye-btn i { font-size: 15px; }

/* Error text */
.fino-field-error {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 400;
    color: var(--f-danger);
    margin-top: 5px;
}

/* Checkbox row */
.fino-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fino-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 400;
    color: var(--f-text-sec);
    cursor: pointer;
    user-select: none;
}

.fino-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--f-accent);
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
}

/* Links */
.fino-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--f-accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

.fino-link:hover {
    color: var(--f-accent-dk);
    text-decoration: underline;
}

.fino-link-muted {
    font-size: 13px;
    font-weight: 400;
    color: var(--f-text-sec);
    text-decoration: none;
    transition: color 0.15s ease;
}

.fino-link-muted:hover { color: var(--f-text); }

/* Primary button */
.fino-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    background: linear-gradient(135deg, #0891B2 0%, #0D9488 100%);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--f-r-input);
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: var(--f-shadow-btn);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.fino-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s ease;
}

.fino-btn-primary:hover {
    background: linear-gradient(135deg, #0E7490 0%, #0F766E 100%);
    color: #FFFFFF;
    box-shadow: var(--f-shadow-btn-h);
    transform: translateY(-1px);
}

.fino-btn-primary:hover::before {
    background: rgba(255,255,255,0.04);
}

.fino-btn-primary:active {
    transform: translateY(0) scale(0.99);
    box-shadow: var(--f-shadow-xs);
}

.fino-btn-primary:focus-visible {
    outline: 2px solid rgba(8,145,178,0.50);
    outline-offset: 2px;
}

.fino-btn-primary i { font-size: 15px; flex-shrink: 0; }

/* Primary button — loading state */
.fino-btn-primary[data-loading="true"] {
    pointer-events: none;
    opacity: 0.75;
}

/* Secondary / outline button */
.fino-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    background: #FFFFFF;
    border: 1.5px solid var(--f-input-bdr);
    border-radius: var(--f-r-input);
    color: var(--f-text-sec);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--f-shadow-xs);
}

.fino-btn-secondary:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
    color: var(--f-text);
    box-shadow: var(--f-shadow-sm);
    transform: translateY(-1px);
}

.fino-btn-secondary:active {
    transform: translateY(0);
    box-shadow: var(--f-shadow-xs);
}

/* Social buttons row */
.fino-social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Divider */
.fino-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--f-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.fino-divider::before,
.fino-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--f-divider);
}

/* Page link (e.g. "Already have an account?") */
.fino-page-link {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    font-weight: 400;
    color: var(--f-text-sec);
}

.fino-page-link a,
.fino-page-link .fino-link {
    color: var(--f-accent);
    text-decoration: none;
    font-weight: 600;
}

.fino-page-link a:hover {
    color: var(--f-accent-dk);
    text-decoration: underline;
}

/* Back link */
.fino-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--f-text-sec);
    text-decoration: none;
    margin-top: 16px;
    padding: 7px 12px;
    border-radius: 8px;
    transition: all 0.18s ease;
}

.fino-back-link:hover {
    color: var(--f-text);
    background: var(--f-input-bg);
    border-radius: 8px;
}

/* Alert banners */
.fino-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    border-radius: var(--f-r-card);
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.55;
}

.fino-alert-success {
    background: var(--f-success-lt);
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.fino-alert-danger {
    background: var(--f-danger-lt);
    border: 1px solid #FECACA;
    color: #991B1B;
}

.fino-alert-warning {
    background: var(--f-warning-lt);
    border: 1px solid #FDE68A;
    color: #92400E;
}

/* Password strength indicator */
#pwindicator {
    margin-top: 7px;
}

#pwindicator .bar {
    height: 4px;
    border-radius: 3px;
    background: var(--f-input-bdr);
    margin-bottom: 4px;
    overflow: hidden;
    transition: background 0.3s ease;
}

#pwindicator .label {
    font-size: 11px;
    font-weight: 500;
    color: var(--f-text-sec);
}

/* Terms text */
.fino-terms-text {
    font-size: 13px;
    font-weight: 400;
    color: var(--f-text-sec);
    line-height: 1.55;
}

.fino-terms-text a {
    color: var(--f-accent);
    text-decoration: none;
    font-weight: 500;
}

.fino-terms-text a:hover {
    color: var(--f-accent-dk);
    text-decoration: underline;
}

/* =============================================================================
   TWO-FACTOR — 6-digit code input
   ============================================================================= */
.fino-code-input {
    text-align: center !important;
    letter-spacing: 10px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.fino-recovery-input {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    font-size: 13px;
}

.fino-2fa-toggle {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--f-accent);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 100%;
    transition: color 0.15s ease;
}

.fino-2fa-toggle:hover { color: var(--f-accent-dk); }

/* =============================================================================
   EMAIL PILL (verify page)
   ============================================================================= */
.fino-email-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--f-accent-lt);
    border: 1px solid rgba(8,145,178,0.22);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    color: var(--f-accent-dk);
    max-width: 100%;
    word-break: break-all;
    margin-bottom: 20px;
}

.fino-email-pill i {
    font-size: 15px;
    color: var(--f-accent);
    flex-shrink: 0;
}

/* =============================================================================
   reCAPTCHA
   ============================================================================= */
.grecaptcha-badge { z-index: 5; }

/* =============================================================================
   BOOTSTRAP OVERRIDES (scoped to auth)
   ============================================================================= */
.fino-auth-form-side .form-check-input {
    accent-color: var(--f-accent);
}

.fino-auth-form-side .invalid-feedback,
.fino-auth-form-side .is-invalid ~ .invalid-feedback {
    display: block;
    font-size: 12px;
    color: var(--f-danger);
    margin-top: 4px;
}

/* Strip Bootstrap card chrome */
.fino-auth-root .card,
.fino-auth-root .card-body {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* =============================================================================
   TOAST (override dark defaults)
   ============================================================================= */
.fino-auth-root #liveToast {
    background: var(--f-text);
    color: #fff;
}

/* =============================================================================
   RESPONSIVE — ≤ 767px: hide left panel, card-wrapped form
   ============================================================================= */
@media (max-width: 767px) {
    .fino-auth-brand {
        display: none;
    }

    .fino-auth-root {
        flex-direction: column;
    }

    .fino-auth-form-side {
        width: 100%;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        background: var(--f-page);
        border-left: none;
    }

    .fino-form-logo-bar {
        padding: 24px 24px 0;
        flex-shrink: 0;
    }

    .fino-form-logo { height: 30px; }

    .fino-auth-form-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 24px 20px 20px;
        overflow-y: auto;
    }

    .fino-auth-form-wrap {
        max-width: 100%;
        background: #FFFFFF;
        border-radius: 18px;
        padding: 28px 24px;
        box-shadow: var(--f-shadow-lg);
    }

    .fino-auth-page-title   { font-size: 24px; }
    .fino-auth-page-subtitle { font-size: 14px; }
    .fino-auth-page-header  { margin-bottom: 24px; }
    .fino-form-group        { margin-bottom: 18px; }

    .fino-social-row { grid-template-columns: 1fr 1fr; }

    .fino-form-trust-row {
        padding: 0 24px 10px;
        font-size: 11px;
    }

    .fino-auth-footer { padding: 0 24px 16px; }

    .fino-login-mode-toggle {
        top: 20px;
        right: 20px;
    }
}

@media (max-width: 420px) {
    .fino-auth-form-main    { padding: 20px 16px 16px; }
    .fino-auth-form-wrap    { padding: 24px 20px; border-radius: 16px; }
    .fino-auth-page-title   { font-size: 22px; }
    .fino-social-row        { grid-template-columns: 1fr; }
    .fino-form-logo-bar     { padding: 20px 20px 0; }
}

@media (max-height: 680px) and (max-width: 767px) {
    .fino-auth-form-main    { justify-content: flex-start; padding-top: 20px; }
    .fino-auth-page-header  { margin-bottom: 16px; }
    .fino-form-group        { margin-bottom: 14px; }
}

@media (max-height: 680px) and (min-width: 768px) {
    .fino-auth-form-main    { justify-content: flex-start; padding-top: 16px; }
}

/* ─── Left panel responsive padding ───────────────────────────────────────── */
@media (max-width: 1100px) {
    .fino-auth-brand  { padding: 40px 36px; }
    .fino-auth-form-main { padding-left: 36px; padding-right: 36px; }
    .fino-form-logo-bar  { padding-left: 36px; }
    .fino-form-trust-row { padding-left: 36px; padding-right: 36px; }
    .fino-auth-footer    { padding-left: 36px; padding-right: 36px; }
}

@media (max-width: 900px) {
    .fino-auth-brand    { padding: 36px 28px; min-width: 300px; }
    .fino-brand-stats-grid { gap: 8px; }
    .fino-stat-value    { font-size: 17px; }
}

/* =============================================================================
   DARK MODE — toggled by  html[data-auth-theme="dark"]
   Reverts to the original dark design system tokens.
   ============================================================================= */
html[data-auth-theme="dark"] {
    /* Backgrounds */
    --f-page:         #040E0E;
    --f-left:         #061A1A;
    --f-form:         #071212;

    /* Accent — back to teal */
    --f-accent:       #0ECFB5;
    --f-accent-lt:    rgba(14,207,181,0.12);
    --f-accent-dk:    #0AB8A3;
    --f-teal:         #0ECFB5;
    --f-teal-lt:      rgba(14,207,181,0.08);

    /* Typography */
    --f-text:         #FFFFFF;
    --f-text-sec:     rgba(255,255,255,0.55);
    --f-text-muted:   rgba(255,255,255,0.28);

    /* Inputs */
    --f-input-bg:     rgba(255,255,255,0.05);
    --f-input-bdr:    rgba(255,255,255,0.10);
    --f-divider:      rgba(255,255,255,0.08);

    /* Status */
    --f-danger:       #F07070;
    --f-danger-lt:    rgba(240,112,112,0.10);
    --f-success:      #0ECFB5;
    --f-success-lt:   rgba(14,207,181,0.08);
    --f-warning:      #FFC400;
    --f-warning-lt:   rgba(255,196,0,0.08);

    /* Shadows — flatten for dark surfaces */
    --f-shadow-xs:    none;
    --f-shadow-sm:    none;
    --f-shadow-md:    none;
    --f-shadow-lg:    none;
    --f-shadow-btn:   0 2px 8px rgba(14,207,181,0.25);
    --f-shadow-btn-h: 0 4px 16px rgba(14,207,181,0.38);
}

/* Body bg */
html[data-auth-theme="dark"] body {
    background: #040E0E !important;
}

/* Left panel — dark teal gradient */
html[data-auth-theme="dark"] .fino-auth-brand {
    background: #061A1A;
}

html[data-auth-theme="dark"] .fino-auth-brand::before {
    background: radial-gradient(circle, rgba(14,207,181,0.06) 0%, transparent 70%);
}

html[data-auth-theme="dark"] .fino-auth-brand::after {
    background: radial-gradient(circle, rgba(14,207,181,0.08) 0%, transparent 70%);
}

html[data-auth-theme="dark"] .fino-brand-dot-grid circle { fill: #0ECFB5; }
html[data-auth-theme="dark"] .fino-brand-wave path       { fill: #0ECFB5; }

/* Brand headline */
html[data-auth-theme="dark"] .fino-brand-headline {
    color: #FFFFFF;
}

html[data-auth-theme="dark"] .fino-brand-headline em {
    background: none;
    -webkit-text-fill-color: #0ECFB5;
    color: #0ECFB5;
}

/* Brand logo — un-invert the filter used for light bg */
html[data-auth-theme="dark"] .fino-brand-logo-img {
    filter: none;
}

/* Stat cards */
html[data-auth-theme="dark"] .fino-stat-card {
    background: rgba(14,207,181,0.05);
    border-color: rgba(14,207,181,0.14);
    backdrop-filter: none;
    box-shadow: none;
}

html[data-auth-theme="dark"] .fino-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

html[data-auth-theme="dark"] .fino-stat-value { color: #FFFFFF; }
html[data-auth-theme="dark"] .fino-stat-label { color: rgba(255,255,255,0.45); }
html[data-auth-theme="dark"] .fino-stat-change.up   { color: #0ECFB5; }
html[data-auth-theme="dark"] .fino-stat-change.down { color: #F07070; }

/* Chart */
html[data-auth-theme="dark"] .fino-brand-chart-wrap {
    background: rgba(14,207,181,0.03);
    border-color: rgba(14,207,181,0.10);
    backdrop-filter: none;
    box-shadow: none;
}

html[data-auth-theme="dark"] .fino-brand-chart-label { color: rgba(255,255,255,0.28); }

html[data-auth-theme="dark"] .fino-brand-chart-badge {
    color: #0ECFB5;
    background: rgba(14,207,181,0.10);
    border-color: rgba(14,207,181,0.20);
}

html[data-auth-theme="dark"] .fino-brand-bar {
    background: rgba(14,207,181,0.18);
}

html[data-auth-theme="dark"] .fino-brand-bar:hover {
    background: rgba(14,207,181,0.30);
}

html[data-auth-theme="dark"] .fino-brand-bar--accent {
    background: #0ECFB5;
    box-shadow: 0 0 10px rgba(14,207,181,0.45);
}

html[data-auth-theme="dark"] .fino-brand-trust-item  { color: rgba(255,255,255,0.35); }
html[data-auth-theme="dark"] .fino-brand-trust-item i { color: #0ECFB5; }
html[data-auth-theme="dark"] .fino-brand-trust-sep   { color: rgba(255,255,255,0.15); }

/* Right form panel */
html[data-auth-theme="dark"] .fino-auth-form-side {
    background: #071212;
    border-left-color: rgba(255,255,255,0.04);
}

html[data-auth-theme="dark"] .fino-form-glow--tr {
    background: radial-gradient(circle, rgba(14,207,181,0.07) 0%, transparent 70%);
}

html[data-auth-theme="dark"] .fino-form-glow--bl {
    background: radial-gradient(circle, rgba(14,207,181,0.05) 0%, transparent 70%);
}

/* Toggle button */
html[data-auth-theme="dark"] .fino-login-mode-toggle {
    border-color: rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.45);
}

html[data-auth-theme="dark"] .fino-login-mode-toggle:hover {
    border-color: #0ECFB5;
    color: #0ECFB5;
    background: rgba(14,207,181,0.08);
}

/* Inputs */
html[data-auth-theme="dark"] .fino-input {
    color: rgba(255,255,255,0.90);
}

html[data-auth-theme="dark"] .fino-input::placeholder {
    color: rgba(255,255,255,0.22);
}

html[data-auth-theme="dark"] .fino-input:hover:not(:focus):not(.is-invalid) {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.14);
}

html[data-auth-theme="dark"] .fino-input:focus {
    box-shadow: 0 0 0 3px rgba(14,207,181,0.12);
}

html[data-auth-theme="dark"] .fino-input.is-invalid {
    background: rgba(240,112,112,0.08) !important;
}

html[data-auth-theme="dark"] .fino-field-icon { color: rgba(255,255,255,0.25); }
html[data-auth-theme="dark"] .fino-field:focus-within .fino-field-icon { color: #0ECFB5; }

html[data-auth-theme="dark"] .fino-eye-btn { color: rgba(255,255,255,0.28); }
html[data-auth-theme="dark"] .fino-eye-btn:hover {
    color: rgba(255,255,255,0.65);
    background: rgba(255,255,255,0.06);
}

/* Primary button */
html[data-auth-theme="dark"] .fino-btn-primary {
    background: #0ECFB5;
    color: #031212;
}

html[data-auth-theme="dark"] .fino-btn-primary:hover {
    background: #0AB8A3;
    color: #031212;
}

/* Secondary button */
html[data-auth-theme="dark"] .fino-btn-secondary {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.60);
    box-shadow: none;
}

html[data-auth-theme="dark"] .fino-btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    box-shadow: none;
}

/* Alerts */
html[data-auth-theme="dark"] .fino-alert-success {
    background: rgba(14,207,181,0.08);
    border-color: rgba(14,207,181,0.22);
    color: #65e8d8;
}

html[data-auth-theme="dark"] .fino-alert-danger {
    background: rgba(240,112,112,0.08);
    border-color: rgba(240,112,112,0.22);
    color: #f5a0a0;
}

html[data-auth-theme="dark"] .fino-alert-warning {
    background: rgba(255,196,0,0.08);
    border-color: rgba(255,196,0,0.20);
    color: rgba(255,220,80,0.90);
}

/* Email pill */
html[data-auth-theme="dark"] .fino-email-pill {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.55);
}

html[data-auth-theme="dark"] .fino-email-pill i { color: #0ECFB5; }

/* Trust row & footer */
html[data-auth-theme="dark"] .fino-form-trust-row {
    color: rgba(255,255,255,0.28);
}

html[data-auth-theme="dark"] .fino-form-trust-row i { color: #0ECFB5; }

html[data-auth-theme="dark"] .fino-auth-footer {
    color: rgba(255,255,255,0.20);
}

/* reCaptcha invert for dark bg */
html[data-auth-theme="dark"] .fino-auth-form-side .g-recaptcha {
    filter: invert(1) hue-rotate(180deg);
}

/* Card wrap on mobile — no white card in dark mode */
@media (max-width: 767px) {
    html[data-auth-theme="dark"] .fino-auth-form-side { background: #040E0E; }
    html[data-auth-theme="dark"] .fino-auth-form-wrap {
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
}
