/* ============================================================
   doublesixOS — dashboard.css
   Shared styles for all inner dashboard pages
   ============================================================ */

/* ── App Shell Layout ── */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-base);
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transition: transform var(--transition-base), width var(--transition-base);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.sidebar-logo-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.sidebar-logo-name span { color: var(--brand-primary); }

.sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover { background: var(--bg-surface-2); color: var(--text-primary); }

/* Institution info strip */
.sidebar-inst {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.sidebar-inst-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-inst-type {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.sidebar-inst-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--brand-success);
  background: rgba(16,185,129,0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-top: 0.375rem;
}

/* Nav sections */
.sidebar-nav {
  flex: 1;
  padding: 0.875rem 0.75rem;
  overflow-y: auto;
}

.sidebar-nav-section { margin-bottom: 1.5rem; }

.sidebar-nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-placeholder);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0.625rem;
  margin-bottom: 0.375rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
  margin-bottom: 0.125rem;
  white-space: nowrap;
}

.sidebar-nav-item:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: rgba(var(--brand-primary-rgb), 0.1);
  color: var(--brand-primary);
  font-weight: 600;
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--brand-primary);
  border-radius: 0 2px 2px 0;
}

.sidebar-nav-icon {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.sidebar-nav-badge {
  margin-left: auto;
  background: var(--brand-danger);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user:hover { background: var(--bg-surface-2); }

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), #4F80FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; flex: 1; }

.sidebar-user-name {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left var(--transition-base);
}

/* ── Top Bar ── */
.topbar {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left { display: flex; align-items: center; gap: 1rem; }

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.topbar-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topbar-right { display: flex; align-items: center; gap: 0.625rem; }

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
}

.topbar-btn:hover {
  color: var(--brand-primary);
  border-color: var(--border-medium);
  background: var(--bg-surface-2);
}

.topbar-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--brand-danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg-surface);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  transition: all var(--transition-fast);
}

.topbar-search:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb),0.1);
}

.topbar-search input {
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  width: 180px;
}

.topbar-search input::placeholder { color: var(--text-placeholder); }

/* ── Page Content ── */
.page-content {
  padding: 1.75rem;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.page-header-info {}

.page-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.page-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.375rem 1.5rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-card-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-icon.blue   { background: rgba(27,79,216,0.1);  color: var(--brand-primary); }
.stat-icon.green  { background: rgba(16,185,129,0.1); color: var(--brand-success); }
.stat-icon.amber  { background: rgba(245,158,11,0.1); color: var(--brand-accent); }
.stat-icon.purple { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.stat-icon.rose   { background: rgba(244,63,94,0.1);  color: #F43F5E; }
.stat-icon.teal   { background: rgba(14,165,233,0.1); color: #0EA5E9; }

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.stat-change.up   { background: rgba(16,185,129,0.1);  color: #059669; }
.stat-change.down { background: rgba(239,68,68,0.1);   color: #DC2626; }
.stat-change.flat { background: rgba(107,114,128,0.1); color: #6B7280; }

/* ── Dashboard Grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ── Widget Card ── */
.widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.widget-header {
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.widget-action {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-primary);
  transition: opacity var(--transition-fast);
  text-decoration: none;
}

.widget-action:hover { opacity: 0.7; }

.widget-body { padding: 1.375rem; }

/* ── Data Tables ── */
.data-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--bg-surface-2); }

.data-table .td-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Status badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.status-present  { background: rgba(16,185,129,0.1);  color: #059669; }
.status-absent   { background: rgba(239,68,68,0.1);   color: #DC2626; }
.status-late     { background: rgba(245,158,11,0.1);  color: #D97706; }
.status-paid     { background: rgba(16,185,129,0.1);  color: #059669; }
.status-pending  { background: rgba(239,68,68,0.1);   color: #DC2626; }
.status-partial  { background: rgba(245,158,11,0.1);  color: #D97706; }
.status-active   { background: rgba(27,79,216,0.1);   color: var(--brand-primary); }

/* ── Quick actions ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.quick-action-btn:hover {
  border-color: var(--brand-primary);
  background: rgba(var(--brand-primary-rgb),0.04);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.quick-action-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.quick-action-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── Activity Feed ── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.activity-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.activity-text strong { color: var(--text-primary); font-weight: 600; }
.activity-time { font-size: 0.72rem; color: var(--text-placeholder); white-space: nowrap; }

/* ── Empty states ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state-desc { font-size: 0.875rem; line-height: 1.7; margin-bottom: 1.5rem; }

/* ── Mobile overlay ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

/* ── Hamburger in topbar (mobile) ── */
.topbar-hamburger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.topbar-hamburger:hover { color: var(--brand-primary); background: var(--bg-surface-2); }

/* ── Chart containers ── */
.chart-container { position: relative; width: 100%; }

/* ── Attendance specific ── */
.att-class-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.att-class-btn {
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.att-class-btn.active, .att-class-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(var(--brand-primary-rgb),0.06);
}

.att-student-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-light);
  gap: 1rem;
  transition: background var(--transition-fast);
}

.att-student-row:last-child { border-bottom: none; }
.att-student-row:hover { background: var(--bg-surface-2); }

.att-student-info { display: flex; align-items: center; gap: 0.75rem; flex: 1; }

.att-student-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.att-student-name { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.att-student-roll { font-size: 0.72rem; color: var(--text-muted); }

.att-toggle {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.att-btn {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.att-btn-p { border-color: var(--border-light); color: var(--text-muted); }
.att-btn-a { border-color: var(--border-light); color: var(--text-muted); }
.att-btn-l { border-color: var(--border-light); color: var(--text-muted); }

.att-btn-p.selected { background: rgba(16,185,129,0.15);  border-color: #10B981; color: #059669; }
.att-btn-a.selected { background: rgba(239,68,68,0.15);   border-color: #EF4444; color: #DC2626; }
.att-btn-l.selected { background: rgba(245,158,11,0.15);  border-color: #F59E0B; color: #D97706; }

/* ── Student rows (student page) ── */
.student-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.96) translateY(8px);
  transition: transform var(--transition-base);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 1;
}

.modal-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-close:hover { background: var(--bg-surface-2); color: var(--text-primary); }

.modal-body { padding: 1.5rem 1.75rem; }

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ── Filter Bar & Search (shared across dashboard pages) ── */
.filter-bar {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-xl); padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}

.search-bar {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border-light); border-radius: var(--radius-full);
  padding: 0.45rem 1rem; background: var(--bg-base); flex: 1; min-width: 180px;
  transition: all var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb),0.1);
}

.search-bar input {
  border: none; background: none; font-family: var(--font-body);
  font-size: 0.875rem; color: var(--text-primary); outline: none; width: 100%;
}

.filter-select {
  padding: 0.5rem 0.875rem; border: 1px solid var(--border-light);
  border-radius: var(--radius-full); font-family: var(--font-body);
  font-size: 0.85rem; color: var(--text-secondary); background: var(--bg-base);
  cursor: pointer; outline: none; transition: all var(--transition-fast);
}

.filter-select:focus { border-color: var(--brand-primary); }

/* ── WhatsApp Action Button ── */
.row-btn-whatsapp { color: #25D366; background: rgba(37,211,102,0.08); }
.row-btn-whatsapp:hover { background: rgba(37,211,102,0.15); }

/* ── Receipt Styles ── */
.receipt { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 2rem; max-width: 420px; margin: 0 auto; }
.receipt-header { text-align: center; padding-bottom: 1rem; border-bottom: 2px dashed #e5e7eb; margin-bottom: 1rem; }
.receipt-logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--brand-primary); }
.receipt-sub { font-size: 0.8rem; color: #6b7280; margin-top: 0.25rem; }
.receipt-id { font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; }
.receipt-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 0.375rem 0; border-bottom: 1px solid var(--bg-surface-2); }
.receipt-row:last-child { border-bottom: none; }
.receipt-label { color: #6b7280; }
.receipt-val { font-weight: 600; }
.receipt-total { font-weight: 700; color: var(--text-primary); font-size: 1rem; padding-top: 0.5rem; }
.receipt-stamp { display: inline-block; border: 2px solid var(--brand-success); color: var(--brand-success); font-weight: 800; font-size: 1.1rem; padding: 0.375rem 1rem; border-radius: 6px; transform: rotate(-5deg); margin-top: 1rem; }
.receipt-stamp-partial { border-color: #F59E0B; color: #D97706; }

/* ── Expense Category Pills ── */
.expense-category-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700; }
.cat-salary    { background: rgba(139,92,246,0.1); color: #7C3AED; }
.cat-utility   { background: rgba(14,165,233,0.1); color: #0284C7; }
.cat-supplies  { background: rgba(245,158,11,0.1); color: #D97706; }
.cat-rent      { background: rgba(239,68,68,0.1);  color: #DC2626; }
.cat-transport { background: rgba(16,185,129,0.1); color: #059669; }
.cat-other     { background: rgba(107,114,128,0.1);color: #4B5563; }

/* ── P&L Values ── */
.pl-positive { color: var(--brand-success); font-family: var(--font-display); font-weight: 800; }
.pl-negative { color: var(--brand-danger);  font-family: var(--font-display); font-weight: 800; }

/* ── Fee Amount Colors ── */
.fee-amount { font-family: var(--font-display); font-weight: 700; }
.fee-amount-paid { color: var(--brand-success); }
.fee-amount-pending { color: var(--brand-danger); }
.fee-amount-partial { color: var(--brand-accent); }

/* ── Staff Card Grid ── */
.staff-card { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-xl); padding: 1.5rem; transition: all var(--transition-base); position: relative; overflow: hidden; }
.staff-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--border-medium); }
.staff-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.125rem; }
.staff-avatar-lg { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: white; flex-shrink: 0; }
.staff-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.staff-role { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.125rem; }
.staff-meta { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.125rem; }
.staff-meta-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-secondary); }
.staff-meta-item i { width: 14px; color: var(--text-muted); }
.staff-meta-item a { color: var(--brand-primary); font-weight: 500; }
.staff-meta-link { color: var(--brand-primary); font-weight: 500; }
.staff-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--border-light); }
.staff-salary { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--brand-success); }
.staff-salary-period { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); }
.staff-actions { display: flex; gap: 0.375rem; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

/* ── View Toggle ── */
.view-toggle { display: flex; background: var(--bg-surface-2); border: 1px solid var(--border-light); border-radius: var(--radius-full); padding: 0.25rem; gap: 0.25rem; }
.view-btn { padding: 0.375rem 0.75rem; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all var(--transition-fast); border: none; background: none; }
.view-btn.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-xs); }

/* ── Fee Tabs ── */
.fee-tabs { display: flex; background: var(--bg-surface-2); border: 1px solid var(--border-light); border-radius: var(--radius-full); padding: 0.25rem; gap: 0.25rem; margin-bottom: 1.5rem; width: fit-content; }
.fee-tab { padding: 0.5rem 1.25rem; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all var(--transition-fast); border: none; background: none; }
.fee-tab.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-xs); }

/* ── Form Fields (shared across dashboard pages) ── */
.form-group { margin-bottom: 1.125rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.5rem; }
.form-input {
  width: 100%; padding: 0.8rem 1rem; background: var(--bg-base);
  border: 1.5px solid var(--border-light); border-radius: var(--radius-lg);
  font-family: var(--font-body); font-size: 0.9375rem; color: var(--text-primary);
  transition: all var(--transition-fast); outline: none;
}
.form-input:focus { border-color: var(--brand-primary); background: var(--bg-surface); box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb),0.1); }
.form-input::placeholder { color: var(--text-placeholder); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Quick Action Icons ── */
.quick-action-icon-green   { background: rgba(16,185,129,0.1);  color: #10B981; }
.quick-action-icon-purple  { background: rgba(139,92,246,0.1);  color: #8B5CF6; }
.quick-action-icon-blue    { background: rgba(27,79,216,0.1);   color: var(--brand-primary); }
.quick-action-icon-amber   { background: rgba(245,158,11,0.1);  color: var(--brand-accent); }
.quick-action-icon-sky     { background: rgba(14,165,233,0.1);  color: #0EA5E9; }
.quick-action-icon-rose    { background: rgba(244,63,94,0.1);   color: #F43F5E; }

/* ── Attendance Legend ── */
.legend-list { display: flex; flex-direction: column; gap: 0.75rem; }
.legend-row  { display: flex; justify-content: space-between; align-items: center; }
.legend-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--text-secondary);
}
.legend-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.legend-dot-green  { background: #10B981; }
.legend-dot-red    { background: #EF4444; }
.legend-dot-amber  { background: #F59E0B; }
.legend-value { font-family: var(--font-display); font-weight: 700; }

/* ── Leave Request Actions ── */
.leave-action-btn {
  padding: 0.25rem 0.625rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 700; cursor: pointer;
  border: none; transition: all var(--transition-fast);
}
.leave-action-approve { background: rgba(16,185,129,0.1); color: #059669; }
.leave-action-approve:hover { background: rgba(16,185,129,0.2); }
.leave-action-deny    { background: rgba(239,68,68,0.1);  color: #DC2626; }
.leave-action-deny:hover    { background: rgba(239,68,68,0.2); }
.leave-result { font-size: 0.75rem; font-weight: 700; }
.leave-result-approved { color: #059669; }
.leave-result-denied   { color: #DC2626; }

/* ── Activity Dots ── */
.activity-dot-green  { background: #10B981; }
.activity-dot-blue   { background: var(--brand-primary); }
.activity-dot-purple { background: #8B5CF6; }
.activity-dot-rose   { background: #F43F5E; }
.activity-dot-amber  { background: var(--brand-accent); }
.activity-dot-warn   { background: #F59E0B; }

/* ── Sign Out Button ── */
.sidebar-signout-btn {
  color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  transition: color var(--transition-fast); padding: 0.25rem;
}
.sidebar-signout-btn:hover { color: var(--brand-danger); }

/* ── Sidebar Badge Dot ── */
.sidebar-badge-dot { font-size: 0.5rem; }

/* ── Utility: activity sub text ── */
.activity-sub { font-size: 0.72rem; color: var(--text-muted); }
.activity-flex { flex: 1; }
.leave-actions { display: flex; gap: 0.375rem; flex-shrink: 0; }

/* ── Topbar search icon ── */
.topbar-search-icon { color: var(--text-placeholder); font-size: 0.8rem; }

/* ── Topbar lang button ── */
.topbar-lang-btn { font-size: 0.7rem; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   EMPTY STATES — shown when tables/grids have no data
   ═══════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto 1.25rem;
  line-height: 1.6;
}

.empty-state-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--brand-primary);
  color: white;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.empty-state-btn:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand);
}

/* ═══════════════════════════════════════════════════════════
   SKELETON LOADING — pulse animation for loading states
   ═══════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-surface-2) 25%,
    var(--bg-surface-3) 50%,
    var(--bg-surface-2) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 0.875rem;
  width: 60%;
  margin-bottom: 0.5rem;
}

.skeleton-text-sm {
  height: 0.7rem;
  width: 40%;
}

.skeleton-value {
  height: 2rem;
  width: 45%;
  margin-bottom: 0.375rem;
}

.skeleton-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Stat card in loading state */
.stat-card.loading .stat-value,
.stat-card.loading .stat-label,
.stat-card.loading .stat-change {
  color: transparent;
  position: relative;
}

.stat-card.loading .stat-value::after,
.stat-card.loading .stat-label::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-surface-2) 25%, var(--bg-surface-3) 50%, var(--bg-surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   PAGE TRANSITIONS — smooth fade between pages
   ═══════════════════════════════════════════════════════════ */
.page-content {
  animation: page-fade-in 0.2s ease-out;
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION DROPDOWN
   ═══════════════════════════════════════════════════════════ */
.notif-wrapper {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: 500;
  display: none;
  overflow: hidden;
}

.notif-dropdown.open { display: block; }

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.notif-header-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.notif-mark-read {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-primary);
  cursor: pointer;
  background: none;
  border: none;
  transition: opacity var(--transition-fast);
}

.notif-mark-read:hover { opacity: 0.7; }

.notif-list {
  max-height: 300px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.notif-item:hover { background: var(--bg-surface-2); }
.notif-item:last-child { border-bottom: none; }

.notif-item.unread { background: rgba(var(--brand-primary-rgb), 0.03); }

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.notif-body { flex: 1; min-width: 0; }

.notif-text {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.notif-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.notif-footer {
  padding: 0.75rem 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border-light);
}

.notif-footer a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-primary);
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL SEARCH OVERLAY (Topbar search)
   ═══════════════════════════════════════════════════════════ */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.search-results-dropdown.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-light);
}

.search-result-item:hover { background: var(--bg-surface-2); }
.search-result-item:last-child { border-bottom: none; }

.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.search-result-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.search-result-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.search-empty {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.topbar-search {
  position: relative;
}

/* ═══════════════════════════════════════════════════════════
   NOTICE BOARD COMPONENTS
   ═══════════════════════════════════════════════════════════ */
.notice-card { background:var(--bg-surface); border:1px solid var(--border-light); border-radius:var(--radius-xl); padding:1.375rem 1.5rem; transition:all var(--transition-base); position:relative; overflow:hidden; }
.notice-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
.notice-card::before { content:''; position:absolute; left:0; top:0; bottom:0; width:4px; }
.notice-card.priority-high::before   { background:var(--brand-danger); }
.notice-card.priority-normal::before { background:var(--brand-primary); }
.notice-card.priority-low::before    { background:var(--brand-success); }
.notice-header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:0.75rem; }
.notice-title { font-family:var(--font-display); font-size:1rem; font-weight:700; color:var(--text-primary); }
.notice-body { font-size:0.875rem; color:var(--text-secondary); line-height:1.7; margin-bottom:1rem; }
.notice-meta { display:flex; align-items:center; gap:0.875rem; flex-wrap:wrap; }
.notice-meta-item { display:flex; align-items:center; gap:0.375rem; font-size:0.75rem; color:var(--text-muted); }
.notice-actions { display:flex; gap:0.375rem; flex-shrink:0; }
.notice-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:1.25rem; }

/* Audience & Priority badges */
.audience-badge { display:inline-flex; align-items:center; gap:0.25rem; padding:0.2rem 0.625rem; border-radius:var(--radius-full); font-size:0.7rem; font-weight:700; }
.aud-all      { background:rgba(27,79,216,0.1);  color:var(--brand-primary); }
.aud-teachers { background:rgba(139,92,246,0.1); color:#7C3AED; }
.aud-parents  { background:rgba(16,185,129,0.1); color:#059669; }
.aud-students { background:rgba(245,158,11,0.1); color:#D97706; }
.priority-badge { display:inline-flex; padding:0.2rem 0.625rem; border-radius:var(--radius-full); font-size:0.68rem; font-weight:700; }
.pri-high   { background:rgba(239,68,68,0.1);   color:#DC2626; }
.pri-normal { background:rgba(27,79,216,0.1);   color:var(--brand-primary); }
.pri-low    { background:rgba(16,185,129,0.1);  color:#059669; }

/* WhatsApp blast card */
.wa-blast-card { background:linear-gradient(135deg,#25D366,#128C7E); border-radius:var(--radius-xl); padding:1.5rem; color:white; }
.wa-blast-title { font-family:var(--font-display); font-size:1.1rem; font-weight:800; margin-bottom:0.375rem; }
.wa-blast-sub { font-size:0.85rem; opacity:0.85; margin-bottom:1.25rem; line-height:1.6; }
.wa-template-btn { display:flex; align-items:center; gap:0.625rem; padding:0.625rem 0.875rem; background:rgba(255,255,255,0.15); border:1px solid rgba(255,255,255,0.25); border-radius:var(--radius-lg); color:white; font-size:0.8rem; font-weight:600; cursor:pointer; transition:all var(--transition-fast); margin-bottom:0.5rem; }
.wa-template-btn:hover { background:rgba(255,255,255,0.25); }

/* ═══════════════════════════════════════════════════════════
   TIMETABLE COMPONENTS
   ═══════════════════════════════════════════════════════════ */
.tt-grid { display:grid; grid-template-columns:80px repeat(6,1fr); gap:2px; background:var(--border-light); border-radius:var(--radius-lg); overflow:hidden; }
.tt-header { background:var(--brand-primary); color:white; padding:0.75rem 0.5rem; text-align:center; font-family:var(--font-display); font-size:0.8rem; font-weight:700; }
.tt-time { background:var(--bg-surface-2); padding:0.625rem 0.5rem; text-align:center; font-size:0.72rem; font-weight:600; color:var(--text-muted); display:flex; align-items:center; justify-content:center; line-height:1.3; }
.tt-cell { background:var(--bg-surface); padding:0.5rem; min-height:68px; cursor:pointer; transition:all var(--transition-fast); position:relative; }
.tt-cell:hover { background:var(--bg-surface-2); }
.tt-cell.empty:hover::after { content:'+ Add'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:0.72rem; font-weight:700; color:var(--brand-primary); opacity:0.6; }
.tt-period { border-radius:var(--radius-md); padding:0.4rem 0.5rem; height:100%; display:flex; flex-direction:column; justify-content:center; }
.tt-subject { font-size:0.75rem; font-weight:700; color:white; line-height:1.2; margin-bottom:0.125rem; }
.tt-teacher { font-size:0.65rem; color:rgba(255,255,255,0.8); }
.tt-room { font-size:0.6rem; color:rgba(255,255,255,0.65); margin-top:0.125rem; }
.tt-break { background:var(--bg-surface-3); display:flex; align-items:center; justify-content:center; font-size:0.7rem; font-weight:600; color:var(--text-muted); }
.today-col { background:rgba(var(--brand-primary-rgb),0.04)!important; }

/* ═══════════════════════════════════════════════════════════
   RESULTS / MARKS COMPONENTS
   ═══════════════════════════════════════════════════════════ */
.exam-tabs { display:flex; background:var(--bg-surface-2); border:1px solid var(--border-light); border-radius:var(--radius-full); padding:0.25rem; gap:0.25rem; margin-bottom:1.5rem; width:fit-content; }
.exam-tab { padding:0.5rem 1.25rem; border-radius:var(--radius-full); font-size:0.85rem; font-weight:600; color:var(--text-muted); cursor:pointer; transition:all var(--transition-fast); border:none; background:none; }
.exam-tab.active { background:var(--bg-surface); color:var(--text-primary); box-shadow:var(--shadow-xs); }
.marks-input { width:64px; padding:0.375rem 0.5rem; border:1.5px solid var(--border-light); border-radius:var(--radius-md); font-family:var(--font-display); font-size:0.875rem; font-weight:700; text-align:center; background:var(--bg-base); color:var(--text-primary); outline:none; transition:all var(--transition-fast); }
.marks-input:focus { border-color:var(--brand-primary); box-shadow:0 0 0 3px rgba(var(--brand-primary-rgb),0.1); }
.marks-input.invalid { border-color:var(--brand-danger); }
.grade-badge { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:50%; font-family:var(--font-display); font-size:0.875rem; font-weight:800; }
.grade-ap { background:rgba(27,79,216,0.12); color:var(--brand-primary); }
.grade-a  { background:rgba(16,185,129,0.12); color:#059669; }
.grade-b  { background:rgba(245,158,11,0.12); color:#D97706; }
.grade-c  { background:rgba(244,63,94,0.12);  color:#E11D48; }
.grade-f  { background:rgba(239,68,68,0.12);  color:#DC2626; }
.rank-badge { display:inline-flex; align-items:center; gap:0.25rem; font-size:0.75rem; font-weight:700; }
.rank-1 { color:#F59E0B; } .rank-2 { color:#94A3B8; } .rank-3 { color:#CD7C2F; }
.subject-col-header { writing-mode:vertical-rl; text-orientation:mixed; transform:rotate(180deg); font-size:0.7rem; font-weight:700; color:var(--text-muted); padding:0.5rem 0.25rem; white-space:nowrap; }

/* ═══════════════════════════════════════════════════════════
   STUDENT PROFILE SLIDE-OUT PANEL
   ═══════════════════════════════════════════════════════════ */
.profile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px); z-index: 600;
  opacity: 0; pointer-events: none; transition: opacity var(--transition-base);
}
.profile-overlay.open { opacity: 1; pointer-events: all; }

.profile-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 90vw; background: var(--bg-surface);
  box-shadow: var(--shadow-xl); z-index: 601;
  transform: translateX(100%); transition: transform var(--transition-base);
  display: flex; flex-direction: column; overflow-y: auto;
}
.profile-overlay.open .profile-panel { transform: translateX(0); }

.profile-header {
  padding: 1.5rem; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 1rem; flex-shrink: 0;
}
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 800;
  color: white; flex-shrink: 0;
}
.profile-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.profile-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.125rem; }
.profile-close {
  margin-left: auto; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); background: none; border: none; cursor: pointer;
  transition: all var(--transition-fast);
}
.profile-close:hover { background: var(--bg-surface-2); color: var(--text-primary); }

.profile-body { padding: 1.5rem; flex: 1; }

.profile-section-title {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.75rem; margin-top: 1.25rem;
}
.profile-section-title:first-child { margin-top: 0; }

.profile-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem;
}
.profile-info-item { }
.profile-info-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; margin-bottom: 0.125rem; }
.profile-info-value { font-size: 0.875rem; color: var(--text-primary); font-weight: 500; }

.profile-history-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-light); font-size: 0.85rem;
}
.profile-history-item:last-child { border-bottom: none; }

.profile-footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border-light);
  display: flex; gap: 0.5rem; flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   BULK ACTION BAR
   ═══════════════════════════════════════════════════════════ */
.bulk-action-bar {
  display: none; align-items: center; gap: 0.75rem;
  background: var(--brand-primary); color: white;
  padding: 0.75rem 1.25rem; border-radius: var(--radius-xl);
  margin-bottom: 1rem; flex-wrap: wrap;
  animation: page-fade-in 0.2s ease-out;
}
.bulk-action-bar.show { display: flex; }

.bulk-count {
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  margin-right: auto;
}

.bulk-btn {
  padding: 0.375rem 0.875rem; border-radius: var(--radius-full);
  font-size: 0.78rem; font-weight: 700; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.15);
  color: white; transition: all var(--transition-fast);
  display: flex; align-items: center; gap: 0.375rem;
}
.bulk-btn:hover { background: rgba(255,255,255,0.25); }
.bulk-btn-danger { border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.2); }
.bulk-btn-danger:hover { background: rgba(239,68,68,0.35); }

/* ═══════════════════════════════════════════════════════════
   FEE OVERDUE HIGHLIGHTING
   ═══════════════════════════════════════════════════════════ */
.fee-row-overdue { background: rgba(239,68,68,0.04) !important; }
.fee-row-overdue td { border-left: 3px solid var(--brand-danger); }
.fee-row-overdue td:first-child { border-left: 3px solid var(--brand-danger); }
.overdue-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.65rem; font-weight: 700; color: #DC2626;
  background: rgba(239,68,68,0.1); padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full); margin-left: 0.375rem;
}

/* ═══════════════════════════════════════════════════════════
   KEYBOARD SHORTCUT HINT
   ═══════════════════════════════════════════════════════════ */
.kbd-hint {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.65rem; font-weight: 600; color: var(--text-placeholder);
  background: var(--bg-surface-2); padding: 0.125rem 0.375rem;
  border-radius: 4px; border: 1px solid var(--border-light);
  margin-left: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity var(--transition-base); }
  .sidebar-overlay.open { opacity: 1; pointer-events: all; }

  .main-content { margin-left: 0; }

  .topbar-hamburger { display: flex; }
  .topbar-search { display: none; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.875rem; }
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .page-content { padding: 1rem; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
  .fee-tabs { width: 100%; overflow-x: auto; }
  .notif-dropdown { width: 280px; right: -1rem; }
  .search-results-dropdown { position: fixed; left: 1rem; right: 1rem; top: 5rem; }
  .profile-panel { width: 100%; max-width: 100vw; }
  .notice-grid { grid-template-columns: 1fr; }
  .exam-tabs { width: 100%; overflow-x: auto; }
  .tt-grid { min-width: 600px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-value { font-size: 1.4rem; }
  .page-header { flex-direction: column; }
  .page-actions { width: 100%; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: 1fr; }
  .notice-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   PRINT STYLESHEET
   ═══════════════════════════════════════════════════════════ */
@media print {
  .sidebar, .sidebar-overlay, .topbar, .whatsapp-float,
  .notif-wrapper, .page-actions, .filter-bar, .skip-link,
  .modal-overlay, .btn, button { display: none !important; }

  .app-shell { display: block; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  .widget { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .stat-card { box-shadow: none !important; border: 1px solid #ddd !important; }

  body { background: white !important; color: black !important; }
  * { color-adjust: exact; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .page-title { font-size: 1.2rem; }
  .data-table th, .data-table td { padding: 0.375rem 0.5rem; font-size: 0.75rem; }
}

/* ═══════════════════════════════════════════════════════════
   ONBOARDING BANNER
   ═══════════════════════════════════════════════════════════ */
.onboarding-banner {
  background: linear-gradient(135deg, var(--brand-primary), #4F80FF);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: white;
  flex-wrap: wrap;
}

.onboarding-banner-text {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
}

.onboarding-banner-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.onboarding-banner-steps {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.onboarding-step:hover { background: rgba(255,255,255,0.25); }

.onboarding-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  transition: color var(--transition-fast);
}

.onboarding-dismiss:hover { color: white; }

/* ═══════════════════════════════════════════════════════════
   VIDEO MODAL
   ═══════════════════════════════════════════════════════════ */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.video-modal-overlay.open { display: flex; }

.video-modal {
  background: var(--bg-surface);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 800px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.video-modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-primary);
}

.video-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.video-modal-body {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

.video-modal-body iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}