/* ================================================================
   School Attendance — Modern Light/Dark Design System
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:          #f1f5f9;
  --bg-card:     #ffffff;
  --bg-sidebar:  #ffffff;
  --bg-hover:    #f8fafc;
  --bg-input:    #f8fafc;
  --border:      #e2e8f0;
  --border-2:    #cbd5e1;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.05);
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.05);
  --shadow-md:   0 4px 8px rgba(0,0,0,.08), 0 12px 32px rgba(0,0,0,.07);
  --shadow-lg:   0 8px 16px rgba(0,0,0,.1), 0 24px 48px rgba(0,0,0,.08);
  --text:        #0f172a;
  --text-2:      #475569;
  --muted:       #94a3b8;
  --stroke:      #e2e8f0;

  /* Accents */
  --indigo:      #6366f1;
  --indigo-2:    #818cf8;
  --indigo-bg:   rgba(99,102,241,.08);
  --indigo-bg2:  rgba(99,102,241,.16);
  --cyan:        #06b6d4;
  --emerald:     #10b981;
  --amber:       #f59e0b;
  --rose:        #f43f5e;
  --violet:      #8b5cf6;
  --green:       #22c55e;
  --red:         #ef4444;
  --pink:        #ec4899;

  /* Layout */
  --sidebar-w:   256px;
  --radius:      14px;
  --radius-sm:   10px;
  --radius-lg:   20px;
  --topbar-h:    62px;
  --transition:  .2s cubic-bezier(.4,0,.2,1);

  /* Legacy compat */
  --glass:       rgba(255,255,255,.8);
  --glass-strong:rgba(255,255,255,.95);
}

[data-theme="dark"] {
  --bg:          #0a0f1e;
  --bg-card:     #111827;
  --bg-sidebar:  #0d1424;
  --bg-hover:    #1a2236;
  --bg-input:    #1a2236;
  --border:      #1e293b;
  --border-2:    #334155;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.5);
  --shadow:      0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  --shadow-md:   0 4px 8px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.3);
  --shadow-lg:   0 8px 24px rgba(0,0,0,.5), 0 32px 64px rgba(0,0,0,.4);
  --text:        #f9fafb;
  --text-2:      #d1d5db;
  --muted:       #6b7280;
  --stroke:      #1e293b;
  --indigo-bg:   rgba(99,102,241,.14);
  --indigo-bg2:  rgba(99,102,241,.24);
  --glass:       rgba(17,24,39,.8);
  --glass-strong:rgba(17,24,39,.95);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Shell ── */
.shell { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 16px 15px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo-img {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(30,58,138,.18);
  overflow: hidden;
  padding: 2px;
}
.sidebar-logo-img img { width: 100%; height: 100%; object-fit: contain; }
[data-theme="dark"] .sidebar-logo-img { background: rgba(255,255,255,.08); box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.sidebar-name strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  font-family: 'Hind Siliguri', sans-serif;
  letter-spacing: -.01em;
}
.sidebar-name span { font-size: 10.5px; color: var(--muted); font-weight: 500; margin-top: 1px; display: block;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Nav */
.sidebar-nav { padding: 10px 8px; flex: 1; }
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  padding: 10px 8px 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform .15s;
  margin-bottom: 1px;
  position: relative;
}
.nav-item:hover {
  background: var(--indigo-bg);
  color: var(--indigo);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(99,102,241,.28);
}
.nav-item.active:hover { transform: none; }
.nav-icon { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Language system ── */
/* Default: Bengali shown, English hidden */
.lang-en { display: none; }
.lang-bn { display: inline; }

html[data-lang="en"] .lang-bn { display: none; }
html[data-lang="en"] .lang-en { display: inline; }

/* Sidebar footer */
.sidebar-footer {
  padding: 8px 8px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Language toggle */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: default;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; 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);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user-role { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.sidebar-logout-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: transparent; border: none;
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.sidebar-logout-btn:hover { background: rgba(239,68,68,.1); color: var(--red); }

/* ── Main ── */
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 26px;
  gap: 14px;
  position: sticky;
  top: 0; z-index: 50;
  transition: background var(--transition), border-color var(--transition);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 17px; font-weight: 700; color: var(--text); }
.topbar-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-chip {
  font-size: 11.5px; font-weight: 500; color: var(--text-2);
  background: var(--bg); padding: 5px 11px;
  border-radius: 99px; border: 1px solid var(--border);
  white-space: nowrap; display: flex; align-items: center; gap: 5px;
}
.topbar-divider {
  width: 1px; height: 22px; background: var(--border); flex-shrink: 0; margin: 0 2px;
}
/* Icon buttons: lang & theme */
.topbar-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-2); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  font-size: 11.5px; font-weight: 700;
}
.topbar-icon-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--indigo); }
.topbar-lang-label { font-size: 11px; font-weight: 800; letter-spacing: .3px; }
/* Theme icon: show/hide based on current theme */
.theme-icon-dark  { display: none; }
.theme-icon-light { display: flex; }
[data-theme="dark"] .theme-icon-dark  { display: flex; }
[data-theme="dark"] .theme-icon-light { display: none; }
/* School context */
.topbar-school {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 4px;
  border-radius: 99px; border: 1px solid var(--border);
  background: var(--bg); cursor: default; max-width: 220px;
}
.topbar-school-logo {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; overflow: hidden;
}
.topbar-school-logo-fallback {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; color: #fff;
}
.topbar-school-info { display: flex; flex-direction: column; min-width: 0; }
.topbar-school-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px;
}
.topbar-school-role { font-size: 10px; color: var(--muted); font-weight: 500; }
/* Admin avatar */
.topbar-admin-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; color: #fff;
  border: 2px solid var(--border); cursor: default;
  transition: border-color .15s;
}
.topbar-admin-avatar:hover { border-color: var(--indigo); }
/* Legacy selectors kept for any page that still uses them */
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; border-radius: 99px;
  background: var(--bg); border: 1px solid var(--border); cursor: default;
}
.topbar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.topbar-user-name { font-size: 13px; font-weight: 600; color: var(--text); }

/* Page content */
.page-content { padding: 22px 26px 40px; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background var(--transition), border-color var(--transition);
}
.card-pad { padding: 22px; }
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.panel h2 { font-size: 14px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--text); }

/* Stat cards */
.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4,1fr); }
.cols-3 { grid-template-columns: repeat(3,1fr); }
.cols-2 { grid-template-columns: repeat(2,1fr); }
@media(max-width:1200px){.cols-4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.cols-4,.cols-2{grid-template-columns:1fr}.cols-3{grid-template-columns:1fr}}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: default;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 90px; height: 90px;
  border-radius: 50%;
  opacity: .06;
}
.stat.s-indigo::after  { background: #6366f1; }
.stat.s-emerald::after { background: #10b981; }
.stat.s-amber::after   { background: #f59e0b; }
.stat.s-rose::after    { background: #f43f5e; }
.stat .ic {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.ic-indigo  { background: rgba(99,102,241,.1);  color: var(--indigo); }
.ic-emerald { background: rgba(16,185,129,.1);  color: var(--emerald); }
.ic-amber   { background: rgba(245,158,11,.1);  color: var(--amber); }
.ic-rose    { background: rgba(244,63,94,.1);   color: var(--rose); }
/* Legacy aliases */
.ic-cyan { background: rgba(6,182,212,.1); color: var(--cyan); }
.ic-green { background: rgba(34,197,94,.1); color: var(--green); }
.ic-red { background: rgba(239,68,68,.1); color: var(--red); }

.stat h3 { font-size: 32px; font-weight: 800; color: var(--text); letter-spacing: -1px; line-height: 1; }
.stat p { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 16px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); white-space: nowrap;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
td {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.b-present  { background: rgba(16,185,129,.1);  color: #059669;  border: 1px solid rgba(16,185,129,.2); }
.b-late     { background: rgba(245,158,11,.1);  color: #d97706;  border: 1px solid rgba(245,158,11,.2); }
.b-absent   { background: rgba(239,68,68,.1);   color: #dc2626;  border: 1px solid rgba(239,68,68,.2); }
.b-device   { background: rgba(99,102,241,.1);  color: var(--indigo); border: 1px solid rgba(99,102,241,.2); max-width:140px; overflow:hidden; text-overflow:ellipsis; }
[data-theme="dark"] .b-present { color: #6ee7b7; }
[data-theme="dark"] .b-late    { color: #fcd34d; }
[data-theme="dark"] .b-absent  { color: #fca5a5; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: all .15s;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border: none;
  box-shadow: 0 3px 10px rgba(99,102,241,.28);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(99,102,241,.38); background: linear-gradient(135deg, #4f52e0, #7c3aed); border: none; }
.btn-danger { background: rgba(239,68,68,.07); color: var(--red); border-color: rgba(239,68,68,.2); }
.btn-danger:hover { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.3); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

/* ── Inputs ── */
.input, select, textarea {
  width: 100%; padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text); font-size: 13.5px;
  font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, select:focus, textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.input::placeholder { color: var(--muted); }
select option { background: var(--bg-card); color: var(--text); }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

/* ── Avatar ── */
.avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

/* ── Modals ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 1000; place-items: center; padding: 20px;
}
.modal-overlay.open { display: grid; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 480px;
  padding: 28px;
  animation: pop-in .22s cubic-bezier(.34,1.56,.64,1);
  max-height: 90vh; overflow-y: auto;
}
.modal-wide { max-width: 620px; }
@keyframes pop-in { from{opacity:0;transform:scale(.92) translateY(10px)} to{opacity:1;transform:scale(1) translateY(0)} }
.modal-header { display:flex; align-items:flex-start; gap:13px; margin-bottom:20px; }
.modal-icon-wrap { width:44px; height:44px; border-radius:13px; display:grid; place-items:center; flex-shrink:0; }
.modal-title { font-size:17px; font-weight:700; margin-bottom:3px; color:var(--text); }
.modal-sub   { font-size:13px; color:var(--muted); }
.modal-close {
  margin-left:auto; background:var(--bg); border:1px solid var(--border);
  color:var(--muted); cursor:pointer; width:32px; height:32px;
  border-radius:8px; display:flex; align-items:center; justify-content:center;
  transition:.15s;
}
.modal-close:hover { background:rgba(239,68,68,.08); color:var(--red); border-color:rgba(239,68,68,.2); }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; }

/* ── Toast ── */
.toast {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999; padding: 13px 18px;
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  display: flex; align-items: center; gap: 9px;
  box-shadow: var(--shadow-lg);
  animation: toast-in .28s cubic-bezier(.34,1.56,.64,1);
  max-width: 360px;
}
@keyframes toast-in { from{transform:translateX(120%);opacity:0} to{transform:translateX(0);opacity:1} }
.toast-ok  { background:var(--bg-card); border:1px solid rgba(16,185,129,.25); color:#059669; }
.toast-err { background:var(--bg-card); border:1px solid rgba(239,68,68,.25);  color:#dc2626; }
[data-theme="dark"] .toast-ok  { color:#6ee7b7; }
[data-theme="dark"] .toast-err { color:#fca5a5; }

/* ── Misc ── */
.live-dot {
  width:8px; height:8px; border-radius:50%; background:var(--emerald);
  animation: pulse-dot 1.8s infinite; flex-shrink:0;
}
@keyframes pulse-dot { 0%{box-shadow:0 0 0 0 rgba(16,185,129,.5)} 70%{box-shadow:0 0 0 8px rgba(16,185,129,0)} 100%{box-shadow:0 0 0 0 rgba(16,185,129,0)} }

.empty { text-align:center; color:var(--muted); padding:40px 20px; font-size:13.5px; }
.empty-icon { display:flex;justify-content:center;margin-bottom:14px;opacity:.4; }
.ic-svg { vertical-align:middle; flex-shrink:0; }
.req { color:var(--rose); margin-left:2px; }
.sub { font-size:12px; color:var(--muted); }
.pill-link { color:var(--indigo); font-weight:600; font-size:13px; display:inline-flex; align-items:center; gap:5px; }
.pill-link:hover { text-decoration:underline; }
.conn { display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted); }
.conn .dot { width:7px;height:7px;border-radius:50%;background:var(--muted); }
.conn.on .dot { background:var(--emerald); }
.conn.off .dot { background:var(--red); }

/* ── Login page ── */
.login-wrap {
  min-height: 100vh; display:flex;
  align-items:center; justify-content:center; padding:24px;
  background:
    radial-gradient(circle at 15% 50%, rgba(99,102,241,.1), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(139,92,246,.1), transparent 40%),
    var(--bg);
}
.login-card-wrap { width:100%; max-width:420px; }
.login-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:24px; padding:40px 36px;
  box-shadow:var(--shadow-lg); text-align:center;
}
.login-logo {
  width:68px; height:68px; border-radius:20px;
  background:linear-gradient(135deg,#6366f1,#8b5cf6);
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 22px;
  box-shadow:0 8px 24px rgba(99,102,241,.35); color:#fff;
}
.login-title  { font-size:23px; font-weight:800; color:var(--text); margin-bottom:6px; letter-spacing:-.5px; }
.login-subtitle { font-size:14px; color:var(--muted); margin-bottom:28px; }
.login-input {
  width:100%; padding:12px 14px;
  border-radius:11px; background:var(--bg-input);
  border:1px solid var(--border); color:var(--text);
  font-size:14px; outline:none; font-family:inherit;
  transition:border-color .15s,box-shadow .15s; box-sizing:border-box;
}
.login-input:focus { border-color:var(--indigo); box-shadow:0 0 0 3px rgba(99,102,241,.1); }
.login-input::placeholder { color:var(--muted); }
.btn-login {
  width:100%; background:linear-gradient(135deg,#6366f1,#8b5cf6);
  color:#fff; border:none; border-radius:11px;
  padding:13px; font-size:15px; font-weight:700;
  cursor:pointer; box-shadow:0 4px 14px rgba(99,102,241,.28);
  transition:all .2s; margin-top:6px; font-family:inherit;
}
.btn-login:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(99,102,241,.38); }
.form-group { text-align:left; margin-bottom:18px; }
.form-group label { font-size:12px; font-weight:700; color:var(--text-2); text-transform:uppercase; letter-spacing:.5px; margin-bottom:7px; }
.input-wrapper { position:relative; }
.btn-toggle-pass {
  position:absolute; right:11px; top:50%; transform:translateY(-50%);
  background:none; border:none; color:var(--muted); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  padding:4px; border-radius:6px; transition:color .15s;
}
.btn-toggle-pass:hover { color:var(--text-2); }
.btn-toggle-pass svg, .btn-toggle-pass.active { color:var(--indigo); }
.login-footer { margin-top:22px; font-size:13.5px; color:var(--muted); }
.login-footer a { color:var(--indigo); font-weight:600; }
.login-footer a:hover { text-decoration:underline; }
.alert { padding:12px 14px; border-radius:10px; font-size:13.5px; margin-bottom:20px; text-align:left; display:flex; align-items:flex-start; gap:9px; line-height:1.5; }
.alert-err  { background:rgba(239,68,68,.08);  color:#dc2626; border:1px solid rgba(239,68,68,.18); }
.alert-warn { background:rgba(245,158,11,.08); color:#d97706; border:1px solid rgba(245,158,11,.18); }
[data-theme="dark"] .alert-err  { color:#fca5a5; }
[data-theme="dark"] .alert-warn { color:#fcd34d; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border-2); border-radius:99px; }
::-webkit-scrollbar-thumb:hover { background:var(--muted); }

/* ── Animations ── */
@keyframes fade-up { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.fade-up { animation:fade-up .3s ease both; }
.fade-up:nth-child(1){animation-delay:.04s}
.fade-up:nth-child(2){animation-delay:.08s}
.fade-up:nth-child(3){animation-delay:.12s}
.fade-up:nth-child(4){animation-delay:.16s}

@media(max-width:768px){
  .sidebar{transform:translateX(-100%);transition:transform .3s}
  .sidebar.open{transform:translateX(0)}
  .main{margin-left:0}
  .page-content{padding:14px}
}
