/* Kassen-Simulator (ADR-071, Vorfuehr-Stufe). Invodi-Look: Weiss und
   Claude-Grau, Nachtblau #001e3c fuer Text und Knoepfe, Azur #0096ff nur als
   Akzent (auf Weiss nur 3,1:1, nie fuer Text). Systemschrift, keine externen
   Dateien. Laptop und Tablet, ab 900 px zweispaltig. */
:root {
  --nb: #001e3c;
  --az: #0096ff;
  --az-hell: #e6f4ff;
  --tx: #2b3d50;
  --grau: #5b6b7b;
  --rand: #dbe3ec;
  --flaeche: #f5f4ef;
  --weiss: #ffffff;
  --gut: #0b6b3a;
  --warn-bg: #fff4d6;
  --warn-tx: #5c4400;
  --radius: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--tx);
  background: var(--flaeche);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--nb); margin: 0; letter-spacing: -.01em; }
h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--grau); font-weight: 600; }

.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; background: var(--weiss); border-bottom: 1px solid var(--rand);
  position: sticky; top: 0; z-index: 5;
}
.marke { display: flex; align-items: center; gap: 14px; min-width: 0; }
.wortmarke { height: 24px; width: auto; flex: none; }
.titel { font-weight: 600; color: var(--nb); white-space: nowrap; }
.abzeichen {
  font-size: .75rem; font-weight: 600; color: var(--warn-tx); background: var(--warn-bg);
  border: 1px solid #f0d58a; border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}

.buehne {
  display: grid; gap: 24px; padding: 24px; max-width: 1280px; margin: 0 auto;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
@media (min-width: 900px) { .kunde { position: sticky; top: 76px; align-self: start; } }
@media (max-width: 899px) { .buehne { grid-template-columns: 1fr; padding: 16px; gap: 16px; } .kopf { padding: 12px 16px; } }

.kasse, .kunde {
  background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 8px 28px rgba(0, 30, 60, .06);
  display: grid; gap: 18px; align-content: start;
}
.kasse-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kasse-kopf h1 { font-size: 1.35rem; }
.unterzeile { color: var(--grau); font-size: .9rem; }

.waren { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .waren { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ware {
  text-align: left; border: 1px solid var(--rand); background: var(--weiss); border-radius: 14px;
  padding: 12px 12px 10px; cursor: pointer; display: grid; gap: 2px; min-height: 76px;
  transition: border-color .15s, box-shadow .15s, transform .05s;
}
.ware:hover { border-color: var(--nb); box-shadow: 0 4px 14px rgba(0, 30, 60, .08); }
.ware:active { transform: scale(.98); }
.ware:focus-visible, button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--az); outline-offset: 2px; }
.ware .name { font-weight: 600; color: var(--nb); }
.ware .preis { color: var(--tx); }
.ware .satz { color: var(--grau); font-size: .75rem; }

.korb { border-top: 1px solid var(--rand); padding-top: 14px; display: grid; gap: 8px; }
.korb-kopf { display: flex; justify-content: space-between; align-items: center; }
.korb-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-height: 28px; }
.korb-liste .leer { color: var(--grau); font-size: .9rem; }
.posten { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.menge { display: inline-flex; align-items: center; gap: 4px; }
.menge button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--rand); background: var(--weiss);
  cursor: pointer; line-height: 1; color: var(--nb); font-weight: 700;
}
.menge span { min-width: 1.4em; text-align: center; font-variant-numeric: tabular-nums; }
.posten .betrag-zeile { font-variant-numeric: tabular-nums; }
.summe { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--nb); padding-top: 10px; }
.summe strong { font-size: 1.5rem; color: var(--nb); font-variant-numeric: tabular-nums; }

.zahlung { display: grid; gap: 10px; }
.segment { display: inline-grid; grid-auto-flow: column; background: var(--flaeche); border-radius: 999px; padding: 4px; gap: 4px; justify-self: start; }
.segment button { border: 0; background: transparent; border-radius: 999px; padding: 8px 18px; cursor: pointer; color: var(--tx); font-weight: 600; }
.segment button[aria-checked="true"] { background: var(--weiss); color: var(--nb); box-shadow: 0 1px 4px rgba(0, 30, 60, .15); }
.klein-segment button { padding: 6px 14px; font-size: .9rem; }
.karten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 620px) { .karten { grid-template-columns: 1fr; } }
.karten[hidden] { display: none; }
.karte {
  text-align: left; border: 1px solid var(--rand); background: var(--weiss); border-radius: 14px; padding: 12px;
  cursor: pointer; display: grid; gap: 4px;
}
.karte[aria-checked="true"] { border-color: var(--nb); box-shadow: inset 0 0 0 1px var(--nb); background: #fafcff; }
.karte .kname { font-weight: 600; color: var(--nb); }
.karte .knr { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: var(--tx); }
.karte .kinfo { font-size: .78rem; color: var(--grau); }
.marker { display: inline-block; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; justify-self: start; }
.marker.invodi { background: var(--az-hell); color: var(--nb); }
.marker.fremd { background: var(--flaeche); color: var(--grau); }

.optionen { display: grid; gap: 10px; border-top: 1px solid var(--rand); padding-top: 14px; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.option > div:first-child { display: grid; gap: 2px; }
.klein { font-size: .82rem; color: var(--grau); }
.schalter-zeile { cursor: pointer; }
.schalter {
  appearance: none; width: 48px; height: 28px; border-radius: 999px; background: #c9d3de; position: relative;
  cursor: pointer; flex: none; transition: background .15s; margin: 0;
}
.schalter::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--weiss); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s;
}
.schalter:checked { background: var(--nb); }
.schalter:checked::after { transform: translateX(20px); }

.knopf {
  border-radius: 999px; padding: 12px 22px; font-weight: 600; cursor: pointer; border: 1px solid var(--nb);
  background: var(--weiss); color: var(--nb); text-decoration: none; display: inline-block; text-align: center;
}
.knopf.haupt { background: var(--nb); color: var(--weiss); font-size: 1.1rem; padding: 16px; width: 100%; }
.knopf.haupt:disabled { background: #9aa8b6; border-color: #9aa8b6; cursor: not-allowed; }
.knopf.haupt-klein { background: var(--nb); color: var(--weiss); }
.knopf.leise { background: var(--weiss); }
.klein-knopf { padding: 8px 16px; font-size: .9rem; }
.link { border: 0; background: none; color: var(--nb); text-decoration: underline; cursor: pointer; padding: 0; font-size: .9rem; }
.fehler { margin: 0; background: #fdecec; color: #8a1c1c; border: 1px solid #f3c2c2; border-radius: 12px; padding: 10px 12px; font-size: .9rem; }

.display-label { margin-bottom: -8px; }
.display {
  background: var(--nb); border-radius: 22px; padding: 14px; min-height: 360px;
  display: grid; box-shadow: inset 0 0 0 6px #0b2c4d;
}
.zustand {
  background: var(--weiss); border-radius: 14px; display: grid; justify-items: center; align-content: center;
  text-align: center; gap: 10px; padding: 24px 18px; animation: auf .25s ease-out;
}
@keyframes auf { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.gross { font-size: 1.35rem; font-weight: 700; color: var(--nb); margin: 0; line-height: 1.25; }
.betrag { font-size: 2.4rem; font-weight: 700; color: var(--nb); margin: 0; font-variant-numeric: tabular-nums; }
.leise-text { margin: 0; color: var(--grau); }
.haken { width: 96px; height: 96px; }
.qr { width: min(240px, 70vw); height: auto; image-rendering: pixelated; border-radius: 8px; }
.eigen {
  width: 180px; height: 180px; border: 2px dashed #c9d3de; border-radius: 12px; display: grid; place-items: center;
  color: var(--grau); font-weight: 600; background: var(--flaeche);
}
.kreis {
  width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--az-hell); border-top-color: var(--az);
  animation: dreh 0.9s linear infinite;
}
@keyframes dreh { to { transform: rotate(360deg); } }
.hinweis-band { background: var(--warn-bg); color: var(--warn-tx); border-radius: 10px; padding: 6px 10px; font-size: .85rem; }
.status-zeile { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--gut); font-weight: 600; }

.nachher { border: 1px solid var(--rand); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.nachher p { margin: 0; }
[hidden] { display: none !important; }

.technik { border: 1px solid var(--rand); border-radius: 14px; padding: 10px 14px; }
.technik summary { cursor: pointer; color: var(--nb); font-weight: 600; }
.technik-inhalt { display: grid; gap: 8px; margin-top: 10px; }
.technik h3 { font-size: .85rem; }
pre {
  margin: 0; background: #0b1a2b; color: #d7e3f0; border-radius: 10px; padding: 12px; overflow: auto;
  max-height: 280px; font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word;
}

dialog { border: 0; border-radius: 20px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 30, 60, .25); }
dialog::backdrop { background: rgba(0, 30, 60, .35); }
.dialog { padding: 22px; display: grid; gap: 14px; }
.dialog label { display: grid; gap: 6px; font-weight: 600; color: var(--nb); }
.dialog input { border: 1px solid var(--rand); border-radius: 10px; padding: 10px 12px; font-weight: 400; color: var(--tx); }
.dialog p { margin: 0; }
.zugang { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .85rem; }
.zugang dt { color: var(--grau); }
.zugang dd { margin: 0; font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
