/* Störungsportal – Kunden/Gäste */

:root {
  --ink: #171b20;
  --ink-soft: #5d6874;
  --paper: #ffffff;
  --shell: #f3f2f0;
  --line: #d9dcdf;
  --brand: #e16d0d;
  --brand-dark: #b5590b;
  /* Punkt 70 (Entscheidung 16.10.2026): Weiß auf --brand erreicht nur
     3,28:1. Flächen mit weißer Schrift (Hauptknöpfe, Hauptkachel, Schritt-
     nummern, eigene Chat-Blasen) nehmen --brand-flaeche (4,77:1), beim
     Darüberfahren/Drücken noch dunkler (6,6:1). Akzente ohne Text (Rahmen,
     Logo, Kopfleiste) bleiben unverändert. */
  --brand-flaeche: var(--brand-dark);
  --brand-flaeche-hover: #94480a;
  --grey: #b2b2b2;
  --danger: #d81e3f;
  --ok: #17864a;
  /* "Quan Rounded Regular" ist die eigentliche CI-Schrift (siehe CI-Guide.pdf),
     aber nur als kostenpflichtiger Font-Kauf verlinkt — keine Lizenzdatei im
     Logo-Ordner. Bis eine lizenzierte .woff/.woff2-Datei vorliegt, steht hier
     Quicksand als optisch ähnliche, freie Ersatzschrift (abgerundet,
     geometrisch); Archivo bleibt als Fallback. */
  --font: "Quicksand", "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--shell);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 60px; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 18px 0 10px;
}
.top h1.brand { margin: 0; line-height: 0; }
.brand-logo {
  display: block;
  width: 250px;
  max-width: 100%;
  height: auto;
}
.top .tag {
  flex: none;
  color: #fff;
  background: var(--brand-flaeche);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Sprachauswahl (5.7.9, sprache.js) */
.sprache-wahl { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 14px; color: var(--ink-soft); }
.sprache-wahl select { font: inherit; font-size: 14px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }

@media (max-width: 430px) {
  .top { gap: 10px; padding: 16px 0 8px; }
  .brand-logo { width: 215px; }
  .top .tag { font-size: 13px; padding: 4px 10px; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

h2 { font-size: 18px; margin: 0 0 4px; }
.lede { color: var(--ink-soft); margin: 0 0 16px; font-size: 14px; }

.f { display: block; margin-bottom: 14px; }
.f span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--ink-soft); }
.f input, .f select, .f textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; background: #fff; color: var(--ink);
}
.f textarea { min-height: 100px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.f .hint { font-size: 13px; color: var(--ink-soft); margin-top: 4px; font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.btn.block { display: flex; width: 100%; }
.btn.primary { background: var(--brand-flaeche); border-color: var(--brand-flaeche); color: #fff; }
.btn.primary:hover, .btn.primary:active { background: var(--brand-flaeche-hover); border-color: var(--brand-flaeche-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand-dark); }
.btn:disabled { opacity: .55; cursor: default; }

.captcha-row { display: flex; align-items: center; gap: 10px; }
/* Turnstile statt Rechenaufgabe (5.9.7) */
.captcha-row[hidden], .ts-box[hidden] { display: none; }
.ts-box { min-height: 65px; margin: 4px 0; }
.captcha-q {
  background: var(--shell); border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 14px; font-weight: 700; letter-spacing: .5px; white-space: nowrap;
}

.error {
  background: #fdecee; color: var(--danger); border: 1px solid #f5c3cc;
  border-radius: 9px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px;
}
.ok {
  background: #e9f7f0; color: var(--ok); border: 1px solid #bfe6d3;
  border-radius: 9px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px;
}
.hidden { display: none !important; }

.ticket-no {
  font-size: 22px; font-weight: 800; color: var(--brand-dark); letter-spacing: .3px;
}
.status-pill {
  display: inline-block; padding: 4px 11px; border-radius: 99px; font-size: 13px; font-weight: 700;
  background: #fbe7d4; color: var(--brand-dark);
}
.status-pill.freigegeben { background: #d9f0e3; color: var(--ok); }
.status-pill.abgelehnt { background: #fdecee; color: var(--danger); }

/* Interner Bearbeitungsstatus - nur Hausverwaltungen bekommen ihn zu sehen.
   Dieselben Farben wie die Kartenpins im Backend, damit dieselbe Lage auch
   dieselbe Farbe hat. */
.status-pill.intern.neu        { background: #fdf4e3; color: #a16207; }
.status-pill.intern.geplant    { background: #f4e8fd; color: #9333ea; }
.status-pill.intern.in_arbeit  { background: #e3ecfd; color: #1d4ed8; }
/* 6.1.9: Im Portal steht hier "In Bearbeitung" -- daher wie "In Arbeit", nicht grau. */
.status-pill.intern.abgeschlossen { background: #eceff3; color: #475569; } /* 7.0.4: Arbeiten fertig (auch intern Verrechnet) */
.status-pill.intern.alt { background: #f1f5f9; color: #64748b; } /* 7.0.4: alt, nur in der Liste */
.status-pill.intern.erledigt   { background: #d9f0e3; color: #17864a; }
.status-pill.intern.neu_planen { background: #fdeaee; color: #be123c; }
.status-pill.intern.storniert  { background: #e7e5e4; color: #44403c; text-decoration: line-through; } /* 20.10.2026 */

.link-box {
  display: flex; gap: 8px; align-items: center;
  background: var(--shell); border: 1px dashed var(--line); border-radius: 9px; padding: 10px 12px;
  font-size: 13px; word-break: break-all;
}

.list-plain { list-style: none; margin: 0; padding: 0; }
.mehr-zeilen { display: block; margin: 8px auto 0; }
.list-plain li {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px;
  background: #fff; cursor: pointer;
}
.list-plain li:hover { border-color: var(--brand); }
.list-plain .meta { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }

/* Aufträge, zu denen schon ein Gespräch läuft — dann führt der Klick direkt
   in den vorhandenen Verlauf statt auf die Auftragsseite. */
.chat-hinweis {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  background: var(--shell); color: var(--ink-soft);
  font-size: 13px; font-weight: 600; vertical-align: middle;
}

.tag-stoerung {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  background: #fde3d6; color: #c2410c; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; vertical-align: middle;
}

/* Die Art eines Anliegens an einer Baustelle (Reklamation, Regie, Wunsch).
   Ruhiger als das Störungsetikett: Es ist eine Einordnung, kein Alarm. */
.tag-anliegen {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  background: #eef0f2; color: #39424c; font-size: 13px; font-weight: 700;
  vertical-align: middle;
}

/* Wir haben geantwortet, der Kunde hat es noch nicht gesehen. Auffällig,
   aber nicht alarmierend — es ist eine gute Nachricht, keine Störung. */
.tag-antwort {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  background: #e3ecfd; color: #1d4ed8; font-size: 13px; font-weight: 700;
  vertical-align: middle;
}
.list-plain li.hat-antwort { border-color: #1d4ed8; background: #f7faff; }
.antwort-hinweis {
  background: #e3ecfd; color: #1d4ed8; border-radius: 10px;
  padding: 10px 13px; font-size: 14px; font-weight: 600; margin: 0 0 12px;
}

.chat { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 13px; font-size: 14px; }
.msg .who { font-size: 13px; opacity: .7; margin-bottom: 3px; font-weight: 700; }
.msg.customer { align-self: flex-end; background: var(--brand-flaeche); color: #fff; border-bottom-right-radius: 3px; }
.msg.backend { align-self: flex-start; background: var(--shell); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.msg .when { font-size: 13px; opacity: .65; margin-top: 4px; }

.msg-form { display: flex; gap: 8px; margin-top: 12px; }
.msg-form textarea { flex: 1; min-height: 44px; max-height: 120px; }
/* Mehrere Felder (Art, Text, Dateien, Knopf): untereinander statt in einer
   Zeile -- nebeneinander wurden Auswahl und Textfeld bei schmalen Fenstern
   (Handy, Windows-Programm) bis zur Unlesbarkeit zusammengedrückt. */
.melde-form { flex-direction: column; align-items: stretch; }
.melde-form > .f { margin: 0; }
.melde-form select, .melde-form input[type=file] { width: 100%; }
.melde-form textarea { flex: none; min-height: 110px; max-height: none; resize: vertical; }
.melde-form > .btn { align-self: flex-end; min-width: 140px; }

.files-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-chip {
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 13px;
  background: var(--shell); text-decoration: none; color: var(--ink);
}

/* Menüpunkte: seit 7.0.0 als Reiter in der Kopfzeile (.kopf-nav, unten). */

.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button {
  flex: 1; padding: 9px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  font: inherit; font-weight: 600; cursor: pointer; color: var(--ink-soft);
}
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.spinner { text-align: center; color: var(--ink-soft); padding: 30px 0; }

.app-version {
  text-align: center; color: var(--ink-soft); font-size: 13px; margin-top: 18px; opacity: .75;
}

/* Datenschutz (5.8.0): Hinweis über dem Absenden, Link in der Fußzeile. */
.app-version a, .ds-hinweis a { color: var(--brand-dark); }
.ds-hinweis { font-size: 13px; color: var(--ink-soft); margin: 4px 0 12px; }

.home-hero {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px 22px; margin-top: 10px; text-align: center;
}
.home-hero h2 { font-size: 22px; margin-bottom: 8px; }
.home-hero .lede { margin-left: auto; margin-right: auto; max-width: 420px; }
.home-btn { font-size: 16px; padding: 15px 18px; margin-bottom: 12px; }
.home-sub { font-size: 13px; margin-top: 18px; margin-bottom: 0; }
.home-sub a { color: var(--brand-dark); font-weight: 600; }

/* Begruendung, warum ein Auftrag neu geplant werden muss. Sie ist fuer die
   Hausverwaltung die wichtigste Angabe an einem solchen Auftrag -- deshalb
   abgesetzt und nicht als weitere Zeile im Kleingedruckten. */
.neu-planen-grund {
  margin-top: 6px; padding: 6px 10px; border-left: 4px solid #be123c; border-radius: 8px;
  background: #fdeaee; color: #9f1239; font-size: 13px; font-weight: 600; overflow-wrap: anywhere;
}
/* 10.4.13 (Peter 05.11.2026): roter Balken -- Stichwort kräftig, Zeitpunkt dahinter. */
.neu-planen-grund strong { color: #be123c; font-weight: 800; }
.neu-planen-grund .np-zeit { font-weight: 500; white-space: nowrap; }

/* Dokumente eines Bauvorhabens im Portal. */
.dok-ordner { font-size: 15px; margin: 14px 0 6px; }
.dok-kunde li a { color: inherit; text-decoration: none; }
.dok-kunde li a:hover strong { color: var(--brand-dark); text-decoration: underline; }
.dok-kunde details { margin-top: 4px; }
.dok-kunde details a { color: var(--brand-dark); }

/* Bauvorhaben (4.11.0): Reiter, Freigaben, Hinweis auf Neues. */
.portal-reiter { display: flex; gap: 2px; margin: 4px 0 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
  /* Linie als Schatten statt Rahmen (6.0.11): Die Reiter mussten mit -2px über den
     Rahmen ragen, das gab neben overflow-x eine senkrechte Rollleiste mit Pfeilen. */
  box-shadow: inset 0 -2px 0 var(--line); }
.portal-reiter button {
  border: 0; background: none; padding: 9px 14px; font: inherit; font-weight: 700; color: var(--ink-soft);
  cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap;
}
.portal-reiter button[aria-selected="true"] { color: var(--brand-dark); border-bottom-color: var(--brand); }
.tag-freigabe {
  display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 13px; font-weight: 700;
  background: #e6f4f2; color: #0f766e; border: 1px solid #0f766e; vertical-align: middle;
}
.tag-freigabe.freigegeben { background: #e0f2e9; color: #0d6b3a; border-color: #0d6b3a; }
.tag-freigabe.abgelehnt { background: #fde8ec; color: #b4152f; border-color: #b4152f; }
.freigabe-karte { border: 1.5px solid #0f766e; background: #f2faf8; }
.freigabe-box { border: 1.5px solid #0f766e; background: #f2faf8; border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.freigabe-box.freigegeben { border-color: #0d6b3a; background: #f1faf4; }
.freigabe-box.abgelehnt { border-color: #b4152f; background: #fdf3f5; }
.freigabe-box h3 { margin: 0 0 6px; font-size: 16px; }
.freigabe-box p { margin: 4px 0; }
.freigabe-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.neu-zeile { margin-top: 4px; }
/* Zusatzzeilen außerhalb von Listen: klein und grau wie in den Listen. */
.card > .meta, .freigabe-box .meta, details.meta { color: var(--ink-soft); font-size: 13px; }
/* Mehrere Chats eines Bauvorhabens: Umschalter oben. */
.chat-wahl { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

/* Bautagebuch im Portal (5.1.0): je Tag ein aufklappbarer Bericht. */
.tb-kunde { border-top: 1px solid #e5e7eb; padding: 10px 0; }
.tb-kunde summary { cursor: pointer; }
.tb-kunde p { margin: 8px 0 0; }

/* Karte der Aufträge im Portal (5.3.0). */
.karte-karte > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.karte-karte > summary::-webkit-details-marker { display: none; }
.karte-karte > summary h2 { margin: 0; }
.karte-anzahl { font-size: 13px; font-weight: 500; color: var(--muted, #6b7280); margin-left: 6px; }
.karte-auf { font-size: 13px; color: var(--brand, #e16d0d); font-weight: 600; }
.karte-karte[open] .karte-auf { display: none; }
.portal-karte { height: 380px; border-radius: 10px; margin-top: 12px; border: 1px solid var(--line, #e5e7eb); }
.karte-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted, #6b7280); }
.karte-legende span { display: inline-flex; align-items: center; gap: 5px; }
.karte-legende i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; border: 1px solid #fff; box-shadow: 0 0 0 1px #d1d5db; }
.karte-warn { color: #c2410c; }
.karte-warn svg { width: 11px; height: 14px; display: block; }
@media (max-width: 600px) { .portal-karte { height: 300px; } }

/* Pins der Portal-Karte (6.1.9) -- übernommen aus der Karte des Büros
   (public/backend/styles.css, Abschnitt "Karte": .pin, .pin-badge,
   stoerung-pulse). Der dunkle Schatten hebt den weißen Rand von hellen
   Kartenkacheln ab. */
.portal-pin-huelle { background: none; border: 0; }
.portal-pin-huelle:focus-visible { outline: 3px solid var(--brand, #e16d0d); outline-offset: 2px; border-radius: 4px; }
.pin { display: block; position: relative; }
.pin svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
/* 7.0.0 (Entscheidung Peter): Im Portal blinken die Warndreiecke nicht mehr --
   das Büro behält das Pulsieren (eigene styles.css). */
.pin.is-stoerung svg { animation: none; }
.pin-badge {
  position: absolute; top: -4px; right: -6px;
  min-width: 16px; height: 16px; padding: 0 3px; border-radius: 999px;
  background: #1d262f; color: #fff; font-size: 13px; font-weight: 700; line-height: 16px;
  text-align: center; border: 1.5px solid #fff; font-variant-numeric: tabular-nums;
}
.karte-trenner { border: 0; border-top: 1px solid var(--line, #e5e7eb); margin: 8px 0; }

/* Dateien hierher ziehen (5.4.0), siehe datei-ablage.js. */
.datei-ablage { position: relative; border: 2px dashed #c9ccd1; border-radius: 10px; padding: 14px 16px; background: #fafafa;
  cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.datei-ablage:hover, .datei-ablage:focus { border-color: #e16d0d; outline: none; }
.datei-ablage.zieht { border-color: #e16d0d; background: #fff4e5; }
/* 25.10.2026 (Punkt 103): gesperrt, solange hochgeladen wird. */
.datei-ablage.busy { opacity: .6; pointer-events: none; cursor: progress; }
.datei-ablage .da-text { color: #4b5563; font-size: 14px; }
.datei-ablage .da-text b { color: #1f2328; }
.datei-ablage .da-text u { color: #e16d0d; text-decoration: none; font-weight: 600; }
.datei-ablage .da-symbol { display: block; font-size: 20px; color: #e16d0d; margin-bottom: 2px; }
.datei-ablage .da-feld { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.datei-ablage .da-liste { list-style: none; margin: 8px 0 0; padding: 0; text-align: left; }
.datei-ablage .da-liste:empty { display: none; }
.datei-ablage .da-liste li { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 6px; padding: 5px 8px; margin-top: 4px; font-size: 13px; }
.datei-ablage .da-liste button { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: #b42318; }

/* Suche, Filter, Export im Portal (5.4.0). */
.suchleiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.suchleiste input[type=search] { flex: 1 1 240px; }
.suchleiste select { flex: 0 0 auto; }
.export-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }
.suchleiste .meta { flex-basis: 100%; }
.kal-link { font-size: 13px; margin-left: 6px; white-space: nowrap; }
.tb-fotos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tb-fotos img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; display: block; }
.datei-ablage .da-knoepfe { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.datei-ablage .da-knopf { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 110px;
  padding: 10px 14px; border: 1px solid #d9dce1; border-radius: 10px; background: #fff; cursor: pointer; font: inherit; font-size: 13px; color: inherit; }
.datei-ablage .da-knopf span { font-size: 26px; line-height: 1; }
.datei-ablage .da-knopf:hover { border-color: #e67e22; }
.datei-ablage .da-klein { font-size: 13px; opacity: .75; margin-top: 6px; }

/* Breitansicht des Portals (5.6.0): wie im Backend -- links die Listen,
   in der Mitte groß die Karte. Nur auf breiten Bildschirmen (app.js, BREIT_AB). */
.wrap.wrap-breit { max-width: none; padding: 0 20px 16px; }
.portal-raster { display: grid; grid-template-columns: minmax(360px, 420px) 1fr; gap: 16px; align-items: start; }
.portal-seite { max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 4px; }
.portal-seite .card { padding: 14px 16px; margin-bottom: 12px; }
.portal-seite .card h2 { font-size: 17px; margin-bottom: 6px; }
.portal-seite .lede { font-size: 13.5px; }
.portal-seite .list-plain li { padding: 10px 12px; }
.portal-mitte { position: sticky; top: 10px; }
.karte-gross { padding: 12px 14px; margin: 0; }
.karte-gross .karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.karte-gross .karte-kopf h2 { margin: 0; font-size: 17px; }
.karte-gross .karte-legende { margin-top: 0; }
.karte-gross .portal-karte { height: calc(100vh - 200px); min-height: 420px; margin-top: 10px; }
.wrap-breit .app-version { margin-top: 6px; }

/* Suche und Filter: ordentliche Felder statt der Browser-Vorgabe. */
.suchleiste input[type=search], .suchleiste select {
  font: inherit; font-size: 14.5px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.suchleiste input[type=search]:focus, .suchleiste select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.suchleiste .export-knoepfe .btn { font-size: 13.5px; }
.portal-seite .suchleiste input[type=search] { flex-basis: 100%; }
.portal-seite .suchleiste select { flex: 1 1 auto; }

/* 📍 in einer Auftragszeile: auf der Karte zeigen. */
.auf-karte { float: right; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 1px 7px; font-size: 15px; cursor: pointer; line-height: 1.5; }
.auf-karte:hover { border-color: var(--brand); }

/* ? neben einer Überschrift: Hilfe zu diesem Bereich (5.6.1). */
.hilfe-link { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 6px;
  border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--brand); font-size: 13px; font-weight: 700;
  text-decoration: none; vertical-align: 2px; line-height: 1; }
.hilfe-link:hover { border-color: var(--brand); background: #fff4e5; }
.freigabe-karte li[data-zu-dokumente] { cursor: pointer; }

/* 6.1.9: Objekt-Schnellwahl der Hausverwaltung in „Neue Störung melden“. */
.objekt-wahl[hidden], .objekt-wahl [hidden] { display: none !important; }
.objekt-wahl .ow-huelle { position: relative; }
.ow-liste { position: absolute; left: 0; right: 0; top: 100%; z-index: 3000; margin: 2px 0 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); max-height: 280px; overflow: auto; }
.ow-liste li { padding: 9px 12px; cursor: pointer; font-size: 15px; line-height: 1.3; color: #1f2937; overflow-wrap: anywhere; }
.ow-liste li small { display: block; color: #64748b; font-size: 13px; margin-top: 2px; }
.ow-liste li.an, .ow-liste li[role=option]:hover { background: #fff4e5; }
.ow-liste li.ow-leer { cursor: default; color: #64748b; background: none; }
.ow-gewaehlt { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff8ef; overflow-wrap: anywhere; }
.ow-gewaehlt .ow-aendern { margin-left: 6px; font-size: 13px; }

/* ======================================================================
   7.0.0: Neue Optik des Kundenportals (Entwurf B mit Logo der Hausverwaltung,
   von Peter gewählt). Orange Kopfleiste mit weißem Logo, Menüpunkte als Reiter,
   große Kacheln auf der Startseite, Schritte im Meldeformular, größere Felder.
   Die Leiste ist etwas dunkler als im Entwurf: Weiße Schrift muss auf dem
   Orange lesbar bleiben (Kontrast mindestens 4,5:1).
   ====================================================================== */
:root {
  --shell: #f4f1ee;
  --line: #dfd9d3;
  --schatten: 0 2px 6px rgba(23,27,32,.06), 0 12px 28px rgba(23,27,32,.07);
  --kopf: linear-gradient(100deg, #b8580b 0%, #c25b0a 45%, #d3640c 100%);
  --kopf-pille: rgba(60,20,0,.22);
  --kopf-pille-hover: rgba(60,20,0,.34);
}
body { font-size: 17px; line-height: 1.55; background: var(--shell); }
.wrap { max-width: 700px; padding: 26px 18px 70px; }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Tastaturfokus überall deutlich sichtbar. */
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--brand-dark); outline-offset: 2px; }

/* --- Kopfleiste --- */
.kopf { background: var(--kopf); color: #fff; box-shadow: 0 4px 14px rgba(140,65,5,.25); }
.kopf-innen { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.kopf.kopf-breit .kopf-innen { max-width: none; }
.kopf .top { padding: 12px 0; flex-wrap: wrap; gap: 6px 18px; justify-content: flex-start; }
.kopf .top h1.brand { flex: none; }
.kopf .brand-logo { width: 185px; filter: brightness(0) invert(1); }
body.angemeldet .kopf .brand-logo { width: 165px; }
/* 7.0.1: Das weiße Strichlogo war auf dem Orange schlecht zu sehen. Zwei Fassungen
   zum Vergleichen, umschaltbar über eine Klasse an <header class="kopf">:
   A (Standard): Logo in den Originalfarben (Orange/Grau) auf einem weißen Schild
   wie das der Hausverwaltung, gleiche Höhe.
   B (header.logo-weiss): weißes Logo, größer, mit dunklem Schatten für Kontrast. */
.kopf .brand-logo, body.angemeldet .kopf .brand-logo {
  box-sizing: border-box; height: 44px; width: auto; max-width: none; filter: none;
  background: #fff; border-radius: 10px; padding: 4px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 3px 10px rgba(120,55,0,.18); }
.kopf.logo-weiss .brand-logo, body.angemeldet .kopf.logo-weiss .brand-logo {
  height: 48px; padding: 0; background: none; border-radius: 0; box-shadow: none;
  filter: brightness(0) invert(1) drop-shadow(0 1px 1px rgba(40,15,0,.75)) drop-shadow(0 0 3px rgba(40,15,0,.45)); }
.kopf .top .tag { background: var(--kopf-pille); border: 1.5px solid rgba(255,255,255,.75); color: #fff; font-size: 13px; }
.kopf a:focus-visible, .kopf button:focus-visible, .kopf select:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.kopf .sprache-wahl { color: #fff; margin-left: auto; }
.kopf .sprache-wahl select { background: var(--kopf-pille); color: #fff; border: 1.5px solid rgba(255,255,255,.7); min-height: 40px; border-radius: 10px; padding: 4px 8px; font-size: 15px; }
.kopf .sprache-wahl select option { color: #171b20; background: #fff; }
/* 20.10.2026: Knopf "Windows-Programm" für Hausverwaltungen -- wie die Pille des Benutzermenüs. */
.kopf .windows-knopf { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--kopf-pille); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.kopf .windows-knopf:hover { background: var(--kopf-pille-hover); }
.wp-schritte { padding-left: 20px; line-height: 1.6; }
.wp-schritte li { margin: 6px 0; }

/* Reiter: zweite Reihe der Leiste, am Handy waagrecht wischbar. */
.kopf-nav { order: 10; flex-basis: 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 3px 3px; }
.kopf-nav::-webkit-scrollbar { display: none; }
.kopf-nav .reiter { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  background: var(--kopf-pille); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.kopf-nav .reiter:hover { background: var(--kopf-pille-hover); }
.kopf-nav .reiter.aktiv { background: #fff; color: var(--brand-dark); }
.kopf-nav .reiter:focus-visible { outline-offset: -3px; outline-color: #fff; box-shadow: 0 0 0 3px #7a3a06 inset; }
.kopf-nav .reiter.aktiv:focus-visible { outline-color: var(--brand-dark); box-shadow: none; }

/* Benutzermenü */
.benutzer { position: relative; }
.benutzer-knopf { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 0; background: var(--kopf-pille); border-radius: 999px;
  padding: 4px 14px 4px 4px; font: inherit; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer; white-space: nowrap; }
.benutzer-knopf:hover { background: var(--kopf-pille-hover); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.benutzer-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.benutzer-liste { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border-radius: 14px; box-shadow: var(--schatten), 0 0 0 1px rgba(0,0,0,.05);
  padding: 8px; min-width: 220px; z-index: 1200; }
.benutzer-liste[hidden] { display: none; }
.benutzer-liste .btn { display: flex; width: 100%; justify-content: flex-start; border: 0; background: none; color: var(--ink); min-height: 48px; }
.benutzer-liste .btn:hover { background: var(--shell); }
.benutzer-liste .abmelden { color: var(--danger); }

/* Logo der Hausverwaltung auf weißem Schild + „Kundenportal für …“ */
.kopf-hv { display: flex; align-items: center; gap: 12px; flex: none; min-width: 0; }
.kopf-mal { font-size: 24px; line-height: 1; color: #fff; font-weight: 300; }
/* 7.0.1: Die Breite des Schilds richtet sich nach dem Seitenverhältnis des Logos
   (breite Logos werden breiter statt winzig), Höhe fest wie beim eigenen Logo. */
.hv-schild { box-sizing: border-box; height: 44px; width: auto; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: #fff; border-radius: 10px; padding: 4px 10px; max-width: 200px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 3px 10px rgba(120,55,0,.18); }
.hv-schild img { display: block; height: 36px; width: auto; max-width: 180px; object-fit: contain; }

/* 7.0.1: „‹ Zurück zur Übersicht“ oben in der ersten Karte der Auftrags- und Ticketseiten. */
.zurueck-zeile { margin: -8px 0 12px; }
.zurueck-link { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 4px 12px 4px 8px; margin-left: -8px;
  border-radius: 10px; color: var(--brand-dark); font-weight: 700; font-size: 16px; text-decoration: none; }
.zurueck-link:hover { background: #fff4e5; text-decoration: underline; }
.zurueck-link span[aria-hidden] { font-size: 22px; line-height: 1; }
.kopf-hv-text { display: flex; flex-direction: column; line-height: 1.2; color: #fff; }
.kopf-hv-text small { font-size: 13px; font-weight: 700; }
.kopf-hv-text strong { font-size: 16px; font-weight: 800; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* --- Karten, Knöpfe, Felder --- */
.card, .home-hero { border: 0; border-radius: 18px; box-shadow: var(--schatten); padding: 28px; margin-bottom: 20px; }
.card > h2:first-child { font-size: 26px; font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
.lede { font-size: 16.5px; }
.btn { min-height: 50px; border-radius: 12px; font-size: 17px; font-weight: 700; }
.btn.primary { min-height: 58px; font-size: 18.5px; box-shadow: 0 8px 18px rgba(225,109,13,.3); }
.f { margin-bottom: 18px; }
.f span { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.f input, .f select, .f textarea { min-height: 54px; padding: 13px 15px; border-radius: 12px; font-size: 17px; border: 2px solid var(--line); }
.f input:focus, .f select:focus, .f textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(225,109,13,.22); }
.f .hint { font-size: 14px; }
.row2 { gap: 14px; }

/* --- Schrittanzeige und Abschnitte im Meldeformular --- */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 6px 0 24px; padding: 0; position: relative; }
.stepper::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 21px; height: 3px; background: var(--line); }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--ink-soft); text-align: center; }
.stepper li b { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: var(--ink-soft); }
.stepper li.aktiv { color: var(--brand-dark); }
.stepper li.aktiv b { background: var(--brand-flaeche); border-color: var(--brand-flaeche); color: #fff; box-shadow: 0 0 0 5px rgba(225,109,13,.18); }
.stepper li.erledigt b { border-color: var(--brand); color: var(--brand-dark); }
.schritt { border: 2px solid #f1e7dd; border-radius: 16px; padding: 22px 20px 6px; margin-bottom: 18px; background: #fffdfb; }
.schritt h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 2px; font-size: 21px; font-weight: 800; }
.schritt h3 b { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-flaeche); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.schritt-hilfe { margin: 0 0 16px 48px; color: var(--ink-soft); font-size: 15px; }
.schritt[data-schritt="4"] { padding-bottom: 22px; }
.objekt-wahl { margin-bottom: 18px; }
.schritt > .hint { font-size: 14px; color: var(--ink-soft); }

/* --- Startseite: große Kacheln --- */
.home-hero { padding: 34px 30px 28px; margin-top: 10px; }
.home-hero h2 { font-size: 30px; }
.kacheln { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; margin: 8px 0 18px; text-align: left; }
.kachel { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; border-radius: 18px; background: #fff; border: 2px solid var(--line);
  color: var(--ink); text-decoration: none; min-height: 180px; transition: transform .1s, border-color .1s; }
.kachel:hover { border-color: var(--brand); transform: translateY(-2px); }
.kachel svg { color: var(--brand); margin-bottom: 6px; flex: none; }
.kachel strong { font-size: 20px; line-height: 1.2; }
.kachel span { font-size: 15px; color: var(--ink-soft); line-height: 1.4; }
.kachel.kachel-haupt { background: var(--brand-flaeche); border-color: var(--brand-flaeche); color: #fff; box-shadow: 0 10px 24px rgba(225,109,13,.32); }
.kachel.kachel-haupt svg, .kachel.kachel-haupt span { color: #fff; }
.kachel.kachel-haupt strong { font-size: 23px; }
.home-sub { font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .kachel { transition: none; } .kachel:hover { transform: none; } }

/* --- Listen, Suche, Nachrichten --- */
.list-plain li { border: 2px solid transparent; border-radius: 14px; box-shadow: 0 1px 4px rgba(23,27,32,.08); padding: 16px 18px; }
.list-plain li:hover { border-color: var(--brand); }
.list-plain li.hat-antwort { border-color: #1d4ed8; }
.status-pill { font-size: 13px; padding: 5px 12px; }
.suchleiste input[type=search], .suchleiste select { min-height: 48px; border: 2px solid var(--line); border-radius: 12px; font-size: 16px; }
.suchleiste .btn { min-height: 44px; }
.wrap.wrap-breit { padding: 20px 24px 16px; }
.portal-seite { max-height: calc(100vh - 175px); }
.portal-seite .card { padding: 18px; }
.portal-seite .card h2 { font-size: 19px; }
.karte-gross { padding: 18px 24px; }
.karte-gross .portal-karte { height: calc(100vh - 240px); }
.msg { font-size: 16px; border-radius: 16px; padding: 12px 15px; }
.msg-form textarea { border: 2px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; }
.portal-reiter button[aria-selected="true"] { border-bottom-width: 4px; }

/* Mittlere Breiten (Tablet, schmales Fenster): Benutzermenü nur mit Kürzel, damit die Kopfzeile einzeilig bleibt. */
@media (max-width: 1000px) {
  .benutzer-name, .benutzer-knopf .pfeil { display: none; }
  .kopf .windows-knopf .windows-text { display: none; } /* schmal: nur das Symbol */
  .kopf .windows-knopf { padding: 0 10px; }
  .benutzer-knopf { padding: 3px; }
}

/* --- Handy --- */
@media (max-width: 760px) {
  .wrap { padding: 18px 12px 60px; }
  .kopf-innen { padding: 0 12px; }
  .kopf .top { padding: 10px 0; column-gap: 10px; }
  .kopf .brand-logo { width: 150px; }
  body.angemeldet .kopf .brand-logo { width: 118px; }
  /* 7.0.1: Fassung A/B am Handy (Höhe wie das Schild der Hausverwaltung). */
  .kopf .brand-logo, body.angemeldet .kopf .brand-logo { width: auto; height: 34px; padding: 3px 7px; border-radius: 8px; }
  .kopf.logo-weiss .brand-logo { height: 38px; padding: 0; }
  /* B nach der Anmeldung etwas kleiner, sonst rutscht das Benutzermenü neben dem Schild der HV in eine zweite Zeile. */
  body.angemeldet .kopf.logo-weiss .brand-logo { height: 32px; padding: 0; }
  .kopf .top .tag { display: none; }
  .kopf-nav { margin: 0 -12px; padding: 4px 12px 3px; }
  .benutzer-name, .benutzer-knopf .pfeil { display: none; }
  .benutzer-knopf { padding: 3px; }
  .kopf-hv { gap: 7px; }
  .kopf-mal { font-size: 18px; }
  .hv-schild { height: 34px; padding: 3px 7px; border-radius: 8px; max-width: 110px; }
  .hv-schild img { height: 28px; max-width: 96px; }
  .kopf-hv-text { display: none; }
  /* Sprache nach der Anmeldung nur als Weltkugel-Knopf (die Auswahl liegt unsichtbar darüber). */
  body.angemeldet .kopf .sprache-wahl { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--kopf-pille);
    display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
  body.angemeldet .kopf .sprache-wahl select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  body.angemeldet .kopf .sprache-wahl:focus-within { outline: 3px solid #fff; outline-offset: 2px; }
  .card, .home-hero { padding: 22px 16px; }
  .card > h2:first-child { font-size: 24px; }
  .home-hero h2 { font-size: 26px; }
  .kacheln { grid-template-columns: 1fr 1fr; }
  .kachel { min-height: 0; padding: 18px 16px; }
  .kachel.kachel-haupt { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
  .kachel.kachel-haupt strong { font-size: 22px; }
  .kachel.kachel-haupt span { flex-basis: 100%; }
  .kachel strong { font-size: 18px; }
  .stepper li { font-size: 13px; }
  .stepper li b { width: 38px; height: 38px; font-size: 16px; }
  .stepper::before { top: 18px; }
  .schritt { padding: 18px 14px 4px; }
  .schritt-hilfe { margin-left: 0; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .msg-form { flex-direction: column; }
}
