/* Belegsystem am Terminal (P3/P4): Laufkarte, MB, WP, WE, KB — hell und dokumentnah wie das Papier
   (SM 06.10.2026: „bau den Terminal so wie im Mockup, der aussieht wie die Dokumente").
   Referenz: docs/belege/HKM_Laufkarte_Tablet_Mockup.html (Tablet quer, 1280 x 800).
   Farben nur über die Tokens des Terminals (/ui/tokens.css) — hier steht kein Farbwert außer dem
   Weiß auf Farbflächen, das es als Token nicht gibt. */
:root {
  --bl-weiss: #fff;
  --bl-akzent: var(--hk-blau);              /* Bereich Produktion; Verkauf/Einkauf überschreiben */
  --bl-schrift-zahl: var(--schrift);
}
#toast { z-index: 30; }                     /* über dem Beleg-Overlay (15), unter dem Mengen-Pad (50) */

#beleg-knopf { display: none; }
#abmelden:not(.versteckt) ~ #beleg-knopf { display: inline-block; font-weight: 600;
  background: var(--hk-blau); color: var(--bl-weiss); border-color: var(--hk-blau); }

.bl-ansicht { position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column;
  background: var(--flaeche); color: var(--text); font-family: var(--schrift);
  -webkit-font-smoothing: antialiased; }
.bl-ansicht.prod { --bl-akzent: var(--hk-blau); }
.bl-ansicht.verkauf { --bl-akzent: var(--hk-dunkelblau); }
.bl-ansicht.einkauf { --bl-akzent: var(--hk-grau); }
.bl-ansicht button { font-family: inherit; }
.bl-ansicht button:active { transform: scale(0.97); }
.bl-ansicht button:focus-visible, .bl-ansicht input:focus-visible { outline: 3px solid var(--hk-blau);
  outline-offset: 2px; }
.bl-lab { font-size: 0.75rem; font-weight: 500; color: var(--text-gedimmt); white-space: nowrap; }
.bl-num { font-variant-numeric: tabular-nums lining-nums; font-weight: 600; }

/* Farbband wie auf dem Papier */
.bl-band { flex: none; display: flex; align-items: center; justify-content: space-between;
  min-height: 76px; padding: 0 1.5rem; background: var(--bl-akzent); color: var(--bl-weiss); }
.bl-band .t { display: flex; flex-direction: column; gap: 2px; }
.bl-band .t small { font-size: 0.8rem; font-weight: 500; }
.bl-band .t b { font-size: 2.3rem; font-weight: 700; line-height: 0.95; }
.bl-band .r { display: flex; align-items: center; gap: 1.1rem; }
.bl-band .nr { font-size: 1.8rem; }
.bl-band .bl-logo { height: 40px; filter: brightness(0) invert(1); }
.bl-chip { display: inline-flex; align-items: center; gap: 0.5rem; height: 34px; padding: 0 0.9rem;
  border-radius: 17px; background: var(--bl-weiss); color: var(--text); font-size: 0.92rem;
  font-weight: 600; }
.bl-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--gruen); }
.bl-chip.stoerung i { background: var(--rot); }
.bl-chip.offen i { background: var(--hk-grau); }
.bl-chip.fertig i { background: var(--gruen); }
.bl-band .bl-zu { height: 40px; padding: 0 1rem; background: var(--bl-weiss); color: var(--text);
  font-weight: 600; border-radius: 10px; }

.bl-meta { flex: none; display: grid; grid-template-columns: 2fr 1.6fr 2fr 1.8fr 1.6fr; gap: 1rem;
  padding: 0.55rem 1.5rem; border-bottom: 1px solid var(--rand-stark); align-items: end; }
.bl-meta div { display: flex; flex-direction: column; gap: 2px; }
.bl-meta b { font-size: 0.95rem; font-weight: 600; }

.bl-offline { flex: none; background: var(--gelb-flaeche); color: var(--gelb-text);
  padding: 0.35rem 1.5rem; font-size: 0.85rem; font-weight: 600; }

.bl-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 372px; }
.bl-links { padding: 0 1.5rem 1rem; display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--rand); }
.bl-route { flex: none; display: grid; grid-template-columns: 1fr 48px 1fr auto; gap: 0.75rem;
  align-items: end; padding: 0.75rem 0; border-bottom: 1px solid var(--rand-stark); }
.bl-route b { font-size: 1.75rem; font-weight: 600; line-height: 1; }
.bl-route svg { stroke: var(--text); }
.bl-hero { flex: none; display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 1.5rem;
  padding: 0.75rem 0 0.9rem; border-bottom: 3px solid var(--text); align-items: end; }
.bl-hero .gross { font-size: 3.6rem; line-height: 0.88; letter-spacing: -1px; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.bl-hero .gross.mittel { font-size: 2.4rem; letter-spacing: 0; }
.bl-hero .gross.klein { font-size: 1.7rem; letter-spacing: 0; line-height: 1.1; }
.bl-hero .sub { font-size: 1.05rem; font-weight: 500; margin-top: 6px; }
/* Teil: der volle Name groß und fett (bis zu drei Zeilen, nie abgeschnitten), die Nummer klein und normal. */
.bl-hero .gross.teil { font-size: 2.1rem; line-height: 1.05; letter-spacing: 0; font-weight: 700;
  overflow-wrap: anywhere; font-variant-numeric: normal; }
.bl-hero .sub.nr { font-size: 0.95rem; font-weight: 400; }

.bl-docs { flex: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1.5px solid var(--text); margin-top: 0.75rem; }
.bl-doc { padding: 0.4rem 0.65rem; border: none; border-left: 1px solid var(--rand-stark);
  display: flex; flex-direction: column; gap: 3px; background: var(--flaeche); text-align: left;
  color: var(--text); border-radius: 0; }
.bl-doc:first-child { border-left: none; }
.bl-doc .v { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; font-weight: 600; }
.bl-doc i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--rand-stark); }
.bl-doc.gruen i { background: var(--gruen); }
.bl-doc.gelb i { background: var(--gelb); }
.bl-doc.rot i { background: var(--rot); }
.bl-doc.neutral .v { color: var(--text-gedimmt); font-weight: 500; }

.bl-tabelle { margin-top: 0.75rem; flex: 1; min-height: 0; overflow: auto; }
.bl-zeile { display: grid; align-items: center; min-height: 46px; width: 100%; padding: 0;
  background: var(--flaeche); border: none; border-bottom: 1px solid var(--rand-stark);
  border-radius: 0; text-align: left; color: var(--text); }
.bl-zeile.afo { grid-template-columns: 52px 110px 1fr 60px 60px 66px 112px 170px; }
.bl-zeile.pos { grid-template-columns: 44px 1fr 120px 56px 74px 74px 110px 90px; }
.bl-zeile.pos.kb { grid-template-columns: 44px 1fr 130px 100px 56px 74px 74px 110px; }
.bl-zeile.pos .bez { font-weight: 600; overflow-wrap: anywhere; }
.bl-zeile.pos .nr { font-size: 0.85rem; font-weight: 400; }
.bl-zeile > span { padding: 0 0.5rem; min-width: 0; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.bl-zeile.kopf { min-height: 30px; border-bottom: 2px solid var(--text); font-size: 0.75rem;
  font-weight: 600; position: sticky; top: 0; z-index: 1; cursor: default; }
.bl-zeile.cur { background: var(--badge-bg); box-shadow: inset 4px 0 0 var(--hk-blau); }
.bl-zeile.sel:not(.cur) { background: var(--flaeche-hell); }
.bl-zeile.done { color: var(--text-gedimmt); }
.bl-zeile small { display: block; }
.bl-zeile .r, .bl-r { text-align: right; }
.bl-pille { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; }
.bl-pille i { width: 9px; height: 9px; border-radius: 50%; background: var(--rand-stark); }
.bl-pille.ok { color: var(--gruen-text); } .bl-pille.ok i { background: var(--gruen); }
.bl-pille.aktiv { color: var(--hk-blau); } .bl-pille.aktiv i { background: var(--hk-blau); }
.bl-pille.rot { color: var(--rot-text); } .bl-pille.rot i { background: var(--rot); }
.bl-pille.grau { color: var(--text-gedimmt); }

.bl-stand { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-top: 0.75rem; border: 1.5px solid var(--text); padding: 0.7rem 1rem; }
.bl-stand .gross { font-size: 2.2rem; font-weight: 600; line-height: 1; }

/* Bedienfeld rechts: nur der eine Handgriff */
.bl-rechts { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--flaeche-hell); min-height: 0; overflow: auto; }
.bl-jetzt { border: 1.5px solid var(--text); background: var(--flaeche); }
.bl-jetzt .h { background: var(--bl-akzent); color: var(--bl-weiss); padding: 0.5rem 0.9rem;
  font-size: 0.95rem; font-weight: 600; }
.bl-jetzt.stoerung .h { background: var(--rot); }
.bl-jetzt.fertig .h { background: var(--gruen); }
.bl-jetzt .b { padding: 0.75rem 0.9rem; display: flex; flex-direction: column; gap: 0.6rem; }
.bl-jetzt .was { font-size: 1.35rem; font-weight: 600; }
.bl-zaehler { display: flex; align-items: baseline; justify-content: space-between; }
.bl-zaehler .gross { font-size: 3.4rem; line-height: 0.9; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.bl-balken { height: 12px; border: 1.5px solid var(--text); }
.bl-balken div { height: 100%; background: var(--hk-blau); }
.bl-vorgabe { display: flex; justify-content: space-between; font-size: 0.88rem;
  color: var(--text-gedimmt); }
.bl-tasten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.bl-taste { height: 52px; border: 1.5px solid var(--text); background: var(--flaeche);
  font-size: 1.25rem; font-weight: 600; color: var(--text); border-radius: 0; }
.bl-taste[disabled], .bl-cta[disabled] { opacity: 0.45; cursor: default; }
.bl-cta { height: 60px; border: none; background: var(--hk-blau); color: var(--bl-weiss);
  font-size: 1.15rem; font-weight: 700; border-radius: 0; }
.bl-cta.zweit { height: 46px; background: var(--flaeche); color: var(--text);
  border: 1.5px solid var(--text); font-size: 1rem; font-weight: 600; }
.bl-cta[disabled] { background: var(--hk-grau); }
.bl-warn { height: 46px; border: 1.5px solid var(--rot); background: var(--flaeche);
  color: var(--rot-text); font-size: 1rem; font-weight: 700; border-radius: 0; }
.bl-warn.an { background: var(--rot); color: var(--bl-weiss); }
.bl-pending { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  font-size: 0.95rem; font-weight: 600; }
.bl-pending button { height: 40px; padding: 0 0.9rem; border: 1.5px solid var(--text);
  background: var(--flaeche); border-radius: 0; font-weight: 600; }
.bl-pending button.ja { background: var(--hk-blau); color: var(--bl-weiss); border-color: var(--hk-blau); }
.bl-hinweis { font-size: 0.88rem; padding: 0.5rem 0.7rem; background: var(--gelb-flaeche);
  color: var(--gelb-text); font-weight: 600; }
.bl-hinweis.rot { background: var(--rot-flaeche); color: var(--rot-text); }
.bl-feld { display: flex; flex-direction: column; gap: 3px; }
.bl-feld input { font: inherit; font-size: 1.25rem; font-weight: 600; padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--text); background: var(--flaeche); color: var(--text); width: 100%;
  border-radius: 0; font-variant-numeric: tabular-nums; }
.bl-feld .mit-scan { display: flex; gap: 0.4rem; }
.bl-feld .mit-scan button { flex: none; width: 56px; border: 1.5px solid var(--text);
  background: var(--flaeche); font-size: 1.3rem; border-radius: 0; }
.bl-zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.bl-log { border-top: 3px solid var(--text); padding-top: 0.5rem; flex: 1; min-height: 0;
  overflow: auto; display: flex; flex-direction: column; }
.bl-log .row { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.4rem 0;
  border-bottom: 1px solid var(--rand-stark); font-size: 0.88rem; }
.bl-log .row span:last-child { color: var(--text-gedimmt); white-space: nowrap; }
.bl-leer { padding: 3rem; text-align: center; color: var(--text-gedimmt); }

/* Auftrags-App P5: Arbeitsplan-Sperre auf der Laufkarte — feste Warnzone oben (wie auf dem Papier),
   Sperr-Knopf unter dem Bedienfeld, Grund als große Kacheln (Handschuh-tauglich, ≥ 64 px). */
.bl-sperre { flex: none; background: var(--rot); color: var(--bl-weiss); padding: 0.55rem 1.5rem;
  font-size: 1.05rem; font-weight: 600; display: flex; flex-direction: column; gap: 0.25rem; }
.bl-sperre b { font-weight: 800; letter-spacing: 0.01em; }
.bl-sperre small { display: block; font-size: 0.8rem; font-weight: 500; opacity: 0.9; }
.bl-sperr-knopf { height: 52px; border: 1.5px solid var(--rot); background: var(--flaeche);
  color: var(--rot-text); font-size: 1.05rem; font-weight: 700; border-radius: 0; }
.bl-sperr-form .h { background: var(--rot); }
.bl-sperr-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.bl-sperr-kachel { min-height: 64px; padding: 0.4rem 0.6rem; border: 1.5px solid var(--text);
  background: var(--flaeche); color: var(--text); font-size: 1rem; font-weight: 600;
  border-radius: 0; text-align: center; min-width: 0; hyphens: manual; }
.bl-sperr-kachel:last-child:nth-child(odd) { grid-column: 1 / -1; }
.bl-sperr-kachel.an { background: var(--rot); border-color: var(--rot); color: var(--bl-weiss); }
.bl-feld input#bl-sperr-text { font-size: 1.1rem; font-weight: 500; }
