/* ================================================================
   Sollzeit — Design „Kontoblatt"
   Ledger-/Kontoauszug-Ästhetik: kühles Papier, Tinten-Akzent,
   Haarlinien, tabellarische Mono-Zahlen. Alle Fonts lokal gebündelt.
   ================================================================ */

/* ---- Schriften (lokal, static/fonts) --------------------------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url("fonts/SpaceGrotesk.25ea4a783c12.woff2") format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url("fonts/HankenGrotesk.a6b899943e31.woff2") format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url("fonts/SpaceMono-400.d62e75a5cd2d.woff2") format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url("fonts/SpaceMono-700.55408a774dfe.woff2") format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ---------------------------------------------------- */
:root {
  --paper: #f6f7f5;
  --card: #ffffff;
  --ink: #16201c;
  --ink-2: #4a554f;
  --muted: #7b857f;
  --line: #e1e5e1;
  --line-strong: #c9cfc9;
  --teal: #0c6a6a;
  --teal-2: #0a5757;
  --teal-tint: #e6f0ef;
  --teal-line: #cfe3e1;
  --pos: #0b6b4f;
  --pos-tint: #e4f0ea;
  --neg: #a23a2e;
  --neg-tint: #f7e9e6;
  --warn: #8a5a00;
  --ocker: #8f5f14;      /* zweite Kategorie im Eimer-Balken (kein Status) */
  --warn-tint: #fbf0d8;
  --radius: 3px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SFMono-Regular', monospace;
}

/* ---- Reset / Grundlagen ---------------------------------------- */
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--teal);
}
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}
.num,
td.zahl,
.zahl {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ---- Kopfleiste ------------------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0 1.5rem;
  height: 52px;
  background: var(--card);
  border-bottom: 1px solid var(--line-strong);
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--ink);
  text-decoration: none;
}
.brand .dot {
  color: var(--teal);
}
.topnav {
  display: flex;
  gap: 1.3rem;
}
.topnav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
}
.topnav a:hover {
  color: var(--ink);
}
.topnav a.active {
  color: var(--ink);
  border-bottom-color: var(--teal);
}

main {
  padding: 0 0 3rem;
}

/* Innenabstand für einfache Seiten (Formular, Kalender) */
.inhalt {
  padding: 1.5rem;
}
.inhalt h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

/* ---- Meldungen ------------------------------------------------- */
.meldungen {
  list-style: none;
  margin: 0;
  padding: 1rem 1.5rem 0;
}
.meldungen:empty {
  display: none;
}
.meldung {
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.92rem;
}
.meldung.success {
  background: var(--pos-tint);
  color: var(--pos);
  border-color: #cbe4d6;
}
.meldung.warning {
  background: var(--warn-tint);
  color: var(--warn);
  border-color: #ecdcae;
}
.meldung.error {
  background: var(--neg-tint);
  color: var(--neg);
  border-color: #eccfc9;
}

/* ---- Kontoblatt-Kopf (Signatur) ------------------------------- */
.statement {
  background: var(--card);
  border-bottom: 1px solid var(--line-strong);
  padding: 1.3rem 1.5rem 1.15rem;
}
.statement-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.statement h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Schuljahr-Auswahl */
.schuljahr-wahl {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.schuljahr-wahl label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
select,
.schuljahr-wahl select {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.38rem 0.6rem;
  cursor: pointer;
}

/* Kennzahlen-Streifen */
.ledger-summary {
  display: flex;
  margin-top: 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.ls-cell {
  flex: 1;
  padding: 0.65rem 1rem;
  border-right: 1px solid var(--line);
  min-width: 8rem;
}
.ls-cell:last-child {
  border-right: none;
}
.ls-cell.accent {
  background: var(--teal-tint);
}
.ls-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.64rem;
  color: var(--muted);
  font-weight: 600;
}
.ls-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.15rem;
  letter-spacing: -0.02em;
}
.ls-value.pos {
  color: var(--pos);
}
.ls-value.neg {
  color: var(--neg);
}
.ls-value.warn {
  color: var(--warn);
}
.ls-value small {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 400;
}

/* ---- Aktionsleiste + Buttons ---------------------------------- */
.actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.9rem 1.5rem;
}
.actions .sep {
  flex: 1;
}
.actions .count {
  color: var(--muted);
  font-size: 0.8rem;
}

.btn,
button.btn,
.formular button[type='submit'] {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.82rem;
  padding: 0.44rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.btn.primary,
.formular button[type='submit'] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.btn.primary:hover,
.formular button[type='submit']:hover {
  background: var(--teal-2);
  color: #fff;
}
.btn svg {
  display: block;
}

/* ---- Tabelle (Ledger) ----------------------------------------- */
.karte {
  overflow-x: auto;
  padding: 0 1.5rem 1rem;
}

table.filter-tabelle {
  border-collapse: collapse;
  width: 100%;
  min-width: 1180px;
  background: var(--card);
  border: 1px solid var(--line);
}

/* Gruppen-Kopf */
thead tr.gruppen th {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
  padding: 0.5rem 0.55rem 0.28rem;
  border-bottom: 1px solid var(--line);
}
thead tr.gruppen th.g-kal {
  color: #5a6bce;
}
thead tr.gruppen th.g-erg {
  color: var(--teal);
  background: var(--teal-tint);
}

/* Spaltengruppen aus-/einblenden */
.filter-tabelle.hide-stamm .col-stamm,
.filter-tabelle.hide-kal .col-kal,
.filter-tabelle.hide-erg .col-erg {
  display: none;
}
.spalten-toggle {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.spalten-toggle-label {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
}
.spalten-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}
/* Notiz-Spalte in der Übersicht kompakter als in der Rückfrage-Ansicht */
.notiz-zelle .notiz-input { width: 11rem; }

/* Spalten-Kopf (sortierbar) */
thead tr.spalten th {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--ink-2);
  text-align: right;
  padding: 0.32rem 0.55rem 0.5rem;
  white-space: nowrap;
  border-bottom: 1.5px solid var(--line-strong);
  vertical-align: bottom;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
thead tr.spalten th.txt {
  text-align: left;
}
thead tr.spalten th.result-h {
  background: var(--teal-tint);
  color: var(--teal);
  border-left: 1px solid var(--teal-line);
}
.filter-tabelle th[data-sort] {
  cursor: pointer;
  user-select: none;
}
.filter-tabelle th[data-sort]:hover {
  color: var(--ink);
}

/* Filterzeile */
tr.filter-zeile th {
  padding: 0.25rem 0.4rem 0.4rem;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}
.filter-zeile input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--card);
}

/* Körper */
.filter-tabelle tbody td {
  padding: 0.48rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
.filter-tabelle tbody td.txt {
  text-align: left;
}
.filter-tabelle tbody tr:nth-child(even) {
  background: #fcfcfb;
}
.filter-tabelle tbody tr:hover {
  background: #f7f9f7;
}
.filter-tabelle td.zahl {
  text-align: right;
}
.filter-tabelle td.fehler {
  color: var(--neg);
  text-align: left;
  font-family: var(--body);
}

td.period {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  text-align: left;
}

.lk-name {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.lk-name:hover {
  color: var(--teal);
}
.rowlinks {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.rowlinks a {
  color: var(--teal);
  text-decoration: none;
}
.rowlinks a:hover {
  text-decoration: underline;
}
.rowlinks .d {
  color: var(--line-strong);
  margin: 0 0.28rem;
}

/* Saldo (Ü-Übertrag) */
.saldo.pos {
  color: var(--pos);
}
.saldo.neg {
  color: var(--neg);
}

/* Krankheitstage-Hervorhebung */
td.zahl .krank-hi {
  display: inline-block;
  padding: 0.02rem 0.32rem;
  border-radius: 2px;
  background: var(--neg-tint);
  color: var(--neg);
  font-weight: 700;
}

/* Ergebnisspalte */
.filter-tabelle td.result {
  background: var(--teal-tint);
  font-weight: 700;
  color: var(--ink);
  border-left: 1px solid var(--teal-line);
  font-size: 0.95rem;
}

.foot-note {
  padding: 0 1.5rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.hinweis {
  color: var(--muted);
  font-size: 0.9rem;
}
.hinweis a {
  color: var(--teal);
}

/* ---- Ferienarbeitstage-Button in Zeile ------------------------ */
button.fat-oeffnen,
button.inline-edit {
  background: none;
  border: none;
  padding: 0;
  color: var(--teal);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
button.fat-oeffnen:hover,
button.inline-edit:hover {
  text-decoration: underline;
}

/* ---- Inline-Editieren ----------------------------------------- */
tr.zeile-edit {
  background: var(--teal-tint) !important;
}
.zeile-edit input {
  box-sizing: border-box;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.18rem 0.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--card);
}
.zeile-edit input[type='date'] {
  width: 8.5rem;
  font-family: var(--mono);
}
.zeile-edit td.zahl input {
  width: 4.5rem;
  text-align: right;
  font-family: var(--mono);
}
.zeile-edit input[name='wochenarbeitstage'] {
  width: 8rem;
}
.zeile-edit .errorlist {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
  color: var(--neg);
  font-size: 0.78rem;
}
.inline-aktion {
  display: block;
  margin-top: 0.3rem;
  white-space: nowrap;
  text-align: left;
}
.inline-aktion button {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.78rem;
  padding: 0.24rem 0.55rem;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  margin-right: 0.3rem;
}
.inline-aktion button:first-of-type {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.inline-aktion button.loeschen {
  margin-right: 0;
  margin-left: 0.35rem;
  border-color: var(--neg);
  color: var(--neg);
}
.inline-aktion button.loeschen:hover {
  background: var(--neg-tint);
}

/* ---- Ferienarbeitstage-Dialog --------------------------------- */
.fat-dialog {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0;
  min-width: min(30rem, 92vw);
  color: var(--ink);
  font-family: var(--body);
}
.fat-dialog::backdrop {
  background: rgba(22, 32, 28, 0.4);
}
.fat-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}
.fat-kopf h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
}
.fat-x {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.fat-soll {
  margin: 0;
  padding: 0.6rem 1rem 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.fat-soll strong {
  font-family: var(--mono);
}
.fat-warn {
  color: var(--warn);
}
.fat-meldung {
  margin: 0.5rem 1rem 0;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  background: var(--teal-tint);
  color: var(--teal-2);
  font-size: 0.9rem;
}
.fat-meldung:empty {
  display: none;
}
.fat-liste {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem;
  max-height: 50vh;
  overflow-y: auto;
}
.fat-liste li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.fat-datum {
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: nowrap;
}
.fat-ferien {
  color: var(--teal);
  white-space: nowrap;
  font-size: 0.85rem;
}
.fat-bez {
  flex: 1;
  color: var(--ink-2);
}
.fat-leer {
  color: var(--muted);
  font-style: italic;
}
.fat-loeschen {
  background: none;
  border: none;
  color: var(--neg);
  cursor: pointer;
  font-size: 1rem;
}
.fat-neu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
  background: #fbfcfb;
}
.fat-feld {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.fat-neu input {
  font: inherit;
  padding: 0.28rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--card);
}
.fat-neu input[type='date'] {
  font-family: var(--mono);
}
.fat-neu input[type='text'] {
  flex: 1;
  min-width: 8rem;
}
.fat-neu button {
  font-family: var(--display);
  font-weight: 500;
  padding: 0.32rem 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
  cursor: pointer;
}
.fat-neu-info {
  color: var(--muted);
  font-size: 0.85rem;
  width: 100%;
}

/* ---- Formular (Berechnung anlegen/bearbeiten) ----------------- */
.formular {
  max-width: 40rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.formular p {
  margin: 0 0 0.9rem;
}
.formular label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.formular input,
.formular select,
.formular textarea {
  font: inherit;
  width: 100%;
  max-width: 24rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}
.formular input[type='number'],
.formular input[type='date'] {
  font-family: var(--mono);
  max-width: 12rem;
}
.formular button[type='submit'] {
  margin-top: 0.4rem;
}
.formular .errorlist,
.formular .helptext {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.8rem;
}
.formular .errorlist {
  color: var(--neg);
}
.formular .helptext {
  color: var(--muted);
}

/* Rechen-Vorschau im Formular */
.rechen-vorschau {
  background: var(--teal-tint);
  border: 1px solid var(--teal-line);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.rechen-vorschau .num,
.rechen-vorschau strong {
  font-family: var(--mono);
}
.rechen-vorschau strong {
  color: var(--teal-2);
}

/* ---- Kalender-Seite ------------------------------------------- */
.sj-karten {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
}
.sj-karte {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.sj-karte h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.15rem;
}
.sj-karte .sj-zeitraum {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.sj-stat {
  display: flex;
  gap: 0;
  margin: 0.9rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.sj-stat div {
  flex: 1;
  padding: 0.55rem 0.7rem;
  border-right: 1px solid var(--line);
}
.sj-stat div:last-child {
  border-right: none;
}
.sj-stat .n {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.15rem;
  display: block;
}
.sj-stat .l {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.sj-karte h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1rem 0 0.4rem;
}
.bewegl-liste {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
}
.bewegl-liste li {
  display: flex;
  gap: 0.6rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.bewegl-liste li .d {
  font-family: var(--mono);
  color: var(--ink-2);
}
.bewegl-liste .bewegl-bez {
  flex: 1;
}
.bewegl-liste li form {
  margin: 0;
}
.bewegl-liste .leer {
  color: var(--muted);
  font-style: italic;
  border: none;
}
.bewegl-neu {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.bewegl-neu p {
  margin: 0;
}
.bewegl-neu input {
  font: inherit;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}
.bewegl-neu input[type='date'] {
  font-family: var(--mono);
}

/* ---- Responsiv ------------------------------------------------ */
@media (max-width: 720px) {
  .topbar {
    padding: 0 1rem;
    gap: 1rem;
  }
  .statement,
  .actions,
  .karte,
  .meldungen,
  .foot-note,
  .inhalt {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .ledger-summary {
    flex-wrap: wrap;
  }
  .ls-cell {
    flex: 1 1 45%;
    border-bottom: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Arbeitszeit-Auffälligkeiten ------------------------------------- */
.auff-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.auff-filter input[type="number"] {
  width: 5rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}
.auff-info {
  color: var(--ink-2);
  font-size: 0.9rem;
  margin-top: 0.6rem;
}
.auff-info .count {
  font-variant-numeric: tabular-nums;
}
.chip {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--neg-tint);
  color: var(--neg);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip.chip-nacht {
  background: var(--line);
  color: var(--ink-2);
}
td.zahl .ist-hi {
  display: inline-block;
  padding: 0.02rem 0.32rem;
  border-radius: 2px;
  background: var(--neg-tint);
  color: var(--neg);
  font-weight: 700;
}
.status-ok {
  color: var(--pos);
  font-weight: 600;
}
tr.az-geprueft {
  opacity: 0.55;
}
td.kommentar {
  max-width: 22rem;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.btn-mini {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.btn-mini:hover {
  background: var(--line);
}

/* --- Rückfrage: Auswahl, Notiz, Status, Mail-Vorschau ---------------- */
th.sel, td.sel { width: 1.8rem; text-align: center; }
.auff-hint { color: var(--muted); font-size: 0.85rem; margin-left: 0.6rem; }
.notiz-input {
  width: 13rem;
  min-height: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.2rem 0.4rem;
  font: inherit;
  font-size: 0.82rem;
  resize: vertical;
}
.notiz-ok { color: var(--pos); font-weight: 700; }
.status-angefragt {
  display: inline-block;
  padding: 0.02rem 0.4rem;
  border-radius: 999px;
  background: #eef3f7;
  color: #3a5a72;
  font-size: 0.78rem;
  white-space: nowrap;
}
.karte.warnung {
  border-left: 3px solid var(--neg);
  color: var(--ink-2);
  padding: 0.8rem 1.5rem;
}
.mail-vorschau { padding: 0 1.5rem 1rem; }
.mail-kopf { padding-top: 0.8rem; }
.mail-anzahl { color: var(--muted); font-size: 0.85rem; margin-left: 0.5rem; }
.mail-betreff { color: var(--ink-2); font-size: 0.9rem; margin: 0.3rem 0; }
.mail-text {
  white-space: pre-wrap;
  background: #fafbfa;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
}

/* --- Selbstauskunft-Wizard (öffentlich) + Versand-Vorschau ---------- */
.sollzeit-vorschau {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 2.4rem;
  max-width: 42rem;
  background: var(--teal-tint);
  border: 1px solid var(--teal-line);
  border-radius: var(--radius);
  padding: 0.8rem 1.1rem;
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.sollzeit-label {
  color: var(--ink-2);
  font-size: 0.85rem;
}
/* Grosse Zahlen in der Textschrift mit proportionalen Ziffern: Mono gibt jeder
   Ziffer die Breite einer 0 und wirkt in dieser Groesse auseinandergezogen. */
.sollzeit-wert {
  font-family: var(--body);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--teal-2);
}
.sollzeit-wert.klein {
  font-size: 1.5rem;
  color: var(--ink);
}
.sollzeit-einheit {
  margin-left: 0.15em;
  font-size: 0.42em;
  font-weight: 600;
  color: var(--ink-2);
}
.sollzeit-wert.klein .sollzeit-einheit {
  font-size: 0.6em;
}
.sollzeit-vorschau.fehler {
  background: var(--neg-tint);
  border-color: #eccfc9;
  color: var(--neg);
}

table.fat-verteilung {
  border-collapse: collapse;
  width: 100%;
  max-width: 34rem;
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 0.8rem;
}
.fat-verteilung th {
  text-align: left;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  padding: 0.4rem 0.55rem;
  border-bottom: 1.5px solid var(--line-strong);
}
.fat-verteilung td {
  padding: 0.42rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
.fat-verteilung tbody tr:nth-child(even) {
  background: #fcfcfb;
}
.fat-verteilung td.zahl {
  text-align: right;
}

.fat-zaehler {
  font-size: 0.9rem;
  color: var(--ink-2);
}
.fat-zaehler #summe {
  font-family: var(--mono);
  font-weight: 700;
}
.fat-zaehler #summe-ok:not([hidden]) {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--pos-tint);
  color: var(--pos);
  font-weight: 700;
}
.fat-hinweis {
  margin: 0.6rem 0 0;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  background: var(--neg-tint);
  border: 1px solid #eccfc9;
  color: var(--neg);
  font-size: 0.9rem;
}

.empfaenger-liste {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
}
.empfaenger-liste li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.empfaenger-liste li:last-child {
  border-bottom: none;
}
.empfaenger-liste label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.02rem 0.4rem;
  border-radius: 999px;
  background: var(--teal-tint);
  color: var(--teal-2);
  font-size: 0.78rem;
  white-space: nowrap;
}

.linkbtn {
  background: none;
  border: none;
  padding: 0;
  color: var(--teal);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
.linkbtn:hover {
  text-decoration: underline;
}

/* ================================================================
   Anmeldung
   Die Anmeldekarte ist der Kopf eines Kontoauszugs: Marke links,
   Rollenangabe rechts, darunter die Haarlinie – wie im Ledger.
   ================================================================ */

/* ---- Konto in der Kopfleiste ----------------------------------- */
.konto {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
  align-self: stretch;
}
.konto form {
  margin: 0;
  display: flex;
}
.konto-name {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}
.konto .btn-mini {
  font-family: var(--display);
  letter-spacing: 0.04em;
}

/* ---- Anmeldeseite ---------------------------------------------- */
.anmelde-seite {
  min-height: 100vh;
  display: flex;
  background: var(--paper);
}
.anmeldung {
  margin: auto;
  padding: 2.5rem 1.25rem;
  width: 100%;
  max-width: 25rem;
}

.anmelde-karte {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  /* Tinten-Kante oben: derselbe Akzent wie die aktive Navigation */
  border-top: 2px solid var(--teal);
}

/* Kopfzeile im Ledger-Stil */
.anmelde-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.anmelde-rolle {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.anmelde-koerper {
  padding: 1.5rem 1.5rem 1.75rem;
}
.anmelde-koerper h1 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 1.4rem;
  color: var(--ink);
}

.anmelde-feld {
  margin-bottom: 0.9rem;
}
.anmelde-feld label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
/* Mono in den Feldern: unterscheidbare Zeichen, wie überall dort,
   wo in dieser App etwas Eingetragenes steht. */
.anmelde-feld input {
  font-family: var(--mono);
  font-size: 0.92rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.anmelde-feld input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-tint);
}

.anmelde-karte button[type='submit'] {
  width: 100%;
  margin-top: 0.6rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 0.6rem 0.85rem;
  color: #fff;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s ease;
}
.anmelde-karte button[type='submit']:hover {
  background: var(--teal-2);
}
.anmelde-karte button[type='submit']:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.anmelde-fehler {
  margin: 0 0 1.1rem;
  padding: 0.5rem 0.7rem;
  border-left: 2px solid var(--neg);
  background: var(--neg-tint);
  color: var(--neg);
  font-size: 0.85rem;
}

.anmelde-fuss {
  margin: 1.25rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .anmelde-feld input,
  .anmelde-karte button[type='submit'] {
    transition: none;
  }
}

.anmelde-hinweis {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.anmelde-hinweis:last-child {
  margin-bottom: 0;
}

/* ---- Seitenfuß mit den Pflichtangaben ------------------------- */
.seitenfuss {
  padding: 1.25rem 1.5rem 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
}
.seitenfuss a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.seitenfuss a:hover {
  color: var(--ink-2);
  border-bottom-color: var(--line-strong);
}
.anmelde-rechts {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.anmelde-rechts a {
  color: var(--muted);
  text-decoration: none;
}
.anmelde-rechts a:hover {
  color: var(--ink-2);
  text-decoration: underline;
}

/* ---- Rechtstexte (Impressum, Datenschutz) --------------------- */
.rechtstext {
  max-width: 44rem;
  padding: 2rem 1.5rem 1rem;
}
.rechtstext h1 {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 500;
  margin: 0.15rem 0 1.6rem;
  color: var(--ink);
}
.rechtstext h2 {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-2);
  margin: 1.9rem 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}
.rechtstext p {
  margin: 0 0 0.85rem;
  line-height: 1.65;
  color: var(--ink-2);
}
.rechtstext a {
  color: var(--teal);
}
.rechtstext .offen {
  background: var(--warn-tint);
  color: var(--warn);
  padding: 0 0.25rem;
  border-radius: 2px;
}
.rechtstext .behoerde {
  border-left: 2px solid var(--teal-line);
  padding-left: 0.9rem;
  font-size: 0.92rem;
}
.rechts-fuss {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.rechts-liste {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
  line-height: 1.65;
  color: var(--ink-2);
}
.rechts-liste li {
  margin-bottom: 0.35rem;
}

/* Offener Einspruch aus der Selbstauskunft (Zeile der Übersicht) */
.einspruch-hi {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.02rem 0.32rem;
  border-radius: 2px;
  background: var(--neg-tint);
  color: var(--neg);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ---- Zwei-Eimer-Balken (Selbstauskunft, Schritt 2) -------------- */
.eimer {
  max-width: 42rem;              /* Lesebreite: sonst ein 2000px langes Band */
  margin: 1rem 0 0.2rem;
}
.eimer-gesamt {
  margin: 0 0 0.5rem;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.eimer-balken {
  display: flex;
  gap: 2px;                      /* Trennfuge in Flaechenfarbe */
  height: 26px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
}
.eimer-unterricht,
.eimer-ferien {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 3px;                /* schmale Anteile bleiben sichtbar */
  padding: 0 0.5rem;
  transition: width 180ms ease-out;
}
.eimer-unterricht { background: var(--teal); }
.eimer-ferien { background: var(--ocker); }
.eimer-wert {
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.eimer-legende {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  font-size: 0.88rem;
}
.eimer-legende li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.22rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.eimer-legende li:last-child {
  border-bottom: 0;
}
.eimer-punkt {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.eimer-punkt.unterricht { background: var(--teal); }
.eimer-punkt.ferien { background: var(--ocker); }
.eimer-was {
  flex: 1 1 auto;                /* schiebt die Zahlen rechtsbuendig aus */
}
.eimer-zahl {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink);
}
.eimer-prozent,
.eimer-tage {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}
.eimer-prozent { min-width: 3.2rem; }
.eimer-tage { min-width: 4.6rem; }

/* ---- Auswahl der Ferienarbeitstage (Schritt 2) ------------------ */
.fat-wahl {
  max-width: 42rem;
  margin: 0 0 1.2rem;
  padding: 1rem 1.1rem;
  background: var(--teal-tint);
  border: 1px solid var(--teal-line);
  border-radius: var(--radius);
}
.fat-wahl-titel {
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.fat-wahl-reihe {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.fat-zahl {
  flex: none;
  width: 5.2rem;
  padding: 0.35rem 0.5rem;
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 700;
  text-align: center;
  color: var(--teal-2);
  background: var(--card);
  border: 2px solid var(--teal);
  border-radius: var(--radius);
}
.fat-regler {
  flex: 1 1 auto;
  min-width: 0;
}
.fat-regler input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--teal);
}
.fat-skala {
  display: flex;
  justify-content: space-between;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.fat-wahl-hinweis {
  margin: 0.7rem 0 0;
  color: var(--ink-2);
  font-size: 0.85rem;
}

/* ---- Tage-Balken: Verwendung aller Wochenarbeitstage ------------ */
/* Zwei Farben fuer gearbeitete Tage (Teal, Ocker), drei Graustufen fuer
   nicht gearbeitete - der Unterschied, auf den es ankommt, ist farbig. */
.tage-balken {
  display: flex;
  gap: 2px;
  height: 26px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
}
.tage-seg {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 3px;
  padding: 0 0.5rem;
  transition: width 180ms ease-out;
}
.tage-seg.unterricht { background: var(--teal); }
.tage-seg.ferienarbeit { background: var(--ocker); }
.tage-seg.frei { background: #dfe4df; }
.tage-seg.urlaub { background: #7b857f; }
.tage-seg.feiertage { background: #b4bcb5; }
.tage-seg.freistellung { background: #c9b99b; }
.tage-seg.frei .eimer-wert,
.tage-seg.feiertage .eimer-wert,
.tage-seg.freistellung .eimer-wert { color: var(--ink); }

.eimer-punkt.ferienarbeit { background: var(--ocker); }
.eimer-punkt.frei { background: #dfe4df; }
.eimer-punkt.urlaub { background: #7b857f; }
.eimer-punkt.feiertage { background: #b4bcb5; }
.eimer-punkt.freistellung { background: #c9b99b; }

.eimer-fuss {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Aufklappbarer Tage-Balken */
.eimer-details > summary {
  cursor: pointer;
  color: var(--teal-2);
  font-size: 0.9rem;
  padding: 0.2rem 0;
}
.eimer-details > summary::marker {
  color: var(--muted);
}
.eimer-details[open] > summary {
  margin-bottom: 0.6rem;
}

/* Haken-Spalte der Übersicht (Empfänger der Sollzeit-Links) */
.filter-tabelle th.haken,
.filter-tabelle td.haken {
  width: 2.2rem;
  padding-left: 0.6rem;
  padding-right: 0;
  text-align: center;
}
.filter-tabelle td.haken input[disabled] {
  opacity: 0.35;
}
.versand-form {
  display: inline;
}
.versand-form button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Selbstkorrektur der Lehrkraft */
.geaendert-hi {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.02rem 0.32rem;
  border-radius: 2px;
  background: var(--warn-tint);
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 700;
}
.eigene-daten {
  max-width: 42rem;
  margin: 0 0 1.2rem;
  padding: 0.9rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.eigene-daten-hinweis {
  margin: 0 0 0.8rem;
  color: var(--ink-2);
  font-size: 0.88rem;
}
.eigene-daten-reihe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
  margin-bottom: 0.6rem;
}
.eigene-daten-reihe label,
.eigene-daten-titel {
  color: var(--ink-2);
  font-size: 0.88rem;
}
.eigene-daten input[type="date"],
.eigene-daten input[type="number"] {
  padding: 0.3rem 0.45rem;
  font-family: var(--mono);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.tage-wahl {
  display: flex;
  gap: 0.9rem;
}
.tage-wahl label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--mono);
}

.feld-hinweis {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Stand der Selbstauskunft in der Übersichtszeile */
.status-fertig,
.status-gesendet {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.02rem 0.32rem;
  border-radius: 2px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-fertig {
  background: var(--pos-tint);
  color: var(--pos);
}
.status-gesendet {
  background: var(--teal-tint);
  color: var(--teal-2);
}
