/* Kartenzahlung (cp-), Geräte und Brücke (dv-), Stempeluhr und Arbeitszeiten (tc-), Lagerbestand (stk-),
   Auftrag-Fenster (oa-) und Rechner (calc-). Grundform hell; Klassisch grau und eckig; DOS blau mit Textschrift. */

/* ---------- Kartenzahlung ---------- */
.cp-back { z-index: 900; }
.dlg.cp { width: min(440px, 96vw); }
.cp-amount { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.cp-amount span { display: flex; align-items: center; gap: 8px; font-size: 22px; }
.cp-sum { font-size: 40px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; padding: 4px 0; }
.cp-live { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; background: #eef4fb; border-radius: 10px; padding: 14px 16px; }
.cp-live .cp-spin { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 50%; border: 4px solid #c5d8ee; border-top-color: #2a78d6; animation: cp-spin .9s linear infinite; }
.cp-live b { font-size: 17px; }
.cp-live small { color: #5c6670; }
@keyframes cp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cp-live .cp-spin { animation-duration: 3s; } }
.cp-ok { background: #e2f0e5; color: #1d6b38; font-weight: 700; font-size: 18px; border-radius: 10px; padding: 14px 16px; text-align: center; }
.cp-bad { background: #fbe4e2; color: #b3261e; font-weight: 600; border-radius: 10px; padding: 12px 14px; }
.op-term { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; cursor: pointer; }
.op-term small { flex-basis: 100%; padding-left: 24px; }

/* ---------- Geräte und Brücke ---------- */
.dv-dev { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--of-line); border-radius: calc(var(--of-r) / 2); flex-wrap: wrap; }
.dv-led { width: 12px; height: 12px; border-radius: 50%; background: #b9bdc2; flex: none; }
.dv-dev.on .dv-led { background: #1fa34a; box-shadow: 0 0 0 4px rgba(31, 163, 74, .18); }
.dv-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.dv-state { font-size: 13px; }
.dv-pair { border: 2px dashed var(--of-acc); border-radius: calc(var(--of-r) / 2); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.dv-pair ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.dv-code { display: block; font-size: 34px; letter-spacing: 4px; font-family: ui-monospace, "Courier New", monospace; margin-top: 2px; }

/* ---------- Stempeluhr ---------- */
.tc { display: flex; flex-direction: column; gap: 14px; padding-bottom: 14px; }
.tc-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.tc-clock { font-size: 48px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; display: flex; flex-direction: column; }
.tc-clock small { font-size: 14px; font-weight: 400; color: var(--of-mut); margin-top: 6px; }
.tc-hint { color: var(--of-mut); font-size: 14px; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tc-tile { text-align: left; border: 1px solid var(--of-line); border-left: 8px solid var(--sc); border-radius: calc(var(--of-r) / 1.5); background: var(--of-card); padding: 14px;
  display: flex; flex-direction: column; gap: 4px; cursor: pointer; font: inherit; color: inherit; min-height: 96px; }
.tc-tile b { font-size: 18px; }
.tc-tile small { color: var(--of-mut); }
.tc-tile.da { background: #eaf6ed; } .tc-tile.da .tc-st { color: #1d6b38; font-weight: 600; }
.tc-tile.pause { background: #fff6dc; } .tc-tile.pause .tc-st { color: #8a5a00; font-weight: 600; }
.tc-tile.weg .tc-st { color: var(--of-mut); }
.tc-tile.sel { outline: 3px solid var(--of-acc); outline-offset: 1px; }
.tc-msg { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 850; background: #1d6b38; color: #fff; font-size: 26px; font-weight: 700;
  padding: 26px 34px; border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); text-align: center; max-width: 90vw; cursor: pointer; }
.dlg.tc-pad { width: min(340px, 96vw); }
.tc-dots { display: flex; justify-content: center; gap: 12px; padding: 8px 0; }
.tc-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #8a939c; }
.tc-dots i.on { background: #263238; border-color: #263238; }
.tc-err { color: #b3261e; text-align: center; font-weight: 600; }
.tc-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tc-keys button { font-size: 24px; padding: 14px 0; border: 1px solid #c8ced5; border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; color: inherit; }
.tc-keys button:active { background: #e8eef7; }
.tc-acts { display: flex; gap: 8px; }
.tc-acts .btn { flex: 1; padding: 12px; font-size: 16px; }
.tc-sums { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.tc-sum { border: 1px solid var(--of-line); border-radius: calc(var(--of-r) / 2); padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.tc-sum .big { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tc-sum small { color: var(--of-mut); }
.tc-month { min-width: 130px; text-align: center; }
.of-table tr.tc-open td { background: #f2f8f3; }
.look-classic .tc-tile, .look-classic .tc-sum, .look-classic .tc-keys button { border-radius: 0; }

/* ---------- Lagerbestand ---------- */
.stk { display: flex; flex-direction: column; gap: 10px; }
.stk-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stk-kpi { border: 1px solid var(--of-line); background: var(--of-card); border-radius: calc(var(--of-r) / 1.5); padding: 6px 14px; display: flex; flex-direction: column; min-width: 120px; }
.stk-kpi small { color: var(--of-mut); font-size: 12px; }
.stk-kpi b { font-size: 22px; font-variant-numeric: tabular-nums; }
.stk-kpi.bad b { color: #b3261e; }
.stk-inv { font-size: 13px; color: var(--sx-warn); font-weight: 600; }
.stk-pk { display: block; color: var(--of-mut); font-weight: 400; font-size: 11.5px; }
.stk-table tr.stk-leer td:first-child, .stk-table tr.stk-knapp td:first-child { box-shadow: inset 4px 0 0 #b3261e; }
.stk-table tr.stk-bald td:first-child { box-shadow: inset 4px 0 0 #c98500; }
.stk-cnt { width: 90px; text-align: right; }
.stk-or { align-self: end; padding-bottom: 8px; }
.stk-chips { flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.stk-hist { max-height: 60vh; }
.look-classic .stk-kpi { border-radius: 0; }

/* ---------- Auftrag-Fenster ---------- */
.dlg.oa { width: min(860px, 96vw); }
.oa-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.oa-st { font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #e8eef7; color: #24527a; }
.oa-st.storniert, .oa-st.abgelehnt { background: #fbe4e2; color: #b3261e; }
.oa-st.offen { background: #fff1c9; color: #8a5a00; }
.oa-st.zugestellt, .oa-st.abgeschlossen { background: #e2f0e5; color: #1d6b38; }
.oa-pay { font-weight: 600; }
.oa-pay.ok { color: #1d6b38; } .oa-pay.open { color: #8a5a00; }
.oa-card { font-size: 13px; color: var(--dlg-muted, #5c6670); }
.oa-cust { font-size: 14px; line-height: 1.45; }
.oa-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; min-height: 0; }
@media (max-width: 760px) { .oa-grid { grid-template-columns: 1fr; } }
.oa-items { border: 1px solid var(--dlg-line, #e3e6ea); border-radius: 8px; padding: 8px 10px; max-height: 44vh; overflow: auto; }
.oa-it { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; font-size: 14px; }
.oa-it.sub { font-size: 12.5px; color: var(--dlg-muted, #5c6670); }
.oa-it.gone { text-decoration: line-through; opacity: .6; }
.oa-it b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.oa-sum { display: flex; justify-content: flex-end; gap: 14px; border-top: 1px solid var(--dlg-line, #e3e6ea); margin-top: 6px; padding-top: 6px; align-items: baseline; }
.oa-sum b { font-size: 18px; }
.oa-hist { font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; max-height: 44vh; overflow: auto; }
.oa-hist > small { color: var(--dlg-muted, #5c6670); font-weight: 600; }
.oa-hist span { font-variant-numeric: tabular-nums; color: var(--dlg-muted, #5c6670); }
.oa-why { color: #b3261e; font-weight: 600; margin-top: 4px; }
.oa-storno { border: 2px solid #e6b3ae; background: #fff7f6; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.oa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.oa-acts { align-items: center; }
.m-card { cursor: pointer; }
.look-classic .oa-items, .look-classic .oa-storno, .look-classic .oa-st { border-radius: 0; }

/* ---------- Rechner ---------- */
.dlg.calc { width: min(320px, 96vw); }
.calc-tape { font-size: 12px; color: var(--dlg-muted, #5c6670); text-align: right; display: flex; flex-direction: column-reverse; max-height: 90px; overflow: hidden; }
.calc-d { display: flex; flex-direction: column; align-items: flex-end; background: #f3f5f7; border-radius: 8px; padding: 8px 12px; }
.calc-d small { color: #5c6670; min-height: 1.2em; word-break: break-all; }
.calc-d b { font-size: 30px; font-variant-numeric: tabular-nums; }
.calc-k { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-k button { font-size: 20px; padding: 12px 0; border: 1px solid #c8ced5; border-radius: 8px; background: #fff; cursor: pointer; color: inherit; }
.calc-k button.op { background: #eef2f5; font-weight: 700; }
.calc-k button.fn { background: #f6efe0; }
.calc-k button.eq { background: #1f6f43; color: #fff; border-color: #1f6f43; font-weight: 700; }
.look-classic .calc-d, .look-classic .calc-k button { border-radius: 0; }

/* ---------- DOS: Fenster grau mit blauer Titelzeile, alles eckig, Textschrift ---------- */
.look-dos { --dlg-bg: #aaaaaa; --dlg-fg: #000; --dlg-radius: 0; --dlg-border: 2px solid #fff; --dlg-tbg: #0000aa; --dlg-tfg: #fff; --dlg-line: #555; --dlg-line2: #000;
  --dlg-iradius: 0; --dlg-sel: #0000aa; --dlg-selfg: #fff; --dlg-muted: #222; --dlg-th: #aaaaaa; --dlg-item: #aaaaaa; }
.look-dos .dlg { font-family: "Px437 IBM VGA 8x16", "Courier New", ui-monospace, monospace; box-shadow: 14px 14px 0 rgba(0, 0, 0, .85); }
.look-dos .dlg .btn, .look-dos .dlg .chip { border-radius: 0; font-family: inherit; background: #aaaaaa; color: #000; border: 1px solid #000; box-shadow: inset -2px -2px 0 #555, inset 2px 2px 0 #fff; }
.look-dos .dlg .btn.primary, .look-dos .dlg .chip.on { background: #0000aa; color: #fff; }
.look-dos .dlg .btn.danger { background: #aa0000; color: #fff; }
.look-dos .dlg kbd { background: transparent; color: inherit; border-color: currentColor; border-radius: 0; }
.look-dos .dlg-input { font-family: inherit; background: #0000aa; color: #ffff55; border-color: #000; }
.look-dos .cp-live { background: #0000aa; color: #fff; border-radius: 0; } .look-dos .cp-live small { color: #aaaaaa; }
.look-dos .cp-live .cp-spin { border-radius: 0; border-color: #5555ff; border-top-color: #ffff55; }
.look-dos .cp-ok { background: #00aa00; color: #fff; border-radius: 0; } .look-dos .cp-bad { background: #aa0000; color: #fff; border-radius: 0; }
.look-dos .oa-items, .look-dos .oa-st, .look-dos .calc-d, .look-dos .calc-k button, .look-dos .tc-keys button, .look-dos .tc-dots i { border-radius: 0; font-family: inherit; }
.look-dos .oa-storno { background: #aaaaaa; border: 2px solid #aa0000; border-radius: 0; }
.look-dos .oa-st { background: #0000aa; color: #fff; } .look-dos .oa-st.storniert, .look-dos .oa-st.abgelehnt { background: #aa0000; }
.look-dos .oa-pay.ok { color: #005500; } .look-dos .oa-pay.open { color: #aa0000; }
.look-dos .calc-d { background: #000; color: #55ff55; } .look-dos .calc-d small { color: #00aa00; }
.look-dos .calc-k button, .look-dos .tc-keys button { background: #aaaaaa; border-color: #000; box-shadow: inset -2px -2px 0 #555, inset 2px 2px 0 #fff; }
.look-dos .calc-k button.eq { background: #0000aa; color: #fff; }
.look-dos .tc-tile { border-radius: 0; background: #0000aa; border-color: #55ffff; border-left-color: var(--sc); color: #fff; font-family: inherit; }
.look-dos .tc-tile.da { background: #005500; } .look-dos .tc-tile.da .tc-st { color: #55ff55; }
.look-dos .tc-tile.pause { background: #555500; } .look-dos .tc-tile.pause .tc-st { color: #ffff55; }
.look-dos .tc-tile.sel { outline-color: #ffff55; }
.look-dos .tc-clock small, .look-dos .tc-hint, .look-dos .tc-tile small { color: #aaaaaa; }
.look-dos .tc-msg { border-radius: 0; background: #00aa00; font-family: "Px437 IBM VGA 8x16", "Courier New", ui-monospace, monospace; }
.look-dos .tc-sum { border-color: #55ffff; border-radius: 0; }
.look-dos .of-table tr.tc-open td { background: #000080; }
.look-dos .dv-dev, .look-dos .dv-pair { border-color: #55ffff; border-radius: 0; }
.look-dos .dv-led { border-radius: 0; }
.look-dos .stk-kpi { background: #0000aa; border-color: #55ffff; border-radius: 0; }
.look-dos .stk-kpi small, .look-dos .stk-pk { color: #aaaaaa; }
.look-dos .stk-kpi.bad b { color: #ff5555; }
.look-dos .stk-inv { color: #ffff55; }
a.sx-btn { text-decoration: none; color: inherit; }
/* gemeinsame Fenster, die innerhalb des DOS-Bildschirms aufgehen: nicht die große Bildschirmschrift erben */
.d-scr .dlg-back { font-size: 15px; line-height: 1.4; user-select: text; }
.d-scr .dlg-back .btn { font-size: 14px; }
