/*
# Copyright © 2026 Göltz Verwaltungs UG
# Entwickelt von Yannik Göltz
# https://www.goeltz.eu
*/
:root {
  --font: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --pine: #1e3a16;
  --pine-deep: #14260f;
  --leaf: #6abd45;
  --leaf-hover: #529934;
  --sprout: #7cc85a;
  --moss: #e7f6df;
  --canvas: #eef4e8;
  --canvas-deep: #dce8d4;
  --surface: #f3f8ef;
  --raised: #f8fbf5;
  --brand: var(--pine);
  --text: #152116;
  --muted: #3d4f38;
  --faint: #6b7a66;
  --border: #c7d6be;
  --border-strong: #a4b897;
  --primary: #6abd45;
  --primary-hover: #529934;
  --primary-soft: #e7f6df;
  --danger: #a33b3b;
  --danger-hover: #862f2f;
  --danger-soft: #f6eaea;
  --warning: #8a6a1f;
  --warning-soft: #f4eedc;
  --success: #6abd45;
  --success-soft: #e7f6df;
  --info: #2b5f8a;
  --info-soft: #e4eef6;
  --radius: 10px;
  --radius-card: 16px;
  --shadow: 0 1px 2px rgb(30 58 22 / 0.06);
  --shadow-pop: 0 18px 40px -22px rgb(30 58 22 / 0.36);
  --nav: 16.5rem;
  --bar: 3.75rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(42rem 28rem at 88% -12%, rgb(106 189 69 / 0.14), transparent 58%),
    radial-gradient(28rem 20rem at -8% 8%, rgb(30 58 22 / 0.06), transparent 52%),
    var(--canvas);
  font-size: 0.95rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--leaf-hover); }
:focus-visible {
  outline: 2px solid var(--sprout);
  outline-offset: 2px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes grow {
  from { transform: scaleY(0.35); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes float-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.nav-toggle:hover {
  background: var(--moss);
  color: var(--pine);
}
.nav-toggle svg { display: block; }
.nav-backdrop { display: none; }

.app {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--nav) 1fr;
}
.nav {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.04), transparent 8rem),
    var(--pine);
  color: #e7f3ea;
  box-shadow: inset -1px 0 0 rgb(255 255 255 / 0.06);
}
.nav a { color: inherit; text-decoration: none; }
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1rem 1.05rem;
  background: #f4faef;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-school {
  display: block;
  width: 100%;
  height: auto;
}
.brand-wordmark {
  display: block;
  width: 100%;
  max-width: 11.5rem;
  height: auto;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.brand-legal {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--faint);
}
.brand-ver {
  align-self: flex-start;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  background: var(--moss);
  color: var(--leaf);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.nav-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.45rem 0 0.85rem;
}
.nav-group { display: flex; flex-direction: column; gap: 0.04rem; }
.nav-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.7rem 0 0.2rem;
  padding: 0 0.7rem;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9aa39c;
  line-height: 1;
  text-align: center;
}
.nav-label::before,
.nav-label::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}
.nav-group:first-child .nav-label { margin-top: 0.2rem; }
.nav a.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  min-height: 2.1rem;
  padding: 0.36rem 0.7rem 0.36rem 0.7rem;
  border-radius: 0 8px 8px 0;
  color: rgb(231 243 234 / 0.78);
  font-size: 0.84rem;
  font-weight: 550;
  line-height: 1.2;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.nav a.nav-link span { min-width: 0; }
.nav-progress {
  margin-left: auto;
  min-width: 2.4rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgb(106 189 69 / 0.22);
  color: #d8f3c8;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.nav-ico {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.9;
}
.nav a.nav-link:hover {
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  text-decoration: none;
}
.nav a.nav-link:hover .nav-ico { opacity: 1; }
.nav a.nav-link:active { background: rgb(255 255 255 / 0.12); }
.nav a.nav-link.is-active {
  background: rgb(106 189 69 / 0.22);
  color: #f3fff6;
  font-weight: 650;
}
.nav a.nav-link.is-active .nav-ico { opacity: 1; color: var(--sprout); }
.nav-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 0.75rem 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.08);
}
.nav-user {
  font-size: 0.75rem;
  color: rgb(231 243 234 / 0.55);
  padding: 0 0.3rem;
}
.nav-foot .btn {
  width: 100%;
  justify-content: center;
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(255 255 255 / 0.1);
  color: #e7f3ea;
}
.nav-foot .btn:hover {
  background: rgb(255 255 255 / 0.12);
  color: #fff;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1.35rem;
  background: rgb(246 250 247 / 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.topbar-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 550;
}
.year-chip,
.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0 0.7rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--raised);
  color: var(--muted);
  font-size: 0.75rem;
}
.brand-logo,
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  background: var(--moss);
  color: var(--leaf);
}
.brand-mark svg { display: block; }
.wahl-shell .brand-logo,
.wahl-shell .brand-mark { margin: 0 0 1.15rem; }

.content {
  padding: 1.7rem 1.6rem 2.2rem;
  flex: 1;
  max-width: 78rem;
  width: 100%;
}
.content > .page-header,
.content > .stats,
.content > .section,
.content > .warnings,
.content > .messages,
.content > .table-wrap,
.content > .filter-bar,
.content > .panel,
.content > form {
  animation: rise 0.5s var(--ease) both;
}
.content > .stats { animation-delay: 60ms; }
.content > .section,
.content > .warnings { animation-delay: 120ms; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 1rem;
  border-top: 1px solid var(--border);
  padding: 0.8rem 1.5rem;
  font-size: 0.75rem;
  color: var(--faint);
}
.site-footer nav { display: flex; gap: 0.9rem; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--primary); }
.auth-box .site-footer,
.wahl-shell .site-footer {
  border: 0;
  padding: 1rem 0 0;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf);
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}
.lede { margin: 0.4rem 0 0; color: var(--faint); font-size: 0.9rem; }
.actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

.btn, button.btn, input[type="submit"].btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), transform 140ms var(--ease), box-shadow 180ms var(--ease);
}
.btn:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  text-decoration: none;
  color: var(--text);
  transform: translateY(-1px);
}
.btn:active { transform: scale(0.97); }
.btn.btn-primary, button.btn-primary {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #143016;
  box-shadow: 0 8px 18px -10px rgb(106 189 69 / 0.7);
}
.btn.btn-primary:hover, button.btn-primary:hover {
  background: var(--leaf-hover);
  border-color: var(--leaf-hover);
  color: #143016;
}
.btn.btn-danger, button.btn-danger {
  background: var(--raised);
  color: var(--danger);
  border-color: #e3b6b6;
}
.btn.btn-danger:hover, button.btn-danger:hover { background: var(--danger-soft); }
.btn.btn-ghost, button.btn-ghost { background: transparent; }

.filter-bar {
  display: flex;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 0.95rem;
  flex-wrap: wrap;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--raised);
  box-shadow: var(--shadow);
}
.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--faint);
}

.input, select.input, textarea.input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  color: var(--text);
  background: var(--raised);
  min-height: 2.35rem;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}
.input:hover { border-color: var(--border-strong); }
.input:focus {
  outline: none;
  border-color: var(--sprout);
  box-shadow: 0 0 0 4px rgb(106 189 69 / 0.18);
}
textarea.input { min-height: 5.5rem; }

.table-wrap {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: auto;
}
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td {
  text-align: left;
  padding: 0.78rem 0.95rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data th {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--surface);
}
table.data tbody tr { transition: background-color 160ms var(--ease); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: color-mix(in srgb, var(--moss) 55%, var(--raised)); }
.row-actions { display: flex; gap: 0.55rem; white-space: nowrap; align-items: center; }
.row-actions form { display: inline; margin: 0; }
.row-actions .linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
}
.row-actions .linkish:hover { color: var(--leaf-hover); }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
}
.chip-ok { background: var(--success-soft); color: var(--pine); }
.chip-warn { background: var(--warning-soft); color: var(--warning); }
.muted { color: var(--faint); }
.status-ok { color: var(--success); font-weight: 650; }
.status-warn { color: var(--warning); font-weight: 650; }
.status-muted { color: var(--faint); }
.empty { padding: 1.5rem 1rem; color: var(--faint); }

.messages { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.45rem; }
.messages li {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--raised);
  font-size: 0.875rem;
  animation: rise 0.35s var(--ease) both;
}
.messages .error { border-color: #e3b6b6; background: var(--danger-soft); color: var(--danger); }
.messages .success { border-color: #b7d7c3; background: var(--success-soft); color: var(--success); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem 1rem;
  max-width: 54rem;
}
.form-grid label, .field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8125rem; font-weight: 650; color: var(--muted); }
.form-grid .input, .field .input { font-weight: 500; }
.field-error { color: var(--danger); font-size: 0.75rem; font-weight: 550; }
.check-line { display: flex; align-items: center; gap: 0.5rem; min-height: 2rem; font-weight: 500; }
.check-line input { width: 1.05rem; height: 1.05rem; accent-color: var(--primary); }
.htmx-request { opacity: 0.65; }
.form-actions { margin-top: 1.15rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.section { margin: 1.75rem 0 0; }
.section h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}
.section-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}
.section-nav a { color: var(--faint); font-size: 0.8125rem; font-weight: 650; }
.section-nav a.is-active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.4rem;
  margin-bottom: -0.5rem;
}
.inline-form { display: flex; gap: 0.4rem; align-items: center; }
.inline-form .input { min-height: 2rem; }

.dl {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.55rem 1rem;
  max-width: 44rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--raised);
  box-shadow: var(--shadow);
}
.dl dt { color: var(--faint); font-size: 0.75rem; font-weight: 650; }
.dl dd { margin: 0; font-weight: 650; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.35rem;
}
.stat {
  min-height: 6.1rem;
  padding: 1.05rem 1.05rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--raised);
  box-shadow: var(--shadow);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.stat:nth-child(1) { animation: rise 0.5s 40ms var(--ease) both; }
.stat:nth-child(2) { animation: rise 0.5s 90ms var(--ease) both; }
.stat:nth-child(3) { animation: rise 0.5s 140ms var(--ease) both; }
.stat:nth-child(4) { animation: rise 0.5s 190ms var(--ease) both; }
.stat:nth-child(5) { animation: rise 0.5s 240ms var(--ease) both; }
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-pop);
  border-color: color-mix(in srgb, var(--sprout) 35%, var(--border));
}
.stat-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--faint);
}
.stat-value {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat-value.is-compact {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.stat-meta {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  color: var(--faint);
}
.stat.is-warn .stat-value { color: var(--warning); }
.stat.is-ok .stat-value { color: var(--success); }
.stat.is-danger .stat-value { color: var(--danger); }
a.stat { color: inherit; text-decoration: none; display: block; }
a.stat:hover { color: inherit; }

.viz-alerts {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1.15rem;
}
.viz-alert {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  animation: rise 0.4s var(--ease) both;
}
.viz-alert:hover { color: var(--text); }
.viz-alert.is-warn { border-color: #e2d3a4; background: var(--warning-soft); color: var(--warning); }
.viz-alert.is-danger { border-color: #e3b6b6; background: var(--danger-soft); color: var(--danger); }
.viz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
  margin: 0 0 0.95rem;
}
.viz-card {
  padding: 1.05rem 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--raised);
  box-shadow: var(--shadow);
  animation: float-in 0.55s var(--ease) both;
}
.viz-wide { margin: 0 0 0.95rem; }
.viz-head { margin: 0 0 0.85rem; }
.viz-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.viz-head p {
  margin: 0.28rem 0 0;
  color: var(--faint);
  font-size: 0.82rem;
}
.viz-empty { margin: 0.4rem 0 0; color: var(--faint); }
.donut {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  align-items: center;
}
.donut-svg { width: 9.5rem; height: 9.5rem; }
.donut-track {
  fill: none;
  stroke: var(--moss);
  stroke-width: 14;
}
.donut-center {
  fill: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
}
.donut-caption {
  fill: var(--faint);
  font-size: 6.2px;
  text-anchor: middle;
}
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.42rem; }
.donut-legend li {
  display: grid;
  grid-template-columns: 0.7rem 1fr auto auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.8rem;
}
.donut-legend i { width: 0.7rem; height: 0.7rem; border-radius: 999px; display: block; }
.donut-legend strong { font-variant-numeric: tabular-nums; }
.donut-legend em { color: var(--faint); font-style: normal; font-variant-numeric: tabular-nums; }
.hbars { display: grid; gap: 0.42rem; }
.hbar {
  display: grid;
  grid-template-columns: minmax(7.5rem, 13rem) 1fr 4.6rem;
  gap: 0.55rem;
  align-items: center;
  color: inherit;
  min-height: 1.45rem;
}
a.hbar:hover { color: inherit; }
.hbar-name {
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hbar-track {
  height: 0.62rem;
  border-radius: 999px;
  background: var(--moss);
  overflow: hidden;
}
.hbar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform-origin: left center;
  animation: grow 0.7s var(--ease) both;
}
.hbar-fill.is-ok { background: var(--leaf); }
.hbar-fill.is-full { background: var(--info); }
.hbar-fill.is-under { background: var(--danger); }
.hbar-fill.is-warn { background: var(--warning); }
.hbar-val {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pagination {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  color: var(--faint);
  font-size: 0.8125rem;
}

.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(38rem 26rem at 14% -8%, rgb(106 189 69 / 0.18), transparent 58%),
    radial-gradient(32rem 22rem at 92% 108%, rgb(30 58 22 / 0.14), transparent 55%),
    linear-gradient(180deg, #e4efdc, #eef4e8);
}
.auth-box {
  width: min(25rem, 100%);
  overflow: hidden;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-pop);
  animation: float-in 0.55s var(--ease) both;
}
.auth-box .auth-head {
  padding: 1.25rem 1.35rem 1.1rem;
  background: #f4faef;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.auth-box .auth-head .brand-school { max-width: 13.5rem; }
.auth-box .auth-head .brand-name { display: block; }
.auth-box .auth-head .brand-legal { display: block; margin-top: 0.15rem; }
.auth-box .auth-head .brand-ver { background: var(--moss); color: var(--leaf); }
.auth-box .auth-body { padding: 1.4rem 1.4rem 1.25rem; }
.auth-box h1 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.auth-lead {
  margin: 0 0 1.15rem;
  color: var(--faint);
  font-size: 0.9rem;
}
.auth-alt {
  margin: 0.95rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}
.auth-alt a {
  color: var(--leaf);
  font-weight: 600;
  text-decoration: none;
}
.auth-alt a:hover { text-decoration: underline; }
.auth-box .form-grid { max-width: none; grid-template-columns: 1fr; }
.auth-box .form-actions { margin-top: 1rem; }
.auth-box .form-actions .btn { width: 100%; min-height: 2.65rem; }

.warnings {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #ead7a8;
  border-radius: var(--radius-card);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.875rem;
}
.warnings.info {
  border-color: #c5d4e8;
  background: var(--info-soft);
  color: var(--text);
}
.panel {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  margin: 0 0 0.85rem;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  border-bottom: 1px solid var(--border);
}
tr.is-critical td { background: var(--warning-soft); }

.wizard-meter {
  min-width: 6.5rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--raised);
  box-shadow: var(--shadow);
  text-align: right;
}
.wizard-meter strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--pine);
}
.wizard-meter span {
  display: block;
  margin-top: 0.2rem;
  color: var(--faint);
  font-size: 0.75rem;
}
.wizard-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}
.wizard-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.28rem 0.7rem 0.28rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--raised);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.wizard-pill span {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--moss);
  color: var(--pine);
  font-size: 0.7rem;
}
.wizard-pill.is-current {
  border-color: var(--leaf);
  background: var(--moss);
  color: var(--pine);
}
.wizard-pill.is-done span {
  background: var(--leaf);
  color: #14300d;
}
.wizard-pill:hover { color: var(--pine); text-decoration: none; }
.wizard-bar {
  height: 0.45rem;
  margin: 0 0 0.7rem;
  border-radius: 999px;
  background: var(--canvas-deep);
  overflow: hidden;
}
.wizard-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--leaf), #4d9a32);
  border-radius: inherit;
  transition: width 320ms var(--ease);
}
.wizard-save {
  margin: 0 0 0.85rem;
  color: var(--faint);
  font-size: 0.82rem;
}
.wizard-save.is-ok { color: var(--pine); }
.wizard-save.is-error { color: var(--danger); }
.wizard-form {
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--raised);
  box-shadow: var(--shadow);
  animation: rise 0.4s var(--ease) both;
}
.wizard-rows { display: grid; gap: 0.75rem; margin: 0 0 0.85rem; }
.wizard-row {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f7fbf4;
}
.wizard-row .form-grid { margin: 0; max-width: none; }
.check-line {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  font-weight: 550;
}
.wizard-grades {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  align-items: center;
  margin: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}
.wizard-grades legend {
  padding: 0 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.wizard-grades label {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  font-weight: 550;
}

@media print {
  .nav, .topbar, .site-footer, .actions, .filter-bar { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(19rem, 88vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 280ms var(--ease);
    overflow: hidden;
  }
  body.nav-open { overflow: hidden; }
  .table-wrap { overflow-x: auto; }
  body.nav-open .nav { transform: none; }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgb(12 44 33 / 0.42);
    z-index: 30;
    animation: rise 0.25s var(--ease);
  }
  .nav-backdrop[hidden] { display: none; }
  .content { padding: 1.2rem 1rem 1.6rem; }
  .page-header { flex-direction: column; }
  .page-header h1 { font-size: 1.7rem; }
  .viz-grid { grid-template-columns: 1fr; }
  .donut { grid-template-columns: 1fr; justify-items: center; }
  .hbar { grid-template-columns: 1fr auto; }
  .hbar-track { grid-column: 1 / -1; }
  .dl { grid-template-columns: 1fr; }
  .topbar { padding: 0 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
