/* Mieter-/Eigentümerportal – eigenes, ruhiges Erscheinungsbild in den Hausfarben. */
:root {
  --gruen: #99C046; --gruen-dunkel: #6f8f2b; --grau: #676767;
  --grund: #f4f6f2; --flaeche: #ffffff; --text: #1f2a33; --leise: #5f6b74; --linie: #e1e6dc;
  --hinweis: rgba(153,192,70,.14); --fehler: #b3261e; --fehler-grund: #fbe3e1; --schatten: 0 1px 2px rgba(20,30,20,.06), 0 8px 24px rgba(20,30,20,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --grund: #10151a; --flaeche: #19212a; --text: #e8edf1; --leise: #a3b0ba; --linie: #2a343f;
    --hinweis: rgba(153,192,70,.16); --fehler: #f4a3a3; --fehler-grund: #3a1d1d; --schatten: 0 1px 2px rgba(0,0,0,.3); }
}
:root[data-theme="dark"] { --grund: #10151a; --flaeche: #19212a; --text: #e8edf1; --leise: #a3b0ba; --linie: #2a343f;
  --hinweis: rgba(153,192,70,.16); --fehler: #f4a3a3; --fehler-grund: #3a1d1d; --schatten: 0 1px 2px rgba(0,0,0,.3); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text); font: 16px/1.55 'Museo Sans', 'MuseoSans', -apple-system, 'Segoe UI', system-ui, sans-serif; }
a { color: var(--gruen-dunkel); }
:root[data-theme="dark"] a { color: var(--gruen); }
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 980px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.kopf .marke img { height: 30px; width: auto; }
.einheit { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--leise); }
.einheit select { font: inherit; padding: 6px 8px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); }
.nav { max-width: 980px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; }
.nav a { padding: 10px 12px; text-decoration: none; color: var(--leise); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; font-size: 15px; }
.nav a.aktiv { color: var(--text); border-bottom-color: var(--gruen); }
main { max-width: 980px; margin: 0 auto; padding: 22px 16px 48px; }
h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 4px; text-wrap: balance; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
.leise { color: var(--leise); }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 18px 20px; box-shadow: var(--schatten); }
.raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 18px; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--linie); }
.liste li:first-child { border-top: 0; }
.liste .rechts { margin-left: auto; white-space: nowrap; }
.knopf { display: inline-flex; align-items: center; gap: 6px; background: var(--gruen-dunkel); color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.knopf.zweit { background: transparent; color: var(--text); border: 1px solid var(--linie); }
.knopf:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gruen); outline-offset: 2px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); font: inherit; }
.meldung { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; background: var(--hinweis); }
.meldung.fehler { background: var(--fehler-grund); color: var(--fehler); }
.marke-zeile { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--hinweis); color: var(--text); }
.pill.warn { background: #fff1d6; color: #7a4b00; } :root[data-theme="dark"] .pill.warn { background: #3a2e14; color: #f3d38a; }
.fuss { max-width: 980px; margin: 0 auto; padding: 0 16px 30px; display: flex; align-items: center; gap: 8px; font-size: 11px; opacity: .8; color: var(--leise); }
/* Logo-Varianten hell/dunkel (Größe kommt aus .kopf/.gast, die Sichtbarkeit nur von hier). */
.marke img.nur-hell { display: block; }
.nur-dunkel, .marke img.nur-dunkel { display: none; }
:root[data-theme="dark"] .marke img.nur-hell { display: none; }
:root[data-theme="dark"] .marke img.nur-dunkel { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .marke img.nur-hell { display: none; }
  :root:not([data-theme="light"]) .marke img.nur-dunkel { display: block; }
}

/* Gast-Seiten (Anmeldung, Einladung) */
.gast { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.gast .karte { width: 100%; max-width: 400px; padding: 28px; }
.gast .marke img { height: 38px; width: auto; margin-bottom: 18px; }
.gast .knopf { width: 100%; justify-content: center; margin-top: 18px; }
@media (prefers-reduced-motion: no-preference) { .knopf { transition: filter .15s; } .knopf:hover { filter: brightness(1.07); } }
.dok-link { font-weight: 600; overflow-wrap: break-word; hyphens: auto; }
.liste .ic { flex: none; color: var(--gruen-dunkel); }
.klein { font-size: 13px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kopfzeile { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.anliegen-titel { display: flex; flex-direction: column; min-width: 0; }
.liste li .rechts { text-align: right; }
.pill.status-neu, .pill.status-wartet { background: #fff1d6; color: #7a4b00; }
.pill.status-erledigt { background: var(--linie); color: var(--leise); }
:root[data-theme="dark"] .pill.status-neu, :root[data-theme="dark"] .pill.status-wartet { background: #3a2e14; color: #f3d38a; }
fieldset.wahl { border: 0; margin: 0; padding: 0; }
fieldset.wahl legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.wahl-raster { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.wahl-karte { margin: 0; font-weight: 600; cursor: pointer; }
.wahl-karte input { position: absolute; opacity: 0; }
.wahl-karte span { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche); }
.wahl-karte input:checked + span { border-color: var(--gruen); box-shadow: inset 0 0 0 1px var(--gruen); background: var(--hinweis); }
.wahl-karte input:focus-visible + span { outline: 3px solid var(--gruen); outline-offset: 2px; }
.verlauf { list-style: none; margin: 18px 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.nachricht { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 14px 16px; max-width: 760px; }
.nachricht.eigen { align-self: flex-end; background: var(--hinweis); border-color: transparent; }
.nachricht-kopf { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.nachricht-text { white-space: pre-line; overflow-wrap: anywhere; }
.anhaenge { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.anhaenge a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); text-decoration: none; font-size: 14px; max-width: 260px; }
.anhaenge a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anhaenge img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
/* Dateiablage (gemeinsames Skript mit dem Backoffice) */
.ablage { position: relative; width: 100%; }
.ablage-original { position: absolute !important; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.ablage-flaeche { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 2px dashed var(--linie); border-radius: 12px; background: var(--flaeche); cursor: pointer; }
.ablage-flaeche:hover, .ablage.ziehen .ablage-flaeche { border-color: var(--gruen); }
.ablage-flaeche:focus-visible { outline: 3px solid var(--gruen); outline-offset: 2px; }
.ablage-icon { flex: none; width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--hinweis); color: var(--gruen-dunkel); }
.ablage-icon svg, .ablage-typ svg { display: block; }
.ablage-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ablage-sub, .ablage-hinweis { font-size: 13px; color: var(--leise); }
.ablage-liste { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ablage-liste:empty { display: none; }
.ablage-datei { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); font-size: 14px; }
.ablage-datei.abgelehnt { border-color: var(--fehler); color: var(--fehler); }
.ablage-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ablage-groesse { color: var(--leise); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ablage-weg { border: 0; background: transparent; color: var(--leise); cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.ablage-weg:hover, .ablage-weg:focus-visible { color: var(--fehler); }
.nav-zahl { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--gruen-dunkel); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
details.antrag { margin-top: 14px; }
details.antrag > summary { list-style: none; }
details.antrag > summary::-webkit-details-marker { display: none; }
details.antrag[open] > summary { display: none; }
.zwei { display: grid; grid-template-columns: 1fr 2fr; gap: 0 12px; }
.marke-zeile .ic { color: var(--gruen-dunkel); }
/* Beschlusssammlung (nur Eigentümer) */
.beschluesse { list-style: none; margin: 0; padding: 0; }
.beschluss { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--linie); }
.beschluss:first-child { border-top: 0; padding-top: 4px; }
.beschluss-nr { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--hinweis); color: var(--gruen-dunkel); font-weight: 700; font-variant-numeric: tabular-nums; }
.beschluss-inhalt { flex: 1; min-width: 0; }
.beschluss-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.beschluss-kopf .pill { flex: none; }
.beschluss-text { margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; max-width: 70ch; }
.beschluss-vermerk { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: #fff1d6; color: #7a4b00; font-size: 14px; white-space: pre-line; }
:root[data-theme="dark"] .beschluss-vermerk { background: #3a2e14; color: #f3d38a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .beschluss-vermerk { background: #3a2e14; color: #f3d38a; } }
@media (max-width: 600px) {
  .kopf-innen { padding: 10px 16px; gap: 8px; }
  .kopf .marke img { height: 26px; }
  .einheit { font-size: 13px; width: 100%; justify-content: space-between; margin-left: 0; }
  .nav a { padding: 10px 9px; font-size: 14px; }
  h1 { font-size: 1.35rem; }
}
/* Dokumentvorschau */
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; }
.vorschau { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 18px 0; }
.vorschau img { display: block; width: 100%; max-width: 860px; height: auto; background: #fff; border: 1px solid var(--linie); border-radius: 6px; box-shadow: var(--schatten); }
.vorschau-pdf { display: block; width: 100%; height: 80vh; margin: 18px 0; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); }
/* Miniatur der ersten Seite in den Dokumentlisten (Symbol als Rückfall) */
.miniatur { position: relative; flex: none; width: 56px; height: 76px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--linie); border-radius: 6px; background: var(--hinweis); overflow: hidden; box-shadow: 0 1px 2px rgba(20,30,20,.08); }
.miniatur img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; background: #fff; }
.miniatur:hover { border-color: var(--gruen); }
@media (max-width: 600px) { .miniatur { width: 46px; height: 62px; } }
