:root {
  --chs-blue: #006cb5;
  --chs-gold: #ffcc29;
  --chs-red: #ed3237;
  --chs-green: #00a859;
  --chs-blue-deep: #0a3f71;
  --bg: #edf5fc;
  --surface: rgba(246, 252, 255, 0.9);
  --line: rgba(10, 63, 113, 0.14);
  --text: #1b2d45;
  --muted: #355274;
  --accent: var(--chs-blue);
  --accent-strong: var(--chs-blue-deep);
  --success: var(--chs-green);
  --warning: var(--chs-red);
  --shadow: 0 24px 60px rgba(10, 63, 113, 0.12);
  --radius: 24px;
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 76px;
  --app-viewport-height: 100vh;
  --toast-gap: 6px;
  --toast-max-width: 320px;
}

@supports (height: 100svh) {
  :root {
    --app-viewport-height: 100svh;
  }
}

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top, rgba(0, 108, 181, 0.12), transparent 42%),
    var(--bg);
}

.boot-splash-card {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  max-width: 28rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  text-align: center;
}

.boot-splash-title {
  margin: 0;
  font: 700 1.35rem/1.2 "Space Grotesk", "Inter", sans-serif;
  color: var(--chs-blue-deep);
}

.boot-splash-helper {
  margin: 0;
  max-width: 24rem;
}

/* Hide sidebar and topbar during session boot to prevent flash */
.shell:not(.session-ready) .sidebar,
.shell:not(.session-ready) .mobile-topbar,
.shell:not(.session-ready) .topbar {
  display: none;
}

/* During session boot, remove panel chrome so only the loader text is visible on page background */
.shell:not(.session-ready) .content {
  padding: 0;
}

.shell:not(.session-ready) .panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 0;
  padding: 0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(0, 108, 181, 0.22), transparent 34%),
    radial-gradient(circle at top right, rgba(0, 168, 89, 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 204, 41, 0.18), transparent 28%),
    linear-gradient(180deg, #f4f9ff 0%, var(--bg) 56%, #e3eef9 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: var(--app-viewport-height);
}

.mobile-topbar {
  display: none;
}

.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.mobile-brand span {
  color: var(--accent-strong);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.mobile-brand img {
  width: 42px;
  height: 42px;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(10, 63, 113, 0.18);
  background: #fff;
  flex: 0 0 auto;
}

.mobile-topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-left: auto;
  min-width: 0;
}

.mobile-session-bar {
  display: none;
  min-width: 0;
}

.mobile-session-pill {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  max-width: min(46vw, 12.5rem);
  gap: 0.3rem;
  padding: 0.22rem 0.28rem 0.22rem 0.8rem;
  border: 1px solid rgba(10, 63, 113, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(10, 63, 113, 0.08);
}

.mobile-session-pill-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.mobile-session-pill-action {
  min-width: 1.9rem;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(10, 63, 113, 0.12);
  background: rgba(241, 248, 255, 0.96);
  color: var(--accent-strong);
  font-size: 0.9rem;
  flex: 0 0 auto;
  box-shadow: none;
}

.mobile-session-pill-action:hover,
.mobile-session-pill-action:focus-visible {
  background: rgba(225, 238, 252, 0.98);
  border-color: rgba(10, 63, 113, 0.22);
  color: var(--accent-strong);
  transform: none;
}

.mobile-menu-toggle {
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.mobile-menu-toggle i {
  line-height: 1;
}
.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: none;
}

.mobile-menu-backdrop {
  display: none;
}

.draft-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1800;
  background: rgba(11, 30, 52, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.draft-preview-modal {
  position: relative;
  width: 100vw;
  height: var(--app-viewport-height);
  background: #eef3f9;
  border: 0;
  border-radius: 22px;
  box-shadow: none;
  overflow: hidden;
}

.draft-preview-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(27, 45, 69, 0.5);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.draft-preview-close:hover {
  background: rgba(27, 45, 69, 0.7);
}

.draft-preview-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.draft-preview-body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #eef3f9;
  border-radius: inherit;
}

.draft-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  display: block;
  background: #eef3f9;
  border-radius: inherit;
}

body.draft-preview-open {
  overflow: hidden;
}

.shell.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.shell:not(.session-ready),
.shell.sidebar-collapsed:not(.session-ready) {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem 0.85rem;
  background: rgba(0, 108, 181, 0.08);
  border-right: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.brand h1,
.topbar h2,
.panel h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.brand h1 { font-size: 2rem; line-height: 1.1; }
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-copy {
  display: grid;
  gap: 0.5rem;
}

.brand-active-child {
  display: grid;
  gap: 0.45rem;
}

.brand-active-child[hidden] {
  display: none;
}

.parent-active-child-stack {
  display: grid;
  gap: 0.42rem;
}

.parent-active-child-stack--compact {
  gap: 0.38rem;
}

.brand-active-child .parent-active-child-chip {
  width: 100%;
  gap: 0.5rem;
  padding: 0.42rem 0.55rem 0.42rem 0.42rem;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 248, 255, 0.88));
  box-shadow: 0 10px 22px rgba(10, 63, 113, 0.12);
}

.brand-active-child .parent-coordinator-chip {
  width: 100%;
  padding: 0.42rem 0.55rem 0.42rem 0.42rem;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 248, 255, 0.88));
  box-shadow: 0 10px 22px rgba(10, 63, 113, 0.12);
}

.brand-active-child .parent-active-child-avatar {
  width: 2rem;
  height: 2rem;
  flex-basis: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(224, 238, 252, 0.92), rgba(202, 223, 246, 0.86));
  color: var(--accent-strong);
}

.brand-active-child .parent-active-child-avatar .student-registry-card-avatar {
  width: calc(100% - 0.32rem);
  height: calc(100% - 0.32rem);
  border: 0;
  background: rgba(255, 255, 255, 0.18);
}

.brand-active-child .parent-active-child-copy strong {
  font-size: 0.9rem;
}

.brand-active-child .parent-coordinator-chip-label {
  color: #5b7b9c;
}

.brand-active-child .parent-coordinator-chip-copy strong {
  color: #234c72;
}

.brand-scope-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.brand-scope-pills[hidden] {
  display: none;
}

.brand-scope-pill {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.5rem 0.72rem 0.56rem;
  border-radius: 16px;
  border: 1px solid rgba(10, 63, 113, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(225, 241, 255, 0.92));
  box-shadow: 0 10px 24px rgba(10, 63, 113, 0.08);
}

.brand-scope-pill--campus {
  background: linear-gradient(180deg, rgba(242, 255, 247, 0.96), rgba(216, 245, 228, 0.92));
}

.brand-scope-pill--class {
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.96), rgba(255, 236, 208, 0.92));
}

.brand-scope-pill--section {
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.96), rgba(216, 239, 255, 0.92));
}

.brand-scope-pill-label {
  color: #5b7b9c;
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-scope-pill-value {
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.1;
}

.sidebar-toggle {
  min-width: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
}

.master-data-repair-panel {
  margin-top: 0.5rem;
}

.master-data-repair-panel-head {
  align-items: start;
}

.master-data-repair-close {
  min-width: 2.2rem;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(10, 63, 113, 0.16);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-strong);
  font-size: 1.2rem;
  line-height: 1;
}

.master-data-repair-close:hover,
.master-data-repair-close:focus-visible {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(10, 63, 113, 0.28);
  transform: none;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.muted, .helper { color: var(--muted); }

.session-boot-banner {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  max-width: min(92vw, 760px);
  padding: 0.75rem 1.1rem;
  border: 1px dashed rgba(10, 63, 113, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-align: center;
  color: #204266;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(10, 63, 113, 0.12);
}

.nav { display: grid; gap: 0.5rem; }

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

@media (min-width: 1101px) {
  .nav a:hover,
  .nav .active {
    background: rgba(255, 250, 244, 0.78);
    border-color: var(--line);
    transform: translateX(4px);
  }
}

.nav-main {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  margin: -0.1rem 0 0.15rem 2.4rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(10, 63, 113, 0.12);
}

.nav-submenu-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  min-height: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav .nav-submenu-link {
  justify-content: flex-start;
}

.nav-submenu-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(0, 108, 181, 0.46);
  flex: 0 0 0.42rem;
}

@media (min-width: 1101px) {
  .nav-submenu-link:hover,
  .nav-submenu-link.active {
    background: rgba(255, 250, 244, 0.72);
    border-color: var(--line);
    color: var(--accent-strong);
    transform: translateX(4px);
  }
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(0, 108, 181, 0.14);
  color: var(--accent-strong);
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.nav-icon i {
  line-height: 1;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-caret {
  color: var(--muted);
  font-size: 0.95rem;
}

.shell.sidebar-collapsed .nav-submenu {
  display: none;
}

.status-card,
.panel,
.card,
.table-wrap,
.hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-card { padding: 0.95rem; }
.status-card h2 { margin-top: 0; font-size: 1rem; }
.status-card ul { margin: 0; padding-left: 1rem; color: var(--muted); line-height: 1.45; font-size: 0.92rem; }

.content { padding: 1rem; min-width: 0; }

.scroll-top-button {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(10, 63, 113, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0, 108, 181, 0.96), rgba(10, 63, 113, 0.96));
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(10, 63, 113, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 1140;
  opacity: 0;
  transform: translateY(0.65rem);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.scroll-top-button.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top-button:hover,
.scroll-top-button:focus-visible {
  background: linear-gradient(180deg, rgba(10, 63, 113, 0.98), rgba(0, 108, 181, 0.98));
  border-color: rgba(10, 63, 113, 0.34);
  color: #ffffff;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.session-bar,
.button-row,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.toast-position-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.25rem 0.2rem 0.7rem;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toast-position-select {
  min-width: 9.5rem;
  width: auto;
  padding: 0.38rem 1.8rem 0.38rem 0.65rem;
  border-radius: 999px;
  background: rgba(241, 248, 255, 0.96);
  font-size: 0.76rem;
  font-weight: 700;
}

.list-pager {
  justify-content: flex-end;
  margin-top: 0.55rem;
}

.checkbox-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.72);
}

.checkbox-row input {
  margin-top: 0.18rem;
}

.master-status-switch-field {
  gap: 0.55rem;
}

.master-status-switch-field > span:first-child {
  color: var(--muted);
  font-size: 0.84rem;
}

.master-status-switch-field-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
}

.master-status-switch-field-control input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.master-status-switch-field-control .student-status-toggle-track {
  background: #d74848;
}

.master-status-switch-field-control input:checked + .student-status-toggle-track {
  background: #1e9f57;
}

.master-status-switch-field-control input:checked + .student-status-toggle-track .student-status-toggle-thumb {
  transform: translateX(0.81rem);
}

.master-status-switch-field-copy {
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--text);
}

.master-status-switch-field-copy-off {
  display: none;
}

.master-status-switch-field-control input:not(:checked) ~ .master-status-switch-field-copy .master-status-switch-field-copy-on {
  display: none;
}

.master-status-switch-field-control input:not(:checked) ~ .master-status-switch-field-copy .master-status-switch-field-copy-off {
  display: inline;
  color: var(--muted);
}

.master-status-switch-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.master-status-switch-button:hover,
.master-status-switch-button:focus-visible {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.master-status-switch-button--active .student-status-toggle-track {
  background: #1e9f57;
}

.master-status-switch-button--inactive .student-status-toggle-track {
  background: #d74848;
}

.master-status-switch-button--active .student-status-toggle-thumb {
  transform: translateX(0.81rem);
}

.master-status-switch-button-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.master-status-switch-button--inactive .master-status-switch-button-label {
  color: var(--muted);
}

.master-status-switch-button-action {
  font-size: 0.74rem;
  color: var(--muted);
}

.panel {
  padding: 0.85rem;
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  max-width: 100%;
  min-height: calc(var(--app-viewport-height) - 7rem);
  align-content: start;
}

.hero {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  margin-top: -1rem;
  margin-right: -0.85rem;
  margin-left: -0.85rem;
  margin-bottom: 0;
  background: linear-gradient(135deg, rgba(10, 63, 113, 0.95), rgba(0, 108, 181, 0.9));
  color: #f6fbff;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.hero .eyebrow {
  color: rgba(255, 204, 41, 0.92);
}

.hero p,
.hero strong,
.hero .helper,
.hero .code {
  color: #f6fbff;
}

.hero-grid,
.stats,
.split,
.form-grid,
.stack {
  display: grid;
  gap: 0.75rem;
}

.hero-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 0; }
.result-entry-workflow > .stats { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.split {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-flow: dense;
  align-items: start;
}
.dashboard-masonry {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
}
.dashboard-masonry > .card,
.dashboard-masonry > section,
.dashboard-masonry > article,
.dashboard-masonry > div {
  min-width: 0;
  margin: 0;
}
.dashboard-masonry > .stack,
.dashboard-masonry > .form-grid {
  display: grid;
  gap: 0.75rem;
}
.student-transfer-source-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.student-transfer-scope-pills {
  margin-top: 0.45rem;
}

.student-transfer-scope-pills .brand-scope-pill {
  padding: 0.38rem 0.62rem 0.42rem;
  border-radius: 14px;
  box-shadow: none;
}

.student-transfer-scope-pills .brand-scope-pill-value {
  font-size: 0.82rem;
}

.student-transfer-mode-fieldset {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.student-transfer-mode-fieldset legend {
  grid-column: 1 / -1;
}

.student-transfer-mode-fieldset .checkbox-row {
  height: 100%;
}

.student-transfer-batch-card {
  gap: 0.55rem;
  padding: 0.9rem 1rem;
}

.student-transfer-batch-card .section-head {
  gap: 0.6rem;
}

.student-transfer-batch-card .helper {
  margin: 0;
  line-height: 1.32;
}

.student-transfer-batch-card .button-row {
  margin-top: 0.15rem;
}

.student-transfer-batch-card .table-wrap {
  margin-top: 0.15rem;
}

.student-transfer-batch-card table th,
.student-transfer-batch-card table td {
  padding: 0.38rem 0.55rem;
}

.student-transfer-placement-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr;
  align-items: end;
}

.student-transfer-new-section-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 0.45rem;
  align-items: end;
}

.student-transfer-new-section-row label {
  margin: 0;
}

.student-transfer-new-section-row button {
  min-height: 2.35rem;
  white-space: nowrap;
}

.student-transfer-queue-panel {
  border: 1px solid #cfe0ef;
  border-radius: 0.75rem;
  background: #f6fbff;
  padding: 0.85rem 1rem;
  box-shadow: 0 8px 20px rgba(31, 73, 114, 0.08);
}

.student-transfer-queue-summary {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.student-transfer-queue-counts {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.student-transfer-queue-counts button {
  min-height: 2.15rem;
  padding: 0.38rem 0.75rem;
}

@media (min-width: 760px) {
  .student-transfer-placement-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) auto;
  }
}

/* Archived (completed / cancelled / rejected) transfer batch rows */
.transfer-batch-archived {
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--surface, #fff);
  overflow: hidden;
}
.transfer-batch-archived summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.75rem;
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
  flex-wrap: wrap;
}
.transfer-batch-archived summary::-webkit-details-marker { display: none; }
.transfer-batch-archived summary::before {
  content: "▶";
  font-size: 0.65rem;
  color: var(--muted, #888);
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.transfer-batch-archived[open] > summary::before {
  transform: rotate(90deg);
}
.transfer-batch-archived summary:hover,
.transfer-batch-archived summary:focus-visible {
  background: rgba(0, 0, 0, 0.03);
  outline: none;
}
.transfer-batch-archived-route {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.transfer-batch-archived-meta {
  font-size: 0.78rem;
  color: var(--muted, #888);
  white-space: nowrap;
  flex-shrink: 0;
}
.transfer-batch-archived-body {
  padding: 0.5rem 0.75rem 0.75rem;
  border-top: 1px solid var(--line);
}
.transfer-batch-archived-body > * + * {
  margin-top: 0.35rem;
}
.transfer-batch-archive-group {
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
  margin-top: 0.6rem;
}
.transfer-batch-archive-group-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #888);
  margin-bottom: 0.4rem;
}

.transfer-batch-students {
  margin-top: 0.35rem;
}

.transfer-batch-students-expand {
  margin-top: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--surface, #fff) 92%, var(--line, #d8dee8));
  overflow: hidden;
}

.transfer-batch-students-expand > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  cursor: pointer;
  list-style: none;
  padding: 0.55rem 0.7rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.transfer-batch-students-expand > summary::-webkit-details-marker {
  display: none;
}

.transfer-batch-students-expand > summary::before {
  content: "▸";
  margin-right: 0.35rem;
  color: var(--muted, #888);
}

.transfer-batch-students-expand[open] > summary::before {
  content: "▾";
}

.transfer-batch-students-expand-label {
  flex: 1 1 auto;
}

.transfer-batch-students-expand-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted, #888);
}

.transfer-batch-students-expand-body {
  border-top: 1px solid var(--line);
  padding: 0.45rem 0.55rem 0.6rem;
}

.transfer-batch-students-expand-body .table-wrap {
  max-height: min(52vh, 28rem);
  overflow: auto;
}

/* Student add duplicate conflict banner */
.student-add-conflict-banner {
  border: 2px solid var(--warn, #f0a500);
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--warn, #f0a500) 8%, var(--surface, #fff));
  padding: 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.student-conflict-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.student-conflict-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.student-conflict-table th {
  text-align: left;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #888);
  padding: 0 0.4rem 0.3rem 0;
}
.student-conflict-table td {
  padding: 0.2rem 0.4rem 0.2rem 0;
  vertical-align: middle;
  border-top: 1px solid var(--line);
}
.student-conflict-field-label {
  font-weight: 600;
  color: var(--muted, #888);
  white-space: nowrap;
  width: 9rem;
}
.student-conflict-arrow {
  color: var(--muted, #888);
  width: 1.2rem;
  text-align: center;
}
.student-conflict-changed {
  color: var(--text);
  font-weight: 600;
}
.student-conflict-actions {
  padding-top: 0.25rem;
}

.odoo-control-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.sync-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  margin-top: 0.5rem;
  background: rgba(241, 248, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.sync-action-bar .sync-bar-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
}
.sync-action-bar .sync-bar-field input {
  width: 5.5rem;
  min-height: 0;
  padding: 0.3rem 0.4rem;
  font-size: 0.82rem;
  height: 2rem;
  box-sizing: border-box;
}
.sync-action-bar .sync-bar-confirm input {
  width: 9rem;
}
.sync-action-bar button {
  height: 2rem;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.82rem;
  box-sizing: border-box;
}
.split > .full-span {
  grid-column: 1 / -1;
}
.checkbox-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  min-height: 56px;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 16px;
  background: rgba(248, 252, 255, 0.94);
  box-sizing: border-box;
}
.checkbox-field input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  box-shadow: none;
  accent-color: var(--accent);
}
.checkbox-field-content {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}
.checkbox-field-title {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.2;
}
.checkbox-field-helper {
  color: var(--text-muted);
  font-size: 0.64rem;
  line-height: 1.2;
}
.student-entry-grid { grid-template-columns: repeat(6, minmax(150px, 1fr)); }
.student-entry-grid .span-2 { grid-column: span 2; }
.student-entry-grid .span-4 { grid-column: span 4; }
.student-entry-grid .student-entry-address-field { grid-column: span 2; }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.fields-grid-4 { grid-template-columns: repeat(6, minmax(160px, 1fr)); }
.result-entry-grid { grid-template-columns: repeat(6, minmax(160px, 1fr)); }
.result-entry-grid .span-2 { grid-column: span 2; }
.result-entry-remarks-grid { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.result-entry-remarks-grid .teacher-feedback-field { grid-column: span 2; }

@media (max-width: 1500px) {
  .result-entry-workflow > .stats { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
  .fields-grid-4 { grid-template-columns: repeat(5, minmax(160px, 1fr)); }
  .result-entry-grid { grid-template-columns: repeat(5, minmax(160px, 1fr)); }
  .student-entry-grid { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
}

@media (max-width: 1280px) {
  .result-entry-remarks-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .result-entry-remarks-grid .teacher-feedback-field { grid-column: span 1; }
  .result-entry-workflow > .stats { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .fields-grid-4 { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
  .result-entry-grid { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
  .student-entry-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
  .student-entry-grid .span-4 { grid-column: span 2; }
}

@media (max-width: 980px) {
  .result-entry-remarks-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .result-entry-remarks-grid .teacher-feedback-field { grid-column: 1 / -1; }
  .result-entry-workflow > .stats { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .student-entry-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .student-entry-grid .span-2,
  .student-entry-grid .span-4,
  .student-entry-grid .student-entry-address-field { grid-column: 1 / -1; }
  .result-entry-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .dashboard-guide-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  .result-entry-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .dashboard-guide-grid,
  .dashboard-guide-manual-grid {
    grid-template-columns: 1fr;
  }
}

.result-entry-form-shell {
  gap: 0;
}

.result-entry-form-block {
  padding: 0.2rem 0;
}

.result-entry-form-block + .result-entry-form-block {
  margin-top: 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.card {
  padding: 0.85rem;
  min-width: 0;
}

.metric {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.dashboard-guide-panel {
  gap: 1rem;
}

.dashboard-guide-realtime {
  margin-top: 0.45rem;
}

.dashboard-guide-grid,
.dashboard-guide-manual-grid {
  display: grid;
  gap: 0.9rem;
}

.dashboard-guide-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-guide-manual-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-guide-card,
.dashboard-guide-step-card {
  border: 1px solid rgba(10, 63, 113, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.9));
}

.dashboard-guide-card {
  gap: 0.9rem;
}

.dashboard-guide-card-enabled {
  border-color: rgba(0, 168, 89, 0.24);
}

.dashboard-guide-card-disabled {
  border-color: rgba(237, 50, 55, 0.2);
}

.dashboard-guide-card-unavailable {
  border-color: rgba(10, 63, 113, 0.12);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(239, 245, 252, 0.86));
}

.dashboard-guide-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-guide-card-copy {
  display: grid;
  gap: 0.3rem;
}

.dashboard-guide-card-copy h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.dashboard-guide-step-card h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.dashboard-guide-pill {
  white-space: nowrap;
}

.dashboard-guide-pill-enabled {
  background: rgba(0, 168, 89, 0.14);
  color: #0d6a42;
}

.dashboard-guide-pill-disabled {
  background: rgba(237, 50, 55, 0.12);
  color: #a72a2f;
}

.dashboard-guide-pill-unavailable {
  background: rgba(10, 63, 113, 0.08);
  color: var(--muted);
}

.dashboard-guide-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.dashboard-guide-rule-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.28rem;
}

.dashboard-guide-rule-list li {
  line-height: 1.35;
}

.dashboard-guide-manual {
  gap: 0.9rem;
}

.dashboard-guide-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 108, 181, 0.12);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.84rem;
  min-width: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

input, select, textarea {
  width: 100%;
  padding: 0.6rem 0.72rem;
  border: 1px solid rgba(10, 63, 113, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font: inherit;
}

textarea { min-height: 92px; max-height: 240px; resize: vertical; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.58rem 0.82rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

button.is-busy,
.button.is-busy {
  position: relative;
  gap: 0.42rem;
}

button.is-busy::after,
.button.is-busy::after {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: #ffffff;
  animation: button-spinner 0.7s linear infinite;
  flex: 0 0 auto;
}

button.is-busy:hover,
.button.is-busy:hover {
  transform: none;
}

button:hover, .button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
  color: #ffffff;
}

.secondary {
  border-color: var(--line);
  background: rgba(241, 248, 255, 0.92);
  color: var(--text);
}

.secondary.is-active {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(10, 63, 113, 0.18);
}

.secondary.is-active:hover,
.secondary.is-active:focus-visible {
  background: var(--accent-strong);
  color: #ffffff;
}

.danger {
  border-color: #c0392b;
  background: rgba(231, 76, 60, 0.10);
  color: #c0392b;
}
.danger:hover {
  background: #c0392b;
  color: #fff;
}

.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--accent-strong);
  padding: 0.1rem 0.2rem;
  min-height: 0;
  border-radius: 0;
  font-size: 0.82rem;
}

.ghost:hover,
.ghost:focus-visible {
  background: transparent;
  color: var(--accent-strong);
}

button[disabled], .button[disabled], .ghost[disabled] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.status-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  flex-wrap: nowrap;
  white-space: nowrap;
  width: auto;
}

.table-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  flex-wrap: nowrap;
  white-space: nowrap;
  width: auto;
}

.table-actions-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1rem;
}

.table-actions .ghost.warn {
  background: transparent;
  border-color: transparent;
  padding: 0.1rem 0.2rem;
  color: #c0392b;
}

.table-actions--inline {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.table-primary-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.table-actions .ghost.warn:hover,
.table-actions .ghost.warn:focus-visible {
  background: rgba(231, 76, 60, 0.10);
  color: #c0392b;
}

.status-actions .pill {
  font-size: 0.82rem;
  line-height: 1;
  padding: 0.26rem 0.55rem;
}

.staff-last-signin {
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
}

.staff-last-signin-never {
  white-space: nowrap;
}

#staff-profiles-table-region {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

#staff-profiles-table-region > .form-grid,
#staff-profiles-table-region > .toolbar,
#staff-profiles-table-region > .table-wrap,
#staff-profiles-table-region > .helper,
#staff-profiles-table-region > .empty,
#staff-profiles-table-region > .list-pager {
  min-width: 0;
}

#staff-profiles-table-region > .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  align-items: end;
}

#staff-profiles-table-region .table-wrap {
  max-width: 100%;
  max-height: none;
  overflow-y: visible;
}

.table-wrap {
  overflow-y: auto;
  overflow-x: auto;
  max-height: 28rem;
  border-radius: 16px;
}

.master-data-table-wrap {
  overflow-y: visible;
  max-height: none;
}

.master-data-table-wrap > table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.master-data-table-wrap th,
.master-data-table-wrap td {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.student-registry-table-wrap {
  overflow-y: visible;
  max-height: none;
}

.subject-schemes-table-wrap,
.result-rules-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  max-width: 100%;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.result-drafts-table-wrap {
  overflow-y: visible;
  max-height: none;
}

.published-results-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  -webkit-overflow-scrolling: touch;
}

.result-batches-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  -webkit-overflow-scrolling: touch;
}

.result-batches-table {
  width: 100%;
  min-width: 52rem;
  table-layout: fixed;
}

.result-batches-table col.result-batches-col-batch { width: 22%; }
.result-batches-table col.result-batches-col-exam { width: 12%; }
.result-batches-table col.result-batches-col-campus { width: 10%; }
.result-batches-table col.result-batches-col-actor { width: 14%; }
.result-batches-table col.result-batches-col-status { width: 9%; }
.result-batches-table col.result-batches-col-datetime { width: 13%; }
.result-batches-table col.result-batches-col-drafts { width: 6%; }
.result-batches-table col.result-batches-col-actions { width: 14%; }

.result-batches-table th,
.result-batches-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.result-batches-table .result-batches-col-batch,
.result-batches-table .result-batches-cell-batch,
.result-batches-table .result-batches-col-exam,
.result-batches-table .result-batches-cell-exam,
.result-batches-table .result-batches-col-campus,
.result-batches-table .result-batches-cell-campus,
.result-batches-table .result-batches-col-actor,
.result-batches-table .result-batches-cell-actor {
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

.result-batches-table .result-batches-col-status,
.result-batches-table .result-batches-cell-status,
.result-batches-table .result-batches-col-datetime,
.result-batches-table .result-batches-cell-datetime,
.result-batches-table .result-batches-col-drafts,
.result-batches-table .result-batches-cell-drafts {
  white-space: nowrap;
}

.result-batches-table .result-batches-col-actions,
.result-batches-table .result-batches-cell-actions {
  white-space: normal;
}

.result-batches-table .result-batches-cell-actions .ghost {
  display: inline-block;
  margin: 0 0.2rem 0.2rem 0;
}

@media (max-width: 980px) {
  .table-wrap.result-batches-table-wrap > table.result-batches-table {
    min-width: 52rem;
    table-layout: fixed;
  }
}

.published-results-table {
  width: 100%;
  min-width: 58rem;
  table-layout: fixed;
}

.published-results-table col.published-results-col-registration { width: 11%; }
.published-results-table col.published-results-col-student { width: 16%; }
.published-results-table col.published-results-col-exam { width: 14%; }
.published-results-table col.published-results-col-class { width: 8%; }
.published-results-table col.published-results-col-total { width: 8%; }
.published-results-table col.published-results-col-status { width: 10%; }
.published-results-table col.published-results-col-version { width: 7%; }
.published-results-table col.published-results-col-current { width: 8%; }
.published-results-table col.published-results-col-action { width: 18%; }

.published-results-table th,
.published-results-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.published-results-table .published-results-col-registration,
.published-results-table .published-results-cell-registration,
.published-results-table .published-results-col-student,
.published-results-table .published-results-col-exam,
.published-results-table .published-results-col-class,
.published-results-table .published-results-cell-class {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.published-results-table .published-results-col-total,
.published-results-table .published-results-cell-total,
.published-results-table .published-results-col-status,
.published-results-table .published-results-cell-status,
.published-results-table .published-results-col-version,
.published-results-table .published-results-cell-version,
.published-results-table .published-results-col-current,
.published-results-table .published-results-cell-current {
  white-space: nowrap;
}

.published-results-table .published-results-col-action,
.published-results-table .published-results-cell-action {
  white-space: normal;
}

.published-results-table .published-results-cell-action .table-actions--inline {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.25rem 0.45rem;
}

.published-results-total-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.published-results-total-value {
  font-variant-numeric: tabular-nums;
}

.parent-module-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 1rem;
}

.parent-module-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(10, 63, 113, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(10, 63, 113, 0.08);
}

.parent-module-link.active {
  background: linear-gradient(135deg, rgba(0, 108, 181, 0.98), rgba(10, 63, 113, 0.96));
  color: #fff;
  border-color: rgba(0, 108, 181, 0.35);
}

.parent-dashboard-layout {
  align-items: start;
}

.parent-overview-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.parent-overview-primary-card {
  grid-column: span 2;
}

.parent-overview-layout .parent-guardian-profile-card {
  grid-column: 3;
}

.parent-hero {
  position: relative;
  overflow: hidden;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
}

.parent-hero-greeting {
  position: relative;
  z-index: 1;
  margin: -0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.96);
}

.parent-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 70%);
  pointer-events: none;
}

.parent-hero-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.parent-child-switcher {
  min-height: 100%;
}

.parent-hero-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.72rem 0.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.parent-hero-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 2.15rem;
  border-radius: 999px;
  background: rgba(255, 204, 41, 0.18);
  color: rgba(255, 230, 153, 0.98);
  box-shadow: inset 0 0 0 1px rgba(255, 204, 41, 0.12);
}

.parent-hero-stat-icon i {
  font-size: 0.95rem;
}

.parent-hero-stat-copy {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.parent-hero-stat-copy strong {
  font-size: 0.8rem;
  line-height: 1.2;
}

.parent-hero-stat-copy p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.parent-active-child-chip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 63, 113, 0.14);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 24px rgba(10, 63, 113, 0.08);
  min-width: 0;
}

.parent-active-child-chip--compact {
  padding: 0.6rem 0.75rem;
}

.parent-active-child-chip--session {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.parent-active-child-chip--empty {
  background: rgba(255, 255, 255, 0.7);
}

.parent-active-child-avatar {
  width: 3.05rem;
  height: 3.05rem;
  flex: 0 0 3.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(224, 238, 252, 0.92), rgba(202, 223, 246, 0.86));
  color: var(--accent-strong);
}

.parent-active-child-avatar .student-registry-card-avatar {
  width: calc(100% - 0.34rem);
  height: calc(100% - 0.34rem);
  border-radius: 999px;
}

.parent-active-child-avatar .student-registry-card-avatar img {
  border-radius: 999px;
}

.parent-active-child-avatar .student-registry-card-avatar--parent-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.parent-active-child-avatar .student-registry-card-avatar--parent-thumb i {
  font-size: 0.94rem;
}

.parent-active-child-avatar--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(224, 238, 252, 0.92), rgba(202, 223, 246, 0.86));
  color: var(--accent-strong);
}

.parent-active-child-copy {
  min-width: 0;
  display: block;
}

.parent-active-child-copy strong {
  display: block;
  min-width: 0;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parent-coordinator-chip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.78rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 63, 113, 0.14);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 24px rgba(10, 63, 113, 0.08);
  min-width: 0;
}

.parent-coordinator-chip--compact {
  padding: 0.58rem 0.75rem;
}

.parent-coordinator-chip--session {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.parent-coordinator-chip-icon {
  width: 3.05rem;
  height: 3.05rem;
  flex: 0 0 3.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(224, 238, 252, 0.92), rgba(202, 223, 246, 0.86));
  color: var(--accent-strong);
}

.parent-coordinator-chip-icon i {
  font-size: 1rem;
}

.parent-coordinator-chip-copy {
  min-width: 0;
}

.parent-coordinator-chip-label {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parent-coordinator-chip-copy strong {
  display: block;
  margin-top: 0.1rem;
  min-width: 0;
  color: var(--text);
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-bar .parent-active-child-chip {
  gap: 0.55rem;
  height: calc(0.88rem * 1.2 + 1.16rem + 2px);
  padding: 0.18rem 0.82rem 0.18rem 0.18rem;
  max-width: min(240px, 42vw);
  box-sizing: border-box;
}

.session-bar .parent-active-child-avatar {
  width: 1.95rem;
  height: 1.95rem;
  flex-basis: 1.95rem;
}

.session-bar .parent-active-child-avatar .student-registry-card-avatar {
  border: 0;
  background: transparent;
}

.parent-child-select-field {
  display: grid;
  gap: 0.55rem;
}

.parent-child-select-field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  font: inherit;
}

.parent-child-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.parent-child-card {
  min-width: 0;
}

.parent-child-card-main {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.parent-child-card-media {
  width: 6.5rem;
  display: grid;
  gap: 0.55rem;
}

.parent-child-card-media .student-registry-card-avatar {
  width: 100%;
  height: 7.75rem;
}

.parent-child-card-media-meta {
  margin: 0;
  display: grid;
  gap: 0.45rem;
  text-align: center;
}

.parent-child-card-media-meta div {
  min-width: 0;
  display: grid;
  justify-items: center;
}

.parent-child-card-media-meta dt {
  margin: 0 0 0.08rem;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.parent-child-card-media-meta dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
  font-weight: 700;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.parent-child-card-body {
  min-width: 0;
  gap: 0.75rem;
}

.parent-child-card-status {
  margin-left: auto;
  align-self: flex-start;
  justify-content: flex-end;
}

.parent-child-card-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.parent-child-card-details div {
  min-width: 0;
}

.parent-child-card-details dt {
  margin: 0 0 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.parent-child-card-details dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.parent-child-card.is-active {
  border-color: rgba(0, 108, 181, 0.28);
  box-shadow: 0 16px 42px rgba(0, 108, 181, 0.12);
}

.parent-snapshot-card,
.parent-overview-timeline,
.parent-result-history-card,
.parent-analytics-card {
  background: rgba(255, 255, 255, 0.82);
}

.parent-guardian-profile-card {
  gap: 0.95rem;
}

.parent-guardian-profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.parent-guardian-profile-field {
  display: grid;
  gap: 0;
}

.parent-guardian-profile-field.full {
  grid-column: 1 / -1;
}

.parent-guardian-profile-field[hidden] {
  display: none;
}

.parent-guardian-profile-card textarea {
  width: 100%;
  resize: vertical;
  min-height: 2.65rem;
}

.parent-guardian-profile-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.parent-guardian-profile-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.72rem 0.82rem;
  border-radius: 16px;
  background: rgba(0, 108, 181, 0.08);
  color: var(--text);
}

.parent-guardian-profile-item i {
  margin-top: 0.12rem;
  color: var(--accent);
}

.parent-guardian-profile-item span {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.parent-guardian-profile-item--full {
  grid-column: 1 / -1;
}

.parent-guardian-profile-form .button-row {
  grid-column: 1 / -1;
}

.parent-guidance-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.7rem;
}

.parent-guidance-list li {
  color: var(--muted);
}

.parent-signal-grid,
.parent-analytics-grid,
.parent-result-history {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.parent-analytics-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  overflow-x: auto;
}

.parent-attendance-calendar-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(241, 247, 255, 0.94));
}

.parent-attendance-calendar-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.parent-attendance-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}

.parent-attendance-calendar-day {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.22rem;
  padding: 0.42rem 0.22rem;
  border-radius: 14px;
  border: 1px solid rgba(10, 63, 113, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.94));
}

.parent-attendance-calendar-day-name {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.parent-attendance-calendar-day--present {
  border-color: rgba(15, 118, 110, 0.14);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(231, 248, 243, 0.94));
}

.parent-attendance-calendar-day--absent {
  border-color: rgba(180, 92, 34, 0.18);
  background: linear-gradient(180deg, rgba(255, 248, 241, 0.98), rgba(253, 239, 226, 0.94));
}

.parent-attendance-calendar-day--future {
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.parent-attendance-calendar-day--holiday {
  border-color: rgba(0, 108, 181, 0.16);
  background: linear-gradient(180deg, rgba(241, 247, 255, 0.98), rgba(232, 242, 253, 0.94));
}

.parent-attendance-calendar-day.is-online-class {
  border-color: rgba(15, 159, 122, 0.18);
  background: linear-gradient(180deg, rgba(240, 252, 248, 0.98), rgba(228, 247, 240, 0.94));
}

.parent-attendance-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(0, 108, 181, 0.24);
}

.parent-attendance-calendar-day-number {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.parent-attendance-calendar-day-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: rgba(10, 63, 113, 0.18);
}

.parent-attendance-calendar-day--present .parent-attendance-calendar-day-dot {
  background: var(--success);
}

.parent-attendance-calendar-day--absent .parent-attendance-calendar-day-dot {
  background: #b45309;
}

.parent-attendance-calendar-day--future .parent-attendance-calendar-day-dot {
  background: rgba(10, 63, 113, 0.14);
}

.parent-attendance-calendar-day--holiday .parent-attendance-calendar-day-dot {
  background: var(--accent);
}

.parent-attendance-calendar-day-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.2;
  min-height: 1.25rem;
}

.parent-attendance-calendar-meta {
  display: grid;
  gap: 0.55rem;
}

.parent-attendance-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.parent-attendance-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.parent-attendance-calendar-legend-dot {
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 999px;
  background: rgba(10, 63, 113, 0.16);
}

.parent-attendance-calendar-legend-dot--present {
  background: var(--success);
}

.parent-attendance-calendar-legend-dot--absent {
  background: #b45309;
}

.parent-attendance-calendar-legend-dot--holiday {
  background: var(--accent);
}

.parent-attendance-calendar-legend-dot--online {
  background: #0f9f7a;
}

.parent-attendance-calendar-legend-dot--future {
  background: rgba(10, 63, 113, 0.16);
}

@media (max-width: 900px) {
  .parent-attendance-calendar-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parent-attendance-calendar-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .parent-attendance-calendar-day-name {
    font-size: 0.78rem;
  }
}

@media (max-width: 640px) {
  .parent-attendance-calendar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .parent-attendance-calendar-day {
    padding: 0.38rem 0.2rem;
  }

  .parent-attendance-calendar-day-name {
    font-size: 0.72rem;
  }
}

.parent-signal-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: start;
}

.parent-signal-summary-stack {
  gap: 1rem;
}

.parent-signal-card {
  min-height: 0;
}

.attendance-analytics-strip {
  display: grid;
  gap: 0.75rem;
}

.attendance-analytics-item {
  display: grid;
  gap: 0.3rem;
}

.attendance-analytics-item strong {
  font-size: 0.9rem;
  color: var(--accent-strong);
}

.parent-fee-video-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(240, 247, 255, 0.94));
}

.parent-fee-video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.parent-fee-video-slide {
  min-width: 0;
}

.parent-fee-video-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 18px;
  overflow: hidden;
}

.parent-fee-video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 900px) {
  .parent-fee-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .parent-fee-video-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.parent-module-table-wrap {
  overflow-x: auto;
}

.parent-module-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.parent-module-table th,
.parent-module-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(10, 63, 113, 0.08);
  text-align: left;
  vertical-align: top;
}

.parent-module-table th {
  font-size: 0.79rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.parent-result-preview {
  overflow: hidden;
  border-radius: 22px;
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 720px;
}

.parent-result-preview-frame {
  width: 100%;
  min-height: 720px;
  height: 720px;
  border: 0;
  display: block;
  background: transparent;
  border-radius: inherit;
}

.parent-chip-list {
  gap: 0.45rem;
}

@media (max-width: 900px) {
  .parent-module-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parent-module-table {
    min-width: 640px;
  }
}

.published-results-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 63, 113, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 16px rgba(10, 63, 113, 0.08);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-0.2rem);
}

.published-results-rank-badge--1 {
  background: rgba(255, 204, 41, 0.2);
  border-color: rgba(196, 144, 0, 0.26);
  color: #7a5200;
}

.published-results-rank-badge--2 {
  background: rgba(200, 210, 220, 0.34);
  border-color: rgba(110, 126, 142, 0.22);
  color: #4f5f70;
}

.published-results-rank-badge--3 {
  background: rgba(196, 126, 78, 0.18);
  border-color: rgba(160, 98, 55, 0.22);
  color: #7a4a26;
}

.published-results-summary-card {
  flex: 0 0 auto;
  width: min(14rem, 100%);
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(10, 63, 113, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 252, 0.94));
  box-shadow: 0 8px 18px rgba(10, 63, 113, 0.07);
}

.published-results-summary-card .eyebrow {
  margin: 0;
  margin-bottom: 0.35rem;
}

.published-results-summary-bar {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(10, 63, 113, 0.1);
  box-shadow: inset 0 0 0 1px rgba(10, 63, 113, 0.06);
}

.published-results-summary-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #0a63a8);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.published-results-summary-label {
  margin: 0.5rem 0 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 981px) {
  .published-results-table th,
  .published-results-table td {
    padding-inline: 0.55rem;
  }
}

@media (max-width: 980px) {
  .table-wrap.published-results-table-wrap > table.published-results-table {
    min-width: 58rem;
    table-layout: fixed;
  }
}

.mobile-table-scrollbar {
  display: none;
}

.mobile-table-scrollbar-inner {
  height: 1px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.section-head > :first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.section-head .toolbar {
  flex: 0 0 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.result-drafts-filter-toolbar {
  gap: 0.45rem;
  justify-content: flex-start;
}

.result-drafts-filter-toolbar .secondary {
  min-height: 2rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

.result-campus-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.96), rgba(232, 241, 251, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.result-campus-filter-label {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 37, 64, 0.72);
}

.result-campus-filter-chips {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.result-campus-filter-chip {
  min-height: 2.2rem;
  padding: 0.48rem 0.88rem;
  border: 1px solid rgba(10, 63, 113, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: #0f2540;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.result-campus-filter-chip:hover,
.result-campus-filter-chip:focus-visible {
  border-color: rgba(26, 92, 164, 0.34);
  background: linear-gradient(180deg, rgba(232, 241, 252, 1), rgba(220, 233, 249, 0.98));
  color: #0f2540;
  box-shadow: 0 10px 22px rgba(10, 63, 113, 0.1);
  transform: translateY(-1px);
}

.result-campus-filter-chip.is-active {
  border-color: rgba(26, 92, 164, 0.42);
  background: linear-gradient(180deg, rgba(217, 232, 250, 1), rgba(203, 223, 246, 0.96));
  color: #0f2540;
  box-shadow: 0 12px 24px rgba(10, 63, 113, 0.12);
}

.result-campus-filter-chip.is-active:hover,
.result-campus-filter-chip.is-active:focus-visible {
  background: linear-gradient(180deg, rgba(209, 227, 248, 1), rgba(193, 217, 244, 0.98));
  color: #0f2540;
}

.inline-form-panel {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(246, 252, 255, 0.82);
}

.inline-form-toolbar {
  justify-content: space-between;
}

.inline-draft-edit-row td {
  padding: 0.9rem;
  background: rgba(246, 252, 255, 0.76);
}

.inline-result-draft-form {
  display: grid;
  gap: 0.9rem;
}

.inline-result-draft-form .result-entry-remarks-grid {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  align-items: start;
}

.inline-result-draft-form .result-entry-remarks-grid .attendance-field {
  grid-column: span 1;
}

.inline-result-draft-form .result-entry-remarks-grid .teacher-feedback-field,
.inline-result-draft-form .result-entry-remarks-grid .completion-note-field {
  grid-column: span 1;
}

@media (max-width: 1500px) {
  .inline-result-draft-form .result-entry-remarks-grid {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
  }
}

@media (max-width: 1280px) {
  .inline-result-draft-form .result-entry-remarks-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
  }

  .inline-result-draft-form .result-entry-remarks-grid .teacher-feedback-field,
  .inline-result-draft-form .result-entry-remarks-grid .completion-note-field {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  .inline-result-draft-form .result-entry-remarks-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .inline-result-draft-form .result-entry-remarks-grid .attendance-field,
  .inline-result-draft-form .result-entry-remarks-grid .teacher-feedback-field,
  .inline-result-draft-form .result-entry-remarks-grid .completion-note-field {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .inline-result-draft-form .result-entry-remarks-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .inline-result-draft-form .result-entry-remarks-grid .teacher-feedback-field,
  .inline-result-draft-form .result-entry-remarks-grid .completion-note-field {
    grid-column: 1 / -1;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.84rem;
}

.staff-table {
  table-layout: auto;
  width: 100%;
  min-width: 0;
}

.staff-table th,
.staff-table td {
  vertical-align: top;
}

.staff-table .staff-col-name,
.staff-table .staff-col-email {
  white-space: normal;
  overflow-wrap: anywhere;
}

.staff-table .staff-col-email {
  min-width: 10rem;
}

.staff-table .staff-col-role,
.staff-table .staff-col-campus,
.staff-table .staff-col-class,
.staff-table .staff-col-section {
  white-space: nowrap;
  width: 1%;
}

.staff-table .staff-col-phone {
  white-space: nowrap;
  width: 1%;
}

.staff-table .staff-col-signin {
  white-space: nowrap;
  width: 1%;
  min-width: 7rem;
}

.staff-table .staff-col-status,
.staff-table .staff-col-actions {
  width: 1%;
  white-space: nowrap;
}

  .staff-table .staff-col-status {
    min-width: 7.5rem;
  }

  .staff-table .staff-col-actions {
    min-width: 10.5rem;
  }

  .staff-table .status-actions,
  .staff-table .table-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .staff-table .table-actions-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.55rem;
  }

  .staff-table .status-actions .pill,
  .staff-table .status-actions button,
  .staff-table .table-actions button {
    white-space: nowrap;
  }

@media (max-width: 720px) {
  .staff-table .staff-col-phone,
  .staff-table .staff-col-signin {
    display: none;
  }
}

.staff-table .status-actions,
.staff-table .table-actions {
  white-space: normal;
}

.staff-table .table-actions-row {
  flex-wrap: wrap;
}

.approver-staff-profiles-page .staff-table .status-actions,
.approver-staff-profiles-page .staff-table .table-actions {
  gap: 0.08rem;
}

.approver-staff-profiles-page .staff-table .table-actions-row {
  gap: 0.16rem;
}

.approver-staff-profiles-page .staff-table .ghost {
  padding-block: 0;
}

.approver-staff-profiles-page #approver-staff-profiles-list-region .toolbar,
#student-registry-region .toolbar {
  gap: 0.38rem;
}

.approver-staff-profiles-page #approver-staff-profiles-list-region .toolbar .pill,
#student-registry-region .toolbar .pill {
  padding: 0.26rem 0.52rem;
  font-size: 0.69rem;
  border-radius: 999px;
}

.approver-staff-profiles-page #approver-staff-profiles-list-region .toolbar button,
.approver-staff-profiles-page #approver-staff-profiles-list-region .toolbar .button,
.approver-staff-profiles-page #approver-staff-profiles-list-region .toolbar .secondary,
#student-registry-region .toolbar button,
#student-registry-region .toolbar .button,
#student-registry-region .toolbar .secondary {
  min-height: 2.1rem;
  padding: 0.42rem 0.72rem;
  font-size: 0.8rem;
}

.approver-staff-profiles-page #approver-staff-profiles-list-region .table-wrap {
  overflow-y: visible;
  max-height: none;
}

.approver-staff-profiles-page .approver-staff-table-actions {
  align-items: center;
}

.approver-staff-profiles-page .approver-staff-table-actions .table-actions-row {
  align-items: center;
  flex-wrap: nowrap;
}

.approver-staff-actions-menu {
  position: relative;
}

.approver-staff-actions-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  color: var(--accent-strong);
}

.approver-staff-actions-toggle::-webkit-details-marker {
  display: none;
}

.approver-staff-actions-toggle:hover,
.approver-staff-actions-toggle:focus-visible,
.approver-staff-actions-menu[open] > .approver-staff-actions-toggle {
  background: rgba(10, 63, 113, 0.07);
  border-color: rgba(10, 63, 113, 0.12);
  outline: none;
}

.approver-staff-actions-toggle span {
  font-size: 1rem;
  line-height: 1;
}

.approver-staff-actions-popover {
  position: absolute;
  top: calc(100% + 0.15rem);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 0.12rem;
  min-width: 10.5rem;
  padding: 0.3rem;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 24px rgba(10, 63, 113, 0.14);
}

.approver-staff-actions-popover .ghost {
  justify-content: flex-start;
  width: 100%;
  padding: 0.18rem 0.28rem;
  text-align: left;
}

.table-actions-overflow-menu:not([open]) > .table-actions-overflow-popover,
.approver-staff-actions-menu:not([open]) > .approver-staff-actions-popover {
  display: none;
}

.master-data-table-wrap td:has(.master-data-row-actions),
.subject-schemes-table-wrap td:has(.master-data-row-actions),
.result-rules-table-wrap td:has(.master-data-row-actions) {
  position: relative;
  overflow: visible;
  vertical-align: middle;
}

.master-data-row-actions .table-actions-row {
  flex-wrap: nowrap;
  align-items: center;
}

.master-data-row-actions .approver-staff-actions-menu {
  flex: 0 0 auto;
}

.master-data-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.student-registry-table {
  table-layout: auto;
  min-width: 760px;
}

.subject-schemes-table-wrap > table {
  table-layout: auto;
  min-width: 980px;
}

.subject-schemes-table-wrap th,
.subject-schemes-table-wrap td {
  word-break: normal;
  overflow-wrap: normal;
}

.subject-schemes-table-wrap th:nth-child(3),
.subject-schemes-table-wrap td:nth-child(3),
.subject-schemes-table-wrap th:nth-child(4),
.subject-schemes-table-wrap td:nth-child(4),
.subject-schemes-table-wrap th:nth-child(5),
.subject-schemes-table-wrap td:nth-child(5),
.subject-schemes-table-wrap th:nth-child(6),
.subject-schemes-table-wrap td:nth-child(6),
.subject-schemes-table-wrap th:nth-child(7),
.subject-schemes-table-wrap td:nth-child(7),
.subject-schemes-table-wrap th:nth-child(8),
.subject-schemes-table-wrap td:nth-child(8) {
  width: 1%;
  white-space: nowrap;
}

.subject-schemes-table-wrap th:nth-child(6),
.subject-schemes-table-wrap td:nth-child(6) {
  text-align: center;
}

.student-registry-table th {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.student-registry-table td {
  word-break: normal;
  overflow-wrap: normal;
}

.student-registry-table th:nth-child(5),
.student-registry-table td:nth-child(5),
.student-registry-table th:nth-child(6),
.student-registry-table td:nth-child(6),
.student-registry-table th:nth-child(7),
.student-registry-table td:nth-child(7) {
  width: 1%;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.student-registry-table th:nth-child(8),
.student-registry-table td:nth-child(8) {
  width: 1%;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.student-registry-table .table-actions--inline {
  gap: 0.3rem;
}

.student-registry-table .table-actions--inline .ghost {
  padding: 0.12rem 0.18rem;
}

.student-registry-view-switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.student-registry-status-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.student-registry-status-switch .secondary {
  min-width: 6.9rem;
  justify-content: center;
}

.student-registry-view-switch .secondary {
  min-width: 2.7rem;
  padding-inline: 0.7rem;
}

.student-registry-view-switch .secondary i {
  font-size: 0.92rem;
}

#student-registry-region,
#student-registry-workspace-region {
  min-width: 0;
  max-width: 100%;
}

.results-hub-tabs {
  --hub-tab-border: rgba(10, 63, 113, 0.12);
  --hub-tab-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 244, 252, 0.92) 100%);
  --hub-tab-hover-surface: rgba(255, 255, 255, 0.72);
  --hub-tab-text: rgba(67, 83, 108, 0.5);
  --hub-tab-text-hover: rgba(10, 63, 113, 0.82);
  --hub-tab-active: #5677f2;
  --hub-tab-active-soft: rgba(86, 119, 242, 0.12);
  --hub-tab-icon-surface: rgba(255, 255, 255, 0.46);
  --hub-tab-icon-active-surface: rgba(86, 119, 242, 0.14);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0.22rem;
  border: 1px solid var(--hub-tab-border);
  border-radius: 28px;
  background: var(--hub-tab-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.results-hub-tabs--results {
  --hub-tab-border: rgba(10, 113, 92, 0.18);
  --hub-tab-surface: linear-gradient(180deg, rgba(247, 255, 251, 0.98) 0%, rgba(227, 246, 236, 0.96) 100%);
  --hub-tab-hover-surface: rgba(255, 255, 255, 0.82);
  --hub-tab-text: rgba(30, 92, 76, 0.5);
  --hub-tab-text-hover: rgba(18, 87, 68, 0.9);
  --hub-tab-active: #0d8f6f;
  --hub-tab-active-soft: rgba(13, 143, 111, 0.13);
  --hub-tab-icon-surface: rgba(255, 255, 255, 0.56);
  --hub-tab-icon-active-surface: rgba(13, 143, 111, 0.15);
}

.results-hub-tabs--master-data {
  --hub-tab-border: rgba(10, 113, 92, 0.18);
  --hub-tab-surface: linear-gradient(180deg, rgba(247, 255, 251, 0.98) 0%, rgba(227, 246, 236, 0.96) 100%);
  --hub-tab-hover-surface: rgba(255, 255, 255, 0.82);
  --hub-tab-text: rgba(30, 92, 76, 0.5);
  --hub-tab-text-hover: rgba(18, 87, 68, 0.9);
  --hub-tab-active: #0d8f6f;
  --hub-tab-active-soft: rgba(13, 143, 111, 0.13);
  --hub-tab-icon-surface: rgba(255, 255, 255, 0.56);
  --hub-tab-icon-active-surface: rgba(13, 143, 111, 0.15);
}

.results-hub-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.85rem;
  padding: 0.65rem 0.4rem 0.78rem;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--hub-tab-text);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.results-hub-tab:hover,
.results-hub-tab:focus-visible {
  background: var(--hub-tab-hover-surface);
  color: var(--hub-tab-text-hover);
  transform: none;
}

.results-hub-tab.is-active {
  background: var(--hub-tab-active-soft);
  color: var(--hub-tab-active);
}

.results-hub-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 18px;
  background: var(--hub-tab-icon-surface);
  color: currentColor;
  font-size: 1.25rem;
  transition: background 160ms ease, color 160ms ease;
}

.results-hub-tab.is-active .results-hub-tab-icon {
  background: var(--hub-tab-icon-active-surface);
}

.results-hub-tab-label {
  display: block;
  text-align: center;
}

.master-data-tabs {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  overflow: hidden;
}

.master-data-tab {
  gap: 0.28rem;
  min-height: 4.1rem;
  min-width: 0;
  padding: 0.52rem 0.2rem 0.62rem;
  font-size: 0.76rem;
}

.master-data-tab .results-hub-tab-icon {
  position: relative;
  overflow: visible;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 14px;
  font-size: 1.5rem;
}

.master-data-tab-count {
  position: absolute;
  top: -0.42rem;
  right: -0.52rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  padding: 0.1rem 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(10, 113, 92, 0.16);
  color: var(--hub-tab-active);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 6px 14px rgba(10, 63, 113, 0.12);
}

.master-data-tab .results-hub-tab-label {
  font-size: 0.72rem;
  line-height: 1.15;
}

.master-data-page {
  min-width: 0;
  max-width: 100%;
}

.master-data-page > .card,
.master-data-page .card.stack,
.master-data-page .card.stack.full-span {
  min-width: 0;
  max-width: 100%;
}

.master-data-page .section-head .toolbar .button,
.master-data-page .section-head .toolbar .secondary,
.master-data-page .section-head .toolbar button {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

@media (max-width: 1100px) {
  .master-data-page .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .master-data-page .section-head > :first-child {
    min-width: 0;
  }

  .master-data-page .section-head .toolbar {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    align-self: stretch;
    display: flex;
    flex: 0 0 auto;
  }

  .master-data-page .section-head #refresh-master-data {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 900px) {
  .subject-schemes-table-wrap > table,
  .result-rules-table-wrap > table {
    min-width: 720px;
  }
}

@media (max-width: 720px) {
  .master-data-page {
    gap: 0.65rem;
  }

  .master-data-page .card {
    padding: 0.72rem;
    gap: 0.6rem;
    border-radius: 20px;
  }

  .master-data-page .section-head {
    gap: 0.55rem;
  }

  .master-data-page .section-head > :first-child {
    flex-basis: 100%;
  }

  .master-data-page .section-head .toolbar {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
    min-width: 0;
  }

  .master-data-page .section-head .toolbar .button,
  .master-data-page .section-head .toolbar .secondary,
  .master-data-page .section-head .toolbar button {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }

  .master-data-page .section-head h3 {
    font-size: 1rem;
    line-height: 1.28;
  }

  .master-data-page .eyebrow {
    margin-bottom: 0.28rem;
    font-size: 0.7rem;
    letter-spacing: 0.11em;
  }

  .master-data-page .helper {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.34;
  }

  .master-data-page .toolbar {
    gap: 0.38rem;
  }

  .master-data-page .toolbar .pill,
  .master-data-page .pill {
    padding: 0.26rem 0.52rem;
    font-size: 0.69rem;
    border-radius: 999px;
  }

  .master-data-page button,
  .master-data-page .button,
  .master-data-page .secondary,
  .master-data-page .ghost {
    min-height: 2.1rem;
    padding: 0.42rem 0.72rem;
    font-size: 0.8rem;
  }

  .master-data-overview-card progress {
    height: 0.65rem !important;
  }

  .master-data-tabs {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(4.9rem, max-content);
    gap: 0.22rem;
    padding: 0.18rem 0.18rem 0.32rem;
    border-radius: 22px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .master-data-tab {
    gap: 0.22rem;
    min-height: 3.35rem;
    min-width: 4.9rem;
    padding: 0.42rem 0.22rem 0.46rem;
    border-radius: 16px;
    font-size: 0.68rem;
  }

  .master-data-tab .results-hub-tab-icon {
    width: 1.92rem;
    height: 1.92rem;
    border-radius: 12px;
    font-size: 1.14rem;
  }

  .master-data-tab .results-hub-tab-label {
    font-size: 0.63rem;
    line-height: 1.08;
    letter-spacing: -0.01em;
  }
}

.connected-apps-shell {
  gap: 1rem;
}

.connected-apps-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

.connected-apps-tab {
  gap: 0.28rem;
  min-height: 4.1rem;
  min-width: 0;
  padding: 0.52rem 0.24rem 0.62rem;
  font-size: 0.76rem;
}

.connected-apps-tab .results-hub-tab-icon {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 14px;
  font-size: 1.5rem;
}

.connected-apps-tab .results-hub-tab-label {
  font-size: 0.72rem;
  line-height: 1.15;
}

.connected-apps-content {
  display: grid;
  gap: 1rem;
}

.connected-apps-panel-split {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.settings-form-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 0.65rem;
}

.settings-summary-bar {
  gap: 0.4rem;
}

.settings-alerts-block {
  gap: 0.55rem;
}

.settings-collapsible {
  border: 1px solid rgba(10, 63, 113, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 251, 0.96));
  box-shadow: 0 10px 24px rgba(10, 63, 113, 0.06);
}

.settings-collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  cursor: pointer;
  list-style: none;
}

.settings-collapsible-summary::-webkit-details-marker {
  display: none;
}

.settings-collapsible-copy {
  display: grid;
  gap: 0.12rem;
}

.settings-collapsible-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(10, 63, 113, 0.08);
  color: var(--accent-strong);
  transition: transform 0.18s ease, background 0.18s ease;
}

.settings-collapsible[open] .settings-collapsible-arrow {
  transform: rotate(180deg);
  background: rgba(13, 143, 111, 0.12);
}

.settings-collapsible-body {
  padding: 0 1rem 1rem;
}

.settings-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.settings-channel-card {
  gap: 0.45rem;
  padding: 0.7rem;
  border-radius: 18px;
}

.settings-channel-head {
  justify-content: space-between;
  gap: 0.4rem;
}

.settings-checkbox {
  min-height: 0;
  padding: 0.45rem 0.65rem;
  gap: 0.55rem;
}

.settings-checkbox .checkbox-field-title {
  font-size: 0.78rem;
  color: var(--text);
}

.settings-checkbox .checkbox-field-helper {
  display: none;
}

.settings-alerts-block textarea[readonly] {
  min-height: 8rem;
  background: rgba(244, 248, 251, 0.95);
}

.settings-alerts-block textarea {
  min-height: 7rem;
}

.attendance-email-preview-block {
  display: grid;
  gap: 0.55rem;
}

.attendance-email-preview-frame {
  border: 1px solid rgba(10, 63, 113, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 251, 253, 0.98), rgba(237, 244, 248, 0.96));
  overflow: hidden;
}

.attendance-email-preview-frame img {
  max-width: 100%;
  height: auto;
}

.attendance-email-preview-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  align-items: start;
}

.attendance-email-preview-surface {
  display: grid;
  gap: 0.45rem;
}

.attendance-email-preview-device {
  width: min(390px, 100%);
  margin: 0 auto;
  padding: 0.8rem;
  border-radius: 32px;
  border: 1px solid rgba(10, 63, 113, 0.14);
  background: linear-gradient(180deg, rgba(241, 246, 250, 0.98), rgba(226, 236, 243, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.attendance-email-preview-frame--mobile {
  border-radius: 20px;
}

.attendance-email-template-editor textarea {
  min-height: 12rem;
}

.master-data-tabs::-webkit-scrollbar {
  height: 8px;
}

.master-data-tabs::-webkit-scrollbar-thumb {
  background: rgba(13, 143, 111, 0.28);
  border-radius: 999px;
}

.master-data-tabs::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1100px) {
  .master-data-tabs {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(4.65rem, max-content);
    gap: 0.22rem;
    padding-inline: 0.22rem;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .connected-apps-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .settings-form-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .attendance-email-preview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .student-transfer-source-grid {
    grid-template-columns: 1fr;
  }

  .student-transfer-mode-fieldset {
    grid-template-columns: 1fr;
  }

  .results-hub-tabs {
    border-radius: 24px;
  }

  .results-hub-tab {
    min-height: 4.35rem;
    padding-inline: 0.35rem;
    font-size: 0.78rem;
  }

  .results-hub-tab-icon {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 1.1rem;
  }

  .master-data-tabs {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(4.65rem, max-content);
    padding-bottom: 0.34rem;
  }

  .connected-apps-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-form-grid,
  .settings-channel-grid {
    grid-template-columns: 1fr;
  }
}

.student-registry-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22.5rem), 1fr));
  gap: 1rem;
}

.student-registry-card {
  position: relative;
  gap: 0.9rem;
}

.student-registry-card--skeleton {
  pointer-events: none;
  min-height: 10.5rem;
}

.student-registry-card-skeleton-block {
  height: 0.85rem;
  border-radius: 0.35rem;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.12) 25%, rgba(148, 163, 184, 0.24) 50%, rgba(148, 163, 184, 0.12) 75%);
  background-size: 200% 100%;
  animation: student-registry-skeleton-shimmer 1.15s ease-in-out infinite;
}

.student-registry-card--skeleton .student-registry-card-avatar--fallback {
  animation: student-registry-skeleton-shimmer 1.15s ease-in-out infinite;
}

@keyframes student-registry-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.student-registry-card--has-published-result .student-registry-card-main {
  padding-right: 0;
}

.student-registry-card-main {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.student-registry-card-media {
  width: 6.5rem;
  gap: 0.45rem;
}

.student-registry-card-avatar {
  position: relative;
  width: 100%;
  height: 6.5rem;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(224, 238, 252, 0.92), rgba(202, 223, 246, 0.86));
  border: 1px solid rgba(10, 63, 113, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.student-registry-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.student-registry-card-avatar--fallback {
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
}

.student-registry-card-gender-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(10, 63, 113, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.student-registry-card-gender-badge--female {
  background: #e85b97;
}

.student-registry-card-gender-badge--male {
  background: #1c7ed6;
}

.student-registry-card-gender-badge i {
  font-size: 0.78rem;
  line-height: 1;
}

.student-registry-card-media-meta {
  margin: 0;
  display: grid;
  gap: 0.45rem;
  text-align: center;
}

.student-registry-card-media-meta div {
  min-width: 0;
  display: grid;
  justify-items: center;
}

.student-registry-card-media-meta dt {
  margin: 0 0 0.08rem;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.student-registry-card-media-meta dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 700;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.student-registry-card-body {
  min-width: 0;
  gap: 0.65rem;
}

.student-registry-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.student-registry-card-head > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.student-registry-card-head .eyebrow {
  letter-spacing: 0.04em;
}

.student-registry-card-head h3 {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  line-height: 1.3;
}

.student-registry-card-details {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 0.85rem;
}

.student-registry-card--has-published-result .student-registry-card-details,
.student-registry-card--has-published-result .student-registry-card-body > .helper {
  padding-right: 2.05rem;
}

.student-registry-card-details div {
  min-width: 0;
}

.student-registry-card-details dt {
  margin: 0 0 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.student-registry-card-details dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.student-registry-card-details-email {
  font-size: 0.82rem;
  text-transform: lowercase;
}

.student-registry-card-actions {
  justify-content: flex-start;
}

.student-registry-card-inline .inline-form-panel {
  border: 1px solid rgba(10, 63, 113, 0.1);
  background: rgba(247, 251, 255, 0.86);
}

.student-registry-card-inline .student-entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.student-registry-card-inline .student-entry-grid > .student-entry-address-field,
.student-registry-card-inline .student-entry-grid > .full {
  grid-column: 1 / -1;
}

.student-registry-card-result-preview {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 1.95rem;
  min-width: 1.95rem;
  height: 3.25rem;
  padding: 0.25rem 0.34rem;
  border: 1px solid rgba(140, 102, 0, 0.28);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(180deg, #ffe27a 0%, #ffd23f 45%, #f2b403 100%);
  color: #6a4500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: 0 10px 16px rgba(196, 144, 0, 0.22);
  z-index: 2;
}

.student-registry-card-result-preview:hover,
.student-registry-card-result-preview:focus-visible {
  transform: translateY(-50%);
  background: linear-gradient(180deg, #ffe891 0%, #ffd84f 45%, #f5ba0d 100%);
  border-color: rgba(140, 102, 0, 0.38);
  border-right: 0;
  color: #5b3a00;
}

.student-registry-card-result-preview:focus-visible {
  outline: 2px solid rgba(140, 102, 0, 0.34);
  outline-offset: 3px;
}

.student-registry-card-result-preview i {
  transform: none;
}

.student-registry-card-result-preview i {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.student-status-actions {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.24rem;
  white-space: nowrap;
}

.student-status-actions--card {
  gap: 0.4rem;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.student-status-toggle {
  padding: 0;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.student-status-toggle:hover,
.student-status-toggle:focus-visible {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.attendance-holiday-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  color: inherit;
}

.student-status-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.2rem;
  height: 1.25rem;
  border-radius: 999px;
  padding: 0.14rem;
  transition: background 140ms ease;
}

.student-status-toggle--active .student-status-toggle-track {
  background: #1e9f57;
}

.student-status-toggle--inactive .student-status-toggle-track {
  background: #d74848;
}

.student-status-toggle-thumb {
  width: 0.97rem;
  height: 0.97rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(10, 63, 113, 0.25);
  transition: transform 140ms ease;
}

.student-status-toggle--active .student-status-toggle-thumb {
  transform: translateX(0.81rem);
}

.student-status-toggle--inactive .student-status-toggle-thumb {
  transform: translateX(0);
}

.student-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.student-status-pill--active {
  background: rgba(0, 168, 89, 0.12);
  color: #0d7a45;
}

.student-status-pill--inactive {
  background: rgba(237, 50, 55, 0.12);
  color: #c0392b;
}

.student-status-pill--enable {
  background: rgba(0, 168, 89, 0.1);
  border-color: rgba(0, 168, 89, 0.22);
  color: #0d7a45;
}

.student-status-pill--enable:hover,
.student-status-pill--enable:focus-visible {
  background: rgba(0, 168, 89, 0.16);
}

.student-status-pill--disable {
  background: rgba(53, 82, 116, 0.08);
  border-color: rgba(53, 82, 116, 0.18);
  color: #4b617b;
}

.student-status-pill--disable:hover,
.student-status-pill--disable:focus-visible {
  background: rgba(53, 82, 116, 0.14);
}

.student-status-pill--edit {
  background: rgba(0, 108, 181, 0.1);
  border-color: rgba(0, 108, 181, 0.2);
  color: #0b5a95;
}

.student-status-pill--edit:hover,
.student-status-pill--edit:focus-visible,
.student-status-pill--edit.is-active {
  background: rgba(0, 108, 181, 0.17);
  border-color: rgba(0, 108, 181, 0.26);
  color: #084a7b;
}

th, td {
  padding: 0.48rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: sticky;
  top: 0;
  background: rgba(236, 245, 255, 0.96);
  z-index: 1;
}

.staff-table th:nth-child(4),
.staff-table td:nth-child(4),
.staff-table th:nth-child(5),
.staff-table td:nth-child(5),
.staff-table th:nth-child(6),
.staff-table td:nth-child(6) {
  /* legacy nth-child column hints replaced by .staff-col-* classes */
}

.staff-table th:nth-child(3),
.staff-table td:nth-child(3) {
  /* legacy nth-child column hint replaced by .staff-col-class */
}

.staff-table th:nth-child(8),
.staff-table td:nth-child(8) {
  /* legacy nth-child column hint replaced by .staff-col-signin */
}

.staff-table th:nth-child(9),
.staff-table td:nth-child(9) {
  /* legacy nth-child column hint replaced by .staff-col-status */
}

.staff-table th:nth-child(10),
.staff-table td:nth-child(10) {
  /* legacy nth-child column hint replaced by .staff-col-actions */
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.26rem 0.52rem;
  border-radius: 999px;
  background: rgba(0, 108, 181, 0.12);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
}

.pill.success { background: rgba(45, 108, 79, 0.14); color: var(--success); }
.pill.warning { background: rgba(139, 90, 18, 0.14); color: var(--warning); }

.section-link-preview-pill {
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.section-link-preview-pill:hover,
.section-link-preview-pill:focus-visible {
  border-color: rgba(10, 63, 113, 0.18);
  box-shadow: 0 8px 18px rgba(10, 63, 113, 0.08);
  transform: translateY(-1px);
}

.section-link-preview-pill.is-active {
  border-color: rgba(10, 63, 113, 0.24);
  box-shadow: inset 0 0 0 1px rgba(10, 63, 113, 0.08), 0 8px 18px rgba(10, 63, 113, 0.08);
}

.section-link-preview-toolbar {
  align-items: center;
}

.section-link-preview-table .section-link-preview-profile-col {
  width: 30%;
}

.attendance-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid rgba(10, 63, 113, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.attendance-inline-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.attendance-inline-toggle span {
  line-height: 1.2;
}

.attendance-view-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.attendance-view-toggle--trailing {
  margin-left: auto;
}

.attendance-view-toggle__button {
  min-width: 4.1rem;
  padding: 0.42rem 0.78rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
}

.attendance-view-toggle__button.is-active {
  background: rgba(0, 108, 181, 0.14);
  color: var(--accent-strong);
}

.attendance-register-window {
  --attendance-register-row-height: 11.5rem;
  max-height: calc((var(--attendance-register-row-height) * 3) + 1.4rem);
  overflow: auto;
  padding: 0.18rem;
  border: 1px solid rgba(10, 63, 113, 0.1);
  border-radius: 22px;
  background: rgba(245, 250, 255, 0.92);
  scroll-behavior: smooth;
}

.attendance-register-window--list {
  --attendance-register-row-height: 6.1rem;
}

.attendance-register-window::-webkit-scrollbar {
  width: 10px;
}

.attendance-register-window::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(10, 63, 113, 0.22);
}

.attendance-register-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}

.attendance-register-list {
  display: grid;
  gap: 0.55rem;
}

.attendance-register-table {
  width: 100%;
  min-width: 780px;
  border-collapse: separate;
  border-spacing: 0;
}

.attendance-register-table th,
.attendance-register-table td {
  vertical-align: top;
}

.attendance-register-table__summary {
  display: grid;
  gap: 0.18rem;
  min-width: 10rem;
}

.attendance-student-card,
.attendance-student-list-row {
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
  border: 1px solid rgba(10, 63, 113, 0.12);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 247, 255, 0.92));
  content-visibility: auto;
  contain-intrinsic-size: 280px 190px;
}

.attendance-student-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.attendance-student-card__head h4 {
  margin: 0;
  font-size: 0.92rem;
}

.attendance-student-card__head .helper {
  display: block;
  margin-top: 0.14rem;
  font-size: 0.76rem;
}

.attendance-student-card__summary {
  margin: 0;
}

.attendance-student-card__summary .helper {
  font-size: 0.74rem;
}

.attendance-student-list-row {
  gap: 0.55rem;
}

.attendance-student-list-row__identity,
.attendance-student-list-row__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.attendance-student-list-row__identity h4 {
  margin: 0;
  font-size: 0.9rem;
}

.attendance-student-list-row__identity .helper,
.attendance-student-list-row__meta .helper {
  margin: 0;
  font-size: 0.74rem;
}

.attendance-student-list-row__attendance {
  display: grid;
  gap: 0.18rem;
  min-width: 11rem;
}

.attendance-student-list-row__reason {
  text-align: right;
}

.attendance-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.attendance-status-grid--list {
  grid-template-columns: repeat(4, minmax(70px, 1fr));
}

.attendance-status-button {
  --attendance-status-color: var(--accent);
  display: grid;
  justify-items: center;
  gap: 0.32rem;
  min-height: 4.1rem;
  padding: 0.55rem 0.3rem;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
}

.attendance-status-button:hover,
.attendance-status-button:focus-visible {
  border-color: var(--attendance-status-color);
  color: var(--attendance-status-color);
  transform: translateY(-1px);
}

.attendance-status-button:disabled {
  border-color: rgba(10, 63, 113, 0.1);
  background: rgba(237, 242, 247, 0.92);
  color: rgba(93, 116, 139, 0.8);
  cursor: not-allowed;
  transform: none;
}

.attendance-status-button:disabled:hover,
.attendance-status-button:disabled:focus-visible {
  border-color: rgba(10, 63, 113, 0.1);
  color: rgba(93, 116, 139, 0.8);
  transform: none;
}

.attendance-status-button:disabled .attendance-status-button__dot {
  background: #c6d2de;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.88);
}

.attendance-status-button.is-active {
  border-color: var(--attendance-status-color);
  background: color-mix(in srgb, var(--attendance-status-color) 14%, white);
  color: var(--attendance-status-color);
}

.attendance-status-button__dot {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: var(--attendance-status-color);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.attendance-status-button__label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
}

.attendance-status-button--present { --attendance-status-color: var(--success); }
.attendance-status-button--absent { --attendance-status-color: var(--warning); }
.attendance-status-button--late { --attendance-status-color: #f59e0b; }
.attendance-status-button--leave { --attendance-status-color: var(--accent); }

.attendance-student-card__reason,
.attendance-student-list-row__reason {
  margin: 0;
  font-size: 0.74rem;
}

.attendance-student-card__reason:empty,
.attendance-student-list-row__reason:empty {
  display: none;
}

.attendance-holiday-banner {
  margin-top: -0.1rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(236, 242, 248, 0.96), rgba(227, 235, 244, 0.92));
  color: #516579;
  font-size: 0.84rem;
  font-weight: 700;
}

.attendance-holiday-banner--online {
  border-color: rgba(15, 159, 122, 0.2);
  background: linear-gradient(180deg, rgba(240, 252, 248, 0.98), rgba(228, 247, 240, 0.94));
  color: #17634f;
}

.attendance-coverage-matrix-wrap {
  max-height: none;
  overflow-y: visible;
  overflow-x: auto;
}

.attendance-coverage-matrix-layout {
  display: grid;
  gap: 0.9rem;
}

.attendance-coverage-matrix-cards {
  display: none;
  gap: 0.75rem;
}

.attendance-coverage-matrix-card {
  border: 1px solid rgba(10, 63, 113, 0.08);
  border-radius: 1rem;
  background: rgba(248, 251, 255, 0.94);
  padding: 0.9rem;
}

.attendance-coverage-matrix-card__title {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #21476d;
}

.attendance-coverage-matrix-card__sections {
  display: grid;
  gap: 0.55rem;
}

.attendance-coverage-matrix-card__section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.attendance-coverage-matrix-card__section-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #52677b;
}

.attendance-coverage-matrix {
  width: 100%;
  min-width: 42rem;
}

.attendance-coverage-matrix th,
.attendance-coverage-matrix td {
  text-align: center;
  vertical-align: middle;
}

.attendance-coverage-matrix th:first-child,
.attendance-coverage-matrix td:first-child {
  text-align: left;
}

.attendance-coverage-matrix__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.attendance-coverage-matrix__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.38rem 0.68rem;
  border: 1px solid rgba(10, 63, 113, 0.1);
  border-radius: 999px;
  background: rgba(244, 248, 252, 0.96);
  color: #4d6479;
  font-size: 0.76rem;
  font-weight: 700;
}

.attendance-coverage-matrix__cell {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 6.8rem;
  padding: 0.38rem 0.52rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.attendance-coverage-matrix__cell--complete {
  background: rgba(15, 159, 122, 0.12);
  color: #17634f;
}

.attendance-coverage-matrix__cell--partial {
  background: rgba(245, 158, 11, 0.14);
  color: #9a5a00;
}

.attendance-coverage-matrix__cell--missing {
  background: rgba(211, 61, 74, 0.12);
  color: #9a2230;
}

.attendance-coverage-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  flex: 0 0 0.72rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(10, 63, 113, 0.14);
}

.attendance-coverage-dot--complete {
  background: #0f9f7a;
}

.attendance-coverage-dot--partial {
  background: #f59e0b;
}

.attendance-coverage-dot--missing {
  background: #d33d4a;
}

.attendance-coverage-matrix__count {
  line-height: 1.15;
}

.attendance-coverage-matrix__na {
  color: #90a0b4;
  font-weight: 700;
}

@media (max-width: 820px) {
  .attendance-coverage-matrix-wrap--table {
    display: none;
  }

  .coverage-snapshot-section-head__actions {
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
    align-items: flex-start;
  }

  .coverage-snapshot-head-controls {
    width: 100%;
    justify-content: flex-start;
  }

  #approver-attendance-coverage-snapshot .coverage-date-select {
    max-width: 100%;
  }

  .section-head .attendance-coverage-matrix__legend {
    flex: 1 1 100%;
    min-width: 0;
    margin-left: 0;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .section-head .attendance-coverage-matrix__legend > * {
    min-width: 0;
    max-width: 100%;
  }

  .attendance-coverage-matrix__legend label {
    flex: 1 1 100%;
    min-width: 0;
  }

  .attendance-coverage-matrix__legend button {
    max-width: 100%;
  }

  .attendance-coverage-matrix__legend-item {
    flex: 0 1 auto;
    min-width: 0;
    white-space: normal;
  }

  .attendance-coverage-matrix-cards {
    display: grid;
  }

  .attendance-coverage-matrix__legend {
    justify-content: flex-start;
  }

  .attendance-coverage-matrix-card__section {
    align-items: flex-start;
    flex-direction: column;
  }

  .attendance-coverage-matrix__cell {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }
}

.attendance-pending-leaves-table-wrap {
  max-height: 34rem;
}

.attendance-pending-leaves-table {
  min-width: 48rem;
}

.attendance-pending-leaves-table th,
.attendance-pending-leaves-table td {
  padding-top: 0.38rem;
  padding-bottom: 0.38rem;
  vertical-align: middle;
}

.attendance-pending-leaves-table .helper {
  font-size: 0.72rem;
  line-height: 1.25;
}

.attendance-pending-leaves-student-cell,
.attendance-pending-leaves-details-cell {
  line-height: 1.24;
}

.attendance-pending-leaves-actions {
  gap: 0.3rem;
  flex-wrap: nowrap;
}

.attendance-pending-leaves-actions button {
  padding: 0.34rem 0.55rem;
  font-size: 0.72rem;
}

.attendance-calendar-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.72rem;
}

.attendance-calendar-section-head {
  align-items: flex-start;
}

.attendance-calendar-table-wrap {
  max-height: 430px;
  overflow: auto;
}

.attendance-calendar-table th,
.attendance-calendar-table td {
  padding: 0.55rem 0.68rem;
  vertical-align: middle;
}

.attendance-calendar-table .helper {
  font-size: 0.76rem;
  line-height: 1.3;
}

.attendance-calendar-table .student-status-toggle {
  min-height: 1.8rem;
}

.attendance-calendar-table .button-row button {
  padding: 0.34rem 0.55rem;
  font-size: 0.72rem;
}

.attendance-template-section-head {
  align-items: flex-start;
}

.attendance-template-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.72rem;
}

.attendance-template-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.attendance-template-table th,
.attendance-template-table td {
  padding: 0.55rem 0.68rem;
  vertical-align: middle;
}

.attendance-template-table .helper {
  font-size: 0.76rem;
  line-height: 1.3;
}

.attendance-template-table td:nth-child(2) {
  max-width: 620px;
}

.attendance-template-table button {
  padding: 0.34rem 0.55rem;
  font-size: 0.72rem;
}

.attendance-calendar-note-field {
  grid-column: span 2;
}

.attendance-calendar-filter-toolbar {
  flex-wrap: wrap;
  gap: 0.45rem;
}

.attendance-calendar-filter-button {
  min-width: 0;
}

.attendance-calendar-filter-button.is-active {
  border-color: rgba(10, 63, 113, 0.2);
  background: rgba(225, 238, 252, 0.98);
  color: var(--accent-strong);
}

.attendance-calendar-row-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.attendance-calendar-inline-edit-row td {
  padding-top: 0;
}

.attendance-calendar-inline-edit {
  display: grid;
  gap: 0.65rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(10, 63, 113, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(240, 246, 252, 0.94));
}

.attendance-calendar-inline-edit__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.55rem;
}

.attendance-calendar-inline-edit__note {
  grid-column: span 2;
}

.attendance-calendar-inline-edit__repeat {
  display: grid;
  gap: 0.45rem;
}

.attendance-calendar-inline-edit__repeat > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.attendance-calendar-inline-edit__actions {
  justify-content: flex-end;
}

.attendance-calendar-weekday-field {
  display: grid;
  gap: 0.55rem;
}

.attendance-calendar-weekday-field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.attendance-calendar-weekday-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.12rem;
}

.attendance-calendar-weekday-option {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(10, 63, 113, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}

.attendance-calendar-weekday-option--all-days {
  border-color: rgba(10, 63, 113, 0.22);
  background: rgba(241, 248, 255, 0.98);
}

.attendance-calendar-weekday-option input[type="checkbox"] {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: var(--accent);
}

@media (max-width: 900px) {
  .attendance-calendar-note-field {
    grid-column: 1 / -1;
  }

  .attendance-calendar-inline-edit__note {
    grid-column: 1 / -1;
  }
}

.attendance-reason-dialog {
  position: fixed;
  inset: 0;
  width: min(320px, calc(100vw - 1rem));
  margin: auto;
  padding: 0.75rem;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 20px;
  background: #f8fbff;
  box-shadow: 0 24px 60px rgba(10, 63, 113, 0.2);
}

.attendance-reason-dialog::backdrop {
  background: rgba(11, 30, 52, 0.45);
}

.attendance-reason-dialog__form {
  display: grid;
  gap: 0.38rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.attendance-reason-dialog__field {
  gap: 0;
}

.attendance-reason-dialog__header h3 {
  margin: 0;
  font-size: 1rem;
}

.attendance-reason-dialog__header .helper {
  margin: 0.12rem 0 0;
}

.attendance-reason-dialog .button-row {
  margin-top: 0.12rem;
  justify-content: flex-end;
}

.attendance-reason-dialog button {
  min-height: 2.35rem;
}

.attendance-thin-bar {
  position: relative;
  width: 100%;
  height: 0.34rem;
  border-radius: 999px;
  background: #dde8f3;
  overflow: hidden;
}

.attendance-thin-bar__fill {
  height: 100%;
  border-radius: inherit;
}

.attendance-thin-bar__label {
  margin-top: 0.08rem;
  font-size: 0.7rem;
}

@media (max-width: 720px) {
  .attendance-view-toggle--trailing {
    margin-left: 0;
  }

  .attendance-register-window {
    --attendance-register-row-height: 13rem;
  }

  .attendance-register-window--list {
    --attendance-register-row-height: 7.3rem;
  }

  .attendance-register-table {
    min-width: 640px;
  }

  .attendance-student-list-row__identity,
  .attendance-student-list-row__meta {
    display: grid;
    justify-content: stretch;
  }
}

.hero .pill {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f6fbff;
}

.hero .pill.success {
  background: rgba(0, 168, 89, 0.2);
  border-color: rgba(180, 255, 212, 0.28);
  color: #effff5;
}

.hero .pill.warning {
  background: var(--chs-red);
  border-color: rgba(255, 196, 198, 0.26);
  color: #ffe9ea;
}

.dashboard-visibility-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-control-column {
  min-width: 0;
  gap: 0.6rem;
}

.dashboard-feature-list {
  display: grid;
  gap: 0.6rem;
}

.dashboard-feature-list-manager,
.dashboard-feature-list-approver {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-working-days-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}

.app-working-days-list .checkbox-field {
  width: auto;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

.dashboard-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(246, 252, 255, 0.82);
}

.dashboard-switch-copy {
  min-width: 0;
}

.dashboard-switch-copy span {
  display: block;
  color: var(--text);
  line-height: 1.2;
  font-weight: 400;
}

.dashboard-switch {
  position: relative;
  display: inline-flex;
  width: 3rem;
  height: 1.65rem;
  flex: 0 0 auto;
}

.dashboard-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dashboard-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(10, 63, 113, 0.16);
  border: 1px solid rgba(10, 63, 113, 0.12);
  transition: background 160ms ease, border-color 160ms ease;
}

.dashboard-switch-slider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.12rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0.2rem 0.45rem rgba(10, 63, 113, 0.18);
  transition: transform 160ms ease;
  transform: translateY(-50%);
}

.dashboard-switch input:checked + .dashboard-switch-slider {
  background: linear-gradient(135deg, rgba(10, 63, 113, 0.95), rgba(0, 108, 181, 0.9));
  border-color: rgba(0, 108, 181, 0.45);
}

.dashboard-switch input:checked + .dashboard-switch-slider::after {
  transform: translate(1.32rem, -50%);
}

.dashboard-switch input:focus-visible + .dashboard-switch-slider {
  outline: 2px solid rgba(0, 108, 181, 0.28);
  outline-offset: 2px;
}

.operator-home-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  align-items: start;
}

.operator-home-intro {
  min-width: 0;
}

.operator-home-intro h3,
.operator-step-title h4 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.operator-home-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.operator-home-actions {
  margin-top: 0.25rem;
}

.operator-home-stats,
.operator-step-grid,
.manager-staff-card-grid {
  display: grid;
  gap: 0.75rem;
}

.operator-home-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.operator-mini-stat {
  min-height: 5.6rem;
  justify-content: center;
}

.operator-mini-stat .metric {
  margin-top: 0;
}

.operator-mini-stat .metric-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 1.1em;
  width: 100%;
}

.operator-mini-stat .metric-loading span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.28;
  animation: operatorMetricDotPulse 1s ease-in-out infinite;
}

.operator-mini-stat .metric-loading span:nth-child(2) {
  animation-delay: 0.15s;
}

.operator-mini-stat .metric-loading span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes operatorMetricDotPulse {
  0%, 80%, 100% {
    opacity: 0.28;
    transform: translateY(0) scale(0.86);
  }

  40% {
    opacity: 1;
    transform: translateY(-0.14rem) scale(1);
  }
}

.operator-step-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manager-staff-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-demo-assignment-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  align-items: start;
}

.manager-staff-profile-card {
  padding: 0.58rem;
  gap: 0.4rem;
}

.manager-staff-profile-card--editing {
  border-color: rgba(24, 93, 169, 0.34);
  box-shadow: 0 18px 38px rgba(15, 37, 64, 0.08);
}

.manager-staff-profile-card h3 {
  margin: 0 0 0.2rem;
  font-size: 0.92rem;
  line-height: 1.2;
}

.manager-staff-profile-card .helper {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.2;
}

.manager-staff-profile-card > div:first-child {
  display: grid;
  gap: 0.14rem;
}

.manager-staff-profile-card .toolbar {
  gap: 0.3rem;
}

.manager-staff-profile-card .pill {
  padding: 0.2rem 0.42rem;
  font-size: 0.68rem;
}

.manager-staff-profile-card .table-actions {
  gap: 0.25rem;
}

.manager-staff-profile-card .manager-staff-action-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.manager-staff-profile-card .manager-staff-action-row-main {
  row-gap: 0.2rem;
}

.manager-staff-profile-card .ghost {
  font-size: 0.74rem;
  padding: 0.05rem 0.12rem;
}

.compact-demo-assigned {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid rgba(10, 63, 113, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.compact-demo-assigned--empty {
  background: rgba(243, 248, 253, 0.72);
}

.compact-demo-result-list {
  display: grid;
  gap: 0.45rem;
}

.compact-demo-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: stretch;
}

.compact-demo-result {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(10, 63, 113, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.compact-demo-result:hover,
.compact-demo-result:focus-visible {
  transform: none;
  background: rgba(224, 238, 252, 0.98);
  border-color: rgba(10, 63, 113, 0.24);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(10, 63, 113, 0.10);
}

.compact-demo-result--active,
.compact-demo-result--active:hover,
.compact-demo-result--active:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(10, 63, 113, 0.18);
}

.compact-demo-result-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.compact-demo-result-copy strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--accent-strong);
}

.compact-demo-result:hover .compact-demo-result-copy strong,
.compact-demo-result:focus-visible .compact-demo-result-copy strong {
  color: var(--accent-strong);
}

.compact-demo-result--active .compact-demo-result-copy strong,
.compact-demo-result--active:hover .compact-demo-result-copy strong,
.compact-demo-result--active:focus-visible .compact-demo-result-copy strong,
.compact-demo-result--active .helper,
.compact-demo-result--active:hover .helper,
.compact-demo-result--active:focus-visible .helper {
  color: #ffffff;
}

.compact-demo-result .helper {
  overflow-wrap: anywhere;
}

.compact-demo-result-unlink {
  min-width: 88px;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(192, 57, 43, 0.22);
  background: rgba(255, 244, 242, 0.96);
  color: #a93226;
}

.compact-demo-result-unlink:hover,
.compact-demo-result-unlink:focus-visible {
  transform: none;
  background: rgba(252, 232, 228, 0.98);
  border-color: rgba(192, 57, 43, 0.34);
  color: #8e271d;
}

.compact-demo-card-hint {
  margin: 0;
}

.compact-demo-active-profile {
  gap: 0.6rem;
}

.compact-demo-search-toolbar {
  justify-content: space-between;
}

.compact-demo-action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
}

.compact-demo-action-row > button {
  width: 100%;
  justify-content: center;
}

.staff-edit-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(9, 21, 35, 0.44);
  backdrop-filter: blur(4px);
}

.staff-edit-popup-modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
  gap: 0.9rem;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.99), rgba(236, 245, 255, 0.96));
  box-shadow: 0 24px 60px rgba(10, 36, 64, 0.22);
}

.staff-edit-popup-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.staff-edit-popup-modal .button-row {
  margin-top: 0.15rem;
}

.staff-assignment-conflict-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(9, 21, 35, 0.46);
  backdrop-filter: blur(4px);
}

.staff-assignment-conflict-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
  gap: 0.9rem;
}

.staff-assignment-conflict-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.staff-assignment-conflict-card {
  padding: 0.85rem;
  gap: 0.3rem;
}

.staff-assignment-conflict-card h3,
.staff-assignment-conflict-card .helper {
  margin: 0;
}

.signout-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(9, 21, 35, 0.42);
  backdrop-filter: blur(4px);
}

.signout-confirm-modal {
  width: min(420px, 100%);
  padding: 1rem;
  gap: 0.85rem;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.99), rgba(236, 245, 255, 0.96));
  box-shadow: 0 24px 60px rgba(10, 36, 64, 0.22);
}

.signout-confirm-modal h3,
.signout-confirm-modal .helper {
  margin: 0;
}

.signout-confirm-modal .secondary {
  border-color: rgba(10, 63, 113, 0.16);
  background: rgba(241, 248, 255, 0.96);
  color: var(--text);
}

.signout-confirm-modal .secondary:hover,
.signout-confirm-modal .secondary:focus-visible {
  background: rgba(224, 238, 252, 0.98);
  color: var(--text);
  border-color: rgba(10, 63, 113, 0.28);
}

.password-setup-modal form {
  gap: 0.7rem;
}

.password-setup-modal label {
  gap: 0.34rem;
  font-size: 0.88rem;
  color: #0f2540;
  font-weight: 600;
}

.password-setup-modal input {
  min-height: 46px;
  border-radius: 14px;
  padding: 0.7rem 0.82rem;
}

@media (max-width: 1400px) {
  .manager-staff-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compact-demo-assignment-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 900px) {
  .manager-staff-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-demo-assignment-grid {
    grid-template-columns: 1fr;
  }

  .compact-demo-result-row {
    grid-template-columns: 1fr;
  }

  .compact-demo-action-row {
    grid-template-columns: 1fr;
  }

  .staff-edit-popup-modal {
    width: min(100%, 100%);
    padding: 0.85rem;
  }

  .staff-edit-popup-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .staff-assignment-conflict-summary {
    grid-template-columns: 1fr;
  }

  .table-wrap > table {
    min-width: max-content;
    table-layout: auto;
  }

  .table-wrap > table th {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  .table-wrap > table td {
    word-break: normal;
    overflow-wrap: normal;
  }

  .table-wrap.has-mobile-table-scroll {
    margin-bottom: 2.4rem;
  }

  .mobile-table-scrollbar {
    display: none !important;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.45rem;
    z-index: 20;
    overflow-x: auto;
    overflow-y: hidden;
    height: 18px;
    margin-top: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(236, 245, 255, 0.96);
    box-shadow: 0 10px 22px rgba(10, 63, 113, 0.14);
  }

  .mobile-table-scrollbar.is-visible {
    display: none !important;
  }

  .student-registry-card-grid {
    grid-template-columns: 1fr;
  }

  .student-registry-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .student-registry-table-wrap > .student-registry-table,
  .student-registry-table {
    min-width: 0;
    width: max-content;
  }

  .student-registry-table th,
  .student-registry-table td {
    white-space: nowrap;
    padding-inline: 0.55rem;
  }

  /* Keep inline edit form mobile-friendly inside table row */
  .student-registry-table tr.inline-draft-edit-row {
    position: sticky;
    left: 0;
    z-index: 1;
  }

  .student-registry-table tr.inline-draft-edit-row td {
    display: block;
    white-space: normal;
    min-width: 0;
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
    padding: 0.7rem 0.8rem;
    background: rgba(246, 252, 255, 0.92);
  }

  .student-registry-table tr.inline-draft-edit-row .inline-form-panel {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin-inline: 0;
    box-sizing: border-box;
  }

  .student-registry-table tr.inline-draft-edit-row #student-form.student-entry-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .student-registry-table tr.inline-draft-edit-row #student-form .span-2,
  .student-registry-table tr.inline-draft-edit-row #student-form .span-4,
  .student-registry-table tr.inline-draft-edit-row #student-form .student-entry-address-field,
  .student-registry-table tr.inline-draft-edit-row #student-form .full {
    grid-column: 1 / -1;
  }

  .student-registry-table tr.inline-draft-edit-row #student-form input,
  .student-registry-table tr.inline-draft-edit-row #student-form select,
  .student-registry-table tr.inline-draft-edit-row #student-form textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .student-registry-table tr.inline-draft-edit-row #student-form .button-row {
    flex-wrap: wrap;
  }

  .student-registry-card-main {
    grid-template-columns: 4.75rem minmax(0, 1fr);
  }

  .student-registry-card-avatar {
    width: 100%;
    height: 4.75rem;
  }

  .student-registry-card-media {
    width: 4.75rem;
  }

  .student-registry-card-details {
    grid-template-columns: 1fr;
  }
}


.operator-step-card {
  min-height: 16.5rem;
}

.operator-step-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 108, 181, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.operator-step-title {
  display: grid;
  gap: 0.55rem;
}

.operator-step-title i,
.operator-home-intro h3 i {
  color: var(--accent);
}

@media (max-width: 1080px) {
  .parent-guardian-profile-form {
    grid-template-columns: 1fr;
  }

  .parent-guardian-profile-field,
  .parent-guardian-profile-field.full {
    grid-column: 1;
  }

  .parent-overview-primary-card {
    grid-column: auto;
  }

  .parent-overview-layout .parent-guardian-profile-card {
    grid-column: auto;
  }

  .parent-hero {
    padding: 0.85rem 0.9rem;
  }

  .parent-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .parent-hero-stat {
    padding: 0.65rem 0.72rem;
    gap: 0.62rem;
    align-items: flex-start;
  }

  .parent-hero-stat-icon {
    width: 1.95rem;
    height: 1.95rem;
    flex-basis: 1.95rem;
  }

  .parent-analytics-grid {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: visible;
  }

  .parent-signal-grid {
    grid-template-columns: 1fr;
  }

  .parent-child-grid {
    grid-template-columns: 1fr;
  }

  .parent-child-card-main {
    grid-template-columns: 4.75rem minmax(0, 1fr);
  }

  .parent-child-card-media {
    width: 4.75rem;
  }

  .parent-child-card-media .student-registry-card-avatar {
    height: 4.75rem;
  }

  .parent-child-card-details {
    grid-template-columns: 1fr;
  }

  .dashboard-visibility-grid,
  .dashboard-guide-grid,
  .operator-home-grid,
  .operator-step-grid,
  .manager-staff-card-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-feature-list-manager,
  .dashboard-feature-list-approver {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1240px) {
  .dashboard-visibility-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1081px) and (max-width: 1360px) {
  .dashboard-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .operator-home-stats {
    grid-template-columns: 1fr;
  }

  .admin-user-access-controls-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

.empty {
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.code-block {
  margin: 0;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(44, 34, 23, 0.92);
  color: #fff8f0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font: 0.92rem/1.5 "Courier New", monospace;
}

.flash {
  margin-bottom: 1rem;
  padding: 0.72rem 0.85rem;
  border-radius: 18px;
  background: rgba(45, 108, 79, 0.12);
  color: var(--success);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.warn { background: rgba(139, 90, 18, 0.12); color: var(--warning); }

.flash-close {
  padding: 0.2rem 0.55rem;
  min-width: 0;
  border: 1px solid rgba(10, 63, 113, 0.16);
  background: rgba(241, 248, 255, 0.9);
  color: inherit;
  font-size: 1rem;
  line-height: 1;
}

.aso-notification-container {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: var(--toast-gap);
  max-width: var(--toast-max-width);
  z-index: 99999;
  pointer-events: none;
}

.aso-notification-container.top-right { top: 36px; right: 0; align-items: flex-end; }
.aso-notification-container.top-center { top: 36px; left: 50%; transform: translateX(-50%); align-items: center; }
.aso-notification-container.bottom-right { right: 0; bottom: 36px; align-items: flex-end; }
.aso-notification-container.bottom-center { left: 50%; bottom: 36px; transform: translateX(-50%); align-items: center; }

.aso-notification {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(calc(100vw - 20px), var(--toast-max-width));
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 999px 0 0 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  font-size: 13px;
  pointer-events: auto;
  animation: aso-notification-enter 0.22s cubic-bezier(0.2, 0, 0, 1);
}

.aso-notification.is-exiting {
  animation: aso-notification-exit 0.22s cubic-bezier(0.2, 0, 0, 1) forwards;
}

.aso-notification[data-type="success"] { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.aso-notification[data-type="error"] { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.aso-notification[data-type="warning"] { background: #fef3c7; color: #b7791d; border-color: #fcd34d; }
.aso-notification[data-type="info"] { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }

.aso-notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.aso-notification-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  color: #ffffff;
  flex-shrink: 0;
}

.aso-notification-icon i {
  pointer-events: none;
}

.aso-notification[data-type="success"] .aso-notification-icon { background: #10b981; }
.aso-notification[data-type="error"] .aso-notification-icon { background: #ef4444; }
.aso-notification[data-type="warning"] .aso-notification-icon { background: #f59e0b; }
.aso-notification[data-type="info"] .aso-notification-icon { background: #2563eb; }

.aso-notification-message {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.inline-feedback {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.55rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(10, 63, 113, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 28px rgba(10, 63, 113, 0.08);
}

.inline-feedback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1;
  color: #ffffff;
  flex: 0 0 auto;
}

.inline-feedback-icon i {
  pointer-events: none;
}

.inline-feedback-message {
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 600;
}

.inline-feedback--success {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(212, 237, 218, 0.8);
  color: #155724;
}

.inline-feedback--success .inline-feedback-icon { background: #10b981; }

.inline-feedback--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(254, 243, 199, 0.82);
  color: #8a5a12;
}

.inline-feedback--warning .inline-feedback-icon { background: #f59e0b; }

.inline-feedback--error {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(254, 226, 226, 0.82);
  color: #b91c1c;
}

.inline-feedback--error .inline-feedback-icon { background: #ef4444; }

.inline-feedback--info {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(219, 234, 254, 0.82);
  color: #1e40af;
}

.inline-feedback--info .inline-feedback-icon { background: #2563eb; }

@keyframes button-spinner {
  to { transform: rotate(360deg); }
}

@keyframes aso-notification-enter {
  from { opacity: 0; transform: translateX(16px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes aso-notification-exit {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(16px) scale(0.98); }
}

.code {
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
  background: rgba(10, 63, 113, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

@media print {
  html,
  body {
    background: #ffffff !important;
    color: #1b2d45 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sidebar,
  .topbar,
  .button-row,
  .toolbar,
  button,
  .button {
    display: none !important;
  }

  .content,
  .panel,
  .card,
  .table-wrap,
  .hero {
    box-shadow: none !important;
    border-color: rgba(10, 63, 113, 0.3) !important;
    background: #ffffff !important;
  }

  th {
    background: #dde8f5 !important;
    color: #1b2d45 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  button.is-busy::after,
  .aso-notification,
  .aso-notification.is-exiting {
    animation: none;
  }
}

@media (max-width: 900px) {
  .toast-position-group {
    width: 100%;
    justify-content: space-between;
  }

  .toast-position-select {
    min-width: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 640px) {
  .aso-notification-container.top-right,
  .aso-notification-container.bottom-right {
    right: 10px;
  }

  .aso-notification-container.top-center,
  .aso-notification-container.bottom-center {
    width: calc(100vw - 20px);
  }

  .aso-notification {
    width: 100%;
  }
}

.panel > .split > .card,
.panel > .split > section,
.panel > .stats > .card {
  align-self: start;
}

.panel .stack {
  min-width: 0;
}

.login-shell {
  --login-theme: var(--accent);
  --login-theme-strong: var(--accent-strong);
  --login-theme-shadow: rgba(10, 63, 113, 0.18);
  --login-brand-text: #0f2540;
  --login-brand-subtle: rgba(10, 63, 113, 0.72);
  --login-brand-mark-bg: #ffffff;
  --login-brand-mark-border: rgba(10, 63, 113, 0.1);
  --login-brand-mark-shadow: 0 14px 28px rgba(15, 37, 64, 0.1);
  --login-card-border: rgba(10, 63, 113, 0.1);
  --login-card-shadow: 0 26px 54px rgba(15, 37, 64, 0.12);
  --login-head-border: rgba(10, 63, 113, 0.14);
  --login-head-bg: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(233, 243, 255, 0.92));
  --login-switch-bg: rgba(255, 255, 255, 0.86);
  --login-switch-border: rgba(10, 63, 113, 0.12);
  --login-label-color: #0f2540;
  --login-divider-color: rgba(15, 37, 64, 0.56);
  --login-divider-line: rgba(10, 63, 113, 0.14);
  --login-google-border: rgba(10, 63, 113, 0.16);
  --login-google-hover-border: rgba(10, 63, 113, 0.24);
  --login-attribution-color: rgba(10, 63, 113, 0.68);
  min-height: calc(var(--app-viewport-height) - 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: clamp(0.45rem, 1.7vw, 0.85rem) 0;
}

.login-shell--parent {
  --login-theme: #0d9488;
  --login-theme-strong: #0f766e;
  --login-theme-shadow: rgba(15, 118, 110, 0.22);
  --login-brand-text: #12343b;
  --login-brand-subtle: rgba(15, 118, 110, 0.82);
  --login-brand-mark-bg: linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(219, 247, 243, 0.98));
  --login-brand-mark-border: rgba(13, 148, 136, 0.18);
  --login-brand-mark-shadow: 0 16px 30px rgba(13, 148, 136, 0.14);
  --login-card-border: rgba(13, 148, 136, 0.16);
  --login-card-shadow: 0 28px 58px rgba(8, 47, 73, 0.14);
  --login-head-border: rgba(13, 148, 136, 0.16);
  --login-head-bg: linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(223, 250, 246, 0.94));
  --login-switch-bg: rgba(255, 255, 255, 0.92);
  --login-switch-border: rgba(13, 148, 136, 0.16);
  --login-label-color: #12343b;
  --login-divider-color: rgba(18, 52, 59, 0.6);
  --login-divider-line: rgba(13, 148, 136, 0.16);
  --login-google-border: rgba(13, 148, 136, 0.18);
  --login-google-hover-border: rgba(13, 148, 136, 0.28);
  --login-attribution-color: rgba(15, 118, 110, 0.74);
}

.login-page-brand {
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  text-align: center;
  color: var(--login-brand-text);
}

.login-page-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 16px;
  background: var(--login-brand-mark-bg);
  border: 1px solid var(--login-brand-mark-border);
  box-shadow: var(--login-brand-mark-shadow);
}

.login-page-brand-mark img {
  width: 2.35rem;
  height: 2.35rem;
}

.login-page-brand strong {
  font-size: clamp(1.18rem, 2.3vw, 1.42rem);
  line-height: 1.1;
}

.login-page-brand span {
  color: var(--login-brand-subtle);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.login-card {
  width: min(100%, 448px);
  gap: 0;
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--login-card-border);
  box-shadow: var(--login-card-shadow);
}

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

.login-head {
  padding: 1rem 1.05rem 0.9rem;
  border-bottom: 1px solid var(--login-head-border);
  background: var(--login-head-bg);
}

.login-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
}

.login-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.26rem;
  border-radius: 999px;
  background: var(--login-switch-bg);
  border: 1px solid var(--login-switch-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.login-mode-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 34px;
  padding: 0.36rem 0.82rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 0.92rem;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.login-mode-switch-link:hover {
  color: var(--login-theme-strong);
}

.login-mode-switch-link.active {
  background: linear-gradient(135deg, var(--login-theme), var(--login-theme-strong));
  color: #fff;
  box-shadow: 0 10px 20px var(--login-theme-shadow);
}

.login-mode-switch-link:focus-visible {
  outline: 2px solid rgba(0, 108, 181, 0.35);
  outline-offset: 2px;
}

.login-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: clamp(1.28rem, 2.4vw, 1.56rem);
  color: var(--login-brand-text);
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.login-head h3 i {
  color: var(--login-theme);
  font-size: 0.8em;
}

.login-alerts {
  gap: 0.45rem;
  padding: 0.8rem 1.05rem 0;
}

.login-alerts .flash {
  margin-bottom: 0;
}

.login-form {
  gap: 0.72rem;
  padding: 0.95rem 1.05rem 0.85rem;
}

.login-form[data-busy] {
  pointer-events: none;
}

.login-form label {
  font-size: 0.88rem;
  color: var(--login-label-color);
  font-weight: 600;
  gap: 0.34rem;
}

.login-shell--parent .login-form button[type="submit"] {
  background: linear-gradient(135deg, var(--login-theme), var(--login-theme-strong));
}

.login-shell--parent .login-form button[type="submit"]:hover:not(:disabled),
.login-shell--parent .login-form button[type="submit"]:focus-visible {
  background: var(--login-theme-strong);
}

.login-form input {
  min-height: 46px;
  border-radius: 14px;
  padding: 0.7rem 0.82rem;
}

.login-form button {
  width: 100%;
  margin-top: 0.08rem;
  min-height: 46px;
  font-size: 0.97rem;
}

.login-password-reset {
  align-self: flex-end;
  width: auto;
  min-height: 0;
  margin: -0.08rem 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  transform: none;
  box-shadow: none;
  box-shadow: none;
  color: var(--login-theme-strong);
  font-size: 0.83rem;
  font-weight: 700;
}

.login-password-reset:hover:not(:disabled),
.login-password-reset:focus-visible {
  background: transparent;
  color: #0f2540;
  transform: none;
  box-shadow: none;
  text-decoration: underline;
}

.login-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.08rem 0;
  color: var(--login-divider-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--login-divider-line);
}

.login-divider span {
  position: relative;
  z-index: 1;
  padding: 0 0.75rem;
  background: #ffffff;
}

.login-google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border: 1px solid var(--login-google-border);
  background: #ffffff;
  color: #0f2540;
  box-shadow: 0 12px 22px rgba(15, 37, 64, 0.07);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.login-google-button:hover:not(:disabled),
.login-google-button:focus-visible {
  background: #f7fafc;
  color: #0f2540;
  border-color: var(--login-google-hover-border);
  box-shadow: 0 14px 24px rgba(15, 37, 64, 0.1);
}

.login-google-button-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #4285f4, #34a853 55%, #fbbc05 78%, #ea4335);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.login-attribution {
  margin: 0;
  padding: 0 1.05rem 0.95rem;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--login-attribution-color);
}

.login-attribution a {
  margin: 0.3rem 0 0;
  text-align: center;
  color: var(--login-theme-strong);
  text-decoration: none;
  font-weight: 700;
}

.login-attribution a:hover {
  text-decoration: underline;
}

.shell.sidebar-collapsed .brand-copy,
.shell.sidebar-collapsed .status-card,
.shell.sidebar-collapsed .nav-label,
.shell.sidebar-collapsed .nav-caret,
.shell.sidebar-collapsed .sidebar-head .eyebrow {
  display: none;
}

.shell.sidebar-collapsed .sidebar {
  padding-inline: 0.4rem;
  align-items: center;
}

.shell.sidebar-collapsed .brand,
.shell.sidebar-collapsed .nav {
  width: 100%;
}

.shell.sidebar-collapsed .sidebar-head {
  justify-content: center;
}

.shell.sidebar-collapsed .nav a {
  justify-content: center;
  padding: 0.55rem 0.35rem;
}

.shell.sidebar-collapsed .nav-main {
  justify-content: center;
}

.shell.sidebar-collapsed .nav a:hover,
.shell.sidebar-collapsed .nav .active {
  transform: none;
}

.shell.sidebar-collapsed .nav-icon {
  width: 38px;
  height: 38px;
}

.shell.sidebar-collapsed .sidebar-toggle {
  width: 36px;
  min-width: 36px;
  height: 36px;
}

.shell.sidebar-collapsed .content {
  padding-left: 0.85rem;
}

.shell.login-route {
  grid-template-columns: 1fr;
}

html[data-route-login="1"] .shell {
  grid-template-columns: 1fr;
}

.shell.login-route .sidebar,
.shell.login-route .mobile-topbar,
.shell.login-route .mobile-menu-backdrop,
.shell.login-route .topbar {
  display: none;
}

html[data-route-login="1"] .sidebar,
html[data-route-login="1"] .mobile-topbar,
html[data-route-login="1"] .mobile-menu-backdrop,
html[data-route-login="1"] .topbar {
  display: none;
}

.shell.login-route .content {
  padding: clamp(0.65rem, 2vw, 1rem);
}

html[data-route-login="1"] .content {
  padding: clamp(0.65rem, 2vw, 1rem);
}

.shell.login-route .panel {
  min-height: calc(var(--app-viewport-height) - 1.3rem);
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

html[data-route-login="1"] .panel {
  min-height: calc(var(--app-viewport-height) - 1.3rem);
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.turnstile-widget {
  width: auto;
  max-width: 100%;
  min-height: 0;
  display: flex;
  justify-content: center;
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
  }
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    position: sticky;
    top: 0;
    z-index: 1150;
    padding: 0.8rem 0.85rem;
    background: rgba(244, 250, 255, 0.96);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .mobile-session-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  .topbar .session-bar {
    display: none;
  }
  .content {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
  }
  .scroll-top-button {
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    width: 3.15rem;
    height: 3.15rem;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(88vw, 320px);
    height: var(--app-viewport-height);
    z-index: 1250;
    padding: 1rem 0.85rem;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: linear-gradient(180deg, rgba(10, 63, 113, 0.98), rgba(0, 108, 181, 0.98));
    color: #f2f9ff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transform: translateX(-104%);
    transition: transform 220ms ease;
    box-shadow: 0 20px 50px rgba(10, 63, 113, 0.22);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .sidebar .eyebrow,
  .sidebar .muted,
  .sidebar .helper,
  .sidebar .brand-copy p,
  .sidebar .nav-caret,
  .sidebar .nav-label {
    color: #d9ecff;
  }
  .sidebar .brand-scope-pill {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
  }
  .sidebar .brand-active-child .parent-active-child-chip {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.1));
    box-shadow: 0 10px 20px rgba(5, 33, 59, 0.16);
  }
  .sidebar .brand-active-child .parent-coordinator-chip {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.1));
    box-shadow: 0 10px 20px rgba(5, 33, 59, 0.16);
  }
  .sidebar .brand-active-child .parent-active-child-copy strong {
    color: #f6fbff;
  }
  .sidebar .brand-active-child .parent-coordinator-chip-label {
    color: rgba(217, 236, 255, 0.82);
  }
  .sidebar .brand-active-child .parent-coordinator-chip-copy strong {
    color: #f6fbff;
  }
  .sidebar .brand-active-child .parent-active-child-avatar .student-registry-card-avatar {
    background: rgba(255, 255, 255, 0.18);
  }
  .sidebar .brand-active-child .parent-active-child-avatar {
    background: rgba(255, 255, 255, 0.18);
    color: #f6fbff;
  }
  .sidebar .brand-active-child .parent-coordinator-chip-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #f6fbff;
  }
  .sidebar .brand-scope-pill-label {
    color: rgba(217, 236, 255, 0.82);
  }
  .sidebar .brand-scope-pill-value {
    color: #f6fbff;
  }
  .sidebar .nav a {
    color: #f2f9ff;
    border: none;
    border-radius: 14px;
    outline: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .sidebar .nav-icon {
    background: rgba(236, 246, 255, 0.2);
    color: #eaf5ff;
  }
  .sidebar .brand h1 {
    color: #f2f9ff;
  }
  .shell.mobile-nav-open .sidebar {
    transform: translateX(0);
  }
  /* When nav open: topbar floats above backdrop so × button is clickable */
  .shell.mobile-nav-open .mobile-topbar {
    z-index: 1300;
    background: transparent;
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .shell.mobile-nav-open .mobile-brand {
    opacity: 0;
    pointer-events: none;
  }
  .shell.mobile-nav-open .mobile-session-bar {
    opacity: 0;
    pointer-events: none;
  }
  .shell.mobile-nav-open .mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
  }
  .shell.mobile-nav-open .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
    transform: none;
  }
  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1200;
    border: 0;
    border-radius: 0;
    background: rgba(10, 28, 52, 0.88);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }
  .mobile-menu-backdrop:hover,
  .mobile-menu-backdrop:focus,
  .mobile-menu-backdrop:active {
    background: rgba(10, 28, 52, 0.88);
    border-color: transparent;
    color: transparent;
    transform: none;
    outline: none;
    box-shadow: none;
  }
  .shell.mobile-nav-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar-toggle {
    display: none;
  }
  .split, .hero-grid { grid-template-columns: 1fr; }
  .parent-active-child-chip {
    border-radius: 22px;
    align-items: flex-start;
  }
  .result-entry-form-shell .result-entry-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .result-entry-form-shell .fields-grid-4 { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .dashboard-masonry {
    column-width: auto;
    column-count: 1;
  }
  .odoo-control-grid { grid-template-columns: 1fr; }
  .shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .shell.sidebar-collapsed .brand-copy,
  .shell.sidebar-collapsed .status-card,
  .shell.sidebar-collapsed .nav-label,
  .shell.sidebar-collapsed .nav-caret,
  .shell.sidebar-collapsed .sidebar-head .eyebrow {
    display: initial;
  }
  .shell.sidebar-collapsed .nav a {
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
  }
  .shell.sidebar-collapsed .nav-main { justify-content: flex-start; }
}

@media (max-width: 820px) {
  .result-entry-form-shell .result-entry-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .result-entry-form-shell .fields-grid-4 { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 720px) {
  .mobile-topbar {
    gap: 0.55rem;
    padding: 0.72rem 0.75rem;
  }

  .mobile-brand {
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
  }

  .mobile-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
  }

  .mobile-topbar-actions {
    gap: 0.35rem;
    flex: 0 0 auto;
  }

  .mobile-session-pill {
    max-width: min(44vw, 10.5rem);
    padding-left: 0.7rem;
  }

  .mobile-session-pill-email {
    font-size: 0.78rem;
  }

  .mobile-session-pill-action {
    min-width: 1.8rem;
    width: 1.8rem;
    height: 1.8rem;
  }

  .result-entry-remarks-grid { grid-template-columns: 1fr; }
  .result-entry-remarks-grid .teacher-feedback-field { grid-column: 1 / -1; }
  .result-entry-workflow > .stats {
    grid-template-columns: 1fr;
  }
  .fields-grid-4,
  .result-entry-grid,
  .result-entry-form-shell .form-grid {
    grid-template-columns: 1fr;
  }

  .result-entry-grid .span-2,
  .form-grid .full {
    grid-column: 1 / -1;
  }

  .result-entry-form-block {
    padding: 0;
  }

  .result-entry-form-block + .result-entry-form-block {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
  }

  .content, .sidebar { padding: 0.8rem; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .panel { padding: 0.7rem; min-height: 0; }

  .login-shell {
    min-height: 0;
    padding: 0.2rem 0;
  }

  .shell.login-route .content {
    padding: 0.55rem;
  }

  html[data-route-login="1"] .content {
    padding: 0.55rem;
  }

  .login-head,
  .login-form,
  .login-alerts {
    padding-inline: 0.85rem;
  }

  .login-head-bar {
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
  }

  .login-mode-switch {
    width: auto;
    margin-left: auto;
  }

  .login-mode-switch-link {
    flex: 1 1 0;
    min-width: 0;
  }

  .login-head h3 {
    font-size: clamp(1.18rem, 6vw, 1.45rem);
  }
}

.cost-protection-layout {
  display: grid;
  grid-template-columns: minmax(10.5rem, 12.75rem) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.cost-panel-sidebar {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.7rem 0.65rem;
  text-align: left;
}

.cost-panel-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.cost-panel-sidebar__title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
}

.cost-panel-refresh-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #2f78b0;
  cursor: pointer;
}

.cost-panel-refresh-icon:disabled {
  opacity: 0.55;
  cursor: wait;
}

.cost-panel-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  width: 100%;
}

.cost-panel-nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(10, 63, 113, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink, #183b56);
  font: 600 0.8rem/1.25 Inter, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.cost-panel-nav-item i {
  width: 0.95rem;
  flex: 0 0 0.95rem;
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.85;
}

.cost-panel-nav-item span {
  flex: 1 1 auto;
  text-align: left;
}

.cost-panel-nav-item:hover:not(.is-active),
.cost-panel-nav-item:focus-visible:not(.is-active) {
  border-color: rgba(10, 63, 113, 0.2);
  background: rgba(238, 245, 252, 0.95);
  color: #0a3f71;
  transform: none;
}

.cost-panel-nav-item:hover:not(.is-active) i,
.cost-panel-nav-item:focus-visible:not(.is-active) i {
  color: #2f78b0;
  opacity: 1;
}

.cost-panel-nav-item.is-active,
.cost-panel-nav-item.is-active:hover,
.cost-panel-nav-item.is-active:focus-visible {
  border-color: rgba(47, 120, 176, 0.45);
  background: rgba(232, 242, 252, 0.98);
  color: #0a3f71;
  box-shadow: inset 3px 0 0 #2f78b0;
}

.cost-panel-nav-item.is-active i {
  color: #2f78b0;
  opacity: 1;
}

.cost-panel-sync,
.cost-panel-error {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #5f7386;
}

.cost-panel-error {
  color: #9a2230;
}

.cost-panel-main {
  min-width: 0;
}

.cost-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(10, 63, 113, 0.12);
  background: #fff;
}

.cost-hero--ok {
  border-color: rgba(47, 155, 102, 0.28);
  background: linear-gradient(180deg, rgba(240, 253, 247, 0.65), #fff 55%);
}

.cost-hero--caution {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.9), #fff 55%);
}

.cost-hero--emergency {
  border-color: rgba(217, 119, 6, 0.4);
  background: linear-gradient(180deg, rgba(255, 237, 224, 0.95), #fff 50%);
}

.cost-hero__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(47, 120, 176, 0.12);
  color: #2f78b0;
  font-size: 1.1rem;
}

.cost-hero--emergency .cost-hero__icon {
  background: rgba(217, 119, 6, 0.15);
  color: #b45309;
}

.cost-hero__body h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.cost-hero__body p {
  margin: 0;
  font-size: 0.82rem;
  color: #5f7386;
}

.cost-hero__reason {
  margin-top: 0.25rem !important;
  color: #9a5a00 !important;
}

.cost-hero__costs {
  display: grid;
  gap: 0.35rem;
  text-align: right;
}

.cost-hero__costs span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5f7386;
}

.cost-hero__costs strong {
  font-size: 0.92rem;
  color: #183b56;
}

.cost-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.cost-stat-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(10, 63, 113, 0.1);
  border-radius: 12px;
  background: #fff;
}

.cost-stat-card i {
  color: #2f9b66;
  font-size: 0.9rem;
}

.cost-stat-card__label {
  font-size: 0.72rem;
  color: #5f7386;
}

.cost-stat-card__value {
  font-size: 1.35rem;
  line-height: 1.1;
  color: #183b56;
}

.cost-stat-card__meta {
  font-size: 0.72rem;
  color: #5f7386;
}

.cost-overview-platform {
  display: grid;
  gap: 0.5rem;
}

.cost-overview-platform__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cost-overview-platform__head h4 {
  margin: 0;
  font-size: 0.88rem;
  color: #183b56;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cost-overview-platform__source {
  font-size: 0.72rem;
  color: #5f7386;
}

.cost-stat-cards--platform {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.cost-usage-grid--grouped {
  margin-top: 0.35rem;
}

.cost-live-usage-group {
  margin-bottom: 0.75rem;
}

.cost-meter__source {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
}

.cost-platform-services h3 {
  margin: 0;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cost-source-pill {
  justify-self: start;
  margin-top: 0.15rem;
  font-size: 0.65rem;
}

.cost-alert-email-form {
  display: grid;
  gap: 0.5rem;
}

.cost-alert-email-form__label {
  font-size: 0.78rem;
  color: #5f7386;
}

.cost-alert-email-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cost-alert-email-form__row .input {
  flex: 1 1 14rem;
  min-width: 12rem;
}

.cost-alert-settings-card {
  gap: 0.65rem;
}

.cost-alert-settings-head h3 {
  margin: 0.15rem 0 0;
}

.cost-alert-settings-note {
  margin: 0.25rem 0 0;
}

.cost-alert-settings-form {
  display: grid;
  gap: 0.65rem;
}

.cost-alert-settings-row--toggle {
  margin: 0;
}

.cost-alert-settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  max-width: 100%;
  margin: 0;
  font-weight: 600;
  color: #183b56;
  cursor: pointer;
}

.cost-alert-settings-toggle input {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

.cost-alert-settings-toggle span {
  color: #183b56;
  font-size: 0.86rem;
}

.cost-alert-recipients {
  display: grid;
  gap: 0.45rem;
}

.cost-alert-recipients__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.cost-alert-recipients__head .helper {
  margin: 0;
  font-size: 0.72rem;
}

.cost-alert-recipient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cost-alert-recipient-empty {
  width: 100%;
  margin: 0;
  padding: 0.35rem 0;
}

.cost-alert-recipient-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.2rem 0.25rem 0.2rem 0.55rem;
  border: 1px solid #d0e3f0;
  border-radius: 999px;
  background: #f4f9fc;
}

.cost-alert-recipient-item--editing {
  flex: 1 1 100%;
  border-radius: 10px;
  padding: 0.35rem 0.45rem;
  gap: 0.4rem;
}

.cost-alert-recipient-item--editing .cost-alert-recipient-edit-input {
  flex: 1 1 12rem;
  min-width: 0;
}

.cost-alert-recipient-item__email {
  font-size: 0.8rem;
  color: #183b56;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16rem;
}

.cost-alert-recipient-item__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  flex: 0 0 auto;
}

.cost-alert-recipient-item__actions .ghost {
  min-height: 1.65rem;
  padding: 0.2rem 0.4rem;
}

.cost-alert-recipient-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.cost-alert-recipient-add .input {
  flex: 1 1 11rem;
  min-width: 0;
  max-width: 100%;
}

.cost-alert-recipient-add .secondary {
  flex: 0 0 auto;
}

.cost-alert-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.cost-alert-settings-field {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  min-width: 0;
}

.cost-alert-settings-field .input,
.cost-alert-settings-field select {
  width: 100%;
}

.cost-alert-settings-field__label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #5f7386;
}

.cost-alert-kind-block {
  display: grid;
  gap: 0.35rem;
}

.cost-alert-kind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.35rem;
}

.cost-alert-kind-option {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0;
  padding: 0.4rem 0.5rem;
  border: 1px solid #d8e6f2;
  border-radius: 8px;
  background: #f8fbfe;
  cursor: pointer;
  min-width: 0;
}

.cost-alert-kind-option input {
  width: auto;
  margin: 0.1rem 0 0;
  flex: 0 0 auto;
}

.cost-alert-kind-option__copy {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.cost-alert-kind-option strong {
  display: block;
  font-size: 0.78rem;
  color: #183b56;
  line-height: 1.2;
}

.cost-alert-kind-option .helper {
  font-size: 0.66rem;
  line-height: 1.25;
  margin: 0;
}

.cost-alert-settings-actions {
  margin: 0;
  gap: 0.45rem;
}

.cost-alert-settings-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cost-alert-settings-meta .pill {
  font-size: 0.72rem;
}

.cost-alert-active-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cost-alert-active-item {
  padding: 0.45rem 0.55rem;
  border: 1px solid #dceaf4;
  border-radius: 8px;
  background: #f8fbfe;
}

.cost-alert-active-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.cost-alert-active-item__type {
  font-size: 0.72rem;
  font-weight: 600;
  color: #5f7386;
  text-transform: capitalize;
}

.cost-alert-active-item__message {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #183b56;
}

@media (max-width: 720px) {
  .cost-alert-settings-grid {
    grid-template-columns: 1fr;
  }

  .cost-alert-kind-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cost-alert-recipient-item__email {
    max-width: 10rem;
  }
}

@media (max-width: 420px) {
  .cost-alert-kind-grid {
    grid-template-columns: 1fr;
  }

  .cost-alert-settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cost-alert-settings-actions .button {
    width: 100%;
  }
}

.cost-priority-line {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #4d6479;
}

.cost-estimate-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.cost-estimate-card__daily {
  display: block;
  margin: 0.25rem 0;
  font-size: 1.65rem;
  line-height: 1.15;
  color: #183b56;
}

.cost-estimate-card__daily span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #5f7386;
}

.cost-bullet-list {
  margin: 0;
  padding-left: 1.15rem;
  list-style: disc;
  display: grid;
  gap: 0.35rem;
}

.cost-bullet-list li {
  display: list-item;
  font-size: 0.86rem;
  line-height: 1.4;
  color: #183b56;
}

.cost-overview-stats {
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.cost-status-table th,
.cost-status-table td {
  font-size: 0.84rem;
  vertical-align: middle;
}

.cost-status-table code {
  font-size: 0.78rem;
}

.cost-usage-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cost-usage-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(10, 63, 113, 0.08);
  overflow: hidden;
}

.cost-usage-threshold {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(10, 63, 113, 0.22);
  transform: translateX(-50%);
  z-index: 1;
}

.cost-usage-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f9b66, #3fbf7f);
}

.cost-usage-fill.warning {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.cost-policy-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  list-style: disc;
  display: grid;
  gap: 0.35rem;
}

.cost-policy-list li {
  display: list-item;
}

.service-control-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.service-control-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 11.5rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(10, 63, 113, 0.14);
  border-radius: 14px;
  background: #fff;
}

.service-control-card.is-active-state {
  border-color: rgba(47, 155, 102, 0.35);
  background: linear-gradient(180deg, rgba(240, 253, 247, 0.7), #fff 42%);
}

.service-control-card.is-paused {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.85), #fff 45%);
}

.service-control-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.service-control-card__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}

.service-control-card__title-wrap i {
  margin-top: 0.15rem;
  color: #2f78b0;
  font-size: 0.95rem;
}

.service-control-card__head h4 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
}

.service-control-card__task {
  margin: 0.12rem 0 0;
  font-size: 0.72rem;
  color: #5f7386;
}

.service-control-card__short {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #4d6479;
  flex: 1 1 auto;
}

.service-control-card__status {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.service-control-card__status--active {
  background: rgba(47, 155, 102, 0.14);
  color: #1f7a4f;
}

.service-control-card__status--paused {
  background: rgba(211, 61, 74, 0.12);
  color: #9a2230;
}

.service-control-card__status--locked {
  background: rgba(245, 158, 11, 0.16);
  color: #9a5a00;
}

.service-control-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 0.15rem;
}

.service-control-card__lock {
  margin: 0;
  font-size: 0.76rem;
  text-align: right;
}

.cost-meter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cost-meter__label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5f7386;
}

.cost-meter__percent {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1f7a4f;
}

.cost-meter__percent.warning {
  color: #9a5a00;
}

.cost-meter__caption {
  margin: 0.2rem 0 0;
  font-size: 0.74rem;
  color: #5f7386;
}

.cost-meter-empty {
  margin: 0;
  font-size: 0.76rem;
}

.cost-usage-track--compact {
  height: 8px;
}

.cost-usage-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.cost-usage-card__head strong {
  font-size: 0.9rem;
}

.cost-protection-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  justify-content: space-between;
}

.service-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
  flex: 0 0 auto;
}

.service-control-card .service-switch__input {
  position: absolute;
  opacity: 0;
  width: 0 !important;
  height: 0 !important;
  min-width: 0;
  padding: 0;
  border: 0;
  margin: 0;
}

.service-switch__track {
  width: 2.75rem;
  height: 1.45rem;
  border-radius: 999px;
  background: rgba(211, 61, 74, 0.35);
  position: relative;
  transition: background 160ms ease;
}

.service-switch__track::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(10, 63, 113, 0.2);
  transition: transform 160ms ease;
}

.service-switch__input:checked + .service-switch__track {
  background: rgba(47, 155, 102, 0.55);
}

.service-switch__input:checked + .service-switch__track::after {
  transform: translateX(1.25rem);
}

.service-switch__input:disabled + .service-switch__track {
  opacity: 0.5;
}

.service-switch__label {
  font-weight: 700;
  font-size: 0.82rem;
  color: #4d6479;
}

@media (max-width: 900px) {
  .cost-protection-layout {
    grid-template-columns: 1fr;
  }

  .cost-panel-sidebar {
    position: static;
  }

  .cost-panel-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-stat-cards {
    grid-template-columns: 1fr;
  }

  .cost-estimate-grid {
    grid-template-columns: 1fr;
  }

  .cost-hero {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .cost-hero__costs {
    text-align: left;
  }
}

.coverage-date-highlight {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(10, 63, 113, 0.14);
  background: linear-gradient(180deg, rgba(232, 244, 255, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: 0 8px 18px rgba(10, 63, 113, 0.08);
}

.coverage-date-highlight--selected {
  border-color: rgba(47, 155, 102, 0.35);
  background: linear-gradient(180deg, rgba(232, 250, 241, 0.98), rgba(255, 255, 255, 0.98));
}

.coverage-date-highlight--holiday {
  border-color: rgba(217, 119, 6, 0.35);
  background: linear-gradient(180deg, rgba(255, 244, 228, 0.98), rgba(255, 255, 255, 0.98));
}

.coverage-date-highlight--online {
  border-color: rgba(50, 66, 162, 0.32);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.coverage-date-highlight__badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(10, 63, 113, 0.92);
  color: #fff;
  font: 700 0.92rem/1.2 "Space Grotesk", Inter, system-ui, sans-serif;
  letter-spacing: 0.01em;
}

.coverage-date-highlight__weekday {
  color: #6ee7a8;
  font-weight: 800;
}

.coverage-date-highlight__date {
  color: #fff;
}

.coverage-snapshot-section-head__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.coverage-snapshot-head-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

#approver-attendance-coverage-snapshot .coverage-date-select {
  width: auto;
  min-width: 11.5rem;
  max-width: 18rem;
  flex: 0 0 auto;
}

#approver-attendance-coverage-snapshot .coverage-snapshot-head-controls .secondary {
  width: auto;
  flex: 0 0 auto;
}

.coverage-date-highlight--selected .coverage-date-highlight__badge {
  background: linear-gradient(135deg, #1f7a4f, #2f9b66);
}

.coverage-date-highlight--holiday .coverage-date-highlight__badge {
  background: linear-gradient(135deg, #b45309, #d97706);
}

.coverage-date-highlight--online .coverage-date-highlight__badge {
  background: linear-gradient(135deg, #3242a2, #4f63d8);
}

.coverage-date-highlight__today {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 600;
}

.coverage-date-highlight__detail {
  font: 600 0.88rem/1.35 Inter, system-ui, sans-serif;
  color: #183b56;
}
