:root {
  --brand-50: #eef6ff; --brand-100: #d9eaff; --brand-500: #3378f5; --brand-600: #1f5ae0; --brand-700: #1a47b5;
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1; --slate-400: #94a3b8;
  --slate-500: #64748b; --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b; --slate-900: #0f172a;
  --canvas: rgb(248 250 253);
  --ring: rgba(15, 23, 42, 0.05); --ring-feld: rgba(15, 23, 42, 0.1);
  --schatten: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px -18px rgba(15, 23, 42, 0.25);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--canvas); color: var(--slate-900); font: 14px/1.45 Inter, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.tabular { font-variant-numeric: tabular-nums; }
.versteckt { display: none !important; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 18px; }
h2 { font-size: 14px; }
code, .mono { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.kopf { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ring); }
.kopf-innen { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; height: 52px; }
.marke { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--slate-900); white-space: nowrap; }
.marke-zeichen { width: 22px; height: 22px; border-radius: 6px; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.reiter { display: flex; gap: 2px; align-self: stretch; }
.reiter button { all: unset; cursor: pointer; padding: 0 12px; display: flex; align-items: center; font-weight: 500; color: var(--slate-600); border-bottom: 2px solid transparent; }
.reiter button:hover { color: var(--slate-900); }
.reiter button.aktiv { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--slate-500); font-size: 13px; }

main { max-width: 1240px; margin: 0 auto; padding: 20px; display: grid; gap: 16px; }
.reihe { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--ring), var(--schatten); padding: 16px; }
.panel { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--ring), var(--schatten); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--ring); }
.panel-head .rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel.rot { box-shadow: 0 0 0 1px #fecdd3, var(--schatten); }
.panel.rot .panel-head { background: #fff1f2; color: #9f1239; border-bottom-color: #fecdd3; }
.panel.gelb { box-shadow: 0 0 0 1px #fde68a, var(--schatten); }
.panel.gelb .panel-head { background: #fffbeb; color: #92400e; border-bottom-color: #fde68a; }
.zeilen > * + * { border-top: 1px solid var(--ring); }
.zeile { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.zeile.klick { cursor: pointer; }
.zeile.klick:hover { background: var(--slate-50); }
.leer { padding: 16px; color: var(--slate-500); }

.kennzahl .wert { font-size: 22px; font-weight: 600; margin-top: 2px; }
.kennzahl .titel { font-size: 12px; font-weight: 500; color: var(--slate-500); }
.kennzahl .unter { font-size: 12px; color: var(--slate-500); margin-top: 2px; }
.balken { height: 6px; border-radius: 999px; background: var(--slate-100); margin-top: 8px; overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--brand-500); }
.balken.warn > span { background: #f59e0b; }
.balken.fehl > span { background: #e11d48; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--slate-500); padding: 8px 16px; border-bottom: 1px solid var(--ring); white-space: nowrap; }
td { padding: 10px 16px; border-bottom: 1px solid var(--ring); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.klick { cursor: pointer; }
tbody tr.klick:hover td { background: var(--slate-50); }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 600; background: var(--slate-50); }
.klein { font-size: 12px; color: var(--slate-500); }

.punkt { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex: none; }
.punkt.ok { background: #10b981; }
.punkt.warn { background: #f59e0b; }
.punkt.fehl { background: #e11d48; }
.punkt.info { background: var(--brand-500); }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-green { background: #ecfdf5; color: #047857; }
.badge-yellow { background: #fffbeb; color: #b45309; }
.badge-red { background: #fff1f2; color: #be123c; }
.badge-blue { background: var(--brand-50); color: var(--brand-700); }
.badge-slate { background: var(--slate-100); color: var(--slate-600); }
.chip { display: inline-flex; align-items: center; border-radius: 6px; background: var(--slate-50); padding: 1px 6px; font-size: 12px; font-weight: 500; color: var(--slate-700); box-shadow: inset 0 0 0 1px var(--ring); margin: 1px 2px 1px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; padding: 7px 12px; font: 500 13px/1.3 inherit; font-family: inherit; border: 0; cursor: pointer; transition: background-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.btn-primary:hover:not(:disabled) { background: var(--brand-700); }
.btn-secondary { background: #fff; color: var(--slate-700); box-shadow: inset 0 0 0 1px var(--ring-feld); }
.btn-secondary:hover:not(:disabled) { background: var(--slate-50); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .2); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--slate-600); }
.btn-ghost:hover:not(:disabled) { background: rgba(15, 23, 42, .05); color: var(--slate-900); }

.label { display: block; font-size: 12px; font-weight: 500; color: var(--slate-700); margin-bottom: 4px; }
.input, select.input { width: 100%; border-radius: 8px; background: #fff; padding: 8px 12px; font: 14px inherit; font-family: inherit; color: var(--slate-900); border: 0; box-shadow: inset 0 0 0 1px var(--ring-feld); }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand-500); }
.feld { margin-bottom: 14px; }
.hilfe { font-size: 12px; color: var(--slate-500); margin-top: 4px; }
.raster2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.wahl label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--ring-feld); cursor: pointer; font-size: 13px; }
.wahl input { accent-color: var(--brand-600); }

.meldung { border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.meldung.fehler { background: #fff1f2; color: #9f1239; }
.meldung.ok { background: #ecfdf5; color: #065f46; }
.meldung.hinweis { background: var(--slate-50); color: var(--slate-700); box-shadow: inset 0 0 0 1px var(--ring); }

.anmelden { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.anmelden .card { width: 100%; max-width: 360px; padding: 24px; }
.anmelden h1 { margin: 12px 0 4px; }

.detail-kopf { display: flex; align-items: flex-start; gap: 12px; }
.detail-kopf .rechts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.werte { display: grid; grid-template-columns: 180px 1fr; }
.werte > div { padding: 8px 16px; border-top: 1px solid var(--ring); }
.werte > div:nth-child(-n+2) { border-top: 0; }
.werte > div:nth-child(odd) { color: var(--slate-500); font-size: 13px; }
.befehl { display: flex; align-items: center; gap: 8px; }
.befehl code { flex: 1; background: var(--slate-50); border-radius: 6px; padding: 6px 8px; box-shadow: inset 0 0 0 1px var(--ring); overflow-x: auto; white-space: nowrap; }

.ausgabe { background: var(--slate-900); color: #e2e8f0; border-radius: 8px; padding: 10px 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 0; }
.protokoll .zeile { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 6px 16px; align-items: flex-start; }
.protokoll .zeit { color: var(--slate-500); white-space: nowrap; }
.protokoll .wer { color: var(--brand-700); white-space: nowrap; }

.dialog-grund { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); display: grid; place-items: center; z-index: 50; padding: 20px; }
.dialog { width: 100%; max-width: 460px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--ring), 0 24px 48px -12px rgba(15, 23, 42, .35); }
.dialog .inhalt { padding: 16px; display: grid; gap: 12px; }
.dialog .fuss { padding: 12px 16px; border-top: 1px solid var(--ring); display: flex; justify-content: flex-end; gap: 8px; }

.auftraege { position: fixed; right: 20px; bottom: 20px; width: 420px; max-width: calc(100vw - 40px); z-index: 40; }
.drehen { width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--brand-100); border-top-color: var(--brand-600); animation: drehen .8s linear infinite; display: inline-block; }
@keyframes drehen { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .kopf-innen { gap: 10px; padding: 0 12px; overflow-x: auto; }
  .marke span:last-child { display: none; }
  main { padding: 12px; }
  .raster2 { grid-template-columns: 1fr; }
  .werte { grid-template-columns: 120px 1fr; }
  .nur-breit { display: none; }
}
#anmeldeText { margin: 0 0 16px; }
.breit { width: 100%; margin-top: 8px; }
.abstand-oben { margin-top: 12px; }
.fett { font-weight: 600; }
.ende { margin-left: auto; }
.wachsen { flex: 1; min-width: 0; }
.abgeschnitten { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-weit { max-width: 720px; }
