/* ========================================
   EMBRYOLOGY SCHOLARSHIP EXAM - ADMIN PANEL
   Design System & Global Styles
   ======================================== */

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

/* ── Design Tokens ── */
:root {
  /* Primary - Medical/Science Teal */
  --primary-50: #e6f7f5;
  --primary-100: #b3e8e2;
  --primary-200: #80d9cf;
  --primary-300: #4dcabc;
  --primary-400: #26bfad;
  --primary-500: #0fa68e;
  --primary-600: #0d9580;
  --primary-700: #0a7a69;
  --primary-800: #086053;
  --primary-900: #04403a;

  /* Accent - Warm Coral/Rose for highlights */
  --accent-50: #fef2f0;
  --accent-100: #fcd9d3;
  --accent-200: #f9b3a7;
  --accent-300: #f68d7b;
  --accent-400: #f4725d;
  --accent-500: #e8533e;
  --accent-600: #d04232;
  --accent-700: #a93328;
  --accent-800: #83261e;
  --accent-900: #5c1b16;

  /* Neutral */
  --neutral-0: #ffffff;
  --neutral-50: #f8f9fb;
  --neutral-100: #f1f3f6;
  --neutral-150: #e8ebf0;
  --neutral-200: #dfe2e8;
  --neutral-300: #c4c9d4;
  --neutral-400: #9aa1b0;
  --neutral-500: #6e7787;
  --neutral-600: #515a6a;
  --neutral-700: #3a4252;
  --neutral-800: #252d3d;
  --neutral-900: #141b2b;

  /* Semantic */
  --success: #22c55e;
  --success-bg: #f0fdf4;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #3b82f6;
  --info-bg: #eff6ff;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs: 0.6875rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: 2.25rem;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(20, 27, 43, 0.04);
  --shadow-sm: 0 1px 3px rgba(20, 27, 43, 0.06), 0 1px 2px rgba(20, 27, 43, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(20, 27, 43, 0.06), 0 2px 4px -2px rgba(20, 27, 43, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(20, 27, 43, 0.07), 0 4px 6px -4px rgba(20, 27, 43, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(20, 27, 43, 0.08), 0 8px 10px -6px rgba(20, 27, 43, 0.04);
  --shadow-glow: 0 0 20px rgba(15, 166, 142, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 68px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--neutral-800);
  background: var(--neutral-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

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

ul,
ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

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

/* ── App Layout ── */
.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--neutral-0);
  border-right: 1px solid var(--neutral-150);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: width var(--transition-slow);
}

.sidebar-brand {
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--neutral-150);
  min-height: 68px;
}

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.sidebar-brand .brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand .brand-name {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--neutral-800);
  line-height: 1.2;
}

.sidebar-brand .brand-subtitle {
  font-size: var(--fs-xs);
  color: var(--neutral-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: var(--sp-4) var(--sp-3);
  overflow-y: auto;
}

.nav-section {
  margin-bottom: var(--sp-6);
}

.nav-section-title {
  font-size: var(--fs-xs);
  color: var(--neutral-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 var(--sp-3);
  margin-bottom: var(--sp-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--radius-md);
  color: var(--neutral-500);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

.nav-item.active {
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--primary-500);
  border-radius: 0 4px 4px 0;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--accent-500);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--neutral-150);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user:hover {
  background: var(--neutral-100);
}

.sidebar-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-400), var(--accent-400));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: var(--fs-sm);
  flex-shrink: 0;
}

.sidebar-user .user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-user .user-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--neutral-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .user-role {
  font-size: var(--fs-xs);
  color: var(--neutral-400);
}

/* ── Main Area ── */
.main-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */
.header {
  height: var(--header-height);
  background: var(--neutral-0);
  border-bottom: 1px solid var(--neutral-150);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-8);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.header-left h1 {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--neutral-900);
}

.header-left .breadcrumb {
  font-size: var(--fs-sm);
  color: var(--neutral-400);
}

.header-search {
  position: relative;
  max-width: 340px;
  flex: 1;
}

.header-search input {
  width: 100%;
  height: 40px;
  background: var(--neutral-100);
  border-radius: var(--radius-full);
  padding: 0 var(--sp-4) 0 var(--sp-10);
  font-size: var(--fs-sm);
  color: var(--neutral-700);
  border: 1.5px solid transparent;
  transition: all var(--transition-fast);
}

.header-search input:focus {
  border-color: var(--primary-300);
  background: var(--neutral-0);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.header-search input::placeholder {
  color: var(--neutral-400);
}

.header-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  font-size: 0.875rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-500);
  transition: all var(--transition-fast);
  position: relative;
}

.header-btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.header-btn .notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent-500);
  border-radius: 50%;
  border: 2px solid var(--neutral-0);
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  padding: var(--sp-8);
  overflow-y: auto;
  background: var(--neutral-50);
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
}

.page-header-left h2 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: var(--sp-1);
}

.page-header-left p {
  font-size: var(--fs-sm);
  color: var(--neutral-400);
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}

.stat-card {
  background: var(--neutral-0);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  border: 1px solid var(--neutral-150);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.teal::before {
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
}

.stat-card.coral::before {
  background: linear-gradient(90deg, var(--accent-400), var(--accent-600));
}

.stat-card.blue::before {
  background: linear-gradient(90deg, var(--info), #60a5fa);
}

.stat-card.green::before {
  background: linear-gradient(90deg, var(--success), #4ade80);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-card.teal .stat-icon {
  background: var(--primary-50);
  color: var(--primary-600);
}

.stat-card.coral .stat-icon {
  background: var(--accent-50);
  color: var(--accent-600);
}

.stat-card.blue .stat-icon {
  background: var(--info-bg);
  color: var(--info);
}

.stat-card.green .stat-icon {
  background: var(--success-bg);
  color: var(--success);
}

.stat-card .stat-trend {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.stat-trend.up {
  background: var(--success-bg);
  color: var(--success);
}

.stat-trend.down {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-card .stat-value {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--neutral-900);
  line-height: 1;
  margin-bottom: var(--sp-1);
}

.stat-card .stat-label {
  font-size: var(--fs-sm);
  color: var(--neutral-400);
  font-weight: 500;
}

/* ── Cards / Panels ── */
.card {
  background: var(--neutral-0);
  border: 1px solid var(--neutral-150);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--neutral-150);
}

.card-header h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--neutral-800);
}

.card-body {
  padding: var(--sp-6);
}

.card-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--neutral-150);
  background: var(--neutral-50);
}

/* ── Charts Grid ── */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}

.chart-container {
  position: relative;
  height: 280px;
}

/* ── Tables ── */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--neutral-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--neutral-150);
  white-space: nowrap;
  background: var(--neutral-50);
}

table tbody tr {
  transition: background var(--transition-fast);
}

table tbody tr:hover {
  background: var(--neutral-50);
}

table tbody td {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-100);
  white-space: nowrap;
}

/* ── Badges ── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-status.active {
  background: var(--success-bg);
  color: var(--success);
}

.badge-status.active::before {
  background: var(--success);
}

.badge-status.inactive {
  background: var(--neutral-100);
  color: var(--neutral-500);
}

.badge-status.inactive::before {
  background: var(--neutral-400);
}

.badge-status.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-status.pending::before {
  background: var(--warning);
}

.badge-status.completed {
  background: var(--info-bg);
  color: var(--info);
}

.badge-status.completed::before {
  background: var(--info);
}

.badge-status.scholarship {
  background: var(--primary-50);
  color: var(--primary-600);
}

.badge-status.scholarship::before {
  background: var(--primary-500);
}

.badge-status.upcoming {
  background: #fdf4ff;
  color: #a855f7;
}

.badge-status.upcoming::before {
  background: #a855f7;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--primary-500);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-600);
  box-shadow: 0 4px 12px rgba(15, 166, 142, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--neutral-100);
  color: var(--neutral-700);
  border-color: var(--neutral-200);
}

.btn-secondary:hover {
  background: var(--neutral-200);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-ghost {
  color: var(--neutral-500);
}

.btn-ghost:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.btn-sm {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xs);
}

/* ── Activity Feed ── */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--neutral-100);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.activity-icon.enroll {
  background: var(--primary-50);
  color: var(--primary-600);
}

.activity-icon.exam {
  background: var(--info-bg);
  color: var(--info);
}

.activity-icon.result {
  background: var(--success-bg);
  color: var(--success);
}

.activity-icon.alert {
  background: var(--warning-bg);
  color: var(--warning);
}

.activity-text {
  flex: 1;
}

.activity-text p {
  font-size: var(--fs-sm);
  color: var(--neutral-700);
  line-height: 1.4;
}

.activity-text span {
  font-size: var(--fs-xs);
  color: var(--neutral-400);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 27, 43, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--neutral-0);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(16px) scale(0.97);
  transition: transform var(--transition-slow);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-6);
  border-bottom: 1px solid var(--neutral-150);
}

.modal-header h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--neutral-900);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-400);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.modal-body {
  padding: var(--sp-6);
}

.modal-footer {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--neutral-150);
  background: var(--neutral-50);
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: var(--sp-5);
}

.form-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: var(--sp-2);
}

.form-control {
  width: 100%;
  height: 42px;
  padding: 0 var(--sp-4);
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  color: var(--neutral-800);
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary-400);
  background: var(--neutral-0);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.form-control::placeholder {
  color: var(--neutral-400);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236e7787' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea.form-control {
  height: auto;
  min-height: 100px;
  padding: var(--sp-3) var(--sp-4);
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

/* ── Table Toolbar ── */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.table-search {
  position: relative;
  min-width: 240px;
}

.table-search input {
  width: 100%;
  height: 38px;
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 0 var(--sp-3) 0 var(--sp-8);
  font-size: var(--fs-sm);
  color: var(--neutral-700);
  transition: all var(--transition-fast);
}

.table-search input:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.table-search i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  font-size: 0.8rem;
}

.table-actions {
  display: flex;
  gap: var(--sp-2);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-2);
}

.pagination-info {
  font-size: var(--fs-sm);
  color: var(--neutral-400);
}

.pagination-btns {
  display: flex;
  gap: var(--sp-1);
}

.pagination-btns button {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--neutral-600);
  transition: all var(--transition-fast);
}

.pagination-btns button:hover {
  background: var(--neutral-100);
}

.pagination-btns button.active {
  background: var(--primary-500);
  color: white;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-8);
  color: var(--neutral-400);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: var(--sp-4);
  opacity: 0.5;
}

.empty-state h4 {
  font-size: var(--fs-lg);
  color: var(--neutral-600);
  margin-bottom: var(--sp-2);
}

/* ── Settings ── */
.settings-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-6);
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--neutral-500);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.settings-nav-item:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.settings-nav-item.active {
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 600;
}

.settings-section {
  margin-bottom: var(--sp-8);
}

.settings-section h4 {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: var(--sp-1);
}

.settings-section p {
  font-size: var(--fs-sm);
  color: var(--neutral-400);
  margin-bottom: var(--sp-5);
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--neutral-100);
}

.toggle-row .toggle-label {
  display: flex;
  flex-direction: column;
}

.toggle-row .toggle-label strong {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--neutral-700);
}

.toggle-row .toggle-label span {
  font-size: var(--fs-xs);
  color: var(--neutral-400);
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--neutral-300);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  left: 3px;
  bottom: 3px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--primary-500);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

/* ── Login Page ── */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--neutral-50) 0%, var(--primary-50) 50%, var(--accent-50) 100%);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 166, 142, 0.06), transparent 70%);
  top: -200px;
  right: -200px;
}

.login-container::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 83, 62, 0.04), transparent 70%);
  bottom: -150px;
  left: -100px;
}

.login-card {
  background: var(--neutral-0);
  border-radius: var(--radius-xl);
  padding: var(--sp-12) var(--sp-10);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--neutral-150);
  position: relative;
  z-index: 1;
}

.login-brand {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.login-brand .login-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: var(--sp-4);
}

.login-brand h2 {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: var(--sp-1);
}

.login-brand p {
  font-size: var(--fs-sm);
  color: var(--neutral-400);
}

.login-form .form-group {
  margin-bottom: var(--sp-5);
}

.login-form .form-control {
  height: 46px;
}

.login-form .btn {
  width: 100%;
  height: 46px;
  justify-content: center;
  font-size: var(--fs-base);
}

.login-footer {
  text-align: center;
  margin-top: var(--sp-6);
  font-size: var(--fs-sm);
  color: var(--neutral-400);
}

.login-footer a {
  color: var(--primary-500);
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .main-area {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Utility ── */
.text-primary {
  color: var(--primary-500);
}

.text-muted {
  color: var(--neutral-400);
}

.fw-600 {
  font-weight: 600;
}

.mt-4 {
  margin-top: var(--sp-4);
}

.mb-4 {
  margin-bottom: var(--sp-4);
}

.mb-6 {
  margin-bottom: var(--sp-6);
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.gap-2 {
  gap: var(--sp-2);
}

.gap-3 {
  gap: var(--sp-3);
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.4s ease forwards;
}

.animate-in:nth-child(2) {
  animation-delay: 0.05s;
}

.animate-in:nth-child(3) {
  animation-delay: 0.1s;
}

.animate-in:nth-child(4) {
  animation-delay: 0.15s;
}

/* ── Question Paper Components ── */
.stat-card-mini {
  background: var(--neutral-0);
  border: 1px solid var(--neutral-150);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  text-align: center;
}

.stat-card-mini strong {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--neutral-900);
  margin-bottom: 2px;
}

.stat-card-mini span {
  font-size: var(--fs-xs);
  color: var(--neutral-400);
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-400);
  font-size: 0.75rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.btn-icon:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.status-badge.status-active {
  background: var(--success-bg);
  color: var(--success);
}

.status-badge.status-inactive {
  background: var(--neutral-100);
  color: var(--neutral-500);
}