/* ============================================================
   SSC Exam Preparation - Main Stylesheet
   ============================================================ */

:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --dark: #1e293b;
  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);
  --transition: 0.2s ease;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); color: var(--gray-800); background: var(--gray-50); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* LAYOUT */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-sm { max-width: 768px; }
.container-lg { max-width: 1400px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -0.75rem; }
.col { flex: 1; padding: 0 0.75rem; }
.col-auto { flex: 0 0 auto; padding: 0 0.75rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* NAVBAR */
.navbar { background: var(--white); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; color: var(--primary); }
.navbar-brand img { height: 36px; width: auto; }
.navbar-nav { display: flex; align-items: center; gap: 0.25rem; }
.navbar-nav a { padding: 0.5rem 0.75rem; border-radius: var(--radius); color: var(--gray-700); font-weight: 500; font-size: 0.875rem; transition: all var(--transition); }
.navbar-nav a:hover, .navbar-nav a.active { background: var(--primary-light); color: var(--primary); }
.navbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.navbar-toggle { display: none; padding: 0.5rem; border-radius: var(--radius); color: var(--gray-600); }
.notification-bell { position: relative; }
.notification-bell .badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: white; font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); min-width: 220px; padding: 0.5rem; z-index: 200; display: none; }
.dropdown-menu.show { display: block; animation: fadeIn 0.15s ease; }
.dropdown-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem; border-radius: var(--radius); color: var(--gray-700); font-size: 0.875rem; transition: all var(--transition); width: 100%; }
.dropdown-item:hover { background: var(--gray-100); color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--gray-200); margin: 0.375rem 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; }

/* HERO */
.hero { background: linear-gradient(135deg, #1e293b 0%, #1d4ed8 50%, #7c3aed 100%); color: white; padding: 5rem 0; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='30'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 1.25rem; }
.hero h1 span { color: #fbbf24; }
.hero p { font-size: 1.125rem; opacity: 0.85; max-width: 600px; margin: 0 auto 2rem; }
.hero-stats { display: flex; justify-content: center; gap: 3rem; margin-top: 3rem; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: #fbbf24; }
.hero-stat .label { font-size: 0.875rem; opacity: 0.75; }

/* CARDS */
.card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); overflow: hidden; transition: all var(--transition); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-100); background: var(--gray-50); }

/* TEST CARDS */
.test-card { display: flex; flex-direction: column; height: 100%; }
.test-card-badge { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.6rem; border-radius: 999px; }
.badge-free { background: #d1fae5; color: #065f46; }
.badge-premium { background: #fef3c7; color: #92400e; }
.badge-featured { background: #ede9fe; color: #5b21b6; }
.test-category { font-size: 0.75rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.test-title { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin: 0.5rem 0; line-height: 1.4; }
.test-meta { display: flex; gap: 1rem; flex-wrap: wrap; }
.test-meta-item { display: flex; align-items: center; gap: 0.25rem; font-size: 0.8rem; color: var(--gray-500); }
.test-meta-item svg { width: 14px; height: 14px; }
.test-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--gray-100); }
.attempt-count { font-size: 0.75rem; color: var(--gray-500); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.625rem 1.25rem; border-radius: var(--radius); font-weight: 600; font-size: 0.875rem; line-height: 1; transition: all var(--transition); white-space: nowrap; cursor: pointer; border: 2px solid transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }
.btn-secondary { background: var(--secondary); color: white; border-color: var(--secondary); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-warning { background: var(--warning); color: white; border-color: var(--warning); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-ghost { background: transparent; color: var(--gray-600); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl { padding: 1rem 2rem; font-size: 1.125rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn-icon { padding: 0.625rem; }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }

/* FORMS */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.875rem; color: var(--gray-700); margin-bottom: 0.375rem; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control { width: 100%; padding: 0.625rem 0.875rem; border: 2px solid var(--gray-300); border-radius: var(--radius); font-size: 0.9375rem; color: var(--gray-900); background: var(--white); transition: all var(--transition); appearance: none; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.form-control::placeholder { color: var(--gray-400); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid { border-color: var(--success); }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 0.25rem; display: flex; align-items: center; gap: 0.25rem; }
.form-hint { color: var(--gray-500); font-size: 0.8rem; margin-top: 0.25rem; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; white-space: nowrap; }
.input-icon { position: relative; }
.input-icon .form-control { padding-left: 2.5rem; }
.input-icon .icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--gray-400); width: 18px; height: 18px; }
.check-group { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.check-group input[type="checkbox"], .check-group input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* ALERTS */
.alert { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem 1.25rem; border-radius: var(--radius-lg); border-left: 4px solid; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #ecfdf5; border-color: var(--success); color: #065f46; }
.alert-danger  { background: #fef2f2; border-color: var(--danger);  color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: var(--warning); color: #92400e; }
.alert-info    { background: #eff6ff; border-color: var(--primary); color: #1e40af; }
.alert-close { margin-left: auto; cursor: pointer; opacity: 0.6; font-size: 1.25rem; line-height: 1; }
.alert-close:hover { opacity: 1; }

/* BADGES */
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.025em; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-gray    { background: var(--gray-200); color: var(--gray-700); }
.badge-purple  { background: #ede9fe; color: #5b21b6; }

/* TABLES */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); }
table { width: 100%; border-collapse: collapse; }
th { background: var(--gray-50); padding: 0.75rem 1rem; text-align: left; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; color: var(--gray-700); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* PAGINATION */
.pagination { display: flex; justify-content: center; margin-top: 2rem; }
.pagination ul { display: flex; align-items: center; gap: 0.25rem; }
.page-link { display: flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 0.75rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; color: var(--gray-700); border: 1px solid var(--gray-300); transition: all var(--transition); }
.page-link:hover, .page-link.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-ellipsis { padding: 0 0.5rem; color: var(--gray-400); }

/* AUTH PAGES */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eff6ff, #f5f3ff); padding: 2rem 1rem; }
.auth-card { background: white; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); padding: 2.5rem; width: 100%; max-width: 440px; }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo img { height: 48px; margin: 0 auto 0.75rem; }
.auth-logo h1 { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); }
.auth-logo p { color: var(--gray-500); font-size: 0.9rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--gray-500); }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--gray-400); font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

/* EXAM INTERFACE */
.exam-page { background: #0f172a; min-height: 100vh; color: white; }
.exam-header { background: #1e293b; border-bottom: 1px solid #334155; padding: 0.875rem 1rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.exam-timer { display: flex; align-items: center; gap: 0.5rem; background: #334155; padding: 0.5rem 1rem; border-radius: var(--radius); font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; }
.exam-timer.warning { background: #78350f; color: #fbbf24; animation: pulse 1s infinite; }
.exam-timer.critical { background: #7f1d1d; color: #fca5a5; animation: pulse 0.5s infinite; }
.exam-body { display: flex; height: calc(100vh - 60px); }
.exam-sidebar { width: 280px; background: #1e293b; border-right: 1px solid #334155; overflow-y: auto; flex-shrink: 0; }
.exam-main { flex: 1; overflow-y: auto; padding: 2rem; }
.question-palette { padding: 1rem; }
.question-palette h3 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; margin-bottom: 0.75rem; }
.palette-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.375rem; }
.palette-btn { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 0.375rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; }
.palette-btn.not-visited { background: #334155; color: #94a3b8; }
.palette-btn.not-answered { background: #dc2626; color: white; }
.palette-btn.answered { background: #16a34a; color: white; }
.palette-btn.marked { background: #7c3aed; color: white; }
.palette-btn.marked-answered { background: #7c3aed; color: white; border-color: #16a34a; }
.palette-btn.current { border-color: #3b82f6 !important; }
.palette-legend { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.375rem; }
.legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: #94a3b8; }
.legend-dot { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.question-card { background: #1e293b; border-radius: var(--radius-xl); padding: 2rem; max-width: 760px; margin: 0 auto; }
.question-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.question-num { font-size: 0.8rem; font-weight: 700; color: #94a3b8; }
.question-text { font-size: 1.05rem; line-height: 1.7; color: #e2e8f0; margin-bottom: 1.75rem; }
.options-list { display: flex; flex-direction: column; gap: 0.75rem; }
.option-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; border: 2px solid #334155; border-radius: var(--radius-lg); cursor: pointer; transition: all 0.15s; }
.option-item:hover { border-color: #3b82f6; background: rgba(59,130,246,.08); }
.option-item.selected { border-color: #3b82f6; background: rgba(59,130,246,.15); }
.option-item.correct { border-color: #16a34a; background: rgba(22,163,74,.15); }
.option-item.wrong { border-color: #dc2626; background: rgba(220,38,38,.1); }
.option-letter { width: 32px; height: 32px; border-radius: 50%; background: #334155; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.option-item.selected .option-letter { background: #3b82f6; }
.option-item.correct .option-letter { background: #16a34a; }
.option-item.wrong .option-letter { background: #dc2626; }
.option-text { flex: 1; line-height: 1.5; padding-top: 0.25rem; }
.exam-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #334155; }
.exam-actions-left, .exam-actions-right { display: flex; gap: 0.75rem; }
.btn-exam { padding: 0.625rem 1.25rem; border-radius: var(--radius); font-weight: 600; font-size: 0.875rem; transition: all 0.15s; border: 2px solid transparent; }
.btn-prev { background: #334155; color: #e2e8f0; }
.btn-prev:hover { background: #475569; }
.btn-next { background: var(--primary); color: white; }
.btn-next:hover { background: var(--primary-dark); }
.btn-mark { background: #7c3aed; color: white; }
.btn-submit { background: var(--success); color: white; }

/* RESULT PAGE */
.result-hero { background: linear-gradient(135deg, #1e293b, #1d4ed8); color: white; padding: 3rem 0; text-align: center; }
.score-circle { width: 160px; height: 160px; border-radius: 50%; border: 8px solid rgba(255,255,255,.2); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 1.5rem; background: rgba(255,255,255,.1); }
.score-pct { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.score-label { font-size: 0.8rem; opacity: 0.7; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; max-width: 700px; margin: 0 auto; }
.result-stat { background: rgba(255,255,255,.1); border-radius: var(--radius-lg); padding: 1rem; text-align: center; }
.result-stat .val { font-size: 1.75rem; font-weight: 800; }
.result-stat .lbl { font-size: 0.75rem; opacity: 0.7; margin-top: 0.25rem; }

/* DASHBOARD */
.dash-stat-card { display: flex; align-items: center; gap: 1rem; }
.dash-stat-icon { width: 52px; height: 52px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.dash-stat-val { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.dash-stat-lbl { font-size: 0.8rem; color: var(--gray-500); }
.streak-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: linear-gradient(135deg, #f59e0b, #ef4444); color: white; padding: 0.5rem 1rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem; }

/* ADMIN */
.admin-layout { display: flex; min-height: 100vh; background: var(--gray-100); }
.admin-sidebar { width: 260px; background: var(--gray-900); color: white; flex-shrink: 0; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 50; }
.admin-sidebar-header { padding: 1.5rem; border-bottom: 1px solid #334155; }
.admin-sidebar-logo { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.admin-sidebar-logo span { color: white; }
.admin-nav { padding: 1rem 0.75rem; }
.admin-nav-section { margin-bottom: 1.5rem; }
.admin-nav-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #475569; padding: 0 0.75rem; margin-bottom: 0.5rem; }
.admin-nav-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: var(--radius); color: #94a3b8; font-size: 0.875rem; font-weight: 500; transition: all var(--transition); }
.admin-nav-link:hover, .admin-nav-link.active { background: rgba(59,130,246,.15); color: var(--primary); }
.admin-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.admin-main { margin-left: 260px; flex: 1; display: flex; flex-direction: column; }
.admin-topbar { background: white; border-bottom: 1px solid var(--gray-200); padding: 0 1.5rem; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; }
.admin-content { padding: 1.5rem; flex: 1; }
.admin-page-header { margin-bottom: 1.5rem; }
.admin-page-title { font-size: 1.375rem; font-weight: 800; color: var(--gray-900); }
.admin-page-subtitle { color: var(--gray-500); font-size: 0.875rem; margin-top: 0.25rem; }
.admin-stat-card { background: white; border-radius: var(--radius-lg); padding: 1.25rem; border: 1px solid var(--gray-200); }
.admin-stat-card .icon { width: 44px; height: 44px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; }
.admin-stat-card .val { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); }
.admin-stat-card .lbl { font-size: 0.8rem; color: var(--gray-500); }
.admin-stat-card .change { font-size: 0.75rem; font-weight: 600; margin-top: 0.25rem; }
.change-up { color: var(--success); }
.change-down { color: var(--danger); }

/* PASTE QUESTION SYSTEM */
.parse-textarea { min-height: 300px; font-family: var(--font-mono); font-size: 0.875rem; background: #0f172a; color: #e2e8f0; border-color: #334155; line-height: 1.6; }
.parse-textarea:focus { border-color: var(--primary); }
.parse-results { margin-top: 1.5rem; }
.parse-stat-bar { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.parse-stat { display: flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 600; }
.parse-stat .dot { width: 10px; height: 10px; border-radius: 50%; }
.parsed-question-row { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1rem; margin-bottom: 0.75rem; }
.parsed-question-row.flagged { border-color: var(--warning); background: #fffbeb; }
.parsed-q-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.parsed-q-num { font-weight: 700; color: var(--gray-600); font-size: 0.875rem; }
.parsed-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
.parsed-option { font-size: 0.8rem; color: var(--gray-600); padding: 0.375rem 0.625rem; background: var(--gray-100); border-radius: var(--radius); display: flex; gap: 0.375rem; }
.parsed-option.correct { background: #d1fae5; color: #065f46; font-weight: 600; }
.parsed-option .ol { font-weight: 700; flex-shrink: 0; }

/* BLOG */
.blog-card { height: 100%; display: flex; flex-direction: column; }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.blog-category { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); margin-bottom: 0.5rem; }
.blog-title { font-size: 1rem; font-weight: 700; line-height: 1.4; color: var(--gray-900); margin-bottom: 0.75rem; }
.blog-excerpt { font-size: 0.875rem; color: var(--gray-500); line-height: 1.6; flex: 1; }
.blog-meta { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--gray-100); }
.blog-author { font-size: 0.8rem; color: var(--gray-600); font-weight: 500; }
.blog-date { font-size: 0.75rem; color: var(--gray-400); }

/* PREMIUM PAGE */
.plan-card { border-radius: var(--radius-xl); overflow: hidden; transition: all var(--transition); border: 2px solid var(--gray-200); }
.plan-card.popular { border-color: var(--primary); }
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.plan-header { padding: 1.75rem; background: var(--gray-50); text-align: center; position: relative; }
.plan-card.popular .plan-header { background: linear-gradient(135deg, var(--primary), #7c3aed); color: white; }
.plan-badge { position: absolute; top: -1px; right: 1.5rem; background: var(--warning); color: white; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.75rem; border-radius: 0 0 var(--radius) var(--radius); }
.plan-price { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.plan-price sub { font-size: 1rem; font-weight: 600; vertical-align: super; }
.plan-price strike { font-size: 1rem; font-weight: 400; opacity: 0.5; }
.plan-duration { font-size: 0.875rem; opacity: 0.75; margin-top: 0.25rem; }
.plan-body { padding: 1.75rem; }
.plan-features { display: flex; flex-direction: column; gap: 0.625rem; margin-bottom: 1.5rem; }
.plan-feature { display: flex; align-items: center; gap: 0.625rem; font-size: 0.875rem; color: var(--gray-700); }
.plan-feature .check { color: var(--success); flex-shrink: 0; }

/* LEADERBOARD */
.lb-rank { font-size: 1.25rem; font-weight: 800; }
.lb-rank.rank-1 { color: #f59e0b; }
.lb-rank.rank-2 { color: #94a3b8; }
.lb-rank.rank-3 { color: #cd7c2f; }
.lb-medal { font-size: 1.25rem; }

/* PROGRESS BAR */
.progress { height: 8px; background: var(--gray-200); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.5s ease; }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger  { background: var(--danger); }

/* BREADCRUMBS */
.breadcrumb-nav { margin-bottom: 1.25rem; }
.breadcrumb { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.breadcrumb-item { font-size: 0.8rem; color: var(--gray-500); }
.breadcrumb-item + .breadcrumb-item::before { content: '/'; margin-right: 0.25rem; opacity: 0.5; }
.breadcrumb-item.active { color: var(--gray-900); font-weight: 600; }
.breadcrumb-item a { color: var(--primary); }

/* FOOTER */
.footer { background: var(--gray-900); color: var(--gray-400); padding: 3rem 0 1.5rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand h3 { color: white; font-size: 1.25rem; font-weight: 800; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; }
.footer-col h4 { color: white; font-size: 0.875rem; font-weight: 700; margin-bottom: 1rem; }
.footer-col a { display: block; font-size: 0.875rem; color: var(--gray-400); padding: 0.25rem 0; transition: color var(--transition); }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 1.25rem; display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; }

/* UTILITIES */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }
.section { padding: 4rem 0; }
.section-title { font-size: 1.875rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.5rem; }
.section-sub { color: var(--gray-500); font-size: 1rem; }
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state svg { width: 64px; height: 64px; color: var(--gray-300); margin: 0 auto 1rem; }
.empty-state h3 { font-size: 1.125rem; font-weight: 700; color: var(--gray-700); margin-bottom: 0.5rem; }
.empty-state p { color: var(--gray-500); font-size: 0.9rem; }
.divider-text { display: flex; align-items: center; gap: 1rem; color: var(--gray-400); font-size: 0.8rem; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.skeleton { background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 150; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: white; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); max-width: 540px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 0.75rem; }
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { background: var(--gray-900); color: white; padding: 0.875rem 1.25rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-size: 0.875rem; display: flex; align-items: center; gap: 0.5rem; animation: slideUp 0.3s ease; max-width: 320px; }
.toast.success { background: var(--success); }
.toast.danger  { background: var(--danger); }

/* ANIMATIONS */
@keyframes fadeIn   { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse    { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
@keyframes spin     { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shimmer  { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.animate-fade   { animation: fadeIn 0.3s ease; }
.animate-slide  { animation: slideUp 0.3s ease; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .navbar-nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--gray-200); padding: 0.5rem; box-shadow: var(--shadow-md); z-index: 99; }
  .navbar-toggle { display: flex; }
  .hero { padding: 3rem 0; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .exam-sidebar { display: none; }
  .exam-sidebar.open { display: block; position: fixed; top: 60px; right: 0; height: calc(100vh - 60px); z-index: 49; }
  .auth-card { padding: 1.75rem; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .parsed-options { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .section { padding: 2.5rem 0; }
  .admin-content { padding: 1rem; }
}

/* PRINT */
@media print {
  .navbar, .footer, .exam-sidebar, .exam-actions { display: none !important; }
  body { background: white; color: black; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
