/* Werkstatt-Tafel: Werkzeugleiste oben, darunter Tages- oder Wochenraster */
:root {
  --bg: #e9ecef; --surface: #ffffff; --surface-2: #f4f6f8; --line: #c9d0d7; --line-soft: #e3e7eb;
  --fg: #1a1f25; --muted: #5a6571; --ink: #1f2a35; --ink-fg: #ffffff;
  --signal: #f2b200; --signal-fg: #2b2100; --danger: #b42318; --focus: #1f6fb2;
  --gap-bg: #f7f3e3; --gap-line: #e8dfb8; --gap-fg: #5c5220;
  --c-blau-bg: #d9e7f5; --c-blau-edge: #2d6ea8; --c-blau-fg: #10304d;
  --c-gruen-bg: #d9efdf; --c-gruen-edge: #2c8648; --c-gruen-fg: #10361c;
  --c-orange-bg: #fbe4cc; --c-orange-edge: #cc6a0c; --c-orange-fg: #4a2505;
  --c-rot-bg: #f6d9d9; --c-rot-edge: #bb3636; --c-rot-fg: #4c1111;
  --c-violett-bg: #e6def4; --c-violett-edge: #6a47a6; --c-violett-fg: #2a1949;
  --c-grau-bg: #e2e6ea; --c-grau-edge: #6a7480; --c-grau-fg: #20262c;
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --slot: 16px; --timecol: 58px; --colmin: 132px; --head: 44px;
  --namecol: 150px; --daymin: 150px; --laneh: 62px;
  --moncol: 220px; --mondaycol: 300px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161a; --surface: #1a2026; --surface-2: #20272e; --line: #34404b; --line-soft: #262f37;
    --fg: #e6eaee; --muted: #93a0ac; --ink: #e6eaee; --ink-fg: #12161a; --signal: #ffc61a; --signal-fg: #2b2100;
    --danger: #ff7b6e; --focus: #6fb2ec;
    --gap-bg: #24231b; --gap-line: #38351f; --gap-fg: #d9cf9c;
    --c-blau-bg: #1c3550; --c-blau-edge: #5ea0dc; --c-blau-fg: #dcebf9;
    --c-gruen-bg: #19392a; --c-gruen-edge: #55b878; --c-gruen-fg: #daf3e2;
    --c-orange-bg: #43290f; --c-orange-edge: #f0953a; --c-orange-fg: #fde8d2;
    --c-rot-bg: #461c1c; --c-rot-edge: #ec6b6b; --c-rot-fg: #fadcdc;
    --c-violett-bg: #2e2348; --c-violett-edge: #a284dd; --c-violett-fg: #ebe3fa;
    --c-grau-bg: #2a3239; --c-grau-edge: #8d98a3; --c-grau-fg: #e3e8ec;
    color-scheme: dark;
  }
}
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 15px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.app { height: 100%; display: flex; flex-direction: column; }

.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
button.brand { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
.brand::before { content: ""; width: 10px; height: 22px; background: repeating-linear-gradient(-45deg, var(--signal) 0 5px, var(--ink) 5px 10px); border-radius: 2px; }
.group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: var(--surface-2); height: 34px; padding: 0 14px; cursor: pointer; font-weight: 600; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--ink-fg); }
.datelabel { font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.btn.signal { background: var(--signal); color: var(--signal-fg); border-color: var(--signal); font-weight: 600; }
.btn.icon { width: 36px; padding: 0; justify-content: center; font-size: 18px; }
.btn.small { height: 30px; padding: 0 9px; font-size: 14px; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input[type=date].btn { padding: 0 8px; }

.wrap { flex: 1; min-height: 0; overflow: auto; position: relative; }
/* Ebenen: Tagesplan / Häckseln */
.layer-chop .normonly, html:not(.layer-chop) .choponly { display: none !important; }
.layer-chop .bar { box-shadow: inset 0 -4px 0 #2c8648; }
.layerchip { font-family: var(--f-display); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: 6px; background: #2c8648; color: #fff; }
.btn.chopbtn { border-color: #2c8648; color: #1f6b38; font-weight: 600; }
.layer-chop .wrap { overflow: hidden; display: flex; }
.cscroll { flex: 1; min-width: 0; overflow: auto; position: relative; }
.cpanel { width: 380px; flex: none; border-left: 1px solid var(--line); background: var(--surface); overflow: auto; padding: 14px 16px 24px; display: grid; gap: 14px; align-content: start; }
@media (max-width: 900px) { .layer-chop .wrap { flex-direction: column; overflow: auto; } .cpanel { width: auto; border-left: 0; border-top: 1px solid var(--line); } .cscroll { flex: none; } }
.cboard .colhead { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px; padding: 6px 8px; cursor: default; text-transform: none; letter-spacing: 0; }
.cboard .colhead .hn { display: flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 700; font-size: 17px; text-transform: uppercase; }
.cboard .colhead .hn i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cboard .colhead select, .cboard .colhead input { height: 28px; font-size: 13px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); min-width: 0; width: 100%; font-family: var(--f-body); }
.cboard .colhead .hl { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); line-height: 1.3; margin-bottom: -2px; flex: none; }
.cboard .plushead { display: grid; place-items: center; }
.cboard .plushead button { width: 44px; height: 44px; border-radius: 50%; border: 2px dashed var(--line); background: var(--surface); font-size: 22px; cursor: pointer; color: var(--muted); }
.cboard .plushead button:hover { border-color: var(--fg); color: var(--fg); }
.cjob { position: absolute; z-index: 3; border-radius: 6px; padding: 4px 8px 4px 10px; overflow: hidden; border: 1px solid var(--cedge); border-left-width: 5px; background: var(--cbg); color: var(--cfg); cursor: grab; user-select: none; touch-action: none; margin: 1px 2px; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.cjob.cs-ok { --cbg: var(--c-gruen-bg); --cedge: var(--c-gruen-edge); --cfg: var(--c-gruen-fg); }
.cjob.cs-warn { --cbg: var(--c-orange-bg); --cedge: var(--c-orange-edge); --cfg: var(--c-orange-fg); }
.cjob.cs-bad { --cbg: var(--c-rot-bg); --cedge: var(--c-rot-edge); --cfg: var(--c-rot-fg); }
.cjob.sel { box-shadow: 0 0 0 3px var(--focus); z-index: 6; }
.cjob.dragging { cursor: grabbing; z-index: 20; box-shadow: 0 8px 22px rgba(0,0,0,.25); opacity: .95; }
.cjob .jt { font-family: var(--f-mono); font-size: 11px; opacity: .85; white-space: nowrap; }
.cjob .jn { font-family: var(--f-display); font-weight: 600; font-size: 17px; overflow-wrap: break-word; }
.cjob .cm { font-size: 12px; opacity: .9; overflow-wrap: anywhere; }
.cjob .cn { font-size: 11.5px; font-weight: 600; }
.cjob .cw { font-size: 11.5px; font-weight: 700; }
.cjob .h { position: absolute; left: 0; right: 0; height: 8px; cursor: ns-resize; }
.cjob .h.top { top: 0; } .cjob .h.bot { bottom: 0; }
.ro .cjob { cursor: pointer; } .ro .cjob .h { display: none; }
.cpanel h2 { margin: 0; font-family: var(--f-display); font-size: 24px; text-transform: uppercase; line-height: 1.1; }
.cpanel h3 { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cpanel .cstate { padding: 8px 10px; border-radius: 6px; font-size: 14px; font-weight: 600; }
.cpanel .cstate.cs-ok { background: var(--c-gruen-bg); color: var(--c-gruen-fg); }
.cpanel .cstate.cs-warn { background: var(--c-orange-bg); color: var(--c-orange-fg); }
.cpanel .cstate.cs-bad { background: var(--c-rot-bg); color: var(--c-rot-fg); }
.cpanel .cstate ul { margin: 4px 0 0; padding-left: 18px; font-weight: 500; }
.ccrew { display: grid; gap: 6px; }
.crow { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; cursor: pointer; background: var(--surface-2); }
.crow.act { border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 30%, transparent); background: var(--surface); }
.crow.bad { border-color: var(--danger); }
.crow .ch { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.crow .ch .sp { flex: 1; }
.crow .ci { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; }
.crow .tg { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.crow .tg.bad { background: var(--c-rot-bg); border-color: var(--c-rot-edge); color: var(--c-rot-fg); }
.crow .tg button, .crow .ch button { border: 0; background: none; color: var(--danger); cursor: pointer; font-size: 14px; padding: 0 4px; }
.crow .miss { color: var(--muted); font-style: italic; }
.avail { display: flex; flex-wrap: wrap; gap: 6px; }
.av { display: inline-flex; flex-direction: column; align-items: flex-start; min-height: 36px; justify-content: center; padding: 3px 10px; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; background: var(--c-gruen-bg); color: var(--c-gruen-fg); border: 1px solid var(--c-gruen-edge); max-width: 100%; }
.av:hover { filter: brightness(.96); }
.av small { font-size: 11px; font-weight: 500; opacity: .9; }
.av.busy { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); cursor: not-allowed; }
.av.mine { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); cursor: default; }
.cpanel .hint { font-size: 13px; color: var(--muted); line-height: 1.4; }
.cjob { height: var(--h); }
.cjob.sel, .cjob.dz-hover { height: auto; min-height: var(--h); }
html:not(.tdragging) .cjob:not(.dragging):hover { height: auto; min-height: var(--h); z-index: 7; }
.cjob .crop { font-family: var(--f-body); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding: 0 5px; border-radius: 3px; background: color-mix(in srgb, var(--cedge) 22%, transparent); }
.cjob .pins { display: grid; gap: 3px; margin: 2px 0; }
.cjob .prow { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; border-radius: 5px; padding: 1px; }
.cjob .prow.rh { outline: 2px dashed var(--cedge); outline-offset: 1px; background: color-mix(in srgb, var(--cedge) 12%, transparent); }
.cjob .lw { font-size: 11px; font-style: italic; opacity: .8; padding: 0 2px; }
.cjob .slot, .cjob .prow.virt, .cjob .rtb { display: none; }
.cjob.sel .slot, .tdragging .cjob .slot { display: inline-block; }
.cjob.sel .prow.virt, .tdragging .cjob .prow.virt { display: flex; }
.cjob.sel .rtb { display: inline-block; }
.cjob.sel .lw, .tdragging .cjob .lw { display: none; }
.cjob .slot { font-size: 11px; line-height: 1.5; padding: 0 6px; border: 1px dashed var(--cedge); border-radius: 4px; opacity: .7; font-style: italic; }
.cjob .prow.virt { border-top: 1px dotted color-mix(in srgb, var(--cedge) 50%, transparent); padding-top: 3px; }
.cjob .rt { font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; padding: 0 4px; border-radius: 3px; background: color-mix(in srgb, var(--cedge) 20%, transparent); }
.cjob .rtb { border: 1px solid var(--cedge); background: var(--surface); border-radius: 4px; font-size: 11px; line-height: 1.3; padding: 0 4px; cursor: pointer; color: var(--fg); }
.cjob .pdrop { font-size: 11.5px; border: 1px dashed var(--cedge); border-radius: 5px; padding: 4px 6px; opacity: .8; text-align: center; }
.pin { display: inline-block; font-size: 11.5px; font-weight: 600; line-height: 1.5; padding: 0 6px; border-radius: 4px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); cursor: grab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; touch-action: none; }
.pin.k-d { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.pin.k-t { border-left: 3px solid var(--fg); }
.pin.bad { background: var(--danger); color: #fff; border-color: var(--danger); }
.ro .pin { cursor: pointer; }
.cjob.dz-ok { outline: 2px dashed var(--c-gruen-edge); outline-offset: 1px; }
.cjob.dz-no { opacity: .5; }
.cjob.dz-hover.dz-ok { box-shadow: 0 0 0 4px var(--c-gruen-edge); opacity: 1; z-index: 8; }
.cjob.dz-hover.dz-no { box-shadow: 0 0 0 4px var(--danger); z-index: 8; }
.tdragging, .tdragging * { cursor: grabbing !important; }
.tghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; box-shadow: 0 8px 22px rgba(0,0,0,.28); opacity: .96; margin: 0; }
.lifted { opacity: .35; }
.cpanel .pg { display: grid; gap: 8px; }
.cpanel .pgh { display: flex; align-items: center; gap: 6px; }
.cpanel .pgh h3 { flex: 1; }
.cpanel .pgh .n { font-weight: 500; }
.pgb { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; color: var(--fg); }
.pgb:hover { border-color: var(--fg); }
.pgb.on { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.ptiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ptiles .hint { grid-column: 1 / -1; }
.ptile { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--line); min-width: 0; user-select: none; touch-action: none; }
.ptile.drag { cursor: grab; }
.ptile b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile.k-d { border-left-color: var(--ink); }
.ptile.k-t { border-left-color: var(--c-blau-edge); }
.ptile.k-w { border-left-color: var(--c-orange-edge); }
.ptile.free { background: var(--c-gruen-bg); border-color: var(--c-gruen-edge); }
.ptile.free small { color: var(--c-gruen-fg); }
.ptile.part { background: var(--c-gruen-bg); border-color: var(--c-gruen-edge); border-style: dashed; }
.ptile.part small { color: var(--c-gruen-fg); font-weight: 600; }
.ptile.busy { background: var(--surface-2); border-style: dashed; color: var(--muted); }
.ptile.mine { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.ptile.mine small { color: var(--ink-fg); opacity: .8; }
.ptile .ptx { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; }
.padd { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.padd input[name=n] { flex: 1 1 160px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); min-width: 0; font: inherit; }
.padd.plist { display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.padd.plist label { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 4px 2px; cursor: pointer; }
.padd.plist label input { width: 18px; height: 18px; }
.padd.plist .btn { justify-self: start; margin-top: 4px; }
.rmzone { display: none; padding: 14px; border: 2px dashed var(--danger); border-radius: 8px; color: var(--danger); font-weight: 600; text-align: center; }
.tdrag-pin .rmzone { display: block; }
.cpanel.rmhover .rmzone { background: var(--c-rot-bg); }
.cboard .colhead .hnm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cboard .colhead .hbtn { border: 1px solid transparent; background: none; font-size: 15px; line-height: 1; padding: 3px 6px; border-radius: 5px; cursor: pointer; color: var(--muted); text-transform: none; font-family: var(--f-body); font-weight: 700; }
.cboard .colhead .hbtn:hover { border-color: var(--line); color: var(--fg); }
.cboard .colhead .hbtn.danger { color: var(--danger); }
.cboard .colhead .hedit input { height: 28px; flex: 1; font-size: 14px; font-weight: 600; text-transform: none; }
.cboard .colhead .sw { width: 18px; height: 18px; border-radius: 50%; border: 0; flex: none; cursor: pointer; }

.machgrid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.machcol { display: grid; gap: 6px; }
.mrow { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.mrow input { height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
.mrow select { height: 34px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.mrow .sw { width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer; }
/* Druck Häckselplan */
.pchop { display: grid; grid-template-columns: repeat(var(--hc), minmax(0, 1fr)); gap: 4mm; align-items: start; }
.pchop .pc { border: 1px solid #999; border-top: 3mm solid var(--hcol); border-radius: 2mm; padding: 2mm; break-inside: avoid; }
.pchop .pc h2 { margin: 0; font-family: var(--f-display); font-size: 14pt; text-transform: uppercase; }
.pchop .pc .pcs { font-size: 8.5pt; color: #333; margin-bottom: 2mm; }
.pchop .pj { border-top: 1px solid #bbb; padding: 1.5mm 0; break-inside: avoid; }
.pchop .pj .pt { font-family: var(--f-mono); font-size: 8.5pt; }
.pchop .pj .pn { font-family: var(--f-display); font-size: 12pt; font-weight: 600; }
.pchop .pj .pm2 { font-size: 8pt; color: #333; white-space: pre-line; }
.pchop .pj table { width: 100%; border-collapse: collapse; font-size: 8.5pt; margin-top: 1mm; }
.pchop .pj td { border-top: 1px dotted #bbb; padding: .6mm 1mm .6mm 0; vertical-align: top; }
.netnote { background: var(--danger); color: #fff; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.setupnote { background: var(--gap-bg); color: var(--gap-fg); padding: 8px 16px; font-size: 14px; border-bottom: 1px solid var(--gap-line); }
.btn.user { border-style: dashed; }
.btn.user.in { border-style: solid; background: var(--surface); font-weight: 600; }
.btn.review { background: #2c8648; color: #fff; border-color: #2c8648; font-weight: 600; }
/* Status: erledigt / abgeschlossen */
.job.has-chk { padding-right: 30px; }
.chk { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--edge); background: var(--surface); color: transparent; font-size: 13px; font-weight: 700; line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0; z-index: 4; }
.chk:hover { color: var(--edge); }
.chk.s-done { background: #e8a400; border-color: #e8a400; color: #fff; }
.chk.s-ok { background: #2c8648; border-color: #2c8648; color: #fff; }
.chk:disabled { cursor: default; }
.chk:disabled:hover { color: transparent; }
.chk.s-done:disabled, .chk.s-ok:disabled { color: #fff; }
.stl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.stl.s-done { color: #a86f00; }
.stl.s-ok { color: #1f6b38; }
.stl.s-ret { color: var(--danger); text-transform: none; letter-spacing: 0; }
.job.st-ok, .wjob.st-ok { opacity: .55; }
.wst { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; color: #fff; margin-right: 4px; vertical-align: 1px; }
.wst.s-done { background: #e8a400; } .wst.s-ok { background: #2c8648; }
.monitor .chk { pointer-events: none; width: clamp(22px, 1.6vw, 30px); height: clamp(22px, 1.6vw, 30px); }
.ro .job, .ro .wjob { cursor: pointer; }
.ro .job .h, .ro .wjob .h { display: none; }
.statusrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--surface-2); }
.statusrow #js_text { font-size: 14px; line-height: 1.4; }
.revrow { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.revrow .rejbox { grid-column: 1 / -1; display: flex; gap: 6px; }
.revrow .rejbox input { flex: 1; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
.staffrow .pwline { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.staffrow .pwline input[data-newpw] { flex: 1; min-width: 160px; }
.staffrow .pwline .check { font-size: 14px; }
.staffrow .pwline input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
.staffrow .tag.on { color: #1f6b38; }
.job.gone, .wjob.gone { opacity: .6; border-style: dashed; }
.job.gone .jn, .wjob.gone .jn { text-decoration: line-through; }
.gonetag { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--danger); color: #fff; border-radius: 3px; padding: 0 4px; }

/* Tagesraster */
.board { display: grid; position: relative; grid-template-columns: var(--timecol) repeat(var(--cols), minmax(var(--colmin), 1fr)); grid-template-rows: var(--head) auto; min-width: 100%; }
.corner, .colhead { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.corner { left: 0; z-index: 6; border-right: 1px solid var(--line); }
.colhead { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; font-family: var(--f-display); font-weight: 600; font-size: 17px; text-transform: uppercase; letter-spacing: .03em; border-left: 1px solid var(--line-soft); min-width: 0; cursor: pointer; }
.colhead span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colhead.open { color: var(--muted); background: var(--surface-2); cursor: default; }
.colhead .n { font-family: var(--f-mono); font-size: 12px; color: var(--muted); font-weight: 400; }
.times { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--line); }
.times .t { position: absolute; right: 8px; transform: translateY(-50%); font-family: var(--f-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.times .t:first-child { transform: none; }
.times .t.end { transform: translateY(-100%); }
.col { position: relative; border-left: 1px solid var(--line-soft); background-color: var(--surface);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(var(--line-soft) 1px, transparent 1px);
  background-size: 100% calc(var(--slot) * 4), 100% var(--slot); }
.col.open { background-color: var(--surface-2); }

.job { position: absolute; z-index: 3; border-radius: 5px; padding: 3px 7px 3px 9px; overflow: hidden; border: 1px solid var(--edge); border-left-width: 4px; background: var(--jbg); color: var(--jfg); cursor: grab; user-select: none; touch-action: none; margin: 1px 2px; display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.job.dragging, .wjob.dragging { cursor: grabbing; z-index: 20; box-shadow: 0 8px 22px rgba(0,0,0,.25); opacity: .95; }
.job .jt { font-family: var(--f-mono); font-size: 11px; opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; }
.job .jn { font-family: var(--f-display); font-weight: 600; font-size: 16px; overflow-wrap: break-word; hyphens: auto; }
.job .jl { font-size: 12px; opacity: .85; overflow-wrap: anywhere; }
.job .badge { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.job .h, .wjob .h { position: absolute; cursor: ns-resize; }
.job .h { left: 0; right: 0; height: 8px; }
.job .h.top { top: 0; } .job .h.bot { bottom: 0; }
.job .h.bot::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 22px; margin-left: -11px; height: 3px; border-radius: 2px; background: var(--edge); opacity: .5; }
.c-blau { --jbg: var(--c-blau-bg); --edge: var(--c-blau-edge); --jfg: var(--c-blau-fg); }
.c-gruen { --jbg: var(--c-gruen-bg); --edge: var(--c-gruen-edge); --jfg: var(--c-gruen-fg); }
.c-orange { --jbg: var(--c-orange-bg); --edge: var(--c-orange-edge); --jfg: var(--c-orange-fg); }
.c-rot { --jbg: var(--c-rot-bg); --edge: var(--c-rot-edge); --jfg: var(--c-rot-fg); }
.c-violett { --jbg: var(--c-violett-bg); --edge: var(--c-violett-edge); --jfg: var(--c-violett-fg); }
.c-grau { --jbg: var(--c-grau-bg); --edge: var(--c-grau-edge); --jfg: var(--c-grau-fg); }

.job .jnote { font-size: 12px; opacity: .85; white-space: pre-line; overflow-wrap: anywhere; border-top: 1px dashed color-mix(in srgb, var(--edge) 45%, transparent); padding-top: 2px; margin-top: 1px; }
.wjob .jx { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.imp td.who select { display: block; margin-bottom: 4px; }
.job .team { font-size: 11px; font-weight: 600; opacity: .8; overflow-wrap: anywhere; }
.job .team::before, .wjob .team::before { content: "👥 "; font-size: 10px; }

/* Lückenfüller-Zeile unter dem Raster */
.flabel { position: sticky; left: 0; z-index: 4; background: var(--gap-bg); border-right: 1px solid var(--line); border-top: 2px solid var(--line); padding: 6px 4px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gap-fg); writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.ffoot { background: var(--gap-bg); color: var(--gap-fg); border-top: 2px solid var(--line); border-left: 1px solid var(--gap-line); padding: 5px 8px; font-size: 12.5px; line-height: 1.3; cursor: pointer; min-width: 0; }
.ffoot:hover { background: color-mix(in srgb, var(--gap-bg) 80%, var(--gap-line)); }
.ffoot.open { cursor: default; background: var(--surface-2); }
.ffoot ul { margin: 0; padding-left: 15px; }
.ffoot li { overflow-wrap: break-word; }
.ffoot .more { font-size: 11px; opacity: .7; }
.fall { grid-column: 1 / -1; background: var(--gap-bg); color: var(--gap-fg); border-top: 1px solid var(--gap-line); padding: 5px 10px; font-size: 12.5px; position: sticky; left: 0; }
.fall b { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-right: 6px; }

.now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--signal); z-index: 15; pointer-events: none; }
.times .nowlbl { position: absolute; right: 4px; transform: translateY(-50%); background: var(--signal); color: var(--signal-fg); font-family: var(--f-mono); font-size: 11px; padding: 1px 4px; border-radius: 3px; z-index: 2; }

/* Wochenraster */
.week { display: grid; grid-template-columns: var(--namecol) repeat(var(--days), minmax(var(--daymin), 1fr)); min-width: 100%; position: relative; }
.week .wh { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-soft); height: var(--head); display: flex; flex-direction: column; justify-content: center; align-items: center; font-family: var(--f-display); font-weight: 600; font-size: 17px; text-transform: uppercase; cursor: pointer; }
.week .wh small { font-family: var(--f-mono); font-size: 12px; font-weight: 400; color: var(--muted); text-transform: none; }
.week .wh.today { box-shadow: inset 0 -3px 0 var(--signal); }
.week .wcorner { position: sticky; top: 0; left: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.week .wname { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; justify-content: center; min-width: 0; cursor: pointer; }
.week .wname b { font-family: var(--f-display); font-size: 17px; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.week .wname small { font-size: 12px; color: var(--muted); }
.week .wname.open { background: var(--surface-2); color: var(--muted); cursor: default; }
.week .wrow { grid-column: 2 / span var(--days); position: relative; border-bottom: 1px solid var(--line); min-height: calc(var(--laneh) + 8px);
  background-color: var(--surface); background-image: linear-gradient(to right, var(--line-soft) 1px, transparent 1px); background-size: calc(100% / var(--days)) 100%; }
.week .wrow.open { background-color: var(--surface-2); }
.week .todaycol { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--signal) 10%, transparent); pointer-events: none; }
.wjob { position: absolute; height: calc(var(--laneh) - 4px); border-radius: 5px; border: 1px solid var(--edge); border-left-width: 4px; background: var(--jbg); color: var(--jfg); padding: 3px 8px; overflow: hidden; cursor: grab; user-select: none; touch-action: none; line-height: 1.2; z-index: 2; }
.wjob .jn { font-family: var(--f-display); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wjob .jt { font-family: var(--f-mono); font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wjob .h { top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.wjob .h.l { left: 0; } .wjob .h.r { right: 0; }
.wjob.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dashed; }
.wjob.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: dashed; }

.empty { max-width: 560px; margin: 48px auto; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 12px; }
.empty h2 { margin: 0; font-family: var(--f-display); font-size: 26px; text-transform: uppercase; }
.empty p { margin: 0; color: var(--muted); line-height: 1.5; }
.empty .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Monitor */
.monbar { display: none; }
.monitor .bar { display: none; }
.monitor .monbar { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--ink); color: var(--ink-fg); }
.monbar .mdate { font-family: var(--f-display); font-size: clamp(22px, 2.6vw, 40px); font-weight: 700; text-transform: uppercase; }
.monbar .mclock { font-family: var(--f-mono); font-size: clamp(22px, 2.4vw, 38px); font-weight: 500; color: var(--signal); font-variant-numeric: tabular-nums; }
.monbar .btn { background: transparent; color: var(--ink-fg); border-color: color-mix(in srgb, var(--ink-fg) 35%, transparent); opacity: .65; }
.monbar .btn:hover { opacity: 1; }
.monitor .board { grid-template-columns: var(--timecol) repeat(var(--cols), minmax(var(--moncol), 1fr)); --head: 56px; }
.monitor .colhead { font-size: clamp(16px, 1.5vw, 26px); cursor: default; }
.monitor .job { cursor: default; }
.monitor .job .jn { font-size: clamp(15px, 1.35vw, 24px); }
.monitor .job .jt { font-size: clamp(11px, .9vw, 16px); }
.monitor .job .jl { font-size: clamp(12px, 1vw, 17px); }
.monitor .job .jnote { font-size: clamp(12px, .95vw, 16px); }
.monitor .wjob .jx { font-size: clamp(12px, .9vw, 16px); }
.monitor .ffoot, .monitor .fall { cursor: default; font-size: clamp(12px, .95vw, 17px); }
.monitor .job .h, .monitor .wjob .h { display: none; }
.monitor .wrap { overflow: auto; cursor: grab; }
.monitor .wrap.panning { cursor: grabbing; user-select: none; }
.monitor .week { grid-template-columns: var(--namecol) repeat(var(--days), minmax(var(--mondaycol), 1fr)); --head: 52px; --namecol: clamp(120px, 11vw, 200px); }
.monitor .wh { font-size: clamp(16px, 1.4vw, 24px); }
.monitor .wname { cursor: default; }
.monitor .wname b { font-size: clamp(15px, 1.3vw, 22px); }
.monitor .wjob { cursor: default; }
.monitor .wjob .jn { font-size: clamp(14px, 1.15vw, 20px); }
.monitor .wjob .jt { font-size: clamp(11px, .85vw, 15px); }
.monbar .seg { border-color: color-mix(in srgb, var(--ink-fg) 35%, transparent); }
.monbar .seg button { background: transparent; color: var(--ink-fg); height: 36px; }
.monbar .seg button[aria-pressed=true] { background: var(--signal); color: var(--signal-fg); }
.monbar .mnav { display: flex; gap: 6px; align-items: center; }
.monbar .mnav .btn { opacity: .85; }

/* Dialoge */
.overlay { position: fixed; inset: 0; background: rgba(10,14,18,.45); z-index: 50; display: grid; place-items: center; padding: 16px; }
.dlg { background: var(--surface); color: var(--fg); border-radius: 10px; border: 1px solid var(--line); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 18px 50px rgba(0,0,0,.3); display: flex; flex-direction: column; }
.dlg.wide { width: min(980px, 100%); }
.dlg header { padding: 16px 20px 6px; }
.dlg h2 { margin: 0; font-family: var(--f-display); font-size: 24px; text-transform: uppercase; }
.dlg h3 { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dlg .sub { color: var(--muted); font-size: 14px; margin-top: 4px; line-height: 1.45; }
.dlg .body { padding: 12px 20px; display: grid; gap: 12px; min-width: 0; }
.dlg footer { padding: 12px 20px 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line-soft); }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.field input, .field select, .field textarea { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); width: 100%; min-width: 0; }
.field textarea { height: auto; min-height: 70px; padding: 8px 10px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { display: inline-flex; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches i { width: 30px; height: 30px; border-radius: 6px; background: var(--jbg); border: 2px solid var(--edge); cursor: pointer; display: block; }
.swatches input:checked + i { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--fg); }
.swatches input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 4px; }
.err { color: var(--danger); font-size: 14px; }
.stafflist, .filllist { display: grid; gap: 6px; }
.staffrow { display: grid; grid-template-columns: 1fr auto auto auto auto auto; gap: 6px; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
@media (max-width: 640px) { .staffrow { grid-template-columns: 1fr auto auto; } }
.members { display: grid; gap: 8px; }
.memrow { display: grid; grid-template-columns: minmax(130px, 1.4fr) repeat(2, minmax(118px, 1fr)) repeat(2, minmax(84px, .7fr)) auto; gap: 6px; align-items: end; padding: 8px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--surface-2); }
.memrow label { display: grid; gap: 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); min-width: 0; }
.memrow input, .memrow select { height: 34px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); min-width: 0; width: 100%; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--fg); font-size: 14px; }
.memrow.focus { border-color: var(--focus); }
@media (max-width: 760px) { .memrow { grid-template-columns: 1fr 1fr; } .memrow label:first-child { grid-column: 1 / -1; } }
.memrow.dayonly { grid-template-columns: minmax(150px, 1.6fr) repeat(2, minmax(90px, .7fr)) auto; }
.memrow.dayonly .dt { display: none; }
.scope { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 10px 12px; border: 1px solid var(--signal); border-radius: 8px; background: color-mix(in srgb, var(--signal) 10%, var(--surface)); }
.scope .scopelbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.scope label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.scope small { color: var(--muted); }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 8px; background: var(--surface-2); cursor: pointer; font-size: 14px; user-select: none; }
.pchip input { width: 16px; height: 16px; margin: 0; }
.pchip:has(input:checked) { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.pchips .allnote { font-size: 13px; color: var(--muted); align-self: center; }
.fadd { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface-2); }
.fadd input#filladd { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); min-width: 0; }
.fadd .pchip { background: var(--surface); }
.fgroup { display: grid; gap: 6px; margin-bottom: 10px; }
.fwho { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpick { grid-column: 1 / -1; padding: 8px; border: 1px dashed var(--line); border-radius: 6px; }
.fillrow { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 6px; align-items: center; }
.staffrow input:not([type=checkbox]), .fillrow input:not([type=checkbox]), .addrow input, .addrow select { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
.fillrow input[type=checkbox] { width: 18px; height: 18px; }
.fillrow.done input:not([type=checkbox]) { text-decoration: line-through; color: var(--muted); }
.addrow { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; max-height: 50vh; }
table.imp { border-collapse: collapse; width: 100%; font-size: 14px; }
table.imp th, table.imp td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
table.imp th { position: sticky; top: 0; background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); z-index: 1; }
table.imp td.mono { font-family: var(--f-mono); font-size: 12px; white-space: nowrap; }
table.imp select { height: 32px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); padding: 0 6px; max-width: 170px; }
.tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.drop { border: 2px dashed var(--line); border-radius: 8px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--focus); color: var(--fg); }
ol.how { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; background: var(--ink); color: var(--ink-fg); padding: 10px 16px; border-radius: 8px; z-index: 60; font-size: 14px; max-width: calc(100% - 32px); pointer-events: none; }

/* Druck */
#printarea { display: none; }
@page { size: A4 landscape; margin: 8mm; }
@media print {
  :root {
    --bg: #fff; --surface: #fff; --surface-2: #f3f4f6; --line: #9aa3ad; --line-soft: #d7dce1; --fg: #000; --muted: #444;
    --gap-bg: #fbf8ec; --gap-line: #d6cc9c; --gap-fg: #4d4518;
    --c-blau-bg: #d9e7f5; --c-blau-edge: #2d6ea8; --c-blau-fg: #10304d;
    --c-gruen-bg: #d9efdf; --c-gruen-edge: #2c8648; --c-gruen-fg: #10361c;
    --c-orange-bg: #fbe4cc; --c-orange-edge: #cc6a0c; --c-orange-fg: #4a2505;
    --c-rot-bg: #f6d9d9; --c-rot-edge: #bb3636; --c-rot-fg: #4c1111;
    --c-violett-bg: #e6def4; --c-violett-edge: #6a47a6; --c-violett-fg: #2a1949;
    --c-grau-bg: #e2e6ea; --c-grau-edge: #6a7480; --c-grau-fg: #20262c;
    color-scheme: light;
  }
  html, body { height: auto; background: #fff; }
  .app, .overlay, .toast { display: none !important; }
  #printarea { display: block; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.page { break-after: page; page-break-after: always; }
.page:last-child { break-after: auto; page-break-after: auto; }
.page.day { height: 193mm; display: flex; flex-direction: column; overflow: hidden; }
.phead { display: flex; align-items: baseline; gap: 12px; padding-bottom: 2mm; border-bottom: 2px solid #000; margin-bottom: 2mm; }
.phead h1 { margin: 0; font-family: var(--f-display); font-size: 20pt; text-transform: uppercase; }
.phead .pd { font-family: var(--f-display); font-size: 16pt; font-weight: 600; }
.phead .pm { margin-left: auto; font-size: 8pt; color: #555; }
.pboard { --timecol: 11mm; --head: 8mm; }
.pboard .board { grid-template-columns: var(--timecol) repeat(var(--cols), var(--pcolw, 1fr)); min-width: 0; }
.pboard .colhead { font-size: 11pt; position: static; }
.phead .pb { font-size: 10pt; font-weight: 600; padding: 1px 6px; border: 1px solid #000; border-radius: 3px; }
.pboard .corner { position: static; }
.pboard .times { position: relative; }
.pboard .times .t { font-size: 7.5pt; right: 1.5mm; }
.pboard .job { padding: .8mm 1.5mm .8mm 2mm; cursor: default; }
.pboard .job .jn { font-size: 10.5pt; }
.pboard .job .jt, .pboard .job .badge { font-size: 7.5pt; }
.pboard .job .jl { font-size: 8pt; }
.pboard .job .h { display: none; }
.pboard .job .team, .pboard .job .jnote { font-size: 7.5pt; }
.pboard .job .stl { font-size: 7pt; }
.pweek .wjob .jx { font-size: 6.5pt; }
.pboard .flabel { position: static; font-size: 6pt; }
.pboard .ffoot { font-size: 7pt; padding: 1mm 1.5mm; }
.pboard .ffoot ul { padding-left: 3mm; }
.pboard .fall { position: static; font-size: 7.5pt; padding: 1mm 2mm; }
.pweek { --namecol: 30mm; --head: 9mm; --laneh: 13mm; }
.pweek .week { grid-template-columns: var(--namecol) repeat(var(--days), minmax(0, 1fr)); }
.pweek .wh, .pweek .wcorner, .pweek .wname { position: static; }
.pweek .wh { font-size: 10pt; }
.pweek .wname { padding: 1mm 2mm; break-inside: avoid; }
.pweek .wname b { font-size: 10pt; }
.pweek .wname small { font-size: 7pt; }
.pweek .wrow { break-inside: avoid; }
.pweek .wjob { padding: .5mm 1.5mm; }
.pweek .wjob .jn { font-size: 8.5pt; }
.pweek .wjob .jt { font-size: 6.5pt; }
.pweek .wjob .h { display: none; }
.pfill { columns: 3; column-gap: 8mm; font-size: 9pt; }
.pfill section { break-inside: avoid; margin-bottom: 4mm; }
.pfill h2 { font-family: var(--f-display); font-size: 12pt; text-transform: uppercase; margin: 0 0 1mm; border-bottom: 1px solid #999; }
.pfill ul { margin: 0; padding-left: 5mm; }

@media (max-width: 640px) { :root { --colmin: 118px; --timecol: 50px; --namecol: 110px; --daymin: 120px; } .datelabel { width: 100%; order: 3; font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ================= Stahlbau: Projektakten ================= */
html:not(.layer-steel) .steelonly { display: none !important; }
.layer-steel .normonly, .layer-steel .nosteel, .layer-steel .choponly { display: none !important; }
.layer-steel .bar { box-shadow: inset 0 -4px 0 #2d6ea8; }
.layerchip.steelchip { background: #2d6ea8; }
.btn.steelbtn { border-color: #2d6ea8; color: #1f5487; font-weight: 600; }
@media (prefers-color-scheme: dark) { .btn.steelbtn { color: #8cc0ef; } }
.layer-steel .wrap { overflow: hidden; }
.sbc-blau { --sb-bg: var(--c-blau-bg); --sb-edge: var(--c-blau-edge); --sb-fg: var(--c-blau-fg); }
.sbc-gruen { --sb-bg: var(--c-gruen-bg); --sb-edge: var(--c-gruen-edge); --sb-fg: var(--c-gruen-fg); }
.sbc-orange { --sb-bg: var(--c-orange-bg); --sb-edge: var(--c-orange-edge); --sb-fg: var(--c-orange-fg); }
.sbc-rot { --sb-bg: var(--c-rot-bg); --sb-edge: var(--c-rot-edge); --sb-fg: var(--c-rot-fg); }
.sbc-violett { --sb-bg: var(--c-violett-bg); --sb-edge: var(--c-violett-edge); --sb-fg: var(--c-violett-fg); }
.sbc-grau { --sb-bg: var(--c-grau-bg); --sb-edge: var(--c-grau-edge); --sb-fg: var(--c-grau-fg); }
.sb { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100%; }
.sblist { border-right: 1px solid var(--line); background: var(--surface); overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.sbmain { overflow: auto; padding: 16px 20px 40px; min-width: 0; }
.sbtools { display: grid; grid-template-columns: 1fr auto; gap: 6px; position: sticky; top: -12px; background: var(--surface); padding: 12px 0 4px; margin-top: -12px; z-index: 1; }
.sbtools input, .sbtools select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
.sbcount { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sbcards { display: grid; gap: 8px; }
.sbcard { text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: 10px 12px; cursor: pointer; display: grid; gap: 4px; }
.sbcard:hover { border-color: var(--muted); }
.sbcard.sel { border-color: var(--ink); border-left-color: #2d6ea8; background: var(--surface); box-shadow: 0 0 0 1px var(--ink); }
.sbcl { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sbno { font-family: var(--f-mono); font-size: 13px; font-weight: 500; color: var(--muted); }
.sbct { font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 1.15; }
.sbcm, .sbcd { font-size: 13px; color: var(--muted); }
.sbcb { display: flex; flex-wrap: wrap; gap: 4px; }
.sbb { font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--c-grau-bg); color: var(--c-grau-fg); }
.sbb.bad { background: var(--c-rot-bg); color: var(--c-rot-fg); }
.sbpill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sb-bg); color: var(--sb-fg); border: 1px solid var(--sb-edge); white-space: nowrap; }
.sbnone { color: var(--muted); padding: 14px; border: 1px dashed var(--line); border-radius: 8px; line-height: 1.45; }
.sbmuted { color: var(--muted); }
.sbhead { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin-bottom: 14px; }
.sbtitle { flex: 1; min-width: 240px; }
.sbids { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 14px; color: var(--muted); }
.sbhead h2 { margin: 2px 0 0; font-family: var(--f-display); font-size: 30px; line-height: 1.1; text-transform: uppercase; }
.sbback { display: none; }
.sbinfo { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sbi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.45; display: grid; gap: 6px; align-content: start; }
.sbi.wide { grid-column: 1 / -1; background: var(--gap-bg); border-color: var(--gap-line); color: var(--gap-fg); }
.sbi h3 { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sbi.wide h3 { color: inherit; }
.sbi a { color: var(--focus); }
.sbaddr { margin-top: 4px; }
.sbk + .sbk { border-top: 1px solid var(--line-soft); padding-top: 6px; }
.sbtabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.sbtabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.sbtabs button[aria-selected=true] { color: var(--fg); border-bottom-color: #2d6ea8; }
.sbtabs small { font-weight: 500; font-family: var(--f-mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.sbbody { display: grid; gap: 12px; }
.sbcomp { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.sbcomp textarea { min-height: 84px; }
.sbcrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sbcrow .field { margin: 0; }
.sbcdate { width: 160px; }
.sbtypes { display: flex; flex-wrap: wrap; gap: 6px; }
.sbtype { display: inline-flex; align-items: center; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); cursor: pointer; font-size: 14px; user-select: none; }
.sbtype input { position: absolute; opacity: 0; pointer-events: none; }
.sbtype:has(input:checked) { background: var(--sb-bg); border-color: var(--sb-edge); color: var(--sb-fg); font-weight: 600; box-shadow: inset 0 0 0 1px var(--sb-edge); }
.sbtype:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.sbpend { display: flex; flex-wrap: wrap; gap: 6px; }
.sbchip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 3px 4px 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.sbchip button { border: 0; background: none; cursor: pointer; color: var(--danger); padding: 0 4px; }
.sbbusy { font-size: 13px; color: var(--muted); }
.sbhint { padding: 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sbfilter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sbf { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; height: 30px; padding: 0 10px; cursor: pointer; font-size: 13px; }
.sbf.on { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.sbf small { opacity: .7; margin-left: 2px; }
.sbonly { margin-left: auto; font-size: 14px; }
.sbtl { display: grid; gap: 8px; }
.sbday { margin: 10px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sbe { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--sb-edge); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; }
.sbeh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.sbeact { margin-left: auto; }
.sbet { line-height: 1.5; overflow-wrap: anywhere; }
.sbstate { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; }
.sbstate.open { background: var(--c-rot-edge); color: #fff; }
.sbstate.ok { background: var(--c-gruen-bg); color: var(--c-gruen-fg); }
.sbfiles { display: flex; flex-wrap: wrap; gap: 6px; }
.sbthumb { display: block; width: 110px; height: 82px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.sbthumb.small { width: 54px; height: 40px; }
.sbthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sbfile { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: inherit; text-decoration: none; font-size: 14px; }
.sbfile small { color: var(--muted); }
.sbtadd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sbtadd input, .sbtadd select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
.sbtadd #sb_ttitle { flex: 1 1 260px; }
.sbtasks { display: grid; gap: 6px; }
.sbtask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.sbtask .check { flex: 1 1 240px; font-weight: 500; }
.sbtask .check input { width: 18px; height: 18px; flex: none; }
.sbtask .sbmuted { font-size: 13px; }
.sbtask.late { border-left: 4px solid var(--danger); }
.sbtask.late .sbmuted { color: var(--danger); font-weight: 600; }
.sbtask.done .check span { text-decoration: line-through; color: var(--muted); }
.sbdone summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 6px 0; }
.sbdone .sbtask { margin-top: 6px; }
.sbdoc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.sbdn { flex: 1 1 200px; font-weight: 500; color: inherit; overflow-wrap: anywhere; }
.sbdoc .sbmuted { font-size: 13px; }
.sbdicon { width: 54px; text-align: center; font-size: 22px; }
.sbfromakte { display: grid; gap: 4px; font-size: 13px; }
.sbjobs { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.sbjobs th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.sbjobs td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.sbjobs tbody tr { cursor: pointer; }
.sbjobs tbody tr:hover { background: var(--surface-2); }
.sbkrows { display: grid; gap: 6px; }
.sbkrow { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1.2fr auto; gap: 6px; }
.sbkrow input { height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
.sbsugg { border: 0; background: none; padding: 0 0 0 6px; color: var(--focus); cursor: pointer; font: inherit; text-transform: none; letter-spacing: 0; font-weight: 500; }
.sbsugg:empty { display: none; }
@media (max-width: 900px) {
  .sb { grid-template-columns: 1fr; }
  .sb.has-sel .sblist { display: none; }
  .sb:not(.has-sel) .sbmain { display: none; }
  .sblist { border-right: 0; }
  .sbmain { padding: 12px 12px 40px; }
  .sbback { display: inline-flex; }
  .sbhead { align-items: flex-start; }
  .sbhead h2 { font-size: 24px; }
  .sbkrow { grid-template-columns: 1fr 1fr; }
  .sbonly { margin-left: 0; }
  .sbjobs { font-size: 13px; }
  .sbjobs th:nth-child(5), .sbjobs td:nth-child(5) { display: none; }
}
/* Akte drucken */
.psb { font-size: 9.5pt; }
.psb h2 { font-family: var(--f-display); font-size: 13pt; text-transform: uppercase; margin: 5mm 0 2mm; border-bottom: 1px solid #000; }
.psbinfo { border-collapse: collapse; width: 100%; }
.psbinfo th { text-align: left; width: 34mm; vertical-align: top; padding: 1mm 2mm 1mm 0; font-weight: 600; color: #333; }
.psbinfo td { padding: 1mm 0; vertical-align: top; border-bottom: 1px dotted #bbb; }
.psbopen { margin: 0; padding-left: 5mm; }
.psbe { border-bottom: 1px solid #ccc; padding: 2mm 0; break-inside: avoid; }
.psbeh { display: flex; gap: 2mm; }
.psbeh span { margin-left: auto; color: #555; }
.psbet { margin-top: 1mm; line-height: 1.4; }
.psbf { font-size: 8pt; color: #444; margin-top: 1mm; }
.psbimg { display: flex; flex-wrap: wrap; gap: 2mm; margin-top: 1.5mm; }
.psbimg img { width: 42mm; height: 31mm; object-fit: cover; border: 1px solid #999; }
.page.psb { break-after: auto; }
.field .check input[type=checkbox] { width: 18px; height: 18px; flex: none; }
a.btn { text-decoration: none; color: inherit; }
.sbi > div > div + div { margin-top: 6px; }

/* Häckselauftrag im Tagesplan: fehlende Wagen gut sichtbar */
.job .chopwarn { align-self: flex-start; max-width: 100%; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.25; border-radius: 4px; padding: 2px 6px; margin: 1px 0 2px; overflow-wrap: anywhere; }
@media print { .job .chopwarn { background: #fff; color: #000; border: 2px solid #000; } }

/* ================= Startmenü und Bereiche ================= */
.home .normonly, .home .nosteel, .home .nohome, .home .choponly, .home .steelonly { display: none !important; }
html:not(.layer-plan) .planonly, html:not(.layer-hours) .hoursonly { display: none !important; }
.layer-hours .normonly, .layer-hours .nosteel, .layer-hours .choponly { display: none !important; }
.layerchip.planchip { background: var(--ink); color: var(--ink-fg); }
.layerchip.hourschip { background: #6a47a6; }
.layer-hours .bar { box-shadow: inset 0 -4px 0 #6a47a6; }
.layer-hours .wrap { overflow: hidden; }
/* Werkstatt: gleiche Akte wie Stahlbau, andere Farbe */
.area-werkstatt .bar { box-shadow: inset 0 -4px 0 #bb3636; }
.area-werkstatt .layerchip.steelchip { background: #bb3636; }
.area-werkstatt .sbcard.sel { border-left-color: #bb3636; }
.area-werkstatt .sbtabs button[aria-selected=true] { border-bottom-color: #bb3636; }

.hm { max-width: 1040px; margin: 0 auto; padding: 28px 20px 40px; display: grid; gap: 22px; }
.hhead h1 { margin: 2px 0 0; font-family: var(--f-display); font-size: 38px; line-height: 1.05; text-transform: uppercase; letter-spacing: .01em; }
.hdate { color: var(--muted); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.htiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.htile { --tc: var(--ink); text-align: left; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; min-height: 150px; padding: 20px 22px; border: 1px solid var(--line); border-left: 8px solid var(--tc); border-radius: 10px; background: var(--surface); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.htile:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-1px); border-color: var(--muted); border-left-color: var(--tc); }
.htile:active { transform: none; }
.htile.t-plan { --tc: var(--signal); }
.htile.t-steel { --tc: #2d6ea8; }
.htile.t-shop { --tc: #bb3636; }
.htile.t-mach { --tc: #2c8648; }
.htile.t-mpark { --tc: #5b7a2e; }
.htile.t-adm { --tc: #6a7480; }
.htile.t-hours { --tc: #6a47a6; }
.hicon { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-size: 34px; background: color-mix(in srgb, var(--tc) 16%, transparent); color: var(--tc); }
.htile.t-plan .hicon { color: var(--fg); }
.htxt { display: grid; gap: 6px; min-width: 0; }
.hname { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1; text-transform: uppercase; letter-spacing: .02em; }
.hdesc { color: var(--muted); font-size: 15px; line-height: 1.4; }
.hstats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; font-weight: 500; }
.hbad { color: var(--danger); }
.hwarn { color: #b06d00; }
@media (prefers-color-scheme: dark) { .hwarn { color: var(--signal); } }
.harrow { font-size: 38px; color: var(--muted); font-weight: 300; }
.hlinks { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) {
  .htiles { grid-template-columns: 1fr; }
  .htile { min-height: 0; padding: 16px; gap: 14px; }
  .hicon { width: 52px; height: 52px; font-size: 28px; }
  .hname { font-size: 26px; }
  .hhead h1 { font-size: 30px; }
  .hm { padding: 18px 14px 32px; }
}

/* ================= Stundenerfassung ================= */
.hr { display: grid; grid-template-columns: 400px minmax(0, 1fr); height: 100%; }
.hrside { border-right: 1px solid var(--line); background: var(--surface); overflow: auto; padding: 16px; }
.hrmain { overflow: auto; padding: 16px 20px 40px; min-width: 0; display: grid; gap: 14px; align-content: start; }
.hrform { display: grid; gap: 12px; }
.hrform h2 { margin: 0; font-family: var(--f-display); font-size: 26px; text-transform: uppercase; }
.hrform .field input, .hrform .field select { height: 42px; }
.hrwho { color: var(--muted); }
.hrwho b { color: var(--fg); }
.hrtimes { display: grid; grid-template-columns: 1fr 1fr 104px; gap: 8px; }
.hrtimes > * { min-width: 0; }
.hrtimes input { min-width: 0; width: 100%; }
.hrsum { font-size: 17px; min-height: 22px; }
.hrsugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.hrsugg .sbf { height: auto; min-height: 30px; padding: 4px 10px; text-align: left; }
.hrbtns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hrnav { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.hrnav select { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); max-width: 100%; }
.hrlabel { font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.hrtotal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 12px 14px; border-radius: 8px; background: var(--ink); color: var(--ink-fg); }
.hrtotal b { font-family: var(--f-display); font-size: 28px; }
.hrtotal .sbmuted { color: inherit; opacity: .7; }
.hrdays { display: grid; gap: 8px; }
.hrday { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.hrday.today { border-color: #6a47a6; box-shadow: 0 0 0 1px #6a47a6; }
.hrday h4 { margin: 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--surface-2); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.hrday h4 span:first-child { flex: 1; }
.hrday h4 span:nth-child(2) { font-family: var(--f-mono); }
.hrday h4 .btn { height: 26px; width: 30px; justify-content: center; padding: 0; }
.hrrow { display: grid; grid-template-columns: 140px 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.hrrow.sel { background: color-mix(in srgb, #6a47a6 12%, transparent); }
.hrtime { font-family: var(--f-mono); font-size: 13px; display: grid; }
.hrtime small { color: var(--muted); font-size: 11px; }
.hrh { font-weight: 600; font-family: var(--f-mono); text-align: right; }
.hrwhat { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-width: 0; }
.hrnote { color: var(--muted); overflow-wrap: anywhere; }
.hrempty { padding: 7px 10px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line-soft); }
.hrpill { display: inline-block; font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--c-grau-bg); color: var(--c-grau-fg); border: 1px solid var(--c-grau-edge); overflow-wrap: anywhere; }
.hrpill small { font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: .05em; opacity: .8; }
.hrpill.a-stahlbau { background: var(--c-blau-bg); color: var(--c-blau-fg); border-color: var(--c-blau-edge); }
.hrpill.a-werkstatt { background: var(--c-rot-bg); color: var(--c-rot-fg); border-color: var(--c-rot-edge); }
.hrbox h3 { margin: 6px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hrtable td.num { text-align: right; font-family: var(--f-mono); font-weight: 600; white-space: nowrap; width: 1%; }
.hrtable tr:not([data-hrproj]) { cursor: default; }
.hrwholist { font-size: 12px; margin-top: 3px; }
.hrper { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 900px) {
  .layer-hours .wrap { overflow: auto; }
  .hr { grid-template-columns: 1fr; height: auto; }
  .hrside { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .hrmain { overflow: visible; padding: 14px 12px 40px; }
  .hrrow { grid-template-columns: 96px 54px minmax(0, 1fr) auto; gap: 8px; }
}

/* ================= Maschinen, Bereiche, Mitarbeiter & Rechte ================= */
html:not(.layer-mach) .machonly, html:not(.layer-mpark) .mparkonly, html:not(.layer-admin) .admonly { display: none !important; }
.layer-mach .normonly:not(.seg), .layer-mach .choponly { display: none !important; }
.layer-mpark .normonly, .layer-mpark .nosteel, .layer-mpark .choponly, .layer-admin .normonly, .layer-admin .nosteel, .layer-admin .choponly { display: none !important; }
.layerchip.machchip { background: #2c8648; }
.layerchip.admchip { background: #6a7480; }
.layer-mach .bar, .layer-mpark .bar { box-shadow: inset 0 -4px 0 #2c8648; }
.layer-admin .bar { box-shadow: inset 0 -4px 0 #6a7480; }
select.btn { padding: 0 8px; }
/* Maschinen-Kalender */
.mboard { --head: 54px; --colmin: 120px; }
.mhead { flex-direction: column; gap: 0; line-height: 1.1; justify-content: center; }
.mhead .mcat { font-family: var(--f-body); font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.mhead .mname { display: flex; align-items: center; gap: 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdot { width: 10px; height: 10px; border-radius: 50%; background: var(--sb-edge); flex: none; display: inline-block; }
.col.moff { background-image: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--line) 45%, transparent) 10px 12px), linear-gradient(var(--line) 1px, transparent 1px); background-size: auto, 100% calc(var(--slot) * 4); }
.mjob { cursor: pointer; }
.mjob .mkind { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.wjob.mjob .mkind { font-size: 10px; }
.mweek .wname small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mweek .wname .moffl { color: var(--danger); text-transform: none; letter-spacing: 0; }
.wrow.moff { background-image: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--line) 40%, transparent) 10px 12px); }
.job .jm, .wjob .jm { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
/* Maschinenpark */
.layer-mpark .wrap { overflow: hidden; }
.mp { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100%; }
.mpside { border-right: 1px solid var(--line); background: var(--surface); overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mpmain { overflow: auto; padding: 16px 20px 40px; min-width: 0; display: grid; gap: 14px; align-content: start; }
.mpgroup { display: grid; gap: 6px; }
.mpgroup h3 { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mpgroup h3 .n { font-family: var(--f-mono); font-weight: 400; }
.mpgroup h3 .pgb { margin-left: auto; width: 26px; height: 26px; font-size: 16px; }
.mpcard { text-align: left; border: 1px solid var(--line); border-left: 4px solid #2c8648; border-radius: 8px; background: var(--surface-2); padding: 8px 10px; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.mpcard:hover { border-color: var(--muted); border-left-color: #2c8648; }
.mpcard.sel { background: var(--surface); box-shadow: 0 0 0 1px var(--ink); border-color: var(--ink); border-left-color: #2c8648; }
.mpn { font-family: var(--f-display); font-weight: 600; font-size: 18px; line-height: 1.1; }
.mpm { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.mpm:empty { display: none; }
.mphead { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.mphead h2 { margin: 2px 0 6px; font-family: var(--f-display); font-size: 30px; line-height: 1.1; text-transform: uppercase; }
.mpinfo { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 14px; }
.mpinfo > div + div { margin-top: 0 !important; }
.mpsec { display: grid; gap: 8px; }
.mpsec > h3 { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mpuses { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.mpuse { text-align: left; display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--edge); border-left-width: 4px; border-radius: 6px; background: var(--jbg); color: var(--jfg); cursor: pointer; }
.mpuse .jt { font-family: var(--f-mono); font-size: 12px; }
.mpuse small { opacity: .85; }
.sbents { display: grid; gap: 8px; }
@media (max-width: 900px) {
  .mp { grid-template-columns: 1fr; }
  .mp.has-sel .mpside { display: none; }
  .mp:not(.has-sel) .mpmain { display: none; }
  .mpside { border-right: 0; }
  .mpmain { padding: 12px 12px 40px; }
}
.mcatlist { display: grid; gap: 6px; }
.mcatrow { display: grid; grid-template-columns: minmax(0, 1fr) 210px auto auto auto auto; gap: 6px; align-items: center; }
.mcatrow input, .mcatrow select { height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
@media (max-width: 700px) { .mcatrow { grid-template-columns: 1fr auto auto; } .mcatrow select { grid-column: 1 / -1; } }
/* Auftrag: Bereich und Maschinen */
.areapick { display: flex; flex-wrap: wrap; gap: 6px; }
.apick { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1px solid var(--line); border-left: 6px solid var(--edge); border-radius: 6px; background: var(--surface-2); cursor: pointer; font-weight: 600; user-select: none; }
.apick input { position: absolute; opacity: 0; pointer-events: none; }
.apick:has(input:checked) { background: var(--jbg); color: var(--jfg); border-color: var(--edge); box-shadow: inset 0 0 0 1px var(--edge); }
.apick:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.apick:has(input:disabled) { cursor: default; }
.mslots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.mslot { display: grid; gap: 4px; }
.mslot > span { font-size: 13px; font-weight: 600; }
.mslot select { height: 40px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); padding: 0 8px; min-width: 0; }
.mslot small { font-size: 12px; color: var(--muted); }
.chophint { padding: 10px 12px; border-radius: 6px; background: var(--c-gruen-bg); color: var(--c-gruen-fg); border: 1px solid var(--c-gruen-edge); }
/* Mitarbeiter & Rechte */
.adm { flex: 1; min-height: 0; overflow: auto; }
.admin { max-width: 1100px; margin: 0 auto; padding: 20px 20px 90px; display: grid; gap: 14px; }
.admhead h1 { margin: 0 0 8px; font-family: var(--f-display); font-size: 32px; text-transform: uppercase; }
.admhead .sbtabs button[aria-selected=true] { border-bottom-color: #6a7480; }
.admin section { display: grid; gap: 10px; align-content: start; }
.admintro { color: var(--muted); line-height: 1.5; font-size: 14px; }
.admintro b { color: var(--fg); }
.admfoot { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); }
.admin .staffrow { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.slbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 64px; }
.staffrow .pwline .achk { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-soft); }
.achk.a-lohn:has(input:checked) { background: var(--c-gruen-bg); border-color: var(--c-gruen-edge); color: var(--c-gruen-fg); }
.achk.a-stahlbau:has(input:checked) { background: var(--c-blau-bg); border-color: var(--c-blau-edge); color: var(--c-blau-fg); }
.achk.a-werkstatt:has(input:checked) { background: var(--c-rot-bg); border-color: var(--c-rot-edge); color: var(--c-rot-fg); }
.typelist { display: grid; gap: 10px; }
.typecard { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c-grau-edge); border-radius: 8px; padding: 10px; display: grid; gap: 8px; }
.typecard.a-lohn { border-left-color: var(--c-gruen-edge); } .typecard.a-stahlbau { border-left-color: var(--c-blau-edge); } .typecard.a-werkstatt { border-left-color: var(--c-rot-edge); }
.typerow { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto auto auto; gap: 6px; align-items: center; }
.typerow input, .typerow select, .slotrow input { height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
.typerow input { font-weight: 600; }
.slots { display: grid; gap: 6px; padding-left: 10px; border-left: 2px solid var(--line-soft); }
.slotrow { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.slotcats { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 14px; padding-top: 6px; }
.slotcats input { width: 16px; height: 16px; margin: 0; }
@media (max-width: 760px) { .typerow { grid-template-columns: 1fr auto auto; } .typerow select { grid-column: 1 / -1; } .slotrow { grid-template-columns: 1fr auto; } .slotcats { grid-column: 1 / -1; } }

/* ---------- Kunde im Auftrag (30-kunden.js) ---------- */
.custpick { display: grid; gap: 6px; position: relative; }
.custsearch { display: flex; gap: 6px; }
.custsearch input { flex: 1; }
.custsearch .btn { height: 38px; white-space: nowrap; }
.custsel { display: flex; gap: 10px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-left: 4px solid var(--focus); border-radius: 6px; background: var(--surface-2); padding: 7px 10px; }
.custsel b { display: block; }
.custsel small, .custopt small { display: block; color: var(--muted); font-size: 12.5px; }
.custlist { position: absolute; top: 42px; left: 0; right: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-height: 300px; overflow: auto; }
.custopt { padding: 8px 10px; cursor: pointer; border-top: 1px solid var(--line-soft, var(--line)); }
.custopt:first-child { border-top: 0; }
.custopt[aria-selected=true], .custopt:hover { background: color-mix(in srgb, var(--focus) 12%, transparent); }
.custopt.new b { color: var(--focus); font-weight: 600; }
.custnew { display: grid; gap: 8px; border: 1px dashed var(--line); border-radius: 6px; padding: 10px; background: var(--surface-2); }
.custnew .field input { background: var(--surface); }
.custnew .group { justify-content: flex-end; }
/* Weitere Maschinen */
.mslot .mrow { display: flex; gap: 6px; }
.mslot .mrow select { flex: 1; }
/* Reiter «Kunden» */
.custtools { display: flex; gap: 8px; max-width: 760px; }
.custtools input { flex: 1; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
.custtable { display: grid; gap: 6px; max-width: 760px; }
.custrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 90px auto; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.custrow input { height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); min-width: 0; }
.custrow input[data-cu=name] { font-weight: 600; }
.cucount { font-size: 12px; color: var(--muted); text-align: right; }
@media (max-width: 640px) { .custrow { grid-template-columns: 1fr auto; } .custrow input[data-cu=address] { grid-column: 1; } .cucount { grid-column: 2; grid-row: 2; } .custsearch { flex-wrap: wrap; } }

/* ---------- Kunden-Seite (#kunden) ---------- */
html:not(.layer-cust) .custonly { display: none !important; }
.layer-cust .normonly, .layer-cust .nosteel, .layer-cust .choponly { display: none !important; }
.layerchip.custchip { background: #7a4f9e; }
.layer-cust .bar { box-shadow: inset 0 -4px 0 #7a4f9e; }
.layer-cust .wrap { overflow: hidden; }
.htile.t-cust { --tc: #7a4f9e; }
.sb.cu .sbcard.sel { border-left-color: #7a4f9e; }
.cucard.cu-stahlbau { border-left-color: #2d6ea8; } .cucard.cu-lohn { border-left-color: #2c8648; }
.cucard .sbcl { justify-content: flex-start; }
.cuarea { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 8px; padding: 1px 6px; border-radius: 999px; background: var(--sb-bg, var(--surface-2)); color: var(--sb-fg, var(--muted)); }
.cujobs { display: grid; gap: 6px; }
.cujob { display: flex; gap: 8px; align-items: stretch; border: 1px solid var(--line); border-left: 4px solid var(--c-grau-edge); border-radius: 8px; background: var(--surface); }
.cujob.a-lohn { border-left-color: var(--c-gruen-edge); } .cujob.a-stahlbau { border-left-color: var(--c-blau-edge); } .cujob.a-werkstatt { border-left-color: var(--c-rot-edge); }
.cujmain { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 8px 10px; display: grid; gap: 2px; cursor: pointer; color: inherit; }
.cujmain:hover b { text-decoration: underline; }
.cujmain .jt { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.cujmain small { color: var(--muted); }
.cujside { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; justify-content: center; padding: 8px 10px; }
.cujref { border: 0; background: color-mix(in srgb, var(--focus) 12%, transparent); color: var(--focus); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .cujob { flex-direction: column; } .cujside { flex-direction: row; justify-content: space-between; align-items: center; padding-top: 0; } }

/* ---------- Ordner in den Projektlisten ---------- */
.sbcount { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sbfold { display: flex; align-items: center; gap: 4px; margin-top: 4px; border-radius: 6px; }
.sbfold.edit input { flex: 1; height: 34px; padding: 0 8px; border: 1px solid var(--focus); border-radius: 6px; background: var(--surface); font-weight: 600; min-width: 0; }
.sbftog { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 4px; cursor: pointer; text-align: left; color: inherit; }
.sbftog .sbfi { width: 12px; color: var(--muted); }
.sbftog .sbfn { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbfold.none .sbfn { font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.sbftog .n { font-family: var(--f-mono); font-size: 12px; color: var(--muted); margin-left: auto; padding-right: 4px; }
.sbfold .pgb { width: 26px; height: 26px; font-size: 13px; flex: none; }
.sbfitems { display: grid; gap: 8px; padding-left: 10px; border-left: 2px solid var(--line); margin-left: 6px; min-height: 8px; }
.sbfold.none + .sbfitems { border-left-color: transparent; }
.sbfempty { font-size: 13px; color: var(--muted); padding: 4px 2px; }
.dropon { background: color-mix(in srgb, var(--focus) 14%, transparent); outline: 2px dashed var(--focus); outline-offset: 2px; }
.sbcard.dragging { opacity: .45; }
.sbmvf { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sbmvf select { height: 36px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); padding: 0 8px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--fg); max-width: 220px; }

/* ---------- Maschinenpark: Steckbrief ---------- */
.mpcardbig { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid #2c8648; border-radius: 10px; padding: 14px 16px; display: grid; gap: 12px; }
.mpcardbig .mphead h2 { margin-bottom: 0; }
.mpsteck { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border-top: 1px solid var(--line); }
.mprow { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line-soft, var(--line)); align-items: baseline; }
.mprow dt, .mpnote dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mprow dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mpnote { display: grid; gap: 4px; }
.mpnote dd { margin: 0; line-height: 1.45; }
.mpsec > h3 .n { font-family: var(--f-mono); font-weight: 400; margin-left: 4px; }
.mpcard .mpm { flex-basis: 100%; }
.sb.cu .sbtools { grid-template-columns: 1fr; display: grid; }

/* ---------- Allgemeine Hinweise im Tagesplan (31-hinweise.js) ---------- */
.gnlbl { position: sticky; left: 0; z-index: 4; background: var(--gap-bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; align-items: flex-end; padding: 4px 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gap-fg); min-width: 0; }
.gnlbl.wk { align-items: flex-start; font-family: var(--f-display); font-size: 16px; letter-spacing: .02em; }
.gnlbl.wk small { font-family: var(--f-body); font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .8; }
.gnrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; background: var(--gap-bg); border-bottom: 1px solid var(--line); min-height: 40px; }
.gnwrow { position: relative; background: var(--gap-bg); border-bottom: 1px solid var(--line); }
.gnchip { background: var(--surface); border: 1px solid var(--gap-line); border-left: 4px solid var(--signal); border-radius: 6px; padding: 4px 10px; font-weight: 600; font-size: 14px; line-height: 1.3; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.gnchip small { margin-left: 8px; font-family: var(--f-mono); font-size: 11px; font-weight: 400; color: var(--muted); }
.gnchip.imp { border-left-color: var(--danger); color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.gnwrow .gnchip { position: absolute; height: 26px; padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.gnadd { border: 1px dashed var(--gap-line); background: transparent; color: var(--gap-fg); border-radius: 6px; padding: 4px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.gnadd:hover { border-style: solid; background: var(--surface); }
.gnadd.wk { position: absolute; bottom: 3px; padding: 0 8px; height: 22px; font-size: 13px; opacity: .55; }
.gnadd.wk:hover { opacity: 1; }
.ro .gnchip, .monitor .gnchip { cursor: default; }
.monitor .gnchip { font-size: clamp(14px, 1.2vw, 20px); }
.monitor .gnwrow .gnchip { height: auto; }
@media print { .gnadd { display: none !important; } .gnrow, .gnwrow, .gnlbl { background: #fff; } .gnchip { border-color: #000; } }

/* ---------- Kunden: Adresse in Einzelfeldern ---------- */
.cuplz { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.cublock { white-space: normal; line-height: 1.45; }
.custsel .cublock { font-size: 14px; }
.custsel .cublock br:first-child { display: block; }
.sbday.cuh { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.sbday.cuh .btn { margin-left: auto; }
.cujob.a-rent { border-left-color: #cc6a0c; }
.gnlbl:not(.wk) { align-items: center; padding: 4px 2px; letter-spacing: .02em; }
