:root {
  --bg: #f4f5fb; --card: #ffffff; --card2: #f8f9ff; --tx: #141a33; --mu: #6b7491; --bd: #e5e8f3;
  --ac: #5b5bf0; --ac2: #8b5cf6; --ac-soft: #eceeff;
  --ok: #0f9d6e; --ok-soft: #e3f6ee; --warn: #a76a05; --warn-soft: #fff3d6; --bad: #d6334a; --bad-soft: #fde8ec;
  --rev: #c9ccfb; --prof: #5b5bf0;
  --sh: 0 1px 2px rgba(20, 26, 51, .04), 0 8px 24px rgba(20, 26, 51, .06);
  --r: 16px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1020; --card: #161a30; --card2: #1b2038; --tx: #eceefb; --mu: #8f97b6; --bd: #262c4a;
    --ac-soft: #23284d; --ok: #34d399; --ok-soft: #10332b; --warn: #f6c453; --warn-soft: #3a2f12;
    --bad: #ff7a8c; --bad-soft: #3b1a22; --rev: #2f3566; --prof: #8b8bff; --sh: 0 8px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tx); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--ac); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: 24px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
.mu { color: var(--mu); } .sm { font-size: 13px; } .xs { font-size: 12px; }
.mono { font-family: var(--mono); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--ok); } .neg { color: var(--bad); } .warn-t { color: var(--warn); }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.stack > * + * { margin-top: 14px; }

/* Shell */
.shell { min-height: 100dvh; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--bd); padding-top: env(safe-area-inset-top); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; color: var(--tx); }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { padding: 7px 13px; border-radius: 10px; color: var(--mu); font-weight: 550; }
.nav a:hover { background: var(--ac-soft); text-decoration: none; }
.nav a.on { background: var(--ac-soft); color: var(--ac); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 18px 16px 48px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.tabbar { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--bd); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--mu); font-size: 11px; font-weight: 600; border-radius: 10px; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.on { color: var(--ac); }
  .tabbar svg { width: 22px; height: 22px; }
  .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 21px; }
}
.ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Karten & Raster */
.card { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); box-shadow: var(--sh); padding: 16px; }
.card > h2 { margin-bottom: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); box-shadow: var(--sh); padding: 14px 16px; }
.kpi .k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mu); font-weight: 600; }
.kpi { container-type: inline-size; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; line-height: 1.2; }
.kpi .s { font-size: 12.5px; color: var(--mu); margin-top: 2px; }
.kpi.hero { background: linear-gradient(135deg, var(--ac), var(--ac2)); border: 0; color: #fff; }
.kpi.hero .k, .kpi.hero .s { color: rgba(255, 255, 255, .82); }
.delta { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-left: 0; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.delta.dn { background: var(--bad-soft); color: var(--bad); }
.kpi.hero .delta { background: rgba(255, 255, 255, .22); color: #fff; }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; align-items: start; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* Bedienelemente */
button, .btn { font: inherit; font-weight: 600; color: var(--tx); background: var(--card); border: 1px solid var(--bd); border-radius: 10px; padding: 8px 14px; cursor: pointer; transition: background .12s, border-color .12s, transform .05s; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
button:hover, .btn:hover { background: var(--card2); border-color: color-mix(in srgb, var(--ac) 35%, var(--bd)); text-decoration: none; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.pri, .btn.pri { background: linear-gradient(135deg, var(--ac), var(--ac2)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(91, 91, 240, .3); }
button.pri:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--ac), var(--ac2)); }
button.ghost { background: transparent; border-color: transparent; color: var(--mu); }
button.danger { color: var(--bad); }
button.sm, .btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
input, select, textarea { font: inherit; color: var(--tx); background: var(--card); border: 1px solid var(--bd); border-radius: 10px; padding: 8px 11px; min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid color-mix(in srgb, var(--ac) 60%, transparent); outline-offset: 1px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ac); padding: 0; }
label.fld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mu); font-weight: 600; }
label.fld input, label.fld select { font-weight: 400; color: var(--tx); }
.chips { display: inline-flex; background: var(--card); border: 1px solid var(--bd); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.chips button { border: 0; background: transparent; color: var(--mu); padding: 6px 12px; border-radius: 9px; font-size: 13.5px; }
.chips button.on { background: var(--ac-soft); color: var(--ac); }

/* Tabellen */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--bd); white-space: nowrap; vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--mu); font-weight: 600; background: var(--card2); }
th.num, td.num { text-align: right; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--ac-soft); }
td.wrapc { white-space: normal; min-width: 180px; }
@media (max-width: 760px) { .hide-sm { display: none; } th, td { padding: 9px 8px; } }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--ac-soft); color: var(--ac); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.mute { background: var(--card2); color: var(--mu); border: 1px solid var(--bd); }

/* Hinweise */
.note { border-radius: 12px; padding: 11px 14px; background: var(--warn-soft); color: var(--warn); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.note.info { background: var(--ac-soft); color: var(--tx); }
.note.err { background: var(--bad-soft); color: var(--bad); }
.note a { font-weight: 650; }
.empty { padding: 32px 16px; text-align: center; color: var(--mu); }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--bd); border-top-color: var(--ac); border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -3px; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { padding: 48px 16px; text-align: center; color: var(--mu); }

/* Diagramme (SVG) */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--mu); font-size: 11px; font-family: var(--font); }
.chart .grid { stroke: var(--bd); stroke-width: 1; }
.chart .bar-rev { fill: var(--rev); }
.chart .bar-prof { fill: var(--prof); }
.chart .bar-inc { fill: none; stroke: var(--mu); stroke-dasharray: 3 3; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--mu); margin-top: 8px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.c-goods { fill: #6366f1; background: #6366f1; } .c-pack { fill: #a78bfa; background: #a78bfa; }
.c-porto { fill: #f59e0b; background: #f59e0b; } .c-fee { fill: #ec4899; background: #ec4899; }
.c-prof { fill: #10b981; background: #10b981; } .c-rev { background: var(--rev); } .c-profb { background: var(--prof); }
.split { width: 100%; height: 22px; display: block; border-radius: 8px; overflow: hidden; }
.bk { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 14px; font-size: 14px; margin-top: 12px; }
.bk .lbl { display: flex; align-items: center; }

/* Details */
.kv { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; font-size: 14px; }
.kv .t { grid-column: 1 / -1; border-top: 1px solid var(--bd); margin-top: 4px; padding-top: 8px; font-weight: 700; display: contents; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--bd); gap: 12px; }
.sum-row:last-child { border-bottom: 0; }
.sum-row.total { font-weight: 700; font-size: 16px; border-top: 2px solid var(--bd); }
.addr { line-height: 1.55; }
.cost-in { width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.cost-in.ph::placeholder { color: var(--mu); }
tr.dirty td { background: var(--warn-soft); }
tr.saved td { background: var(--ok-soft); transition: background 1.2s; }

/* Login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 20% -10%, color-mix(in srgb, var(--ac) 22%, transparent), transparent), radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--ac2) 18%, transparent), transparent), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--bd); border-radius: 22px; box-shadow: var(--sh); padding: 28px 24px; }
.login-card .brand { justify-content: center; font-size: 20px; margin-bottom: 4px; }
.login-card form > * + * { margin-top: 12px; }
.login-card input { width: 100%; }
.login-card button.pri { width: 100%; justify-content: center; padding: 11px; }
.secret { font-family: var(--mono); font-size: 17px; letter-spacing: .08em; background: var(--card2); border: 1px dashed var(--bd); border-radius: 12px; padding: 12px; text-align: center; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-family: var(--mono); font-size: 15px; background: var(--card2); border: 1px solid var(--bd); border-radius: 12px; padding: 14px; text-align: center; user-select: all; }

/* Toast & Modal */
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (max-width: 760px) { #toast { bottom: calc(86px + env(safe-area-inset-bottom)); } }
.toast { background: var(--tx); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 550; box-shadow: var(--sh); max-width: 90vw; animation: fadein .18s ease-out; }
.toast.err { background: var(--bad); color: #fff; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(10, 12, 28, .5); display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--card); border: 1px solid var(--bd); border-radius: 18px; box-shadow: var(--sh); max-width: 640px; width: 100%; max-height: 86dvh; overflow: auto; padding: 20px; }
.dialog h2 { font-size: 18px; margin-bottom: 10px; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
@media print { .top, .tabbar, #toast { display: none; } }

/* utility classes (CSP: no inline styles) */
.u1{text-align:center}
.u2{width:100%;justify-content:center}
.u3{margin:10px 0}
.u4{margin-top:12px}
.u5{margin-bottom:12px}
.u6{align-self:flex-end}
.u7{padding:16px 16px 0}
.u8{padding:8px 16px 12px}
.u9{min-width:180px}
.u10{margin-top:8px}
.u11{margin-top:6px}
.u12{margin-top:10px}
.u13{min-width:200px}
.u14{margin-bottom:8px}
.u15{width:130px}
.u16{width:70px;text-align:right}
.u17{width:80px;text-align:right}
.u18{margin:0}
.kpi { min-width: 0; } .kpi .v { font-size: clamp(18px, 12cqw, 26px); }


/* Kanäle, Lagerreichweite, Umsatzsteuer, Bestand, Zugangsdaten */
.badge.amz { background: #fff1e0; color: #b45309; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.amz { background: #3a2a12; color: #f6b45a; } }
.sec td { background: var(--card2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mu); font-weight: 650; padding: 8px 16px; }
.nowrap { white-space: nowrap; }
.cols, .cols2 { align-items: stretch; }
.track { height: 8px; border-radius: 99px; background: var(--bd); overflow: hidden; }
.fill { height: 100%; border-radius: 99px; }
.fill.m-ok { background: var(--ok); } .fill.m-warn { background: #f59e0b; } .fill.m-bad { background: var(--bad); }
.w0 { width: 0%; } .w1 { width: 1%; } .w2 { width: 2%; } .w3 { width: 3%; } .w4 { width: 4%; } .w5 { width: 5%; } .w6 { width: 6%; } .w7 { width: 7%; } .w8 { width: 8%; } .w9 { width: 9%; } .w10 { width: 10%; } .w11 { width: 11%; } .w12 { width: 12%; } .w13 { width: 13%; } .w14 { width: 14%; } .w15 { width: 15%; } .w16 { width: 16%; } .w17 { width: 17%; } .w18 { width: 18%; } .w19 { width: 19%; } .w20 { width: 20%; } .w21 { width: 21%; } .w22 { width: 22%; } .w23 { width: 23%; } .w24 { width: 24%; } .w25 { width: 25%; } .w26 { width: 26%; } .w27 { width: 27%; } .w28 { width: 28%; } .w29 { width: 29%; } .w30 { width: 30%; } .w31 { width: 31%; } .w32 { width: 32%; } .w33 { width: 33%; } .w34 { width: 34%; } .w35 { width: 35%; } .w36 { width: 36%; } .w37 { width: 37%; } .w38 { width: 38%; } .w39 { width: 39%; } .w40 { width: 40%; } .w41 { width: 41%; } .w42 { width: 42%; } .w43 { width: 43%; } .w44 { width: 44%; } .w45 { width: 45%; } .w46 { width: 46%; } .w47 { width: 47%; } .w48 { width: 48%; } .w49 { width: 49%; } .w50 { width: 50%; } .w51 { width: 51%; } .w52 { width: 52%; } .w53 { width: 53%; } .w54 { width: 54%; } .w55 { width: 55%; } .w56 { width: 56%; } .w57 { width: 57%; } .w58 { width: 58%; } .w59 { width: 59%; } .w60 { width: 60%; } .w61 { width: 61%; } .w62 { width: 62%; } .w63 { width: 63%; } .w64 { width: 64%; } .w65 { width: 65%; } .w66 { width: 66%; } .w67 { width: 67%; } .w68 { width: 68%; } .w69 { width: 69%; } .w70 { width: 70%; } .w71 { width: 71%; } .w72 { width: 72%; } .w73 { width: 73%; } .w74 { width: 74%; } .w75 { width: 75%; } .w76 { width: 76%; } .w77 { width: 77%; } .w78 { width: 78%; } .w79 { width: 79%; } .w80 { width: 80%; } .w81 { width: 81%; } .w82 { width: 82%; } .w83 { width: 83%; } .w84 { width: 84%; } .w85 { width: 85%; } .w86 { width: 86%; } .w87 { width: 87%; } .w88 { width: 88%; } .w89 { width: 89%; } .w90 { width: 90%; } .w91 { width: 91%; } .w92 { width: 92%; } .w93 { width: 93%; } .w94 { width: 94%; } .w95 { width: 95%; } .w96 { width: 96%; } .w97 { width: 97%; } .w98 { width: 98%; } .w99 { width: 99%; } .w100 { width: 100%; }
.u19 { margin: 8px 0 6px; }
.meter { height: 8px; }
.split { border-radius: 99px; overflow: hidden; }
.stock-in { display: inline-flex; align-items: center; gap: 8px; }
.stock-in .cost-in { width: 64px; }
.stock-btn { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ok-soft); color: var(--ok); cursor: default; box-shadow: none; }
.stock-btn:disabled { opacity: 1; }
.stock-btn.st-warn { background: var(--warn-soft); color: var(--warn); } .stock-btn.st-bad { background: var(--bad-soft); color: var(--bad); } .stock-btn.st-mute { background: var(--card2); color: var(--mu); }
.stock-btn svg { width: 16px; height: 16px; }
.stock-btn .ico-save { display: none; }
.stock-btn.dirty { background: var(--ok); color: #fff; cursor: pointer; }
.stock-btn.dirty .ico-save { display: block; } .stock-btn.dirty .ico-state { display: none; }
.ord-link { color: inherit; text-decoration: none; } .ord-link:hover { text-decoration: none; background: var(--card2); }
.c-woo { background: #7f54b3; fill: #7f54b3; } .c-amz { background: #f59e0b; fill: #f59e0b; }
.chart .bar-woo { fill: #7f54b3; } .chart .bar-amz { fill: #f59e0b; }
.inv-row { display: grid; gap: 5px; padding: 10px 0; border-bottom: 1px solid var(--bd); }
.inv-row:last-child { border-bottom: 0; }
.inv-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.inv-name { font-weight: 600; min-width: 0; }
.meter { width: 100%; height: 6px; display: block; }
.m-bg { fill: var(--bd); } .m-ok { fill: var(--ok); } .m-warn { fill: #f59e0b; } .m-bad { fill: var(--bad); }
.vat-big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sec-in { display: flex; gap: 6px; } .sec-in input { flex: 1; min-width: 0; }
.hint { margin: 4px 0 8px; }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.svc-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ===== isometrische Lager-Szene ===== */
.scene .wall-t { fill: var(--wall-t); } .scene .wall-l { fill: var(--wall-l); } .scene .wall-r { fill: var(--wall-r); } 
.scene .concrete-t { fill: var(--concrete-t); } .scene .concrete-l { fill: var(--concrete-l); } .scene .concrete-r { fill: var(--concrete-r); } 
.scene .glass-t { fill: var(--glass-t); } .scene .glass-l { fill: var(--glass-l); } .scene .glass-r { fill: var(--glass-r); } 
.scene .floor-t { fill: var(--floor-t); } .scene .floor-l { fill: var(--floor-l); } .scene .floor-r { fill: var(--floor-r); } 
.scene .floorin-t { fill: var(--floorin-t); } .scene .floorin-l { fill: var(--floorin-l); } .scene .floorin-r { fill: var(--floorin-r); } 
.scene .steel-t { fill: var(--steel-t); } .scene .steel-l { fill: var(--steel-l); } .scene .steel-r { fill: var(--steel-r); } 
.scene .carton-t { fill: var(--carton-t); } .scene .carton-l { fill: var(--carton-l); } .scene .carton-r { fill: var(--carton-r); } 
.scene .purple-t { fill: var(--purple-t); } .scene .purple-l { fill: var(--purple-l); } .scene .purple-r { fill: var(--purple-r); } 
.scene .orange-t { fill: var(--orange-t); } .scene .orange-l { fill: var(--orange-l); } .scene .orange-r { fill: var(--orange-r); } 
.scene .dark-t { fill: var(--dark-t); } .scene .dark-l { fill: var(--dark-l); } .scene .dark-r { fill: var(--dark-r); } 
.scene .desk-t { fill: var(--desk-t); } .scene .desk-l { fill: var(--desk-l); } .scene .desk-r { fill: var(--desk-r); } 
.scene .yellow-t { fill: var(--yellow-t); } .scene .yellow-l { fill: var(--yellow-l); } .scene .yellow-r { fill: var(--yellow-r); } 
.scene .red-t { fill: var(--red-t); } .scene .red-l { fill: var(--red-l); } .scene .red-r { fill: var(--red-r); } 
.scene .blue-t { fill: var(--blue-t); } .scene .blue-l { fill: var(--blue-l); } .scene .blue-r { fill: var(--blue-r); } 
.scene .truckw-t { fill: var(--truckw-t); } .scene .truckw-l { fill: var(--truckw-l); } .scene .truckw-r { fill: var(--truckw-r); } 
.scene .trucka-t { fill: var(--trucka-t); } .scene .trucka-l { fill: var(--trucka-l); } .scene .trucka-r { fill: var(--trucka-r); } 
.scene .glass-r { fill: var(--glass-r); }
.scene { --ground:#e4e7f1; --road:#b3b9d5; --walk:#f3f4fa; --park:#cfe9c9; --yard:#dbdeeb; --zebra:#f6f7fc; --lane:#f6f7fc; --shd:#1c2250; --shd-o:.13; --winpx:#a9c9f2; --winop:.85; --tree1:#7ecb8c; --tree2:#5db574; --trunk:#8a6a4b; --glassr:#9fc3ee; --glow:0;--wall-t:#f6f7fc;--wall-l:#e4e8f4;--wall-r:#cfd5e8;--concrete-t:#e1e5f0;--concrete-l:#cfd4e3;--concrete-r:#b9bfd4;--glass-t:#c6dcf8;--glass-l:#93b8ea;--glass-r:#7aa4dc;--floor-t:#eceef6;--floor-l:#d9dce9;--floor-r:#c5c9db;--floorin-t:#dfe3f1;--floorin-l:#d9dce9;--floorin-r:#c5c9db;--steel-t:#b7bfdb;--steel-l:#97a2c6;--steel-r:#818dB5;--carton-t:#ebbd7e;--carton-l:#d79e57;--carton-r:#c08746;--purple-t:#a982dc;--purple-l:#8a5cc2;--purple-r:#7447a8;--orange-t:#fcc462;--orange-l:#f59e0b;--orange-r:#d98806;--dark-t:#59607f;--dark-l:#444a68;--dark-r:#363b55;--desk-t:#c7cde6;--desk-l:#aab2d4;--desk-r:#939bc0;--yellow-t:#ffd85e;--yellow-l:#f4bd2e;--yellow-r:#dba51d;--red-t:#f58377;--red-l:#dd6357;--red-r:#c64f44;--blue-t:#7f86f7;--blue-l:#5f66e3;--blue-r:#4d54c9;--truckw-t:#ffffff;--truckw-l:#eceff8;--truckw-r:#d6dbec;--trucka-t:#7f86f7;--trucka-l:#5f66e3;--trucka-r:#4d54c9; }
.scene.night { --ground:#171b36; --road:#252a4d; --walk:#343b69; --park:#24413f; --yard:#222749; --zebra:#8a92b8; --lane:#8a92b8; --shd:#04061a; --shd-o:.35; --winpx:#ffe08a; --winop:1; --tree1:#2f6a5c; --tree2:#245449; --trunk:#4b3a2c; --glass-r:#3f5f9f; --glow:1;--wall-t:#4c5586;--wall-l:#3b4373;--wall-r:#2f3663;--concrete-t:#3d4573;--concrete-l:#313869;--concrete-r:#272d55;--glass-t:#3f5f9f;--glass-l:#2e4c86;--glass-r:#243c6e;--floor-t:#2f3560;--floor-l:#272c52;--floor-r:#1f2444;--floorin-t:#2a3059;--floorin-l:#272c52;--floorin-r:#1f2444;--steel-t:#6b77a9;--steel-l:#5a659b;--steel-r:#49537f;--carton-t:#b88848;--carton-l:#9c6e36;--carton-r:#835a2c;--purple-t:#7a5aa8;--purple-l:#63469a;--purple-r:#503782;--orange-t:#c99443;--orange-l:#b57a0a;--orange-r:#9a6606;--dark-t:#59607f;--dark-l:#444a68;--dark-r:#363b55;--desk-t:#6b77a9;--desk-l:#59659a;--desk-r:#48527e;--yellow-t:#e8c24c;--yellow-l:#cfa322;--yellow-r:#b48c18;--red-t:#c46a62;--red-l:#a85248;--red-r:#8c4239;--blue-t:#6b72d8;--blue-l:#545bbf;--blue-r:#4249a5;--truckw-t:#d4d9f0;--truckw-l:#b9bfe0;--truckw-r:#a0a6cb;--trucka-t:#6b72d8;--trucka-l:#545bbf;--trucka-r:#4249a5; }
.scene { --glass-r: #8fb6ea; }

.lager { --p: 0; position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; z-index: 0; background: #e4e7f1; }
.lager:has(.scene.night) { background: #171b36; }
.lager-scroll { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; transform: scale(calc(1 + var(--p) * .05)); filter: blur(calc(var(--p) * 5px)); opacity: calc(1 - var(--p) * .35); transform-origin: 50% 40%; }
.lager-scroll::-webkit-scrollbar { display: none; }
.scene { height: 100%; width: 100%; line-height: 0; transition: background .5s; background: var(--ground); }
@media (max-width: 1000px) { .scene { width: calc(100svh * 1.78); min-width: 100%; } }
.scene-svg { width: 100%; height: 100%; display: block; user-select: none; }
.lager-ui { position: absolute; inset: 0; pointer-events: none; opacity: calc(1 - var(--p) * 2.4); }
.lager-ui > * { pointer-events: auto; }
.lager-title, .lager-tools, .lager-quests, .lager-info, .lager-down { position: absolute; }
.glassy, .lager-title, .lager-quests, .lager-info.open, .lager-info .hint-line, .hq-btn, .lager-tools .chips, .lager-down { background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); border: 1px solid color-mix(in srgb, var(--bd) 80%, transparent); box-shadow: 0 8px 28px rgba(30, 36, 80, .16); }
.lager-title { top: 108px; left: max(16px, calc((100% - 1120px) / 2)); border-radius: 16px; padding: 10px 14px; display: grid; gap: 1px; }
.lager-title b { font-size: 15px; } .lager-title span { color: var(--mu); font-size: 12px; }
.lager-tools { top: 176px; left: max(16px, calc((100% - 1120px) / 2)); display: flex; gap: 8px; align-items: center; }
.lager-tools .chips { border-radius: 14px; }
.hq-btn { border-radius: 14px; padding: 9px 14px; }
.hq-n { background: var(--ac); color: #fff; border-radius: 99px; font-size: 11.5px; padding: 1px 7px; }
.lager-quests { top: 108px; right: max(16px, calc((100% - 1120px) / 2)); width: 330px; max-height: calc(100% - 260px); overflow: auto; border-radius: 18px; padding: 14px; display: none; }
.lager-quests.open { display: block; }
.lager-info { left: 50%; bottom: 112px; transform: translateX(-50%); width: min(600px, calc(100% - 24px)); }
.lager-info .hint-line { display: block; width: max-content; max-width: 100%; margin: 0 auto; border-radius: 99px; padding: 8px 16px; font-size: 13px; color: var(--mu); text-align: center; }
.lager-info.open { border-radius: 20px; padding: 16px 18px; max-height: 42vh; overflow: auto; animation: rise .22s ease-out; }
.lager-info.open .hint-line { display: none; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.si-x { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 4px 8px; color: var(--mu); box-shadow: none; }
.lager-info.open .si-head { padding-right: 28px; }
.lager-down { right: max(16px, calc((100% - 1120px) / 2)); bottom: 112px; border-radius: 99px; padding: 8px 14px; font-size: 13px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.lager-info.open ~ .lager-down { display: none; }
/* Szene: Bestandteile */
.scene .ground { fill: var(--ground); } .scene .road { fill: var(--road); } .scene .walk { fill: var(--walk); } .scene .park { fill: var(--park); } .scene .yard { fill: var(--yard); }
.scene .zebra { fill: var(--zebra); opacity: .8; } .scene .lane { stroke: var(--lane); stroke-width: 2; fill: none; opacity: .75; }
.scene .shd { opacity: var(--shd-o); } .scene .shd-p { fill: var(--shd); } .scene .shd-e { fill: var(--shd); opacity: .14; }
.scene .winpx { fill: var(--winpx); opacity: var(--winop); }
.scene.night .winp { filter: drop-shadow(0 0 3px rgba(255, 214, 110, .5)); }
.scene .tree .crown { fill: var(--tree1); } .scene .tree .crown2 { fill: var(--tree2); } .scene .trunk { fill: var(--trunk); }
.scene .glass-r { fill: var(--glass-r); }
.scene .awn-a { fill: #f4eefc; } .scene .awn-b { fill: #8a5cc2; } .scene .shopwin { fill: #bcd7f7; } .scene.night .shopwin { fill: #ffe08a; } .scene .shopdoor { fill: #6f47a8; }
.scene .dockdoor { fill: #8791b8; } .scene .stripe-o { fill: #f59e0b; }
.scene .sgn { fill: #2b3150; font-size: 15px; font-weight: 800; text-anchor: middle; letter-spacing: .12em; } .scene .sgn-s { fill: #fff; font-size: 12px; } .scene .sgn-w { fill: #fff; font-size: 14px; } .scene .sgn-d { fill: #2b3150; font-size: 14px; }
.scene .sgn-bg { fill: #3d4580; } .scene .band { fill: #5b5bf0; } .scene .band-o { fill: #f59e0b; }
.scene .coin-c { fill: #ffc928; stroke: #d99a00; stroke-width: 2; } .scene .coin-t { fill: #8a5a00; font-size: 24px; font-weight: 800; text-anchor: middle; }
.scene .col { fill: #f2f3fa; stroke: #c6cbe6; stroke-width: 1; } .scene .pole { stroke: #5b6490; stroke-width: 2; } .scene .flag { fill: #e5484d; transform-box: fill-box; transform-origin: 0 50%; animation: wave 2s ease-in-out infinite; }
.scene .shelf-in { fill: rgba(40, 48, 90, .28); } .scene .shelf-ln { stroke: #818dB5; stroke-width: 2; }
.scene .shl-t { fill: #fff; font-size: 7.5px; font-weight: 700; text-anchor: middle; }
.scene .bar-bg { fill: rgba(255, 255, 255, .28); } .scene .bar-ok { fill: #22c55e; } .scene .bar-warn { fill: #f59e0b; } .scene .bar-bad { fill: #ef4444; }
.scene .lamp, .scene .lampdome { stroke: rgba(0, 0, 0, .35); stroke-width: 1; } .scene .lampbase { fill: #59607f; }
.scene .l-ok { fill: #22c55e; } .scene .l-warn { fill: #f59e0b; } .scene .l-bad { fill: #ef4444; }
.scene.night .lamp.l-ok { filter: drop-shadow(0 0 4px #22c55e); }
.scene .alarm-glow { fill: #ef4444; opacity: .25; animation: blink 1s steps(2, jump-none) infinite; }
.scene .blink { animation: blink 1s steps(2, jump-none) infinite; }
.scene .worker { animation: bob 1.1s ease-in-out infinite; } .scene .w-body { fill: #5b5bf0; } .scene .w-head { fill: #ffd2ae; }
.scene .pk-badge circle { fill: #e5484d; stroke: #fff; stroke-width: 2; } .scene .pk-badge text { fill: #fff; font-weight: 800; font-size: 13px; text-anchor: middle; }
.scene .wheel { fill: #2b3150; } .scene .hub { fill: #c9cde6; } .scene .tr-stripe { fill: #5f66e3; } .scene .tr-t { fill: #fff; font-size: 14px; font-weight: 800; text-anchor: middle; letter-spacing: .14em; }
.scene .hl-glow { fill: #ffe9a6; opacity: 0; } .scene.night .hl-glow { opacity: .55; }
.scene .coinsign { animation: bob 3s ease-in-out infinite; }
.scene text { font-family: inherit; pointer-events: none; }
/* Beschriftungs-Pillen */
.scene .pill { fill: var(--card); stroke: var(--bd); stroke-width: 1; } .scene .pill-tip { fill: var(--card); } .scene .pill-sh { fill: rgba(25, 32, 80, .18); }
.scene .pill-t { fill: var(--tx); font-size: 13px; font-weight: 700; } .scene .pill-s { fill: var(--mu); font-size: 11px; font-weight: 500; }
.scene .pill-bt { fill: #fff; font-size: 13px; font-weight: 800; text-anchor: middle; }
.scene .pb-ac { fill: #5b5bf0; } .scene .pb-ok { fill: #16a34a; } .scene .pb-warn { fill: #f59e0b; } .scene .pb-bad { fill: #ef4444; } .scene .pb-woo { fill: #7f54b3; } .scene .pb-amz { fill: #f59e0b; }
.scene .pillg { transition: transform .15s; }
/* Interaktion */
.hot { cursor: pointer; outline: none; transition: filter .15s; }
.hot:hover, .hot:focus-visible { filter: brightness(1.06) drop-shadow(0 0 6px rgba(124, 124, 255, .75)); }
.hot.sel { filter: drop-shadow(0 0 3px #7c7cff) drop-shadow(0 0 9px #7c7cff); }
.scene.night .hot:hover { filter: brightness(1.2) drop-shadow(0 0 7px rgba(255, 226, 122, .8)); }
@keyframes blink { 0% { opacity: 1; } 100% { opacity: .3; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes wave { 0%,100% { transform: skewY(0); } 50% { transform: skewY(8deg); } }
@media (prefers-reduced-motion: reduce) { .scene *, .lager-down { animation: none !important; } .lager-scroll { transform: none; filter: none; } }
/* Rahmen: Kopfleiste oben, Dock unten */
.shell .top { position: fixed; top: 34px; left: 12px; right: 12px; border: 1px solid color-mix(in srgb, var(--bd) 80%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--card) 72%, transparent); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); box-shadow: 0 8px 28px rgba(30, 36, 80, .14); padding-top: 0; z-index: 40; }
.shell .top-in { padding: 8px 14px; }
.shell .nav { display: none; }
.shell .tabbar { display: flex; left: 50%; right: auto; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); gap: 2px; padding: 6px; border: 1px solid color-mix(in srgb, var(--bd) 80%, transparent); border-radius: 24px; background: color-mix(in srgb, var(--card) 78%, transparent); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 12px 36px rgba(30, 36, 80, .22); z-index: 50; position: fixed; }
.shell .tabbar a { flex: none; min-width: 84px; padding: 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--mu); font-size: 11.5px; font-weight: 600; border-radius: 18px; }
.shell .tabbar a:hover { text-decoration: none; background: var(--ac-soft); }
.shell .tabbar a.on { color: var(--ac); background: var(--ac-soft); }
.shell .tabbar svg { width: 22px; height: 22px; }
@media (max-width: 480px) { .shell .tabbar a { min-width: 0; padding: 8px 10px; flex: 1; } .shell .tabbar { width: calc(100% - 24px); } .lager-title { display: none; } .lager-tools { top: 108px; left: 12px; right: 12px; justify-content: space-between; } .lager-quests { top: 160px; right: 12px; left: 12px; width: auto; } }
.shell .wrap { padding-top: 112px; padding-bottom: 130px; }
.on-dash .wrap { max-width: none; padding: 0 0 130px; }
#toast { bottom: 112px; }
.demo-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; font-size: 11px; padding: 3px 10px; }
/* Auswertungen: Blatt schiebt sich über das Lager */
.sheet { position: relative; z-index: 2; background: var(--bg); border-radius: 30px 30px 0 0; box-shadow: 0 -24px 60px rgba(20, 26, 70, .28); margin-top: -4px; padding: 14px 0 40px; min-height: 60vh; }
.sheet::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--bd); margin: 0 auto 6px; }
.sheet-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px 0; }
.rv { opacity: 0; transform: translateY(26px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
/* Info-Inhalte */
.si-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.si-head h3 { margin: 0; font-size: 16px; }
.si-kv { display: grid; grid-template-columns: 1fr auto; gap: 5px 14px; font-size: 13.5px; }
.si-kv span { color: var(--mu); } .si-kv b { text-align: right; font-variant-numeric: tabular-nums; }
.si-sub { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mu); font-weight: 650; }
.si-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.goal { background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid var(--bd); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.quest { width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 9px 12px; font-weight: 500; }
.quest .qd { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ac); }
.quest.q-warn .qd { background: #f59e0b; } .quest.q-bad .qd { background: var(--bad); }
.quest .qt { display: grid; gap: 1px; flex: 1; min-width: 0; font-size: 13.5px; } .quest .qt small { color: var(--mu); font-size: 12px; }
.quest .qa { color: var(--ac); font-size: 12.5px; font-weight: 650; }

@media (min-width: 761px) {
  .lager-info.open { bottom: auto; top: 238px; transform: none; width: 340px; max-height: calc(100% - 360px); animation: slidein .25s ease-out; }
  .lager-info.open.side-l { left: max(16px, calc((100% - 1120px) / 2)); right: auto; }
  .lager-info.open.side-r { right: max(16px, calc((100% - 1120px) / 2)); left: auto; }
  .lager-info.open.side-r ~ .lager-quests.open { display: none; }
}
@keyframes slidein { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 480px) { .lager-info:not(.open) .hint-line { display: none; } }

.scene .post { fill: #59607f; } .scene .lhead { fill: #2b3150; } .scene .p-head { fill: #ffd2ae; }
.past-lager .lager-ui { visibility: hidden; }
@media (max-width: 760px) {
  .lager-info, .lager-down { position: fixed; bottom: var(--dock-gap, 112px); z-index: 45; }
  .lager-info.open { max-height: calc(100dvh - var(--dock-gap, 112px) - 130px); overflow: auto; }
  .lager-quests { position: fixed; max-height: calc(100dvh - var(--dock-gap, 112px) - 190px); z-index: 45; }
}
@media (max-width: 480px) { .demo-bar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; } }

.lager-info.open, .lager-quests { overflow: visible !important; }
.lager-info .si-body, .lager-quests .si-body { overflow: auto; max-height: calc(100vh - 380px); overscroll-behavior: contain; }
.si-x { top: 6px; right: 8px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; padding: 0; z-index: 2; background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--bd); color: var(--tx); }
.lager-quests .si-x { position: absolute; }
.lager-quests .si-body .si-head { padding-right: 44px; }
@media (max-width: 760px) { .lager-info .si-body, .lager-quests .si-body { max-height: calc(100dvh - var(--dock-gap, 112px) - 190px); } .lager-quests { max-height: none !important; } }
.lager-ui:has(.lager-quests.open) .lager-down, .lager-ui:has(.lager-info.open) .lager-down { display: none; }
@media (max-width: 760px) {
  .lager-title { display: none; }
  .lager-tools { top: 92px; left: 12px; right: 12px; justify-content: space-between; }
  .lager-quests { top: 144px !important; right: 12px; left: 12px; width: auto; }
}
