/* ============================================================
   LEARNERS SCIENCE HIGH SCHOOL & ACADEMY – Design System
   Brand Palette: Academic Blue (#1A7BCC) + Accent Gold (#F59D16)
   ============================================================ */

/* --- CSS Variables & Design Tokens ------------------------ */
/* HOW TO CHANGE GLOBAL COLORS: 
   Change these variables to update the colors across the ENTIRE website automatically.
   --primary is used for buttons, active links, and highlights.
   --accent is used for secondary buttons and warning/alert badges. */
:root {
  --primary:               #2B78C5;       /* Vibrant Logo Royal Blue */
  --primary-hover:         #1E62A6;       /* Logo Secondary Blue */
  --primary-light:         #EBF4FF;       /* Soft Blue Tint */
  --primary-button:        #2B78C5;       /* Logo Blue Primary Action */
  --primary-button-hover:  #1E62A6;       /* Logo Blue Action Hover */
  --card-border:           rgba(43, 120, 197, 0.22);
  --card-bg-gradient:      #2B78C5;
  --accent:                #F59E0B;       /* Vibrant Golden Yellow */
  --accent-hover:          #D97706;       /* Rich Gold Hover */
  --accent-light:          #FEF3C7;       /* Soft Gold Glow */
  --accent-dark:           #B45309;       /* Deep Gold Accent */
  --bg:                    #F8FAFC;       /* Soft Cool Canvas */
  --surface:               #FFFFFF;       /* Clean Surface */
  --text:                  #0F172A;       /* Deep Slate Text */
  --muted:                 #64748B;       /* Muted Slate Text */
  --border:                rgba(43, 120, 197, 0.16);
  --border-solid:          #E2E8F0;       /* Solid Slate Border */
  --sidebar-bg:            #2B78C5;       /* Official Logo Royal Blue Sidebar */
  --sidebar-width:         260px;
  --header-height:         72px;
  --radius:                0.75rem;
  --radius-sm:             0.5rem;
  --radius-lg:             1.25rem;
  --shadow-sm:             0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md:             0 8px 24px -4px rgba(43, 120, 197, 0.15);
  --shadow-lg:             0 20px 40px -8px rgba(30, 86, 160, 0.22);
  --glass-bg:              rgba(255, 255, 255, 0.92);
  --glass-border:          rgba(245, 158, 11, 0.3);
}

.dark {
  /* HOW TO CHANGE DARK MODE COLORS: 
     These override the :root variables when the user clicks the Moon icon.
     Make sure these colors are dark to maintain the dark mode effect! 
     (Note: #5297f8 is a bright blue, you may want to change this back to a dark color like #090E1A) */
  --bg:                    #0F172A;       /* Deep Dark Slate Canvas */
  --surface:               #1E293B;       /* Dark Slate Surface */
  --text:                  #F8FAFC;       /* Light Crisp Slate */
  --muted:                 #94A3B8;       /* Soft Blue Grey */
  --border:                rgba(245, 158, 11, 0.2);
  --border-solid:          #334155;       /* Solid Dark Border */
  --primary-hover:         #1E62A6;
  --glass-bg:              rgba(30, 41, 59, 0.92);
  --glass-border:          rgba(245, 158, 11, 0.25);
}

/* Primary Button Styling & Active Role Chips */
.btn-primary, .role-btn.active {
  background-color: var(--primary-button) !important;
  border-color: var(--primary-button) !important;
  color: #ffffff !important;
}

.btn-primary:hover, .role-btn.active:hover {
  background-color: var(--primary-button-hover) !important;
  border-color: var(--primary-button-hover) !important;
}

.btn-gold {
  background: #F39C12;
  color: #0F172A !important;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-gold:hover {
  background: #D4880D;
  transform: translateY(-1px);
}

.feature-icon-bg {
  background: rgba(43,120,197,0.1);
  color: var(--primary);
}

.dark .feature-icon-bg {
  background: rgba(96,165,250,0.15);
  color: #93C5FD;
}

/* --- Badges & Chips ---------------------------------------- */
.timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(43, 120, 197, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 9999px;
  border: 1px solid rgba(43, 120, 197, 0.2);
}
.dark .timeline-badge {
  background: rgba(96, 165, 250, 0.15);
  color: #93C5FD;
  border-color: rgba(96, 165, 250, 0.25);
}

/* --- Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

/* Ensure body doesn't override snapping */
body {
  overflow-x: hidden;
  margin: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; }

/* --- Logo -------------------------------------------------- */
.logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 0.75rem;
  border: 2px solid var(--accent);
  padding: 4px;
  background: #fff;
}

img[src="logo.png"] {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 0.75rem;
  border: 2px solid var(--accent);
  padding: 4px;
  background: #fff;
}

/* --- Glass Panel ------------------------------------------- */
.glass-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
}

.glass-panel:hover {
  box-shadow: var(--shadow-md);
}

/* --- Layout ------------------------------------------------ */
#sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  overflow-y: auto;
  transition: transform 0.3s ease;
}

#main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#top-header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border-solid);
  box-shadow: var(--shadow-sm);
}

#portal-content {
  padding: 1.5rem;
  flex: 1;
}

/* Sidebar overlay */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 55;
}

#sidebar-overlay.active { display: block; }

/* --- Sidebar Nav ------------------------------------------- */
.sidebar-logo-area {
  padding: 1.25rem 1rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo-area .school-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 1rem 1.25rem 0.4rem;
}

nav#sidebar-nav {
  flex: 1;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem 1.25rem;
  margin: 0 0.5rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.nav-link i { width: 1.25rem; text-align: center; font-size: 0.95rem; }

.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.nav-link.active {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-left: 3px solid var(--accent);
}

.nav-link.active i { color: #fff; }

/* Sidebar user footer */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-footer img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--accent); }

.sidebar-footer .user-info { flex: 1; overflow: hidden; }
.sidebar-footer .user-name { font-size: 0.8rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .user-role { font-size: 0.65rem; color: rgba(255,255,255,0.5); text-transform: capitalize; }

/* --- Header ------------------------------------------------ */
.header-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-primary-soft { background: rgba(26,123,204,0.12) !important; }
.bg-accent-soft { background: rgba(245,157,22,0.12) !important; }

.site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148,163,184,0.16);
}
.site-header.dark {
  background: rgba(15,23,42,0.92);
  border-color: rgba(148,163,184,0.08);
}
.site-nav-link {
  color: #334155;
  font-weight: 600;
  transition: color 0.2s ease;
}
.site-nav-link:hover,
.site-nav-link.active {
  color: var(--primary);
}
.site-logo-text {
  color: var(--primary);
  font-weight: 700;
}

/* --- Fixed Header & Interactive Smooth Navigation ------------------ */
.fixed-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(17, 82, 138, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .fixed-site-header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: rgba(30, 41, 59, 0.8);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
}

.nav-link-animated {
  position: relative;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link-animated::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2.5px;
  background: var(--primary, #2B78C5);
  border-radius: 9999px;
  transition: width 0.25s ease, left 0.25s ease;
}

.nav-link-animated:hover::after,
.nav-link-animated.active::after {
  width: 100%;
  left: 0;
}

.cta-btn-animated {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-btn-animated:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 22px -4px rgba(26, 123, 204, 0.4);
}

.cta-btn-animated:active {
  transform: translateY(0);
}
.nav-cta {
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-gold {
  background: var(--accent);
  color: #0F172A !important;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-gold:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.hero-bg {
  background: var(--primary);
}
.footer-bg {
  background: var(--accent-dark);
}
.badge-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(245,157,22,0.15);
  color: #92400E;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.dark .badge-brand {
  background: rgba(245,157,22,0.22);
  color: #FDE68A;
}
.story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  will-change: transform;
}
.story-card:hover {
  transform: translateY(-4px);
  border-color: rgba(26,123,204,0.25);
  box-shadow: var(--shadow-md);
}
.story-card .icon {
  color: var(--primary);
}
.focus-box {
  background: rgba(26,123,204,0.1);
  border: 1px solid rgba(26,123,204,0.16);
  border-radius: 1.5rem;
}

.btn-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-solid);
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.btn-icon:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Mobile hamburger */
.btn-hamburger {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--text);
  font-size: 1.1rem;
}

/* --- Buttons ----------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Shared premium motion and the same restrained blue/gold palette as index.html. */
@keyframes portal-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes portal-glow { 0%, 100% { opacity: 0.92; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-1px); } }
#portal-content > * { animation: portal-rise .35s ease-out both; }
.glass-panel, .stat-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.glass-panel:hover, .stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,.10); border-color: rgba(26,123,204,.28); }
.btn-primary, .btn-accent, .btn-outline-primary { border-radius: 999px; box-shadow: none; transition: transform .18s ease, background .18s ease, color .18s ease; }
.btn-primary:hover, .btn-accent:hover, .btn-outline-primary:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(26,123,204,.18); }
.badge-brand, .badge-blue { background: rgba(26,123,204,.10); color: var(--primary); border: 1px solid rgba(26,123,204,.18); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Class attendance calendar — clear dates, restrained index-page palette. */
.attendance-workspace { color: var(--accent-dark); }
.attendance-month-picker { font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.09em; color:var(--primary); }
.attendance-month-picker input { display:block; margin-top:.35rem; padding:.65rem .8rem; border:1px solid rgba(26,123,204,.22); border-radius:.75rem; background:var(--card-bg,#fff); color:inherit; }
.attendance-class-card { padding:1rem; text-align:left; border:1px solid rgba(26,123,204,.15); border-radius:1rem; background:var(--card-bg,#fff); color:inherit; transition:.2s ease; }
.attendance-class-card small { display:block; margin-top:.25rem; color:#64748b; font-size:.72rem; }
.attendance-class-card:hover,.attendance-class-active { border-color:var(--primary); background:rgba(26,123,204,.06); transform:translateY(-2px); }
.attendance-calendar-panel { padding:1.35rem; border:1px solid rgba(26,123,204,.16); border-radius:1.15rem; background:rgba(240,248,255,.92); box-shadow:0 12px 28px rgba(15,23,42,.07); }
.dark .attendance-calendar-panel { background:rgba(13,42,68,.92); }
.attendance-calendar-row { display:grid; grid-template-columns:180px 1fr; gap:.6rem; align-items:center; padding:.38rem 0; border-bottom:1px solid rgba(26,123,204,.08); }
.attendance-calendar-header { position:sticky; top:0; z-index:2; padding:.55rem 0; background:inherit; }
.attendance-student-label { padding-left:.25rem; font-size:.82rem; }
.attendance-student-label small { display:block; margin-top:.12rem; color:#64748b; font-size:.68rem; }
.attendance-days { display:grid; gap:.28rem; }
.attendance-date { min-height:42px; padding:.22rem 0; border:1px solid transparent; border-radius:.55rem; background:rgba(26,123,204,.05); color:#475569; font-size:.62rem; line-height:1.05; transition:.15s ease; }
.attendance-date span,.attendance-date b { display:block; }
.attendance-date b { margin-top:.16rem; font-size:.78rem; color:var(--primary); }
.attendance-date:hover,.attendance-date-active { border-color:var(--accent); background:rgba(245,157,22,.13); }
.attendance-cell { height:27px; border:1px solid transparent; border-radius:.43rem; transition:.15s ease; }
.attendance-cell:hover,.attendance-cell-selected { outline:2px solid var(--accent); outline-offset:1px; transform:scale(1.07); }
.attendance-present { background:var(--primary); }.attendance-absent { background:var(--accent-dark); }.attendance-leave { background:var(--accent); }.attendance-empty { background:rgba(100,116,139,.18); }
.attendance-key { display:inline-block; width:.62rem; height:.62rem; margin-right:.25rem; border-radius:50%; vertical-align:middle; }
.attendance-legend { display:flex; flex-wrap:wrap; gap:.8rem; font-size:.72rem; color:#64748b; }
.attendance-register-card { display:flex; align-items:center; justify-content:space-between; gap:.7rem; padding:.85rem; border:1px solid rgba(26,123,204,.14); border-radius:.8rem; background:rgba(26,123,204,.025); }
.attendance-register-card select { padding:.38rem .5rem; border:1px solid rgba(26,123,204,.2); border-radius:.5rem; background:transparent; color:inherit; }
@media (max-width:640px) { .attendance-calendar-panel { padding:1rem; }.attendance-legend { margin-top:.7rem; }.attendance-calendar-row { grid-template-columns:150px 1fr; } }

/* Refined monthly calendar: a dashboard component, not a spreadsheet. */
.attendance-calendar-panel {
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 1.4rem;
  background: #f8fbff;
  box-shadow: 0 18px 44px rgba(17,82,138,.16);
}
.dark .attendance-calendar-panel { background: #0f1f33; }
.attendance-calendar-panel > div:first-child {
  padding: 1.4rem 1.5rem;
  margin: 0 !important;
  color: #fff;
  background: var(--primary, #2B78C5);
}
.attendance-calendar-panel > div:first-child h3 { color:#fff; font-size:1.18rem; }
.attendance-calendar-panel > div:first-child p { color:rgba(255,255,255,.70) !important; }
.attendance-calendar-panel .attendance-legend { color:rgba(255,255,255,.86); }
.attendance-calendar-panel .attendance-legend .attendance-empty { background:rgba(255,255,255,.35); }
.attendance-calendar-panel > .overflow-x-auto { padding: 1rem 1.15rem 1.25rem; }
.attendance-calendar-row { padding:.52rem .7rem; gap:.85rem; border-bottom:1px solid rgba(26,123,204,.09); border-radius:.8rem; }
.attendance-calendar-row:not(.attendance-calendar-header):hover { background:rgba(26,123,204,.045); }
.attendance-calendar-header { position:relative; top:auto; padding:.4rem .7rem .7rem; background:transparent; }
.attendance-calendar-header .attendance-student-label { color:#11528A; text-transform:uppercase; letter-spacing:.12em; font-size:.62rem; }
.attendance-student-label { padding-left:.45rem; color:#1e293b; }
.dark .attendance-student-label { color:#e2e8f0; }
.attendance-student-label b { font-size:.84rem; }
.attendance-date { min-height:48px; border:0; border-radius:.75rem; background:transparent; color:#64748b; }
.attendance-date span { font-size:.58rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.attendance-date b { width:24px; height:24px; line-height:24px; margin:.25rem auto 0; border-radius:50%; color:#11528A; background:rgba(26,123,204,.08); }
.attendance-date:hover { background:rgba(26,123,204,.07); border:0; }
.attendance-date-active { background:rgba(245,157,22,.13) !important; }
.attendance-date-active b { color:#0f172a; background:#F59D16; box-shadow:0 4px 10px rgba(245,157,22,.35); }
.attendance-cell { width:22px; height:22px; margin:auto; border:3px solid #f8fbff; border-radius:50%; box-shadow:0 2px 5px rgba(15,23,42,.08); }
.dark .attendance-cell { border-color:#0f1f33; }
.attendance-cell:hover,.attendance-cell-selected { outline:0; transform:scale(1.16); box-shadow:0 0 0 3px rgba(245,157,22,.34); }
.attendance-present { background:#1A7BCC; }.attendance-absent { background:#334155; }.attendance-leave { background:#F59D16; }.attendance-late { background:#ea580c; }.attendance-empty { background:#dbe7f3; }
.attendance-key { width:.7rem; height:.7rem; box-shadow:0 1px 3px rgba(15,23,42,.2); }
@media (max-width:640px) { .attendance-calendar-panel > div:first-child { padding:1.1rem; }.attendance-calendar-panel > .overflow-x-auto { padding:.8rem; }.attendance-calendar-row { grid-template-columns:135px 1fr; padding:.42rem; } }

/* Attendance overview replaces the dense month calendar. */
.attendance-hero { display:flex; align-items:end; justify-content:space-between; gap:1rem; padding:1.6rem; border-radius:1.4rem; color:#fff; background:var(--primary, #2B78C5); box-shadow:0 16px 34px rgba(17,82,138,.2); }
.attendance-hero > div > span { color:#F59D16; font-size:.7rem; font-weight:800; letter-spacing:.16em; text-transform:uppercase; }.attendance-hero h2 { margin:.3rem 0; font-size:1.7rem; font-weight:800; }.attendance-hero p { margin:0; color:rgba(255,255,255,.75); font-size:.85rem; }.attendance-hero label { color:#fff; font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.1em; }.attendance-hero input { display:block; margin-top:.35rem; padding:.55rem .7rem; border:1px solid rgba(255,255,255,.35); border-radius:.7rem; color:#0f172a; background:#fff; }
.attendance-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; margin-bottom:1.5rem; }.attendance-stat { padding:1.1rem; border:1px solid rgba(26,123,204,.14); border-radius:1rem; background:#fff; box-shadow:0 6px 20px rgba(15,23,42,.05); }.dark .attendance-stat{background:#132238}.attendance-stat span,.attendance-stat small{display:block;color:#64748b;font-size:.72rem}.attendance-stat span{text-transform:uppercase;letter-spacing:.08em;font-weight:700}.attendance-stat b{display:block;margin:.2rem 0;color:#11528A;font-size:1.7rem}.dark .attendance-stat b{color:#7dc5fa}
.attendance-student-overview { padding:1.4rem; border:1px solid rgba(26,123,204,.14); border-radius:1.2rem; background:var(--primary, #2B78C5); }.dark .attendance-student-overview{background:var(--primary, #2B78C5)}.attendance-student-overview h3{font-size:1.1rem;font-weight:800}.attendance-student-overview p{font-size:.78rem;color:#64748b}.attendance-search{padding:.6rem .8rem;border:1px solid rgba(26,123,204,.18);border-radius:999px;background:transparent;color:inherit}.attendance-student-card{padding:1rem;border:1px solid rgba(26,123,204,.13);border-radius:1rem;background:rgba(26,123,204,.025);transition:.2s ease}.attendance-student-card:hover{transform:translateY(-2px);border-color:rgba(26,123,204,.38)}.attendance-student-card small{display:block;margin-top:.15rem;color:#64748b;font-size:.7rem}.attendance-student-card strong{color:#11528A;font-size:1.1rem}.dark .attendance-student-card strong{color:#7dc5fa}.attendance-progress{height:7px;margin:1rem 0 .65rem;overflow:hidden;border-radius:99px;background:#dbe7f3}.attendance-progress i{display:block;height:100%;border-radius:inherit;background:var(--primary, #2B78C5)}.attendance-card-meta{display:flex;justify-content:space-between;font-size:.7rem;color:#64748b}
@media(max-width:700px){.attendance-hero{align-items:flex-start;flex-direction:column}.attendance-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.attendance-hero h2{font-size:1.35rem}}

.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 0.875rem;
  border-radius: var(--radius-sm); border: none; cursor: pointer; transition: background 0.2s;
}
.btn-accent:hover { background: var(--accent-hover); }

.btn-outline-primary {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

.btn-outline-danger {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: #F39C12;
  border: 1px solid #F39C12;
  border-radius: var(--radius-sm);
  font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.btn-outline-danger:hover { background: #F39C12; color: #fff; }

/* Attendance status buttons */
.btn-success-active { background: #16a34a; color: #fff; border: none; }
.btn-outline-success { background: #f0fdf4; color: #16a34a; border: 1px solid #16a34a; }
.btn-danger-active  { background: #dc2626; color: #fff; border: none; }

/* --- Stat Cards -------------------------------------------- */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
}

/* --- Tables ------------------------------------------------ */
.glass-table { width: 100%; border-collapse: collapse; }

.glass-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: rgba(26,123,204,0.06);
  border-bottom: 2px solid rgba(26,123,204,0.15);
}

.glass-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.glass-table tr:last-child td { border-bottom: none; }
.glass-table tr:hover td { background: rgba(26,123,204,0.04); }
.dark .glass-table th { color: var(--accent); background: rgba(245,157,22,0.06); border-color: rgba(245,157,22,0.12); }
.dark .glass-table tr:hover td { background: rgba(255,255,255,0.04); }

/* --- Badges ------------------------------------------------ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-green, .badge-paid     { background: #dcfce7; color: #15803d; border: 1px solid rgba(21,128,61,0.2); }
.badge-red, .badge-unpaid, .badge-overdue { background: #fee2e2; color: #b91c1c; border: 1px solid rgba(185,28,28,0.2); }
.badge-yellow, .badge-pending { background: #fef3c7; color: #92400e; border: 1px solid rgba(146,64,14,0.2); }
.badge-blue                   { background: #dbeafe; color: var(--primary); border: 1px solid rgba(26,123,204,0.2); }
.badge-orange                 { background: rgba(245,157,22,0.12); color: var(--accent-hover); border: 1px solid rgba(245,157,22,0.2); }
.badge-gold                   { background: rgba(245,157,22,0.15); color: var(--accent-hover); border: 1px solid rgba(245,157,22,0.25); }

.dark .badge-green, .dark .badge-paid     { background: rgba(21,128,61,0.25);  color: #86efac; border: 1px solid rgba(134,239,172,0.25); }
.dark .badge-red, .dark .badge-unpaid, .dark .badge-overdue { background: rgba(185,28,28,0.25);  color: #fca5a5; border: 1px solid rgba(252,165,165,0.25); }
.dark .badge-yellow, .dark .badge-pending { background: rgba(146,64,14,0.25);  color: #fde68a; border: 1px solid rgba(253,230,138,0.25); }
.dark .badge-blue                         { background: rgba(26,123,204,0.25); color: #93c5fd; border: 1px solid rgba(147,197,253,0.25); }
.dark .badge-orange                       { background: rgba(245,157,22,0.2);  color: #fcd34d; border: 1px solid rgba(252,211,77,0.25); }

/* --- Forms ------------------------------------------------- */
input, select, textarea {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-solid);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,123,204,0.12);
}

.dark input, .dark select, .dark textarea {
  background: #1e293b;
  border-color: var(--border);
  color: var(--text);
}
.dark input::placeholder, .dark textarea::placeholder { color: var(--muted); }

/* --- Radial Chart ------------------------------------------ */
.radial-chart {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.radial-chart::after {
  content: '';
  position: absolute;
  width: 72%;
  height: 72%;
  background: var(--surface);
  border-radius: 50%;
}

.radial-chart-inner {
  position: relative;
  z-index: 10;
  font-weight: 800;
  color: var(--text);
}

/* --- Scrollbar --------------------------------------------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* --- Transitions ------------------------------------------- */
.smooth-transition { transition: all 0.3s ease; }

/* --- Mobile Sidebar ---------------------------------------- */
.sidebar-open {
  transform: translateX(0) !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablets & Mobile */
@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(-100%);
    z-index: 60;
  }

  #sidebar.sidebar-open { transform: translateX(0); }

  #sidebar-overlay { display: block; }
  #sidebar-overlay.hidden { display: none; }

  #main-content {
    margin-left: 0 !important;
  }

  .btn-hamburger { display: flex; }
}

@media (max-width: 640px) {
  #top-header { padding: 0 1rem; }
  #portal-content { padding: 1rem; }
  .glass-panel { border-radius: 0.75rem; }

  .stat-value { font-size: 1.4rem; }

  .glass-table th, .glass-table td { padding: 0.5rem 0.65rem; font-size: 0.75rem; }

  h2.text-2xl { font-size: 1.25rem !important; }
}

/* ============================================================
   TAILWIND OVERRIDES – Academic Blue #1A7BCC + Gold #F59D16
   ============================================================ */
.text-blue-600, .text-blue-700, .text-blue-500, .text-blue-400 { color: var(--primary) !important; }
.dark .text-blue-400, .dark .text-blue-500 { color: #60a5fa !important; }
.text-amber-600, .text-orange-500, .text-orange-600, .text-yellow-500 { color: var(--accent) !important; }
.bg-blue-600, .bg-blue-700, .bg-blue-500 { background-color: var(--primary) !important; }
.bg-blue-50, .bg-blue-100 { background-color: #E0F2FE !important; }
.bg-orange-50, .bg-amber-50, .bg-orange-100, .bg-amber-100 { background-color: rgba(245,157,22,0.08) !important; }
.border-blue-500, .border-blue-600 { border-color: var(--primary) !important; }
.border-orange-500, .border-amber-500 { border-color: var(--accent) !important; }
.hover\:bg-blue-700:hover { background-color: var(--primary-hover) !important; }

/* Normalize rainbow, purple and indigo colors to official logo brand palette (#2B78C5) */
[class*="text-emerald-"], [class*="text-green-"], 
[class*="text-pink-"], [class*="text-rose-"], [class*="text-teal-"],
[class*="text-cyan-"], [class*="text-sky-"], [class*="text-lime-"],
[class*="text-purple-"], [class*="text-indigo-"],
[class*="text-fuchsia-"], [class*="text-violet-"] { color: var(--primary) !important; }

[class*="bg-emerald-"], [class*="bg-green-"], 
[class*="bg-pink-"], [class*="bg-rose-"], [class*="bg-teal-"],
[class*="bg-cyan-"], [class*="bg-sky-"], [class*="bg-lime-"],
[class*="bg-purple-"], [class*="bg-indigo-"],
[class*="bg-fuchsia-"], [class*="bg-violet-"] { background-color: rgba(43,120,197,0.08) !important; }

[class*="border-emerald-"], [class*="border-green-"], 
[class*="border-pink-"], [class*="border-rose-"], [class*="border-teal-"],
[class*="border-cyan-"], [class*="border-sky-"], [class*="border-lime-"],
[class*="border-purple-"], [class*="border-indigo-"],
[class*="border-fuchsia-"], [class*="border-violet-"] { border-color: rgba(43,120,197,0.25) !important; }

[class*="from-emerald-"], [class*="from-green-"], 
[class*="from-pink-"], [class*="from-rose-"], [class*="from-teal-"],
[class*="from-cyan-"], [class*="from-sky-"], [class*="from-lime-"],
[class*="from-purple-"], [class*="from-indigo-"],
[class*="from-fuchsia-"], [class*="from-violet-"] { --tw-gradient-from: var(--primary) !important; }

[class*="via-emerald-"], [class*="via-green-"], 
[class*="via-pink-"], [class*="via-rose-"], [class*="via-teal-"],
[class*="via-cyan-"], [class*="via-sky-"], [class*="via-lime-"],
[class*="via-purple-"], [class*="via-indigo-"],
[class*="via-fuchsia-"], [class*="via-violet-"] { --tw-gradient-to: var(--primary) !important; }

[class*="to-emerald-"], [class*="to-green-"], 
[class*="to-pink-"], [class*="to-rose-"], [class*="to-teal-"],
[class*="to-cyan-"], [class*="to-sky-"], [class*="to-lime-"],
[class*="to-purple-"], [class*="to-indigo-"],
[class*="to-fuchsia-"], [class*="to-violet-"] { --tw-gradient-to: var(--primary) !important; }

[class*="hover:bg-emerald-"], [class*="hover:bg-green-"], 
[class*="hover:bg-pink-"], [class*="hover:bg-rose-"], [class*="hover:bg-teal-"],
[class*="hover:bg-cyan-"], [class*="hover:bg-sky-"], [class*="hover:bg-lime-"],
[class*="hover:bg-purple-"], [class*="hover:bg-indigo-"],
[class*="hover:bg-fuchsia-"], [class*="hover:bg-violet-"] { background-color: rgba(43,120,197,0.14) !important; }

[class*="hover:text-emerald-"], [class*="hover:text-green-"], 
[class*="hover:text-pink-"], [class*="hover:text-rose-"], [class*="hover:text-teal-"],
[class*="hover:text-cyan-"], [class*="hover:text-sky-"], [class*="hover:text-lime-"],
[class*="hover:text-purple-"], [class*="hover:text-indigo-"],
[class*="hover:text-fuchsia-"], [class*="hover:text-violet-"] { color: var(--primary) !important; }

[class*="hover:border-emerald-"], [class*="hover:border-green-"], 
[class*="hover:border-pink-"], [class*="hover:border-rose-"], [class*="hover:border-teal-"],
[class*="hover:border-cyan-"], [class*="hover:border-sky-"], [class*="hover:border-lime-"],
[class*="hover:border-purple-"], [class*="hover:border-indigo-"],
[class*="hover:border-fuchsia-"], [class*="hover:border-violet-"] { border-color: rgba(43,120,197,0.3) !important; }

/* Portal shared styles */
.portal-shell #top-header { border-bottom: 3px solid #2B78C5; }
.portal-shell .header-title { color: #2B78C5; font-weight: 800; }

/* --- Storytelling & Card Animations ----------------------- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.02); opacity: 1; }
}

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

.animate-float { animation: float 4s ease-in-out infinite; }
.animate-pulse-glow { animation: pulseGlow 3s ease-in-out infinite; }
.animate-card { animation: cardSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.story-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  will-change: transform;
  overflow: hidden;
}

.story-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--primary, #2B78C5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(17, 82, 138, 0.15);
  border-color: rgba(26, 123, 204, 0.4);
}

.story-card:hover::before {
  opacity: 1;
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(43, 120, 197, 0.1);
  border: 1px solid rgba(26,123,204,0.25);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8125rem;
  border-radius: 9999px;
}

.dark .timeline-badge {
  color: #F39C12;
  background: rgba(43, 120, 197, 0.2);
}

/* --- Inline CSS Utility Class Substitutes ------------------ */
.bg-gradient-royal { background: var(--primary, #2B78C5) !important; }
.bg-gradient-sky { background: var(--primary, #2B78C5) !important; }
.badge-gold-light, .badge-gold-light-border { 
  background: rgba(243, 156, 18, 0.18); 
  border: 1px solid rgba(217, 119, 6, 0.5); 
  color: #B45309; 
  font-weight: 700; 
}
.dark .badge-gold-light, .dark .badge-gold-light-border { 
  color: #FDE68A; 
  background: rgba(243, 156, 18, 0.25); 
  border-color: rgba(243, 156, 18, 0.6); 
}
.text-gold { color: #F39C12 !important; }
.text-royal { color: #2B78C5 !important; }
.bg-dark-slate { background: #0B2545 !important; }
.bg-dark-header { background: #0B2545 !important; }
.dot-red { background: #F39C12; }
.dot-gold { background: #F39C12; }
.dot-green { background: #2B78C5; }
.hero-card-bg { background-image: linear-gradient(90deg, rgba(15,23,42,.68), rgba(15,23,42,.68)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1500&q=85'); }
.btn-whatsapp-floating { background: #25D366 !important; }
.btn-logout-ghost { border: none !important; background: transparent !important; color: rgba(255, 255, 255, 0.5) !important; }

/* ============================================================================
   SHARED SITE COMPONENTS (Headers, Footers, Navs & Page Banners)
   ============================================================================ */

.page-body {
  color: #1f2937;
  transition: color 0.3s, background-color 0.3s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Inter', sans-serif;
  background: #fff;
}
.dark .page-body {
  color: #f3f4f6;
  background: #111827;
}

/* HOW TO CHANGE THE HEADER MENU BACKGROUND:
   Change the 'background' property below. The '0.95' at the end means it is 95% opaque. */
.site-header-fixed {
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229,231,235,0.8);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.3s;
}
.dark .site-header-fixed {
  background: rgba(17,24,39,0.95);
  border-bottom-color: rgba(31,41,55,0.8);
}

.site-nav {
  width: 100%;
  padding: 0 1rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 640px) { .site-nav { padding: 0 2rem; } }
@media (min-width: 1024px) { .site-nav { padding: 0 3rem; } }

.site-logo-group {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.site-logo-group:hover .site-logo-img { transform: scale(1.05); }
.site-logo-img {
  height: 3.5rem;
  width: auto;
  object-fit: contain;
  border-radius: 1rem;
  border: 2px solid #F39C12;
  background: #fff;
  padding: 0.375rem;
  box-shadow: 0 4px 6px rgba(59,130,246,0.1);
  transition: transform 0.3s;
}
@media (min-width: 640px) { .site-logo-img { height: 4rem; } }

.site-logo-title {
  font-weight: 900;
  font-size: 0.85rem;
  color: #111827;
  letter-spacing: -0.025em;
  line-height: 1.15;
  transition: color 0.2s;
  white-space: normal;
  max-width: 140px;
}
.site-logo-group:hover .site-logo-title { color: #2B78C5; }
.dark .site-logo-title { color: #fff; }
@media (min-width: 375px) { .site-logo-title { font-size: 0.95rem; max-width: 180px; } }
@media (min-width: 640px) { .site-logo-title { font-size: 1.125rem; max-width: none; white-space: nowrap; line-height: 1.25; } }
@media (min-width: 1024px) { .site-logo-title { font-size: 1.25rem; } }

.site-logo-subtitle {
  font-size: 9.5px;
  color: #F39C12;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}
@media (min-width: 640px) { .site-logo-subtitle { font-size: 11px; margin-top: 0; } }

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}
.dark .desktop-nav { color: #e5e7eb; }
@media (min-width: 1024px) { .desktop-nav { display: flex; } }

.nav-dropdown {
  position: relative;
  cursor: pointer;
  padding: 0.5rem 0;
}
.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.nav-dropdown-trigger .fa-chevron-down {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.3s;
}
.nav-dropdown:hover .fa-chevron-down { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 13rem;
  padding: 0.5rem 0;
  background: rgba(255,255,255,0.95);
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  border: 1px solid #f3f4f6;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  transform: translateY(0.5rem);
  z-index: 50;
}
.dark .nav-dropdown-menu {
  background: rgba(31,41,55,0.95);
  border-color: #374151;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  color: #374151;
  transition: all 0.2s;
  border-radius: 0.75rem;
  margin: 0 0.25rem;
  font-weight: 500;
}
.dark .nav-dropdown-item { color: #e5e7eb; }
.nav-dropdown-item:hover { background: #eff6ff; color: #2B78C5; }
.dark .nav-dropdown-item:hover { background: rgba(55,65,81,0.5); }
.nav-dropdown-item i { width: 1rem; }
.nav-dropdown-item .icon-blue { color: #2B78C5; }
.nav-dropdown-item .icon-gold { color: #F39C12; }
.nav-dropdown-item.active {
  color: #2B78C5;
  font-weight: 700;
  background: #eff6ff;
}
.dark .nav-dropdown-item.active { background: rgba(55,65,81,0.5); }

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.dark-toggle-btn {
  padding: 0.625rem;
  color: #4b5563;
  border-radius: 0.75rem;
  transition: background 0.2s;
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 1rem;
}
.dark .dark-toggle-btn { color: #d1d5db; }
.dark-toggle-btn:hover { background: #f3f4f6; }
.dark .dark-toggle-btn:hover { background: #1f2937; }

.portal-login-btn {
  display: none; /* hidden on small screens */
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #2B78C5;
  color: #fff;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}
@media (min-width: 640px) {
  .portal-login-btn { display: inline-flex; }
}
.portal-login-btn:hover {
  background: #2163A4;
  transform: translateY(-1.5px);
  box-shadow: 0 8px 22px -4px rgba(26,123,204,0.4);
}
.portal-login-btn .fa-sign-in-alt {
  font-size: 0.75rem;
  color: #F39C12;
}

.mobile-menu-toggle {
  display: none;
  color: #4b5563;
  font-size: 1.5rem;
  padding: 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
}
.dark .mobile-menu-toggle { color: #d1d5db; }
@media (max-width: 1023px) { .mobile-menu-toggle { display: block; } }

.mobile-nav-menu {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav-menu.menu-open {
  padding: 0.5rem 1rem 1.5rem;
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
}
.dark .mobile-nav-menu {
  background: #111827;
  border-color: #1f2937;
}
@media (min-width: 1024px) { .mobile-nav-menu { display: none !important; } }
.mobile-nav-link {
  display: block;
  padding: 0.5rem 0;
  font-weight: 600;
  transition: color 0.2s;
}
.mobile-nav-link:hover { color: #2B78C5; }
.mobile-nav-login {
  display: block;
  margin-top: 1rem;
  padding: 0.5rem 0;
  text-align: center;
  background: #2B78C5;
  color: #fff;
  border-radius: 0.75rem;
  font-weight: 700;
}

.page-hero {
  padding-top: 8rem;
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}
/* HOW TO CHANGE THE HERO BANNER COLOR ON ALL PAGES:
   Change the 'background' linear-gradient below to any colors you want.
   If you want to change just ONE page, add an inline style in that page's HTML instead. */
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--primary, #2B78C5);
}
.page-hero-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
  color: #fff;
}
@media (min-width: 640px) { .page-hero-container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .page-hero-container { padding: 0 2rem; } }
.page-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
@media (min-width: 768px) { .page-hero-title { font-size: 3.75rem; } }
.page-hero-subtitle {
  color: #bfdbfe;
  font-size: 1.125rem;
  max-width: 42rem;
  margin: 0 auto;
}

.page-section {
  padding: 5rem 0;
}
.page-container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .page-container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .page-container { padding: 0 2rem; } }
.page-container-wide {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .page-container-wide { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .page-container-wide { padding: 0 2rem; } }

.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 3rem 0;
}
.footer-grid {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  gap: 2rem;
}
@media (min-width: 640px) { .footer-grid { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .footer-grid { padding: 0 2rem; } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.footer-brand-logo img {
  height: 2.5rem;
  opacity: 0.8;
  filter: grayscale(100%);
}
.footer-brand-logo span {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}
.footer-brand-desc { color: #9ca3af; }
.footer-heading {
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-contact {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.footer-contact li:not(:first-child) { align-items: center; }
.footer-bottom {
  max-width: 80rem;
  margin: 2rem auto 0;
  padding: 2rem 1rem 0;
  border-top: 1px solid #1f2937;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}
.footer-developer-credit {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.footer-developer-credit .credit-brand {
  color: #f1f5f9;
  font-weight: 600;
}
.footer-developer-credit a {
  color: #F59E0B;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}
.footer-developer-credit a:hover {
  color: #fbbf24;
  text-decoration: underline;
}

.whatsapp-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #3277ed;
  color: #fff;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.875rem;
  transition: transform 0.2s, background 0.2s;
  z-index: 50;
}
.whatsapp-fab:hover {
  background: #3980f1;
  transform: scale(1.1);
}




/* --- Global Hero Buttons --- */
.hero-buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}
@media (min-width: 640px) { .hero-buttons { flex-direction: row; } }
.hero-btn-primary {
  font-size: 1.125rem;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  transition: all 0.2s;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.hero-btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 1.125rem;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.hero-btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

/* Mobile Overrides */
@media (max-width: 639px) {
  .site-header-fixed { padding: 0.5rem; }
  .site-logo-img { height: 2.5rem; }
  .site-logo-title { font-size: 1rem; }
  .site-logo-subtitle { font-size: 0.65rem; }
  
  .hero-title { font-size: 2rem; line-height: 1.2; }
  .hero-subtitle { font-size: 1rem; }
  .hero-section { padding: 4rem 1rem 2rem; }
  
  .story-card, .feature-card, .course-card { 
      padding: 1.25rem; 
      margin-bottom: 1rem;
  }
  
  .features-grid { grid-template-columns: 1fr; gap: 1rem; }
  .desktop-nav { gap: 1rem; }
}

/* Section padding & offset for fixed header */
section, .hero-section, .features-section, .about-story-section, footer {
  scroll-margin-top: 5rem; /* Account for fixed header */
}

/* ============================================================================
   MODAL OVERLAY Z-INDEX & RESPONSIVE FIXES
   ============================================================================ */
.modal-overlay, [id$="-modal"], div[class*="fixed inset-0"] {
  z-index: 9999 !important;
}

.modal-content, .modal-box {
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 10000 !important;
}

/* Standardized Modal & Panel Close Box ("Dabba") */
.modal-close-btn,
.panel-close-btn,
.modal-close-box {
  width: 2.25rem !important;
  height: 2.25rem !important;
  min-width: 2.25rem !important;
  min-height: 2.25rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.75rem !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  background-color: #ffffff !important;
  color: #64748b !important;
  font-size: 0.95rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  z-index: 50 !important;
}

.modal-close-btn:hover,
.panel-close-btn:hover,
.modal-close-box:hover {
  background-color: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
  transform: scale(1.06) !important;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.15) !important;
}

.modal-close-btn:active,
.panel-close-btn:active,
.modal-close-box:active {
  transform: scale(0.96) !important;
}

/* Dark mode close button */
.dark .modal-close-btn,
.dark .panel-close-btn,
.dark .modal-close-box {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

.dark .modal-close-btn:hover,
.dark .panel-close-btn:hover,
.dark .modal-close-box:hover {
  background-color: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

/* On dark / navy brand gradient headers */
.modal-close-btn-light,
.bg-gradient-to-r .modal-close-btn,
.bg-gradient-to-r .panel-close-btn,
.modal-header-dark .modal-close-btn {
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.modal-close-btn-light:hover,
.bg-gradient-to-r .modal-close-btn:hover,
.bg-gradient-to-r .panel-close-btn:hover,
.modal-header-dark .modal-close-btn:hover {
  background-color: #ef4444 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35) !important;
}

/* Absolute positioned close buttons with safe spacing */
.modal-close-btn.modal-close-absolute,
.panel-close-btn.modal-close-absolute,
button.modal-close-absolute {
  position: absolute !important;
  top: 1rem !important;
  right: 1rem !important;
  z-index: 10001 !important;
}

/* Safe right padding for headers containing an absolute close button */
.modal-header-safe {
  padding-right: 3.5rem !important;
}

/* ==========================================================================
   Dual-Wing Mode Switcher (School Wing vs Academy Wing)
   Strictly adheres to brand tokens: #0B2545 (Navy), #2B78C5 (Blue), #F59E0B (Gold)
   ========================================================================== */
.wing-switcher-container {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dark .wing-switcher-container {
  background: #1e293b;
  border-color: #334155;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.wing-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  color: #64748b;
  background: transparent;
  transition: all 0.2s ease-in-out;
}

.dark .wing-toggle-btn {
  color: #94a3b8;
}

.wing-toggle-btn:hover {
  color: #0b2545;
}

.dark .wing-toggle-btn:hover {
  color: #f8fafc;
}

.wing-toggle-btn.active#btn-wing-school,
.wing-toggle-btn.active#btn-parent-wing-school {
  background: #2B78C5 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(43, 120, 197, 0.35);
}

.wing-toggle-btn.active#btn-wing-school i,
.wing-toggle-btn.active#btn-parent-wing-school i {
  color: #f59e0b !important;
}

.wing-toggle-btn.active#btn-wing-academy,
.wing-toggle-btn.active#btn-parent-wing-academy {
  background: #f59e0b !important;
  color: #0b2545 !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.wing-toggle-btn.active#btn-wing-academy i,
.wing-toggle-btn.active#btn-parent-wing-academy i {
  color: #0b2545 !important;
}

/* ============================================================================
   EXPORT & PRINT STYLES (DISABLE WATERMARKS & UNWANTED OVERLAYS)
   ============================================================================ */
@media print {
  /* Hide non-printable UI elements */
  header, footer, sidebar, #sidebar, #top-header, .site-header-fixed,
  .mobile-menu-toggle, .dark-toggle-btn, .whatsapp-fab, button:not(.printable-btn),
  .no-print, [class*="bg-black/"], .modal-overlay {
    display: none !important;
  }

  /* Force pure background and clear typography for sheets & report cards */
  body, page, .page-body, .portal-shell, main, #main-content, #portal-content {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Remove any watermark overlays or backgrounds */
  .watermark, [class*="watermark"], .bg-watermark, ::before, ::after {
    background-image: none !important;
    opacity: 1 !important;
  }

  .glass-panel, .story-card, .course-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    color: #000000 !important;
  }
}

/* ============================================================================
   INSTANT SECTION NAVIGATION PROGRESS BAR (0ms Latency Feedback)
   ============================================================================ */
.nav-top-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #2B78C5 0%, #F59E0B 70%, #10B981 100%);
  z-index: 999999;
  opacity: 0;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(43, 120, 197, 0.7), 0 0 5px rgba(245, 158, 11, 0.8);
}
.nav-top-progress-bar.active {
  opacity: 1;
}

