/* ==========================================================================
   St. Paul's School - Master Stylesheet
   Modern, responsive design with Cinzel serif headings & Plus Jakarta Sans
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --navy-primary: #0a192f;
  --navy-dark: #07111e;
  --navy-light: #1e3a8a;
  --navy-subtle: #eff6ff;
  --crimson-accent: #b91c1c;
  --crimson-hover: #991b1b;
  --gold-accent: #f59e0b;
  --gold-dark: #d97706;
  --gold-subtle: #fef3c7;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
  --font-heading: 'Cinzel', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
  color: var(--navy-dark);
}

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

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

button, input, select, textarea {
  font-family: inherit;
}

/* ==========================================================================
   Utility Classes & Layout
   ========================================================================== */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid {
  display: grid;
  gap: 24px;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.section-padding {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 48px 0;
  }
}

/* Badges & Overlines */
.overline {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
  background-color: var(--gold-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.section-head {
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-top: 12px;
  line-height: 1.25;
}

@media (max-width: 640px) {
  .section-head h2 {
    font-size: 1.75rem;
  }
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 10px;
  max-width: 650px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--navy-light);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--crimson-accent);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--navy-light);
  border-color: var(--navy-light);
}

.btn-secondary:hover {
  background-color: var(--navy-subtle);
}

.btn-crimson {
  background-color: var(--crimson-accent);
  color: #ffffff;
}

.btn-crimson:hover {
  background-color: var(--navy-light);
}

.btn-gold {
  background-color: var(--gold-accent);
  color: var(--navy-dark);
  font-weight: 700;
}

.btn-gold:hover {
  background-color: #ffffff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  white-space: nowrap;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

/* ==========================================================================
   Header & Top Bar
   ========================================================================== */
.top-bar {
  background-color: var(--navy-dark);
  color: #e2e8f0;
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar-meta {
  display: flex;
  gap: 20px;
}

.top-bar-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

/* Crest Logo */
.brand-crest {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crest-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background-color: var(--navy-light);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.7);
  transition: transform 0.2s ease;
}

.brand-crest:hover .crest-badge {
  transform: rotate(-4deg);
}

.crest-text .school-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.15;
}

.crest-text .school-tagline {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--crimson-accent);
}

/* Navigation Links */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--navy-light);
  background-color: var(--navy-subtle);
}

.nav-link.active {
  color: var(--navy-light);
  background-color: var(--navy-subtle);
  font-weight: 700;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-cta .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--navy-dark);
}

@media (max-width: 1240px) {
  .crest-text .school-tagline {
    letter-spacing: 0.12em;
    font-size: 9px;
  }
  .nav-link {
    font-size: 13px;
    padding: 7px 8px;
  }
  .header-cta {
    gap: 6px;
  }
  .header-cta .btn-sm {
    padding: 6px 11px;
    font-size: 12px;
  }
}

@media (max-width: 1060px) {
  .main-nav, .header-cta {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer.open {
  display: block;
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background-color: #ffffff;
  padding: 24px;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-links {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-links .nav-link {
  padding: 10px 14px;
  font-size: 15px;
}

/* ==========================================================================
   Notice Ticker
   ========================================================================== */
.notice-ticker {
  background-color: var(--crimson-accent);
  color: #ffffff;
  font-size: 13px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  height: 40px;
}

.ticker-badge {
  background-color: var(--navy-dark);
  font-weight: 700;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  white-space: nowrap;
}

.ticker-track-container {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
}

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: tickerSlide 30s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  margin: 0 24px;
  cursor: pointer;
}

.ticker-item .diamond {
  color: var(--gold-accent);
  margin-right: 8px;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 60px 0 80px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-top: 20px;
}

.hero-content h1 .text-highlight {
  color: var(--crimson-accent);
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.4rem;
  }
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-top: 20px;
  max-width: 540px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-media {
  position: relative;
}

.hero-img-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.hero-notice-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-md);
  max-width: 320px;
  transition: transform 0.2s ease;
  z-index: 3;
}

.hero-notice-badge:hover {
  transform: translateY(-4px);
}

@media (max-width: 640px) {
  .hero-notice-badge {
    position: static;
    margin-top: 16px;
    max-width: 100%;
  }
}

/* ==========================================================================
   Highlights Section
   ========================================================================== */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: -30px;
  position: relative;
  z-index: 4;
  box-shadow: var(--shadow-sm);
}

.highlight-box {
  padding: 28px 24px;
  border-right: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.highlight-box:last-child {
  border-right: none;
}

.highlight-box:hover {
  background-color: #f8fafc;
}

.highlight-icon {
  width: 32px;
  height: 32px;
  color: var(--crimson-accent);
  margin-bottom: 16px;
}

.highlight-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.highlight-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 992px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 20px;
  }
  .highlight-box:nth-child(2) {
    border-right: none;
  }
  .highlight-box:nth-child(1), .highlight-box:nth-child(2) {
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 600px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }
  .highlight-box {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
  }
  .highlight-box:last-child {
    border-bottom: none;
  }
}

/* ==========================================================================
   Page Banner
   ========================================================================== */
.page-banner {
  background-color: var(--navy-dark);
  color: #ffffff;
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}

.page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: radial-gradient(#ffffff 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

.banner-content {
  position: relative;
  z-index: 2;
}

.banner-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #ffffff;
}

.banner-content p {
  color: #cbd5e1;
  font-size: 1.15rem;
  margin-top: 12px;
  max-width: 680px;
}

.banner-accent {
  width: 70px;
  height: 4px;
  background-color: var(--gold-accent);
  margin-top: 20px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Notice Cards & Categories
   ========================================================================== */
.notice-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 14px;
}

.notice-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.notice-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.notice-date {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.notice-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  transition: color 0.15s ease;
}

.notice-card:hover h3 {
  color: var(--navy-light);
}

.notice-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category Pills */
.pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: capitalize;
}

.pill-exam { background-color: #fee2e2; color: #b91c1c; }
.pill-admissions { background-color: #dbeafe; color: #1e40af; }
.pill-sports { background-color: #dcfce7; color: #15803d; }
.pill-holiday { background-color: #fef3c7; color: #b45309; }
.pill-fees { background-color: #ffedd5; color: #c2410c; }
.pill-academic { background-color: #e0e7ff; color: #4338ca; }
.pill-event { background-color: #f3e8ff; color: #7e22ce; }
.pill-general { background-color: #f1f5f9; color: #475569; }
.pill-important { background-color: var(--crimson-accent); color: #ffffff; }

/* ==========================================================================
   Schedules & Timetable Styles (Core Feature)
   ========================================================================== */
.schedule-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--navy-light);
  color: var(--navy-light);
}

.tab-btn.active {
  background-color: var(--navy-light);
  color: #ffffff;
  border-color: var(--navy-light);
}

.schedule-header-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.schedule-table-wrap {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.schedule-table th {
  background-color: #f1f5f9;
  color: var(--navy-dark);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.schedule-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

.schedule-table tr:hover td {
  background-color: #f8fafc;
}

.period-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--navy-subtle);
  color: var(--navy-light);
  font-weight: 700;
  border-radius: var(--radius-full);
  font-size: 12px;
}

.period-badge.break {
  width: auto;
  padding: 2px 10px;
  background-color: #fef3c7;
  color: #b45309;
}

.subject-name {
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 15px;
}

.subject-teacher {
  font-size: 13px;
  color: var(--text-muted);
}

.room-pill {
  font-size: 12px;
  background-color: #f1f5f9;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
}

/* ==========================================================================
   Gallery Grid & Lightbox
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background-color: #e2e8f0;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.gallery-caption .album-tag {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-accent);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(7, 17, 30, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.lightbox-img {
  max-height: 80vh;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #ffffff;
  margin-top: 14px;
  font-size: 15px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* ==========================================================================
   Notice Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalEnter 0.2s ease;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ==========================================================================
   Admin Dashboard Styles
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: #f1f5f9;
}

.admin-sidebar {
  width: 260px;
  background-color: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.admin-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.admin-nav-btn:hover {
  background-color: #f8fafc;
  color: var(--navy-light);
}

.admin-nav-btn.active {
  background-color: var(--navy-light);
  color: #ffffff;
}

.admin-main {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--navy-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  font-weight: 700;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-top: 4px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--navy-dark);
  color: #cbd5e1;
  margin-top: auto;
}

.footer-top-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--crimson-accent) 0%, var(--gold-accent) 50%, var(--crimson-accent) 100%);
}

.footer-inner {
  padding: 64px 0 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}

@media (max-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--gold-accent);
}

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0;
  font-size: 13px;
  color: #94a3b8;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-credit {
  color: #94a3b8;
  font-size: 13px;
}

.footer-credit a {
  color: var(--gold-accent);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-credit a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 768px) {
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 8px;
  }
}

/* ==========================================================================
   Print Stylesheet (for Schedule & Timetable)
   ========================================================================== */
@media print {
  .site-header, .top-bar, .notice-ticker, .site-footer, .btn, .schedule-nav, .mobile-drawer {
    display: none !important;
  }
  body, .container {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }
  .schedule-table-wrap {
    border: none !important;
    box-shadow: none !important;
  }
  .schedule-table th, .schedule-table td {
    border: 1px solid #333 !important;
    color: #000 !important;
  }
}

/* ==========================================================================
   MFA & OTP Authentication Popups (Google Authenticator & SMS)
   ========================================================================== */
.mfa-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.mfa-modal-overlay.open {
  display: flex;
}
.mfa-modal-dialog {
  background: #ffffff;
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  padding: 30px;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #e2e8f0;
}
.mfa-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.mfa-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eff6ff;
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}
.mfa-pin-input {
  letter-spacing: 8px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  padding: 12px 14px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  transition: all 0.2s;
  background: #f8fafc;
  width: 100%;
}
.mfa-pin-input:focus {
  border-color: var(--navy-light);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
  outline: none;
}
.mfa-qr-card {
  background: #ffffff;
  padding: 16px;
  border-radius: 10px;
  border: 2px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 14px 0;
}
.mfa-manual-key {
  font-family: 'Consolas', monospace;
  font-size: 13px;
  font-weight: 700;
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 6px;
  color: #0f172a;
  letter-spacing: 2px;
  display: inline-block;
  user-select: all;
  word-break: break-all;
}
.mfa-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--navy-deep);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
}
