:root {
  --bg: #f6f6f4; --panel: #fff; --text: #1c1d1f; --muted: #6b6f76; --line: #e3e3df;
  --accent: #1f5f8b; --accent-weak: #e6eff6; --ok: #2e7d4f; --ok-weak: #e5f3ea; --warn: #a15c00; --warn-weak: #fbf0de;
  --bad: #b3261e; --bad-weak: #fbe7e5; --radius: 8px;
  font: 14px/1.45 system-ui, "Segoe UI", sans-serif; color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
aside { background: #16222c; color: #cfd8df; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.logo { color: #fff; font-weight: 700; font-size: 16px; padding: 0 10px 18px; line-height: 1.2; }
nav a { display: block; color: inherit; text-decoration: none; padding: 8px 10px; border-radius: 6px; margin-bottom: 2px; }
nav a:hover { background: #22323f; }
nav a.aktiv { background: var(--accent); color: #fff; }
main { padding: 24px 32px 60px; max-width: 1400px; min-width: 0; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 28px 0 10px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.kopf .sub { margin: 0; }
.leiste { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.karte { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.karte .wert { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.karte .label { color: var(--muted); font-size: 12.5px; }
.karte a { font-size: 12.5px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafaf8; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 650; background: #fafaf8; border-top: 1px solid var(--line); }
.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.klein { font-size: 12px; }
.leer { padding: 28px; text-align: center; color: var(--muted); }
button, .btn { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 6px 12px; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button:hover, .btn:hover { border-color: #bbb; }
button.primaer, .btn.primaer { background: var(--accent); border-color: var(--accent); color: #fff; }
button.gefahr { color: var(--bad); }
button.mini { padding: 2px 8px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; background: #fff; color: var(--text); }
textarea { width: 100%; min-height: 70px; }
label.feld { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
label.feld input, label.feld select, label.feld textarea { color: var(--text); font-size: 14px; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 550; background: #eee; }
.tag.offen { background: var(--warn-weak); color: var(--warn); }
.tag.zugeordnet, .tag.bereit { background: var(--accent-weak); color: var(--accent); }
.tag.abgerechnet, .tag.ausgezahlt { background: var(--ok-weak); color: var(--ok); }
.tag.stripe-aktiv { background: #ece9fd; color: #5b4bc4; }
.tag.stripe-aktiv_ohne_bank, .tag.stripe-onboarding, .tag.stripe-eingeschraenkt { background: var(--warn-weak); color: var(--warn); }
.stripe-modus { font-size: 11px; font-weight: 600; margin-top: 6px; padding: 2px 8px; border-radius: 999px; display: inline-block; }
.stripe-modus.test { background: #f5c451; color: #3d2c00; }
.stripe-modus.live { background: #635bff; color: #fff; }
.tag.ignoriert { background: #eee; color: var(--muted); }
.tag.entwurf { background: var(--warn-weak); color: var(--warn); }
.tag.freigegeben { background: var(--accent-weak); color: var(--accent); }
.warn { color: var(--bad); font-size: 12px; }
.hinweis { background: var(--accent-weak); border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; }
.hinweis.gelb { background: var(--warn-weak); }
dialog { border: 0; border-radius: 10px; padding: 0; width: min(640px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10,20,30,.35); }
dialog form { padding: 20px 22px; display: grid; gap: 14px; }
dialog h3 { margin: 0; font-size: 17px; }
dialog .aktionen { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1c1d1f; color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 80vw; z-index: 10; }
#toast.zeigen { opacity: 1; }
#toast.fehler { background: var(--bad); }
.balken { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 12px 16px 0; }
.balken div { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.balken-label { display: flex; gap: 6px; padding: 4px 16px 12px; }
.balken-label span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.zuordnung { display: grid; grid-template-columns: 220px 1fr; gap: 8px 12px; align-items: center; max-width: 640px; }
select.objektwahl { max-width: 220px; padding: 2px 4px; font-size: 12.5px; }
td.text { max-width: 340px; overflow-wrap: anywhere; }
aside { display: flex; flex-direction: column; }
.nutzer { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid #2a3a47; font-size: 12.5px; color: #9fb0bd; overflow-wrap: anywhere; }
.nutzer a { color: #cfd8df; }
body.anmeldung { grid-template-columns: 1fr; }
body.anmeldung aside { display: none; }
body.anmeldung main { max-width: none; display: grid; place-items: start center; padding-top: 8vh; }
.anmeldekarte { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px 30px; width: min(440px, 94vw); }
.anmeldelogo { font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.anmeldeform { display: grid; gap: 12px; margin-top: 8px; }
.anmeldeform button { padding: 9px 12px; }
.qr { display: flex; justify-content: center; margin: 8px 0; }
.qr svg { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 6px; }
code.geheimnis { font-size: 13px; letter-spacing: .5px; user-select: all; }
.schluessel-anzeige { font-family: ui-monospace, Consolas, monospace; width: 100%; font-size: 13px; }
@media (max-width: 800px) { body { grid-template-columns: 1fr; } aside { position: static; height: auto; } .nutzer { margin-top: 8px; } nav { display: flex; flex-wrap: wrap; } main { padding: 16px; } }
