/* ============================================================
   Vidyaa Bharathi Group of Schools — Master Stylesheet
   Covers: index, home, about, facilities, gallery, news,
           ecorner, admission, contact, admin-login,
           forgot-password, dashboard, manage-admins + popup
   ============================================================ */

/* ─── 1. TOKENS ─────────────────────────────────────────── */

:root {
  /* Palette */
  --clr-primary:       #1a3c6e;   /* deep navy */
  --clr-primary-light: #2357a4;
  --clr-secondary:     #e07b2a;   /* warm saffron */
  --clr-gold:          #c9960c;
  --clr-accent:        #f5c842;   /* highlight yellow */
  --clr-bg:            #f4f6fb;
  --clr-surface:       #ffffff;
  --clr-surface-alt:   #eef1f8;
  --clr-text:          #1c2233;
  --clr-text-muted:    #5a6478;
  --clr-border:        #d6dae8;
  --clr-success:       #1e8a4a;
  --clr-danger:        #c0392b;
  --clr-warning:       #d97706;

  /* Glass */
  --glass-bg:     rgba(255, 255, 255, 0.72);
  --glass-blur:   12px;
  --glass-border: rgba(255, 255, 255, 0.45);

  /* Typography */
  --font-display: 'Georgia', 'Times New Roman', serif;
  --font-body:    'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:    'Cascadia Code', 'Fira Mono', monospace;

  /* Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);
  --shadow-xl:  0 16px 48px rgba(0,0,0,.18);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms;
  --dur-med:  240ms;
}

/* ─── 2. RESET & BASE ───────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--clr-text);
  background: var(--clr-bg);
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--clr-primary-light);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--clr-secondary); }

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--clr-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, var(--text-4xl)); }
h2 { font-size: clamp(1.4rem, 3vw, var(--text-3xl)); }
h3 { font-size: clamp(1.1rem, 2vw, var(--text-xl)); }
h4 { font-size: var(--text-lg); }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

/* ─── 3. UTILITIES ──────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.hidden { display: none !important; }
.muted  { color: var(--clr-text-muted); font-size: var(--text-sm); }

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-secondary);
  margin-bottom: var(--sp-3);
}
.eyebrow.accent { color: var(--clr-accent); }

.section-intro {
  font-size: var(--text-lg);
  color: var(--clr-text-muted);
  max-width: 640px;
  margin-bottom: var(--sp-8);
}

/* ─── 4. GLASS CARD ─────────────────────────────────────── */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ─── 5. ACCENT BORDERS ─────────────────────────────────── */

.accent-border-primary   { border-top: 3px solid var(--clr-primary); }
.accent-border-secondary { border-top: 3px solid var(--clr-secondary); }
.accent-border-gold      { border-top: 3px solid var(--clr-gold); }

.accent-border-left {
  border-top: none;
  border-left: 4px solid var(--clr-primary);
}
.accent-border-left.accent-border-gold      { border-left-color: var(--clr-gold); }
.accent-border-left.accent-border-secondary { border-left-color: var(--clr-secondary); }
.accent-border-left.accent-border-primary   { border-left-color: var(--clr-primary); }

/* ─── 6. BUTTONS ────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--clr-accent);
  outline-offset: 3px;
}

.primary-btn {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}
.primary-btn:hover {
  background: var(--clr-primary-light);
  border-color: var(--clr-primary-light);
  box-shadow: 0 4px 16px rgba(26,60,110,.35);
  transform: translateY(-1px);
  color: #fff;
}

.secondary-btn {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}
.secondary-btn:hover {
  background: var(--clr-primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ─── 7. FORMS ──────────────────────────────────────────── */

.form-grid {
  display: grid;
  gap: var(--sp-4);
}

.form-group, label.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--clr-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--clr-text);
  background: var(--clr-surface);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(26,60,110,.15);
}

input[readonly] { background: var(--clr-surface-alt); cursor: default; }

textarea { resize: vertical; min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  align-items: center;
}

.form-actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: center;
}

.form-error {
  color: var(--clr-danger);
  font-size: var(--text-sm);
  background: rgba(192,57,43,.08);
  border: 1px solid rgba(192,57,43,.25);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  display: none;
}

.form-success {
  color: var(--clr-success);
  font-size: var(--text-sm);
  background: rgba(30,138,74,.08);
  border: 1px solid rgba(30,138,74,.25);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 400;
  cursor: pointer;
}

.link-button {
  font-size: var(--text-sm);
  color: var(--clr-primary-light);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.link-button:hover { color: var(--clr-secondary); }

/* ─── 8. SITE HEADER ────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--sp-3) 0;
}

.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-4);
}

.brand-panel {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}

.logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.branch-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--clr-primary);
  margin: 0;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  flex-wrap: wrap;
}

.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--clr-text);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--clr-surface-alt);
  color: var(--clr-primary);
}

.admin-login-btn {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
}

/* ─── 9. SECTIONS ───────────────────────────────────────── */

.section {
  padding: var(--sp-12) 0;
}

.section-alt-bg {
  background: var(--clr-surface-alt);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.section-title span {
  display: block;
  width: 4px;
  height: 2.25rem;
  background: var(--clr-secondary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.section-title h2 { margin: 0; }

/* ─── 10. HERO / INTRO SECTION ──────────────────────────── */

.intro-section {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 100%);
  color: #fff;
  padding: var(--sp-16) 0;
  position: relative;
  overflow: hidden;
}

.intro-section h1,
.intro-section p {
  color: #fff;
}

.hero-decor-ring {
  position: absolute;
  width: 420px;
  height: 420px;
  border: 60px solid rgba(255,255,255,.06);
  border-radius: 50%;
  right: -120px;
  bottom: -160px;
  pointer-events: none;
}

.hero-decor-ring.small {
  width: 200px;
  height: 200px;
  border-width: 30px;
  right: -60px;
  bottom: -80px;
}

/* Hero section (home.html) */
.hero-section {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 60%, #1a5296 100%);
  padding: var(--sp-16) 0;
  position: relative;
  overflow: hidden;
}

.hero-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  align-items: center;
}

.hero-copy {
  color: #fff;
}
.hero-copy h1,
.hero-copy p {
  color: #fff;
}

.hero-copy h1 { margin-bottom: var(--sp-4); }
.hero-copy p  { font-size: var(--text-lg); opacity: .88; margin-bottom: var(--sp-6); }

.hero-actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* Hero buttons on dark/blue backgrounds — must contrast against the bg */
.hero-section .hero-actions .primary-btn,
.intro-section .hero-actions .primary-btn,
.about-hero .hero-actions .primary-btn,
.facilities-hero .hero-actions .primary-btn {
  background: var(--clr-accent);
  color: var(--clr-primary);
  border-color: var(--clr-accent);
  font-weight: 700;
}
.hero-section .hero-actions .primary-btn:hover,
.intro-section .hero-actions .primary-btn:hover,
.about-hero .hero-actions .primary-btn:hover,
.facilities-hero .hero-actions .primary-btn:hover {
  background: #fff;
  border-color: #fff;
  color: var(--clr-primary);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

.hero-section .hero-actions .secondary-btn,
.intro-section .hero-actions .secondary-btn,
.about-hero .hero-actions .secondary-btn,
.facilities-hero .hero-actions .secondary-btn {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.hero-section .hero-actions .secondary-btn:hover,
.intro-section .hero-actions .secondary-btn:hover,
.about-hero .hero-actions .secondary-btn:hover,
.facilities-hero .hero-actions .secondary-btn:hover {
  background: rgba(255,255,255,.25);
  border-color: #fff;
  color: #fff;
}

.hero-media .hero-card {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  color: #fff;
  margin-bottom: var(--sp-4);
}
.hero-media .hero-card h3 { color: var(--clr-accent); margin-bottom: var(--sp-2); }
.hero-media .hero-card p  { color: rgba(255,255,255,.85); margin: 0; }

/* ─── 11. ABOUT PAGE ────────────────────────────────────── */

.about-hero { }

.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  align-items: start;
}

.about-hero-cards {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.about-hero-cards .hero-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  color: #fff;
}
.about-hero-cards .hero-card h3 { color: var(--clr-accent); margin-bottom: var(--sp-2); }
.about-hero-cards .hero-card p  { color: rgba(255,255,255,.85); margin: 0; font-size: var(--text-sm); }

.hero-quick-stats {
  display: flex;
  gap: var(--sp-6);
}

.hero-quick-stat {
  text-align: center;
  color: #fff;
}
.hero-quick-stat strong {
  display: block;
  font-size: var(--text-3xl);
  font-family: var(--font-display);
  color: var(--clr-accent);
  line-height: 1;
}
.hero-quick-stat span { font-size: var(--text-xs); opacity: .75; text-transform: uppercase; letter-spacing: .08em; }

/* About story */
.about-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-6);
}

/* Founder section */
.founder-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-10);
  align-items: start;
}

.founder-image {
  position: relative;
}

.founder-image-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.founder-image-frame img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.highlight-box {
  background: var(--clr-surface-alt);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
}
.highlight-box h3 { font-size: var(--text-base); margin-bottom: var(--sp-2); }
.highlight-box p  { font-size: var(--text-sm); color: var(--clr-text-muted); margin: 0; }

/* Values grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-6);
}

/* Mission */
.mission-panel { background: var(--clr-primary); }
.mission-panel .mission-statement {
  padding: var(--sp-10);
}
.mission-panel h3 { color: var(--clr-accent); margin-bottom: var(--sp-4); }
.mission-panel p  { color: rgba(255,255,255,.85); }
.mission-list {
  list-style: disc;
  padding-left: var(--sp-6);
  color: rgba(255,255,255,.82);
  font-size: var(--text-sm);
}
.mission-list li { margin-bottom: var(--sp-2); }

/* ─── 12. CARDS ─────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-6);
}

.feature-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.feature-card h3 { margin-bottom: var(--sp-2); }
.feature-card p  { color: var(--clr-text-muted); font-size: var(--text-sm); margin: 0; }

.value-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.info-card   {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.info-card h3 { margin-bottom: var(--sp-2); }
.info-card p  { color: var(--clr-text-muted); font-size: var(--text-sm); margin: 0; }

.testimonial-card {
  background: var(--clr-surface);
  border-left: 4px solid var(--clr-gold);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.testimonial-card h3 { margin-bottom: var(--sp-2); }
.testimonial-card p  { color: var(--clr-text-muted); font-size: var(--text-sm); margin: 0; }

/* info-grid (facilities) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-6);
}
.info-grid .glass-card {
  padding: var(--sp-6);
}
.info-grid h3 { margin-bottom: var(--sp-3); }
.info-grid p  { color: var(--clr-text-muted); margin: 0; font-size: var(--text-sm); }

/* value-card reuse */
.value-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.value-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.value-card h3 { margin-bottom: var(--sp-2); }
.value-card p  { color: var(--clr-text-muted); font-size: var(--text-sm); margin: 0; }

/* ─── 13. ADMISSION PAGE ────────────────────────────────── */

.admission-section { }

.admission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: start;
}

.admission-copy { padding: var(--sp-8); }
.admission-copy h1 { margin-bottom: var(--sp-4); }

.admission-highlights {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.highlight-card {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-md);
}
.highlight-card h3 { font-size: var(--text-base); margin-bottom: var(--sp-1); }
.highlight-card p  { font-size: var(--text-sm); color: var(--clr-text-muted); margin: 0; }

.admission-form-card { padding: var(--sp-8); }
.admission-form-card h2 { margin-bottom: var(--sp-2); }
.form-description { color: var(--clr-text-muted); font-size: var(--text-sm); margin-bottom: var(--sp-6); }

.admission-form .form-row { margin-bottom: 0; }
.admission-submit { width: 100%; margin-top: var(--sp-4); }

/* Admission banner (shared) */
.admission-banner {
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 100%);
  border-radius: var(--radius-xl);
  margin: var(--sp-8) auto;
  max-width: 800px;
}
.admission-banner h2,
.admission-banner p { color: #fff; }
.admission-banner p { opacity: .85; margin-bottom: var(--sp-6); }
.admission-banner .primary-btn {
  background: var(--clr-accent);
  color: var(--clr-primary);
  border-color: var(--clr-accent);
}
.admission-banner .primary-btn:hover {
  background: var(--clr-gold);
  border-color: var(--clr-gold);
}

/* ─── 14. CONTACT PAGE ──────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: start;
}

.contact-card { padding: var(--sp-8); }
.contact-card h2 { margin-bottom: var(--sp-4); }

.contact-highlight-card { background: var(--clr-surface); }

.contact-links { margin: var(--sp-4) 0; }
.contact-links p { margin-bottom: var(--sp-2); font-size: var(--text-sm); }
.contact-links a { color: var(--clr-primary-light); }
.contact-links a:hover { color: var(--clr-secondary); }

.contact-map-panel { margin-top: var(--sp-6); }
.contact-map-panel h3 { margin-bottom: var(--sp-3); font-size: var(--text-base); }

.map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 220px;
  box-shadow: var(--shadow-sm);
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ─── 15. GALLERY PAGE ──────────────────────────────────── */

.filters-panel {
  padding: var(--sp-6) 0;
  background: var(--clr-surface);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--clr-border);
}
.filters-panel .container {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  padding: var(--sp-3) var(--sp-8);
  border-radius: var(--radius-full);
  border: 2px solid var(--clr-border);
  background: var(--clr-surface);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  color: var(--clr-text-muted);
  min-width: 110px;
  text-align: center;
  line-height: 1.5;
}
.filter-btn:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: var(--clr-surface-alt);
}
.filter-btn.active {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26,60,110,.3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
  padding: 0 var(--sp-6);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}
.lightbox.hidden { display: none; }

.close-btn {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-6);
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  opacity: .8;
  transition: opacity var(--dur-fast);
}
.close-btn:hover { opacity: 1; }

.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.lightbox-controls {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── 16. NEWS PAGE ─────────────────────────────────────── */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-6);
  padding: 0 var(--sp-6);
}

.news-grid .news-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.news-grid .news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.news-grid .news-card h3 {
  margin-top: 0;
  margin-bottom: var(--sp-3);
  color: var(--clr-primary-dark);
}

.news-grid .news-card p {
  margin: 0 0 var(--sp-4);
  color: var(--clr-text-muted);
  line-height: 1.75;
}

.news-grid .news-card small {
  display: block;
  color: var(--clr-text-muted);
  font-size: var(--text-sm);
}

/* ─── 17. E-CORNER PAGE ─────────────────────────────────── */

.category-tabs {
  padding: var(--sp-6) 0;
  background: var(--clr-surface);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--clr-border);
}

.category-tabs-inner {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  align-items: center;
}

.tab-btn {
  padding: var(--sp-3) var(--sp-8);
  border-radius: var(--radius-full);
  border: 2px solid var(--clr-border);
  background: var(--clr-surface);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  color: var(--clr-text-muted);
  transition: all var(--dur-fast) var(--ease-out);
  min-width: 130px;
  text-align: center;
  line-height: 1.5;
}
.tab-btn:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: var(--clr-surface-alt);
}
.tab-btn.active {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26,60,110,.3);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-6);
  padding: 0 var(--sp-6);
}

/* ─── 18. FACILITIES PAGE ───────────────────────────────── */

.facilities-hero {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 100%);
  color: #fff;
  padding: var(--sp-16) 0;
  position: relative;
  overflow: hidden;
}
.facilities-hero .hero-copy h1,
.facilities-hero .hero-copy p { color: #fff; }

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  align-items: center;
}

.facilities-summary-cards {
  display: grid;
  gap: var(--sp-4);
}

/* ─── 19. AUTH PAGES (login, forgot-password) ───────────── */

body.admin-page {
  background: #0b1628;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  font-family: var(--font-body);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 100vh;
  width: 100%;
}

/* ── Left visual panel ── */
.login-visual {
  position: relative;
  background: #0b1628;
  padding: var(--sp-16) var(--sp-12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Geometric accent rings */
.login-visual::before,
.login-visual::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.login-visual::before {
  width: 560px;
  height: 560px;
  border: 1px solid rgba(201,150,12,.18);
  top: -140px;
  left: -180px;
}
.login-visual::after {
  width: 300px;
  height: 300px;
  border: 1px solid rgba(201,150,12,.10);
  bottom: 80px;
  right: -80px;
}

.visual-copy {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(201,150,12,.15);
  color: var(--clr-gold);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  border: 1px solid rgba(201,150,12,.3);
  margin-bottom: var(--sp-8);
}

.hero-heading {
  margin-bottom: var(--sp-8);
}
.hero-heading h1 {
  color: #fff;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: var(--sp-4);
  font-family: var(--font-display);
}
.hero-heading p {
  color: rgba(255,255,255,.55);
  font-size: var(--text-base);
  line-height: 1.7;
  margin: 0;
}

.hero-tags {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.hero-tags span {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: rgba(255,255,255,.6);
  font-size: var(--text-sm);
  font-weight: 500;
}
.hero-tags span::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--clr-gold);
  flex-shrink: 0;
  opacity: .6;
}

/* Stats row at bottom of visual panel */
.hero-illustration {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

.illustration-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
}
.illustration-card .stat-num {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--clr-gold);
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.illustration-card .stat-label {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .08em;
}
/* hide the old shape div */
.illustration-shape { display: none; }

/* ── Right login panel ── */
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-16) var(--sp-12);
  background: var(--clr-surface);
  border-left: 1px solid rgba(255,255,255,.06);
}

.auth-brand {
  margin-bottom: var(--sp-8);
}
.auth-brand .logo {
  height: 52px;
  margin-bottom: var(--sp-5);
  border-radius: var(--radius-sm);
}
.auth-brand .eyebrow {
  display: block;
  margin-bottom: var(--sp-2);
}
.auth-brand h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--sp-2);
  color: var(--clr-primary);
}
.auth-brand p {
  color: var(--clr-text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

.login-form { max-width: 400px; }

.field-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.field-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--clr-text);
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}
.input-shell input {
  padding-left: 2.8rem;
  padding-right: 4.5rem;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--clr-border);
  font-size: var(--text-base);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input-shell input:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(26,60,110,.12);
}

.field-icon {
  position: absolute;
  left: var(--sp-3);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
  opacity: .5;
}
.password-toggle {
  position: absolute;
  right: var(--sp-3);
  background: none;
  border: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--clr-primary-light);
  cursor: pointer;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast);
}
.password-toggle:hover { background: var(--clr-surface-alt); }

.login-form .form-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: var(--sp-6);
}

.login-btn {
  width: 100%;
  height: 48px;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: .03em;
  position: relative;
  margin-top: var(--sp-2);
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  position: absolute;
}
.login-btn.loading .btn-text  { opacity: 0; }
.login-btn.loading .btn-spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Standalone auth card (forgot-password) */
.auth-card {
  max-width: 440px;
  width: 100%;
  margin: auto;
  padding: var(--sp-10);
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}
.auth-card .logo { height: 48px; margin-bottom: var(--sp-4); }
.auth-card h1    { margin-bottom: var(--sp-2); }
.auth-card p     { color: var(--clr-text-muted); margin-bottom: var(--sp-6); }
/* ============================================================
   Vidyaa Bharathi Group of Schools — Dashboard Stylesheet
   File   : css/dashboard.css
   Depends: css/styles.css  (tokens, resets, base components)
   Covers : topbar · sidebar · metrics · panels · table ·
            list-box · modal · pagination · responsive
   ============================================================ */


/* ═══════════════════════════════════════════════════════════
   1. PAGE BASE
   ═══════════════════════════════════════════════════════════ */

body.dashboard-page {
  background: var(--clr-bg);
  color: var(--clr-text);
  overflow-x: hidden;
}

/* Widen the shell beyond the public-site 1200 px cap */
.dashboard-shell {
  max-width: 1380px;
  padding-top: 0;
  padding-bottom: var(--sp-12);
}


/* ═══════════════════════════════════════════════════════════
   2. TOP BAR
   ═══════════════════════════════════════════════════════════ */

.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 90;

  background: var(--clr-surface);
  /* Three-layer border: navy top brand stripe → transparent left/right → subtle bottom */
  border-top: 3px solid var(--clr-primary);
  border-bottom: 1.5px solid var(--clr-border);

  padding: var(--sp-3) var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);

  /* Soft directional shadow — only downward, not interfering with content */
  box-shadow: 0 2px 10px rgba(26, 60, 110, 0.08);
}

/* ── Brand cluster ── */
.topbar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.dashboard-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.brand-copy .eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 2px;
}

.brand-copy h1 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--clr-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0;
  line-height: 1.2;
}

.brand-copy p {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  margin: 0;
  line-height: 1.45;
}

/* ── Right-side action cluster ── */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* "Signed in as …" pill */
.user-chip {
  font-size: var(--text-sm);
  color: var(--clr-text);
  background: var(--clr-surface-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: var(--sp-2) var(--sp-4);
  white-space: nowrap;
  line-height: 1;
}
.user-chip strong {
  color: var(--clr-primary);
}

/* "Branch view" tag */
.branch-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--clr-secondary);
  background: rgba(224, 123, 42, 0.10);
  border: 1px solid rgba(224, 123, 42, 0.28);
  padding: 3px var(--sp-3);
  border-radius: var(--radius-full);
}

/* Bell button */
.notification-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  cursor: pointer;
  color: var(--clr-text-muted);
  transition: border-color var(--dur-fast) var(--ease-out),
              background   var(--dur-fast) var(--ease-out);
}
.notification-btn:hover {
  border-color: var(--clr-primary);
  background: var(--clr-surface-alt);
}

/* Logout */
.logout-btn {
  font-size: var(--text-xs);
  padding: var(--sp-2) var(--sp-4);
}


/* ═══════════════════════════════════════════════════════════
   3. DASHBOARD GRID  (sidebar + main)
   ═══════════════════════════════════════════════════════════ */

/*
  Structure note: in the HTML, <main> is opened *inside* <aside>.
  Browsers re-parent it, so both columns become siblings under
  .dashboard-grid — the grid below works correctly regardless.
*/
.dashboard-grid {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: var(--sp-6);
  align-items: start;
  margin-top: var(--sp-6);
}


/* ═══════════════════════════════════════════════════════════
   4. SIDEBAR
   ═══════════════════════════════════════════════════════════ */

.dashboard-sidebar {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-top: 3px solid var(--clr-gold);   /* gold accent — distinguished from topbar navy */
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  height: fit-content;

  /* Stick under the topbar */
  position: sticky;
  top: 72px;
}

/* Section heading */
.sidebar-title {
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--clr-border);
}
.sidebar-title h2 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: var(--sp-1);
}
.sidebar-title p {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  margin: 0;
}

/* 2 × 2 quick-action grid */
.dashboard-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.dashboard-actions-grid .btn {
  width: 100%;
  font-size: var(--text-xs);
  padding: var(--sp-3) var(--sp-2);
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background  var(--dur-fast) var(--ease-out);
}
.dashboard-actions-grid .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Manage Scope info tile */
.sidebar-card {
  background: var(--clr-surface-alt);
  border: 1px solid var(--clr-border);
  border-left: 3px solid var(--clr-secondary);   /* saffron left accent */
  border-radius: var(--radius-md);
  padding: var(--sp-4);
}
.sidebar-card h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: var(--sp-2);
}
.sidebar-card p {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  margin: 0;
  line-height: 1.55;
}


/* ═══════════════════════════════════════════════════════════
   5. MAIN COLUMN
   ═══════════════════════════════════════════════════════════ */

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  min-width: 0;   /* prevent grid blowout on overflow content */
}


/* ═══════════════════════════════════════════════════════════
   6. METRIC CARDS
   ═══════════════════════════════════════════════════════════ */

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

.metric-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-top: 4px solid var(--clr-primary);
  border-radius: var(--radius-md);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  box-shadow: var(--shadow-sm);
  transition: transform     var(--dur-med) var(--ease-out),
              box-shadow    var(--dur-med) var(--ease-out),
              border-top-color var(--dur-med) var(--ease-out);
}
.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Stagger four accent colours across the cards */
.metric-card:nth-child(1) { border-top-color: var(--clr-primary);       }
.metric-card:nth-child(2) { border-top-color: var(--clr-gold);           }
.metric-card:nth-child(3) { border-top-color: var(--clr-secondary);      }
.metric-card:nth-child(4) { border-top-color: var(--clr-primary-light);  }

/* All four revert to navy on hover for consistency */
.metric-card:hover { border-top-color: var(--clr-primary); }

.metric-card span {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-2);
}
.metric-card h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--clr-primary);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1;
}


/* ═══════════════════════════════════════════════════════════
   7. CONTENT PANELS
   ═══════════════════════════════════════════════════════════ */

.panel.glass-panel {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-med) var(--ease-out);
}
.panel.glass-panel:hover {
  box-shadow: var(--shadow-md);
}

/* Panel header row */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--clr-surface-alt);
}
.panel-header h2 {
  font-size: var(--text-xl);
  color: var(--clr-primary);
  margin-bottom: var(--sp-1);
}
.panel-header p {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════
   8. SEARCH FIELD
   ═══════════════════════════════════════════════════════════ */

.table-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.search-field {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--clr-surface-alt);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-3);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow   var(--dur-fast) var(--ease-out),
              background   var(--dur-fast) var(--ease-out);
}
.search-field:focus-within {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(26, 60, 110, 0.12);
  background: var(--clr-surface);
}
.search-field span {
  font-size: var(--text-sm);
  opacity: 0.45;
  pointer-events: none;
  line-height: 1;
}
/* Override global input styles — the search sits inline, no padding needed */
.search-field input[type="search"] {
  border: none;
  background: none;
  font-size: var(--text-sm);
  outline: none;
  width: 190px;
  padding: 0;
  height: auto;
  box-shadow: none;
}


/* ═══════════════════════════════════════════════════════════
   9. ACTIVITY DATA TABLE
   ═══════════════════════════════════════════════════════════ */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

/* Header row */
.data-table thead th {
  background: var(--clr-surface-alt);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 2px solid var(--clr-border);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--clr-primary);
  text-align: left;
  white-space: nowrap;
  user-select: none;
}

/* First-column header has extra left padding to match sort-button */
.data-table thead th:first-child {
  padding-left: var(--sp-4);
}

/* Data cells */
.data-table tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--clr-border);
  color: var(--clr-text);
  vertical-align: middle;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover td {
  background: rgba(238, 241, 248, 0.60);
}

/* Sortable column button */
.sort-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--clr-primary);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sort-btn::after {
  content: '↕';
  font-size: 9px;
  opacity: 0.35;
  line-height: 1;
}
.sort-btn:hover::after {
  opacity: 0.85;
}

/* Status badges */
.table-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.6;
}
.table-badge.green  { background: rgba(30, 138, 74,  0.12); color: var(--clr-success); }
.table-badge.blue   { background: rgba(26, 60,  110, 0.12); color: var(--clr-primary); }
.table-badge.orange { background: rgba(217, 119, 6,  0.12); color: var(--clr-warning); }


/* ═══════════════════════════════════════════════════════════
   10. PAGINATION
   ═══════════════════════════════════════════════════════════ */

.pagination {
  display: flex;
  gap: var(--sp-2);
  justify-content: flex-end;
  margin-top: var(--sp-4);
}
.pagination button {
  background: none;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  color: var(--clr-text-muted);
  line-height: 1;
  transition: background   var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color        var(--dur-fast) var(--ease-out);
}
.pagination button.active,
.pagination button:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}


/* ═══════════════════════════════════════════════════════════
   11. LIST BOXES  (news / photos / videos / PDFs)
   ═══════════════════════════════════════════════════════════ */

.list-box {
  display: grid;
  gap: var(--sp-3);
  min-height: 56px;
}

/* Empty state — pure CSS, no JS needed */
.list-box:empty::after {
  content: 'No items yet — use the sidebar to add one.';
  display: block;
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  border: 1.5px dashed var(--clr-border);
  border-radius: var(--radius-md);
  background: var(--clr-surface-alt);
}

/* Each JS-injected item */
.list-box-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--clr-surface-alt);
  border: 1px solid var(--clr-border);
  border-left: 3px solid var(--clr-primary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: box-shadow var(--dur-fast) var(--ease-out),
              transform  var(--dur-fast) var(--ease-out);
}
.list-box-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}
.list-box-item .item-title {
  flex: 1;
  font-weight: 600;
  color: var(--clr-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-box-item .item-meta {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  white-space: nowrap;
}
.list-box-item .item-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.list-box-item .item-actions .btn {
  font-size: 11px;
  padding: 4px 10px;
}


/* ═══════════════════════════════════════════════════════════
   12. MODAL / DIALOG
   ═══════════════════════════════════════════════════════════ */

.modal-card {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(580px, 94vw);
  max-height: min(88vh, 760px);
  box-shadow: var(--shadow-xl);
  background: var(--clr-surface);
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.modal-card[open] {
  display: flex;
}

/* Animated entry on [open] */
.modal-card[open] {
  animation: dashModalIn var(--dur-med) var(--ease-out) both;
}
@keyframes dashModalIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Frosted backdrop */
.modal-card::backdrop {
  background: rgba(10, 22, 45, 0.60);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Gold top stripe on the form gives the modal a "certificate" premium feel */
.modal-card #modalForm.form-grid {
  padding: var(--sp-8);
  gap: var(--sp-5);
  border-top: 4px solid var(--clr-gold);
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: calc(100% - 88px);
}

.modal-card #modalForm.form-grid label textarea,
.modal-card #modalForm.form-grid label input[type="url"] {
  min-height: 5rem;
}

.modal-card #modalForm.form-grid label textarea {
  resize: vertical;
  min-height: 6rem;
}

/* Footer action bar */
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-8);
  background: var(--clr-surface-alt);
  border-top: 1px solid var(--clr-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  list-style: none;
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════
   13. UTILITY
   ═══════════════════════════════════════════════════════════ */

.hidden { display: none !important; }

/* Thin branded scrollbar */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: var(--clr-bg); }
::-webkit-scrollbar-thumb  { background: var(--clr-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-text-muted); }


/* ═══════════════════════════════════════════════════════════
   14. RESPONSIVE — 960 px  (tablet, single-column)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 960px) {

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    top: auto;
  }

  /* Spread action buttons into a single row on tablet */
  .dashboard-actions-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Collapse metrics to 2×2 */
  .dashboard-metrics {
    grid-template-columns: 1fr 1fr;
  }

  /* Hide the wordy user-chip — space is tight */
  .user-chip {
    display: none;
  }

  .topbar-actions {
    gap: var(--sp-2);
  }
}


/* ═══════════════════════════════════════════════════════════
   15. RESPONSIVE — 640 px  (mobile)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 640px) {

  .dashboard-topbar {
    padding: var(--sp-3) var(--sp-4);
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-shell {
    padding-inline: var(--sp-4);
  }

  .dashboard-grid {
    gap: var(--sp-4);
    margin-top: var(--sp-4);
  }

  /* Action buttons back to 2×2 on mobile */
  .dashboard-actions-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Hide branch badge on mobile — not enough space */
  .branch-badge {
    display: none;
  }

  /* Metrics stay 2×2 */
  .dashboard-metrics {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
  }

  .metric-card h2 {
    font-size: var(--text-xl);
  }

  .panel.glass-panel {
    padding: var(--sp-4);
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
  }

  /* Let the table scroll horizontally on narrow screens */
  .table-wrap {
    margin-inline: calc(var(--sp-4) * -1);
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .search-field input[type="search"] {
    width: 140px;
  }

  /* Modal form tighter padding on mobile */
  .modal-card #modalForm.form-grid {
    padding: var(--sp-6);
  }
  .dialog-actions {
    padding: var(--sp-4) var(--sp-6);
  }
}


/* ═══════════════════════════════════════════════════════════
   16. REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .metric-card,
  .panel.glass-panel,
  .list-box-item,
  .dashboard-actions-grid .btn,
  .modal-card[open] {
    animation: none;
    transition: none;
  }
}
/* ─── 22. INDEX (branch selector) ───────────────────────── */

body.landing-page {
  background: linear-gradient(160deg, var(--clr-primary) 0%, #0d2447 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-8);
}

.landing-shell {
  text-align: center;
  max-width: 820px;
  width: 100%;
}

.landing-brand {
  margin-bottom: var(--sp-10);
}
.landing-logo {
  height: 80px;
  margin: 0 auto var(--sp-4);
}
.landing-brand h1 {
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: var(--sp-2);
}
.landing-brand p {
  color: rgba(255,255,255,.65);
  font-size: var(--text-lg);
  margin: 0;
}

.branch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.branch-card {
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.2);
  border-radius: var(--radius-xl);
  padding: var(--sp-8) var(--sp-6);
  cursor: pointer;
  transition: all var(--dur-med) var(--ease-out);
  text-align: left;
  color: #fff;
}
.branch-card:hover {
  background: rgba(255,255,255,.18);
  border-color: var(--clr-accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.3);
}
.branch-card-logo {
  height: 60px;
  width: auto;
  margin-bottom: var(--sp-4);
  border-radius: var(--radius-sm);
  object-fit: contain;
}
.branch-card h2 {
  color: #fff;
  font-size: var(--text-xl);
  margin-bottom: var(--sp-2);
}
.branch-card p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.65);
  margin: 0;
}

.landing-note {
  color: rgba(255,255,255,.45);
  font-size: var(--text-xs);
}

/* ─── 23. POPUP (branch/announcement popup) ─────────────── */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out);
}
.popup-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.popup-card {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  transform: translateY(20px) scale(.97);
  transition: transform var(--dur-med) var(--ease-out);
  position: relative;
}
.popup-overlay.visible .popup-card {
  transform: translateY(0) scale(1);
}

.popup-header {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 100%);
  padding: var(--sp-6) var(--sp-8) var(--sp-5);
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
}
.popup-header h2,
.popup-header h3 {
  color: #fff;
  margin: 0;
  font-size: var(--text-xl);
}
.popup-header p {
  color: rgba(255,255,255,.75);
  font-size: var(--text-sm);
  margin: var(--sp-1) 0 0;
}

.popup-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  transition: background var(--dur-fast);
}
.popup-close:hover { background: rgba(255,255,255,.3); }

.popup-body {
  padding: var(--sp-6) var(--sp-8);
}
.popup-body p {
  color: var(--clr-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-4);
}

.popup-actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: 0 var(--sp-8) var(--sp-6);
}
.popup-actions .btn { flex: 1; min-width: 120px; }

.popup-footer {
  padding: var(--sp-3) var(--sp-8);
  background: var(--clr-surface-alt);
  border-top: 1px solid var(--clr-border);
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  text-align: center;
}

/* Announcement popup variant */
.popup-announcement .popup-header {
  background: linear-gradient(135deg, var(--clr-gold) 0%, var(--clr-secondary) 100%);
}
.popup-banner-img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

/* ─── 24. HOME PAGE SPECIFIC ─────────────────────────────── */

.section-cards { padding: var(--sp-10) var(--sp-6); }
.section-cards h2 { text-align: center; margin-bottom: var(--sp-6); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-6);
  padding: 0 var(--sp-6);
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  padding: var(--sp-10) var(--sp-8);
  align-items: center;
}
.contact-section h2 { margin-bottom: var(--sp-3); }
.contact-section .btn { margin-top: var(--sp-4); }

.map-card {
  height: 200px;
  background: var(--clr-surface-alt);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ─── 25. RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 960px) {
  /* Header */
  .header-grid {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .main-nav { order: 3; grid-column: 1 / -1; justify-content: flex-start; }
  .admin-login-btn { grid-row: 1; }

  /* Auth */
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .login-visual { display: none; }
  .login-panel { padding: var(--sp-10) var(--sp-8); }

  /* About */
  .about-hero-grid,
  .founder-section,
  .about-highlights { grid-template-columns: 1fr; }

  /* Admission & Contact */
  .admission-grid,
  .contact-grid { grid-template-columns: 1fr; }

  /* Facilities */
  .split-section,
  .facilities-summary-cards { grid-template-columns: 1fr; }

  /* Dashboard */
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-sidebar { position: static; }

  /* Home hero */
  .hero-section .container { grid-template-columns: 1fr; }

  /* Index */
  .branch-grid { grid-template-columns: 1fr; }

  /* Contact home */
  .contact-section { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --sp-12: 2.5rem; --sp-16: 3rem; }

  .container { padding-inline: var(--sp-4); }

  .main-nav { gap: 0; }
  .main-nav a { font-size: var(--text-xs); padding: var(--sp-2); }

  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }

  .hero-quick-stats { gap: var(--sp-4); }

  .form-row { grid-template-columns: 1fr; }

  .admission-copy,
  .admission-form-card { padding: var(--sp-5); }

  .login-panel { padding: var(--sp-8) var(--sp-5); }

  .popup-card { margin: var(--sp-4); }
  .popup-header,
  .popup-body,
  .popup-actions { padding-inline: var(--sp-5); }

  .dashboard-metrics { grid-template-columns: repeat(2, 1fr); }

  .dashboard-actions-grid { grid-template-columns: 1fr; }

  .gallery-grid,
  .resource-grid,
  .news-grid { grid-template-columns: 1fr; padding-inline: var(--sp-4); }

  .lightbox-controls { gap: var(--sp-2); }
  .lightbox-controls .btn { padding: var(--sp-2) var(--sp-3); font-size: var(--text-xs); }
}

/* ─── 26. REDUCED MOTION ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ─── 27. PRINT ──────────────────────────────────────────── */

@media print {
  .site-header,
  .admin-login-btn,
  .btn,
  .popup-overlay { display: none !important; }
  body { background: #fff; color: #000; }
}

