/* ═══════════════════════════════════════════════════════════
   SMARTSCHOOL OS — DESIGN SYSTEM
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #04070f;
  --bg-2:         #060b18;
  --bg-3:         #0a1024;

  --blue:         #3B82F6;
  --blue-2:       #60A5FA;
  --blue-3:       #93C5FD;
  --blue-dim:     rgba(59,130,246,0.12);
  --blue-border:  rgba(59,130,246,0.22);

  --indigo:       #6366F1;
  --indigo-2:     #818CF8;
  --indigo-3:     #A5B4FC;

  --purple:       #8B5CF6;
  --purple-2:     #A78BFA;
  --purple-3:     #C4B5FD;

  --green:        #10B981;
  --green-2:      #34D399;
  --green-3:      #6EE7B7;
  --green-dim:    rgba(16,185,129,0.12);
  --green-border: rgba(16,185,129,0.22);

  --orange:       #F97316;
  --orange-2:     #FB923C;
  --amber:        #F59E0B;
  --red:          #EF4444;
  --red-dim:      rgba(239,68,68,0.12);
  --red-border:   rgba(239,68,68,0.22);

  --white:        #FFFFFF;
  --text:         rgba(255,255,255,0.72);
  --text-2:       rgba(255,255,255,0.55);
  --muted:        rgba(255,255,255,0.35);
  --faint:        rgba(255,255,255,0.18);

  --border:       rgba(255,255,255,0.08);
  --border-hi:    rgba(255,255,255,0.14);
  --border-blue:  rgba(99,102,241,0.35);

  --glass:        rgba(255,255,255,0.04);
  --glass-hi:     rgba(255,255,255,0.08);

  --r-xs: 6px;
  --r-sm: 8px;
  --r:    12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-2xl: 44px;

  --shadow-card: 0 12px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  --shadow-hover: 0 24px 60px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.10);
  --shadow-lift: 0 40px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--white);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ═══════════════════════════════════════════════════════════
   ANIMATED MESH BACKGROUND
═══════════════════════════════════════════════════════════ */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh-bg::before,
.mesh-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
}

.mesh-bg::before {
  width: 720px; height: 720px;
  background: radial-gradient(circle, #3B82F6, #6366F1 60%, transparent);
  top: -220px; left: -200px;
  animation: orbDrift1 22s ease-in-out infinite alternate;
}

.mesh-bg::after {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #10B981, #0EA5E9 60%, transparent);
  bottom: -140px; right: -100px;
  animation: orbDrift2 18s ease-in-out infinite alternate;
}

.mesh-orb3 {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, #8B5CF6, transparent 70%);
  filter: blur(100px);
  opacity: 0.14;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: orbDrift3 26s ease-in-out infinite alternate;
}

.mesh-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

.mesh-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

@keyframes orbDrift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(120px, 80px) scale(1.15); }
}
@keyframes orbDrift2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-100px, -60px) scale(1.1); }
}
@keyframes orbDrift3 {
  from { transform: translate(-50%,-50%) scale(1); }
  to   { transform: translate(-50%,-50%) scale(1.3); opacity: 0.18; }
}

body > *:not(.mesh-bg) { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════════════════ */
h1 { font-size: clamp(40px, 5.2vw, 76px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
h2 { font-size: clamp(30px, 3.6vw, 52px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }
h3 { font-size: clamp(18px, 2vw, 24px);   font-weight: 600; letter-spacing: -0.025em; line-height: 1.3; }
h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.4; }

.gradient-text {
  background: linear-gradient(135deg, #93C5FD 0%, #60A5FA 35%, #818CF8 75%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

.gradient-green {
  background: linear-gradient(135deg, #6EE7B7, #34D399, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ═══════════════════════════════════════════════════════════
   BADGES / EYEBROW
═══════════════════════════════════════════════════════════ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(147,197,253,0.9);
  background: rgba(59,130,246,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(59,130,246,0.25);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 22px;
}

.eyebrow .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #60A5FA;
  box-shadow: 0 0 6px #60A5FA;
  animation: dotPulse 2.2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px currentColor; }
  50%       { opacity: 0.4; box-shadow: 0 0 2px currentColor; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid;
}
.badge-blue   { background: rgba(59,130,246,0.10); color: var(--blue-3); border-color: rgba(59,130,246,0.25); }
.badge-green  { background: rgba(16,185,129,0.10); color: var(--green-3); border-color: rgba(16,185,129,0.25); }
.badge-purple { background: rgba(139,92,246,0.10); color: var(--purple-3); border-color: rgba(139,92,246,0.25); }
.badge-amber  { background: rgba(245,158,11,0.10); color: #FCD34D; border-color: rgba(245,158,11,0.25); }
.badge-red    { background: rgba(239,68,68,0.10); color: #FCA5A5; border-color: rgba(239,68,68,0.25); }
.badge-gray   { background: rgba(255,255,255,0.04); color: var(--text); border-color: var(--border); }

/* ═══════════════════════════════════════════════════════════
   GLASS UTILITIES
═══════════════════════════════════════════════════════════ */
.glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.09);
}

.glass-strong {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.12);
}

.glass-inset {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  transition: left 0s;
}
.btn:hover::after { left: 160%; transition: left 0.55s ease; }

.btn-primary {
  background: linear-gradient(135deg, #3B82F6, #6366F1);
  color: #fff;
  padding: 13px 24px;
  border-radius: var(--r);
  box-shadow: 0 4px 20px rgba(99,102,241,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 36px rgba(99,102,241,0.55), 0 0 0 1px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:active { transform: translateY(0) scale(0.99); }

.btn-lg { font-size: 16px; padding: 18px 36px; border-radius: var(--r-lg); }
.btn-sm { font-size: 13px; padding: 9px 16px; border-radius: var(--r-sm); }

.btn-ghost {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: rgba(255,255,255,0.85);
  padding: 12px 22px;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
  transform: translateY(-1px);
}

.btn-green {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--r);
  box-shadow: 0 4px 24px rgba(16,185,129,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-green:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 40px rgba(16,185,129,0.55), 0 0 0 1px rgba(16,185,129,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
}
.btn-icon:hover { background: rgba(255,255,255,0.08); border-color: var(--border-hi); color: #fff; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT PRIMITIVES
═══════════════════════════════════════════════════════════ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { position: relative; }
.section { padding: 110px 0; }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}
.section-header h2 { margin-bottom: 18px; }
.section-header p { font-size: 17px; color: var(--text); font-weight: 400; line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION (Marketing)
═══════════════════════════════════════════════════════════ */
nav.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: padding 0.4s ease;
}

nav.top-nav.scrolled { padding: 10px 24px; }

.nav-glass {
  max-width: 1180px;
  margin: 0 auto;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(4,7,15,0.6);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--r-xl);
  padding: 0 8px 0 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: all 0.4s ease;
}

nav.top-nav.scrolled .nav-glass {
  background: rgba(4,7,15,0.8);
  box-shadow: 0 12px 48px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; letter-spacing: -0.03em;
  color: var(--white);
}
.nav-logo .logo-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3B82F6, #6366F1, #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}
.nav-logo span.accent { color: #60A5FA; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
  letter-spacing: -0.01em;
}
.nav-links a:hover { color: var(--white); }

/* ═══════════════════════════════════════════════════════════
   APP SHELL — Sidebar + main area
═══════════════════════════════════════════════════════════ */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(4,7,15,0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  overflow-y: auto;
  z-index: 10;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }

.sb-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 4px 10px 18px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 700; letter-spacing: -0.03em;
}
.sb-brand .logo-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #3B82F6, #6366F1, #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}

.sb-school {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.2s;
}
.sb-school:hover { background: rgba(255,255,255,0.06); border-color: var(--border-hi); }
.sb-school-emblem {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e3a8a, #312e81);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.sb-school-info { flex: 1; min-width: 0; }
.sb-school-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-school-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.sb-school i { font-size: 14px; color: var(--muted); }

.sb-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 12px 8px;
}

.sb-nav { display: flex; flex-direction: column; gap: 2px; }

.sb-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.18s;
  cursor: pointer;
  position: relative;
}
.sb-link i { font-size: 17px; width: 17px; text-align: center; flex-shrink: 0; }
.sb-link:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.sb-link.active {
  color: var(--white);
  background: linear-gradient(90deg, rgba(99,102,241,0.18), rgba(99,102,241,0.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.sb-link.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 6px; bottom: 6px;
  width: 3px;
  background: linear-gradient(180deg, #60A5FA, #818CF8);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px rgba(99,102,241,0.6);
}

.sb-link-count {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: var(--text-2);
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 22px;
  text-align: center;
}
.sb-link-count.urgent { background: rgba(239,68,68,0.18); color: #FCA5A5; }
.sb-link-count.fresh { background: rgba(59,130,246,0.18); color: var(--blue-3); }

.sb-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sb-user {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.2s;
}
.sb-user:hover { background: rgba(255,255,255,0.04); }
.sb-user-av {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, #2563EB, #6366F1);
  flex-shrink: 0;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* Main content area */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(4,7,15,0.55);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-title {
  display: flex; flex-direction: column;
}
.topbar-title h1 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.topbar-title .crumbs {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.topbar-search {
  flex: 1;
  max-width: 520px;
  margin: 0 auto 0 32px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--white);
  font-family: inherit;
  font-size: 13.5px;
  transition: all 0.2s;
}
.topbar-search input:focus {
  outline: none;
  border-color: rgba(99,102,241,0.5);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.topbar-search input::placeholder { color: var(--muted); }
.topbar-search i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--muted);
  pointer-events: none;
}
.topbar-search .kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}

.topbar-actions {
  display: flex; align-items: center; gap: 10px;
}

/* Content area inside main */
.content {
  padding: 28px;
  flex: 1;
}
.content-narrow { max-width: 1200px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.card:hover { border-color: var(--border-hi); }

.card-hover {
  cursor: pointer;
}
.card-hover:hover {
  transform: translateY(-2px);
  border-color: var(--border-hi);
  box-shadow: var(--shadow-hover);
}

.card-pad-sm { padding: 16px; }
.card-pad-lg { padding: 32px; }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
}
.card-title .icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}
.card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
  letter-spacing: 0;
}
.card-action {
  font-size: 12.5px;
  color: var(--blue-2);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer;
}
.card-action:hover { color: #fff; }

/* Grid helpers */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-12 { grid-template-columns: repeat(12, 1fr); }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-7 { grid-column: span 7; }

/* ═══════════════════════════════════════════════════════════
   STAT TILES
═══════════════════════════════════════════════════════════ */
.stat-tile {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}
.stat-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent, rgba(99,102,241,0.5)), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.stat-tile:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.stat-tile:hover::before { opacity: 1; }

.stat-tile-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.stat-tile-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-tile-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.icon-blue   { background: var(--blue-dim); color: var(--blue-3); border: 1px solid var(--blue-border); }
.icon-green  { background: var(--green-dim); color: var(--green-3); border: 1px solid var(--green-border); }
.icon-purple { background: rgba(139,92,246,0.12); color: var(--purple-3); border: 1px solid rgba(139,92,246,0.22); }
.icon-amber  { background: rgba(245,158,11,0.12); color: #FCD34D; border: 1px solid rgba(245,158,11,0.22); }
.icon-red    { background: var(--red-dim); color: #FCA5A5; border: 1px solid var(--red-border); }
.icon-cyan   { background: rgba(6,182,212,0.12); color: #67E8F9; border: 1px solid rgba(6,182,212,0.22); }

.stat-tile-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-tile-delta {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.delta-up   { color: var(--green-2); }
.delta-down { color: #FCA5A5; }
.stat-tile-sub { font-size: 12px; color: var(--muted); margin-left: 6px; font-weight: 400; }

/* ═══════════════════════════════════════════════════════════
   TABLES (data lists)
═══════════════════════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}
.data-table tbody td {
  padding: 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 22px; }

.row-person {
  display: flex; align-items: center; gap: 11px;
}
.row-av {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700;
  color: #fff; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
}
.av-blue { background: linear-gradient(135deg, #2563EB, #6366F1); }
.av-green { background: linear-gradient(135deg, #059669, #10B981); }
.av-orange { background: linear-gradient(135deg, #EA580C, #F97316); }
.av-purple { background: linear-gradient(135deg, #7C3AED, #A78BFA); }
.av-pink { background: linear-gradient(135deg, #DB2777, #F472B6); }
.av-teal { background: linear-gradient(135deg, #0D9488, #2DD4BF); }
.av-amber { background: linear-gradient(135deg, #D97706, #F59E0B); }
.av-slate { background: linear-gradient(135deg, #475569, #94A3B8); }
.row-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.row-name { font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.row-sub  { font-size: 11.5px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   ACTIVITY LIST
═══════════════════════════════════════════════════════════ */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; line-height: 1.55; }
.activity-text strong { font-weight: 600; }
.activity-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ═══════════════════════════════════════════════════════════
   CHARTS (SVG, decorative)
═══════════════════════════════════════════════════════════ */
.chart-axis { stroke: rgba(255,255,255,0.06); stroke-width: 1; }
.chart-grid { stroke: rgba(255,255,255,0.04); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-text { fill: rgba(255,255,255,0.4); font-size: 10px; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500; }
.chart-line-blue { stroke: url(#gradBlue); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-green { stroke: url(#gradGreen); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-area-blue { fill: url(#areaBlue); }
.chart-area-green { fill: url(#areaGreen); }

.bar-chart-row { display: flex; flex-direction: column; gap: 12px; }
.bcr { display: flex; align-items: center; gap: 12px; }
.bcr-label { font-size: 12px; color: var(--text-2); width: 80px; flex-shrink: 0; }
.bcr-track { flex: 1; height: 8px; background: rgba(255,255,255,0.04); border-radius: 100px; overflow: hidden; }
.bcr-fill { height: 100%; border-radius: 100px; transition: width 1s cubic-bezier(0.34,1.56,0.64,1); }
.bcr-fill.blue { background: linear-gradient(90deg, #3B82F6, #818CF8); }
.bcr-fill.green { background: linear-gradient(90deg, #10B981, #34D399); }
.bcr-fill.amber { background: linear-gradient(90deg, #F59E0B, #FCD34D); }
.bcr-fill.purple { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }
.bcr-val { font-size: 12px; font-weight: 700; width: 44px; text-align: right; flex-shrink: 0; }

/* Donut/gauge */
.donut-stat {
  position: relative;
  width: 130px; height: 130px;
  display: flex; align-items: center; justify-content: center;
}
.donut-stat svg { transform: rotate(-90deg); }
.donut-track { stroke: rgba(255,255,255,0.06); fill: none; stroke-width: 10; }
.donut-fill { fill: none; stroke-width: 10; stroke-linecap: round; }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-value { font-size: 26px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.donut-label { font-size: 10.5px; color: var(--muted); margin-top: 4px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════
   CHAT / MESSAGES preview
═══════════════════════════════════════════════════════════ */
.chat-list { display: flex; flex-direction: column; gap: 4px; }
.chat-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.chat-item:hover { background: rgba(255,255,255,0.04); }
.chat-item.unread { background: rgba(59,130,246,0.06); }
.chat-name { font-size: 13px; font-weight: 600; }
.chat-name .channel-prefix { color: var(--muted); font-weight: 500; margin-right: 1px; }
.chat-preview { font-size: 12px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.chat-body { flex: 1; min-width: 0; }
.chat-badge {
  background: var(--blue);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   ROLE SWITCHER PILLS
═══════════════════════════════════════════════════════════ */
.role-pills {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 100px;
}
.role-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
}
.role-pill.active {
  background: linear-gradient(135deg, #3B82F6, #6366F1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}
.role-pill:not(.active):hover { color: #fff; background: rgba(255,255,255,0.05); }

/* ═══════════════════════════════════════════════════════════
   PAGE-LEVEL HEROES
═══════════════════════════════════════════════════════════ */
.page-hero {
  padding: 36px 28px 28px;
  border-bottom: 1px solid var(--border);
}
.page-hero-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.page-hero h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.page-hero p { font-size: 14px; color: var(--text-2); max-width: 580px; }

/* ═══════════════════════════════════════════════════════════
   GRADEBOOK
═══════════════════════════════════════════════════════════ */
.gradebook {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
}
.gb-scroll { overflow-x: auto; }
.gb-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}
.gb-table thead th {
  position: sticky; top: 0;
  background: rgba(10,16,36,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 14px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  color: var(--text-2);
}
.gb-table thead th .assignment-head {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 92px;
}
.gb-table thead th .ah-title { font-size: 11.5px; color: var(--white); font-weight: 600; letter-spacing: -0.01em; }
.gb-table thead th .ah-meta { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.gb-table tbody td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.gb-table tbody td.student-cell {
  position: sticky; left: 0;
  background: rgba(10,16,36,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2;
  min-width: 220px;
  border-right: 1px solid var(--border);
}
.gb-table thead th.student-cell {
  position: sticky; left: 0;
  z-index: 3;
  background: rgba(10,16,36,0.98);
  border-right: 1px solid var(--border);
  min-width: 220px;
}
.gb-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.gb-table tbody tr:hover td.student-cell { background: rgba(20,28,56,0.95); }

.grade-cell {
  font-weight: 700;
  font-size: 13.5px;
  text-align: center;
  min-width: 72px;
  letter-spacing: -0.02em;
}
.g-a { color: var(--green-2); }
.g-b { color: var(--blue-2); }
.g-c { color: #FCD34D; }
.g-d { color: var(--orange-2); }
.g-f { color: #FCA5A5; }
.g-missing {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.g-late {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.g-late::after {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--orange);
}

.gb-row-avg {
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  background: rgba(99,102,241,0.05);
  border-left: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   FORM ELEMENTS
═══════════════════════════════════════════════════════════ */
input[type=text], input[type=email], input[type=search], textarea, select {
  font-family: inherit;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 13.5px;
  transition: all 0.2s;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(99,102,241,0.5);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
input::placeholder, textarea::placeholder { color: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
footer {
  padding: 64px 0 36px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 13.5px; color: var(--text-2); margin-top: 18px; max-width: 280px; line-height: 1.65; }
.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a {
  font-size: 13.5px;
  color: var(--text-2);
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}

/* ═══════════════════════════════════════════════════════════
   MISC HELPERS
═══════════════════════════════════════════════════════════ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.text-muted { color: var(--muted); }
.text-text { color: var(--text); }
.text-green { color: var(--green-2); }
.text-blue { color: var(--blue-2); }
.text-amber { color: var(--amber); }
.text-red { color: #FCA5A5; }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .col-8 { grid-column: span 12; }
  .col-7 { grid-column: span 12; }
  .col-6 { grid-column: span 12; }
  .col-5 { grid-column: span 12; }
  .col-4 { grid-column: span 12; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; left: -280px; width: 260px; transition: left 0.3s; }
  .sidebar.open { left: 0; }
  .g-3, .g-4 { grid-template-columns: 1fr; }
  .g-2 { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
