/* ObjektFit Konsole – helles Design nach branding/BRANDING.md.
   Creme-Grund, weisse Karten, Akzent (Petrol bzw. Mandantenfarbe) nur fuehrend:
   aktiver Menuepunkt, Primaer-Aktion, Logo. Ampelfarben sind fest und nicht mandantenabhaengig. */

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/poppins-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/poppins-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #f4efe9;          /* Creme */
  --card: #ffffff;
  --sunk: #faf8f5;        /* Tabellenkopf, eingelassene Flaechen */
  --line: #e7e2d9;
  --line-strong: #d8d4cb; /* Kontur der weissen Kachel */
  --ink: #211f1c;         /* Anthrazit */
  --ink-2: #5d5851;
  --ink-3: #8b857c;
  /* Akzent: wird von theme.js je Mandant gesetzt */
  --accent: #0e7a72;
  --accent-fg: #0e7a72;
  --accent-hover: #0b5d57;
  --accent-tint: #d7f0ec;
  --on-accent: #ffffff;
  /* Ampel (fest) */
  --gruen: #2e7d47; --gruen-tint: #e3f1e7;
  --gelb: #9c6b12;  --gelb-tint: #f8eed8;
  --rot: #b3372c;   --rot-tint: #f9e4e1;
  --grau: #77716a;  --grau-tint: #ecebe8;
  --radius: 12px;
  --radius-s: 8px;
  --shadow: 0 1px 2px rgba(33, 31, 28, .04), 0 2px 8px rgba(33, 31, 28, .04);
  --shadow-pop: 0 12px 40px rgba(33, 31, 28, .18);
  --side: 252px;
  font-family: 'Poppins', 'Segoe UI', Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-fg); }
h1, h2, h3 { font-weight: 600; margin: 0; line-height: 1.25; }
h1 { font-size: 24px; letter-spacing: -.01em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: 2px; border-radius: 4px; }

/* ---------- Boot / Anmeldung ---------- */
.boot { min-height: 100vh; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 32px 28px 28px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-brand .tile { width: 48px; height: 48px; }
.auth-brand .name { font-size: 20px; font-weight: 600; line-height: 1.15; }
.auth-brand .sub { font-size: 12.5px; color: var(--ink-3); }
.auth h1 { font-size: 20px; margin-bottom: 6px; }
.auth form { display: grid; gap: 14px; margin-top: 18px; }
.auth-foot { margin-top: 18px; font-size: 12px; color: var(--ink-3); text-align: center; }

.tile { display: inline-grid; place-items: center; background: #fff; border: 1px solid var(--line-strong); border-radius: 22%; flex: none; }
.tile svg { width: 64%; height: 64%; }

/* ---------- Rahmen ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.content { min-width: 0; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; }
.side-head { display: flex; align-items: center; gap: 11px; padding: 22px 20px 18px; }
.side-head .tile { width: 40px; height: 40px; }
.side-head .app { font-weight: 600; font-size: 16px; line-height: 1.2; }
.side-head .tenant { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.nav { padding: 4px 12px 16px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 0; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 6px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font-weight: 400; }
.nav a svg { flex: none; color: var(--ink-3); }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a.active { background: var(--accent-tint); color: var(--accent-fg); font-weight: 600; }
.nav a.active svg { color: var(--accent-fg); }
.nav .count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 20px; text-align: center; background: var(--grau-tint); color: var(--ink-2); }
.nav .count.rot { background: var(--rot); color: #fff; }
.side-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); font-size: 12.5px; }
.side-foot .who { font-weight: 600; }
.side-foot .role { color: var(--ink-3); }
.side-foot .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.side-foot .ver { color: var(--ink-3); font-size: 11.5px; }

.main { min-width: 0; padding: 28px 36px 64px; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .lead { color: var(--ink-2); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.crumb a { color: var(--ink-2); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* ---------- Bausteine ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.card-head .hint { font-size: 12.5px; color: var(--ink-3); }
.card + .card, .stack > * + * { margin-top: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid2 > .card + .card { margin-top: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .k { font-size: 12.5px; color: var(--ink-2); }
.kpi .v { font-size: 30px; font-weight: 600; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.kpi.rot .v, .kpi.rot .s { color: var(--rot); }
.kpi.gelb .v { color: var(--gelb); }
button.kpi { text-align: left; cursor: pointer; width: 100%; }
button.kpi:hover { border-color: var(--line-strong); }
button.kpi.on { outline: 2px solid var(--accent-fg); outline-offset: -1px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 16px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--sunk); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(.93); }
.btn.danger { color: var(--rot); border-color: #e5bdb7; }
.btn.danger:hover { background: var(--rot-tint); }
.btn.danger.solid { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--sunk); color: var(--ink); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; font-weight: 600; }
.btn:disabled, .btn[aria-busy="true"] { opacity: .55; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-s); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--sunk); color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 20px; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.gruen { color: var(--gruen); background: var(--gruen-tint); }
.badge.gelb { color: var(--gelb); background: var(--gelb-tint); }
.badge.rot { color: var(--rot); background: var(--rot-tint); }
.badge.grau { color: var(--grau); background: var(--grau-tint); }
.badge.plain::before { display: none; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; background: var(--grau-tint); color: var(--ink-2); white-space: nowrap; }
.tag.accent { background: var(--accent-tint); color: var(--accent-fg); font-weight: 600; }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--sunk); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 22px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 22px; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fcfbf9; }
.tbl .strong { font-weight: 600; }
.tbl .sub { font-size: 12.5px; color: var(--ink-3); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.act { text-align: right; white-space: nowrap; }
.tbl tr.undone td { color: var(--ink-3); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.search { position: relative; min-width: 240px; max-width: 360px; flex: 1; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 36px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.seg button.on { background: var(--accent-tint); color: var(--accent-fg); font-weight: 600; }

.empty { padding: 36px 22px; text-align: center; color: var(--ink-2); }
.empty .t { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.loading { padding: 40px 22px; text-align: center; color: var(--ink-3); }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--sunk); }
.note svg { flex: none; margin-top: 2px; }
.note.rot { background: var(--rot-tint); border-color: #efc9c3; color: #5e1e18; }
.note.rot svg { color: var(--rot); }
.note.gelb { background: var(--gelb-tint); border-color: #ecd9ae; color: #4d360a; }
.note.gelb svg { color: var(--gelb); }
.note.accent { background: var(--accent-tint); border-color: transparent; }
.note .t { font-weight: 600; }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 5px; }
.field > label, .field > .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; }
.form-grid .full { grid-column: 1 / -1; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: #fff; outline: none;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-fg); box-shadow: 0 0 0 3px var(--accent-tint); }
input[aria-invalid="true"] { border-color: var(--rot); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.form-error { color: var(--rot); font-size: 13px; }
.form-error:empty { display: none; }
.months { display: flex; flex-wrap: wrap; gap: 6px; }
.months label { display: inline-flex; }
.months input { position: absolute; opacity: 0; pointer-events: none; }
.months span { display: inline-block; min-width: 42px; text-align: center; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.months input:checked + span { background: var(--accent-tint); border-color: var(--accent-fg); color: var(--accent-fg); font-weight: 600; }
.months input:focus-visible + span { outline: 2px solid var(--accent-fg); outline-offset: 2px; }
.reg-row { display: grid; grid-template-columns: 1fr 110px 110px 32px; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: #fff; min-height: 40px; }
.chips .chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--grau-tint); font-size: 12.5px; }
.chips .chip button { border: 0; background: transparent; cursor: pointer; color: var(--ink-3); width: 20px; height: 20px; border-radius: 50%; }
.chips .chip button:hover { background: #dedbd5; color: var(--ink); }
.chips input { border: 0; box-shadow: none; flex: 1; min-width: 180px; min-height: 28px; padding: 2px 6px; }
.chips input:focus { box-shadow: none; }
.chips:focus-within { border-color: var(--accent-fg); box-shadow: 0 0 0 3px var(--accent-tint); }

/* ---------- Dialoge, Seitenpanel, Hinweise ---------- */
.overlay { position: fixed; inset: 0; background: rgba(33, 31, 28, .38); display: grid; place-items: center; padding: 24px 16px; z-index: 50; overflow-y: auto; }
.modal { width: 100%; max-width: 520px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-pop); }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.modal-body { padding: 16px 22px 4px; }
.modal-body > * + * { margin-top: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 22px 20px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.drawer-wrap { position: fixed; inset: 0; background: rgba(33, 31, 28, .28); z-index: 40; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--card); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 18px 22px 28px; overflow-y: auto; flex: 1; }
.drawer-body > * + * { margin-top: 16px; }
.toast-box { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; justify-items: center; }
.toast { display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-pop); font-size: 13.5px; max-width: min(560px, calc(100vw - 32px)); }
.toast button { border: 0; background: transparent; color: #8fe0d6; font-weight: 600; cursor: pointer; padding: 2px 4px; }
.toast.err { background: #5e1e18; }

.secret { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.secret .code { font-size: 28px; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums; text-align: center; }
.secret .link { font-size: 12.5px; word-break: break-all; color: var(--ink-2); background: var(--sunk); padding: 8px 10px; border-radius: 6px; }
.secret .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.qr { display: grid; place-items: center; }
.qr svg { width: 180px; height: 180px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.timeline li::after { content: ''; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.rot::before { background: var(--rot); }
.timeline li.gelb::before { background: var(--gelb); }
.timeline li.gruen::before { background: var(--gruen); }
.timeline .when { font-size: 12px; color: var(--ink-3); }

.msgs { display: grid; gap: 10px; }
.msg { padding: 12px 14px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); }
.msg.mine { background: var(--accent-tint); border-color: transparent; }
.msg.internal { background: var(--gelb-tint); border-color: #ecd9ae; }
.msg .meta { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.msg .body { white-space: pre-wrap; }

.dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; }
.dl dt { color: var(--ink-3); font-size: 12.5px; padding-top: 1px; }
.dl dd { margin: 0; }

.meter-list { list-style: none; margin: 0; padding: 0; }
.meter-item { display: grid; grid-template-columns: 28px 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 22px 12px 10px; border-bottom: 1px solid var(--line); background: var(--card); }
.meter-item:last-child { border-bottom: 0; }
.meter-item.dragging { opacity: .45; }
.meter-item.drop-before { box-shadow: inset 0 2px 0 var(--accent-fg); }
.meter-item.drop-after { box-shadow: inset 0 -2px 0 var(--accent-fg); }
.handle { cursor: grab; color: var(--ink-3); display: grid; place-items: center; height: 32px; border-radius: 6px; border: 0; background: transparent; }
.handle:hover { background: var(--sunk); color: var(--ink); }
.medium { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--sunk); color: var(--ink-2); }
.meter-item .title { font-weight: 600; }
.meter-item .meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 2px; }
.meter-item .acts { display: flex; gap: 4px; }

.svc-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 10px 22px; border-bottom: 1px solid var(--line); }
.svc-row:last-of-type { border-bottom: 0; }
.svc-row .label { font-weight: 600; }

.pick { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.pick label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.pick label:hover { background: var(--sunk); }
.pick input { width: 17px; height: 17px; accent-color: var(--accent); }
.pick .sub { font-size: 12px; color: var(--ink-3); }

.color-row { display: flex; gap: 12px; align-items: center; }
.color-row input[type=color] { width: 52px; height: 40px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: #fff; cursor: pointer; }
.preview-strip { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px; border-radius: var(--radius-s); background: var(--bg); }

.pager { display: flex; justify-content: center; padding: 14px; }
.diff { font-size: 12px; color: var(--ink-2); margin-top: 4px; display: grid; gap: 2px; }
.diff code { font-family: inherit; background: var(--sunk); padding: 0 4px; border-radius: 4px; }

/* ---------- Schmal (Tablet / Handy des Dienstleisters) ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 > .card + .card { margin-top: 0; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 45; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(33, 31, 28, .3); z-index: 44; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .topbar .tile { width: 32px; height: 32px; }
  .topbar .app { font-weight: 600; }
  .main { padding: 18px 16px 48px; }
  h1 { font-size: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 14px; }
  .tbl th:last-child, .tbl td:last-child { padding-right: 14px; }
  .tbl .hide-s { display: none; }
  .meter-item { grid-template-columns: 24px 1fr auto; padding-right: 12px; }
  .meter-item .medium { display: none; }
  .svc-row { grid-template-columns: 1fr; gap: 4px; padding: 10px 14px; }
  .card-head, .card-pad { padding-left: 14px; padding-right: 14px; }
  .search { min-width: 0; max-width: none; }
}
@media (max-width: 520px) {
  .kpis { gap: 10px; }
  .kpi .v { font-size: 24px; }
  .reg-row { grid-template-columns: 1fr 80px 80px 32px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Segment-Schalter aus Radio-Buttons (z. B. Plan-Art) */
.seg label { display: inline-flex; }
.seg .segbtn { display: inline-block; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.seg .segbtn.on, .seg input:checked + .segbtn { background: var(--accent-tint); color: var(--accent-fg); font-weight: 600; }
.seg input:focus-visible + .segbtn { outline: 2px solid var(--accent-fg); outline-offset: 1px; }
.kpis > *, .grid2 > * { margin-top: 0 !important; }
.card > .meter-list:last-child, .card > .tbl-wrap:last-child { border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button, .seg .segbtn { white-space: nowrap; flex: none; }
