* { box-sizing: border-box; }
:root {
  --bg: #eef2f7; --panel: #ffffff; --line: #e3e8ef; --text: #0f172a; --muted: #64748b;
  --accent: #4f46e5; --accent2: #4338ca; --accentL: #eef2ff; --danger: #e11d48; --ok: #16a34a; --radius: 12px;
}
html, body { margin: 0; height: 100%; font: 13px/1.4 "Segoe UI", system-ui, sans-serif; color: var(--text); background: var(--bg); overflow: hidden; }
button, select, input, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid #d5dce6; background: #fff; border-radius: 10px; padding: 6px 12px; color: var(--text); transition: background .12s, border-color .12s, transform .08s, box-shadow .12s; }
button:hover { background: #f6f8fb; border-color: #a5b4c8; }
button:active { transform: translateY(1px); }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 8px rgba(79,70,229,.3); }
button.primary:hover { background: var(--accent2); }
button.danger { color: var(--danger); border-color: #fecdd3; }
button.danger:hover { background: #fff1f2; }
button.small { padding: 3px 8px; font-size: 12px; border-radius: 8px; }
select, input[type=text], input[type=number], input[type=search], textarea { border: 1px solid #d5dce6; border-radius: 9px; padding: 5px 8px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 3px solid #c7d2fe; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.hidden { display: none !important; }
.mono { font-family: Consolas, monospace; }
.muted { color: var(--muted); }

/* ---------- Kopfzeile ---------- */
#top { height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: linear-gradient(180deg, #111a2e, #0b1220); color: #e2e8f0; box-shadow: 0 2px 10px rgba(0,0,0,.25); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: #fff; white-space: nowrap; }
.brand .logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #6366f1, #22d3ee); font-size: 18px; box-shadow: 0 3px 10px rgba(99,102,241,.5); }
#tabs { display: flex; gap: 6px; overflow-x: auto; max-width: 34vw; flex: none; scrollbar-width: none; }
.tab { padding: 7px 14px; border-radius: 999px; background: #1a2440; border: 1px solid #2a3760; white-space: nowrap; cursor: pointer; user-select: none; color: #cbd5e1; font-weight: 600; transition: all .12s; }
.tab:hover { background: #24305a; color: #fff; }
.tab.active { background: linear-gradient(135deg, #6366f1, #4f46e5); border-color: #818cf8; color: #fff; box-shadow: 0 3px 12px rgba(99,102,241,.45); }
.tab.add { color: #a5b4fc; border-style: dashed; }
.search-wrap { position: relative; flex: 1; min-width: 140px; max-width: 520px; }
.search-wrap .sicon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #64748b; font-size: 16px; pointer-events: none; }
#search { width: 100%; background: #16203a; color: #fff; border: 1px solid #2a3760; border-radius: 999px; padding: 8px 14px 8px 34px; }
#search::placeholder { color: #7b8aa8; }
.grp { display: flex; align-items: center; gap: 6px; }
#top .ib { background: #16203a; border-color: #2a3760; color: #e2e8f0; display: flex; align-items: center; gap: 6px; padding: 7px 12px; white-space: nowrap; }
#top .ib i { font-style: normal; }
#top .ib:hover { background: #24305a; border-color: #4b5a8c; }
#net { font-size: 12px; color: #94a3b8; white-space: nowrap; cursor: pointer; background: #16203a; border: 1px solid #2a3760; padding: 6px 10px; border-radius: 999px; }
#net b { color: #4ade80; }
@media (max-width: 1780px) { #top .ib span { display: none; } }
@media (max-width: 1450px) { .brand .bt { display: none; } }

/* Segment-Schalter */
.seg { display: inline-flex; background: #16203a; border: 1px solid #2a3760; border-radius: 999px; padding: 3px; gap: 2px; flex: none; }
.seg button { border: none; background: transparent; color: #cbd5e1; border-radius: 999px; padding: 6px 14px; font-weight: 600; white-space: nowrap; }
.seg button:hover { background: rgba(255,255,255,.08); }
.seg button.on { background: #fff; color: #0f172a; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.seg.modeseg button[data-mode=edit].on { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; }
.seg.sm { background: #f1f5f9; border-color: transparent; padding: 2px; }
.seg.sm button { color: #334155; padding: 4px 10px; font-size: 12px; }
.seg.sm button:hover { background: #e2e8f0; }
.seg.sm button.on { background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(79,70,229,.35); }

.dropdown { position: absolute; top: 42px; left: 0; right: 0; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.25); max-height: 60vh; overflow: auto; z-index: 50; }
.dropdown .item { padding: 7px 12px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.dropdown .item:hover, .dropdown .item.hi { background: var(--accentL); }
.dropdown .sec { padding: 6px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: #f8fafc; font-weight: 700; }

/* ---------- Hauptbereich ---------- */
main { display: flex; height: calc(100% - 58px); }
#stage { flex: 1; position: relative; overflow: hidden; background: #fff; }
#svg { width: 100%; height: 100%; display: block; user-select: none; touch-action: none; }
#svg.tool-place { cursor: crosshair; }
#svg.panning { cursor: grabbing; }
#svg .el { cursor: pointer; }
#svg .el.rack:hover { opacity: .82; }
.float { position: absolute; background: rgba(255,255,255,.97); border-radius: var(--radius); box-shadow: 0 6px 22px rgba(15,23,42,.16); border: 1px solid var(--line); }
#viewbar { left: 12px; top: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; max-width: calc(100% - 90px); }
.vb-row { display: flex; align-items: center; gap: 8px; }
.vb-l { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; width: 42px; }
#legend { font-size: 11px; color: #334155; padding-top: 4px; border-top: 1px solid var(--line); }
#legend span.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 9px; border: 1px solid rgba(0,0,0,.2); }
#legend span.sw:first-child { margin-left: 0; }
#hud { position: absolute; right: 12px; top: 12px; background: rgba(15,23,42,.72); padding: 4px 10px; border-radius: 999px; font-size: 11.5px; color: #e2e8f0; pointer-events: none; }
#zoomBtns { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
#zoomBtns button { width: 40px; height: 40px; font-size: 18px; padding: 0; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(15,23,42,.18); }

/* Bau-Leiste (Dock) */
#dock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; padding: 8px; background: rgba(15,23,42,.94); border: 1px solid #2a3760; border-radius: 18px; box-shadow: 0 12px 36px rgba(15,23,42,.4); max-width: calc(100% - 300px); overflow-x: auto; scrollbar-width: none; }
#dock .sep { width: 1px; background: #2a3760; margin: 4px 2px; flex: none; }
.tile { position: relative; width: 76px; height: 72px; flex: none; border-radius: 13px; border: 1px solid #2a3760; background: #1a2440; color: #dbe3f0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px; font-size: 11px; font-weight: 600; line-height: 1.1; text-align: center; }
.tile:hover { background: #24305a; border-color: #4b5a8c; transform: translateY(-2px); }
.tile.active { background: linear-gradient(160deg, #6366f1, #4338ca); border-color: #a5b4fc; color: #fff; box-shadow: 0 0 0 2px rgba(165,180,252,.5), 0 6px 18px rgba(99,102,241,.5); transform: translateY(-3px); }
.tile svg { width: 34px; height: 26px; }
.tile .key { position: absolute; top: 3px; right: 6px; font-size: 9.5px; color: #7b8aa8; font-weight: 700; }
.tile.active .key { color: #c7d2fe; }
.tile.help { width: 44px; font-size: 18px; }

/* Aktionsleiste am Objekt */
#actbar { position: absolute; display: flex; gap: 4px; padding: 5px; background: rgba(15,23,42,.94); border-radius: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.35); transform: translate(-50%, -100%); z-index: 5; white-space: nowrap; }
#actbar button { background: #1a2440; border: 1px solid #2a3760; color: #e2e8f0; padding: 5px 10px; font-size: 12px; border-radius: 9px; }
#actbar button:hover { background: #2a3760; }
#actbar button.danger { color: #fda4af; }
#actbar .cnt { color: #94a3b8; font-size: 11px; padding: 0 6px; align-self: center; }

#split { width: 5px; cursor: col-resize; background: #dfe5ee; flex: none; }
#split:hover, #split.on { background: #a5b4fc; }
#panel { flex: none; width: 380px; min-width: 280px; max-width: 75vw; background: var(--bg); overflow: auto; padding: 12px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,23,42,.06); border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 10px; }
#panel h2 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#panel h3 { margin: 0 0 8px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.row > label { width: 112px; color: var(--muted); flex: none; }
.row > input, .row > select { flex: 1; min-width: 0; }
.row input[type=number] { width: 74px; flex: none; }
.row > input[type=checkbox] { flex: none; width: 17px; height: 17px; }
.row > input[type=checkbox] + span { flex: 1; text-align: left; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; border: 1px solid var(--line); font-size: 11px; font-weight: 600; }
.chip.A { background: #dcfce7; border-color: #86efac; }
.chip.B { background: #fef9c3; border-color: #fde047; }
.chip.C { background: #e0e7ff; border-color: #a5b4fc; }
.chip.warn { background: #fef3c7; border-color: #fcd34d; }
.chip.res { background: #f3e8ff; border-color: #d8b4fe; }
.hint { font-size: 12px; color: #475569; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 9px 11px; margin: 8px 0; }
.warnbox { font-size: 12px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.stat b { display: block; font-size: 20px; line-height: 1.1; }
.stat span { font-size: 11px; color: var(--muted); }
.meter { height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a); border-radius: 999px; }
.bigbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bigbtns button { padding: 10px; font-weight: 600; text-align: left; }
.steps { margin: 0; padding-left: 18px; color: #334155; } .steps li { margin: 4px 0; }

/* Frontansicht Regal */
.elev { border: 3px solid #475569; border-radius: 8px; padding: 4px; background: linear-gradient(#f8fafc, #eef2f7); }
.elev .lv { display: flex; gap: 4px; margin-bottom: 4px; align-items: stretch; }
.elev .lvno { width: 26px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); font-weight: 800; }
.elev .lvslots { flex: 1; min-width: 0; display: flex; gap: 4px; border-bottom: 5px solid #f97316; padding-bottom: 3px; }
.elev .lv.k-shelf .lvslots { border-bottom-color: #64748b; }
.elev .lv.k-flow .lvslots { border-bottom-color: #0ea5e9; }
.elev .lv.k-arm .lvslots { border-bottom-color: #a16207; }
.elev .lv.k-floor .lvslots { border-bottom-color: #334155; }
.elev .lv.k-stack .lvslots { border-bottom-color: #2563eb; }
.slot { flex: 1 1 0; min-height: 56px; min-width: 0; border: 2px dashed #cbd5e1; border-radius: 8px; padding: 3px 5px; background: #fff; cursor: pointer; font-size: 11px; overflow: hidden; transition: transform .08s, box-shadow .12s; }
.k-shelf .slot { min-height: 42px; }
.slot:hover { border-color: var(--accent); background: var(--accentL); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(79,70,229,.15); }
.slot.full { border-style: solid; border-color: #4ade80; background: #f0fdf4; }
.slot.blocked { background: repeating-linear-gradient(45deg, #ffe4e6, #ffe4e6 5px, #fff 5px, #fff 10px); border-color: #fda4af; }
.slot.mismatch { box-shadow: inset 0 0 0 2px #f59e0b; }
.slot.found { box-shadow: 0 0 0 3px #e11d48; }
.slot .pos { color: #94a3b8; font-size: 10px; font-weight: 700; }
.slot .nr { font-weight: 700; font-family: Consolas, monospace; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .ds { color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.slot .plus { color: #cbd5e1; font-size: 18px; text-align: center; line-height: 28px; }
.slot:hover .plus { color: var(--accent); }
.elev .floorline { height: 7px; background: #334155; border-radius: 3px; }

.lvcfg { display: flex; gap: 5px; align-items: center; margin: 5px 0; }
.lvcfg .n { width: 26px; color: var(--muted); font-weight: 600; }
.lvcfg select { flex: 1; min-width: 0; }
.lvcfg .lvIns { white-space: nowrap; }
.lvcfg button[disabled] { opacity: .35; cursor: default; }
.lvcfg input { width: 60px; }

/* Modal */
#modalBack { position: fixed; inset: 0; background: rgba(11,18,32,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fade .15s; }
#modal { background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.45); max-width: 96vw; max-height: 94vh; overflow: auto; padding: 18px 20px; min-width: 420px; animation: pop .16s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
#modal h2 { margin: 0 0 10px; font-size: 18px; }
#modal h3 { margin: 14px 0 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
#modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
#modal.wide { width: 1300px; }
.entry { border: 1px solid var(--line); border-radius: 12px; padding: 9px; margin: 7px 0; background: #f8fafc; position: relative; }
.entry .r { display: flex; gap: 6px; align-items: center; margin: 3px 0; }
.entry .ac-wrap { position: relative; flex: 1; }
.entry .ac-wrap input { width: 100%; font-size: 15px; padding: 7px 10px; }
.entry .ac-wrap .dropdown { top: 40px; }
.entry .info { font-size: 12px; color: #475569; margin-top: 4px; }

table.grid { border-collapse: collapse; width: 100%; font-size: 12px; }
table.grid th { position: sticky; top: 0; background: #f1f5f9; text-align: left; padding: 7px; border-bottom: 1px solid #cbd5e1; z-index: 1; white-space: nowrap; }
table.grid td { padding: 4px 7px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.grid tr:hover td { background: #f8fafc; }
table.grid select, table.grid input { padding: 2px 5px; font-size: 12px; border-radius: 7px; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filters label { color: var(--muted); font-size: 12px; }
.loclink { color: var(--accent); cursor: pointer; font-weight: 600; font-family: Consolas, monospace; margin-right: 6px; white-space: nowrap; background: var(--accentL); padding: 1px 6px; border-radius: 6px; }
.loclink:hover { background: #e0e7ff; }

.cap { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.capcard { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fbfcfe; }
.capcard h4 { margin: 0 0 6px; }
.bar { height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; display: flex; margin: 4px 0 6px; }
.bar i { display: block; height: 100%; }
.big { font-size: 26px; font-weight: 800; }
.pos-ok { color: var(--ok); font-weight: 700; }
.pos-bad { color: var(--danger); font-weight: 700; }

.menu { position: absolute; right: 14px; top: 56px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.3); z-index: 60; padding: 6px; min-width: 280px; animation: pop .12s; }
.menu button { display: block; width: 100%; text-align: left; border: none; padding: 9px 12px; border-radius: 9px; }

#toast { position: fixed; top: 70px; left: 50%; transform: translate(-50%, -10px); background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 999px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.35); font-weight: 600; }
#toast.show { opacity: .97; transform: translate(-50%, 0); }

@media print {
  #top, #panel, #split, #zoomBtns, #hud, #dock, #actbar, #viewbar, #btnChat, #chat { display: none !important; }
  main { height: 100vh; }
}
#modeSeg button:not(.on) { background: transparent; color: #cbd5e1; box-shadow: none; }
#modeSeg button:not(.on):hover { background: rgba(255,255,255,.1); color: #fff; }

/* Benutzer / Anmeldung */
.avs { display: inline-flex; margin-right: 6px; vertical-align: middle; }
.av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 800; border: 2px solid #0b1220; margin-left: -6px; }
.avs > .av:first-child, .avs > span:first-child .av { margin-left: 0; }
.av.me { box-shadow: 0 0 0 2px #4ade80; }
#login { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #1e2a4f, #0b1220 70%); }
.lcard { width: 340px; background: #fff; border-radius: 18px; padding: 26px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 10px; }
.lcard .brand { color: #0f172a; font-size: 22px; }
.lcard input { font-size: 15px; padding: 10px 12px; border-radius: 10px; }
.lcard button { padding: 11px; font-size: 15px; font-weight: 700; margin-top: 4px; }
.lcard a { text-align: center; font-size: 12px; color: var(--muted); }
.lerr { color: var(--danger); min-height: 16px; font-size: 12.5px; font-weight: 600; }

/* Chat */
#top .ib { position: relative; }
.badge { position: absolute; top: -5px; right: -5px; background: #e11d48; color: #fff; font-size: 10px; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #0b1220; }
#chat { position: absolute; left: 12px; bottom: 68px; width: 360px; max-width: calc(100% - 24px); height: min(520px, calc(100% - 150px)); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(15,23,42,.28); display: flex; flex-direction: column; overflow: hidden; z-index: 8; }
#chat.hidden { display: none; }
#btnChat { position: absolute; left: 12px; bottom: 12px; height: 46px; padding: 0 16px 0 12px; display: flex; align-items: center; gap: 7px; border-radius: 999px; background: #0f172a; color: #fff; border: none; box-shadow: 0 6px 18px rgba(15,23,42,.35); font-size: 14px; cursor: pointer; z-index: 8; }
#btnChat span { font-size: 19px; } #btnChat:hover { background: #1e293b; } #btnChat.on { background: var(--accent); }
#btnChat .badge { top: -4px; right: -4px; }
.chead { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chead b { font-size: 15px; } .chead .muted { flex: 1; font-size: 11px; }
#chatList { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #f8fafc; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg .av { margin: 0; flex: none; border-color: #fff; width: 30px; height: 30px; font-size: 11px; }
.msg .bub { background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 7px 10px; max-width: 270px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .bub { background: var(--accent); color: #fff; border-color: var(--accent); border-radius: 14px 4px 14px 14px; }
.msg .meta { font-size: 10.5px; color: var(--muted); margin-bottom: 2px; }
.msg.mine .meta { color: #c7d2fe; }
.msg .txt { white-space: pre-wrap; word-wrap: break-word; }
.msg .ref { display: inline-block; margin-top: 5px; font-size: 11.5px; font-weight: 700; background: #eef2ff; color: var(--accent); padding: 2px 8px; border-radius: 999px; cursor: pointer; }
.msg.mine .ref { background: rgba(255,255,255,.2); color: #fff; }
.msg .del { cursor: pointer; opacity: 0; font-size: 11px; margin-left: 6px; } .msg:hover .del { opacity: .7; }
.cday { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.cfoot { border-top: 1px solid var(--line); padding: 10px; }
.crow { display: flex; gap: 6px; align-items: flex-end; }
.crow textarea { flex: 1; resize: none; border: 1px solid #d5dce6; border-radius: 12px; padding: 8px 10px; font: inherit; max-height: 120px; }
.crow button { height: 38px; }
#chatPin.on { background: #eef2ff; border-color: var(--accent); }
#chatRef { font-size: 12px; margin-bottom: 6px; color: var(--accent); font-weight: 700; }

.lvsplit { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px 0; padding-left: 120px; font-size: 11.5px; }
.capcard .lvsplit { padding-left: 0; }
.lvsplit span { background: #f1f5f9; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }

.lcard .pweye { align-self: flex-end; margin: -4px 0 0; padding: 2px 4px; font-size: 12px; font-weight: 500; color: #64748b; background: none; border: 0; box-shadow: none; cursor: pointer; }
.lcard .pweye:hover { color: #0f172a; }

/* Hallen-Auswahl + Gesamtübersicht */
.hallsel { appearance: none; -webkit-appearance: none; background: linear-gradient(135deg, #6366f1, #4f46e5) no-repeat, #4f46e5; color: #fff; border: 1px solid #818cf8; border-radius: 999px; padding: 7px 34px 7px 14px; font-weight: 700; cursor: pointer; max-width: 280px; text-overflow: ellipsis; box-shadow: 0 3px 12px rgba(99,102,241,.45);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E"), linear-gradient(135deg, #6366f1, #4f46e5); background-repeat: no-repeat; background-position: right 12px center, 0 0; }
.hallsel option { color: #0f172a; background: #fff; font-weight: 600; }
.hallsel:focus { outline: 3px solid #a5b4fc; }
.sitehall { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; cursor: pointer; }
.sitehall:hover { background: #f8fafc; }
.sitehall.on { border-color: var(--accent); background: var(--accentL); }
.sitehall .chips { flex-wrap: nowrap; }

/* Ebene/Farbe als schmale Spalte links (PC) */
@media (min-width: 761px) {
  #viewbar { width: 124px; padding: 8px; gap: 8px; max-width: none; }
  #viewbar .vb-row { flex-direction: column; align-items: stretch; gap: 3px; }
  #viewbar .vb-l { width: auto; padding-left: 2px; }
  #viewbar .seg.sm { flex-direction: column; border-radius: 10px; }
  #viewbar .seg.sm button { border-radius: 8px; text-align: left; }
  #legend { padding-top: 6px; line-height: 1.7; }
  #legend span.sw { margin: 0 6px 0 0 !important; }
}

.pchk { display: flex; flex-direction: column; gap: 2px; flex: 1; max-height: 180px; overflow: auto; }
.pchk label { display: flex; gap: 6px; align-items: center; }

/* Ebenen */
label.rad { display: inline-flex; align-items: center; gap: 5px; margin-right: 14px; cursor: pointer; width: auto !important; color: var(--text) !important; }
.lyrow { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed var(--line); }
.lyrow:last-of-type { border-bottom: 0; }

/* Projekte */
.projsel { appearance: none; -webkit-appearance: none; background: #16203a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2394a3b8' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; color: #e2e8f0; border: 1px solid #2a3760; border-radius: 999px; padding: 7px 26px 7px 12px; font-weight: 600; max-width: 240px; cursor: pointer; margin-right: 6px; }
.projsel option { color: #0f172a; background: #fff; }
.plist { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.prow { display: flex; align-items: center; gap: 10px; }
.prow .pName { flex: 1; }
#tabs { align-items: center; }

/* Bearbeiter je Halle */
.sitehall { flex-direction: column; align-items: stretch; }
.sitehall .sh-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sh-act { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.sh-l { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.actlist { display: flex; flex-direction: column; gap: 4px; }
.act { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.act .av { width: 22px; height: 22px; font-size: 10px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.act .muted { margin-left: auto; font-size: 11px; white-space: nowrap; }
.act-none { font-size: 12px; }

.sitehall.hid { opacity: .6; }
.chip.fin { background: #dcfce7; border-color: #86efac; }
.sitehall select { flex: 1; min-width: 0; }

/* Zeitmaschine */
.tm-wrap { display: flex; gap: 14px; min-height: 420px; max-height: 66vh; }
.tm-list { width: 190px; flex: none; overflow: auto; border-right: 1px solid var(--line); padding-right: 8px; }
.tm-day { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 10px 0 4px; }
.tm-pt { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 5px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.tm-pt:hover { background: #f1f5f9; }
.tm-pt.on { background: var(--accent); color: #fff; }
.tm-pt.on .muted { color: #e0e7ff; }
.tm-main { flex: 1; min-width: 0; overflow: auto; }
.tm-prev { width: 100%; height: 340px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; display: block; }
.tm-diff { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; font-size: 12.5px; color: #334155; }
.tm-act { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tm-keep { display: flex; gap: 6px; align-items: center; font-size: 13px; }
@media (max-width: 760px) { .tm-wrap { flex-direction: column; max-height: none; } .tm-list { width: auto; max-height: 160px; border-right: 0; border-bottom: 1px solid var(--line); } .tm-prev { height: 240px; } }

.icob { display: inline-flex; align-items: center; justify-content: center; padding: 4px 7px; color: #475569; }
.icob.off { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.ico { display: block; }

/* Anleitung / Tour */
#tourHole { position: fixed; z-index: 400; border-radius: 12px; box-shadow: 0 0 0 4px #818cf8, 0 0 0 9999px rgba(11,18,32,.62); transition: all .25s ease; pointer-events: none; }
#tourCard { position: fixed; z-index: 401; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.45); padding: 14px 16px; transition: top .25s ease, left .25s ease; }
#tourCard h3 { margin: 2px 0 6px; font-size: 16px; color: #0f172a; text-transform: none; letter-spacing: 0; }
#tourCard .tc-step { font-size: 11px; font-weight: 700; color: var(--accent); }
#tourCard .tc-x { font-size: 13px; color: #334155; line-height: 1.5; }
#tourCard .tc-foot { display: flex; gap: 6px; align-items: center; margin-top: 12px; }

.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.swatches .sw { width: 24px; height: 24px; padding: 0; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; }
.swatches .sw.on { box-shadow: 0 0 0 2px #0f172a; }
.swatches .sw-more { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); cursor: pointer; }
.swatches .sw-more input { width: 26px; height: 24px; padding: 0; border: 0; background: none; }

/* Bau-Leiste kompakter + scrollbar */
#dock { max-width: calc(100% - 200px); gap: 3px; padding: 5px; scrollbar-width: thin; scrollbar-color: #4b5a8c transparent; }
#dock .tile { width: 50px; height: 52px; font-size: 9px; gap: 2px; padding: 3px 2px; letter-spacing: -.1px; }
#dock .tile svg { width: 24px; height: 19px; }
#dock .tile .key { font-size: 8.5px; top: 2px; right: 4px; }
#dock .tile.help { width: 30px; }
#dock .sep { margin: 4px 1px; }
@media (min-width: 761px) { #dock { flex-wrap: wrap; justify-content: center; overflow: visible; width: max-content; } }

/* Spalten-Menü Artikeltabelle */
.filters { position: relative; }
.colmenu { position: fixed; z-index: 250; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.25); padding: 8px 10px; width: 300px; max-height: calc(100vh - 16px); overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.colmenu label { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.colmenu label:hover { background: #f8fafc; }
.colmenu .cm-del { margin-left: auto; }
.colmenu .cm-h { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 6px 0 2px; }
.colmenu .cm-add { display: flex; gap: 6px; margin-top: 6px; }
.colmenu .cm-add input { flex: 1; min-width: 0; }
th.xcol { color: var(--accent2); }
th.xfh { cursor: pointer; user-select: none; white-space: nowrap; }
th.xfh:hover { background: #eef2ff; }
th.xfh .xf-btn { margin-left: 4px; color: #94a3b8; font-size: 11px; }
th.xfh.on { background: #e0e7ff; color: var(--accent2); }
th.xfh.on .xf-btn { color: var(--accent); }
.colmenu.xf { width: 320px; }
.xf-sort { display: flex; gap: 6px; margin-bottom: 6px; }
.xf-q { width: 100%; margin-bottom: 4px; }
.xf-list { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.xf-list label { font-size: 12.5px; }
.xf-n { margin-left: auto; font-size: 11px; }

/* Maßstab + Längenfelder */
#scaleBar { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 11px; font-weight: 700; color: #334155; padding: 2px 2px 0; pointer-events: none; }
.vb-scale { border-top: 1px solid var(--line); padding-top: 6px; }
#scaleBar .sb-bar { height: 8px; border: 2px solid #334155; border-top: 0; position: relative; }
input.len { width: 74px; flex: none !important; }

/* Wo bin ich? */
#whereAmI { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6; background: rgba(15,23,42,.88); color: #e2e8f0; padding: 7px 16px; border-radius: 999px; font-size: 13px; white-space: nowrap; box-shadow: 0 6px 18px rgba(15,23,42,.25); pointer-events: none; max-width: calc(100% - 340px); overflow: hidden; text-overflow: ellipsis; }
#whereAmI b { color: #fff; }
#whereAmI.site { background: linear-gradient(135deg, #4f46e5, #6366f1); }
#whereAmI:empty { display: none; }

/* ---------- Handy-Ansicht ---------- */
#sheetBar { display: none; }
@media (max-width: 760px) {
  html, body { font-size: 14px; }
  body { display: flex; flex-direction: column; height: 100dvh; }
  #top { height: auto; flex-wrap: wrap; gap: 6px; padding: 6px 8px; padding-top: max(6px, env(safe-area-inset-top)); }
  .brand { display: none; }
  #tabs { max-width: 46%; flex: 0 1 auto; min-width: 0; order: 11; }
  #modeSeg .mt { display: none; }
  .tab { padding: 6px 10px; }
  .hallsel { max-width: 100%; padding: 6px 30px 6px 12px; font-size: 14px; }
  .projsel { max-width: 110px; padding: 6px 22px 6px 10px; font-size: 13px; }
  #modeSeg { order: 2; }
  .seg button { padding: 6px 10px; }
  #top .grp { order: 3; gap: 4px; }
  #top .ib { padding: 7px 9px; }
  #btnPrint { display: none !important; }
  #top > .ib:last-child { order: 4; margin-left: auto !important; }
  #top > .ib span { display: none; }
  .search-wrap { order: 12; flex: 1 1 0; min-width: 120px; max-width: none; }
  #search { padding: 7px 12px 7px 32px; font-size: 16px; }
  .dropdown { position: fixed; left: 6px; right: 6px; top: auto; margin-top: 6px; }
  .dropdown { max-height: 55dvh; }

  main { flex-direction: column; flex: 1; min-height: 0; height: auto; }
  #stage { flex: 1; min-height: 0; }
  #split { display: none; }
  #panel { width: 100% !important; min-width: 0; max-width: none; height: 36dvh; flex: none; padding: 4px 10px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  body.sheet-min #panel { display: none; }
  #sheetBar { display: flex; flex: none; align-items: center; justify-content: center; gap: 10px; height: 34px; background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15,23,42,.12); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; user-select: none; position: relative; z-index: 3; }
  #sheetBar::before { content: ''; width: 36px; height: 5px; border-radius: 999px; background: #cbd5e1; }
  body.sheet-min #sheetBar { padding-bottom: env(safe-area-inset-bottom); height: calc(34px + env(safe-area-inset-bottom)); }

  #viewbar { left: 8px; top: 8px; padding: 6px 8px; max-width: calc(100% - 64px); }
  .vb-row { gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .vb-l { display: none; }
  .seg.sm button { padding: 5px 9px; }
  #legend { display: none; }
  #stage { touch-action: none; }
  #chat, #chatList, #dock, .vb-row, #actbar { touch-action: pan-x pan-y; }
  #hud { display: none; }
  .vb-scale { display: none; }
  #whereAmI { top: auto; bottom: 10px; font-size: 12px; padding: 6px 12px; max-width: calc(100% - 140px); }
  #dock:not(.hidden) ~ #whereAmI { bottom: 84px; }
  #zoomBtns { right: 8px; top: 8px; bottom: auto; }
  #zoomBtns button { width: 44px; height: 44px; }

  #dock { left: 6px; right: 6px; bottom: 6px; transform: none; max-width: none; padding: 6px; gap: 5px; border-radius: 14px; }
  .tile { width: 64px; height: 60px; font-size: 10px; }
  .tile svg { width: 28px; height: 22px; }
  .tile .key { display: none; }
  #btnChat { left: 8px; bottom: 8px; height: 44px; padding: 0 13px; }
  #btnChat > b:not(.badge) { display: none; }
  #dock:not(.hidden) ~ #btnChat { bottom: 84px; }
  #chat { left: 6px; right: 6px; width: auto; bottom: 60px; height: calc(100% - 72px); }
  #dock:not(.hidden) ~ #chat { bottom: 136px; height: calc(100% - 148px); }
  #actbar { max-width: calc(100vw - 16px); overflow-x: auto; }

  #modal { min-width: 0; width: 96vw; max-height: 88dvh; padding: 14px; }
  .row { flex-wrap: wrap; }
  .row > label { width: 100%; }
  .statgrid { grid-template-columns: repeat(2, 1fr); }
  .menu { right: 6px; left: 6px; min-width: 0; }
  .lcard { width: min(340px, 92vw); }
}
#hud { display: none !important; }
#top .ib .pwr { display: inline-flex; }
.act .av { margin-left: 0; border: 0; }
/* Zwischenböden (1.1) */
.lvcfg .lvSub { width: 46px; flex: none; padding: 3px 4px; border-radius: 7px; font-size: 12px; font-weight: 700; color: #475569; background: #f8fafc; }
.lvcfg .lvSub.on { background: #e0f2fe; color: #0369a1; border-color: #7dd3fc; }
.lvcfg .lvSub[disabled] { opacity: 1; cursor: default; }
.elev .lv.sub .lvno { color: #0369a1; font-size: 10px; }
#viewbar .seg.sm button.subl { padding-left: 18px; font-size: 11.5px; }
.lvpulse { animation: lvpulse 0.9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes lvpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

#floorBar button[data-f=og].on { background: #7c3aed; }

/* Live-Mauszeiger + Online */
#cursors { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 7; }
.rcur { position: absolute; left: 0; top: 0; transition: transform .09s linear; display: flex; align-items: flex-start; }
.rcur span { margin: 14px 0 0 -4px; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
#btnChat .onl { font-style: normal; font-size: 11px; font-weight: 800; background: #22c55e; color: #fff; border-radius: 999px; padding: 1px 7px; margin-left: 2px; }
#btnChat .onl::before { content: '● '; font-size: 8px; vertical-align: 1px; }
#chatWho { display: flex; flex-direction: column; gap: 4px; padding: 6px 12px 8px; border-bottom: 1px solid var(--line); max-height: 130px; overflow: auto; background: #f8fafc; }
#chatWho .who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
#chatWho .who .av { margin: 0; border: 0; width: 22px; height: 22px; }
#chatWho .who .muted { margin-left: auto; font-size: 11px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }

/* Platz-Fenster: Vorschläge */
.slotgrid { display: flex; gap: 14px; align-items: stretch; }
.slotleft { flex: 1 1 0; min-width: 0; }
.slotright { flex: 1.15 1 0; min-width: 0; border-left: 1px solid var(--line); padding-left: 14px; display: flex; flex-direction: column; }
.sug-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.sug-h .muted { font-size: 11.5px; }
.sug-f { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.sug-f input[type=search] { flex: 1 1 100%; }
.sug-f select { flex: 1 1 0; min-width: 0; font-size: 12px; padding: 4px 6px; }
.sug-f .sg-ck { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); flex: 1 1 100%; }
.sug-list { flex: 1; min-height: 220px; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.sg-it { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; padding: 6px 9px; border-bottom: 1px solid #f1f5f9; cursor: pointer; position: relative; }
.sg-it:hover { background: var(--accentL); }
.sg-it.first { background: #f0fdf4; box-shadow: inset 3px 0 0 #16a34a; }
.sg-next { position: absolute; right: 8px; top: 5px; font-size: 10px; font-weight: 800; color: #16a34a; text-transform: uppercase; }
.sg-nr { font-weight: 700; }
.sg-d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 60px; }
.sg-tags { grid-column: 1 / -1; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; font-size: 11px; }
.sg-tags .chip { font-size: 10.5px; padding: 0 7px; }
@media (max-width: 1100px) { .slotgrid { flex-direction: column; } .slotright { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px; } .sug-list { max-height: 34vh; } }

.sg-typbtn { flex: 1 1 0; min-width: 0; font-size: 12px; padding: 4px 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-typbtn.on { border-color: var(--accent); background: var(--accentL); color: var(--accent2); font-weight: 600; }

/* Inventur */
.inv { display: flex; gap: 16px; min-height: 380px; }
.inv-l { flex: 1 1 0; min-width: 0; }
.inv-r { flex: 1.2 1 0; min-width: 0; border-left: 1px solid var(--line); padding-left: 16px; display: flex; flex-direction: column; }
.inv-teams { display: flex; flex-direction: column; gap: 6px; }
.inv-team { display: flex; align-items: center; gap: 8px; }
.inv-team .itName { flex: 1; min-width: 0; }
.inv-team .muted { font-size: 11.5px; white-space: nowrap; }
.inv-list { flex: 1; max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.inv-rk { display: grid; grid-template-columns: 90px 60px 1fr; align-items: center; gap: 8px; padding: 4px 10px; border-bottom: 1px solid #f1f5f9; }
.inv-rk.on { background: #f0fdf4; }
.inv-rk select { font-size: 12px; padding: 3px 6px; }
.invprev { width: 100%; height: 66vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
@media (max-width: 900px) { .inv { flex-direction: column; } .inv-r { border-left: 0; padding-left: 0; } }

#updBanner { position: fixed; left: 50%; top: 66px; transform: translateX(-50%); z-index: 500; background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: 0 12px 34px rgba(15,23,42,.45); display: flex; gap: 10px; align-items: center; font-weight: 600; }

/* Handy-Nachbesserungen */
@media (max-width: 760px) {
  #tabs { max-width: none !important; flex: 1 1 100% !important; order: 11; }
  #tabs .hallsel { flex: 1 1 0; min-width: 0; max-width: none; }
  #tabs .projsel { flex: 0 1 38%; max-width: 38%; min-width: 0; }
  .search-wrap { order: 12; flex: 1 1 100% !important; }
  #whereAmI { left: auto; right: 8px; transform: none; max-width: calc(100% - 130px); }
  #btnInv span, #btnHelp span { display: none; }
  .inv-rk { grid-template-columns: 70px 50px 1fr; }
  #updBanner { left: 8px; right: 8px; transform: none; top: 8px; flex-wrap: wrap; }
}

/* Chat: Bug / Idee */
#chatFilter { display: flex; gap: 5px; padding: 6px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
#chatFilter button.on, #chatBug.on, #chatIdea.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ctag { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; margin-bottom: 3px; }
.ctag.bug { background: #fee2e2; color: #b91c1c; } .ctag.idea { background: #fef9c3; color: #854d0e; } .ctag.done { background: #dcfce7; color: #166534; }
.msg .txt.done { text-decoration: line-through; opacity: .6; }
.msg .cdone { margin-top: 4px; font-size: 11px; padding: 2px 8px; color: #0f172a; }
/* Was ist neu */
.newdot { position: absolute; top: -6px; right: -6px; background: #dc2626; color: #fff; font: 800 8.5px/1 "Segoe UI", sans-serif; font-style: normal; padding: 3px 5px; border-radius: 999px; box-shadow: 0 0 0 2px #0b1220; pointer-events: none; z-index: 2; letter-spacing: .3px; }
#zoomBtns .newdot, #btnChat .newdot { box-shadow: 0 0 0 2px #fff; }
.newtag { display: inline-block; background: #dc2626; color: #fff; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; vertical-align: 1px; }
.newslist { max-height: 62vh; overflow: auto; }
.newsrel h3 { margin: 12px 0 4px; } .newsrel ul { margin: 0; padding-left: 18px; } .newsrel li { margin: 5px 0; line-height: 1.45; }
.newsrel li.unseen { background: #fef2f2; border-radius: 8px; padding: 3px 6px; margin-left: -6px; }

/* Nadel an beliebiger Stelle */
#svg.pinpick { cursor: crosshair; }
.pinmark { position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; }
.pinmark i { font-style: normal; font-size: 26px; line-height: 1; margin: -26px 0 0 -13px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); animation: pinbob .8s ease-in-out infinite; }
.pinmark span { margin: -24px 0 0 2px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.pinmark span:empty { display: none; }
@keyframes pinbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* To-do */
.todo-new { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0 8px; }
.todo-new #tdText { flex: 1 1 260px; min-width: 0; } .todo-new #tdWho { width: 130px; } .todo-new #tdDue { border: 1px solid #d5dce6; border-radius: 9px; padding: 4px 6px; }
.todo-f { display: flex; gap: 5px; margin-bottom: 6px; } .todo-f button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.todo-list { max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.todo { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-bottom: 1px solid #f1f5f9; }
.todo.prio { box-shadow: inset 3px 0 0 #f59e0b; } .todo.done .td-text { text-decoration: line-through; color: var(--muted); }
.todo .tdDone { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.td-main { flex: 1; min-width: 0; } .td-text { font-size: 14px; outline: none; border-radius: 6px; padding: 1px 3px; margin: -1px -3px; } .td-text:focus { background: #eef2ff; }
.td-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; font-size: 11.5px; } .chip.late { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

/* Chat: eigene Nachricht bearbeiten/löschen */
.msg .mact { display: inline-flex; gap: 8px; margin-left: 10px; vertical-align: -2px; }
.msg .mact span { cursor: pointer; opacity: .75; display: inline-flex; } .msg .mact span:hover { opacity: 1; }
.msg .txt.editing { background: #fff; color: #0f172a; border-radius: 8px; padding: 4px 6px; outline: 2px solid #c7d2fe; min-width: 120px; text-decoration: none; opacity: 1; }

/* Chat: Antworten + Reaktionen */
#chatRe { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 12px; margin-bottom: 6px; padding: 4px 8px; background: #eef2ff; border-left: 3px solid var(--accent); border-radius: 6px; } #chatRe.hidden { display: none; }
#chatRe span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.msg .rq { font-size: 11.5px; padding: 3px 7px; margin: 2px 0 4px; border-left: 3px solid var(--accent); background: #f1f5f9; color: #334155; border-radius: 5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.mine .rq { background: rgba(255,255,255,.18); color: #fff; border-left-color: #fff; }
.msg .rxs, .msg .rxpick { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.msg .rxc { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: #f1f5f9; border: 1px solid #d5dce6; color: #0f172a; cursor: pointer; }
.msg .rxc.on { background: #e0e7ff; border-color: var(--accent); font-weight: 700; }
.msg .rxpick { background: #fff; border: 1px solid #d5dce6; border-radius: 999px; padding: 3px 8px; width: fit-content; box-shadow: 0 2px 6px rgba(15,23,42,.12); }
.msg .rxpick span { cursor: pointer; font-size: 17px; line-height: 1.2; } .msg .rxpick span:hover { transform: scale(1.25); }
.msg.flash .bub { outline: 3px solid #f59e0b; }

/* Willkommensseite */
#modal.welcome { padding: 0; overflow: auto; }
.wl-hero { display: flex; gap: 16px; align-items: center; padding: 24px 28px; background: linear-gradient(135deg, #0f172a, #312e81); color: #fff; border-radius: 16px 16px 0 0; }
.wl-hero img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
#modal .wl-hero h2 { margin: 0 0 4px; font-size: 22px; color: #fff; } .wl-sub { font-size: 14px; color: #c7d2fe; line-height: 1.45; }
.wl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 28px 6px; }
.wl-card { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.wl-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; background: #eef2ff; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.wl-card b { font-size: 14px; } .wl-card p { margin: 2px 0 0; font-size: 12.5px; color: #475569; line-height: 1.4; }
.wl-note { margin: 8px 28px 0; font-size: 12.5px; color: var(--muted); }
#modal.welcome .foot { padding: 0 28px 20px; }
@media (max-width: 760px) { .wl-grid { grid-template-columns: 1fr; padding: 14px 14px 4px; } .wl-hero { padding: 18px 14px; } .wl-hero img { width: 44px; height: 44px; } #modal .wl-hero h2 { font-size: 18px; } .wl-note { margin: 8px 14px 0; } #modal.welcome .foot { padding: 0 14px 16px; } }

/* einzelner Platz reserviert */
.slot.res { background: repeating-linear-gradient(-45deg, #f3e8ff, #f3e8ff 5px, #fff 5px, #fff 10px); border-color: #c084fc; }
.slot.res.full { background: repeating-linear-gradient(-45deg, #f3e8ff, #f3e8ff 5px, #f0fdf4 5px, #f0fdf4 10px); }

/* Kapazität: Reiter */
.captabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 14px; flex-wrap: wrap; }
.captabs button { border: none; background: none; padding: 8px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; border-radius: 0; margin-bottom: -1px; }
.captabs button:hover { color: #0f172a; } .captabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.capbody h3:first-child { margin-top: 0; } .capbody .hint { margin-top: 12px; }
.stack { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #e2e8f0; } .stack i { display: block; height: 100%; }
a.capLoc { color: var(--accent); cursor: pointer; font-weight: 700; }
#modal table .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; border: 1px solid #94a3b8; vertical-align: -1px; }

/* Handy: Chat groß genug, Statistik-Tabellen seitlich wischbar */
.capbody { overflow-x: auto; } .capbody td.num, .capbody th { white-space: nowrap; }
@media (max-width: 760px) {
  #chat, #dock:not(.hidden) ~ #chat { position: fixed; left: 6px; right: 6px; top: 8px; bottom: 8px; width: auto; height: auto; max-width: none; z-index: 70; }
  .msg .bub { max-width: 78vw; }
  #modal .foot { flex-wrap: wrap; } #modal .foot button { flex: 1 1 auto; }
  .captabs button { padding: 7px 9px; }
}

/* Messen */
#svg.measuring { cursor: crosshair; } #zMeas.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.measv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; } .measv line { stroke: #dc2626; stroke-width: 2.5; stroke-dasharray: 7 4; } .measv circle { fill: #fff; stroke: #dc2626; stroke-width: 2.5; }
.measl { position: absolute; left: 0; top: 0; } .measl b, .measl span { display: block; width: max-content; margin: -34px 0 0 10px; background: #dc2626; color: #fff; font-size: 13px; padding: 3px 9px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.measl span { margin: 3px 0 0 10px; background: #0f172a; font-size: 11px; font-weight: 500; }
/* Wege-Info, Verlauf, Mehrfachauswahl */
.wayinfo { margin: 6px 0 2px; font-size: 12px; color: #334155; } .wayinfo .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; border: 1px solid #94a3b8; vertical-align: -1px; }
.histbox { margin-top: 6px; max-height: 190px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; } .histbox .muted { padding: 8px; }
.slotbar { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin: 4px 0 6px; font-size: 12px; } .slotbar-n { margin-left: 4px; color: var(--accent); }
.slot.msel { outline: 3px solid var(--accent); outline-offset: -1px; box-shadow: 0 0 0 3px #c7d2fe; }
#tdRef.on { background: #eef2ff; border-color: var(--accent); color: var(--accent); } a.tdGo { cursor: pointer; background: #eef2ff; color: var(--accent); border-color: #c7d2fe; font-weight: 700; }
#rLog, #sHist { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

#rLbl, #sLbl { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* Ladebalken */
#upBox { position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.up-card { background: #fff; border-radius: 16px; padding: 20px 22px; width: 440px; max-width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.up-card b { font-size: 16px; } .up-name { color: var(--muted); font-size: 12.5px; margin: 3px 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-bar { height: 12px; border-radius: 999px; background: #e2e8f0; overflow: hidden; } .up-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .35s ease; }
.up-bar.busy i { background-image: linear-gradient(45deg, rgba(255,255,255,.28) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.28) 50%, rgba(255,255,255,.28) 75%, transparent 75%); background-size: 22px 22px; animation: upmove .8s linear infinite; }
@keyframes upmove { from { background-position: 0 0; } to { background-position: 22px 0; } }
.up-txt { margin-top: 8px; font-size: 12.5px; color: #334155; }

/* Grundriss geschützt */
#grBadge { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 6; background: #0f172a; color: #fff; font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.25); pointer-events: none; } #grBadge.hidden { display: none; }
@media (max-width: 760px) { #grBadge { bottom: 70px; } }

#modeSeg button.locked { color: #fbbf24; }

.lvcfg.ro { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid #f1f5f9; font-size: 12.5px; }
.lvcfg.ro .n { min-width: 40px; text-align: center; font-weight: 700; padding: 3px 6px; border-radius: 6px; background: #f1f5f9; } .lvcfg.ro .n.on { background: #e0e7ff; color: var(--accent); }
.lvcfg.ro .lvro { flex: 1; } .lvcfg.ro .lvro.num { flex: none; color: #475569; }

.mvt td { white-space: nowrap; } .mvt tr.mv-warn td { background: #fef3c7; } .mvt tr.mv-bad td { background: #fee2e2; }

.dimrow { display: flex !important; flex-direction: row !important; gap: 6px; align-items: center; font-size: 12px; cursor: pointer; white-space: nowrap; margin-top: 4px; } .dimrow input { margin: 0; }

.msum { margin-top: 10px; } .msum .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .msum .stats div { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; } .msum .stats b { display: block; font-size: 20px; } .msum .stats span { font-size: 11px; color: var(--muted); }
.msum-r { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; padding: 2px 0; } .msum-r span:first-child { flex: 1; }

.sg-it.done { opacity: .5; background: #f1f5f9; } .sg-it.done:hover { opacity: .8; } .sg-done { grid-column: 1 / -1; font-size: 11px; font-weight: 700; color: #475569; }

.stl { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.stp { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.stp:hover { border-color: var(--accent); background: #f5f7ff; } .stp.on { border-color: var(--accent); box-shadow: 0 0 0 2px #c7d2fe; } .stp .stn { font-weight: 700; font-size: 14px; } .stp .muted { font-size: 12px; }

.lrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; } .lcard .lrow .pweye { margin: 0; align-self: center; } .lrem { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #475569; cursor: pointer; } .lrem input { width: auto; margin: 0; }

.impopt { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; cursor: pointer; font-size: 13px; } .impopt input { margin-top: 3px; }
.chip.stx-new { background: #dcfce7; border-color: #86efac; color: #166534; } .chip.stx-out { background: #fee2e2; border-color: #fca5a5; color: #991b1b; } .chip.stx-vk { background: #eef2ff; border-color: #c7d2fe; }

/* Vorschlagsliste als Tabelle */
#modal.slotwide .slotleft { flex: 0.75 1 0; } #modal.slotwide .slotright { flex: 1.6 1 0; } #modal.slotwide .sug-list { max-height: 56vh; }
.sg-row { display: grid !important; align-items: center; gap: 0 10px !important; } .sg-row > span { min-width: 0; }
.sg-head { position: sticky; top: 0; z-index: 2; background: #f1f5f9; font-size: 11px; font-weight: 700; color: #475569; padding: 6px 9px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .03em; }
.sg-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.sg-row .sg-vk { font-size: 15px; font-weight: 800; color: #3730a3; }
.sg-row .sg-d { white-space: normal; padding-right: 0; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sg-row .sg-next { position: static; display: inline-block; margin-right: 4px; }
.sg-row .sg-done { display: block; }
.sg-size { width: 100%; font-size: 12px; padding: 2px 4px; border-radius: 6px; border: 1px solid #d5dce6; background: #fff; } .sg-size.set { border-color: var(--accent); font-weight: 700; }

.sg-it.hid { opacity: .55; } .sg-it.hid:hover { opacity: .85; }
.sg-hide { padding: 2px 7px !important; color: #64748b; } .sg-hide:hover { color: #b91c1c; border-color: #fca5a5; }

.sg-row .sg-vol { font-weight: 600; color: #334155; }
.sg-row .num.muted { color: #475569; }

/* gewähltes Regal deutlich markieren */
.selhl > rect:last-child { animation: selpulse 1.6s ease-in-out infinite; }
@keyframes selpulse { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .45; } }
@media print { .selhl { display: none; } }

/* Druckvorschau neben den Druck-Einstellungen */
#modal .pwrap { display: block; } #modal.pwide .pwrap { display: flex; gap: 18px; align-items: stretch; }
#modal.pwide .pform { flex: 0 0 520px; min-width: 0; } .pprev { display: none; } #modal.pwide .pprev { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.pprev-h { margin-bottom: 6px; font-size: 13px; } #pPrevFr { flex: 1; width: 100%; min-height: 62vh; border: 1px solid var(--line); border-radius: 10px; background: #cbd5e1; }

/* Frontansicht (Reihe von vorne) */
#fv { position: absolute; inset: 0; z-index: 40; background: #f1f5f9; display: flex; flex-direction: column; }
#fv .fv-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: nowrap; min-width: 0; }
#fv .fv-bar > * { flex: none; } #fv .fv-hint { flex: 0 1 auto !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #fv .fv-t { flex: 0 1 auto !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fv .fv-t { font-size: 15px; margin-right: 6px; } #fv .fv-sp { flex: 1; } #fv .fv-hint { font-size: 12px; margin-right: 6px; } #fv #fvRow { max-width: 280px; }
#fv .fv-vp { flex: 1; position: relative; overflow: hidden; cursor: grab; touch-action: none; background: radial-gradient(#e2e8f0 1px, transparent 1px) 0 0 / 18px 18px; }
#fv .fv-vp.drag { cursor: grabbing; } #fv .fv-vp.drag .slot { pointer-events: none; }
#fv .fv-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#fv .fv-row { display: flex; gap: 6px; align-items: flex-end; padding: 10px; }
#fv .fv-rk { flex: none; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(15,23,42,.12); overflow: hidden; }
#fv .fv-rk.focus { outline: 5px solid #16a34a; outline-offset: 3px; box-shadow: 0 0 0 10px rgba(22,163,74,.18), 0 2px 8px rgba(15,23,42,.12); } #fv .fv-rk.blk { opacity: .75; }
#fv .fv-h { background: #0f172a; color: #fff; padding: 6px 10px; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; } #fv .fv-h span { font-size: 11px; opacity: .8; }
#fv .elev { border-radius: 0 0 10px 10px; } #fv .slot { min-height: 84px; font-size: 12px; } #fv .slot .nr { font-size: 13px; }
#zoomBtns #zFv { font-size: 16px; }

#fv .fv-mini { position: absolute; right: 14px; top: 62px; width: 280px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 14px rgba(15,23,42,.18); padding: 6px; z-index: 2; }
#fv .fv-mini-h { font-size: 11px; font-weight: 700; color: #475569; margin: 0 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fv .fv-mini svg { display: block; width: 100%; height: 210px; } #fv .fv-mini rect[data-mr]:hover { fill: #fb923c; }

#fv #fvHall { max-width: 220px; font-weight: 700; }

.resnotes { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; } .resnotes span { background: #f3e8ff; color: #6b21a8; border-radius: 99px; padding: 2px 8px; font-size: 12px; } .resnotes b { font-weight: 800; }

/* Druck: einfache Umschaltung oben */
.pmode { display: flex; gap: 6px; margin-bottom: 12px; } .pmode button { flex: 1; padding: 9px 8px; font-weight: 700; border-radius: 10px; }
.pmode button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
#modal.pm-front .pm-top { display: none !important; } #modal.pm-front #pSiteRow { display: none !important; }

.veh-wrap { max-height: 56vh; overflow: auto; } table.veh input, table.veh select { width: 100%; min-width: 0; } table.veh td { padding: 4px 5px; } table.veh input[type=number] { text-align: right; }

.measl .meas-keep { pointer-events: auto; display: block; margin: 4px 0 0 10px; background: #fff; color: #b91c1c; border: 1px solid #fca5a5; border-radius: 6px; font-size: 12px; font-weight: 700; padding: 3px 8px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.15); }

.fzdet { margin: 6px 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; } .fzdet summary { cursor: pointer; } .fzdet table { margin-top: 6px; }

.tour-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.tour-sum > div { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #f8fafc; min-width: 0; }
.tour-sum b { font-size: 18px; } .tour-sum .big b { font-size: 24px; color: #4338ca; } .tour-sum .muted { font-size: 12px; }
#trPr, #trFile, #trGo { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }

#fv .fv-rk.resv .fv-h { background: #7e22ce; } #fv .fv-rk.blk .fv-h { background: #b91c1c; } #fv .fv-rk.blk { opacity: 1; }

/* Ziehen in der Ebenen-Ansicht */
.elev .lvno { cursor: grab; touch-action: none; } .elev .slot { touch-action: manipulation; }
body.dnd-on, body.dnd-on * { cursor: grabbing !important; user-select: none; }
.dnd-src { opacity: .45; outline: 2px dashed #6366f1; outline-offset: 2px; }
.dnd-hot { outline: 3px solid #f97316 !important; outline-offset: 2px; background-color: #fff7ed !important; }
.dnd-ghost { position: fixed; z-index: 9999; pointer-events: none; background: #4f46e5; color: #fff; font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

.ac-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; } .ac-meta span { font-size: 11px; background: #eef2ff; color: #3730a3; border-radius: 99px; padding: 1px 7px; } .ac-meta .ac-vol { background: #f1f5f9; color: #334155; } .ac-meta b { font-weight: 800; }

#fv .fv-vp { user-select: none; -webkit-user-select: none; }

/* Ebenen-Art klein unter der Nummer */
.elev .lvno { width: 52px; flex-direction: column; gap: 1px; text-align: center; line-height: 1.1; }
.elev .lvno small { font-size: 9px; font-weight: 700; color: #64748b; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.elev .lv.k-pallet .lvno small { color: #c2410c; } .elev .lv.k-shelf .lvno small { color: #475569; } .elev .lv.k-flow .lvno small { color: #0369a1; } .elev .lv.k-stack .lvno small { color: #1d4ed8; }
/* Knöpfe rechts unten mit kleiner Beschriftung */
#zoomBtns button { width: 54px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1; }
#zoomBtns button .zl { font-size: 9.5px; font-weight: 700; color: #475569; white-space: nowrap; letter-spacing: 0; }
#zoomBtns button.on .zl { color: inherit; }
@media (max-width: 760px) { #zoomBtns button { width: 50px; height: 48px; } }

/* Einzelansicht einer Halle: Hintergrund leicht abgedunkelt */
#stage.single { background: #e2e7ee; transition: background .25s; }

/* Schnell einräumen (Frontansicht) */
#fv .fv-body { flex: 1; display: flex; min-height: 0; } #fv .fv-body .fv-vp { flex: 1; }
#fv .fv-quick { width: 400px; flex: none; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
#fv #fvQuick.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.qs-h { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; } .qs-h b.mono { font-size: 16px; }
.qs-cur .chip { font-family: Consolas, monospace; } .qs-del { border: none; background: none; padding: 0 0 0 4px; color: #b91c1c; cursor: pointer; }
.qs-nav { display: flex; gap: 6px; flex-wrap: wrap; } .qs-nav button { font-size: 12px; padding: 4px 8px; }
.qs-f { padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-bottom: 1px solid var(--line); font-size: 12px; } .qs-f input[type=search] { flex: 1 1 100%; } .qs-f select { flex: 1; } .qs-f label { display: flex; gap: 4px; align-items: center; }
.qs-list { flex: 1; overflow: auto; } .qs-it { padding: 7px 12px; border-bottom: 1px solid #eef2f7; cursor: pointer; font-size: 13px; } .qs-it:hover { background: #eef2ff; }
.qs-m { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: 11px; color: #3730a3; } .qs-m b { font-weight: 800; }
.qs-tip { font-size: 11px; padding: 6px 12px; border-top: 1px solid var(--line); }
#fv .slot.qsel { outline: 4px solid #16a34a; outline-offset: 1px; background: #f0fdf4 !important; box-shadow: 0 0 0 6px rgba(22,163,74,.2); }

.qs-m .qs-vk { font-size: 13px; color: #312e81; background: #eef2ff; border-radius: 6px; padding: 1px 7px; } .qs-m .qs-vk b { font-size: 15px; font-weight: 800; }

#fv .fv-qb { display: block; width: 100%; border: none; border-radius: 0; background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; font-weight: 800; font-size: 14px; padding: 8px 10px; cursor: pointer; } #fv .fv-qb:hover { filter: brightness(1.08); }
#fv #fvQuick { background: #16a34a; color: #fff; border-color: #15803d; font-weight: 800; } #fv #fvQuick.on { background: #15803d; }

/* + an jeder Ebene: neue Ebene darüber einziehen */
.elev .lvno { position: relative; }
.elev .lv-add { margin-top: 3px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid #a5b4fc; background: #eef2ff; color: #4338ca; font-weight: 800; font-size: 14px; line-height: 1; cursor: pointer; }
.elev .lv-add:hover { background: #4f46e5; color: #fff; }
.lvadd-ch { display: flex; gap: 8px; margin-bottom: 12px; } .lvadd-ch button { flex: 1; padding: 12px; font-weight: 700; font-size: 15px; }
/* Schnell-einräumen-Knopf frei über dem Regal (sieht aus wie ein Knopf, nicht wie ein Regal-Kopf) */
#fv .fv-row { padding-top: 64px; }
#fv .fv-rk { position: relative; overflow: visible; }
#fv .fv-rk .fv-h { border-radius: 10px 10px 0 0; }
#fv .fv-qb { position: absolute; left: 50%; top: -54px; transform: translateX(-50%); width: auto; white-space: nowrap; border-radius: 999px; padding: 9px 20px; font-size: 15px; box-shadow: 0 4px 12px rgba(22,101,52,.35); border: 2px solid #fff; }
#fv .fv-qb:hover { transform: translateX(-50%) translateY(-1px); box-shadow: 0 6px 16px rgba(22,101,52,.45); }

/* Einräum-Leiste (ersetzt das Platz-Fenster in der Ansicht von vorne) */
#fv .fv-quick { width: 470px; border-right: none; }
.qs-top { display: flex; flex-direction: column; } .qs-top b.mono { font-size: 18px; }
.qs-way { font-size: 12px; color: #334155; } .qs-way .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.qs-ents { display: flex; flex-direction: column; gap: 6px; } .qs-ent { border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 8px; padding: 6px 8px; }
.qs-ent-h { display: flex; gap: 6px; align-items: baseline; font-size: 13px; } .qs-ent-h > span { flex: 1; min-width: 0; } .qs-ent-f { display: flex; gap: 6px; margin-top: 4px; } .qs-ent-f input { font-size: 12px; padding: 3px 6px; } .qs-qty { width: 80px; } .qs-enote { flex: 1; }
.qs-more { font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; } .qs-more summary { cursor: pointer; color: #475569; } .qs-ck { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.qs-f select { flex: 1 1 30%; font-size: 12px; } .qs-f .sg-typbtn { flex: 1 1 30%; font-size: 12px; } .qs-cnt { flex: 1 1 100%; font-size: 11px; }
.qs-it .qs-l1 { position: relative; padding-right: 26px; } .qs-hide { position: absolute; right: 0; top: -2px; border: none; background: none; color: #94a3b8; cursor: pointer; font-size: 13px; } .qs-hide:hover { color: #b91c1c; }
.qs-it.done { opacity: .55; } .qs-it.first { background: #f0fdf4; box-shadow: inset 3px 0 0 #16a34a; } .qs-it.hid { opacity: .5; }
.qs-m .qs-size { font-size: 11px; padding: 1px 4px; border-radius: 6px; border: 1px solid #d5dce6; } .qs-m .qs-size.set { border-color: var(--accent); font-weight: 700; }
.qs-m .qs-kv { font-size: 11px; color: #475569; background: #f1f5f9; border-radius: 6px; padding: 1px 6px; }

.elev .lv-btns { display: flex; gap: 4px; margin-top: 3px; } .elev .lv-btns .lv-add { margin-top: 0; }
.elev .lv-del { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid #fca5a5; background: #fff1f2; color: #dc2626; font-weight: 800; font-size: 12px; line-height: 1; cursor: pointer; }
.elev .lv-del:hover { background: #dc2626; color: #fff; }

#fv .fv-qrs { width: 8px; flex: none; cursor: col-resize; background: linear-gradient(90deg, transparent 3px, #cbd5e1 3px, #cbd5e1 5px, transparent 5px); touch-action: none; }
#fv .fv-qrs:hover, #fv .fv-qrs.on { background: linear-gradient(90deg, transparent 2px, #6366f1 2px, #6366f1 6px, transparent 6px); }

/* Überschrift über den Regalen */
#fv .fv-title { position: absolute; left: 16px; top: 12px; right: 320px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; pointer-events: none; z-index: 1; }
#fv .fv-title span { background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
#fv .fvt-g { font-size: 20px; font-weight: 800; color: #3730a3; border-color: #a5b4fc !important; background: #eef2ff !important; }
#fv .fvt-r { font-size: 20px; font-weight: 800; color: #0f172a; }
#fv .fvt-p { font-size: 16px; color: #166534; border-color: #86efac !important; background: #f0fdf4 !important; } #fv .fvt-p b { font-size: 18px; }
#fv .fvt-h { font-size: 13px; color: #475569; }

/* Eingabefeld der Einräum-Leiste: deutlich sichtbar, wenn der Cursor drin ist */
#qsQ { font-size: 15px; padding: 8px 10px; transition: box-shadow .2s, border-color .2s; }
#qsQ:focus { border: 2px solid #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.22); outline: none; background: #f7fef9; }
#qsQ.qs-flash { animation: qsflash 1.2s ease-out; }
@keyframes qsflash { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.75); background: #dcfce7; } 40% { box-shadow: 0 0 0 12px rgba(22,163,74,.0); background: #dcfce7; } 70% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); } 100% { box-shadow: 0 0 0 10px rgba(22,163,74,0); background: #f7fef9; } }
