*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --c-dark:         #060C18;
    --c-dark-2:       #0C1526;
    --c-accent:       #5563E8;
    --c-accent-dim:   #4451D8;
    --c-accent-light: #8B96F8;
    --c-cyan:         #0EA5E9;
    --c-off-white:    #F7F9FC;
    --c-border:       #E2E8F2;
    --c-text:         #0A1628;
    --c-muted:        #64748B;
    --c-error:        #EF4444;
    --c-success:      #10B981;
    --font:           'Outfit', sans-serif;
    --r:              10px;
}

html, body { height: 100%; font-family: var(--font); -webkit-font-smoothing: antialiased; }

.auth-split { display: flex; min-height: 100vh; width: 100%; }

/* ─── Left Panel ───────────────────────── */
.auth-left {
    width: 44%; background: var(--c-dark);
    position: sticky; top: 0; height: 100vh;
    overflow: hidden; display: flex; flex-direction: column;
    padding: 36px 40px; flex-shrink: 0;
}
.auth-left::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(85,99,232,0.22) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
    pointer-events: none;
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; animation: orbFloat 9s ease-in-out infinite; }
.orb-1 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(85,99,232,0.3), transparent 70%); top: -100px; right: -60px; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(14,165,233,0.2), transparent 70%); bottom: 40px; left: -80px; animation-delay: -4.5s; }
@keyframes orbFloat { 0%,100%{transform:translateY(0) scale(1)} 50%{transform:translateY(-22px) scale(1.04)} }

.left-logo { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; animation: riseIn .6s ease both; }
.left-logo-mark { width: 36px; height: 36px; background: var(--c-accent); border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(85,99,232,0.5); }
.left-logo-mark svg { fill: white; width: 20px; height: 20px; }
.left-logo-name { font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -.3px; }

.left-body { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }

.left-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(85,99,232,0.13); border: 1px solid rgba(85,99,232,0.28);
    color: var(--c-accent-light); font-size: .72rem; font-weight: 600;
    padding: 4px 12px; border-radius: 20px; letter-spacing: .06em; text-transform: uppercase;
    margin-bottom: 20px; width: fit-content; animation: riseIn .6s .1s ease both;
}
.left-badge::before { content: ''; width: 6px; height: 6px; background: var(--c-accent-light); border-radius: 50%; }

.left-h { font-size: clamp(1.7rem, 2.8vw, 2.4rem); font-weight: 800; color: #fff; line-height: 1.14; letter-spacing: -.035em; margin-bottom: 14px; animation: riseIn .6s .15s ease both; }
.left-h span { background: linear-gradient(130deg, #8B96F8 20%, #38BDF8 80%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.left-sub { font-size: .9rem; color: rgba(255,255,255,0.42); line-height: 1.7; margin-bottom: 32px; max-width: 330px; animation: riseIn .6s .2s ease both; }

/* Metric cards */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; animation: riseIn .6s .25s ease both; }
.metric-card {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 16px 18px;
}
.metric-val { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.04em; margin-bottom: 3px; }
.metric-val span { font-size: .875rem; font-weight: 500; color: var(--c-accent-light); }
.metric-lbl { font-size: .78rem; color: rgba(255,255,255,0.4); font-weight: 500; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 10px; animation: riseIn .6s .3s ease both; }
.chk { display: flex; align-items: center; gap: 10px; }
.chk-icon { width: 20px; height: 20px; border-radius: 50%; background: rgba(85,99,232,0.2); border: 1px solid rgba(85,99,232,0.35); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chk-icon svg { width: 10px; height: 10px; fill: var(--c-accent-light); }
.chk span { font-size: .875rem; color: rgba(255,255,255,0.55); font-weight: 500; }

.left-bottom { position: relative; z-index: 2; margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.06); animation: riseIn .6s .35s ease both; }
.lbottom-text { font-size: .8rem; color: rgba(255,255,255,0.35); }
.lbottom-text strong { color: rgba(255,255,255,0.65); }

/* ─── Right Panel ───────────────────────── */
.auth-right {
    flex: 1; background: var(--c-off-white);
    display: flex; align-items: flex-start; justify-content: center;
    overflow-y: auto; padding: 52px 32px; position: relative;
}
.auth-right::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 85% 8%, rgba(85,99,232,0.05) 0%, transparent 48%), radial-gradient(circle at 8% 92%, rgba(14,165,233,0.04) 0%, transparent 48%);
}

.form-wrap { width: 100%; max-width: 448px; position: relative; z-index: 1; animation: riseIn .5s .08s ease both; }

.fw-logo { display: flex; align-items: center; gap: 9px; margin-bottom: 28px; }
.fw-logo-mark { width: 30px; height: 30px; background: var(--c-accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.fw-logo-mark svg { fill: white; width: 17px; height: 17px; }
.fw-logo-name { font-size: 1.05rem; font-weight: 700; color: var(--c-text); letter-spacing: -.2px; }

.fw-h { font-size: 1.6rem; font-weight: 800; color: var(--c-text); letter-spacing: -.035em; margin-bottom: 5px; }
.fw-sub { font-size: .875rem; color: var(--c-muted); margin-bottom: 24px; }

/* Section label */
.section-sep { display: flex; align-items: center; gap: 10px; margin: 22px 0 18px; }
.section-sep-line { flex: 1; height: 1px; background: var(--c-border); }
.section-sep-label { font-size: .72rem; font-weight: 700; color: #94A3B8; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }

.alert-err {
    display: none; padding: 11px 14px; border-radius: var(--r); font-size: .8rem; font-weight: 500;
    background: #FFF1F2; color: #DC2626; border: 1px solid #FECACA; margin-bottom: 18px;
    align-items: center; gap: 8px;
}
.alert-err.show { display: flex; }
.alert-err svg { width: 16px; height: 16px; fill: #DC2626; flex-shrink: 0; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.fgrp { margin-bottom: 16px; }
.flabel { font-size: .8rem; font-weight: 600; color: #374151; margin-bottom: 6px; display: block; }

.iw { position: relative; }
.finput {
    width: 100%; padding: 11px 14px; font-family: var(--font); font-size: .9375rem;
    color: var(--c-text); background: #fff; border: 1.5px solid var(--c-border);
    border-radius: var(--r); outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none;
}
.finput::placeholder { color: #B0BCCE; }
.finput:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3.5px rgba(85,99,232,0.11); }

.pw-eye {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: #B0BCCE;
    display: flex; align-items: center; transition: color .15s; padding: 4px;
}
.pw-eye:hover { color: var(--c-muted); }

/* Password strength */
.pw-strength { margin-top: 8px; }
.pw-bars { display: flex; gap: 4px; margin-bottom: 5px; }
.pw-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--c-border); transition: background .3s; }
.pw-bar.weak  { background: #EF4444; }
.pw-bar.fair  { background: #F59E0B; }
.pw-bar.good  { background: #3B82F6; }
.pw-bar.strong{ background: #10B981; }
.pw-str-label { font-size: .74rem; color: var(--c-muted); }

/* Terms */
.terms-row { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 20px; }
.terms-row input[type=checkbox] { margin-top: 2px; accent-color: var(--c-accent); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.terms-row label { font-size: .8rem; color: var(--c-muted); cursor: pointer; line-height: 1.5; }
.terms-row label a { color: var(--c-accent); text-decoration: none; font-weight: 500; }
.terms-row label a:hover { text-decoration: underline; }

.btn-go {
    width: 100%; padding: 12px 16px; background: var(--c-accent); color: #fff;
    border: none; border-radius: var(--r); font-family: var(--font); font-size: .9375rem;
    font-weight: 700; cursor: pointer; transition: all .15s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 3px 12px rgba(85,99,232,0.32); letter-spacing: -.01em;
}
.btn-go:hover { background: var(--c-accent-dim); box-shadow: 0 5px 18px rgba(85,99,232,0.42); transform: translateY(-1px); }
.btn-go:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(85,99,232,0.28); }
.btn-go:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .65s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.fw-footer { text-align: center; margin-top: 20px; font-size: .875rem; color: var(--c-muted); }
.fw-footer a { color: var(--c-accent); font-weight: 600; text-decoration: none; }
.fw-footer a:hover { text-decoration: underline; }

@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
    .auth-left { display: none; }
    .auth-right { padding: 40px 24px; align-items: flex-start; }
    .row-2 { grid-template-columns: 1fr; }
}

/* ─── SweetAlert2 — Coreza Theme ──────────────────── */
.coreza-popup {
    font-family: 'Outfit', sans-serif !important;
    border-radius: 18px !important;
    padding: 36px 32px !important;
    border: 1px solid #E2E8F2 !important;
    box-shadow: 0 24px 64px rgba(10,22,40,0.13) !important;
}
.coreza-toast {
    font-family: 'Outfit', sans-serif !important;
    border-radius: 10px !important;
    padding: 13px 18px !important;
    box-shadow: 0 8px 28px rgba(10,22,40,0.12) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
}
.coreza-swal-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #0A1628 !important;
    letter-spacing: -.025em !important;
    padding: 0 !important;
    margin-bottom: 6px !important;
}
.coreza-swal-body {
    font-size: .875rem !important;
    color: #64748B !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.coreza-btn-confirm {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    font-size: .9375rem !important;
    padding: 10px 28px !important;
    border-radius: 9px !important;
    background: #5563E8 !important;
    box-shadow: 0 3px 12px rgba(85,99,232,0.32) !important;
    border: none !important;
    transition: all .15s !important;
}
.coreza-btn-confirm:hover { background: #4451D8 !important; box-shadow: 0 5px 18px rgba(85,99,232,0.42) !important; }
.coreza-btn-cancel {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    font-size: .9375rem !important;
    padding: 10px 28px !important;
    border-radius: 9px !important;
    background: #F1F5F9 !important;
    color: #475569 !important;
    border: 1.5px solid #E2E8F2 !important;
}
.coreza-progress { background: #5563E8 !important; }
.swal2-icon.swal2-success { border-color: #10B981 !important; }
.swal2-icon.swal2-success [class^='swal2-success-line'] { background: #10B981 !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(16,185,129,0.25) !important; }
.swal2-icon.swal2-error { border-color: #EF4444 !important; }
.swal2-icon.swal2-error [class^='swal2-x-mark-line'] { background: #EF4444 !important; }
.swal2-icon.swal2-warning { border-color: #F59E0B !important; color: #F59E0B !important; }
.swal2-loader { border-color: #5563E8 transparent #5563E8 transparent !important; }

/* =============================================================
   Register — Mobile Responsive
   ============================================================= */

/* ── Tablet: hide left panel ──────────────────────────────────── */
@media (max-width: 860px) {
    .auth-left  { display: none !important; }
    .auth-right { padding: 40px 24px; }
    .form-wrap  { max-width: 480px; }
}

/* ── Phone (≤ 600px) ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .auth-split { flex-direction: column; min-height: 100vh; height: auto; }
    .auth-right {
        flex: 1; padding: 28px 20px 48px;
        align-items: flex-start;
        min-height: 100vh;
    }
    .form-wrap { max-width: 100%; }
    .fw-logo   { margin-bottom: 22px; }
    .fw-h      { font-size: 1.4rem; }
    .fw-sub    { font-size: .84rem; margin-bottom: 18px; }
    .finput    { font-size: .9rem; padding: 10px 12px; }
    .btn-go    { font-size: .9rem; padding: 11px 14px; }
    .fw-footer { margin-top: 16px; font-size: .82rem; }

    /* 2-col name grid → single col */
    .fgrp-row  { grid-template-columns: 1fr !important; }

    /* Password strength bars */
    .pw-bar  { width: 34px !important; }
    .pw-bars { gap: 3px !important; }

    /* Requirement checklist */
    .req-list { gap: 4px !important; }
    .req-item { font-size: .76rem !important; }

    /* Terms checkbox row */
    .terms-row { font-size: .82rem !important; }
}

/* ── Tiny phone (≤ 380px) ───────────────────────────────────────── */
@media (max-width: 380px) {
    .auth-right { padding: 22px 14px 40px; }
    .fw-h       { font-size: 1.2rem; }
    .pw-bar     { width: 26px !important; }
}

/* =============================================================
   OTP Step — Step 2 styles
   ============================================================= */

/* Back button */
.otp-back {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; padding: 0;
    font-family: var(--font); font-size: .875rem; font-weight: 600;
    color: var(--c-muted); cursor: pointer;
    margin-bottom: 20px; transition: color .15s;
}
.otp-back:hover { color: var(--c-accent); }
.otp-back svg { flex-shrink: 0; }

/* Step-2 wrapper — everything centred */
#step-otp { text-align: center; }
#step-otp .otp-back { text-align: left; display: flex; }

/* Shield emoji */
.otp-shield {
    font-size: 3rem; line-height: 1;
    margin-bottom: 4px;
    display: block; text-align: center;
}

/* Email display */
.otp-email-display {
    display: inline-block; color: var(--c-accent);
    font-weight: 700; font-size: .9375rem;
    word-break: break-all;
}

/* Headings inside otp step */
#step-otp .fw-h  { text-align: center; }
#step-otp .fw-sub { text-align: center; }

/* 6 digit input boxes */
.otp-inputs {
    display: flex; gap: 10px; justify-content: center;
    margin: 28px 0 6px;
}
.otp-inputs input {
    width: 52px; height: 64px;
    border: 2px solid var(--c-border);
    border-radius: 12px;
    background: #fff;
    font-family: var(--font); font-size: 1.75rem; font-weight: 800;
    color: var(--c-text); text-align: center;
    outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-appearance: none; caret-color: var(--c-accent);
    /* suppress spinners on number inputs */
    -moz-appearance: textfield;
}
.otp-inputs input::-webkit-outer-spin-button,
.otp-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.otp-inputs input:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 4px rgba(85,99,232,0.13);
    background: #FAFBFF;
}
.otp-inputs input:not(:placeholder-shown) {
    border-color: var(--c-accent);
    background: #F4F5FE;
}

/* Countdown timer */
.otp-countdown {
    font-size: .82rem; color: var(--c-muted);
    text-align: center; margin: 10px 0 24px;
    min-height: 1.2em; /* prevent layout jump when empty */
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}

/* Resend link */
.otp-resend {
    text-align: center;
    margin-top: 18px;
    font-size: .875rem;
    color: var(--c-muted);
}
.otp-resend a {
    color: var(--c-accent); font-weight: 600; text-decoration: none;
    transition: color .15s;
}
.otp-resend a:hover { text-decoration: underline; }
.otp-resend a.disabled {
    pointer-events: none; color: #B0BCCE; cursor: not-allowed;
}

/* ── OTP responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
    .otp-inputs { gap: 7px; }
    .otp-inputs input {
        width: 44px; height: 56px;
        font-size: 1.5rem;
        border-radius: 10px;
    }
}
@media (max-width: 360px) {
    .otp-inputs { gap: 5px; }
    .otp-inputs input {
        width: 38px; height: 50px;
        font-size: 1.25rem;
        border-radius: 8px;
    }
}
