/* PlanPunch – Gestaltung nach dem Taktfahrplan: Weiß, echtes Schwarz, Signalgelb für "jetzt/aktiv", kräftige Linien, Barlow (Verkehrsschrift) */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/vendor/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("/vendor/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/vendor/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("/vendor/fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("/vendor/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/vendor/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/vendor/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #FFFFFF; --bg2: #F2F3F4; --card: #FFFFFF; --ink: #000000; --muted: #5A5F66; --line: #C4C8CD; --line2: #E4E6E9;
  --accent: #FFC400; --accent-ink: #000000; --accent-soft: #FFF2B8; --blue: #000000;
  --ok: #0A7D33; --warn: #A85800; --bad: #C8102E; --info: #0050B5;
  --ok-soft: #DDF3E4; --warn-soft: #FFE9C2; --bad-soft: #FADADF; --info-soft: #DCE8FA;
  --radius: 3px; --shadow: none;
  --font: "Barlow", "Segoe UI", system-ui, sans-serif; --cond: "Barlow Condensed", "Barlow", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0 0 .5rem; font-family: var(--cond); font-weight: 700; line-height: 1.1; }
h1 { font-size: 2.4rem; letter-spacing: -.005em; } h2 { font-size: 1.7rem; } h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-top: 1.1rem; padding-bottom: 3px; border-bottom: 1px solid var(--ink); }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1.5px solid var(--ink); background: #fff; border-radius: var(--radius); padding: .5rem .95rem; cursor: pointer; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--accent); }
.btn.primary { background: var(--ink); color: #fff; } .btn.primary:hover { background: var(--accent); color: var(--ink); }
.btn.accent { background: var(--accent); }
.btn.danger { color: var(--bad); border-color: var(--bad); } .btn.danger:hover { background: var(--bad); color: #fff; }
.btn.sm { padding: .28rem .6rem; font-size: .9rem; }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--bg2); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid #7D838B; background: #fff; border-radius: var(--radius); padding: .55rem .7rem; outline: none; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent); }
textarea.input { min-height: 90px; resize: vertical; }
label.f { display: block; font-size: .88rem; font-weight: 600; margin: .75rem 0 .25rem; }
label.cb { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: #000; width: 17px; height: 17px; }

/* Flächen: keine Schatten-Karten, sondern Abschnitte mit schwarzer Oberkante */
.card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: 0; padding: 1rem 1.1rem; }
.card + .card { margin-top: 14px; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); } .small { font-size: .9rem; } .xs { font-size: .8rem; } .right { text-align: right; } .center { text-align: center; } .b { font-weight: 700; }

/* Marken statt Pillen */
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .08rem .45rem; border-radius: 2px; background: var(--bg2); color: var(--ink); line-height: 1.45; vertical-align: middle; border: 1px solid var(--line); }
.badge.rot { background: var(--bad-soft); color: #8A0A1F; border-color: transparent; } .badge.gelb { background: var(--accent); color: #000; border-color: transparent; } .badge.gruen { background: var(--ok-soft); color: #075A25; border-color: transparent; } .badge.blau { background: var(--info-soft); color: #003A85; border-color: transparent; }

table.t { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.t th, table.t td { padding: .5rem .6rem; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: middle; }
table.t th { font-family: var(--cond); font-size: 1rem; font-weight: 600; color: var(--ink); background: #fff; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.t td.right, table.t th.right { font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: none; }
table.t tbody tr:hover td { background: var(--accent-soft); }
table.t tfoot td { border-top: 2px solid var(--ink); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #000; color: #fff; padding: .75rem 1.1rem; border-left: 8px solid var(--accent); border-radius: 0; z-index: 99; max-width: 90vw; font-weight: 600; }
.toast.bad { border-left-color: var(--bad); }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-top: 8px solid var(--accent); border-radius: 0; padding: 1.3rem 1.4rem; width: 100%; max-width: 580px; max-height: 92vh; overflow: auto; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.modal.wide { max-width: 940px; }

/* Anzeigetafel: Kennzahlen als schwarzes Band */
.kpi { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: #000; color: #fff; border-top: 6px solid var(--accent); --bad: #FF7A8A; --warn: #FFC400; --ok: #62E08F; }
.kpi .card { background: transparent; border: none; border-left: 1px solid #333; border-radius: 0; padding: .7rem 1rem .8rem; margin: 0; color: #fff; }
.kpi .card + .card { margin-top: 0; }
.kpi .card:first-child { border-left: none; }
.kpi .v { font-family: var(--cond); font-size: 2.5rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .85rem; color: #C9CDD2; font-weight: 500; margin-top: 5px; line-height: 1.25; }
.kpi .q-ok { color: var(--ok); } .kpi .q-warn { color: var(--warn); } .kpi .q-bad { color: var(--bad); }

.logo { display: inline-flex; align-items: center; gap: 0; font-family: var(--cond); font-weight: 700; font-size: 1.6rem; letter-spacing: 0; line-height: 1; }
.logo img { width: 28px; height: 28px; border-radius: 0; margin-right: .5rem; }
.logo b { color: inherit; font-weight: 500; }
.hidden { display: none !important; }
.pill { display: inline-block; padding: .08rem .45rem; border-radius: 2px; font-size: .8rem; font-weight: 600; color: #fff; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 0; background: var(--line); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--accent); } .dot.bad { background: var(--bad); } .dot.info { background: var(--info); }
.bar { height: 8px; background: var(--line2); border-radius: 0; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--ink); }
.empty { color: var(--muted); padding: 1.2rem; text-align: center; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: var(--radius); border: 1.5px solid var(--ink); background: #fff; font-size: .9rem; font-weight: 600; cursor: pointer; }
.chip:hover { background: var(--accent-soft); }
.chip.on { background: var(--ink); color: #fff; }
.q-ok { color: var(--ok); font-weight: 700; } .q-warn { color: var(--warn); font-weight: 700; } .q-bad { color: var(--bad); font-weight: 700; }
hr { border: none; border-top: 1px solid var(--ink); margin: 1rem 0; }
details > summary { cursor: pointer; }
@media (max-width: 640px) { html, body { font-size: 15px; } .card { padding: .8rem; } h1 { font-size: 1.9rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
