/* ============================================================
   assets/css/admin.css
   আন্‌ নাজাহ মাদরাসা — Admin Panel Styles
   Font: Hind Siliguri (Heading) + Noto Sans Bengali (Body)
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&family=Noto+Sans+Bengali:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Brand Colors */
  --primary:        #1a6b3a;   /* গাঢ় সবুজ — ইসলামিক */
  --primary-light:  #2e8b57;
  --primary-dark:   #0f4024;
  --primary-10:     rgba(26,107,58,.10);
  --primary-20:     rgba(26,107,58,.20);

  --accent:         #d4a017;   /* সোনালি */
  --accent-light:   #f0c040;
  --accent-dark:    #a07800;

  --danger:         #dc2626;
  --danger-light:   #fef2f2;
  --warning:        #f59e0b;
  --warning-light:  #fffbeb;
  --success:        #16a34a;
  --success-light:  #f0fdf4;
  --info:           #0284c7;
  --info-light:     #f0f9ff;

  /* Neutrals */
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;

  /* Sidebar */
  --sidebar-bg:     #0f2d1a;
  --sidebar-width:  260px;
  --sidebar-text:   rgba(255,255,255,.80);
  --sidebar-hover:  rgba(255,255,255,.10);
  --sidebar-active: rgba(212,160,23,.18);

  /* Layout */
  --topbar-h:       64px;
  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      16px;
  --shadow:         0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:      0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:      0 10px 15px rgba(0,0,0,.10), 0 4px 6px rgba(0,0,0,.05);

  /* Typography */
  --font-heading:   'Hind Siliguri', sans-serif;
  --font-body:      'Noto Sans Bengali', sans-serif;
  --font-size-base: 15px;
  --line-height:    1.6;

  /* Transitions */
  --transition:     all .2s ease;
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: var(--line-height);
  min-height: 100vh;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--gray-900);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

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

/* ── Layout Wrapper ───────────────────────────────────────── */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700; font-size: 16px;
  color: var(--sidebar-bg);
  flex-shrink: 0;
}
.sidebar-logo-text { flex: 1; overflow: hidden; }
.sidebar-logo-text .name {
  font-family: var(--font-heading);
  font-size: 12px; font-weight: 600;
  color: #fff; line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-logo-text .sub {
  font-size: 10px; color: var(--accent-light);
  margin-top: 2px;
}

/* Nav Sections */
.nav-section { padding: 8px 0; }
.nav-section-title {
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 8px 20px 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  font-size: 13.5px; font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
  position: relative;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: rgba(255,255,255,.3);
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--accent-light);
  border-left-color: var(--accent);
  font-weight: 500;
}
.nav-item .nav-icon {
  font-size: 17px;
  width: 22px; text-align: center; flex-shrink: 0;
  opacity: .75;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
}

/* Sidebar bottom */
.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.sidebar-user-info .user-name {
  font-size: 13px; font-weight: 500; color: #fff; line-height: 1.2;
}
.sidebar-user-info .user-role {
  font-size: 11px; color: rgba(255,255,255,.5);
}
.sidebar-user-logout {
  margin-left: auto;
  color: rgba(255,255,255,.5);
  font-size: 16px; cursor: pointer;
  transition: var(--transition);
}
.sidebar-user-logout:hover { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-toggle {
  display: none;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  color: var(--gray-600); font-size: 20px;
  border-radius: var(--radius-sm);
}
.topbar-toggle:hover { background: var(--gray-100); }

.topbar-breadcrumb {
  flex: 1;
  font-size: 13px; color: var(--gray-500);
}
.topbar-breadcrumb strong { color: var(--gray-900); font-weight: 600; }

.topbar-actions {
  display: flex; align-items: center; gap: 8px;
}
.topbar-btn {
  width: 36px; height: 36px;
  background: none; border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 16px; color: var(--gray-600);
  position: relative; transition: var(--transition);
}
.topbar-btn:hover { background: var(--gray-100); border-color: var(--gray-300); }
.topbar-btn .notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); border: 2px solid #fff;
}

.topbar-date {
  font-size: 13px; color: var(--gray-500);
  padding: 6px 12px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
}

/* ── Page Content ─────────────────────────────────────────── */
.page-content {
  padding: 24px;
  flex: 1;
}

.page-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 700;
  color: var(--gray-900);
}
.page-subtitle {
  font-size: 13px; color: var(--gray-500);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.card-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 600; color: var(--gray-900);
}
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Stat Cards ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 16px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: default;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }
.stat-icon.teal   { background: #ccfbf1; color: #0d9488; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }

.stat-info { flex: 1; min-width: 0; }
.stat-label {
  font-size: 12px; color: var(--gray-500); font-weight: 500;
  text-transform: uppercase; letter-spacing: .5px;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: 28px; font-weight: 700;
  color: var(--gray-900); line-height: 1.1;
  margin: 2px 0;
}
.stat-sub {
  font-size: 12px; color: var(--gray-400);
}
.stat-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 500;
}
.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD SPECIFIC
═══════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.dashboard-grid.thirds {
  grid-template-columns: 1fr 1fr 1fr;
}
.col-span-2 { grid-column: span 2; }

/* Attendance Ring */
.attendance-ring-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 16px 0;
}
.attendance-legend {
  display: flex; flex-direction: column; gap: 10px;
  padding: 0 20px;
}
.legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
}
.legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
}

/* Finance Bar */
.finance-bars { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
.finance-bar-item {}
.finance-bar-label {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 5px;
}
.finance-bar-label span:first-child { color: var(--gray-700); }
.finance-bar-label span:last-child  { font-weight: 600; color: var(--gray-900); }
.finance-bar-track {
  height: 8px; background: var(--gray-100);
  border-radius: 20px; overflow: hidden;
}
.finance-bar-fill {
  height: 100%; border-radius: 20px;
  transition: width .6s ease;
}
.finance-bar-fill.income  { background: var(--success); }
.finance-bar-fill.expense { background: var(--danger); }
.finance-bar-fill.due     { background: var(--warning); }

/* Live Teacher Cards */
.live-teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.live-teacher-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex; align-items: center; gap: 10px;
  transition: var(--transition);
}
.live-teacher-card:hover { border-color: var(--primary-light); background: var(--primary-10); }
.live-teacher-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
}
.live-teacher-name { font-size: 13px; font-weight: 500; color: var(--gray-800); }
.live-teacher-time { font-size: 11px; color: var(--gray-400); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
  margin-left: auto; flex-shrink: 0;
}

/* Recent Dues Table */
.due-list { font-size: 13px; }
.due-item {
  display: flex; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  gap: 10px;
}
.due-item:last-child { border-bottom: none; }
.due-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-10);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; color: var(--primary);
  flex-shrink: 0;
}
.due-info { flex: 1; min-width: 0; }
.due-name { font-weight: 500; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.due-class { font-size: 11px; color: var(--gray-400); }
.due-amount { font-weight: 600; color: var(--danger); font-family: var(--font-heading); }

/* Quick Action Buttons */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 12px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
  text-decoration: none;
  color: var(--gray-700);
  font-size: 12px; font-weight: 500;
  text-align: center;
}
.quick-action-btn:hover {
  border-color: var(--primary);
  background: var(--primary-10);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.quick-action-icon {
  font-size: 24px;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent  { background: var(--accent); color: var(--gray-900); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-10); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-icon { padding: 8px; }

/* ═══════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 5px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px; color: var(--gray-800);
  background: #fff;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-10);
}
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11.5px; color: var(--gray-400); margin-top: 4px; }
.form-error { font-size: 11.5px; color: var(--danger); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  background: var(--gray-50);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr:last-child td { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════
   BADGES & STATUS
═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-danger  { background: #fee2e2; color: #dc2626; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-gray    { background: var(--gray-100); color: var(--gray-600); }
.badge-primary { background: var(--primary-10); color: var(--primary); }

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 340px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid;
  animation: slideIn .3s ease;
  position: relative;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast.info    { border-color: var(--info); }
.toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info    .toast-icon { color: var(--info); }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 13.5px; color: var(--gray-900); }
.toast-msg   { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }
.toast-close {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 14px;
  transition: var(--transition);
}
.toast-close:hover { color: var(--gray-700); }

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease;
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
}
.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
}
.modal-title { font-family: var(--font-heading); font-size: 17px; font-weight: 600; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--gray-400);
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 22px; }
.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--gray-200);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ═══════════════════════════════════════════════════════════
   OFFLINE INDICATOR
═══════════════════════════════════════════════════════════ */
.offline-bar {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--warning);
  color: var(--gray-900);
  text-align: center;
  padding: 8px;
  font-size: 13px; font-weight: 500;
  z-index: 9998;
  display: none;
}
.offline-bar.show { display: block; }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════ */
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(22,163,74,.4); }
  50%      { box-shadow: 0 0 0 5px rgba(22,163,74,0); }
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   PRINT CSS
═══════════════════════════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .topbar-actions,
  .quick-actions, .toast-container,
  .offline-bar, .btn, .nav-item { display: none !important; }

  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }

  body { background: #fff; font-size: 12px; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .stat-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }

  h1,h2,h3 { font-family: var(--font-heading); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid.thirds { grid-template-columns: 1fr 1fr; }
  .col-span-2 { grid-column: span 1; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
    display: none;
  }
  .sidebar-overlay.show { display: block; }

  .main-content { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .topbar-date   { display: none; }

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

  .page-content { padding: 16px; }
  .page-header  { flex-direction: column; align-items: flex-start; }
  .page-title   { font-size: 18px; }

  .live-teachers-grid { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }

  .toast-container { bottom: 16px; right: 16px; left: 16px; max-width: none; }
  .modal { max-width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .live-teachers-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

/* ── Utility ──────────────────────────────────────────────── */
.hidden  { display: none !important; }
.flex    { display: flex; }
.items-center { align-items: center; }
.gap-2   { gap: 8px; }
.gap-3   { gap: 12px; }
.mt-1    { margin-top: 4px; }
.mt-2    { margin-top: 8px; }
.mt-4    { margin-top: 16px; }
.mb-4    { margin-bottom: 16px; }
.text-sm { font-size: 12.5px; }
.text-muted { color: var(--gray-500); }
.text-right { text-align: right; }
.font-bold  { font-weight: 700; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
