/* assets/css/style.css — shared visual language for the whole app */

:root {
  --sms-primary: #1e3a5f;
  --sms-primary-light: #2c5282;
  --sms-accent: #d69e2e;
  --sms-sidebar-bg: #16283f;
  --sms-body-bg: #f4f6f9;
}

html, body { height: 100%; }
body {
  background-color: var(--sms-body-bg);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

/* ---- Auth pages (login / forgot / reset password) ---- */
.sms-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sms-primary) 0%, var(--sms-primary-light) 100%);
}
.sms-auth-wrapper { width: 100%; max-width: 440px; padding: 1rem; }
.sms-auth-card { border-radius: 1rem; }
.sms-brand-icon { color: var(--sms-primary); }

/* ---- App shell ---- */
.sms-navbar {
  background-color: var(--sms-primary);
  color: #fff;
  flex-shrink: 0;   /* keeps its own natural height, whatever that turns out to be */
}
.sms-navbar .navbar-brand,
.sms-navbar .btn-link { color: #fff; }
.sms-role-badge {
  background-color: var(--sms-accent);
  color: #1a1a1a;
  font-weight: 600;
}

.sms-body { display: flex; flex: 1; min-height: 0; }
.sms-sidebar {
  width: 240px;
  flex-shrink: 0;
  background-color: var(--sms-sidebar-bg);
  overflow-y: auto;   /* the ~30-link nav menu scrolls on its own, never the whole page */
}
.sms-sidebar .nav-link {
  color: #cbd5e1;
  padding: 0.65rem 1.25rem;
  border-left: 3px solid transparent;
}
.sms-sidebar .nav-link:hover { background-color: rgba(255,255,255,0.06); color: #fff; }
.sms-sidebar .nav-link.active {
  background-color: rgba(255,255,255,0.08);
  color: #fff;
  border-left-color: var(--sms-accent);
  font-weight: 600;
}
.sms-nav-heading {
  padding: 0.9rem 1.25rem 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.sms-content { flex: 1; padding: 1.5rem; min-width: 0; overflow-y: auto; }

/* ---- Stat cards ---- */
.sms-stat-card .card-body { display: flex; flex-direction: column; gap: .35rem; }
.sms-stat-icon {
  width: 42px; height: 42px; border-radius: .6rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.sms-stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.sms-stat-label { color: #6c757d; font-size: .85rem; }

/* ---- Sticky table headers (result-entry grids) ---- */
.sms-sticky-header thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #f8f9fa;
}

/* ---- Print-friendly result sheets ---- */
@media print {
  .sms-navbar, .sms-sidebar, .sms-no-print { display: none !important; }
  .sms-content { padding: 0 !important; }
  .sms-body { display: block !important; }
  body { background: #fff !important; }
  .card { border: none !important; box-shadow: none !important; }
  @page { size: A4; margin: 12mm; }
}

/* ---- Scrollable list container: long admin lists (Users, Teachers,
   Parents, Students, Classes, Subjects, Teacher Assignments) scroll within
   a fixed-height box instead of stretching the whole page. The table header
   stays visible (sticky) while scrolling. ---- */
.sms-scroll-list {
  max-height: 520px;
  overflow-y: auto;
}
.sms-scroll-list table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #f8f9fa;
}
/* Same scroll box, for content that isn't a <table> (card grids, list-groups). */
.sms-scroll-box {
  max-height: 520px;
  overflow-y: auto;
}

/* ---- Report card (Phase 10) ---- */
.sms-report-card {
  font-family: Georgia, 'Times New Roman', serif;
}
.sms-print-only { display: none; }
@media print {
  .sms-report-card { border: none !important; max-width: 100% !important; page-break-inside: avoid; }
  .sms-print-only { display: block; }
  /* Prevents an accidental second page when a term has many subjects. */
  .sms-report-card table { font-size: 0.78rem !important; }
}
.sms-watermark {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: 0.3rem;
  color: rgba(200, 0, 0, 0.12);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
}

/* ---- Responsive sidebar for mobile ---- */
@media (max-width: 991.98px) {
  .sms-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -240px;
    z-index: 1030;
    transition: left .2s ease-in-out;
    overflow-y: auto;
  }
  .sms-sidebar.show { left: 0; }
  .sms-content { padding: 1rem; }
}
