/* ── Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Nunito', sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font-family: inherit; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: rgba(43,106,240,0.18); border-radius: 3px; }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin { animation: spin 0.7s linear infinite; }

/* ── Two-panel shell ─────────────────────── */
.auth-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #f0f4ff;
}

/* ── Brand panel (left) ──────────────────── */
.brand-panel {
    position: relative;
    flex: 0 0 46%;
    overflow: hidden;
    background: linear-gradient(150deg, #2b6af0 0%, #1a53cc 62%, #123c9e 100%);
    display: flex;
    flex-direction: column;
    padding: 46px 52px;
    color: #fff;
}
.brand-glow-1 {
    position: absolute; top: -120px; right: -100px;
    width: 360px; height: 360px; border-radius: 50%;
    background: rgba(127,232,234,0.18); filter: blur(10px);
    pointer-events: none;
}
.brand-glow-2 {
    position: absolute; bottom: -140px; left: -80px;
    width: 320px; height: 320px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.brand-logo-wrap { position: relative; z-index: 2; }
.brand-logo-wrap img {
    height: 52px; width: auto; display: block;
    filter: brightness(0) invert(1);
}
.brand-headline {
    position: relative; z-index: 2;
    margin-top: auto; margin-bottom: 18px;
}
.brand-headline h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; font-size: 30px; line-height: 1.22;
    /* Wide enough that "Creating Actionable Intelligence" and "through Analytics
       Automation" each hold their own line instead of wrapping mid-phrase — measured
       at ~499px/~470px respectively at this font-size. */
    letter-spacing: -0.01em; max-width: 520px;
}
.headline-accent { color: #7fe8ea; }
.brand-headline p {
    font-family: 'Nunito', sans-serif;
    font-weight: 500; font-size: 15.5px; line-height: 1.6;
    color: #d6e3ff; margin-top: 16px; max-width: 400px;
}
.brand-art { position: relative; z-index: 2; margin-top: 4px; }
.brand-art svg { width: 100%; height: auto; display: block; }

/* ── Form panel (right) ──────────────────── */
.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background: #f0f4ff;
    overflow-y: auto;
}
.form-container {
    width: 100%;
    max-width: 384px;
}
.form-logo { margin-bottom: 30px; }
.form-logo img { height: 44px; width: auto; display: block; }

.form-eyebrow {
    font-family: 'Nunito', sans-serif;
    font-weight: 700; font-size: 14px;
    color: #00c5c8; letter-spacing: 0.02em;
    margin-bottom: 6px;
}
.form-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; font-size: 27px;
    color: #181b2c; line-height: 1.2;
}
.form-subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: 14.5px; color: #4a5480;
    margin-top: 8px; line-height: 1.6;
}

/* ── Step dots ───────────────────────────── */
.step-dots {
    display: flex; align-items: center;
    gap: 6px; margin: 22px 0 20px;
}
.step-dot {
    height: 7px; width: 7px; border-radius: 4px;
    background: rgba(43,106,240,0.1);
    transition: all 0.25s ease;
}
.step-dot.active {
    width: 22px;
    background: #2b6af0;
}

/* ── Form fields ─────────────────────────── */
.form-fields { display: flex; flex-direction: column; gap: 16px; }

.field-wrap { position: relative; }
.field-wrap input {
    width: 100%; height: 58px;
    padding: 20px 44px 6px 16px;
    border: 1.5px solid rgba(43,106,240,0.1);
    border-radius: 12px;
    background: #fff;
    font-size: 15px; color: #181b2c; font-weight: 600;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
    appearance: none;
}
.field-wrap input:disabled { background: #f7f9ff; cursor: default; }
.field-wrap input:focus {
    border-color: #2b6af0;
    box-shadow: 0 0 0 4px rgba(43,106,240,0.08);
}
/* Floating label — base state (centered) */
.field-label {
    position: absolute;
    left: 16px; top: 50%; transform: translateY(-50%);
    pointer-events: none;
    font-size: 15px; font-weight: 600; color: #8893aa;
    font-family: 'Nunito', sans-serif;
    transition: all 0.16s ease;
}
/* Floated-up state: JS sets .elevated on wrapper when value is present */
.field-wrap.elevated .field-label {
    top: 10px; transform: none;
    font-size: 11px; font-weight: 700; color: #8893aa;
    letter-spacing: 0.04em; text-transform: uppercase;
}
/* Focus always floats up and turns blue */
.field-wrap input:focus ~ .field-label {
    top: 10px; transform: none;
    font-size: 11px; font-weight: 700; color: #2b6af0;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.field-trailing {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: #00c5c8; font-size: 18px; line-height: 1; pointer-events: none;
}

/* ── Buttons ─────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 9px; width: 100%; height: 52px;
    padding: 0 26px; border-radius: 12px;
    font-family: 'Nunito', sans-serif; font-weight: 800;
    font-size: 15px; letter-spacing: 0.01em;
    cursor: pointer; transition: all 0.18s ease;
    border: none; outline: none;
}
.btn-primary {
    background: #2b6af0; color: #fff;
    box-shadow: 0 4px 16px rgba(43,106,240,0.22);
}
.btn-primary:hover:not(:disabled) {
    background: #1a53cc;
    box-shadow: 0 10px 28px rgba(43,106,240,0.34);
    transform: translateY(-1px);
}
.btn-primary:disabled { background: #c3d3f6; box-shadow: none; cursor: not-allowed; }
.btn-ghost {
    background: transparent; color: #2b6af0;
    border: 1.5px solid rgba(43,106,240,0.1);
}
.btn-ghost:hover { background: #e8effe; border-color: #2b6af0; }

/* ── OTP notice chip ─────────────────────── */
.otp-notice {
    display: none;
    margin-top: 4px; padding: 12px 14px;
    border-radius: 11px; background: rgba(0,197,200,0.12);
    align-items: center; gap: 10px;
    animation: rise 0.32s ease both;
}
.otp-notice.visible { display: flex; }
.otp-notice-icon {
    width: 22px; height: 22px; border-radius: 50%;
    background: #00c5c8; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.otp-notice-text {
    font-family: 'Nunito', sans-serif; font-size: 13px;
    font-weight: 600; color: #4a5480;
}
.otp-notice-text strong { color: #181b2c; }
.otp-resend { color: #2b6af0; font-weight: 800; cursor: pointer; margin-left: 5px; }

/* ── Pre-send countdown (cancel to use an authenticator app instead) ────── */
.otp-countdown {
    display: none;
    margin-top: 4px; padding: 12px 14px;
    border-radius: 11px; background: rgba(0,197,200,0.12);
    align-items: center; gap: 10px;
    animation: rise 0.32s ease both;
}
.otp-countdown.visible { display: flex; }
.otp-countdown-ring { flex-shrink: 0; }
.otp-countdown-text {
    font-family: 'Nunito', sans-serif; font-size: 13px;
    font-weight: 600; color: #4a5480;
}
.otp-countdown-text strong { color: #181b2c; }

/* ── 6-digit OTP entry ────────────────────── */
.otp-field-label {
    display: block;
    font-size: 11px; font-weight: 700; color: #8893aa;
    font-family: 'Nunito', sans-serif;
    letter-spacing: 0.04em; text-transform: uppercase;
    margin-bottom: 8px;
}
.otp-boxes { display: flex; gap: 8px; }
.otp-digit {
    flex: 1; min-width: 0; height: 56px;
    border: 1.5px solid rgba(43,106,240,0.1);
    border-radius: 12px;
    background: #fff;
    font-size: 22px; font-weight: 800; color: #181b2c;
    text-align: center;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
    appearance: none;
}
.otp-digit:focus {
    border-color: #2b6af0;
    box-shadow: 0 0 0 4px rgba(43,106,240,0.08);
}

/* ── Error text ──────────────────────────── */
.field-error {
    font-size: 12px; color: #e53e3e; display: none; margin-top: 4px;
}
.field-error.visible { display: block; animation: rise 0.2s ease both; }

/* ── Form footer ─────────────────────────── */
.form-footer {
    margin-top: 34px;
    font-family: 'Nunito', sans-serif; font-size: 12.5px;
    color: #8893aa; text-align: center;
}
.form-footer a, .form-footer span {
    color: #2b6af0; font-weight: 700; cursor: pointer; text-decoration: none;
}

/* ── Arrow icon (inline SVG helper) ─────── */
.arrow-icon { display: inline-block; vertical-align: middle; }

/* ── Responsive ──────────────────────────── */
@media (max-width: 880px) {
    .brand-panel { display: none; }
}
