:root {
  --color-ink: #142033;
  --color-muted: #5d6979;
  --color-primary: #0b3d5c;
  --color-primary-2: #126170;
  --color-accent: #f0b84b;
  --color-soft: #eef6f8;
  --color-surface: #ffffff;
  --color-border: #dbe6ec;
  --shadow-soft: 0 18px 45px rgba(11, 61, 92, 0.12);
  --radius: 8px;
  --header-height: 82px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--color-ink);
  background: #fbfdfe;
  font-family: Arial, Tahoma, Helvetica, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

button,
a {
  touch-action: manipulation;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: 0.75rem;
  z-index: 1100;
  transform: translateY(-150%);
  padding: 0.65rem 1rem;
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 8px 22px rgba(11, 61, 92, 0.05);
}

.navbar {
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--color-primary);
  text-decoration: none;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-name {
  color: var(--color-primary);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-subtitle {
  color: var(--color-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.nav-link {
  color: var(--color-ink);
  font-weight: 700;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--color-primary);
  background: var(--color-soft);
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.35rem 0.7rem;
  color: var(--color-primary);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.language-button img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 50%;
}

.language-button:hover,
.language-button:focus,
.language-button.active {
  border-color: var(--color-accent);
  box-shadow: 0 8px 20px rgba(240, 184, 75, 0.22);
  transform: translateY(-1px);
}

.login-toggle {
  min-height: 42px;
  white-space: nowrap;
}

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0b3d5c 0%, #126170 58%, #287c78 100%);
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.login-card {
  width: 100%;
  max-width: 470px;
  margin-inline: auto;
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.18);
}

.login-card .brand {
  margin-bottom: 1.5rem;
}

.login-card h1 {
  margin-bottom: 0.75rem;
  color: var(--color-primary);
  font-weight: 900;
}

.login-card p {
  color: var(--color-muted);
}

.login-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.login-form label {
  color: var(--color-ink);
  font-weight: 800;
}

.login-form .form-control {
  min-height: 48px;
  border-color: var(--color-border);
  border-radius: var(--radius);
}

.login-form .form-control:focus {
  border-color: var(--color-primary-2);
  box-shadow: 0 0 0 0.2rem rgba(18, 97, 112, 0.16);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.login-options a,
.login-card .back-link {
  color: var(--color-primary);
  font-weight: 800;
  text-decoration: none;
}

.login-language {
  justify-content: center;
  margin-top: 1.5rem;
}

.login-message {
  margin: 0;
}

.demo-accounts {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--color-soft);
  border-radius: var(--radius);
}

.demo-accounts p {
  margin: 0;
  color: var(--color-primary);
  font-weight: 900;
}

.demo-accounts code {
  color: var(--color-ink);
  white-space: normal;
}

.dashboard-page {
  background: #f5f9fb;
}

/* Keep the shared dashboard footer at the bottom of every viewport. */
.dashboard-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-page > .dashboard-main {
  flex: 1 0 auto;
}

.dashboard-page > .school-footer {
  margin-top: auto;
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dashboard-user span {
  color: var(--color-ink);
  font-weight: 800;
}

.dashboard-user strong {
  color: var(--color-primary);
}

.dashboard-main {
  padding: 3rem 0;
}

.dashboard-hero {
  margin-bottom: 2rem;
  padding: 2rem;
  color: #fff;
  background: linear-gradient(135deg, #0b3d5c 0%, #126170 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.dashboard-hero h1 {
  font-weight: 900;
}

.dashboard-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.dashboard-card {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(11, 61, 92, 0.08);
}

.dashboard-card h2 {
  color: var(--color-primary);
  font-weight: 900;
}

.mini-panel,
.attendance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-soft);
  border-radius: var(--radius);
}

.attendance-row + .attendance-row {
  margin-top: 0.75rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5.25rem;
  color: #143e2e;
  background: #78cda0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: none;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--color-primary-2);
  font-weight: 800;
}

.hero-kicker {
  color: #245b42;
}

.hero-title {
  max-width: 760px;
  margin: 0 0 1.25rem;
  font-size: clamp(1.57rem, 3.2vw, 3.14rem);
  line-height: 1.08;
  font-weight: 900;
}

.hero-text {
  max-width: 680px;
  margin: 0 0 2rem;
  color: rgba(20, 62, 46, 0.9);
  font-size: 1.30rem;
}

.hero-actions,
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.hero-actions {
  margin-bottom: 1.5rem;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.8rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-weight: 700;
}

.btn {
  border-radius: 999px;
  font-weight: 800;
}

.btn-brand {
  color: #172033;
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-brand:hover,
.btn-brand:focus {
  color: #172033;
  background: #ffd06a;
  border-color: #ffd06a;
}

.hero-panel {
  max-width: 430px;
  margin-inline: auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.hero-logo {
  display: block;
  width: clamp(210px, 22vw, 260px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 1.5rem;
  object-fit: contain;
}

.summary-item {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.summary-item strong {
  color: #fff;
  font-size: 1.35rem;
}

.summary-item span {
  color: rgba(255, 255, 255, 0.82);
}

.section {
  padding: 5rem 0;
}

.section-soft {
  background: var(--color-soft);
}

.section-heading {
  max-width: 740px;
  margin-bottom: 2.25rem;
}

.section h2,
.notice-panel h2,
.contact-band h2 {
  margin: 0;
  color: var(--color-primary);
  font-weight: 900;
  line-height: 1.25;
}

.section-copy,
.feature-card p,
.notice-panel p {
  color: var(--color-muted);
}

.feature-card,
.program-card,
.notice-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(11, 61, 92, 0.08);
}

.feature-card {
  height: 100%;
  padding: 1.5rem;
}

.feature-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  color: var(--color-primary);
  background: var(--color-soft);
  border-radius: 50%;
  font-weight: 900;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
  color: var(--color-primary);
  font-size: 1.25rem;
  font-weight: 900;
}

.program-grid {
  display: grid;
  gap: 1rem;
}

.program-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
}

.program-card span {
  color: var(--color-primary-2);
  font-weight: 900;
}

.program-card strong {
  color: var(--color-ink);
  text-align: end;
}

.notice-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
  padding: 2rem;
}

.notice-panel p {
  margin: 0;
}

.contact-band {
  padding: 4rem 0;
  color: #fff;
  background: var(--color-primary);
}

.contact-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.contact-band h2 {
  color: #fff;
}

.site-footer {
  padding: 1.35rem 0;
  color: var(--color-muted);
  background: #fff;
  border-top: 1px solid var(--color-border);
}

.footer-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--color-primary);
  font-weight: 800;
  text-decoration: none;
}

[dir="ltr"] .program-card strong {
  text-align: right;
}

@supports (backdrop-filter: blur(10px)) {
  .site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
  }
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    padding: 1rem 0 0.25rem;
  }

  .nav-link {
    padding: 0.65rem 0.9rem;
  }

  .nav-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .login-toggle {
    width: 100%;
  }

  .hero {
    padding: 4.5rem 0;
  }

  .hero-panel {
    max-width: 100%;
  }

  .notice-panel {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  :root {
    --header-height: 74px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-name {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-subtitle {
    display: none;
  }

  .hero,
  .section,
  .contact-band {
    padding: 3.5rem 0;
  }

  .hero-title {
    font-size: 2.35rem;
  }

  .hero-text {
    font-size: 1.05rem;
  }

  .hero-actions .btn,
  .contact-layout .btn {
    width: 100%;
  }

  .hero-panel,
  .feature-card,
  .program-card,
  .notice-panel {
    padding: 1.25rem;
  }

  .program-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .program-card strong,
  [dir="ltr"] .program-card strong {
    text-align: start;
  }

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.teacher-record-table {
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
}

.teacher-record-table th,
.teacher-record-table td {
  min-width: 92px;
  text-align: center;
  vertical-align: middle;
  border-color: var(--color-border);
}

.teacher-record-table thead th {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.88rem;
}

.teacher-record-table th:first-child,
.teacher-record-table tbody th {
  position: sticky;
  right: 0;
  z-index: 1;
  min-width: 180px;
  text-align: right;
  background: #f3f8fa;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.06);
}

.teacher-record-table thead th:first-child {
  z-index: 2;
  background: var(--color-primary);
}
/* Teacher record tables: keep one student per row and scroll dates horizontally. */
.dashboard-card .table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.dashboard-card .table-responsive::-webkit-scrollbar {
  height: 10px;
}

.dashboard-card .table-responsive::-webkit-scrollbar-thumb {
  background: #9fb7c4;
  border-radius: 999px;
}

.teacher-record-table {
  width: max-content;
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  .dashboard-main {
    padding-inline: 0;
  }

  .teacher-record-table th,
  .teacher-record-table td {
    min-width: 82px;
    padding: 0.55rem 0.45rem;
    font-size: 0.86rem;
  }

  .teacher-record-table th:first-child,
  .teacher-record-table tbody th {
    min-width: 145px;
  }
}

@media (max-width: 575.98px) {
  .dashboard-main .container {
    padding-inline: 0.75rem;
  }

  .dashboard-card {
    padding: 1rem;
  }

  .dashboard-hero {
    padding: 1.25rem 1rem;
  }

  .teacher-record-table th,
  .teacher-record-table td {
    min-width: 70px;
    padding: 0.45rem 0.35rem;
    font-size: 0.78rem;
  }

  .teacher-record-table th:first-child,
  .teacher-record-table tbody th {
    min-width: 118px;
    font-size: 0.82rem;
  }
}
/* Never allow the page itself to overflow horizontally. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.dashboard-grid,
.dashboard-card,
.dashboard-card .table-responsive {
  min-width: 0;
  max-width: 100%;
}

.dashboard-card .table-responsive {
  display: block;
  overflow-x: auto;
}
.school-year-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  color: var(--color-primary);
  background: var(--color-soft);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.student-list-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.25rem 0 1.25rem;
  color: var(--color-primary);
  font-size: 1.1rem;
  font-weight: 800;
}

.student-list-divider::before,
.student-list-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--color-border);
}

.student-list-divider span {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--color-soft);
}
.student-list-panel {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 2px solid #c7dce5;
  border-radius: 14px;
  background: #f7fbfc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.student-list-panel .student-list-divider {
  margin-top: 0;
}

@media (max-width: 575.98px) {
  .student-list-panel {
    margin-inline: -0.25rem;
    padding: 1rem;
  }
}
/* The student register and the student list are separate dashboard cards. */
.student-list-card {
  margin-top: 2rem;
}

.student-list-card .student-list-panel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.student-list-card .student-list-divider {
  margin: 0 0 1.5rem;
}
.dashboard-hero .hero-back-link {
  display: inline-block;
  margin-top: 0.35rem;
  color: #fff;
  font-size: inherit;
}

.dashboard-hero .hero-back-link:hover,
.dashboard-hero .hero-back-link:focus {
  color: #fff;
  opacity: 0.82;
}
.dashboard-hero a.back-link.hero-back-link,
.dashboard-hero a.back-link.hero-back-link:visited {
  color: #fff !important;
  text-decoration-color: rgba(255, 255, 255, 0.7);
}

.dashboard-hero .fee-hero-back-link {
  display: inline-block;
  margin-top: .35rem;
  font-size: 1.08rem !important;
  font-weight: 800 !important;
  line-height: normal;
}

.dashboard-hero .dashboard-profile-link {
  display: inline-block;
  margin-top: .35rem;
  font-size: 1.08rem !important;
  font-weight: 800 !important;
  line-height: normal;
}
/* Staff attendance history states. */
.staff-attendance-status.staff-attendance-absent,
.attendance-status-absent {
  background: #f8d7da !important;
  color: #842029;
  font-weight: 700;
}

.staff-attendance-status.staff-attendance-holiday,
.attendance-status-holiday {
  background: #fff3cd !important;
  color: #664d03;
  font-weight: 700;
}
.staff-hero-back-link { font-size: 1.08rem !important; font-weight: 800; }

.staff-record-table {
  --staff-serial-width: 36px;
  --staff-employee-width: 172px;
}

.staff-record-table th:first-child,
.staff-record-table td:first-child {
  min-width: var(--staff-serial-width) !important;
  width: var(--staff-serial-width) !important;
  max-width: var(--staff-serial-width);
  padding-inline: 0.15rem;
  text-align: center;
}
/* In the staff history matrix, keep the employee name fixed—not its serial number. */
.staff-record-table th:first-child,
.staff-record-table td:first-child {
  position: static !important;
  right: auto !important;
  z-index: auto !important;
  background: inherit !important;
  box-shadow: none !important;
}

.staff-record-table thead th:nth-child(2) {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: var(--staff-employee-width);
  background: var(--color-primary);
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.06);
}

.staff-record-table tbody th {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: var(--staff-employee-width);
  background: #f3f8fa;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.06);
}

/* Move the fixed employee column only while the serial column is visible. */
.staff-serial-visible .staff-record-table thead th:nth-child(2),
.staff-serial-visible .staff-record-table tbody th {
  right: var(--staff-serial-width);
}
/* Public home-page contact footer. */
.school-footer {
  padding: 0;
  color: #eaf3f7;
  background: var(--color-primary);
  /* A distinct break between the last call-to-action and the contact area. */
  border-top: 12px solid #f4b942;
  box-shadow: 0 -5px 0 #f5f9fb, 0 -10px 20px rgba(10, 52, 78, 0.12);
}

.school-footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2rem;
}

.school-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #fff;
  font-size: 1.2rem;
}

.school-footer-brand img { object-fit: contain; }

.school-footer-contact {
  max-width: 560px;
  text-align: start;
}

.school-footer-contact h2 {
  margin: 0 0 0.7rem;
  color: #fff;
  font-size: 1.05rem;
}

.school-footer-contact address {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  font-style: normal;
}

.school-footer-contact a {
  width: fit-content;
  color: #fff;
  text-decoration-color: rgba(255,255,255,.65);
}

.school-footer-copyright {
  padding-block: 0.8rem;
  color: #d8e8ee;
  background: #082d44;
  font-size: 0.9rem;
  text-align: center;
}

.footer-copyright-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.55rem;
  white-space: nowrap;
  font-size: clamp(0.7rem, 1.1vw, 0.9rem);
}

.footer-legal-links {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.55rem;
  white-space: nowrap;
}

.footer-legal-links a {
  color: inherit;
  font: inherit;
  text-decoration-color: currentColor;
  text-underline-offset: 0.18em;
}

.footer-legal-links a:hover { color: #fff; }

@media (max-width: 767.98px) {
  .school-footer-main { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
  .school-footer-contact { max-width: none; }
  .footer-copyright-inner { flex-wrap: nowrap; gap: 0.4rem; white-space: nowrap; }
}
/* Dedicated public contact page. */
.contact-page-hero {
  padding: 4.5rem 0 3.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2));
}
.contact-page-hero .section-kicker { color: #f8d37d; }
.contact-page-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; }
.contact-page-content { padding: 3.5rem 0 4.5rem; background: #f5f9fb; }
.contact-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.contact-detail-card { padding: 1.75rem; color: var(--color-ink); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.contact-detail-card h2 { margin: 0 0 1rem; color: var(--color-primary); font-size: 1.35rem; font-weight: 900; }
.contact-detail-card p { margin: 0.65rem 0; }
.contact-detail-card a { color: var(--color-primary-2); font-weight: 800; overflow-wrap: anywhere; }
.contact-location-card { grid-column: 1 / -1; }
.contact-map { height: min(48vw, 380px); min-height: 280px; margin-top: 1.25rem; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius); }
.contact-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-consent { display: grid; place-items: center; background: linear-gradient(135deg, #eaf5f1, #d9ebf2); text-align: center; }
.map-consent-content { max-width: 34rem; padding: 1.5rem; }
.map-consent-icon { display: grid; width: 3.5rem; height: 3.5rem; margin: 0 auto .7rem; place-items: center; border-radius: 50%; background: var(--color-primary); color: #fff; font-size: 2rem; line-height: 1; }
.map-consent h3 { margin: 0 0 .45rem; color: var(--color-primary); font-size: 1.2rem; font-weight: 800; }
.map-consent p { max-width: 31rem; margin: 0 auto 1rem; color: var(--color-text); }
.map-consent-button { min-width: 12rem; }
@media (max-width: 991.98px) { .contact-detail-grid { grid-template-columns: 1fr; } .contact-location-card { grid-column: auto; } }
/* Public legal information pages. */
.legal-page-content { padding: 3.5rem 0 4.5rem; background: #f5f9fb; }
.legal-card { max-width: 920px; margin-inline: auto; padding: clamp(1.5rem, 4vw, 3rem); color: var(--color-ink); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.legal-card h2 { margin: 2rem 0 0.75rem; color: var(--color-primary); font-size: 1.35rem; font-weight: 900; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p { margin: 0; line-height: 1.9; }
.legal-card a { color: var(--color-primary-2); font-weight: 800; overflow-wrap: anywhere; }
.legal-card .legal-intro { font-size: 1.12rem; font-weight: 700; }
.legal-card .legal-note { margin-top: 2rem; padding: 1rem 1.25rem; color: #714d00; background: #fff4d6; border-inline-start: 4px solid #f4b942; border-radius: 0.5rem; }
/* Public registration announcement. */
.registration-card {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  color: var(--color-ink);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.registration-card h2 { margin: 0 0 1.25rem; color: var(--color-primary); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 900; }
.registration-card p { font-size: 1.08rem; }
.registration-card a { color: var(--color-primary-2); font-weight: 800; overflow-wrap: anywhere; }
.registration-pdf { margin-block: 0.5rem 1.25rem; }
.registration-contact { padding: 1rem 1.25rem; background: var(--color-soft); border-radius: var(--radius); }
.registration-contact p { margin: 0.35rem 0; }
.registration-notice { margin-top: 1.5rem; color: #9b3a16; font-weight: 900; }
.registration-motto { margin: 1.5rem 0 0; color: var(--color-primary); font-size: 1.2rem !important; font-weight: 900; }
/* Reasons to choose the school on the public home page. */
.why-section { background: linear-gradient(180deg, #f7fbfc 0%, #eef6f8 100%); }
.why-section-heading { max-width: 820px; }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.why-item { display: flex; align-items: flex-start; gap: 0.8rem; min-height: 100%; padding: 1.15rem; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 10px 25px rgba(11, 61, 92, 0.07); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.why-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.why-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; font-size: 1.35rem; background: #fff5d9; border-radius: 50%; }
.why-item p { margin: 0; color: var(--color-ink); font-size: 0.98rem; font-weight: 700; line-height: 1.75; }
.why-motto { max-width: 1000px; margin: 2rem auto 0; padding: 1.5rem 2rem; color: #fff; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2)); border-radius: var(--radius); box-shadow: var(--shadow-soft); font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 900; line-height: 1.9; text-align: center; }
@media (max-width: 991.98px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .why-grid { grid-template-columns: 1fr; } .why-motto { padding: 1.25rem; } }
/* Five-card composition for the public home page. */
.home-card-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1rem, 2.4vw, 2.5rem);
  background: linear-gradient(180deg, #edf5f7 0%, #f8fbfc 100%);
}
.home-card-stack .home-card {
  width: min(100%, 1440px);
  margin: 0 auto clamp(1rem, 2vw, 1.75rem);
  overflow: hidden;
  border: 1px solid rgba(11, 61, 92, 0.12);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(11, 61, 92, 0.10);
}
.home-card-stack .home-card > .container { width: 100%; }
.home-card-stack .home-card:last-child { margin-bottom: 0; }
.home-card-stack .home-card-hero { order: 1; }
.home-card-stack .home-card-news { order: 3; }
.home-card-stack .home-card-why { order: 4; }
.home-card-stack .home-card-programs { order: 5; }
.home-card-stack .home-card-contact { order: 6; }
.home-card-hero { text-align: center; }
.hero-layout { display: grid; grid-template-columns: minmax(210px, .95fr) minmax(0, 1.7fr) minmax(210px, .95fr); gap: clamp(1rem, 3vw, 3.5rem); align-items: center; }
.hero-brand-mark { display: grid; place-items: center; }
.hero-brand-mark .hero-logo { width: clamp(210px, 22vw, 310px); margin: 0; filter: drop-shadow(0 10px 16px rgba(0,0,0,.18)); }
.hero-copy { min-width: 0; }
.hero-copy .hero-title, .hero-copy .hero-text { margin-inline: auto; }
.hero-copy .hero-actions { justify-content: center; margin-bottom: 0; }
.hero-board-wrap { min-width: 0; }
.hero-board-wrap .hero-panel { position: relative; width: 100%; min-height: clamp(210px, 22vw, 270px); display: grid; place-items: center; max-width: 310px; margin: 0 auto; padding: 1rem; overflow: hidden; color: #fffef1; background: linear-gradient(135deg, #155c54, #063a35); border: 8px solid #875326; border-radius: 10px; box-shadow: inset 0 0 22px rgba(0,0,0,.4), 0 10px 20px rgba(0,0,0,.16); }
.hero-board-wrap .hero-logo, .hero-board-wrap .summary-item { display: none; }
.hero-mini-board-surface { position: relative; display: flex; align-items: center; justify-content: center; min-height: 1.35em; width: 100%; padding-block-end: 2.15rem; }
.hero-mini-board-surface canvas { display: block; width: 100%; height: clamp(65px, 8vw, 100px); }
.hero-mini-pen { position: absolute; inset-block-start: 12%; z-index: 2; color: #f5c65b; font-size: 2.5rem; filter: drop-shadow(1px 2px 1px rgba(0,0,0,.4)); transform: translate(-18%, -28%) rotate(-90deg); transform-origin: 18% 85%; transition: left .18s ease-out, opacity .14s ease; }
@media (max-width: 767.98px) { .hero-layout { grid-template-columns: 1fr; gap: 1.35rem; } .hero-brand-mark { order: 1; } .hero-copy { order: 2; } .hero-board-wrap { order: 3; } .hero-brand-mark .hero-logo { width: 225px; } .hero-board-wrap .hero-panel { max-width: 300px; min-height: 225px; } }
.home-card-stack .home-card-hero { padding-block: clamp(1.2rem, 2.5vw, 2.2rem); border-color: rgba(255, 255, 255, 0.18); }
.home-card-stack .home-card-why { background: linear-gradient(135deg, #f8fcfd 0%, #eaf5f7 100%); }
.home-card-stack .home-card-why { padding-block: clamp(1.35rem, 2.5vw, 2.3rem); }
.home-card-stack .home-card-programs { background: linear-gradient(135deg, #f3f6ff 0%, #e7f0fa 100%); }
.home-card-stack .home-card-programs { padding-block: clamp(1.35rem, 2.5vw, 2.3rem); }
.home-card-stack .home-card-news { background: linear-gradient(135deg, #fffdf7 0%, #fff4d8 100%); }
.home-card-stack .home-card-news { padding-block: clamp(1.35rem, 2.5vw, 2.3rem); }
.home-card-stack .home-card-contact { background: linear-gradient(135deg, #0b3d5c 0%, #176b75 100%); }
.home-card-stack .home-card-contact { padding-block: clamp(.95rem, 1.8vw, 1.65rem); }
.home-card-stack .home-card-contact .hero-kicker { color: #fff; }
.admin-holiday-status { color: #b42318; font-weight: 900; }

.home-card-stack .home-card-news .notice-panel { border-color: rgba(192, 138, 35, 0.28); }
.home-card-stack .home-card-programs .program-card { border-color: rgba(57, 102, 173, 0.2); }
@media (max-width: 575.98px) {
  .home-card-stack { padding: 0.7rem; }
  .home-card-stack .home-card { border-radius: 13px; }
}
/* School announcements on the public home page. */
.announcements-heading { max-width: 720px; margin-bottom: 2rem; }
.announcements-heading h2 { margin: 0; color: var(--color-primary); font-size: clamp(1.8rem, 4vw, 2.65rem); font-weight: 900; }
.announcements-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.announcement-card { display: flex; align-items: flex-start; gap: 1rem; min-height: 100%; padding: 1.5rem; background: rgba(255,255,255,0.9); border: 1px solid rgba(177, 130, 39, 0.24); border-radius: var(--radius); box-shadow: 0 12px 27px rgba(120, 85, 20, 0.08); }
.announcement-card-registration { border-top: 5px solid #e9ad32; }
.announcement-card-date { border-top: 5px solid #4f8eba; }
.announcement-card-hours { border-top: 5px solid #4b9b82; }
.announcement-icon { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; font-size: 1.4rem; background: #fff5d9; border-radius: 50%; }
.announcement-card h3 { margin: 0 0 0.7rem; color: var(--color-primary); font-size: 1.17rem; font-weight: 900; }
.announcement-card p { margin: 0; color: var(--color-ink); font-weight: 650; line-height: 1.75; }
.announcement-card p + p { margin-top: 0.5rem; }
.announcement-highlight { color: #126170 !important; font-weight: 900 !important; }
.announcement-link { margin-top: 1rem; font-size: 0.92rem; }
@media (max-width: 991.98px) { .announcements-grid { grid-template-columns: 1fr; } }

/* Teacher evaluation comments in the dashboard record. */
.evaluation-rating-button { padding: .2rem .55rem; color: inherit; font: inherit; font-weight: 700; background: transparent; border: 0; border-radius: .45rem; cursor: pointer; }
.evaluation-rating-button:hover, .evaluation-rating-button:focus-visible { color: #0b3d5c; background: #edf6f8; outline: 2px solid rgba(11, 61, 92, .24); outline-offset: 1px; }
.evaluation-comment-popover { position: fixed; z-index: 2000; box-sizing: border-box; inline-size: max-content; min-inline-size: 10rem; max-inline-size: min(34rem, calc(100vw - 24px)); max-block-size: calc(100vh - 24px); padding: 1.05rem 2.35rem 1rem 1rem; color: #16324b; background: #fff; border: 1px solid #c9dbe4; border-radius: .8rem; box-shadow: 0 .9rem 2rem rgba(12, 48, 72, .2); direction: rtl; }
.evaluation-comment-popover p { max-block-size: min(24rem, calc(100vh - 5rem)); margin: 0; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.75; }
.evaluation-comment-close { position: absolute; inset-block-start: .45rem; inset-inline-end: .5rem; width: 1.55rem; height: 1.55rem; padding: 0; color: #4d5d68; font-size: 1.35rem; line-height: 1; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.evaluation-comment-close:hover, .evaluation-comment-close:focus-visible { color: #9f1f25; background: #f9e8e9; outline: 0; }
.legal-card p[data-i18n] { white-space: pre-line; }

/* Student records: keep the serial column as compact as the student list. */
.student-record-table { --student-serial-width: 36px; --student-name-width: 180px; }
.student-record-table th:first-child,
.student-record-table td:first-child {
  position: static !important;
  right: auto !important;
  z-index: auto !important;
  min-width: var(--student-serial-width) !important;
  width: var(--student-serial-width) !important;
  max-width: var(--student-serial-width);
  padding-inline: .15rem !important;
  text-align: center !important;
  background: inherit !important;
  box-shadow: none !important;
}
.student-record-table thead th:nth-child(2) {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: var(--student-name-width);
  text-align: right;
  background: var(--color-primary);
  box-shadow: -2px 0 5px rgba(0, 0, 0, .06);
}
.student-record-table tbody th {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: var(--student-name-width);
  text-align: right;
  background: #f3f8fa;
  box-shadow: -2px 0 5px rgba(0, 0, 0, .06);
}
@media (max-width: 991.98px) { .student-record-table { --student-name-width: 145px; } }
@media (max-width: 575.98px) { .student-record-table { --student-name-width: 118px; } }
