/* =====================================================
   MTTM — Polished Design System
   ===================================================== */

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

/* ─── CSS Variables ─────────────────────────────────── */
:root {
  --primary:        #4361ee;
  --primary-dark:   #3451d1;
  --primary-light:  #eef0fd;
  --secondary:      #64748b;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #06b6d4;
  --purple:         #8b5cf6;
  --pink:           #ec4899;
  --teal:           #14b8a6;
  --orange:         #f97316;

  --sidebar-width:  260px;
  --topbar-height:  64px;
  --sidebar-bg:     #0f172a;
  --sidebar-text:   rgba(226,232,240,.85);
  --card-radius:    16px;
  --transition:     all .22s cubic-bezier(.4,0,.2,1);
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:         0 4px 16px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:      0 10px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);
  --shadow-colored: 0 8px 32px rgba(67,97,238,.22);
}

/* ─── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ════════════════════════════════════════════════════
   LOGIN PAGE
════════════════════════════════════════════════════ */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1d2e 0%, #0f172a 40%, #1e1b4b 100%);
  display: block;
  position: relative;
  overflow-x: hidden;
}
.login-body::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67,97,238,.25) 0%, transparent 70%);
  top: -200px; left: -100px;
  pointer-events: none;
}
.login-body::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.2) 0%, transparent 70%);
  bottom: -100px; right: -50px;
  pointer-events: none;
}
.login-card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0,0,0,.4);
}
@media (max-width: 575.98px) {
  .login-card { padding: 1.25rem; border-radius: 18px; }
  .login-body .container { padding-left: .75rem; padding-right: .75rem; }
}
.login-logo {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 24px rgba(67,97,238,.5);
}
.login-body .form-control {
  background: rgba(255,255,255,.08) !important;
  border: 1.5px solid rgba(255,255,255,.15) !important;
  color: #fff !important;
  border-radius: 10px;
  padding: .65rem 1rem;
  font-size: .9rem;
}
.login-body .form-control::placeholder { color: rgba(255,255,255,.4); }
.login-body .form-control:focus {
  background: rgba(255,255,255,.12) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(67,97,238,.25) !important;
  outline: none;
}
.login-body .form-label { color: rgba(255,255,255,.75); font-size: .85rem; font-weight: 500; }
/* Dark-theme selects */
.login-body .form-select {
  background-color: rgba(255,255,255,.08) !important;
  background-image: none !important;
  border: 1.5px solid rgba(255,255,255,.15) !important;
  color: #fff !important;
  border-radius: 10px;
  padding: .65rem 1rem;
  font-size: .9rem;
}
.login-body .form-select option { background: #1e293b; color: #fff; }
.login-body .form-select:focus {
  background-color: rgba(255,255,255,.12) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(67,97,238,.25) !important;
  outline: none;
}
.login-body .btn-login {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 10px;
  padding: .7rem 1.5rem;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .3px;
  width: 100%;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(67,97,238,.4);
}
.login-body .btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(67,97,238,.5);
}
.login-body .input-group-text {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.5);
  border-radius: 10px 0 0 10px;
}

/* ════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1050;
  transition: var(--transition);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
  box-shadow: 4px 0 24px rgba(0,0,0,.2);
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.4rem;
  background: linear-gradient(135deg, rgba(67,97,238,.2), rgba(139,92,246,.15));
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-text { font-size: .9rem; font-weight: 700; letter-spacing: .4px; color: #fff; }

.sidebar-nav { padding: .5rem 0 1rem; }

.nav-section-label,
.sidebar-section {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(148,163,184,.5);
  padding: .75rem 1.25rem .3rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 1.25rem;
  margin: 1px .6rem;
  color: rgba(203,213,225,.8);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
  border-radius: 10px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.sidebar .nav-link i {
  width: 20px;
  text-align: center;
  font-size: .9rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.sidebar .nav-link span { flex: 1; }
.sidebar .nav-link:hover {
  background: rgba(67,97,238,.2);
  color: #e2e8f0;
  transform: translateX(4px);
}
.sidebar .nav-link.active {
  background: linear-gradient(135deg, rgba(67,97,238,.35), rgba(67,97,238,.2));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--primary);
  font-weight: 600;
}
.sidebar .nav-link.active i { color: #93c5fd; }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1040;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: var(--transition);
}

.content-area {
  padding: 1.5rem 1.75rem 2rem;
}

/* ════════════════════════════════════════════════════
   TOPBAR
════════════════════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(226,232,240,.8);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
}

/* ════════════════════════════════════════════════════
   PANEL HEADER (banner at top of pages)
════════════════════════════════════════════════════ */
.panel-header {
  background: linear-gradient(135deg, var(--primary) 0%, #3730a3 60%, var(--purple) 100%);
  padding: 2rem 1.75rem 1.25rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.panel-header::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  top: -80px; right: -60px;
  pointer-events: none;
}
.panel-header::after {
  content: '';
  position: absolute;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  bottom: -40px; right: 180px;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════
   CARDS
════════════════════════════════════════════════════ */
.card {
  border-radius: var(--card-radius) !important;
  border: 1px solid rgba(226,232,240,.7) !important;
  background: #fff;
  box-shadow: var(--shadow-sm) !important;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow) !important; }
.card-header {
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: #fff !important;
  padding: 1rem 1.25rem;
}
.card-footer {
  border-radius: 0 0 var(--card-radius) var(--card-radius) !important;
  border-top: 1px solid #f1f5f9 !important;
  background: #fafbfc;
}

/* ─── Stat Cards ──────────────────────────────────── */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg) !important;
}
.stat-card .card-body { padding: 1.35rem; }
.stat-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 14px !important;
  font-size: 1.3rem;
}
.stat-card .stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: #1e293b; }
.stat-card .stat-label { font-size: .75rem; font-weight: 500; color: #64748b; margin-top: .15rem; }

/* ─── Gradient accent stat cards ─────────────────── */
.stat-card-primary { background: linear-gradient(135deg, #4361ee, #7c3aed) !important; color: #fff !important; border: none !important; }
.stat-card-primary .stat-value,
.stat-card-primary .stat-label { color: rgba(255,255,255,.95) !important; }
.stat-card-primary .stat-icon { background: rgba(255,255,255,.2) !important; color: #fff !important; }

/* ─── Soft backgrounds ────────────────────────────── */
.bg-primary-soft { background: rgba(67,97,238,.1) !important; }
.bg-success-soft  { background: rgba(16,185,129,.1) !important; }
.bg-warning-soft  { background: rgba(245,158,11,.1) !important; }
.bg-danger-soft   { background: rgba(239,68,68,.1) !important; }
.bg-info-soft     { background: rgba(6,182,212,.1) !important; }
.bg-purple-soft   { background: rgba(139,92,246,.1) !important; }
.bg-teal-soft     { background: rgba(20,184,166,.1) !important; }
.bg-orange-soft   { background: rgba(249,115,22,.1) !important; }
.bg-pink-soft     { background: rgba(236,72,153,.1) !important; }

/* ─── Soft text colors ────────────────────────────── */
.text-primary  { color: var(--primary) !important; }
.text-success  { color: var(--success) !important; }
.text-warning  { color: var(--warning) !important; }
.text-danger   { color: var(--danger) !important; }
.text-info     { color: var(--info) !important; }
.text-purple   { color: var(--purple) !important; }
.text-teal     { color: var(--teal) !important; }
.text-orange   { color: var(--orange) !important; }
.text-pink     { color: var(--pink) !important; }

/* ════════════════════════════════════════════════════
   TABLES
════════════════════════════════════════════════════ */
.table-wrapper {
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid #f1f5f9;
}
.table {
  margin: 0;
  font-size: .875rem;
}
.table thead th {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: #64748b;
  background: #f8fafc;
  white-space: nowrap;
  padding: .85rem 1rem;
  border-bottom: 2px solid #e2e8f0;
  border-top: none;
}
.table tbody td {
  vertical-align: middle;
  padding: .8rem 1rem;
  border-color: #f1f5f9;
  color: #334155;
}
.table tbody tr {
  transition: var(--transition);
}
.table tbody tr:hover {
  background: rgba(67,97,238,.025);
}
.table tbody tr:last-child td { border-bottom: none; }

/* ════════════════════════════════════════════════════
   BADGES
════════════════════════════════════════════════════ */
.badge {
  font-weight: 600;
  letter-spacing: .3px;
  padding: .3em .65em;
  font-size: .72rem;
  border-radius: 6px;
}
.badge.rounded-pill { border-radius: 50px; }

/* Status badges */
.badge-status-active   { background: rgba(16,185,129,.12); color: #059669; }
.badge-status-inactive { background: rgba(239,68,68,.1);   color: #dc2626; }
.badge-status-pending  { background: rgba(245,158,11,.12); color: #d97706; }

/* ════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════ */
.btn {
  border-radius: 9px;
  font-size: .875rem;
  font-weight: 600;
  padding: .45rem 1rem;
  transition: var(--transition);
  letter-spacing: .2px;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  box-shadow: 0 3px 10px rgba(67,97,238,.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(67,97,238,.4);
  background: linear-gradient(135deg, #4f6ef0, var(--primary-dark));
}
.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  border: none;
  box-shadow: 0 3px 10px rgba(16,185,129,.3);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16,185,129,.4);
}
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  border: none;
  box-shadow: 0 3px 10px rgba(239,68,68,.25);
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239,68,68,.35);
}
.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  border: none;
  color: #fff;
  box-shadow: 0 3px 10px rgba(245,158,11,.3);
}
.btn-warning:hover {
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 6px 18px rgba(245,158,11,.4);
}
.btn-info {
  background: linear-gradient(135deg, var(--info), #0891b2);
  border: none;
  color: #fff;
}
.btn-info:hover { transform: translateY(-1px); color: #fff; }

.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

.btn-sm { padding: .3rem .75rem; font-size: .8rem; border-radius: 7px; }
.btn-lg { padding: .7rem 1.75rem; font-size: 1rem; border-radius: 12px; }

/* Icon buttons */
.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
}

/* ════════════════════════════════════════════════════
   FORMS
════════════════════════════════════════════════════ */
.form-control,
.form-select {
  border-radius: 10px;
  font-size: .875rem;
  border: 1.5px solid #e2e8f0;
  background: #fafbfc;
  color: #1e293b;
  padding: .55rem .9rem;
  transition: var(--transition);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(67,97,238,.12);
  outline: none;
}
.form-control::placeholder { color: #94a3b8; }
.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: .35rem;
}
.input-group-text {
  border: 1.5px solid #e2e8f0;
  background: #f1f5f9;
  color: #64748b;
  font-size: .875rem;
}
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(67,97,238,.15); }

/* ════════════════════════════════════════════════════
   MODALS
════════════════════════════════════════════════════ */
.modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,.18);
  overflow: hidden;
}
.modal-header {
  border-bottom: 1px solid #f1f5f9;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc, #fff);
}
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-body { padding: 1.5rem; }
.modal-footer {
  border-top: 1px solid #f1f5f9;
  padding: 1rem 1.5rem;
  background: #fafbfc;
}
.modal-backdrop.show { opacity: .6; }

/* ════════════════════════════════════════════════════
   ALERTS
════════════════════════════════════════════════════ */
.alert {
  border-radius: 12px;
  border: none;
  font-size: .875rem;
  font-weight: 500;
  padding: .85rem 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.alert-success  { background: rgba(16,185,129,.1);  color: #065f46; border-left: 4px solid var(--success); }
.alert-danger   { background: rgba(239,68,68,.08);  color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning  { background: rgba(245,158,11,.1);  color: #92400e; border-left: 4px solid var(--warning); }
.alert-info     { background: rgba(6,182,212,.08);  color: #164e63; border-left: 4px solid var(--info); }

/* ════════════════════════════════════════════════════
   BREADCRUMB
════════════════════════════════════════════════════ */
.breadcrumb { font-size: .78rem; margin: 0; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item.active { color: #64748b; font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

/* ════════════════════════════════════════════════════
   NAV TABS
════════════════════════════════════════════════════ */
.nav-tabs {
  border-bottom: 2px solid #e2e8f0;
  gap: .25rem;
}
.nav-tabs .nav-link {
  font-size: .85rem;
  font-weight: 600;
  color: #64748b;
  border: none;
  border-radius: 8px 8px 0 0;
  padding: .6rem 1.1rem;
  transition: var(--transition);
}
.nav-tabs .nav-link:hover { color: var(--primary); background: rgba(67,97,238,.06); }
.nav-tabs .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
}

/* ════════════════════════════════════════════════════
   PAGE TITLES & SECTIONS
════════════════════════════════════════════════════ */
.page-title  { font-size: 1.35rem; font-weight: 800; color: #1e293b; letter-spacing: -.3px; }
.page-subtitle { font-size: .8rem; color: #64748b; margin-top: .15rem; }

.section-title {
  font-size: .95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}

/* ════════════════════════════════════════════════════
   ACCESS / STATUS BADGES
════════════════════════════════════════════════════ */
.access-paid   { background: rgba(16,185,129,.12); color: #065f46;  padding: 3px 12px; border-radius: 50px; font-size: .73rem; font-weight: 700; display: inline-block; }
.access-free   { background: rgba(245,158,11,.12); color: #92400e;  padding: 3px 12px; border-radius: 50px; font-size: .73rem; font-weight: 700; display: inline-block; }
.access-unpaid { background: rgba(239,68,68,.1);   color: #991b1b;  padding: 3px 12px; border-radius: 50px; font-size: .73rem; font-weight: 700; display: inline-block; }

/* ════════════════════════════════════════════════════
   HOMEWORK CARDS
════════════════════════════════════════════════════ */
.hw-card {
  border-left: 4px solid var(--primary) !important;
  transition: var(--transition);
  border-radius: 12px !important;
}
.hw-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(67,97,238,.12) !important; }
.hw-overdue { border-left-color: var(--danger) !important; }

/* ════════════════════════════════════════════════════
   NOTE ICONS
════════════════════════════════════════════════════ */
.note-thumb {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.note-pdf   { background: rgba(239,68,68,.1);   color: #dc2626; }
.note-ppt   { background: rgba(249,115,22,.1);  color: #ea580c; }
.note-video { background: rgba(139,92,246,.1);  color: #7c3aed; }
.note-img   { background: rgba(6,182,212,.1);   color: #0891b2; }
.note-doc   { background: rgba(67,97,238,.1);   color: #4338ca; }
.note-other { background: rgba(100,116,139,.1); color: #475569; }

/* ════════════════════════════════════════════════════
   ATTENDANCE
════════════════════════════════════════════════════ */
.att-present { background: rgba(16,185,129,.12); color: #065f46; border-radius: 6px; padding: 2px 10px; font-size: .78rem; font-weight: 600; display: inline-block; }
.att-absent  { background: rgba(239,68,68,.1);  color: #991b1b; border-radius: 6px; padding: 2px 10px; font-size: .78rem; font-weight: 600; display: inline-block; }
.att-late    { background: rgba(245,158,11,.12); color: #92400e; border-radius: 6px; padding: 2px 10px; font-size: .78rem; font-weight: 600; display: inline-block; }

/* ════════════════════════════════════════════════════
   PAYMENT BADGES
════════════════════════════════════════════════════ */
.payment-badge-paid   { background: rgba(16,185,129,.12); color: #065f46; border-radius: 50px; padding: 4px 14px; font-weight: 700; font-size: .78rem; display: inline-block; }
.payment-badge-unpaid { background: rgba(239,68,68,.1);  color: #991b1b; border-radius: 50px; padding: 4px 14px; font-weight: 700; font-size: .78rem; display: inline-block; }

/* ════════════════════════════════════════════════════
   ANNOUNCEMENTS
════════════════════════════════════════════════════ */
.announce-card {
  border-left: 4px solid var(--info) !important;
  transition: var(--transition);
  border-radius: 10px !important;
}
.announce-card:hover { transform: translateX(3px); }
.announce-exam     { border-left-color: var(--danger) !important; }
.announce-holiday  { border-left-color: var(--success) !important; }
.announce-fee      { border-left-color: var(--warning) !important; }
.announce-homework { border-left-color: var(--primary) !important; }
.announce-notes    { border-left-color: var(--info) !important; }

/* ════════════════════════════════════════════════════
   EMPTY STATES
════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #94a3b8;
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: .4; display: block; }
.empty-state p { font-size: .9rem; margin: 0; }

/* ════════════════════════════════════════════════════
   PROGRESS BARS
════════════════════════════════════════════════════ */
.progress {
  height: 8px;
  border-radius: 50px;
  background: #f1f5f9;
  overflow: hidden;
}
.progress-bar { border-radius: 50px; transition: width .6s ease; }

/* ════════════════════════════════════════════════════
   DROPDOWN MENUS
════════════════════════════════════════════════════ */
.dropdown-menu {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
  padding: .4rem;
  font-size: .875rem;
}
.dropdown-item {
  border-radius: 8px;
  padding: .45rem .85rem;
  color: #374151;
  font-weight: 500;
  transition: var(--transition);
}
.dropdown-item:hover { background: #f1f5f9; color: var(--primary); }
.dropdown-divider    { border-color: #f1f5f9; margin: .3rem .4rem; }

/* ════════════════════════════════════════════════════
   QUICK ACTION CARDS
════════════════════════════════════════════════════ */
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1.25rem .75rem;
  border-radius: 14px;
  text-decoration: none;
  transition: var(--transition);
  background: #f8fafc;
  border: 1.5px solid transparent;
  text-align: center;
  color: #475569;
}
.quick-action:hover {
  background: var(--primary-light);
  border-color: rgba(67,97,238,.2);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(67,97,238,.1);
}
.quick-action i { font-size: 1.4rem; }
.quick-action span { font-size: .78rem; font-weight: 600; }

/* ════════════════════════════════════════════════════
   ID CARD / CERTIFICATE
════════════════════════════════════════════════════ */
.id-card {
  width: 320px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-size: .82rem;
}
.id-card-header {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  padding: 1.2rem;
  color: #fff;
  text-align: center;
}

/* ════════════════════════════════════════════════════
   COUNTDOWN TIMER (exam)
════════════════════════════════════════════════════ */
.exam-timer {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border-radius: 12px;
  padding: .4rem 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(220,38,38,.3);
}
.exam-timer.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 12px rgba(245,158,11,.3);
  animation: pulse-warning 1s infinite;
}
@keyframes pulse-warning {
  0%,100% { opacity: 1; }
  50%      { opacity: .7; }
}

/* Exam option cards */
.option-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: .75rem 1rem;
  cursor: pointer;
  transition: var(--transition);
}
.option-card:hover {
  border-color: rgba(67,97,238,.4);
  background: rgba(67,97,238,.03);
}
.option-card.selected {
  border-color: var(--primary);
  background: rgba(67,97,238,.07);
  box-shadow: 0 0 0 3px rgba(67,97,238,.1);
}

/* ════════════════════════════════════════════════════
   GRADE BADGES
════════════════════════════════════════════════════ */
.grade-a-plus { background: linear-gradient(135deg,#10b981,#059669); color:#fff; padding:3px 12px; border-radius:50px; font-weight:700; font-size:.8rem; display:inline-block; }
.grade-a      { background: linear-gradient(135deg,#34d399,#10b981); color:#fff; padding:3px 12px; border-radius:50px; font-weight:700; font-size:.8rem; display:inline-block; }
.grade-b-plus { background: linear-gradient(135deg,#60a5fa,#3b82f6); color:#fff; padding:3px 12px; border-radius:50px; font-weight:700; font-size:.8rem; display:inline-block; }
.grade-b      { background: linear-gradient(135deg,#93c5fd,#60a5fa); color:#1e3a8a; padding:3px 12px; border-radius:50px; font-weight:700; font-size:.8rem; display:inline-block; }
.grade-c      { background: linear-gradient(135deg,#fbbf24,#f59e0b); color:#fff; padding:3px 12px; border-radius:50px; font-weight:700; font-size:.8rem; display:inline-block; }
.grade-d      { background: linear-gradient(135deg,#fb923c,#f97316); color:#fff; padding:3px 12px; border-radius:50px; font-weight:700; font-size:.8rem; display:inline-block; }
.grade-f      { background: linear-gradient(135deg,#f87171,#ef4444); color:#fff; padding:3px 12px; border-radius:50px; font-weight:700; font-size:.8rem; display:inline-block; }

/* ════════════════════════════════════════════════════
   RANK BADGE
════════════════════════════════════════════════════ */
.rank-gold   { background: linear-gradient(135deg,#fbbf24,#f59e0b); color:#fff; border-radius:50%; width:32px;height:32px; display:inline-flex;align-items:center;justify-content:center; font-weight:800; font-size:.85rem; box-shadow:0 3px 10px rgba(245,158,11,.4); }
.rank-silver { background: linear-gradient(135deg,#94a3b8,#64748b); color:#fff; border-radius:50%; width:32px;height:32px; display:inline-flex;align-items:center;justify-content:center; font-weight:800; font-size:.85rem; }
.rank-bronze { background: linear-gradient(135deg,#d97706,#b45309); color:#fff; border-radius:50%; width:32px;height:32px; display:inline-flex;align-items:center;justify-content:center; font-weight:800; font-size:.85rem; }

/* ════════════════════════════════════════════════════
   PRINT
════════════════════════════════════════════════════ */
@media print {
  .sidebar,.topbar,.btn,.no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  body { background: #fff; }
  .card { box-shadow: none !important; border: 1px solid #e2e8f0 !important; }
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.show { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.25); }
  .main-content { margin-left: 0; }
  .content-area { padding: 1rem 1rem 2rem; }
}

@media (max-width: 575.98px) {
  .topbar { padding: 0 1rem; }
  .panel-header { padding: 1.5rem 1rem 1rem; }
  .stat-card .stat-value { font-size: 1.35rem; }
}

/* ════════════════════════════════════════════════════
   UTILITY HELPERS
════════════════════════════════════════════════════ */
.rounded-xl { border-radius: 16px !important; }
.rounded-2xl { border-radius: 20px !important; }
.shadow-colored-primary { box-shadow: 0 8px 24px rgba(67,97,238,.2) !important; }
.shadow-colored-success { box-shadow: 0 8px 24px rgba(16,185,129,.2) !important; }
.fw-800 { font-weight: 800 !important; }

/* ════════════════════════════════════════════════════
   DARK MODE
════════════════════════════════════════════════════ */
[data-theme="dark"] body                          { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .topbar                       { background: rgba(15,23,42,.9) !important; border-color: #1e293b !important; }
[data-theme="dark"] .card                         { background: #1e2d3d !important; border-color: #1e293b !important; }
[data-theme="dark"] .card-header                  { background: #1e2d3d !important; border-color: #1e293b !important; }
[data-theme="dark"] .card-footer                  { background: #172032 !important; border-color: #1e293b !important; }
[data-theme="dark"] .modal-content                { background: #1e2d3d; border-color: #1e293b; }
[data-theme="dark"] .modal-header, [data-theme="dark"] .modal-footer { border-color: #1e293b; }
[data-theme="dark"] .table                        { color: #e2e8f0; --bs-table-bg: transparent; --bs-table-hover-bg: rgba(255,255,255,.03); }
[data-theme="dark"] .table thead th               { background: #172032; color: #64748b; border-color: #1e293b; }
[data-theme="dark"] .table td                     { border-color: #1e293b; }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select                  { background: #172032; border-color: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus            { background: #1e2d3d; border-color: var(--primary); }
[data-theme="dark"] .form-control::placeholder    { color: #475569; }
[data-theme="dark"] .form-label                   { color: #94a3b8; }
[data-theme="dark"] .input-group-text             { background: #172032; border-color: #1e293b; color: #64748b; }
[data-theme="dark"] .dropdown-menu               { background: #1e2d3d; border-color: #1e293b; }
[data-theme="dark"] .dropdown-item               { color: #e2e8f0; }
[data-theme="dark"] .dropdown-item:hover         { background: #172032; }
[data-theme="dark"] .nav-tabs                    { border-color: #1e293b; }
[data-theme="dark"] .nav-tabs .nav-link          { color: #64748b; }
[data-theme="dark"] .nav-tabs .nav-link.active   { background: rgba(67,97,238,.15); color: #93c5fd; border-bottom-color: var(--primary); }
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,
[data-theme="dark"] h4,[data-theme="dark"] h5,[data-theme="dark"] h6,
[data-theme="dark"] .fw-bold,[data-theme="dark"] .fw-semibold,
[data-theme="dark"] .fw-800                      { color: #e2e8f0 !important; }
[data-theme="dark"] .text-muted                  { color: #64748b !important; }
[data-theme="dark"] .text-dark                   { color: #e2e8f0 !important; }
[data-theme="dark"] .bg-white                    { background: #1e2d3d !important; }
[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-body-secondary           { background: #172032 !important; }
[data-theme="dark"] .border,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-top                  { border-color: #1e293b !important; }
[data-theme="dark"] .badge.bg-light              { background: #172032 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .badge.bg-light.text-dark    { color: #e2e8f0 !important; }
[data-theme="dark"] .alert                       { filter: brightness(.85); }
[data-theme="dark"] .list-group-item             { background: #1e2d3d; border-color: #1e293b; color: #e2e8f0; }
[data-theme="dark"] hr                           { border-color: #1e293b; }
[data-theme="dark"] .breadcrumb-item.active      { color: #64748b; }
[data-theme="dark"] small,[data-theme="dark"] .small { color: #64748b; }
[data-theme="dark"] .page-title                  { color: #e2e8f0; }
[data-theme="dark"] .table-wrapper               { border-color: #1e293b; }
[data-theme="dark"] .quick-action                { background: #172032; }
[data-theme="dark"] .quick-action:hover          { background: rgba(67,97,238,.2); }
[data-theme="dark"] .option-card                 { border-color: #1e293b; background: #1e2d3d; color: #e2e8f0; }
[data-theme="dark"] .option-card:hover           { border-color: rgba(67,97,238,.5); background: rgba(67,97,238,.1); }
[data-theme="dark"] .option-card.selected        { border-color: var(--primary); background: rgba(67,97,238,.15); }
[data-theme="dark"] .panel-header                { background: linear-gradient(135deg, #1e3a8a 0%, #1e1b4b 60%, #312e81 100%); }
