/* ============================================================
   Übergabeprotokolle — Tailwind Modern (DESIGN.md)
   Neutral, restrained SaaS. White surfaces, #0a0a0a foreground,
   1px #e5e5e5 borders, violet #7c3aed as the only accent.
   Kein backdrop-filter, kein Blur, keine Orbs — garantiert scharf.
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-muted: #f5f5f5;
  --fg: #0a0a0a;
  --fg-muted: #525252;
  --fg-dim: #737373;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --accent: #7c3aed;
  --accent-soft: #f5f3ff;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius-sm: 6px;   /* Buttons + Inputs */
  --radius: 8px;      /* Cards */
  --radius-lg: 12px;  /* Modals */
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--fg);
  background: var(--bg-subtle);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

/* ---------- Screens & Layout ---------- */
.screen { position: relative; min-height: 100vh; }

.view {
  padding: 32px 24px 64px;
  max-width: 1280px;
  margin: 0 auto;
}

.view-head { margin-bottom: 24px; }
.view-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 4px;
}
.view-head p { color: var(--fg-muted); font-size: 0.92rem; }

.muted { color: var(--fg-muted); }
.muted.small { font-size: 0.82rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.unit-top { margin-bottom: 16px; }

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.back-btn { font-weight: 600; }

/* ---------- Login ---------- */
#screen-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-wrap {
  width: min(420px, 100%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px 28px;
}

/* ---------- Login / Passwort-Vergessen ---------- */
.login-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.btn-link { background: none; border: none; padding: 4px 6px; color: var(--accent); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { opacity: 0.8; }
.forgot-desc { font-size: 13px; color: var(--fg-muted); margin-bottom: 16px; line-height: 1.45; }
.forgot-footer { margin-top: 14px; text-align: center; }
.forgot-success-box {
  margin-top: 16px; padding: 14px 16px; border-radius: 10px;
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
  font-size: 13px; line-height: 1.5;
}
.forgot-success-box b { font-weight: 700; color: #14532d; }
.temp-pw-display {
  display: inline-block; margin: 8px 0; padding: 6px 12px;
  background: #ffffff; border: 1px dashed #15803d; border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px; font-weight: 700; color: #15803d; letter-spacing: 0.5px;
}
.user-pill-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; border-radius: 999px;
  transition: opacity 150ms;
}
.user-pill-btn:hover { opacity: 0.85; }


.brand { text-align: center; margin-bottom: 28px; }
.brand h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.brand p { color: var(--fg-muted); margin-top: 6px; font-size: 0.92rem; font-weight: 500; }

.logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  font-size: 1.4rem;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius);
}
.logo.small { width: 32px; height: 32px; font-size: 1rem; border-radius: var(--radius-sm); margin: 0; }

/* ---------- Formulare ---------- */
form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin: 16px 0 6px;
}

input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--fg-dim); }

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 1px var(--accent);
}
textarea { resize: vertical; min-height: 60px; }

/* ---------- Buttons ---------- */
.btn-primary, .btn-primary-strong, .btn-ghost, .btn-danger {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

/* Primary = schwarz (DESIGN.md) */
.btn-primary { background: var(--fg); color: #fff; }
.btn-primary:hover { background: #1a1a1a; }

/* Starke Primäraktion = das eine Akzent-Element pro Seite */
.btn-primary-strong { background: var(--accent); color: #fff; }
.btn-primary-strong:hover { background: #6d28d9; }

/* Ghost = ohne Rahmen (sekundär), Outline-Variante über .btn-ghost + .outline */
.btn-ghost { background: transparent; color: var(--fg-muted); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--fg); }

.btn-danger { background: var(--bg); color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; border-color: var(--danger); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 0.85rem; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.form-error { color: var(--danger); font-weight: 600; margin-top: 12px; text-align: center; font-size: 0.9rem; }
.hint { margin-top: 20px; font-size: 0.8rem; color: var(--fg-dim); text-align: center; line-height: 1.6; }
.hint b { color: var(--fg-muted); font-weight: 600; }

/* ---------- Topbar / Nav ---------- */
#screen-app { padding-bottom: 48px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar.glass { border-radius: 0; border-left: none; border-right: none; border-top: none; box-shadow: none; }
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; }

.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-btn {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-btn:hover { background: var(--bg-muted); color: var(--fg); }
.nav-btn.active { background: var(--bg-muted); color: var(--fg); font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-pill {
  background: var(--bg-muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--fg-muted);
}
.role-admin { background: #ede9fe; color: #6d28d9; }
.role-team  { background: #eef2ff; color: #4338ca; }
.role-tenant { background: #ecfdf5; color: #047857; }

/* ---------- Karten / Stats ---------- */
.glass {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.glass-strong {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.card { padding: 22px; }
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.01em; color: var(--fg); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px; text-align: center; }
.stat-num { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; color: var(--fg); }
.stat-label { color: var(--fg-dim); font-weight: 500; margin-top: 4px; font-size: 0.88rem; }

/* ---------- Objekt- & Einheiten-Karten ---------- */
.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.prop-card, .unit-card {
  padding: 20px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}
.prop-card:hover, .unit-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.prop-card h3, .unit-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.prop-addr { color: var(--fg-muted); font-size: 0.88rem; font-weight: 500; margin-bottom: 12px; }
.prop-meta { display: flex; gap: 18px; color: var(--fg-dim); font-size: 0.82rem; font-weight: 500; }

.unit-card { position: relative; }
.unit-card .tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 999px;
  color: var(--fg-muted);
}
.tag-row .tag.active { background: #ecfdf5; border-color: #86efac; color: #047857; }
.unit-tenant { margin-top: 10px; color: var(--fg-muted); font-size: 0.85rem; font-weight: 600; }

/* ---------- Listen ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.list-item:hover { background: var(--bg-subtle); border-color: var(--border-strong); }

.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; font-size: 0.95rem; color: var(--fg); }
.list-item .li-sub { color: var(--fg-dim); font-size: 0.8rem; font-weight: 500; margin-top: 2px; }

.li-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--fg-muted);
  white-space: nowrap;
}
.badge-check-in { background: #ecfdf5; color: #047857; }
.badge-interim { background: #fffbeb; color: #b45309; }
.badge-check-out { background: #fef2f2; color: #b91c1c; }

.li-date { color: var(--fg-dim); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }

.cards-list .list-item { cursor: default; }

/* ---------- KV & Chips ---------- */
.kv-list { display: grid; gap: 0; font-size: 0.92rem; }
.kv-list .kv {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}
.kv-list .kv:last-child { border-bottom: none; }
.kv .k { color: var(--fg-dim); font-weight: 500; }
.kv .v { font-weight: 600; text-align: right; color: var(--fg); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--fg-muted);
}
.chip.checkable { cursor: pointer; }
.chip.checkable input { position: absolute; opacity: 0; pointer-events: none; }
.chip.checkable:has(input:checked) {
  background: var(--accent-soft);
  border-color: #c4b5fd;
  color: #6d28d9;
}

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.tbl th {
  color: var(--fg-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  background: var(--bg-subtle);
  position: sticky;
  top: 0;
}
.tbl tbody tr:hover td { background: var(--bg-subtle); }

.badge-active { color: #047857; background: #ecfdf5; border-radius: 999px; padding: 2px 10px; font-size: 0.7rem; font-weight: 700; }
.badge-inactive { color: var(--fg-muted); background: var(--bg-muted); border-radius: 999px; padding: 2px 10px; font-size: 0.7rem; font-weight: 700; }

/* ---------- Nutzerverwaltung ---------- */
.u-name { font-weight: 600; }
.u-name .tag { margin-left: 6px; vertical-align: middle; }
.u-units { color: var(--fg-muted); font-size: 0.85rem; max-width: 240px; }
.u-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }

/* ---------- Zeitlinie ---------- */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--border);
}
.tl-item { position: relative; margin-bottom: 16px; cursor: pointer; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 0 3px var(--bg-subtle);
}
.tl-item.check-in::before { background: var(--ok); }
.tl-item.interim::before { background: var(--warn); }
.tl-item.check-out::before { background: var(--danger); }

.tl-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: background 0.15s, border-color 0.15s;
}
.tl-card:hover { background: var(--bg-subtle); border-color: var(--border-strong); }
.tl-item .tl-title { font-weight: 600; font-size: 0.95rem; color: var(--fg); }
.tl-item .tl-sub { color: var(--fg-dim); font-size: 0.8rem; font-weight: 500; margin-top: 2px; }

/* ---------- Wizard / Editor ---------- */
.wizard { display: flex; flex-direction: column; gap: 16px; }
.wizard .card h3 { display: flex; align-items: center; gap: 10px; }

.step-num {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fg-muted);
}

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

.room-row, .meter-row, .key-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}
.meter-row { grid-template-columns: 130px 1fr 90px 110px 90px; }
.key-row { grid-template-columns: 1fr 90px auto; }
.room-row textarea { min-height: 56px; }

.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.checkin-actions { margin-top: 8px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo-tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-muted);
}
.photo-tile img { display: block; width: 100%; height: 120px; object-fit: cover; }
.photo-tile .ph-cap { padding: 8px 10px; font-size: 0.78rem; font-weight: 600; color: var(--fg-muted); }
.photo-tile .ph-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  cursor: pointer;
}

/* ---------- Protokoll-Druck ---------- */
.proto-print { display: flex; flex-direction: column; gap: 16px; }
.proto-print .pp-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.proto-print .pp-section h4 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  margin-bottom: 12px;
  font-weight: 700;
}
.pp-header { text-align: center; }
.pp-header h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.pp-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.pp-meta .kv { font-size: 0.86rem; padding: 6px 0; }

.sig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sig-box { text-align: center; }
.sig-box .sig-img-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 8px;
  min-height: 110px;
  display: grid;
  place-items: center;
}
.sig-box img { max-width: 100%; height: 96px; }
.sig-box .sig-name { font-weight: 600; font-size: 0.95rem; margin-top: 6px; }
.sig-box .sig-time { color: var(--fg-dim); font-size: 0.72rem; font-weight: 500; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgb(10 10 10 / 0.45);
  padding: 24px;
}
.modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}
.modal h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.modal .sub { color: var(--fg-muted); font-size: 0.85rem; margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ---------- Signatur ---------- */
.sig-canvas-wrap {
  position: relative;
  margin: 16px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
#sig-canvas { display: block; width: 100%; height: 200px; touch-action: none; cursor: crosshair; }
#sig-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 32px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
#sig-clear:hover { background: var(--bg-muted); }
.sig-name-row { margin-top: 4px; }

/* ---------- Suche / Toasts ---------- */
.search-input { max-width: 380px; }
#archive-list { margin-top: 4px; }

#toasts { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ok);
  color: var(--fg);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s ease;
}
.toast.err { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.empty {
  padding: 28px;
  text-align: center;
  color: var(--fg-dim);
  font-weight: 500;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
}
.empty.small { padding: 16px; font-size: 0.85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topnav { order: 3; width: 100%; overflow-x: auto; }
  .topbar-right { margin-left: 0; }
  .view { padding: 20px 16px 48px; }
  .stat-num { font-size: 1.7rem; }
  .sig-row { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .meter-row { grid-template-columns: 1fr 1fr; }
  .room-row, .key-row { grid-template-columns: 1fr; }
  .photo-tile img { height: 150px; }
}
@media (max-width: 520px) {
  .login-wrap { padding: 28px 20px; }
  .brand h1 { font-size: 1.2rem; }
}
/* ---------- Defects ---------- */
.dfr { display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--border);
  border-radius:8px; background:var(--surface); margin-bottom:8px; }
.dfr:last-child { margin-bottom:0; }
.dfr-title { font-weight:600; font-size:14px; color:var(--fg); }
.dfr-meta { font-size:12px; color:var(--muted); display:flex; gap:10px; margin-top:2px; flex-wrap:wrap; }
.dfr-actions { margin-left:auto; display:flex; gap:6px; flex-shrink:0; }
.dfr-photo { width:56px; height:56px; border-radius:8px; object-fit:cover; border:1px solid var(--border); flex-shrink:0; }
.sev { display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; letter-spacing:.02em; }
.sev-low { background:#f0fdf4; color:#166534; border:1px solid #bbf7d0; }
.sev-medium { background:#fffbeb; color:#92400e; border:1px solid #fde68a; }
.sev-high { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }
.st-open { color:#b45309; } .st-in_progress { color:#1d4ed8; } .st-done { color:#15803d; }
.status { display:inline-flex; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; }
.st-open { background:#fffbeb; border:1px solid #fde68a; }
.st-in_progress { background:#eff6ff; border:1px solid #bfdbfe; }
.st-done { background:#f0fdf4; border:1px solid #bbf7d0; }

/* ---------- Compare (check-in vs check-out) ---------- */
.cmp-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:20px; }
@media (max-width:800px){ .cmp-grid { grid-template-columns:1fr; } }
.cmp-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:20px; }
.cmp-card h3 { margin:0 0 12px; font-size:15px; font-weight:700; }
.cmp-row { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--bg2); font-size:14px; }
.cmp-row:last-child { border-bottom:0; }
.cmp-row .k { color:var(--muted); }
.cmp-row .v { font-weight:600; text-align:right; }
.cmp-table { width:100%; border-collapse:collapse; background:var(--surface); border:1px solid var(--border);
  border-radius:8px; overflow:hidden; }
.cmp-table-wrap { border:1px solid var(--border); border-radius:8px; overflow:auto; }
.cmp-table-wrap table { width:100%; border-collapse:collapse; font-size:13px; }
.cmp-table-wrap th, .cmp-table-wrap td { padding:10px 12px; border-bottom:1px solid var(--bg2); text-align:left; vertical-align:top; }
.cmp-table-wrap th { background:var(--bg2); font-weight:600; color:var(--fg); font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.cmp-diff { color:#b45309; font-weight:600; }
.cmp-same { color:var(--muted); }

/* ---------- Settings ---------- */
.set-grid { display:grid; grid-template-columns:minmax(280px,420px) 1fr; gap:24px; align-items:start; }
@media (max-width:900px){ .set-grid { grid-template-columns:1fr; } }
.set-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:20px; }
.set-card h3 { margin:0 0 14px; font-size:15px; font-weight:700; }
.set-preview { border:1px solid var(--border); border-radius:8px; padding:14px; background:var(--bg2); }
.swatches { display:flex; gap:8px; margin-top:8px; }
.swatch { width:28px; height:28px; border-radius:6px; border:2px solid transparent; cursor:pointer; }
.swatch.active, .swatch:hover { border-color:var(--fg); }
.tpl-row { display:flex; align-items:center; gap:8px; padding:6px 0; }
.tpl-row input { flex:1; }
.chip-grid { display:flex; flex-wrap:wrap; gap:8px; }
.chip { padding:8px 14px; border:1px solid var(--border); border-radius:999px; background:var(--surface);
  font-size:13px; cursor:pointer; user-select:none; transition:all 150ms; }
.chip.active { background:var(--fg); color:#fff; border-color:var(--fg); }
.f-row { margin-bottom:14px; }
.f-row label { display:block; font-size:12px; font-weight:600; color:var(--muted); margin-bottom:5px; }
.f-cols { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:600px){ .f-cols { grid-template-columns:1fr; } }

/* Checkliste (Feature #6) */
.cl-item { display:flex; align-items:center; gap:10px; padding:10px 8px; border-bottom:1px solid var(--border); font-size:14px; }
.cl-item input[type=checkbox] { width:18px; height:18px; accent-color: var(--accent); }
.cl-item span { flex:1; }
.cl-item input[type=checkbox]:checked + span { color: var(--muted); text-decoration: line-through; }
#cl-list { display:flex; flex-direction:column; }
/* Vorlagen-Zeilen (Feature #13) */
.tpl-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 8px; border-bottom:1px solid var(--border); font-size:14px; }
.tpl-row:last-child { border-bottom:none; }
#cl-manage, #tpl-manage { margin-top:16px; }

/* ---------- Offline-Banner (Feature #9) ---------- */
.offline-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 18px; z-index: 3000;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  background: #0a0a0a; color: #fff;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.25), 0 4px 6px -4px rgb(0 0 0 / 0.2);
}
.offline-bar.has-pending { background: var(--accent); }
.offline-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fbbf24; animation: offline-pulse 1.6s ease-in-out infinite;
}
.offline-bar.has-pending .offline-dot { background: #fff; }
@keyframes offline-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.offline-badge {
  padding: 3px 10px; border-radius: 999px;
  background: rgb(255 255 255 / 0.18); font-size: 12px; font-weight: 600;
}

/* ============ HKZ (Heizkostenverteiler) ============ */
.hkz-wiz { min-width: min(560px, 92vw); max-height: 78vh; overflow: auto; }
.hkz-qr-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; flex-wrap: wrap; }
#hkz-qr-state.ok { color: #15803d; font-weight: 600; }
#hkz-qr-state.bad, .hkz-warn.bad { color: #b91c1c; }
.hkz-shots-head { margin: 6px 0; }
.hkz-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.hkz-shot { margin: 0; position: relative; }
.hkz-shot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid #e5e5e5; cursor: pointer; }
.ocr-chip { font-size: 11px; line-height: 1.3; margin-top: 4px; padding: 3px 6px; border-radius: 6px; }
.ocr-chip.hit { background: #f0fdf4; color: #15803d; }
.ocr-chip.miss { background: #fef2f2; color: #b91c1c; }
.ocr-chip.wait { background: #f5f5f5; color: #737373; }
.hkz-dt { display: flex; align-items: center; gap: 8px; flex-direction: row; }
.hkz-dt input { width: auto; }
.hkz-warn { margin: 10px 0; padding: 8px 12px; border-radius: 8px; background: #f0fdf4; color: #15803d; font-size: 13px; border: 1px solid #bbf7d0; }
.hkz-warn.bad { background: #fef2f2; border-color: #fecaca; }
.hkz-add-wrap { display: block; margin-top: 6px; }
.hkz-crop-overlay { position: fixed; inset: 0; background: rgb(0 0 0 / 0.55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.hkz-crop-box { background: #fff; border-radius: 12px; padding: 16px; max-width: 640px; width: 100%; box-shadow: 0 24px 48px rgb(0 0 0 / 0.18); }
.hkz-crop-img-wrap { position: relative; user-select: none; }
.hkz-crop-img-wrap img { width: 100%; max-height: 56vh; object-fit: contain; touch-action: none; }
#hkz-crop-rect { position: absolute; border: 2px dashed #7c3aed; background: rgb(124 58 237 / 0.12); pointer-events: none; display: none; }
#hkz-crop-rect[style*="width"] { display: block; }
#view-heizung .toolbar { flex-wrap: wrap; }
.hkm-fs { border: 1px solid var(--line, #d0d4dc); border-radius: 10px; padding: 8px 12px 10px; margin: 10px 0; }
.hkm-fs legend { font-weight: 600; padding: 0 6px; }
.hkm-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 70px 90px 130px; gap: 6px; align-items: center; margin: 6px 0; }
.nt-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 8px; }
.nt-all { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.nt-all input { width: auto; min-height: 0; margin: 0; }
.nt-group { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; margin: 8px 0; overflow: hidden; }
.nt-group > summary { padding: 10px 12px; font-weight: 600; cursor: pointer; background: var(--w-sub, #f3f4f6); }
.nt-item { padding: 8px 12px; border-top: 1px solid var(--border, #e5e7eb); }
.nt-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 2px; }
.nt-acts .muted { margin-right: auto; }
.ex-opt { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-weight: 400; }
.ex-opt input { width: auto; min-height: 0; margin: 0; }
.ex-tree { margin: 6px 0 12px; padding: 8px 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; max-height: 360px; overflow: auto; }
.ex-prop { padding: 4px 0; border-bottom: 1px solid var(--border, #e5e7eb); }
.ex-prop:last-child { border-bottom: 0; }
.ex-unit { margin-left: 26px; }
.ex-dates { display: flex; gap: 12px; flex-wrap: wrap; }
.ex-dates label { display: flex; align-items: center; gap: 6px; }
#f-export h4 { margin: 14px 0 4px; }
.ver-item { padding: 10px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.ver-item:last-child { border-bottom: 0; }
.ver-points { margin: 4px 0 0 18px; padding: 0; }
.ver-points li { margin: 2px 0; }
body.is-admin #app-version { cursor: pointer; text-decoration: underline dotted; }
.hkm-card { border: 1px solid var(--line, #d0d4dc); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.hkm-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hkm-group { font-weight: 600; margin: 14px 0 4px; }
.hkm-n { color: var(--muted, #6b7280); font-size: 0.85rem; text-align: right; }
@media (max-width: 560px) { .hkm-row { grid-template-columns: 22px minmax(0, 1fr) 96px; } .hkm-row select { grid-column: 2 / span 2; } }
.hkz-slot-row [data-fscan] { flex: 0 0 auto; }
.hkz-nr-row { display: flex; gap: 6px; align-items: center; }
.hkz-nr-row .input { flex: 1; min-width: 0; }
.hkz-roomchips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.whg-hkv-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hkz-thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e5e5; }

/* Heizkostenverteiler: ein Feld je Display-Anzeige */
.hkz-slot { border: 1px solid #e5e5e5; border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: #fff; }
.hkz-slot-head { margin-bottom: 6px; line-height: 1.4; }
.hkz-sym { display: inline-block; min-width: 30px; margin-right: 6px; padding: 1px 6px; border-radius: 6px; background: #f3f0ff; color: #5b21b6; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; text-align: center; }
.hkz-slot-row { display: flex; align-items: center; gap: 8px; }
.hkz-slot-row .btn-ghost { flex: none; white-space: nowrap; }
.hkz-slot-input { flex: 1; min-width: 0; }
.hkz-slot-input input { width: 100%; font-size: 1.05rem; font-weight: 600; }
.hkz-slot-thumb .hkz-thumb { width: 64px; height: 64px; display: block; cursor: pointer; }
.hkz-wiz { min-width: 0; width: 100%; overflow-x: hidden; }
.hkz-slot-head .muted { display: block; }
@media (min-width: 640px) { .hkz-wiz { min-width: 520px; } }

/* Heizkostenverteiler: mehrere Fotos, Zuordnung */
.hkz-multi { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:10px 0; }
.hkz-multi > span { flex:1 1 180px; }
.hkz-slot-thumb { display:inline-flex; flex-direction:column; gap:4px; align-items:flex-start; }
.hkz-move { font-size:12px; max-width:118px; padding:2px 4px; }
.hkz-loose { border:1px dashed #c9a227; border-radius:10px; padding:8px 10px; margin:8px 0; background:#fffbea; }
.hkz-loose-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:6px; }
.ocr-chip.tap { cursor:pointer; text-decoration:underline dotted; }
@media (max-width: 560px) {
  .hkz-slot-row { flex-wrap: wrap; align-items: flex-start; }
  .hkz-slot-row .hkz-slot-input { flex: 1 1 100%; min-width: 0; }
}

/* Heizkostenverteiler im Protokoll, Mängelberichte */
.hkv-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; padding:8px 0; border-top:1px solid #eee; }
.hkv-row > div:first-child { flex:1 1 160px; min-width:0; }
.hkv-vals { display:flex; flex-wrap:wrap; gap:4px 12px; align-items:center; flex:1 1 180px; }
.rep-row { border:1px solid #e5e5e5; border-radius:10px; padding:10px 12px; margin:8px 0; }
.rep-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:8px; }
.rep-actions input { flex:1 1 180px; min-width:0; }
.rep-check { display:flex; gap:6px; align-items:flex-start; margin-top:6px; }
.meter-photo { align-self:end; }
.defect-photo img { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; }
.rep-check input { width: auto; flex: none; margin-top: 3px; }
@media (max-width: 640px) {
  table.tbl { min-width: 0; font-size: 0.82rem; }
  .tbl th, .tbl td { padding: 8px 6px; }
  .proto-print .pp-section, #unit-meters { overflow-x: auto; }
}

/* Mieter-, Zähler- und Gerätelisten auf der Wohnungsseite */
.ten-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; padding:9px 0; border-top:1px solid #eee; }
.ten-row:first-child { border-top:0; }
.ten-row .ten-main { flex:1 1 200px; min-width:0; }
.ten-row.old .ten-main { opacity:.65; }
.ten-row .u-actions { display:flex; gap:4px; flex-wrap:wrap; }
#app-version { text-align:center; font-size:11px; color:#9aa0a6; padding:18px 0 12px; }

/* ============================================================
   Wohnung – Handy-Arbeitsbereich (assets/wohnung.js)
   Zuerst fürs Handy gebaut; auf breiten Bildschirmen bleibt die Spalte schmal und mittig.
   ============================================================ */
body.whg-mode .topbar, body.whg-mode #app-version { display: none; }
body.whg-mode { background: #f1f2f4; }
.view.whg { padding: 0; max-width: 640px; margin: 0 auto; min-height: 100vh; }
.whg a { color: inherit; text-decoration: none; }
.whg-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px; padding: 8px 8px; padding-top: calc(8px + env(safe-area-inset-top)); background: #1f2937; color: #fff; }
.whg-bar-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.whg-bar-t b { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whg-bar-t span { font-size: 0.74rem; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whg-iconbtn { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; background: transparent; border: 0; color: inherit; border-radius: 10px; cursor: pointer; }
.whg-iconbtn:active { background: rgb(255 255 255 / 0.15); }
.whg-iconbtn.sm { width: 40px; height: 36px; background: #fff; color: #111; border: 1px solid var(--border-strong); }
.whg-lock { background: #fff7ed; color: #9a3412; font-size: 0.8rem; padding: 8px 14px; border-bottom: 1px solid #fed7aa; }
.whg-body { padding: 12px 12px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.whg-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.whg-card.old, .whg-item.old { opacity: 0.6; }
.whg-pad { padding: 12px 14px; }
p.whg-pad { padding: 0 4px; }
.whg-pad > p { margin-bottom: 8px; }
.whg-pad label, .whg .modal label { display: block; margin-top: 10px; font-size: 0.85rem; color: var(--fg-muted); }
.whg-big { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; margin: 2px 0 4px; }
.whg-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px; }
.whg-h h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.whg-nav { display: flex; align-items: center; gap: 6px; }
.whg-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #eef0f3; color: #374151; font-weight: 600; font-size: 0.86rem; padding: 8px 14px; }
.whg-group { padding: 12px 14px 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-dim); font-weight: 700; }
.whg-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px; background: #fff; border: 0; border-top: 1px solid #f0f0f0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.whg-card > .whg-row:first-child, .whg-sub + .whg-row, .whg-item > .whg-row, .whg-def > .whg-row { border-top: 0; }
.whg-row:active, .whg-row.on { background: var(--accent-soft); }
.whg-row.tall { min-height: 60px; }
.whg-ico { flex: none; width: 28px; text-align: center; font-size: 1.15rem; }
.whg-row-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.whg-row-l .small, .whg-row-l .muted { font-weight: 400; }
.whg-count { flex: none; min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; text-align: center; }
.whg-count.zero { background: #e5e7eb; color: #6b7280; }
.whg-chev { flex: none; color: #9ca3af; font-size: 1.3rem; line-height: 1; }
.whg-link { background: none; border: 0; padding: 6px 2px; color: var(--accent); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.whg a.whg-link { color: var(--accent); }
.whg-none { padding: 10px 14px; color: var(--fg-dim); font-size: 0.85rem; }
.whg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.whg-actions .btn-primary, .whg-actions .btn-ghost, .whg-pad > .btn-primary, .whg-pad > a.btn-primary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.whg a.btn-primary { color: #fff; }
.whg-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; -webkit-overflow-scrolling: touch; }
.whg-chip { flex: none; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; font: inherit; font-size: 0.88rem; cursor: pointer; white-space: nowrap; }
.whg-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.whg-chip.add { border-style: dashed; color: var(--accent); }
.whg-status { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: #fef3c7; color: #92400e; }
.whg-status.s-abgeschlossen, .whg-status.s-unterzeichnet { background: #dcfce7; color: #166534; }
.whg-status.s-versendet { background: #dbeafe; color: #1e40af; }
.whg-seg { display: flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: #fff; }
.whg-seg.wrap { flex-wrap: wrap; }
.whg-seg button { flex: 1 1 auto; min-height: 42px; padding: 6px 10px; border: 0; border-right: 1px solid var(--border); background: #fff; font: inherit; font-size: 0.88rem; cursor: pointer; }
.whg-seg button:last-child { border-right: 0; }
.whg-seg button.on { background: var(--accent); color: #fff; font-weight: 600; }
.whg-seg button:disabled { opacity: 0.55; }
.whg-todo { display: flex; align-items: center; gap: 4px; border-top: 1px solid #f0f0f0; padding-left: 8px; background: #fff7f5; }
.whg-todo.done { background: #f3faf4; }
.whg-todo input[type=checkbox] { flex: none; width: 26px; height: 26px; margin: 9px 6px; accent-color: var(--accent); }
.whg-todo-t { flex: 1; min-width: 0; min-height: 48px; display: flex; flex-direction: column; justify-content: center; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 6px 4px; }
.whg-todo.done .whg-todo-t { color: var(--fg-dim); text-decoration: line-through; }
.whg-todo .whg-chev { padding-right: 12px; }
.whg-check { display: flex !important; align-items: center; gap: 10px; min-height: 44px; color: var(--fg) !important; font-size: 0.92rem !important; }
.whg-check input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }
.whg-check.row { margin: 0 !important; padding: 2px 0; border-top: 1px solid #f0f0f0; }
.whg-check.row span { flex: 1; }
.whg-inline { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.whg-inline input, .whg-inline select { flex: 1; min-width: 0; }
.whg-x { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 0.06); color: #444; cursor: pointer; font-size: 0.8rem; }
.whg-danger { color: var(--danger) !important; margin-right: auto; }
.whg-ok { color: var(--ok); font-size: 0.78rem; }
.whg-person + .whg-person { border-top: 1px solid var(--border); }
.whg-person .whg-pad a, .whg-line a { color: var(--accent); text-decoration: underline; display: inline-block; padding: 3px 0; }
.whg-person .whg-pad .muted.small { margin-top: 8px; }
.whg-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid #f0f0f0; }
.whg-photo-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.whg-photo-btns label { margin: 0 !important; min-height: 42px; display: inline-flex !important; align-items: center; cursor: pointer; color: inherit; }
.whg-photo-btns label.btn-primary { color: #fff !important; }
.whg-thumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 14px 12px; }
.whg-pad .whg-thumbs, .modal .whg-thumbs { padding: 8px 0 0; }
.whg-thumb { position: relative; display: inline-block; }
.whg-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; cursor: zoom-in; }
.whg-thumb .whg-x { position: absolute; top: -6px; right: -6px; background: #111; color: #fff; }
.whg-zoom { position: fixed; inset: 0; z-index: 400; background: rgb(0 0 0 / 0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px; }
.whg-zoom img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.whg-def { border-top: 1px solid #f0f0f0; background: #fff7f5; }
.whg-def .whg-row { background: transparent; }
.whg-def.st-erledigt { background: #f3faf4; }
.whg-item { border-top: 1px solid #f0f0f0; }
.whg-kv { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0; }
.whg-drawer { position: fixed; inset: 0; z-index: 300; background: rgb(0 0 0 / 0.45); }
.whg-drawer-in { width: min(86vw, 340px); height: 100%; background: #fff; overflow-y: auto; padding-bottom: 24px; box-shadow: 4px 0 24px rgb(0 0 0 / 0.25); }
.whg-drawer-h { display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 8px 8px 16px; background: #1f2937; color: #fff; }
.whg textarea, .whg input:not([type=checkbox]):not([type=file]), .whg select { width: 100%; min-height: 44px; font-size: 16px; }
/* Formulare im Handy-Arbeitsbereich: von unten, volle Breite, große Tippflächen */
@media (max-width: 640px) {
  body.whg-mode .modal-overlay { align-items: flex-end; padding: 0; }
  body.whg-mode .modal { width: 100%; max-width: none; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  body.whg-mode .modal input:not([type=checkbox]):not([type=file]), body.whg-mode .modal select, body.whg-mode .modal textarea { width: 100%; min-height: 44px; font-size: 16px; }
  body.whg-mode .modal label { display: block; margin-top: 10px; }
  body.whg-mode .modal .whg-sub { margin: 12px -16px 8px; }
  body.whg-mode .modal-actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); background: #fff; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin-top: 14px; flex-wrap: wrap; }
  body.whg-mode .modal-actions button { min-height: 44px; }
}

.whg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.whg-tags button { min-height: 38px; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: #f3f4f6; font: inherit; font-size: 0.85rem; cursor: pointer; }
.whg-tags button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ============================================================
   Handy zuerst: Kopfleiste, Startseite und Listen der übrigen Seiten
   ============================================================ */
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .topbar { position: sticky; top: 0; z-index: 40; display: block; padding: 0; background: #1f2937; color: #fff; border: 0; }
  .topbar-brand { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .topbar-title { flex: 1; color: #fff; font-size: 1.02rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 1.35rem; background: transparent; border: 0; color: #fff; border-radius: 10px; cursor: pointer; }
  .topbar .topnav, .topbar .topbar-right { display: none; }
  .topbar.open .topnav { display: flex; flex-direction: column; gap: 0; background: #fff; color: var(--fg); border-bottom: 1px solid var(--border); }
  .topbar.open .topnav .nav-btn { min-height: 50px; text-align: left; padding: 0 18px; border-radius: 0; border-top: 1px solid #f0f0f0; font-size: 1rem; background: #fff; color: var(--fg); }
  .topbar.open .topnav .nav-btn.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
  .topbar.open .topbar-right { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 14px; background: #f8f8f9; color: var(--fg); border-bottom: 1px solid var(--border); box-shadow: 0 12px 24px rgb(0 0 0 / 0.18); }
  .topbar.open .topbar-right > * { min-height: 44px; }
  .view { padding: 14px 12px 28px; }
  .view-head { margin-bottom: 12px; }
  .view-head h2 { font-size: 1.35rem; }
  .stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
  .stat-grid .stat { padding: 8px 4px; text-align: center; }
  .stat-grid .stat-num { font-size: 1.25rem; }
  .stat-grid .stat-label { font-size: 0.68rem; }
  .grid-2 { display: flex; flex-direction: column; gap: 12px; }
  .card.glass { padding: 14px; }
  .list-item { min-height: 56px; }
  .toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
  .toolbar .btn-primary, .toolbar .btn-ghost, .toolbar .btn-primary-strong { min-height: 44px; }
  .unit-card, .prop-card { padding: 14px; }
  input, select, textarea { font-size: 16px; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-width: none; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; }
}

/* Schlüssel und Dokumente */
.whg-key { border-top: 1px solid #f0f0f0; }
.whg-key:first-child { border-top: 0; }
.whg-key.on { background: #f7f6ff; }
.whg-key-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; min-height: 56px; }
.whg-key:not(.on) .whg-key-h b { font-weight: 400; color: var(--fg-muted); }
.whg-step { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: #fff; }
.whg-step button { width: 46px; height: 42px; border: 0; background: #fff; font-size: 1.25rem; cursor: pointer; }
.whg-step button:disabled { opacity: 0.35; }
.whg-step span { min-width: 38px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.whg-doc { border-top: 1px solid #f0f0f0; }
.whg-sub + .whg-doc { border-top: 0; }
.whg-doc-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px 6px; }
.whg-doc-f .whg-check { margin: 0 !important; }

.whg-start { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 6px; }
.whg-start .btn-primary { min-height: 52px; font-size: 1.02rem; justify-content: flex-start; text-align: left; padding-left: 18px; display: flex; align-items: center; }
.whg-sig { display: block; width: 100%; max-width: 320px; height: 90px; margin: 8px 0 4px; background: #fafbff; border: 1px solid var(--border); border-radius: 8px; }
.whg-warn { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; border-radius: 8px; padding: 8px 10px; font-size: 0.85rem; }

/* Startseite: Wohnungsliste */
#view-dashboard { max-width: 720px; margin: 0 auto; }
.home-search { width: 100%; max-width: none; min-height: 46px; margin-bottom: 12px; font-size: 16px; }
.home-list { background: transparent; border: 0; }
/* v45: ein Block je Objekt – Rahmen in der Akzentfarbe, Kopf mit Haus-Symbol und Zahl der Wohnungen */
.home-group { border: 1.5px solid var(--accent, #2563eb); border-radius: 16px; overflow: hidden; margin: 0 0 16px; background: #fff; }
.home-prop a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #eef0f3; color: #374151; text-decoration: none; font-size: 0.95rem; border-bottom: 1px solid var(--border, #e5e7eb); }
.home-prop .hp-ic { flex: none; display: flex; color: var(--accent, #2563eb); }
.home-prop .hp-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-prop .hp-tx b { font-size: 1.02rem; }
.home-prop .hp-tx span { font-size: 0.8rem; color: var(--fg-dim); }
.home-prop .hp-cnt { flex: none; font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--accent, #2563eb); color: var(--accent, #2563eb); white-space: nowrap; }
.home-empty { padding: 12px 14px; color: var(--fg-dim); font-size: 0.85rem; }
.home-list .home-unit { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 14px; border: 0; border-top: 1px solid #f0f0f0; border-radius: 0; background: #fff; cursor: pointer; }
.home-list .home-prop + .home-unit { border-top: 0; }
.home-list .home-unit:active { background: var(--accent-soft); }
.home-list .li-title { font-size: 1.05rem; font-weight: 700; }
.home-st { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: #fef3c7; color: #92400e; white-space: nowrap; }
.home-st.s-abgeschlossen, .home-st.s-unterzeichnet { background: #dcfce7; color: #166534; }
.home-st.s-versendet { background: #dbeafe; color: #1e40af; }
.home-st.none { background: #e5e7eb; color: #6b7280; }
.home-chev { flex: none; color: #9ca3af; font-size: 1.4rem; }
.home-actions { margin: 14px 0; }
.home-actions a { display: flex; align-items: center; justify-content: center; min-height: 48px; text-decoration: none; color: #fff; }
.home-more { margin-top: 8px; }
.home-more summary { min-height: 44px; display: flex; align-items: center; color: var(--fg-muted); cursor: pointer; font-size: 0.9rem; }
.home-more .stat-grid { margin-top: 12px; }

/* ---------- Etage je Raum (Formulare „Neue Einheit“ und „Räume ändern“) ---------- */
#room-floors { margin-top: 14px; }
.floor-h { font-weight: 600; margin-bottom: 6px; }
.floor-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border, rgb(128 128 128 / 0.25)); }
.floor-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-row select { flex: 0 0 52%; min-height: 44px; }
.whg-floor { padding: 14px 14px 6px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--accent); display: flex; justify-content: space-between; }
.whg-floor span { color: var(--fg-dim); font-weight: 600; }

/* ---------- Hilfe ---------- */
a.help-link { text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.login-help { text-align: center; margin-top: 14px; font-size: 0.9rem; }

/* ---------- Prüfpunkte ---------- */
.ct-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border, rgb(128 128 128 / 0.25)); }
.whg-chk { padding: 10px 14px; border-top: 1px solid var(--w-line, rgb(128 128 128 / 0.25)); }
.whg-chk-t { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; font-weight: 600; padding: 0 0 8px; }
.whg-chk-t small { display: block; font-weight: 400; color: var(--fg-dim); margin-top: 2px; }
.whg-chk .whg-seg { margin: 0; }
.whg-chk .whg-seg button { min-height: 40px; }
.whg-chk.r-ok .whg-seg button.on { background: #15803d; color: #fff; border-color: #15803d; }
.whg-chk.r-mangel .whg-seg button.on { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.whg-chk.r-entfaellt .whg-seg button.on { background: #64748b; color: #fff; border-color: #64748b; }
.whg-chk.r-mangel .whg-chk-t small { color: #f87171; }

/* Rechtliche Dokumente unten auf der Seite */
.legal-links { display:flex; flex-wrap:wrap; justify-content:center; gap:6px 10px; padding:22px 16px 0; font-size:12.5px; }
.legal-links[hidden] { display:none; }
.legal-links a { color:inherit; opacity:.8; text-decoration:underline; text-underline-offset:2px; }
.legal-links span { opacity:.5; }
body.whg-mode .legal-links { display:none; }
.legal-row .check, #f-legal .check { display:flex !important; align-items:center; justify-content:flex-start; gap:8px; text-align:left; margin:6px 0 10px; }
.legal-row .check { margin:4px 0 0; font-weight:400; font-size:13px; }
.legal-row .check input, #f-legal .check input { width:auto !important; flex:none; margin:0; min-height:0; }
#auto-backup a.list-item, #auto-backup a.list-item * { text-decoration:none; color:inherit; }
/* auf der Anmeldeseite stehen die Links im Anmeldekasten, nicht unten */
.login-legal { padding:10px 0 0; }
#screen-login:not([hidden]) ~ #legal-links { display:none; }
/* Hinweis: Sicherung lange nicht heruntergeladen */
.backup-nag { display:block; margin:12px 0; padding:10px 12px; border-radius:12px; font-size:14px; text-decoration:none;
  background:rgba(245,158,11,.14); border:1px solid rgba(245,158,11,.45); color:inherit; }

/* Einstellungen: Übersicht mit Unterpunkten */
.set-menu { display:flex; flex-direction:column; gap:10px; max-width:720px; }
.set-item { display:flex; align-items:center; gap:14px; padding:14px 16px; min-height:64px; border-radius:14px; text-decoration:none; color:inherit;
  background:var(--w-card, #fff); border:1px solid var(--w-line, #e5e7eb); }
.set-item:hover, .set-item:focus-visible { border-color:var(--accent, #f5b942); }
.set-ico { font-size:22px; width:30px; text-align:center; flex:none; }
.set-txt { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.set-txt span { font-size:13px; opacity:.7; }
.set-chev { font-size:22px; opacity:.5; }
.set-back { display:inline-block; margin:4px 0 6px; padding:6px 0; font-size:15px; text-decoration:none; color:var(--accent, inherit); }
.set-back[hidden] { display:none; }
.set-item, .set-item b { color:var(--fg, #111); }
.set-item .set-txt span { color:var(--fg-dim, inherit); opacity:1; }
body:not(.theme-dark):not(.theme-b) .set-item .set-txt span { opacity:.7; }
/* Raumliste: kompakte Zeilen */
#rooms-manage { display:flex; flex-direction:column; gap:8px; }
#rooms-manage .room-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 12px; padding:10px 12px; min-height:0; margin:0; }
#rooms-manage .room-row .toolbar { margin:0; gap:4px; flex-wrap:nowrap; }

/* Unterschriften: Einwand, Verweigerung, Prüfsumme */
.whg-sig-actions { flex-wrap:wrap; gap:8px; }
.whg-sig-objection { margin-top:6px; padding:8px 10px; border-radius:10px; font-size:14px; background:rgba(245,158,11,.14); border:1px solid rgba(245,158,11,.45); }
.whg-sig-refused { margin:6px 0; padding:8px 10px; border-radius:10px; font-size:14px; background:rgba(220,38,38,.12); border:1px solid rgba(220,38,38,.45); }
.whg-hash { display:block; font-size:13px; line-height:1.6; word-break:break-all; padding:8px 10px; border-radius:8px; background:rgba(127,127,127,.12); }
.whg-ok { color:#16a34a; font-weight:600; }
.whg-bad { color:#dc2626; font-weight:600; }

/* Änderungsprotokoll */
.cl-list { display:flex; flex-direction:column; gap:8px; }
.cl-entry { padding:10px 12px; border-radius:12px; border:1px solid var(--w-line, #e5e7eb); background:var(--w-card, #fff); font-size:14px; }
.cl-head { display:flex; flex-wrap:wrap; gap:4px 10px; font-size:12.5px; opacity:.75; }
.cl-ip { font-family:ui-monospace, monospace; font-size:11.5px; }
.cl-text { margin-top:3px; font-weight:600; }
.cl-delete .cl-text { color:#dc2626; }
.cl-login_fail .cl-text, .cl-locked .cl-text { color:#d97706; }
.cl-late { margin-top:3px; font-size:12.5px; color:#d97706; }
.cl-ch { margin:6px 0 0; padding-left:18px; font-size:13px; }
.cl-ch li { margin:2px 0; word-break:break-word; }
.cl-entry details summary { cursor:pointer; font-size:13px; margin-top:4px; opacity:.8; }
.cl-more { margin-top:10px; }
.whg-seg { display:flex; gap:6px; }
.whg-seg a { flex:1; text-align:center; padding:8px; border-radius:10px; border:1px solid var(--w-line, #e5e7eb); text-decoration:none; color:inherit; font-size:14px; }
.whg-seg a.on { background:var(--accent, #f5b942); color:var(--w-on-accent, #111); border-color:transparent; font-weight:600; }
.cl-filter { display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; }
.cl-filter .f-row { margin:0; }
.cl-filter .f-row:last-of-type, .cl-filter button { grid-column:1 / -1; }

/* Zwei-Faktor-Anmeldung */
.acc-block { padding:10px 0; border-top:1px solid var(--w-line, #e5e7eb); }
.acc-block h4 { margin:0 0 6px; }
.tfa-on { color:#16a34a; font-weight:700; }
.tfa-forced { padding:8px 10px; border-radius:10px; background:rgba(245,158,11,.14); border:1px solid rgba(245,158,11,.45); }
.tfa-steps { padding-left:20px; font-size:14px; line-height:1.5; }
.tfa-steps li { margin:6px 0; }
.tfa-qr { margin:10px 0; }
.tfa-qr svg { display:block; width:200px; height:200px; border-radius:8px; }
.tfa-key, .tfa-codes code { font-family:ui-monospace, monospace; font-size:15px; letter-spacing:.04em; word-break:normal; overflow-wrap:normal; }
#modal-box .check { display:flex !important; align-items:center; gap:10px; margin:12px 0; text-align:left; }
#modal-box .check input { width:auto !important; flex:none; margin:0; }
.tfa-codes { columns:2; font-size:15px; padding-left:24px; }
.tfa-tag { background:rgba(22,163,74,.15); color:#16a34a; }
@media print { body * { visibility:hidden; } #modal-box, #modal-box * { visibility:visible; } #modal-box { position:absolute; left:0; top:0; } #modal-box .toolbar, #modal-box .modal-actions, #modal-box .check { display:none; } }

/* Mängelberichte: Gruppen, Empfänger, Zweck */
.rep-group { border:1px solid var(--w-line, #e5e7eb); border-radius:12px; padding:8px 12px; margin:10px 0; }
.rep-group > summary { cursor:pointer; padding:4px 0; }
.rep-sec { margin-top:10px; }
.rep-h { font-size:12px; text-transform:uppercase; letter-spacing:.05em; opacity:.7; margin-bottom:4px; font-weight:700; }
.rep-line { display:flex !important; align-items:center; gap:8px; margin:4px 0; font-weight:400; text-align:left; flex-wrap:wrap; }
.rep-line input[type=checkbox], .rep-purpose input { width:auto !important; flex:none; margin:0; }
.rep-rcp { padding:6px 0; border-top:1px dashed var(--w-line, #e5e7eb); }
.rep-purpose { display:flex; flex-wrap:wrap; gap:4px 14px; margin:2px 0 0 26px; font-size:14px; }
.rep-purpose label { display:flex; align-items:center; gap:5px; margin:0; font-weight:400; }
.rep-extra .rep-line input[type=email] { flex:1; min-width:180px; }
.rep-opts label { display:block; margin:6px 0; }
.rep-texts { margin-top:8px; }
.rep-text { margin:8px 0; }
.rep-text input, .rep-text textarea { width:100%; margin-top:4px; }
.rep-actions { display:flex; gap:8px; margin:10px 0 4px; flex-wrap:wrap; }

.pt-props { border:1px solid var(--w-line, #e5e7eb); border-radius:10px; padding:8px 12px; margin:8px 0; }
.pt-props[hidden] { display:none; }
.pt-props legend { font-size:13px; font-weight:700; padding:0 4px; }
.rt-form { border-top:1px solid var(--w-line, #e5e7eb); padding-top:10px; margin-top:10px; }
.rt-form textarea { width:100%; }
.rep-purpose label { display:inline-flex !important; flex-direction:row !important; align-items:center; gap:6px; width:auto; }
.rep-purpose input[type=radio] { width:16px !important; height:16px; min-height:0; padding:0; }
.rep-line { flex-direction:row !important; }
.rep-line input[type=checkbox] { width:18px !important; height:18px; min-height:0; padding:0; }
.rep-line { flex-wrap:nowrap !important; align-items:flex-start; }
.rep-line > input { margin-top:3px !important; }
/* v48: Sicherungen auf dem Server */
.bk-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bk-item .li-main { flex: 1 1 200px; min-width: 0; }
.bk-item .li-sub { overflow-wrap: anywhere; }
.rs-src { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0; }
/* ============ v49: Geräte – Anleitungen, Haustechnik, Wartung ============ */
.ger-st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; margin-left: 6px; vertical-align: middle; }
.ger-st.st-overdue { background: #fee2e2; color: #991b1b; }
.ger-st.st-soon { background: #fef3c7; color: #92400e; }
.ger-st.st-ok { background: #dcfce7; color: #166534; }
body.theme-dark .ger-st.st-overdue { background: #3b1414; color: #fca5a5; }
body.theme-dark .ger-st.st-soon { background: #3b2a08; color: #f5b942; }
body.theme-dark .ger-st.st-ok { background: #12351f; color: #4ade80; }
.ger-mini { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 0.72rem; background: var(--bg-muted); color: var(--fg-muted); margin-left: 6px; white-space: nowrap; }
.ger-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ger-badges .ger-st, .ger-badges .ger-mini { margin-left: 0; }
.ger-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; margin: 2px 4px 2px 0; border-radius: 999px; font-size: 0.74rem;
  border: 1px solid var(--border-strong); background: transparent; color: var(--fg-muted); cursor: default; font-weight: 500; }
button.ger-tag { cursor: pointer; }
.ger-tag.on { background: var(--accent-soft); border-color: var(--accent); color: var(--fg); }
.ger-tag button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 0.8rem; }
.ger-tags, .ger-sugg { display: flex; flex-wrap: wrap; margin: 4px 0; }
.ger-form .ger-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ger-form .ger-grid .ger-wide { grid-column: 1 / -1; }
@media (max-width: 420px) { .ger-form .ger-grid { grid-template-columns: 1fr; } }
.ger-det { margin: 8px 0; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 6px 10px; }
.ger-det > summary { cursor: pointer; font-weight: 600; }
.ger-sec { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.ger-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.ger-plan { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.ger-plan.off { opacity: 0.6; }
.ger-plan-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ger-plan-a { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.ger-rec { border-bottom: 1px solid var(--border); padding: 8px 0; }
.ger-pick { align-items: flex-start; }
.ger-pick > span { flex: 1; min-width: 0; }
.ger-sc { display: block; }
.ger-tree { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; }
.ger-tu { padding-left: 22px; }
.ger-links { margin: 4px 0 0 18px; padding: 0; font-size: 0.85rem; }
.ger-due { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; cursor: pointer; font: inherit; }
.ger-due:hover { background: var(--bg-muted); }
.ger-day { flex: none; width: 52px; text-align: center; border-radius: 8px; padding: 3px 0; background: var(--bg-muted); line-height: 1.15; }
.ger-day b { display: block; font-size: 0.9rem; }
.ger-day span { font-size: 0.7rem; color: var(--fg-dim); }
.ger-due.st-overdue .ger-day { background: #fee2e2; color: #991b1b; }
body.theme-dark .ger-due.st-overdue .ger-day { background: #3b1414; color: #fca5a5; }
.ger-due-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ger-kind { font-size: 0.72rem; color: var(--fg-dim); }
.ger-dg { margin-bottom: 8px; }
.ger-none { padding: 6px 0; }
.ger-filter { display: flex; flex-wrap: wrap; gap: 10px; }
.ger-filter label { flex: 1 1 160px; }
.ger-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ger-sum .ger-st, .ger-sum .ger-mini { margin-left: 0; }
.ger-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ger-head h3 { margin: 0; }
.ger-card { margin-top: 14px; }
button.list-item.ger-lib { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ger-lib.old { opacity: 0.55; }
.ger-ico { font-size: 1.3rem; margin-right: 8px; }
.prop-tech { margin-top: 18px; }
.home-maint { margin: 10px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg); }
.home-maint.has-over { border-color: #f87171; }
.home-maint summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.home-maint summary .ger-st { margin-left: 0; }
.ger-unitdue .ger-due { padding: 6px 0; }
.ger-due-t > b { font-size: 0.95rem; line-height: 1.25; }
.ger-due-t > .small { font-size: 0.82rem; color: var(--fg-muted); line-height: 1.3; }
.ger-due-t > .muted.small { font-size: 0.78rem; }
/* v51: Mängel – Angebote, Verjährung */
.ger-offer { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.ger-offer.on { border-color: var(--ok, #16a34a); }
.ger-claims { border-left: 4px solid var(--warn, #f59e0b); }
.ger-claims.st-overdue { border-left-color: #ef4444; }
.ger-claims.done { border-left-color: var(--ok, #16a34a); }
.ger-claims .btn-sm { margin-top: 6px; }
.whg-def.st-festgehalten { opacity: 0.75; }
/* v52: Kontakte */
.hw-act { display: flex; gap: 4px; flex: none; }
.form-grid.pt-zip { grid-template-columns: 7rem 1fr; }
