*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
:root{
  --bg0:#f0f2f5;--bg1:#e8eaed;--bg2:#ffffff;--bg3:#dde1e7;--bg4:#d0d4db;
  --text0:#111111;--text1:#222222;--text2:#444444;--text3:#888888;
  --border:#c9d2dc;--border2:#9aa5b1;
  --hdr-bg:#1e2235;
  --p-green:#16a34a;--p-red:#dc2626;--p-blue:#2563eb;--p-yellow:#d97706;
  --p-lav:#7c3aed;--p-mint:#0f9d8e;--p-rose:#e11d48;--p-sky:#0284c7;
  --hdr-h:58px;
  --font-ui:'Inter',sans-serif;
  --font-mono:'JetBrains Mono',monospace;
}
html{font-size:15px;font-family:var(--font-ui);background:var(--bg0);color:var(--text0);}
body{margin:0;}

/* ── HEADER ─────────────────────────────────────────────────── */
.hdr{position:sticky;top:0;z-index:200;height:var(--hdr-h);background:var(--hdr-bg);
  border-bottom:1px solid rgba(255,255,255,.1);display:flex;align-items:center;
  padding:0 18px;gap:16px;}
/* ── DATUM IM HEADER ────────────────────────────────────────── */
.hdr-datum{display:flex;align-items:center;gap:8px;margin-left:auto;margin-right:8px;
  padding:6px 14px;background:rgba(255,255,255,.1);border-radius:5px;
  border:1px solid rgba(255,255,255,.15);}
.hdr-datum-tag{font-family:var(--font-mono);font-size:14px;font-weight:800;
  color:#ffffff;letter-spacing:.02em;white-space:nowrap;}
.hdr-datum-sep{color:rgba(255,255,255,.4);font-size:13px;font-weight:400;}
.hdr-datum-kw{font-family:var(--font-mono);font-size:14px;font-weight:800;
  color:#93c5fd;white-space:nowrap;letter-spacing:.03em;}
.logo-wrap{display:flex;align-items:center;gap:10px;margin-right:8px;}
.logo-icon{width:32px;height:32px;background:linear-gradient(135deg,#3b82f6,#8b5cf6);
  border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;}
.logo-title{font-size:15px;font-weight:800;color:#e8f0ff;letter-spacing:.06em;}
.logo-sub{font-size:8.9px;color:rgba(200,210,240,.6);letter-spacing:.08em;margin-top:1px;}
.tabs{display:flex;gap:4px;flex:1;}
.tab{font-family:var(--font-ui);font-size:12px;font-weight:700;letter-spacing:.08em;
  border:none;cursor:pointer;padding:7px 14px;border-radius:4px;
  background:rgba(255,255,255,.08);color:rgba(200,220,255,.7);
  transition:all .15s;text-transform:uppercase;}
.tab:hover{background:rgba(255,255,255,.15);color:#fff;}
.tab.active{background:rgba(255,255,255,.18);color:#ffffff;}
.hdr-right{display:flex;align-items:center;gap:8px;}
.btn-new{font-family:var(--font-ui);font-size:12px;font-weight:800;
  background:#16a34a;color:#fff;border:none;cursor:pointer;
  padding:8px 16px;border-radius:4px;letter-spacing:.06em;
  display:flex;align-items:center;gap:6px;}
.btn-new:hover{background:#15803d;}
.btn-refresh{font-family:var(--font-ui);font-size:11px;font-weight:700;
  background:rgba(255,255,255,.1);color:#c8d4e8;border:1px solid rgba(255,255,255,.15);
  cursor:pointer;padding:6px 12px;border-radius:4px;display:flex;align-items:center;gap:7px;
  transition:all .2s;}
.btn-refresh:hover{background:rgba(255,255,255,.18);color:#fff;}
.btn-refresh.connected{background:rgba(34,197,94,.18);border-color:rgba(34,197,94,.45);color:#86efac;}
.btn-refresh.connected:hover{background:rgba(34,197,94,.28);color:#bbf7d0;}
.btn-refresh.disconnected{background:rgba(239,68,68,.18);border-color:rgba(239,68,68,.4);color:#fca5a5;}
.btn-refresh.disconnected:hover{background:rgba(239,68,68,.28);color:#fecaca;}
.conn-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;transition:background .3s;}
.conn-dot.on{background:#22c55e;box-shadow:0 0 6px rgba(34,197,94,.7);}
.conn-dot.off{background:#ef4444;box-shadow:0 0 6px rgba(239,68,68,.6);}
.conn-dot.checking{background:#f59e0b;animation:connPulse .8s ease-in-out infinite;}
@keyframes connPulse{0%,100%{opacity:1;transform:scale(1);}50%{opacity:.5;transform:scale(.8);}}
.btn-excel-sicherung{font-family:var(--font-ui);font-size:12px;font-weight:800;
  background:#1d6f42;color:#fff;border:none;cursor:pointer;
  padding:8px 14px;border-radius:4px;letter-spacing:.05em;
  display:flex;align-items:center;gap:6px;transition:background .15s;}
.btn-excel-sicherung:hover{background:#155232;}
.btn-excel-sicherung:active{transform:scale(.97);}
.spin{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.3);
  border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}



/* ── DRUCKVARIANTE PROJEKTMELDUNG ─────────────────────────── */
@page{size:A4 landscape;margin:10mm;}
@media print{
  html,body{background:#fff !important;width:auto;height:auto;overflow:visible !important;}
  body *{visibility:hidden !important;}
  .overlay,.overlay *{visibility:visible !important;}
  .overlay{position:static !important;inset:auto !important;padding:0 !important;margin:0 !important;background:#fff !important;}
  .form-panel{width:100% !important;max-width:none !important;max-height:none !important;height:auto !important;border:none !important;border-radius:0 !important;box-shadow:none !important;overflow:visible !important;}
  .form-tbar,.del-acts,.btn,.btn-new,.btn-refresh,.tabs,.hdr,.filter-bar,.main>.tab-pane:not(.active),#toast,.searchhelp-toggle,.searchhelp-box{display:none !important;}
  .form-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px !important;}
  .form-col-span-2,.form-col-span-3,.full{grid-column:1 / -1 !important;}
  .notiz-editor,#notiz-editor,.rich-editor,.form-panel textarea{min-height:120px !important;max-height:none !important;overflow:visible !important;}
  input,select,textarea,.inp,.sel,.form-panel [contenteditable="true"]{border:1px solid #c9d2dc !important;background:#fff !important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}

/* ── MAIN ───────────────────────────────────────────────────── */
.main{padding:14px 18px;width:100%;}
.tab-pane{display:none;}
.tab-pane.active{display:block;}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn{font-family:var(--font-ui);font-size:13px;font-weight:600;letter-spacing:.04em;
  border:none;cursor:pointer;display:inline-flex;align-items:center;gap:6px;
  padding:7px 14px;border-radius:4px;transition:all .15s;}
.btn-primary{background:#2563eb;color:#fff;}
.btn-primary:hover{background:#1d4ed8;}
.btn-ghost{background:rgba(0,0,0,.06);color:var(--text1);border:1px solid var(--border);}
.btn-ghost:hover{background:rgba(0,0,0,.1);}
.btn-edit{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;font-size:12px;padding:4px 9px;}
.btn-edit:hover{background:#dbeafe;}
.btn-danger{background:#fef2f2;color:#dc2626;border:1px solid #fecaca;font-size:12px;padding:4px 8px;}
.btn-danger:hover{background:#fee2e2;}
.btn-mint{background:#16a34a;color:#fff;}
.btn-mint:hover{background:#15803d;}
.btn-qf{font-family:var(--font-ui);font-size:11px;font-weight:700;letter-spacing:.04em;
  background:#f7f9fc;color:#52606d;border:1px solid #d8e0ea;
  cursor:pointer;padding:7px 12px;border-radius:18px;transition:all .15s;display:flex;align-items:center;gap:5px;min-height:34px;}
.btn-qf:hover{background:#eef2f7;border-color:#bcc8d6;color:#334155;}
.btn-qf.active{background:#1e2235;color:#e8f0ff;border-color:#1e2235;box-shadow:0 2px 6px rgba(30,34,53,.2);}

/* ── FILTER BAR ─────────────────────────────────────────────── */
.filter-bar{background:#fff;border:1px solid var(--border);border-radius:10px;
  padding:14px 16px 12px;margin-bottom:10px;box-shadow:0 1px 3px rgba(0,0,0,.04);}
.filter-row1{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:10px;}
.filter-row2{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding-top:2px;}
.search-wrap{display:flex;align-items:center;background:#fff;border:1px solid var(--border);
  border-radius:8px;height:42px;min-width:260px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.03);}
.search-wrap.search-wrap-main{flex:0 1 360px;max-width:420px;}
.search-wrap:focus-within{border-color:var(--p-blue);box-shadow:0 0 0 3px rgba(37,99,235,.12);}
.btn-search-clear{display:none;align-items:center;justify-content:center;
  width:28px;height:28px;margin-right:7px;flex-shrink:0;
  background:#dc2626;color:#fff;border:none;border-radius:50%;
  cursor:pointer;font-size:14px;font-weight:900;line-height:1;
  transition:background .12s,transform .12s,box-shadow .12s;
  box-shadow:0 2px 6px rgba(220,38,38,.35);}
.btn-search-clear:hover{background:#b91c1c;transform:scale(1.08);box-shadow:0 4px 10px rgba(220,38,38,.35);}
.btn-search-clear.visible{display:flex;}
.search-ico{width:38px;height:100%;display:flex;align-items:center;justify-content:center;color:#7b8794;flex-shrink:0;}
.inp-search{flex:1;background:transparent;border:none;outline:none;
  font-family:var(--font-ui);font-size:14px;color:var(--text0);padding:0 12px 0 0;}
.inp-search::placeholder{color:#8a94a6;}
.filter-sel{font-family:var(--font-ui);font-size:13px;color:var(--text0);
  background:#fff;border:1px solid var(--border);border-radius:8px;
  padding:5px 12px;height:42px;cursor:pointer;min-width:170px;box-shadow:0 1px 2px rgba(0,0,0,.03);}
.filter-sel:focus{outline:none;border-color:var(--p-blue);box-shadow:0 0 0 3px rgba(37,99,235,.12);}
/* ── KUNDENSTAMM AUTOFILL ───────────────────────────────────── */
.ks-search-wrap{position:relative;}
.ks-inp{font-family:var(--font-ui);background:#fff;border:1px solid #b0b8c8;
  color:#111;padding:8px 11px;font-size:13px;border-radius:4px;width:100%;outline:none;}
.ks-inp:focus{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.15);}
.ks-dropdown{position:absolute;top:calc(100% + 3px);left:0;right:0;
  background:#fff;border:1px solid #b0b8c8;border-radius:5px;
  box-shadow:0 8px 24px rgba(0,0,0,.15);z-index:600;max-height:260px;overflow-y:auto;}
.ks-item{padding:9px 12px;cursor:pointer;border-bottom:1px solid #f0f2f5;
  display:flex;flex-direction:column;gap:1px;transition:background .1s;}
.ks-item:last-child{border-bottom:none;}
.ks-item:hover{background:#eff6ff;}
.ks-item-name{font-size:13px;font-weight:700;color:#111;}
.ks-item-detail{font-size:11px;color:#666;}
.ks-item-badge{display:inline-block;font-size:8.9px;font-weight:700;
  background:#dbeafe;color:#1d4ed8;padding:1px 6px;border-radius:10px;margin-left:4px;}
.ks-no-result{padding:10px 12px;font-size:12px;color:#888;font-style:italic;}
/* Settings Kundenstamm Panel */
.ks-entry{display:flex;align-items:center;gap:8px;padding:8px 12px;
  border-bottom:1px solid var(--border);font-size:12px;}
.ks-entry:last-child{border-bottom:none;}
.ks-entry-name{font-weight:700;color:#111;min-width:120px;}
.ks-entry-info{color:#555;flex:1;font-size:11px;}
.ks-entry-del{background:#fef2f2;border:1px solid #fca5a5;color:#dc2626;cursor:pointer;
  font-size:12px;font-weight:700;padding:3px 9px;border-radius:4px;
  transition:all .12s;white-space:nowrap;}
.ks-entry-del:hover{background:#fee2e2;border-color:#f87171;}
.ks-entry-edit{background:#eff6ff;border:1px solid #bfdbfe;color:#1d4ed8;cursor:pointer;
  font-size:12px;font-weight:700;padding:3px 9px;border-radius:4px;
  transition:all .12s;white-space:nowrap;margin-right:4px;}
.ks-entry-edit:hover{background:#dbeafe;border-color:#93c5fd;}
.ks-import-area{border:2px dashed #c7d4f8;border-radius:6px;padding:14px;
  text-align:center;font-size:12px;color:#555;cursor:pointer;
  transition:all .15s;background:#fafbff;}
.ks-import-area:hover{border-color:#2563eb;background:#eff6ff;color:#1d4ed8;}
.ks-import-hint{font-size:11px;color:#888;margin-top:6px;}
.btn-suchhilfe{font-family:var(--font-ui);font-size:12px;font-weight:700;
  letter-spacing:.03em;background:#f8fbff;color:#1e3a8a;
  border:1px solid #c7d4f8;border-radius:8px;cursor:pointer;
  padding:0 14px;height:42px;transition:all .15s;white-space:nowrap;display:inline-flex;align-items:center;box-shadow:0 1px 2px rgba(0,0,0,.03);}
.btn-suchhilfe:hover{background:#dbeafe;border-color:#93c5fd;}
.btn-suchhilfe.active{background:#1e2235;color:#e8f0ff;border-color:#1e2235;}
#suchhilfe-panel{background:#f8faff;border:1px solid #c7d4f8;border-radius:10px;
  margin:0 0 10px 0;padding:14px 18px;animation:shFadeIn .15s ease;box-shadow:0 1px 3px rgba(0,0,0,.04);}
@keyframes shFadeIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.sh-title{font-size:11px;font-weight:800;color:#1e3a8a;letter-spacing:.1em;
  text-transform:uppercase;margin-bottom:10px;}
.sh-table{width:100%;border-collapse:collapse;}
.sh-table tr{border-bottom:1px solid #e0eaff;}
.sh-table tr:last-child{border-bottom:none;}
.sh-table td{padding:6px 8px;font-size:12px;vertical-align:middle;}
.sh-table td:first-child{width:130px;}
.sh-table code{font-family:var(--font-mono);background:#dbeafe;color:#1d4ed8;
  padding:2px 7px;border-radius:4px;font-size:12px;font-weight:700;}
.sh-table .sh-arrow{color:#93c5fd;font-weight:700;padding:0 4px;}
.sh-table .sh-desc{color:#334155;}
.sh-hint{font-size:8.9px;color:#94a3b8;margin-top:10px;font-style:italic;}
.sh-add-row{display:flex;gap:6px;margin-top:10px;align-items:center;}
.sh-inp{font-family:var(--font-ui);font-size:12px;color:#111;background:#fff;
  border:1px solid #c7d4f8;border-radius:5px;padding:5px 9px;outline:none;}
.sh-inp:focus{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.12);}
.sh-inp-cmd{width:110px;font-family:var(--font-mono);font-weight:700;}
.sh-inp-desc{flex:1;}
.sh-add-btn{font-family:var(--font-ui);font-size:12px;font-weight:700;
  background:#2563eb;color:#fff;border:none;border-radius:5px;
  padding:5px 12px;cursor:pointer;white-space:nowrap;}
.sh-add-btn:hover{background:#1d4ed8;}
.sh-del{background:none;border:none;cursor:pointer;color:#94a3b8;font-size:13px;
  padding:0 3px;margin-left:4px;line-height:1;transition:color .12s;}
.sh-del:hover{color:#dc2626;}
.sh-edit{background:none;border:none;cursor:pointer;color:#94a3b8;font-size:12px;
  padding:0 4px;margin-left:4px;line-height:1;transition:color .12s;}
.sh-edit:hover{color:#2563eb;}

/* ── TABLE ──────────────────────────────────────────────────── */
.tbl-wrap{overflow:auto;border-radius:6px;border:1px solid var(--border);background:#fff;max-height:calc(100vh - 200px);}
table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;}
colgroup col{}
thead{background:transparent;}
/* ── SPALTENÜBERSCHRIFT (th) — Kachel-Look ─────────────────── */
th{padding:8px 2px !important;text-align:left;font-size:12px !important;font-weight:800 !important;
  letter-spacing:.08em !important;color:#1f2b44 !important;text-transform:uppercase !important;
  cursor:pointer;white-space:nowrap;user-select:none;line-height:1 !important;
  background:#eef0f3 !important;
  position:sticky;top:0;z-index:10;
  border:none !important;}
th>div{background:#e7ebf0 !important;padding:8px 10px !important;border-radius:8px;
  display:flex;align-items:center;gap:5px;
  border:1px solid #bcc5d0 !important;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  transition:all .12s;
  font-size:12px !important;font-weight:800 !important;color:#1f2b44 !important;
  letter-spacing:.08em !important;line-height:1 !important;text-transform:uppercase !important;}
th>div>*,th span,th label,th b,th strong{
  font-size:inherit !important;font-weight:inherit !important;color:inherit !important;
  letter-spacing:inherit !important;line-height:inherit !important;text-transform:inherit !important;}
th:hover>div{background:#dce1e8 !important;border-color:#a8b3c0 !important;box-shadow:0 2px 6px rgba(0,0,0,.1);}
th:first-child{padding-left:4px !important;}
th:last-child{padding-right:4px !important;}
th svg{stroke:#1f2b44 !important;color:#1f2b44 !important;}

/* ── BEREICHSTITEL ("PROJEKTE LAUFEND") — kompakt ──────────── */
tr.section-row td{
  background:#d5dbe3 !important;color:#111827 !important;
  font-size:12px !important;font-weight:800 !important;
  letter-spacing:.06em !important;text-transform:uppercase !important;
  padding:10px 14px !important;margin:0 !important;
  border-top:2px solid #b0b8c4 !important;border-bottom:1px solid #b0b8c4 !important;
  position:sticky;top:42px;z-index:9;
  line-height:1 !important;height:auto !important;min-height:0 !important;}
tr.section-row td *{margin:0 !important;padding:0 !important;line-height:1 !important;}
tr.section-row.done td{
  background:#c8f5d5 !important;color:#0a4a1e !important;
  border-top:2px solid #4ade80 !important;border-bottom:1px solid #86efac !important;
  font-size:22px !important;font-weight:800 !important;letter-spacing:.06em !important;
  position:sticky;top:42px;z-index:9;
  line-height:1 !important;height:auto !important;min-height:0 !important;
  padding:10px 14px !important;margin:0 !important;}

/* ── DATENZELLEN ───────────────────────────────────────────── */
td{padding:3px 10px;color:#111111;vertical-align:top;text-align:left;font-size:12px;
  border-bottom:1px solid #eef2f7;line-height:1.2;}
tr.data-row{background:#fff;transition:background .1s;}
tr.data-row:hover{background:#f8faff;}
.empty-td{text-align:center;padding:40px;color:var(--text3);font-size:13px;letter-spacing:.08em;}

/* ── TABLE CELLS ────────────────────────────────────────────── */
.proj-nr{font-family:var(--font-mono);font-size:12px;font-weight:700;color:#1a4fc4;letter-spacing:.03em;}
.addr-name{color:#111111;font-weight:800;font-size:15px;line-height:1.18;margin-bottom:1px;word-break:break-word;}
.addr-st{font-size:13px;color:#444;margin-top:0;line-height:1.18;word-break:break-word;}
.addr-plz{font-size:13px;color:#666;letter-spacing:.01em;line-height:1.18;word-break:break-word;}
.kunde-badge{display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;padding:2px 8px;
  border-radius:6px;border:1px solid;letter-spacing:.02em;white-space:normal;line-height:1.2;text-align:left;
  color:#111111;max-width:100%;overflow-wrap:anywhere;word-break:break-word;}
.badge-yes,.badge-no{display:inline-flex;align-items:center;justify-content:center;min-width:44px;padding:1px 8px;
  border-radius:6px;font-size:14px;font-weight:800;line-height:1.2;}
.badge-yes{background:#16a34a;color:#fff;border:1px solid #15803d;}
.badge-no{background:#dc2626;color:#fff;border:1px solid #b91c1c;}
.date-normal{font-size:13px;font-weight:700;color:#111111;}
.date-kein{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;
  padding:3px 8px;border-radius:3px;
  background:rgba(251,191,36,.15);border:1px solid rgba(251,191,36,.4);color:#92400e;}
.addr-cell{border-left:3px solid var(--border);}
.row-logo-wrap{width:22px;height:22px;border-radius:50%;flex-shrink:0;cursor:pointer;
  background:rgba(0,0,0,.06);border:2px solid var(--border);
  display:flex;align-items:center;justify-content:center;}
.dark-row .addr-st,.dark-row .addr-plz,.dark-row .date-kein,.dark-row a{color:#eef2ff!important;}
.dark-row .kunde-badge{color:#111!important;}
[data-edit]:hover{box-shadow:0 2px 8px rgba(37,99,235,.25);}
.tbl-foot{display:flex;justify-content:space-between;align-items:center;
  padding:8px 14px;font-size:11px;color:var(--text3);font-family:var(--font-mono);
  border-top:1px solid var(--border);background:#fafbfc;}

/* ── MODALS ─────────────────────────────────────────────────── */
.modal{position:fixed;z-index:500;inset:0;background:rgba(0,0,0,.55);
  display:flex;align-items:center;justify-content:center;}
.modal-box{background:#f8f9fa;border-radius:8px;box-shadow:0 20px 60px rgba(0,0,0,.35);
  width:660px;max-width:95vw;max-height:90vh;overflow-y:auto;}
.modal-hdr{background:#1e2235;padding:16px 20px;border-radius:8px 8px 0 0;}
.modal-ttl{font-size:16px;font-weight:800;color:#e8f0ff;letter-spacing:.06em;}
.modal-sub{font-size:11px;color:rgba(180,200,240,.6);margin-top:1px;letter-spacing:.08em;}
.modal-close{background:none;border:none;color:rgba(200,220,240,.7);cursor:pointer;
  font-size:18px;float:right;margin-top:-28px;}
.form-body{padding:18px 20px;display:flex;flex-direction:column;gap:14px;background:#f8f9fa;}
.fg{display:flex;flex-direction:column;gap:4px;}
.fg.full{}
.fg-2col{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.fg-3col{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;}
.flbl{font-size:8.9px;font-weight:800;letter-spacing:.12em;color:#333;text-transform:uppercase;}
.fu{font-family:var(--font-ui);background:#ffffff;border:1px solid #b0b8c8;
  color:#111111;padding:8px 11px;font-size:13px;border-radius:4px;width:100%;outline:none;}
.fu:focus{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.15);}
.fu::placeholder{color:#aab4c4;}
.form-acts{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;
  border-top:1px solid #dde1e7;background:#f0f2f5;border-radius:0 0 8px 8px;}
.section-lbl{font-size:8.9px;font-weight:800;letter-spacing:.14em;color:#555;
  text-transform:uppercase;padding:4px 0 8px;border-bottom:1px solid #dde1e7;
  display:flex;align-items:center;gap:6px;}

/* ── DELETE MODAL ───────────────────────────────────────────── */
.del-box{padding:24px 20px;}
.del-title{font-size:15px;font-weight:700;color:#dc2626;margin-bottom:8px;}
.del-desc{font-size:13px;color:#444;margin-bottom:18px;}
.del-acts{display:flex;gap:10px;justify-content:flex-end;}

/* ── TOAST ──────────────────────────────────────────────────── */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(10px);
  background:#1e2235;color:#c8d4e8;font-size:13px;font-weight:600;
  padding:10px 20px;border-radius:6px;opacity:0;transition:all .3s;z-index:9999;
  box-shadow:0 8px 24px rgba(0,0,0,.3);pointer-events:none;}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0);}

/* ── DASHBOARD ──────────────────────────────────────────────── */
.dash-wrap{padding:20px 0;}
.dash-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px;}
.dash-stat{background:#fff;border:1px solid var(--border);border-radius:8px;
  padding:18px 20px;position:relative;overflow:hidden;cursor:pointer;
  transition:transform .15s,box-shadow .15s;box-shadow:0 1px 3px rgba(0,0,0,.06);}
.dash-stat:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.1);}
.dash-stat-bar{position:absolute;top:0;left:0;right:0;height:3px;}
.dash-stat-lbl{font-size:8.9px;font-weight:800;letter-spacing:.14em;color:#555;
  text-transform:uppercase;margin-bottom:8px;}
.dash-stat-val{font-family:var(--font-mono);font-size:40px;font-weight:800;line-height:1;}
.dash-stat-sub{font-size:11px;color:#777;margin-top:4px;}
.dash-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:24px;}
.dash-card{background:#fff;border:1px solid var(--border);border-radius:8px;
  padding:24px 20px;cursor:pointer;transition:all .2s;position:relative;overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,.06);}
.dash-card:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.1);}
.dash-card::before{content:'';position:absolute;top:0;left:0;right:0;height:4px;border-radius:8px 8px 0 0;}
.dash-card-fertig::before{background:linear-gradient(90deg,#16a34a,#0f9d8e);}
.dash-card-kein::before{background:linear-gradient(90deg,#2563eb,#7c3aed);}
.dash-card-archiv::before{background:linear-gradient(90deg,#9aa5b1,#52606d);}
.dash-card-icon{font-size:28px;margin-bottom:12px;display:block;}
.dash-card-title{font-size:16px;font-weight:800;margin-bottom:5px;}
.dash-card-desc{font-size:12px;color:#555;line-height:1.5;margin-bottom:12px;}
.dash-card-count{font-family:var(--font-mono);font-size:26px;font-weight:700;}
.dash-card-arrow{position:absolute;bottom:16px;right:18px;font-size:16px;color:#aaa;transition:all .2s;}
.dash-card:hover .dash-card-arrow{color:var(--text0);transform:translateX(4px);}

/* ── DATUM CHIPS (Anzeige gewählter Tage) ───────────────────── */
.mdate-chips{display:flex;flex-wrap:wrap;gap:5px;min-height:32px;
  align-items:center;}
.mdate-chip{display:inline-flex;align-items:center;gap:4px;background:#eff6ff;
  border:1px solid #bfdbfe;color:#1d4ed8;font-size:11px;font-weight:700;
  padding:3px 8px;border-radius:20px;font-family:var(--font-mono);}
.mdate-chip-del{background:none;border:none;color:#dc2626;cursor:pointer;
  font-size:8.9px;padding:0 2px;line-height:1;font-weight:900;}
.mdate-chip-del:hover{color:#b91c1c;}
.btn-open-cal{font-family:var(--font-ui);font-size:12px;font-weight:700;
  background:#1e2235;color:#e8f0ff;border:none;cursor:pointer;
  padding:8px 14px;border-radius:4px;display:inline-flex;align-items:center;gap:6px;
  transition:background .15s;}
.btn-open-cal:hover{background:#2d3555;}
.btn-clr-cal{font-family:var(--font-ui);font-size:11px;font-weight:600;
  background:transparent;color:#dc2626;border:1px solid #fca5a5;cursor:pointer;
  padding:6px 10px;border-radius:4px;transition:all .15s;}
.btn-clr-cal:hover{background:#fef2f2;}
/* ── MANUELLE DATUM-EINGABE ─────────────────────────────────── */
.datum-manual-wrap{display:flex;align-items:center;gap:0;
  background:#fff;border:1px solid #b0b8c8;border-radius:4px;
  height:34px;overflow:hidden;transition:border-color .15s,box-shadow .15s;}
.datum-manual-wrap:focus-within{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.15);}
.datum-manual-inp{font-family:var(--font-mono);font-size:13px;color:#111;
  background:transparent;border:none;outline:none;
  padding:0 8px;width:110px;letter-spacing:.04em;}
.datum-manual-inp::placeholder{color:#b0b8c8;font-family:var(--font-ui);font-size:12px;letter-spacing:0;}
.datum-manual-add{background:#2563eb;color:#fff;border:none;cursor:pointer;
  height:34px;padding:0 10px;font-size:13px;font-weight:700;
  transition:background .12s;white-space:nowrap;}
.datum-manual-add:hover{background:#1d4ed8;}
.datum-manual-hint{font-size:8.9px;color:#aaa;font-style:italic;margin-top:3px;}

/* ── BOOKING CALENDAR OVERLAY ───────────────────────────────── */
#bkcal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);
  z-index:10000;display:flex;align-items:center;justify-content:center;
  animation:bkFadeIn .15s ease;}
@keyframes bkFadeIn{from{opacity:0}to{opacity:1}}
#bkcal-box{background:#fff;border-radius:12px;
  box-shadow:0 24px 64px rgba(0,0,0,.3);
  padding:0;width:680px;max-width:96vw;max-height:90vh;overflow:hidden;
  animation:bkSlideUp .18s ease;}
@keyframes bkSlideUp{from{transform:translateY(12px);opacity:.6}to{transform:translateY(0);opacity:1}}
#bkcal-header{background:#1e2235;padding:16px 20px;display:flex;
  align-items:center;justify-content:space-between;}
#bkcal-title{font-size:14px;font-weight:800;color:#e8f0ff;letter-spacing:.06em;}
#bkcal-summary{font-size:12px;color:rgba(200,220,255,.7);margin-top:1px;}
#bkcal-body{padding:16px 20px;display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.bkcal-month{min-width:0;}
.bkcal-month-nav{display:flex;align-items:center;justify-content:space-between;
  margin-bottom:10px;}
.bkcal-month-lbl{font-size:13px;font-weight:800;color:#1e2235;letter-spacing:.04em;}
.bkcal-nav-btn{background:none;border:1px solid #dde1e7;border-radius:4px;
  width:28px;height:28px;cursor:pointer;font-size:14px;color:#555;
  display:flex;align-items:center;justify-content:center;transition:all .12s;}
.bkcal-nav-btn:hover{background:#f0f2f5;color:#1e2235;}
.bkcal-nav-btn:disabled{opacity:.25;cursor:default;}
.bkcal-weekdays{display:grid;grid-template-columns:repeat(7,1fr);
  margin-bottom:4px;}
.bkcal-wd{text-align:center;font-size:8.9px;font-weight:700;color:#888;
  letter-spacing:.06em;padding:4px 0;text-transform:uppercase;}
.bkcal-days{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;}
.bkday{height:34px;display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:600;cursor:pointer;border-radius:4px;
  color:#1e2235;position:relative;transition:background .08s,color .08s;
  user-select:none;}
.bkday:hover:not(.bkday-empty):not(.bkday-past){background:#dbeafe;color:#1d4ed8;}
.bkday-empty{cursor:default;color:#ccc;}
.bkday-past{cursor:default;color:#ccc;}
.bkday-today::after{content:'';position:absolute;bottom:3px;left:50%;
  transform:translateX(-50%);width:4px;height:4px;border-radius:50%;
  background:#f59e0b;}
.bkday-start,.bkday-end{background:#1e2235!important;color:#fff!important;border-radius:4px;}
.bkday-start.bkday-range-end,.bkday-end.bkday-range-start{border-radius:4px;}
.bkday-in-range{background:#dbeafe;color:#1d4ed8;border-radius:0;}
.bkday-start{border-radius:4px 0 0 4px;}
.bkday-end{border-radius:0 4px 4px 0;}
.bkday-start.bkday-single{border-radius:4px!important;}
.bkday-hover-range{background:#e0eeff;color:#1d4ed8;border-radius:0;}
.bkday-hover-end{background:#c7d9f8;color:#1d4ed8;border-radius:0 4px 4px 0;}
#bkcal-footer{padding:12px 20px 16px;border-top:1px solid #f0f2f5;
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
#bkcal-info{flex:1;font-size:12px;color:#555;font-style:italic;}
.bkcal-btn-confirm{font-family:var(--font-ui);font-size:13px;font-weight:700;
  background:#16a34a;color:#fff;border:none;cursor:pointer;
  padding:9px 20px;border-radius:5px;transition:background .12s;}
.bkcal-btn-confirm:hover{background:#15803d;}
.bkcal-btn-confirm:disabled{background:#9ca3af;cursor:default;}
.bkcal-btn-clear{font-family:var(--font-ui);font-size:12px;font-weight:600;
  background:transparent;color:#dc2626;border:1px solid #fca5a5;cursor:pointer;
  padding:8px 14px;border-radius:5px;transition:all .12s;}
.bkcal-btn-clear:hover{background:#fef2f2;}
.bkcal-btn-cancel{font-family:var(--font-ui);font-size:12px;font-weight:600;
  background:#f0f2f5;color:#444;border:1px solid #dde1e7;cursor:pointer;
  padding:8px 14px;border-radius:5px;transition:all .12s;}
.bkcal-btn-cancel:hover{background:#e2e6ea;}
.bkcal-btn-kein{font-family:var(--font-ui);font-size:12px;font-weight:600;
  background:#fef3c7;color:#92400e;border:1px solid #fcd34d;cursor:pointer;
  padding:8px 14px;border-radius:5px;transition:all .12s;}
.bkcal-btn-kein:hover{background:#fde68a;}
@media(max-width:600px){
  #bkcal-body{grid-template-columns:1fr;}
  #bkcal-box{width:98vw;}
}
.settings-wrap{padding:20px 0;display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.panel{background:#fff;border:1px solid var(--border);border-radius:6px;overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,.06);}
.panel-hdr{padding:10px 14px;font-size:8.9px;font-weight:800;letter-spacing:.14em;
  text-transform:uppercase;background:#f8fafc;border-bottom:1px solid var(--border);
  color:#1e2235;}
.chip{display:inline-flex;align-items:center;gap:4px;background:#f0f4ff;
  border:1px solid #c7d4f8;padding:4px 10px;border-radius:20px;font-size:12px;
  color:#1e3a8a;cursor:grab;user-select:none;transition:box-shadow .12s,opacity .12s;}
.chip:active{cursor:grabbing;}
.chip.dragging{opacity:.35;box-shadow:none;}
.chip.drag-over{box-shadow:2px 0 0 2px #2563eb;border-color:#2563eb;}
.chip-handle{font-size:8.9px;color:#93c5fd;margin-right:2px;cursor:grab;}
.chip-del{background:none;border:none;color:#dc2626;cursor:pointer;font-size:11px;padding:0 2px;}

/* ── WOCHENPLAN ─────────────────────────────────────────────── */
#pane-wochenplan{background:#E6E9ED;}
.wp-wrap{padding:0 16px 20px;}
.wp-nav{display:flex;align-items:center;gap:10px;padding:14px 0;
  border-bottom:2px solid #C9D2DC;margin-bottom:12px;flex-wrap:wrap;}
.wp-kw-lbl{font-family:var(--font-mono);font-size:20px;font-weight:800;color:#102A43;min-width:72px;}
.wp-range{font-size:13px;color:#52606D;font-weight:500;}
.wp-search-wrap{display:flex;align-items:center;background:#fff;
  border:1px solid #C9D2DC;border-radius:4px;height:36px;min-width:200px;margin-left:8px;}
.wp-search-wrap:focus-within{border-color:#9AA5B1;}
.wp-search-ico{width:32px;height:100%;display:flex;align-items:center;justify-content:center;color:#52606D;flex-shrink:0;}
.wp-srch{flex:1;background:transparent;border:none;outline:none;
  font-size:13px;color:#1F2933;padding:0 10px 0 0;}
.wp-srch::placeholder{color:#9AA5B1;}
.wp-head{position:sticky;top:var(--hdr-h);z-index:50;background:#E6E9ED;padding-bottom:6px;}
.wp-head-row{display:grid;gap:6px;padding-top:12px;}
.wp-day-hdr{background:#C9D2DC;border:1px solid #9AA5B1;
  padding:9px;text-align:center;font-size:8.9px;font-weight:700;
  letter-spacing:.12em;color:#1F2933;text-transform:uppercase;border-radius:4px;}
.wp-day-hdr.today{background:#D1E7DD;border-color:#2D9D78;color:#0F5132;}
.wp-day-date{font-size:11px;font-family:var(--font-mono);color:#52606D;margin-top:1px;}
.wp-day-hdr.dim{opacity:.5;}
.wp-row{display:grid;gap:6px;margin-bottom:6px;align-items:stretch;}
.wp-name-cell{background:#F1F3F5;border:1px solid #C9D2DC;
  padding:10px 13px;font-size:15px;font-weight:800;
  display:flex;align-items:center;gap:8px;border-radius:4px;
  min-height:68px;box-shadow:0 1px 3px rgba(0,0,0,.08);}
.wp-name-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;}
.wp-cell{background:#E0E4E8;border:1px solid #C9D2DC;
  min-height:80px;padding:6px;border-radius:4px;
  display:flex;flex-direction:column;gap:4px;}
.wp-cell:hover{background:#D9E2EC;}
.wp-card{border-radius:5px;border:1px solid #C9D2DC;padding:8px 10px;padding-top:26px;
  font-size:12px;line-height:1.5;position:relative;background:#F1F3F5;
  box-shadow:0 1px 3px rgba(0,0,0,.08);}
.wp-card:hover{background:#D9E2EC;}
.wp-card-nr{font-family:var(--font-mono);font-size:12px;font-weight:700;color:#102A43;}
.wp-card-name{font-size:13px;font-weight:700;color:#1F2933;margin-top:1px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:175px;}
.wp-card-del{position:absolute;top:5px;right:6px;font-size:8.9px;
  background:rgba(220,38,38,.1);border:none;border-radius:3px;
  color:#dc2626;cursor:pointer;padding:2px 6px;font-weight:700;}
.wp-card-del:hover{background:rgba(220,38,38,.2);}
.wp-card-flags{display:flex;gap:3px;margin-top:5px;flex-wrap:wrap;}
.wp-flag{font-size:8.9px;font-weight:700;padding:2px 7px;border-radius:20px;border:1px solid;}
.wp-flag-bl{background:rgba(202,138,4,.1);border-color:rgba(202,138,4,.3);color:#78350f;}
.wp-flag-nacht{background:rgba(124,58,237,.1);border-color:rgba(124,58,237,.3);color:#4c1d95;}
.wp-add-btn{width:100%;border:1px dashed #9AA5B1;background:transparent;
  color:#52606D;font-size:11px;cursor:pointer;padding:3px 4px;border-radius:3px;margin-top:1px;
  transition:all .15s;}
.wp-add-btn:hover{background:#D9E2EC;color:#1F2933;}
.wp-btn-row{display:flex;gap:4px;margin-top:5px;}
.wp-tgl{font-size:8.9px;padding:2px 7px;border-radius:3px;cursor:pointer;
  border:1px solid #C9D2DC;background:#E0E4E8;color:#52606D;font-weight:600;}
.wp-tgl:hover{background:#BCCCDC;}
.wp-tgl.active{background:#D1E7DD;border-color:#2D9D78;color:#0F5132;}
/* Drag & Drop Wochenplan */
.wp-card[draggable="true"]{cursor:grab;}
.wp-card[draggable="true"]:active{cursor:grabbing;}
.wp-card.wp-dragging{opacity:.45;}
.wp-cell.wp-drop-target{background:#D1E7DD;outline:2px dashed #2D9D78;outline-offset:-2px;}
/* Drag & Drop: ganze Monteur-Zeilen umsortieren */
.wp-row .wp-name-cell[data-mirow]{cursor:grab;}
.wp-row .wp-name-cell[data-mirow]:active{cursor:grabbing;}
.wp-row.wp-row-dragging{opacity:.45;}
.wp-row.wp-row-drop-target{outline:2px dashed #2D9D78;outline-offset:2px;border-radius:6px;background:rgba(45,157,120,.06);}
/* Manueller Seitenumbruch zwischen Monteuren (PDF) */
.wp-break{display:flex;align-items:center;gap:8px;cursor:pointer;
  margin:-1px 0 5px 0;padding:1px 2px;border-radius:4px;
  opacity:.35;transition:opacity .15s,background .15s;user-select:none;}
.wp-break:hover{opacity:1;background:rgba(242,161,0,.06);}
.wp-break .wp-break-line{flex:1;height:0;border-top:2px dashed #C9D2DC;}
.wp-break .wp-break-lbl{font-size:10px;font-weight:700;letter-spacing:.04em;
  color:#9AA5B1;white-space:nowrap;padding:1px 8px;border-radius:20px;
  border:1px dashed #C9D2DC;background:#F1F3F5;}
.wp-break:hover .wp-break-lbl{color:#52606D;border-color:#9AA5B1;}
.wp-break.active{opacity:1;}
.wp-break.active .wp-break-line{border-top:2px dashed #f2a100;}
.wp-break.active .wp-break-lbl{color:#92580a;border:1px solid #f2a100;
  background:rgba(242,161,0,.12);}

/* ── WP POPUP ───────────────────────────────────────────────── */
.wp-popup{position:fixed;z-index:800;background:#ffffff;border:1px solid #C9D2DC;
  width:800px;max-width:96vw;max-height:96vh;overflow-y:auto;
  border-radius:8px;box-shadow:0 20px 60px rgba(0,0,0,.25);
  top:50%;left:50%;transform:translate(-50%,-50%);}
.wp-popup-hdr{background:#1e2235;padding:14px 18px;border-radius:8px 8px 0 0;
  display:flex;justify-content:space-between;align-items:center;}
.wp-popup-hdr-title{font-size:14px;font-weight:800;color:#e8f0ff;}
.wp-popup-hdr-date{font-size:13px;color:#a8c0e8;font-family:var(--font-mono);}
.wp-popup-body{padding:16px 18px;display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.wp-popup-body>*{min-width:0;}
.wp-popup-full{grid-column:1/-1;}
.wp-poplbl{display:block;font-size:8.9px;font-weight:800;letter-spacing:.12em;
  text-transform:uppercase;color:#333333;margin-bottom:6px;}
.wp-popup-acts{display:flex;justify-content:flex-end;gap:10px;padding:12px 18px;
  border-top:1px solid #E0E4E8;background:#f8f9fa;border-radius:0 0 8px 8px;}
.wp-day-checks{display:flex;gap:6px;flex-wrap:wrap;}
.wp-day-check{display:flex;align-items:center;gap:4px;font-size:12px;color:#1F2933;
  font-weight:600;cursor:pointer;padding:4px 10px;border-radius:4px;
  border:1px solid #C9D2DC;background:#F1F3F5;}
.wp-day-check:hover{background:#D9E2EC;}
.wp-day-check input{accent-color:#2563eb;width:14px;height:14px;}
.wp-mi-list{border:1px solid #C9D2DC;
  border-radius:4px;background:#fff;display:grid;grid-template-columns:1fr 1fr;}
.wp-mi-item{display:flex;align-items:center;gap:7px;padding:7px 10px;
  font-size:12px;color:#1F2933;font-weight:600;cursor:pointer;}
.wp-mi-item:hover{background:#F1F3F5;}
.wp-mi-item input{accent-color:#2563eb;width:14px;height:14px;}
.wp-spec-row{display:flex;gap:8px;}
.wp-spec-btn{flex:1;padding:10px;border:1px solid #C9D2DC;border-radius:4px;
  background:#F1F3F5;cursor:pointer;font-size:12px;font-weight:700;color:#333;
  text-align:center;transition:all .15s;}
.wp-spec-btn:hover{background:#D9E2EC;}
.wp-proj-search{font-family:var(--font-ui);background:#fff;border:1px solid #C9D2DC;
  color:#111;padding:8px 11px;font-size:13px;border-radius:4px;width:100%;outline:none;
  margin-bottom:6px;}
.wp-proj-select{width:100%;border:1px solid #C9D2DC;border-radius:4px;background:#fff;
  color:#111;font-family:var(--font-ui);font-size:13px;}
.wp-proj-select option{padding:4px 8px;}
.wp-bl-select{width:100%;border:1px solid #C9D2DC;border-radius:4px;background:#fff;
  color:#111;font-family:var(--font-ui);font-size:13px;padding:7px 10px;}
.wp-toggle-wrap{display:flex;align-items:center;justify-content:space-between;
  padding:8px 12px;background:#F1F3F5;border:1px solid #C9D2DC;border-radius:4px;}
.wp-toggle-lbl{font-size:13px;font-weight:600;color:#1F2933;}
.wp-toggle{width:42px;height:22px;border-radius:11px;border:none;cursor:pointer;
  position:relative;transition:background .2s;background:#d1d5db;}
.wp-toggle.on{background:#16a34a;}
.wp-toggle::after{content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;
  background:#fff;border-radius:50%;transition:transform .2s;}
.wp-toggle.on::after{transform:translateX(20px);}

/* ── KI DROPZONE ─────────────────────────────────────────────── */
.ki-zone{border:1px dashed #C9D2DC;border-radius:6px;padding:14px;background:#fafbfc;
  margin-bottom:12px;cursor:pointer;transition:all .15s;}
.ki-zone:hover{border-color:#9AA5B1;background:#f0f4ff;}
.ki-zone-lbl{font-size:12px;font-weight:700;color:#333;margin-bottom:4px;display:flex;align-items:center;gap:6px;}
.ki-zone-sub{font-size:11px;color:#666;}
.ki-formats{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap;}

/* ── NOTIZ EDITOR ────────────────────────────────────────────── */
#notiz-editor{min-height:110px;padding:10px 12px;font-size:14px;line-height:1.6;
  color:#111111;background:#ffffff;outline:none;white-space:pre-wrap;}
#notiz-editor span[style*="color"]{color:unset;}

/* ── MISC ────────────────────────────────────────────────────── */
.tgl-wrap{display:flex;align-items:center;justify-content:space-between;
  padding:8px 12px;background:#f8fafb;border:1px solid var(--border);border-radius:4px;}
.tgl-lbl{font-size:13px;font-weight:600;color:var(--text0);display:flex;align-items:center;gap:6px;}
.tgl{width:42px;height:22px;border-radius:11px;border:none;cursor:pointer;
  position:relative;transition:background .2s;background:#d1d5db;}
.tgl.on{background:#16a34a;}
.tgl::after{content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;
  background:#fff;border-radius:50%;transition:transform .2s;}
.tgl.on::after{transform:translateX(20px);}
.overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.55);z-index:500;}
.form-panel{background:#f8f9fa;border-radius:8px;box-shadow:0 20px 60px rgba(0,0,0,.35);
  width:680px;max-width:96vw;max-height:90vh;overflow-y:auto;}
.form-tbar{background:#1e2235;padding:14px 20px;border-radius:8px 8px 0 0;
  display:flex;justify-content:space-between;align-items:center;}
.form-ttl{font-size:16px;font-weight:800;color:#e8f0ff;letter-spacing:.06em;}
.form-sub{font-size:8.9px;color:rgba(180,200,240,.6);letter-spacing:.08em;margin-top:1px;}
.form-close{background:none;border:none;color:rgba(200,220,240,.7);cursor:pointer;font-size:20px;padding:0;}
.form-close:hover{color:#fff;}
.form-body2{padding:18px 20px;display:flex;flex-direction:column;gap:14px;}
.form-acts{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;
  border-top:1px solid #dde1e7;background:#f0f2f5;border-radius:0 0 8px 8px;}
.kontakt-row{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;margin-bottom:8px;align-items:end;}

/* ── VERBESSERUNGSVORSCHLÄGE ─────────────────────────────────── */
.btn-vv{font-family:var(--font-ui);font-size:12px;font-weight:800;
  background:rgba(255,255,255,.12);color:#e8f0ff;
  border:1px solid rgba(255,255,255,.2);cursor:pointer;
  padding:8px 14px;border-radius:4px;letter-spacing:.05em;
  display:flex;align-items:center;gap:6px;transition:all .15s;}
.btn-vv:hover{background:rgba(255,255,255,.22);color:#fff;}

#vv-modal{position:fixed;inset:0;z-index:800;background:rgba(0,0,0,.55);
  display:flex;align-items:center;justify-content:center;
  animation:vvFadeIn .15s ease;}
@keyframes vvFadeIn{from{opacity:0}to{opacity:1}}
#vv-modal.hidden{display:none;}
#vv-box{background:#fff;border-radius:10px;width:800px;max-width:96vw;
  max-height:90vh;display:flex;flex-direction:column;
  box-shadow:0 24px 80px rgba(0,0,0,.35);overflow:hidden;
  position:relative;}
#vv-hdr{background:#1e2235;padding:15px 20px;display:flex;align-items:center;
  justify-content:space-between;flex-shrink:0;width:100%;}
#vv-hdr-title{font-size:15px;font-weight:800;color:#e8f0ff;letter-spacing:.06em;display:flex;align-items:center;gap:8px;}
#vv-hdr-sub{font-size:9px;color:rgba(180,200,240,.55);letter-spacing:.08em;margin-top:1px;}
#vv-close{background:none;border:none;color:rgba(200,220,240,.7);cursor:pointer;font-size:20px;line-height:1;padding:0;}
#vv-close:hover{color:#fff;}
#vv-toolbar{display:flex;align-items:center;gap:3px;padding:8px 14px;
  background:#f4f6f9;border-bottom:1px solid #dde1e7;flex-wrap:wrap;flex-shrink:0;width:100%;}
.vv-tb-btn{background:#fff;border:1px solid #d0d6df;color:#333;cursor:pointer;
  width:30px;height:28px;border-radius:4px;font-size:13px;font-weight:700;
  display:flex;align-items:center;justify-content:center;transition:all .12s;}
.vv-tb-btn:hover{background:#e8f0ff;border-color:#93c5fd;color:#1d4ed8;}
.vv-tb-btn.active{background:#1e2235;color:#e8f0ff;border-color:#1e2235;}
.vv-tb-sep{width:1px;height:22px;background:#d0d6df;margin:0 4px;}
.vv-tb-select{font-family:var(--font-ui);font-size:12px;border:1px solid #d0d6df;
  border-radius:4px;padding:3px 6px;background:#fff;cursor:pointer;height:28px;color:#333;}
.vv-color-btn{width:28px;height:28px;border-radius:4px;border:1px solid #d0d6df;
  cursor:pointer;padding:3px;background:#fff;}
.vv-color-btn input{width:100%;height:100%;border:none;padding:0;cursor:pointer;
  border-radius:3px;background:transparent;}
#vv-editor-wrap{flex:1;overflow-y:auto;padding:18px 22px;background:#fff;width:100%;}
#vv-editor{min-height:300px;outline:none;font-family:'Calibri','Segoe UI',sans-serif;
  font-size:14px;line-height:1.65;color:#111;word-break:break-word;width:100%;}
#vv-editor:empty::before{content:"Verbesserungsvorschlag hier eingeben …";color:#b0b8c8;pointer-events:none;}
#vv-editor ul,#vv-editor ol{padding-left:22px;}
#vv-editor blockquote{border-left:3px solid #93c5fd;padding-left:12px;margin:4px 0;color:#374151;}
.vv-check-item{display:flex !important;align-items:center;gap:9px;margin:4px 0;width:100%;padding:1px 0;}
.vv-check-item input[type="checkbox"]{
  appearance:none;-webkit-appearance:none;
  width:18px;height:18px;border-radius:50%;
  border:2px solid #9aa5b1;background:#fff;
  cursor:pointer;flex-shrink:0;position:relative;
  transition:all .15s;
}
.vv-check-item input[type="checkbox"]:checked{background:#2563eb;border-color:#2563eb;}
.vv-check-item input[type="checkbox"]:checked::after{
  content:"✓";position:absolute;
  top:50%;left:50%;transform:translate(-50%,-52%);
  color:#fff;font-size:11px;font-weight:900;line-height:1;
}
.vv-check-lbl{flex:1;outline:none;min-width:10px;font-size:14px;line-height:1.5;cursor:text;}
.vv-check-item[data-done="1"] .vv-check-lbl,
.vv-check-lbl.vv-done{
  color:#2563eb !important;
  text-decoration:line-through !important;
  opacity:.8 !important;
}
#vv-footer{display:flex;align-items:center;justify-content:space-between;
  padding:12px 18px;background:#f4f6f9;border-top:1px solid #dde1e7;flex-shrink:0;gap:10px;width:100%;}
#vv-saved-info{font-size:11px;color:#888;font-style:italic;}
.vv-footer-btns{display:flex;gap:8px;}
.btn-vv-save{font-family:var(--font-ui);font-size:13px;font-weight:700;
  background:#16a34a;color:#fff;border:none;cursor:pointer;
  padding:8px 20px;border-radius:5px;display:flex;align-items:center;gap:6px;}
.btn-vv-save:hover{background:#15803d;}
.btn-vv-clear{font-family:var(--font-ui);font-size:13px;font-weight:600;
  background:#fff;color:#dc2626;border:1px solid #fca5a5;cursor:pointer;
  padding:8px 14px;border-radius:5px;}
.btn-vv-clear:hover{background:#fef2f2;}
/* ── LOGIN SCREEN ───────────────────────────────────────────── */
#login-screen{
  position:fixed;inset:0;z-index:99999;
  background:
    radial-gradient(circle at 50% 40%, rgba(42,111,196,.08) 0%, rgba(42,111,196,0) 42%),
    linear-gradient(180deg,#f6f8fb 0%,#eef3f8 100%);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  isolation:isolate;
}
#login-screen::before{
  content:"";
  position:absolute;inset:0;
  background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbwAAABxCAMAAACZb+YzAAAAq1BMVEX///8oa6enqaikpqXhdyytr67p6uqwsrGztLTJyskOYqLl5eUiaKYZZKRPgbORstG/0OG1yd7e39/N3esAX6Hw9fn55dbkhUThdCLyx65p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CyKNmorfrn59I6ZoX9jTU8jHWmPSI1yfhZQ/MBou9//1tJv7UCT/o9DHEzZZEldFOV4rQTwhCyhgc2Fipa1KGizoBYBeKibuCJFQul056FYVosIWsqKQnH/vfzKocRWSawGjF9PHqXQkfwIlwPUgk/q2ADD7yg1hKs5PbwKiomQ53oqkD9qjjXjuDxvhhXnLNssoRuLDIt5p3aw6tYwyBMTYo1uH6gwqXQFTxnJix7HptG0VWWkNtQuHsmSEAgLMBgLpjtL9JY2FN1Bk98xuyyZwOPLz9mKjnAxx7evOK74E4rEkOr3J7dwROrpnLlk6086VJBCBNpMgHs4VEHEBFac/faRU/pQjYTdQfPmQubei5Fzi4Mov4P0qit/Hzs4dEEBPJdeOJmPVRvH6hyKXQITzzE+ngUtYMX8qW/q+Vzv4BwUY2f2tb+ugqXJKmthiBnVebqEh5jP8o/AGdR21+u1I5g8eG4R905qgY8uQC/y0c06Iq+V4cndwpPesY4udv/Zqx1ipdS+mIQdeBhuklBXGC2lnZlmFan8Jy9YIiEUgP2KV7jbWCeH6SUHxwqyrDUgafdsSju1wK0vawK2ewWnnhe8Mn0Xidu8zQ5uwYZsq/g3PN0VR3LWgOebg3jk981r2pSbEcvDt4d6l68wDbAqs1ycFF0xObZZ8oLwmemD1W38jprLTbT2PO47K68jJznx4f1amhYewz0qQreiilinStgh7T0PJIPVFat+f7n7yX95xXeN0biBYZM1WZNdMqca5/oVJpUHm26UFQ4nw1XaXrX4By/aTs4TI/Lp8VpNzcu+/fA9KHqs3Ph7sRa1jPNBypLff3xL6L/Ov8D8G+bHhvA4BIAAAAASUVORK5CYII=");
  background-repeat:no-repeat;
  background-position:center 24%;
  background-size:min(68vw, 1080px) auto;
  opacity:.52;
  filter:saturate(0.95);
  pointer-events:none;
  z-index:0;
}
#login-screen::after{
  content:"";
  position:absolute;inset:0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.16) 48%, rgba(255,255,255,.42) 100%);
  pointer-events:none;
  z-index:0;
}
#login-box{
  position:relative;
  z-index:1;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(2px);
  border:1px solid rgba(185,198,214,.72);
  border-radius:12px;padding:40px 44px;
  width:360px;max-width:92vw;
  box-shadow:0 24px 64px rgba(19,32,67,.10);
  text-align:center;
}
#login-logo{font-size:36px;margin-bottom:12px;}
#login-title{font-size:20px;font-weight:800;color:#1e2235;margin-bottom:4px;}
#login-sub{font-size:12px;color:#7b8494;margin-bottom:24px;letter-spacing:.06em;}
#login-inp{
  width:100%;padding:12px 14px;border:1px solid #b7c3d0;
  border-radius:6px;font-size:15px;font-family:inherit;
  color:#111;background:rgba(255,255,255,.92);outline:none;
  margin-bottom:12px;text-align:center;letter-spacing:.1em;
}
#login-inp:focus{border-color:#2a6fc4;box-shadow:0 0 0 3px rgba(42,111,196,.14);}
#login-btn{
  width:100%;padding:12px;background:#2a6fc4;color:#fff;
  border:none;border-radius:6px;font-size:15px;font-weight:800;
  cursor:pointer;font-family:inherit;transition:background .15s;
}
#login-btn:hover{background:#1f5aa4;}
#login-err{color:#dc2626;font-size:12px;margin-top:8px;min-height:18px;}

/* ── STICKY FIRST COLUMN ───────────────────────────────────── */
th.col-sticky, td.col-sticky{
  position:sticky;left:0;z-index:3;
}
thead th.col-sticky{
  background:#eef0f3;z-index:11;
}
tr.data-row td.col-sticky{
  background:#fff;
  box-shadow:2px 0 6px rgba(0,0,0,.08);
}
tr.data-row:hover td.col-sticky{background:#f8faff;}
tr.data-row.dark-row td.col-sticky{background:inherit;}




/* ── GEO AUTOCOMPLETE ────────────────────────────────────────── */
#geo-suggestions{
  position:absolute;top:calc(100% + 4px);left:0;right:0;
  background:#fff;border:1px solid #b0b8c8;border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.14);z-index:700;
  max-height:260px;overflow-y:auto;
}
.geo-sug-item{
  padding:8px 12px;cursor:pointer;border-bottom:1px solid #f0f2f5;
  display:flex;align-items:center;gap:8px;font-size:13px;
  transition:background .1s;
}
.geo-sug-item:last-child{border-bottom:none;}
.geo-sug-item:hover,.geo-sug-item.active{background:#eff6ff;}
.geo-sug-plz{font-family:var(--font-mono);font-size:12px;font-weight:700;
  color:#2563eb;background:#dbeafe;padding:2px 6px;border-radius:4px;
  flex-shrink:0;min-width:44px;text-align:center;}
.geo-sug-ort{font-weight:600;color:#111;}
.geo-sug-bl{font-size:11px;color:#888;margin-left:auto;}

/* ── ZEILEN-AUSWAHL AKTIONSLEISTE ───────────────────────────── */
#sel-action-bar{
  display:none;align-items:center;gap:6px;
  padding:4px 10px 4px 12px;border-radius:6px;
  background:#f1f3f5;border:1.5px solid #c9d2dc;
  animation:selBarIn .15s ease;
}
@keyframes selBarIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
#sel-action-bar.visible{display:flex;}
#sel-action-bar .sel-lbl{font-size:12px;font-weight:700;color:#444;margin-right:4px;white-space:nowrap;}
.btn-sel-action{font-family:var(--font-ui);font-size:12px;font-weight:700;
  border:none;cursor:pointer;padding:6px 12px;border-radius:4px;
  display:inline-flex;align-items:center;gap:5px;transition:all .15s;}
.btn-sel-fertig{background:#dcfce7;color:#15803d;border:1px solid #86efac;}
.btn-sel-fertig:hover{background:#bbf7d0;}
.btn-sel-arch{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;}
.btn-sel-arch:hover{background:#dbeafe;}
.btn-sel-del{background:#fef2f2;color:#dc2626;border:1px solid #fecaca;}
.btn-sel-del:hover{background:#fee2e2;}
.btn-sel-cancel{background:rgba(0,0,0,.06);color:#555;border:1px solid #dde1e7;}
.btn-sel-cancel:hover{background:rgba(0,0,0,.1);}
.btn-sel-laufend{background:#fef9c3;color:#854d0e;border:1px solid #fde047;}
.btn-sel-laufend:hover{background:#fef08a;}
.btn-sel-undo{background:#f5f3ff;color:#5b21b6;border:1px solid #c4b5fd;}
.btn-sel-undo:hover{background:#ede9fe;}
tr.data-row.row-selected>td{
  outline:2px solid #1e2235 !important;
  outline-offset:-2px;
  background:rgba(30,34,53,.06) !important;
}
tr.data-row.row-selected td.col-sticky{
  background:rgba(30,34,53,.06) !important;
}
.btn-row-sel{font-family:var(--font-ui);font-size:11px;font-weight:700;
  background:rgba(0,0,0,.05);color:#555;border:1px solid #dde1e7;
  cursor:pointer;padding:5px 9px;border-radius:4px;transition:all .15s;
  display:inline-flex;align-items:center;gap:4px;white-space:nowrap;}
.btn-row-sel:hover{background:#fff3cd;border-color:#f59e0b;color:#92400e;}
.btn-row-sel.selected{background:#f59e0b;border-color:#d97706;color:#fff;}

@page{size:A4 landscape;margin:6mm;}
    *{box-sizing:border-box;margin:0;padding:0;font-family:Arial,sans-serif;}
    html,body{
      background:#E6E9ED;
      -webkit-print-color-adjust:exact;
      print-color-adjust:exact;
    }

    .page{
      width:100%;
      height:198mm;
      page-break-after:always;
      break-after:page;
      display:flex;
      flex-direction:column;
      background:#E6E9ED;
    }
    .page:last-child{page-break-after:avoid;break-after:avoid;}

    /* Header */
    .page-hdr{
      position:relative;
      display:grid;
      grid-template-columns:150px 1fr 92px;
      align-items:center;
      min-height:22mm;
      padding:1.2mm 0 1.8mm 0;
      margin-bottom:2mm;
      border-top:2px solid #1e2235;
      border-bottom:1px solid #9AA5B1;
      flex-shrink:0;
      background:#E6E9ED;
    }
    .brand-box{
      display:flex;
      align-items:flex-start;
      justify-content:flex-start;
      padding-left:4px;
    }
    .brand-logo{
      max-width:112px;
      max-height:16mm;
      object-fit:contain;
      opacity:.98;
    }
    .hdr-center{
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:center;
      gap:.7mm;
      text-align:center;
    }
    .page-title{
      font-size:9.8mm;
      line-height:1;
      font-weight:900;
      letter-spacing:.11em;
      color:#102A43;
      text-transform:uppercase;
    }
    .page-subtitle{
      font-size:3.9mm;
      line-height:1.1;
      font-weight:800;
      letter-spacing:.04em;
      color:#52606D;
    }
    .page-counter{
      justify-self:end;
      align-self:start;
      font-size:3.5mm;
      font-weight:700;
      color:#52606D;
      border:1px solid #C9D2DC;
      border-radius:999px;
      padding:1mm 3.2mm;
      background:#F1F3F5;
      margin-top:.6mm;
    }
    .header-accent{
      position:absolute;
      left:0;
      right:0;
      bottom:-1.6mm;
      height:1.6mm;
      background:
        linear-gradient(to right,
          #1e2235 0%,
          #1e2235 60%,
          #f2a100 60%,
          #f2a100 75%,
          #9AA5B1 75%,
          #9AA5B1 100%);
      border-radius:1mm;
    }

    /* Table wrapper */
    .page-table-wrap{
      height:154mm;
      overflow:hidden;
      position:relative;
      isolation:isolate;
    }
    .page-table-wrap::before{
      content:"";
      position:absolute;
      top:50%;
      left:calc(90px + ((100% - 90px) / 2));
      width:calc((100% - 90px) * 0.66);
      height:108mm;
      transform:translate(-50%,-50%) rotate(-45deg);
      transform-origin:center center;
      background-image:url(${kswLogoData});
      background-repeat:no-repeat;
      background-position:center center;
      background-size:100% auto;
      opacity:.30;
      pointer-events:none;
      z-index:0;
    }
    table{
      width:100%;
      height:100%;
      border-collapse:collapse;
      table-layout:fixed;
      position:relative;
      z-index:1;
    }

    /* Header row – matches screen .wp-day-hdr */
    thead tr{height:10.5mm;}
    th{
      text-align:center;
      font-weight:700;
      font-size:7.3px;
      letter-spacing:.12em;
      padding:3px 2px;
      height:10.5mm;
      border:1px solid #9AA5B1;
      text-transform:uppercase;
    }
    thead th:first-child{
      background:#1e2235;
      color:#e8f0ff;
      border-color:#1e2235;
      text-align:left;
      padding-left:5px;
      font-size:6.5px;
    }
    thead th:not(:first-child){
      background:#C9D2DC;
      color:#1F2933;
      border:1px solid #9AA5B1;
    }
    .th-day{
      display:block;
      font-size:7.3px;
      font-weight:800;
      line-height:1;
      letter-spacing:.12em;
      color:#1F2933;
    }
    .th-date{
      display:block;
      margin-top:1mm;
      font-size:6.4px;
      font-weight:700;
      line-height:1;
      color:#52606D;
      letter-spacing:.02em;
    }

    /* Body cells – matches screen .wp-cell */
    td{
      border:1px solid #C9D2DC;
      padding:2px 3px;
      vertical-align:top;
      font-size:7.8px;
      word-break:break-word;
      height:var(--row-h,32mm);
      background:#E0E4E8;
    }

    .monteur-row{
      height:var(--row-h,32mm);
      border-top:2px solid #9AA5B1;
      break-inside:avoid;
      page-break-inside:avoid;
    }

    /* Name cell – matches screen .wp-name-cell */
    .mi-cell{
      width:90px;min-width:90px;
      background:#F1F3F5;
      font-weight:800;
      font-size:8.5px;
      color:#102A43;
      vertical-align:middle;
      text-align:left;
      padding:3px 4px 3px 8px;
      border-left:4px solid #9AA5B1;
      box-shadow:0 1px 3px rgba(0,0,0,.08);
    }

    /* Day cell */
    .day-cell{
      background:#E0E4E8;
      padding:3px;
      height:var(--row-h,32mm);
    }
    .day-cell > .card:only-child,
    .day-cell > .card-spec:only-child{
      min-height:calc(var(--row-h,32mm) - 4px);
      height:calc(var(--row-h,32mm) - 4px);
      box-sizing:border-box;
      display:flex;
      flex-direction:column;
      justify-content:center;
      align-items:center;
    }
    .empty-cell{color:#9AA5B1;font-size:6.4px;text-align:center;padding:4px 0;font-weight:700;}

    /* Card – matches screen .wp-card */
    .card{
      border-left:3px solid #9AA5B1;
      border-radius:3px;
      border:1px solid #C9D2DC;
      border-left:3px solid #9AA5B1;
      padding:2px 3px;
      margin:0 0 2px 0;
      background:#F1F3F5;
      box-shadow:0 1px 3px rgba(0,0,0,.08);
      box-sizing:border-box;
      display:flex;
      flex-direction:column;
      justify-content:center;
      align-items:center;
      text-align:center;
      gap:0;
      overflow:hidden;
    }
    .card-nr{
      font-weight:800;
      font-size:10px;
      color:#102A43;
      line-height:1;
      margin:0 0 0.5px 0;
      text-align:center;
      width:100%;
      font-family:monospace;
    }
    .card-name{
      font-size:10px;
      color:#1F2933;
      font-weight:700;
      margin:0 0 0.5px 0;
      line-height:1.1;
      word-break:break-word;
      text-align:center;
      width:100%;
    }
    .card-addr{
      font-size:9px;
      color:#52606D;
      margin:0 0 0.3px 0;
      line-height:1;
      text-align:center;
      width:100%;
    }
    .card-meta{
      display:block;
      margin-top:0.5px;
      text-align:center;
      width:100%;
    }
    .card-bl,.card-nacht{
      display:inline-block;
      font-size:9px;
      font-weight:700;
      line-height:1;
      padding:0.5px 4px;
      margin:0 auto 0.3px auto;
      border-radius:20px;
      white-space:nowrap;
      text-align:center;
    }
    /* matches screen .wp-flag-bl */
    .card-bl{
      background:rgba(202,138,4,.1);
      border:1px solid rgba(202,138,4,.3);
      color:#78350f;
    }
    /* matches screen .wp-flag-nacht */
    .card-nacht{
      background:rgba(124,58,237,.1);
      border:1px solid rgba(124,58,237,.3);
      color:#4c1d95;
    }
    /* Special cards (Urlaub / Nicht im Dienst) */
    .card-spec{
      background:rgba(254,226,226,.93);
      border-left:3px solid #dc2626;
      border:1px solid #fca5a5;
      border-left:3px solid #dc2626;
      padding:3px 5px;
      margin:0;
      border-radius:3px;
      display:flex;
      align-items:center;
      justify-content:center;
    }
    .spec-lbl{font-size:9px;font-weight:700;color:#7f1d1d;line-height:1.2;text-align:center;}

    /* Footer */
    .page-footer{
      flex-shrink:0;
      display:flex;
      justify-content:space-between;
      font-size:7px;
      color:#52606D;
      padding-top:1.5px;
      margin-top:1px;
      border-top:1px solid #9AA5B1;
    }

/* ── WP POPUP STEP 1 / STEP 2 ─────────────────────────────── */
#wpp-step1,
#wpp-step2{
  grid-column:1 / -1;
}

/* Step 2 info box */
#wpp-s2-info{
  font-size:11px;
  color:#0c4a6e;
  line-height:1.45;
}
#wpp-s2-info strong{
  display:block;
  font-size:12px;
  font-weight:800;
  color:#0369a1;
  margin-bottom:2px;
}

/* Step 2 matrix table */
#wpp-s2-matrix table{
  width:100%;
  border-collapse:collapse;
  font-size:11.5px;
}
#wpp-s2-matrix th{
  text-align:center;
  padding:7px 8px;
  border-bottom:2px solid #94a3b8;
  color:#334155;
  font-size:12px;
  font-weight:700;
  background:#f8fafc;
}
#wpp-s2-matrix th:first-child{
  text-align:left;
}
#wpp-s2-matrix td{
  padding:8px 10px;
  border-bottom:1px solid #f1f5f9;
  vertical-align:middle;
}
#wpp-s2-matrix td:first-child{
  font-weight:700;
  white-space:nowrap;
  color:#1e293b;
}
#wpp-s2-matrix td:not(:first-child){
  text-align:center;
}

/* Step 2 toggle cells */
.wpp-s2-cell{
  padding:5px 14px !important;
  border-radius:6px !important;
  cursor:pointer !important;
  font-size:13px !important;
  font-weight:800 !important;
  transition:all .12s !important;
  min-width:70px !important;
  border-width:2px !important;
  border-style:solid !important;
}

/* Step 2 actions bar */
#wpp-acts2{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:12px 18px;
  border-top:1px solid #E0E4E8;
  background:#f8f9fa;
  border-radius:0 0 8px 8px;
  flex-wrap:wrap;
}

/* Projekt-Multi-Select item highlight when checked */
.wpp-proj-item{
  transition:all .12s;
}
.wpp-proj-item:hover{
  background:#f8faff;
}

/* Projekt count badge */
#wpp-proj-count{
  font-size:11px;
  color:#2563eb;
  font-weight:700;
  margin-top:4px;
  min-height:16px;
}

/* Step 2 bulk action buttons */
#wpp-nacht-alle{
  transition:background .12s,transform .1s;
}
#wpp-nacht-alle:hover{
  background:#0369a1 !important;
  transform:scale(1.02);
}
#wpp-nacht-keine{
  transition:background .12s,transform .1s;
}
#wpp-nacht-keine:hover{
  background:#cbd5e1 !important;
  transform:scale(1.02);
}

/* Matrix hover rows */
#wpp-s2-matrix tr:hover td{
  background:#f8fafc;
}