/* TAKT Kassensystem: Design-Tokens und Bausteine (Entwurf v1, Beispieldaten) */
@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: block; }
@font-face { font-family: "TAKT Mono"; src: url("fonts/jbmono.woff2") format("woff2"); font-weight: 500; font-display: block; }

:root {
  /* Graphit wie das Kassenband */
  --g: #1c2024; --g2: #454c53; --g3: #7a828a; --g4: #a9b0b6;
  --band: #262b30; --band2: #31373d; --band3: #3d444b;
  /* Papier wie der Bon */
  --paper: #eceeec; --paper2: #e3e6e4; --bon: #fff; --line: #d8dcd9; --line2: #e9ecea;
  /* Aktionsgelb wie das Angebotsschild */
  --gelb: #ffd23f; --gelb-d: #e5b400; --gelb-l: #fff3c4; --gelb-xl: #fffae6;
  /* Status */
  --gruen: #13a05a; --gruen-d: #0b7a43; --gruen-l: #e0f4e8;
  --rot: #d6343c; --rot-l: #fbe5e5; --bern: #dd8a06; --bern-l: #fdf0d6; --blau: #2d6be6; --blau-l: #e4ecfc;
  /* Marke der Kette (White-Label), Standard ist TAKT */
  --brand: var(--gelb); --brand-ink: var(--g); --brand-l: var(--gelb-l);
  --r: 14px; --r-s: 10px; --r-l: 20px;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "TAKT Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: var(--sans); color: var(--g); background: var(--paper); -webkit-font-smoothing: antialiased; font-stretch: 100%; }
body { overflow: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
i[data-i] { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; }
i[data-i] svg { width: 100%; height: 100%; }
.num { font-variant-numeric: tabular-nums; }
.wide { font-stretch: 125%; }
.semi { font-stretch: 112%; }
.cond { font-stretch: 85%; }
.mono { font-family: var(--mono); }
.muted { color: var(--g3); } .g2 { color: var(--g2); }

/* Marke: vier Striche im Takt eines Barcodes */
.mark { display: inline-flex; align-items: flex-end; gap: 2px; width: 26px; height: 26px; padding: 5px 5px 5px; border-radius: 7px; background: var(--g); flex: none; }
.mark i { display: block; background: var(--gelb); border-radius: 1px; height: 100%; }
.mark i:nth-child(1) { width: 3px; } .mark i:nth-child(2) { width: 1.5px; } .mark i:nth-child(3) { width: 4px; } .mark i:nth-child(4) { width: 1.5px; height: 70%; }
.mark.inv { background: var(--gelb); } .mark.inv i { background: var(--g); }
.word { font-weight: 850; font-stretch: 125%; letter-spacing: .02em; }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; background: var(--g); color: #fff; font-weight: 650; font-size: 15px; white-space: nowrap; }
.btn.ghost { background: var(--bon); color: var(--g); box-shadow: inset 0 0 0 1px var(--line); }
.btn.soft { background: var(--paper2); color: var(--g); }
.btn.go { background: var(--gruen); color: #fff; }
.btn.warn { background: var(--rot); color: #fff; }
.btn.brand { background: var(--brand); color: var(--brand-ink); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 56px; padding: 0 22px; font-size: 17px; border-radius: 14px; }

/* Kassentasten */
.key { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--bon); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); text-align: left; min-height: 78px; font-weight: 650; font-size: 15px; line-height: 1.15; }
.key i[data-i] { width: 22px; height: 22px; color: var(--g2); }
.key small { font-weight: 500; font-size: 12px; color: var(--g3); }
.key.dark { background: var(--band2); color: #fff; box-shadow: none; } .key.dark i[data-i] { color: var(--gelb); } .key.dark small { color: var(--g4); }
.key:active, .key.press { transform: translateY(1px); box-shadow: inset 0 0 0 2px var(--g); }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.chip i[data-i] { width: 14px; height: 14px; }
.chip.green { background: var(--gruen-l); color: var(--gruen-d); } .chip.amber { background: var(--bern-l); color: #8f5800; }
.chip.red { background: var(--rot-l); color: #a5232a; } .chip.blue { background: var(--blau-l); color: #1d4fb3; }
.chip.gray { background: var(--paper2); color: var(--g2); } .chip.yellow { background: var(--gelb); color: var(--g); }
.chip.dark { background: var(--band3); color: #e8ebed; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }

.card { background: var(--bon); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); }
.label { font-size: 12.5px; font-weight: 600; color: var(--g3); }
.h1 { font-size: 26px; font-weight: 750; letter-spacing: -.01em; }
.h2 { font-size: 18px; font-weight: 700; }

/* Der Bon: weißes Thermopapier mit gezackter Abrisskante */
.bon { background: var(--bon); position: relative; }
.bon.tear::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; background: linear-gradient(-45deg, var(--bon) 4px, transparent 0) 0 0 / 10px 8px, linear-gradient(45deg, var(--bon) 4px, transparent 0) 0 0 / 10px 8px; }
.bon.tear-b::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: linear-gradient(-135deg, var(--bon) 4px, transparent 0) 0 0 / 10px 8px, linear-gradient(135deg, var(--bon) 4px, transparent 0) 0 0 / 10px 8px; }

/* Warentrenner: Grenze zwischen zwei Einkäufen */
.trenner { background: repeating-linear-gradient(135deg, var(--g) 0 10px, var(--gelb) 10px 20px); }
.trenner.soft { background: repeating-linear-gradient(135deg, rgba(28,32,36,.08) 0 8px, transparent 8px 16px); }

/* Markierung wie Textmarker: letzter Scan */
.marker { background: linear-gradient(transparent 8%, var(--gelb) 8%, var(--gelb) 92%, transparent 92%); }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; color: var(--g3); font-size: 12px; padding: 0 10px 8px; }
.tbl td { padding: 10px; border-top: 1px solid var(--line2); }
.tbl .r { text-align: right; }

.bar { height: 6px; border-radius: 99px; background: var(--paper2); overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--g); border-radius: 99px; }
.toggle { width: 40px; height: 24px; border-radius: 99px; background: var(--g4); position: relative; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.toggle.on { background: var(--gruen); } .toggle.on::after { left: 19px; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--paper2); }
.seg button { height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--g2); }
.seg button.on { background: var(--bon); color: var(--g); box-shadow: 0 1px 2px rgba(0,0,0,.14); }

/* Seitenleiste Zentrale */
.side { width: 232px; background: var(--g); color: #d5d9dc; display: flex; flex-direction: column; padding: 18px 14px; gap: 2px; flex: none; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: #fff; font-size: 17px; }
.side .grp { font-size: 11.5px; color: #7f878e; padding: 14px 10px 6px; font-weight: 600; }
.side a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 14px; font-weight: 550; color: inherit; text-decoration: none; }
.side a i[data-i] { width: 17px; height: 17px; color: #8d959c; }
.side a.on { background: var(--band3); color: #fff; } .side a.on i[data-i] { color: var(--gelb); }
.side .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--band3); font-size: 12.5px; color: #8d959c; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; background: var(--gelb); color: var(--g); flex: none; }

.demo-note { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; font-size: 10.5px; color: var(--g3); pointer-events: none; }

/* Ketten-Themen (frei erfunden) */
[data-theme="nordmarkt"] { --brand: #0f5e4b; --brand-ink: #fff; --brand-l: #e2efeb; }
[data-theme="frischwerk"] { --brand: #c8202f; --brand-ink: #fff; --brand-l: #fbe6e8; }
[data-theme="hafenkauf"] { --brand: #1e4fa0; --brand-ink: #fff; --brand-l: #e4ebf7; }
