/* ============================================================
   EduPro ERP — Professional Light Theme Design System
   Font: Plus Jakarta Sans (Google Fonts)
   Aesthetic: Clean SaaS · Warm whites · Indigo primary
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ─── TOKENS ───────────────────────────────────────────────── */
:root {
  --primary:       #3D5AF1;
  --primary-d:     #2F44D4;
  --primary-l:     #EEF0FD;
  --secondary:     #0891B2;
  --success:       #059669;
  --warning:       #D97706;
  --danger:        #DC2626;
  --violet:        #7C3AED;
  --pink:          #DB2777;
  --orange:        #EA580C;
  --teal:          #0D9488;

  --bg:            #F0F2F7;
  --surface:       #FFFFFF;
  --surface2:      #F8F9FC;
  --surface3:      #F0F2F7;
  --border:        #E4E8F0;
  --border2:       #CDD3E0;

  --text:          #111827;
  --text2:         #4B5563;
  --text3:         #9CA3AF;

  --sidebar-w:     256px;
  --topbar-h:      60px;

  --radius:        8px;
  --radius-lg:     12px;
  --radius-xl:     16px;
  --radius-full:   999px;

  --shadow-sm:     0 1px 2px rgba(0,0,0,.06);
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:     0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:     0 10px 30px rgba(0,0,0,.10);

  --font:          'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:     'SFMono-Regular', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

/* ─── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ─── SIDEBAR ──────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 300;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

.sidebar-brand {
  padding: 0 20px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff;
  flex-shrink: 0;
}
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
.brand-name span { color: var(--primary); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-group { margin-bottom: 4px; }
.nav-group-label {
  padding: 8px 10px 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s;
  position: relative;
}
.nav-link:hover { background: var(--surface3); color: var(--text); }
.nav-link.active {
  background: var(--primary-l);
  color: var(--primary);
  font-weight: 600;
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}
.nav-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  flex-shrink: 0;
  background: transparent;
  transition: background .15s;
}
.nav-link.active .nav-icon { background: var(--primary); color: #fff; }
.nav-link:not(.active) .nav-icon { color: var(--text3); }
.nav-link:hover:not(.active) .nav-icon { color: var(--text2); }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.sidebar-user {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.user-avatar-sm {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-meta .name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta .role { font-size: 11.5px; color: var(--text3); }
.sidebar-user a.logout-btn {
  color: var(--text3);
  font-size: 14px;
  padding: 6px;
  border-radius: 6px;
  transition: all .15s;
}
.sidebar-user a.logout-btn:hover { color: var(--danger); background: #FEF2F2; }

/* ─── MAIN WRAPPER ─────────────────────────────────────────── */
#main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .28s;
}

/* ─── TOPBAR ───────────────────────────────────────────────── */
#topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.topbar-toggle {
  display: none;
  background: none; border: none;
  color: var(--text2); font-size: 18px;
  width: 36px; height: 36px;
  border-radius: var(--radius);
  align-items: center; justify-content: center;
}
.topbar-toggle:hover { background: var(--surface3); }
.topbar-crumb {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text3);
}
.topbar-crumb strong { color: var(--text); font-weight: 600; }
.topbar-crumb .sep { color: var(--border2); }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-school {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
  padding: 5px 12px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

/* ─── PAGE CONTENT ─────────────────────────────────────────── */
#page-content {
  flex: 1;
  padding: 28px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ─── MODULE HERO ──────────────────────────────────────────── */
.module-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 24px;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 140px;
}
.module-hero__body { position: relative; z-index: 2; }
.module-hero__title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 5px;
  letter-spacing: -.3px;
}
.module-hero__sub {
  font-size: 13.5px;
  color: rgba(255,255,255,.8);
}
.module-hero__art {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 240px;
  opacity: .25;
  display: flex;
  align-items: center;
  justify-content: center;
}
.module-hero__art svg { width: 100%; height: 100%; }
.module-hero__actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Hero color variants */
.hero-students   { background: linear-gradient(135deg, #3D5AF1 0%, #7C3AED 100%); }
.hero-staff      { background: linear-gradient(135deg, #0891B2 0%, #3D5AF1 100%); }
.hero-admissions { background: linear-gradient(135deg, #059669 0%, #0891B2 100%); }
.hero-attendance { background: linear-gradient(135deg, #D97706 0%, #EA580C 100%); }
.hero-fees       { background: linear-gradient(135deg, #059669 0%, #0D9488 100%); }
.hero-exams      { background: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%); }
.hero-library    { background: linear-gradient(135deg, #EA580C 0%, #D97706 100%); }
.hero-payroll    { background: linear-gradient(135deg, #0D9488 0%, #059669 100%); }
.hero-accounts   { background: linear-gradient(135deg, #3D5AF1 0%, #0891B2 100%); }
.hero-timetable  { background: linear-gradient(135deg, #DB2777 0%, #7C3AED 100%); }
.hero-transport  { background: linear-gradient(135deg, #EA580C 0%, #DC2626 100%); }
.hero-notices    { background: linear-gradient(135deg, #D97706 0%, #EA580C 100%); }
.hero-messages   { background: linear-gradient(135deg, #3D5AF1 0%, #DB2777 100%); }
.hero-inventory  { background: linear-gradient(135deg, #4B5563 0%, #374151 100%); }
.hero-reports    { background: linear-gradient(135deg, #0891B2 0%, #059669 100%); }
.hero-settings   { background: linear-gradient(135deg, #374151 0%, #4B5563 100%); }
.hero-users      { background: linear-gradient(135deg, #3D5AF1 0%, #7C3AED 100%); }
.hero-roles      { background: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%); }
.hero-dashboard  { background: linear-gradient(135deg, #3D5AF1 0%, #0891B2 100%); }

/* ─── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .card-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ─── STAT CARDS ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card__top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.stat-card__change {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
}
.stat-card__change.up { background: #D1FAE5; color: #065F46; }
.stat-card__change.dn { background: #FEE2E2; color: #991B1B; }
.stat-card__value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--text);
}
.stat-card__label { font-size: 13px; color: var(--text2); font-weight: 500; }

/* icon colors */
.ic-blue   { background: #EFF6FF; color: #2563EB; }
.ic-violet { background: #F5F3FF; color: #7C3AED; }
.ic-green  { background: #ECFDF5; color: #059669; }
.ic-amber  { background: #FFFBEB; color: #D97706; }
.ic-red    { background: #FEF2F2; color: #DC2626; }
.ic-cyan   { background: #ECFEFF; color: #0891B2; }
.ic-pink   { background: #FDF2F8; color: #DB2777; }
.ic-orange { background: #FFF7ED; color: #EA580C; }
.ic-gray   { background: #F9FAFB; color: #6B7280; }
.ic-teal   { background: #F0FDFA; color: #0D9488; }

/* ─── TABLES ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table thead th {
  background: var(--surface2);
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: var(--surface2); }
.data-table .muted { color: var(--text3); font-size: 12px; margin-top: 2px; }
.data-table code {
  background: var(--surface3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--primary);
}

/* ─── BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}
.badge-blue   { background: #DBEAFE; color: #1E40AF; }
.badge-green  { background: #D1FAE5; color: #065F46; }
.badge-yellow { background: #FEF3C7; color: #92400E; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-violet { background: #EDE9FE; color: #5B21B6; }
.badge-gray   { background: #F3F4F6; color: #374151; }
.badge-cyan   { background: #CFFAFE; color: #164E63; }
.badge-pink   { background: #FCE7F3; color: #9D174D; }
.badge-orange { background: #FFEDD5; color: #9A3412; }
.badge-teal   { background: #CCFBF1; color: #134E4A; }

/* ─── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid transparent;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); color: #fff; }

.btn-secondary { background: var(--surface); color: var(--text2); border-color: var(--border2); }
.btn-secondary:hover { background: var(--surface3); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface3); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #B91C1C; color: #fff; }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-white {
  background: rgba(255,255,255,.2);
  color: #fff;
  border-color: rgba(255,255,255,.3);
  backdrop-filter: blur(4px);
}
.btn-white:hover { background: rgba(255,255,255,.3); color: #fff; }

.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  transition: all .15s;
}
.btn-icon:hover { background: var(--surface3); color: var(--text); }
.btn-icon.icon-blue   { color: #2563EB; } .btn-icon.icon-blue:hover   { background: #EFF6FF; border-color: #BFDBFE; }
.btn-icon.icon-green  { color: #059669; } .btn-icon.icon-green:hover  { background: #ECFDF5; border-color: #A7F3D0; }
.btn-icon.icon-red    { color: #DC2626; } .btn-icon.icon-red:hover    { background: #FEF2F2; border-color: #FECACA; }
.btn-icon.icon-violet { color: #7C3AED; } .btn-icon.icon-violet:hover { background: #F5F3FF; border-color: #DDD6FE; }
.btn-icon.icon-amber  { color: #D97706; } .btn-icon.icon-amber:hover  { background: #FFFBEB; border-color: #FDE68A; }

/* ─── FORMS ────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid .full  { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.form-control {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 9px 13px;
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--text);
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61,90,241,.12);
}
.form-control::placeholder { color: var(--text3); }
.form-control:disabled { background: var(--surface3); cursor: not-allowed; opacity: .7; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ─── FILTER BAR ───────────────────────────────────────────── */
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.filter-row .form-control { max-width: 240px; }
.filter-row select.form-control { max-width: 180px; }

/* ─── ALERTS ───────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13.5px;
  border: 1px solid;
}
.alert i { font-size: 15px; margin-top: 1px; flex-shrink: 0; }
.alert-success { background: #F0FDF4; border-color: #BBF7D0; color: #14532D; }
.alert-error   { background: #FEF2F2; border-color: #FECACA; color: #7F1D1D; }
.alert-warning { background: #FFFBEB; border-color: #FDE68A; color: #78350F; }
.alert-info    { background: #EFF6FF; border-color: #BFDBFE; color: #1E3A8A; }

/* ─── MODALS ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.5);
  backdrop-filter: blur(3px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(.96) translateY(8px);
  transition: transform .22s;
}
.modal-backdrop.open .modal { transform: scale(1) translateY(0); }
.modal.modal-lg { max-width: 780px; }
.modal.modal-sm { max-width: 420px; }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  color: var(--text3); font-size: 18px;
  transition: all .15s;
}
.modal-close:hover { background: var(--surface3); color: var(--text); }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ─── TABS ─────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.tab-btn:hover { color: var(--text2); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── MISC UTILITIES ───────────────────────────────────────── */
.fw-600  { font-weight: 600; }
.fw-700  { font-weight: 700; }
.fw-800  { font-weight: 800; }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.text-muted { color: var(--text2); }
.text-light { color: var(--text3); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.d-inline { display: inline; }
.d-flex   { display: flex; align-items: center; gap: 8px; }
.gap-8 { gap: 8px; }
.mb-0 { margin-bottom: 0; }
.py-5 { padding: 48px 0; }

.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}
.empty-state .es-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}
.empty-state h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; color: var(--text2); }

/* ─── LOGIN PAGE ───────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #EEF0FD 0%, #F0F9FF 50%, #FDF4FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
}
.login-logo-text { font-size: 24px; font-weight: 800; }
.login-logo-text span { color: var(--primary); }

/* ─── ATTENDANCE RADIOS ─────────────────────────────────────── */
.att-radio { display: none; }
.att-dot {
  display: inline-block;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  background: var(--surface2);
  cursor: pointer;
  transition: all .15s;
}
.att-dot:hover { transform: scale(1.1); }
.att-dot.active-P { background: #059669; border-color: #059669; }
.att-dot.active-A { background: #DC2626; border-color: #DC2626; }
.att-dot.active-L { background: #D97706; border-color: #D97706; }
.att-dot.active-H { background: #7C3AED; border-color: #7C3AED; }

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  #main-wrap { margin-left: 0; }
  .topbar-toggle { display: flex; }
  #page-content { padding: 20px 16px; }
  .module-hero { padding: 20px 24px; min-height: 120px; }
  .module-hero__title { font-size: 22px; }
  .module-hero__art { display: none; }
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr; }
  .filter-row { padding: 10px 14px; }
  .filter-row .form-control { max-width: 100%; }
  .modal { max-width: 100%; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ─── DATATABLE OVERRIDES ──────────────────────────────────── */
div.dataTables_wrapper { font-family: var(--font); font-size: 13.5px; }
div.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 7px 12px;
  font-family: var(--font);
  font-size: 13px;
  outline: none;
}
div.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(61,90,241,.1); }
div.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 6px 8px;
  font-family: var(--font);
}
div.dataTables_paginate .paginate_button {
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
  color: var(--text2) !important;
  margin: 0 2px !important;
  padding: 5px 11px !important;
}
div.dataTables_paginate .paginate_button.current,
div.dataTables_paginate .paginate_button.current:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
div.dataTables_paginate .paginate_button:hover:not(.current) { background: var(--surface3) !important; }
div.dataTables_info { color: var(--text3); font-size: 12.5px; }


/* ═══════════════════════════════════════════════════════
   Z-INDEX SYSTEM — Clear hierarchy, sidebar always usable
   ═══════════════════════════════════════════════════════
   1  — normal content
   100 — topbar
   200 — dropdowns, tooltips
   300 — sidebar (always visible + clickable)
   400 — mobile sidebar overlay
   500 — our custom form modals
   9999 — session warning (top priority)
*/
#topbar              { z-index: 100 !important; }
#sidebar             { z-index: 300 !important; }
#sidebarOverlay      { z-index: 400 !important; }
.modal-backdrop      { z-index: 500 !important; }
#sessionWarning      { z-index: 9999 !important; }

/* Sidebar links must always be clickable — explicit */
#sidebar *           { pointer-events: auto !important; }
#sidebar .nav-link   { cursor: pointer !important; }
#sidebar a           { cursor: pointer !important; }

/* ── Sidebar Open state (mobile) ─────────────────────── */
@media (max-width: 1024px) {
  #sidebar-toggle { display: flex !important; }
}

/* ── Mobile Sidebar Overlay ──────────────────────────── */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
}

/* ── Main wrap — ensure it NEVER covers sidebar ─────── */
#main-wrap {
  position: relative;
  z-index: 1 !important;
}

/* ── Topbar sits above content, below sidebar ────────── */
#topbar {
  position: sticky;
  top: 0;
}

/* ── No body overflow issue (was Bootstrap adding this) ─ */
body { overflow-x: hidden !important; }

/* ── DataTables match our theme ─────────────────────── */
div.dataTables_wrapper div.dataTables_filter input,
div.dataTables_wrapper div.dataTables_length select {
  font-family: var(--font) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius) !important;
  padding: 6px 10px !important;
  color: var(--text) !important;
  background: var(--surface) !important;
  outline: none !important;
}
div.dataTables_wrapper div.dataTables_filter input:focus,
div.dataTables_wrapper div.dataTables_length select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(61,90,241,.1) !important;
}
div.dataTables_wrapper div.dataTables_info { color: var(--text3) !important; font-size: 12.5px !important; }
div.dataTables_paginate .paginate_button {
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
  color: var(--text2) !important;
  margin: 0 2px !important;
  padding: 5px 11px !important;
}
div.dataTables_paginate .paginate_button.current,
div.dataTables_paginate .paginate_button.current:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
div.dataTables_paginate .paginate_button:hover:not(.current) {
  background: var(--surface3) !important;
  color: var(--text) !important;
}

/* ── Form control native styling ─────────────────────── */
.form-control, select.form-control {
  -webkit-appearance: none !important;
  appearance: none !important;
}
select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%234B5563' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 14px !important;
  padding-right: 32px !important;
}

/* ── Mobile responsive tweaks ────────────────────────── */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .form-grid  { grid-template-columns: 1fr !important; }
  .form-grid.cols-3 { grid-template-columns: 1fr !important; }
  #page-content { padding: 16px !important; }
  .module-hero { padding: 20px !important; min-height: 110px !important; }
  .module-hero__art { display: none !important; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr !important; }
}
