:root {
  --navy: #102a43;
  --blue: #294f7b;
  --gold: #d39d35;
  --cream: #f7f5f0;
  --ink: #17212b;
  --muted: #617080;
  --line: #dbe2e8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--cream);
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
.topbar {
  height: 92px;
  padding: 0 clamp(24px, 7vw, 120px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
}
.topbar .brand > img:first-child {
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.topbar .wordmark {
  width: 240px;
  height: 54px;
  object-fit: contain;
  object-position: left;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 14px;
  font-weight: 700;
}
.admin-link,
.plain-button {
  font: inherit;
  border: 0;
  background: none;
  color: var(--blue);
  cursor: pointer;
}
.hero {
  min-height: 510px;
  padding: 100px clamp(24px, 11vw, 180px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  color: #fff;
  background:
    linear-gradient(118deg, rgba(10, 34, 57, 0.97), rgba(29, 76, 113, 0.84)),
    radial-gradient(circle at 80% 10%, #dba72e 0, transparent 34%), #173e5c;
}
.hero > div {
  max-width: 680px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.7px;
  color: var(--gold);
  font-weight: 800;
  margin: 0 0 14px;
}
.hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(46px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -3.4px;
  margin: 0;
}
.lead {
  font-size: 19px;
  line-height: 1.55;
  max-width: 570px;
  margin: 28px 0;
}
.actions {
  display: flex;
  gap: 25px;
  align-items: center;
}
.button {
  border: 0;
  display: inline-block;
  cursor: pointer;
  background: var(--gold);
  color: #1b2b38;
  padding: 14px 22px;
  font-weight: 800;
  border-radius: 3px;
  font: inherit;
}
.text-link {
  font-weight: 700;
}
.hero-card {
  background: #fff;
  color: var(--navy);
  width: 265px;
  padding: 28px;
  border-top: 4px solid var(--gold);
  box-shadow: 0 15px 35px #001a2c66;
}
.hero-card > img {
  width: 64px;
  float: right;
}
.hero-card p {
  margin: 0 0 9px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hero-card a {
  font-size: 17px;
  font-weight: 800;
  display: block;
  margin: 5px 0;
}
.hero-card small {
  line-height: 1.5;
  color: var(--muted);
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 19px 0;
}
.intro,
.notice-section,
.apply,
.content-section {
  padding: 86px clamp(24px, 11vw, 180px);
}
.intro {
  max-width: 1000px;
}
.intro h2,
.notice-section h2,
.apply h2 {
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--navy);
}
.intro > p:last-child {
  font-size: 18px;
  line-height: 1.65;
  color: #4b5965;
}
.content-section {
  padding-top: 0;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.content-grid article {
  background: #fff;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
}
.content-grid h3 {
  font-family: Georgia, serif;
  color: var(--navy);
  font-size: 25px;
  margin: 0 0 12px;
}
.content-grid p {
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.notice-section {
  background: #fff;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
}
.notice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.notice {
  border: 1px solid var(--line);
  padding: 24px;
  min-height: 160px;
  background: var(--cream);
}
.notice h3 {
  font-family: Georgia, serif;
  font-size: 22px;
  margin: 0 0 10px;
  color: var(--navy);
}
.notice p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.notice small {
  display: block;
  margin-top: 16px;
  color: var(--blue);
  font-weight: 700;
}
.apply {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  background: #e6edf1;
}
.apply p:not(.eyebrow) {
  line-height: 1.6;
  color: var(--muted);
}
form {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #c5d0d9;
  border-radius: 3px;
  background: #fff;
  padding: 11px;
  font: inherit;
  color: var(--ink);
}
textarea {
  min-height: 85px;
  resize: vertical;
}
#enquiryMessage {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
}
#adminSite {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 245px;
  min-height: 100vh;
  background: var(--navy);
  padding: 27px 18px;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.sidebar .brand {
  padding: 0 10px 24px;
  color: #fff;
}
.sidebar .brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.sidebar .brand span {
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #dbe8f1;
}
.nav-tabs {
  display: grid;
  gap: 4px;
}
.nav-tabs button,
.exit {
  padding: 12px 11px;
  border: 0;
  background: none;
  color: #dce8f1;
  text-align: left;
  font: inherit;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}
.nav-tabs button.active,
.nav-tabs button:hover {
  background: #254c6d;
  color: #fff;
}
.exit {
  margin-top: auto;
  color: #a7d0ec;
}
.workspace {
  padding: 42px clamp(25px, 5vw, 76px);
  width: calc(100% - 245px);
  min-height: 100vh;
  background: #f7f9fa;
}
.workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 34px;
}
.workspace h1 {
  margin: 0;
  color: var(--navy);
  font-size: 34px;
}
.demo-badge {
  background: #fff2cf;
  border: 1px solid #ecd187;
  border-radius: 99px;
  padding: 7px 12px;
  font-size: 12px;
  color: #72500b;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.metric,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.metric {
  padding: 21px;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.metric strong {
  font-size: 31px;
  color: var(--navy);
  display: block;
  margin-top: 6px;
}
.panel {
  padding: 25px;
  margin-top: 24px;
}
.panel h2 {
  font-size: 20px;
  margin: 0 0 16px;
  color: var(--navy);
}
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}
.list-head h2 {
  margin: 0;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  padding: 0 8px 10px;
}
.data-table td {
  padding: 13px 8px;
  border-bottom: 1px solid #edf0f2;
}
.status {
  border-radius: 99px;
  background: #eaf3eb;
  color: #36713d;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}
.record-form {
  max-width: 750px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: 5px;
}
.record-form label:last-of-type:nth-child(odd) {
  grid-column: span 2;
}
.record-form button {
  justify-self: start;
}
.record-form .full {
  grid-column: span 2;
}
.empty {
  color: var(--muted);
  padding: 17px 0;
}
@media (max-width: 760px) {
  .topbar {
    height: auto;
    padding: 16px 20px;
    align-items: flex-start;
  }
  .topbar .wordmark {
    width: 150px;
  }
  .topbar nav {
    gap: 11px;
    flex-wrap: wrap;
    justify-content: end;
  }
  .hero {
    padding: 65px 25px;
    display: block;
  }
  .hero-card {
    margin-top: 38px;
    max-width: 100%;
    width: auto;
  }
  .notice-grid,
  .content-grid,
  .cards,
  .apply {
    grid-template-columns: 1fr;
  }
  .intro,
  .notice-section,
  .apply,
  .content-section {
    padding: 60px 25px;
  }
  .apply {
    gap: 35px;
  }
  .sidebar {
    width: 64px;
    padding: 22px 8px;
  }
  .sidebar .brand span {
    display: none;
  }
  .sidebar .brand img {
    width: 38px;
  }
  .nav-tabs button {
    font-size: 0;
    height: 42px;
  }
  .nav-tabs button:before {
    content: "•";
    font-size: 22px;
  }
  .workspace {
    width: calc(100% - 64px);
    padding: 32px 18px;
  }
  .workspace-head {
    display: block;
  }
  .demo-badge {
    display: inline-block;
    margin-top: 12px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .record-form {
    grid-template-columns: 1fr;
  }
  .record-form label:last-of-type:nth-child(odd),
  .record-form .full {
    grid-column: auto;
  }
  .data-table {
    display: block;
    overflow: auto;
  }
}

.nav-submenu { margin: 3px 0; }
.workspace-actions { display: flex; align-items: center; gap: 12px; }
.discipline-hero { display: flex; justify-content: space-between; gap: 24px; align-items: end; background: linear-gradient(120deg, #102a43, #244f71); color: #fff; padding: 32px; border-radius: 6px; }
.hostel-hero { background: linear-gradient(120deg, #173e5c, #3c6781); color: #fff; padding: 30px; border-radius: 6px; }
.hostel-hero h2 { margin: 0 0 10px; font-size: 32px; }
.hostel-hero p:not(.eyebrow) { margin: 0; color: #dbe8f1; line-height: 1.5; }
.hostel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.hostel-stats div { padding: 18px; border: 1px solid var(--line); background: #fff; border-radius: 5px; }
.hostel-stats strong { display: block; color: var(--navy); font-size: 30px; }
.hostel-stats span { color: var(--muted); font-size: 13px; }
.discipline-hero h2 { margin: 0 0 10px; font-size: 32px; }
.discipline-hero p:not(.eyebrow) { margin: 0; max-width: 640px; line-height: 1.5; color: #dbe8f1; }
.discipline-summary { min-width: 145px; text-align: right; }
.discipline-summary strong { display: block; font-size: 36px; }
.discipline-summary span { color: #dbe8f1; font-size: 12px; }
.discipline-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 20px; }
.discipline-card { text-align: left; border: 1px solid var(--line); border-top: 4px solid var(--gold); padding: 22px; border-radius: 5px; background: #fff; cursor: pointer; color: var(--ink); min-height: 190px; }
.discipline-card:hover { border-color: #a7bdcf; box-shadow: 0 7px 20px #102a4320; }
.discipline-card-count { color: var(--gold); font-weight: 800; font-size: 27px; }
.discipline-card h3 { margin: 12px 0 8px; color: var(--navy); font-size: 19px; }
.discipline-card p { color: var(--muted); line-height: 1.45; font-size: 13px; margin: 0; }
.discipline-card small { display: block; color: var(--blue); font-weight: 700; margin-top: 18px; }
.discipline-card small b { float: right; font-size: 17px; }
.discipline-guidance > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.discipline-guidance p { margin: 0; line-height: 1.5; color: var(--muted); }
.refresh-data { padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 12px; font-weight: 700; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: #06192bb8; overflow-y: auto; }
.modal { width: min(780px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; background: #f7f9fa; border-radius: 7px; padding: 26px; box-shadow: 0 24px 70px #0008; }
.modal header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 18px; }
.modal h2 { margin: 0; color: var(--navy); }
.modal .record-form { max-width: none; }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 30px; line-height: 1; cursor: pointer; }
.sidebar-top { display: contents; }
.mobile-menu { display: none; }
.quick-capture { margin-top: 18px; }
.learner-photo { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; border: 2px solid #dbe2e8; background: #eef2f4; }
.photo-placeholder { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #edf1f3; color: var(--muted); }
.learner-identity { display: flex; align-items: center; gap: 11px; grid-column: 1 / -1; padding: 11px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9fa; color: var(--muted); font-size: 13px; }
.learner-identity b, .learner-identity small { display: block; }
.nav-submenu summary { padding: 12px 11px; color: #dce8f1; font-size: 14px; border-radius: 4px; cursor: pointer; list-style: none; }
.nav-submenu summary::-webkit-details-marker { display: none; }
.nav-submenu summary:after { content: "⌄"; float: right; }
.nav-submenu[open] summary { background: #183a56; color: #fff; }
.nav-submenu > div { display: grid; gap: 2px; padding: 4px 0 4px 10px; }
.nav-submenu button { font-size: 13px !important; }
.attendance-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.attendance-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 26px; }
.attendance-summary { text-align: left; padding: 18px; border: 1px solid var(--line); border-left: 4px solid #d39d35; border-radius: 5px; background: #fff; cursor: pointer; color: var(--ink); }
.attendance-summary span, .attendance-summary small { display: block; }
.attendance-summary strong { display: block; font-size: 21px; margin: 8px 0; }
.attendance-summary small { color: var(--muted); }
.attendance-summary.all-present { border-left-color: #4d8a59; background: #f4faf4; }
.attendance-summary.has-absences { border-left-color: #bd5c52; background: #fff7f5; }
.attendance-summary.outstanding { border-left-color: #d39d35; background: #fffbf0; }
.attendance-head span { color: var(--muted); font-size: 13px; font-weight: 700; }
.attendance-list { display: grid; gap: 9px; }
.attendance-row { display: grid; grid-template-columns: 122px minmax(160px, 1fr) minmax(220px, 1fr); align-items: center; gap: 14px; padding: 13px; border: 1px solid var(--line); border-left: 4px solid #bd5c52; background: #fff; }
.attendance-row.is-present { border-left-color: #4d8a59; background: #f4faf4; }
.attendance-row small { display: block; color: var(--muted); margin-top: 3px; }
.attendance-toggle { border: 0; border-radius: 4px; padding: 10px; background: #f5e6e3; color: #8d3329; font-weight: 800; cursor: pointer; }
.is-present .attendance-toggle { background: #dceede; color: #276632; }
.attendance-row label { font-size: 12px; }
.attendance-panel #rollcallConfirm { margin-top: 18px; display: flex; align-items: end; gap: 14px; }
.attendance-panel #rollcallConfirm label { min-width: 260px; }

@media (max-width: 760px) {
  #adminSite { display: block; }
  .sidebar { width: 100%; min-height: 0; padding: 12px 16px; display: block; }
  .sidebar-top { display: flex; align-items: center; justify-content: space-between; }
  .sidebar .brand { padding: 0; }
  .sidebar .brand span { display: block; }
  .sidebar .brand img { width: 36px; }
  .mobile-menu { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #3a607e; border-radius: 4px; background: #183a56; color: #fff; font-size: 23px; cursor: pointer; }
  .nav-tabs { display: none; margin-top: 12px; padding: 8px; background: #0b2236; border: 1px solid #315977; border-radius: 5px; }
  .sidebar.is-open .nav-tabs { display: grid; }
  .nav-tabs > button, .nav-submenu summary { white-space: nowrap; flex: 0 0 auto; font-size: 13px !important; height: auto; padding: 10px; }
  .nav-tabs button:before { display: none; }
  .nav-submenu { flex: 0 0 auto; }
  .nav-submenu > div { position: absolute; z-index: 2; background: var(--navy); border: 1px solid #315977; border-radius: 4px; min-width: 160px; padding: 6px; }
  .nav-submenu > div button { width: 100%; white-space: nowrap; }
  .exit { display: none; }
  .workspace { width: 100%; padding: 26px 18px; }
  .workspace h1 { font-size: 30px; line-height: 1.08; }
  .workspace-actions { margin-top: 12px; flex-wrap: wrap; }
  .attendance-head { display: block; }
  .attendance-head span { display: block; margin-top: 8px; }
  .attendance-row { grid-template-columns: 1fr; gap: 9px; }
  .attendance-summary-grid { grid-template-columns: 1fr; }
  .attendance-toggle { width: 100%; font-size: 15px; }
  .attendance-panel #rollcallConfirm { display: grid; }
  .attendance-panel #rollcallConfirm label { min-width: 0; }
  .attendance-panel { padding: 17px; }
  .modal-backdrop { padding: 12px; align-items: start; }
  .modal { max-height: none; min-height: calc(100vh - 24px); padding: 20px; }
  .discipline-hero { display: block; padding: 24px; }
  .discipline-summary { text-align: left; margin-top: 22px; }
  .discipline-grid, .discipline-guidance > div { grid-template-columns: 1fr; }
  .hostel-stats { grid-template-columns: 1fr; }
}
