/* ALMAS-Webdesign-System v2 — Tokens + gemeinsame Bausteine (Desktop und Handy). */
:root {
  --rot: #FF2325;
  --rot-text: #D81020;
  --rot-tief: #B00D1A;
  --schwarz: #111114;
  --text: #1D1D1F;
  --text-2: #5E5E66;
  --text-3: #8A8A92;
  --grund: #F6F6F8;
  --karte: #FFFFFF;
  --linie: #E7E7EC;
  --linie-2: #D9D9E0;
  --amber: #B26A00; --amber-hg: #FFF6E5;
  --blau: #0057B8;  --blau-hg: #EAF2FD;
  --gruen: #147A3D; --gruen-hg: #E8F6EE;
  --teal: #0E8C82;  --teal-hg: #E6F5F3;
  --lila: #592041;  --lila-hg: #F5ECF1;
  --fehler: #C20F1C; --fehler-hg: #FDECEE;
  --schatten-1: 0 1px 2px rgba(17,17,20,.04), 0 1px 1px rgba(17,17,20,.03);
  --schatten-2: 0 2px 6px rgba(17,17,20,.05), 0 8px 24px rgba(17,17,20,.06);
  --schatten-3: 0 10px 30px rgba(17,17,20,.10), 0 30px 80px rgba(17,17,20,.08);
  --r-s: 10px; --r-m: 14px; --r-l: 20px; --r-xl: 26px;
  --schrift: 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --mono: 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --zeit: 220ms cubic-bezier(.2,.7,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--schrift); color: var(--text); background: var(--grund); -webkit-font-smoothing: antialiased; line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--rot-text); }
:focus-visible { outline: 3px solid rgba(216,16,32,.45); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.leise { color: var(--text-2); }
.klein { font-size: .82rem; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.b-rot { color: var(--fehler); background: var(--fehler-hg); border-color: rgba(194,15,28,.18); }
.b-amber { color: var(--amber); background: var(--amber-hg); border-color: rgba(178,106,0,.18); }
.b-gruen { color: var(--gruen); background: var(--gruen-hg); border-color: rgba(20,122,61,.18); }
.b-blau { color: var(--blau); background: var(--blau-hg); border-color: rgba(0,87,184,.18); }
.b-lila { color: var(--lila); background: var(--lila-hg); border-color: rgba(89,32,65,.18); }
.b-grau { color: var(--text-2); background: #F0F0F3; border-color: var(--linie); }
.b-teal { color: var(--teal); background: var(--teal-hg); border-color: rgba(14,140,130,.18); }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--linie-2); background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; box-shadow: var(--schatten-1); transition: transform var(--zeit), box-shadow var(--zeit), background var(--zeit); }
.knopf:hover { box-shadow: var(--schatten-2); transform: translateY(-1px); }
.knopf:active { transform: translateY(0); }
.knopf.haupt { background: var(--rot-text); border-color: var(--rot-text); color: #fff; box-shadow: 0 6px 18px rgba(216,16,32,.25); }
.knopf.haupt:hover { background: var(--rot-tief); }
.knopf.still { background: transparent; box-shadow: none; border-color: transparent; color: var(--rot-text); }
.knopf[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* Schalter (segmentiert) */
.schalter { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #EEEEF2; border-radius: 14px; }
.schalter button { border: 0; background: transparent; padding: 7px 14px; border-radius: 10px; font-weight: 600; font-size: .85rem; color: var(--text-2); cursor: pointer; transition: background var(--zeit), color var(--zeit), box-shadow var(--zeit); }
.schalter button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: var(--schatten-1); }

.feld { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--linie-2); border-radius: 12px; padding: 0 12px; min-height: 40px; }
.feld input, .feld select { border: 0; outline: 0; background: transparent; min-width: 0; flex: 1; padding: 8px 0; }
.feld:focus-within { border-color: var(--rot-text); box-shadow: 0 0 0 3px rgba(216,16,32,.12); }

.hinweis-sim { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-m); background: linear-gradient(135deg, #FFF8F8, #FFFFFF); border: 1px solid rgba(216,16,32,.18); box-shadow: var(--schatten-1); }
.hinweis-sim strong { color: var(--rot-text); }
.fehlerbox { padding: 14px 18px; border-radius: var(--r-m); background: var(--fehler-hg); color: var(--fehler); border: 1px solid rgba(194,15,28,.2); }
.leer { padding: 36px 18px; text-align: center; color: var(--text-2); }

/* KPI-Kacheln mit dezentem Akzent */
.kpi { position: relative; overflow: hidden; background: var(--karte); border-radius: var(--r-l); padding: 18px 18px 16px 22px; box-shadow: var(--schatten-2); border: 1px solid var(--linie); transition: transform var(--zeit), box-shadow var(--zeit); text-align: left; cursor: default; }
.kpi[role="button"], button.kpi { cursor: pointer; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--schatten-3); }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--akzent, var(--rot)); }
.kpi::after { content: ''; position: absolute; inset: 0; background: var(--akzent-hg, transparent); opacity: .45; pointer-events: none; }
.kpi .zahl { position: relative; z-index: 1; font-size: 2rem; font-weight: 700; letter-spacing: -.02em; color: var(--akzent, var(--text)); line-height: 1.1; }
.kpi .titel { position: relative; z-index: 1; font-weight: 600; font-size: .86rem; margin-top: 4px; }
.kpi .unter { position: relative; z-index: 1; font-size: .76rem; color: var(--text-2); margin-top: 2px; }
.a-rot { --akzent: var(--fehler); --akzent-hg: var(--fehler-hg); }
.a-amber { --akzent: var(--amber); --akzent-hg: var(--amber-hg); }
.a-gruen { --akzent: var(--gruen); --akzent-hg: var(--gruen-hg); }
.a-blau { --akzent: var(--blau); --akzent-hg: var(--blau-hg); }
.a-teal { --akzent: var(--teal); --akzent-hg: var(--teal-hg); }
.a-lila { --akzent: var(--lila); --akzent-hg: var(--lila-hg); }

.punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; }
.punkt.ok { background: #1FA35A; box-shadow: 0 0 0 4px rgba(31,163,90,.14); }
.punkt.fehler { background: var(--fehler); box-shadow: 0 0 0 4px rgba(194,15,28,.14); }
.punkt.spaeter { background: #C8C8CF; }

.balken { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 8px; }
.balken .s { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.balken .s i { display: block; width: 100%; max-width: 28px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--rot), var(--rot-text)); min-height: 3px; transform-origin: bottom; animation: wachsen .6s cubic-bezier(.2,.7,.2,1) both; }
.balken .s small { font-size: .68rem; color: var(--text-3); }
.balken .s b { font-size: .72rem; color: var(--text-2); }
.balken .s i.null { background: #E3E3E8; }
@keyframes wachsen { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rein { animation: rein .35s cubic-bezier(.2,.7,.2,1) both; }

.kandidat { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 12px; background: #FCFCFD; }
.kandidat + .kandidat { margin-top: 8px; }
.kandidat .was { min-width: 0; }
.kandidat .was b { display: block; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
