/* ACS Kasse 2.0, Gestaltung nach dxPlattform: DM Sans (selbst ausgeliefert),
   Slate-Palette, Akzentfarbe, weiche Schatten, abgerundete Karten. */

@font-face {
  font-family: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 100 1000;
  src: url('/fonts/dm-sans-latin-ext-opsz-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 100 1000;
  src: url('/fonts/dm-sans-latin-opsz-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --p-25: #fcfdfe; --p-50: #f8fafc; --p-100: #f1f5f9; --p-200: #e2e8f0; --p-300: #cbd5e1; --p-400: #94a3b8;
  --p-500: #64748b; --p-600: #475569; --p-700: #334155; --p-800: #1e293b; --p-900: #0f172a;
  --akzent-50: #e9f6f5; --akzent-100: #c9eae8; --akzent-500: #1d7f7c; --akzent-600: #176a67; --akzent-700: #11504e;
  /* ACS-Gelb (Logo, acs.ch) mit schwarzer Schrift */
  --acs-gelb: #fcc300; --acs-gelb-hell: #fff6d6; --acs-schwarz: #1a1a1a;
  --gruen-50: #ecfdf5; --gruen-600: #059669; --gruen-700: #047857;
  --rot-50: #fef2f2; --rot-600: #dc2626; --rot-700: #b91c1c;
  --gelb-50: #fffbeb; --gelb-500: #f59e0b; --gelb-700: #b45309;
  --feldrand: #7f8da1;

  --bg: var(--p-50); --flaeche: #fff; --flaeche-2: var(--p-50); --rand: var(--p-200);
  --text: var(--p-900); --text-2: var(--p-600); --text-3: var(--p-500);
  --schatten: 0 2px 15px -3px rgba(0,0,0,.07), 0 10px 20px -2px rgba(0,0,0,.04);
  --radius: 1rem; --radius-s: .75rem; --radius-xs: .5rem;
  color-scheme: light;
}
/* Dunkel: ausdrücklich gewählt (data-thema="dunkel") oder Systemeinstellung,
   solange nicht ausdrücklich hell gewählt ist. Umschalter in der Seitenleiste. */
:root[data-thema="dunkel"] {
  --bg: var(--p-900); --flaeche: var(--p-800); --flaeche-2: #172033; --rand: var(--p-700);
  --text: var(--p-100); --text-2: var(--p-300); --text-3: var(--p-400);
  --akzent-50: #0c2a29; --akzent-100: #113d3b; --akzent-500: #239591; --akzent-600: #1f8581; --akzent-700: #7fd4d0; --acs-gelb-hell: #33290a;
  --gruen-50: #0b2b22; --gruen-700: #6ee7b7; --rot-50: #3a1214; --rot-700: #fca5a5; --gelb-50: #34260a; --gelb-700: #fcd34d;
  --schatten: 0 2px 15px -3px rgba(0,0,0,.4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) {
    --bg: var(--p-900); --flaeche: var(--p-800); --flaeche-2: #172033; --rand: var(--p-700);
    --text: var(--p-100); --text-2: var(--p-300); --text-3: var(--p-400);
    --akzent-50: #0c2a29; --akzent-100: #113d3b; --akzent-500: #239591; --akzent-600: #1f8581; --akzent-700: #7fd4d0; --acs-gelb-hell: #33290a;
    --gruen-50: #0b2b22; --gruen-700: #6ee7b7; --rot-50: #3a1214; --rot-700: #fca5a5; --gelb-50: #34260a; --gelb-700: #fcd34d;
    --schatten: 0 2px 15px -3px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'DM Sans', system-ui, sans-serif; font-size: 14px; line-height: 1.43; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1rem; font-weight: 600; margin: 0; }
p { margin: 0 0 .75rem; }
a { color: var(--akzent-600); }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { width: 1.125rem; height: 1.125rem; flex: none; }
.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.gedimmt { color: var(--text-3); }
.versteckt { display: none !important; }

/* Rahmen mit Seitenleiste */
.rahmen { display: flex; min-height: 100dvh; }
.seitenleiste { width: 15.5rem; flex: none; background: var(--flaeche); border-right: 1px solid var(--rand); border-top: 4px solid var(--acs-gelb); display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; }
.marke { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--rand); }
.test-band { display: block; margin: .5rem .75rem 0; padding: .4rem .6rem; border-radius: .5rem; background: repeating-linear-gradient(-45deg, var(--gelb-50), var(--gelb-50) 8px, var(--acs-gelb-hell) 8px, var(--acs-gelb-hell) 16px); border: 1px solid var(--gelb-500); color: var(--gelb-700); font-weight: 700; font-size: .78rem; text-decoration: none; text-align: center; }
.marke-logo { width: 2.75rem; height: 2.75rem; flex: none; object-fit: contain; }
.marke-kachel { width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: var(--acs-gelb); color: var(--acs-schwarz); display: grid; place-items: center; font-weight: 800; letter-spacing: -.02em; }
.marke-name { font-size: 1.05rem; font-weight: 700; }
.marke-unter { font-size: .75rem; color: var(--text-3); }
.navigation { flex: 1; overflow-y: auto; padding: .75rem; }
.nav-gruppe { margin-bottom: .75rem; }
.nav-gruppe-titel { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: .25rem .75rem; }
.nav-punkt { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; border-radius: .75rem; color: var(--text-2); text-decoration: none; font-weight: 500; border: 1px solid transparent; }
button.nav-punkt { width: 100%; background: none; font: inherit; cursor: pointer; text-align: left; }
.nav-punkt:hover { background: var(--flaeche-2); color: var(--text); }
.nav-punkt.aktiv { background: var(--akzent-50); color: var(--akzent-700); border-color: var(--akzent-100); box-shadow: inset 3px 0 0 var(--acs-gelb); }
.leiste-fuss { border-top: 1px solid var(--rand); padding: .75rem 1rem; display: flex; align-items: center; gap: .5rem; }
.avatar { width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--akzent-50); color: var(--akzent-700); display: grid; place-items: center; font-weight: 600; font-size: .85rem; flex: none; }
.benutzer-name { font-weight: 500; font-size: .875rem; line-height: 1.1; }
.benutzer-rolle { font-size: .75rem; color: var(--text-3); }
.sitzung-uhr { font-size: .7rem; color: var(--text-3); }
.inhalt { flex: 1; min-width: 0; padding: 1.5rem 2rem 3rem; }
.seiten-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.seiten-aktionen { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .rahmen { flex-direction: column; }
  .seitenleiste { width: 100%; height: auto; position: static; }
  .navigation { display: flex; overflow-x: auto; gap: .25rem; padding: .5rem; }
  .nav-gruppe { display: contents; }
  .nav-gruppe-titel { display: none; }
  .nav-punkt { white-space: nowrap; }
  .inhalt { padding: 1rem; }
}

/* Karten, Raster */
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); padding: 1.25rem; }
.karte-titel { margin-bottom: .75rem; }
.raster { display: grid; gap: 1rem; }
.raster-2 { grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); }
.raster-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.stapel { display: flex; flex-direction: column; gap: 1rem; }
.zeile { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.kennzahl { display: flex; flex-direction: column; }
.kennzahl-label { font-size: .75rem; color: var(--text-3); font-weight: 500; }
.kennzahl-wert { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2.25rem; padding: 0 .9rem; border-radius: .75rem; border: 1px solid transparent; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
.knopf:disabled { opacity: .5; cursor: not-allowed; }
.knopf-haupt { background: var(--akzent-500); border-color: var(--akzent-500); color: #fff; }
.knopf-haupt:hover:not(:disabled) { background: var(--akzent-600); }
.knopf-neben { background: var(--flaeche); border-color: var(--p-300); color: var(--text); }
.knopf-neben:hover:not(:disabled) { background: var(--flaeche-2); }
.knopf-gefahr { background: var(--rot-600); border-color: var(--rot-600); color: #fff; }
.knopf-gruen { background: var(--gruen-600); border-color: var(--gruen-600); color: #fff; }
.knopf-gross { height: 3.5rem; font-size: 1rem; border-radius: 1rem; padding: 0 1.25rem; }
.knopf .taste { font-size: .7rem; font-weight: 700; padding: .05rem .35rem; border-radius: .3rem; background: rgba(255,255,255,.22); }
.knopf-neben .taste { background: var(--p-100); color: var(--text-2); }
.icon-knopf { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .5rem; border: 0; background: transparent; color: var(--text-3); cursor: pointer; }
.icon-knopf:hover { background: var(--flaeche-2); color: var(--text); }

/* Formulare */
.feld { display: flex; flex-direction: column; gap: .3rem; }
.feld-label { font-size: .8rem; font-weight: 600; color: var(--text-2); }
.feld-hinweis { font-size: .75rem; color: var(--text-3); }
.eingabe, select.eingabe, textarea.eingabe { width: 100%; height: 2.5rem; padding: 0 .75rem; border: 1px solid var(--feldrand); border-radius: .75rem; background: var(--flaeche); outline: none; }
textarea.eingabe { height: auto; min-height: 6rem; padding: .5rem .75rem; resize: vertical; }
.eingabe:focus { border-color: var(--akzent-500); box-shadow: 0 0 0 1px var(--akzent-500); }
.eingabe-gross { height: 3.25rem; font-size: 1.35rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.eingabe-kompakt { height: 2rem; border-radius: .5rem; }
.formular { display: grid; gap: .9rem; }
.formular-2 { grid-template-columns: 1fr 1fr; }
.schalter { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.schalter input { width: 1.1rem; height: 1.1rem; accent-color: var(--akzent-500); }

/* Tabellen */
.tabelle-rahmen { overflow: auto; border: 1px solid var(--rand); border-radius: var(--radius-s); background: var(--flaeche); }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { position: sticky; top: 0; background: var(--flaeche-2); text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; padding: .4rem .65rem; border-bottom: 1px solid var(--rand); white-space: nowrap; z-index: 1; }
.tabelle td { padding: .3rem .65rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle td.nowrap, .tabelle th.nowrap { white-space: nowrap; }
.tabelle td.text { min-width: 14rem; }
.tabelle td.knapp { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[hidden] { display: none !important; }
.tabelle tr.klickbar { cursor: pointer; }
.tabelle tr.klickbar:hover td { background: var(--flaeche-2); }
.tabelle td.leer { text-align: center; color: var(--text-3); padding: 2rem; }
.tabelle tr.storniert td { color: var(--text-3); text-decoration: line-through; }
.tabelle tr.summe td { font-weight: 700; background: var(--flaeche-2); }
.tabelle tr.markiert td { background: var(--akzent-50); }
.tabelle-kompakt td, .tabelle-kompakt th { padding: .3rem .5rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .45rem; border-radius: .25rem; font-size: .75rem; font-weight: 600; background: var(--p-100); color: var(--p-700); }
.badge-ok { background: var(--gruen-50); color: var(--gruen-700); }
.badge-warn { background: var(--gelb-50); color: var(--gelb-700); }
.badge-fehler { background: var(--rot-50); color: var(--rot-700); }
.badge-akzent { background: var(--akzent-50); color: var(--akzent-700); }
.punkt { width: .55rem; height: .55rem; border-radius: 999px; background: currentColor; }

/* Hinweisboxen */
.hinweis { border-radius: var(--radius-s); padding: .75rem 1rem; border: 1px solid var(--rand); background: var(--flaeche-2); }
.hinweis-warn { background: var(--gelb-50); border-color: #fcd34d; color: var(--gelb-700); }
.hinweis-fehler { background: var(--rot-50); border-color: #fca5a5; color: var(--rot-700); }
.hinweis-ok { background: var(--gruen-50); border-color: #6ee7b7; color: var(--gruen-700); }

/* Meldungen */
#meldungen { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 1000; }
.meldung { padding: .7rem 1rem; border-radius: .75rem; box-shadow: var(--schatten); background: var(--p-800); color: #fff; max-width: 26rem; animation: rein .2s ease-out; }
.meldung-fehler { background: var(--rot-600); }
@keyframes rein { from { opacity: 0; transform: translateY(8px); } }

/* Dialoge */
.dialog { border: 0; padding: 0; border-radius: var(--radius); background: var(--flaeche); color: var(--text); box-shadow: 0 25px 50px -12px rgba(0,0,0,.35); width: min(32rem, calc(100vw - 2rem)); }
.dialog-breit { width: min(60rem, calc(100vw - 2rem)); }
.dialog::backdrop { background: rgba(15,23,42,.45); }
.dialog-kopf { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--rand); }
.dialog-inhalt { padding: 1.25rem; max-height: 70vh; overflow: auto; }
.dialog-fuss { display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem 1.25rem; border-top: 1px solid var(--rand); background: var(--flaeche-2); border-radius: 0 0 var(--radius) var(--radius); }

/* Anmeldung */
.anmeldung { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 20% 10%, var(--acs-gelb-hell), transparent 50%), radial-gradient(circle at 85% 90%, var(--akzent-50), transparent 45%), var(--bg); border-top: 4px solid var(--acs-gelb); }
.anmeldung .karte { width: min(24rem, 100%); padding: 2rem; }

/* Kasse */
.kasse { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(22rem, 1fr); gap: 1rem; height: calc(100dvh - 3rem); }
.kasse-spalte { display: flex; flex-direction: column; gap: 1rem; min-height: 0; }
.kasse .karte { padding: 1rem; }
.artikel-liste { flex: 1; min-height: 0; overflow: auto; }
.artikel-zeile { display: grid; grid-template-columns: 1fr auto auto; gap: .4rem; align-items: center; padding: .12rem .5rem; border-radius: .5rem; }
.artikel-zeile:hover, .artikel-zeile.gewaehlt { background: var(--flaeche-2); }
.artikel-zeile.gewaehlt { outline: 2px solid var(--akzent-500); }
.artikel-name { font-weight: 600; line-height: 1.3; }
.artikel-name .badge { font-size: .66rem; padding: 0 .35rem; vertical-align: 1px; }
.artikel-beschr { font-size: .78rem; color: var(--text-3); }
/* Kompakt: Bezeichnung links, Betrag rechts in einer Zeile */
.preis-knopf { min-width: 7.5rem; height: 1.75rem; border-radius: .5rem; border: 1px solid var(--p-300); background: var(--flaeche); color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .55rem; }
.preis-knopf:hover { border-color: var(--akzent-500); color: var(--akzent-700); }
.preis-knopf.mg { border-style: dashed; }
.preis-knopf small { font-size: .65rem; font-weight: 500; color: var(--text-3); line-height: 1; }
.favoriten { display: flex; flex-wrap: wrap; gap: .4rem; }
.favorit { padding: .35rem .6rem; border-radius: .5rem; background: var(--akzent-50); color: var(--akzent-700); border: 1px solid var(--akzent-100); cursor: pointer; font-weight: 600; font-size: .8rem; }
.warenkorb { flex: 1; min-height: 6rem; overflow: auto; }
.wk-zeile { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--rand); }
.wk-zeile:last-child { border-bottom: 0; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: .75rem; border-top: 2px solid var(--text); }
.total-wert { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.modus-leiste { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.modus { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .6rem .75rem; border-radius: .75rem; border: 1px solid var(--p-300); background: var(--flaeche); cursor: pointer; text-align: left; }
.modus.aktiv { border-color: var(--akzent-500); background: var(--akzent-50); color: var(--akzent-700); box-shadow: 0 0 0 1px var(--akzent-500); }
.modus b { font-size: .9rem; }
.modus span { font-size: .72rem; color: var(--text-3); }
.kurs-tabelle td, .kurs-tabelle th { padding: .25rem .5rem; }
.kurs-tabelle tr.aktiv td { background: var(--akzent-100); font-weight: 700; }
.rueckgeld { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.statusleiste { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); }
.beleg { white-space: pre; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12px; line-height: 1.35; background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: .75rem; padding: .75rem; overflow: auto; max-height: 50vh; }
.karten-status { text-align: center; padding: 1.25rem; }
.karten-status .gross { font-size: 1.4rem; font-weight: 700; margin: .5rem 0; }
.drehen { width: 2.5rem; height: 2.5rem; border-radius: 999px; border: 4px solid var(--akzent-100); border-top-color: var(--akzent-500); animation: drehen 1s linear infinite; margin: 0 auto; }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { .kasse { grid-template-columns: 1fr; height: auto; } .modus-leiste { grid-template-columns: repeat(2, 1fr); } }

/* Kassenbestand */
.zaehl-zeile { display: grid; grid-template-columns: 5rem 6rem 1fr; gap: .5rem; align-items: center; padding: .2rem 0; }
.zaehl-zeile .eingabe { height: 2rem; text-align: right; }
.diff-ok { color: var(--gruen-700); font-weight: 700; }
.diff-fehler { color: var(--rot-700); font-weight: 700; }

/* Filterleiste */
.filter { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .75rem; }
.filter .eingabe { height: 2rem; width: auto; border-radius: .5rem; }
.seitenwahl { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; margin-top: .75rem; color: var(--text-2); }

/* Bericht / Druck */
.bericht h2 { margin: 1.25rem 0 .5rem; }
@media print {
  .seitenleiste, .seiten-aktionen, .kein-druck, #meldungen { display: none !important; }
  .inhalt { padding: 0; }
  .karte { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; color: #000; font-size: 11px; }
  .tabelle-rahmen { border: 0; overflow: visible; }
  .tabelle th { position: static; }
  .seitenumbruch { break-before: page; }
}
