/* Farb-Tokens: Light-Werte sind 1:1 die bisherigen Farben (keine optische
   Änderung im hellen Modus). Dark-Werte unten überschreiben nur, was sich
   wirklich ändern muss — Chip-/Lightbox-Overlays liegen auf Fotos statt auf
   der Seite und bleiben deshalb in beiden Modi gleich dunkel. */
:root {
  --ink: #1a1a1a;               /* Haupttext, aktiver Tab, Primär-Button-Fläche */
  --paper: #fff;                /* Flächen (Karten/Header/Inputs), Primär-Button-Text */
  --bg-page: #f7f6f2;
  --bg-fixpanel: #faf9f6;
  --bg-cream: #fbfaf7;
  --bg-archive: #fafaf8;
  --bg-chip: #efede8;
  --bg-stripe-a: #f3f1e9;
  --bg-stripe-b: #eceade;
  --bg-photo-btn: #e7e5e0;
  --bg-page-overlay: rgba(247,246,242,.94);

  --text-muted: rgba(0,0,0,.55);
  --text-medium: rgba(0,0,0,.5);
  --text-subtle: rgba(0,0,0,.45);
  --text-faint: rgba(0,0,0,.4);
  --text-warm: #8a8778;
  --text-warm-2: #9a9788;
  --text-warm-3: #6b6858;
  --text-warm-faint: #a5a294;

  --border-hairline: rgba(0,0,0,.05);
  --border-faint: rgba(0,0,0,.06);
  --border-subtle: rgba(0,0,0,.07);
  --border-soft: rgba(0,0,0,.08);
  --border-table: rgba(0,0,0,.1);
  --border-input: rgba(0,0,0,.12);
  --border-medium: rgba(0,0,0,.15);
  --border-dropzone: rgba(0,0,0,.2);
  --border-icon: rgba(0,0,0,.3);
  --border-warm: #e6e3d8;
  --border-textarea: #dedbd0;
  --border-viz-empty: #d8d5c8;
  --border-dropzone-viz: #c9c6ba;
  --border-tile-footer: #efede3;

  --price-green: #188038;
  --warn-orange: #b45309;
  --danger-red: #b3261e;
  --error-red: #b91c1c;
  --btn-disabled-bg: #1a1a18;

  --shadow-hairline: rgba(0,0,0,.04);
  --shadow-card: rgba(0,0,0,.05);
  --shadow-dialog: rgba(0,0,0,.3);
  --shadow-lightbox-img: rgba(0,0,0,.4);

  /* Dunkle Chip-/Overlay-Flächen (Entfernen-Buttons, Lightbox, Dialog-
     Backdrop) — liegen auf Fotos, nicht auf der Seite, bleiben konstant */
  --chip-dark: rgba(20,20,18,.72);
  --chip-dark-hover: rgba(20,20,18,.9);
  --chip-text: #fff;
  --backdrop-lightbox: rgba(20,20,18,.85);
  --backdrop-dialog: rgba(20,20,18,.45);
}
:root[data-theme="dark"] {
  --ink: #efeee7;
  --paper: #242019;
  --bg-page: #1c1a16;
  --bg-fixpanel: #2c2820;
  --bg-cream: #2c2820;
  --bg-archive: #2c2820;
  --bg-chip: #33302a;
  --bg-stripe-a: #2a2721;
  --bg-stripe-b: #332f27;
  --bg-photo-btn: #33302a;
  --bg-page-overlay: rgba(28,26,22,.94);

  --text-muted: rgba(239,238,231,.6);
  --text-medium: rgba(239,238,231,.55);
  --text-subtle: rgba(239,238,231,.5);
  --text-faint: rgba(239,238,231,.45);
  --text-warm: #a8a394;
  --text-warm-2: #b0aa9c;
  --text-warm-3: #9c9788;
  --text-warm-faint: #8c8778;

  --border-hairline: rgba(255,255,255,.08);
  --border-faint: rgba(255,255,255,.09);
  --border-subtle: rgba(255,255,255,.1);
  --border-soft: rgba(255,255,255,.11);
  --border-table: rgba(255,255,255,.13);
  --border-input: rgba(255,255,255,.16);
  --border-medium: rgba(255,255,255,.2);
  --border-dropzone: rgba(255,255,255,.25);
  --border-icon: rgba(255,255,255,.35);
  --border-warm: #3d3a31;
  --border-textarea: #3a372e;
  --border-viz-empty: #403c33;
  --border-dropzone-viz: #4a473c;
  --border-tile-footer: #3a372e;

  --price-green: #4cae6e;
  --warn-orange: #e0954f;
  --danger-red: #e5675f;
  --error-red: #e5645f;
  --btn-disabled-bg: #4a473e;

  --shadow-hairline: rgba(0,0,0,.2);
  --shadow-card: rgba(0,0,0,.2);
  --shadow-dialog: rgba(0,0,0,.5);
  --shadow-lightbox-img: rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
/* Jede Regel, die auf einem [hidden]-Element unconditional display setzt,
   hebelt sonst das hidden-Attribut aus (Autoren-CSS schlägt die
   UA-Default-Regel [hidden]{display:none} unabhängig von Spezifität) —
   ein für alle Mal global abgesichert statt Klasse für Klasse zu patchen. */
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg-page);
       font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--ink); }

/* Kopfzeile: echte Tabs links, Kataloge-Verweis rechts */
header { display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 28px; background: var(--paper); border-bottom: 1px solid var(--border-subtle); }
nav.tabs { display: flex; gap: 28px; }
nav.tabs a { padding: 18px 2px 13px; font-size: 14.5px; font-weight: 700;
  text-decoration: none; color: var(--text-medium);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
nav.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
a.managelink { font-size: 12.5px; color: var(--text-medium);
  text-decoration: underline; text-underline-offset: 3px;
  padding: 18px 0 15px; }
a.back { font-size: 13px; color: var(--text-medium); text-decoration: none;
  padding: 16px 0; }
.pagetitle { font-size: 15px; font-weight: 700; padding: 16px 0;
  margin-right: auto; margin-left: 14px; }

/* Theme-Umschalter: fest positioniert, unabhängig davon, welche Seite den
   {% block header %} überschreibt (Kataloge-Seite ersetzt ihn komplett) */
.theme-toggle { position: fixed; bottom: 20px; right: 20px; width: 44px;
  height: 44px; border-radius: 50%; border: 1px solid var(--border-input);
  background: var(--paper); font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; box-shadow: 0 2px 8px var(--shadow-card);
  z-index: 500; }

main { max-width: 780px; margin: 0 auto; padding: 30px 24px 60px; }
main.main-wide { max-width: 1400px; }

/* Suchleiste */
.searchbar { display: flex; gap: 10px; }
.searchbar input[type=search] { flex: 1; min-width: 0; height: 56px;
  border: 1px solid var(--border-input); border-radius: 14px; padding: 0 20px;
  font-size: 19px; background: var(--paper); color: var(--ink); outline: none;
  box-shadow: 0 1px 2px var(--shadow-hairline); }
.searchbar button[type=submit] { height: 56px; padding: 0 26px; border: 0;
  background: var(--ink); color: var(--paper); border-radius: 14px; font-size: 16px;
  font-weight: 600; cursor: pointer; }
.searchbar button.photo { height: 56px; width: 60px; border: 0;
  background: var(--bg-photo-btn); border-radius: 14px; font-size: 22px; cursor: pointer; }
.searchbar button.photo.off { opacity: .4; cursor: help; }

/* Lade-Overlay Foto-Suche: /photo ist ein normaler Form-POST (Vollseiten-
   Reload), der Gemini-Vision-Aufruf braucht mehrere Sekunden — ohne
   sichtbares Signal wirkt die Seite in der Zeit wie eingefroren. */
.photo-loading { position: fixed; inset: 0; background: var(--bg-page-overlay);
  display: flex; align-items: center; justify-content: center; z-index: 999; }
.photo-loading-box { display: flex; flex-direction: column; align-items: center;
  gap: 14px; background: var(--paper); border: 1px solid var(--border-subtle);
  border-radius: 14px; padding: 28px 36px; box-shadow: 0 1px 3px var(--shadow-card); }
.photo-spinner { width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--border-input); border-top-color: var(--ink);
  animation: photo-spin .8s linear infinite; }
.photo-loading-box p { margin: 0; font-size: 14px; color: var(--text-muted); }
@keyframes photo-spin { to { transform: rotate(360deg); } }

/* Treffer-Karten */
.hits { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.hit, .card { background: var(--paper); border: 1px solid var(--border-subtle);
  border-radius: 14px; padding: 20px 24px;
  box-shadow: 0 1px 3px var(--shadow-card); }
.hit-head { display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; }
.hit .design { font-size: 19px; font-weight: 700; }
.hit .sub { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }
.codechip { font-family: ui-monospace, Menlo, monospace; font-size: 13px;
  background: var(--bg-chip); border-radius: 7px; padding: 5px 10px;
  white-space: nowrap; }
.pricerow { display: flex; gap: 44px; margin-top: 16px; align-items: flex-end;
  flex-wrap: wrap; }
.pricerow .plabel { font-size: 11px; color: var(--text-subtle);
  letter-spacing: .04em; }
.pricerow .pcap { font-size: 11px; color: var(--text-subtle); }
.pricerow .ek { font-size: 19px; font-weight: 700; margin-top: 2px;
  white-space: nowrap; }
.pricerow .vk { font-size: 25px; font-weight: 800; color: var(--price-green);
  margin-top: 2px; white-space: nowrap; }
.hitlinks { margin-left: auto; display: flex; flex-direction: column;
  gap: 8px; font-size: 12.5px; align-items: flex-start; }
.hitlinks a, .hitlinks button { display: flex; align-items: center; gap: 5px;
  color: var(--text-muted); text-decoration: underline;
  text-underline-offset: 3px; border: 0; background: none; padding: 0;
  font-size: 12.5px; cursor: pointer; font-family: inherit; }
.listline { margin-top: 12px; font-size: 11.5px; color: var(--text-faint); }
.flag { color: var(--warn-orange); font-size: .8rem; }
.empty { color: var(--text-muted); margin-top: 22px; }
.error, .warning { color: var(--error-red); }

/* Preis-Korrektur-Panel in der Treffer-Karte */
.fixpanel { display: none; margin-top: 14px; background: var(--bg-fixpanel);
  border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; }
.fixpanel.open { display: block; }
.fixpanel .fixhead { display: flex; align-items: center;
  justify-content: space-between; }
.fixpanel .fixtitle { font-size: 11px; font-weight: 700;
  color: var(--text-muted); letter-spacing: .03em; text-transform: uppercase; }
.fixpanel .fixclose { border: 0; background: none; cursor: pointer;
  color: var(--text-medium); font-size: 14px; padding: 2px 6px; }
.fixpanel .fixrow { display: flex; gap: 14px; margin-top: 8px;
  align-items: flex-end; flex-wrap: wrap; }
.fixpanel label { font-size: 11px; color: var(--text-subtle); display: block; }
.fixpanel input { width: 96px; height: 38px; border: 1px solid var(--border-medium);
  border-radius: 9px; padding: 0 10px; font-size: 15px; font-weight: 700;
  background: var(--paper); color: var(--ink); outline: none; margin-top: 3px; }
.fixpanel input.vk { border: 1.5px solid var(--price-green); color: var(--price-green); }
.fixpanel button.save { margin-left: auto; padding: 9px 16px;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* Kataloge-Seite */
.dropzone { display: block; position: relative;
  border: 1.5px dashed var(--border-dropzone); border-radius: 14px; padding: 26px;
  text-align: center; background: var(--paper); cursor: pointer; }
.dropzone b { font-size: 14.5px; font-weight: 600; }
.dropzone b span { text-decoration: underline; text-underline-offset: 3px; }
.dropzone small { display: block; font-size: 12px; color: var(--text-subtle);
  margin-top: 5px; }
.dropzone input { display: none; }
.dropzone.off { border-style: solid; cursor: default; }

/* Visualisierung-Dropzones: eigenes Aussehen nur innerhalb .viz-uploads,
   damit die Kataloge-Ablagefläche (teilt sich die .dropzone-Basisklasse)
   unverändert bleibt (Regression bei Task 2 gefunden + hier behoben) */
.viz-uploads .dropzone { border-color: var(--border-dropzone-viz); border-radius: 10px;
  background: var(--bg-cream); padding: 0; aspect-ratio: 1; overflow: hidden; }
.viz-uploads .dropzone b { font-size: 12px; line-height: 1.3; }
.viz-uploads .dropzone small { font-size: 10.5px; color: var(--text-warm-2); margin-top: 0; }
.dropzone-empty { position: absolute; inset: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 10px; }
.dropzone-plus { font-size: 18px; line-height: 1; color: var(--text-warm); }
.dropzone-label { min-height: 32px; display: flex; align-items: center;
  justify-content: center; }
.dropzone.has-preview .dropzone-empty { display: none; }
.dropzone-preview { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; }
.dropzone-remove { position: absolute; top: 6px; right: 6px; width: 22px;
  height: 22px; padding: 0; display: flex; align-items: center;
  justify-content: center; border: none; border-radius: 50%;
  background: var(--chip-dark); color: var(--chip-text); font-size: 11px; line-height: 1;
  cursor: pointer; }
.dropzone-remove:hover { background: var(--chip-dark-hover); }

/* Feste Referenzhöhe statt gegenseitigem Stretch: Formkarte und Ergebnisspalte
   zielen beide unabhängig auf denselben Wert (D-009-Prinzip auf CSS
   angewandt) — verhindert, dass Kachel-Änderungen rechts die Formkarte
   links zum "Springen" bringen, weil keine Seite die andere zur Laufzeit
   misst. Wert = natürliche Höhe der Formkarte bei fixer 360px-Spaltenbreite
   (Titel + 2 Dropzones + Button-Gruppe + Padding), siehe Playwright-Messung. */
/* Feste Blockbreite statt volles 1fr auf main-wide: sonst bleibt bei
   wenigen Ergebnissen viel Leerraum rechts stehen, weil die Ergebnis-
   spalte sich immer auf die volle main-wide-Breite streckt (2026-07-22).
   max-width + margin:auto zentrieren den GESAMTEN Zwei-Spalten-Block —
   unabhängig von der Kachelzahl (feste Konstante statt content-
   abhängiger Breite, D-010-Prinzip), springt also nicht, wenn Ergebnisse
   dazukommen/verschwinden. 1200px = 360px Formkarte + 28px Gap + 812px
   Ergebnisspalte (passt für 3 Kacheln je Reihe à min. 260px, s. .viz-gallery). */
.viz-layout { display: grid; grid-template-columns: 360px 1fr; gap: 28px;
  align-items: start; --viz-panel-min-height: 320px;
  max-width: 1200px; margin: 0 auto; }
.viz-form-card { background: var(--paper); border: 1px solid var(--border-warm); border-radius: 14px;
  padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 8px;
  min-height: var(--viz-panel-min-height); }
.viz-form-title { font-size: 15px; font-weight: 700; }
.viz-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.viz-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.viz-generate { border-radius: 99px; padding: 11px; font-size: 14px;
  font-weight: 700; width: 100%; transition: filter .15s; }
.viz-generate:disabled { background: var(--btn-disabled-bg); opacity: .45; cursor: default; }
.viz-generate:not(:disabled):hover { filter: brightness(1.25); }
.viz-prompt-toggle { align-self: center; background: none; border: none;
  cursor: pointer; font-size: 12.5px; color: var(--text-warm); text-decoration: underline;
  padding: 0; }
.viz-prompt-textarea { width: 100%; box-sizing: border-box; margin-top: 10px;
  border: 1px solid var(--border-textarea); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; background: var(--bg-cream); color: var(--ink); resize: vertical; outline: none; }

.viz-results { display: flex; flex-direction: column; gap: 14px;
  min-height: var(--viz-panel-min-height); }
.viz-results-heading { font-size: 12px; font-weight: 700; color: var(--text-warm);
  letter-spacing: .06em; text-transform: uppercase; padding-top: 26px;
  line-height: 1; margin: 0; }
.viz-empty { max-width: 640px; border: 1.5px dashed var(--border-viz-empty);
  border-radius: 14px; flex: 1; min-height: 0; display: flex; align-items: center;
  justify-content: center; color: var(--text-warm-faint); font-size: 13.5px; text-align: center;
  padding: 20px; }
.viz-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; }
.viz-gallery:empty { display: none; }
.viz-tile { position: relative; background: var(--paper); border: 1px solid var(--border-warm);
  border-radius: 14px; overflow: hidden; }
.viz-tile > img:first-child { display: block; width: 100%; height: 210px;
  object-fit: cover; cursor: zoom-in; }
.viz-tile-pending, .viz-tile-error { height: 210px; display: flex;
  align-items: center; justify-content: center; text-align: center; padding: 16px;
  font-size: 13px; color: var(--text-warm); }
.viz-tile-error { flex-direction: column; gap: 10px; }
.viz-tile-retry { padding: 7px 14px; border: 1px solid var(--border-medium);
  border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 600;
  cursor: pointer; }
.viz-tile-retry:disabled { opacity: .45; cursor: default; }
.viz-tile-remove { position: absolute; top: 8px; right: 8px; width: 26px;
  height: 26px; padding: 0; display: flex; align-items: center;
  justify-content: center; border: none; border-radius: 50%;
  background: var(--chip-dark); color: var(--chip-text); font-size: 12px; cursor: pointer; }
.viz-tile-remove:disabled { opacity: .45; cursor: default; }
.viz-tile-pending { background: repeating-linear-gradient(45deg, var(--bg-stripe-a), var(--bg-stripe-a) 12px,
  var(--bg-stripe-b) 12px, var(--bg-stripe-b) 24px); animation: viz-pulse 1.6s ease-in-out infinite; }
@keyframes viz-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.viz-tile-footer { display: flex; align-items: center; gap: 8px; padding: 12px;
  border-top: 1px solid var(--border-tile-footer); }
.viz-tile-footer img { width: 32px; height: 32px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border-warm); cursor: zoom-in; }
.viz-tile-label { font-size: 10.5px; color: var(--text-warm); line-height: 1.3; }
.viz-tile-time { margin-left: auto; font-size: 11.5px; color: var(--text-warm-faint); white-space: nowrap; }
.viz-tile-prompt { padding: 0 12px 12px; font-size: 12px; color: var(--text-warm-3);
  font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.viz-lightbox { position: fixed; inset: 0; background: var(--backdrop-lightbox);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  cursor: zoom-out; padding: 40px; box-sizing: border-box; }
.viz-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 6px; box-shadow: 0 10px 40px var(--shadow-lightbox-img); }
.viz-lightbox-close { position: absolute; top: 20px; right: 24px; width: 36px;
  height: 36px; border: none; border-radius: 50%; background: var(--chip-dark);
  color: var(--chip-text); font-size: 16px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; }
.viz-lightbox-close:hover { background: var(--chip-dark-hover); }
.viz-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: var(--chip-dark); color: var(--chip-text); font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.viz-lightbox-nav:hover { background: var(--chip-dark-hover); }
.viz-lightbox-prev { left: 20px; }
.viz-lightbox-next { right: 20px; }
.viz-lightbox-actions { position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%); display: flex; gap: 10px; cursor: default; }
.viz-lightbox-actions button, .viz-lightbox-actions a {
  padding: 9px 18px; border-radius: 99px; border: none; font-size: 13px;
  font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--chip-dark); color: var(--chip-text); }
.viz-lightbox-actions button:hover, .viz-lightbox-actions a:hover {
  background: var(--chip-dark-hover); }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-subtle); margin: 26px 0 12px; }
.cat-list { display: flex; flex-direction: column; gap: 16px; }
.cat-card { background: var(--paper); border: 1px solid var(--border-subtle);
  border-radius: 14px; box-shadow: 0 1px 3px var(--shadow-card); }
.cat-head { display: flex; align-items: center; gap: 16px;
  padding: 18px 22px; flex-wrap: wrap; }
.cat-name { font-size: 15.5px; font-weight: 700; }
.cat-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.cat-sub a { color: var(--text-medium); text-decoration: underline;
  text-underline-offset: 3px; }
.cat-actions { margin-left: auto; display: flex; gap: 8px;
  align-items: center; }
button, .btn { padding: 8px 14px; border: 1px solid var(--border-medium);
  border-radius: 9px; background: var(--paper); cursor: pointer;
  text-decoration: none; color: var(--ink); font-size: 12.5px;
  font-weight: 600; font-family: inherit; }
button.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.iconbtn { width: 38px; height: 36px; display: flex; align-items: center;
  justify-content: center; border: 1px solid var(--border-input);
  border-radius: 9px; background: var(--paper); color: var(--text-muted);
  cursor: pointer; padding: 0; }
.archive { border-top: 1px solid var(--border-faint); padding: 10px 22px 12px;
  background: var(--bg-archive); border-radius: 0 0 14px 14px; }
.archive-label { font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
summary.archive-label { cursor: pointer; user-select: none; }
summary.archive-label::marker { color: var(--border-icon); }
.archived-row { display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text-subtle); margin-top: 7px; flex-wrap: wrap; }
.archived-row a { color: var(--text-muted); text-decoration: underline;
  text-underline-offset: 3px; }
.archived-row .row-actions { margin-left: auto; display: flex; gap: 14px;
  align-items: center; }
.archived-row .iconbtn { width: auto; height: auto; border: 0;
  background: none; color: var(--text-subtle); }
.status { font-size: .8rem; color: var(--text-muted); background: var(--bg-chip);
  border-radius: 6px; padding: 2px 8px; }
.group-note { font-size: 12px; color: var(--text-subtle); cursor: help; }
.task-card { border-left: 3px solid var(--warn-orange); }
.task-card .cat-sub { max-width: 560px; line-height: 1.5; }
.subcat-list { border-top: 1px solid var(--border-faint); padding: 4px 22px 8px; }
.subcat-row { display: flex; align-items: center; gap: 12px;
  font-size: 13px; padding: 10px 0; border-bottom: 1px solid var(--border-hairline); }
.subcat-row:last-child { border-bottom: 0; }
.subcat-row .row-actions { margin-left: auto; display: flex; }
.archive.nested { border-top: 0; background: none; padding: 0 0 8px 0; }
form.inline { display: inline; }

/* Bestätigungs-Dialog */
dialog#confirm-dialog { border: 0; border-radius: 16px; background: var(--paper);
  color: var(--ink); box-shadow: 0 18px 50px var(--shadow-dialog); padding: 22px 24px;
  max-width: 340px; }
dialog#confirm-dialog::backdrop { background: var(--backdrop-dialog); }
.dlg-title { font-size: 15px; font-weight: 700; margin: 0; }
.dlg-text { font-size: 12.5px; color: var(--text-muted); margin: 6px 0 0;
  line-height: 1.5; }
.dlg-actions { display: flex; gap: 8px; margin-top: 18px;
  justify-content: flex-end; }
.dlg-ok { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dlg-ok.danger { background: var(--danger-red); color: var(--chip-text); border-color: var(--danger-red); }

/* Platzhalter Visualisierung */
.placeholder { text-align: center; padding: 70px 20px; color: var(--text-medium); }
.placeholder h1 { font-size: 20px; color: var(--ink); }
.placeholder p { font-size: 13.5px; line-height: 1.6; max-width: 420px;
  margin: 12px auto 0; }

/* Prüfbericht */
h1 { font-size: 20px; }
table { border-collapse: collapse; background: var(--paper); }
th, td { border: 1px solid var(--border-table); padding: 6px 10px;
  font-size: .9rem; }
.sample img { max-width: 100%; border: 1px solid var(--border-table);
  margin: 6px 0 14px; border-radius: 8px; }

/* Login */
body.login main { max-width: 360px; text-align: center; margin-top: 10vh; }
body.login input { width: 100%; padding: 12px; font-size: 1.1rem;
  margin: 12px 0; border: 1px solid var(--border-medium); border-radius: 9px;
  background: var(--paper); color: var(--ink); }

/* Handy (< 560px): Kopfzeile kompakt, Suchfeld volle Breite */
@media (max-width: 560px) {
  header { padding: 0 16px; flex-wrap: wrap; }
  nav.tabs { gap: 18px; }
  nav.tabs a { padding: 14px 2px 10px; font-size: 13.5px; }
  a.managelink { padding: 14px 0 12px; white-space: nowrap; }
  main { padding: 20px 16px 48px; }
  .searchbar { flex-wrap: wrap; }
  .searchbar input[type=search] { flex-basis: 100%; }
  .searchbar button[type=submit] { flex: 1; }
}
