/* ================================================================
   Royal Thoughts Comprehensive School — UI stylesheet
   Identity: Royal navy + gold. Modern, clean, accessible.
   ================================================================ */

:root {
  --royal-50: #eef2fc;
  --royal-100: #dce5f8;
  --royal-200: #b8c9ef;
  --royal-400: #4a6bd0;
  --royal-600: #2450b6;
  --royal-700: #1a3a86;
  --royal: #1d3f8f;
  --royal-dark: #122a63;
  --royal-deep: #0b1c44;
  --gold-soft: #fbf3d9;
  --gold-100: #fdf3d7;
  --gold: #d9a523;
  --gold-600: #c18d16;
  --gold-700: #8a6a12;
  --gold-strong: #e9b932;
  --ink: #17202e;
  --muted: #5f6b7e;
  --line: #e3e8f0;
  --bg: #f3f5fb;
  --white: #ffffff;
  --green: #14905a;
  --green-soft: #e1f6ec;
  --red: #c0392b;
  --red-soft: #fdecec;
  --grad-royal: linear-gradient(135deg, #2c56b8 0%, #122a63 100%);
  --grad-gold: linear-gradient(135deg, #f2c94c 0%, #d9a523 100%);
  --shadow-xs: 0 1px 2px rgba(18, 42, 99, 0.06);
  --shadow-sm: 0 2px 8px rgba(18, 42, 99, 0.08);
  --shadow-md: 0 10px 30px rgba(18, 42, 99, 0.10);
  --shadow-lg: 0 24px 60px rgba(11, 28, 68, 0.18);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* clip (not hidden) so position:sticky headers/navs keep working
     in Safari/iOS — hidden turns the page into a scroll container,
     which makes sticky scroll away instead of remaining visible. */
  overflow-x: clip;
}

a { color: var(--royal-600); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--royal); text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }

::selection { background: var(--royal-100); color: var(--royal-dark); }

:focus-visible {
  outline: 3px solid rgba(29, 63, 143, 0.35);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--grad-royal);
  color: #fff;
  box-shadow: 0 4px 12px rgba(18, 42, 99, 0.22);
}
.btn-primary:hover { background: var(--royal-dark); box-shadow: 0 6px 16px rgba(18, 42, 99, 0.28); color: #fff; }

.btn-gold {
  background: var(--grad-gold);
  color: #3c2d06;
  box-shadow: 0 4px 12px rgba(201, 141, 22, 0.25);
}
.btn-gold:hover { background: #c7931d; color: #3c2d06; box-shadow: 0 6px 16px rgba(201, 141, 22, 0.32); }

.btn-outline { background: var(--white); border-color: var(--line); color: var(--royal-600); box-shadow: var(--shadow-xs); }
.btn-outline:hover { border-color: var(--royal-400); color: var(--royal); background: var(--royal-50); }

/* Plain white outline button — used on hero page */
.btn-outline-white {
  background: var(--white);
  border-color: var(--white);
  color: var(--royal-700);
  box-shadow: var(--shadow-xs);
}
.btn-outline-white:hover {
  border-color: var(--royal-400);
  color: var(--royal);
  background: var(--royal-50);
}

.btn-danger-outline { background: var(--white); border-color: #f1c4be; color: var(--red); }
.btn-danger-outline:hover { background: var(--red-soft); }

.btn-sm { padding: 5px 10px; font-size: 0.78rem; border-radius: 6px; }

.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }

.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: var(--royal-100);
  color: var(--royal-700);
}
.badge.gold { background: var(--gold-soft); color: #8a6a12; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-600);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad-gold); }

/* ---------- landing page ---------- */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

.site-header {
  background: rgba(11, 28, 68, 0.92);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.22rem; color: #fff; }
.brand:hover { color: #fff; }
.brand .crest {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--grad-gold);
  color: var(--royal-deep);
  display: grid; place-items: center;
  font-size: 1.15rem; font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(233, 185, 50, 0.35);
}
.brand small { display: block; font-weight: 500; font-size: 0.72rem; color: #9fb0dd; letter-spacing: 0.2px; }

.nav-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav-links a { color: #cdd8f2; padding: 8px 13px; border-radius: 9px; font-weight: 600; font-size: 0.92rem; }
.nav-links a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-links .btn-gold { color: #3c2d06; }

/* hero */
.hero {
  background: radial-gradient(1100px 500px at 85% -10%, rgba(74, 107, 208, 0.55), transparent 60%),
              radial-gradient(900px 460px at -10% 110%, rgba(217, 165, 35, 0.28), transparent 55%),
              var(--grad-royal);
  color: #fff;
  padding: 92px 0 84px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}
.hero::after {
  content: "";
  position: absolute;
  right: -140px; top: -140px;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 185, 50, 0.4), transparent 70%);
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #eef2fc;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-strong); box-shadow: 0 0 0 4px rgba(233, 185, 50, 0.25); }
.hero h1 { font-size: 3rem; margin-bottom: 18px; letter-spacing: -0.02em; }
.hero h1 span { background: linear-gradient(100deg, #f6d98a, #e9b932); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #d7e0f7; font-size: 1.12rem; margin-bottom: 30px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: 30px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}
.hero-card h3 { color: var(--gold-strong); margin-bottom: 6px; font-size: 1.15rem; }
.hero-card .card-tag { color: #9fb0dd; font-size: 0.82rem; margin-bottom: 16px; }
.hero-card ul { list-style: none; }
.hero-card li { padding: 7px 0; color: #e4eafb; display: flex; gap: 10px; align-items: center; font-size: 0.96rem; }
.hero-card li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: rgba(233, 185, 50, 0.18); border: 1px solid var(--gold-strong); flex-shrink: 0; }
.hero-card li b { color: #fff; }

.hero-highlights {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-highlight-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(4px);
}
.hero-highlight-item svg {
  width: 18px;
  height: 18px;
  color: var(--gold-strong);
}

/* sections */
.section { padding: 72px 0; }
.section.alt { background: var(--white); border-block: 1px solid var(--line); }
.section .lead { color: var(--muted); max-width: 680px; margin-top: 12px; font-size: 1.02rem; }
.section h2 { margin-top: 6px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; margin-top: 38px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--royal-200); }
.card .icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  margin-bottom: 18px;
  background: var(--royal-100);
  color: var(--royal-700);
  box-shadow: inset 0 0 0 1px rgba(29, 63, 143, 0.08);
}
.card .icon svg { width: 26px; height: 26px; }
.card.gold-card .icon { background: var(--gold-soft); color: #8a6a12; }
.card h3 { margin-bottom: 8px; font-size: 1.08rem; }
.card p { color: var(--muted); font-size: 0.94rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-top: 40px; }
.stat {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 16px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat .num {
  font-size: 2.1rem;
  font-weight: 800;
  background: var(--grad-royal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat .lbl { color: var(--muted); font-size: 0.9rem; }

.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 38px; }
.feature-list .card { box-shadow: var(--shadow-xs); padding: 24px 26px; }
.feature-list .card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.feature-list h4 { margin-bottom: 6px; color: var(--royal-700); font-size: 1.02rem; }
.feature-list h4::after { content: ""; display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--grad-gold); margin-top: 10px; }

.cta {
  background: radial-gradient(800px 400px at 50% 0%, rgba(74, 107, 208, 0.45), transparent 60%), var(--grad-royal);
  color: #fff;
  text-align: center;
  padding: 72px 22px;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.cta .wrap { position: relative; z-index: 2; }
.cta h2 { margin-bottom: 12px; }
.cta p { color: #d7e0f7; margin-bottom: 28px; }

.site-footer {
  background: var(--royal-deep);
  color: #a7b4d6;
  padding: 48px 0 26px;
  font-size: 0.92rem;
}
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.site-footer h4 { color: #fff; margin-bottom: 12px; font-size: 1rem; }
.site-footer ul { list-style: none; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: #a7b4d6; }
.site-footer a:hover { color: var(--gold-strong); }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 18px; text-align: center; font-size: 0.85rem; color: #7f8db4; }

/* ---------- auth / login ---------- */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 480px at 90% -10%, rgba(74, 107, 208, 0.6), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(217, 165, 35, 0.25), transparent 55%),
    var(--grad-royal);
  padding: 26px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 38px;
  width: 100%;
  max-width: 430px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--grad-gold);
}
.auth-card .brand { justify-content: center; margin-bottom: 8px; color: var(--royal-dark); }
.auth-card .brand small { color: var(--muted); }
.auth-card h2 { text-align: center; margin-bottom: 6px; font-size: 1.6rem; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 26px; font-size: 0.94rem; }

.field { margin-bottom: 17px; }
.field label { display: block; font-weight: 600; font-size: 0.86rem; margin-bottom: 7px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--royal-400);
  box-shadow: 0 0 0 4px rgba(36, 80, 182, 0.14);
  background: #fff;
}
.field input::placeholder { color: #9aa6ba; }

.form-error {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid #f5c6be;
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: none;
}
.form-error.show { display: block; }

.demo-accounts {
  margin-top: 24px;
  border-top: 1px dashed var(--line);
  padding-top: 20px;
}
.demo-accounts h4 { font-size: 0.78rem; margin-bottom: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; }
.demo-chip {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.8rem;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
  font-family: var(--font);
}
.demo-chip:hover { border-color: var(--royal-400); background: var(--royal-50); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.demo-chip b { display: block; font-size: 0.84rem; color: var(--ink); }
.demo-chip span { color: var(--muted); font-size: 0.75rem; word-break: break-all; }

.auth-back { text-align: center; margin-top: 20px; font-size: 0.9rem; }
.auth-back a { color: var(--royal-600); font-weight: 600; }
.auth-back a:hover { color: var(--gold-strong); }

/* ---------- registration ---------- */
.auth-card.register-card { max-width: 470px; }

.role-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
.role-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: all 0.16s ease;
  width: 100%;
}
.role-card:hover { border-color: var(--royal-400); background: var(--royal-50); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.role-card.active { border-color: var(--royal); background: var(--royal-50); box-shadow: 0 0 0 3px rgba(36, 80, 182, 0.16); }
.role-card .r-ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--royal-100); color: var(--royal-700);
  flex-shrink: 0;
  transition: all 0.16s ease;
}
.role-card .r-ico svg { width: 22px; height: 22px; }
.role-card.active .r-ico { background: var(--grad-royal); color: #fff; }
.role-card b { display: block; font-size: 0.96rem; color: var(--ink); }
.role-card small { color: var(--muted); font-size: 0.78rem; }

.form-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
  color: var(--royal-700);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.form-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

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

.field .hint { display: block; margin-top: 5px; color: var(--muted); font-size: 0.78rem; }
.field .opt { color: var(--muted); font-weight: 500; font-size: 0.78rem; }

.parent-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--gold-soft);
  border: 1px solid #f0e2b8;
  color: #7a5d10;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.success-panel { text-align: center; }
.success-icon {
  width: 66px; height: 66px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  background: var(--green-soft); color: var(--green);
  box-shadow: inset 0 0 0 2px rgba(20, 144, 90, 0.15);
}
.success-icon svg { width: 34px; height: 34px; }
.success-panel h3 { margin-bottom: 4px; }

.cred-box {
  margin: 18px 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  background: var(--bg);
}
.cred-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.cred-row:last-child { border-bottom: none; }
.cred-row span:first-child { color: var(--muted); flex-shrink: 0; }
.cred-row code { font-weight: 700; color: var(--royal-700); word-break: break-all; }
.cred-note { padding: 11px 14px 0; font-size: 0.82rem; color: var(--muted); border-bottom: 1px solid var(--line); }

/* ---------- dashboard ---------- */
.dash {
  display: grid;
  grid-template-columns: 258px 1fr;
  height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--royal-deep) 0%, var(--royal-dark) 100%);
  color: #cdd8f2;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar .brand { padding: 22px 20px 18px; color: #fff; }
.sidebar .nav { flex: 1; padding: 8px 12px; overflow-y: auto; }
.sidebar .nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #c7d2ee;
  font-family: var(--font);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  position: relative;
}
.sidebar .nav button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar .nav button.active {
  background: linear-gradient(90deg, rgba(36, 80, 182, 0.95), rgba(29, 63, 143, 0.85));
  color: #fff;
  box-shadow: 0 4px 14px rgba(11, 28, 68, 0.4);
}
.sidebar .nav button.active::before {
  content: "";
  position: absolute;
  left: 0; top: 20%;
  height: 60%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold-strong);
}
.sidebar .nav button .ico { width: 22px; display: grid; place-items: center; flex-shrink: 0; }
.sidebar .nav button .ico svg { width: 20px; height: 20px; }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.sidebar-user .meta { min-width: 0; }
.sidebar-user .meta b { display: block; color: #fff; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .meta span { font-size: 0.75rem; color: #9fb0dd; text-transform: capitalize; }
.logout-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #a52727;
  border: 1px solid #bb3030;
  color: #fff;
  border-radius: 9px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.logout-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.logout-btn:hover { background: #8c1f1f; border-color: #d04848; color: #fff; }

.main {
  padding: 30px 36px 56px;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  background:
    radial-gradient(800px 320px at 100% 0%, rgba(29, 63, 143, 0.05), transparent 60%);
}

/* topbar (greeting) */
.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.topbar .eyebrow { margin-bottom: 6px; }
.topbar .top-title { font-size: 1.9rem; margin-bottom: 4px; }
.topbar .top-sub { color: var(--muted); font-size: 0.95rem; }
.today-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.today-chip svg { width: 20px; height: 20px; color: var(--royal-600); }

/* profile */
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; }
.profile-card { text-align: center; }
.avatar-lg {
  width: 132px; height: 132px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  font-size: 2.6rem; font-weight: 800; color: #fff;
  background: var(--grad-royal);
  box-shadow: 0 10px 28px rgba(29, 63, 143, 0.35);
  border: 5px solid #fff;
  outline: 2px solid var(--royal-200);
}
.avatar-lg img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.profile-card h2 { margin-bottom: 2px; }
.profile-card .role-line { color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }

.detail-list { list-style: none; }
.detail-list li { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.detail-list li:last-child { border-bottom: none; }
.detail-list .k { color: var(--muted); flex-shrink: 0; }
.detail-list .v { font-weight: 600; text-align: right; word-break: break-word; }

/* tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--white);
  border: 1px solid var(--line);
}
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 13px 16px; text-align: left; font-size: 0.92rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th {
  background: var(--royal-50);
  color: var(--royal-700);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.6px;
  position: sticky;
  top: 0;
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background 0.12s ease; }
table.data tbody tr:hover { background: #f8faff; }
table.data .num { text-align: center; }
table.data input[type="number"] {
  width: 84px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  font-size: 0.92rem;
  font-family: var(--font);
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
table.data input[type="number"]:focus { outline: none; border-color: var(--royal-400); box-shadow: 0 0 0 3px rgba(36, 80, 182, 0.14); background: #fff; }
table.data .actions { white-space: nowrap; }

table.data .student-pick {
  width: 100%;
  min-width: 190px;
  max-width: 250px;
  padding: 9px 36px 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475677' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
table.data .student-pick:hover { border-color: var(--royal-400); }
table.data .student-pick:focus {
  outline: none;
  border-color: var(--royal-400);
  box-shadow: 0 0 0 3px rgba(36, 80, 182, 0.14);
  background-color: #fff;
}
table.data .student-pick.placeholder { color: var(--muted); font-weight: 500; }
table.data .student-pick option { font-weight: 500; color: var(--ink); }

table.data tr.new-row td { background: var(--royal-50); }
table.data tr.new-row:hover td { background: #eef3fd; }

.row-remove {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #f1c4be;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  cursor: pointer;
  transition: all 0.15s ease;
}
.row-remove svg { width: 14px; height: 14px; }
.row-remove:hover { background: var(--red); border-color: var(--red); color: #fff; }

.grade-pill {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  background: var(--royal-100); color: var(--royal-700);
}
.grade-pill.g { background: var(--green-soft); color: var(--green); }
.grade-pill.b { background: #fff3d6; color: #9a7413; }
.grade-pill.a { background: #e7ecfb; color: var(--royal-600); }
.grade-pill.p { background: var(--red-soft); color: var(--red); }

.pill-x {
  border: none;
  background: transparent;
  color: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0 2px;
  margin-left: 2px;
  line-height: 1;
}
.pill-x:hover { color: var(--red); }

/* section cards */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
  animation: fadeUp 0.3s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.panel h2 { font-size: 1.22rem; margin-bottom: 4px; }
.panel .panel-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

/* activities */
.activity-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 16px; }
.activity {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(180deg, #fffdf7, #fdfbf6);
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.activity:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.activity h4 { font-size: 1rem; margin-bottom: 4px; }
.activity .meta { color: var(--muted); font-size: 0.83rem; margin-bottom: 6px; }
.activity .ach { font-size: 0.88rem; color: var(--royal-600); font-weight: 600; }

/* subjects chips */
.subj-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.subj-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--ink);
}
.subj-chip b { color: var(--royal-700); }

.alloc-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.alloc-tab {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.16s ease;
}
.alloc-tab:hover { border-color: var(--royal-400); color: var(--royal-600); }
.alloc-tab.active { background: var(--grad-royal); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(18, 42, 99, 0.3); }

.alloc-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--royal-50);
  color: var(--royal-700);
  border-radius: 20px;
  padding: 2px 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.alloc-tab.active .alloc-badge { background: rgba(255,255,255,0.2); color: #fff; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-num { font-size: 1.5rem; font-weight: 800; color: var(--royal); }
.stat-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px; }

/* attendance */
.att-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 22px; }
.att-summary .stat .num { font-size: 1.6rem; }
.att-dates { display: flex; flex-wrap: wrap; gap: 8px; }
.att-date {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.att-date .x { color: var(--red); cursor: pointer; font-weight: 800; }
.att-date .x:hover { color: #7f1d12; }

/* child selector for parents */
.child-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.child-tab {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  transition: all 0.16s ease;
}
.child-tab:hover { border-color: var(--royal-400); color: var(--royal-600); }
.child-tab.active { background: var(--grad-royal); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(18, 42, 99, 0.3); }

/* toast */
#toast {
  position: fixed;
  bottom: 26px; right: 26px;
  background: var(--royal-deep);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.25s ease;
  pointer-events: none;
  font-size: 0.92rem;
  max-width: 360px;
  border-left: 4px solid var(--gold-strong);
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.error { border-left-color: #f59b8f; background: var(--red); }

.loading { text-align: center; color: var(--muted); padding: 44px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--royal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- dashboard home cards ---------- */
.dash-home { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.dash-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: box-shadow 0.15s ease;
}
.dash-card:hover { box-shadow: var(--shadow-md); }
.dash-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}
.dash-card-icon.royal { background: var(--royal-50); color: var(--royal-700); }
.dash-card-icon.gold { background: var(--gold-100); color: var(--gold-700); }
.dash-card-icon.green { background: var(--green-soft); color: var(--green); }
.dash-card-icon.red { background: var(--red-soft); color: var(--red); }
.dash-card b { display: block; font-size: 1.4rem; color: var(--ink); margin-bottom: 2px; }
.dash-card span { font-size: 0.82rem; color: var(--muted); }

/* ---------- announcements / notices ---------- */
.notice-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.notice-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  border-left: 4px solid var(--royal);
}
.notice-item.gold-border { border-left-color: var(--gold); }
.notice-item h4 { font-size: 0.95rem; margin-bottom: 4px; color: var(--ink); }
.notice-item p { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.notice-item .notice-date { font-size: 0.78rem; color: var(--royal-400); margin-top: 6px; }

/* ---------- attendance calendar ---------- */
.att-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 18px;
}
.att-cal-head {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  padding: 6px 0;
}
.att-cal-day {
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
  position: relative;
}
.att-cal-day.present {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--green);
}
.att-cal-day.today {
  outline: 2px solid var(--royal);
  outline-offset: -1px;
}
.att-cal-day.empty { background: transparent; border-color: transparent; }

/* ---------- student timetable placeholder ---------- */
.timetable-grid {
  display: grid;
  grid-template-columns: 90px repeat(5, 1fr);
  gap: 2px;
  margin-top: 18px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.timetable-cell {
  background: var(--white);
  padding: 10px 12px;
  font-size: 0.85rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.timetable-cell.head {
  background: var(--royal-50);
  font-weight: 700;
  color: var(--royal-700);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.timetable-cell .subj { font-weight: 600; color: var(--ink); }
.timetable-cell .time { font-size: 0.78rem; color: var(--muted); }
.timetable-cell.today { background: var(--gold-soft); }
.timetable-cell.head.today { background: linear-gradient(90deg, var(--royal-50), var(--gold-soft)); }

/* ---------- children summary cards (parent) ---------- */
.children-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 24px; }
.child-summary-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}
.child-summary-card:hover { box-shadow: var(--shadow-md); border-color: var(--royal-300); transform: translateY(-2px); }
.child-summary-card.active { border-color: var(--royal); box-shadow: 0 0 0 2px rgba(29,63,143,0.15); }
.child-summary-card h4 { margin-bottom: 4px; }
.child-summary-card .child-meta { font-size: 0.88rem; color: var(--muted); }
.child-summary-card .child-avg { font-size: 1.6rem; font-weight: 800; color: var(--royal); margin-top: 10px; }
.child-summary-card .child-avg span { font-size: 0.82rem; font-weight: 500; color: var(--muted); }

/* ---------- dashboard extras ---------- */
.main > section[data-section] { display: none; }
.main > section[data-section]:first-of-type { display: block; }

.avatar-sm {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #f2c94c, #c18d16);
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.avatar-sm img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.photo-upload { display: block; margin: -4px 0 12px; }
.photo-upload input { display: none; }
.photo-upload .btn { margin: 0; }

.info-strip {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--royal-50), #f6f8ff);
  border: 1px solid #d5def7;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 22px;
  font-size: 0.92rem;
}
.info-strip > div { min-width: 0; }
.info-strip b { color: var(--royal-dark); display: block; font-size: 0.95rem; }
.info-strip span { color: var(--muted); font-size: 0.85rem; }

.cu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cu-grid .field { margin-bottom: 0; }

.mark-controls {
  display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 22px;
}
.mark-controls .field { margin-bottom: 0; }

.empty { color: var(--muted); text-align: center; padding: 36px 0; }
.sub-toggle { display: flex; gap: 8px; margin: 18px 0 16px; }
.sub-toggle button {
  border: 1px solid var(--line); background: var(--white);
  padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  font-family: var(--font);
  cursor: pointer; transition: all 0.15s ease;
}
.sub-toggle button:hover { border-color: var(--royal-400); color: var(--royal-600); }
.sub-toggle button.active { background: var(--grad-royal); color: #fff; border-color: transparent; }

/* ---------- school fees ---------- */
.fee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
.fee-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.fee-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  margin-bottom: 14px;
}
.fee-card-head h3 { margin: 0 0 4px; font-size: 1.02rem; }
.fee-card-head .meta { color: var(--muted); font-size: 0.82rem; }
.fee-status {
  display: inline-block;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.fee-status.paid { background: rgba(34,197,94,0.12); color: #15803d; }
.fee-status.owing { background: rgba(245,158,11,0.15); color: #b45309; }
.fee-card-stats {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.fee-card-stats > div {
  flex: 1; min-width: 0;
  background: #f6f8fd; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.fee-card-stats b { display: block; font-size: 0.95rem; color: var(--royal-dark); }
.fee-card-stats .neg b { color: #b45309; }
.fee-card-stats span { color: var(--muted); font-size: 0.75rem; }
.fee-card-foot {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.fee-history { margin-top: 14px; }
.fee-modal-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.fee-modal-grid .span2 { grid-column: 1 / -1; }
.readonly-val {
  padding: 10px 12px;
  background: #f6f8fd;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 700; color: var(--royal-dark);
}
.note {
  font-size: 0.82rem; color: var(--muted);
  background: #f6f8fd; border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.info-strip .neg b { color: #b45309; }
.text-ok { color: #15803d; }
.text-warn { color: #b45309; }
.fee-status { color: var(--muted); }

.att-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.att-toolbar select,
.att-toolbar input[type="number"],
.att-toolbar input[type="text"] {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--ink);
  transition: all 0.15s ease;
}
.att-toolbar select:focus,
.att-toolbar input[type="number"]:focus,
.att-toolbar input[type="text"]:focus {
  outline: none;
  border-color: var(--royal-400);
  box-shadow: 0 0 0 3px rgba(36, 80, 182, 0.14);
  background: #fff;
}
.today-note { font-size: 0.9rem; color: var(--muted); }

/* ---------- landing: why-us ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 38px;
}
.why-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--royal-200); }
.why-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--royal-50);
  color: var(--royal-700);
  margin-bottom: 16px;
  box-shadow: inset 0 0 0 1px rgba(29, 63, 143, 0.06);
}
.why-icon svg { width: 24px; height: 24px; }
.why-card h4 { margin-bottom: 8px; font-size: 1.02rem; color: var(--ink); }
.why-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

/* ---------- landing: academics ---------- */
.academic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 38px;
}
.academic-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.academic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.academic-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-gold);
}
.academic-num {
  display: inline-block;
  background: var(--grad-royal);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}
.academic-card h4 { margin-bottom: 8px; font-size: 1.1rem; }
.academic-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 14px; }
.academic-card .subj-list { margin-top: auto; }

/* ---------- landing: testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 38px;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.testimonial-stars {
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.testimonial-text {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--ink);
  flex: 1;
  font-style: italic;
  margin-bottom: 18px;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.testimonial-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--grad-royal);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.testimonial-author b { display: block; font-size: 0.9rem; color: var(--ink); }
.testimonial-author span { font-size: 0.8rem; color: var(--muted); }

/* ---------- landing: CTA actions ---------- */
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- landing: footer ---------- */
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-brand p { color: #8a9ac2; }
.footer-col h4 { color: #fff; margin-bottom: 14px; font-size: 0.95rem; }
.footer-col ul { list-style: none; }
.footer-col li { padding: 5px 0; font-size: 0.9rem; }
.footer-col a { color: #8a9ac2; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--gold-strong); }
.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  display: grid; place-items: center;
  color: #8a9ac2;
  transition: all 0.15s ease;
}
.footer-social a:hover { border-color: var(--gold-strong); color: var(--gold-strong); background: rgba(233,185,50,0.08); }

/* ---------- landing: mission & vision ---------- */
.mv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 38px;
}
.motto-strip {
  margin: 34px auto 0;
  max-width: 720px;
  text-align: center;
  background: linear-gradient(135deg, rgba(11, 28, 68, 0.04), rgba(233, 185, 50, 0.12));
  border: 1px dashed var(--gold-strong);
  border-radius: var(--radius-lg);
  padding: 18px 26px;
}
.motto-strip .motto-flag {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--royal-600);
  margin-bottom: 6px;
}
.motto-strip b {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}
.mv-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mv-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mv-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--grad-royal);
  color: #fff;
  margin: 0 auto 20px;
}
.mv-icon svg { width: 28px; height: 28px; }
.mv-card h3 { margin-bottom: 12px; font-size: 1.15rem; color: var(--ink); }
.mv-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; }

/* ---------- landing: campus gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 38px;
}
.gallery-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-placeholder {
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.gallery-placeholder svg { width: 48px; height: 48px; }
.gallery-placeholder span { font-weight: 700; font-size: 0.88rem; opacity: 0.8; }
.gallery-item p { padding: 16px 18px; font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ---------- landing: term dates ---------- */
.term-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 38px;
}
.term-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.term-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.term-badge {
  display: inline-block;
  background: var(--grad-gold);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 5px 18px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}
.term-card h4 { margin-bottom: 16px; font-size: 1.05rem; color: var(--ink); }
.term-dates { display: flex; flex-direction: column; gap: 8px; }
.term-dates div { font-size: 0.9rem; color: var(--muted); }
.term-dates b { color: var(--ink); }

/* ---------- landing: newsletter ---------- */
.newsletter { margin-top: 22px; }
.newsletter h4 { color: #fff; font-size: 0.95rem; margin-bottom: 10px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: var(--font);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.newsletter-form input::placeholder { color: #8a9ac2; }
.newsletter-form input:focus { border-color: var(--gold-strong); }
.newsletter-form .btn { padding: 10px 18px; font-size: 0.85rem; flex-shrink: 0; }
.newsletter-note { font-size: 0.78rem; color: #6a7aaa; margin-top: 8px; }

/* ---------- landing: scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: #c3cee8 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #c3cee8; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background-color: #a7b6dd; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- hamburger toggle ---------- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 60;
  flex-shrink: 0;
}
.menu-toggle span,
.sidebar-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle.open span:nth-child(1),
.sidebar-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2),
.sidebar-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3),
.sidebar-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.sidebar-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 12px 8px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.15s ease;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.sidebar-toggle:hover { background: rgba(255, 255, 255, 0.18); }

.sidebar-toggle span {
  width: 20px;
  height: 2.5px;
  margin: 3px 0;
}
.sidebar-toggle.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.sidebar-toggle.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ---------- print ---------- */
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--royal-700);
  cursor: pointer;
  transition: all 0.15s ease;
}
.print-btn:hover { border-color: var(--royal-400); background: var(--royal-50); color: var(--royal); }
.print-btn svg { width: 16px; height: 16px; }

.panel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-actions .btn svg { width: 15px; height: 15px; }

/* ---------- admin dashboard: counts, quick actions, empty states ---------- */
.count-pill {
  display: inline-block;
  min-width: 26px;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--royal-50);
  color: var(--royal-700);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}
.count-pill:empty { display: none; }

.home-h3 { margin: 24px 0 12px; font-size: 1.1rem; }

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.empty-state .empty-ico { font-size: 1.8rem; margin-bottom: 8px; }
.empty-state p { margin: 0; }

/* ---------- impersonation banner ---------- */
.impersonation-bar {
  background: #92400e;
  color: #fff;
  text-align: center;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.impersonation-bar b { color: #fde68a; }

.result-student-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--royal-50);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.result-student-head b { font-size: 1.05rem; }

@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; padding: 24px; background: #fff; }
  .print-header { display: block !important; text-align: center; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 2px solid #1d3f8f; }
  .print-header h1 { font-size: 1.4rem; color: #1d3f8f; margin-bottom: 2px; }
  .print-header p { color: #5f6b7e; font-size: 0.85rem; }
  .print-header .print-school { font-size: 1.1rem; font-weight: 800; letter-spacing: 0.5px; }
  .print-meta { display: block !important; margin-bottom: 14px; font-size: 0.85rem; color: #333; }
  .print-meta span { font-weight: 700; }
  .print-area table.data { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
  .print-area table.data th,
  .print-area table.data td { padding: 8px 10px; border: 1px solid #ccc; }
  .print-area table.data th { background: #eef2fc; color: #1d3f8f; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; }
  .print-footer { display: block !important; margin-top: 28px; padding-top: 12px; border-top: 1px solid #ccc; font-size: 0.75rem; color: #999; text-align: center; }
  .print-grade-legend { display: block !important; margin-top: 12px; font-size: 0.75rem; color: #555; }
  .no-print { display: none !important; }
}

/* ---------- landing: hero photo, about, facilities, news ---------- */
.hero-photo .hero-img {
  position: absolute; inset: 0;
  background: url('../img/hero-campus.jpg') center 35% / cover no-repeat;
  opacity: 0.28;
}
.hero-photo::before { z-index: 1; }
.hero-photo .wrap { z-index: 3 !important; }

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 44px;
  align-items: center;
  margin-bottom: 48px;
}
.about-media { position: relative; }
.about-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.about-float-card {
  position: absolute;
  right: -14px; bottom: -20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  display: flex; flex-direction: column;
  border-left: 4px solid var(--gold-strong);
}
.about-float-card b { font-size: 1.15rem; color: var(--royal); }

.gallery-photo {
  height: 210px;
  overflow: hidden;
}
.gallery-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-item:hover .gallery-photo img { transform: scale(1.06); }
.gallery-item figcaption { padding: 16px 18px 18px; }
.gallery-item h4 { margin-bottom: 6px; }

.facility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.facility-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.facility-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.facility-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.facility-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.facility-body h4 { font-size: 1.02rem; }
.facility-body p { color: var(--muted); font-size: 0.9rem; line-height: 1.65; flex: 1; }
.facility-stat { background: linear-gradient(135deg, var(--royal), #24409e); color: #fff; justify-content: center; }
.facility-stat h4 { color: var(--gold-strong); }
.facility-stat p { color: #d7e0f7; }
.facility-stat .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- landing: digital campus hub ---------- */
.portal-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.portal-role-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 250px;
  padding: 24px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.portal-role-card:hover {
  border-color: var(--royal-200);
  box-shadow: var(--shadow-md);
}
.portal-role-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 18px;
  border-radius: 14px;
  color: var(--royal-700);
  background: var(--royal-100);
  display: grid;
  place-items: center;
  align-self: center;
}
.portal-role-card.gold-card {
  border-top: 3px solid var(--gold-strong);
}
.portal-role-card.gold-card .portal-role-icon {
  color: #8a6a12;
  background: var(--gold-soft);
}
.portal-role-icon svg {
  width: 28px;
  height: 28px;
}
.portal-role-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: var(--ink);
}
.portal-role-card p {
  flex: 1;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 18px;
}
.portal-login-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--royal-600);
  font-size: 0.84rem;
  font-weight: 700;
}
.portal-login-link:hover {
  color: var(--royal);
}
.portal-role-card.gold-card .portal-login-link {
  color: var(--gold-700);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.news-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-date {
  flex-shrink: 0;
  width: 56px; height: 62px;
  background: var(--royal-100);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.news-date b { font-size: 1.25rem; color: var(--royal); line-height: 1.1; }
.news-date span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--royal-700, var(--royal)); font-weight: 700; }
.news-body h4 { margin-bottom: 6px; font-size: 1rem; }
.news-body p { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.news-meta { margin-bottom: 8px; }
.news-meta .grade-pill { font-size: 0.75rem; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-float-card { right: 10px; }
}

/* ================================================================
   INTERACTIVE & MODERN UPGRADES
   ================================================================ */

/* ---------- top notice banner ---------- */
.top-notice-bar {
  background: var(--royal-deep);
  color: #e2e8f0;
  font-size: 0.82rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-notice-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top-notice-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.notice-pill {
  background: var(--gold-strong);
  color: #2b1d03;
  padding: 3px 9px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.top-notice-text {
  color: #cbd5e1;
}
.top-notice-text b {
  color: #fff;
}
.top-notice-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.top-notice-link {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  transition: color 0.15s ease;
}
.top-notice-link:hover {
  color: var(--gold-strong);
}
.top-notice-link svg {
  width: 14px;
  height: 14px;
}

/* ---------- hero portal showcase widget ---------- */
.hero-portal-showcase {
  background: rgba(11, 28, 68, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-portal-showcase::before {
  content: "";
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 3px;
  background: var(--grad-gold);
  border-radius: 3px;
}
.portal-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}
.portal-showcase-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.portal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.portal-showcase-title b {
  color: #ffffff;
  font-size: 0.95rem;
}
.portal-showcase-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}
.portal-tab-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font);
}
.portal-tab-btn.active {
  background: var(--royal-600);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}
.portal-tab-content {
  display: none;
}
.portal-tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.preview-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.preview-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.preview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-royal);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  border: 2px solid var(--gold-strong);
}
.preview-user-meta b {
  display: block;
  color: #fff;
  font-size: 0.92rem;
}
.preview-user-meta span {
  color: #cbd5e1;
  font-size: 0.78rem;
}
.preview-score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.preview-score-box {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  padding: 8px 4px;
}
.preview-score-box span {
  display: block;
  font-size: 0.72rem;
  color: #9fb0dd;
}
.preview-score-box b {
  display: block;
  font-size: 1.05rem;
  color: var(--gold-strong);
  margin-top: 2px;
}
.preview-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.preview-actions .btn {
  flex: 1;
  text-align: center;
  padding: 9px 12px;
  font-size: 0.85rem;
}

/* ---------- quick jump bar ---------- */
.quick-jump-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  box-shadow: var(--shadow-xs);
  position: relative;
  z-index: 10;
}
.quick-jump-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.quick-jump-bar .wrap::-webkit-scrollbar { display: none; }
.quick-jump-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}
.quick-jump-item:hover {
  background: var(--royal-50);
  border-color: var(--royal-400);
  color: var(--royal-700);
  transform: translateY(-1px);
}
.quick-jump-item svg {
  width: 15px;
  height: 15px;
  color: var(--royal-600);
}

/* ---------- about pillars ---------- */
.about-pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.about-pillar-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.about-pillar-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.about-pillar-icon svg { width: 15px; height: 15px; }
.about-pillar-item span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- curriculum explorer ---------- */
.curriculum-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.curriculum-tab-btn {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.curriculum-tab-btn:hover {
  border-color: var(--royal-400);
  color: var(--royal);
  background: var(--royal-50);
}
.curriculum-tab-btn.active {
  background: var(--grad-royal);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(18, 42, 99, 0.25);
}
.curriculum-panel {
  display: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.3s ease;
}
.curriculum-panel.active {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: start;
}
.curriculum-details h3 {
  font-size: 1.5rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.curriculum-subtitle {
  color: var(--royal-600);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.curriculum-details p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.curriculum-competencies-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 10px;
}
.competency-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.comp-tag {
  background: var(--royal-50);
  color: var(--royal-700);
  border: 1px solid var(--royal-200);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 0.82rem;
  font-weight: 600;
}
.curriculum-subjects-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.curriculum-subjects-card h4 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.curriculum-subjects-card h4 svg {
  color: var(--gold-600);
  width: 18px;
  height: 18px;
}
.subjects-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.subj-chip-item {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-xs);
}
.subj-chip-item svg { width: 14px; height: 14px; color: var(--royal-600); }

/* ---------- interactive fee estimator ---------- */
.fee-calculator-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  margin-top: 32px;
}
.fee-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.fee-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.fee-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fee-field label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}
.fee-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--ink);
  transition: all 0.15s ease;
}
.fee-field select:focus {
  outline: none;
  border-color: var(--royal-400);
  box-shadow: 0 0 0 3px rgba(36, 80, 182, 0.14);
  background: #fff;
}
.fee-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 4px;
}
.fee-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}
.fee-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--royal);
  cursor: pointer;
}
.fee-summary-panel {
  background: linear-gradient(145deg, var(--royal-deep) 0%, var(--royal-dark) 100%);
  border-radius: var(--radius);
  padding: 28px 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.fee-summary-panel::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 185, 50, 0.25), transparent 70%);
}
.fee-summary-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.fee-summary-header h3 {
  color: var(--gold-strong);
  font-size: 1.2rem;
  margin-bottom: 2px;
}
.fee-summary-header span {
  font-size: 0.82rem;
  color: #9fb0dd;
}
.fee-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.fee-breakdown-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #cbd5e1;
}
.fee-breakdown-item b {
  color: #fff;
}
.fee-total-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin-bottom: 18px;
}
.fee-total-label {
  font-size: 0.76rem;
  color: #9fb0dd;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}
.fee-total-amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold-strong);
  line-height: 1.15;
  margin-top: 4px;
}
.fee-total-sub {
  font-size: 0.76rem;
  color: #cbd5e1;
  margin-top: 2px;
}
.fee-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fee-summary-actions .btn { width: 100%; justify-content: center; }

/* ---------- fee payment / bank details ---------- */
.fee-payment-note {
  margin-top: 20px;
  background: var(--royal-50);
  border: 1px solid var(--royal-200);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.fee-payment-note h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--royal-deep);
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.fee-payment-note p {
  color: var(--ink-secondary);
  font-size: 0.9rem;
  margin: 0 0 12px;
}
.fee-bank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}
.fee-bank-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.fee-bank-item b {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--royal-600);
  margin-bottom: 6px;
}
.fee-bank-item span {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.6;
}
.fee-bank-eg {
  margin: 0;
  font-size: 0.84rem;
}
.fee-bank-eg code {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--royal-deep);
  font-weight: 700;
}
@media (max-width: 720px) {
  .fee-bank-grid { grid-template-columns: 1fr; }
}

/* ---------- facility filter nav ---------- */
.facility-filter-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.facility-filter-btn {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.facility-filter-btn:hover {
  border-color: var(--royal-400);
  color: var(--royal);
  background: var(--royal-50);
}
.facility-filter-btn.active {
  background: var(--grad-royal);
  color: #fff;
  border-color: transparent;
}
.facility-amenities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.facility-pill {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.76rem;
  color: var(--ink);
  font-weight: 600;
}

/* ---------- events & calendar ---------- */
.events-calendar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 36px;
}
.term-schedule-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.term-schedule-card h3 {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
}
.term-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.term-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  background: var(--bg);
  border-left: 4px solid var(--royal);
  transition: all 0.15s ease;
}
.term-timeline-item:hover {
  background: var(--royal-50);
  transform: translateX(3px);
}
.term-timeline-item.active-term {
  border-left-color: var(--gold-strong);
  background: #fffdf5;
}
.term-timeline-badge {
  background: var(--royal-100);
  color: var(--royal-700);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 6px;
  white-space: nowrap;
}
.term-timeline-item.active-term .term-timeline-badge {
  background: var(--gold-soft);
  color: #8a6a12;
}
.term-timeline-info b {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
}
.term-timeline-info span {
  font-size: 0.83rem;
  color: var(--muted);
}
.upcoming-events-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.event-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
  align-items: center;
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--royal-200);
}
.event-date-box {
  width: 54px;
  height: 60px;
  background: var(--royal-50);
  border: 1px solid var(--royal-200);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-align: center;
}
.event-date-box b {
  font-size: 1.3rem;
  color: var(--royal);
  line-height: 1;
}
.event-date-box span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--royal-600);
  font-weight: 700;
}
.event-details {
  flex: 1;
}
.event-details h4 {
  font-size: 1rem;
  margin-bottom: 3px;
}
.event-details p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
  line-height: 1.4;
}
.event-meta-tags {
  display: flex;
  gap: 8px;
  align-items: center;
}
.event-category-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.event-category-pill.academic { background: var(--royal-100); color: var(--royal-700); }
.event-category-pill.sports { background: var(--green-soft); color: var(--green); }
.event-category-pill.cultural { background: #f3e8ff; color: #7e22ce; }
.event-category-pill.general { background: var(--gold-soft); color: #8a6a12; }
.btn-ics-export {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--royal-600);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-ics-export:hover {
  background: var(--royal-50);
  border-color: var(--royal-400);
  color: var(--royal);
}

/* ---------- leadership & faculty spotlight ---------- */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 36px;
}
.faculty-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}
.faculty-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--royal-200);
}
.faculty-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--grad-royal);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 auto 14px;
  border: 3px solid var(--gold-strong);
}
.faculty-card h4 {
  font-size: 1.02rem;
  margin-bottom: 3px;
}
.faculty-role {
  color: var(--royal-600);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.faculty-bio {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}
.faculty-quote {
  margin: 14px 0 0;
  padding: 10px 12px 10px 14px;
  background: #f4f6fc;
  border-left: 3px solid var(--gold-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
  text-align: left;
}

/* ---------- faq accordion with live search ---------- */
.faq-search-box {
  max-width: 540px;
  margin: 0 auto 32px;
  position: relative;
}
.faq-search-box input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--white);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  transition: all 0.15s ease;
}
.faq-search-box input:focus {
  outline: none;
  border-color: var(--royal-400);
  box-shadow: 0 0 0 4px rgba(36, 80, 182, 0.14);
}
.faq-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.faq-search-icon svg { width: 18px; height: 18px; }
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}
.faq-item:hover {
  border-color: var(--royal-200);
}
.faq-item.active {
  border-color: var(--royal-400);
  box-shadow: var(--shadow-sm);
}
.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.faq-chevron {
  width: 18px;
  height: 18px;
  color: var(--royal-600);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 20px;
}
.faq-item.active .faq-answer {
  max-height: 250px;
  padding: 0 20px 18px;
}
.faq-answer p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ---------- contact section ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
  margin-top: 36px;
}
.contact-info-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.contact-info-card h3 {
  margin-bottom: 8px;
}
.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 24px 0;
}
.contact-method-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-method-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--royal-50);
  color: var(--royal-600);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-method-icon svg { width: 20px; height: 20px; }
.contact-method-text b {
  display: block;
  font-size: 0.94rem;
  color: var(--ink);
}
.contact-method-text span, .contact-method-text a {
  font-size: 0.88rem;
  color: var(--muted);
}
.contact-method-text a:hover { color: var(--royal); }
.contact-form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

/* ---------- floating help & back to top ---------- */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
}
.floating-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}
.floating-whatsapp {
  background: #25d366;
  color: #fff;
}
.floating-whatsapp:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.5);
}
.floating-back-top {
  background: var(--royal);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}
.floating-back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.floating-back-top:hover {
  background: var(--royal-dark);
  transform: translateY(-2px);
}

/* ---------- modal system ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 28, 68, 0.7);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-backdrop.show .modal-box {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.modal-close:hover {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f1c4be;
}

/* ---------- auth split wrapper ---------- */
.auth-split-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  width: 100%;
  max-width: 900px;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.auth-brand-side {
  background: linear-gradient(145deg, var(--royal-deep) 0%, var(--royal-dark) 100%);
  color: #fff;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.auth-brand-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/hero-campus.jpg') center/cover no-repeat;
  opacity: 0.15;
}
.auth-brand-content {
  position: relative;
  z-index: 2;
}
.auth-feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-top: 14px;
}
.auth-feature-row svg {
  width: 18px;
  height: 18px;
  color: var(--gold-strong);
  flex-shrink: 0;
}
.role-tabs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}
.role-tab-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font);
}
.role-tab-pill svg { width: 16px; height: 16px; }
.role-tab-pill:hover {
  background: var(--royal-50);
  border-color: var(--royal-400);
  color: var(--royal);
}
.role-tab-pill.active {
  background: var(--grad-royal);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-xs);
}
.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 36px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
}
.password-toggle-btn:hover { color: var(--royal); }

/* ---------- multi-step admissions wizard ---------- */
.wizard-progress-bar {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 30px;
}
.wizard-progress-bar::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: var(--line);
  z-index: 1;
}
.wizard-step-indicator {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.wizard-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--muted);
  transition: all 0.2s ease;
}
.wizard-step-indicator.active .wizard-step-circle {
  border-color: var(--royal);
  background: var(--grad-royal);
  color: #fff;
}
.wizard-step-indicator.completed .wizard-step-circle {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.wizard-step-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.wizard-step-indicator.active .wizard-step-label {
  color: var(--royal);
}
.wizard-step-content {
  display: none;
}
.wizard-step-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}
.wizard-nav-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}



/* ---------- responsive ---------- */
@media (max-width: 980px) {
  /* --- landing header --- */
  .menu-toggle { display: block; }
  .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(11, 28, 68, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 12px 22px 18px;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 55;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links a { padding: 11px 14px; border-radius: 8px; font-size: 0.95rem; width: 100%; text-align: left; }
  .nav-links .btn-gold { text-align: center; margin-top: 4px; }
  .site-header .wrap { position: relative; }

  /* --- dashboard --- */
  .dash { grid-template-columns: 1fr; height: auto; }
  .sidebar { position: sticky; top: 0; z-index: 60; height: auto; }
  .sidebar .brand { padding: 14px 58px 14px 16px; }
  .sidebar-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 10px;
  }
  .sidebar-toggle.open { background: rgba(255, 255, 255, 0.18); }
  .sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
    max-height: 0;
    overflow-y: auto;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sidebar .nav.open {
    max-height: 75vh;
    padding: 8px 12px 12px;
  }
  .sidebar .nav button { width: 100%; text-align: left; }
  .sidebar-user { justify-content: flex-start; }

  /* --- landing grids --- */
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.3rem; }
  .hero-card { padding: 24px; }
  .mv-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .academic-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .term-grid { grid-template-columns: 1fr; }
  .events-calendar-grid { grid-template-columns: 1fr; }
  .faculty-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .fee-calculator-card { grid-template-columns: 1fr; }

  /* --- dashboard internals --- */
  .main { padding: 22px 18px 44px; height: auto; overflow-y: visible; }
  .topbar .top-title { font-size: 1.6rem; }
  .profile-grid { grid-template-columns: 1fr; }
  .detail-list li { gap: 10px; }
  .detail-list .v { text-align: left; }
  .auth-card { padding: 28px; }
  .panel { padding: 22px 20px; }
  .panel-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .mark-controls { flex-direction: column; align-items: stretch; }
  .mark-controls .field { min-width: 0; }
  .info-strip { flex-direction: column; gap: 8px; align-items: flex-start; }
  .att-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .cu-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* --- landing --- */
  .wrap { padding-inline: 16px; }
  .site-header { padding: 10px 0; }
  .brand { gap: 8px; font-size: 1rem; min-width: 0; }
  .brand-text { min-width: 0; }
  .brand .school-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand small { font-size: 0.62rem; white-space: nowrap; }
  .hero { padding: 52px 0 48px; }
  .hero h1 { font-size: 1.9rem; }
  .hero p { font-size: 1rem; }
  .hero-badge { max-width: 100%; font-size: 0.72rem; padding-inline: 10px; }
  .hero-card { padding: 20px; }
  .hero-card h3 { font-size: 1.05rem; }
  .section { padding: 48px 0; }
  .section h2 { font-size: 1.5rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .stat .num { font-size: 1.7rem; }
  .stat { padding: 22px 14px; }
  .card { padding: 22px 20px; }
  .why-grid { grid-template-columns: 1fr; }
  .academic-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .facility-grid,
  .news-grid,
  .faculty-grid,
  .portal-cards-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .curriculum-panel.active { grid-template-columns: 1fr; padding: 22px 18px; gap: 22px; }
  .hero .wrap > *,
  .about-grid > *,
  .curriculum-panel.active > *,
  .fee-calculator-card > *,
  .events-calendar-grid > *,
  .contact-grid > * { min-width: 0; }
  .curriculum-tabs-nav { flex-direction: column; align-items: stretch; }
  .curriculum-tab-btn { width: 100%; padding-inline: 12px; }
  .fee-calculator-card { padding: 22px 18px; gap: 22px; }
  .events-calendar-grid { gap: 22px; }
  .term-schedule-card,
  .contact-info-card,
  .contact-form-card { padding: 22px 18px; }
  .event-card { align-items: flex-start; padding: 14px; }
  .event-meta-tags { flex-wrap: wrap; }
  .event-details,
  .news-body,
  .contact-method-text { min-width: 0; overflow-wrap: anywhere; }
  .term-timeline-info { min-width: 0; }
  .term-timeline-info b,
  .term-timeline-info span { overflow-wrap: anywhere; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .fee-form-row { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .cta { padding: 48px 18px; }
  .cta h2 { font-size: 1.4rem; }
  .gallery-placeholder { height: 140px; }

  /* --- dashboard --- */
  .main { padding: 16px 14px 36px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .topbar .top-title { font-size: 1.35rem; }
  .today-chip { width: 100%; justify-content: center; }
  .dash-card { padding: 16px; gap: 10px; }
  .dash-card b { font-size: 1.2rem; }
  .panel { padding: 18px 14px; }
  .profile-grid { gap: 18px; }
  .detail-list li { flex-direction: column; gap: 4px; padding: 10px 0; }
  .detail-list .k { font-weight: 600; }
  .detail-list .v { text-align: left; }
  .children-summary { grid-template-columns: 1fr; }
  .child-tabs { gap: 6px; }
  .child-tab { padding: 8px 14px; font-size: 0.85rem; }
  .alloc-tabs { gap: 6px; }
  .alloc-tab { padding: 8px 14px; font-size: 0.85rem; }
  .subj-list { gap: 6px; }
  .subj-chip { padding: 6px 14px; font-size: 0.82rem; }
  .att-summary { grid-template-columns: repeat(2, 1fr); }
  .timetable-grid { grid-template-columns: 60px repeat(5, minmax(85px, 1fr)); overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .activity-list { grid-template-columns: 1fr; }
  .att-calendar { gap: 3px; }
  .att-cal-day { font-size: 0.72rem; }
  .timetable-cell { padding: 8px 8px; font-size: 0.78rem; min-height: 40px; }

  /* --- auth --- */
  .auth-body { padding: 16px; }
  .auth-card { padding: 22px 18px; }
  .auth-card h2 { font-size: 1.4rem; }
  .demo-grid { grid-template-columns: 1fr; }
  .dash-home { grid-template-columns: repeat(2, 1fr); }
  .about-pillars-grid { grid-template-columns: 1fr; }
  
  /* fix horizontal scrolling on mobile */
  /* keep the top bar a slim single strip instead of stacking into 4 rows */
  .top-notice-bar { padding: 6px 0; }
  .top-notice-bar .wrap {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    text-align: left;
  }
  .top-notice-left { flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
  .notice-pill { flex-shrink: 0; white-space: nowrap; }
  .top-notice-text { display: none; }
  .top-notice-right { margin-left: auto; flex-shrink: 0; flex-wrap: nowrap; gap: 14px; }
  .top-notice-link { font-size: 0.78rem; }
  .top-notice-link svg { width: 13px; height: 13px; }
  .top-notice-right { gap: 8px; }
}

@media (max-width: 420px) {
  .form-row { grid-template-columns: 1fr; }
  #modalBody [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .cu-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.65rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-highlights { flex-direction: column; gap: 8px; }
  .hero-highlight-item { font-size: 0.85rem; justify-content: center; }
  .preview-score-grid { grid-template-columns: 1fr; }
  .portal-showcase-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .portal-showcase-tabs { width: 100%; justify-content: space-between; }
  .portal-tab-btn { flex: 1; text-align: center; }
  .hero-portal-showcase { padding: 18px 14px; }
  .preview-card { padding: 12px; }
  .preview-user-meta { min-width: 0; }
  .preview-user-meta b,
  .preview-user-meta span { overflow-wrap: anywhere; }
  .top-notice-right .top-notice-link:first-child span { display: none; }
  .top-notice-right .top-notice-link:first-child { gap: 0; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; justify-content: center; }
  .table-wrap { font-size: 0.82rem; }
  table.data th, table.data td { padding: 10px 10px; font-size: 0.82rem; }
  table.data input[type="number"] { width: 64px; padding: 6px 6px; font-size: 0.85rem; }
  .timetable-cell { padding: 6px 6px; font-size: 0.72rem; min-height: 36px; }
  .timetable-cell .subj { font-size: 0.72rem; }
  .stat-card { padding: 12px; }
  .stat-num { font-size: 1.25rem; }
  .stat-label { font-size: 0.72rem; }
  .dash-home { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .fee-summary-actions .btn-sm {
    width: auto;
    align-self: center;
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  .fee-summary-actions .btn-sm svg { width: 12px; height: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}


/* ==================== modern polish layer ==================== */

/* brand text selection */
::selection { background: var(--royal-600); color: #fff; }

/* offset anchor scrolls so the sticky header never covers section titles */
html { scroll-padding-top: 86px; }

/* consistent, modern focus rings for keyboard users */
:focus-visible {
  outline: 2px solid var(--royal-500, #3b5bdb);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn:focus-visible { outline-offset: 3px; }

/* springy toast */
#toast { transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* gentle fade-up when dashboard sections switch */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.main > section[data-section].panel { animation: fadeUp 0.28s cubic-bezier(0.16, 1, 0.3, 1); }

/* auth card entrance */
.auth-card { animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* card lift micro-interactions */
.dash-card:hover,
.news-card:hover,
.portal-role-card:hover,
.faculty-card:hover,
.facility-card:hover,
.event-card:hover,
.term-schedule-card:hover,
.testimonial-card:hover,
.contact-info-card:hover,
.contact-form-card:hover {
  transform: translateY(-3px);
}

/* smoother reveal easing */
.reveal { transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }

/* nav link underline sweep on the landing header (desktop) */
@media (min-width: 981px) {
  .nav-links a:not(.btn) { position: relative; }
  .nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 13px; right: 13px;
    bottom: 5px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold-strong, #d4a017);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-links a:not(.btn):hover::after { transform: scaleX(1); }
}

/* tables: softer row hover + sticky feel */
table.data tbody tr:hover { background: #f6f8fe; }

/* inputs: subtle focus glow */
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--royal-400, #7c96e8);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.12);
}

/* images: crisp + slight zoom on facility/hero hover where interactive */
.hero-img { will-change: transform; }

/* ---------- password show/hide (eye) ---------- */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px !important; width: 100%; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #5b6b8c;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pw-toggle:hover { background: #eef2fb; color: var(--royal-600, #244bb2); }
.pw-toggle:focus-visible { outline: 2px solid var(--royal-600, #244bb2); outline-offset: 1px; }

/* add-user modal section headers */
.cu-section {
  grid-column: 1 / -1;
  margin: 18px 0 4px;
  padding: 8px 14px;
  background: linear-gradient(90deg, var(--royal-50, #eef1fb), transparent);
  border-left: 3px solid var(--royal-600);
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--royal-700, #1c3a8a);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- landing: photo gallery & media (admin-edited) ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 38px;
}
.video-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1c44;
}
.video-embed iframe,
.video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-card figcaption { padding: 16px 18px 18px; }
.video-card h4 { margin-bottom: 4px; }

/* ---------- landing: follow us strip ---------- */
.social-strip {
  margin-top: 42px;
  background: linear-gradient(145deg, var(--royal-deep, #0b1c44), var(--royal-dark, #12224f));
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.social-strip h3 { color: #fff; margin-bottom: 4px; }
.social-strip p { color: #b7c3df; font-size: 0.9rem; margin: 0; max-width: 480px; }
.social-strip-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.social-link:hover { background: var(--gold-strong, #f5c518); color: #2b1d03; transform: translateY(-2px); }
.social-link svg { width: 18px; height: 18px; flex: 0 0 18px; }
@media (max-width: 768px) {
  .social-strip { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
}

/* ---------- teacher weekly timetable ---------- */
.tt-cell {
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
  min-width: 96px;
  padding: 10px 8px !important;
}
.tt-cell.filled {
  background: var(--royal-50, #eef1fb);
  border-left: 3px solid var(--royal-500, #2f54c4);
  cursor: pointer;
  transition: background 0.15s ease;
}
.tt-cell.filled:hover { background: var(--royal-100, #dfe5f7); }
.tt-cell:not(.filled) { color: var(--line-darker, #c6cede); font-size: 1.1rem; font-weight: 700; }
.tt-cell:not(.filled):hover { background: var(--gold-soft, #fdf3d3); color: var(--gold-strong, #c79a08); }
#timetableWrap .table-wrap { overflow-x: auto; }
#timetableWrap .data th:first-child,
#timetableWrap .data td:first-child { text-align: left; white-space: nowrap; }
#timetableWrap .data td b { font-size: 0.9rem; }
@media (max-width: 720px) {
  #timetableWrap .data { min-width: 640px; }
}

/* ADMIN PERMISSIONS */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 4px; }
.perm-check { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line, #dfe3ec); border-radius: 8px; background: var(--surface, #fff); cursor: pointer; font-size: 0.88rem; }
.perm-check:hover { border-color: var(--royal-500, #2f54c4); }
.perm-check input { accent-color: var(--royal-500, #2f54c4); }
.perm-chip { display: inline-block; padding: 2px 8px; margin: 2px 3px 2px 0; border-radius: 999px; background: var(--royal-50, #eef1fb); color: var(--royal-600, #24439f); font-size: 0.76rem; font-weight: 600; }
.perm-chip.super { background: #fdf3d3; color: #9a7206; }

.perm-tools { display: flex; gap: 8px; margin: 0 0 10px; }
.perm-seg { display: flex; gap: 8px; margin-bottom: 16px; }
.perm-seg .btn.active { background: var(--royal, #2f54c4); border-color: var(--royal, #2f54c4); color: #fff; }

/* STUDENT HEALTH (teacher) */
.privacy-note { background: var(--gold-soft, #fdf3d3); border: 1px solid var(--gold-strong, #c79a08); color: #7c5e08; border-radius: 8px; padding: 10px 14px; font-size: 0.85rem; margin: 12px 0 16px; }
.health-tag { display: inline-block; padding: 3px 10px; border-radius: 8px; background: #fde8e8; color: #9b1c1c; font-size: 0.85rem; font-weight: 600; }
