/* Wasserzähler Online – Styles für Verwaltung und Bürgerportal */
:root {
  --primary: #2E7D32; --primary-hover: #276B2B; --on-primary: #FFFFFF; --tint: #D5E5D6; --tint2: #EAF2EB; --hero: #E0EDE1; --link: #2C772F; --accent-soft: #ABCBAD;
  --bg: #F6F8F8; --surface: #FFFFFF; --text: #1B2427; --muted: #4A5A60; --line: #E1E7E9; --line2: #C9D2D6;
  --field: #F1F4F5; --fieldline: #5A666B; --chip: #EEF1F2; --hover: #EEF2F3;
  --danger: #9B231B; --danger-bg: #FBE6E4; --danger-line: #E8B9B4;
  --success: #17643A; --success-bg: #E2F3E8; --success-line: #A9D6BB;
  --info: #0B4254; --info-bg: #DFF0F6; --info-line: #A9D3E0;
  --warn: #7A4A00; --warn-bg: #FFF3DB; --warn-line: #EBCB85;
  --neutral: #5E6E74; --overlay: rgba(30, 36, 38, 0.45); --shadow: rgba(20, 40, 48, 0.10);
  --meter: #1F2629; --track-off: #C9D2D6;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Nunito', 'Figtree', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #131718; --surface: #1D2224; --text: #E8ECED; --muted: #AEB9BD; --line: #2B3336; --line2: #3A4447;
  --field: #252B2E; --fieldline: #9AA7AC; --chip: #2A3134; --hover: #242B2E;
  --danger: #F2A39C; --danger-bg: #3A1F1D; --danger-line: #6B3430;
  --success: #8FD5A8; --success-bg: #1C3326; --success-line: #2F5A40;
  --info: #BFE6F2; --info-bg: #1B3540; --info-line: #2D5664;
  --warn: #F2C46B; --warn-bg: #3A2E15; --warn-line: #6B5424;
  --neutral: #A3B0B5; --overlay: rgba(0, 0, 0, 0.6); --shadow: rgba(0, 0, 0, 0.45);
  --meter: #0B0E0F; --track-off: #4A5458;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn { min-height: 44px; padding: 0 22px; border-radius: 22px; border: 1px solid var(--primary); background: transparent; color: var(--primary); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--tint2); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { min-height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; }
.btn[disabled] { background: var(--track-off); border-color: var(--track-off); color: var(--muted); cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; border: none; border-radius: 22px; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.icon-btn:hover { background: var(--chip); }
.icon-btn svg, .btn svg { flex: none; }

/* ---------- Felder ---------- */
.field { display: flex; flex-direction: column; background: var(--field); border-bottom: 1px solid var(--fieldline); border-radius: 4px 4px 0 0; padding: 6px 12px; min-width: 0; }
.field > span { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea { border: none; background: transparent; outline: none; padding: 3px 0; font-size: 15px; width: 100%; }
.field.locked { background: transparent; border: 1px dashed var(--line2); border-radius: 4px; }
.form { display: grid; grid-template-columns: minmax(140px, 240px) minmax(0, 560px); gap: 18px 16px; align-items: center; }
.form > .label { text-align: right; color: var(--muted); font-size: 15px; }
.form > .label.top { align-self: start; padding-top: 10px; }
.form input[type="text"], .form input[type="email"], .form input[type="number"], .form textarea { min-height: 46px; border: none; border-bottom: 1px solid var(--fieldline); background: var(--field); padding: 0 14px; width: 100%; font-size: 15px; outline: none; }
.form textarea { padding: 12px 14px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); }
.switch { width: 52px; height: 32px; border: none; border-radius: 16px; padding: 0 3px; cursor: pointer; background: var(--track-off); display: inline-flex; align-items: center; justify-content: flex-start; flex: none; }
.switch span { width: 26px; height: 26px; border-radius: 13px; background: #FFFFFF; display: block; }
.switch[aria-checked="true"] { background: var(--primary); justify-content: flex-end; }
.switch[aria-checked="true"] span { background: var(--on-primary); }
.radio { min-height: 44px; border: none; border-radius: 6px; background: transparent; padding: 6px 10px; cursor: pointer; display: flex; align-items: center; gap: 10px; text-align: left; font-size: 15px; }
.radio:hover { background: var(--hover); }
.radio .dot { width: 20px; height: 20px; flex: none; border-radius: 10px; border: 2px solid var(--primary); display: flex; align-items: center; justify-content: center; }
.radio .dot::after { content: ''; width: 10px; height: 10px; border-radius: 5px; background: transparent; }
.radio[aria-checked="true"] .dot::after { background: var(--primary); }

/* ---------- Meldungen, Chips ---------- */
.note { border-radius: 6px; padding: 10px 14px; font-size: 15px; border: 1px solid; }
.note.success { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.note.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.note.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.note.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.note.neutral { background: var(--chip); color: var(--text); border-color: var(--line2); }
.pill { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 2px 10px; border: 1px solid; white-space: nowrap; }
.pill.success { color: var(--success); background: var(--success-bg); border-color: var(--success-line); }
.pill.info { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
.pill.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.pill.neutral { color: var(--neutral); background: var(--chip); border-color: var(--line2); }
.chip { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line2); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--tint); color: var(--text); border-color: var(--primary); }
.toast { display: flex; align-items: center; gap: 12px; max-width: 820px; }
.toast > span { flex: 1; }

/* ---------- Dialog ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; background: var(--bg); border-radius: 24px; box-shadow: 0 16px 48px var(--shadow); display: flex; flex-direction: column; }
.dialog.wide { max-width: 760px; }
.dialog-head { display: flex; align-items: center; gap: 16px; margin: 0 18px; padding: 14px 0 12px; border-bottom: 1px solid var(--line2); }
.dialog-head h2 { margin: 0; flex: 1; font-size: 22px; font-weight: 600; }
.dialog-head .icon-btn { background: var(--chip); }
.dialog-body { padding: 18px 24px 4px; display: flex; flex-direction: column; gap: 14px; }
.dialog-body > p { margin: 0; color: var(--muted); line-height: 1.5; }
.dialog-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin: 18px 18px 0; padding: 16px 0 18px; border-top: 1px solid var(--line2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.span2 { grid-column: 1 / -1; }
.dropzone { border: 2px dashed var(--line2); border-radius: 8px; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--surface); }

/* =========================================================
   Verwaltung
   ========================================================= */
.admin { display: flex; flex-wrap: wrap; align-items: flex-start; min-height: 100vh; }
.admin-side { flex: 1 1 260px; max-width: 280px; min-height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 12px 10px; gap: 4px; position: sticky; top: 0; }
.brandbox { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.crest { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--tint); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.brandbox strong { display: block; font-family: var(--font-head); font-size: 17px; }
.brandbox small { color: var(--muted); font-size: 13px; }
.nav-item { min-height: 48px; border: none; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; background: transparent; padding: 0 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; font-size: 16px; color: var(--text); }
.nav-item:hover { background: var(--hover); }
.nav-item[aria-current="page"] { background: var(--tint); border-left-color: var(--primary); font-weight: 600; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.admin-main { flex: 999 1 560px; min-width: 0; padding: 0 0 56px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 22px 24px 10px; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 600; flex: 1; }
.menu-btn { display: none; }
.content { padding: 4px 24px 0; display: flex; flex-direction: column; gap: 18px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line2); }
.section-head h2 { margin: 0; font-size: 18px; font-weight: 600; flex: 1; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; gap: 10px; }
.steps b { width: 24px; height: 24px; flex: none; border-radius: 12px; background: var(--tint); font-size: 13px; display: flex; align-items: center; justify-content: center; }
.steps span { display: flex; flex-direction: column; font-size: 15px; font-weight: 600; }
.steps small { font-size: 13px; color: var(--muted); font-weight: 400; line-height: 1.35; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; max-width: 980px; }
.link-card { margin: 0; }
.portal-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.subtabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 1180px; }
.subpanel .card { max-width: 1180px; }
.subtabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 14px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.subtabs button small { color: var(--muted); font-size: 13px; }
.subtabs button:hover { background: var(--hover); }
.subtabs button[aria-selected="true"] { border: 2px solid var(--primary); padding: 9px 13px; background: var(--tint2); }
.subtabs button[aria-selected="true"] strong { color: var(--primary); }
.subpanel { display: flex; flex-direction: column; gap: 16px; }
.news-card { max-width: 1180px; }
.tpl-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tpl { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; text-align: left; min-height: 56px; }
.tpl:hover { background: var(--hover); }
.tpl[aria-checked="true"] { border: 2px solid var(--primary); padding: 9px 11px; background: var(--tint2); }
.tpl-ico { font-size: 22px; line-height: 1; }
.tpl small { font-size: 12px; }
.news-site-body { font-family: Georgia, 'Times New Roman', serif; }
.news-site-body .wz-news { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.news-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.news-edit { display: flex; flex-direction: column; gap: 12px; }
.news-edit textarea { resize: vertical; line-height: 1.5; }
.tokens { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip-btn { border: 1px solid var(--line2); background: var(--chip); color: var(--text); border-radius: 999px; padding: 4px 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; cursor: pointer; min-height: 32px; }
.chip-btn:hover { border-color: var(--primary); }
.news-out { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.news-out-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; color: var(--text); border-radius: 999px; padding: 0 14px; min-height: 32px; cursor: pointer; font-size: 14px; font-weight: 600; }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: var(--primary); color: var(--on-primary); }
.news-site { border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; background: #FFFFFF; color: #222222; color-scheme: light; }
.news-site-bar { display: flex; align-items: center; gap: 6px; background: #EEF1F2; padding: 8px 12px; border-bottom: 1px solid #D9DFE1; }
.news-site-bar span { width: 10px; height: 10px; border-radius: 5px; background: #C3CBCE; }
.news-site-bar small { margin-left: 8px; color: #5A666B; font-size: 12px; }
.news-site-body { padding: 18px 22px; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.6; }
.news-site-body h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.25; }
.news-site-body p, .news-site-body ul { margin: 0 0 12px; }
.news-site-body a { color: #1F5FA8; }
.news-code { width: 100%; min-height: 420px; border: 1px solid var(--line2); border-radius: 10px; background: var(--field); padding: 12px 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; resize: vertical; }
.copy-row { display: flex; flex-direction: column; gap: 6px; }
.copy-row label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.copy-field { display: flex; gap: 10px; align-items: center; }
.copy-field input, .copy-field textarea { flex: 1; min-width: 0; min-height: 40px; border: 1px solid var(--line2); border-radius: 6px; background: var(--field); padding: 8px 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; resize: none; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.card-head h3 { margin: 0; font-size: 19px; font-weight: 600; flex: 1 1 200px; }
.kv3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 20px; font-size: 15px; }
.kv3 small { display: block; font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.bar > div { height: 100%; background: var(--primary); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--field); border-bottom: 1px solid var(--fieldline); border-radius: 4px 4px 0 0; padding: 0 12px; min-height: 44px; flex: 1 1 240px; max-width: 360px; }
.search input { border: none; background: transparent; outline: none; flex: 1; min-width: 0; font-size: 15px; }
.table-wrap { border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 900px; font-size: 15px; }
th { text-align: left; font-size: 14px; background: var(--bg); padding: 11px 12px; white-space: nowrap; }
td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: var(--hover); }
td.num, th.num { text-align: right; white-space: nowrap; }
td small { display: block; color: var(--muted); font-size: 13px; }
.comment-btn { margin-top: 4px; min-height: 30px; padding: 0 10px 0 8px; border-radius: 15px; border: 1px solid var(--line2); background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.comment-btn.new { background: var(--tint); border-color: var(--primary); }
blockquote { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; line-height: 1.55; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 44px; height: 44px; border-radius: 22px; border: 3px solid transparent; padding: 3px; background: var(--surface); cursor: pointer; }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; }
.swatch[aria-checked="true"] { border-color: var(--text); }

@media (max-width: 900px) {
  .news-grid, .subtabs { grid-template-columns: minmax(0, 1fr); }
  .tpl-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-side { position: static; min-height: 0; max-width: none; flex-basis: 100%; border-right: none; border-bottom: 1px solid var(--line); }
  .admin-side .nav-item, .admin-side .side-foot { display: none; }
  .admin-side.open .nav-item, .admin-side.open .side-foot { display: flex; }
  .brandbox { border-bottom: none; margin: 0; padding-bottom: 6px; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .form { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .form > .label { text-align: left; }
  .form > .gap { display: none; }
  .kv3, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .page-head, .content { padding-left: 16px; padding-right: 16px; }
}

/* =========================================================
   Bürgerportal
   ========================================================= */
.portal { min-height: 100vh; display: flex; flex-direction: column; font-size: 17px; }
.portal h1, .portal h2, .portal h3, .portal .btn { font-family: var(--font-head); }
.portal .btn { min-height: 52px; padding: 0 28px; border-radius: 26px; border-width: 2px; font-size: 18px; font-weight: 800; }
.p-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.p-header > div { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.p-header .crest { width: 48px; height: 48px; border-radius: 12px; }
.p-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-title strong { font-family: var(--font-head); font-size: 19px; font-weight: 800; }
.p-title small { color: var(--muted); font-size: 14px; }
.hero { background: var(--hero); padding: 40px 24px 96px; position: relative; overflow: hidden; }
.hero.compact { padding-bottom: 72px; }
.hero::before { content: ''; position: absolute; left: -60px; bottom: -90px; width: 220px; height: 220px; border-radius: 50%; background: var(--tint); opacity: 0.5; }
.hero::after { content: ''; position: absolute; right: 6%; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--tint); opacity: 0.6; }
.hero-in { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 24px; position: relative; z-index: 1; }
.hero-text { flex: 1 1 360px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hero h1 { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -0.5px; }
.hero p { margin: 0; font-size: 19px; line-height: 1.5; max-width: 540px; }
.deadline { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 6px 14px 6px 8px; font-size: 15px; font-weight: 600; box-shadow: 0 2px 8px var(--shadow); }
.deadline i { width: 22px; height: 22px; border-radius: 11px; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.p-main { flex: 1; width: 100%; max-width: 760px; margin: -64px auto 0; padding: 0 16px 56px; display: flex; flex-direction: column; gap: 22px; position: relative; z-index: 2; }
.hero.compact + .p-main { margin-top: -44px; }
.p-card { background: var(--surface); border-radius: 24px; box-shadow: 0 10px 30px var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.p-card h2 { margin: 0; font-size: 23px; font-weight: 800; }
.p-card p { margin: 0; line-height: 1.6; }
.p-field { display: flex; flex-direction: column; background: var(--field); border: 2px solid var(--line2); border-radius: 14px; padding: 8px 14px; }
.p-field.error { border-color: var(--danger); }
.p-field > span { font-size: 14px; color: var(--muted); font-weight: 600; }
.p-field input, .p-field textarea { border: none; background: transparent; outline: none; font-size: 18px; padding: 4px 0; width: 100%; }
.p-note { border-radius: 14px; padding: 12px 16px; font-size: 16px; line-height: 1.45; border: 1px solid; }
.p-note.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.p-note.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); display: flex; flex-direction: column; gap: 10px; }
.p-note label { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.p-note input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--primary); }
.stepper { list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: var(--surface); border-radius: 999px; box-shadow: 0 6px 20px var(--shadow); }
.stepper li { min-height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--muted); }
.stepper li b { width: 24px; height: 24px; border-radius: 12px; background: var(--chip); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.stepper li.done { color: var(--text); }
.stepper li.done b { background: var(--primary); color: var(--on-primary); }
.stepper li[aria-current="step"] { background: var(--primary); color: var(--on-primary); }
.stepper li[aria-current="step"] b { background: var(--on-primary); color: var(--primary); }
.howto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.howto div { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.howto b { font-family: var(--font-head); font-size: 18px; font-weight: 800; }
.howto small { color: var(--muted); font-size: 16px; line-height: 1.5; }
.round-ico { width: 48px; height: 48px; border-radius: 24px; background: var(--tint); display: flex; align-items: center; justify-content: center; flex: none; }
.place { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--tint2); border-radius: 16px; padding: 14px 16px; }
.place .round-ico { width: 44px; height: 44px; background: var(--surface); }
.enter-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.meter-input { display: flex; align-items: center; gap: 10px; background: var(--meter); border-radius: 18px; padding: 12px 18px; border: 3px solid var(--primary); }
.meter-input.error { border-color: var(--danger); }
.meter-input input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 38px; font-weight: 700; letter-spacing: 6px; color: #FFFFFF; }
.meter-input input::placeholder { color: #8C989C; }
.meter-input b { font-family: var(--font-head); font-size: 22px; color: #FFFFFF; }
.example { margin: 0; background: var(--tint2); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; font-size: 15px; }
.photo-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 2px dashed var(--line2); border-radius: 16px; padding: 14px 16px; }
.photo-box img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; }
.comment-box { display: flex; flex-direction: column; gap: 8px; background: var(--tint2); border-radius: 16px; padding: 16px; }
.comment-box textarea { border: 2px solid var(--line2); border-radius: 14px; background: var(--surface); padding: 10px 14px; font-size: 17px; resize: vertical; outline: none; width: 100%; }
.sum-big { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; background: var(--tint2); border-radius: 18px; padding: 18px; }
.sum-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border-bottom: none; }
.sum-row span:first-child { color: var(--muted); }
.done { align-items: center; text-align: center; }
.receipt { display: inline-flex; gap: 8px; background: var(--tint2); border-radius: 999px; padding: 8px 16px; font-size: 15px; }
.p-footer { background: var(--hero); margin-top: 24px; }
.p-footer > div { max-width: 1040px; margin: 0 auto; padding: 20px 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.p-footer span { flex: 1 1 260px; }
.demo-bar { position: fixed; right: 12px; bottom: 12px; z-index: 40; display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: 0 6px 20px var(--shadow); font-size: 14px; }
.demo-bar .btn { min-height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; border-width: 1px; font-family: var(--font); font-weight: 600; }

@media (max-width: 700px) {
  .demo-bar { position: static; width: max-content; max-width: calc(100% - 32px); margin: 0 auto 16px; }
  .hero { padding: 28px 20px 72px; }
  .hero h1 { font-size: 30px; }
  .hero-art { display: none; }
  .stepper li span { display: none; }
  .howto, .enter-grid, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .p-card { padding: 20px 16px; }
  .demo-bar { left: 12px; right: 12px; justify-content: center; }
}


/* =========================================================
   Eigenes Erscheinungsbild der Verwaltung
   ========================================================= */
.adm { background: var(--bg); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 60; }
.skip:focus { left: 8px; }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 16px; }
.tb-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: none; }
.tb-brand .crest { width: 38px; height: 38px; border-radius: 10px; font-size: 16px; font-weight: 800; }
.tb-brand strong { display: block; font-family: var(--font-head); font-weight: 900; font-size: 17px; line-height: 1.15; letter-spacing: -0.2px; }
.tb-brand small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.tb-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.tb-nav button { border: none; background: transparent; height: 40px; padding: 0 14px; border-radius: 10px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; }
.tb-nav button svg { width: 20px; height: 20px; }
.tb-nav button:hover { background: var(--hover); color: var(--text); }
.tb-nav button[aria-current="page"] { background: var(--tint2); color: var(--primary); }
.tb-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.tb-tools .icon-btn { border-radius: 10px; color: var(--muted); }
.tb-tools .icon-btn:hover { color: var(--text); }
.menu-pop { position: absolute; right: 0; top: 50px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 36px var(--shadow); padding: 6px; min-width: 250px; z-index: 40; }
.menu-pop button, .menu-pop a { text-decoration: none; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; border: none; background: transparent; padding: 0 12px; border-radius: 9px; cursor: pointer; color: var(--text); font-size: 15px; text-align: left; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--hover); }
.adm-main { max-width: 1240px; margin: 0 auto; padding: 0 20px 72px; }
.adm .page-head { padding: 30px 0 14px; align-items: flex-end; }
.adm .page-head h1 { font-family: var(--font-head); font-weight: 900; font-size: 30px; letter-spacing: -0.4px; }
.adm .page-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.adm .content { padding: 4px 0 0; gap: 16px; }

/* Bausteine */
.adm .btn { border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); font-weight: 600; min-height: 42px; padding: 0 16px; }
.adm .btn:hover { background: var(--hover); }
.adm .btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px var(--shadow); }
.adm .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.adm .btn-danger { color: var(--danger); border-color: var(--danger-line); }
.adm .btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.adm .btn[disabled] { background: var(--chip); border-color: var(--line); color: var(--muted); }
.adm .icon-btn { border-radius: 10px; }
.adm .field { background: var(--surface); border: 1px solid var(--line2); border-radius: 10px; padding: 6px 12px; }
.adm .field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint2); }
.adm .field.locked { background: var(--chip); border-style: dashed; }
.adm .form input[type="text"], .adm .form input[type="email"], .adm .form input[type="number"], .adm .form textarea { border: 1px solid var(--line2); border-radius: 10px; background: var(--surface); }
.adm .form input:focus, .adm .form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint2); }
.adm .search { background: var(--surface); border: 1px solid var(--line2); border-radius: 10px; }
.adm .search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint2); }
.adm .card { border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 1px 3px var(--shadow); padding: 18px 20px; max-width: none; }
.adm .card-head h3 { font-family: var(--font-head); font-weight: 800; font-size: 19px; }
.adm .section-head { border-bottom: none; padding-bottom: 0; }
.adm .note { border-radius: 12px; }
.adm .pill { border: none; padding: 3px 10px 3px 8px; font-weight: 600; }
.adm .pill::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 4px; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.adm .chip { border-radius: 9px; min-height: 34px; padding: 0 12px; }
.adm .chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }
.adm .switch { width: 46px; height: 28px; border-radius: 14px; }
.adm .switch span { width: 22px; height: 22px; border-radius: 11px; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.adm .bar { height: 10px; border-radius: 5px; }
.adm .steps li { border-radius: 12px; }
.adm .subtabs button, .adm .tpl { border-radius: 12px; }
.adm .seg { border-radius: 10px; }
.adm .seg button { border-radius: 8px; }
.adm .copy-field input, .adm .copy-field textarea, .adm .news-code { border-radius: 10px; }

/* Dialog */
.adm .dialog { background: var(--surface); border-radius: 18px; }
.adm .dialog-head { margin: 0; padding: 18px 20px 4px; border-bottom: none; }
.adm .dialog-head h2 { font-family: var(--font-head); font-weight: 800; font-size: 21px; }
.adm .dialog-head .icon-btn { background: transparent; }
.adm .dialog-head .icon-btn:hover { background: var(--hover); }
.adm .dialog-body { padding: 10px 20px 4px; }
.adm .dialog-foot { margin: 18px 0 0; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 18px 18px; }
.adm blockquote { margin: 0; padding: 12px 14px; border-left: 4px solid var(--primary); background: var(--tint2); border-radius: 0 10px 10px 0; }
.photo { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.photo img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.photo figcaption { font-size: 13px; color: var(--muted); }
.photo.none { align-self: start; padding: 18px; border-radius: 12px; background: var(--chip); border: 1px dashed var(--line2); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }

/* Tabelle */
.adm .table-wrap { border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 1px 3px var(--shadow); }
.adm th { background: var(--surface); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); }
.adm td { padding: 12px; }
.adm tbody tr:hover { background: var(--hover); }
.adm .c-nr { font-weight: 600; font-variant-numeric: tabular-nums; }
.adm td.num { font-variant-numeric: tabular-nums; }

/* Ablauf und Aufgaben */
.process { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 18px; }
.process summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
.process summary::-webkit-details-marker { display: none; }
.process summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.process[open] summary::before { transform: rotate(90deg); }
.process .steps { padding-bottom: 16px; }
.todos { display: flex; flex-wrap: wrap; gap: 8px; }
.todo { border: 1px solid var(--line2); background: var(--surface); color: var(--text); border-radius: 9px; min-height: 34px; padding: 0 12px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; }
.todo:hover { background: var(--hover); }
.todo.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.todo.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.todo.ok { color: var(--success); border-color: var(--success-line); background: var(--success-bg); cursor: default; }

@media (max-width: 900px) {
  .topbar-in { padding: 0 16px; height: 58px; }
  .tb-nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .tb-nav button { flex: 1; flex-direction: column; height: auto; min-height: 52px; padding: 6px 4px; gap: 2px; font-size: 12px; }
  .tb-brand { flex: 1; }
  .tb-brand small { max-width: 160px; }
  .tb-label { display: none; }
  .tb-tools .btn-sm { width: 40px; padding: 0; }
  .adm-main { padding: 0 16px 100px; }
  .adm .page-head { padding-top: 20px; }
  .adm .page-head h1 { font-size: 25px; }
}
@media (max-width: 700px) {
  .adm table { min-width: 0; }
  .adm thead { display: none; }
  .adm tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "nr nr st" "obj obj obj" "name name name" "prev cur use" "act act act"; gap: 4px 10px; padding: 14px 14px; border-top: 1px solid var(--line); }
  .adm tbody tr:first-child { border-top: none; }
  .adm tbody td { border: none; padding: 0; text-align: left !important; white-space: normal; }
  .adm .c-nr { grid-area: nr; } .adm .c-st { grid-area: st; text-align: right !important; } .adm .c-obj { grid-area: obj; color: var(--muted); }
  .adm .c-name { grid-area: name; } .adm .c-prev { grid-area: prev; } .adm .c-cur { grid-area: cur; } .adm .c-use { grid-area: use; } .adm .c-act { grid-area: act; }
  .adm .c-act:empty { display: none; }
  .adm td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .adm .c-act .btn { width: 100%; margin-top: 6px; }
  .adm .tb-brand small { display: none; }
  .adm .page-head { flex-direction: column; align-items: stretch; }
  .adm .page-head > .btn { justify-content: center; }
  .adm .section-head.bare .field { flex: 1 1 100% !important; min-width: 0 !important; }
  .adm .section-head.bare > span[style] { display: none; }
  .adm .section-head.bare > .btn { flex: 1 1 0; justify-content: center; padding-left: 8px; padding-right: 8px; }
}

/* ---------- Startseite: Gemeinde wählen ---------- */
.start-main { max-width: 1120px; }
.start-hero { padding: 40px 0 8px; max-width: 720px; }
.start-hero h1 { font-family: var(--font-head); font-weight: 900; font-size: 34px; letter-spacing: -0.5px; margin: 0 0 10px; }
.start-hero p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.g-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.adm .g-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-top: 5px solid var(--primary); }
.g-head { display: flex; align-items: center; gap: 14px; }
.g-head .crest { width: 52px; height: 52px; border-radius: 12px; background: var(--tint2); padding: 4px; box-sizing: border-box; }
.g-head h2 { font-family: var(--font-head); font-weight: 800; font-size: 20px; margin: 0; }
.g-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.g-status { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.g-progress { display: flex; flex-direction: column; gap: 6px; min-height: 58px; font-size: 14px; color: var(--muted); }
.g-row { display: flex; justify-content: space-between; gap: 8px; }
.g-todo { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 2px 8px; }
.g-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.g-actions .btn { flex: 1 1 140px; }
.g-link { margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.g-link code { font-size: 12px; }
.start-note { margin: 28px 0 0; font-size: 14px; color: var(--muted); max-width: 720px; }
@media (max-width: 700px) { .start-hero { padding-top: 24px; } .start-hero h1 { font-size: 27px; } }

/* ---------- Fortschritt, Assistent, Periodenwahl ---------- */
:root { --st-done: #2E7D32; --st-ok: #3B82C4; --st-warn: #E0A100; --st-open: #DDE3E6; }
:root[data-theme="dark"] { --st-done: #6FBF73; --st-ok: #6AA8E0; --st-warn: #E8B931; --st-open: #3A4447; }
.adm { --st-done: var(--primary); }
.stack { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--st-open); }
.stack span { display: block; min-width: 4px; }
.stack-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.kv3 .span2 { grid-column: span 2; }
.adm .stats { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px 28px; align-items: center; }
.stats-main { display: flex; align-items: center; gap: 16px; }
.donut { flex: none; }
.donut-num { font-family: var(--font-head); font-weight: 900; font-size: 22px; fill: var(--text); }
.donut-lbl { font-size: 11px; fill: var(--muted); }
.stats-big { display: flex; flex-direction: column; gap: 2px; }
.stats-big strong { font-family: var(--font-head); font-weight: 900; font-size: 26px; line-height: 1.1; }
.stats-big span { color: var(--muted); }
.stats-big small { margin-top: 6px; font-size: 13px; color: var(--text); background: var(--chip); border-radius: 8px; padding: 3px 8px; align-self: flex-start; }
.stats-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.leg { display: grid; grid-template-columns: 12px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 12px; cursor: pointer; color: var(--text); }
.leg:hover { background: var(--hover); }
.leg[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.leg i { width: 12px; height: 12px; border-radius: 4px; grid-row: span 2; }
.leg strong { font-family: var(--font-head); font-size: 20px; font-weight: 900; line-height: 1.1; }
.leg span { font-size: 13px; color: var(--muted); }
.stats-src { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.src-row { display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 10px; }
.src-row strong { text-align: right; }
.src-bar { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.src-bar span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pb-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pb-info small { width: 100%; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.pb-info strong { font-family: var(--font-head); font-size: 20px; font-weight: 800; }
.other-period { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.wiz-steps { list-style: none; margin: 0 0 4px; padding: 0; display: flex; gap: 6px; }
.wiz-steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--chip); color: var(--muted); font-size: 14px; font-weight: 600; min-width: 0; }
.wiz-steps li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-steps b { width: 24px; height: 24px; flex: none; border-radius: 12px; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.wiz-steps li[aria-current="step"] { background: var(--tint2); color: var(--primary); }
.wiz-steps li[aria-current="step"] b { background: var(--primary); color: var(--on-primary); }
.wiz-steps li.done b { background: var(--primary); color: var(--on-primary); }
.range-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.range-arrow { font-size: 22px; color: var(--muted); padding-bottom: 12px; }
.wiz .dialog-body { min-height: 300px; }
.wiz-form { grid-template-columns: 200px minmax(0, 1fr); }
.summary { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 15px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
@media (max-width: 900px) { .adm .stats { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .wiz-steps li span { display: none; } .wiz-steps li[aria-current="step"] span { display: inline; }
  .wiz-form, .summary { grid-template-columns: minmax(0, 1fr); }
  .kv3 .span2 { grid-column: auto; }
  .stats-main { flex-wrap: wrap; }
}

/* ---------- Server-Version: Anmeldung, Speicherstatus, Einrichtung, Gemeinden ---------- */
.wz-narrow { max-width: 480px; margin: 32px auto 0; }
.wz-sync { position: fixed; right: 16px; bottom: 16px; z-index: 60; max-width: min(440px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 12px; font-size: 14px; background: var(--surface); color: var(--text); border: 1px solid var(--line2); box-shadow: 0 4px 16px var(--shadow); }
.wz-sync[hidden] { display: none; }
.wz-sync.saved { color: var(--success); border-color: var(--success-line); background: var(--success-bg); }
.wz-sync.error, .wz-sync.conflict, .wz-sync.auth { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }
@media (max-width: 720px) { .wz-sync { bottom: 84px; } }
.adm .form input[type="password"], .adm .form select { min-height: 46px; border: 1px solid var(--line2); border-radius: 10px; background: var(--surface); color: var(--text); padding: 0 14px; width: 100%; font-size: 15px; outline: none; }
.adm .form input[type="password"]:focus, .adm .form select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint2); }
.adm td input[type="text"], .adm td input:not([type]), .adm td input[type="file"] { min-height: 36px; border: 1px solid var(--line2); border-radius: 8px; background: var(--surface); color: var(--text); padding: 0 10px; font-size: 14px; }
.adm td input[type="file"] { padding: 4px; }

/* ---------- Gemeindeauswahl im Bürgerportal ---------- */
.gc-card .p-field input { font-size: 18px; }
.gc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gc-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; flex-wrap: wrap; }
a.gc-row:hover { border-color: var(--primary); background: var(--tint2, var(--tint)); }
.gc-row .crest { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; flex: none; }
.gc-text { display: flex; flex-direction: column; flex: 1 1 180px; min-width: 0; }
.gc-text strong { font-size: 18px; }
.gc-text small { color: var(--muted); }
.gc-state { font-size: 15px; font-weight: 600; color: var(--muted); }
.gc-state.on { color: var(--success, #17643A); }
.gc-go { font-size: 28px; line-height: 1; color: var(--primary); }
.gc-row.off { background: transparent; border-style: dashed; }
.gc-more, .gc-empty { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- Gemeinde anlegen ---------- */
.logo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-pick .crest { width: 56px; height: 56px; border-radius: 6px; object-fit: contain; background: var(--chip, var(--hover)); padding: 4px; box-sizing: border-box; }
.logo-pick .crest.empty { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); border: 1px dashed var(--line2); background: transparent; }
.logo-pick .hint { flex-basis: 100%; }
.logo-pick label.btn { cursor: pointer; }
.t-link { word-break: break-all; }

/* ---------- Ablesekarte (immer helle Druckfarben) ---------- */
.card-preview { margin-top: 14px; padding: 14px; background: #E9EEF0; border-radius: 10px; overflow-x: auto; }
.card-dialog .field select { width: 100%; border: none; background: transparent; font: inherit; color: var(--text); padding: 2px 0; }
.rcard { --rc: #13687C; width: 100%; max-width: 720px; margin: 0 auto; box-sizing: border-box; background: #FFFFFF; color: #1B2427; border: 1px solid #C9D2D6; border-radius: 6px; padding: 22px 24px 16px; font: 15px/1.4 'Source Sans 3', system-ui, sans-serif; display: flex; flex-direction: column; gap: 14px; }
.rcard * { color: inherit; }
.rc-head { display: flex; align-items: center; gap: 12px; border-bottom: 3px solid var(--rc); padding-bottom: 12px; flex-wrap: wrap; }
.rc-head img { width: 52px; height: 52px; object-fit: contain; }
.rc-head > div { display: flex; flex-direction: column; flex: 1 1 200px; }
.rc-head strong { font-size: 19px; }
.rc-head small { color: #4A5A60; }
.rc-head .rc-title { text-align: right; flex: 0 1 auto; }
.rc-title b { font-size: 20px; color: var(--rc); }
.rc-to { display: flex; flex-direction: column; }
.rc-to small { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; color: #4A5A60; }
.rc-to strong { font-size: 18px; }
.rc-data { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.rc-data > div { border: 1px solid #DCE3E6; border-radius: 4px; padding: 6px 10px; }
.rc-data dt { font-size: 12px; color: #4A5A60; }
.rc-data dd { margin: 0; font-weight: 700; font-size: 16px; }
.rc-data .rc-due { border-color: var(--rc); }
.rc-cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.rc-cols section { border: 1px solid #DCE3E6; border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rc-cols h4 { margin: 0; font-size: 16px; color: var(--rc); }
.rc-cols p { margin: 0; font-size: 13px; color: #4A5A60; }
.rc-lbl { font-size: 12px; color: #4A5A60; }
.rc-boxes { display: flex; align-items: flex-end; gap: 4px; }
.rc-boxes i { width: 30px; height: 40px; border: 1.5px solid #1B2427; border-radius: 3px; background: #FFFFFF; }
.rc-boxes em { font-style: normal; margin-left: 6px; font-weight: 700; }
.rc-lines { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; margin-top: 14px; }
.rc-lines span { border-top: 1px solid #1B2427; padding-top: 2px; font-size: 12px; color: #4A5A60; }
.rc-online { align-items: center; text-align: center; }
.rc-qr { width: 150px; height: 150px; background: #FFFFFF; }
.rc-qr svg { width: 100%; height: 100%; display: block; }
.rc-qr svg rect[fill="white"], .rc-qr svg path { shape-rendering: crispEdges; }
.rc-online code { font-size: 10.5px; word-break: break-all; color: #4A5A60; background: none; }
.rc-foot { border-top: 1px solid #DCE3E6; padding-top: 8px; font-size: 12px; color: #4A5A60; }
@media (max-width: 640px) { .rc-cols { grid-template-columns: 1fr; } .rc-head .rc-title { text-align: left; } .rc-boxes i { width: 24px; height: 34px; } }
@media screen { .print-sheet { display: none; } }
@media print {
  @page { size: A4; margin: 12mm; }
  body.printing > *:not(.print-sheet) { display: none !important; }
  body.printing { background: #FFFFFF !important; }
  .print-sheet .rcard { border: none; max-width: none; padding: 0; break-after: page; page-break-after: always; }
  .print-sheet .rcard:last-child { break-after: auto; page-break-after: auto; }
  .print-sheet .rc-cols { grid-template-columns: 1.35fr 1fr; }
}

/* ---------- Einfacher und responsiv (Überarbeitung) ---------- */
.linkish { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 4px 0; color: var(--link, var(--primary)); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish svg { width: 16px; height: 16px; }
.pb-gap { flex: 1; }
.pb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.more-code { border-top: 1px solid var(--line); padding-top: 10px; }
.more-code summary { cursor: pointer; font-weight: 600; color: var(--link, var(--primary)); padding: 6px 0; }
.more-code[open] summary { margin-bottom: 8px; }
.menu-pop .m-only { display: none; }
@media (max-width: 700px) {
  .menu-pop .m-only { display: flex; }
  .adm .tb-tools .d-only { display: none; }
  .pb-gap { display: none; }
  .pb-info { width: 100%; }
  .pb-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .pb-actions .btn { justify-content: center; width: 100%; min-height: 44px; }
  .adm .dialog-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .adm .dialog-foot > span { display: none; }
  .adm .dialog-foot .btn { width: 100%; justify-content: center; margin: 0; }
  .adm .dialog-foot .btn-primary, .adm .dialog-foot .btn-danger { grid-column: 1 / -1; order: -1; }
  .adm .dialog-foot .btn:only-child { grid-column: 1 / -1; }
  .wiz-steps li[aria-current="step"] { flex: 4; }
}

/* Farbauswahl in Einrichtung und „Gemeinden & Benutzer“ */
.wz-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wz-colors .swatch { width: 44px; height: 44px; border-radius: 22px; border: 2px solid transparent; background: none; padding: 3px; cursor: pointer; }
.wz-colors .swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; }
.wz-colors .swatch[aria-pressed="true"] { border-color: var(--text); }
.wz-color-other { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--muted); }
.wz-color-other input { width: 44px; height: 44px; border: none; background: none; padding: 0; cursor: pointer; }
.wz-color-other input[data-on] { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 6px; }
