/* ============================================
   YCC Student Management System — Styles
   Retro-Futuristic Dark Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --cyan: #00F5FF;
  --cyan-dim: rgba(0, 245, 255, 0.15);
  --cyan-glow: rgba(0, 245, 255, 0.4);
  --violet: #BF5FFF;
  --violet-dim: rgba(191, 95, 255, 0.15);
  --violet-glow: rgba(191, 95, 255, 0.4);
  --lime: #C8FF00;
  --lime-dim: rgba(200, 255, 0, 0.12);
  --orange: #FF7A2F;
  --orange-dim: rgba(255, 122, 47, 0.15);

  --bg-base: #080B14;
  --bg-surface: #0D1120;
  --bg-card: #111827;
  --bg-card-hover: #161f35;
  --bg-elevated: #1a2540;
  --border: rgba(255,255,255,0.07);
  --border-bright: rgba(255,255,255,0.14);

  --text-primary: #F0F4FF;
  --text-secondary: #8B9CC8;
  --text-muted: #4A5578;

  --sidebar-w: 260px;
  --topbar-h: 68px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  --font-display: 'Clash Display', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s 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-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Particle Canvas ── */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-slow);
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: -100px; left: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--violet-dim) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -60px;
  width: 250px; height: 250px;
  background: radial-gradient(circle, var(--cyan-dim) 0%, transparent 70%);
  pointer-events: none;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
}

.logo-icon svg { width: 100%; height: 100%; }

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 12px 8px 6px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  position: relative;
  transition: all var(--transition);
  cursor: pointer;
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--cyan-dim), var(--violet-dim));
  color: var(--text-primary);
  border: 1px solid rgba(0, 245, 255, 0.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: linear-gradient(to bottom, var(--cyan), var(--violet));
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg { width: 100%; height: 100%; }

.nav-label { flex: 1; }

.nav-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: var(--bg-base);
  letter-spacing: 0.5px;
}

.nav-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 7px;
  border-radius: 99px;
}

/* Sidebar User */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--bg-base);
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.user-logout {
  width: 30px; height: 30px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.user-logout:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.user-logout svg { width: 14px; height: 14px; }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  position: relative;
  z-index: 1;
  transition: margin-left var(--transition-slow);
}

/* ── Topbar ── */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: rgba(8, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.breadcrumb-root { color: var(--text-muted); }
.breadcrumb svg { color: var(--text-muted); }
.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.topbar-center { flex: 1; max-width: 480px; margin: 0 auto; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  transition: all var(--transition);
}

.search-bar:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.search-bar svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar kbd {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  font-family: var(--font-body);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-btn {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition);
}

.topbar-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.topbar-btn svg { width: 16px; height: 16px; }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  border: 1.5px solid var(--bg-base);
}

.notif-dot span {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--orange);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0; }
}

.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--bg-base);
  cursor: pointer;
}

/* ============================================
   PAGES
   ============================================ */
.page {
  display: none;
  padding: 28px;
  animation: fadeSlideIn 0.35s ease forwards;
}

.page.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   WELCOME BANNER
   ============================================ */
.welcome-banner {
  background: linear-gradient(135deg, var(--bg-card) 0%, #0f1a35 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: 200px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--violet-dim) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 100px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--cyan-dim) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-greeting {
  font-size: 14px;
  color: var(--cyan);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 30%, var(--cyan) 70%, var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 8px;
}

.welcome-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Orbit Animation */
.welcome-visual {
  position: relative;
  width: 140px; height: 140px;
  flex-shrink: 0;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.ring-1 {
  width: 60px; height: 60px;
  border-color: rgba(0, 245, 255, 0.3);
  animation: orbit 4s linear infinite;
}

.ring-2 {
  width: 95px; height: 95px;
  border-color: rgba(191, 95, 255, 0.25);
  animation: orbit 7s linear infinite reverse;
}

.ring-3 {
  width: 130px; height: 130px;
  border-color: rgba(200, 255, 0, 0.15);
  animation: orbit 11s linear infinite;
}

.ring-1::after, .ring-2::after, .ring-3::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  top: -3px; left: 50%;
  transform: translateX(-50%);
}

.ring-1::after { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.ring-2::after { background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.ring-3::after { background: var(--lime); box-shadow: 0 0 8px var(--lime); }

@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.orbit-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
}

.orbit-center svg { width: 100%; height: 100%; }

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.stat-card[data-color="cyan"]::before { background: radial-gradient(circle at top right, var(--cyan-dim), transparent 60%); }
.stat-card[data-color="violet"]::before { background: radial-gradient(circle at top right, var(--violet-dim), transparent 60%); }
.stat-card[data-color="lime"]::before { background: radial-gradient(circle at top right, var(--lime-dim), transparent 60%); }
.stat-card[data-color="orange"]::before { background: radial-gradient(circle at top right, var(--orange-dim), transparent 60%); }

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card[data-color="cyan"] .stat-icon { background: var(--cyan-dim); color: var(--cyan); }
.stat-card[data-color="violet"] .stat-icon { background: var(--violet-dim); color: var(--violet); }
.stat-card[data-color="lime"] .stat-icon { background: var(--lime-dim); color: var(--lime); }
.stat-card[data-color="orange"] .stat-icon { background: var(--orange-dim); color: var(--orange); }

.stat-icon svg { width: 18px; height: 18px; }

.stat-info { display: flex; flex-direction: column; gap: 2px; }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card[data-color="cyan"] .stat-value { color: var(--cyan); }
.stat-card[data-color="violet"] .stat-value { color: var(--violet); }
.stat-card[data-color="lime"] .stat-value { color: var(--lime); }
.stat-card[data-color="orange"] .stat-value { color: var(--orange); }

.stat-change {
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
}

.stat-change.positive { color: #4ade80; }
.stat-change.negative { color: var(--orange); }

.stat-sparkline {
  height: 36px;
  margin-top: auto;
}

/* ============================================
   CHARTS
   ============================================ */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--transition);
}

.chart-card:hover {
  border-color: var(--border-bright);
}

.chart-card.wide { }
.chart-card.full-width { width: 100%; }

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.chart-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.chart-tab {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 5px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.chart-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ============================================
   BOTTOM ROW
   ============================================ */
.bottom-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}

.table-card, .activity-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   DATA TABLE
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table.full { width: 100%; }

.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: var(--bg-elevated);
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.student-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

.student-id {
  font-size: 11px;
  color: var(--text-muted);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
}

.badge-active { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.badge-active::before { background: #4ade80; }
.badge-inactive { background: var(--orange-dim); color: var(--orange); }
.badge-inactive::before { background: var(--orange); }
.badge-graduated { background: var(--cyan-dim); color: var(--cyan); }
.badge-graduated::before { background: var(--cyan); }
.badge-present { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.badge-present::before { background: #4ade80; }
.badge-absent { background: rgba(255, 122, 47, 0.12); color: var(--orange); }
.badge-absent::before { background: var(--orange); }
.badge-late { background: var(--violet-dim); color: var(--violet); }
.badge-late::before { background: var(--violet); }
.badge-paid { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.badge-paid::before { background: #4ade80; }
.badge-pending { background: var(--orange-dim); color: var(--orange); }
.badge-pending::before { background: var(--orange); }

/* ============================================
   ACTIVITY FEED
   ============================================ */
.live-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #4ade80;
  font-weight: 600;
}

.live-dot span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s infinite;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 320px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  animation: slideInRight 0.4s ease forwards;
}

.activity-item:last-child { border-bottom: none; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.activity-content { flex: 1; }

.activity-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.activity-text strong { color: var(--text-primary); }

.activity-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ============================================
   STUDENTS GRID
   ============================================ */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  transition: all var(--transition);
}

.filter-search:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.filter-search svg { color: var(--text-muted); flex-shrink: 0; }

.filter-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
}

.filter-search input::placeholder { color: var(--text-muted); }

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-select:focus {
  border-color: var(--cyan);
}

.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.student-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.student-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

.student-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.student-card[data-color="cyan"]::before { background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.student-card[data-color="violet"]::before { background: linear-gradient(90deg, var(--violet), var(--orange)); }
.student-card[data-color="lime"]::before { background: linear-gradient(90deg, var(--lime), var(--cyan)); }
.student-card[data-color="orange"]::before { background: linear-gradient(90deg, var(--orange), var(--violet)); }

.sc-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.sc-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.sc-id {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.sc-course {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sc-course svg { width: 12px; height: 12px; color: var(--text-muted); }

.sc-stats {
  display: flex;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.sc-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sc-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.sc-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   COURSES GRID
   ============================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

.course-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.course-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.course-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.course-meta {
  display: flex;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.course-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.course-meta-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.course-meta-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.course-progress {
  margin-top: 14px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1s ease;
}

/* ============================================
   ATTENDANCE
   ============================================ */
.attendance-wrap { display: flex; flex-direction: column; gap: 20px; }

.attendance-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.att-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
}

.att-stat:hover { transform: translateY(-2px); }

.att-num {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.att-stat[data-color="cyan"] .att-num { color: var(--cyan); }
.att-stat[data-color="orange"] .att-num { color: var(--orange); }
.att-stat[data-color="violet"] .att-num { color: var(--violet); }
.att-stat[data-color="lime"] .att-num { color: var(--lime); }

.att-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.attendance-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
}

.date-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.date-input:focus { border-color: var(--cyan); }

/* ============================================
   GRADES
   ============================================ */
.grades-wrap { display: flex; flex-direction: column; gap: 20px; }
.mt-20 { margin-top: 20px; }

.grade-letter {
  font-weight: 700;
  font-size: 14px;
}

.grade-A { color: #4ade80; }
.grade-B { color: var(--cyan); }
.grade-C { color: var(--lime); }
.grade-D { color: var(--orange); }
.grade-F { color: #f87171; }

/* ============================================
   TEACHERS GRID
   ============================================ */
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.teacher-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}

.teacher-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.teacher-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 auto 14px;
  border: 2px solid var(--border);
}

.teacher-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.teacher-subject {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.teacher-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ============================================
   SCHEDULE
   ============================================ */
.schedule-grid {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.schedule-header {
  display: grid;
  grid-template-columns: 80px repeat(5, 1fr);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.schedule-header-cell {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.schedule-row {
  display: grid;
  grid-template-columns: 80px repeat(5, 1fr);
  border-bottom: 1px solid var(--border);
}

.schedule-row:last-child { border-bottom: none; }

.schedule-time {
  padding: 16px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-cell {
  padding: 10px;
  border-right: 1px solid var(--border);
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-cell:last-child { border-right: none; }

.schedule-class {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

/* ============================================
   FEES
   ============================================ */
.fees-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.fee-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}

.fee-num {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.fee-stat[data-color="lime"] .fee-num { color: var(--lime); }
.fee-stat[data-color="orange"] .fee-num { color: var(--orange); }
.fee-stat[data-color="cyan"] .fee-num { color: var(--cyan); }

.fee-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ============================================
   REPORTS
   ============================================ */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
  cursor: pointer;
}

.report-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
}

.report-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.report-card[data-color="cyan"] .report-icon { background: var(--cyan-dim); color: var(--cyan); }
.report-card[data-color="violet"] .report-icon { background: var(--violet-dim); color: var(--violet); }
.report-card[data-color="lime"] .report-icon { background: var(--lime-dim); color: var(--lime); }
.report-card[data-color="orange"] .report-icon { background: var(--orange-dim); color: var(--orange); }

.report-icon svg { width: 22px; height: 22px; }

.report-card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.report-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.settings-section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: all var(--transition);
  resize: vertical;
}

.form-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.theme-options {
  display: flex;
  gap: 8px;
}

.theme-opt {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.theme-opt.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}

.toggle {
  position: relative;
  display: inline-block;
  width: 40px; height: 22px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border-radius: 99px;
  cursor: pointer;
  transition: all var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition);
}

.toggle input:checked + .toggle-slider { background: var(--cyan-dim); border: 1px solid var(--cyan); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: var(--cyan); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-base);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--cyan-glow);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-icon {
  width: 30px; height: 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-icon:hover { color: var(--cyan); border-color: var(--cyan); }
.btn-icon svg { width: 13px; height: 13px; }

.mt-10 { margin-top: 10px; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition);
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  width: 32px; height: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover { color: var(--orange); border-color: var(--orange); }
.modal-close svg { width: 14px; height: 14px; }

.modal-form { display: flex; flex-direction: column; gap: 14px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  z-index: 300;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { border-color: #4ade80; color: #4ade80; }
.toast.error { border-color: var(--orange); color: var(--orange); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .bottom-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,0.5);
  }

  .main-content { margin-left: 0; }

  .menu-toggle { display: flex; }

  .topbar-center { display: none; }

  .welcome-visual { display: none; }

  .attendance-summary { grid-template-columns: repeat(2, 1fr); }
  .fees-summary { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .welcome-title { font-size: 22px; }
  .form-row { grid-template-columns: 1fr; }
}