/* Ausgemistet – schlichtes Material-3-nahes Design (ANWEISUNG §8). Keine Schatten, Verläufe, Animationen. */

@font-face { font-family: "Roboto"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/static/fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/static/fonts/roboto-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #FFFFFF; --surface: #F3F4F3; --text: #1A1C1B; --text-sub: #5C625F; --line: #E4E6E4;
  --accent: #1A6B5A; --on-accent: #FFFFFF; --accent-soft: #E3F1EC; --warn: #8A4B00; --warn-bg: #FFF3E3;
  --field-line: #C9CDCA;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121312; --surface: #1E201F; --text: #E6E8E6; --text-sub: #A3A8A5; --line: #2E312F;
    --accent: #7FD1BC; --on-accent: #0B2B23; --accent-soft: #1C3A33; --warn: #FFB870; --warn-bg: #33261A;
    --field-line: #3A3E3B;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: Roboto, system-ui, sans-serif; font-size: 16px; line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}
.app { max-width: 520px; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }

/* Kopfzeile */
.kopf { padding: 28px 20px 12px; }
.kopf h1 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -0.2px; }
.kopf p { margin: 4px 0 0; font-size: 14px; color: var(--text-sub); }
.leiste { height: 64px; padding: 0 8px 0 4px; display: flex; align-items: center; gap: 4px; }
.leiste h1 { margin: 0; flex: 1; font-size: 20px; font-weight: 500; }
.leiste .neben { font-size: 14px; color: var(--text-sub); padding-right: 12px; }
.zurueck { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: inherit; }
.zurueck svg { width: 24px; height: 24px; }

/* Hinweis */
.hinweis { margin: 8px 16px 4px; padding: 14px 16px 6px; border-radius: 12px; background: var(--accent-soft); }
.hinweis p { margin: 0; font-size: 14px; line-height: 20px; }
.hinweis .aktionen { display: flex; justify-content: flex-end; }
.hinweis.warn { background: var(--warn-bg); }

/* Filter-Chips */
.chips { display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto; }
.chip { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; }
.chip[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent-soft); font-weight: 500; }

/* Liste */
.liste { list-style: none; margin: 0; padding: 0; }
.zeile { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none; min-height: 76px; }
.zeile .bild { width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0; background: var(--surface); object-fit: cover; }
.zeile .mitte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.zeile .titel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile .meta, .klein { font-size: 13px; color: var(--text-sub); }
.zeile .rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.zeile .preis { font-weight: 500; }
.zeile .status { font-size: 12px; color: var(--text-sub); }
.zeile .status.warn { color: var(--warn); }
.leer { padding: 32px 20px; color: var(--text-sub); text-align: center; }

/* Felder */
.felder { padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.feld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-sub); }
.feld input, .feld textarea, .feld select {
  font-size: 16px; color: var(--text); background: var(--surface); border: 0;
  border-bottom: 1px solid var(--field-line); border-radius: 8px 8px 0 0; min-height: 44px; padding: 10px 12px;
}
.feld textarea { min-height: 96px; resize: vertical; }
.feld input:focus, .feld textarea:focus, .feld select:focus { outline: none; border-bottom: 2px solid var(--accent); }
.feld.unsicher { color: var(--warn); }
.feld.unsicher input, .feld.unsicher textarea { background: var(--warn-bg); border-bottom: 2px solid var(--warn); }
.zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* Preisstufen */
.stufen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stufe { height: 64px; border-radius: 12px; border: 1px solid var(--line); background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.stufe .name { font-size: 12px; color: var(--text-sub); }
.stufe .betrag { font-size: 18px; }
.stufe[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.stufe[aria-pressed="true"] .name { color: var(--text); }
.stufe[aria-pressed="true"] .betrag { font-weight: 500; }

/* Reiter */
.reiter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.reiter a { height: 48px; display: flex; align-items: center; justify-content: center; text-decoration: none;
  color: var(--text-sub); font-size: 15px; border-bottom: 3px solid transparent; }
.reiter a[aria-current="page"] { color: var(--text); font-weight: 500; border-bottom-color: var(--accent); }

/* Kopierzeilen */
.kopierzeile { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.kopierzeile .inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kopierzeile .label { font-size: 12px; color: var(--text-sub); }
.kopierzeile .wert { font-size: 15px; line-height: 21px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Buttons */
.textknopf { height: 44px; padding: 0 8px; background: none; border: 0; color: var(--accent);
  font-size: 14px; font-weight: 500; cursor: pointer; flex-shrink: 0; }
.knopf { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; border-radius: 26px;
  border: 0; background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 500;
  text-decoration: none; cursor: pointer; }
.knopf.zweit { background: none; color: var(--text); border: 1px solid var(--line); font-weight: 400; }
.knopf:disabled { opacity: 0.5; cursor: default; }
.knopfreihe { display: flex; gap: 12px; }
.knopfreihe .knopf.zweit { flex: 1; }
.knopfreihe .knopf:not(.zweit) { flex: 2; }

/* Untere Aktionsleiste */
.unten { position: sticky; bottom: 0; background: var(--bg); padding: 16px 20px 20px;
  display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); }
.unten .klein { margin: 0; text-align: center; }

/* Abschnitte */
.abschnitt { padding: 16px 20px 0; }
.abschnitt h2 { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--text-sub); }

/* Login */
.login { padding: 64px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.login h1 { margin: 0 0 8px; font-size: 26px; font-weight: 500; }
.fehler { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }

/* Kurze Bestätigung "Kopiert" */
.meldung { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); padding: 10px 16px;
  border-radius: 8px; background: var(--text); color: var(--bg); font-size: 14px; }
.meldung[hidden] { display: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Fotos */
.fotos { display: flex; gap: 8px; padding: 4px 20px 16px; overflow-x: auto; }
.fotos img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface); }
.vorschau { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vorschau:empty { display: none; }
.vorschau img { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; background: var(--surface); }
.dateiwahl { cursor: pointer; }
.dateiwahl:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.fehler[hidden] { display: none; }

/* Preisstufen als Radiogruppe (ohne JS wählbar) */
fieldset.feld { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.feld legend { padding: 0; margin-bottom: 4px; }
.stufe { position: relative; }
.stufe input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.stufe:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); }
.stufe:has(input:checked) .name { color: var(--text); }
.stufe:has(input:checked) .betrag { font-weight: 500; }
.stufe:has(input:disabled) { opacity: 0.5; cursor: default; }
.stufe:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.feld.unsicher .stufe { border-color: var(--warn); }
.eigen { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--text); }
.eigen input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; border: 0; flex: none; accent-color: var(--accent); }
.eigen input[name="preis_eigen"] { width: 96px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 8px;
  background: var(--surface); font-size: 16px; color: var(--text); }
.felder-fehler { margin: 8px 16px; }
.warnung { color: var(--warn); font-weight: 500; }
.fotos-rand { padding: 0 0 12px; }
.abschnitt .knopf.zweit { margin-bottom: 8px; }
.status-form { display: flex; flex-direction: column; gap: 10px; }
.status-form .klein { margin: 0; text-align: center; }
.status-form .eigen input[name="preis"] { width: 96px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 8px;
  background: var(--surface); font-size: 16px; color: var(--text); }
textarea.profil { min-height: 72px; }
.gespeichert { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.zwischen { margin: 12px 0 4px; font-size: 14px; font-weight: 500; color: var(--text-sub); }
.abschnitt-in .klein { margin: 0; }
