:root {
  --bg:#fff; --fg:#1d2433; --muted:#6b7280; --line:#e5e7eb; --soft:#f3f4f6; --accent:#2563eb; --shadow:0 4px 18px rgba(0,0,0,.15);
  --efh:#16a34a; --dhh:#65a30d; --rh:#0d9488; --mfh:#9333ea; --neben:#9ca3af; --gewerbe:#78716c;
  --hoch:#dc2626; --mittel:#f59e0b; --niedrig:#64748b; --pv:#2563eb;
}
* { box-sizing:border-box; }
html,body { margin:0; height:100%; font:15px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif; color:var(--fg); background:#e5e7eb; }
#map { position:fixed !important; inset:0; width:100%; height:100%; }
button { font:inherit; cursor:pointer; }
input { font:inherit; }

.panel { position:fixed; top:12px; left:12px; width:360px; max-width:calc(100% - 24px); max-height:calc(100% - 24px); overflow:auto; background:var(--bg); border-radius:12px; box-shadow:var(--shadow); z-index:2; }
.tabs { display:flex; position:sticky; top:0; background:var(--bg); border-bottom:1px solid var(--line); z-index:1; }
.tabs button { flex:1; border:0; background:none; padding:11px 6px; font-weight:600; color:var(--muted); border-bottom:2px solid transparent; }
.tabs button.active { color:var(--accent); border-bottom-color:var(--accent); }
.pane { display:none; padding:12px; }
.pane.active { display:block; }

.row { display:flex; gap:6px; }
.row input, .filter { flex:1; min-width:0; padding:9px 10px; border:1px solid #d1d5db; border-radius:8px; font-size:16px; }
.filter { width:100%; margin-top:8px; }
.row > button, button.wide { padding:9px 14px; border:0; border-radius:8px; background:var(--accent); color:#fff; font-weight:600; }
button.wide { width:100%; margin-top:8px; }
button.ghost { background:var(--soft); color:var(--fg); border:1px solid var(--line); font-weight:500; flex:1; }
button.ghost.on { background:var(--accent); color:#fff; border-color:var(--accent); }
button:disabled { opacity:.5; cursor:default; }

.seg { display:flex; background:var(--soft); border-radius:9px; padding:3px; margin-bottom:10px; }
.seg button { flex:1; border:0; background:none; padding:7px 4px; border-radius:7px; font-size:14px; color:var(--muted); }
.seg button.active { background:var(--bg); color:var(--fg); font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,.12); }
.modepane { display:none; }
.modepane.active { display:block; }

.hint { color:var(--muted); font-size:14px; }
.small { font-size:13px; margin:8px 0 0; }
.info { margin-top:10px; }
.plz { font-size:34px; font-weight:700; letter-spacing:1px; }
.orte { margin-top:2px; }
.land { color:var(--muted); font-size:13px; margin-top:4px; }

.stats { margin-top:12px; border-top:1px solid var(--line); padding-top:8px; }
.stat { display:flex; justify-content:space-between; align-items:baseline; padding:4px 0; gap:8px; }
.stat small { display:block; color:var(--muted); font-size:11px; }
.stat b { font-size:17px; font-variant-numeric:tabular-nums; }

.strassen { max-height:260px; overflow:auto; margin-top:6px; }
.strassen label { display:flex; align-items:center; gap:8px; padding:5px 2px; border-bottom:1px solid var(--soft); font-size:14px; }
.strassen label span { flex:1; }
.strassen label small { color:var(--muted); font-variant-numeric:tabular-nums; }

.vorschau:empty { display:none; }
.vorschau { margin-top:12px; border-top:1px solid var(--line); padding-top:10px; }
.vorschau h3 { margin:0 0 6px; font-size:16px; }
.vorschau h4 { margin:14px 0 4px; font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.dot { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; vertical-align:-1px; }
.ziel { background:var(--soft); border-radius:10px; padding:10px; margin-top:12px; }
.ziel .big { font-size:22px; font-weight:700; }
.ziel .warn { color:#b45309; }
.bars { display:grid; grid-template-columns:auto 1fr auto; gap:3px 8px; align-items:center; font-size:13px; }
.bars .bar { height:10px; background:var(--accent); border-radius:2px; opacity:.75; }
.bars .n { text-align:right; font-variant-numeric:tabular-nums; color:var(--muted); }
.note { font-size:12px; color:var(--muted); margin-top:4px; }
.nameRow { margin-top:12px; }

.auftraege .item { border:1px solid var(--line); border-radius:10px; padding:10px; margin-bottom:8px; cursor:pointer; }
.auftraege .item:hover, .auftraege .item.sel { border-color:var(--accent); }
.item .top { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.item .name { font-weight:600; }
.item .meta { font-size:12px; color:var(--muted); margin-top:2px; }
.badge { font-size:12px; padding:2px 8px; border-radius:20px; font-weight:600; white-space:nowrap; }
.badge.offen { background:#fef3c7; color:#92400e; }
.badge.läuft { background:#dbeafe; color:#1e40af; }
.badge.fertig { background:#dcfce7; color:#166534; }
.progress { height:6px; background:var(--soft); border-radius:3px; margin-top:8px; overflow:hidden; }
.progress div { height:100%; background:var(--accent); }

.iw { max-width:280px; font-size:13px; line-height:1.4; }
.iw b { font-size:14px; }
.iw img { width:100%; border-radius:6px; margin-top:6px; }
.iw table { border-collapse:collapse; margin-top:4px; }
.iw td { padding:1px 6px 1px 0; vertical-align:top; }
.iw td:first-child { color:var(--muted); }

.status { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:rgba(29,36,51,.88); color:#fff; padding:6px 14px; border-radius:20px; font-size:13px; display:none; z-index:3; }
.status.show { display:block; }
.nokey { position:fixed; inset:0; display:grid; place-items:center; padding:24px; text-align:center; color:var(--muted); }
@media (max-width:600px) {
  .panel { top:auto; bottom:12px; left:12px; right:12px; width:auto; max-height:55%; }
  .status { bottom:auto; top:16px; }
}
