/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; color: #0f172a; background: #fff; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; }

/* ===== DESIGN TOKENS ===== */
:root {
  --navy:   #1e3a5f;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --bg:     #f1f5f9;
  --surface: #ffffff;
  --text:   #0f172a;
  --muted:  #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
  --radius: 6px;
  --radius-md: 8px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: inline-block;
  line-height: 1.4;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: inline-block;
  line-height: 1.4;
  white-space: nowrap;
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-outline-dark {
  background: transparent;
  color: var(--text);
  padding: 11px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  display: inline-block;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-outline-dark:hover { border-color: var(--text); background: #f8fafc; }

.btn-ghost {
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: var(--radius);
  display: inline-block;
  transition: background 0.15s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--bg); }

.btn-lg { padding: 13px 28px; font-size: 15px; }

/* ===== LANDING NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links > a:not(.btn-primary):not(.btn-outline) {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 6px 12px; border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.nav-links > a:not(.btn-primary):not(.btn-outline):hover { color: var(--text); background: var(--bg); }

/* ===== HERO ===== */
/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-hero { animation: fadeInUp 0.8s ease both; }
.anim { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.anim.visible { opacity: 1; transform: translateY(0); }
.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }
.anim-delay-5 { transition-delay: 0.5s; }
.anim-delay-6 { transition-delay: 0.6s; }

/* ===== HERO ===== */
.hero {
  position: relative;
  background-image: url('../images/hero.png.jpeg');
  background-size: cover;
  background-position: center top;
  text-align: center;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.82) 0%, rgba(30,58,95,0.78) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eff6ff; color: var(--accent);
  padding: 5px 12px; border-radius: 4px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1px solid #bfdbfe;
}
.badge-light {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: 54px; font-weight: 800; line-height: 1.1;
  letter-spacing: -1.5px; margin-bottom: 20px;
  color: #fff;
}
.accent-light { color: #60a5fa; }
.hero-sub {
  font-size: 18px; color: rgba(255,255,255,0.8); margin-bottom: 40px;
  line-height: 1.65; max-width: 560px; margin-left: auto; margin-right: auto;
}
.hero-btns { display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 20px; }
.btn-hero-primary {
  background: var(--accent); color: #fff;
  padding: 14px 32px; border-radius: 8px;
  font-weight: 700; font-size: 15px;
  border: 2px solid var(--accent);
  display: inline-block; transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(37,99,235,0.4);
}
.btn-hero-primary:hover { background: #1d4ed8; border-color: #1d4ed8; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(37,99,235,0.5); }
.btn-hero-ghost {
  background: rgba(255,255,255,0.1); color: #fff;
  padding: 14px 32px; border-radius: 8px;
  font-weight: 700; font-size: 15px;
  border: 2px solid rgba(255,255,255,0.35);
  display: inline-block; transition: all 0.2s;
  backdrop-filter: blur(4px);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.hero-note { font-size: 13px; color: rgba(255,255,255,0.65); }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; margin: 0 12px; }

/* ===== SECTIONS ===== */
.section-inner { max-width: 1160px; margin: 0 auto; padding: 80px 24px; }
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}
.section-inner h2 {
  font-size: 36px; font-weight: 800; letter-spacing: -0.8px;
  margin-bottom: 12px; color: var(--text);
}
.section-sub { font-size: 17px; color: var(--muted); margin-bottom: 56px; line-height: 1.6; }

/* ===== FEATURES ===== */
.features { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features .section-inner { text-align: center; }
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; text-align: left;
}
.feature-card {
  background: var(--surface);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); transform: translateY(-4px); }
.feature-icon-wrap {
  width: 40px; height: 40px; border-radius: var(--radius);
  background: #eff6ff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; color: var(--accent);
}
.feature-icon-wrap svg { width: 20px; height: 20px; stroke-width: 1.75; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ===== PRICING ===== */
.pricing .section-inner { text-align: center; }
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; text-align: left;
}
.price-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px; position: relative;
  background: var(--surface);
  transition: box-shadow 0.15s;
}
.price-card:hover { box-shadow: var(--shadow-md); }
.price-card.featured { border-color: var(--accent); border-width: 2px; }
.popular-badge {
  position: absolute; top: -13px; left: 24px;
  background: var(--accent); color: #fff;
  padding: 3px 12px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; white-space: nowrap;
}
.price-tier { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.price { font-size: 40px; font-weight: 800; color: var(--text); letter-spacing: -1px; margin-bottom: 4px; }
.price span { font-size: 16px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.price-desc { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.price-divider { border: none; border-top: 1px solid var(--border); margin-bottom: 20px; }
.price-card ul { margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.price-card li { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.price-card li.included { color: var(--text); }
.price-card li svg { width: 15px; height: 15px; flex-shrink: 0; }
.price-card li.included svg { color: var(--accent); }
.price-card li.excluded svg { color: #cbd5e1; }
.price-card .btn-primary,
.price-card .btn-outline-dark {
  width: 100%; text-align: center; display: block;
  padding: 13px 20px; font-size: 14px; font-weight: 700;
  border-radius: 8px; transition: all 0.2s;
}
.price-card .btn-primary {
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}
.price-card .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,0.45); }
.price-card .btn-outline-dark:hover { transform: translateY(-2px); }

/* ===== FOOTER ===== */
.footer { background: #0f172a; color: #fff; }
.footer-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start;
}
.footer-brand .logo { color: #fff; display: block; margin-bottom: 8px; }
.footer-brand .logo span { color: var(--accent); }
.footer-brand p { color: #64748b; font-size: 14px; margin-top: 4px; line-height: 1.6; }
.footer-links-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.footer-links-col a { color: #64748b; font-size: 14px; transition: color 0.15s; }
.footer-links-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1160px; margin: 0 auto;
  padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom p { color: #475569; font-size: 13px; }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.auth-card {
  background: var(--surface); border-radius: var(--radius-md);
  padding: 40px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.auth-logo {
  font-size: 22px; font-weight: 800; letter-spacing: -0.3px;
  color: var(--text); margin-bottom: 4px;
}
.auth-logo span { color: var(--accent); }
.auth-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text);
}
.form-group label svg { width: 14px; height: 14px; color: var(--muted); }
.form-group input,
.form-group select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none; color: var(--text);
  background: var(--surface);
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group input::placeholder { color: #cbd5e1; }
.btn-full { width: 100%; padding: 11px; font-size: 14px; border: none; cursor: pointer; justify-content: center; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted); }
.auth-footer a { color: var(--accent); font-weight: 600; }
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; display: none; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* ===== APP SHELL ===== */
.app { display: flex; min-height: 100vh; background: var(--bg); }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 232px; background: var(--navy); color: #fff;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; overflow-x: hidden;
  border-right: none;
}
.sidebar-logo {
  padding: 20px; font-size: 18px; font-weight: 800; letter-spacing: -0.3px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.sidebar-logo span { color: var(--accent); }
.sidebar-school {
  padding: 10px 20px; font-size: 12px; color: rgba(255,255,255,0.45);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 500; letter-spacing: 0.02em;
  text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
  flex-shrink: 0;
}
.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255,255,255,0.3);
  padding: 8px 20px 4px; margin-top: 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,0.6); cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.nav-item svg { width: 16px; height: 16px; stroke-width: 1.75; flex-shrink: 0; }
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  border-left-color: rgba(255,255,255,0.15);
}
.nav-item.active {
  background: rgba(37,99,235,0.18);
  color: #ffffff;
  border-left-color: var(--accent);
}
.sidebar-bottom {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.logout-btn {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.45); font-size: 13.5px; cursor: pointer;
  padding: 8px 0; transition: color 0.15s; font-weight: 500;
}
.logout-btn svg { width: 16px; height: 16px; stroke-width: 1.75; }
.logout-btn:hover { color: rgba(255,255,255,0.85); }

/* ===== MAIN CONTENT ===== */
.main { margin-left: 232px; flex: 1; background: var(--bg); min-height: 100vh; }
.topbar {
  background: var(--surface); padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10; height: 56px;
}
.topbar h1 { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-badge {
  background: var(--navy); color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; letter-spacing: 0;
}

.content { padding: 28px 32px; }

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-box {
  background: var(--surface); border-radius: var(--radius-md); padding: 20px;
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 42px; height: 42px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; stroke-width: 1.75; }
.stat-icon.blue { background: #eff6ff; color: #2563eb; }
.stat-icon.green { background: #f0fdf4; color: #16a34a; }
.stat-icon.yellow { background: #fffbeb; color: #d97706; }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }
.stat-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; line-height: 1; }
.stat-title { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 3px; }

/* ===== CARDS ===== */
.card {
  background: var(--surface); border-radius: var(--radius-md);
  border: 1px solid var(--border); margin-bottom: 20px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h2 { font-size: 14px; font-weight: 700; color: var(--text); }
.card-body { padding: 0; }

/* ===== TABLES ===== */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 20px;
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: #f8fafc; text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 20px; font-size: 13.5px; color: var(--text);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8fafc; }

/* ===== STATUS BADGES ===== */
.badge-green { background: #f0fdf4; color: #15803d; padding: 2px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; border: 1px solid #bbf7d0; }
.badge-red { background: #fef2f2; color: #dc2626; padding: 2px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; border: 1px solid #fecaca; }
.badge-yellow { background: #fffbeb; color: #b45309; padding: 2px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; border: 1px solid #fde68a; }
.badge-blue { background: #eff6ff; color: #2563eb; padding: 2px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; border: 1px solid #bfdbfe; }

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px;
  min-width: 220px; max-width: 300px;
  transition: border-color 0.15s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.search-box input {
  border: none; background: none; font-size: 13px; outline: none;
  font-family: inherit; width: 100%; color: var(--text);
}
.search-box input::placeholder { color: #94a3b8; }
.toolbar select {
  padding: 7px 10px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px;
  font-family: inherit; outline: none; color: var(--text);
  background: var(--bg); cursor: pointer;
  transition: border-color 0.15s;
}
.toolbar select:focus { border-color: var(--accent); }
.toolbar input[type="date"] {
  padding: 7px 10px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px;
  font-family: inherit; outline: none; color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
}
.toolbar input[type="date"]:focus { border-color: var(--accent); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.45);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-md);
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 48px rgba(0,0,0,0.15);
  border: 1px solid var(--border);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-close {
  cursor: pointer; color: var(--muted); line-height: 1;
  width: 28px; height: 28px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }
.modal form { padding: 20px; }
.modal .form-group:last-of-type { margin-bottom: 0; }
.modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end;
  background: #fafbfd;
}

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty-icon { margin-bottom: 16px; color: #cbd5e1; display: flex; justify-content: center; }
.empty-icon svg { width: 40px; height: 40px; stroke-width: 1.25; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ===== LOADING ===== */
.loading { text-align: center; padding: 40px; color: var(--muted); font-size: 13px; }

/* ===== INLINE FORM INPUTS (results, attendance) ===== */
.marks-input {
  width: 72px; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; text-align: center; outline: none; font-family: inherit;
  transition: border-color 0.15s;
}
.marks-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }

/* ===== GRADE COLORS ===== */
.grade-A { color: #15803d; font-weight: 700; }
.grade-B { color: #2563eb; font-weight: 700; }
.grade-C { color: #b45309; font-weight: 700; }
.grade-D { color: #c2410c; font-weight: 700; }
.grade-F { color: #dc2626; font-weight: 700; }

/* ===== PAY BUTTON ===== */
.btn-pay {
  background: #f0fdf4; color: #15803d;
  border: 1px solid #bbf7d0; padding: 5px 12px;
  border-radius: var(--radius); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.btn-pay:hover { background: #dcfce7; }

/* ===== PAYMENT MODAL INFO ===== */
.payment-modal-info {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: var(--radius); padding: 14px;
  margin-bottom: 16px; font-size: 13px; color: #166534; line-height: 1.6;
}

/* ===== HAMBURGER BUTTON ===== */
.hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: var(--radius);
  color: var(--text); transition: background 0.15s;
}
.hamburger:hover { background: var(--bg); }
.hamburger svg { width: 20px; height: 20px; display: block; }

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}
.sidebar-overlay.open { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  /* Landing */
  .hero { min-height: 500px; }
  .hero-content { padding: 72px 20px 56px; }
  .hero h1 { font-size: 32px; letter-spacing: -0.8px; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .btn-hero-primary, .btn-hero-ghost { text-align: center; }
  .hero-note { display: flex; flex-direction: column; gap: 6px; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; align-items: stretch; text-align: center; }
  .hero-note { display: flex; flex-direction: column; gap: 6px; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn-primary):not(.btn-ghost) { display: none; }

  /* App shell */
  .hamburger { display: flex; align-items: center; justify-content: center; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 100;
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-value { font-size: 20px; }

  /* Content */
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .card-header { flex-wrap: wrap; gap: 8px; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .search-box { min-width: 100%; max-width: 100%; }

  /* Tables — horizontal scroll */
  .card-body { overflow-x: auto; }
  table { min-width: 600px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links-col { align-items: flex-start; }

  /* Auth */
  .auth-card { padding: 28px 20px; }

  /* Modals — near full screen on mobile */
  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 8px 8px;
  }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer button { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }

  /* Card headers — stack on mobile */
  .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-header > div { width: 100%; display: flex; gap: 8px; }
  .card-header > div > button { flex: 1; justify-content: center; }

  /* Touch targets — bigger buttons */
  .btn-primary, .btn-outline, .btn-ghost { padding: 11px 16px; font-size: 14px; }
  .btn-full { padding: 13px; font-size: 15px; }
  .form-group input, .form-group select { padding: 12px; font-size: 15px; }
  .nav-item { padding: 12px 20px; font-size: 14px; }

  /* Stats — 1 col on very small */
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .content { padding: 12px; }
  .toolbar { padding: 10px 12px; }
  td, th { padding: 10px 12px; font-size: 12.5px; }
  .modal-overlay { padding: 0; }
  .modal { border-radius: 16px 16px 0 0; max-height: 96vh; }
}
