/* Werkbank – Oberfläche für Handy (Werkstatt) und PC (Büro) */
:root {
  --ink: #1C1F23; --muted: #5A6069; --ink2: #3F4650; --bg: #F4F3F0; --card: #FFFFFF;
  --line: #DCDAD5; --line2: #ECEBE7; --accent: #C2410C; --accent-d: #9A3412; --accent-bg: #FFF4EC; --rot: #B91C1C;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-kopf: "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.4; }
a { color: var(--ink); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

.seite { max-width: 640px; margin: 0 auto; padding: 0 16px calc(100px + env(safe-area-inset-bottom)); }
.seite.ohne-nav { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 4px 12px; }
.kopf .titelblock { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ueber { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kopf h1 { font-family: var(--font-kopf); font-size: 28px; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.kopf .zurueck { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--ink); margin-left: -10px; }
.rund { width: 44px; height: 44px; border-radius: 22px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; text-decoration: none; position: relative; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nur-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Formulare */
input[type=text], input[type=search], input[type=number], input[type=date], input[type=time], input[type=email],
input[type=password], input[type=url], select, textarea {
  width: 100%; min-height: 50px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; font-size: 17px;
}
input[type=file] { font: inherit; font-size: 15px; max-width: 100%; }
textarea { padding: 10px 12px; min-height: 96px; resize: vertical; line-height: 1.4; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
label.feld, .feld-titel { display: block; font-size: 15px; font-weight: 700; color: var(--ink2); margin: 0 0 6px; }
.feld-gruppe { display: flex; flex-direction: column; gap: 14px; }
.raster2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.check input { width: 24px; height: 24px; accent-color: var(--accent); flex-shrink: 0; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 16px;
  font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.1; text-align: center; }
.knopf.primaer { background: var(--accent); border-color: var(--accent); color: #fff; }
.knopf.dunkel { background: var(--ink); border-color: var(--ink); color: #fff; }
.knopf.rahmen { border: 2px solid var(--ink); }
.knopf.klein { min-height: 44px; font-size: 15px; padding: 0 12px; }
.knopf.breit { width: 100%; }
.knopf.gefahr { color: var(--rot); border-color: #F3C4C4; }
.knopf.textlink { border: 0; background: none; padding: 0 4px; min-height: 44px; text-decoration: underline; font-weight: 600; }
.knopf[disabled] { opacity: .55; cursor: progress; }
.knopfzeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.suche { display: flex; gap: 8px; align-items: center; }
.suche .feld-ico { flex: 1; min-width: 0; position: relative; }
.suche .feld-ico > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 22px; height: 22px; pointer-events: none; }
.suche .feld-ico input { padding-left: 46px; }
.ico-knopf { width: 50px; height: 50px; flex-shrink: 0; border: 0; border-radius: 12px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }

/* Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.kachel { height: 112px; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--ink); color: #fff; text-decoration: none; font-size: 19px; font-weight: 700; line-height: 1.15; }
.kachel.akzent { background: var(--accent); }
.kachel .ico { width: 32px; height: 32px; }

/* Abschnitte und Listen */
.abschnitt { margin-top: 22px; }
.abschnitt > h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.abschnitt > h2 .ico { width: 18px; height: 18px; }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); margin-bottom: 8px; }
.zeile .haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zeile .titel { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.zeile .meta { font-size: 14px; color: var(--muted); }
.zeile > .ico { color: var(--muted); width: 20px; height: 20px; }
.liste { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.liste > .zeile { border: 0; border-radius: 0; margin: 0; border-bottom: 1px solid var(--line2); }
.liste > .zeile:last-child { border-bottom: 0; }
.nummer { width: 56px; height: 56px; border-radius: 12px; background: var(--line2); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-kopf); font-size: 18px; font-weight: 700; flex-shrink: 0; text-align: center; line-height: 1; overflow-wrap: anywhere; padding: 2px; }
.karte { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.karte.warnung { border: 2px solid var(--rot); }
.karte + .karte { margin-top: 10px; }
.leer { color: var(--muted); text-align: center; padding: 22px 12px; font-size: 15px; margin: 0; }
.hinweis { background: var(--accent-bg); border: 1px solid #F5C9A9; color: #7C2D12; border-radius: 12px; padding: 12px 14px; font-size: 15px; margin-top: 12px; }
.hinweis.ok { background: #E3F5E9; border-color: #B7E1C4; color: #14532D; }
.hinweis.fehler { background: #FDE8E8; border-color: #F3C4C4; color: #7F1D1D; }
.hinweis a { color: inherit; }

/* Chips */
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.chip.rot { background: #FDE8E8; color: #9B1C1C; }
.chip.gelb { background: #FDF0D5; color: #92400E; }
.chip.gruen { background: #E3F5E9; color: #166534; }
.chip.grau { background: var(--line2); color: var(--ink2); }
.chip.akzent { background: var(--accent); color: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.punkt { width: 10px; height: 10px; border-radius: 5px; display: inline-block; }
.chip.rot .punkt { background: #DC2626; } .chip.gelb .punkt { background: #D97706; } .chip.gruen .punkt { background: #16A34A; }
.marke { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 8px; background: var(--line2); color: var(--ink2); font-size: 15px; font-weight: 600; }
.marke .ico { width: 18px; height: 18px; }

/* Navigation unten */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.nav a.aktiv { color: var(--accent); font-weight: 700; }
.nav .ico { width: 26px; height: 26px; }
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.filter a { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line); background: #fff; color: var(--ink); display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; text-decoration: none; }
.filter a.aktiv { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }

/* Endmontage-Karte */
.dunkelkarte { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--ink); color: #fff; text-decoration: none; margin-top: 16px; }
.dunkelkarte .kopfzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dunkelkarte .gross { font-family: var(--font-kopf); font-size: 22px; font-weight: 700; }
.dunkelkarte .klein { font-size: 15px; color: #D5D8DD; }
.balken { display: block; height: 10px; border-radius: 5px; background: var(--line2); overflow: hidden; }
.balken > span { display: block; height: 100%; border-radius: 5px; background: var(--ink); }
.dunkelkarte .balken { background: #3A4048; } .dunkelkarte .balken > span { background: #FB923C; }

/* Anleitung */
.statusleiste { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fortschritt { display: grid; gap: 4px; margin: 4px 0 0; }
.fortschritt span { height: 6px; border-radius: 3px; background: var(--line); }
.fortschritt span.fertig { background: var(--ink); } .fortschritt span.jetzt { background: var(--accent); }
.fotorahmen { position: relative; margin-top: 14px; border-radius: 16px; background: #D9D6CF; overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: var(--ink2); }
.fotorahmen img { width: 100%; height: 100%; object-fit: contain; background: #1C1F23; }
.fotorahmen .zaehler { position: absolute; right: 12px; bottom: 12px; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }
.fotostreifen { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.fotostreifen a { flex: 0 0 auto; width: 84px; height: 64px; border-radius: 10px; overflow: hidden; border: 3px solid transparent; }
.fotostreifen a.aktiv { border-color: var(--accent); }
.fotostreifen img { width: 100%; height: 100%; object-fit: cover; }
.schritt-text { font-size: 19px; font-weight: 500; line-height: 1.4; margin: 14px 0 0; white-space: pre-line; }
.fotopunkt { margin-top: 14px; padding: 14px; border-radius: 16px; border: 2px solid var(--accent); background: var(--accent-bg); display: flex; flex-direction: column; gap: 10px; }
.fotopunkt .titel { font-size: 17px; font-weight: 700; color: var(--accent-d); }
.fotopunkt > div > .ico { color: var(--accent); }
.fotopunkt.erledigt { border-color: #16A34A; background: #E3F5E9; }
.fotopunkt.erledigt .titel { color: #14532D; } .fotopunkt.erledigt > div > .ico { color: #16A34A; }
.unten-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.unten-leiste .innen { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.galerie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.galerie a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #D9D6CF; }
.galerie img { width: 100%; height: 100%; object-fit: cover; }
.reiter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--line2); margin-top: 14px; }
.reiter a { min-height: 44px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; color: var(--ink2); text-decoration: none; text-align: center; padding: 0 4px; }
.reiter a.aktiv { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.kv > div { padding: 12px 14px; border-bottom: 1px solid var(--line2); font-size: 16px; overflow-wrap: anywhere; }
.kv > div:nth-child(odd) { color: var(--muted); font-weight: 600; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.vorschau-bild { border-radius: 16px; overflow: hidden; background: #2A2F36; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: #D5D8DD; flex-direction: column; gap: 8px; margin-top: 8px; }
.vorschau-bild img { width: 100%; height: 100%; object-fit: contain; }
.wahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; position: relative; }
.wahl label { min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; cursor: pointer; padding: 0 8px; text-align: center; }
.wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wahl input:checked + label { border: 2px solid var(--accent); background: var(--accent-bg); color: var(--accent-d); }
.wahl input:focus-visible + label { outline: 3px solid #2563EB; outline-offset: 2px; }
.schritt-edit { scroll-margin-top: 16px; }
.schritt-edit .kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.mini-galerie { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-galerie .bild { position: relative; width: 96px; height: 72px; border-radius: 10px; overflow: hidden; background: #D9D6CF; }
.mini-galerie img { width: 100%; height: 100%; object-fit: cover; }
.mini-galerie form { position: absolute; top: 2px; right: 2px; }
.mini-galerie button { width: 36px; height: 36px; border-radius: 18px; border: 0; background: rgba(28, 31, 35, .85); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mini-galerie .ico { width: 16px; height: 16px; }
.trenner { height: 1px; background: var(--line); margin: 18px 0; }
details.aufklapp { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; margin-top: 12px; }
details.aufklapp summary { min-height: 52px; display: flex; align-items: center; gap: 4px; font-weight: 700; cursor: pointer; list-style: none; }
details.aufklapp summary::-webkit-details-marker { display: none; }
details.aufklapp[open] { padding-bottom: 14px; }
.scan-video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; background: #111; margin-top: 12px; }
.lade { opacity: .7; }

/* iq */
.iq-logo { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .02em; flex-shrink: 0; font-family: var(--font); line-height: 1; }
.iq-logo.gross { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
.suche .feld-ico > .iq-logo { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.iq-tipp { font-size: 13px; color: var(--muted); margin: 6px 4px 0; }
.iq-antwort { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.iq-blase { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.iq-blase p { margin: 0; font-size: 17px; line-height: 1.45; }
.iq-hinweis { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.vorschlaege { display: flex; flex-wrap: wrap; gap: 8px; }
.vorschlaege a { min-height: 44px; padding: 0 14px; border-radius: 22px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.wert { flex-shrink: 0; max-width: 45%; text-align: right; font-weight: 800; font-size: 16px; overflow-wrap: anywhere; }
.kv > div.markiert { background: var(--accent-bg); color: var(--accent-d); font-weight: 700; }
.gruppe-titel { font-size: 15px; font-weight: 700; margin: 10px 4px 6px; color: var(--ink2); }

/* Büro (PC) */
.buero-kopf { background: var(--ink); color: #fff; }
.buero-kopf .innen { max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.buero-kopf .marke-name { font-family: var(--font-kopf); font-size: 22px; font-weight: 700; color: #fff; text-decoration: none; margin-right: 8px; }
.buero-kopf nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.buero-kopf nav a { color: #D5D8DD; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.buero-kopf nav a.aktiv, .buero-kopf nav a:hover { background: #2C333C; color: #fff; }
.buero-kopf .rechts { display: flex; gap: 10px; align-items: center; }
.buero { max-width: 1180px; margin: 0 auto; padding: 24px 24px 64px; }
.buero h1 { font-family: var(--font-kopf); font-size: 32px; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.buero h2 { font-size: 18px; margin: 28px 0 10px; }
.buero .spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; align-items: start; }
.tabelle { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tabelle th, .tabelle td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line2); vertical-align: middle; font-size: 15px; }
.tabelle th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #FAFAF8; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle input, .tabelle select { min-height: 40px; font-size: 15px; }
.tab-scroll { overflow-x: auto; }
.formular { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.zahl { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.zahl b { display: block; font-family: var(--font-kopf); font-size: 34px; line-height: 1; }
.zahl span { color: var(--muted); font-size: 14px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; background: var(--line2); padding: 8px 10px; border-radius: 8px; word-break: break-all; display: block; }

/* QR-Etiketten (Druck) */
.etiketten { display: grid; grid-template-columns: repeat(auto-fill, minmax(62mm, 1fr)); gap: 6mm; }
.etikett { border: 1px dashed #999; border-radius: 6px; padding: 4mm; display: flex; gap: 4mm; align-items: center; background: #fff; break-inside: avoid; }
.etikett svg { width: 32mm; height: 32mm; flex-shrink: 0; }
.etikett .nr { font-family: var(--font-kopf); font-size: 26pt; font-weight: 700; line-height: 1; }
.etikett .bez { font-size: 10pt; color: #333; margin-top: 2mm; }
.etikett .url { font-size: 7pt; color: #555; margin-top: 2mm; word-break: break-all; }
@media print { .buero-kopf, .nicht-drucken { display: none !important; } body { background: #fff; } .buero { padding: 0; max-width: none; } }
@media (min-width: 700px) { .kopf h1 { font-size: 32px; } }
