/* Prolivia Console – Farben aus prolivia-app/lib/core/theme/app_colors.dart.
   Text immer ink. Gelb sparsam, Blau für Interface und Diagramme,
   Rot nur für den echten Notruf. Schrift Inter (400/600), selbst gehostet. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-semibold.woff2") format("woff2"); }

:root {
  --ink: #27293b; --gelb: #fbb900; --gelb3: #ffe3aa; --gelb4: #fff1d6;
  --sand: #d9ccb0; --sand1: #e1d7bf; --sand2: #e8e0ce; --sand3: #f0eade; --sand4: #f8f4ee;
  --blau: #3d4c71; --blau1: #5770a9; --blau2: #8b9cc5; --blau3: #c4cde3; --blau4: #dee4f2;
  --red: #d92d20; --ocker: #ca8504; --green: #079455;
  --muted: #5b5d6e; --line: #d9ccb0;
  --r: 16px; --r-lg: 24px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: "Inter", system-ui, sans-serif; color: var(--ink); background: var(--sand2); line-height: 1.45; font-variant-numeric: tabular-nums; }
h1, h2, h3, strong { font-weight: 600; }
h1 { font-size: 1.75rem; margin: 0; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
p { margin: 0 0 .5rem; }
a { color: var(--blau); }
code { font-size: .875rem; }
.muted { color: var(--muted); font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--blau1); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }

/* Grundaufbau: feste Leiste links, Inhalt rechts */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--sand4); border-right: 1px solid var(--line); padding: 0 14px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
/* Gleiche Höhe wie die Kopfzeile (73 px), damit Logo und Texte oben in einer Flucht stehen. */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); height: 73px; padding: 0 10px; margin-bottom: 12px; }
.brand img { height: 46px; width: auto; }
.brand span { font-size: .875rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.nav-group { margin-bottom: 14px; }
.nav-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 10px 4px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.sidebar a:hover { background: var(--sand3); }
.sidebar a[aria-current="page"] { background: var(--gelb3); font-weight: 600; box-shadow: inset 4px 0 0 var(--gelb); }
.sidebar .dot { margin-left: auto; font-size: .6875rem; color: var(--blau); background: var(--blau4); border-radius: 999px; padding: 1px 7px; font-weight: 400; }

.column { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 32px; background: var(--sand4); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.demo-flag { margin: 0 0 0 auto; display: flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--blau); background: var(--blau4); padding: 6px 12px; border-radius: 999px; }
details { position: relative; }
summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 10px; border-radius: 14px; }
summary::-webkit-details-marker { display: none; }
summary:hover { background: var(--sand3); }
.usermenu { margin-left: 0; }
.demo-flag + .usermenu, .picker + .usermenu { margin-left: auto; }
.demo-flag + .usermenu { margin-left: 0; }
.picker-text { display: flex; flex-direction: column; line-height: 1.2; }
.picker-text small { color: var(--muted); font-size: .8125rem; }
.picker-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--sand3); }
.menu { position: absolute; top: calc(100% + 6px); min-width: 340px; background: var(--sand4); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; list-style: none; margin: 0; z-index: 6; }
.usermenu .menu { right: 0; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--sand3); }
.menu a[aria-current="true"] { background: var(--gelb4); }
.menu-title { font-size: .8125rem; color: var(--muted); margin: 6px 10px; display: flex; gap: 8px; align-items: center; }
.menu-actions { border-top: 1px solid var(--line); margin-top: 6px !important; padding-top: 6px !important; }

main { padding: 24px 32px 40px; max-width: 1560px; width: 100%; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 8px; font-size: .875rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }
.page-title { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.footer { margin-top: auto; padding: 16px 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8125rem; color: var(--muted); border-top: 1px solid var(--line); }

/* Abzeichen und Zustände: immer Icon, Wort und Farbe */
.badge { display: inline-block; font-size: .8125rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge.demo { background: var(--blau4); color: var(--blau); }
.badge.preview { background: var(--gelb3); color: var(--ink); }
.badge-note { font-size: .8125rem; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.status .icon { width: 18px; height: 18px; }
.s-ok .icon, .status.s-ok { color: var(--green); }
.status.s-ok span { color: var(--ink); }
.status.s-hint { color: var(--blau); }
.status.s-alarm { color: var(--red); }
.status.s-setup { color: var(--muted); }
.status.s-offline { color: var(--red); }
.status.s-low { color: var(--ocker); }
.status span { color: var(--ink); }

/* Kopf jeder Seite: Antwort in einem Satz, Kennzahlen */
.answer { display: flex; gap: 14px; align-items: flex-start; background: var(--sand4); border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 16px; border-left: 6px solid var(--blau2); }
.answer p { font-size: 1rem; margin: 0; max-width: 75ch; }
.answer-icon .icon { width: 22px; height: 22px; color: var(--blau); }
.answer.s-ok { border-left-color: var(--green); } .answer.s-ok .icon { color: var(--green); }
.answer.s-alarm { border-left-color: var(--red); background: #fdeceb; } .answer.s-alarm .icon { color: var(--red); }
.answer.s-setup { border-left-color: var(--sand); }
.kpis { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kpis.inline { margin: 0; }
.kpi { background: var(--sand4); border-radius: var(--r); padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: .875rem; color: var(--muted); }
.kpi-value { font-size: 1.75rem; font-weight: 600; line-height: 1.2; }
.kpi-note { font-size: .8125rem; color: var(--muted); }
.kpi.s-alarm { box-shadow: inset 0 -4px 0 var(--red); }
.kpi.s-hint { box-shadow: inset 0 -4px 0 var(--blau2); }

/* Karten, Raster */
.card { background: var(--sand4); border-radius: var(--r); padding: 20px 22px; margin-bottom: 16px; }
.card-head, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .section-head h2 { margin: 0; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.cards .card { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 > .card, .grid-3 > .card, .stack > .card { margin-bottom: 0; }
.grid-2, .grid-3 { margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--sand1); }
.avatar.initials { display: grid; place-items: center; font-weight: 600; font-size: .875rem; background: var(--blau4); color: var(--blau); }
.avatar.empty { display: grid; place-items: center; color: var(--muted); }

/* Cockpit */
.site-card { padding: 0; border: 2px solid transparent; }
.site-card.s-alarm { border-color: var(--red); }
.card-link { display: block; padding: 18px 20px; color: inherit; text-decoration: none; border-radius: var(--r); height: 100%; }
.card-link:hover { background: var(--sand3); }
.site-top { display: flex; gap: 12px; align-items: flex-start; }
.site-top .avatar { width: 56px; height: 56px; }
.site-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.site-presence { margin: 14px 0 2px; font-weight: 600; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.site-note { color: var(--muted); font-size: .9375rem; min-height: 1.4em; }
.site-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: .8125rem; background: var(--blau4); color: var(--blau); padding: 2px 10px; border-radius: 999px; }

/* Live */
.alarm { display: flex; gap: 16px; align-items: center; background: #fdeceb; border: 2px solid var(--red); border-radius: var(--r-lg); padding: 16px 22px; margin-bottom: 16px; }
.alarm-icon .icon { width: 32px; height: 32px; color: var(--red); }
.alarm div { flex: 1; }
.live-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.rooms { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.room { background: var(--sand4); border-radius: var(--r); padding: 14px 16px; border: 2px solid transparent; }
.room.here { border-color: var(--gelb); background: var(--gelb4); }
.room-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; min-height: 40px; }
.room-head h3 { margin: 0; }
.here-flag { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; }
.here-flag .avatar { width: 32px; height: 32px; box-shadow: 0 0 0 3px var(--gelb); }
.devices { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.device { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--sand3); }
.device > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.device span { font-size: .8125rem; color: var(--muted); }
.device.active { background: var(--gelb3); }
.device.active > .icon { color: var(--ink); }
.device.alarm-dev { background: #fdeceb; box-shadow: inset 0 0 0 2px var(--red); }
.device.h-offline { box-shadow: inset 0 0 0 2px var(--red); }
.room-links { margin: 8px 0 0; font-size: .8125rem; color: var(--muted); }
.battery { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; white-space: nowrap; }
.battery.low { color: var(--ocker); font-weight: 600; }
.ticker ol { list-style: none; padding: 0; margin: 0; }
.ticker li { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--sand1); }
.ticker li > div { display: flex; flex-direction: column; }
.ticker li span { font-size: .8125rem; color: var(--muted); }
.ticker time { font-weight: 600; min-width: 44px; }
@media (prefers-reduced-motion: no-preference) {
  .device.active { animation: glow 2.4s ease-out 1; }
  @keyframes glow { from { box-shadow: 0 0 0 4px var(--gelb); } to { box-shadow: 0 0 0 0 transparent; } }
}

/* Zeitleiste und Diagramme (SVG, keine Inline-Styles) */
.timeline { display: flex; flex-direction: column; gap: 6px; }
.tl-row { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 12px; }
.tl-label { font-size: .875rem; color: var(--muted); text-align: right; }
.track { width: 100%; height: 28px; display: block; }
.lane { fill: var(--sand3); }
.bar { fill: var(--blau1); }
.bar.away { fill: var(--sand); }
.bar.bathroom { fill: var(--blau2); }
.bar.stove { fill: var(--gelb); }
.now { fill: var(--ink); }
.ticks { width: 100%; height: 18px; display: block; overflow: visible; font-size: 12px; fill: var(--muted); }
.ticks text { text-anchor: middle; }
.chart { width: 100%; height: 180px; display: block; }
.chart .day, .chart .actual { fill: var(--blau1); }
.chart .today { fill: var(--gelb); }
.chart .plan { fill: var(--blau4); stroke: var(--blau2); stroke-width: 1.5; stroke-dasharray: 4 3; }
.legend { font-size: .8125rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-left: 8px; }
.key.actual { background: var(--blau1); }
.key.plan { background: var(--blau4); border: 1.5px dashed var(--blau2); }
.meters { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.meters li { display: grid; grid-template-columns: 170px 1fr 90px; gap: 12px; align-items: center; }
.meters strong { text-align: right; font-size: .875rem; }
.meter { width: 100%; height: 12px; display: block; }
.meter .track { fill: var(--sand1); height: auto; }
.meter .fill { fill: var(--blau1); }

/* Listen, Tabellen, Fakten */
.entries { list-style: none; padding: 0; margin: 0; }
.entries li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sand1); }
.entries li:first-child { border-top: 0; }
.entries li > div { flex: 1; display: flex; flex-direction: column; }
.entries li span { color: var(--muted); font-size: .875rem; }
.entries time { font-size: .875rem; white-space: nowrap; }
.empty { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--sand1); vertical-align: middle; }
thead th { position: sticky; top: 72px; background: var(--sand4); font-size: .8125rem; color: var(--muted); font-weight: 600; }
.num { text-align: right; }
tbody tr:hover { background: var(--sand3); }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--sand1); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--muted); font-size: .9375rem; }
.facts dd { margin: 0; }
.facts small { display: block; color: var(--muted); font-size: .8125rem; }
.person-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.person-head .avatar { width: 64px; height: 64px; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell > div { display: flex; flex-direction: column; }
.dev-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--sand3); }
.notes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.notes li { display: flex; gap: 8px; align-items: flex-start; }
.note { display: flex; gap: 8px; align-items: flex-start; background: var(--blau4); border-radius: 12px; padding: 10px 12px; margin-top: 12px; font-size: .9375rem; }

/* Knöpfe: ein Hauptknopf je Seite (gelb), sonst ruhig */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--sand); background: var(--sand4); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--sand3); }
.btn.primary { background: var(--gelb); border-color: var(--gelb); }
.btn.primary:hover { background: var(--gelb1, #fdc742); }
.actions { margin-top: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; padding: 4px 12px; border-radius: 999px; background: var(--sand1); }
.toggle.on { background: var(--blau4); color: var(--blau); font-weight: 600; }
select { font: inherit; min-height: 44px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--sand); background: var(--sand4); color: var(--ink); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; font-size: .8125rem; color: var(--muted); gap: 4px; }

/* Seiten im Einzelnen */
.contacts, .steps, .checklist, .funnel, .requests { list-style: none; padding: 0; margin: 0; }
.contact { display: grid; grid-template-columns: 32px 48px 1.2fr 1.4fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--sand1); }
.contact:first-child { border-top: 0; }
.contact > div { display: flex; flex-direction: column; gap: 4px; }
.contact span { color: var(--muted); font-size: .875rem; }
.contact.inactive { opacity: .75; }
.contact .avatar { width: 48px; height: 48px; }
.rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 600; }
.steps li { display: flex; flex-direction: column; padding: 10px 0 10px 18px; border-left: 3px solid var(--blau2); margin-left: 6px; }
.steps span { color: var(--muted); font-size: .9375rem; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--sand1); }
.checklist li > div { flex: 1; display: flex; flex-direction: column; }
.checklist li span { color: var(--muted); font-size: .875rem; }
.checklist li.done > .icon { color: var(--green); }
.checklist li:not(.done) > .icon { color: var(--muted); }
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.funnel li { background: var(--blau4); border-radius: var(--r); padding: 14px 18px; display: flex; flex-direction: column; }
.funnel li + li { background: var(--sand3); }
.request { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--sand1); }
.request:first-child { border-top: 0; }
.request > div:first-child { display: flex; flex-direction: column; }
.request p { margin: 6px 0 0; }
.consent .card.missing { border: 2px dashed var(--sand); }
.modules { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1280px) { .modules { grid-template-columns: repeat(2, 1fr); } }
.module { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--sand1); }
.module p { color: var(--muted); font-size: .9375rem; flex: 1; }
.module.m-active, .module.m-included { border: 2px solid var(--blau2); }
.module.m-pilot { border: 2px dashed var(--gelb); }
.module-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blau4); color: var(--blau); }
.module.m-preview .module-icon, .module.m-pilot .module-icon { background: var(--gelb4); color: var(--ink); }
.module-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.locked { display: flex; gap: 16px; align-items: center; }
.locked > .icon { width: 36px; height: 36px; color: var(--muted); }
.locked div { flex: 1; }

/* Breiten: Ziel 1280–1920 px, unter 1024 px Leiste als Kopfzeile (iPad) */
@media (min-width: 1600px) { .rooms { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1280px) { .live-grid { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { display: flex; gap: 16px; overflow-x: auto; }
  .nav-group { min-width: 200px; }
  .grid-2, .grid-3, .funnel { grid-template-columns: 1fr; }
  .topbar, main, .footer { padding-left: 16px; padding-right: 16px; }
  .contact { grid-template-columns: 32px 48px 1fr; }
  .request { grid-template-columns: 1fr; }
  thead th { top: 0; }
}
.rule-name { display: flex; align-items: center; gap: 10px; }
.trends { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.trend { display: flex; gap: 14px; align-items: center; background: var(--sand4); border-radius: var(--r); padding: 14px 18px; }
.trend > div { display: flex; flex-direction: column; }
.trend strong { font-size: 1.25rem; }
.trend-arrow { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--blau4); color: var(--blau); }
.trend-arrow .icon { width: 26px; height: 26px; transition: none; }
.t-down .trend-arrow .icon { transform: scaleY(-1); }
.t-down .trend-arrow { background: var(--gelb4); color: var(--ocker); }
.t-flat .trend-arrow { background: var(--sand3); color: var(--muted); }
tr.flagged { background: var(--gelb4); }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.flag .icon { width: 16px; height: 16px; }
@media (max-width: 1024px) { .trends { grid-template-columns: 1fr; } }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 600; margin-left: auto; }
.sidebar .count + .dot { margin-left: 6px; }
.todo { display: flex; align-items: center; gap: 14px; background: var(--sand4); border-radius: var(--r); padding: 14px 18px; margin-bottom: 16px; color: var(--ink); text-decoration: none; }
.todo > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.todo .count { margin: 0; width: 32px; height: 32px; font-size: 1rem; }
.todo:hover { background: var(--sand3); }
.housing { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .875rem; color: var(--muted); margin-top: 4px; }
.chip-housing { font-size: .75rem; font-weight: 600; color: var(--ink); background: var(--sand1); border-radius: 999px; padding: 1px 8px; }
.block { display: block; }
.filterbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.filter-title { font-size: .8125rem; color: var(--muted); margin: 0 0 4px; }
.seg { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.seg a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--sand3); color: var(--ink); text-decoration: none; font-size: .9375rem; }
.seg a:hover { background: var(--sand1); }
.seg a[aria-current="true"] { background: var(--ink); color: #fff; }
.seg .icon { width: 16px; height: 16px; }
.seg-count { font-size: .75rem; font-weight: 600; opacity: .8; }
.module.m-highlight { border: 2px solid var(--ocker); }
.module.m-highlight .module-icon { background: var(--gelb4); color: var(--ocker); }
.room-head .icon-btn { margin-left: auto; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--sand3); color: var(--ink); }
.here-flag + .icon-btn { margin-left: 0; }
.kpi-sub { margin: 4px 0 0; display: flex; flex-direction: column; gap: 2px; }
.kpi-sub div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kpi-sub dt { font-size: .875rem; color: var(--muted); }
.kpi-sub dd { margin: 0; text-align: right; }
.kpi-sub strong { font-size: 1.125rem; }
.kpi-sub small { font-size: .75rem; color: var(--muted); }
.kpi-sub div:last-child:not(:first-child) strong { font-size: 1.25rem; }
.chart.tall { height: 240px; }
.chart .recurring, .key.recurring { fill: var(--blau1); background: var(--blau1); }
.chart .once, .key.once { fill: #bfae88; background: #bfae88; }
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login { width: 100%; max-width: 400px; background: var(--sand4); border-radius: var(--r-lg); padding: 36px 32px; display: flex; flex-direction: column; gap: 6px; }
.login img { height: 52px; width: auto; align-self: flex-start; margin-bottom: 8px; }
.login form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.login label { font-weight: 600; font-size: .9375rem; }
.login input[type="password"] { font: inherit; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--sand); background: #fff; color: var(--ink); }
.login .btn { justify-content: center; min-height: 48px; margin-top: 6px; }
.login-error { display: flex; gap: 8px; align-items: center; color: var(--ink); background: var(--gelb4); border-radius: 12px; padding: 10px 12px; margin: 0; }
.sidebar a.brand, .sidebar a.brand:hover, .sidebar a.brand:active { background: none; box-shadow: none; }
.answer-row { display: grid; gap: 16px; margin-bottom: 16px; }
.answer-row.two { grid-template-columns: 1fr 1fr; }
.answer-row .answer { margin: 0; }
.todo-card { border-left-color: var(--blau1); color: var(--ink); text-decoration: none; align-items: center; }
.todo-card .answer-icon .icon { color: var(--blau1); }
.todo-card p { flex: 1; }
.todo-card:hover { background: var(--sand3); }
@media (max-width: 1024px) { .answer-row.two { grid-template-columns: 1fr; } }
