/* ============================================================
   CENTRAL COCKPIT — SUPPORT-KONSOLE  (/support.html)
   Eigenstaendiges, schlankes Stylesheet (laedt NICHT das
   Desktop-CSS). Tokens gespiegelt aus mobile.css (Mix-Markt-CD:
   Blau #019be1 = Aktion, Gelb #fedc00 = Marken-Akzent).
   Layout v2 (2026-08-27): feste Arbeitsflaeche ohne Seiten-Scroll,
   zwei gleich grosse Panels; nur Markt-Grid bzw. Ergebnis scrollen.
   ============================================================ */

:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-alt: #eef1f8;
    --border-clr: #e2e8f4;
    --border-soft: #eef1f8;
    --text: #0c1730;
    --text-secondary: #3c4761;
    --text-muted: #7b86a0;
    --primary: #019be1;
    --primary-content: #ffffff;
    --primary-strong: #0288c7;
    --primary-bg: #e6f4fd;
    --primary-shadow: rgba(1, 155, 225, 0.32);
    --accent: #fedc00;
    --accent-ink: #0c1730;
    --success: #15a06b;
    --success-bg: rgba(21, 160, 107, 0.12);
    --danger: #e5484d;
    --danger-bg: rgba(229, 72, 77, 0.12);
    --warning: #f5a623;
    --warning-bg: rgba(245, 166, 35, 0.16);
    --info: #0ea5b7;

    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --shadow: 0 1px 2px rgba(12, 23, 48, 0.04), 0 3px 10px rgba(12, 23, 48, 0.05);
    --shadow-md: 0 8px 24px rgba(12, 23, 48, 0.10), 0 2px 6px rgba(12, 23, 48, 0.05);

    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    --mono: "Cascadia Mono", "JetBrains Mono", ui-monospace, Consolas, "SF Mono", Menlo, monospace;
    --header-h: 56px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e1726;
        --surface: #16202f;
        --surface-alt: #1e2a3b;
        --border-clr: rgba(255, 255, 255, 0.12);
        --border-soft: rgba(255, 255, 255, 0.07);
        --text: #eaf0f7;
        --text-secondary: #aab6c6;
        --text-muted: #7b86a0;
        --primary: #38b6ed;
        --primary-bg: rgba(56, 182, 237, 0.16);
        --primary-shadow: rgba(1, 155, 225, 0.45);
        --shadow: 0 1px 2px rgba(0,0,0,.4), 0 3px 10px rgba(0,0,0,.35);
        --shadow-md: 0 8px 24px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.4);
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
#app { height: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
code, .mono { font-family: var(--mono); font-size: 0.93em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hidden { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-clr); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: padding-box; border: 2px solid transparent; }

/* ---------- App-Shell ---------- */
.sk-app { height: 100%; display: flex; flex-direction: column; }
.sk-header {
    flex: none; display: flex; align-items: center; gap: 16px;
    padding: 0 24px; height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border-clr);
}
.sk-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sk-brand .mark {
    width: 32px; height: 32px; border-radius: 9px; flex: none;
    background: var(--primary); color: var(--primary-content);
    display: grid; place-items: center;
    box-shadow: 0 6px 14px -4px var(--primary-shadow);
    position: relative;
}
.sk-brand .mark::after {
    content: ""; position: absolute; right: -4px; bottom: -4px;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--accent); border: 2px solid var(--surface);
}
.sk-brand .mark svg { width: 17px; height: 17px; }
.sk-brand h1 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; line-height: 1.2; }
.sk-brand p { margin: 0; font-size: 12px; color: var(--text-muted); white-space: nowrap; line-height: 1.2; }
.sk-header .spacer { flex: 1; }
.sk-fleet { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--text-muted); }
.sk-fleet strong { color: var(--text); font-weight: 700; }
.sk-fleet .on { display: inline-flex; align-items: center; gap: 5px; }
.sk-fleet .on i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.sk-lang { display: inline-flex; background: var(--surface-alt); border-radius: 999px; padding: 3px; gap: 2px; }
.sk-lang button {
    border: 0; background: transparent; color: var(--text-secondary);
    font-size: 12px; font-weight: 700; letter-spacing: .04em;
    padding: 4px 10px; border-radius: 999px; transition: background .15s, color .15s;
}
.sk-lang button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.sk-user { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.sk-user .avatar {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px;
}
.sk-user .name { font-weight: 600; color: var(--text); line-height: 1.2; }
.sk-user .role { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); line-height: 1.2; }

.sk-main {
    flex: 1; min-height: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
    padding: 18px 22px 22px;
    max-width: 1720px; width: 100%; margin: 0 auto;
}

/* ---------- Panel ---------- */
.panel {
    background: var(--surface); border: 1px solid var(--border-clr);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.panel-head {
    flex: none; display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
}
.panel-head .ico {
    width: 34px; height: 34px; border-radius: 10px; flex: none;
    background: var(--primary-bg); color: var(--primary); display: grid; place-items: center;
}
.panel-head .ico svg { width: 18px; height: 18px; }
.panel-head h3 { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; line-height: 1.25; }
.panel-head p { margin: 1px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.panel-head .ttl { min-width: 0; flex: 1; }
.panel-head .meta { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.panel-body {
    flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px;
    padding: 16px 18px 18px;
}
.field-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-muted); margin: 0 0 6px;
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 160px; }
.toolbar { flex: none; display: grid; gap: 10px; align-items: end; }
.toolbar.t1 { grid-template-columns: minmax(0, 1fr) auto; }
.toolbar.t2 { grid-template-columns: minmax(150px, 3fr) minmax(160px, 4fr) auto; }
.toolbar .field { min-width: 0; }
.hint { font-size: 12.5px; color: var(--text-muted); }
.hint.err { color: var(--danger); font-weight: 600; }
.hint.ok { color: var(--success); font-weight: 600; }
.hintline { flex: none; min-height: 0; }
.hintline:empty { display: none; }

/* ---------- Inputs / Buttons ---------- */
.input {
    width: 100%; height: 40px; padding: 0 12px;
    border: 1px solid var(--border-clr); border-radius: var(--radius);
    background: var(--surface); color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.input.mono { font-family: var(--mono); letter-spacing: .02em; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.input-wrap .input { padding-left: 34px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px; border-radius: var(--radius);
    border: 1px solid var(--border-clr); background: var(--surface); color: var(--text);
    font-weight: 600; white-space: nowrap; transition: background .15s, transform .1s, box-shadow .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--surface-alt); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary {
    background: var(--primary); border-color: var(--primary); color: var(--primary-content);
    box-shadow: 0 8px 18px -8px var(--primary-shadow);
}
.btn.primary:hover:not(:disabled) { background: var(--primary-strong); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-secondary); }
.btn.ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-spinner, .spinner {
    width: 16px; height: 16px; border-radius: 50%; flex: none;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Combobox (Markt-Auswahl) ---------- */
.cb { position: relative; }
.cb-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
    background: var(--surface); border: 1px solid var(--border-clr); border-radius: var(--radius);
    box-shadow: var(--shadow-md); max-height: 300px; overflow-y: auto; padding: 4px;
}
.cb-item {
    display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 13px;
}
.cb-item:hover, .cb-item.hl { background: var(--primary-bg); }
.cb-item .num { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; }
.cb-item .nm { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.cb-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); opacity: .45; flex: none; }
.cb-item .dot.on { background: var(--success); opacity: 1; }
.cb-empty { padding: 10px; font-size: 12.5px; color: var(--text-muted); text-align: center; }

/* ---------- Store picker (fuellt das Panel) ---------- */
.picker { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--border-clr); border-radius: var(--radius); background: var(--surface-alt); }
.picker-bar { flex: none; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 10px 8px; }
.picker-bar .counter { margin-left: auto; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.picker-bar .counter strong { color: var(--primary); font-size: 13px; }
.store-grid {
    flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 10px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 6px; align-content: start;
}
.chip {
    display: flex; align-items: center; gap: 7px; padding: 7px 8px;
    border: 1px solid var(--border-clr); border-radius: var(--radius-sm);
    background: var(--surface); cursor: pointer; user-select: none; min-width: 0; height: 34px;
    transition: border-color .12s, background .12s;
}
.chip:hover { border-color: var(--primary); }
.chip.selected { border-color: var(--primary); background: var(--primary-bg); }
.chip input { margin: 0; accent-color: var(--primary); flex: none; }
.chip .num { font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.chip .nm { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex: none; background: var(--text-muted); opacity: .45; }
.chip .dot.on { background: var(--success); opacity: 1; }
/* Auftrags-Status direkt am Chip (Signature) */
.chip .st { margin-left: auto; flex: none; display: none; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; }
.chip .st i { width: 8px; height: 8px; border-radius: 50%; }
.chip.st-wait, .chip.st-ok, .chip.st-err, .chip.st-off { border-width: 1.5px; }
.chip.st-wait .st, .chip.st-ok .st, .chip.st-err .st, .chip.st-off .st { display: inline-flex; }
.chip.st-wait .dot, .chip.st-ok .dot, .chip.st-err .dot, .chip.st-off .dot { display: none; }
.chip.st-wait { border-color: var(--primary); }
.chip.st-wait .st { color: var(--primary); }
.chip.st-wait .st i { background: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
.chip.st-ok { border-color: var(--success); background: var(--success-bg); }
.chip.st-ok .st { color: var(--success); }
.chip.st-ok .st i { background: var(--success); }
.chip.st-err { border-color: var(--danger); background: var(--danger-bg); }
.chip.st-err .st { color: var(--danger); }
.chip.st-err .st i { background: var(--danger); }
.chip.st-off { border-color: var(--warning); }
.chip.st-off .st { color: var(--warning); }
.chip.st-off .st i { background: var(--warning); }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .chip.st-wait .st i, .btn-spinner, .spinner { animation: none; } }

/* ---------- Auftrags-Zeile (letzter Auftrag) ---------- */
.jobbar {
    flex: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 9px 12px; border-radius: var(--radius);
    border: 1px solid var(--border-clr); background: var(--surface);
    animation: job-in .25s ease-out;
}
.jobbar:empty { display: none; }
@keyframes job-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.jobbar .art { font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.jobbar .meta { font-size: 12px; color: var(--text-muted); }
.jobbar .sum { margin-left: auto; display: flex; gap: 12px; font-size: 12.5px; font-weight: 600; }
.jobbar .sum .ok { color: var(--success); }
.jobbar .sum .err { color: var(--danger); }
.jobbar .sum .wait { color: var(--primary); }
.jobbar .sum .off { color: var(--warning); }
.jobbar .bar { flex-basis: 100%; height: 4px; border-radius: 2px; background: var(--surface-alt); overflow: hidden; display: flex; }
.jobbar .bar i { display: block; height: 100%; transition: width .4s ease; }
.jobbar .bar .b-ok { background: var(--success); }
.jobbar .bar .b-err { background: var(--danger); }
.jobbar .note { flex-basis: 100%; font-size: 12px; color: var(--text-muted); }
.jobbar .note.err { color: var(--danger); }

/* ---------- Ergebnisbereich (scrollt intern) ---------- */
.result { flex: 1; min-height: 0; overflow-y: auto; }
.result-empty {
    height: 100%; min-height: 220px; display: grid; place-items: center; text-align: center;
    color: var(--text-muted); font-size: 13px; border: 1px dashed var(--border-clr); border-radius: var(--radius);
}
.result-empty svg { width: 34px; height: 34px; opacity: .35; margin-bottom: 8px; }
.result-empty .t { font-weight: 600; color: var(--text-secondary); }

/* ---------- Steps (Preis-Check-Verlauf) ---------- */
.state {
    display: flex; gap: 12px; align-items: flex-start;
    border: 1px solid var(--border-clr); border-radius: var(--radius);
    padding: 14px 16px; background: var(--surface-alt);
}
.state.error { border-color: var(--danger); background: var(--danger-bg); }
.state .title { font-weight: 700; }
.state .sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.state .do { font-size: 12.5px; color: var(--text-secondary); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-clr); }
.steps { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.step .d { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-clr); display: grid; place-items: center; font-size: 10px; flex: none; }
.step.done { color: var(--text-secondary); }
.step.done .d { background: var(--success); border-color: var(--success); color: #fff; }
.step.active { color: var(--text); font-weight: 600; }
.step.active .d { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.step.fail { color: var(--danger); font-weight: 600; }
.step.fail .d { background: var(--danger); border-color: var(--danger); color: #fff; }
.state .ico-err { color: var(--danger); width: 20px; height: 20px; flex: none; margin-top: 1px; }
.state .spinner { color: var(--primary); margin-top: 2px; }

/* ---------- Preis-Ergebnis ---------- */
.pr { display: flex; flex-direction: column; gap: 12px; }
.pr-head { padding: 12px 14px; border: 1px solid var(--border-clr); border-radius: var(--radius); background: var(--surface-alt); }
.pr-head { display: flex; gap: 14px; align-items: flex-start; }
.pr-head-txt { min-width: 0; flex: 1; }
.pr-img { flex: none; width: 72px; height: 72px; border-radius: var(--radius); border: 1px solid var(--border-clr); background: #fff; display: none; overflow: hidden; cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.pr-img.ready { display: block; }
.pr-img:hover { transform: scale(1.04); box-shadow: var(--shadow-md); }
.pr-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(12, 23, 48, .72); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: job-in .15s ease-out; }
.lightbox figure { margin: 0; background: #fff; border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-md); max-width: min(90vw, 720px); }
.lightbox img { display: block; max-width: 100%; max-height: 70vh; object-fit: contain; margin: 0 auto; }
.lightbox figcaption { margin-top: 12px; text-align: center; font-weight: 700; color: #0c1730; font-size: 14px; }
.lightbox figcaption span { font-weight: 500; color: #7b86a0; }
.pr-head h4 { margin: 0 0 5px; font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.pr-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); }
.pr-meta strong { color: var(--text); }
.pr-meta code { background: var(--surface); padding: 1px 6px; border-radius: 4px; }
.banner {
    padding: 10px 14px; border-radius: var(--radius); font-size: 13px;
    border-left: 4px solid var(--primary); background: var(--primary-bg);
}
.banner.warn { border-left-color: var(--warning); background: var(--warning-bg); }
.banner.err { border-left-color: var(--danger); background: var(--danger-bg); }
.banner.ok { border-left-color: var(--success); background: var(--success-bg); }
.pr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pr-col { border: 1px solid var(--border-clr); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.pr-col.wide { grid-column: 1 / -1; }
.pr-col-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); margin-bottom: 10px; }
.pr-row { padding: 6px 0 6px 12px; border-left: 3px solid var(--border-clr); margin-bottom: 10px; }
.pr-row:last-child { margin-bottom: 0; }
.pr-row.action { border-left-color: var(--warning); }
.pr-row.active { border-left-color: var(--success); }
.pr-row.dead { opacity: .6; }
.pr-row.bad { border-left-color: var(--danger); }
.pr-val { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pr-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.pr-ref { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.pr-empty { font-size: 13px; color: var(--text-muted); font-style: italic; padding: 12px 0; text-align: center; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; }
.tag.warn { background: var(--warning); color: var(--accent-ink); }
.tag.ok { background: var(--success-bg); color: var(--success); }
.tag.err { background: var(--danger-bg); color: var(--danger); }
.tag.muted { background: var(--surface-alt); color: var(--text-secondary); }
.ids { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.id { font-family: var(--mono); font-size: 11.5px; padding: 2px 7px; border-radius: 4px; background: var(--surface-alt); color: var(--text-secondary); }
.id strong { color: var(--primary); margin-right: 4px; }
.pr-actions-h { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin: 10px 0 6px; }
.disc { padding: 8px 12px; border-radius: var(--radius-sm); font-size: 12.5px; background: var(--surface-alt); }
.disc.warn { background: var(--warning-bg); }
.disc.error, .disc.critical { background: var(--danger-bg); }
.disc strong { font-family: var(--mono); margin-right: 6px; }
table.sales { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.sales th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 4px 6px; border-bottom: 1px solid var(--border-soft); }
table.sales td { padding: 5px 6px; border-bottom: 1px solid var(--border-soft); font-variant-numeric: tabular-nums; }
table.sales td.r, table.sales th.r { text-align: right; }
table.sales tr.mm td { background: var(--warning-bg); }

details.more { margin-top: 6px; }
details.more summary { cursor: pointer; font-size: 12.5px; color: var(--primary); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: ""; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s; }
details.more[open] summary::before { transform: rotate(90deg); }
.more-row { display: flex; gap: 12px; align-items: baseline; font-size: 12.5px; color: var(--text-secondary); padding: 4px 0 4px 12px; border-left: 3px solid var(--border-soft); margin-top: 4px; }
.more-row .tnum { font-weight: 700; color: var(--text); min-width: 60px; }

/* ---------- Login / Gate ---------- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.gate-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border-clr); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 28px; }
.gate-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.gate-card h1 { margin: 0; font-size: 18px; font-family: var(--font-display); }
.gate-card p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-muted); }
.gate-card .field { margin-bottom: 14px; }
.gate-card label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.gate-card .btn { width: 100%; margin-top: 4px; }
.form-error { background: var(--danger-bg); color: var(--danger); font-size: 13px; padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; }
.input.code { font-family: var(--mono); font-size: 20px; letter-spacing: .35em; text-align: center; }

.gate-card.wide { max-width: 640px; }
.setup-h { margin: 0 0 4px; font-family: var(--font-display); font-size: 18px; }
.setup-p { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); }
.setup-grid { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; margin-bottom: 14px; }
.setup-qr img { width: 200px; height: 200px; border: 1px solid var(--border-clr); border-radius: var(--radius); background: #fff; display: block; }
.setup-step { font-size: 12.5px; color: var(--text-secondary); margin: 0 0 6px; }
.setup-step + .setup-step { margin-top: 12px; }
.setup-secret { display: block; padding: 7px 10px; border: 1px solid var(--border-clr); border-radius: var(--radius-sm); background: var(--surface-alt); font-size: 12px; word-break: break-all; cursor: pointer; margin-bottom: 12px; transition: background .2s; }
.setup-secret.ok { background: var(--success-bg); }
.setup-rec { border: 1px solid var(--border-clr); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; background: var(--warning-bg); }
.setup-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin: 8px 0 10px; }
.setup-codes code { background: var(--surface); padding: 5px 8px; border-radius: var(--radius-sm); font-size: 12.5px; text-align: center; border: 1px solid var(--border-clr); }
.setup-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.setup-check input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.gate-card .btn.ghost { margin-top: 8px; }
@media (max-width: 560px) { .setup-grid { grid-template-columns: 1fr; } .setup-qr img { margin: 0 auto; } }

/* ---------- Toast / Confirm ---------- */
.toast {
    position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px);
    background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius);
    font-size: 13px; font-weight: 600; box-shadow: var(--shadow-md); opacity: 0; transition: all .2s; z-index: 50;
    max-width: 90vw; white-space: pre-line;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--success); color: #fff; }
.overlay { position: fixed; inset: 0; background: rgba(12, 23, 48, .45); display: grid; place-items: center; z-index: 40; padding: 20px; }
.dlg { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; max-width: 440px; padding: 22px; }
.dlg h4 { margin: 0 0 8px; font-size: 16px; font-family: var(--font-display); }
.dlg p { margin: 0 0 18px; font-size: 13.5px; color: var(--text-secondary); white-space: pre-line; }
.dlg .row { justify-content: flex-end; }

/* ---------- Schmale Fenster: untereinander, Seite scrollt ---------- */
@media (max-width: 1100px) {
    html, body, #app, .sk-app { height: auto; min-height: 100%; }
    .sk-main { grid-template-columns: 1fr; }
    .panel { min-height: 520px; }
    .store-grid { max-height: 380px; }
    .sk-fleet { display: none; }
}
@media (max-width: 720px) {
    .sk-header { padding: 0 14px; }
    .sk-brand p { display: none; }
    .sk-main { padding: 12px; gap: 12px; }
    .panel-body { padding: 12px; }
    .sk-user .name, .sk-user .role { display: none; }
    .toolbar.t2 { grid-template-columns: 1fr; }
    .pr-grid { grid-template-columns: 1fr; }
}

/* ---- mono-Lieferbarkeit (artikelcheck) ---- */
.mc { border: 1px solid var(--danger); border-left-width: 4px; border-radius: var(--radius); padding: 12px 14px; background: var(--danger-bg); margin-bottom: 12px; animation: job-in .2s ease-out; }
.mc.ok { border-color: var(--success); background: var(--success-bg); }
.mc .mc-t { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; font-size: 14px; }
.mc .mc-ico { width: 18px; height: 18px; flex: none; color: var(--danger); margin-top: 1px; }
.mc.ok .mc-ico { color: var(--success); }
.mc .mc-m { font-size: 12.5px; color: var(--text-secondary); margin: 4px 0 8px 26px; }
.mc ul { margin: 0 0 0 26px; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--text); }
.mc li + li { margin-top: 6px; }
.mc .mc-allowed { margin-top: 6px; font-size: 12.5px; color: var(--text-secondary); }
.mc .mc-do { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-clr); font-size: 12.5px; color: var(--text); }
.mc .mc-notes { margin: 8px 0 0 26px; font-size: 12.5px; color: var(--text-secondary); }
.mc .mc-stores { margin: 8px 0 0 26px; font-size: 12.5px; color: var(--text-secondary); }
.mc-sum { font-weight: 700; font-size: 13px; color: var(--danger); margin: 8px 0 6px; }
.grp { display: inline-block; padding: 0 7px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border-clr); font-size: 12px; margin: 1px 3px 1px 0; white-space: nowrap; }
.grp.me { border-color: var(--danger); color: var(--danger); font-weight: 700; }
#ld-check:not(:empty) { margin-top: 10px; }
/* ---- Bestellungen (Lagerwirtschaft) ---- */
.orders { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-clr); font-size: 12.5px; }
.orders .o-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 5px; }
.orders .o-last { font-weight: 600; }
.orders .o-never { color: var(--danger); font-weight: 700; }
.orders .o-stale { color: var(--warning); font-weight: 600; }
/* ---- Preis in allen Maerkten ---- */
.pa-head { display: flex; gap: 16px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-clr); border-radius: var(--radius); background: var(--surface-alt); margin-bottom: 10px; }
.pa-head h4 { margin: 0 0 5px; font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.pa-t { flex: 1; min-width: 0; }
.pa-prog { flex: none; width: 260px; }
.pa-sub { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px; text-align: right; }
.pa-bar { height: 6px; background: var(--surface); border: 1px solid var(--border-clr); border-radius: 4px; overflow: hidden; }
.pa-bar i { display: block; height: 100%; background: var(--primary); transition: width .3s ease; }
.pa-var { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-bottom: 8px; font-size: 12.5px; }
.pa-wrap { overflow-x: auto; }
table.pa { width: 100%; border-collapse: collapse; font-size: 13px; }
table.pa th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 4px 8px; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; background: var(--surface); }
table.pa td { padding: 5px 8px; border-bottom: 1px solid var(--border-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.pa td.r, table.pa th.r { text-align: right; }
table.pa td .nm { color: var(--text-muted); font-size: 12px; }
table.pa tr.click { cursor: pointer; }
table.pa tr.click:hover td { background: var(--primary-bg); }
table.pa .price { font-weight: 700; font-size: 14px; }
table.pa td.st { font-size: 12px; color: var(--text-muted); }
table.pa td.st .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--border-clr); vertical-align: middle; }
table.pa tr.ok td.st .dot { background: var(--success); }
table.pa tr.wait td.st .dot { background: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
table.pa tr.miss td.st { color: var(--warning); font-weight: 600; }
table.pa tr.miss td.st .dot { background: var(--warning); }
table.pa tr.err td.st { color: var(--danger); font-weight: 600; }
table.pa tr.err td.st .dot { background: var(--danger); }
table.pa tr.off td { opacity: .55; }
table.pa .diff { font-weight: 700; }
table.pa .diff.eq { color: var(--text-muted); font-weight: 400; }
table.pa .diff.up { color: var(--danger); }
table.pa .diff.down { color: var(--info); }
.tag.warn { background: var(--warning-bg); color: #8a5a00; }
