:root {
  --bg: #f8f9ff;
  --panel: #ffffff;
  --panel-soft: #eff4ff;
  --panel-strong: #dce9ff;
  --text: #0b1c30;
  --muted: #596273;
  --line: #c5c6cf;
  --primary: #031636;
  --blue: #0051d5;
  --blue-strong: #316bf3;
  --green: #007a52;
  --mint: #dbf7ea;
  --amber: #a15c00;
  --cream: #fff4d8;
  --red: #ba1a1a;
  --rose: #ffdad6;
  --shadow: 0 14px 42px rgba(3, 22, 54, 0.1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #101826;
  --panel: #172235;
  --panel-soft: #202d43;
  --panel-strong: #2a3a56;
  --text: #eaf1ff;
  --muted: #aeb9ca;
  --line: #3a4a62;
  --primary: #d8e2ff;
  --blue: #88a9ff;
  --blue-strong: #b4c5ff;
  --green: #6ffbbe;
  --mint: #12382a;
  --amber: #ffd27a;
  --cream: #3b3017;
  --red: #ffb4ab;
  --rose: #4b211f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.material-symbols-outlined { font-variation-settings: "FILL" 0, "wght" 430, "GRAD" 0, "opsz" 24; }
.hidden { display: none !important; }
.mobile-only { display: none; }
.app { min-height: 100vh; }

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--panel);
}
.auth__story {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(120deg, rgba(3, 22, 54, 0.86) 0%, rgba(3, 22, 54, 0.54) 48%, rgba(0, 122, 82, 0.4) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1800 1200'%3E%3Cdefs%3E%3ClinearGradient id='sky' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop stop-color='%238fc7e8'/%3E%3Cstop offset='.62' stop-color='%23e9f3fb'/%3E%3C/linearGradient%3E%3ClinearGradient id='grass' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop stop-color='%236aa877'/%3E%3Cstop offset='1' stop-color='%23296f4d'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1800' height='1200' fill='url(%23sky)'/%3E%3Crect y='520' width='1800' height='680' fill='url(%23grass)'/%3E%3Cpath d='M760 620h280l240 580H520z' fill='%23d5d5d2'/%3E%3Crect x='290' y='315' width='1220' height='275' rx='4' fill='%23f2f5f8'/%3E%3Cpath d='M230 315 900 150l670 165H230z' fill='%231a2b4c'/%3E%3Crect x='250' y='292' width='1300' height='45' fill='%231a2b4c'/%3E%3Crect x='290' y='560' width='1220' height='30' fill='%231a2b4c'/%3E%3Crect x='830' y='420' width='140' height='170' fill='%2300705b'/%3E%3Cpath d='M850 440h100v150H850z' fill='none' stroke='%23d8fff6' stroke-width='5'/%3E%3Cg fill='%23b8d2e3' stroke='%23fff' stroke-width='5'%3E%3Cpath d='M360 380h115v95H360zM540 380h115v95H540zM1080 380h115v95h-115zM1260 380h115v95h-115z'/%3E%3C/g%3E%3Cg stroke='%23fff' stroke-width='5'%3E%3Cpath d='M418 382v90M360 428h115M598 382v90M540 428h115M1138 382v90M1080 428h115M1318 382v90M1260 428h115'/%3E%3C/g%3E%3Cg fill='%23dfe6eb'%3E%3Crect x='735' y='320' width='34' height='270'/%3E%3Crect x='1000' y='320' width='34' height='270'/%3E%3C/g%3E%3Cg%3E%3Crect x='130' y='475' width='34' height='135' fill='%23744e2e'/%3E%3Ccircle cx='85' cy='365' r='85' fill='%232b7d51'/%3E%3Ccircle cx='190' cy='357' r='86' fill='%232b7d51'/%3E%3Ccircle cx='145' cy='425' r='86' fill='%232b7d51'/%3E%3Crect x='1620' y='475' width='34' height='135' fill='%23744e2e'/%3E%3Ccircle cx='1575' cy='365' r='85' fill='%232b7d51'/%3E%3Ccircle cx='1680' cy='357' r='86' fill='%232b7d51'/%3E%3Ccircle cx='1635' cy='425' r='86' fill='%232b7d51'/%3E%3C/g%3E%3Cpath d='M920 120v180' stroke='%23f5f7fb' stroke-width='8'/%3E%3Cpath d='M925 130 1085 170 925 210z' fill='%23f4c542'/%3E%3C/svg%3E") center/cover;
  color: white;
  padding: 40px;
  overflow: hidden;
}
.auth__story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 22, 54, 0.12), rgba(3, 22, 54, 0.72)),
    radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.16), transparent 30%);
}
.auth__story > * { position: relative; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand > .material-symbols-outlined, .brand--light > .material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
}
.brand--light > .material-symbols-outlined { background: white; color: #031636; }
.brand strong { display: block; font-size: 20px; line-height: 1; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.brand--light small { color: #dbe7ff; }
.auth__copy { max-width: 660px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28); }
.auth__copy h1 { margin: 22px 0 18px; font-size: clamp(34px, 4vw, 48px); line-height: 1.22; letter-spacing: 0; }
.auth__copy::after { content: "A comprehensive school management platform that brings administrators, teachers, students, and parents together."; display: block; max-width: 620px; color: rgba(255,255,255,.92); font-size: 22px; line-height: 1.65; }
.auth__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.auth__stats div { padding: 18px; border: 1px solid rgba(255,255,255,.24); border-radius: 16px; background: rgba(3,22,54,.32); backdrop-filter: blur(10px); }
.auth__stats strong { display: block; font-size: 30px; }
.auth__stats span { color: #dbe7ff; font-size: 13px; }
.auth__panel {
  align-self: center;
  justify-self: center;
  width: min(590px, calc(100% - 32px));
  background: var(--panel);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 28px;
}
.auth__panel h2 { margin: 8px 0; font-size: 28px; }
.auth__panel p { color: var(--muted); line-height: 1.55; }
.role-tabs {
  display: flex;
  gap: 8px;
  margin: 34px 0 28px;
  padding: 6px;
  background: color-mix(in srgb, var(--panel-soft) 80%, white);
  border-radius: 999px;
}
.role-tabs button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.role-tabs button.active { background: var(--panel); color: var(--text); box-shadow: 0 8px 18px rgba(3,22,54,.08); }
.auth__remember { display: flex; justify-content: space-between; align-items: center; margin: 18px 0; }
.auth__remember label { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; }
.auth__remember input { width: 20px; min-height: 20px; }
.auth__remember a, .auth__signup a { color: var(--green); text-decoration: none; }
.auth-submit { width: 100%; min-height: 66px; border-radius: 8px; background: var(--green); border-color: var(--green); font-size: 16px; }
.auth__signup, .auth__demo { text-align: center; }
.auth__demo { font-size: 13px; }
label { display: grid; gap: 8px; margin-top: 16px; color: var(--text); font-weight: 700; font-size: 14px; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 16%, transparent); }
.required-star, .field-error { color: var(--red); }
.field-error { font-size: 12px; font-weight: 750; }
.auth__checks { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.auth__checks span { display: flex; align-items: center; gap: 8px; }
.auth__checks i { width: 9px; height: 9px; border-radius: 999px; background: var(--green); }

.shell {
  min-height: 100vh;
  padding-top: 72px;
  padding-left: 280px;
  transition: padding-left .18s ease;
}
.shell.sidebar-collapsed { padding-left: 82px; }
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.topbar__search {
  flex: 1;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 0 14px;
}
.topbar__search input { border: 0; background: transparent; min-height: auto; box-shadow: none; padding: 0; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.topbar__actions select { min-width: 190px; }

.sidebar {
  position: fixed;
  top: 72px;
  left: 0;
  bottom: 0;
  z-index: 45;
  width: 280px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  transition: width .18s ease, padding .18s ease;
}
.sidebar-collapsed .sidebar { width: 82px; padding: 18px 10px; }
.sidebar-collapsed .sidebar__profile { justify-content: center; padding: 10px; }
.sidebar-collapsed .sidebar__profile div:not(.avatar),
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar__health { display: none; }
.sidebar-collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar-collapsed #moduleNav { padding-right: 0; }
.sidebar__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--panel-soft);
  margin-bottom: 14px;
}
.avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  color: var(--panel);
  font-weight: 900;
}
.sidebar__profile small { display: block; margin-top: 4px; color: var(--muted); }
#moduleNav { display: grid; gap: 4px; overflow-y: auto; padding-right: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 11px 12px;
  text-align: left;
  font-weight: 750;
}
.nav-item:hover { background: var(--panel-soft); color: var(--text); }
.nav-item.active { background: var(--blue); color: white; box-shadow: 0 10px 24px rgba(0, 81, 213, 0.24); }
.nav-item.active .material-symbols-outlined { font-variation-settings: "FILL" 1, "wght" 520, "GRAD" 0, "opsz" 24; }
.sidebar__health { margin-top: auto; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-soft); }
.sidebar__health small { color: var(--muted); }
.progress { height: 8px; background: var(--panel-strong); border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.progress span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }

.workspace { padding: 28px; max-width: 1500px; margin: 0 auto; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.page-head h1 { margin: 6px 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: 0; }
.page-head p { margin: 0; color: var(--muted); }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .16em; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 800; }
.pill--glass { color: white; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); }
.pill--green { background: var(--mint); color: var(--green); }
.pill--amber { background: var(--cream); color: var(--amber); }
.pill--red { background: var(--rose); color: var(--red); }
.pill--blue { background: var(--panel-strong); color: var(--blue); }
.btn, .icon-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 14px;
  font-weight: 850;
}
.btn--primary { background: var(--blue); border-color: var(--blue); color: white; }
.btn--ghost { background: var(--panel-soft); }
.btn--danger { background: var(--rose); border-color: color-mix(in srgb, var(--red) 26%, var(--line)); color: var(--red); }
.btn--soft-green { background: var(--mint); border-color: transparent; color: var(--green); min-height: 36px; }
.btn--soft-red { background: var(--rose); border-color: transparent; color: var(--red); min-height: 36px; }
.btn:hover, .icon-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.icon-btn { width: 42px; padding: 0; }

.content { display: grid; gap: 22px; }
.grid { display: grid; gap: 18px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1.45fr .85fr; gap: 22px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(3,22,54,.04);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow); }
.clickable { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.clickable:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: var(--shadow); }
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.card__head h2, .card__head h3 { margin: 0; }
.card__body { padding: 18px; }
.metric { padding: 18px; }
.metric__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.metric .material-symbols-outlined { padding: 10px; border-radius: 12px; background: var(--panel-soft); color: var(--blue); }
.metric small { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 900; }
.metric strong { display: block; margin-top: 8px; color: var(--primary); font-size: 30px; }

.chart { height: 280px; display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-top: 16px; }
.bar { flex: 1; display: grid; align-items: end; gap: 10px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 850; }
.bar i { display: block; width: min(54px, 100%); margin: 0 auto; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, var(--blue-strong), var(--blue)); min-height: 26px; }
.timeline { display: grid; }
.activity {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.activity span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; background: var(--panel-soft); color: var(--blue); }
.activity p { margin: 0; font-weight: 650; }
.activity small { color: var(--muted); }
.network { display: flex; flex-wrap: wrap; gap: 10px; }
.network span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel-soft); border-radius: 14px; padding: 11px 13px; font-weight: 800; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.dot--red { background: var(--red); }

.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar input { max-width: 360px; }
.filter-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.filter-row .search-field { min-width: min(320px, 100%); }
.filter-row select { min-width: 150px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); background: var(--panel-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
td strong { display: block; }
td small { color: var(--muted); }
tr:hover td { background: color-mix(in srgb, var(--panel-soft) 62%, transparent); }
.selected-row td { background: color-mix(in srgb, var(--blue) 10%, var(--panel)); }
.row-actions { display: flex; gap: 8px; }

.student-management__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.student-management h2 { margin: 0 0 6px; font-size: 30px; }
.student-management p { margin: 0; color: var(--muted); }
.btn--tall { min-height: 60px; padding: 0 22px; border-radius: 10px; }
.student-stat {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 120px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.student-stat > .material-symbols-outlined { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 10px; font-size: 32px; }
.student-stat strong { display: block; font-size: 34px; line-height: 1; }
.student-stat small { display: block; margin-top: 8px; color: var(--muted); font-size: 17px; }
.student-stat--green > .material-symbols-outlined { background: #c9f7dc; color: #009b68; }
.student-stat--amber > .material-symbols-outlined { background: #fff0b8; color: #c56b00; }
.student-stat--blue > .material-symbols-outlined { background: #d8ecff; color: #0879d9; }
.student-stat--red > .material-symbols-outlined { background: #ffdad6; color: var(--red); }
.student-list-card { border-radius: 8px; overflow: visible; }
.student-list-card .card__body { overflow: visible; }
.student-filters { display: grid; grid-template-columns: 1fr 146px 150px 146px; gap: 14px; padding: 22px; border-bottom: 1px solid var(--line); }
.search-field { margin: 0; position: relative; }
.search-field span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-field input { padding-left: 50px; min-height: 54px; border-radius: 8px; }
.student-filters select { min-height: 54px; border-radius: 8px; }
.student-table-wrap { border: 0; border-radius: 0; overflow: visible; }
.student-table { min-width: 1080px; }
.student-table th { background: var(--panel); }
.student-cell { display: flex; align-items: center; gap: 14px; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: color-mix(in srgb, var(--blue) 8%, var(--panel)); }
.avatar--table { width: 44px; height: 44px; border-radius: 999px; font-size: 13px; background: #dce9ff; color: #031636; }
.avatar--photo {
  overflow: hidden;
  background: var(--panel-soft);
}
.avatar--photo img,
.avatar--photo-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.avatar--photo-preview {
  flex: 0 0 auto;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel-soft) 80%, transparent);
  color: var(--muted);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, outline-color .16s ease;
}
.avatar--photo-preview:hover,
.avatar--photo-preview:focus {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  outline: 3px solid color-mix(in srgb, var(--blue) 24%, transparent);
  outline-offset: 3px;
}
.section-dot { display: inline-grid; place-items: center; min-width: 42px; height: 42px; border-radius: 999px; background: color-mix(in srgb, var(--panel-soft) 86%, transparent); font-weight: 800; }
.section-dot--wide { width: auto; padding: 0 14px; }
.action-menu { position: relative; display: inline-block; }
.action-menu summary {
  list-style: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
}
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu[open] summary, .action-menu summary:hover { color: var(--green); background: var(--mint); }
.action-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: 230px;
  display: grid;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.action-menu__panel button {
  border: 0;
  background: transparent;
  color: var(--text);
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 10px;
  text-align: left;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px 0;
  color: var(--muted);
  font-weight: 750;
}
.pagination div { display: flex; align-items: center; gap: 12px; }
.pagination button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.action-menu__panel button:hover { background: var(--panel-soft); }
.action-menu__panel button.danger { color: var(--red); }
.student-profile { display: grid; gap: 14px; }
.profile-hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--panel-soft); }
.profile-hero h3 { margin: 0 0 4px; font-size: 22px; }
.profile-hero p { margin: 0 0 8px; color: var(--muted); }
.avatar--large { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-grid div, .note-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--panel); }
.detail-grid small { display: block; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.detail-grid strong { display: block; margin-top: 5px; }
.note-box p { margin: 8px 0 0; color: var(--muted); line-height: 1.45; }
.action-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.student-page { display: grid; gap: 22px; }
.student-page__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}
.student-page__tabs { display: inline-flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--panel-soft); }
.student-page__tabs button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 850;
}
.student-page__tabs button.active { background: var(--panel); color: var(--green); box-shadow: 0 6px 16px rgba(3,22,54,.08); }
.profile-modal-body { padding: 0; display: block; max-height: min(78vh, 880px); overflow: auto; }
.modal--profile { width: min(1500px, calc(100vw - 36px)); }
.modal--profile form > header { background: var(--panel); }
.profile-toolbar { display: flex; justify-content: flex-end; gap: 12px; padding: 18px 22px 0; }
.student-cover { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.student-cover__band { min-height: 166px; background: linear-gradient(135deg, #009b68, #18bdb4); }
.student-cover__body { min-height: 94px; display: flex; align-items: center; gap: 20px; padding: 0 28px 24px; }
.avatar--portrait { width: 126px; height: 126px; margin-top: -62px; border: 5px solid var(--panel); border-radius: 10px; font-size: 34px; background: #dce9ff; color: #031636; }
.student-cover h3 { margin: 0; font-size: 28px; }
.student-cover p { margin: 6px 0 0; color: var(--muted); }
.student-cover__stats { margin-left: auto; display: flex; gap: 38px; text-align: center; }
.student-cover__stats strong { display: grid; font-size: 28px; }
.student-cover__stats small { color: var(--muted); font-size: 13px; font-weight: 500; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 24px; }
.profile-main, .profile-side { display: grid; gap: 30px; align-content: start; }
.profile-card { border: 1px solid var(--line); border-radius: 8px; padding: 26px; background: var(--panel); }
.profile-card h3 { margin: 0 0 22px; display: flex; gap: 10px; align-items: center; font-size: 22px; }
.profile-card h3 .material-symbols-outlined { color: var(--green); }
.profile-card p { color: var(--muted); line-height: 1.55; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 32px; }
.info-item small { display: block; color: var(--muted); margin-bottom: 6px; }
.info-item strong { font-weight: 500; }
.info-item--full { grid-column: 1 / -1; }
.academic-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 22px; }
.academic-metrics div { text-align: center; background: color-mix(in srgb, var(--panel-soft) 45%, transparent); padding: 22px; border-radius: 8px; }
.academic-metrics strong { display: block; font-size: 30px; }
.academic-metrics small { color: var(--muted); }
.subject-list { display: grid; gap: 15px; }
.subject-row { display: grid; grid-template-columns: 180px 1fr 44px; gap: 20px; align-items: center; }
.subject-bar { height: 11px; border-radius: 999px; background: color-mix(in srgb, var(--panel-soft) 70%, transparent); overflow: hidden; }
.subject-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6ac900, #13b68c); }
.guardian-card, .year-row { display: grid; gap: 5px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.guardian-card:last-child, .year-row:last-child { border-bottom: 0; }
.quick-stats { display: grid; gap: 18px; }
.attendance-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.attendance-stats .summary-stat {
  min-height: 82px;
  padding: 12px;
}
.attendance-filters {
  grid-template-columns: minmax(150px, 190px) minmax(150px, 190px) minmax(170px, 220px) minmax(300px, 1fr);
  align-items: end;
}
.attendance-filters--modal {
  grid-template-columns: minmax(150px, 190px) minmax(150px, 190px) minmax(180px, 240px) max-content;
}
.attendance-filters--mark {
  grid-template-columns: minmax(150px, 190px) minmax(150px, 190px) minmax(180px, 240px) minmax(260px, 1fr);
}
.attendance-register-page {
  overflow: hidden;
}
.attendance-range-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.attendance-range-table {
  min-width: 1120px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.attendance-range-table th,
.attendance-range-table td {
  min-width: 124px;
  padding: 10px 8px;
  border-right: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  vertical-align: top;
}
.attendance-range-table th {
  background: color-mix(in srgb, var(--panel-soft) 70%, var(--panel));
  color: var(--text);
  text-align: center;
  text-transform: uppercase;
  font-size: 12px;
}
.attendance-range-table th small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  text-transform: none;
}
.attendance-range-table select,
.attendance-range-table input {
  width: 100%;
}
.attendance-range-table input {
  margin-top: 8px;
  min-height: 34px;
  font-size: 13px;
}
.attendance-history-title {
  margin: 24px 0 12px;
}
.attendance-sheet {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.attendance-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--panel-soft) 76%, var(--panel));
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.attendance-sheet__head h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.attendance-sheet__head h3 .material-symbols-outlined {
  color: var(--blue);
}
.attendance-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  font-weight: 800;
}
.attendance-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.attendance-sheet__scroll {
  overflow: auto;
}
.attendance-freeze-sheet {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 260px;
  align-items: stretch;
  width: 100%;
}
.attendance-freeze-left,
.attendance-freeze-right {
  overflow: hidden;
  background: var(--panel);
  z-index: 2;
}
.attendance-freeze-left {
  border-right: 1px solid var(--line);
}
.attendance-freeze-right {
  border-left: 1px solid var(--line);
}
.attendance-freeze-days {
  overflow-x: auto;
  overflow-y: hidden;
}
.attendance-freeze-sheet table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.attendance-freeze-days table {
  min-width: max-content;
}
.attendance-freeze-sheet th,
.attendance-freeze-sheet td {
  height: 74px;
  padding: 10px 8px;
  border-right: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  text-align: center;
}
.attendance-freeze-sheet thead th {
  height: 42px;
  background: color-mix(in srgb, var(--panel-soft) 65%, var(--panel));
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
}
.attendance-freeze-left th,
.attendance-freeze-left td {
  text-align: left;
}
.attendance-freeze-right td {
  min-width: 52px;
  font-weight: 900;
}
.attendance-freeze-right th {
  min-width: 52px;
}
.attendance-month-head {
  border-left: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.attendance-freeze-right td.present { background: color-mix(in srgb, var(--green) 16%, var(--panel)); }
.attendance-freeze-right td.late { background: color-mix(in srgb, var(--amber) 18%, var(--panel)); }
.attendance-freeze-right td.absent { background: color-mix(in srgb, var(--red) 15%, var(--panel)); }
.attendance-freeze-right td.muted { background: var(--panel-soft); }
.attendance-freeze-right td.rate { background: color-mix(in srgb, var(--blue) 16%, var(--panel)); }
.attendance-freeze-right table {
  table-layout: fixed;
}
.attendance-freeze-right th,
.attendance-freeze-right td,
.attendance-freeze-right .attendance-summary-cell,
.attendance-freeze-right .attendance-summary-col {
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  padding-left: 6px;
  padding-right: 6px;
}
.attendance-freeze-table {
  min-width: max-content !important;
  table-layout: fixed;
}
.attendance-freeze-table .attendance-date-col {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
}
.attendance-freeze-table .attendance-staff-col {
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
}
.attendance-freeze-table .attendance-summary-cell,
.attendance-freeze-table .summary-p,
.attendance-freeze-table .summary-l,
.attendance-freeze-table .summary-a,
.attendance-freeze-table .summary-nm,
.attendance-freeze-table .summary-rate {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
}
.attendance-freeze-table .summary-rate { right: 0; }
.attendance-freeze-table .summary-nm { right: 48px; }
.attendance-freeze-table .summary-a { right: 96px; }
.attendance-freeze-table .summary-l { right: 144px; }
.attendance-freeze-table .summary-p { right: 192px; box-shadow: -1px 0 0 var(--line); }
.attendance-freeze-table .attendance-summary-group {
  right: 0;
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
}
.attendance-freeze-table th.attendance-sticky-right,
.attendance-freeze-table td.attendance-sticky-right {
  z-index: 6;
}
.attendance-freeze-table th.attendance-sticky-left,
.attendance-freeze-table td.attendance-sticky-left {
  z-index: 7;
}
.attendance-grid-sheet {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 260px;
  width: 100%;
  overflow: hidden;
}
.attendance-grid-left,
.attendance-grid-right {
  background: var(--panel);
  z-index: 2;
}
.attendance-grid-left {
  border-right: 1px solid var(--line);
}
.attendance-grid-right {
  border-left: 1px solid var(--line);
}
.attendance-grid-days {
  overflow-x: auto;
  overflow-y: hidden;
}
.attendance-grid-head,
.attendance-grid-months,
.attendance-grid-date-heads,
.attendance-grid-row,
.attendance-grid-date-row,
.attendance-grid-summary-head,
.attendance-grid-summary-row {
  min-height: 56px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}
.attendance-grid-head,
.attendance-grid-date-heads > div,
.attendance-grid-month,
.attendance-grid-summary-head span {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--panel-soft) 70%, var(--panel));
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.attendance-grid-head--top,
.attendance-grid-months {
  min-height: 42px;
}
.attendance-grid-months,
.attendance-grid-date-heads,
.attendance-grid-date-row {
  display: grid;
  width: max-content;
}
.attendance-grid-date-heads > div,
.attendance-grid-date-row > div {
  width: 64px;
  border-right: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}
.attendance-grid-date-heads small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  letter-spacing: .12em;
}
.attendance-grid-row,
.attendance-grid-date-row,
.attendance-grid-summary-row {
  min-height: 74px;
}
.attendance-grid-student {
  display: flex;
  align-items: center;
  padding: 10px;
}
.attendance-grid-date-row > div {
  display: grid;
  place-items: center;
}
.attendance-grid-summary-head,
.attendance-grid-summary-row {
  display: grid;
  grid-template-columns: repeat(5, 52px);
}
.attendance-grid-summary-row span {
  display: grid;
  place-items: center;
  border-right: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  font-weight: 900;
}
.attendance-grid-summary-row .present { background: color-mix(in srgb, var(--green) 16%, var(--panel)); }
.attendance-grid-summary-row .late { background: color-mix(in srgb, var(--amber) 18%, var(--panel)); }
.attendance-grid-summary-row .absent { background: color-mix(in srgb, var(--red) 15%, var(--panel)); }
.attendance-grid-summary-row .muted { background: var(--panel-soft); }
.attendance-grid-summary-row .rate { background: color-mix(in srgb, var(--blue) 16%, var(--panel)); }
.attendance-sheet table {
  min-width: 980px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.attendance-sheet th,
.attendance-sheet td {
  min-width: 58px;
  padding: 10px 8px;
  border-right: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  text-align: center;
}
.attendance-sheet th {
  background: color-mix(in srgb, var(--panel-soft) 65%, var(--panel));
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
}
.attendance-sheet th small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  text-transform: none;
}
.attendance-sticky,
.attendance-sticky-left,
.attendance-sticky-right {
  position: sticky;
  z-index: 2;
}
.attendance-sticky,
.attendance-sticky-left {
  left: 0;
}
.attendance-sticky-right {
  right: 0;
}
.attendance-staff-col {
  min-width: 260px !important;
  text-align: left !important;
  background: var(--panel) !important;
  box-shadow: 1px 0 0 var(--line);
}
.attendance-sheet th.attendance-staff-col {
  z-index: 5;
}
.attendance-summary-head {
  background: color-mix(in srgb, var(--primary) 8%, var(--panel)) !important;
  z-index: 5;
  box-shadow: -1px 0 0 var(--line);
}
.attendance-summary-cell {
  min-width: 58px !important;
  font-weight: 900;
}
.attendance-summary-col {
  width: 58px;
  min-width: 58px !important;
  max-width: 58px;
  z-index: 4;
}
.attendance-summary-col--rate { right: 0; }
.attendance-summary-col--nm { right: 58px; }
.attendance-summary-col--a { right: 116px; }
.attendance-summary-col--l { right: 174px; }
.attendance-summary-col--p { right: 232px; box-shadow: -1px 0 0 var(--line); }
.attendance-summary-cell.present { background: color-mix(in srgb, var(--green) 16%, var(--panel)); }
.attendance-summary-cell.late { background: color-mix(in srgb, var(--amber) 18%, var(--panel)); }
.attendance-summary-cell.absent { background: color-mix(in srgb, var(--red) 15%, var(--panel)); }
.attendance-summary-cell.muted { background: var(--panel-soft); }
.attendance-summary-cell.rate { background: color-mix(in srgb, var(--blue) 16%, var(--panel)); }
.attendance-dot {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--panel-soft);
}
.attendance-dot .material-symbols-outlined {
  font-size: 18px;
}
.attendance-dot--present {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 22%, var(--panel));
  color: var(--green);
}
.attendance-dot--late {
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 24%, var(--panel));
  color: var(--amber);
}
.attendance-dot--absent {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 20%, var(--panel));
  color: var(--red);
}
.attendance-dot--excused {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 18%, var(--panel));
  color: var(--blue);
}
.attendance-dot--not-marked {
  opacity: .72;
}
.attendance-analytics {
  display: grid;
  gap: 18px;
}
.attendance-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
}
.attendance-chart-card h3,
.attendance-analytics .profile-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.attendance-bars {
  display: grid;
  gap: 12px;
}
.attendance-bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 54px;
  align-items: center;
  gap: 12px;
}
.attendance-bar-row span,
.attendance-bar-row b {
  font-size: 13px;
}
.attendance-bar-row div,
.attendance-breakdown-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-soft);
}
.attendance-bar-row i,
.attendance-breakdown-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
.attendance-breakdown {
  display: grid;
  gap: 14px;
}
.attendance-breakdown-row {
  display: grid;
  grid-template-columns: 72px 1fr 44px 44px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.attendance-breakdown-row--green i { background: var(--green); }
.attendance-breakdown-row--amber i { background: var(--amber); }
.attendance-breakdown-row--red i { background: var(--red); }
.attendance-breakdown-row--blue i { background: var(--blue); }
.attendance-class-list {
  display: grid;
  gap: 12px;
}
.attendance-class-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 1.4fr 52px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.attendance-class-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.modal--attendance {
  width: min(1280px, calc(100vw - 40px));
}
.modal--attendance form {
  max-height: min(86vh, 900px);
}
.attendance-modal-body {
  display: block;
  padding: 24px 32px;
  overflow: auto;
}
.attendance-modal-note {
  margin: 14px 0;
  color: var(--muted);
  font-size: 14px;
}
.attendance-register-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin: 18px 0 8px;
}
.attendance-filters label {
  min-width: 0;
}
.attendance-filters input[type="date"],
.attendance-filters select {
  width: 100%;
}
.attendance-filters .search-field {
  width: 100%;
}
.attendance-filters .search-field input {
  min-width: 0;
  width: 100%;
}
.attendance-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 390px;
}
.attendance-choice {
  position: relative;
  display: inline-flex;
}
.attendance-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.attendance-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.attendance-choice input:checked + span {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 16%, var(--panel));
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.attendance-choice:has(input[value="Present"]:checked) span {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 18%, var(--panel));
}
.attendance-choice:has(input[value="Absent"]:checked) span {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 16%, var(--panel));
}
.attendance-choice:has(input[value="Late"]:checked) span {
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 18%, var(--panel));
}
.attendance-choice:has(input[value="Excused"]:checked) span {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 14%, var(--panel));
}
.student-table td:has(.attendance-choice-group) {
  vertical-align: middle;
}
.student-table td > input[name^="note-"] {
  width: 100%;
  min-width: 220px;
}
@media (max-width: 920px) {
  .attendance-filters,
  .attendance-filters--mark,
  .attendance-filters--modal {
    grid-template-columns: 1fr 1fr;
  }
  .attendance-filters .search-field {
    grid-column: 1 / -1;
  }
  .attendance-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .attendance-sheet__head {
    align-items: flex-start;
    flex-direction: column;
  }
  .attendance-freeze-sheet {
    grid-template-columns: 240px minmax(0, 1fr) 240px;
  }
  .attendance-grid-sheet {
    grid-template-columns: 220px minmax(0, 1fr) 220px;
  }
  .attendance-grid-summary-head,
  .attendance-grid-summary-row {
    grid-template-columns: repeat(5, 44px);
  }
  .attendance-analytics-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .attendance-filters,
  .attendance-filters--mark,
  .attendance-filters--modal,
  .attendance-stats {
    grid-template-columns: 1fr;
  }
  .attendance-choice-group {
    min-width: 0;
  }
  .attendance-choice span {
    min-width: 70px;
  }
  .attendance-freeze-sheet {
    grid-template-columns: 180px minmax(0, 1fr) 220px;
  }
  .attendance-grid-sheet {
    grid-template-columns: 170px minmax(0, 1fr) 200px;
  }
  .attendance-grid-summary-head,
  .attendance-grid-summary-row {
    grid-template-columns: repeat(5, 40px);
  }
  .attendance-freeze-right td,
  .attendance-freeze-right th {
    min-width: 44px;
  }
.attendance-freeze-sheet th,
.attendance-freeze-sheet td {
    padding: 8px 6px;
  }
  .attendance-bar-row,
  .attendance-breakdown-row,
  .attendance-class-row {
    grid-template-columns: 1fr;
  }
}
.attendance-freeze-days th,
.attendance-freeze-days td {
  min-width: 58px;
}
.summary-stat { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 10px; }
.summary-stat .material-symbols-outlined {
  grid-row: span 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.summary-stat strong { align-self: end; }
.summary-stat small { align-self: start; color: var(--muted); }
.summary-stat--green .material-symbols-outlined { background: var(--mint); color: var(--green); }
.summary-stat--amber .material-symbols-outlined { background: var(--cream); color: var(--amber); }
.summary-stat--blue .material-symbols-outlined { background: #d8ecff; color: #0879d9; }
.summary-stat--red .material-symbols-outlined { background: var(--rose); color: var(--red); }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}
.breadcrumb button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font-weight: 850;
}
.year-row { grid-template-columns: 48px 1fr auto; align-items: center; }
.year-row .material-symbols-outlined { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--panel-soft) 70%, transparent); color: var(--muted); }
.modal--edit-profile { width: min(870px, calc(100vw - 32px)); }
.profile-edit-form { padding: 0; display: block; max-height: min(70vh, 720px); overflow: auto; }
.modal-tabs { display: flex; gap: 18px; padding: 18px 28px 0; border-top: 1px solid var(--line); }
.modal-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 0 0 16px; display: inline-flex; align-items: center; gap: 8px; }
.modal-tabs button.active { color: var(--green); border-color: var(--green); }
.edit-panel { display: none; }
.edit-panel.active { display: block; }
.profile-edit-form .form-grid { padding: 28px; }
.form-grid h3.full { grid-column: 1 / -1; margin: 6px 0 0; }
.modal--wizard { width: min(980px, calc(100vw - 32px)); }
.wizard-body { display: block; padding: 22px; }
.wizard-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.wizard-steps span { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; }
.wizard-steps b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; background: var(--panel-soft); }
.wizard-steps span.active { color: var(--green); }
.wizard-steps span.active b { background: var(--green); color: white; }
.document-grid, .review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.document-slot { margin: 0; border: 1px dashed var(--line); border-radius: 8px; padding: 22px; }
.document-slot .material-symbols-outlined { color: var(--green); font-size: 34px; }
.review-grid article, .danger-panel { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--panel); }
.review-grid p { display: flex; justify-content: space-between; gap: 18px; color: var(--muted); }
.danger-panel { background: var(--rose); color: var(--red); }
.academic-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px 24px;
}
.academic-profile-head label { margin: 0; min-width: 260px; }
.academic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 30px; }
.academic-table-card { overflow: hidden; }
.academic-table-card h3 { margin-bottom: 24px; }
.academic-side { display: grid; gap: 30px; align-content: start; }
.highlight { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 8px; margin-top: 16px; }
.highlight > .material-symbols-outlined { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 8px; }
.highlight small { color: var(--muted); }
.highlight--good { background: #e8fbf1; }
.highlight--good > .material-symbols-outlined { background: #c9f7dc; color: var(--green); }
.highlight--risk { background: #fff0f0; }
.highlight--risk > .material-symbols-outlined { background: #ffdad6; color: var(--red); }
.grade-row { display: grid; grid-template-columns: 44px 1fr 24px; align-items: center; gap: 10px; margin: 12px 0; }
.muted-link { color: var(--muted); }
.qualification-list { display: grid; gap: 16px; }
.exam-workspace {
  display: grid;
  gap: 18px;
}
.exam-workspace__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.exam-workspace__head h2 {
  margin: 0 0 6px;
  font-size: 30px;
}
.exam-workspace__head p {
  margin: 0;
  color: var(--muted);
}
.exam-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  width: fit-content;
}
.exam-tabs button {
  border: 0;
  border-radius: 9px;
  padding: 10px 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.exam-tabs button.active {
  background: var(--blue);
  color: white;
  box-shadow: var(--shadow);
}
.tab-counter {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: white;
  font-size: 12px;
  font-weight: 900;
}
.exam-tabs button.active .tab-counter {
  background: white;
  color: var(--red);
}
.exam-filters {
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(170px, .7fr));
}
.exam-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.exam-layout--markbook {
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
}
.exam-rail,
.exam-list {
  display: grid;
  gap: 8px;
}
.exam-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  text-align: left;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  overflow: hidden;
}
.exam-card.active {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue), var(--shadow);
}
.exam-card__select {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.exam-card__select strong {
  grid-column: 1 / -1;
  font-size: 15px;
  line-height: 1.2;
}
.exam-card__select small,
.exam-card__select span {
  color: var(--muted);
}
.exam-card__select > .pill {
  justify-self: start;
  padding: 5px 9px;
  font-size: 11px;
}
.exam-card__edit {
  margin: 8px 8px 0 0;
  justify-self: end;
  width: 34px;
  height: 34px;
}
.exam-card__select small {
  grid-column: 1 / -1;
  font-size: 12px;
}
.exam-card__select > div {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr auto 1fr auto 1fr;
  gap: 5px;
  align-items: center;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.exam-card__select > div b {
  font-size: 14px;
}
.exam-context-picker {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.exam-context-picker h3,
.exam-context-picker p {
  margin: 0;
}
.exam-context-picker p {
  margin-top: 3px;
  color: var(--muted);
}
.exam-context-row {
  display: grid;
  grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.exam-context-row > strong {
  padding-top: 9px;
}
.exam-context-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.exam-context-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px;
  font-weight: 850;
  text-align: left;
}
.exam-context-row button.active {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, var(--panel));
  color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.exam-context-row button small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}
.exam-summary {
  display: grid;
  gap: 16px;
}
.exam-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}
.exam-summary-stats .summary-stat {
  min-height: 82px;
  grid-template-columns: 42px 1fr;
  align-items: center;
  padding: 12px;
}
.exam-summary-stats .summary-stat .material-symbols-outlined {
  width: 42px;
  height: 42px;
  font-size: 22px;
  grid-row: span 2;
}
.exam-summary-stats .summary-stat strong {
  font-size: 20px;
}
.exam-summary-stats .summary-stat small {
  margin-top: 2px;
  font-size: 13px;
}
.exam-score-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.exam-score-strip span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-soft);
}
.results-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin: 18px 0 14px;
}
.results-sheet-head h3 {
  margin: 0 0 4px;
}
.results-sheet-head p {
  margin: 0;
  color: var(--muted);
}
.markbook-tools {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}
.markbook-table {
  min-width: 860px;
}
.markbook-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.results-sheet-table tr.is-muted {
  color: var(--muted);
}
.results-sheet-table tr.is-muted strong {
  color: var(--text);
}
.markbook-table input {
  width: 100%;
  min-width: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 800;
}
.markbook-table input[data-mark-field="remark"] {
  min-width: 180px;
}
.markbook-table input[readonly] {
  background: var(--panel-soft);
  color: var(--muted);
}
.report-remarks {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.report-remarks__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.report-remarks__head h3 {
  margin: 0 0 4px;
}
.report-remarks__head p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
.report-remarks-table {
  min-width: 1040px;
}
.report-remarks-table textarea {
  width: 100%;
  min-width: 260px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.exam-layout--remarks {
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
}
.remarks-page-intro {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.remarks-page-intro div {
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-soft);
}
.remarks-page-intro div.is-warning {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: color-mix(in srgb, var(--red) 12%, var(--panel-soft));
}
.remarks-page-intro div.is-complete {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: color-mix(in srgb, var(--green) 12%, var(--panel-soft));
}
.remarks-page-intro strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}
.remarks-page-intro span,
.remarks-page-intro p {
  color: var(--muted);
}
.remarks-page-intro p {
  margin: 0;
}
.remarks-list-table {
  min-width: 900px;
}
.remarks-list-table td small,
.remarks-result-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.modal--remarks .modal__panel,
.modal--remarks::backdrop {
  overscroll-behavior: contain;
}
.remarks-modal {
  display: grid;
  gap: 16px;
}
.remarks-modal-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 8%, var(--panel)), var(--panel));
}
.remarks-modal-hero span {
  color: var(--blue);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.remarks-modal-hero h3 {
  margin: 4px 0;
  font-size: 24px;
}
.remarks-modal-hero p {
  margin: 0;
  color: var(--muted);
}
.remarks-student-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.remarks-student-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}
.remarks-student-summary small {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}
.remarks-student-summary strong {
  font-size: 20px;
}
.remarks-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 16px;
  align-items: start;
}
.remarks-result-preview,
.remarks-entry-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}
.remarks-section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.remarks-section-title h3 {
  margin: 0;
}
.remarks-section-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.remarks-result-table {
  min-width: 760px;
}
.remarks-entry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.remarks-entry-grid label {
  display: grid;
  gap: 6px;
  font-weight: 850;
}
.remarks-entry-grid textarea {
  min-height: 118px;
}
.modal--remarks #recordForm footer {
  position: sticky;
  bottom: 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
  margin: 0 -22px -22px;
  padding: 14px 22px;
}
.smart-exam-builder {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  background: var(--panel-soft);
}
.smart-exam-builder h3,
.smart-exam-builder p {
  margin: 0;
}
.smart-exam-builder p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.check-grid,
.teacher-match-preview {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 190px;
  overflow: auto;
}
.check-grid label,
.teacher-match-preview span {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--panel);
}
.check-grid input {
  width: 18px;
  height: 18px;
}
.teacher-match-preview span {
  color: var(--muted);
  font-size: 13px;
}
.communication-workspace {
  display: grid;
  gap: 14px;
}
.communication-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
}
.communication-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
}
.communication-head p {
  margin: 0;
  color: var(--muted);
}
.communication-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}
.communication-tabs button {
  border: 0;
  border-radius: 9px;
  padding: 10px 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.communication-tabs button.active {
  background: var(--blue);
  color: white;
  box-shadow: var(--shadow);
}
.communication-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, .55fr);
  gap: 18px;
  align-items: start;
}
.message-template-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.message-template-card {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  display: inline-grid;
  grid-template-columns: 28px minmax(120px, 1fr);
  align-items: center;
  gap: 9px;
  background: var(--panel-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.message-template-card:hover {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
}
.message-template-card .material-symbols-outlined {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--blue);
}
.message-template-card strong,
.message-template-card small {
  display: block;
  line-height: 1.2;
}
.message-template-card strong {
  font-size: 14px;
}
.message-template-card small {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.message-compose {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.message-compose .full {
  grid-column: 1 / -1;
}
.message-compose textarea {
  min-height: 130px;
}
.muted-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.message-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.recipient-preview {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}
.recipient-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.recipient-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}
.recipient-summary strong,
.recipient-summary small {
  display: block;
}
.recipient-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recipient-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.recipient-row strong,
.recipient-row small {
  grid-column: 2;
  min-width: 0;
}
.recipient-row strong {
  grid-row: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recipient-row small {
  grid-row: 2;
  overflow-wrap: anywhere;
}
.recipient-row .material-symbols-outlined {
  width: 38px;
  height: 38px;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 12%, var(--panel));
  color: var(--blue);
}
.recipient-preview small,
.communication-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.communication-table {
  min-width: 900px;
}
.messaging-shell {
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(340px, .42fr) minmax(0, .58fr);
  overflow: hidden;
  background: var(--panel);
}
.message-list-panel {
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  background: var(--panel-soft);
}
.message-search {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.message-search > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.message-thread-list {
  overflow: auto;
  display: grid;
  align-content: start;
}
.message-thread {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 14px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.message-thread:hover,
.message-thread.active {
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
}
.message-thread.active {
  box-shadow: inset 4px 0 0 var(--blue);
}
.message-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--blue) 16%, var(--panel));
  color: var(--blue);
  font-weight: 950;
}
.message-thread__main {
  min-width: 0;
}
.message-thread__main strong,
.message-thread__main small,
.message-thread__meta small {
  display: block;
}
.message-thread__main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-thread__main small {
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-thread__meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.message-thread__meta small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.message-detail-panel {
  min-width: 0;
  display: grid;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 4%, transparent) 25%, transparent 25%) 0 0 / 22px 22px,
    var(--panel);
}
.message-chat {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}
.message-chat__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: color-mix(in srgb, var(--panel) 88%, var(--panel-soft));
}
.message-chat__head h2,
.message-chat__head p {
  margin: 0;
}
.message-chat__head h2 {
  font-size: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-chat__head p {
  margin-top: 4px;
  color: var(--muted);
}
.message-chat__actions {
  display: flex;
  gap: 8px;
}
.message-chat__body {
  padding: 26px;
  display: grid;
  gap: 18px;
  align-content: start;
}
.chat-bubble {
  width: min(680px, 100%);
  justify-self: end;
  border-radius: 16px 16px 4px 16px;
  padding: 15px 16px;
  background: color-mix(in srgb, var(--green) 18%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--green) 36%, var(--line));
  box-shadow: var(--shadow);
}
.chat-bubble small {
  color: var(--muted);
  font-weight: 800;
}
.chat-bubble p {
  margin: 8px 0 0;
  line-height: 1.55;
  white-space: pre-wrap;
}
.message-delivery-card {
  width: min(680px, 100%);
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.message-delivery-card span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}
.message-delivery-card strong,
.message-delivery-card small {
  display: block;
}
.message-delivery-card small {
  color: var(--muted);
  margin-top: 3px;
}
.message-recipient-list {
  width: min(680px, 100%);
  justify-self: end;
  display: grid;
  gap: 10px;
}
.message-recipient-list h3,
.recipient-preview h3 {
  margin: 0;
  font-size: 16px;
}
.message-empty-detail,
.empty-state {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}
.message-empty-detail .material-symbols-outlined,
.empty-state .material-symbols-outlined {
  font-size: 48px;
  color: var(--blue);
}
.message-empty-detail h2,
.message-empty-detail p,
.empty-state strong,
.empty-state small {
  margin: 0;
}
.modal--message {
  width: min(1120px, calc(100vw - 36px));
}
.modal--message-view {
  width: min(940px, calc(100vw - 36px));
}
.message-compose-modal {
  padding: 22px;
  display: grid;
  gap: 16px;
}
.message-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 18px;
  align-items: start;
}
.message-compose-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.message-compose-fields .full {
  grid-column: 1 / -1;
}
.message-compose-fields textarea {
  min-height: 170px;
}
.message-view-modal {
  padding: 0;
}
.message-view-modal .message-detail-panel {
  min-height: 520px;
}
.message-view-modal .message-chat__head {
  border-top: 0;
}
.qualification-list div {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-soft) 45%, transparent);
}
.qualification-list .material-symbols-outlined {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--green);
}
.qualification-list p { margin: 0; }
.qualification-list small { display: block; color: var(--muted); margin-top: 4px; }
.cert-list { display: flex; flex-wrap: wrap; gap: 12px; }
.cert-list span { border-radius: 999px; background: var(--mint); color: var(--green); padding: 10px 14px; }
.staff-cover .student-cover__band { background: linear-gradient(135deg, #009b68, #18bdb4); }
.staff-table td:last-child { text-align: right; }
.staff-filters { grid-template-columns: 1fr 205px 250px 146px; }
.leave-filters { grid-template-columns: 1fr 185px 150px; }
.leave-table .row-actions { justify-content: flex-end; }
.dashboard-modern,
.academic-module { display: grid; gap: 22px; }
.dashboard-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.dashboard-title h2 { margin: 0 0 8px; font-size: 30px; }
.dashboard-title p { margin: 0; color: var(--muted); }
.dashboard-metric,
.mini-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 26px;
  box-shadow: 0 4px 14px rgba(3,22,54,.04);
}
.dashboard-metric { display: grid; gap: 10px; min-height: 170px; align-content: start; }
.dashboard-metric > .material-symbols-outlined,
.mini-metric > .material-symbols-outlined {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 28px;
}
.dashboard-metric strong { font-size: 34px; line-height: 1; margin-top: 12px; }
.dashboard-metric small,
.mini-metric small { color: var(--muted); }
.dashboard-metric em { color: var(--green); font-style: normal; font-size: 14px; }
.dashboard-metric--green > .material-symbols-outlined { background: var(--mint); color: var(--green); }
.dashboard-metric--amber > .material-symbols-outlined { background: var(--cream); color: var(--amber); }
.dashboard-metric--blue > .material-symbols-outlined { background: #d8ecff; color: #0879d9; }
.dashboard-metric--red > .material-symbols-outlined { background: var(--rose); color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, .95fr); gap: 22px; }
.dashboard-panel { border-radius: 8px; }
.dashboard-panel--wide { min-height: 380px; }
.dashboard-panel select { max-width: 180px; }
.line-chart { height: 340px; padding: 0; }
.line-chart svg { width: 100%; height: 100%; overflow: visible; background: linear-gradient(180deg, var(--panel), color-mix(in srgb, var(--panel-soft) 38%, var(--panel))); border-radius: 8px; }
.line-chart .chart-grid line { stroke: color-mix(in srgb, var(--line) 78%, transparent); stroke-width: 1; }
.line-chart .chart-axis { stroke: color-mix(in srgb, var(--muted) 70%, var(--line)); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.line-chart .chart-line { fill: none; stroke: var(--green); stroke-width: 3.2; vector-effect: non-scaling-stroke; }
.svg-chart-point circle {
  fill: var(--green);
  stroke: var(--panel);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}
.svg-chart-point rect { fill: transparent; }
.svg-chart-point:hover circle,
.svg-chart-point:focus circle { stroke-width: 3.5; filter: drop-shadow(0 4px 8px rgba(0,122,82,.28)); }
.axis-label,
.axis-title {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
  vector-effect: non-scaling-stroke;
}
.axis-label--x { text-anchor: middle; }
.axis-label--y { text-anchor: end; }
.axis-title { fill: var(--text); font-size: 12px; }
.axis-title--x { text-anchor: middle; }
.svg-tooltip-card {
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
.svg-tooltip-card rect {
  fill: var(--primary);
  stroke: color-mix(in srgb, white 18%, var(--primary));
  stroke-width: 1;
  filter: drop-shadow(0 8px 14px rgba(3, 22, 54, .22));
}
.svg-tooltip-card text {
  fill: white;
  font-size: 13px;
  font-weight: 900;
}
.svg-tooltip-card text.muted {
  fill: color-mix(in srgb, white 76%, var(--primary));
  font-size: 12px;
  font-weight: 750;
}
.svg-chart-point:hover .svg-tooltip-card,
.svg-chart-point:focus .svg-tooltip-card { opacity: 1; }
.chart-hover { position: relative; }
.chart-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 12;
  min-width: 138px;
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  white-space: nowrap;
  transition: opacity .16s ease, transform .16s ease;
}
.chart-tooltip strong { display: block; margin-bottom: 3px; color: white; font-size: 13px; }
.chart-point .chart-tooltip { bottom: calc(100% + 12px); }
.chart-hover:hover .chart-tooltip,
.chart-hover:focus .chart-tooltip,
.chart-point:hover .chart-tooltip,
.chart-point:focus .chart-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.dashboard-big { display: block; font-size: 38px; margin: 6px 0 2px; }
.donut {
  --value: 75;
  position: relative;
  width: 166px;
  aspect-ratio: 1;
  margin: 28px auto 18px;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--value) * 1%), color-mix(in srgb, var(--line) 65%, transparent) 0);
  display: grid;
  place-items: center;
}
.donut::before { content: ""; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--panel); }
.donut span { position: absolute; font-weight: 900; }
.legend { display: flex; gap: 18px; justify-content: center; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.dot--muted { background: color-mix(in srgb, var(--line) 75%, var(--muted)); }
.weekly-chart { height: 230px; display: flex; align-items: end; justify-content: space-around; gap: 18px; padding: 12px 24px; }
.weekly-chart div { flex: 1; max-width: 90px; display: grid; grid-template-rows: 1fr auto auto; align-items: end; gap: 8px; text-align: center; color: var(--muted); }
.weekly-chart i { display: block; min-height: 74px; border-radius: 8px 8px 0 0; background: color-mix(in srgb, var(--green) 92%, #16b8a9); }
.weekly-chart b { color: var(--text); font-size: 12px; }
.activity-feed { display: grid; padding: 12px 18px 18px; gap: 12px; }
.activity-feed__item { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; padding: 4px; border-radius: 8px; cursor: pointer; }
.activity-feed__item:hover { background: var(--panel-soft); }
.activity-feed__item > .material-symbols-outlined { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; }
.activity-feed__item .green { background: var(--mint); color: var(--green); }
.activity-feed__item .amber { background: var(--cream); color: var(--amber); }
.activity-feed__item .blue { background: #d8ecff; color: #0879d9; }
.activity-feed__item .red { background: var(--rose); color: var(--red); }
.activity-feed__item .neutral { background: var(--panel-soft); color: var(--muted); }
.activity-feed__item strong,
.activity-feed__item small { display: block; }
.activity-feed__item small,
.activity-feed__item em { color: var(--muted); font-style: normal; }
.activity-feed__item .activity-actor { color: var(--green); font-weight: 800; margin-top: 2px; }
.modal--activity-log { width: min(1120px, calc(100vw - 28px)); }
.activity-log { padding: 18px; display: grid; gap: 12px; max-height: min(70vh, 720px); overflow: auto; }
.activity-log-tools {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(150px, .7fr) minmax(150px, .7fr) 150px 150px auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}
.activity-log-tools .search-field input,
.activity-log-tools select,
.activity-log-tools input { min-height: 46px; border-radius: 8px; }
.activity-log-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
}
.activity-log-summary strong { color: var(--text); font-size: 24px; }
.activity-log-list { display: grid; gap: 10px; }
.activity-log__item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}
.activity-log__item > .material-symbols-outlined {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--panel-soft);
  color: var(--blue);
}
.activity-log__item strong,
.activity-log__item p,
.activity-log__item time {
  display: block;
  margin: 0;
}
.activity-log__item p,
.activity-log__item small,
.activity-log__item time { color: var(--muted); }
.activity-log__item small { margin-top: 4px; font-weight: 800; color: var(--green); }

@media (max-width: 980px) {
  .activity-log-tools { grid-template-columns: 1fr 1fr; }
}

.access-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
}
.access-policy-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  display: grid;
  gap: 14px;
}
.access-policy-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.access-policy-card header strong,
.access-policy-card header small { display: block; }
.access-policy-card header small { color: var(--muted); margin-top: 4px; }
.access-policy-card b { display: block; margin-bottom: 8px; }
.access-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
}
.access-checks--actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: none;
}
.access-checks label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
}
.access-module-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
}
.access-module-actions summary {
  cursor: pointer;
  font-weight: 900;
}
.access-module-action-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.access-module-action-row:first-of-type { margin-top: 10px; }
.access-module-action-row > span {
  font-weight: 900;
}
.access-module-action-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.access-module-action-row label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-weight: 800;
}
.security-workspace {
  display: grid;
  gap: 16px;
}
.security-tabs {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.security-tabs button {
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.security-tabs button .material-symbols-outlined {
  font-size: 22px;
  color: inherit;
}
.security-tabs button:hover {
  background: var(--panel-soft);
  color: var(--text);
}
.security-tabs button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 88, 221, 0.22);
}
.security-tabs button.active:hover {
  background: var(--blue);
  color: #fff;
}
.role-registry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.role-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  display: grid;
  gap: 14px;
}
.role-summary-card__main {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}
.role-summary-card__main > .material-symbols-outlined {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--panel-soft);
  color: var(--blue);
}
.role-summary-card h3 {
  margin: 0;
  font-size: 20px;
}
.role-summary-card p {
  margin: 4px 0 0;
  color: var(--muted);
}
.role-summary-card__chips,
.role-summary-card__modules,
.role-summary-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.role-summary-card__modules span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.role-summary-card__actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.modal--access-role {
  width: min(1180px, calc(100vw - 32px));
}
.access-role-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
  overflow: auto;
}
.access-role-editor .full,
.access-editor-section.full {
  grid-column: 1 / -1;
}
.access-editor-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}
.access-editor-section h3 {
  margin: 0 0 12px;
}
.access-checks--compact {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  max-height: 260px;
}
.access-role-view {
  padding: 22px;
  display: grid;
  gap: 16px;
}
.modal--app-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
}
.app-dialog {
  display: grid;
  max-height: min(760px, calc(100vh - 32px));
}
.app-dialog__head,
.app-dialog__footer {
  padding: 20px 22px;
  border-color: var(--line);
}
.app-dialog__head {
  border-bottom: 1px solid var(--line);
}
.app-dialog__head h2 {
  margin: 4px 0 0;
}
.app-dialog__head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.app-dialog__body {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow: auto;
}
.app-dialog__field {
  display: grid;
  gap: 8px;
  margin: 0;
  font-weight: 900;
}
.app-dialog__field--full {
  grid-column: 1 / -1;
}
.app-dialog__field small {
  color: var(--muted);
  font-weight: 700;
}
.app-dialog__footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.role-dashboard .dashboard-grid {
  align-items: stretch;
}
.student-subject-list {
  display: grid;
  gap: 12px;
}
.student-subject-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 2fr) 64px 48px;
  gap: 12px;
  align-items: center;
}
.student-subject-list span,
.student-subject-list strong,
.student-subject-list em {
  font-weight: 900;
}
.student-subject-list i {
  height: 12px;
  border-radius: 999px;
  background: var(--panel-soft);
  overflow: hidden;
}
.student-subject-list b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}
.portal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.portal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 16px;
}
.portal-card .material-symbols-outlined {
  color: var(--blue);
  margin-bottom: 10px;
}
.portal-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.portal-card p {
  margin: 0;
  color: var(--muted);
}
.learner-report-page {
  display: grid;
  gap: 16px;
}
.learner-report-list {
  display: grid;
  gap: 18px;
}
.learner-report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}
.learner-report-card > header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}
.learner-report-card h3 {
  margin: 2px 0 4px;
  font-size: 24px;
}
.learner-report-card p,
.learner-report-card small {
  color: var(--muted);
}
.learner-report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.learner-report-metrics span,
.learner-report-remarks > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}
.learner-report-metrics strong,
.learner-report-metrics small {
  display: block;
}
.learner-report-remarks {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 12px;
  padding: 16px 18px 18px;
}
.learner-report-remarks p {
  margin: 4px 0 0;
  color: var(--text);
}
.markbook-lock-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.markbook-lock-note .material-symbols-outlined {
  color: var(--blue);
}
.markbook-lock-note strong,
.markbook-lock-note small {
  display: block;
}
.markbook-lock-note p {
  margin: 4px 0;
  color: var(--muted);
}
.markbook-table input[readonly] {
  cursor: not-allowed;
  opacity: .82;
  background: color-mix(in srgb, var(--panel-soft) 70%, transparent);
}
@media (max-width: 980px) {
  .learner-report-card > header,
  .learner-report-remarks {
    grid-template-columns: 1fr;
  }
  .learner-report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.transport-workspace { display: grid; gap: 24px; }
.transport-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 10%, var(--panel)), var(--panel));
  padding: 24px;
}
.transport-hero h2 { margin: 4px 0 6px; font-size: 34px; }
.transport-hero p { margin: 0; color: var(--muted); max-width: 760px; }
.transport-metric { align-items: center; }
.transport-metric em { display: block; color: var(--muted); font-style: normal; margin-top: 3px; }
.transport-metric--green span { background: var(--mint); color: var(--green); }
.transport-metric--blue span { background: #d8ecff; color: #0879d9; }
.transport-metric--amber span { background: var(--cream); color: var(--amber); }
.transport-metric--red span { background: var(--rose); color: var(--red); }
.transport-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 6px;
}
.transport-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}
.transport-tabs button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
}
.transport-management-card .card__body { background: var(--panel-soft); }
.transport-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
}
.transport-management-grid--drivers { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.transport-management-item {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  min-width: 0;
}
.transport-management-item > div:first-child strong,
.transport-management-item > div:first-child small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.transport-management-item > div:first-child small { color: var(--muted); margin-top: 4px; }
.transport-management-item p { margin: 0; color: var(--muted); line-height: 1.45; }
.transport-management-item dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.transport-management-item dl div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}
.transport-management-item dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.transport-management-item dd {
  margin: 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}
.transport-assignment-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 6%, var(--panel));
  padding: 14px;
  display: grid;
  gap: 8px;
}
.transport-assignment-note strong,
.transport-assignment-note span { display: block; }
.transport-assignment-note span { color: var(--muted); }
.hostel-workspace {
  display: grid;
  gap: 18px;
}
.hostel-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 12%, var(--panel)), var(--panel));
  padding: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.hostel-hero h2 {
  margin: 4px 0;
  font-size: 30px;
}
.hostel-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}
.hostel-tabs {
  width: fit-content;
  max-width: 100%;
}
.hostel-toolbar {
  align-items: flex-start;
}
.hostel-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.hostel-room-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.hostel-room-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-soft);
}
.hostel-room-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hostel-room-card h3 {
  margin: 0;
  font-size: 28px;
}
.hostel-room-card p {
  margin: 0;
  display: grid;
  gap: 3px;
}
.hostel-room-card p span {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.hostel-room-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.hostel-room-meta span {
  color: var(--muted);
  font-size: 13px;
}
.hostel-room-meta strong {
  overflow-wrap: anywhere;
}
.hostel-maintenance-list {
  display: grid;
  gap: 12px;
}
.hostel-maintenance-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}
.hostel-maintenance-card > span {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 14%, var(--panel-soft));
}
.hostel-maintenance-card p {
  margin: 6px 0 0;
  color: var(--muted);
}
.hostel-maintenance-card small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.transport-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 24px;
  align-items: stretch;
}
.transport-grid--bottom { grid-template-columns: minmax(0, 1fr) minmax(360px, .55fr); }
.transport-map-card,
.transport-detail-card { min-height: 430px; min-width: 0; overflow: hidden; }
.transport-map-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.transport-map-card .card__body {
  padding: 0;
  min-height: 0;
  display: grid;
}
.transport-detail-card .card__body { overflow: auto; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 900;
}
.live-badge i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 13%, transparent);
}
.transport-map {
  position: relative;
  min-height: clamp(430px, 54vh, 660px);
  display: grid;
}
.transport-map svg {
  width: 100%;
  height: 100%;
  min-height: clamp(430px, 54vh, 660px);
  display: block;
  border: 0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
.map-controls {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
  display: inline-grid;
  grid-template-columns: 36px auto 36px 36px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
  padding: 6px;
}
.map-controls button {
  width: 36px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--text);
  display: grid;
  place-items: center;
}
.map-controls button:disabled { opacity: .45; cursor: not-allowed; }
.map-controls strong { min-width: 46px; text-align: center; font-size: 13px; }
.map-road {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 26%, transparent);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 3 4;
}
.map-road--secondary { stroke: color-mix(in srgb, var(--blue) 28%, transparent); stroke-width: 2; }
.map-route-line {
  stroke: var(--green);
  stroke-width: 1.5;
  stroke-dasharray: 2 2;
}
.map-campus { fill: var(--blue); stroke: white; stroke-width: 1; }
.map-bus { cursor: pointer; }
.map-bus circle { fill: var(--amber); stroke: white; stroke-width: 1.3; }
.map-bus.active circle { fill: var(--green); filter: drop-shadow(0 8px 12px rgba(0,122,82,.25)); }
.map-label {
  fill: var(--text);
  font-size: 2.15px;
  font-weight: 850;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: color-mix(in srgb, var(--panel) 88%, white);
  stroke-width: .75px;
  pointer-events: none;
}
.map-label--campus { font-size: 2px; font-weight: 900; }
.map-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow);
  padding: 12px 14px;
}
.map-status span { color: var(--muted); }
.transport-vehicle-panel { display: grid; gap: 14px; min-width: 0; }
.transport-driver {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  min-width: 0;
}
.transport-driver > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green);
}
.transport-driver strong,
.transport-driver small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.transport-driver small { color: var(--muted); margin-top: 3px; }
.transport-progress { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.transport-progress span { color: var(--muted); }
.transport-progress strong { min-width: 0; overflow-wrap: anywhere; }
.transport-progress i {
  grid-column: 1 / -1;
  height: 12px;
  border-radius: 999px;
  background: var(--panel-soft);
  overflow: hidden;
}
.transport-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #16b8a9);
}
.transport-progress b.danger { background: var(--red); }
.transport-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.transport-facts p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
  min-width: 0;
}
.transport-facts span { display: block; color: var(--muted); margin-bottom: 4px; }
.transport-facts strong { overflow-wrap: anywhere; }
.transport-vehicle-panel > .row-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.transport-vehicle-panel > .row-actions .btn {
  min-width: 0;
  width: 100%;
  justify-content: center;
  padding-inline: 10px;
}
.transport-vehicle-panel > .row-actions .btn .material-symbols-outlined { flex: 0 0 auto; }

@media (max-width: 1320px) {
  .transport-vehicle-panel > .row-actions { grid-template-columns: 1fr; }
  .transport-facts { grid-template-columns: 1fr; }
}
.transport-toolbar {
  align-items: center;
  gap: 18px;
}
.transport-toolbar > div:first-child {
  min-width: 220px;
}
.transport-filters {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(190px, 230px) minmax(170px, 210px);
  gap: 12px;
  align-items: center;
}
.transport-filters .search-field,
.transport-filters select {
  width: 100%;
  min-height: 50px;
}
.transport-route-list { display: grid; gap: 10px; }
.transport-route-card {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(120px, .45fr) minmax(150px, .7fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  cursor: pointer;
}
.transport-route-card.active {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, var(--panel));
}
.transport-route-card small { display: block; color: var(--muted); margin-top: 4px; }
.transport-student-list { display: grid; gap: 10px; max-height: 390px; overflow: auto; }
.student-mini-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  padding: 12px;
}
.student-mini-row > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green);
  font-weight: 900;
}
.student-mini-row small,
.student-mini-row em { color: var(--muted); font-style: normal; }
.transport-safety { display: grid; gap: 10px; }
.transport-safety div {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}
.transport-safety span { color: var(--amber); }

@media (max-width: 1100px) {
  .transport-grid,
  .transport-grid--bottom { grid-template-columns: 1fr; }
  .transport-route-card { grid-template-columns: 1fr; }
  .transport-hero { align-items: flex-start; flex-direction: column; }
  .transport-toolbar { align-items: flex-start; }
  .transport-filters { grid-template-columns: 1fr; width: 100%; }
  .transport-management-item dl { grid-template-columns: 1fr; }
}
.mini-metric { display: flex; align-items: center; gap: 16px; padding: 22px; }
.mini-metric > .material-symbols-outlined { background: var(--panel-soft); color: var(--muted); }
.mini-metric strong { display: block; font-size: 24px; }
.link-button { border: 0; background: transparent; color: var(--green); font-weight: 850; }
.academic-tabs { width: max-content; }
.academic-tab-panel { display: grid; gap: 20px; overflow-x: auto; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); }
.chip-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  background: var(--panel);
  color: var(--text);
  font-weight: 750;
}
.chip-row button.active { background: var(--primary); color: white; border-color: var(--primary); }
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}
.calendar-toolbar > strong { min-width: 160px; font-size: 18px; }
.calendar-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.calendar-strip button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  min-width: 72px;
  min-height: 54px;
  display: grid;
  place-items: center;
  font-weight: 850;
}
.calendar-strip button span { color: var(--muted); font-size: 12px; }
.calendar-strip button.active { background: var(--blue); border-color: var(--blue); color: white; }
.calendar-strip button.active span { color: white; }
.timetable-wrap { border-radius: 8px; }
.timetable-table { min-width: 1260px; }
.timetable-table--weekly { min-width: 1060px; table-layout: fixed; }
.timetable-table--weekly th:first-child,
.timetable-table--weekly td:first-child { width: 146px; }
.timetable-period-cell {
  vertical-align: middle;
  white-space: nowrap;
}
.timetable-period-cell strong,
.timetable-period-cell small { display: block; }
.timetable-period-cell small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}
.timetable-table th small { display: block; margin-top: 4px; text-transform: none; letter-spacing: 0; }
.timetable-table td { height: 96px; }
.lesson-block {
  width: 100%;
  border: 0;
  text-align: left;
  color: inherit;
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid transparent;
}
.lesson-block strong,
.lesson-block small { display: block; }
.lesson-block--green { background: #d8f8e8; color: #006c50; border-color: #9fe8c7; }
.lesson-block--amber { background: #fff4c9; color: #9b4e00; border-color: #f7d86b; }
.lesson-block--red { background: #ffe1e5; color: #a6112e; border-color: #ffc1cb; }
.lesson-block--blue { background: #e4f3ff; color: #086aa9; border-color: #bfe3ff; }
.lesson-block--purple { background: #efe3ff; color: #6a25b8; border-color: #dfc5ff; }
.lesson-block--muted { background: var(--panel-soft); color: var(--muted); text-align: center; }
.lesson-empty {
  width: 100%;
  min-height: 72px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-soft) 46%, transparent);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 850;
}
.lesson-empty:hover { border-color: var(--green); color: var(--green); }
.weekly-lesson {
  width: 100%;
  min-height: calc((96px * var(--week-span, 1)) - 26px);
  height: 100%;
  border-width: 1px;
  border-style: solid;
  border-radius: 8px;
  padding: 10px 10px 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.weekly-lesson strong,
.weekly-lesson small {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}
.weekly-lesson strong {
  font-size: 14px;
  line-height: 1.12;
}
.weekly-lesson small {
  margin-top: 3px;
  opacity: .78;
  font-size: 12px;
  line-height: 1.25;
}
.weekly-lesson:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 34%, transparent); }
.weekly-lesson .timetable-delete-inline {
  width: 36px;
  height: 36px;
  margin-top: 0;
  align-self: center;
}
.weekly-lesson-cell {
  vertical-align: stretch;
  padding-top: 8px;
  padding-bottom: 8px;
  min-width: 0;
}
.weekly-lesson-cell .weekly-lesson {
  min-height: calc((96px * var(--week-span, 1)) - 16px);
}
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(118px, 1fr)); gap: 12px; }
.month-grid--calendar { min-width: 860px; }
.month-grid__head {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.month-grid__head.weekend {
  background: #fff5e6;
  border-color: #f5d29a;
  color: #9b4e00;
}
.month-grid article {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
}
.month-grid article > strong { font-size: 20px; }
.month-grid article span { border-radius: 999px; background: var(--mint); color: var(--green); padding: 6px 10px; font-size: 12px; font-weight: 850; }
.month-grid article small { color: var(--muted); }
.month-grid article.muted { opacity: .45; }
.month-grid article.weekend {
  background: #fffaf2;
  border-color: #f4d7aa;
}
.month-grid article.weekend > strong,
.month-grid article.weekend > small { color: #9b4e00; }
.month-lesson {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  text-align: left;
  font-size: 12px;
  font-weight: 850;
}
.month-lesson--green { background: var(--mint); color: var(--green); }
.month-lesson--amber { background: var(--cream); color: #9b4e00; }
.month-lesson--red { background: var(--rose); color: var(--red); }
.month-lesson--blue { background: #e4f3ff; color: #086aa9; }
.month-lesson--purple { background: #efe3ff; color: #6a25b8; }
.month-lesson:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 34%, transparent); }
.timetable-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.daily-scheduler {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-auto-rows: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.daily-scheduler__time,
.daily-scheduler__slot {
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}
.daily-scheduler__time { background: var(--panel-soft); color: var(--muted); font-weight: 850; }
.daily-scheduler__slot { min-height: 84px; }
.daily-scheduler__slot.has-lesson { padding: 8px; }
.blocked-slot,
.break-slot {
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--panel-soft) 85%, transparent) 0 10px, color-mix(in srgb, var(--panel-strong) 70%, transparent) 10px 20px);
  color: var(--muted);
  text-align: center;
  font-weight: 900;
  letter-spacing: 0;
}
.break-slot {
  display: grid;
  align-content: center;
  gap: 4px;
  border-left: 4px solid var(--amber);
}
.break-slot small { color: var(--muted); font-weight: 750; }
.daily-lesson {
  height: 100%;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.daily-lesson:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 34%, transparent); }
.daily-lesson strong,
.daily-lesson small { display: block; }
.daily-lesson small { margin-top: 4px; opacity: .78; }
.curriculum-table { min-width: 960px; }
.progress-line { width: min(340px, 100%); height: 10px; border-radius: 999px; background: var(--panel-soft); overflow: hidden; }
.progress-line i { display: block; height: 100%; border-radius: inherit; }
.progress-line--green i { background: var(--green); }
.progress-line--amber i { background: #f59e0b; }
.progress-line--red i { background: var(--red); }
.subject-search { max-width: 500px; }
.subject-card-grid { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 20px; }
.subject-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 26px;
  display: grid;
  gap: 18px;
}
.subject-card__head { display: flex; justify-content: space-between; align-items: center; }
.subject-card__icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 10px; }
.subject-card__icon--green { background: var(--mint); color: var(--green); }
.subject-card__icon--amber { background: var(--cream); color: var(--amber); }
.subject-card__icon--blue { background: #d8ecff; color: #0879d9; }
.subject-card__icon--red { background: var(--rose); color: var(--red); }
.subject-card h3 { margin: 0; font-size: 22px; }
.subject-card p { margin: -10px 0 0; color: var(--muted); }
.subject-card__meta { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.subject-card__meta span { color: var(--muted); }
.class-assignment-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}
.class-assignment-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.class-assignment-panel__head strong,
.class-assignment-panel__head small { display: block; }
.class-assignment-panel__head small { color: var(--muted); margin-top: 4px; }
.class-assignment-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) 120px 48px;
  gap: 10px;
  align-items: center;
}
.class-assignment-grid > strong {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.class-assignment-row {
  display: contents;
}
.class-assignment-row select,
.class-assignment-row input {
  min-width: 0;
}
.class-assignment-remove {
  color: var(--red);
  justify-self: center;
}
.syllabus-grid,
.lms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.syllabus-card,
.lms-classroom-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  min-width: 0;
  min-height: 330px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 16px;
  overflow: hidden;
}
.syllabus-card__head,
.lms-classroom-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.syllabus-card__head strong,
.syllabus-card__head small { display: block; }
.syllabus-card__head small,
.syllabus-card p,
.lms-classroom-card p { color: var(--muted); }
.syllabus-card h3,
.lms-classroom-card h3 { margin: 0; }
.lms-classroom-card__body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}
.lms-classroom-card__body h3,
.lms-classroom-card__body p {
  overflow-wrap: anywhere;
}
.lms-classroom-card__body p { margin: 0; line-height: 1.45; }
.syllabus-card p { margin: 0; line-height: 1.45; }
.syllabus-card__sections {
  display: grid;
  gap: 8px;
}
.syllabus-card__sections span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
  color: var(--muted);
  line-height: 1.35;
}
.syllabus-card__sections b {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}
.lms-classroom-card__head .material-symbols-outlined {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--mint);
  color: var(--green);
}
.lms-classroom-card__meta {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.lms-classroom-card__meta span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px 12px;
  color: var(--muted);
  display: grid;
  gap: 3px;
  min-width: 0;
}
.lms-classroom-card__meta b {
  color: var(--text);
  font-size: 22px;
}
.lms-classroom-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.lms-classroom-card__actions .btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding: 0 10px;
}
.lms-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.lms-tabs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 12px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.lms-tabs button .material-symbols-outlined {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
}
.lms-tabs button small {
  min-width: 32px;
  min-height: 28px;
  border-radius: 999px;
  background: var(--panel-soft);
  display: grid;
  place-items: center;
  font-weight: 850;
}
.lms-tabs button.active {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, var(--panel));
  box-shadow: inset 0 -3px 0 var(--blue);
}
.lms-tabs button.active .material-symbols-outlined,
.lms-tabs button.active small {
  background: var(--blue);
  color: white;
}
.lms-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(160px, 220px));
  gap: 12px;
  margin-top: 16px;
}
.lms-resource-list {
  display: grid;
  gap: 12px;
}
.lms-resource-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
.lms-resource-card > .material-symbols-outlined {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--mint);
  color: var(--green);
}
.lms-resource-card strong,
.lms-resource-card small { display: block; }
.lms-resource-card small { color: var(--muted); margin-top: 3px; }
.finance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 20px;
}
.finance-layout--single {
  grid-template-columns: minmax(0, 1fr);
}
.finance-main-card { min-width: 0; }
.finance-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 210px));
  gap: 12px;
  margin-bottom: 16px;
}
.finance-table { min-width: 1040px; }
.finance-table td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.finance-table th:last-child,
.finance-table td:last-child {
  width: 150px;
  text-align: right;
}
.finance-table .action-menu summary {
  width: auto;
  height: 40px;
  display: inline-flex;
  gap: 6px;
  padding: 0 12px;
  border-radius: 8px;
}
.action-menu {
  position: relative;
  display: inline-block;
  text-align: left;
}
.action-menu summary {
  list-style: none;
  cursor: pointer;
}
.action-menu summary::-webkit-details-marker {
  display: none;
}
.action-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.action-menu__panel button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  text-align: left;
}
.action-menu__panel button:hover {
  background: var(--panel-soft);
}
.action-menu__panel button.danger {
  color: var(--red);
}
.modal--invoice {
  width: min(960px, calc(100vw - 40px));
}
.invoice-preview-wrap {
  display: block;
  padding: 22px 28px;
  overflow: auto;
}
.invoice-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.invoice-preview__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}
.invoice-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.invoice-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--primary);
  font-weight: 950;
}
.invoice-brand strong,
.invoice-brand small,
.invoice-status small,
.invoice-status strong {
  display: block;
}
.invoice-brand small,
.invoice-status small {
  color: var(--muted);
}
.invoice-status {
  text-align: right;
}
.invoice-preview__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 22px 0;
}
.invoice-preview__meta > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--panel-soft);
}
.invoice-preview__meta small,
.invoice-preview__meta span {
  display: block;
  color: var(--muted);
}
.invoice-preview__meta strong {
  display: block;
  margin: 6px 0 4px;
}
.invoice-lines {
  width: calc(100% - 44px);
  margin: 22px;
  table-layout: fixed;
  border-collapse: collapse;
}
.invoice-lines th,
.invoice-lines td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.invoice-lines th:not(:first-child),
.invoice-lines td:not(:first-child) {
  width: 18%;
  text-align: right;
  white-space: nowrap;
}
.invoice-lines th:first-child,
.invoice-lines td:first-child {
  width: 46%;
}
.invoice-lines th {
  background: var(--panel-soft);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}
.invoice-payments {
  margin: 0 22px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.invoice-payments h3 {
  margin: 0;
  padding: 12px 14px;
  background: var(--panel-soft);
  font-size: 16px;
}
.invoice-payments div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
}
.invoice-payments p {
  margin: 0;
  padding: 14px;
  color: var(--muted);
}
.invoice-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 22px 22px;
  padding: 14px;
  border-radius: 8px;
  background: var(--panel-soft);
}
.finance-table tbody tr[data-finance-row] {
  cursor: pointer;
}
.finance-table tbody tr[data-finance-row]:hover {
  background: color-mix(in srgb, var(--blue) 5%, var(--panel));
}
.modal--billing {
  width: min(1040px, calc(100vw - 40px));
}
.billing-builder {
  display: grid;
  gap: 16px;
  padding: 24px 32px;
  overflow: auto;
}
.billing-builder__settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.billing-builder__panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}
.billing-builder__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}
.billing-builder__head h3,
.billing-builder__head p {
  margin: 0;
}
.billing-builder__head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}
.billing-items {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.billing-item {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr) minmax(120px, 180px) 46px;
  gap: 10px;
  align-items: center;
}
.billing-item input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--text);
}
.billing-check {
  display: grid;
  place-items: center;
}
.billing-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.billing-check span {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.billing-check input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: inset 0 0 0 5px var(--panel);
}
.billing-preview {
  max-height: 280px;
  overflow: auto;
}
.billing-preview > div {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, .8fr) minmax(120px, .8fr) minmax(120px, .8fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.billing-preview span strong,
.billing-preview span small {
  display: block;
}
.billing-preview span small,
.billing-preview em {
  color: var(--muted);
  font-style: normal;
}
.danger-text {
  color: var(--red) !important;
  font-weight: 850;
}
.billing-workspace {
  display: grid;
  gap: 18px;
}
.billing-workspace__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.billing-workspace__head h2 {
  margin: 14px 0 4px;
  font-size: 34px;
}
.billing-workspace__head p {
  margin: 0;
  color: var(--muted);
}
.billing-global .card__body {
  display: grid;
  gap: 16px;
}
.billing-class-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.billing-class-checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-weight: 850;
}
.billing-class-checks input {
  accent-color: var(--blue);
}
.billing-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.billing-controls .full {
  grid-column: 1 / -1;
}
.class-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.class-tabs button {
  flex: 0 0 auto;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  display: grid;
  gap: 3px;
  background: var(--panel);
  color: var(--text);
  font-weight: 900;
}
.class-tabs button small {
  color: var(--muted);
  font-weight: 700;
}
.class-tabs button.active {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 14%, var(--panel));
  box-shadow: inset 0 0 0 1px var(--blue);
}
.billing-class-grid {
  display: grid;
  grid-template-columns: minmax(340px, .8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}
.billing-snapshot-table {
  min-width: 760px;
}
.billing-snapshot-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
@media (max-width: 920px) {
  .billing-builder__settings,
  .billing-preview > div {
    grid-template-columns: 1fr 1fr;
  }
  .billing-item {
    grid-template-columns: 38px 1fr;
  }
  .billing-item input[data-bill-item-amount],
  .billing-item button {
    grid-column: 2;
  }
  .billing-workspace__head,
  .billing-class-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
  .billing-controls {
    grid-template-columns: 1fr 1fr;
  }
  .exam-workspace__head,
  .exam-layout,
  .exam-layout--markbook,
  .exam-layout--remarks,
  .exam-filters,
  .smart-exam-builder {
    grid-template-columns: 1fr;
  }
  .exam-workspace__head {
    align-items: stretch;
    flex-direction: column;
  }
  .exam-tabs {
    width: 100%;
  }
  .exam-tabs button {
    flex: 1 1 140px;
  }
  .exam-summary-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .remarks-page-intro,
  .remarks-student-summary,
  .remarks-modal-layout,
  .remarks-modal-hero,
  .exam-context-row,
  .remarks-entry-grid {
    grid-template-columns: 1fr;
  }
  .remarks-modal-hero {
    display: grid;
    align-items: stretch;
  }
  .communication-head,
  .communication-grid,
  .message-compose,
  .message-template-strip {
    grid-template-columns: 1fr;
  }
  .recipient-summary {
    grid-template-columns: 1fr;
  }
  .communication-head {
    align-items: stretch;
    flex-direction: column;
  }
  .communication-tabs {
    width: 100%;
  }
  .communication-tabs button {
    flex: 1 1 120px;
  }
  .messaging-shell,
  .message-modal-grid,
  .message-compose-fields,
  .message-search > div,
  .message-delivery-card {
    grid-template-columns: 1fr;
  }
  .message-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .messaging-shell {
    min-height: auto;
  }
  .message-chat__head {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .message-chat__actions {
    grid-column: 1 / -1;
  }
}
.finance-side {
  display: grid;
  gap: 20px;
  align-content: start;
}
.finance-channel-list,
.finance-payment-list {
  display: grid;
  gap: 12px;
}
.finance-channel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 14px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px 12px;
  text-align: left;
}
.finance-channel .material-symbols-outlined {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 12%, var(--panel-soft));
  color: var(--blue);
}
.finance-channel small { color: var(--muted); line-height: 1.35; }
.finance-payment {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.finance-payment .material-symbols-outlined {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--mint);
  color: var(--green);
}
.finance-payment strong,
.finance-payment small { display: block; }
.finance-payment small,
.finance-payment em { color: var(--muted); }
.modal-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 12px;
}
.photo-upload {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-soft) 50%, transparent);
}
.photo-upload__row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.photo-upload input[type="file"] {
  padding: 9px;
  min-height: 46px;
  background: var(--panel);
}
.photo-upload small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 600;
}

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.feature {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}
.feature .material-symbols-outlined { color: var(--blue); }
.feature h3 { margin: 10px 0 6px; }
.feature p { color: var(--muted); margin: 0; line-height: 1.5; }
.report-workspace,
.portal-workspace,
.library-workspace {
  margin-top: 18px;
}
.report-tabs,
.portal-tabs,
.library-tabs {
  width: fit-content;
  margin-bottom: 16px;
}
.report-filters {
  margin-bottom: 16px;
}
.report-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.report-summary-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}
.report-summary-strip strong {
  display: block;
  font-size: 24px;
}
.report-summary-strip span {
  color: var(--muted);
}
.workflow-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.workflow-action {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.workflow-action:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(0, 81, 213, 0.08);
}
.workflow-action .material-symbols-outlined {
  grid-row: span 2;
  color: var(--blue);
}
.workflow-action strong {
  font-size: 22px;
  line-height: 1;
}
.workflow-action small {
  color: var(--muted);
}
.report-table,
.portal-table,
.library-table {
  min-width: 980px;
}
.report-table td small,
.portal-table td small,
.library-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.portal-actions {
  margin-top: 18px;
}

.modal {
  width: min(760px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0;
}
.modal::backdrop { background: rgba(3, 22, 54, 0.55); backdrop-filter: blur(4px); }
.modal form > header, .modal form > footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.modal form > footer { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; }
.modal h2 { margin: 4px 0 0; }
.form-grid { padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid .full { grid-column: 1 / -1; }
.searchable-select {
  position: relative;
  width: 100%;
}
.searchable-select__native {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.searchable-select__trigger {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: inherit;
  font-weight: 700;
  text-align: left;
}
.searchable-select__trigger span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.searchable-select__trigger .material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 22px;
  color: var(--muted);
}
.searchable-select.open .searchable-select__trigger {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent);
}
.searchable-select__dropdown {
  position: absolute;
  z-index: 80;
  inset-inline: 0;
  top: calc(100% + 6px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  gap: 8px;
}
.searchable-select.open .searchable-select__dropdown {
  display: grid;
}
.searchable-select__dropdown[hidden] {
  display: none !important;
}
.searchable-select__search {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}
.searchable-select__search:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
}
.searchable-select__list {
  max-height: 230px;
  overflow: auto;
  display: grid;
  gap: 4px;
}
.searchable-select__list button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
}
.searchable-select__list button:hover,
.searchable-select__list button.active {
  background: color-mix(in srgb, var(--blue) 10%, var(--panel));
  color: var(--blue);
}
.searchable-select__list p {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
}
.modal--record-view { width: min(900px, calc(100vw - 28px)); }
.record-view { padding: 18px; }
.record-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.record-view-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
  min-width: 0;
}
.record-view-item small {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}
.record-view-item strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.modal.modal--message {
  width: min(1120px, calc(100vw - 36px));
  max-height: calc(100vh - 40px);
}
.modal.modal--message-view {
  width: min(940px, calc(100vw - 36px));
  max-height: calc(100vh - 40px);
}
.modal.modal--message form,
.modal.modal--message-view form {
  max-height: calc(100vh - 42px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.modal.modal--message #recordFields,
.modal.modal--message-view #recordFields {
  overflow: auto;
}
.modal.modal--message .message-template-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.modal.modal--message .message-template-card {
  min-width: 0;
}
.modal.modal--message .message-modal-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
}
.modal.modal--message .recipient-preview {
  max-height: 520px;
}
.timetable-period-picker {
  display: grid;
  gap: 10px;
}
.timetable-period-picker > span {
  font-weight: 850;
}
.timetable-period-picker > small {
  color: var(--muted);
}
.timetable-period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.timetable-period-grid label {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 2px 10px;
  align-items: center;
  cursor: pointer;
}
.timetable-period-grid label.active {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 9%, var(--panel));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 14%, transparent);
}
.timetable-period-grid input {
  width: 18px;
  height: 18px;
  grid-row: 1 / span 2;
}
.timetable-period-grid strong,
.timetable-period-grid small {
  min-width: 0;
}
.timetable-period-grid small {
  color: var(--muted);
  font-size: 13px;
}
.modal-error {
  border: 1px solid color-mix(in srgb, var(--red) 28%, var(--line));
  border-radius: 8px;
  background: var(--rose);
  color: var(--red);
  padding: 12px 14px;
  font-weight: 850;
}
.delete-choice-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}
.delete-choice-summary p { margin: 6px 0 0; color: var(--muted); }
.delete-choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  min-height: 96px;
  padding: 16px;
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.delete-choice .material-symbols-outlined {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--blue);
  grid-row: 1 / span 2;
}
.delete-choice strong,
.delete-choice small { display: block; }
.delete-choice strong,
.delete-choice small { grid-column: 2; min-width: 0; }
.delete-choice small { margin-top: 4px; color: var(--muted); line-height: 1.4; max-width: 56ch; }
.delete-choice:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-1px); }
.delete-choice--danger .material-symbols-outlined { background: var(--rose); color: var(--red); }
.timetable-delete-inline {
  margin-top: 6px;
  width: 36px;
  min-height: 36px;
  color: var(--red);
}
.break-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.break-settings-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
  display: grid;
  gap: 8px;
}
.break-settings-grid article strong { font-size: 15px; }
.break-settings-grid label { margin-top: 0; }
.muted-copy { color: var(--muted); margin: 4px 0; }
.toast {
  position: fixed;
  right: 18px;
  top: 88px;
  z-index: 80;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  font-weight: 750;
}
.toast.show { opacity: 1; transform: translateY(0); }
.bottom-nav { display: none; }

@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .dashboard-grid { grid-template-columns: 1fr; }
  .topbar__search { display: none; }
  .profile-layout, .academic-layout { grid-template-columns: 1fr; }
  .finance-layout { grid-template-columns: 1fr; }
  .finance-filters { grid-template-columns: 1fr 1fr; }
  .subject-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-cover__body { align-items: flex-start; flex-wrap: wrap; padding-top: 0; }
  .student-cover__stats { width: 100%; margin-left: 0; justify-content: space-between; }
}
@media (max-width: 820px) {
  .mobile-only { display: inline-flex; }
  .auth { grid-template-columns: 1fr; }
  .auth__story { min-height: 42vh; padding: 24px; }
  .auth__stats { grid-template-columns: 1fr; }
  .shell { padding-left: 0; padding-bottom: 76px; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .workspace { padding: 18px; }
  .topbar { padding: 0 12px; }
  .brand small, .topbar__actions select { display: none; }
  .page-head { align-items: stretch; flex-direction: column; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .student-filters { grid-template-columns: 1fr; }
  .finance-filters,
  .lms-filters { grid-template-columns: 1fr; }
  .transport-grid,
  .transport-grid--bottom { grid-template-columns: 1fr; }
  .hostel-hero,
  .hostel-toolbar { align-items: stretch; flex-direction: column; }
  .hostel-tabs { width: 100%; overflow-x: auto; }
  .hostel-tabs button { flex: 1 0 auto; }
  .hostel-maintenance-card { grid-template-columns: 40px minmax(0, 1fr); }
  .hostel-maintenance-card > div:last-child { grid-column: 1 / -1; }
  .dashboard-title, .student-management__head { align-items: stretch; flex-direction: column; }
  .subject-card-grid { grid-template-columns: 1fr; }
  .daily-scheduler { grid-template-columns: 1fr; }
  .daily-scheduler__time { display: none; }
  .academic-tabs { width: 100%; }
  .student-page__top, .academic-profile-head { align-items: stretch; flex-direction: column; }
  .student-page__tabs { width: 100%; }
  .student-page__tabs button { flex: 1; justify-content: center; }
  .info-grid, .academic-metrics, .document-grid, .review-grid { grid-template-columns: 1fr; }
  .form-grid,
  .break-settings-grid { grid-template-columns: 1fr; }
  .class-assignment-grid { grid-template-columns: 1fr; }
  .class-assignment-grid > strong { display: none; }
  .class-assignment-row { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 44;
    display: flex;
    justify-content: space-around;
    align-items: center;
    min-height: 68px;
    background: var(--panel);
    border-top: 1px solid var(--line);
  }
  .bottom-nav button {
    border: 0;
    background: transparent;
    color: var(--muted);
    display: grid;
    justify-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 800;
  }
  .bottom-nav button.active { color: var(--blue); }
}
