/* Kult Werkstatt (Packstation /werkstatt, 12.10.2026): schlichtes CSS ohne Polaris und ohne externe Schriften.
   Hauptziel iPad quer (1180×820, 1024×768) und Surface; mobile-first, Knöpfe und Häkchen ≥ 48 px, kein horizontales Scrollen. */
:root {
  --ws-bg: #f4f4f2;
  --ws-karte: #fff;
  --ws-text: #1d1d1b;
  --ws-leise: #5c5c58;
  --ws-linie: #d6d6d2;
  --ws-kopf: #23231f;
  --ws-primaer: #23231f;
  --ws-fokus: #1a5fd0;
  --ws-offen-bg: #e6effc; --ws-offen: #1c4c99;
  --ws-gepackt-bg: #e2f3e8; --ws-gepackt: #1d6b3a;
  --ws-fertig-bg: #ececea; --ws-fertig: #45453f;
  --ws-hinweis-bg: #fdf0d5; --ws-hinweis: #7a4b00;
  --ws-fehler-bg: #fbe4e1; --ws-fehler: #9b1c10;
  --ws-b2b-bg: #e9e5f7; --ws-b2b: #45308f;
  --ws-abo-bg: #d9f0ef; --ws-abo: #0f5453;
  --ws-status-bg: #f6e8c8; --ws-status: #5e4200;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ws-bg); color: var(--ws-text); font: 18px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ws-fokus); outline-offset: 2px; }
.ws-kopf :focus-visible { outline-color: #fff; } /* Fokus auf dunkler Kopfzeile sichtbar (Kontrast ≥ 3:1) */
.ws-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ws-kopf { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 16px; background: var(--ws-kopf); color: #fff; }
.ws-marke { font-weight: 700; font-size: 20px; text-decoration: none; color: #fff; min-height: 48px; display: inline-flex; align-items: center; }
.ws-nav { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.ws-nav a { min-height: 48px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 10px; color: #fff; text-decoration: none; font-weight: 600; }
.ws-nav a[aria-current="page"], .ws-nav a.active { background: rgba(255, 255, 255, .16); }
.ws-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: #fff; color: var(--ws-kopf); font-size: 16px; font-weight: 800; }
.ws-wer { display: flex; align-items: center; gap: 12px; margin: 0 0 0 auto; }
.ws-wer .ws-knopf { border-color: rgba(255, 255, 255, .5); background: transparent; color: #fff; }

.ws-test { background: var(--ws-hinweis-bg); color: var(--ws-hinweis); border-bottom: 2px solid #e2b04a; padding: 10px 16px; font-weight: 700; }
.ws-inhalt { max-width: 1180px; margin: 0 auto; padding: 16px 16px 48px; }
.ws-inhalt h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 16px; }
.ws-inhalt h2 { font-size: 22px; margin: 24px 0 12px; }
.ws-leise { color: var(--ws-leise); }
.ws-klein { font-size: 15px; }

.ws-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; min-width: 52px; padding: 10px 20px; border: 2px solid var(--ws-primaer); border-radius: 12px; background: #fff; color: var(--ws-primaer); font-family: inherit; font-weight: 700; font-size: 17px; line-height: 1.2; text-decoration: none; cursor: pointer; touch-action: manipulation; text-align: center; }
.ws-knopf--primaer { background: var(--ws-primaer); color: #fff; }
.ws-knopf--gross { min-height: 64px; font-size: 20px; padding: 14px 28px; }
.ws-knopf--breit { width: 100%; }
.ws-knopf:disabled, .ws-knopf[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

.ws-karte { background: var(--ws-karte); border: 1px solid var(--ws-linie); border-radius: 14px; padding: 16px; }
.ws-meldung { border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-weight: 600; white-space: pre-line; }
.ws-meldung--ok { background: var(--ws-gepackt-bg); color: var(--ws-gepackt); }
.ws-meldung--fehler { background: var(--ws-fehler-bg); color: var(--ws-fehler); }
.ws-meldung--hinweis { background: var(--ws-hinweis-bg); color: var(--ws-hinweis); }

.ws-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.ws-chip--offen { background: var(--ws-offen-bg); color: var(--ws-offen); }
.ws-chip--gepackt { background: var(--ws-gepackt-bg); color: var(--ws-gepackt); }
.ws-chip--abgeschlossen, .ws-chip--kein_versand { background: var(--ws-fertig-bg); color: var(--ws-fertig); }
.ws-chip--hinweis, .ws-chip--wartet, .ws-chip--test { background: var(--ws-hinweis-bg); color: var(--ws-hinweis); }
.ws-chip--b2b { background: var(--ws-b2b-bg); color: var(--ws-b2b); }
.ws-chip--abo { background: var(--ws-abo-bg); color: var(--ws-abo); }
.ws-chip--status { background: var(--ws-status-bg); color: var(--ws-status); }

/* Anmeldung (nur Passwort) und Fehlerseite */
.ws-anmeldung { max-width: 560px; margin: 24px auto; display: grid; gap: 20px; }
.ws-anmeldung h1 { margin: 0; }
.ws-feld { display: grid; gap: 6px; font-weight: 700; }
.ws-feld input, .ws-filter input { min-height: 52px; padding: 10px 14px; border: 2px solid var(--ws-linie); border-radius: 12px; font: inherit; font-weight: 400; background: #fff; width: 100%; }

/* Startseite: Kacheln */
.ws-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ws-kachel { display: grid; gap: 8px; min-height: 160px; padding: 24px; background: #fff; border: 2px solid var(--ws-linie); border-radius: 16px; text-decoration: none; }
.ws-kachel strong { font-size: 24px; line-height: 1.2; }
.ws-kachel:hover { border-color: var(--ws-primaer); }
.ws-zahl { font-size: 40px; font-weight: 800; line-height: 1; }

/* Listen: Zeilen als Karten, ab 760 px als Raster mit 4 Spalten, ohne Tabellen-Scroller */
.ws-liste { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ws-zeile { display: grid; grid-template-columns: 1fr; gap: 8px 16px; align-items: center; background: #fff; border: 1px solid var(--ws-linie); border-radius: 14px; padding: 12px 16px; }
.ws-zeile__nr { font-size: 22px; font-weight: 800; text-decoration: none; }
a.ws-zeile__nr { display: inline-flex; align-items: center; min-height: 48px; min-width: 48px; }
.ws-zeile__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ws-zeile__aktion { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-zeile__aktion .ws-knopf { flex: 1 1 auto; }
.ws-zeile > * { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 760px) {
  .ws-zeile { grid-template-columns: minmax(170px, 1.1fr) minmax(170px, 1.5fr) minmax(150px, 1fr) minmax(170px, auto); }
  .ws-zeile__aktion { justify-content: flex-end; }
  .ws-zeile__aktion .ws-knopf { flex: 0 0 auto; min-width: 150px; }
}
.ws-leer { padding: 32px 16px; text-align: center; color: var(--ws-leise); background: #fff; border-radius: 14px; border: 1px dashed var(--ws-linie); }
.ws-oben { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ws-oben h1 { margin: 0; }

/* Name und Lieferadresse (Etikett zuordnen) */
.ws-adresse { display: grid; gap: 2px; font-style: normal; line-height: 1.35; }
.ws-adresse strong { font-size: 19px; }

/* Packliste */
.ws-pack-kopf { display: grid; gap: 8px; margin-bottom: 16px; }
.ws-pack-kopf .ws-adresse { font-size: 20px; }
.ws-pack-kopf .ws-adresse strong { font-size: 22px; }
.ws-inhalt h1.ws-titel { margin: 0; }
.ws-zurueck { min-height: 48px; display: inline-flex; align-items: center; font-weight: 700; text-decoration: none; color: var(--ws-leise); }
.ws-pack-raster { display: grid; gap: 16px; }
@media (min-width: 960px) { .ws-pack-raster { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .ws-pack-seite { position: sticky; top: 88px; } }
.ws-pack { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ws-pos { display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 10px 16px; border: 2px solid var(--ws-linie); border-radius: 14px; background: #fff; cursor: pointer; touch-action: manipulation; }
.ws-pos--an { background: var(--ws-gepackt-bg); border-color: var(--ws-gepackt); }
.ws-pos input { width: 48px; height: 48px; flex: 0 0 48px; margin: 0; accent-color: var(--ws-gepackt); cursor: pointer; }
.ws-pos__menge { font-size: 26px; font-weight: 800; min-width: 64px; }
.ws-pos__titel { font-weight: 700; }
.ws-pos__detail { font-size: 15px; color: var(--ws-leise); }
.ws-pack-seite { display: grid; gap: 12px; }
.ws-fortschritt { font-size: 20px; font-weight: 800; }

/* Abgeschlossen: Filter */
.ws-filter { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: end; margin-bottom: 16px; }
.ws-filter label { display: grid; gap: 4px; font-weight: 700; font-size: 15px; }
@media (min-width: 760px) { .ws-filter { grid-template-columns: minmax(200px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto auto; } }

/* Bestätigungs-Dialog */
dialog.ws-dialog { border: 0; border-radius: 16px; padding: 24px; width: min(560px, calc(100% - 32px)); box-shadow: 0 16px 48px rgba(0, 0, 0, .3); }
dialog.ws-dialog::backdrop { background: rgba(20, 20, 18, .5); }
.ws-dialog h2 { margin: 0 0 12px; font-size: 24px; }
.ws-dialog p { margin: 0 0 12px; }
.ws-dialog__knoepfe { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.ws-dialog__knoepfe .ws-knopf { flex: 1 1 180px; }

/* ===== Kit (Welle 2, 12.10.2026 abends): Rollen, Burger-Menü, Hilfe, Kennzahlen, Tabelle ===== */
.ws-knopf--gefahr { background: var(--ws-fehler); border-color: var(--ws-fehler); color: #fff; }
.ws-knopf--leise { border-color: transparent; background: transparent; text-decoration: underline; }
.ws-chip--fehler { background: var(--ws-fehler-bg); color: var(--ws-fehler); }
.ws-text-fehler { color: var(--ws-fehler); }

/* Knopf mit InfoKnopf daneben */
.ws-mit-hilfe { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.ws-mit-hilfe--breit { display: flex; width: 100%; }
.ws-mit-hilfe--breit > .ws-knopf { flex: 1 1 auto; }
.ws-info { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--ws-leise); background: #fff; color: var(--ws-text); font: italic 700 22px/1 Georgia, "Times New Roman", serif; cursor: pointer; touch-action: manipulation; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ws-info:hover { border-color: var(--ws-primaer); }
.ws-info--hell { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.ws-hilfe__schritte { margin: 0 0 12px; padding-left: 1.4em; display: grid; gap: 8px; }
.ws-dialog__text p { margin: 0 0 10px; }
/* Folgen in Rückfragen (components/werkstatt-teile.tsx Folgen) und Häkchen „verstanden“, auf allen Seiten */
.ws-be-folgen { margin: 0 0 8px; padding-left: 22px; }
.ws-be-folgen li { margin-bottom: 4px; }
.ws-be-haken { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 700; cursor: pointer; }
.ws-be-haken input { width: 28px; height: 28px; flex: 0 0 28px; margin: 0; accent-color: var(--ws-primaer); }
/* Textlinks ohne Knopf-Klasse (Bezug, Versionen, Belege der Kundenkarte, „Suche zurücksetzen“): Tippziel mindestens 48 px hoch */
.ws-inhalt a:not([class]) { display: inline-flex; align-items: center; min-height: 48px; }

/* Seitenkopf */
.ws-seitenkopf { display: grid; gap: 4px; margin-bottom: 16px; }
.ws-seitenkopf .ws-oben { margin-bottom: 0; }
.ws-titelzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ws-inhalt .ws-titelzeile h1 { margin: 0; }
.ws-oben__aktionen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ws-karte__titel { font-size: 20px; margin: 0 0 12px; }
.ws-inhalt h2.ws-karte__titel { margin: 0 0 12px; }

/* Kopfzeile: Rolle, Badge hell */
.ws-rolle { flex: 1 1 auto; font-size: 15px; font-weight: 700; color: rgba(255, 255, 255, .75); }
.ws-badge--null { opacity: .55; }

/* Burger-Menü (details/summary, ohne JS bedienbar) */
.ws-burger { position: static; }
.ws-burger > summary { list-style: none; }
.ws-burger > summary::-webkit-details-marker { display: none; }
.ws-burger__knopf { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; min-width: 52px; padding: 0 14px; border: 2px solid rgba(255, 255, 255, .5); border-radius: 12px; color: #fff; font-weight: 700; cursor: pointer; touch-action: manipulation; user-select: none; }
.ws-burger__icon { display: inline-grid; gap: 5px; width: 22px; }
.ws-burger__icon span { display: block; height: 3px; border-radius: 2px; background: currentColor; }
.ws-burger__zu { display: none; }
.ws-burger[open] .ws-burger__zu { display: inline; }
.ws-burger[open] .ws-burger__auf { display: none; }
.ws-burger[open] .ws-burger__knopf { background: var(--ws-kopf); }
.ws-burger__flaeche, .ws-burger__leiste { display: none; }
.ws-burger[open] .ws-burger__flaeche { display: block; position: fixed; inset: 0; z-index: 1; background: rgba(20, 20, 18, .45); }
.ws-burger[open] .ws-burger__leiste { display: block; position: fixed; top: 0; left: 0; bottom: 0; z-index: 2; width: min(380px, 88vw); overflow-y: auto; padding: 80px 12px 24px; background: #fff; color: var(--ws-text); box-shadow: 8px 0 32px rgba(0, 0, 0, .25); }
.ws-burger__gruppe { padding: 8px 0; border-bottom: 1px solid var(--ws-linie); }
.ws-burger__gruppe ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ws-burger__gruppentitel { padding: 4px 12px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ws-leise); }
.ws-burger__eintrag { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 12px; color: var(--ws-text); text-decoration: none; }
.ws-burger__eintrag:hover { background: var(--ws-bg); }
.ws-burger__eintrag[aria-current="page"], .ws-burger__eintrag.active { background: var(--ws-offen-bg); }
.ws-burger__eintrag .ws-badge { background: var(--ws-kopf); color: #fff; }
.ws-burger__eintrag--folgt { color: var(--ws-leise); cursor: default; }
.ws-burger__titel { display: block; font-weight: 700; font-size: 18px; }
.ws-burger__unter { display: block; font-size: 14px; color: var(--ws-leise); }
.ws-burger__fuss { padding: 12px; }
.ws-kopf .ws-burger__leiste :focus-visible { outline-color: var(--ws-fokus); }

/* Kennzahlen (Dashboard) */
.ws-kennzahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ws-kennzahl { display: grid; gap: 6px; align-content: start; min-height: 140px; padding: 18px; background: #fff; border: 2px solid var(--ws-linie); border-radius: 16px; text-decoration: none; color: inherit; }
.ws-kennzahl--link:hover { border-color: var(--ws-primaer); }
.ws-kennzahl--hinweis { border-color: #e2b04a; }
.ws-kennzahl--fehler { border-color: var(--ws-fehler); }
.ws-kennzahl__titel { font-weight: 700; }
.ws-raster-2 { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 900px) { .ws-raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.ws-kurzliste { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.ws-kurzliste li { padding-bottom: 10px; border-bottom: 1px solid var(--ws-linie); }
.ws-kurzliste li:last-child { border-bottom: 0; padding-bottom: 0; }
.ws-kurzlink { display: inline-flex; align-items: center; min-height: 48px; text-decoration-thickness: 1px; }
.ws-leer__titel { display: block; margin-bottom: 4px; color: var(--ws-text); }

/* Reiter (Offen/Erledigt) */
.ws-reiter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ws-reiter a { min-height: 48px; display: inline-flex; align-items: center; padding: 0 18px; border: 2px solid var(--ws-linie); border-radius: 999px; background: #fff; font-weight: 700; text-decoration: none; }
.ws-reiter a.active { background: var(--ws-primaer); border-color: var(--ws-primaer); color: #fff; }

/* Upload, Knopfreihe, Text mit Zeilen */
.ws-upload { display: grid; gap: 12px; }
.ws-upload input[type="file"] { min-height: 52px; padding: 10px; border: 2px dashed var(--ws-linie); border-radius: 12px; background: #fff; font: inherit; font-weight: 400; width: 100%; }
.ws-knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.ws-vorzeilen { white-space: pre-line; }
.ws-storno { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* Tabelle: ab 760 px Spalten, schmal als Karten mit Spaltennamen */
.ws-tabelle-rahmen { margin-bottom: 16px; }
.ws-tabelle { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 16px; }
.ws-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ws-tabelle tr { display: grid; gap: 4px; padding: 12px 14px; margin-bottom: 8px; background: #fff; border: 1px solid var(--ws-linie); border-radius: 14px; }
.ws-tabelle td { display: block; overflow-wrap: anywhere; }
.ws-tabelle td::before { content: attr(data-titel); display: block; font-size: 13px; font-weight: 700; color: var(--ws-leise); }
.ws-tabelle__zeile--fehler { border-color: var(--ws-fehler) !important; }
@media (min-width: 760px) {
  .ws-tabelle thead { position: static; width: auto; height: auto; clip: auto; }
  .ws-tabelle tr { display: table-row; padding: 0; margin: 0; border: 0; }
  .ws-tabelle th { text-align: left; padding: 6px 12px; font-size: 14px; color: var(--ws-leise); }
  .ws-tabelle td { display: table-cell; padding: 10px 12px; background: #fff; border-top: 1px solid var(--ws-linie); border-bottom: 1px solid var(--ws-linie); vertical-align: top; }
  .ws-tabelle td:first-child { border-left: 1px solid var(--ws-linie); border-radius: 12px 0 0 12px; }
  .ws-tabelle td:last-child { border-right: 1px solid var(--ws-linie); border-radius: 0 12px 12px 0; }
  .ws-tabelle td::before { content: none; }
  .ws-tabelle__zeile--fehler td { border-color: var(--ws-fehler); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Seminare (Welle 3): Formular „Teilnehmende eintragen“, Namensliste, Druckansicht der Teilnehmerliste */
.ws-formular { display: grid; gap: 12px; }
.ws-formular__reihe { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .ws-formular__reihe { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ws-feld select, .ws-feld textarea { min-height: 52px; padding: 10px 14px; border: 2px solid var(--ws-linie); border-radius: 12px; font: inherit; font-weight: 400; background: #fff; width: 100%; color: inherit; }
.ws-feld textarea { resize: vertical; }
.ws-haken { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 700; cursor: pointer; }
.ws-haken input { width: 28px; height: 28px; min-height: 0; margin: 0; flex: 0 0 auto; accent-color: var(--ws-primaer); }
.ws-namen { margin: 0; padding-left: 20px; }
.ws-druckliste { width: 100%; border-collapse: collapse; background: #fff; font-size: 16px; }
.ws-druckliste th, .ws-druckliste td { border: 1px solid var(--ws-linie); padding: 8px 10px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.ws-druckliste th { background: var(--ws-fertig-bg); }
.ws-druckliste th:first-child, .ws-druckliste td:first-child { width: 3em; white-space: nowrap; }
.ws-kaestchen { display: inline-block; width: 24px; height: 24px; border: 2px solid var(--ws-text); border-radius: 4px; }
@media print {
  .ws-kopf, .ws-test, .ws-nicht-drucken { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .ws-inhalt { max-width: none; padding: 0; }
  .ws-druckliste { font-size: 11pt; }
  .ws-druckliste tr { break-inside: avoid; }
}
