﻿/* Zeiterfassung – Gestaltung nach Mockup (hell/dunkel) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("schrift/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("schrift/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F4F3F1; --surface: #FFFFFF; --line: #E2DFDB; --ink: #1E1C1B; --muted: #625D58;
  --accent: #A11D2B; --accent-ink: #FFFFFF; --accent-soft: #F6E4E5;
  --plot-plus: #2F6FB0; --plot-minus: #C2502A; --good: #1D6A47; --good-soft: #E1F0E8; --warn: #7A4E00; --warn-soft: #FBF0DC;
  --bad: #A11D2B; --field: #FAF9F7; --bar: #C9C4BE;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --bg: #151414; --surface: #211F1E; --line: #383432; --ink: #F1EEEA; --muted: #ABA49E;
    --accent: #E8707A; --accent-ink: #1A0E0F; --accent-soft: #3A2225;
    --plot-plus: #4A8FD6; --plot-minus: #E0704C; --good: #74CFA1; --good-soft: #1B3328; --warn: #F0C36B; --warn-soft: #3A2F1A;
    --bad: #F08A92; --field: #1A1918; --bar: #4A4542;
    color-scheme: dark;
  }
}
:root[data-theme="dunkel"] {
  --bg: #151414; --surface: #211F1E; --line: #383432; --ink: #F1EEEA; --muted: #ABA49E;
  --accent: #E8707A; --accent-ink: #1A0E0F; --accent-soft: #3A2225;
  --plot-plus: #4A8FD6; --plot-minus: #E0704C; --good: #74CFA1; --good-soft: #1B3328; --warn: #F0C36B; --warn-soft: #3A2F1A;
  --bad: #F08A92; --field: #1A1918; --bar: #4A4542;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 15px;
  line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { text-decoration: underline; }
h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 17px; font-weight: 600; }
.leise { color: var(--muted); }
.klein { font-size: 13px; }

/* Grundlayout */
.rahmen { display: flex; min-height: 100vh; }
.menue { flex: 0 0 240px; background: var(--surface); border-right: 1px solid var(--line); padding: 16px 16px 24px;
  display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }  /* dvh: auf dem iPad ragt 100vh unter die Leiste */
.marke { padding: 8px 12px 24px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.marke:hover { text-decoration: none; }
.marke strong { font-size: 17px; letter-spacing: -0.01em; }
.marke strong span { color: var(--accent); }
.menue a:not(.marke) { text-decoration: none; padding: 9px 12px; border-radius: 8px; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.menue a:not(.marke) .sym { flex: none; color: var(--muted); }
.menue a.aktiv .sym { color: var(--accent); }
.menue a:not(.marke):hover { background: var(--field); text-decoration: none; }
.menue a.aktiv { background: var(--accent-soft); font-weight: 600; }
.menue .trenner { height: 1px; background: var(--line); margin: 12px 4px; }
.spalte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.inhalt { flex: 1 1 auto; min-width: 0; width: 100%; padding: 20px clamp(16px, 2.4vw, 40px) 48px; display: flex; flex-direction: column; gap: 20px; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  height: 64px; padding: 0 clamp(16px, 2.4vw, 40px); background: var(--bg);  /* deckend: der Weichzeichner (blur) wirkte auf dem iPad unscharf */
  border-bottom: 1px solid var(--line); }
.topbar-marke { display: none; margin-right: auto; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.topbar-marke span { color: var(--accent); }
.topbar-rechts { display: flex; align-items: center; gap: 8px; }
.profil { position: relative; }
.profil > summary { list-style: none; }
.profil > summary::-webkit-details-marker { display: none; }
.avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); font-weight: 700;
  font-size: 15px; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; }
.profil[open] .avatar { outline: 2px solid var(--accent); outline-offset: 2px; }
.profil-menue { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 8px; display: flex; flex-direction: column; z-index: 40; }
.profil-kopf { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profil-menue a, .profil-menue button { display: flex; align-items: center; gap: 6px; padding: 10px; border-radius: 8px; color: var(--ink);
  text-decoration: none; background: none; border: 0; font: inherit; text-align: left; width: 100%; cursor: pointer; min-height: 44px; }
.profil-menue a:hover, .profil-menue button:hover { background: var(--field); text-decoration: none; }
.profil-menue form { margin: 0; }

.kopf { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.kopf .titel { display: flex; flex-direction: column; gap: 4px; }
.werkzeuge { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Karten */
.karte { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.raster.breit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.raster.drei { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.kennzahl .wert { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kennzahl .wert small { font-size: 15px; font-weight: 500; color: var(--muted); }
.hinweis { padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); }
.hinweis strong { color: var(--warn); }

/* Knöpfe */
.knopf, button.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px;
  padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.knopf:hover { text-decoration: none; border-color: var(--muted); }
.knopf.haupt { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.knopf.gefahr { color: var(--bad); }
.knopf.symbol { width: 44px; padding: 0; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.knopf-reihe.rechts-buendig { justify-content: flex-end; }
.icon-hell { display: none; }
:root[data-theme="dunkel"] .icon-hell { display: inline; }
:root[data-theme="dunkel"] .icon-dunkel { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) .icon-hell { display: inline; }
  :root:not([data-theme="hell"]) .icon-dunkel { display: none; }
}

/* Reiter */
.reiter { display: flex; flex-wrap: wrap; gap: 8px; }
.reiter a { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; font-size: 14px; }
.reiter a.aktiv { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

/* Formulare */
.formular { display: flex; flex-direction: column; gap: 14px; }
.feld { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; }
.feld > label { flex: 1 1 150px; }
.feld .eingabe { flex: 0 1 auto; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; max-width: 100%; }
.feld.gestapelt { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.feld.gestapelt .eingabe { align-items: stretch; }
.feld .hilfe { font-size: 13px; color: var(--muted); flex-basis: 100%; }
.feld .fehler, .fehlerliste { color: var(--bad); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url],
input[type=search], select, textarea { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--field); color: var(--ink); font: inherit; max-width: 100%; min-width: 0; }
textarea { height: auto; padding: 10px 12px; width: 100%; }
select { min-width: min(200px, 100%); }
input[type=text], input[type=email], input[type=password], input[type=url] { width: clamp(220px, 22vw, 380px); }
input.kurz, input[type=time], input[type=number] { width: 100px; text-align: right; }
input[type=date] { width: 170px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
input[type=search] { -webkit-appearance: none; appearance: none; box-sizing: border-box; width: clamp(220px, 22vw, 380px); }
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
input:focus, select:focus, textarea:focus, .knopf:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
.trennlinie { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.wochentage { display: grid; grid-template-columns: repeat(7, minmax(64px, 1fr)); gap: 8px; }
.wochentage label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.wochentage input { width: 100%; text-align: center; }

/* Verdeckte Eingabe, die kein Passwortfeld ist (Sicherungspasswort) */
input.geheim { -webkit-text-security: disc; }

/* Tabellen */
.tabelle-box { overflow-x: auto; }
/* Tabellenkarten: Zeilen- und Zellfarben enden an den abgerundeten Ecken der Karte */
.karte[style*="padding:0"] { overflow: hidden; overflow: clip; }
table.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 12px; border-bottom: 1px solid var(--line); }
.tabelle td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle .rechts { text-align: right; }
/* Feste Spaltenbreiten am Desktop: die Aufteilung springt nicht, wenn Einträge ein- oder ausgeblendet werden */
@media (min-width: 781px) { .tabelle.fest { table-layout: fixed; width: 100%; } .tabelle.fest td { overflow-wrap: anywhere; }
  .tabelle.fest .rechts { white-space: nowrap; } .tabelle.pruef-tabelle.fest { min-width: 960px; } }
/* Kennzeichen (Badges): überall dieselben abgerundeten Ecken (--ecke-marke), keine Pillenform */
:root { --ecke-marke: 6px; }
.marke-klein { display: inline-block; padding: 2px 8px; border-radius: var(--ecke-marke); background: var(--accent-soft); font-size: 12px; font-weight: 600; line-height: 1.5; }
.marke-klein.gut { background: var(--good-soft); color: var(--good); }
.marke-klein.warn { background: var(--warn-soft); color: var(--warn); }

/* Meldungen */
.meldungen { display: flex; flex-direction: column; gap: 8px; }
.meldung { padding: 12px 14px; border-radius: 10px; background: var(--good-soft); color: var(--ink); }
.meldung.error { background: var(--accent-soft); }
.meldung.info, .meldung.warning { background: var(--warn-soft); }

/* Anmeldung */
.mitte { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.mitte .karte > .marke, .mitte .karte > h1, .mitte .karte > .zentriert { align-items: center; text-align: center; padding: 0; }
.mitte .karte > .marke strong { font-size: 20px; }
.mitte .karte { width: 100%; max-width: 420px; padding: 32px 28px; }
.mitte input[type=text], .mitte input[type=password] { width: 100%; }
.mitte .feld { flex-direction: column; align-items: stretch; }
.mitte .feld .eingabe { align-items: stretch; }
.qr svg { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 8px; }
.qr path { fill: #000; }
code.geheim { font-size: 14px; letter-spacing: 0.08em; word-break: break-all; }

/* Woche */
.woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.woche .tag { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.woche .tag.heute { border-color: var(--accent); background: var(--accent-soft); }
.woche .tag .ft { font-size: 12px; color: var(--accent); overflow-wrap: anywhere; }

.feld.gestapelt > label { flex: none; }

.mitte .feld > label { flex: none; }

/* ---- Phase 2–4 ---- */
.knopf.abmelden { width: 100%; justify-content: flex-start; border: 0; font-weight: 400; padding: 0 12px; background: transparent; }
.zaehler { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--ecke-marke); background: var(--accent);
  color: var(--accent-ink); font-size: 12px; font-weight: 700; align-items: center; justify-content: center; margin-left: 4px; }
.glocke { position: relative; }
/* Kurzes Wackeln, wenn eine neue Benachrichtigung eintrifft */
@keyframes klingeln { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-5deg); } }
.glocke.klingelt svg { animation: klingeln .8s ease-in-out; transform-origin: 50% 10%; }
@media (prefers-reduced-motion: reduce) { .glocke.klingelt svg { animation: none; } }
.glocke .punkt { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 5px;
  background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.untennav { display: none; }

.untennav button { font: inherit; background: none; border: 0; cursor: pointer; }
.punkt-klein { position: absolute; top: 8px; margin-left: 18px; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); }
.reiter-wahl { display: none; }
.einklappbar > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.einklappbar > summary::-webkit-details-marker { display: none; }
.einklappbar > summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.einklappbar[open] > summary::after { content: "–"; }
.einklappbar[open] > summary { margin-bottom: 4px; }
.schalter { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 14px; }
.schalter:hover { text-decoration: none; }
.schalter .spur { width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.schalter .spur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.schalter[aria-checked="true"] .spur { background: var(--accent); }
.schalter[aria-checked="true"] .spur::after { left: 21px; }

@media (max-width: 780px) {
  .rahmen { display: block; }
  .menue { display: none; position: fixed; inset: 64px 0 calc(68px + env(safe-area-inset-bottom)) 0; z-index: 20; height: auto;
    max-width: none; border-right: 0; padding: 8px 12px 16px; }
  .menue.offen { display: flex; }
  .menue .marke { display: none; }
  .topbar { padding: 0 12px 0 16px; height: 64px; justify-content: space-between; }
  .topbar-marke { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: normal;
    font-size: 15px; line-height: 1.2; min-width: 0; flex: 1 1 auto; margin-right: 8px; word-break: normal; overflow-wrap: anywhere; }
  .topbar-marke.mit-logo { display: block; -webkit-line-clamp: unset; }
  .topbar-rechts { flex: none; }
  .topbar .knopf.symbol { width: 40px; height: 40px; }
  .avatar { width: 40px; height: 40px; }
  .inhalt { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); gap: 14px; }
  .untennav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); }
  .untennav a, .untennav button { position: relative; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    text-decoration: none; color: var(--muted); font-size: 12px; }
  .untennav .aktiv { color: var(--accent); font-weight: 600; }
  h1 { font-size: 22px; }
  .kopf { gap: 10px; }
  .kopf .titel { flex: 1 1 100%; }
  .werkzeuge:empty { display: none; }
  .werkzeuge { width: 100%; }
  .werkzeuge .ma-wahl { flex: 1 1 100%; }
  .ma-wahl label { display: none; }
  .ma-wahl select { flex: 1; min-width: 0; width: 100%; }
  .reiter { display: none; }
  .reiter-wahl { display: block; }
  .kopf > .reiter-wahl { flex: 1 1 100%; }
  .reiter-wahl select { width: 100%; min-width: 0; font-weight: 600; }
  .karte { padding: 16px; border-radius: 12px; }
  .raster:not(.breit):not(.drei):not(.vier):not(.drei-fest):not(.start-zahlen) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .raster.drei, .raster.vier { grid-template-columns: minmax(0, 1fr); }
  .raster:not(.breit) .kennzahl { padding: 14px; gap: 4px; }
  .kennzahl .wert { font-size: 22px; }
  .kennzahl .wert small { font-size: 12px; }
  .kennzahl .klein { font-size: 12px; }
  .nur-gross { display: none !important; }
  input[type=text], input[type=email], input[type=password], input[type=url] { width: 100%; }
  .feld .eingabe { flex: 1 1 100%; align-items: stretch; }
  .feld .eingabe input[type=checkbox] { align-self: flex-start; }
  .feld .eingabe select, .feld .eingabe input[type=date] { width: 100%; }
  .feld .eingabe input.kurz, .feld .eingabe input[type=number] { width: 100%; text-align: left; }
  .feld:has(input[type=checkbox]) > label { flex: 1 1 0; min-width: 0; }
  .feld:has(input[type=checkbox]) .eingabe { flex: 0 0 auto; }
  select { min-width: 0; }
  .wochentage { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Stempeluhr */
.stempel { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.stempel .status { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.stempel .status.ein { color: var(--good); }
.stempel .status.pause { color: var(--warn); }
.stempel .status i { width: 10px; height: 10px; border-radius: 5px; background: currentColor; display: inline-block; }
.stempel .uhr { font-size: 48px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.stempel .knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
.stempel .knoepfe .knopf { height: 56px; min-width: 150px; font-size: 16px; border-radius: 12px; }
@media (max-width: 780px) {
  .stempel { flex-direction: column; align-items: stretch; text-align: center; }
  .stempel .status { justify-content: center; }
  .stempel .uhr { font-size: 56px; }
  .stempel .knoepfe { display: grid; grid-template-columns: 1fr 1fr; }
  .stempel .knoepfe .knopf { min-width: 0; height: 60px; }
  .stempel .knoepfe .knopf:only-child { grid-column: 1 / -1; }
}
.bloecke { display: flex; flex-wrap: wrap; gap: 6px; }
.block { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); font-size: 13px; text-decoration: none; color: var(--ink); }
.block.pause { background: var(--field); color: var(--muted); border: 1px dashed var(--line); }
.block.laeuft { background: transparent; border: 1.5px dashed var(--accent); }
.block.auto { background: var(--warn-soft); }
.block.ausstehend { background: var(--warn-soft); border: 1.5px dashed var(--line); }  /* eingereicht, wartet auf Genehmigung */
a.block:hover { text-decoration: none; outline: 1px solid var(--accent); }

/* Wochenbalken */
.balken { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 190px; position: relative; border-bottom: 1px solid var(--line); }
.balken .spalte { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 190px; gap: 4px; }
.balken .wert { font-size: 12px; font-weight: 600; }
.balken .saeule { width: 100%; max-width: 44px; border-radius: 6px 6px 0 0; background: var(--accent); min-height: 0; }
.balken .heute .saeule { opacity: 0.6; }
.balken .soll { position: absolute; left: 8%; right: 8%; border-top: 2px dashed var(--muted); opacity: 0.7; }
.balken-namen { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.balken-namen .heute { color: var(--ink); font-weight: 600; }
.balken-namen small { display: block; font-size: 11px; color: var(--accent); }

/* Listen und Status */
.liste { display: flex; flex-direction: column; gap: 10px; }
.eintrag { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.eintrag .was { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eintrag.neu { border-color: var(--accent); background: var(--accent-soft); }
.farbpunkt { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: middle; }
.status-beantragt { color: var(--warn); font-weight: 600; }
.status-genehmigt { color: var(--good); font-weight: 600; }
.status-abgelehnt, .status-storniert { color: var(--muted); text-decoration: line-through; }
.plus { color: var(--good); font-weight: 600; }
.minus { color: var(--bad); font-weight: 600; }
.ma-wahl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ma-wahl select { min-width: 220px; }
.tabelle tr.wochenende td, .tabelle tr.frei td { background: var(--field); }
.tabelle tr.heute td { background: var(--accent-soft); }
.tabelle tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.warnung { color: var(--warn); font-size: 12px; display: block; }
.knopf.klein { height: 34px; padding: 0 12px; font-size: 13px; }
pre.roh { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 12px; overflow-x: auto; max-height: 320px; }
details > summary { cursor: pointer; }
.zwei-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.wochentage-kurz { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; font-size: 12px; text-align: center; }
.tabelle tr.heute .block:not(.laeuft):not(.pause) { background: var(--surface); }
.tabelle.woche-tabelle { min-width: 760px; }
.woche-tabelle .c-status { white-space: nowrap; }
@media (max-width: 780px) {
  .tabelle.woche-tabelle { min-width: 0; }
  .tabelle .nur-gross { display: none; }
  .tabelle td, .tabelle th { padding: 10px 8px; }
  /* Zeiten am Handy: erste Zeile Tag, Ist und Saldo – darunter die Zeitblöcke über die ganze Breite */
  .woche-tabelle, .woche-tabelle thead, .woche-tabelle tbody, .woche-tabelle tfoot { display: block; }
  .woche-tabelle tr { display: grid; grid-template-columns: 132px minmax(0, 1fr) 58px 70px; align-items: center; border-bottom: 1px solid var(--line); }
  .woche-tabelle tr > .c-tag, .woche-tabelle thead tr > :first-child { padding-right: 0 !important; }
  .woche-tabelle .c-status { padding-left: 2px !important; padding-right: 0 !important; }
  .woche-tabelle thead .c-status { visibility: hidden; }
  .woche-tabelle tbody tr:last-child { border-bottom: 0; }
  .woche-tabelle tr > * { border-bottom: 0; min-width: 0; width: auto !important; }  /* hebt die festen Spaltenbreiten auf */
  .woche-tabelle tr > :first-child { padding-left: 14px !important; }
  .woche-tabelle tr > :last-child { padding-right: 14px !important; }
  .woche-tabelle .c-zeiten-kopf, .woche-tabelle .c-zeiten.leer { display: none; }
  .woche-tabelle .c-zeiten { grid-column: 1 / -1; grid-row: 2; padding: 0 14px 12px !important; }
  .woche-tabelle .block { white-space: nowrap; padding: 6px 10px; }
  .woche-tabelle .block.ausstehend { white-space: normal; }
  .woche-tabelle tr.frei { background: var(--field); }
  .woche-tabelle tr.heute { background: var(--accent-soft); }
  .tabelle.woche-tabelle tbody tr > td { background: transparent; }
  .woche-tabelle tfoot tr { border-top: 2px solid var(--line); border-bottom: 0; }
  .woche-tabelle tfoot td { border-top: 0; }
}
.nur-klein, .nur-klein-block { display: none; }
.blaettern { display: flex; gap: 8px; align-items: center; }
.blaettern > .knopf.symbol { flex: none; width: 44px; height: 44px; box-sizing: border-box; }
@media (max-width: 780px) {
  .nur-klein { display: initial; }
  .nur-klein-block { display: block; }
  .blaettern { margin-left: auto; }
  .werkzeuge > .knopf.haupt { flex: 1; }
}
.gross-knopf { height: 56px; font-size: 16px; width: 100%; }
.zentriert { text-align: center; }
.oder { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.oder::before, .oder::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.nachricht-person { font-weight: 600; }
.nachricht-text { white-space: pre-line; }
.passkey-direkt { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.passkey-direkt[hidden] { display: none; }
.passkey-direkt [data-passkey-info]:empty { display: none; }
.passkey-box { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.feld .eingabe { min-width: 0; }
.feld.gestapelt .eingabe { width: 100%; }
textarea { min-width: 0; box-sizing: border-box; }
.kennzahl .wert.wort { font-size: 22px; hyphens: auto; overflow-wrap: anywhere; }
@media (max-width: 780px) { .kennzahl .wert.wort { font-size: 16px; } }
/* Übersicht: Kennzahlen bleiben auch bei schmaler Spalte einzeilig */
@media (min-width: 1001px) {
  .start-zahlen .kennzahl .wert { font-size: clamp(22px, 2vw, 30px); white-space: nowrap; }
  .start-zahlen .kennzahl .wert.wort { font-size: clamp(17px, 1.45vw, 22px); white-space: normal; overflow-wrap: normal; }
}
.kennzahl .wert { overflow-wrap: anywhere; }
.einklappbar:not([open]) { padding-top: 14px; padding-bottom: 14px; }

/* Fenster (Dialoge) für neue Einträge */
dialog.fenster { border: 0; padding: 0; border-radius: 16px; width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(0,0,0,.35); overflow: hidden; }
dialog.fenster.breit { width: min(820px, calc(100vw - 32px)); }
dialog.fenster[open] { display: flex; flex-direction: column; animation: fenster-auf .16s ease-out; }
dialog.fenster::backdrop { background: rgba(10, 8, 8, .5); backdrop-filter: blur(2px); }
@keyframes fenster-auf { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.fenster-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 22px;
  border-bottom: 1px solid var(--line); }
.fenster-inhalt { padding: 18px 22px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.fenster .feld { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; }
.fenster .feld > label { flex: none; font-weight: 500; }
.fenster .feld .eingabe { align-items: stretch; }
.fenster .feld:not(.gestapelt):has(input[type=checkbox]) { flex-direction: row; align-items: center; flex-wrap: wrap; }
.fenster .feld:not(.gestapelt):has(input[type=checkbox]) > label { flex: 1 1 0; }
.fenster .feld:not(.gestapelt):has(input[type=checkbox]) .eingabe { flex: 0 0 auto; }
.fenster input:not([type=checkbox]):not([type=radio]), .fenster select, .fenster textarea { width: 100%; }
.fenster .fuss { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.knopf .plus { font-size: 20px; line-height: 1; font-weight: 500; color: inherit; }
@media (max-width: 780px) {
  dialog.fenster, dialog.fenster.breit { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom); }
  @keyframes fenster-auf { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
  .fenster .fuss .knopf { flex: 1 1 0; }
}

/* PDF-Vorschau in der installierten App */
dialog.fenster.vorschau { width: min(1100px, calc(100vw - 48px)); max-width: none; height: calc(100dvh - 48px); max-height: calc(100dvh - 48px); margin: auto; }
.vorschau .fenster-kopf h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vorschau-knoepfe { display: flex; gap: 8px; flex: none; }
.vorschau iframe { flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }

/* Ablagefläche (Drag & Drop) */
.ablage { border: 2px dashed var(--line); border-radius: 14px; padding: 22px 16px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 6px; cursor: pointer; transition: border-color .15s, background .15s; }
.ablage:hover, .ablage.ueber { border-color: var(--accent); background: var(--accent-soft); }
.ablage strong { font-size: 15px; }
.ablage input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ablage .datei-name { font-weight: 600; color: var(--accent); word-break: break-all; }
body.zieht::after { content: "Datei hier ablegen"; position: fixed; inset: 12px; border: 3px dashed var(--accent); border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 80%, transparent); display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--accent); z-index: 100; pointer-events: none; }
.wochen-wahl select { min-width: 0; width: auto; height: 44px; font-weight: 600; }
.datum-sprung input[type=date] { width: 160px; }
.zwei-spalten.breit-links { grid-template-columns: minmax(0, 2fr) minmax(min(100%, 320px), 1fr); }
@media (max-width: 1000px) { .zwei-spalten.breit-links { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 780px) {
  .wochen-wahl { flex: 1 1 auto; min-width: 0; }
  .blaettern:has(.wochen-wahl) { flex: 1 1 100%; }
  .wochen-wahl select { width: 100%; }
  .datum-sprung { flex: 1 1 0; min-width: 0; }
  .datum-sprung input[type=date] { width: 100%; min-width: 0; }
  .datum-sprung + .knopf { flex: 0 0 auto; }
  .werkzeuge > .knopf.haupt[data-fenster] { flex: 1 1 100%; order: 10; }
}
.person-kopf { display: flex; align-items: center; gap: 16px; min-width: 0; }
.avatar.gross { width: 56px; height: 56px; border-radius: 28px; font-size: 20px; flex: 0 0 auto; cursor: default; }
.kennzahl.verlinkt { text-decoration: none; color: inherit; transition: border-color .15s; }
.kennzahl.verlinkt:hover { border-color: var(--muted); text-decoration: none; }
.punkt-status { display: inline-block; width: 12px; height: 12px; border-radius: 6px; background: var(--line); margin-right: 8px; vertical-align: middle; }
.punkt-status.ein { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.punkt-status.pause { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.fenster .wochentage { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 780px) { .fenster .wochentage { grid-template-columns: repeat(4, minmax(0, 1fr)); } .person-kopf .avatar.gross { width: 44px; height: 44px; font-size: 16px; } }
.begruessung { text-wrap: balance; min-height: 1.3em; }
@media (max-width: 1100px) { .begruessung { min-height: 2.6em; } }  /* Platz für zwei Zeilen: lange Begrüßungen schieben die Seite nicht */
main.inhalt > .seitenkopf .kopf .leise { min-height: 1.4em; }
.uhr, .wert, .ring-prozent, .balken .wert { font-variant-numeric: tabular-nums; }
.raster.drei.unten { align-items: start; }
.person-zeile { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar.klein-avatar { width: 36px; height: 36px; border-radius: 18px; font-size: 13px; flex: 0 0 auto; cursor: inherit; background: var(--field); color: var(--ink); }
.anwesend-ein .avatar.klein-avatar { background: var(--good-soft); color: var(--good); }
.anwesend-pause .avatar.klein-avatar { background: var(--warn-soft); color: var(--warn); }
.status-chip { --chip: var(--muted); display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.5; padding: 2px 8px; border-radius: var(--ecke-marke);
  color: var(--chip); background: color-mix(in srgb, var(--chip) 14%, transparent); white-space: nowrap; }
.status-chip.ein { --chip: var(--good); }
.status-chip.pause { --chip: var(--warn); }

/* Diagramme */
.diagramm { width: 100%; height: auto; max-height: 320px; display: block; overflow: visible; }
.diagramm .gitter { stroke: var(--line); stroke-width: 1; }
.diagramm .achse-null { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.diagramm .achse-text { fill: var(--muted); font-size: calc(12px * var(--k, 1)); font-family: inherit; }
.diagramm .wert-text { fill: var(--ink); font-size: calc(13px * var(--k, 1)); font-weight: 700; font-family: inherit; }
.diagramm .balken-plus { fill: var(--plot-plus); }
.diagramm .balken-minus { fill: var(--plot-minus); }
.diagramm .ziel-linie { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .55; pointer-events: none; }
.diagramm .linie { fill: none; stroke: var(--plot-plus); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.diagramm .flaeche { fill: var(--plot-plus); opacity: .1; }
.diagramm .endpunkt, .diagramm .fadenpunkt { fill: var(--plot-plus); stroke: var(--surface); stroke-width: 2; }
.diagramm .fadenkreuz { stroke: var(--muted); stroke-width: 1; opacity: 0; }
.diagramm .fadenpunkt { opacity: 0; }
.diagramm.zeigt .fadenkreuz { opacity: .5; }
.diagramm.zeigt .fadenpunkt { opacity: 1; }
.diagramm .treffer { fill: transparent; cursor: crosshair; }
.diagramm .treffer:hover { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
.diagramm .treffer.spur:hover { fill: transparent; }
.diagramm-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 10px;
  border-radius: 8px; font-size: 13px; font-weight: 500; max-width: 260px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.legende { display: inline-flex; align-items: center; gap: 6px; }
.legende .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.legende .lg.plus { background: var(--plot-plus); }
.legende .lg.minus { background: var(--plot-minus); }
.tabelle-ansicht > summary { padding: 16px 22px; cursor: pointer; font-weight: 600; }

/* Formulare in schmalen Karten: Beschriftung über dem Feld */
.felder-gestapelt .feld { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; }
.felder-gestapelt .feld > label { flex: none; }
.felder-gestapelt .feld .eingabe { align-items: stretch; }
.felder-gestapelt .feld:not(.gestapelt):has(input[type=checkbox]) { flex-direction: row; align-items: center; flex-wrap: wrap; }
.felder-gestapelt .feld:not(.gestapelt):has(input[type=checkbox]) > label { flex: 1 1 0; }
.felder-gestapelt .feld:not(.gestapelt):has(input[type=checkbox]) .eingabe { flex: 0 0 auto; }
.felder-gestapelt input:not([type=checkbox]):not([type=radio]), .felder-gestapelt select, .felder-gestapelt textarea { width: 100%; }

/* iPhone/iPad: kein automatisches Hineinzoomen beim Antippen eines Feldes.
   Safari zoomt, wenn die Schrift im Feld kleiner als 16 px ist – daher am Handy 16 px. */
@media (max-width: 780px), (pointer: coarse) {
  /* !important: auch Felder mit eigener, kleinerer Schrift (Suche, Filter, Dialoge) */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
  a, button, input, select, textarea, label, summary { touch-action: manipulation; }
}

/* Datums- und Zeitfelder: Safari gibt ihnen sonst eine eigene Mindestbreite und zentrierten Text,
   wodurch sie rechts aus der Karte ragen. */
input[type=date], input[type=time], input[type=datetime-local] { min-width: 0; max-width: 100%; }
@supports (-webkit-touch-callout: none) {
  input[type=date], input[type=time], input[type=datetime-local] {
    -webkit-appearance: none; appearance: none; display: block; line-height: 42px; }
  input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value {
    text-align: left; margin: 0; min-height: 1.45em; }
}
@media (max-width: 780px) {
  .feld .eingabe:has(input[type=date]), .feld .eingabe:has(input[type=time]) { min-width: 0; max-width: 100%; }
  .feld:not(.gestapelt) .eingabe:has(input[type=date]) { flex: 0 1 170px; }
  .feld:not(.gestapelt) input[type=date] { width: 100%; }
}
/* In gestapelten Formularen (Mitarbeiterprofil, Dialoge) stehen Feld und Beschriftung untereinander –
   dort darf die Breitenvorgabe oben nicht als Höhe wirken (sonst großer Abstand unter Datumsfeldern). */
.felder-gestapelt .feld .eingabe, .fenster .feld .eingabe, .mitte .feld .eingabe { flex: 0 0 auto !important; }

/* Rechte-Tabelle */
.rechte-tabelle th.mitte-spalte, .rechte-tabelle td.mitte-spalte { text-align: center; width: 110px; }
.rechte-tabelle tr.gruppe th { background: var(--field); text-align: left; font-size: 13px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); padding-top: 10px; padding-bottom: 10px; clip-path: inset(0 round 8px); }
.rechte-tabelle .recht-name { display: block; font-weight: 500; cursor: pointer; }
.rechte-tabelle .recht-erl { display: block; margin-top: 2px; }
.rechte-tabelle input[type=checkbox] { width: 24px; height: 24px; cursor: pointer; }
.rechte-tabelle input[type=checkbox]:disabled { cursor: not-allowed; opacity: .55; }
.rechte-tabelle input.abweichend { outline: 2px solid var(--warn); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 780px) {
  .rechte-tabelle th.mitte-spalte, .rechte-tabelle td.mitte-spalte { width: 62px; padding-left: 2px; padding-right: 2px; font-size: 12px; }
  .rechte-tabelle { min-width: 0; }
  .rechte-karte .tabelle-box { margin: 0 -16px; }
  .rechte-tabelle th:first-child, .rechte-tabelle td:first-child { padding-left: 12px; }
}

/* Menügruppen, Zurück-Leiste, Hinweis „Sie sehen …“ */
.menue-gruppe { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); padding: 26px 12px 8px; }
.menue-gruppe::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.menue .marke + .menue-gruppe { padding-top: 4px; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: -6px 0 -10px -6px;
  padding: 8px 10px 8px 4px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; min-height: 40px; }
.zurueck:hover { color: var(--ink); background: var(--field); text-decoration: none; }
.fremd-hinweis { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.untennav.fuenf { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.untennav .punkt-klein.zahl { width: auto; height: 18px; min-width: 18px; padding: 0 5px; border-radius: var(--ecke-marke); font-size: 11px; font-weight: 700;
  color: #fff; display: inline-flex; align-items: center; justify-content: center; top: 2px; }

/* Einstellungen: wie die Personalakte – eine Karte, Bereiche links, Inhalt rechts */
.einst-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; overflow: clip; }
.einst-inhalt { display: flex; flex-direction: column; min-width: 0; }
.reiter.einst-nav { flex-direction: column; flex-wrap: nowrap; gap: 8px; border-right: 1px solid var(--line); padding: 12px; }
.einst-gruppe { display: flex; flex-direction: column; gap: 1px; }
.einst-titel { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); padding: 2px 12px 4px; }
.einst-titel::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.reiter.einst-nav a { flex: none; height: auto; min-height: 34px; padding: 6px 12px; border: 0; border-radius: 8px; background: none; font-size: 14px; }
.reiter.einst-nav a:hover { background: var(--field); text-decoration: none; }
.reiter.einst-nav a.aktiv { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
/* Rechts keine Karten in der Karte: Abschnitte liegen flach untereinander und sind durch Linien getrennt */
.einst-inhalt .stapel, .einst-inhalt .raster.breit { display: flex; flex-direction: column; gap: 0; }
.einst-inhalt .karte { border: 0; border-radius: 0; background: transparent; }
.einst-inhalt .karte ~ .karte { border-top: 1px solid var(--line); }
.einst-inhalt .einstellungs-karte { max-width: none; }
.einst-inhalt .meldung { margin: 12px 22px 0; }
.einst-inhalt .formular .meldung { margin-left: 0; margin-right: 0; }
.einst-inhalt form.stapel > .meldung { margin: 12px 22px 0; }
.einst-inhalt .tabelle thead th { background: var(--field); font-size: 12px; font-weight: 600; }
/* Listen als Zeilen bis an den Rand, wie die Dokumente in der Akte */
.einst-inhalt .liste { gap: 0; margin: 0 -22px; }
.einst-inhalt .liste > .eintrag { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 22px; }
.einst-inhalt a.eintrag:hover { background: var(--field); }
/* Gescrollt wird die ganze Seite; die Karte wächst mit dem Inhalt. Die Bereiche links bleiben dabei sichtbar. */
@media (min-width: 901px) {
  .einst-layout { min-height: calc(100vh - 215px); min-height: calc(100dvh - 215px); }
  .reiter.einst-nav { position: sticky; top: calc(72px + var(--kopf-hoehe, 88px)); align-self: start;
    max-height: calc(100vh - 72px - var(--kopf-hoehe, 88px)); max-height: calc(100dvh - 72px - var(--kopf-hoehe, 88px)); overflow-y: auto; border-right: 0; }
  .einst-inhalt { border-left: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .einst-layout { grid-template-columns: minmax(0, 1fr); }
  .reiter.einst-nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .einst-gruppe { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 100%; }
  .einst-titel { flex: 0 0 110px; padding: 0; }
  .einst-titel::after { content: none; }
  .reiter.einst-nav a { border: 1px solid var(--line); }
}
@media (max-width: 780px) {
  .einst-inhalt .karte { padding: 16px; }
  .einst-inhalt .liste { margin: 0 -16px; }
  .einst-inhalt .liste > .eintrag { padding: 12px 16px; }
}

/* Monatsprüfung */
.status-chip.warn { --chip: var(--warn); }
a.status-chip { text-decoration: none; }
.auff-klapp > summary { list-style: none; cursor: pointer; display: inline-block; }
.auff-klapp > summary::-webkit-details-marker { display: none; }
.auff-liste { margin: 8px 0 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.pruef-tabelle td { vertical-align: top; }

/* Teamkalender */
.kalender-box { overflow-x: auto; }
.kalender { border-collapse: separate; border-spacing: 0; font-size: 12px; width: 100%; }
.kalender th, .kalender td { border-bottom: 1px solid var(--line); text-align: center; padding: 4px 1px; min-width: 28px; height: 38px; }
.kalender thead th { font-weight: 600; color: var(--muted); vertical-align: bottom; }
.kalender tbody tr:last-child > * { border-bottom: 0; }  /* unten zeichnet schon der Kartenrand */
.kalender .kal-wt, .kalender .kal-tag { display: block; line-height: 1.2; }
.kalender .kal-tag { color: var(--ink); font-size: 13px; }
.kalender .kal-name { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 4px 12px 4px 16px;
  min-width: 170px; white-space: nowrap; font-size: 14px; font-weight: 500; }
.kalender .kal-name a { color: var(--ink); text-decoration: none; }
.kalender .we { background: color-mix(in srgb, var(--field) 70%, transparent); }
.kalender .feier { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.kalender .heute { box-shadow: inset 0 0 0 2px var(--accent); }
.kalender thead .heute .kal-tag { color: var(--accent); font-weight: 700; }
.kalender .aus { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--line) 4px 5px); }
.kal-abw { display: flex; align-items: center; justify-content: center; height: 26px; margin: 0 1px; border-radius: 6px;
  background: var(--farbe); color: #fff; font-weight: 700; font-size: 11px; }
.kal-abw.beantragt { background: color-mix(in srgb, var(--farbe) 25%, transparent); color: var(--ink); outline: 1px dashed var(--farbe); }
.kal-abw.halb { background: linear-gradient(135deg, var(--farbe) 50%, color-mix(in srgb, var(--farbe) 25%, transparent) 50%); }
.kal-feier { color: var(--accent); font-weight: 700; }
.legende-zeile { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.legende-zeile i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legende-zeile .lg-feier { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.legende-zeile .lg-frei { background: var(--field); border: 1px solid var(--line); }
.legende-zeile .lg-beantragt { background: color-mix(in srgb, var(--accent) 25%, transparent); outline: 1px dashed var(--accent); outline-offset: -1px; }

/* Ankreuzliste */
.ankreuz-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ankreuz { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.ankreuz:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.antrag-wahl { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.status-chip.schlecht { --chip: var(--bad); }
.hinweis.vergessen input[type=time] { width: 130px; }

/* Aktionsmenüs (⋯) */
.aktionen-menue { position: relative; }
.aktionen-menue > summary { list-style: none; cursor: pointer; }
.aktionen-menue > summary::-webkit-details-marker { display: none; }
.aktionen-menue.zeile > summary { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
.aktionen-menue.zeile > summary:hover, .aktionen-menue.zeile[open] > summary { background: var(--field); color: var(--ink); }
.aktionen-liste { position: absolute; z-index: 35; max-height: min(70vh, 520px); overflow-y: auto; top: calc(100% + 6px); right: 0; min-width: 240px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; }
.aktionen-menue.zeile .aktionen-liste { left: 0; right: auto; }
.aktionen-liste form { margin: 0; }
.aktionen-liste a, .aktionen-liste button { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; padding: 10px; min-height: 42px;
  border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; white-space: normal; }
.aktionen-liste a:hover, .aktionen-liste button:hover { background: var(--field); text-decoration: none; }
.aktionen-liste .klein { flex-basis: 100%; margin-top: -2px; }
.aktionen-titel { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 2px; }
.tag-zelle { display: flex; align-items: center; gap: 6px; }

/* Personalakte: Ordner links, Dokumente mit Suche rechts */
.karte.akte { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; overflow: clip; }
.akte [hidden] { display: none !important; }
.akte-ordner { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-right: 1px solid var(--line); }
.akte-ordner button { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px;
  border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.akte-ordner button:hover { background: var(--field); }
.akte-ordner button[aria-pressed="true"] { background: var(--accent-soft); font-weight: 600; }
.akte-ordner button.leer:not([aria-pressed="true"]) { color: var(--muted); }
.akte-zahl { font-size: 12px; color: var(--muted); }
.akte.sucht .akte-ordner button { background: none; font-weight: 400; }
.akte-inhalt { min-width: 0; }
.akte-suche { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.akte-suche input { width: 100%; max-width: 420px; }
.akte-liste { list-style: none; margin: 0; padding: 0; }
.akte-zeile { display: grid; grid-template-columns: 22px minmax(0, 1fr) 160px 68px; align-items: center; gap: 4px 14px; padding: 12px 16px; }
.akte-liste .akte-zeile + .akte-zeile { border-top: 1px solid var(--line); }
.akte-kopf { padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); background: var(--field); font-size: 12px; font-weight: 600; color: var(--muted); }
.akte-symbol { display: flex; color: var(--muted); }
.akte-was { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.akte-titel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.akte.ein-ordner .akte-ordnername, .akte-nur-klein { display: none; }
.akte-aktionen { display: flex; justify-content: flex-end; gap: 4px; }
.akte-knopf { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
.akte-knopf:hover { background: var(--field); color: var(--ink); }
.aktionen-liste button.akte-loeschen { color: var(--bad); }
.akte-leer { margin: 0; padding: 28px 16px; text-align: center; }
/* Am PC füllt die Akte immer das Fenster – egal wie viele Dokumente. Es scrollt nur die Liste rechts. */
@media (min-width: 901px) {
  .karte.akte { height: calc(100vh - 215px); height: calc(100dvh - 215px); min-height: 480px; grid-template-rows: minmax(0, 1fr); }
  .akte-ordner { overflow-y: auto; }
  .akte-inhalt { display: flex; flex-direction: column; min-height: 0; }
  .akte-suche, .akte-kopf { flex: none; }
  .akte-kopf { overflow: hidden; scrollbar-gutter: stable; }  /* Spalten bleiben über denen der Liste, auch mit Rollbalken */
  .akte-liste { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .akte-liste .akte-zeile:last-child { border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .karte.akte { grid-template-columns: minmax(0, 1fr); }
  .akte-ordner { flex-direction: row; flex-wrap: wrap; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .akte-ordner button { border: 1px solid var(--line); gap: 8px; }
  .akte-kopf { display: none; }
  .akte-zeile { grid-template-columns: 22px minmax(0, 1fr) auto; padding: 12px; }
  .akte-symbol { grid-area: 1 / 1; align-self: start; padding-top: 2px; }
  .akte-was { grid-area: 1 / 2; }
  .akte-aktionen { grid-area: 1 / 3; align-self: start; }
  .akte-frist { grid-area: 2 / 2; }
  .akte-frist.ohne { display: none; }
  .akte-nur-klein { display: inline; }
  .akte-suche { padding: 12px; }
  .akte-suche input { max-width: none; }
}

/* Farbauswahl */
.farbwahl { display: flex; flex-wrap: wrap; gap: 8px; }
.farbfeld { position: relative; cursor: pointer; }
.farbfeld input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.farbfeld > span:not(.sr) { display: block; width: 34px; height: 34px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .1s; }
.farbfeld:hover > span:not(.sr) { transform: scale(1.08); }
.farbfeld input[type=radio]:checked + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.farbfeld input[type=radio]:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.farbfeld.eigen { display: flex; align-items: center; gap: 6px; padding-left: 6px; border-left: 1px solid var(--line); margin-left: 4px; }
.farbfeld.eigen input[type=color] { width: 34px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; }
.farbfeld.eigen .eigen-vorschau { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.feld .eingabe:has(.farbwahl) { align-items: flex-start; }
.feld:has(.farbwahl) { flex-direction: column; align-items: stretch; }

/* Protokoll-Filter */
.filter-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px 12px; }
.filter-reihe label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.filter-reihe input, .filter-reihe select { width: 100%; min-width: 0; }

/* Suche in der Topbar */
.topbar { justify-content: space-between; }
.suche { position: relative; flex: 0 1 460px; display: flex; align-items: center; margin-right: auto; }
.suche-icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.suche input[type=search] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; padding: 0 64px 0 40px;
  border-radius: 10px; border: 1px solid transparent; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); font-size: 15px; transition: box-shadow .15s, background .15s; }
.suche input[type=search]::placeholder { color: var(--muted); }
.suche input[type=search]:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.suche input[type=search]:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.suche input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.suche kbd { position: absolute; right: 10px; font: 500 12px/1 Inter, system-ui, sans-serif; color: var(--muted); border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 7px; background: var(--field); pointer-events: none; }
.suche:focus-within kbd { display: none; }
.suche-ergebnisse { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 45; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.2); padding: 6px; max-height: min(70vh, 520px); overflow-y: auto; }
.suche-ergebnisse .gruppe { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.suche-ergebnisse a { display: flex; gap: 6px; align-items: baseline; padding: 10px; border-radius: 8px; color: var(--ink); text-decoration: none; min-height: 42px; }
.suche-ergebnisse a .leise { font-size: 13px; }
.suche-ergebnisse a.aktiv, .suche-ergebnisse a:hover { background: var(--accent-soft); text-decoration: none; }
.suche-ergebnisse .leer { padding: 12px; color: var(--muted); }
.topbar .suche-knopf { display: none; }
/* Mitarbeiterauswahl: Desktop oben in der Topbar, Handy im Seitenkopf */
.topbar .ma-oben { flex: 0 1 auto; flex-wrap: nowrap; flex-direction: row; align-items: center; gap: 8px; }
.topbar .ma-oben label { flex: none; white-space: nowrap; margin: 0; line-height: 1; }
.topbar .ma-oben select { min-width: 200px; max-width: 280px; height: 44px; }
@media (min-width: 781px) { .ma-wahl.ma-inhalt { display: none !important; } }
@media (max-width: 780px) { .ma-wahl.ma-oben { display: none !important; } }
@media (max-width: 780px) {
  .suche { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 8px 12px; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); }
  .topbar.suche-offen .suche { display: flex; }
  .suche .suche-icon { left: 24px; }
  .suche kbd { display: none; }
  .suche input[type=search] { padding-right: 12px; }
  .suche-ergebnisse { left: 12px; right: 12px; top: calc(100% - 4px); }
  .topbar .suche-knopf { display: inline-flex; }
}
.vorschau-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 10px clamp(16px, 2.4vw, 40px); background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); font-size: 14px; }

/* Umschalter (Segment) und Tagesauswahl */
.segment { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); }
.segment-wahl { position: relative; cursor: pointer; }
.segment-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment-wahl span { display: block; padding: 8px 14px; border-radius: 9px; font-weight: 500; font-size: 14px; }
.segment-wahl input:checked + span { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }
.segment-wahl input:focus-visible + span { outline: 2px solid var(--accent); }
.tage-wahl { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ankreuz.klein-ankreuz { padding: 8px 6px; justify-content: center; flex-direction: column; gap: 4px; font-size: 13px; }
@media (max-width: 780px) { .tage-wahl { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

tr.inaktiv td { opacity: .6; }

/* Rückfrage-Fenster */
dialog.fenster.frage { width: min(440px, calc(100vw - 32px)); }
.frage-text { margin: 0; font-size: 16px; line-height: 1.5; }
.knopf.gefahr-voll { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (max-width: 780px) { dialog.fenster.frage { margin: auto; border-radius: 16px; width: calc(100vw - 32px); } }

/* Logo */
.marke-logo { display: block; max-width: 100%; max-height: 56px; width: auto; object-fit: contain; object-position: left center; margin-bottom: 4px; }
.mitte .marke .marke-logo { max-height: 72px; margin: 0 auto 6px; object-position: center; }
.topbar-marke.mit-logo img { display: block; height: 34px; max-width: 60vw; width: auto; object-fit: contain; }
/* Breite Felder in den Einstellungen: Firmenname, Anschrift, Systemname gleich breit */
.einstellungs-karte { max-width: 820px; }
.einstellungs-karte.volle-breite { max-width: none; }
.passkey-vorschlag { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.passkey-vorschlag[hidden] { display: none; }
.stapel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.logo-form { display: flex; flex-direction: column; gap: 14px; }
/* Logos: Spalten wie bei den Feldern (.feld) – Bezeichnung mit Erklärung links, Bedienung rechts */
.feld.logo-teil { align-items: flex-start; }
.logo-teil + .logo-teil { border-top: 1px solid var(--line); padding-top: 14px; }
.logo-text { flex: 1 1 150px; display: flex; flex-direction: column; gap: 4px; }
.feld.logo-teil > .eingabe { flex: 1 1 340px; align-items: stretch; gap: 12px; }
/* Ist ein Bild hinterlegt, ist die Vorschau selbst die Ablagefläche; „Hochladen“ erscheint erst mit einer neuen Datei */
.ablage.ablage-vorschau { align-self: flex-start; align-items: center; max-width: 100%; padding: 16px; border-width: 1px; }
.ablage-vorschau img { display: block; max-height: 80px; max-width: min(320px, 100%); pointer-events: none; }
.ablage-vorschau img.symbol { max-height: 48px; max-width: 48px; }
.ablage-vorschau .datei-name:empty { display: none; }
.logo-form .ablage-vorschau:not(.gewaehlt) ~ .knopf-reihe .knopf.haupt { display: none; }
.nur-lesen main .ablage.ablage-vorschau { display: flex !important; pointer-events: none; }  /* Testzugang: nur ansehen */
.nur-lesen main .ablage-vorschau .ablage-hinweis { display: none; }
.code-felder { display: flex; gap: 8px; justify-content: center; }
.code-felder .code-ziffer { flex: 1 1 0; min-width: 0; max-width: 52px; width: auto; height: 58px; padding: 0; text-align: center; font-size: 24px; font-weight: 600; }
.punkt-spalte { width: 1%; padding-right: 0 !important; }
.menue a:not(.marke) > span { display: flex; align-items: center; gap: 8px; }
@media (min-width: 781px) { main.inhalt > .seitenkopf > .kopf > .werkzeuge { justify-content: flex-end; margin-left: auto; } }
.feld .eingabe:has(> .breit) { flex: 1 1 340px; }
.feld .eingabe > .breit { width: 100%; }
.untennav.menue-offen a.aktiv { color: inherit; font-weight: 400; }

/* Benachrichtigungen als Einblendung */
.glocke-wrap { position: relative; }
.glocke-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(380px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.22);
  display: flex; flex-direction: column; max-height: min(70vh, 560px); overflow: hidden; }
.glocke-panel[hidden] { display: none; }
.glocke-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.glocke-kopf form { margin: 0; }
.text-knopf { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 6px 4px; }
.glocke-liste { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.glocke-eintrag { display: flex; align-items: flex-start; gap: 6px; border-radius: 10px; }
.glocke-eintrag:hover { background: var(--field); }
.glocke-eintrag a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px; color: var(--ink); text-decoration: none; }
.glocke-eintrag a strong { font-weight: 500; }
.glocke-eintrag.neu a strong { font-weight: 700; }
.glocke-eintrag form { margin: 0; }
.punkt-knopf { width: 36px; height: 40px; display: flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; margin-top: 4px; }
.punkt-knopf span { width: 10px; height: 10px; border-radius: 5px; border: 2px solid var(--line); }
.weg-knopf { color: var(--muted); opacity: 0; transition: opacity .12s; }
.glocke-eintrag:hover .weg-knopf, .weg-knopf:focus-visible { opacity: 1; }
.weg-knopf:hover { color: var(--bad); }
@media (hover: none) { .weg-knopf { opacity: .7; } }
.loeschen-knopf { color: var(--muted); }
.loeschen-knopf:hover { color: var(--bad); }
.glocke-eintrag.neu .punkt-knopf span { background: var(--accent); border-color: var(--accent); }
.glocke-leer { padding: 16px; margin: 0; }
.glocke-alle { display: block; padding: 12px 14px; border-top: 1px solid var(--line); text-align: center; font-weight: 600; font-size: 14px; text-decoration: none; }
@media (max-width: 780px) {
  .glocke-wrap { position: static; }
  .glocke-panel { position: fixed; left: 12px; right: 12px; top: calc(64px + env(safe-area-inset-top)); width: auto; max-height: calc(100dvh - 160px); }
}

/* Übersicht: zwei Spalten mit gemeinsamen Reihen – oben Kennzahlen | Stempel (gleich hoch),
   darunter Woche, Anträge, Auffälligkeiten | Anwesenheit und Hinweise. Am Handy alles untereinander. */
.start-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 360px);
  grid-template-areas: "zahlen stempel" "karten seite"; gap: 16px; align-items: start; }
.start-zahlen { grid-area: zahlen; margin: 0; align-self: stretch; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.start-zahlen:has(> .kennzahl:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.start-raster > .stempel-kachel { grid-area: stempel; align-self: stretch; margin: 0; justify-content: center; }
.start-karten { grid-area: karten; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: stretch; min-width: 0; }
.start-seite { grid-area: seite; display: grid; gap: 16px; align-content: start; min-width: 0; }
.start-raster:not(:has(> .stempel-kachel)) { grid-template-areas: "karten seite"; }
.start-karten:empty { display: none; }
@media (min-width: 1001px) { .start-raster > .stempel-kachel .stempel-mitte { flex-wrap: nowrap; } }  /* Uhr und Knöpfe immer nebeneinander */
.start-karten > .karte, .start-seite > .karte { margin: 0; }

@media (max-width: 1000px) {
  .start-raster { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
  .start-zahlen, .start-zahlen:has(> .kennzahl:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start-zahlen > .kennzahl:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .start-karten, .start-seite { display: contents; }
  .start-zahlen, .start-raster > .stempel-kachel, .start-karten > .karte, .start-seite > .karte { grid-area: auto; grid-column: 1 / -1; }
  .stempel-kachel { order: 1; }
  .start-zahlen { order: 2; }
  .start-antraege { order: 3; }
  .start-anwesenheit { order: 4; }
  .start-woche { order: 5; }
  .start-auff { order: 6; }
  .start-hinweise { order: 7; }
}
/* Diese Woche: links die Balken über die ganze verfügbare Breite, rechts der Fortschritt – in einer Kachel */
.woche-innen { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px 32px; align-items: center; }
.woche-diagramm { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.woche-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: inherit; text-decoration: none; }
.woche-kopf:hover { text-decoration: none; }
.woche-titel { font-size: 16px; font-weight: 700; }
.woche-fortschritt { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding-left: 28px; border-left: 1px solid var(--line); align-self: stretch; justify-content: center; }
.ring { position: relative; width: 132px; height: 132px; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring circle { fill: none; stroke-width: 10; }
.ring-spur { stroke: var(--line); }
.ring-wert { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .4s; }
.ring-prozent { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.ring-prozent small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 1px; }
.woche-zahlen .wert { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.woche-zahlen .wert small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
@media (max-width: 700px) {
  .woche-innen { grid-template-columns: minmax(0, 1fr); }
  .woche-fortschritt { flex-direction: row; justify-content: center; text-align: left; gap: 16px; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .ring { width: 92px; height: 92px; flex: none; }
  .ring-prozent { font-size: 20px; }
}
/* Anwesenheit: Status immer rechts in derselben Zeile */
.eintrag[class*="anwesend-"] { flex-wrap: nowrap; }
.eintrag[class*="anwesend-"] .person-zeile { flex: 1 1 auto; }
.eintrag[class*="anwesend-"] .status-chip { flex: none; }
.start-auff .eintrag { flex-wrap: nowrap; }
.start-auff .eintrag .was { flex: 1 1 auto; }
.start-auff .eintrag .status-chip { flex: none; }
.block.luecke { background: transparent; font-style: normal; opacity: .85; }
.stempel-kachel { gap: 12px; }
.stempel-kachel .status { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.stempel-kachel .status.ein { color: var(--good); }
.stempel-kachel .status.pause { color: var(--warn); }
.stempel-kachel .status.fertig { color: var(--ink); }
.stempel-kachel .status i { width: 10px; height: 10px; border-radius: 5px; background: currentColor; display: inline-block; }
.stempel-mitte { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stempel-kachel .uhr { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.stempel-kachel .uhr span { font-size: 15px; font-weight: 500; color: var(--muted); }

/* Stempeluhr: runde Knöpfe in den Farben der App */
.stempel-knoepfe { display: flex; gap: 14px; align-items: center; }
/* Alle Knöpfe gleich groß: fester Kreis, das 24×24-Symbol sitzt per Grid exakt in der Mitte */
.rund-knopf { display: grid; place-items: center; flex: none; box-sizing: border-box; width: 56px; height: 56px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .12s, background .12s, box-shadow .12s; }
.rund-knopf svg { display: block; width: 24px; height: 24px; flex: none; }
.rund-knopf:hover { transform: scale(1.05); }
.rund-knopf:active { transform: scale(.95); }
.rund-knopf:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.rund-knopf.start, .rund-knopf.stopp { color: var(--accent-ink); background: var(--accent); }
.rund-knopf.pause { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.rund-knopf.pause:hover { box-shadow: inset 0 0 0 1px var(--muted); }

/* Karten mit Aktionen: Knöpfe unten bündig */
.raster.vier { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.aktion-karten .karte > p { margin: 0; }
/* Auswertungen: feste Spalten, die letzte Karte füllt die Reihe auf – nichts steht versetzt */
.raster.drei-fest { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster.drei-fest > .karte:last-child:nth-child(3n+2) { grid-column: span 2; }
.raster.drei-fest > .karte:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  .raster.drei-fest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster.drei-fest > .karte:last-child:nth-child(3n+2), .raster.drei-fest > .karte:last-child:nth-child(3n+1) { grid-column: auto; }
  .raster.drei-fest > .karte:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 700px) { .raster.drei-fest { grid-template-columns: minmax(0, 1fr); } }
.aktion-karten .karte > .knopf-reihe, .aktion-karten .karte > form { margin-top: auto; }
.jahr-wahl { min-width: 0; width: auto; }
.export-form { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.export-zeitraum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.export-zeitraum label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.export-zeitraum input { width: 100%; }

/* Testzugang: fremde Daten nur ansehen – Änderungsknöpfe ausblenden (der Server sperrt sie zusätzlich) */
.ist-test .nur-leitung,
.nur-lesen main form[method="post"] button, .nur-lesen main form[method="post"] input[type=submit],
.nur-lesen main [data-fenster], .nur-lesen main .aktionen-menue, .nur-lesen main .ablage,
.nur-lesen main a.knopf[href*="/neu"], .nur-lesen main a.knopf[href*="/bearbeiten"], .nur-lesen main a.knopf[href*="/mehrere"],
.nur-lesen main a[href*="/sollzeit/"] { display: none !important; }
.nur-lesen main form[method="post"] :is(input, select, textarea):not([type=hidden]) { pointer-events: none; opacity: .75; }
.abschnitt-titel { margin: 8px 0 -6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 10px; }
.abschnitt-titel::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.kopf-hinweis { max-width: 360px; text-align: right; }
@media (max-width: 780px) { .kopf-hinweis { text-align: left; max-width: none; flex-basis: 100%; } }
main.inhalt > .seitenkopf > .kopf { min-height: 50px; }

/* Seitenkopf (Zurück, Überschrift, Werkzeuge) bleibt beim Scrollen unter der oberen Leiste stehen. Die negativen Ränder
   decken die Innenabstände mit ab, ohne am Abstand zum Inhalt etwas zu ändern. */
.seitenkopf { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 781px) {
  .seitenkopf { position: sticky; top: 64px; z-index: 15; background: var(--bg); border-bottom: 1px solid transparent;
    margin: -20px calc(-1 * clamp(16px, 2.4vw, 40px)) -12px; padding: 20px clamp(16px, 2.4vw, 40px) 12px; }
  .seitenkopf.klebt { border-bottom-color: var(--line); }
  html { scroll-padding-top: calc(72px + var(--kopf-hoehe, 88px)); }
}
/* Am Handy bleibt nur die Überschrift stehen – Auswahl und Knöpfe würden sonst zu viel vom Bildschirm belegen */
@media (max-width: 780px) {
  .seitenkopf, .seitenkopf > .kopf { display: contents; }
  .seitenkopf > .kopf > .titel { position: sticky; top: 64px; z-index: 15; flex: none; background: var(--bg);
    margin: -8px -14px; padding: 8px 14px; border-bottom: 1px solid transparent; }
  .seitenkopf.klebt > .kopf > .titel { border-bottom-color: var(--line); }
  .seitenkopf > .kopf > .reiter-wahl { flex: none; width: 100%; }
  /* … und die Speichern-Knöpfe direkt darunter, damit man am Ende langer Formulare nicht nach oben muss */
  .seitenkopf > .kopf > .werkzeuge:has(.kopf-speichern) { position: sticky; top: calc(64px + var(--titel-hoehe, 56px)); z-index: 15;
    background: var(--bg); margin: -6px -14px; padding: 6px 14px; width: auto; align-self: stretch; border-bottom: 1px solid transparent; }
  .seitenkopf.klebt > .kopf:has(.kopf-speichern) > .titel { border-bottom-color: transparent; }
  .seitenkopf.klebt > .kopf > .werkzeuge:has(.kopf-speichern) { border-bottom-color: var(--line); }
  html { scroll-padding-top: 188px; }
}
/* Speichern-Knöpfe stehen außerhalb ihres Formulars: im Testzugang ebenfalls ausblenden */
.nur-lesen main .kopf-speichern { display: none !important; }
@media (min-width: 781px) { .menue .nur-klein-block { display: none !important; } }
/* Seitenmenü einklappbar (nur am PC) */
.marke-symbol { display: none; object-fit: contain; }
.menue-klapp { display: flex; align-items: center; justify-content: center; align-self: flex-end; flex: none;  /* oben, damit er auf jedem Gerät erreichbar ist */
  width: 40px; height: 40px; padding: 0; margin: -6px -6px 0 0; border: 0; border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer; }
.menue-klapp:hover { background: var(--field); color: var(--ink); }
@media (max-width: 780px) { .menue-klapp { display: none; } }
@media (min-width: 781px) {
  html.menue-zu .menue { flex-basis: 76px; width: 76px; padding: 16px 12px 20px; }
  html.menue-zu .menue .marke { padding: 6px 0 18px; align-items: center; }
  html.menue-zu .menue .marke > :not(.marke-symbol) { display: none; }
  html.menue-zu .menue .marke-symbol { display: block; width: 36px; height: 36px; border-radius: 9px; }
  html.menue-zu .menue a:not(.marke) { justify-content: center; padding: 10px 0; position: relative; }
  html.menue-zu .menue a:not(.marke) > span { display: none; }
  html.menue-zu .menue-klapp { align-self: center; }
  html.menue-zu .menue-gruppe { font-size: 0; gap: 0; padding: 14px 6px 6px; }
  html.menue-zu .menue-klapp .sym { transform: scaleX(-1); }
  html.menue-zu .menue a.hat-zaehler::after { content: ""; position: absolute; top: 7px; right: 14px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--accent); }
}

/* Passkeys und Geräte: Name ändern (Stift) und entfernen (Tonne) */
.icon-knoepfe { display: flex; gap: 6px; align-items: center; flex: none; }
.icon-knoepfe form { margin: 0; }
.knopf.symbol.klein { width: 34px; height: 34px; padding: 0; }
.knopf.symbol.klein.gefahr:hover { color: var(--bad); border-color: var(--bad); }
.umbenennen-form { display: flex; gap: 8px; align-items: center; flex: 1 1 260px; min-width: 0; }
.umbenennen-form[hidden] { display: none; }
.umbenennen-form input { flex: 1; min-width: 0; }
.eintrag:has(> .icon-knoepfe) > .was { flex: 1 1 0; }  /* Stift/Tonne bleiben auch bei langem Text rechts */
.eintrag.bearbeiten > .was, .eintrag.bearbeiten > .icon-knoepfe { display: none; }
/* Übersicht: ruhiges Layout */
.stempel-kachel .status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em; }
.balken-namen span { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.balken-namen .bn-datum { font-size: 12px; font-weight: 400; }
.balken-namen .heute .bn-datum { font-weight: 600; }
/* Anwesenheit: Ampel statt Text – grün da, gelb Pause, rot nicht da/abwesend, grau frei */
.led { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--line); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.led.gruen { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.led.gelb { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.led.rot { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 18%, transparent); }

/* Eingeklapptes Menü: Sprechblase mit dem Namen des Bereichs */
.menue-blase { position: fixed; z-index: 60; transform: translateY(-50%); padding: 6px 12px; border-radius: 8px; background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.menue-blase::before { content: ""; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; background: var(--ink); transform: translateY(-50%) rotate(45deg); border-radius: 2px; }
.menue-blase[hidden] { display: none; }
/* Hinweise, die nachträglich erscheinen (Passkey-Vorschlag), schweben über der Seite und schieben nichts nach unten */
.passkey-vorschlag:not([hidden]) { position: fixed; z-index: 40; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom));
  margin: 0; background: var(--surface); box-shadow: 0 8px 28px rgba(0,0,0,.35); }
@media (min-width: 781px) { .passkey-vorschlag:not([hidden]) { left: auto; right: 24px; bottom: 24px; width: min(440px, calc(100vw - 48px)); } }
@media (min-width: 781px) { html.menue-zu .menue-klapp { margin: 0; } }