/* =============================================================================
   FINO AUTH — Login World-Class v3  (mandatory visual reference)
   Palette: Purple (#5839CB) · Deep indigo (#2D1B69) · Gray (#F9FAFB)
   New FINO screens should reuse these type, radius, input, button, and spacing tokens.
   ============================================================================= */

/* ─── Design tokens ────────────────────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --f-page:         #F9FAFB;
    --f-left:         #2D1B69;
    --f-form:         #FFFFFF;

    /* Brand accent */
    --f-accent:       #F8A018;
    --f-accent-lt:    #FFF4E0;
    --f-accent-dk:    #9A5E06;
    --f-teal:         #F8A018;
    --f-teal-lt:      #FFF4E0;

    /* Typography */
    --f-text:         #1A1A2E;
    --f-text-sec:     #6B7280;
    --f-text-muted:   #9CA3AF;

    /* Inputs */
    --f-input-bg:     #F9FAFB;
    --f-input-bdr:    #E5E7EB;
    --f-divider:      #E5E7EB;

    /* Status */
    --f-danger:       #F87171;
    --f-danger-lt:    #FEF2F2;
    --f-success:      #34D399;
    --f-success-lt:   #ECFDF5;
    --f-warning:      #F59E0B;
    --f-warning-lt:   #FFFBEB;

    /* Figma Login World-Class v3 — 1440 reference sizes */
    --f-pad-x:        clamp(28px, 4vw, 64px);
    --f-pad-y:        clamp(24px, 3.6vh, 48px);
    --f-form-max:     min(400px, 100%);
    --f-title:        clamp(26px, 1.5vw + 18px, 32px);
    --f-subtitle:     15px;
    --f-label:        14px;
    --f-input-h:      48px;
    --f-btn-h:        48px;
    --f-btn-fs:       15px;
    --f-input-fs:     15px;
    --f-logo-form:    56px;
    --f-logo-brand:   48px;
    --f-brand-title:  clamp(32px, 2.4vw + 14px, 40px);
    --f-brand-para:   16px;
    --f-gap:          clamp(16px, 2.4vh, 24px);

    /* Radii */
    --f-r-input:      12px;
    --f-r-card:       16px;

    /* Shadows */
    --f-shadow-xs:    0 1px 2px rgba(26,26,46,0.05);
    --f-shadow-sm:    0 1px 3px rgba(26,26,46,0.08), 0 1px 2px rgba(26,26,46,0.04);
    --f-shadow-md:    0 4px 16px rgba(26,26,46,0.08), 0 2px 4px rgba(26,26,46,0.04);
    --f-shadow-lg:    0 12px 40px rgba(26,26,46,0.10), 0 4px 8px rgba(26,26,46,0.04);
    --f-shadow-btn:   0 4px 6px rgba(248, 160, 24, 0.30);
    --f-shadow-btn-h: 0 6px 16px rgba(248, 160, 24, 0.40);
}

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

/* ─── Root container ────────────────────────────────────────────────────────── */
.fino-auth-root {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    background: var(--f-page);
    font-family: Inter, Satoshi, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
html[dir="ltr"] .fino-auth-brand { order: 1; }
html[dir="ltr"] .fino-auth-form-side { order: 2; }
html[dir="rtl"] .fino-auth-root {
    font-family: 'IBM Plex Sans Arabic', Satoshi, sans-serif;
}

/* =============================================================================
   LEFT BRAND PANEL — purple gradient
   ============================================================================= */
.fino-auth-brand {
    flex: 0 0 55%;
    min-width: 0;
    /* Sampled from the v3 frame: dark left #311D72 → bright violet #5838C7,
       plus a luminous orb behind the glass card and a soft top-right highlight. */
    background:
        radial-gradient(ellipse 70% 55% at 48% 72%, rgba(150, 118, 235, 0.32) 0%, rgba(110, 75, 210, 0.12) 40%, transparent 68%),
        radial-gradient(circle 380px at 90% 4%, rgba(255, 255, 255, 0.10) 0%, transparent 58%),
        linear-gradient(100deg, #311D72 0%, #3B2589 26%, #5838C7 64%, #5B3ACC 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: var(--f-pad-y) var(--f-pad-x);
}

.fino-auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0.03;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.fino-brand-glow {
    display: none;
}

.fino-brand-glow--tr {
    top: -50px;
    right: -100px;
}

.fino-brand-glow--bl {
    left: 100px;
    top: calc(50% + 100px);
    width: 350px;
    height: 350px;
    transform: translateY(-50%);
}

.fino-brand-glow--bc {
    bottom: -120px;
    left: 50%;
    width: 420px;
    height: 420px;
    transform: translateX(-50%);
}

.fino-brand-ring {
    position: absolute;
    top: -40px;
    right: -90px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    pointer-events: none;
    z-index: 0;
}

.fino-brand-plus {
    display: none;
}

.fino-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 620px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--f-gap);
    min-height: 100%;
}

.fino-brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    align-self: flex-start;
}

.fino-brand-logo {
    height: var(--f-logo-brand);
    width: auto;
    max-width: 240px;
    object-fit: contain;
    display: block;
}

.fino-brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    gap: var(--f-gap);
    width: 100%;
}

.fino-brand-headline {
    font-size: var(--f-brand-title);
    font-weight: 700;
    line-height: 1.18;
    color: #fff;
    margin: 0;
    letter-spacing: -0.035em;
}

.fino-brand-headline em {
    font-style: normal;
    font-weight: 700;
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
}

.fino-brand-para {
    margin: 14px 0 0;
    font-size: var(--f-brand-para);
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255,255,255,0.72);
    max-width: 34em;
}

.fino-brand-trust {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.fino-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}

.fino-brand-pill-dot {
    width: 6px;
    height: 6px;
    display: block;
    flex-shrink: 0;
}

.fino-brand-glass-wrap {
    position: relative;
    width: 100%;
    overflow: visible;
}

.fino-brand-card-orb,
.fino-brand-spotlight {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.fino-brand-card-orb {
    width: clamp(340px, 88%, 620px);
    height: clamp(340px, 88%, 620px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(186, 158, 255, 0.42) 0%, rgba(124, 88, 220, 0.16) 48%, transparent 72%);
    box-shadow: none;
    filter: blur(2px);
}

.fino-brand-spotlight {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0.18;
    filter: blur(80px);
}

.fino-brand-glass {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 24px 24px 20px;
    border-radius: var(--f-r-card);
    border: 1px solid rgba(255,255,255,0.20);
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 24px 48px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.10);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.fino-brand-glass-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    position: relative;
    z-index: 1;
}

.fino-brand-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #34D399;
}

.fino-brand-live img {
    width: 8px;
    height: 8px;
}

.fino-brand-glass-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.fino-brand-glass-stats > * {
    min-width: 0;
}

.fino-stat-label {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,0.50);
    margin-bottom: 6px;
}

.fino-stat-value {
    font-size: clamp(17px, 1.5vw, 22px);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.fino-stat-change {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
}

.fino-stat-change.up   { color: #34D399; }
.fino-stat-change.down { color: #F87171; }

.fino-brand-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 96px;
    position: relative;
    z-index: 1;
    direction: ltr;
    unicode-bidi: isolate;
}

.fino-brand-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 40px;
}

.fino-brand-bar {
    width: 10px;
    border-radius: 3px 3px 0 0;
    background: rgba(255,255,255,0.22);
}

.fino-brand-bar--accent {
    background: rgba(255,255,255,0.28);
}

.fino-brand-chart-line {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 22px;
    height: 72px;
    width: auto;
    pointer-events: none;
    z-index: 2;
}

.fino-brand-bar-col span {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,0.30);
    white-space: nowrap;
}

.fino-brand-footnote {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
}

/* =============================================================================
   RIGHT FORM PANEL
   ============================================================================= */
.fino-auth-form-side {
    flex: 0 0 45%;
    max-width: none;
    min-width: 0;
    background: var(--f-form);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    border-left: none;
}

/* Subtle background glows */
.fino-form-glow {
    display: none;
}

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

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

/* ── Theme toggle ── */
.fino-login-mode-toggle {
    position: absolute;
    top: max(14px, env(safe-area-inset-top, 0px));
    inset-inline-end: max(14px, env(safe-area-inset-inline-end, 0px));
    inset-inline-start: auto;
    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: var(--f-pad-y) var(--f-pad-x) 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fino-form-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.fino-form-logo {
    height: var(--f-logo-form);
    width: auto;
    max-width: 260px;
    object-fit: contain;
}

/* ── Main form area ── */
.fino-auth-form-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(12px, 2vh, 20px) var(--f-pad-x) 12px;
    position: relative;
    z-index: 2;
    overflow-y: auto;
    min-height: 0;
}

.fino-auth-form-wrap {
    width: 100%;
    max-width: var(--f-form-max);
    margin: 0 auto;
}

.fino-auth-root--wide {
    background: linear-gradient(145deg, #eff6ff 0%, #f0f4f8 46%, #ecfdf5 100%);
}
.fino-auth-root--wide .fino-auth-form-side {
    border: 0;
    background: transparent;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
}
.fino-auth-root--wide .fino-auth-form-wrap {
    max-width: min(1920px, calc(100% - clamp(32px, 4vw, 64px)));
}
.fino-auth-root--wide .fino-auth-form-main {
    justify-content: flex-start;
    padding-top: 8px;
    padding-bottom: 8px;
}
.fino-auth-root--wide .fino-form-logo-bar {
    padding: 22px 28px 4px;
    justify-content: flex-start;
}
.fino-auth-root--wide .fino-auth-footer {
    margin: 0;
    padding-left: 28px;
    padding-right: 28px;
    border-top: 0;
}

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

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

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

/* ── Copyright footer ── */
.fino-auth-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    padding: clamp(14px, 2vh, 22px) var(--f-pad-x) clamp(16px, 2.2vh, 28px);
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--f-text-muted);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 8px;
    border-top: 1px solid var(--f-divider);
    margin: 0 var(--f-pad-x);
    overflow-wrap: anywhere;
}
.fino-auth-powered { color: #4b5563; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; line-height: 1; }
.fino-auth-powered::before { content: "·"; color: #9ca3af; font-weight: 400; margin-inline-end: 2px; }
.fino-auth-powered img { height: 10px; width: auto; display: block; }

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

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

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

/* Label */
.fino-auth-label {
    display: block;
    font-size: var(--f-label);
    font-weight: 500;
    color: #374151;
    letter-spacing: 0.05px;
    margin-bottom: 6px;
}

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

.fino-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    flex-shrink: 0;
    z-index: 1;
    object-fit: contain;
}

.fino-icon-dark { display: none !important; }
html[data-auth-theme="dark"] .fino-icon-light { display: none !important; }
html[data-auth-theme="dark"] .fino-icon-dark { display: block !important; }

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

/* Core input */
.fino-input {
    width: 100%;
    height: var(--f-input-h);
    padding: 0 48px 0 46px;
    font-size: var(--f-input-fs);
    font-weight: 400;
    color: var(--f-text);
    background: var(--f-input-bg);
    border: 1px 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);
    border-width: 1.5px;
    box-shadow: 0 0 3px rgba(248, 160, 24, 0.22);
    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;
    inset-inline-end: 8px;
    inset-inline-start: auto;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--f-text-muted);
    cursor: pointer;
    padding: 0;
    z-index: 2;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

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

.fino-eye-btn i { font-size: 15px; }
.fino-eye-btn img {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}
.fino-eye-btn.is-revealed { opacity: 0.55; }

/* 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;
    flex-wrap: wrap;
    gap: 10px 12px;
}

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

.fino-check-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--f-accent);
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1.5px solid var(--f-input-bdr);
}

.fino-check-label input[type="checkbox"]:checked {
    background: var(--f-accent) url('../images/auth/check.svg') center / 11px 11px no-repeat;
    border-color: var(--f-accent);
}

/* Links */
.fino-link {
    font-size: 14px;
    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: var(--f-btn-h);
    padding: 12px 20px;
    background: #F8A018;
    color: #1A1408;
    font-size: var(--f-btn-fs);
    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: #E0920E;
    color: #1A1408;
    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(248, 160, 24, 0.55);
    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: 20px;
    text-align: center;
    font-size: 14px;
    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(88,57,203,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;
}

.fino-auth-form-side .g-recaptcha,
.fino-auth-form-side .g-recaptcha > div {
    max-width: 100%;
}

/* =============================================================================
   RESPONSIVE
   Fluid tokens already keep desktop/laptop even. Breakpoints only change layout.
   ============================================================================= */

/* ── Narrow desktop: keep the card, drop only the chart ── */
@media (max-width: 1100px) {
    .fino-brand-chart { display: none; }
    .fino-brand-glass { gap: 14px; padding: 18px; }
    .fino-brand-pill { white-space: normal; }
    .fino-stat-value { font-size: 16px; }
}

/* ── Tablet split: simplify the brand panel ── */
@media (max-width: 991px) {
    .fino-brand-glass-wrap { display: none; }
    .fino-brand-glow--bl,
    .fino-brand-glow--bc { display: none; }
    .fino-brand-ring { width: 220px; height: 220px; top: -20px; right: -60px; }
    .fino-auth-footer { font-size: 12px; }
}

/* ── Phone / small tablet: form only ── */
@media (max-width: 767px) {
    .fino-auth-root:not(.fino-auth-root--wide) .fino-auth-brand {
        display: none;
    }

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

    .fino-auth-form-side {
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
        min-height: 100svh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        background: var(--f-page);
        border-left: none;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
    }

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

    .fino-form-logo { height: 48px; max-width: 220px; }

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

    .fino-auth-form-wrap {
        max-width: 100%;
        background: #FFFFFF;
        border-radius: 16px;
        padding: 22px 18px;
        box-shadow: var(--f-shadow-lg);
    }
    .fino-auth-root--wide .fino-auth-form-wrap {
        background: transparent;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }

    .fino-auth-page-header  { margin-bottom: 18px; }

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

    .fino-auth-footer {
        padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
        margin: 0 20px 16px;
        font-size: 12px;
    }

    .fino-login-mode-toggle {
        top: max(16px, env(safe-area-inset-top, 0px));
        inset-inline-end: max(16px, env(safe-area-inset-inline-end, 0px));
    }
}

@media (max-width: 480px) {
    .fino-auth-form-main    { padding: 14px 12px 12px; }
    .fino-auth-form-wrap    { padding: 18px 14px; border-radius: 14px; }
    .fino-social-row        { grid-template-columns: 1fr; }
    .fino-form-logo-bar     { padding: 16px 48px 0 14px; }
    .fino-check-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .fino-auth-footer { margin-inline: 12px; padding-inline: 8px; }
}

@media (max-width: 360px) {
    .fino-auth-form-side .g-recaptcha {
        transform: scale(0.86);
        transform-origin: 0 0;
    }
    html[dir="rtl"] .fino-auth-form-side .g-recaptcha {
        transform-origin: 100% 0;
    }
}

/* ── Short landscape: scale down, keep the Figma composition ── */
@media (max-height: 700px) and (min-width: 768px) {
    .fino-brand-chart { display: none; }
    .fino-auth-form-main { justify-content: center; }
}

@media (max-height: 600px) and (min-width: 768px) {
    .fino-brand-glass-wrap { display: none; }
    .fino-brand-trust { display: none; }
    .fino-auth-footer { padding-top: 10px; padding-bottom: 12px; }
}

@media (max-height: 680px) and (max-width: 767px) {
    .fino-auth-form-main    { justify-content: flex-start; padding-top: 12px; }
    .fino-auth-page-header  { margin-bottom: 12px; }
    .fino-form-logo { height: 40px; max-width: 200px; }
}

/* =============================================================================
   DARK MODE — FINO Login Dark (Figma 83:187)
   Toggled by html[data-auth-theme="dark"]
   ============================================================================= */
html[data-auth-theme="dark"] {
    --f-page:         #0F0F14;
    --f-left:         #2D1B69;
    --f-form:         #0F0F14;

    --f-accent:       #F8A018;
    --f-accent-lt:    rgba(248, 160, 24, 0.18);
    --f-accent-dk:    #FFC14D;
    --f-teal:         #F8A018;
    --f-teal-lt:      rgba(248, 160, 24, 0.12);

    --f-text:         #F0F0F5;
    --f-text-sec:     #8888A0;
    --f-text-muted:   #5A5A70;

    --f-input-bg:     #1A1A24;
    --f-input-bdr:    #2A2A3A;
    --f-divider:      #2A2A3A;

    --f-danger:       #F87171;
    --f-danger-lt:    rgba(248,113,113,0.10);
    --f-success:      #34D399;
    --f-success-lt:   rgba(52,211,153,0.10);
    --f-warning:      #F59E0B;
    --f-warning-lt:   rgba(245,158,11,0.10);

    --f-shadow-xs:    none;
    --f-shadow-sm:    none;
    --f-shadow-md:    none;
    --f-shadow-lg:    none;
    --f-shadow-btn:   0 4px 6px rgba(248, 160, 24, 0.30);
    --f-shadow-btn-h: 0 6px 16px rgba(248, 160, 24, 0.40);
}

html[data-auth-theme="dark"] body {
    background: #0F0F14 !important;
}

html[data-auth-theme="dark"] .fino-auth-root {
    background: #0F0F14;
}

/* Left panel stays the purple Figma treatment in both themes */
html[data-auth-theme="dark"] .fino-auth-brand {
    background:
        radial-gradient(ellipse 70% 55% at 48% 72%, rgba(150, 118, 235, 0.32) 0%, rgba(110, 75, 210, 0.12) 40%, transparent 68%),
        radial-gradient(circle 380px at 90% 4%, rgba(255, 255, 255, 0.10) 0%, transparent 58%),
        linear-gradient(100deg, #311D72 0%, #3B2589 26%, #5838C7 64%, #5B3ACC 100%);
}

html[data-auth-theme="dark"] .fino-auth-form-side {
    background: #0F0F14;
    border-left-color: transparent;
}

html[data-auth-theme="dark"] .fino-form-glow {
    display: none;
}

html[data-auth-theme="dark"] .fino-login-mode-toggle {
    border-color: #2A2A3A;
    background: #1A1A24;
    color: #8888A0;
}

html[data-auth-theme="dark"] .fino-login-mode-toggle:hover {
    border-color: #F8A018;
    color: #F8A018;
    background: rgba(248, 160, 24, 0.16);
}

html[data-auth-theme="dark"] .fino-auth-label {
    color: #B0B0C0;
}

html[data-auth-theme="dark"] .fino-input {
    color: #F0F0F5;
    background: #1A1A24;
    border-color: #2A2A3A;
}

html[data-auth-theme="dark"] .fino-input::placeholder {
    color: #5A5A70;
}

html[data-auth-theme="dark"] .fino-input:hover:not(:focus):not(.is-invalid) {
    background: #1F1F2C;
    border-color: #35354A;
}

html[data-auth-theme="dark"] .fino-input:focus {
    border-color: #F8A018;
    border-width: 1.5px;
    box-shadow: 0 0 3px rgba(248, 160, 24, 0.18);
    background: #1A1A24;
}

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

html[data-auth-theme="dark"] .fino-field-icon {
    color: #8888A0;
}

html[data-auth-theme="dark"] .fino-field:focus-within .fino-field-icon {
    color: #F8A018;
}

html[data-auth-theme="dark"] .fino-eye-btn {
    color: #8888A0;
}

html[data-auth-theme="dark"] .fino-eye-btn:hover {
    color: #F0F0F5;
    background: transparent;
}

html[data-auth-theme="dark"] .fino-check-label {
    color: #8888A0;
}

html[data-auth-theme="dark"] .fino-check-label input[type="checkbox"] {
    background: #1A1A24;
    border-color: #2A2A3A;
}

html[data-auth-theme="dark"] .fino-check-label input[type="checkbox"]:checked {
    background: #F8A018 url('../images/auth/check.svg') center / 11px 11px no-repeat;
    border-color: #F8A018;
}

html[data-auth-theme="dark"] .fino-link,
html[data-auth-theme="dark"] .fino-page-link a,
html[data-auth-theme="dark"] .fino-page-link .fino-link {
    color: #F8A018;
}

html[data-auth-theme="dark"] .fino-link:hover,
html[data-auth-theme="dark"] .fino-page-link a:hover {
    color: #FFC14D;
}

html[data-auth-theme="dark"] .fino-page-link {
    color: #8888A0;
}

html[data-auth-theme="dark"] .fino-btn-primary {
    background: linear-gradient(90deg, #F8A018 0%, #E0920E 100%);
    color: #1A1408;
}

html[data-auth-theme="dark"] .fino-btn-primary:hover {
    background: linear-gradient(90deg, #E0920E 0%, #C47E0C 100%);
    color: #1A1408;
}

html[data-auth-theme="dark"] .fino-btn-secondary {
    background: #1A1A24;
    border-color: #2A2A3A;
    color: #8888A0;
    box-shadow: none;
}

html[data-auth-theme="dark"] .fino-btn-secondary:hover {
    background: #1F1F2C;
    color: #F0F0F5;
    box-shadow: none;
}

html[data-auth-theme="dark"] .fino-alert-success {
    background: rgba(52,211,153,0.10);
    border-color: rgba(52,211,153,0.28);
    color: #34D399;
}

html[data-auth-theme="dark"] .fino-alert-danger {
    background: rgba(248,113,113,0.10);
    border-color: rgba(248,113,113,0.28);
    color: #F87171;
}

html[data-auth-theme="dark"] .fino-alert-warning {
    background: rgba(245,158,11,0.10);
    border-color: rgba(245,158,11,0.24);
    color: #FBBF24;
}

html[data-auth-theme="dark"] .fino-email-pill {
    background: #1A1A24;
    border-color: #2A2A3A;
    color: #8888A0;
}

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

html[data-auth-theme="dark"] .fino-auth-footer {
    color: #5A5A70;
    border-top-color: #2A2A3A;
}

html[data-auth-theme="dark"] .fino-auth-powered {
    color: #B0B0C0;
}
html[data-auth-theme="dark"] .fino-auth-powered::before {
    color: #5A5A70;
}

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

html[data-auth-theme="dark"] .fino-auth-root--wide {
    background: #0F0F14;
}

@media (max-width: 767px) {
    html[data-auth-theme="dark"] .fino-auth-form-side { background: #0F0F14; }
    html[data-auth-theme="dark"] .fino-auth-form-wrap {
        background: #0F0F14;
        box-shadow: none;
        padding: 0;
    }
}
