/* St. Louis College Jos — MSM NYC-inspired design */
:root {
  --royal-blue: #003da5;
  --royal-blue-light: #1a5fc7;
  --sky-blue: #87ceeb;
  --msm-black: #111111;
  --msm-nav: #000000;
  --msm-red: #a6192e;
  --msm-red-dark: #8b1426;
  --msm-gold: #c9a227;
  --white: #ffffff;
  --off-white: #f5f5f5;
  --light-gray: #ebebeb;
  --text: #222222;
  --text-muted: #555555;
  --border: #dddddd;
  --font-display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.25s ease;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--msm-red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--msm-red-dark); }

.container {
  width: min(1280px, 94%);
  margin: 0 auto;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 1px 0 var(--border);
}

.header-top {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-top-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.85rem 0;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  justify-self: start;
}

.school-logo {
  height: 76px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.school-name {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 700;
  color: var(--royal-blue);
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.2;
  justify-self: center;
  white-space: nowrap;
  margin: 0;
}

.header-utils {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  justify-self: end;
}

.util-link {
  color: var(--royal-blue);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.util-link:hover { color: var(--royal-blue-light); }
.util-divider { color: rgba(0, 61, 165, 0.35); font-weight: 300; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  grid-column: 3;
  justify-self: end;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--royal-blue);
  transition: var(--transition);
}

/* Navigation bar */
.main-nav {
  background: var(--royal-blue);
}

.main-nav--transparent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: transparent;
  border-bottom: none;
}

.main-nav--transparent .nav-link {
  color: var(--white);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.5);
}

.main-nav--transparent .nav-link:hover,
.main-nav--transparent .nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.main-nav--transparent .nav-dropdown {
  background: rgba(255, 255, 255, 0.97);
  border-top: 3px solid var(--royal-blue);
}

.hero-section {
  position: relative;
}

.nav-container { padding: 0; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  justify-content: center;
}

.nav-item { position: relative; }

.nav-link {
  display: block;
  padding: 1rem 1.15rem;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--royal-blue-light);
  color: var(--white);
}

.caret { font-size: 0.65em; margin-left: 3px; opacity: 0.8; }

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--white);
  list-style: none;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: var(--transition);
  z-index: 200;
  border-top: 3px solid var(--royal-blue-light);
}

.nav-item--dropdown:hover .nav-dropdown,
.nav-item--dropdown.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 0.85rem 1.25rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--light-gray);
}

.nav-dropdown-link:hover,
.nav-dropdown-link.active {
  background: var(--off-white);
  color: var(--msm-red);
}

/* ===== HERO CAROUSEL (starts below nav bar) ===== */
.hero {
  position: relative;
  height: 75vh;
  min-height: 420px;
  max-height: 780px;
  overflow: hidden;
  background: var(--msm-black);
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active { opacity: 1; z-index: 1; }

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.45) 45%,
    rgba(0, 0, 0, 0.15) 100%
  );
}

.hero-caption {
  position: absolute;
  bottom: 14%;
  left: 8%;
  max-width: 680px;
  color: var(--white);
  z-index: 2;
  text-align: left;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  line-height: 1.5;
  opacity: 0.95;
  max-width: 540px;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.45);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 52px;
  height: 52px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.hero-nav:hover {
  background: var(--msm-red);
  border-color: var(--msm-red);
}

.hero-nav--prev { left: 1.5rem; }
.hero-nav--next { right: 1.5rem; }

.hero-dots {
  position: absolute;
  bottom: 2.5rem;
  left: 8%;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
  flex-wrap: wrap;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.hero-dot.active,
.hero-dot:hover {
  background: var(--msm-red);
  border-color: var(--msm-red);
}

/* ===== INTRO SECTION ===== */
.intro-section {
  padding: 5.5rem 0;
  background: var(--white);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.eyebrow {
  color: var(--msm-red);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.85rem;
}

.intro-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  color: var(--msm-black);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.intro-content p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.intro-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-style: italic;
  color: var(--msm-black);
  border-left: 4px solid var(--msm-red);
  padding: 0.5rem 0 0.5rem 1.75rem;
  line-height: 1.6;
}

.intro-quote footer {
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--msm-black);
  margin-bottom: 2.5rem;
  text-align: center;
  font-weight: 700;
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  margin: -1.5rem 0 2.5rem;
  font-size: 1.05rem;
}

/* ===== EVENTS ===== */
.events-section {
  padding: 5rem 0;
  background: var(--off-white);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.event-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.event-date {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  background: var(--royal-blue);
  color: var(--white);
  padding: 0.6rem 0.4rem;
  align-self: flex-start;
}

.event-month {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}

.event-day {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.event-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--msm-black);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.event-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.event-meta {
  font-size: 0.78rem;
  color: var(--msm-red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== NEWS ===== */
.news-section {
  padding: 5rem 0;
  background: var(--msm-black);
  color: var(--white);
}

.news-section .section-title { color: var(--white); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.news-card {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.news-card time {
  display: block;
  font-size: 0.78rem;
  color: var(--msm-red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
}

.news-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
  font-weight: 700;
}

.news-card p {
  font-size: 0.95rem;
  opacity: 0.82;
  line-height: 1.65;
}

/* ===== PROGRAMS ===== */
.programs-section {
  padding: 5rem 0;
  background: var(--white);
}

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

.program-card {
  background: var(--off-white);
  padding: 2.25rem 2rem;
  border-top: 4px solid var(--msm-red);
  transition: transform var(--transition), box-shadow var(--transition);
  color: inherit;
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: inherit;
}

.program-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--msm-black);
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.program-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.9rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn--gold,
.btn--gold:hover {
  background: var(--msm-red);
  color: var(--white);
  border-color: var(--msm-red);
}

.btn--gold:hover {
  background: var(--msm-red-dark);
  border-color: var(--msm-red-dark);
}

.btn--outline {
  background: transparent;
  color: var(--msm-black);
  border-color: var(--msm-black);
}

.btn--outline:hover {
  background: var(--msm-black);
  color: var(--white);
}

/* ===== INNER PAGES ===== */
.page-hero {
  background: var(--sky-blue);
  color: var(--royal-blue);
  padding: 4.5rem 0;
}

.page-hero--compact { padding: 3rem 0; }

.page-hero .eyebrow {
  color: var(--royal-blue);
  opacity: 0.85;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  color: var(--royal-blue);
}

.page-hero p { opacity: 0.9; margin-top: 0.5rem; color: var(--royal-blue); }

.page-content {
  padding: 3.5rem 0 5rem;
}

.content-body {
  max-width: 820px;
}

.content-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--msm-black);
  margin: 2rem 0 0.75rem;
  font-weight: 700;
}

.content-body p,
.content-body li {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 1.02rem;
}

.content-body ul,
.content-body ol {
  margin: 1rem 0 1rem 1.5rem;
}

.content-body pre {
  background: var(--off-white);
  padding: 1.75rem;
  border-left: 4px solid var(--msm-red);
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.9;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--msm-black);
  color: var(--white);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td { background: var(--off-white); }

/* ===== CONTACT & AUTH ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--msm-black);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.contact-info p { margin-bottom: 0.85rem; }

.form-group { margin-bottom: 1.35rem; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--msm-red);
}

.alert {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

.alert--error {
  background: #fdecea;
  color: #b71c1c;
  border-left: 4px solid #b71c1c;
}

.alert--success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #2e7d32;
}

.auth-container { max-width: 440px; }
.auth-form { margin-bottom: 1rem; }
.auth-hint { font-size: 0.85rem; color: var(--text-muted); }
.dashboard-actions { margin-bottom: 2rem; }

.dashboard-actions .btn {
  flex-shrink: 0;
}
.results-table { margin-top: 1rem; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--royal-blue);
  color: rgba(255, 255, 255, 0.88);
  padding-top: 3.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-logo {
  height: 70px;
  width: auto;
  margin-bottom: 1.25rem;
  background: var(--white);
  padding: 6px;
  border-radius: 2px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.15rem;
  font-weight: 700;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { color: rgba(255, 255, 255, 0.7); }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.35rem 0;
  text-align: center;
  font-size: 0.82rem;
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--msm-black);
  color: var(--white);
  padding: 1.15rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  z-index: 2000;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
}

.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 0.9rem; max-width: 640px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .intro-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-caption {
    left: 5%;
    right: 5%;
    max-width: none;
  }

  .hero-dots { left: 5%; }
}

@media (max-width: 768px) {
  .header-top-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
  }

  .logo-link { grid-column: 1; grid-row: 1; }
  .nav-toggle { display: flex; grid-column: 3; grid-row: 1; }

  .school-name {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 1.2rem;
    padding: 0.25rem 0 0.5rem;
  }

  .header-utils {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    gap: 0.5rem;
  }

  .util-link { font-size: 0.68rem; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 80vh;
    overflow-y: auto;
    border-top: 3px solid var(--royal-blue);
  }

  .hero-section .main-nav--transparent.open {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: var(--royal-blue);
  }

  .main-nav.open { display: block; }

  .nav-list { flex-direction: column; }

  .nav-link { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    background: #1a1a1a;
    border-top: none;
  }

  .nav-item--dropdown.open .nav-dropdown { display: block; }

  .nav-dropdown-link {
    color: rgba(255, 255, 255, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    padding-left: 2rem;
  }

  .school-logo { height: 56px; }

  .hero { height: 55vh; min-height: 320px; }
  .hero-nav { width: 40px; height: 40px; font-size: 0.95rem; }

  .admin-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .admin-sidebar {
    position: static;
    top: auto;
  }
}

/* ===== ADMIN PANEL ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

.admin-sidebar {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--royal-blue);
  padding: 1.5rem 0;
  position: sticky;
  top: 160px;
}

.admin-sidebar-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--royal-blue);
  padding: 0 1.25rem 1rem;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.admin-sidebar-nav {
  list-style: none;
  padding: 0.75rem 0;
}

.admin-sidebar-link {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.admin-sidebar-link:hover {
  background: var(--white);
  color: var(--royal-blue);
}

.admin-sidebar-link.active {
  background: var(--white);
  color: var(--royal-blue);
  border-left-color: var(--royal-blue);
  font-weight: 600;
}

.admin-logout-form {
  padding: 1rem 1.25rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.btn--sm {
  padding: 0.55rem 1.25rem;
  font-size: 0.75rem;
}

.admin-main {
  min-width: 0;
}

.admin-panel {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

.admin-panel-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--royal-blue);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
}

.admin-form-grid .form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
}

.admin-form-grid .form-group select:focus {
  outline: none;
  border-color: var(--royal-blue);
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: center;
}

.admin-import-form {
  display: inline-flex;
  margin: 0;
}

.admin-import-label {
  cursor: pointer;
  margin: 0;
}

.admin-import-note {
  margin-top: -0.75rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table th {
  background: var(--royal-blue);
}

.admin-actions {
  white-space: nowrap;
}

.admin-action-link {
  background: none;
  border: none;
  color: var(--royal-blue);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.admin-action-link:hover {
  color: var(--royal-blue-light);
  text-decoration: underline;
}

.admin-action-link--danger {
  color: #b71c1c;
}

.admin-action-link--danger:hover {
  color: #8b0000;
}

.admin-inline-form {
  display: inline;
  margin-left: 0.75rem;
}

.admin-empty {
  color: var(--text-muted);
  font-style: italic;
}

.admin-search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.admin-search-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--royal-blue);
}

.admin-search-input {
  flex: 1;
  min-width: 220px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
}

.admin-search-input:focus {
  outline: none;
  border-color: var(--royal-blue);
}

.admin-search-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-search-empty {
  margin-top: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.admin-form-note {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-form-full {
  grid-column: 1 / -1;
}

.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.admin-form-grid select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
}

.admin-form-grid select:focus {
  outline: none;
  border-color: var(--royal-blue);
}

.admin-offers-meta,
.admin-offers-hint {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.admin-offers-group {
  border: 1px solid var(--border);
  padding: 1rem 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
}

.admin-offers-group legend {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--royal-blue);
  padding: 0 0.35rem;
}

.admin-offers-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.65rem;
}

.admin-offer-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--light-gray);
  background: var(--off-white);
  cursor: pointer;
}

.admin-offer-item--required {
  background: #eef4fc;
  border-color: rgba(0, 61, 165, 0.2);
}

.admin-offer-item input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.admin-offer-item span {
  font-size: 0.9rem;
  line-height: 1.4;
}

.admin-offer-item em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.82rem;
}

.admin-offer-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  background: var(--royal-blue);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 2px;
}

.password-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.password-toolbar .admin-panel-title {
  margin-bottom: 0;
}

.staff-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.staff-subject-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid rgba(0, 48, 135, 0.12);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.staff-subject-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(0, 48, 135, 0.08);
}

.staff-subject-card strong {
  color: var(--royal-blue);
  font-size: 1rem;
}

.staff-subject-card span {
  font-weight: 600;
}

.staff-subject-card em {
  font-style: normal;
  font-size: 0.82rem;
  color: #5c6470;
}

.staff-score-filters {
  margin-bottom: 1.5rem;
}

.staff-score-input,
.staff-grade-display {
  width: 100%;
  max-width: 7rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(0, 48, 135, 0.18);
  border-radius: 4px;
}

.staff-grade-display {
  background: #f4f6f9;
}

.session-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.session-badge--active {
  background: rgba(34, 139, 34, 0.12);
  color: #1f7a1f;
}

.session-badge--inactive {
  background: rgba(100, 100, 100, 0.12);
  color: #555;
}

.sync-status {
  font-weight: 600;
  margin-bottom: 1rem;
}

.sync-status--ready {
  color: #1f7a1f;
}

.sync-status--unavailable {
  color: #b71c1c;
}

.sync-meta {
  margin: 0;
}

.sync-meta-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}

.sync-meta-row dt {
  font-weight: 600;
  color: var(--text-muted, #555);
}

.sync-meta-row dd {
  margin: 0;
  word-break: break-all;
}

.sync-dot {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

.sync-dot--ok {
  background: rgba(34, 139, 34, 0.12);
  color: #1f7a1f;
}

.sync-dot--bad {
  background: rgba(183, 28, 28, 0.12);
  color: #b71c1c;
}

.sync-meta-row code {
  font-size: 0.85rem;
}

.sync-form {
  margin-top: 1.25rem;
}

.sync-action-panel .btn--sync {
  min-width: 180px;
}

.sync-progress-wrap {
  margin: 1.25rem 0 0.5rem;
}

.sync-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-muted, #555);
}

.sync-progress-track {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.sync-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--royal-blue), #2a6fd4);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.sync-action-panel .btn--sync[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.sync-hint {
  margin: 0.85rem 0 0;
  color: var(--text-muted, #555);
  font-size: 0.92rem;
  line-height: 1.55;
}

.sync-total-row td {
  border-top: 2px solid var(--border);
}

.sync-steps {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.sync-steps li + li {
  margin-top: 0.5rem;
}

.ca-sheet-wrap {
  margin-top: 1rem;
}

.ca-sheet-table {
  min-width: 1100px;
  font-size: 0.88rem;
}

.ca-sheet-table th,
.ca-sheet-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.ca-score-input {
  width: 4.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(0, 48, 135, 0.18);
  border-radius: 4px;
}

.ca-computed {
  font-weight: 600;
  color: var(--royal-blue);
}

.ca-sheet-meta {
  margin-bottom: 1rem;
}

.ca-sign-input {
  max-width: 6rem;
  text-transform: uppercase;
}

.ca-sign-cell {
  text-transform: uppercase;
}

.staff-assign-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.staff-assign-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 48, 135, 0.03);
  border-radius: 4px;
}

.staff-assign-subject {
  flex: 1 1 220px;
  margin: 0;
}

.staff-assign-class {
  flex: 0 0 10rem;
  min-width: 9rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(0, 48, 135, 0.18);
  border-radius: 4px;
  background: var(--white);
}

.staff-assign-class:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.password-print-filters {
  margin-bottom: 0;
}

.password-print-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  background: #f4f6f9;
  border-bottom: 1px solid rgba(0, 48, 135, 0.12);
}

.password-print-view {
  display: block;
  padding: 0.35in;
}

@media print {
  .no-print {
    display: none !important;
  }

  .password-print-view {
    padding: 0;
  }
}

.password-card {
  border: 2px dashed var(--royal-blue);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: #fff;
  box-sizing: border-box;
  min-height: 0;
}

.password-card-school {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--royal-blue);
}

.password-card-type {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-dark, #9a7b1f);
}

.password-card-name {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.password-card-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.25rem 0;
  font-size: 0.84rem;
}

.password-card-row span {
  color: #5c6470;
}

.password-card-detail {
  margin: 0.55rem 0 0;
  font-size: 0.76rem;
  color: #5c6470;
}

@media print {
  body * {
    visibility: hidden;
  }

  .password-print-only,
  .password-print-only * {
    visibility: visible;
  }

  .password-print-only {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  .password-print-page {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 0.45in;
    width: 100%;
    height: 10in;
    page-break-after: always;
    padding: 0.35in;
    box-sizing: border-box;
  }

  .password-print-page:last-child {
    page-break-after: auto;
  }

  .password-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.student-result-filters {
  margin-bottom: 1.5rem;
}

.student-terminal-report--embedded {
  margin-top: 1.5rem;
}

.student-result-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 48, 135, 0.12);
}

.print-result-table td:nth-child(2) {
  text-align: left;
}

.dashboard-actions .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Staff score print views */
.print-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  background: #f4f6f9;
  border-bottom: 1px solid rgba(0, 48, 135, 0.12);
}

.ca-print-arms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.ca-print-arms-label {
  font-size: 0.88rem;
  color: #5c6470;
  margin-right: 0.25rem;
}

.print-only {
  display: block;
  padding: 0.35in 0.4in;
  max-width: 11.69in;
  margin: 0 auto;
  color: #1a1a1a;
  box-sizing: border-box;
}

.print-school-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.print-school-name {
  margin: 0;
  font-size: 1.15rem;
  color: var(--royal-blue, #003087);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.print-doc-title {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-dark, #9a7b1f);
}

.print-ca-header,
.print-result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--royal-blue, #003087);
}

.print-ca-header-left,
.print-result-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.print-meta-table {
  border-collapse: collapse;
  font-size: 0.82rem;
}

.print-meta-table th,
.print-meta-table td {
  padding: 0.2rem 0.45rem;
  text-align: left;
  vertical-align: top;
}

.print-meta-table th {
  font-weight: 700;
  color: #5c6470;
  white-space: nowrap;
}

.print-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-bottom: 1.25rem;
}

.print-data-table th,
.print-data-table td {
  border: 1px solid #333;
  padding: 0.35rem 0.4rem;
  text-align: center;
}

.print-data-table th {
  background: #eef2f8;
  font-weight: 700;
}

.print-data-table td:nth-child(3),
.print-result-table td:nth-child(2) {
  text-align: left;
}

.print-empty {
  text-align: center;
  color: #5c6470;
  padding: 1rem;
}

.print-result-summary {
  margin: 1.25rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid #333;
  background: #fafbfc;
}

.print-result-summary h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--royal-blue, #003087);
}

.print-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.print-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.print-summary-label {
  font-size: 0.78rem;
  color: #5c6470;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.print-principal-comment h3 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
}

.print-principal-comment p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.print-ca-footer,
.print-result-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.print-signature-block {
  margin-top: 1.5rem;
}

.print-signature-line {
  margin: 2.5rem 0 0;
  padding-top: 0.35rem;
  border-top: 1px solid #333;
  font-size: 0.82rem;
  text-align: center;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body * {
    visibility: hidden;
  }

  .print-only,
  .print-only *,
  .student-terminal-report,
  .student-terminal-report * {
    visibility: visible;
  }

  .print-only,
  .student-terminal-report {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0.35in 0.4in;
    box-sizing: border-box;
  }

  .no-print {
    display: none !important;
  }

  .print-data-table {
    page-break-inside: avoid;
  }

  .print-data-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-result-summary,
  .print-ca-footer {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .password-print-only,
  .password-print-only * {
    visibility: visible;
  }
}

/* ===== MOBILE ENHANCEMENTS ===== */
html {
  -webkit-text-size-adjust: 100%;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.admin-sidebar-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--white);
  border: none;
  border-bottom: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--royal-blue);
  cursor: pointer;
  text-align: left;
}

.admin-sidebar-toggle-icon {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--royal-blue);
  border-bottom: 2px solid var(--royal-blue);
  transform: rotate(45deg);
  transition: transform var(--transition);
}

.admin-sidebar.is-open .admin-sidebar-toggle-icon {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.table-scroll-hint {
  display: none;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--off-white);
  border-left: 3px solid var(--royal-blue);
  border-radius: 0 4px 4px 0;
}

.ca-mobile-cards {
  display: none;
}

@media (max-width: 992px) {
  .container {
    width: min(1280px, 92%);
  }

  .school-name {
    white-space: normal;
    text-align: center;
  }

  .page-hero {
    padding: 3rem 0;
  }

  .page-hero--compact {
    padding: 2.25rem 0;
  }

  .page-content {
    padding: 2.5rem 0 3.5rem;
  }

  .events-grid,
  .news-grid,
  .programs-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .events-section,
  .news-section,
  .programs-section {
    padding: 3.5rem 0;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .print-ca-header,
  .print-result-header {
    flex-direction: column;
    align-items: stretch;
  }

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

@media (max-width: 768px) {
  .auth-container {
    width: 100%;
  }

  body.nav-open {
    overflow: hidden;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .admin-panel {
    padding: 1.15rem;
    margin-bottom: 1.25rem;
  }

  .admin-panel-title {
    font-size: 1.1rem;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-search-input {
    min-width: 0;
    width: 100%;
  }

  .admin-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-offers-checkboxes {
    grid-template-columns: 1fr;
  }

  .staff-assign-row {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-assign-class {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .sync-meta-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .sync-meta-row dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .sync-progress-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .password-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ca-print-arms {
    flex-direction: column;
    align-items: stretch;
  }

  .ca-print-arms-label {
    margin-right: 0;
    margin-bottom: 0.25rem;
  }

  .btn {
    min-height: 44px;
    padding: 0.7rem 1.15rem;
  }

  .btn--sm {
    min-height: 40px;
  }

  .admin-sidebar {
    padding: 0;
    overflow: hidden;
  }

  .admin-sidebar-toggle {
    display: flex;
  }

  .admin-sidebar-body {
    display: none;
    padding-bottom: 0.5rem;
  }

  .admin-sidebar.is-open .admin-sidebar-body {
    display: block;
  }

  .admin-sidebar-label {
    padding-top: 0.75rem;
  }

  .admin-logout-form {
    padding-bottom: 1rem;
  }

  .table-scroll-hint--show {
    display: block;
  }

  .admin-table-wrap:not(.ca-sheet-wrap) {
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
    border: none;
    border-radius: 0;
    background: none;
  }

  .admin-table-wrap:not(.ca-sheet-wrap) .admin-table {
    min-width: 0;
    width: 100%;
  }

  .admin-table-wrap:not(.ca-sheet-wrap) .admin-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .admin-table-wrap:not(.ca-sheet-wrap) .admin-table tbody tr {
    display: block;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  }

  .admin-table-wrap:not(.ca-sheet-wrap) .admin-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .admin-table-wrap:not(.ca-sheet-wrap) .admin-table tbody td {
    display: grid;
    grid-template-columns: minmax(88px, 34%) 1fr;
    gap: 0.35rem 0.75rem;
    align-items: start;
    padding: 0.45rem 0;
    border: none;
    white-space: normal;
    text-align: left;
  }

  .admin-table-wrap:not(.ca-sheet-wrap) .admin-table tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--royal-blue);
  }

  .admin-table-wrap:not(.ca-sheet-wrap) .admin-table tbody td[data-label="Actions"] {
    grid-template-columns: 1fr;
    padding-top: 0.65rem;
    margin-top: 0.35rem;
    border-top: 1px dashed var(--border);
  }

  .admin-table-wrap:not(.ca-sheet-wrap) .admin-table tbody td[data-label="Actions"]::before {
    margin-bottom: 0.25rem;
  }

  .admin-actions {
    white-space: normal;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }

  .admin-inline-form {
    display: inline-flex;
    margin-left: 0;
  }

  .ca-sheet-wrap {
    overflow-x: visible;
    border: none;
    background: none;
  }

  .ca-sheet-table {
    min-width: 0;
    width: 100%;
  }

  .ca-sheet-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .ca-sheet-table tbody tr {
    display: block;
    padding: 1rem;
    margin-bottom: 0.85rem;
    background: var(--off-white);
    border: 1px solid rgba(0, 61, 165, 0.15);
    border-radius: 8px;
  }

  .ca-sheet-table tbody td {
    display: grid;
    grid-template-columns: minmax(100px, 42%) 1fr;
    gap: 0.35rem 0.65rem;
    align-items: center;
    padding: 0.4rem 0;
    border: none;
    white-space: normal;
  }

  .ca-sheet-table tbody td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--royal-blue);
    line-height: 1.3;
  }

  .ca-sheet-table .ca-score-input {
    width: 100%;
    max-width: none;
    min-height: 44px;
    font-size: 1rem;
  }

  .ca-sheet-table tbody td:first-child {
    font-weight: 700;
    color: var(--royal-blue);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.65rem;
    margin-bottom: 0.25rem;
  }

  .ca-sheet-table tbody td:nth-child(2),
  .ca-sheet-table tbody td:nth-child(3) {
    grid-column: 1 / -1;
    grid-template-columns: minmax(88px, 28%) 1fr;
  }

  .student-terminal-report--embedded {
    padding: 0;
    max-width: none;
  }

  .student-terminal-report--embedded .print-ca-header {
    flex-direction: column;
    gap: 1rem;
  }

  .student-terminal-report--embedded .print-meta-table {
    width: 100%;
  }

  .student-terminal-report--embedded .print-data-table {
    min-width: 0;
    width: 100%;
  }

  .student-terminal-report--embedded .print-data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .student-terminal-report--embedded .print-data-table tbody tr {
    display: block;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--off-white);
  }

  .student-terminal-report--embedded .print-data-table tbody td {
    display: grid;
    grid-template-columns: minmax(92px, 38%) 1fr;
    gap: 0.3rem 0.65rem;
    padding: 0.35rem 0;
    border: none;
    text-align: left;
    white-space: normal;
  }

  .student-terminal-report--embedded .print-data-table tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--royal-blue);
  }

  .student-terminal-report--embedded .print-data-table tbody td:first-child {
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
  }

  .student-terminal-report--embedded .print-data-table tbody td:nth-child(2) {
    grid-column: 1 / -1;
    font-weight: 600;
    font-size: 1rem;
    color: var(--msm-black);
  }

  .student-terminal-report--embedded .print-summary-grid {
    grid-template-columns: 1fr;
  }

  .student-terminal-report--embedded .print-ca-footer {
    flex-direction: column;
    gap: 1.5rem;
  }

  .student-result-actions {
    margin-top: 1.25rem;
  }

  .student-result-actions .btn {
    width: 100%;
    text-align: center;
  }

  .cookie-banner {
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .container {
    width: min(1280px, 90%);
  }

  .header-top-inner {
    gap: 0.5rem;
  }

  .school-name {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .school-logo {
    height: 48px;
  }

  .header-utils {
    gap: 0.35rem;
  }

  .util-link {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
  }

  .hero {
    min-height: 280px;
  }

  .hero-caption h2 {
    font-size: 1.35rem;
  }

  .page-hero h1 {
    font-size: 1.65rem;
  }

  .admin-form-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .staff-subject-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    flex-direction: column;
  }

  .event-date {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .event-month,
  .event-day {
    display: inline;
    font-size: 0.95rem;
  }

  .sync-action-panel .btn--sync {
    width: 100%;
    min-width: 0;
  }
}
