@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* =====================================================
   TESTSARTHI - EDTECH AUTH DESIGN SYSTEM v5.0
   Flat | Mobile-First | Clean | Professional
   Inspired by: Unacademy, Khan Academy, Coursera
   ===================================================== */

:root {
    --primary:       #4338CA;   /* Indigo */
    --primary-lt:    #EEF2FF;
    --primary-hover: #3730A3;
    --accent:        #F97316;   /* Orange */
    --accent-lt:     #FFF7ED;
    --success:       #10B981;
    --danger:        #EF4444;
    --dark:          #111827;
    --body:          #374151;
    --muted:         #6B7280;
    --border:        #E5E7EB;
    --bg:            #F9FAFB;
    --white:         #FFFFFF;
    --radius-sm:     8px;
    --radius:        12px;
    --radius-lg:     16px;
    --shadow:        0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-btn:    0 4px 14px rgba(67,56,202,0.3);
    --font-head:     'Plus Jakarta Sans', sans-serif;
    --font-body:     'Inter', sans-serif;
}

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

html { font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--body);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    -webkit-font-smoothing: antialiased;
}

/* ── Auth Container ─────────────────────────── */
.auth-page {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.4s ease both;
}

.auth-page.wide { max-width: 500px; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Brand Header ───────────────────────────── */
.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
}

.auth-brand-name {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.auth-brand-tagline {
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: 2px;
}

/* ── Card ───────────────────────────────────── */
.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow);
}

.auth-card-title {
    font-family: var(--font-head);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.auth-card-subtitle {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ── Form Controls ──────────────────────────── */
.auth-field { margin-bottom: 16px; }

.auth-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.auth-field .field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.auth-field .field-row label { margin-bottom: 0; }

.auth-field .field-link {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.auth-field .field-link:hover { text-decoration: underline; }

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--dark);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    -webkit-appearance: none;
}

.auth-input::placeholder { color: #9CA3AF; font-weight: 400; }

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67,56,202,0.12);
}

.auth-input.has-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

select.auth-input { cursor: pointer; }

textarea.auth-input { height: auto; padding: 12px 14px; resize: none; }

/* ── Primary Button ─────────────────────────── */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    padding: 0 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-head);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: var(--shadow-btn);
    text-decoration: none;
    margin-top: 8px;
}

.auth-btn:hover  { background: var(--primary-hover); box-shadow: 0 6px 20px rgba(67,56,202,0.35); }
.auth-btn:active { transform: scale(0.98); }

/* ── Secondary Button ───────────────────────── */
.auth-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    background: var(--white);
    color: var(--dark);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-decoration: none;
}
.auth-btn-outline:hover { border-color: var(--primary); background: var(--primary-lt); color: var(--primary); }

/* ── Divider ────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Alert / Error ──────────────────────────── */
.auth-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.auth-alert.error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}
.auth-alert.success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}
.auth-alert ul { padding-left: 18px; }

/* ── Footer Link ────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: var(--muted);
}
.auth-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Trust Badges ───────────────────────────── */
.auth-trust {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.auth-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}
.auth-trust-item i { color: var(--success); font-size: 0.875rem; }

/* ── Exam Badges ────────────────────────────── */
.exam-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    margin-bottom: 4px;
}
.exam-tag {
    padding: 4px 10px;
    background: var(--primary-lt);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ── Stat Bar ───────────────────────────────── */
.auth-stat-bar {
    display: flex;
    justify-content: space-around;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    margin-bottom: 24px;
}
.auth-stat-item { text-align: center; }
.auth-stat-item .stat-val {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
    display: block;
}
.auth-stat-item .stat-label {
    font-size: 0.6875rem;
    color: var(--muted);
    font-weight: 500;
}

/* ── Progress (multi-step) ──────────────────── */
.step-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
}
.step-dot {
    flex: 1;
    height: 4px;
    border-radius: 100px;
    background: var(--border);
    transition: background 0.3s;
}
.step-dot.active { background: var(--primary); }

.step-section { display: none; }
.step-section.active { display: block; }

/* ── Checkbox ───────────────────────────────── */
.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--muted);
    cursor: pointer;
}
.auth-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ── Disclaimer ─────────────────────────────── */
.auth-disclaimer {
    text-align: center;
    font-size: 0.6875rem;
    color: #9CA3AF;
    margin-top: 16px;
    line-height: 1.5;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 480px) {
    body { padding: 16px 12px; justify-content: flex-start; padding-top: 32px; }
    .auth-card { padding: 24px 20px; border-radius: var(--radius); }
    .auth-brand { margin-bottom: 24px; }
}