.science-access {
  --access-key: #1f2a64;
  --access-highlight: #4659a0;
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  background: var(--hybrid-navy-50, #f4f6fb);
}

.science-access-student {
  --access-key: #39295e;
  --access-highlight: #514074;
}

.science-access .science-access-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.science-access-scene canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.science-access .science-access-card {
  position: relative;
  width: min(440px, 100%);
  min-width: 0;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--access-key);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgb(31 42 100 / 0.1);
}

.science-access .login-brand {
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.science-access .login-brand > div:last-child {
  min-width: 0;
}

.science-access .login-brand strong {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.science-access .login-brand span {
  color: var(--access-key);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.science-access .brand-mark,
.science-access .portal-login-logo {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  box-shadow: none;
}

.science-access .access-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.science-access .access-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  word-break: keep-all;
}

.science-access-student .access-heading h1 {
  font-size: 22px;
  text-wrap: nowrap;
}

.science-access .primary-button {
  min-height: 48px;
  background: var(--access-key);
  box-shadow: none;
  border-radius: 14px;
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}

.science-access .primary-button:hover:not(:disabled) {
  background: var(--access-highlight);
}

.science-access :is(input, select) {
  min-width: 0;
  min-height: 48px;
  border-radius: 14px;
}

.science-access .access-loader {
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--border);
}

.access-loader > span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--access-highlight);
  animation: science-access-loading 1.6s ease-in-out infinite;
}

@keyframes science-access-loading {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

.metric-grid.seven-metrics .science-metric.metric-card {
  min-width: 0;
  min-height: 124px;
  padding: 14px 16px;
  gap: 6px;
  align-content: start;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 8px rgb(31 42 100 / 0.04);
  transition: transform 180ms ease-out;
}

.metric-grid.seven-metrics .science-metric::before {
  content: none;
}

.metric-grid.seven-metrics .science-metric > .science-metric-heading {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 36px;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.science-metric .science-metric-icon {
  display: inline-flex;
  flex: 0 0 20px;
  color: var(--metric-tone, var(--accent));
}

.metric-grid.seven-metrics .science-metric-heading > span {
  color: var(--text);
  font-size: inherit;
}

.science-metric-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-grid.seven-metrics .science-metric strong {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  color: var(--text);
  font-size: 30px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.metric-grid.seven-metrics .science-metric .science-metric-unit {
  display: inline;
  flex: none;
  margin-left: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.metric-grid.seven-metrics .science-metric small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.metric-grid.seven-metrics button.science-metric.active {
  border-color: var(--accent);
  box-shadow: inset 0 -2px var(--accent);
}

.metric-grid.seven-metrics article.science-metric {
  cursor: default;
  transform: none;
}

.science-metric:focus-visible,
.science-access :is(button, input, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.portal-header.science-portal-header {
  gap: 24px;
  flex-wrap: wrap;
  padding: 16px 0 24px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.science-portal-header .portal-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 320px;
}

.portal-identity .portal-identity-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  object-fit: contain;
  border-radius: 8px;
}

.science-portal-header .portal-header-copy h1 {
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.science-portal-header .portal-header-copy p {
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.science-portal-header .portal-header-actions {
  max-width: 100%;
  margin-left: auto;
}

html[data-theme="dark"] .science-access {
  --access-key: #8972df;
  --access-highlight: #8972df;
  background: var(--bg);
}

html[data-theme="dark"] .science-access-admin {
  --access-key: #91bddb;
  --access-highlight: #4659a0;
}

html[data-theme="dark"] .science-access .primary-button {
  color: #fff;
  background: #4659a0;
}

html[data-theme="dark"] .science-access-student .primary-button {
  background: #514074;
}

html[data-theme="dark"] .science-access-student {
  --access-key: #a79abd;
  --access-highlight: #514074;
}

html[data-theme="dark"] .metric-grid.seven-metrics .science-metric.metric-card {
  background: var(--surface);
}

html[data-theme="dark"] .metric-grid.seven-metrics .science-metric strong {
  color: var(--text);
}

@media (max-width: 600px) {
  .science-access .science-access-card { padding: 24px; }
  .science-access .access-heading h1,
  .science-portal-header .portal-header-copy h1 { font-size: 22px; }
  .science-access-student .access-heading h1 { font-size: 18px; }
  .science-portal-header .portal-identity { gap: 12px; flex-basis: 100%; }
  .portal-identity .portal-identity-mark { width: 56px; height: 56px; flex-basis: 56px; }
  .metric-grid.seven-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .access-loader > span { animation: none; transform: translateX(75%); }
  .science-access .primary-button,
  .metric-grid.seven-metrics .science-metric.metric-card { transition: none; }
}

@font-face {
  font-family: "Pretendard Preview";
  src: url("/fonts/Pretendard-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard Preview";
  src: url("/fonts/Pretendard-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard Preview";
  src: url("/fonts/Pretendard-SemiBold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard Preview";
  src: url("/fonts/Pretendard-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --hybrid-navy-950: #0c1230;
  --hybrid-navy-900: #111a43;
  --hybrid-navy-850: #172052;
  --hybrid-navy-800: #1f2a64;
  --hybrid-navy-700: #2d3d83;
  --hybrid-navy-600: #4659a0;
  --hybrid-navy-100: #e2e6f4;
  --hybrid-navy-50: #f4f6fb;
  --hybrid-nav-meta: rgb(211 218 244 / 0.68);
  --hybrid-slate-25: #fbfcfd;
  --hybrid-slate-50: #f4f7f9;
  --hybrid-slate-100: #e8eef2;
  --hybrid-success: #17836f;
  --hybrid-warning: #b7791f;
  --hybrid-danger: #c2414f;
  --hybrid-caution: #c85d2c;
  --hybrid-info: #256a9b;
  --accent: #1f2a64;
  --accent-light: #4659a0;
  --accent-secondary: #17836f;
  --violet: #2d3d83;
  --blue: #256a9b;
  --primary-gradient: linear-gradient(135deg, #4659a0 0%, #1f2a64 58%, #111a43 100%);
  --primary-gradient-hover: linear-gradient(135deg, #2d3d83 0%, #1f2a64 62%, #0c1230 100%);
  --primary-shadow: 0 9px 18px rgb(31 42 100 / 0.2);
  --primary-shadow-hover: 0 12px 24px rgb(17 26 67 / 0.24);
}

html[data-theme="dark"] {
  --accent: #74a9cf;
  --accent-light: #91bddb;
  --accent-secondary: #54a892;
  --violet: #74a9cf;
  --blue: #7eb0d2;
  --hybrid-success: #54a892;
  --hybrid-warning: #d1a257;
  --hybrid-danger: #dc7180;
  --hybrid-caution: #d9825f;
  --hybrid-info: #74a9cf;
  --primary-gradient: linear-gradient(135deg, #6575b5 0%, #4659a0 58%, #2d3d83 100%);
  --primary-gradient-hover: linear-gradient(135deg, #7483bd 0%, #5669aa 58%, #37498c 100%);
}

body.hybrid-preview {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 34%);
  font-family: "Pretendard Preview", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.preview-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  transform: translateY(-160%);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  background: #ffffff;
  color: var(--hybrid-navy-800);
  padding: 10px 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgb(31 42 100 / 0.2);
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}

.preview-skip-link:focus,
.preview-skip-link:focus-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.hybrid-preview :is(h1, h2, h3, h4, .brand strong) {
  font-family: "Pretendard Preview", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  word-break: keep-all;
}

.hybrid-preview :is(strong, b, .metric-card, .count-pill, .badge, .term-bar, td, time) {
  font-variant-numeric: tabular-nums;
}

.hybrid-preview button:focus-visible,
.hybrid-preview a:focus-visible,
.hybrid-preview summary:focus-visible,
.hybrid-preview input:focus-visible,
.hybrid-preview select:focus-visible,
.hybrid-preview textarea:focus-visible,
.hybrid-preview [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.hybrid-preview .sidebar :is(button, a, summary, input):focus-visible {
  outline-color: #ffffff;
}

.hybrid-preview .app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
}

.hybrid-preview .app-shell.sidebar-collapsed {
  grid-template-columns: 84px minmax(0, 1fr);
}

.hybrid-preview .sidebar {
  position: sticky;
  gap: 18px;
  border-right: 0;
  background:
    radial-gradient(circle at 8% 0%, rgb(70 89 160 / 0.4), transparent 19rem),
    linear-gradient(180deg, var(--hybrid-navy-800), var(--hybrid-navy-950));
  color: #ffffff;
  padding: 24px 16px 20px;
  box-shadow: 8px 0 28px rgb(31 42 100 / 0.08);
  backdrop-filter: none;
  overflow: visible;
}

.hybrid-preview .hybrid-sidebar-toggle {
  position: absolute;
  top: 28px;
  right: -21px;
  z-index: 4;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--hybrid-navy-100);
  border-radius: 12px;
  background: #ffffff;
  color: var(--hybrid-navy-800);
  padding: 0;
  box-shadow: 0 5px 16px rgb(31 42 100 / 0.18);
}

.hybrid-preview .hybrid-sidebar-toggle:hover {
  border-color: var(--hybrid-navy-600);
  background: var(--hybrid-navy-50);
}

.hybrid-preview .hybrid-sidebar-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease-out;
}

.hybrid-preview .app-shell:not(.sidebar-collapsed) .hybrid-sidebar-toggle svg {
  transform: rotate(180deg);
}

.hybrid-preview .brand {
  min-height: 64px;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  padding: 8px;
  box-shadow: none;
}

.hybrid-preview .brand-button {
  background: transparent;
  color: #ffffff;
}

.hybrid-preview .brand-button:hover {
  transform: none;
  background: rgb(255 255 255 / 0.08);
  box-shadow: none;
}

.hybrid-preview .brand-mark {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.12);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16);
}

.hybrid-preview .sidebar .brand strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.hybrid-preview .sidebar .brand span {
  margin-top: 2px;
  color: rgb(224 237 247 / 0.72);
  font-size: 12px;
  font-weight: 500;
}

.hybrid-preview .app-version-pill {
  align-self: flex-start;
  margin: -10px 8px 0 64px;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.12);
  color: #ffffff;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.hybrid-preview .student-search label,
.hybrid-preview .sidebar .eyebrow,
.hybrid-preview .sidebar .nav-group-title {
  color: rgb(239 246 251 / 0.74);
}

.hybrid-preview .student-search label {
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
}

.hybrid-preview .student-search input {
  min-height: 42px;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 10px;
  background: color-mix(in srgb, var(--hybrid-navy-950) 72%, #ffffff 28%);
  color: #ffffff;
  padding-inline: 12px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.hybrid-preview .student-search input::placeholder {
  color: rgb(239 246 251 / 0.74);
}

.hybrid-preview .student-search input:focus-visible {
  border-color: rgb(255 255 255 / 0.44);
  outline-color: #ffffff;
}

.hybrid-preview .sidebar .search-results {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.hybrid-preview .sidebar .search-result {
  border: 1px solid rgb(255 255 255 / 0.18);
  background: var(--hybrid-navy-800);
  color: #ffffff;
  box-shadow: 0 8px 18px rgb(6 10 32 / 0.24);
}

.hybrid-preview .sidebar .search-result strong {
  color: #ffffff;
}

.hybrid-preview .sidebar .search-result span {
  color: rgb(239 246 251 / 0.76);
}

.hybrid-preview .nav {
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.hybrid-preview .mobile-nav-hint {
  display: none;
}

.hybrid-preview .nav-group {
  gap: 5px;
  border: 0;
  padding-top: 0;
}

.hybrid-preview .nav-group-title {
  min-height: 32px;
  gap: 8px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}

.hybrid-preview .nav-group-title::after {
  display: none;
}

.hybrid-preview .nav-group-title > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hybrid-preview .nav-group-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.hybrid-preview .nav-group-title small {
  width: auto;
  min-width: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hybrid-nav-meta);
  padding: 0;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hybrid-preview .nav-group-state {
  color: rgb(239 246 251 / 0.82);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}

.hybrid-preview .nav-group-state-closed,
.hybrid-preview .nav-group-toggle:not([open]) .nav-group-state-open {
  display: none;
}

.hybrid-preview .nav-group-toggle:not([open]) .nav-group-state-closed {
  display: inline;
}

.hybrid-preview .nav-group-chevron {
  width: 18px;
  height: 18px;
  color: var(--hybrid-nav-meta);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease-out;
}

.hybrid-preview .nav-group-toggle:not([open]) .nav-group-chevron {
  transform: rotate(-90deg);
}

.hybrid-preview .nav-group-toggle > summary:hover {
  border-radius: 8px;
  background: rgb(255 255 255 / 0.06);
  color: #ffffff;
}

.hybrid-preview .nav-group-items {
  gap: 3px;
}

.hybrid-preview .nav-item {
  position: relative;
  min-height: 42px;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgb(239 246 251 / 0.78);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

.hybrid-preview .nav-item span {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.08);
  color: rgb(224 237 247 / 0.76);
  box-shadow: none;
}

.hybrid-preview .nav-item:hover {
  transform: none;
  background: rgb(255 255 255 / 0.08);
  color: #ffffff;
  box-shadow: none;
}

.hybrid-preview .nav-item.active {
  border: 0;
  background: rgb(255 255 255 / 0.15);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.hybrid-preview .nav-item.active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #ffffff;
  content: "";
}

.hybrid-preview .nav-item.active span {
  background: rgb(255 255 255 / 0.17);
  color: #ffffff;
}

.hybrid-preview .sidebar-footer-stack {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.hybrid-preview .manual-card {
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  min-height: 50px;
  gap: 9px;
  border-color: rgb(255 255 255 / 0.12);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.06);
  color: #ffffff;
  padding: 9px 10px;
  box-shadow: none;
}

.hybrid-preview .manual-card:hover {
  background: rgb(255 255 255 / 0.1);
  box-shadow: none;
}

.hybrid-preview .manual-card .manual-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgb(255 255 255 / 0.1);
}

.hybrid-preview .manual-card .manual-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hybrid-preview .manual-card-copy strong {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.hybrid-preview .manual-card-chevron {
  width: 16px;
  height: 16px;
  color: var(--hybrid-nav-meta);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hybrid-preview .sidebar .side-panel {
  width: 100%;
  margin-top: 0;
  border-color: rgb(255 255 255 / 0.1);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.06);
  color: #ffffff;
  box-shadow: none;
}

.hybrid-preview .sidebar .side-panel small {
  color: rgb(224 237 247 / 0.62);
}

.hybrid-preview .dashboard-priority-main span {
  word-break: keep-all;
}

.hybrid-preview .sidebar-collapsed .sidebar {
  gap: 12px;
  padding-inline: 10px;
}

.hybrid-preview .sidebar-collapsed .hybrid-sidebar-toggle {
  right: -21px;
}

.hybrid-preview .sidebar-collapsed .brand {
  justify-content: center;
  padding-inline: 0;
}

.hybrid-preview .sidebar-collapsed .brand > div:not(.brand-mark),
.hybrid-preview .sidebar-collapsed .student-search,
.hybrid-preview .sidebar-collapsed .nav-group-title,
.hybrid-preview .sidebar-collapsed .side-panel {
  display: none;
}

.hybrid-preview .sidebar-collapsed .nav-group:not([data-nav-group="quick"]) {
  display: none;
}

.hybrid-preview .sidebar-collapsed .sidebar-footer-stack {
  display: grid;
  justify-items: center;
  margin-top: auto;
}

.hybrid-preview .sidebar-collapsed .manual-card {
  display: grid;
  width: 46px;
  min-height: 46px;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 7px;
}

.hybrid-preview .sidebar-collapsed .manual-card-copy,
.hybrid-preview .sidebar-collapsed .manual-card-chevron {
  display: none;
}

.hybrid-preview .sidebar-collapsed .app-version-pill {
  align-self: center;
  justify-content: center;
  width: 56px;
  margin: -8px 0 2px;
  padding-inline: 4px;
}

.hybrid-preview .sidebar-collapsed .nav {
  gap: 8px;
}

.hybrid-preview .sidebar-collapsed .nav-group,
.hybrid-preview .sidebar-collapsed .nav-group-items,
.hybrid-preview .sidebar-collapsed .nav-group-toggle:not([open]) .nav-group-items {
  display: grid;
  gap: 5px;
}

.hybrid-preview .sidebar-collapsed .nav-item {
  justify-content: center;
  min-height: 46px;
  padding: 8px;
  font-size: 0;
}

.hybrid-preview .sidebar-collapsed .nav-item span {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 14px;
}

.hybrid-preview .sidebar-collapsed .nav-item::after {
  position: fixed;
  z-index: 40;
  display: none;
  left: 76px;
  border: 1px solid var(--hybrid-navy-100);
  border-radius: 8px;
  background: #ffffff;
  color: var(--hybrid-navy-900);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgb(31 42 100 / 0.18);
  content: attr(data-nav-label);
}

.hybrid-preview .sidebar-collapsed .nav-item:is(:hover, :focus-visible)::after {
  display: block;
}

.hybrid-preview .sidebar-collapsed .nav-item.active::before {
  top: 9px;
  bottom: 9px;
  left: -10px;
}

@media (max-width: 860px) {
  .hybrid-preview .app-shell,
  .hybrid-preview .app-shell.sidebar-collapsed {
    display: block;
  }

  .hybrid-preview .sidebar,
  .hybrid-preview .sidebar-collapsed .sidebar {
    position: relative;
    top: auto;
    gap: 10px;
    border-bottom: 0;
    padding: 10px 12px;
    overflow: visible;
  }

  .hybrid-preview .hybrid-sidebar-toggle {
    display: none;
  }

  .hybrid-preview .sidebar-collapsed .brand > div:not(.brand-mark) {
    display: block;
  }

  .hybrid-preview .sidebar-collapsed .student-search {
    display: grid;
  }

  .hybrid-preview .sidebar-collapsed .nav-group-title {
    display: flex;
  }

  .hybrid-preview .sidebar-footer-stack,
  .hybrid-preview .sidebar-collapsed .sidebar-footer-stack {
    display: grid;
    margin-top: 0;
  }

  .hybrid-preview .manual-card,
  .hybrid-preview .sidebar-collapsed .manual-card,
  .hybrid-preview .sidebar .side-panel,
  .hybrid-preview .sidebar-collapsed .sidebar .side-panel {
    display: grid;
  }

  .hybrid-preview .sidebar-collapsed .brand {
    justify-content: flex-start;
    padding: 7px 8px;
  }

  .hybrid-preview .sidebar-collapsed .app-version-pill {
    align-self: flex-start;
    width: auto;
    margin: -4px 0 0;
    padding: 5px 9px;
  }

  .hybrid-preview .nav {
    display: grid;
    gap: 10px;
    overflow: visible;
    padding-bottom: 2px;
  }

  .hybrid-preview .mobile-nav-hint {
    display: block;
    margin-top: -6px;
    color: rgb(239 246 251 / 0.68);
    font-size: 10px;
    font-weight: 600;
    text-align: right;
  }

  .hybrid-preview .nav-group {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .hybrid-preview .nav-group-items,
  .hybrid-preview .sidebar-collapsed .nav-group-items {
    display: flex;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    min-width: 0;
    justify-self: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .hybrid-preview .nav-group-toggle:not([open]) .nav-group-items,
  .hybrid-preview .sidebar-collapsed .nav-group-toggle:not([open]) .nav-group-items {
    display: none;
  }

  .hybrid-preview .nav-group-items::-webkit-scrollbar {
    display: none;
  }

  .hybrid-preview .nav-group-title {
    min-height: 38px;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 10px;
    background: rgb(255 255 255 / 0.07);
    padding: 7px 10px;
    box-shadow: none;
  }

  .hybrid-preview .nav-item,
  .hybrid-preview .sidebar-collapsed .nav-item {
    flex: 0 0 auto;
    justify-content: flex-start;
    width: auto;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .hybrid-preview .sidebar-collapsed .nav-item span {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 14px;
  }

  .hybrid-preview .sidebar-collapsed .nav-item::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hybrid-preview .hybrid-sidebar-toggle svg,
  .hybrid-preview .nav-group-chevron {
    transition: none;
  }
}

body.hybrid-preview {
  background: var(--bg);
}

.hybrid-preview .sidebar {
  background:
    radial-gradient(circle at 12% -6%, rgb(70 89 160 / 0.2), transparent 17rem),
    linear-gradient(180deg, var(--hybrid-navy-850) 0%, var(--hybrid-navy-900) 52%, var(--hybrid-navy-950) 100%);
  box-shadow: 8px 0 28px rgb(12 18 48 / 0.12);
}

.hybrid-preview .sidebar-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hybrid-preview .sidebar-header .brand {
  min-width: 0;
  padding: 8px;
}

.hybrid-preview .hybrid-sidebar-toggle {
  position: relative;
  inset: auto;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-color: rgb(255 255 255 / 0.16);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.08);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.hybrid-preview .hybrid-sidebar-toggle::after {
  position: absolute;
  inset: -4px;
  content: "";
}

.hybrid-preview .hybrid-sidebar-toggle:hover {
  border-color: rgb(255 255 255 / 0.28);
  background: rgb(255 255 255 / 0.14);
}

.hybrid-preview .app-version-pill {
  box-sizing: border-box;
  align-self: stretch;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  min-height: 24px;
  margin: -6px 0 0;
  border-color: rgb(255 255 255 / 0.14);
  background: var(--hybrid-navy-800);
  padding: 4px 9px;
  color: #ffffff;
  text-align: left;
  line-height: 1;
}

.hybrid-preview .sidebar #global-student-search {
  border-color: rgb(255 255 255 / 0.24);
  background: var(--hybrid-navy-800);
  color: #ffffff;
  caret-color: #ffffff;
}

.hybrid-preview .sidebar #global-student-search::placeholder {
  color: rgb(255 255 255 / 0.68);
}

.hybrid-preview .sidebar #global-student-search:focus {
  border-color: rgb(255 255 255 / 0.56);
  background: var(--hybrid-navy-800);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.12);
}

html[data-theme="dark"] .hybrid-preview .sidebar #global-student-search {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}

.hybrid-preview .nav-group-title small {
  min-width: 0;
  background: transparent;
}

.hybrid-preview .nav-group-toggle:not([open]) .nav-group-title small {
  background: transparent;
  color: var(--hybrid-nav-meta);
}

.hybrid-preview .sidebar .nav {
  scrollbar-color: rgb(255 255 255 / 0.2) transparent;
}

.hybrid-preview .sidebar .nav::-webkit-scrollbar {
  width: 4px;
}

.hybrid-preview .sidebar .nav::-webkit-scrollbar-track {
  background: transparent;
}

.hybrid-preview .sidebar .nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgb(255 255 255 / 0.2);
}

.hybrid-preview .nav-group-state {
  display: none;
}

.hybrid-preview .nav-item span {
  display: grid;
  place-items: center;
}

.hybrid-preview .nav-item-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hybrid-preview .nav-item:hover span,
.hybrid-preview .nav-item.active span {
  background: rgb(255 255 255 / 0.14);
}

.hybrid-preview .metric-card {
  --metric-tone: var(--hybrid-navy-800);
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--hybrid-navy-900) 10%, var(--border));
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--hybrid-navy-900) 2%, var(--surface)));
  box-shadow: 0 7px 18px rgb(12 18 48 / 0.06);
}

.hybrid-preview .metric-card::before {
  position: absolute;
  top: 0;
  right: 14px;
  left: 14px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--metric-tone);
  opacity: 0.78;
  content: "";
}

.hybrid-preview .metric-card.teal {
  --metric-tone: var(--hybrid-success);
}

.hybrid-preview .metric-card.amber {
  --metric-tone: var(--hybrid-warning);
}

.hybrid-preview .metric-card.red {
  --metric-tone: var(--hybrid-danger);
}

.hybrid-preview .metric-card.orange {
  --metric-tone: var(--hybrid-caution);
}

.hybrid-preview .metric-card.violet {
  --metric-tone: var(--hybrid-navy-800);
}

.hybrid-preview .metric-card.blue {
  --metric-tone: var(--hybrid-info);
}

.hybrid-preview .metric-card:is(.teal, .amber, .red, .orange, .violet, .blue) {
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--hybrid-navy-900) 2%, var(--surface)));
}

.hybrid-preview .metric-card.orange strong {
  color: var(--hybrid-caution);
}

.hybrid-preview .metric-card.violet strong {
  color: var(--hybrid-navy-800);
}

.hybrid-preview .metric-card.blue strong {
  color: var(--hybrid-info);
}

.hybrid-preview .metric-card.active {
  border-color: color-mix(in srgb, var(--hybrid-navy-800) 38%, var(--border));
  background: linear-gradient(180deg, var(--surface), var(--hybrid-navy-50));
  box-shadow: 0 10px 24px rgb(31 42 100 / 0.12);
}

.hybrid-preview .attendance-gate {
  --gate-tone: var(--hybrid-navy-800);
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--gate-tone), 0 7px 18px rgb(12 18 48 / 0.05);
}

.hybrid-preview .attendance-gate.open {
  --gate-tone: var(--hybrid-success);
}

.hybrid-preview .attendance-gate.makeup {
  --gate-tone: var(--hybrid-info);
}

.hybrid-preview .attendance-gate.blocked {
  --gate-tone: var(--hybrid-caution);
}

.hybrid-preview .attendance-gate:is(.open, .makeup, .blocked) {
  background: var(--surface);
}

.hybrid-preview .dashboard-calendar-day.today {
  border-color: color-mix(in srgb, var(--hybrid-info) 42%, var(--border));
}

.hybrid-preview .dashboard-calendar-day.selected {
  border-color: color-mix(in srgb, var(--hybrid-navy-800) 52%, var(--border));
  background: linear-gradient(180deg, var(--surface), var(--hybrid-navy-50));
  box-shadow: 0 10px 22px rgb(31 42 100 / 0.1);
}

.hybrid-preview .hybrid-student-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.hybrid-preview .hybrid-student-overview :is(article, .student-overview-card) {
  position: relative;
  display: grid;
  gap: 5px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--hybrid-navy-900) 9%, var(--border));
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--hybrid-navy-900) 2%, var(--surface)));
  padding: 16px;
  box-shadow: 0 7px 18px rgb(12 18 48 / 0.05);
  color: inherit;
  font: inherit;
  text-align: left;
}

.hybrid-preview .hybrid-student-overview :is(article, .student-overview-card)::before {
  position: absolute;
  top: 0;
  right: 16px;
  left: 16px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--hybrid-navy-800);
  content: "";
}

.hybrid-preview .student-overview-action {
  cursor: pointer;
}

.hybrid-preview .student-overview-action:hover,
.hybrid-preview .student-overview-action:focus-visible {
  border-color: color-mix(in srgb, var(--hybrid-navy-800) 34%, var(--border));
  background: color-mix(in srgb, var(--hybrid-navy-50) 70%, var(--surface));
  box-shadow: 0 10px 22px rgb(31 42 100 / 0.09);
}

.hybrid-preview .hybrid-student-overview span,
.hybrid-preview .hybrid-student-overview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hybrid-preview .hybrid-student-overview strong {
  color: var(--hybrid-navy-800);
  font-size: 26px;
  line-height: 1;
}

.hybrid-preview .hybrid-students-page .compact-section > summary {
  min-height: 64px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--hybrid-navy-50) 74%, var(--surface));
  padding: 12px 14px;
}

.hybrid-preview .hybrid-students-page .compact-section[open] > summary {
  border-bottom: 1px solid color-mix(in srgb, var(--hybrid-navy-800) 12%, var(--border));
  border-radius: 14px 14px 0 0;
}

.hybrid-preview .hybrid-students-page .filter-chip.active {
  border-color: color-mix(in srgb, var(--hybrid-navy-800) 42%, var(--border));
  background: var(--hybrid-navy-50);
  color: var(--hybrid-navy-800);
  box-shadow: 0 7px 16px rgb(31 42 100 / 0.09);
}

.hybrid-preview .hybrid-students-page .student-card {
  border-color: color-mix(in srgb, var(--hybrid-navy-900) 9%, var(--border));
  background: var(--surface);
  box-shadow: 0 5px 14px rgb(12 18 48 / 0.045);
}

.hybrid-preview .hybrid-students-page .student-card:hover {
  border-color: color-mix(in srgb, var(--hybrid-navy-800) 30%, var(--border));
  background: color-mix(in srgb, var(--hybrid-navy-50) 52%, var(--surface));
  box-shadow: 0 9px 20px rgb(31 42 100 / 0.08);
}

.hybrid-preview .hybrid-students-page .student-card.withdrawn {
  background: var(--hybrid-slate-50);
}

@media (min-width: 861px) {
  .hybrid-preview .student-management-tools.hybrid-students-page,
  .hybrid-preview .student-management-tools.hybrid-students-page:has(> .compact-section:first-child[open]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
  }

  .hybrid-preview .student-management-tools.hybrid-students-page:has(> .compact-section:first-child[open]) > .stacked-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hybrid-preview .hybrid-students-page .student-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hybrid-preview .student-management-tools {
  margin-bottom: 18px;
}

.hybrid-preview .student-management-registration .student-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hybrid-preview .student-management-registration .student-form .primary-button {
  align-self: end;
}

.hybrid-preview .student-management-side-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.hybrid-preview .student-management-side-tools > .panel {
  margin-top: 0;
}

.hybrid-preview .student-management-side-tools > .compact-section:not([open]) {
  height: 66px;
}

.hybrid-preview .student-management-side-tools > .compact-section:not([open]) > summary {
  height: 64px;
  min-height: 64px;
  box-sizing: border-box;
}

.hybrid-preview .student-management-side-tools > [data-detail-key="students:classes"][open] {
  max-height: min(680px, calc(100vh - 140px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.hybrid-preview .student-management-side-tools > [data-detail-key="students:classes"][open] > summary {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
}

.hybrid-preview .student-directory-panel {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.hybrid-preview .student-directory-head {
  align-items: center;
  margin: 0;
  padding: 18px 20px 14px;
}

.hybrid-preview .student-directory-head h2 {
  font-size: 20px;
}

.hybrid-preview .student-directory-view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  min-width: 190px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 3px;
}

.hybrid-preview .student-directory-view-toggle button {
  min-height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
}

.hybrid-preview .student-directory-view-toggle button.active {
  background: var(--surface);
  color: var(--hybrid-navy-800);
  box-shadow: 0 3px 10px rgb(31 42 100 / 0.1);
}

.hybrid-preview .student-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(5, minmax(116px, 1fr));
  gap: 9px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--hybrid-navy-50) 48%, var(--surface));
  padding: 13px 20px;
}

.hybrid-preview .student-directory-toolbar label {
  gap: 5px;
  min-width: 0;
  font-size: 11px;
}

.hybrid-preview .student-directory-toolbar :is(input, select) {
  min-height: 38px;
  border-radius: 10px;
  background: var(--surface);
  padding-block: 8px;
  font-size: 12px;
}

.hybrid-preview .student-directory-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 20px;
}

.hybrid-preview .student-directory-selection-summary,
.hybrid-preview .student-directory-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hybrid-preview .student-directory-selected-count {
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

.hybrid-preview .student-directory-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.hybrid-preview .student-directory-summary strong {
  color: var(--text);
}

.hybrid-preview .student-directory-table-wrap {
  width: 100%;
  min-width: 0;
  max-height: min(58vh, 720px);
  overflow-x: auto;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  overscroll-behavior: contain;
}

.hybrid-preview .student-directory-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.hybrid-preview .student-directory-table th,
.hybrid-preview .student-directory-table td {
  height: 48px;
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: middle;
}

.hybrid-preview .student-directory-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 38px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.hybrid-preview .student-directory-table th:nth-child(1) { width: 42px; }
.hybrid-preview .student-directory-table th:nth-child(2) { width: 10%; }
.hybrid-preview .student-directory-table th:nth-child(3) { width: 11%; }
.hybrid-preview .student-directory-table th:nth-child(4) { width: 7%; }
.hybrid-preview .student-directory-table th:nth-child(5) { width: 24%; }
.hybrid-preview .student-directory-table th:nth-child(6),
.hybrid-preview .student-directory-table th:nth-child(7) { width: 14%; }
.hybrid-preview .student-directory-table th:nth-child(8) { width: 8%; }
.hybrid-preview .student-directory-table th:nth-child(9) { width: 10%; }

.hybrid-preview .student-directory-checkbox-cell {
  padding-inline: 10px;
  text-align: center;
}

.hybrid-preview .student-directory-checkbox-cell input {
  width: 17px;
  height: 17px;
  accent-color: var(--hybrid-navy-800);
}

.hybrid-preview .student-directory-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 850;
}

.hybrid-preview .student-directory-sort-button span {
  color: color-mix(in srgb, var(--muted) 68%, transparent);
  font-size: 10px;
}

.hybrid-preview .student-directory-sort-button.active,
.hybrid-preview .student-directory-sort-button:hover,
.hybrid-preview .student-directory-sort-button:focus-visible {
  color: var(--hybrid-navy-800);
}

.hybrid-preview .student-directory-table tbody tr:not(.student-directory-group-row):hover {
  background: color-mix(in srgb, var(--hybrid-navy-50) 62%, var(--surface));
}

.hybrid-preview .student-directory-table tbody tr.withdrawn {
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-soft) 76%, var(--surface));
}

.hybrid-preview .student-directory-name {
  max-width: 100%;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hybrid-preview .student-directory-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.hybrid-preview .student-directory-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.hybrid-preview .student-directory-status.withdrawn::before {
  background: var(--muted);
}

.hybrid-preview .student-directory-group-row th {
  height: 34px;
  border-bottom-color: color-mix(in srgb, var(--hybrid-navy-800) 16%, var(--border));
  background: color-mix(in srgb, var(--hybrid-navy-100) 64%, var(--surface));
  color: var(--hybrid-navy-800);
  font-size: 12px;
}

.hybrid-preview .student-directory-group-row th button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
}

.hybrid-preview .student-directory-group-row th button b {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-left: auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--hybrid-navy-800) 18%, var(--border));
  border-radius: 50%;
  background: var(--surface);
  font-size: 14px;
}

.hybrid-preview .student-directory-group-row th span {
  font-weight: 900;
}

.hybrid-preview .student-directory-group-row th small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
}

.hybrid-preview .student-directory-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.hybrid-preview .app-usage-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.hybrid-preview #app-usage-results {
  min-width: 0;
}

.hybrid-preview .app-usage-head {
  margin: 0;
}

.hybrid-preview .app-usage-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hybrid-preview .app-usage-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, .65fr)) minmax(220px, 1.35fr);
  align-items: end;
  gap: 10px;
  margin: 0;
}

.hybrid-preview .app-usage-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.hybrid-preview .app-usage-toolbar :is(input, select) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  box-sizing: border-box;
}

.hybrid-preview .app-usage-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.hybrid-preview .app-usage-summary-grid article {
  display: grid;
  gap: 5px;
  min-height: 72px;
  align-content: center;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius, 8px);
  background: var(--surface-soft);
  padding: 11px 13px;
}

.hybrid-preview .app-usage-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.hybrid-preview .app-usage-summary-grid strong,
.hybrid-preview .app-usage-duration {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hybrid-preview .app-usage-summary-grid strong {
  font-size: 18px;
  font-weight: 900;
}

.hybrid-preview .app-usage-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius, 8px);
  scrollbar-width: thin;
}

.hybrid-preview .app-usage-table {
  min-width: 1040px;
}

.hybrid-preview .app-usage-table th:nth-child(n) {
  width: auto;
}

.hybrid-preview .app-usage-table th:nth-child(1) { min-width: 105px; }
.hybrid-preview .app-usage-table th:nth-child(4) { min-width: 190px; }
.hybrid-preview .app-usage-table th:nth-child(5),
.hybrid-preview .app-usage-table th:nth-child(6) { min-width: 125px; }

@media (max-width: 1180px) {
  .hybrid-preview .app-usage-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hybrid-preview .app-usage-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hybrid-preview .app-usage-toolbar,
  .hybrid-preview .app-usage-summary-grid {
    grid-template-columns: 1fr;
  }

  .hybrid-preview .app-usage-search {
    grid-column: auto;
  }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .hybrid-preview .student-directory-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hybrid-preview .student-directory-search {
    grid-column: span 2;
  }

  .hybrid-preview .student-directory-table th:nth-child(7),
  .hybrid-preview .student-directory-table td:nth-child(7) {
    display: none;
  }
}

.hybrid-preview .student-school-summary-modal {
  width: min(520px, calc(100vw - 28px));
}

.hybrid-preview .student-school-summary-list {
  display: grid;
  gap: 8px;
  max-height: min(56vh, 520px);
  overflow-y: auto;
}

.hybrid-preview .student-school-summary-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 10px 13px;
}

.hybrid-preview .student-school-summary-list strong {
  font-size: 13px;
}

.hybrid-preview .student-school-summary-list span {
  color: var(--hybrid-navy-800);
  font-size: 13px;
  font-weight: 900;
}

.hybrid-preview .state-chip.status-present {
  background: #e3f3ee;
  color: #0b5a47;
}

.hybrid-preview .state-chip.status-late {
  background: #fff0e2;
  color: #8a3b0a;
}

.hybrid-preview .state-chip.status-absent {
  background: #fdecef;
  color: #9f2233;
}

.hybrid-preview .state-chip.status-mixed {
  background: var(--hybrid-navy-100);
  color: var(--hybrid-navy-800);
}

.hybrid-preview .attendance-table {
  min-width: 1330px;
}

.hybrid-preview .attendance-score-col {
  width: 220px;
}

.hybrid-preview .attendance-table .score-cell small {
  line-break: strict;
  overflow-wrap: normal;
  word-break: keep-all;
}

html[data-theme="dark"] .hybrid-preview .state-chip.status-present {
  background: #134e4a;
  color: #a7f3d0;
}

html[data-theme="dark"] .hybrid-preview .state-chip.status-late {
  background: #7c2d12;
  color: #fed7aa;
}

html[data-theme="dark"] .hybrid-preview .state-chip.status-absent {
  background: #7f1d1d;
  color: #fecdd3;
}

html[data-theme="dark"] .hybrid-preview .state-chip.status-mixed {
  background: var(--hybrid-navy-800);
  color: var(--hybrid-navy-100);
}

html[data-theme="dark"] .hybrid-preview .metric-card.violet strong {
  color: #b9d5ff;
}

.hybrid-preview .student-detail-hero {
  border-color: color-mix(in srgb, var(--hybrid-navy-800) 15%, var(--border));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--hybrid-navy-800) 5%, transparent), transparent 46%),
    var(--surface);
  box-shadow: 0 8px 20px rgb(12 18 48 / 0.05);
}

.hybrid-preview .student-detail-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.hybrid-preview .student-detail-name-row h2 {
  margin: 0;
}

.hybrid-preview .student-detail-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid color-mix(in srgb, var(--green) 26%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 9%, var(--surface));
  color: color-mix(in srgb, var(--green) 76%, var(--text));
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 900;
}

.hybrid-preview .student-detail-status-badge.previous {
  border-color: color-mix(in srgb, var(--muted) 26%, var(--border));
  background: var(--surface-soft);
  color: var(--muted);
}

.hybrid-preview .student-detail-status-badge.withdrawn {
  border-color: color-mix(in srgb, var(--red) 28%, var(--border));
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  color: var(--red);
}

.hybrid-preview .student-detail-status-strip.previous {
  border-color: color-mix(in srgb, var(--muted) 24%, var(--border));
  background: var(--surface-soft);
}

.hybrid-preview .student-detail-status-strip.withdrawn {
  border-color: color-mix(in srgb, var(--red) 24%, var(--border));
  background: color-mix(in srgb, var(--red) 6%, var(--surface));
}

.hybrid-preview .current-term-strip {
  border-color: color-mix(in srgb, var(--hybrid-navy-800) 16%, var(--border));
  background: color-mix(in srgb, var(--hybrid-navy-50) 58%, var(--surface));
}

.hybrid-preview .student-detail-metrics .mini-panel,
.hybrid-preview .student-detail-dock-button,
.hybrid-preview .student-detail-section {
  border: 1px solid color-mix(in srgb, var(--hybrid-navy-900) 9%, var(--border));
  background: var(--surface);
  box-shadow: 0 5px 14px rgb(12 18 48 / 0.045);
}

.hybrid-preview .student-detail-metrics .mini-panel strong {
  font-size: clamp(20px, 1.7vw, 24px);
  letter-spacing: 0;
  white-space: nowrap;
}

.hybrid-preview .student-card-copy small .student-phone-token {
  display: inline;
  white-space: nowrap;
}

.hybrid-preview .student-detail-dock-button:hover {
  border-color: color-mix(in srgb, var(--hybrid-navy-800) 34%, var(--border));
  background: color-mix(in srgb, var(--hybrid-navy-50) 48%, var(--surface));
  box-shadow: 0 9px 20px rgb(31 42 100 / 0.08);
}

.hybrid-preview .student-detail-dock-button em,
.hybrid-preview .future-attendance-chip {
  background: var(--hybrid-navy-50);
  color: var(--hybrid-navy-800);
}

.hybrid-preview .student-detail-attendance-row {
  border-color: color-mix(in srgb, var(--hybrid-navy-900) 9%, var(--border));
  background: color-mix(in srgb, var(--hybrid-slate-50) 66%, var(--surface));
}

.hybrid-preview .student-detail-attendance-row:hover {
  border-color: color-mix(in srgb, var(--hybrid-navy-800) 30%, var(--border));
  background: var(--surface);
  box-shadow: 0 7px 18px rgb(31 42 100 / 0.07);
}

html[data-theme="dark"] .hybrid-preview .metric-card:is(.teal, .amber, .red, .orange, .violet, .blue, .active),
html[data-theme="dark"] .hybrid-preview .attendance-gate:is(.open, .makeup, .blocked),
html[data-theme="dark"] .hybrid-preview .dashboard-calendar-day.selected,
html[data-theme="dark"] .hybrid-preview .hybrid-student-overview :is(article, .student-overview-card),
html[data-theme="dark"] .hybrid-preview .hybrid-students-page .compact-section > summary,
html[data-theme="dark"] .hybrid-preview .hybrid-students-page .student-card,
html[data-theme="dark"] .hybrid-preview .student-detail-hero,
html[data-theme="dark"] .hybrid-preview .current-term-strip,
html[data-theme="dark"] .hybrid-preview .student-detail-metrics .mini-panel,
html[data-theme="dark"] .hybrid-preview .student-detail-dock-button,
html[data-theme="dark"] .hybrid-preview .student-detail-section,
html[data-theme="dark"] .hybrid-preview .student-detail-attendance-row {
  background: var(--surface);
}

html[data-theme="dark"] .hybrid-preview .hybrid-student-overview strong,
html[data-theme="dark"] .hybrid-preview .student-directory-view-toggle button.active,
html[data-theme="dark"] .hybrid-preview .student-directory-group-row th {
  color: var(--text);
}

html[data-theme="dark"] .hybrid-preview .student-directory-sort-button,
html[data-theme="dark"] .hybrid-preview .student-directory-sort-button.active,
html[data-theme="dark"] .hybrid-preview .student-directory-sort-button:hover,
html[data-theme="dark"] .hybrid-preview .student-directory-sort-button:focus-visible,
html[data-theme="dark"] .hybrid-preview .student-directory-name,
html[data-theme="dark"] .hybrid-preview .student-directory-group-row th button,
html[data-theme="dark"] .hybrid-preview .student-directory-group-row th span {
  color: var(--text);
}

html[data-theme="dark"] .hybrid-preview .student-directory-sort-button span,
html[data-theme="dark"] .hybrid-preview .student-directory-group-row th small,
html[data-theme="dark"] .hybrid-preview .student-school-summary-list span {
  color: var(--accent-light);
}

html[data-theme="dark"] .hybrid-preview .student-directory-toolbar,
html[data-theme="dark"] .hybrid-preview .student-directory-group-row th {
  background: var(--surface-soft);
}

html[data-theme="dark"] .hybrid-preview .student-directory-group-row th {
  border-bottom-color: var(--border);
}

.hybrid-preview .sidebar-collapsed .sidebar-header {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
}

.hybrid-preview .sidebar-collapsed .sidebar-header .brand {
  width: 100%;
}

.hybrid-preview .sidebar-collapsed .hybrid-sidebar-toggle {
  position: relative;
  inset: auto;
}

.hybrid-preview .sidebar-collapsed .app-version-pill {
  align-self: center;
  justify-content: flex-start;
  width: 56px;
  margin: 0;
  padding-inline: 7px;
}

@media (max-width: 860px) {
  .hybrid-preview .sidebar-header,
  .hybrid-preview .sidebar-collapsed .sidebar-header {
    display: block;
  }

  .hybrid-preview .app-version-pill,
  .hybrid-preview .sidebar-collapsed .app-version-pill {
    align-self: stretch;
    width: auto;
    margin: -2px 0 0;
  }

  .hybrid-preview .hybrid-student-overview {
    gap: 8px;
    margin-bottom: 14px;
  }

  .hybrid-preview .hybrid-student-overview :is(article, .student-overview-card) {
    padding: 13px 12px;
  }

  .hybrid-preview .hybrid-student-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hybrid-preview .student-management-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .hybrid-preview .student-management-side-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .hybrid-preview .student-management-registration .student-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hybrid-preview .student-directory-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .hybrid-preview .student-directory-view-toggle {
    width: 100%;
  }

  .hybrid-preview .student-directory-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hybrid-preview .student-directory-search {
    grid-column: 1 / -1;
  }

  .hybrid-preview .student-directory-table {
    min-width: 840px;
  }

  .hybrid-preview .sidebar-collapsed .nav-group-toggle:not([open]) .nav-group-items {
    display: none;
  }
}

@media (max-width: 560px) {
  .hybrid-preview .hybrid-student-overview {
    grid-template-columns: 1fr;
  }

  .hybrid-preview .student-management-registration .student-form,
  .hybrid-preview .student-directory-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .hybrid-preview .student-directory-toolbar > * {
    grid-column: 1;
  }
}
