/* ============================================================
   HOQ EDU — School Management System
   Design System — app.css
   Palette: Deep Navy + Sky Blue + Gold
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand */
  --primary:        #2563eb;
  --primary-dark:   #1d4ed8;
  --primary-light:  #dbeafe;
  --accent:         #f59e0b;
  --accent-dark:    #d97706;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #06b6d4;
  --orange:         #f97316;

  /* Neutrals */
  --bg:             #0f172a;
  --bg-2:           #1e293b;
  --bg-3:           #334155;
  --border:         #334155;
  --border-light:   #475569;
  --text:           #f1f5f9;
  --text-muted:     #94a3b8;
  --text-dim:       #64748b;

  /* Surface */
  --card:           #1e293b;
  --card-hover:     #243447;
  --sidebar-w:      260px;

  /* Transitions */
  --transition:     0.2s ease;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow:         0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.3);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: #60a5fa; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

/* ── Layout ────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.brand-text { line-height: 1.2; }
.brand-text .brand-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.brand-text .brand-sub  { font-size: 0.7rem; color: var(--text-muted); }

.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-group { margin-bottom: 6px; }
.nav-group-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 12px 10px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.nav-link:hover {
  background: var(--bg-3);
  color: var(--text);
}
.nav-link.active {
  background: linear-gradient(135deg, rgba(37,99,235,0.2) 0%, rgba(245,158,11,0.1) 100%);
  color: #60a5fa;
  border-left: 3px solid var(--primary);
  padding-left: 9px;
}
.nav-link .nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name { font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: 0.7rem; color: var(--text-muted); text-transform: capitalize; }
.sidebar-user .logout-btn {
  color: var(--text-dim);
  font-size: 1rem;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition);
}
.sidebar-user .logout-btn:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

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

.topbar {
  height: 64px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title h1 { font-size: 1.1rem; font-weight: 700; }
.topbar-title p  { font-size: 0.75rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }

.topbar-btn {
  position: relative;
  width: 36px; height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.topbar-btn:hover { background: var(--border-light); color: var(--text); }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
}

.page-content { padding: 28px; flex: 1; }

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-header-left h2 { font-size: 1.4rem; font-weight: 700; }
.page-header-left p  { color: var(--text-muted); font-size: 0.875rem; margin-top: 2px; }
.page-header-right   { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── KPI Cards ─────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--kpi-color, var(--primary));
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--kpi-color, var(--primary)); }

.kpi-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--kpi-color, var(--primary));
  opacity: 0.15;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.kpi-icon-inner {
  position: absolute;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.kpi-icon-wrap {
  position: relative;
  width: 52px; height: 52px;
  flex-shrink: 0;
}
.kpi-icon-wrap .icon-bg {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--kpi-color, var(--primary));
  opacity: 0.15;
}
.kpi-icon-wrap .icon-symbol {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.kpi-info { flex: 1; }
.kpi-info .kpi-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-info .kpi-value { font-size: 2rem; font-weight: 800; line-height: 1.1; margin: 4px 0; }
.kpi-info .kpi-sub   { font-size: 0.75rem; color: var(--text-muted); }
.kpi-info .kpi-trend { font-size: 0.75rem; font-weight: 600; }
.kpi-trend.up   { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.card-title { font-size: 1rem; font-weight: 700; }
.card-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.card-body { }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Table ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--bg-3);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}
tbody tr {
  border-top: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody td {
  padding: 13px 16px;
  font-size: 0.875rem;
  vertical-align: middle;
}
.td-actions { display: flex; gap: 6px; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--primary);   color: #fff; }
.btn-primary:hover   { background: var(--primary-dark); color: #fff; }
.btn-accent    { background: var(--accent);    color: #fff; }
.btn-accent:hover    { background: var(--accent-dark);  color: #fff; }
.btn-success   { background: var(--success);   color: #fff; }
.btn-danger    { background: var(--danger);    color: #fff; }
.btn-ghost     { background: var(--bg-3);      color: var(--text); border: 1px solid var(--border-light); }
.btn-ghost:hover     { background: var(--border);       color: var(--text); }
.btn-outline   { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover   { background: var(--primary); color: #fff; }

.btn-sm  { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs  { padding: 4px 8px;  font-size: 0.75rem; border-radius: 6px; }
.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success   { background: rgba(16,185,129,0.15);  color: #34d399; }
.badge-danger    { background: rgba(239,68,68,0.15);   color: #f87171; }
.badge-warning   { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.badge-info      { background: rgba(6,182,212,0.15);   color: #22d3ee; }
.badge-primary   { background: rgba(37,99,235,0.15);   color: #60a5fa; }
.badge-secondary { background: rgba(100,116,139,0.15); color: #94a3b8; }
.badge-orange    { background: rgba(249,115,22,0.15);  color: #fb923c; }

/* ── Avatar ─────────────────────────────────────────────────── */
.avatar-initials {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group   { margin-bottom: 20px; }
.form-label   { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.form-control::placeholder { color: var(--text-dim); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Search Bar ───────────────────────────────────────────── */
.search-bar {
  position: relative;
}
.search-bar .search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.9rem;
  pointer-events: none;
}
.search-bar input {
  padding-left: 36px;
}

/* ── Filters Bar ──────────────────────────────────────────── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-group { display: flex; gap: 8px; align-items: center; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.pager-info { font-size: 0.8rem; color: var(--text-muted); }
.pager-links { display: flex; gap: 4px; }
.pager-links a, .pager-links span {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}
.pager-links a { background: var(--bg-3); color: var(--text); }
.pager-links a:hover { background: var(--primary); color: #fff; }
.pager-links .active { background: var(--primary); color: #fff; }
.pager-links .disabled { background: none; color: var(--text-dim); cursor: default; }

/* ── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: slideUp 0.25s ease;
}
.modal-lg  { max-width: 700px; }
.modal-xl  { max-width: 900px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 4px; border-radius: 4px; transition: color var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  min-width: 280px;
  max-width: 380px;
  animation: toastIn 0.3s ease;
}
.toast-success { border-left: 4px solid var(--success);  }
.toast-error   { border-left: 4px solid var(--danger);   }
.toast-warning { border-left: 4px solid var(--warning);  }
.toast-info    { border-left: 4px solid var(--info);     }
.toast-icon    { font-size: 1rem; flex-shrink: 0; }
.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-msg     { flex: 1; font-size: 0.875rem; }
.toast-close   { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1rem; padding: 2px; }
.toast-close:hover { color: var(--text); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Info Row / Detail Page ────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-item { }
.detail-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.detail-value { font-size: 0.9rem; color: var(--text); }

/* ── Profile Header ────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.profile-header .profile-info h2 { font-size: 1.4rem; font-weight: 700; }
.profile-header .profile-info p { color: var(--text-muted); font-size: 0.875rem; }
.profile-header .profile-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.profile-meta-item { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-title { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-text  { font-size: 0.875rem; color: var(--text-muted); }

/* ── Level Color Dots ──────────────────────────────────────── */
.level-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Timetable Grid ────────────────────────────────────────── */
.timetable-grid {
  display: grid;
  grid-template-columns: 80px repeat(6, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.timetable-header {
  background: var(--bg-3);
  padding: 12px 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.timetable-cell {
  background: var(--card);
  padding: 8px;
  min-height: 60px;
}
.timetable-slot {
  background: rgba(37,99,235,0.15);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 0.75rem;
  margin-bottom: 4px;
}
.timetable-slot .slot-subject { font-weight: 600; color: var(--text); }
.timetable-slot .slot-teacher { color: var(--text-muted); font-size: 0.7rem; }
.timetable-slot .slot-time    { color: var(--primary); font-size: 0.68rem; }

/* ── Grade Entry Table ─────────────────────────────────────── */
.grade-table td input.marks-input {
  width: 90px;
  padding: 6px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.875rem;
}
.grade-preview { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); margin-top: 2px; }

/* ── Report Card ───────────────────────────────────────────── */
.report-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.report-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px;
  border-bottom: 3px solid var(--primary);
  background: linear-gradient(135deg, rgba(37,99,235,0.1) 0%, rgba(245,158,11,0.05) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.report-school-info h2 { font-size: 1.3rem; font-weight: 800; }
.report-school-info p  { color: var(--text-muted); font-size: 0.8rem; }
.report-card-title {
  text-align: right;
  margin-left: auto;
}
.report-card-title h3 { font-size: 1rem; font-weight: 700; color: var(--primary); }
.report-card-title p  { font-size: 0.78rem; color: var(--text-muted); }
.report-student-info { padding: 20px 28px; border-bottom: 1px solid var(--border); display: flex; gap: 32px; flex-wrap: wrap; }
.report-body { padding: 28px; }
.gpa-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  line-height: 1.1;
}
.gpa-value { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.gpa-label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; }

/* ── Attendance Pill ────────────────────────────────────────── */
.attendance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}
.pill-present { background: rgba(16,185,129,0.15);  color: #34d399; }
.pill-absent  { background: rgba(239,68,68,0.15);   color: #f87171; }
.pill-late    { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.pill-excused { background: rgba(6,182,212,0.15);   color: #22d3ee; }

/* ── Dashboard Charts Placeholder ──────────────────────────── */
.chart-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 0 4px;
}
.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  transition: height 0.5s ease;
}
.chart-bar-label { font-size: 0.65rem; color: var(--text-muted); }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-info    { background: rgba(6,182,212,0.1);  border-left: 4px solid var(--info);    color: #cffafe; }
.alert-success { background: rgba(16,185,129,0.1); border-left: 4px solid var(--success); color: #d1fae5; }
.alert-warning { background: rgba(245,158,11,0.1); border-left: 4px solid var(--warning); color: #fef3c7; }
.alert-danger  { background: rgba(239,68,68,0.1);  border-left: 4px solid var(--danger);  color: #fee2e2; }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs         { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-link {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.tab-link:hover { color: var(--text); }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Utility ────────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 0.8rem; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-4        { margin-top: 4px; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mt-24       { margin-top: 24px; }
.mb-16       { margin-bottom: 16px; }
.mb-24       { margin-bottom: 24px; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }
.w-full      { width: 100%; }
.hidden      { display: none; }
.divider     { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  body { background: white; color: #000; }
  .card, .report-card { border: 1px solid #ccc; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .grid-4, .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}
