/* ========================================
   MockTest Pro - Main Stylesheet
   Mobile-first, fully responsive
   ======================================== */

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

:root {
  --primary: #1a237e;
  --primary-light: #283593;
  --primary-dark: #0d1b6e;
  --accent: #ff6f00;
  --accent-light: #ffa000;
  --success: #00897b;
  --danger: #c62828;
  --warning: #f57f17;
  --info: #0277bd;
  --bg: #f0f2f8;
  --surface: #ffffff;
  --surface2: #f5f6fa;
  --border: #e0e3ef;
  --text: #1a1f36;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --shadow-sm: 0 1px 3px rgba(26,35,126,0.08);
  --shadow: 0 4px 16px rgba(26,35,126,0.12);
  --shadow-lg: 0 8px 32px rgba(26,35,126,0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
  --navbar-h: 60px;
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; height: auto; display: block; }

input, textarea, select, button { font-family: inherit; }

/* ---- UTILITY ---- */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; } .flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ---- ALERTS ---- */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 0.9rem; font-weight: 500;
}
.alert span { font-size: 1.1rem; }
.alert-success { background: #e8f5e9; color: #1b5e20; border-left: 4px solid #43a047; }
.alert-error { background: #ffebee; color: #b71c1c; border-left: 4px solid #e53935; }
.alert-info { background: #e3f2fd; color: #0d47a1; border-left: 4px solid #1e88e5; }
.alert-warning { background: #fff8e1; color: #e65100; border-left: 4px solid #fb8c00; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 0.9rem; border: none; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-light); box-shadow: var(--shadow); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
  background: transparent; border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text); margin-bottom: 6px; letter-spacing: 0.3px;
}
.form-control {
  width: 100%; padding: 11px 14px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; color: var(--text); background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none; appearance: none;
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,35,126,0.1);
}
.form-control::placeholder { color: var(--text-light); }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%236b7280'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0; }

/* ---- CARDS ---- */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface2);
}
.card-title {
  font-size: 1rem; font-weight: 700; font-family: 'Sora', sans-serif;
  color: var(--primary);
}
.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  background: var(--surface2);
}

/* ---- NAVBAR ---- */
.navbar {
  background: var(--primary);
  height: var(--navbar-h);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 12px rgba(26,35,126,0.3);
  display: flex; align-items: center;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.2rem;
  color: #fff; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px;
}
.navbar-brand .logo-icon {
  width: 32px; height: 32px; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.navbar-nav {
  display: none; /* Mobile: hidden, shown via menu */
  list-style: none; gap: 4px;
}
.navbar-nav a {
  color: rgba(255,255,255,0.85); padding: 8px 12px;
  border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  transition: all var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: #fff; background: rgba(255,255,255,0.15);
}
.navbar-user {
  display: flex; align-items: center; gap: 10px; color: #fff;
  font-size: 0.88rem;
}
.navbar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); object-fit: cover;
}
.hamburger {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px; background: #fff;
  border-radius: 2px; transition: all 0.3s;
}
/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed; top: var(--navbar-h); left: 0; right: 0; bottom: 0;
  background: var(--primary-dark); z-index: 999;
  padding: 20px 16px; overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,0.9); padding: 14px 16px;
  border-radius: var(--radius-sm); font-size: 1rem; font-weight: 500;
  transition: all var(--transition); margin-bottom: 4px;
}
.mobile-menu a:hover, .mobile-menu a.active {
  background: rgba(255,255,255,0.12); color: #fff;
}
.mobile-menu-divider {
  height: 1px; background: rgba(255,255,255,0.1); margin: 12px 0;
}
.mobile-user-info {
  background: rgba(255,255,255,0.08); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.mobile-user-info img {
  width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--accent);
  object-fit: cover;
}
.mobile-user-info .uname { color: #fff; font-weight: 700; font-size: 1rem; }
.mobile-user-info .uid { color: rgba(255,255,255,0.6); font-size: 0.8rem; }

/* ---- SIDEBAR LAYOUT ---- */
.page-wrapper {
  display: grid; grid-template-columns: 1fr;
  min-height: calc(100vh - var(--navbar-h));
}
.sidebar {
  display: none; /* hidden on mobile */
  width: 240px; background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px; position: sticky;
  top: var(--navbar-h); height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition); margin-bottom: 2px;
}
.sidebar-nav li a:hover, .sidebar-nav li a.active {
  background: rgba(26,35,126,0.08); color: var(--primary);
}
.sidebar-nav li a .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-section-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-light); padding: 12px 14px 4px;
}
.main-content { padding: 20px 16px; min-width: 0; }

/* ---- PAGE HEADER ---- */
.page-header {
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 1.5rem; color: var(--primary); margin-bottom: 4px;
}
.page-header p { color: var(--text-muted); font-size: 0.9rem; }
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--text-light); }

/* ---- STATS GRID ---- */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; border: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm); transition: transform var(--transition);
}
.stat-card:active { transform: scale(0.98); }
.stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.stat-info .num {
  font-size: 1.4rem; font-weight: 800; font-family: 'Sora', sans-serif;
  line-height: 1;
}
.stat-info .label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ---- TABLES ---- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.table th {
  background: var(--surface2); padding: 10px 14px;
  text-align: left; font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface2); }

/* ---- BADGES ---- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-warning { background: #fff8e1; color: #e65100; }
.badge-info { background: #e3f2fd; color: #0d47a1; }
.badge-primary { background: rgba(26,35,126,0.1); color: var(--primary); }

/* ---- EXAM CARDS ---- */
.exam-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
.exam-card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.exam-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.exam-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 16px 20px; color: #fff;
}
.exam-card-header h3 { font-size: 1rem; margin-bottom: 4px; }
.exam-card-header p { font-size: 0.8rem; opacity: 0.8; }
.exam-card-body { padding: 16px 20px; }
.exam-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px;
}
.exam-meta span { display: flex; align-items: center; gap: 4px; }

/* ---- TEST INTERFACE ---- */
.test-container {
  max-width: 800px; margin: 0 auto;
}
.test-header {
  background: var(--primary); color: #fff;
  padding: 14px 16px; border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: var(--navbar-h); z-index: 100;
}
.test-header h2 { font-size: 0.95rem; }
.timer-box {
  background: rgba(255,255,255,0.15); padding: 6px 14px;
  border-radius: 20px; font-size: 1rem; font-weight: 800;
  font-family: 'Sora', sans-serif; letter-spacing: 1px;
  min-width: 80px; text-align: center;
}
.timer-box.warning { background: rgba(255,111,0,0.5); }
.timer-box.danger { background: rgba(198,40,40,0.6); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

.question-panel { background: var(--surface); }
.question-num {
  padding: 12px 20px; background: var(--surface2); border-bottom: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-muted); font-weight: 600;
}
.question-text {
  padding: 20px; font-size: 1rem; font-weight: 500; line-height: 1.7;
}
.options-list { padding: 0 20px 20px; }
.option-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); margin-bottom: 10px;
  cursor: pointer; transition: all var(--transition);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.option-item:hover { border-color: var(--primary); background: rgba(26,35,126,0.04); }
.option-item.selected { border-color: var(--primary); background: rgba(26,35,126,0.08); }
.option-item.correct { border-color: var(--success); background: rgba(0,137,123,0.08); }
.option-item.wrong { border-color: var(--danger); background: rgba(198,40,40,0.08); }
.option-label {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
  transition: all var(--transition); color: var(--text-muted);
}
.option-item.selected .option-label { border-color: var(--primary); background: var(--primary); color: #fff; }
.option-item.correct .option-label { border-color: var(--success); background: var(--success); color: #fff; }
.option-item.wrong .option-label { border-color: var(--danger); background: var(--danger); color: #fff; }
.option-text { padding-top: 3px; line-height: 1.5; font-size: 0.95rem; }

.test-navigation {
  padding: 16px 20px; background: var(--surface2); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

/* Question Navigator */
.question-navigator {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px;
  border-bottom: 1px solid var(--border); background: var(--surface2);
}
.qnav-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--surface);
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text-muted);
}
.qnav-btn.answered { background: var(--primary); border-color: var(--primary); color: #fff; }
.qnav-btn.current { border-color: var(--accent); color: var(--accent); }
.qnav-btn.answered.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- SCOREBOARD ---- */
.score-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius); padding: 30px 20px; text-align: center;
  color: #fff; margin-bottom: 20px;
}
.score-circle {
  width: 110px; height: 110px; border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.3);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; margin: 0 auto 16px;
  background: rgba(255,255,255,0.1);
}
.score-circle .percentage {
  font-size: 1.8rem; font-weight: 800; font-family: 'Sora', sans-serif;
  line-height: 1;
}
.score-circle .grade { font-size: 0.85rem; opacity: 0.8; }
.score-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 20px;
}
.score-stat { text-align: center; }
.score-stat .val { font-size: 1.4rem; font-weight: 800; }
.score-stat .lbl { font-size: 0.72rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---- PROFILE ---- */
.profile-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius); padding: 24px 20px; color: #fff;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; margin-bottom: 20px; text-align: center;
}
.profile-pic-wrap { position: relative; display: inline-block; }
.profile-pic-wrap img {
  width: 90px; height: 90px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.4); object-fit: cover;
}
.profile-pic-edit {
  position: absolute; bottom: 0; right: 0;
  width: 28px; height: 28px; background: var(--accent);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 0.75rem; cursor: pointer;
  border: 2px solid #fff;
}
.profile-name { font-size: 1.3rem; font-weight: 800; }
.profile-uid { font-size: 0.82rem; opacity: 0.75; background: rgba(255,255,255,0.15); padding: 3px 12px; border-radius: 20px; }

/* ---- RESOURCES ---- */
.resources-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px;
}
.resource-card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 16px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.resource-card:hover { box-shadow: var(--shadow); }
.resource-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.resource-icon.book { background: #fff3e0; }
.resource-icon.video { background: #fce4ec; }
.resource-icon.playlist { background: #e8eaf6; }
.resource-icon.other { background: #e0f2f1; }
.resource-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.resource-info p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.resource-category { font-size: 0.72rem; padding: 2px 8px; background: var(--bg); border-radius: 20px; color: var(--text-muted); display: inline-block; }

/* ---- NOTICES ---- */
.notice-banner {
  background: linear-gradient(90deg, #fff8e1, #fffde7);
  border-radius: var(--radius-sm); padding: 12px 16px;
  border-left: 4px solid var(--warning); margin-bottom: 20px;
  font-size: 0.88rem;
}
.notice-banner strong { color: var(--warning); }

/* ---- HOME PAGE ---- */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1565c0 100%);
  padding: 50px 16px 60px; text-align: center; color: #fff;
  position: relative; overflow: hidden; z-index: 0;
}
.hero-title {
  font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 14px;
  position: relative;
}
.hero-title span { color: var(--accent-light); }
.hero-sub { font-size: 1rem; opacity: 0.85; margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

.features-section { padding: 40px 16px; }
.features-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  max-width: 900px; margin: 0 auto;
}
.feature-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 16px; border: 1px solid var(--border);
  text-align: center; box-shadow: var(--shadow-sm);
}
.feature-icon {
  font-size: 2rem; margin-bottom: 10px;
  width: 56px; height: 56px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; background: rgba(26,35,126,0.07);
}
.feature-card h3 { font-size: 0.9rem; margin-bottom: 6px; color: var(--primary); }
.feature-card p { font-size: 0.8rem; color: var(--text-muted); }

/* ---- AUTH PAGES ---- */
.auth-container {
  min-height: 100vh; display: flex; align-items: flex-start;
  justify-content: center; padding: 20px 16px; padding-top: 30px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.auth-card {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 440px; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 28px 28px 24px; text-align: center; color: #fff;
}
.auth-logo {
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 8px;
}
.auth-logo .logo-box {
  width: 36px; height: 36px; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.auth-header h2 { font-size: 1.2rem; opacity: 0.9; font-weight: 500; }
.auth-body { padding: 28px; }
.auth-footer { padding: 16px 28px; text-align: center; background: var(--surface2); font-size: 0.85rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ---- ADMIN DASHBOARD ---- */
.admin-sidebar {
  background: var(--primary-dark); width: 220px;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 200; overflow-y: auto; display: none;
  flex-direction: column;
}
.admin-brand {
  padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 10px; color: #fff;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.1rem;
}
.admin-brand .logo-box {
  width: 32px; height: 32px; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.admin-nav { padding: 12px 0; flex: 1; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; color: rgba(255,255,255,0.7);
  font-size: 0.88rem; font-weight: 500;
  transition: all var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,0.1); color: #fff;
}
.admin-nav a .icon { font-size: 1rem; width: 18px; text-align: center; }
.admin-nav-section {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: rgba(255,255,255,0.35);
  padding: 12px 20px 4px;
}
.admin-topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  height: 60px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px;
  box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100;
}
.admin-topbar-title { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.admin-layout { display: flex; min-height: 100vh; }
.admin-main { flex: 1; padding: 24px 20px; background: var(--bg); overflow-x: hidden; }
.admin-hamburger {
  background: none; border: 2px solid var(--border);
  padding: 6px; border-radius: var(--radius-sm); cursor: pointer;
  display: none; flex-direction: column; gap: 4px;
}
.admin-hamburger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

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

/* ---- TABS ---- */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab-btn {
  padding: 10px 16px; font-size: 0.88rem; font-weight: 600;
  border: none; background: none; cursor: pointer; color: var(--text-muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
  transition: all var(--transition);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- PAGINATION ---- */
.pagination { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--surface); cursor: pointer;
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.page-btn.active, .page-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- MODAL ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 2000;
  align-items: flex-end; justify-content: center;
  padding: 0;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto;
  padding: 24px 20px; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.modal-close {
  width: 32px; height: 32px; border: none; background: var(--bg);
  border-radius: 50%; cursor: pointer; font-size: 1rem; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 14px; }
.empty-state h3 { font-size: 1rem; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; }

/* ---- FOOTER ---- */
footer {
  background: var(--primary-dark); color: rgba(255,255,255,0.7);
  text-align: center; padding: 20px 16px; font-size: 0.82rem; margin-top: auto;
}
footer a { color: var(--accent-light); }

/* ==========================================
   TABLET: 640px+
   ========================================== */
@media (min-width: 640px) {
  .container { padding: 0 24px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .exam-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .resources-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-title { font-size: 2.5rem; }
  .main-content { padding: 24px; }
  .modal { border-radius: var(--radius-lg); margin-bottom: 40px; }
  .modal-overlay { align-items: center; }
}

/* ==========================================
   DESKTOP: 1024px+
   ========================================== */
@media (min-width: 1024px) {
  :root { --navbar-h: 64px; }
  .container { padding: 0 32px; }
  .hamburger { display: none; }
  .navbar-nav { display: flex; }
  .page-wrapper { grid-template-columns: 240px 1fr; }
  .sidebar { display: block; }
  .main-content { padding: 32px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .exam-grid { grid-template-columns: repeat(3, 1fr); }
  .resources-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-title { font-size: 3rem; }
  .admin-sidebar { display: flex; }
  .admin-main { margin-left: 220px; }
  .admin-hamburger { display: none; }
}

/* ==========================================
   TOUCH IMPROVEMENTS
   ========================================== */
@media (hover: none) {
  .btn:hover, .exam-card:hover, .resource-card:hover { transform: none; box-shadow: var(--shadow-sm); }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
  .navbar, .sidebar, .hamburger, .test-navigation, .mobile-menu { display: none !important; }
  .main-content { padding: 0; }
}