/* ============================================================
   GD Activity High School — Admin Design System
   ============================================================ */
:root {
  --bg: #eef1f9;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --ink: #101a37;
  --ink-soft: #31406b;
  --muted: #6b7a9c;
  --line: #e3e8f4;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-ink: #312e81;
  --accent: #f59e0b;
  --teal: #0ea5a4;
  --green: #10b981;
  --rose: #f43f5e;
  --sky: #0ea5e9;
  --sidebar-w: 268px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(23, 37, 84, .06);
  --shadow-md: 0 14px 38px -16px rgba(23, 37, 84, .28);
  --shadow-lg: 0 30px 70px -30px rgba(23, 37, 84, .4);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1100px 500px at 100% -10%, rgba(124, 58, 237, .09), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(14, 165, 233, .09), transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(79, 70, 229, .18); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c6cee4; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- Layout ---------------- */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: linear-gradient(178deg, #0d1430 0%, #111a44 46%, #191244 100%);
  color: #cdd6f4;
  padding: 22px 16px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px -60px;
  height: 300px;
  background: radial-gradient(circle at 30% 70%, rgba(99, 102, 241, .35), transparent 60%);
  pointer-events: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 20px;
}
.brand-mark {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 19px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7 55%, #ec4899);
  box-shadow: 0 10px 24px -8px rgba(129, 90, 255, .9), inset 0 1px 0 rgba(255,255,255,.35);
  letter-spacing: -.5px;
  flex: none;
}
.brand-text { line-height: 1.15; }
.brand-text strong { display: block; color: #fff; font-size: 15px; letter-spacing: .1px; }
.brand-text span { font-size: 11px; color: #8fa0d4; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 600; }

.nav-section {
  margin: 18px 10px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #6f7fb5;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.8px;
  font-weight: 600;
  color: #b9c4e8;
  position: relative;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  margin-bottom: 2px;
}
.nav-item .icon { opacity: .85; flex: none; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(2px); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(99, 102, 241, .95), rgba(139, 92, 246, .85));
  box-shadow: 0 12px 26px -12px rgba(99, 102, 241, .9), inset 0 1px 0 rgba(255,255,255,.25);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 22px;
  border-radius: 0 6px 6px 0;
  background: #c4b5fd;
}
.nav-item .soon {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .6px;
  padding: 3px 7px;
  border-radius: 99px;
  background: rgba(245, 158, 11, .16);
  color: #fbbf24;
  text-transform: uppercase;
}
.nav-item.muted { opacity: .55; cursor: not-allowed; }
.nav-item.muted:hover { transform: none; background: transparent; color: #b9c4e8; }

.sidebar-foot {
  margin-top: auto;
  padding: 18px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.session-chip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: #c7d2f4;
}
.session-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); flex: none; }
.session-chip small { display: block; color: #8fa0d4; font-size: 10.5px; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 30px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(227, 232, 244, .9);
}
.topbar-title h1 { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.topbar-title p { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: .2s ease;
}
.icon-btn:hover { border-color: #c9d2ea; box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: .2s ease;
}
.user-btn:hover { box-shadow: var(--shadow-sm); border-color: #c9d2ea; }
.avatar {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-weight: 800; font-size: 14px;
  flex: none;
}
.user-meta { text-align: left; line-height: 1.2; }
.user-meta strong { display: block; font-size: 13px; }
.user-meta span { font-size: 11px; color: var(--muted); text-transform: capitalize; }

.dropdown {
  position: absolute;
  right: 0; top: calc(100% + 10px);
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  transition: .18s ease;
}
.dropdown.open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown-head strong { font-size: 13.5px; display: block; }
.dropdown-head span { font-size: 12px; color: var(--muted); }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.dropdown-item:hover { background: var(--surface-2); color: var(--ink); }
.dropdown-item.danger { color: var(--rose); }
.dropdown-item.danger:hover { background: #fff1f3; }

.content { padding: 28px 30px 46px; }

/* ---------------- Page head ---------------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, #4f46e5, #7c3aed);
  box-shadow: 0 12px 26px -12px rgba(79, 70, 229, .85);
}
.btn-primary:hover { box-shadow: 0 16px 32px -12px rgba(79, 70, 229, .95); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: #c9d2ea; box-shadow: var(--shadow-sm); }
.btn-danger { background: #fff1f3; color: #e11d48; border-color: #fecdd3; }
.btn-danger:hover { background: #ffe4e6; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }

/* ---------------- Cards ---------------- */
.card {
  background: var(--surface);
  border: 1px solid rgba(227, 232, 244, .9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 15px; font-weight: 800; letter-spacing: -.1px; }
.card-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(227, 232, 244, .9);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card::after {
  content: "";
  position: absolute;
  right: -40px; top: -50px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--glow, rgba(79, 70, 229, .1));
  filter: blur(4px);
}
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  color: #fff;
  background: var(--icon-bg, linear-gradient(135deg, #6366f1, #8b5cf6));
  box-shadow: 0 10px 20px -10px var(--icon-shadow, rgba(99, 102, 241, .9));
}
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -1px; margin-top: 16px; position: relative; z-index: 1; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; position: relative; z-index: 1; }
.stat-foot { margin-top: 12px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.stat-foot .up { color: var(--green); font-weight: 700; }

/* ---------------- Dashboard grid ---------------- */
.dash-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.dash-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.bars { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 42px; gap: 12px; align-items: center; }
.bar-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; border-radius: 99px; background: #eef1fa; overflow: hidden; }
.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  width: 0;
  transition: width 1s cubic-bezier(.22, 1, .36, 1);
}
.bar-value { font-size: 12px; font-weight: 800; color: var(--ink-soft); text-align: right; }

.donut-wrap { display: flex; align-items: center; gap: 26px; padding: 22px; flex-wrap: wrap; }
.donut {
  --g1: 55%; --g2: 78%;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: conic-gradient(#6366f1 0 var(--g1), #f472b6 var(--g1) var(--g2), #e2e8f4 var(--g2) 100%);
  position: relative;
  flex: none;
  box-shadow: var(--shadow-sm);
}
.donut::after {
  content: "";
  position: absolute; inset: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 2px 10px rgba(23, 37, 84, .06);
}
.donut-center {
  position: absolute; inset: 0;
  display: grid; place-content: center;
  text-align: center;
  z-index: 2;
}
.donut-center strong { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.donut-center span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.legend { display: flex; flex-direction: column; gap: 12px; font-size: 12.5px; }
.legend-row { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-weight: 600; }
.legend-dot { width: 10px; height: 10px; border-radius: 4px; flex: none; }
.legend-row b { margin-left: auto; color: var(--ink); }

/* ---------------- Table ---------------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--muted);
  font-weight: 800;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}
.data-table td { padding: 14px 22px; border-bottom: 1px solid #eef1f9; color: var(--ink-soft); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #f9faff; }
.cell-title { font-weight: 700; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--muted); }

.avatar-sm {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  flex: none;
}
.person { display: flex; align-items: center; gap: 11px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: #eef1fa;
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip.ok { background: #e7fbf3; color: #047857; }
.chip.warn { background: #fff7e6; color: #b45309; }
.chip.danger { background: #ffeef1; color: #be123c; }
.chip.info { background: #e8f4ff; color: #0369a1; }
.chip.purple { background: #f3edff; color: #6d28d9; }

/* ---------------- Activity ---------------- */
.activity { list-style: none; padding: 8px 22px 18px; }
.activity li { display: flex; gap: 13px; padding: 12px 0; border-bottom: 1px solid #f0f3fa; }
.activity li:last-child { border-bottom: 0; }
.activity-dot {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: #f1f0ff; color: #6d28d9;
  flex: none;
}
.activity-body p { font-size: 12.8px; font-weight: 600; color: var(--ink-soft); }
.activity-body span { font-size: 11px; color: var(--muted); }
.activity-body b { color: var(--ink); }

.empty { padding: 34px 22px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .icon { opacity: .4; margin-bottom: 8px; }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.field label .req { color: var(--rose); }
.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
  transition: border .2s ease, box-shadow .2s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #a5b4fc;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .13);
}
.textarea { resize: vertical; min-height: 96px; }
.hint { font-size: 11.5px; color: var(--muted); }
.error-text { font-size: 11.5px; color: var(--rose); font-weight: 600; }
.input.invalid { border-color: #fda4af; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters .select { width: auto; min-width: 180px; padding: 9px 12px; font-size: 12.5px; border-radius: 10px; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(9, 14, 34, .55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 26px;
  animation: pop .25s cubic-bezier(.22, 1, .36, 1);
}
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.modal p.sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.confirm-icon {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center;
  background: #fff1f3; color: #e11d48;
  margin-bottom: 14px;
}

@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------------- Toasts ---------------- */
.toast-stack { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 380px;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 13px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  animation: toastIn .35s cubic-bezier(.22, 1, .36, 1);
}
.toast.error { border-left-color: var(--rose); }
.toast.warn { border-left-color: var(--accent); }
.toast .icon { flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ---------------- Auth ---------------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #0b102a;
}
.auth-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 500px at 20% 20%, rgba(139, 92, 246, .5), transparent 60%),
    radial-gradient(600px 500px at 85% 80%, rgba(14, 165, 233, .38), transparent 60%),
    linear-gradient(160deg, #0e1330 0%, #1b1650 60%, #2b1059 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
}
.auth-visual::before, .auth-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  animation: float 9s ease-in-out infinite;
}
.auth-visual::before {
  width: 190px; height: 190px;
  top: 22%; right: 14%;
  background: linear-gradient(145deg, rgba(167,139,250,.75), rgba(99,102,241,.2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 40px 80px -30px rgba(167,139,250,.8);
}
.auth-visual::after {
  width: 120px; height: 120px;
  bottom: 22%; left: 12%;
  background: linear-gradient(145deg, rgba(251,191,36,.7), rgba(244,114,182,.25));
  animation-delay: -3s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 30px 60px -24px rgba(251,191,36,.7);
}
@keyframes float { 0%,100% { transform: translateY(0) rotate(0deg);} 50% { transform: translateY(-18px) rotate(6deg);} }

.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }
.auth-brand .brand-mark { width: 52px; height: 52px; font-size: 21px; border-radius: 16px; }
.auth-brand strong { display: block; font-size: 17px; }
.auth-brand span { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #a5b4fc; }

.auth-copy { position: relative; z-index: 2; max-width: 460px; }
.auth-copy h1 { font-size: 40px; line-height: 1.12; letter-spacing: -1.4px; font-weight: 800; }
.auth-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #a5b4fc, #f0abfc, #fcd34d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-copy p { margin-top: 16px; color: #b9c2e8; font-size: 14px; line-height: 1.7; }
.auth-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; position: relative; z-index: 2; }
.auth-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  padding: 8px 13px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  color: #dbe2ff;
}

.auth-form-side {
  background: #fbfcff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}
.login-card { width: min(420px, 100%); animation: rise .6s cubic-bezier(.22,1,.36,1); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.login-card .eyebrow {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--brand); font-weight: 800;
}
.login-card h2 { font-size: 28px; font-weight: 800; letter-spacing: -.8px; margin: 8px 0 6px; }
.login-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }
.login-card .field { margin-bottom: 16px; }
.login-card .input { padding: 13px 16px; font-size: 14px; border-radius: 13px; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.login-btn { width: 100%; justify-content: center; padding: 13px; font-size: 14px; border-radius: 13px; }
.login-note { margin-top: 22px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.6; }
.form-error {
  display: flex; align-items: center; gap: 8px;
  background: #fff1f3; border: 1px solid #fecdd3; color: #be123c;
  padding: 11px 13px; border-radius: 11px; font-size: 12.5px; font-weight: 600;
  margin-bottom: 16px;
}

.mobile-only { display: none; }
.sidebar-overlay { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .mobile-only { display: grid; }
  .sidebar-overlay {
    display: block; position: fixed; inset: 0; z-index: 45;
    background: rgba(9, 14, 34, .5); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  .sidebar-overlay.open { opacity: 1; pointer-events: auto; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
@media (max-width: 680px) {
  .content { padding: 20px 16px 40px; }
  .topbar { padding: 12px 16px; }
  .topbar-title p { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .user-meta { display: none; }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 21px; }
  .data-table th, .data-table td { padding: 11px 14px; }
  .auth-form-side { padding: 28px 20px; }
}

/* ---------------- Pagination ---------------- */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 18px 22px; flex-wrap: wrap; }
.page-link {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: .15s ease;
}
.page-link:hover { border-color: #c7d2fe; color: var(--brand); }
.page-link.current { background: linear-gradient(120deg, #4f46e5, #7c3aed); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -10px rgba(79,70,229,.9); }
.page-link.disabled { opacity: .4; pointer-events: none; }
.page-dots { align-self: center; color: var(--muted); padding: 0 4px; }

.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.table-toolbar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; }
.muted-note { color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.detail-item span { display: block; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.detail-item strong { font-size: 13.5px; color: var(--ink); font-weight: 700; }
.profile-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.profile-avatar {
  width: 88px; height: 88px; border-radius: 24px;
  display: grid; place-items: center;
  font-size: 32px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 18px 36px -18px rgba(99,102,241,.9);
  overflow: hidden;
  flex: none;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview { width: 84px; height: 84px; border-radius: 18px; object-fit: cover; border: 1px solid var(--line); background:#f2f5ff; }
.stat-line { display: flex; gap: 26px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.stat-line b { color: var(--ink); }
.modal form .form-grid { gap: 14px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { position: relative; }
.check-pill input { position: absolute; opacity: 0; }
.check-pill span {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--ink-soft); cursor: pointer; background: #fff;
}
.check-pill input:checked + span { background: #eef2ff; border-color: #a5b4fc; color: #4338ca; }

/* ---------------- Tabs / segmented / timetable ---------------- */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  padding: 9px 18px; border-radius: 11px; font-size: 13px; font-weight: 700;
  color: var(--muted); background: #fff; border: 1px solid var(--line); text-decoration: none;
}
.tab.active { background: linear-gradient(120deg,#6366f1,#8b5cf6); color: #fff; border-color: transparent; box-shadow: 0 10px 20px -12px rgba(99,102,241,.8); }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.seg { padding: 7px 13px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; background: #fff; border-right: 1px solid var(--line); }
.seg:last-child { border-right: 0; }
.seg input { display: none; }
.seg.on-present { background: #e7fbf3; color: #047857; }
.seg.on-absent { background: #ffeef1; color: #be123c; }
.seg.on-late { background: #fff7e6; color: #b45309; }
.seg.on-leave { background: #e8f4ff; color: #0369a1; }
.seg:hover { background: #f8fafc; }
.timetable { width: 100%; border-collapse: collapse; min-width: 760px; }
.timetable th { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.timetable td { border-bottom: 1px solid #eef2f8; padding: 8px; vertical-align: top; }
.tt-time { font-size: 12px; color: var(--muted); }
.tt-time strong { display: block; color: var(--ink); font-size: 12.5px; }
.tt-time span { font-size: 11px; }
.tt-slot { position: relative; background: #f5f3ff; border: 1px solid #e4defc; border-radius: 10px; padding: 9px 10px; min-height: 54px; }
.tt-slot strong { display: block; font-size: 12.5px; color: #4c1d95; }
.tt-slot span { font-size: 11px; color: #7c6bb0; }
.tt-slot form { position: absolute; top: 4px; right: 4px; }
.tt-x { border: 0; background: transparent; color: #a78bfa; cursor: pointer; font-size: 15px; line-height: 1; }
.tt-add { width: 100%; min-height: 54px; border: 1px dashed #d8d2f4; background: transparent; border-radius: 10px; color: #a5a0c2; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.tt-add:hover { background: #faf8ff; color: #6d28d9; }
.tt-empty { color: #cbd5e1; }
