/* URA-Service – Kundenkonto. Eigenständiges Stylesheet, kein @import von
   ../app.css (das wäre eine zusätzliche Netzwerk-Abhängigkeit) — die
   Farbvariablen sind stattdessen unten aus app.css übernommen (siehe dortiger
   :root-Block) und um Klassen ergänzt, die es in app.css noch nicht gibt
   (Status-Schritte, Tabs, Pills …), im Stil des Referenz-Artefakts
   "URA Kundenkonto.html". */

:root {
  --navy: #0E2A5A;
  --blue: #0B4B9C;
  --teal: #12A88F;
  --teal-ink: #04241E;
  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --surface-2: #EEF3FA;
  --surface-3: #E3EBF6;
  --text: #101F3A;
  --muted: #4C5E7C;
  --border: #D9E3F1;
  --border-strong: #B9C9E0;
  --error: #C0392B;
  --error-bg: #FDECEA;
  --heading: #0E2A5A;
  --ok: #0B5A4C;
  --ok-bg: #E3F5F1;
  --warn: #6B4200;
  --warn-bg: #FFF4D6;
  --wm-opacity: .07;
  --shadow: 0 1px 2px rgba(16, 31, 58, .05), 0 24px 56px -28px rgba(16, 31, 58, .30);
}
@media not all {
  :root {
    --teal: #2ED2B4;
    --bg: #081328;
    --surface: #10244A;
    --surface-2: #16305C;
    --surface-3: #1C3A6B;
    --text: #E7EEFA;
    --muted: #A5B7D4;
    --border: #22406F;
    --border-strong: #33558A;
    --error: #F1707E;
    --error-bg: #3A1A26;
    --heading: #CFE0FA;
    --ok: #6FE0C7;
    --ok-bg: #113A32;
    --warn: #E8A94D;
    --warn-bg: #3A2C0C;
    --wm-opacity: .05;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 56px -28px rgba(0, 0, 0, .75);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--blue); }
@media not all { a { color: var(--teal); } }

.page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* Kopfzeile (gleiches Muster wie app.css .topbar) */
.topbar {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted); font-size: .85rem; }
.brand img { width: 40px; height: 40px; border-radius: 12px; flex: none; box-shadow: 0 2px 8px rgba(16, 31, 58, .15); }
.brand b { display: block; font-family: Outfit, sans-serif; font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; color: var(--heading); line-height: 1.1; }
.langs { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.langs button {
  border: 0; background: transparent; color: var(--muted);
  font-family: Outfit, sans-serif; font-weight: 600; font-size: .8rem;
  padding: 6px 12px; border-radius: 999px; cursor: pointer; min-width: 44px; min-height: 44px;
}
.langs button[aria-pressed="true"] { background: var(--navy); color: #fff; }
@media not all { .langs button[aria-pressed="true"] { background: var(--teal); color: var(--teal-ink); } }

/* Hauptbereich: ein Konto ist keine Zweispalten-Ansicht wie der Upload,
   sondern eine schmale, handyartige Spalte in der Mitte der Seite. */
.main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 20px 110px;
}
.scr { display: flex; flex-direction: column; gap: 18px; animation: in .2s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .scr { animation: none; } }

h1, h2 { font-family: Outfit, sans-serif; color: var(--heading); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.05rem; font-weight: 700; }
.cap { font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.lead { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--muted); }
.small { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--muted); }

.ico-lg {
  width: 52px; height: 52px; border-radius: 16px; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.ico-lg svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Formulare */
form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; min-width: 0; }
.hint { font-size: .78rem; font-weight: 400; color: var(--muted); }
input:not([type=radio]):not([type=checkbox]):not([type=file]), textarea, select {
  width: 100%; min-width: 0; height: 50px; padding: 0 14px; font-size: 1rem;
  border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--surface); color: var(--text);
  -webkit-appearance: none; appearance: none;
}
textarea { height: auto; padding: 12px 14px; line-height: 1.45; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); outline-offset: 2px; border-color: var(--blue);
}
input.code { height: 60px; font-size: 1.6rem; letter-spacing: .5rem; text-align: center; }

.btn {
  font-family: Outfit, sans-serif; min-height: 52px; border: 0; border-radius: 12px;
  background: var(--blue); color: #fff; font-size: 1.02rem; font-weight: 600; cursor: pointer; padding: 0 20px;
}
.btn:hover { background: #093e82; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: var(--surface); color: var(--navy); border: 1px solid var(--border-strong); }
@media not all { .btn.ghost { color: var(--heading); } }
.btn.sm { min-height: 42px; font-size: .92rem; padding: 0 16px; border-radius: 10px; }
.btn.warn { background: var(--error); }
.btn.upload { padding: 0 26px; }

.back, .link { align-self: flex-start; min-height: 40px; padding: 0 2px; border: 0; background: transparent; color: var(--blue); font-size: .92rem; font-weight: 600; cursor: pointer; }
@media not all { .back, .link { color: var(--teal); } }
.link.muted { color: var(--muted); align-self: center; }

.err { margin: 0; color: var(--error); font-size: .9rem; font-weight: 500; min-height: 0; }
.err:empty { display: none; }
.ferr { color: var(--error); font-size: .85rem; font-weight: 500; }
.ferr:empty { display: none; }
input.bad { border-color: var(--error) !important; }
.ok { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: .92rem; font-weight: 600; }

.note {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  font-size: .84rem; line-height: 1.45; color: var(--muted);
}
.note svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }

/* Karten */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.card.danger h2 { color: var(--text); }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* Fall-Kachel auf der Übersicht */
.case {
  display: flex; flex-direction: column; gap: 12px; width: 100%; text-align: left;
  padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
  cursor: pointer; box-shadow: var(--shadow);
}
.case:hover { border-color: var(--border-strong); }
.case .hd { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.case .t { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.case .no { font-size: .82rem; color: var(--muted); white-space: nowrap; }

.pill { align-self: flex-start; font-size: .8rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--surface-3); color: var(--blue); }
.pill.act { background: var(--warn-bg); color: var(--warn); }
.pill.done { background: var(--ok-bg); color: var(--ok); }

.bar-track { display: block; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 99px; background: var(--teal); }
.bar-track i.act { background: #D9A21B; }

.empty {
  padding: 22px; text-align: center; background: var(--surface-2);
  border: 1px dashed var(--border-strong); border-radius: 16px; color: var(--muted); font-size: .95rem; line-height: 1.5;
}

/* "Es fehlen noch Unterlagen"-Banner */
.todo {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px;
  border: 1px solid #F0D48A; border-radius: 16px; background: var(--warn-bg); color: var(--warn); cursor: pointer;
}
.todo .ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.todo svg { width: 22px; height: 22px; fill: none; stroke: #8A5A00; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.todo b { display: block; font-size: 1rem; }
.todo span { font-size: .88rem; }
.todo .ch { margin-left: auto; font-size: 1.4rem; }

/* Status-Schritte (Fall-Detail) */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 14px; }
.steps .rail { display: flex; flex-direction: column; align-items: center; }
.steps .dot {
  width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center;
}
.steps .done .dot { background: var(--teal); border-color: var(--teal); }
.steps .cur .dot { border: 3px solid var(--blue); }
.steps .dot svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.steps .ln { width: 2px; flex: 1; min-height: 18px; background: var(--border); }
.steps .done .ln { background: var(--teal); }
.steps li:last-child .ln { display: none; }
.steps .tx { padding-bottom: 16px; display: flex; flex-direction: column; gap: 2px; }
.steps .tx b { font-size: .95rem; font-weight: 500; line-height: 1.3; color: var(--muted); }
.steps .done .tx b { color: var(--text); }
.steps .cur .tx b { font-weight: 700; color: var(--navy); }
@media not all { .steps .cur .tx b { color: var(--heading); } }

/* Tabs innerhalb einer Fall-Karte (Dokumente / Angaben-Hinweis usw. teilen sich
   die Karte über data-tab-Buttons) */
.subtabs { display: flex; gap: 6px; padding: 3px; background: var(--surface-2); border-radius: 12px; }
.subtabs button {
  flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 8px 10px;
  font-weight: 600; font-size: .86rem; color: var(--muted); cursor: pointer;
}
.subtabs button[aria-pressed="true"] { background: var(--surface); color: var(--navy); box-shadow: var(--shadow); }
@media not all { .subtabs button[aria-pressed="true"] { color: var(--heading); } }

/* Dropzone / Datei-Upload — 1:1 aus app.css übernommenes Muster */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px; min-height: 190px; padding: 26px 18px;
  border: 2px dashed var(--border-strong); border-radius: 16px;
  background: var(--surface-2); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--teal); background: var(--surface-3); }
.dropzone:focus-within { outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent); outline-offset: 2px; }
.dz-icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
}
.dz-icon svg { width: 24px; height: 24px; stroke: var(--teal); stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dz-title { font-family: Outfit, sans-serif; font-weight: 600; font-size: 1.02rem; color: var(--heading); }
.dz-or { color: var(--muted); font-size: .86rem; }
.dz-hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.errors { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 8px; z-index: 60; margin-inline: 12px; }
.error {
  background: var(--error-bg); color: var(--error); border-radius: 10px; padding: 10px 14px;
  font-size: .88rem; display: flex; gap: 10px; align-items: flex-start;
}
.error button { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 2px; }

.progress-list { display: flex; flex-direction: column; gap: 10px; }
.up-item { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; }
.up-row { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; }
.up-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row .s { color: var(--muted); flex: none; }
.bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 99px; transition: width .2s ease; }
.bar.indet i { width: 35%; animation: indet 1.1s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

.pending { border: 1px solid var(--teal); border-radius: 16px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.pending-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pending-list { display: flex; flex-direction: column; gap: 8px; }
.pending-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.pending-item .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-3); color: var(--heading); display: flex; align-items: center; justify-content: center; font-family: Outfit, sans-serif; font-weight: 600; font-size: .68rem; }
.pending-item .meta { min-width: 0; }
.pending-item .name { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-item .sub { font-size: .78rem; color: var(--muted); }
.photo-hint { font-size: .76rem; color: #A8620A; margin-top: 3px; }
@media not all { .photo-hint { color: #E8A94D; } }
.pending-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pending-hint { font-size: .8rem; color: var(--muted); flex: 1 1 160px; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: .84rem; cursor: pointer; text-decoration: underline; padding: 0; }

.files-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.select-all { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); cursor: pointer; }
.files { display: flex; flex-direction: column; gap: 8px; }
.file {
  display: grid; grid-template-columns: auto 48px minmax(0, 1fr) auto; align-items: start; gap: 12px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 14px; padding: 10px 12px;
}
.file.sel { border-color: var(--teal); background: var(--surface-3); }
.file img, .file .ico { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.file .ico { background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-family: Outfit, sans-serif; font-weight: 600; font-size: .68rem; }
.file .meta { min-width: 0; padding-top: 2px; }
.file .name { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.file .sub { font-size: .78rem; color: var(--muted); }
.typ-auswahl { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.typ-label { font-size: .76rem; color: var(--muted); }
.typ-auswahl select { font-size: .8rem; height: auto; padding: 4px 8px; border-radius: 8px; max-width: 180px; }
.typ-erkannt { font-size: .78rem; color: var(--teal-ink, var(--teal)); background: color-mix(in srgb, var(--teal) 18%, transparent); border-radius: 8px; padding: 3px 9px; }
.typ-final { font-size: .78rem; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 3px 9px; }
.typ-fehlgeschlagen { border: 1.5px solid var(--error); border-radius: 10px; padding: 8px; background: var(--error-bg); }
.typ-hinweis { margin: 0 0 6px; font-size: .78rem; color: var(--error); font-weight: 600; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--error); border-color: var(--error); }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--teal); cursor: pointer; margin: 0; flex: none; }

.selbar {
  position: sticky; bottom: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 12px 10px 18px; box-shadow: var(--shadow);
}
@media not all { .selbar { background: var(--surface-3); } }
.selbar .btn { min-height: 40px; }

/* Checkliste */
.cl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cl-title { color: var(--muted); font-size: .84rem; margin: 2px 0 0; }
.cl-count { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.cl-bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.cl-bar i { display: block; height: 100%; background: var(--teal); border-radius: 99px; transition: width .25s ease; }
.cl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-item label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border-radius: 10px; cursor: pointer; }
.cl-item label:hover { background: var(--surface-2); }
.cl-item input { margin-top: 2px; }
.cl-doc { font-size: .92rem; color: var(--text); line-height: 1.4; }
.cl-note { font-size: .78rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.cl-item.done .cl-doc { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.cl-hint { font-size: .78rem; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.cl-empty { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }
.muster-link { background: none; border: 0; color: var(--blue); font-size: .8rem; margin-top: 4px; cursor: pointer; text-decoration: underline; padding: 0; display: block; }
@media not all { .muster-link { color: var(--teal); } }

.photo-tips { margin: -4px 0 0; font-size: .84rem; }
.photo-tips summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.photo-tips p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }

/* Angaben (Lesen) */
.rows { display: flex; flex-direction: column; }
.rowd { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--surface-3); }
.rowd:first-child { border-top: 0; }
.rowd .k { color: var(--muted); font-size: .88rem; }
.rowd .v { font-weight: 600; text-align: right; }

/* Nachricht/Termine-Platzhalter */
.placeholder { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 34px 20px; }
.placeholder .ico-lg { background: var(--surface-3); }
.placeholder .ico-lg svg { stroke: var(--navy); }
@media not all { .placeholder .ico-lg svg { stroke: var(--heading); } }
.tel { font-size: 1.05rem; font-weight: 700; text-decoration: none; color: var(--navy); }
@media not all { .tel { color: var(--heading); } }

/* Tab-Leiste unten (Fall / Angaben / Nachricht / Termine) */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px));
}
.tabs button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 50px; border: 0; background: transparent; font-size: .72rem; font-weight: 600; color: #6B7A93; cursor: pointer;
}
.tabs button[aria-current="page"] { color: var(--blue); }
@media not all { .tabs button[aria-current="page"] { color: var(--teal); } }
.tabs svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.toast {
  position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 60;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: .9rem; box-shadow: var(--shadow);
}
@media not all { .toast { background: var(--surface-3); } }

/* Bestätigungsdialog / Musterbilder-Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 19, 40, .55); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); color: var(--text); border-radius: 18px; padding: 24px; width: 100%; max-width: 440px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.modal h2 { font-size: 1.15rem; margin-bottom: 8px; }
.modal p { margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.modal ul { margin: 0 0 18px; padding-left: 20px; font-size: .9rem; max-height: 160px; overflow: auto; word-break: break-word; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.muster-modal { max-width: 480px; }
.muster-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muster-head .icon-btn { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.muster-img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); margin: 10px 0; }
.muster-text { margin: 0; }

.center { max-width: 480px; margin: 8vh auto 0; padding: 0 16px; text-align: center; }
.center p { color: var(--muted); }
.loading { color: var(--muted); text-align: center; padding: 60px 0; }

.legal-links { position: relative; z-index: 1; text-align: center; font-size: .8rem; color: var(--muted); padding: 0 16px 24px; }
.legal-links a { color: var(--muted); }

/* Nachricht: Chat-Verlauf + Formular */
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: .95rem; line-height: 1.45; white-space: pre-line; overflow-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg small { display: block; margin-top: 4px; font-size: .72rem; opacity: .75; }
.msg-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg-form textarea { width: 100%; min-height: 80px; padding: 12px 14px; font-size: .95rem; line-height: 1.4; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); resize: vertical; }

/* Termine: Buchungsformular */
.fields { display: flex; flex-direction: column; gap: 14px; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; }
.fields input, .fields select, .fields textarea { font: inherit; font-weight: 400; font-size: .95rem; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; background: var(--surface); color: var(--text); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 6px; }
.opt { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: 10px 8px; text-align: center; font-size: .9rem; color: var(--text); cursor: pointer; }
.opt[aria-pressed="true"] { border-color: var(--blue); background: var(--surface-3); color: var(--navy); font-weight: 600; }
.orow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hd.top { align-items: flex-start; }

/* Monatskalender (Terminanfrage) */
.cal { margin-top: 6px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-h b { color: var(--heading); font-size: 1rem; text-transform: capitalize; }
.cal-nav { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--navy); font-size: 1.4rem; cursor: pointer; }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: .75rem; color: var(--muted); padding: 2px 0 4px; }
.cal-d { height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .95rem; cursor: default; padding: 0; }
.cal-d.frei { border-color: var(--teal); background: var(--ok-bg); color: var(--ok); font-weight: 700; cursor: pointer; }
.cal-d.voll { background: var(--surface-3, #eef2f8); color: var(--muted); opacity: .75; }
.cal-d.zu { border-color: transparent; background: transparent; opacity: .45; }
.cal-d.heute { outline: 2px solid var(--border-strong); outline-offset: -2px; }
.cal-d[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.cal-leg { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.cal-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.l-frei { background: var(--ok-bg); border: 1px solid var(--teal); }
.l-voll { background: var(--surface-3, #eef2f8); border: 1px solid var(--border); }

.msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tab-dot { position: absolute; top: 6px; left: calc(50% + 6px); width: 11px; height: 11px; border-radius: 50%; background: #D93025; border: 2px solid var(--surface); }

/* Kundenseiten: Hell ist Standard; Dark-Regeln bleiben im Code, sind aber abgeschaltet (@media not all). */
:root{color-scheme:light}

/* Dokumenterkennung je Datei (datei-info.js): Rückfrage "Stimmt das?", Bearbeiten, Hinweise des Servers */
.erkennung-karte { flex: 1 1 100%; border: 1px solid color-mix(in srgb, var(--teal) 40%, transparent); background: color-mix(in srgb, var(--teal) 8%, transparent); border-radius: 10px; padding: 8px 12px; }
.erkennung-karte p { margin: 0 0 4px; }
.erkennung-titel { font-size: .78rem; color: var(--muted); }
.erkennung-text { font-size: .95rem; }
.erkennung-frage { font-size: .86rem; font-weight: 600; margin-top: 6px !important; }
.erkennung-abgelaufen { font-size: .82rem; color: var(--error); font-weight: 600; }
.erkennung-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.typ-editor { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin-top: 8px; }
.typ-editor .typ-label { font-size: .78rem; color: var(--muted); }
.typ-editor input[type="date"] { font-size: .85rem; padding: 4px 8px; border-radius: 8px; max-width: 180px; }
.server-hint { font-weight: 600; flex: 1 1 100%; }

/* Foto aufnehmen: nur auf Geräten mit Touch-Bedienung (Handy/Tablet) sichtbar, öffnet direkt die Kamera */
.cam-row { display: none; margin: 8px 0 4px; }
.cam-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (pointer: coarse) { .cam-row { display: block; } .cam-btn { width: 100%; } }

/* Vom Büro nachgefordert */
.cl-requested { display: inline-block; margin-top: 3px; padding: 2px 8px; border-radius: 8px; font-size: .76rem; font-weight: 600; background: rgba(225, 140, 20, .16); color: #8A4B00; }
.cl-requested[hidden] { display: none; }
.cl-by { display: inline-block; margin-top: 3px; padding: 2px 8px; border-radius: 8px; font-size: .76rem; font-weight: 600; background: rgba(11, 75, 156, .1); color: #0B4B9C; }
.cl-item input:disabled { cursor: not-allowed; }
