/* ============================================================
   SIABS DHARMA — Aurora Glassmorphism Dark Theme
   Font: Outfit (display) + Instrument Serif (accent)
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg-base:       #070B1A;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --bg-glass:      rgba(14,22,54,0.7);
  --bg-input:      rgba(255,255,255,0.06);

  --aurora-1: #00D4FF;
  --aurora-2: #7B5EA7;
  --aurora-3: #00FFA3;
  --aurora-4: #FF6B6B;

  --text-1:  #F0F4FF;
  --text-2:  #8B9CC8;
  --text-3:  #4A5578;

  --border:  rgba(255,255,255,0.08);
  --border-active: rgba(0,212,255,0.4);

  --hadir:   #00FFA3;
  --sakit:   #FFD166;
  --izin:    #00D4FF;
  --alpha:   #FF6B6B;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-glow: 0 0 40px rgba(0,212,255,0.15);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-float: 0 20px 60px rgba(0,0,0,0.5);

  --font-display: 'Outfit', sans-serif;
  --font-serif:   'Instrument Serif', serif;

  --sidebar-w: 260px;
  --topbar-h:  64px;

  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-display);
  background: var(--bg-base);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--aurora-1); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--aurora-3); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: var(--font-display); }

/* ── Aurora Background Orbs ─────────────────────────────────── */
.aurora-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.aurora-bg::before,
.aurora-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  animation: floatOrb 12s ease-in-out infinite alternate;
}
.aurora-bg::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--aurora-1), transparent);
  top: -200px; left: -100px;
}
.aurora-bg::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--aurora-2), transparent);
  bottom: -100px; right: -50px;
  animation-delay: -6s;
}
.aurora-orb-3 {
  position: fixed; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, var(--aurora-3), transparent);
  filter: blur(100px); opacity: 0.07;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  pointer-events: none; z-index: 0;
  animation: floatOrb 15s ease-in-out infinite alternate-reverse;
}
@keyframes floatOrb {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px,20px) scale(1.1); }
}

/* ── Layout ─────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
  transition: transform var(--transition);
}
.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 16px rgba(0,212,255,0.3);
  flex-shrink: 0;
}
.sidebar-logo-text { line-height: 1.2; }
.sidebar-logo-title {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  letter-spacing: 0.3px;
}
.sidebar-logo-sub { font-size: 10px; color: var(--text-2); margin-top: 1px; }

.sidebar-school {
  padding: 14px 24px;
  background: rgba(0,212,255,0.05);
  border-bottom: 1px solid var(--border);
}
.sidebar-school p {
  font-size: 10px; color: var(--text-2); line-height: 1.4;
  text-transform: uppercase; letter-spacing: 0.8px;
}
.sidebar-school strong {
  font-size: 11px; color: var(--aurora-1); display: block; margin-bottom: 2px;
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-group { margin-bottom: 4px; }
.nav-group-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  color: var(--text-3); text-transform: uppercase;
  padding: 8px 24px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  position: relative; border: none; background: none; width: 100%;
  text-align: left;
}
.nav-item .nav-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  font-size: 15px; flex-shrink: 0;
  transition: all var(--transition);
}
.nav-item:hover { color: var(--text-1); }
.nav-item:hover .nav-icon { background: rgba(0,212,255,0.12); }
.nav-item.active {
  color: var(--aurora-1);
  background: linear-gradient(90deg, rgba(0,212,255,0.08) 0%, transparent 100%);
}
.nav-item.active .nav-icon {
  background: rgba(0,212,255,0.15);
  box-shadow: 0 0 12px rgba(0,212,255,0.2);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; border-radius: 0 4px 4px 0;
  background: var(--aurora-1);
  box-shadow: 0 0 8px var(--aurora-1);
}
.nav-badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  background: var(--aurora-4); color: #fff;
  padding: 2px 7px; border-radius: 20px;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm);
  background: var(--bg-card); cursor: pointer;
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--bg-card-hover); }
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--aurora-2), var(--aurora-1));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 12.5px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 10.5px; color: var(--text-2); text-transform: capitalize;
}
.sidebar-logout {
  color: var(--text-3); font-size: 14px;
  transition: color var(--transition);
}
.sidebar-user:hover .sidebar-logout { color: var(--aurora-4); }

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

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title {
  flex: 1;
  font-size: 16px; font-weight: 700; color: var(--text-1);
  letter-spacing: -0.2px;
}
.topbar-title span {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--aurora-1);
}
.topbar-date {
  font-size: 12px; color: var(--text-2);
  background: var(--bg-card);
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border);
}
.topbar-menu-btn {
  display: none; background: none; border: none;
  color: var(--text-2); font-size: 20px; cursor: pointer;
  padding: 8px; border-radius: 8px;
  transition: all var(--transition);
}
.topbar-menu-btn:hover { background: var(--bg-card); color: var(--text-1); }

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

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
}
.card:hover { border-color: rgba(255,255,255,0.12); }
.card-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.card-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text-1); }
.card-subtitle { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.card-body { padding: 24px; }

/* ── Stat Cards ──────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 16px;
  transition: all var(--transition);
  position: relative; overflow: hidden;
  cursor: default;
}
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-color);
  box-shadow: 0 0 12px var(--accent-color);
  opacity: 0.7;
}
.stat-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.stat-card:hover::before { opacity: 1; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.stat-info { flex: 1; }
.stat-value {
  font-size: 26px; font-weight: 800; color: var(--text-1);
  line-height: 1; letter-spacing: -0.5px;
}
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.stat-change {
  font-size: 11px; margin-top: 6px;
  display: flex; align-items: center; gap: 4px;
}
.stat-change.up { color: var(--hadir); }
.stat-change.down { color: var(--alpha); }

/* ── Table ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text-3);
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: rgba(255,255,255,0.02);
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.025); }
tbody td {
  padding: 13px 16px; font-size: 13.5px; color: var(--text-1);
  vertical-align: middle;
}
.td-muted { color: var(--text-2) !important; font-size: 12.5px !important; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge-H { background: rgba(0,255,163,0.12); color: var(--hadir); border: 1px solid rgba(0,255,163,0.2); }
.badge-S { background: rgba(255,209,102,0.12); color: var(--sakit); border: 1px solid rgba(255,209,102,0.2); }
.badge-I { background: rgba(0,212,255,0.12); color: var(--izin);  border: 1px solid rgba(0,212,255,0.2); }
.badge-A { background: rgba(255,107,107,0.12); color: var(--alpha); border: 1px solid rgba(255,107,107,0.2); }
.badge-admin   { background: rgba(123,94,167,0.15); color: var(--aurora-2); border: 1px solid rgba(123,94,167,0.25); }
.badge-guru    { background: rgba(0,212,255,0.1);  color: var(--aurora-1); border: 1px solid rgba(0,212,255,0.2); }
.badge-kepsek  { background: rgba(0,255,163,0.1);  color: var(--hadir); border: 1px solid rgba(0,255,163,0.2); }
.badge-dot::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all var(--transition);
  white-space: nowrap; line-height: 1;
}
.btn-primary {
  background: linear-gradient(135deg, var(--aurora-1), #0099CC);
  color: #000; box-shadow: 0 4px 16px rgba(0,212,255,0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,212,255,0.4);
}
.btn-secondary {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-1);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-active); }
.btn-danger { background: rgba(255,107,107,0.15); border: 1px solid rgba(255,107,107,0.3); color: var(--alpha); }
.btn-danger:hover { background: rgba(255,107,107,0.25); }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-2); margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-1);
  font-size: 14px; transition: all var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--border-active);
  background: rgba(0,212,255,0.05);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
}
.form-control::placeholder { color: var(--text-3); }
select.form-control option { background: #1a2040; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }

/* ── Alert / Flash ───────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; animation: slideDown 0.3s ease;
}
.alert-success { background: rgba(0,255,163,0.1); border: 1px solid rgba(0,255,163,0.25); color: var(--hadir); }
.alert-error   { background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.25); color: var(--alpha); }
.alert-info    { background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.25); color: var(--izin); }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* ── Absensi Status Buttons ──────────────────────────────────── */
.abs-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.abs-btn {
  padding: 8px 20px; border-radius: 20px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  border: 2px solid; transition: all var(--transition);
  background: transparent; letter-spacing: 0.5px;
}
.abs-btn[data-val="H"] { border-color: var(--hadir); color: var(--hadir); }
.abs-btn[data-val="H"].selected,
.abs-btn[data-val="H"]:hover { background: var(--hadir); color: #000; box-shadow: 0 0 16px rgba(0,255,163,0.4); }
.abs-btn[data-val="S"] { border-color: var(--sakit); color: var(--sakit); }
.abs-btn[data-val="S"].selected,
.abs-btn[data-val="S"]:hover { background: var(--sakit); color: #000; box-shadow: 0 0 16px rgba(255,209,102,0.4); }
.abs-btn[data-val="I"] { border-color: var(--izin); color: var(--izin); }
.abs-btn[data-val="I"].selected,
.abs-btn[data-val="I"]:hover { background: var(--izin); color: #000; box-shadow: 0 0 16px rgba(0,212,255,0.4); }
.abs-btn[data-val="A"] { border-color: var(--alpha); color: var(--alpha); }
.abs-btn[data-val="A"].selected,
.abs-btn[data-val="A"]:hover { background: var(--alpha); color: #fff; box-shadow: 0 0 16px rgba(255,107,107,0.4); }

/* ── Absensi Table Input ─────────────────────────────────────── */
.abs-table-row:hover { background: rgba(0,212,255,0.03) !important; }
.siswa-avatar {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--aurora-2), var(--aurora-1));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* ── Progress Bar ────────────────────────────────────────────── */
.progress-bar {
  height: 6px; background: rgba(255,255,255,0.06);
  border-radius: 10px; overflow: hidden; flex: 1;
}
.progress-fill {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, var(--aurora-1), var(--aurora-3));
  transition: width 1s ease;
  box-shadow: 0 0 8px rgba(0,212,255,0.4);
}

/* ── Misc Utilities ──────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.mt-auto { margin-top: auto; }
.text-sm { font-size: 12.5px; } .text-xs { font-size: 11px; }
.text-2 { color: var(--text-2); }
.text-right { text-align: right; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.rounded-full { border-radius: 50%; }
.no-data {
  text-align: center; padding: 48px; color: var(--text-3);
  font-size: 14px; font-style: italic;
}
.no-data svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: 0.3; }

/* ── Login Page ──────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; z-index: 1;
}
.login-container {
  display: grid; grid-template-columns: 1fr 1fr;
  max-width: 900px; width: 100%;
  background: rgba(14,22,54,0.6);
  backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-float);
}
.login-left {
  padding: 52px 44px;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(123,94,167,0.08));
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand { margin-bottom: 40px; }
.login-logo-wrap {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; color: #fff;
  box-shadow: 0 8px 24px rgba(0,212,255,0.3);
  margin-bottom: 20px;
}
.login-brand h1 { font-size: 28px; font-weight: 800; color: var(--text-1); line-height: 1.1; margin-bottom: 8px; }
.login-brand p { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.login-brand h1 em { font-family: var(--font-serif); font-style: italic; color: var(--aurora-1); }
.login-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-stat-item {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
}
.login-stat-item .num { font-size: 20px; font-weight: 800; color: var(--text-1); }
.login-stat-item .lbl { font-size: 10.5px; color: var(--text-2); margin-top: 2px; }
.login-right { padding: 52px 44px; }
.login-right h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.login-right p { font-size: 13px; color: var(--text-2); margin-bottom: 32px; }
.login-footer { margin-top: 28px; font-size: 11.5px; color: var(--text-3); text-align: center; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 15px; pointer-events: none;
}
.input-icon-wrap .form-control { padding-left: 38px; }
.btn-login {
  width: 100%; padding: 12px;
  font-size: 15px; font-weight: 700;
  background: linear-gradient(135deg, var(--aurora-1), #0088BB);
  color: #000; border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0,212,255,0.3);
  letter-spacing: 0.3px;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,212,255,0.45);
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 20px; }
.page-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; cursor: pointer;
  background: var(--bg-card); transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover { border-color: var(--border-active); color: var(--aurora-1); }
.page-btn.active { background: var(--aurora-1); color: #000; border-color: var(--aurora-1); font-weight: 700; }

/* ── Chart Placeholder ───────────────────────────────────────── */
.chart-container { position: relative; height: 200px; }

/* ── Mobile Overlay ──────────────────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 99;
  backdrop-filter: blur(4px);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-float); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .page-content { padding: 20px 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .login-container { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
}

/* ── Animations ──────────────────────────────────────────────── */
.fade-in { animation: fadeIn 0.4s ease both; }
.slide-up { animation: slideUp 0.4s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Tooltip ─────────────────────────────────────────────────── */
[data-tip] { position: relative; cursor: default; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  background: rgba(14,22,54,0.95); border: 1px solid var(--border);
  color: var(--text-1); font-size: 11px; padding: 4px 9px;
  border-radius: 6px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.2s; z-index: 200;
}
[data-tip]:hover::after { opacity: 1; }
