/* assets/css/main.css */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600;700&family=Noto+Sans+Math&display=swap');

:root {
    /* Updated to match the brand colors in the image */
  --nta-blue: #081229;           /* Deep Navy from image */
  --nta-blue-dark: #040916;
  --nta-blue-light: #10214a;
  --nta-gold: #d4a037;           /* Gold/Yellow color for LL block and sub-text */
  
  --bg-header: #081229;          /* Header Background */
  
  /* Rest of the variables remain same 
  --nta-blue: #003580; 
  --bg-header: #003580; */
  --nta-blue-dark: #00245a;
  --nta-blue-light: #1565c0;
  --nta-red: #c62828;
  --nta-green: #2e7d32;
  --nta-orange: #e65100;
  --nta-yellow: #f9a825;
  --nta-purple: #6a1b9a;
  --nta-gray: #546e7a;

  --bg-primary: #f0f2f5;
  --bg-white: #ffffff;
  
  --border: #cfd8dc;

  --text-primary: #1a1a2e;
  --text-secondary: #455a64;
  --text-light: #ffffff;

  --q-not-visited: #ffffff;
  --q-not-answered: #ef5350;
  --q-answered: #43a047;
  --q-marked: #7b1fa2;
  --q-answered-marked: #7b1fa2;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --radius: 6px;
  --transition: all 0.2s ease;
}

[data-theme="dark"] {
  --bg-primary: #0d1117;
  --bg-white: #161b22;
  --bg-header: #001a3a;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --q-not-visited: #21262d;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

/* ========== AUTH PAGES ========== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #003580 0%, #0052b4 50%, #003580 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  top: -200px; right: -200px;
}

.auth-wrapper::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  bottom: -150px; left: -100px;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo .logo-emblem {
  width: 64px; height: 64px;
  background: var(--nta-blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
  color: white;
  font-weight: 700;
}

.auth-logo h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--nta-blue);
  line-height: 1.2;
}

.auth-logo p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--nta-blue);
  box-shadow: 0 0 0 3px rgba(0,53,128,0.12);
}

.form-control.is-error {
  border-color: var(--nta-red);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  outline: none;
}

.btn-primary {
  background: var(--nta-blue);
  color: white;
  width: 100%;
}

.btn-primary:hover { background: var(--nta-blue-dark); }

.btn-secondary {
  background: #e3e8f0;
  color: var(--text-primary);
}

.btn-secondary:hover { background: #d0d9e8; }

.btn-success { background: var(--nta-green); color: white; }
.btn-danger { background: var(--nta-red); color: white; }
.btn-warning { background: var(--nta-yellow); color: #333; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-success { background: #e8f5e9; color: #1b5e20; border-left: 3px solid #43a047; }
.alert-error { background: #ffebee; color: #b71c1c; border-left: 3px solid #ef5350; }
.alert-info { background: #e3f2fd; color: #0d47a1; border-left: 3px solid #1976d2; }

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 8px 0;
}

.otp-inputs input {
  width: 46px;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: var(--transition);
}

.otp-inputs input:focus {
  border-color: var(--nta-blue);
  box-shadow: 0 0 0 3px rgba(0,53,128,0.12);
}

.divider {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin: 16px 0;
  position: relative;
}

.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* ========== DASHBOARD (Updated for Brand Alignment) ========== */
.dash-header {
  background: var(--bg-header);
  color: white;
  padding: 0 40px; /* Increased padding for closer look to image */
  height: 80px;    /* Taller header for the logo spacing */
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dash-header .logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}
/* The Gold "LL" Box */
.logo-mark {
  background: var(--nta-gold);
  color: var(--nta-blue);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 8px;
  font-size: 22px;
  flex-shrink: 0;
}

/* "LawOrbit Academy" text */
.logo-text {
  color: #ffffff;
  font-family: 'serif'; /* Optional: Use a serif font for brand accuracy */
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.5px;
}

/* "EXCELLENCE IN EDUCATION" sub-text */
.logo-sub {
  color: var(--nta-gold);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px; /* Spaced out as in image */
  margin-top: 4px;
}

.dash-header .user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.dash-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px;
}

.welcome-banner {
  background: linear-gradient(135deg, var(--nta-blue), var(--nta-blue-light));
  color: white;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-banner h2 { font-size: 22px; margin-bottom: 4px; }
.welcome-banner p { opacity: 0.85; font-size: 14px; }

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--nta-blue);
  display: inline-block;
}

.exam-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.exam-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.exam-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.exam-card-type {
  display: inline-block;
  padding: 3px 10px;
  background: #e3f2fd;
  color: var(--nta-blue);
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.exam-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.exam-card p { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }

.exam-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.exam-meta span { display: flex; align-items: center; gap: 4px; }

/* ========== EXAM INTERFACE ========== */
.exam-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.exam-topbar {
  background: var(--nta-blue);
  color: white;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.exam-topbar .exam-title {
  font-size: 14px;
  font-weight: 600;
}

.exam-topbar .candidate-info {
  font-size: 12px;
  opacity: 0.9;
}

.timer-box {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 6px 16px;
  text-align: center;
  min-width: 120px;
}

.timer-box .timer-label {
  font-size: 10px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timer-box .timer-value {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.timer-box.timer-warning { background: rgba(230, 81, 0, 0.3); border-color: var(--nta-orange); }
.timer-box.timer-critical { background: rgba(198, 40, 40, 0.4); border-color: var(--nta-red); animation: pulse 1s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Section tabs */
.section-tabs {
  background: #e8edf5;
  border-bottom: 2px solid var(--border);
  display: flex;
  flex-shrink: 0;
  overflow-x: auto;
}

.section-tab {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: var(--transition);
  user-select: none;
}

.section-tab:hover { color: var(--nta-blue); background: rgba(0,53,128,0.06); }
.section-tab.active {
  color: var(--nta-blue);
  border-bottom-color: var(--nta-blue);
  background: white;
}

/* Main exam body */
.exam-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Question area */
.question-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-white);
}

.question-header {
  padding: 12px 20px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.question-number-badge {
  background: var(--nta-blue);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.question-marks {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
}

.question-marks .positive { color: var(--nta-green); font-weight: 600; }
.question-marks .negative { color: var(--nta-red); font-weight: 600; }

.question-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.question-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.question-image {
  max-width: 100%;
  max-height: 280px;
  margin: 12px 0;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.option-item:hover {
  border-color: var(--nta-blue);
  background: #f0f4ff;
}

.option-item.selected {
  border-color: var(--nta-blue);
  background: #e8eef8;
}

.option-radio {
  width: 18px; height: 18px;
  border: 2px solid #90a4ae;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.option-item.selected .option-radio {
  border-color: var(--nta-blue);
  background: var(--nta-blue);
}

.option-item.selected .option-radio::after {
  content: '';
  width: 6px; height: 6px;
  background: white;
  border-radius: 50%;
}

.option-label {
  font-weight: 700;
  color: var(--nta-blue);
  min-width: 20px;
  font-size: 14px;
}

.option-text {
  font-size: 14px;
  line-height: 1.5;
}

/* Action buttons */
.question-actions {
  padding: 12px 20px;
  background: #f8f9fb;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.action-group { display: flex; gap: 8px; }

.btn-mark-review {
  background: #7b1fa2;
  color: white;
  padding: 9px 18px;
  font-size: 13px;
}

.btn-mark-review:hover { background: #6a1b9a; }

.btn-clear {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  padding: 9px 14px;
  font-size: 13px;
}

.btn-clear:hover { background: #f5f5f5; }

.btn-save-next {
  background: var(--nta-blue);
  color: white;
  padding: 9px 20px;
  font-size: 13px;
}

.btn-save-next:hover { background: var(--nta-blue-dark); }

.btn-submit-exam {
  background: var(--nta-green);
  color: white;
  padding: 9px 18px;
  font-size: 13px;
}

.btn-submit-exam:hover { background: #1b5e20; }

/* ========== QUESTION PALETTE ========== */
.palette-panel {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-white);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.palette-candidate {
  padding: 14px 16px;
  background: var(--nta-blue);
  color: white;
  text-align: center;
}

.palette-candidate .candidate-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 18px;
  font-weight: 700;
}

.palette-candidate .candidate-name { font-size: 13px; font-weight: 600; }
.palette-candidate .candidate-email { font-size: 11px; opacity: 0.8; }

.palette-legend {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.legend-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.legend-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 20px; height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: white;
  font-weight: 700;
}

.dot-not-visited { background: var(--q-not-visited); border: 1.5px solid #90a4ae; color: #546e7a; }
.dot-not-answered { background: var(--q-not-answered); }
.dot-answered { background: var(--q-answered); }
.dot-marked { background: var(--q-marked); }
.dot-answered-marked { background: var(--q-answered-marked); border: 2px solid var(--q-answered-marked); position: relative; }
.dot-answered-marked::after {
  content: '✓';
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: var(--q-answered);
  border-radius: 50%;
  width: 10px;
  height: 10px;
  font-size: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.palette-questions {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.palette-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 8px 0 6px;
}

.palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.palette-btn {
  width: 34px; height: 34px;
  border-radius: 5px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  outline: none;
}

.palette-btn:hover { transform: scale(1.1); box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.palette-btn.current { box-shadow: 0 0 0 3px #ffd600, 0 0 0 5px #333; }

.palette-btn.status-not_visited { background: var(--q-not-visited); border: 1.5px solid #90a4ae; color: #546e7a; }
.palette-btn.status-not_answered { background: var(--q-not-answered); color: white; }
.palette-btn.status-answered { background: var(--q-answered); color: white; }
.palette-btn.status-marked_review { background: var(--q-marked); color: white; }
.palette-btn.status-answered_marked { background: var(--q-answered-marked); color: white; }

.palette-summary {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: #f8f9fb;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.summary-item {
  text-align: center;
  padding: 6px;
  border-radius: 4px;
  background: var(--bg-white);
  border: 1px solid var(--border);
}

.summary-count {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.summary-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ========== INSTRUCTIONS PAGE ========== */
.instructions-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px;
}

.instructions-header {
  background: var(--nta-blue);
  color: white;
  padding: 20px 28px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.instructions-body {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: none;
  padding: 24px 28px;
  border-radius: 0 0 10px 10px;
}

.instructions-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.instructions-section:last-child { border-bottom: none; margin-bottom: 0; }

.instructions-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--nta-blue);
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid var(--nta-blue);
}

.instructions-section ol, .instructions-section ul {
  padding-left: 24px;
  font-size: 13px;
  line-height: 2;
  color: var(--text-primary);
}

.marking-scheme-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.marking-scheme-table th {
  background: var(--nta-blue);
  color: white;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
}

.marking-scheme-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.marking-scheme-table tr:nth-child(even) td { background: #f8f9fb; }

.lang-select {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.lang-btn {
  padding: 7px 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  background: white;
  font-weight: 500;
  transition: var(--transition);
}

.lang-btn.selected {
  border-color: var(--nta-blue);
  background: var(--nta-blue);
  color: white;
}

/* ========== RESULT PAGE ========== */
.result-header {
  background: linear-gradient(135deg, var(--nta-blue), var(--nta-blue-light));
  color: white;
  text-align: center;
  padding: 32px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.result-score-circle {
  width: 120px; height: 120px;
  border: 4px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: rgba(255,255,255,0.15);
}

.result-score-circle .score { font-size: 28px; font-weight: 700; line-height: 1; }
.result-score-circle .out-of { font-size: 12px; opacity: 0.8; }

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.stat-value.correct { color: var(--nta-green); }
.stat-value.wrong { color: var(--nta-red); }
.stat-value.skipped { color: var(--nta-gray); }
.stat-value.score { color: var(--nta-blue); }

/* Section analysis */
.section-analysis {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.section-analysis-header {
  background: #f0f4ff;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  color: var(--nta-blue);
  border-bottom: 1px solid var(--border);
}

.analysis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.analysis-table th {
  background: var(--nta-blue);
  color: white;
  padding: 10px 14px;
  text-align: center;
  font-weight: 600;
}

.analysis-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}

.analysis-table tr:last-child td { border-bottom: none; }
.analysis-table td:first-child { text-align: left; font-weight: 500; }

/* ========== ADMIN PANEL ========== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: #1a1f2e;
  color: white;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.admin-sidebar-logo {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-logo h2 { font-size: 15px; font-weight: 700; }
.admin-sidebar-logo p { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }

.admin-nav { flex: 1; padding: 16px 0; overflow-y: auto; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 20px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-link:hover { color: white; background: rgba(255,255,255,0.06); }
.nav-link.active { color: white; background: rgba(0,53,128,0.4); border-left-color: #4d9ff8; }
.nav-link .nav-icon { font-size: 16px; width: 20px; text-align: center; }

.admin-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.admin-content {
  padding: 24px;
  flex: 1;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-widget {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-widget .widget-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.stat-widget .widget-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-widget .widget-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.data-table-wrap {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.data-table-header h3 { font-size: 14px; font-weight: 700; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: #f8f9fb;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text-primary);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfc; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success { background: #e8f5e9; color: var(--nta-green); }
.badge-danger { background: #ffebee; color: var(--nta-red); }
.badge-warning { background: #fff3e0; color: var(--nta-orange); }
.badge-info { background: #e3f2fd; color: var(--nta-blue); }

/* Form styles for admin */
.admin-form {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-1 { grid-template-columns: 1fr; }

select.form-control, textarea.form-control {
  appearance: none;
  resize: vertical;
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--nta-blue);
  padding: 10px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: white;
  border-radius: 12px;
  padding: 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.9);
  transition: transform 0.2s;
}

.modal-overlay.open .modal { transform: scale(1); }

.modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ========== MISC ========== */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid #e0e0e0;
  border-top-color: var(--nta-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* Progress bar */
.progress-bar {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--nta-green);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #78909c; }

/* Responsive */
@media (max-width: 900px) {
  .palette-panel { display: none; }
  .result-stats { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { transform: translateX(-240px); }
  .admin-main { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
}

@media print {
  .exam-topbar, .palette-panel, .question-actions { display: none !important; }
}
