/* ============================================================
   VIDYALAYA ATTENDANCE MANAGEMENT SYSTEM — style.css
   Theme: Clean Government/Institutional — India-inspired Saffron & Navy
   ============================================================ */
 
:root {
  --primary: #1a3a6b;
  --primary-light: #2352a0;
  --primary-dark: #0f2244;
  --accent: #f7941d;
  --accent-light: #fdb053;
  --accent-dark: #d97a0a;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0284c7;
  --purple: #7c3aed;
 
  --bg: #f0f2f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
 
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
 
  --sidebar-w: 240px;
  --sidebar-bg: #0f2244;
  --topbar-h: 58px;
 
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
}
 
/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Poppins', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }
table { border-collapse: collapse; width: 100%; }
 
/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
 
/* ===================== LOGIN SCREEN ===================== */
.login-screen {
  display: none;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.login-screen.active { display: flex; }
 
.login-bg-pattern {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 20% 30%, rgba(247,148,29,.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.05) 0%, transparent 50%);
}
 
.login-container {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 1.5rem;
  position: relative; z-index: 1;
}
 
.login-brand { text-align: center; color: white; }
.brand-logo {
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(247,148,29,.2); border: 2px solid rgba(247,148,29,.5);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.brand-logo i { font-size: 2rem; color: var(--accent-light); }
.login-brand h1 { font-family: 'Baloo 2', sans-serif; font-size: 2rem; font-weight: 800; letter-spacing: 1px; }
.login-brand p { font-size: .8rem; color: rgba(255,255,255,.7); margin-top: .25rem; }
 
.ashoka-divider { text-align: center; color: rgba(255,255,255,.3); font-size: 1.2rem; margin: .5rem 0; }
 
.login-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow-md);
}
.login-card h2 { font-size: 1.2rem; font-weight: 600; color: var(--primary); margin-bottom: 1.5rem; }
 
.input-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.input-group label { font-size: .75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.input-group input,
.input-group select,
.input-group textarea {
  padding: .6rem .85rem; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: .875rem;
  background: var(--surface); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,107,.1);
}
 
.btn-login {
  width: 100%; padding: .75rem; border-radius: var(--radius);
  background: var(--primary); color: white;
  font-size: .9rem; font-weight: 600; letter-spacing: .02em;
  margin-top: .5rem;
  transition: background .2s, transform .1s;
}
.btn-login:hover { background: var(--primary-light); }
.btn-login:active { transform: scale(.98); }
.login-hint { text-align: center; font-size: .75rem; color: var(--text-light); margin-top: 1rem; }
 
/* ===================== MAIN APP LAYOUT ===================== */
.main-app {
  display: flex; min-height: 100vh;
}
 
/* ===================== SIDEBAR ===================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 200;
  transition: width .25s ease, transform .25s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .sidebar-user .user-info,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-footer .btn-logout span { display: none; }
 
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: var(--topbar-h);
}
.sidebar-brand { display: flex; align-items: center; gap: .7rem; }
.sidebar-brand i { font-size: 1.4rem; color: var(--accent-light); flex-shrink: 0; }
.sidebar-brand span { font-family: 'Baloo 2', sans-serif; font-size: 1.15rem; font-weight: 700; color: white; white-space: nowrap; }
.sidebar-toggle { background: none; color: rgba(255,255,255,.5); font-size: 1rem; padding: .25rem; border-radius: 4px; }
.sidebar-toggle:hover { color: white; background: rgba(255,255,255,.08); }
 
.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.user-avatar i { font-size: 2rem; color: rgba(255,255,255,.35); }
.user-info { overflow: hidden; }
.user-info span { display: block; font-size: .825rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info small { font-size: .7rem; color: rgba(255,255,255,.5); }
 
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem 0; }
.nav-section-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.3); padding: .75rem 1rem .3rem; white-space: nowrap; }
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem; color: rgba(255,255,255,.65); font-size: .825rem;
  border-radius: 0; position: relative; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-item i { font-size: 1rem; flex-shrink: 0; width: 18px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.07); color: white; }
.nav-item.active {
  background: rgba(247,148,29,.18); color: var(--accent-light);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
}
 
.sidebar-footer { padding: .75rem; border-top: 1px solid rgba(255,255,255,.08); }
.btn-logout {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .6rem .85rem; border-radius: var(--radius);
  background: rgba(220,38,38,.15); color: #fca5a5; font-size: .8rem; font-weight: 500;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(220,38,38,.28); }
.btn-logout i { font-size: 1rem; }
 
/* ===================== MAIN CONTENT ===================== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left .25s ease;
  min-width: 0;
}
.main-content.expanded { margin-left: 64px; }
 
/* ===================== TOPBAR ===================== */
.topbar {
  height: var(--topbar-h); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.mobile-menu-btn { display: none; background: none; font-size: 1.2rem; color: var(--text-muted); }
.breadcrumb { font-size: .875rem; font-weight: 600; color: var(--primary); }
 
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-date { font-size: .75rem; color: var(--text-muted); display: flex; align-items: center; gap: .4rem; }
.topbar-date i { color: var(--accent); }
.topbar-school { font-size: .72rem; font-weight: 600; color: var(--primary); background: rgba(26,58,107,.07); padding: .25rem .75rem; border-radius: 99px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
 
.notification-bell { position: relative; cursor: pointer; color: var(--text-muted); font-size: 1.1rem; padding: .3rem; }
.notification-bell:hover { color: var(--primary); }
.notif-badge {
  position: absolute; top: -3px; right: -3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--danger); color: white; font-size: .6rem;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
 
/* Notification Panel */
.notif-panel {
  display: none; position: absolute; top: calc(var(--topbar-h) + 8px); right: 1.5rem;
  width: 320px; background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-md); z-index: 300;
  padding: 1rem;
}
.notif-panel.show { display: block; }
.notif-panel h4 { font-size: .85rem; font-weight: 600; color: var(--primary); margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.notif-item { font-size: .8rem; color: var(--text-muted); padding: .5rem .75rem; border-radius: 6px; background: var(--surface-2); margin-bottom: .4rem; display: flex; align-items: flex-start; gap: .5rem; line-height: 1.5; }
.notif-item i { margin-top: .1rem; flex-shrink: 0; }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-success { color: var(--success); }
 
/* ===================== PAGES ===================== */
.page { display: none; padding: 1.5rem; flex: 1; }
.page.active { display: block; }
 
.page-header { margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.3rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: .5rem; }
.page-header h2::before { content: ''; display: block; width: 4px; height: 1.3rem; background: var(--accent); border-radius: 2px; }
.page-sub { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; display: block; }
 
/* ===================== DASHBOARD ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .85rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; display: flex; align-items: center; gap: 1rem;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; right: -12px; top: -12px;
  width: 60px; height: 60px; border-radius: 50%;
  opacity: .07;
}
.stat-card.blue   { border-left: 3px solid var(--info); }    .stat-card.blue::after   { background: var(--info); }
.stat-card.green  { border-left: 3px solid var(--success); } .stat-card.green::after  { background: var(--success); }
.stat-card.red    { border-left: 3px solid var(--danger); }  .stat-card.red::after    { background: var(--danger); }
.stat-card.orange { border-left: 3px solid var(--accent); }  .stat-card.orange::after { background: var(--accent); }
.stat-card.purple { border-left: 3px solid var(--purple); }  .stat-card.purple::after { background: var(--purple); }
.stat-card.teal   { border-left: 3px solid #0d9488; }        .stat-card.teal::after   { background: #0d9488; }
 
.stat-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-card.blue   .stat-icon { background: rgba(2,132,199,.1);  color: var(--info); }
.stat-card.green  .stat-icon { background: rgba(22,163,74,.1);  color: var(--success); }
.stat-card.red    .stat-icon { background: rgba(220,38,38,.1);  color: var(--danger); }
.stat-card.orange .stat-icon { background: rgba(247,148,29,.1); color: var(--accent); }
.stat-card.purple .stat-icon { background: rgba(124,58,237,.1); color: var(--purple); }
.stat-card.teal   .stat-icon { background: rgba(13,148,136,.1); color: #0d9488; }
.stat-icon i { font-size: 1.15rem; }
 
.stat-info { min-width: 0; }
.stat-num { display: block; font-size: 1.6rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat-label { font-size: .7rem; color: var(--text-muted); font-weight: 500; }
 
.dashboard-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; margin-bottom: .85rem; }
.dash-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
.dash-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.dash-card-header h3 { font-size: .9rem; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: .5rem; }
.dash-card-header h3 i { color: var(--accent); }
 
.class-attendance-list { padding: .75rem 1.25rem; }
.class-att-row { display: flex; align-items: center; gap: .75rem; padding: .4rem 0; }
.class-name { font-size: .8rem; font-weight: 600; color: var(--primary); width: 55px; flex-shrink: 0; }
.att-bar-wrap { flex: 1; height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.att-bar { height: 100%; border-radius: 99px; transition: width .3s; }
.att-bar.high  { background: var(--success); }
.att-bar.med   { background: var(--warning); }
.att-bar.low   { background: var(--danger); }
.att-pct { font-size: .78rem; font-weight: 700; width: 38px; text-align: right; flex-shrink: 0; }
 
.alert-list { padding: .75rem 1.25rem; }
.alert-row { display: flex; justify-content: space-between; align-items: center; padding: .45rem .6rem; border-radius: 6px; margin-bottom: .35rem; border: 1px solid rgba(220,38,38,.1); background: rgba(220,38,38,.03); }
.alert-name { font-size: .8rem; color: var(--text); }
.alert-pct { font-size: .8rem; font-weight: 700; color: var(--danger); }
 
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: 1rem 1.25rem; }
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .85rem .6rem; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .75rem; font-weight: 500; color: var(--primary); text-align: center;
  transition: background .15s, border-color .15s, transform .1s;
}
.qa-btn i { font-size: 1.2rem; color: var(--accent); }
.qa-btn:hover { background: rgba(26,58,107,.05); border-color: var(--primary); }
.qa-btn:active { transform: scale(.97); }
 
/* ===================== FILTER BAR ===================== */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1rem 1.25rem; margin-bottom: 1rem;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.filter-group { display: flex; flex-direction: column; gap: .3rem; }
.filter-group label { font-size: .7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.filter-group input,
.filter-group select {
  padding: .5rem .75rem; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .82rem; background: var(--surface); color: var(--text);
  min-width: 130px;
  transition: border-color .2s;
}
.filter-group input:focus,
.filter-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,107,.08); }
 
/* ===================== TABLE ===================== */
.table-wrap {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  overflow: auto;
}
.data-table { width: 100%; }
.data-table thead tr { background: var(--primary); }
.data-table th {
  padding: .7rem 1rem; font-size: .72rem; font-weight: 600;
  color: rgba(255,255,255,.9); text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap; text-align: left;
}
.data-table td {
  padding: .65rem 1rem; font-size: .82rem; color: var(--text);
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(26,58,107,.02); }
.data-table tr.row-present td { background: rgba(22,163,74,.035); }
.data-table tr.row-absent td  { background: rgba(220,38,38,.035); }
 
.loading-row {
  text-align: center; padding: 2rem !important; color: var(--text-muted);
  font-size: .85rem;
}
.loading-row i { display: block; font-size: 1.5rem; margin-bottom: .5rem; color: var(--text-light); }
 
/* ===================== ATTENDANCE MARKING ===================== */
.att-controls {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem;
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: .75rem 1.25rem; margin-bottom: .75rem;
  box-shadow: var(--shadow);
}
.att-summary-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.att-sum-item { font-size: .8rem; font-weight: 500; display: flex; align-items: center; gap: .4rem; }
.present-sum { color: var(--success); }
.absent-sum  { color: var(--danger); }
.late-sum    { color: var(--warning); }
.leave-sum   { color: var(--info); }
 
.att-bulk-btns { display: flex; gap: .5rem; }
.btn-sm {
  padding: .4rem .85rem; border-radius: 6px; font-size: .78rem; font-weight: 600;
  display: flex; align-items: center; gap: .35rem; transition: opacity .15s;
}
.btn-sm:hover { opacity: .85; }
.btn-green { background: rgba(22,163,74,.12); color: var(--success); }
.btn-red   { background: rgba(220,38,38,.12); color: var(--danger); }
.btn-blue  { background: rgba(2,132,199,.12);  color: var(--info); }
 
/* Radio attendance buttons */
.radio-att { display: flex; align-items: center; }
.radio-att input[type="radio"] { display: none; }
.radio-att label {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  border: 1.5px solid var(--border); font-size: .72rem; font-weight: 700;
  cursor: pointer; color: var(--text-muted);
  transition: all .15s;
}
.radio-att input[type="radio"]:checked + label { color: white; border-color: transparent; }
td:nth-child(5) .radio-att input:checked + label { background: var(--success); }
td:nth-child(6) .radio-att input:checked + label { background: var(--danger); }
td:nth-child(7) .radio-att input:checked + label { background: var(--warning); }
td:nth-child(8) .radio-att input:checked + label { background: var(--info); }
td:nth-child(6) .radio-att input:checked + label,
td:nth-child(10) .radio-att input:checked + label { background: var(--danger); }
td:nth-child(9) .radio-att input:checked + label  { background: #7c3aed; }
 
.remark-input {
  width: 120px; padding: .3rem .5rem; border: 1px solid var(--border);
  border-radius: 5px; font-size: .75rem; color: var(--text-muted);
  transition: border-color .15s;
}
.remark-input:focus { border-color: var(--primary); }
 
.form-actions { display: flex; gap: .75rem; padding: 1rem 0; flex-wrap: wrap; }
 
.placeholder-msg {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .75rem; padding: 3rem 1rem; color: var(--text-light);
  background: var(--surface); border-radius: var(--radius-lg); border: 1px dashed var(--border);
  text-align: center;
}
.placeholder-msg i { font-size: 2.5rem; }
.placeholder-msg p { font-size: .875rem; }
 
/* ===================== BUTTONS ===================== */
.btn-primary {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.1rem; border-radius: var(--radius);
  background: var(--primary); color: white; font-size: .82rem; font-weight: 600;
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: var(--primary-light); }
.btn-primary:active { transform: scale(.97); }
 
.btn-secondary {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.1rem; border-radius: var(--radius);
  background: var(--surface); color: var(--text); border: 1.5px solid var(--border);
  font-size: .82rem; font-weight: 600;
  transition: border-color .15s, background .15s;
}
.btn-secondary:hover { border-color: var(--primary); background: var(--surface-2); }
 
.btn-icon {
  width: 30px; height: 30px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; transition: background .15s;
}
.btn-icon.edit  { background: rgba(2,132,199,.1);  color: var(--info); }
.btn-icon.edit:hover  { background: rgba(2,132,199,.2); }
.btn-icon.view  { background: rgba(26,58,107,.1); color: var(--primary); }
.btn-icon.view:hover  { background: rgba(26,58,107,.2); }
.btn-icon.del   { background: rgba(220,38,38,.1);  color: var(--danger); }
.btn-icon.del:hover   { background: rgba(220,38,38,.2); }
.action-btns { display: flex; gap: .4rem; }
 
.ml-auto { margin-left: auto; }
 
/* ===================== BADGES ===================== */
.badge {
  display: inline-block; padding: .2rem .55rem; border-radius: 99px;
  font-size: .68rem; font-weight: 700; letter-spacing: .02em;
}
.badge-green  { background: rgba(22,163,74,.1);   color: var(--success); }
.badge-red    { background: rgba(220,38,38,.1);   color: var(--danger); }
.badge-blue   { background: rgba(2,132,199,.1);   color: var(--info); }
.badge-orange { background: rgba(247,148,29,.12); color: var(--accent-dark); }
.badge-purple { background: rgba(124,58,237,.1);  color: var(--purple); }
.badge-gray   { background: var(--bg);            color: var(--text-muted); }
 
/* ===================== ATTENDANCE PERCENTAGE ===================== */
.pct-wrap { display: flex; align-items: center; gap: .5rem; }
.mini-bar { width: 60px; height: 5px; background: var(--bg); border-radius: 99px; overflow: hidden; flex-shrink: 0; }
.mini-bar-fill { height: 100%; border-radius: 99px; transition: width .3s; }
.pct-green .mini-bar-fill  { background: var(--success); }
.pct-orange .mini-bar-fill { background: var(--warning); }
.pct-red .mini-bar-fill    { background: var(--danger); }
.pct-label { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pct-green  .pct-label { color: var(--success); }
.pct-orange .pct-label { color: var(--warning); }
.pct-red    .pct-label { color: var(--danger); }
 
/* ===================== REPORTS ===================== */
.reports-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .85rem;
  margin-bottom: 1.5rem;
}
.report-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .6rem;
  transition: box-shadow .2s;
}
.report-card:hover { box-shadow: var(--shadow-md); }
.report-icon {
  width: 42px; height: 42px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.report-icon i { font-size: 1.2rem; }
.report-icon.blue   { background: rgba(2,132,199,.1);   color: var(--info); }
.report-icon.green  { background: rgba(22,163,74,.1);   color: var(--success); }
.report-icon.red    { background: rgba(220,38,38,.1);   color: var(--danger); }
.report-icon.orange { background: rgba(247,148,29,.12); color: var(--accent); }
.report-icon.purple { background: rgba(124,58,237,.1);  color: var(--purple); }
.report-icon.teal   { background: rgba(13,148,136,.1);  color: #0d9488; }
 
.report-card h3 { font-size: .9rem; font-weight: 600; color: var(--primary); }
.report-card p  { font-size: .77rem; color: var(--text-muted); line-height: 1.5; }
.report-filter { display: flex; gap: .5rem; flex-wrap: wrap; }
.report-filter input,
.report-filter select {
  flex: 1; min-width: 100px; padding: .45rem .6rem;
  border: 1.5px solid var(--border); border-radius: 6px; font-size: .78rem;
  background: var(--surface); color: var(--text);
}
.btn-report {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem; border-radius: var(--radius);
  background: var(--primary); color: white; font-size: .8rem; font-weight: 600;
  width: 100%; margin-top: .25rem;
  transition: background .15s;
}
.btn-report:hover { background: var(--primary-light); }
 
.report-output {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-md);
}
.report-output-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  background: var(--primary);
}
.report-output-header h3 { font-size: .95rem; font-weight: 600; color: white; }
.report-output-actions { display: flex; gap: .5rem; }
.report-output-actions .btn-sm { padding: .4rem .85rem; }
 
.print-header { padding: 1rem 1.25rem .5rem; }
.print-header h2 { font-size: 1rem; font-weight: 700; color: var(--primary); }
.print-header h3 { font-size: .875rem; font-weight: 600; color: var(--text-muted); margin-top: .2rem; }
.print-header p  { font-size: .75rem; color: var(--text-light); margin-top: .2rem; }
 
/* ===================== HOLIDAY CALENDAR ===================== */
.holiday-layout { display: grid; grid-template-columns: 320px 1fr; gap: 1rem; }
.holiday-form-card,
.holiday-list-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow); padding: 1.25rem;
}
.holiday-form-card h3,
.holiday-list-card h3 { font-size: .95rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
 
.working-days-info {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  padding: .75rem 0 0; font-size: .78rem; color: var(--text-muted);
  border-top: 1px solid var(--border); margin-top: .75rem;
}
.working-days-info span { display: flex; align-items: center; gap: .4rem; }
.working-days-info i { color: var(--accent); }
.working-days-info b { color: var(--primary); }
 
/* ===================== SETTINGS ===================== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.settings-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow); padding: 1.25rem;
}
.settings-card h3 { font-size: .95rem; font-weight: 700; color: var(--primary); margin-bottom: 1.25rem; display: flex; align-items: center; gap: .5rem; }
.settings-card h3 i { color: var(--accent); }
.settings-card .btn-primary { margin-top: .75rem; }
 
.checkbox-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.checkbox-group label { display: flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--text-muted); cursor: pointer; }
.checkbox-group input[type="checkbox"] { cursor: pointer; accent-color: var(--primary); }
 
/* ===================== MODALS ===================== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 500;
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
 
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 40px rgba(0,0,0,.2);
  animation: modalIn .2s ease;
}
.modal-lg { max-width: 820px; }
 
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(8px); } to { opacity:1; transform:none; } }
 
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  background: var(--primary); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 { font-size: .95rem; font-weight: 700; color: white; }
.modal-close { background: rgba(255,255,255,.15); color: white; width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: .8rem; transition: background .15s; }
.modal-close:hover { background: rgba(255,255,255,.25); }
 
.modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .75rem; }
 
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
 
/* ===================== TOAST ===================== */
.toast {
  position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white; padding: .7rem 1.25rem;
  border-radius: 99px; font-size: .82rem; font-weight: 500;
  display: flex; align-items: center; gap: .5rem;
  box-shadow: var(--shadow-md); z-index: 1000; white-space: nowrap;
  transition: bottom .3s cubic-bezier(.175,.885,.32,1.275);
}
.toast.show { bottom: 1.5rem; }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.info    { background: var(--info); }
 
/* ===================== PRINT STYLES ===================== */
@media print {
  .sidebar, .topbar, .filter-bar, .form-actions, .report-output-actions, .btn-primary, .btn-secondary, .btn-report { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .data-table td, .data-table th { padding: .4rem .5rem; font-size: .75rem; }
  .data-table thead tr { background: #1a3a6b !important; color: white !important; -webkit-print-color-adjust: exact; }
}
 
/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .dashboard-row { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .holiday-layout { grid-template-columns: 1fr; }
}
 
@media (max-width: 768px) {
  :root { --sidebar-w: 240px; }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  .main-content { margin-left: 0 !important; }
  .mobile-menu-btn { display: flex; }
  .topbar-school { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .reports-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page { padding: 1rem; }
}
 
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar-date { display: none; }
  .filter-bar { flex-direction: column; }
  .filter-group { width: 100%; }
  .filter-group input,
  .filter-group select { min-width: unset; width: 100%; }
}