/* Firmen-Apps - das gemeinsame Bild, Variante 2 - hell, sachlich.
   Quelle: Startseite. In den Apps liegt eine byte-gleiche Kopie in public/ (werkzeug/verteilen.py) - dort nie aendern.
   Nur fuer den Bildschirm (media="screen"); keine Druckregel, keine fremde Adresse.
   Je App kommen aus ihrer app.css nur --g (Verlauf) und --accent, dazu ihre Sonderbausteine.
   Schrift: Inter 4.1 (The Inter Project Authors, SIL Open Font License 1.1 - Wortlaut in inter-LIZENZ.txt),
   unveraendert als inter.woff2 neben dieser Datei. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("inter.woff2") format("woff2");
}
:root {
  --schema: light;
  /* Zeichen des Produkts: ein F aus acht Kacheln, drei davon in App-Farben. Als Wert, damit jede Seite dasselbe zeigt;
     -hell fuer dunkle Flaechen. Eingebettet, keine fremde Adresse. */
  --zeichen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='k2' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%2338bdf8'/%3E%3Cstop offset='1' stop-color='%232563eb'/%3E%3C/linearGradient%3E%3ClinearGradient id='k5' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%234ade80'/%3E%3Cstop offset='1' stop-color='%2316a34a'/%3E%3C/linearGradient%3E%3ClinearGradient id='k7' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fb923c'/%3E%3Cstop offset='1' stop-color='%23dc2626'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='14.5' y='2.0' width='9.8' height='9.8' rx='2.7' fill='%2310182b'/%3E%3Crect x='27.0' y='2.0' width='9.8' height='9.8' rx='2.7' fill='%2310182b'/%3E%3Crect x='39.5' y='2.0' width='9.8' height='9.8' rx='2.7' fill='url(%23k2)'/%3E%3Crect x='14.5' y='14.5' width='9.8' height='9.8' rx='2.7' fill='%2310182b'/%3E%3Crect x='14.5' y='27.0' width='9.8' height='9.8' rx='2.7' fill='%2310182b'/%3E%3Crect x='27.0' y='27.0' width='9.8' height='9.8' rx='2.7' fill='url(%23k5)'/%3E%3Crect x='14.5' y='39.5' width='9.8' height='9.8' rx='2.7' fill='%2310182b'/%3E%3Crect x='14.5' y='52.0' width='9.8' height='9.8' rx='2.7' fill='url(%23k7)'/%3E%3C/svg%3E");
  --zeichen-hell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='k2' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%2338bdf8'/%3E%3Cstop offset='1' stop-color='%232563eb'/%3E%3C/linearGradient%3E%3ClinearGradient id='k5' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%234ade80'/%3E%3Cstop offset='1' stop-color='%2316a34a'/%3E%3C/linearGradient%3E%3ClinearGradient id='k7' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fb923c'/%3E%3Cstop offset='1' stop-color='%23dc2626'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='14.5' y='2.0' width='9.8' height='9.8' rx='2.7' fill='%23fff'/%3E%3Crect x='27.0' y='2.0' width='9.8' height='9.8' rx='2.7' fill='%23fff'/%3E%3Crect x='39.5' y='2.0' width='9.8' height='9.8' rx='2.7' fill='url(%23k2)'/%3E%3Crect x='14.5' y='14.5' width='9.8' height='9.8' rx='2.7' fill='%23fff'/%3E%3Crect x='14.5' y='27.0' width='9.8' height='9.8' rx='2.7' fill='%23fff'/%3E%3Crect x='27.0' y='27.0' width='9.8' height='9.8' rx='2.7' fill='url(%23k5)'/%3E%3Crect x='14.5' y='39.5' width='9.8' height='9.8' rx='2.7' fill='%23fff'/%3E%3Crect x='14.5' y='52.0' width='9.8' height='9.8' rx='2.7' fill='url(%23k7)'/%3E%3C/svg%3E");
  --schrift: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --feld: #ffffff;
  --text: #161a26;
  --text-soft: #4a5165;
  --muted: #6b7285;
  --border: #dfe3ec;
  --border-stark: #c5cbd9;
  --ok: #12804a;
  --warn: #a15c00;
  --off: #c4264a;
  --radius: 10px;
  --radius-s: 8px;
  --radius-l: 12px;
  --schatten: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.08);
  --schatten-klein: 0 1px 2px rgba(16, 24, 40, 0.05);
  --grund: var(--bg);
  --akzent-stark: color-mix(in srgb, var(--accent) 55%, #10182b);
  --akzent-flaeche: var(--g);
  --auf-akzent: #fff;
  --akzent-schatten: 0 1px 2px rgba(16, 24, 43, 0.55);
  --fokus: var(--akzent-stark);
  --kopf-flaeche: var(--surface);
  --kopf-rand: var(--border);
  --kopf-polster: 10px 14px;
  --kopf-schatten: var(--schatten);
  --kopf-streifen: var(--g) top left / 100% 4px no-repeat;
  --h1-bild: none;
  --h1-farbe: var(--text);
  --dialog-flaeche: #ffffff;
  --schleier: rgba(16, 24, 40, 0.45);
}
* { box-sizing: border-box; margin: 0; }
body {
  min-height: 100vh;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px 28px;
}
header.top, nav.tabs, main, footer { width: 100%; max-width: 760px; }

/* Kopf: Rueckweg, Name der App, Kennzeichnungen */
header.top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--kopf-streifen), var(--kopf-flaeche); border: 1px solid var(--kopf-rand); border-radius: var(--radius-l);
  padding: var(--kopf-polster); box-shadow: var(--kopf-schatten);
}
.home {
  width: 40px; height: 40px; border-radius: var(--radius-s); display: grid; place-items: center; flex: none;
  background: var(--surface-2); border: 1px solid var(--border-stark); color: var(--text);
  text-decoration: none; font-size: 18px;
}
.home:hover { border-color: var(--akzent-stark); }
/* Kennzeichnungen brechen unter den Titel um, statt den Pfeil in eine eigene Zeile zu schieben */
.title { display: flex; align-items: baseline; gap: 10px; flex: 1; flex-wrap: wrap; row-gap: 4px; min-width: 0; }
h1 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2;
  background: var(--h1-bild); -webkit-background-clip: text; background-clip: text; color: var(--h1-farbe);
}
.proto {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 999px; padding: 2px 8px;
}
.wer { font-size: 12px; font-weight: 600; color: var(--text-soft); border: 1px solid var(--border-stark); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.wer:empty { display: none; }

/* Felder und Knoepfe */
select, input, button, textarea { font: inherit; color: inherit; }
select, textarea, input[type="text"], input[type="number"], input[type="date"], input[type="time"] {
  background: var(--feld); border: 1px solid var(--border-stark); border-radius: var(--radius-s);
  padding: 10px 12px; width: 100%; min-width: 0; color-scheme: var(--schema);
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }

nav.tabs {
  display: flex; gap: 4px; margin: 18px 0 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px; box-shadow: var(--schatten-klein);
}
nav.tabs button { flex: 1; background: none; border: 0; border-radius: var(--radius-s); padding: 10px 6px; color: var(--text-soft); cursor: pointer; font-weight: 600; }
nav.tabs button:hover { color: var(--text); }
nav.tabs button.on { background: var(--akzent-flaeche); color: var(--auf-akzent); text-shadow: var(--akzent-schatten); }

button { cursor: pointer; }
.primary, .ghost, .danger {
  border-radius: var(--radius-s); padding: 11px 18px; font-weight: 600; border: 1px solid transparent;
}
.primary { background: var(--akzent-flaeche); color: var(--auf-akzent); text-shadow: var(--akzent-schatten); }
.ghost { background: var(--surface-2); border-color: var(--border-stark); color: var(--text); }
.danger { background: none; border-color: color-mix(in srgb, var(--off) 55%, transparent); color: var(--off); }
.big { width: 100%; padding: 16px; font-size: 17px; margin-bottom: 18px; }
.klein { padding: 8px 12px; font-size: 13px; border-radius: 8px; }

/* Karten und Text */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 16px; margin-bottom: 10px; box-shadow: var(--schatten);
}
.card h3 { font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.card.storniert { opacity: .55; }
.card.storniert h3 > span:first-child { text-decoration: line-through; }
h2.abschnitt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 20px 4px 10px; }
.muted { color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--text-soft); padding: 28px 16px; line-height: 1.5; }
.gap.rot { border-color: color-mix(in srgb, var(--off) 70%, transparent); color: var(--off); }
.stat span { font-size: 13px; color: var(--text-soft); }

.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; border: 1px solid currentColor; white-space: nowrap; flex: none; }
.badge.ok, .badge.frei { color: var(--ok); }
.badge.bald, .badge.ausgegeben { color: var(--warn); }
.badge.fehlt, .badge.storno { color: var(--off); }
.badge.ausgemustert, .badge.art { color: var(--muted); }

.zeile:first-of-type { margin-top: 10px; }
.zeile .was { min-width: 0; overflow-wrap: anywhere; }
.zeile .was .muted { display: block; margin-top: 2px; }
.zeile .knoepfe { display: flex; gap: 6px; flex: none; }
details ul { list-style: none; padding: 0; margin-top: 6px; display: grid; gap: 8px; }
details li { overflow-wrap: anywhere; }
details li.storniert { text-decoration: line-through; opacity: .7; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.links a { text-decoration: none; display: inline-block; }

/* Formulare */
form.inline { display: grid; gap: 10px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--text-soft); min-width: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.wahl { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.wahl input { width: 20px; height: 20px; accent-color: var(--akzent-stark); flex: none; }
.error { color: var(--off); font-weight: 600; }
.error:empty, .hint:empty { display: none; }
.hint { color: var(--text-soft); font-size: 14px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
[hidden] { display: none !important; }

dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); margin: auto;
  background: var(--dialog-flaeche); color: var(--text); border: 1px solid var(--border-stark); border-radius: var(--radius-l); padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
dialog::backdrop { background: var(--schleier); backdrop-filter: blur(3px); }
dialog form { display: grid; gap: 12px; }
dialog h2 { font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }

footer { margin-top: auto; padding-top: 28px; font-size: 12px; color: var(--muted); text-align: center; }
/* Rechtliches auf jeder Seite hinter der Anmeldung: Impressum, Datenschutz, AGB (die Seiten liegen bei der Startseite) */
footer .recht { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; }
footer .recht::before { content: ""; flex: 0 0 100%; height: 26px; margin-bottom: 2px; background: var(--zeichen) center / contain no-repeat; }
/* dasselbe Zeichen gross, ueber dem Namen am Eingang */
.firmenzeichen { display: block; width: 56px; height: 56px; margin: 0 auto 10px; background: var(--zeichen) center / contain no-repeat; }
footer .recht a { color: var(--text-soft); font-size: 13px; text-decoration: none; }
footer .recht a:hover, footer .recht a:focus-visible { color: var(--text); text-decoration: underline; }

/* Das Blatt fuer den Ausdruck bleibt am Bildschirm weg */
#druck { display: none; }
