:root{--blue:#246bfd;--ink:#0b2345;--muted:#66809f;--line:#d7e2f3;--bg:#f4f7fb;--card:#fff;--side:#082343;--ok:#16a34a;--warn:#f59e0b;--danger:#dc2626;--soft:#eef5ff}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--ink);font-size:14px}.app-shell{display:flex;min-height:100vh}.side{width:235px;background:linear-gradient(180deg,#082343,#071b34);color:#fff;padding:18px;display:flex;flex-direction:column;gap:18px;position:sticky;top:0;height:100vh}.brand{display:flex;gap:12px;align-items:center}.brand-icon{width:42px;height:42px;border-radius:12px;background:#2f7cff;display:grid;place-items:center;font-weight:800}.brand b{display:block;font-size:18px}.brand span{font-size:12px;color:#9fb9d5}.side nav{display:flex;flex-direction:column;gap:8px}.nav{background:transparent;color:#d7e6fa;border:1px solid transparent;border-radius:12px;padding:12px 14px;text-align:left;font-weight:700;cursor:pointer}.nav:hover,.nav.active{background:#1762d8;color:#fff}.side-foot{margin-top:auto;display:grid;gap:10px}.main{flex:1;min-width:0}.top{height:88px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:50}.top h1{font-size:24px;margin:0 0 4px}.top p{margin:0;color:var(--muted)}.top-status{display:none}.content,.view{padding:22px 28px}.view{display:none}.view.active{display:block}.grid{display:grid;gap:18px}.grid.two{grid-template-columns:minmax(0,1fr) minmax(330px,420px)}.card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 10px 30px rgba(22,50,90,.06);margin-bottom:18px}.card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}.card-head h2,.card-head h3{margin:0;color:#082343}.card-head span,.muted{color:var(--muted)}.form{display:grid;gap:12px}.form.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}.form.three-col{grid-template-columns:repeat(3,minmax(0,1fr));align-items:end}.form label,.toolbar label{font-weight:700;color:#15395f;display:grid;gap:6px}input,select,textarea{height:40px;border:1px solid #bcd0ea;border-radius:10px;background:#fff;padding:0 12px;color:#0b2345;font-weight:600}textarea{height:70px;padding:10px}.btn{border:1px solid #bcd0ea;background:#fff;color:#0b2345;border-radius:10px;padding:10px 14px;font-weight:800;cursor:pointer}.btn:hover{border-color:#246bfd}.btn.primary{background:#246bfd;color:#fff;border-color:#246bfd}.btn.danger{background:#fff4f4;color:#dc2626;border-color:#f5b6b6}.btn.small{padding:7px 10px;font-size:12px}.btn.full{width:100%}.chip{border:1px solid var(--line);background:#f6f9ff;border-radius:999px;padding:8px 12px;font-weight:800}.chip.ok{color:#087a32;background:#eafff1}.chip.warn{color:#a15c00;background:#fff5d8}.actions{margin-top:14px}.flow-list{margin:0;padding-left:22px;line-height:1.8}.compact-list{display:grid;gap:8px}.order-row{display:grid;grid-template-columns:1.1fr 1fr auto;gap:12px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fbfdff}.order-row.selected{border-color:#246bfd;background:#eef5ff}.order-main b{font-size:15px;display:block}.order-main span,.order-meta span{color:var(--muted);font-size:12px}.order-meta{display:flex;gap:10px;flex-wrap:wrap}.order-actions{display:flex;gap:6px;flex-wrap:wrap}.toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.op-picker-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,500px);gap:18px}.op-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px}.op-card{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff}.op-card.picked{background:#f1f7ff}.op-dot{width:14px;height:14px;border-radius:50%}.op-card span,.selected-op span{display:block;color:var(--muted);font-size:12px}.selected-list{display:grid;gap:8px}.selected-op{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fbfdff}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px}.work-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff}.work-table th{position:sticky;top:0;background:#f3f7ff;color:#49698b;font-size:12px;text-transform:uppercase;text-align:left;border-bottom:1px solid var(--line);padding:10px}.work-table td{border-bottom:1px solid var(--line);padding:10px;vertical-align:top}.work-table small{display:block;color:var(--muted);margin-top:3px}.work-split{min-width:120px}.work-split input{width:92px;height:34px;padding:0 8px}.work-split.hours-only input{width:100px}.work-split small{font-size:11px}.cap-table th small{display:block;color:#6b7f99;font-size:11px;text-transform:none;margin-top:3px}.cap-input{width:82px;text-align:center}.alert-box{margin-top:12px}.warn-line,.ok-line{border-radius:10px;padding:10px 12px;margin:6px 0}.warn-line{background:#fff7de;border:1px solid #facc15;color:#92400e}.ok-line{background:#eafff1;border:1px solid #86efac;color:#166534}.gantt-card{padding:0}.gantt-card .card-head{padding:16px 18px;margin:0;border-bottom:1px solid var(--line)}.gantt-toolbar input,.gantt-toolbar select{height:36px}.shift-line{display:flex;border-bottom:1px solid var(--line);background:#fff;overflow-x:auto}.shift-left{width:240px;min-width:240px;padding:10px 14px;font-weight:800;border-right:1px solid var(--line);background:#f8fbff;position:sticky;left:0;z-index:3}.shift-grid{display:flex;min-height:58px}.shift-day{width:192px;border-right:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:24px 34px;text-align:center}.shift-day b{grid-column:1/4;padding-top:6px}.shift-day span{font-weight:800;font-size:12px;padding-top:8px;border-top:1px solid #edf3ff}.shift-day span:nth-child(2){background:#e9faef;color:#15803d}.shift-day span:nth-child(3){background:#fff5df;color:#b45309}.shift-day span:nth-child(4){background:#eef5ff;color:#1d4ed8}.gantt{overflow:auto;max-height:620px;background:#fff}.gantt-table{min-width:900px}.gantt-row{display:flex;border-bottom:1px solid var(--line)}.gantt-label{width:240px;min-width:240px;background:#fbfdff;border-right:1px solid var(--line);padding:12px 14px;position:sticky;left:0;z-index:2}.gantt-label b{display:block}.gantt-label span{font-size:12px;color:var(--muted)}.gantt-track{position:relative;background-image:linear-gradient(to right,rgba(35,107,253,.13) 1px,transparent 1px);background-size:64px 100%;min-height:50px}.empty-lane{position:absolute;left:14px;top:12px;color:#8ba1bc;border:1px dashed #c9d9ef;border-radius:999px;padding:6px 12px;font-size:12px}.gantt-bar{position:absolute;height:28px;border-radius:8px;color:#fff;padding:4px 10px;box-shadow:0 4px 14px rgba(0,0,0,.18);cursor:grab;overflow:hidden;white-space:nowrap;font-size:12px}.gantt-bar b{display:inline;margin-right:8px}.gantt-bar span{font-size:11px;font-weight:700;opacity:.95}.gantt-bar.dragging{cursor:grabbing;opacity:.85;z-index:50}.gantt-table.compact .gantt-bar{height:20px;font-size:11px;padding:2px 8px}.gantt-table.compact .gantt-label{padding:8px 12px}.admin-list{display:grid;gap:8px}.admin-row{display:flex;justify-content:space-between;gap:10px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:10px;background:#fbfdff}.admin-row span{display:block}.admin-row small{display:block;color:var(--muted);font-size:12px;margin-top:2px}.admin-row i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px}.check{display:flex!important;grid-auto-flow:column;align-items:center;gap:8px}.empty{color:#7b91ad;background:#f8fbff;border:1px dashed #c9d9ef;border-radius:12px;padding:18px;text-align:center}.status-planned{outline:0}.status-in_progress{outline:2px solid #2563eb}.status-paused{filter:saturate(.7);outline:2px solid #f59e0b}.status-done{opacity:.65}@media(max-width:1200px){.grid.two,.op-picker-layout{grid-template-columns:1fr}.side{width:210px}.form.two-col,.form.three-col{grid-template-columns:1fr}.order-row{grid-template-columns:1fr}.top{height:auto;align-items:flex-start;padding:18px}.toolbar{align-items:stretch}.toolbar label{min-width:180px}}
/* v20 – test-ready: clean input flow, weekly staffing and resource-based Gantt */
.grid.two.wide-left{grid-template-columns:minmax(520px,1.4fr) minmax(300px,.8fr)}
.work-one{min-width:120px}.work-one input{width:95px;height:36px}.work-one small{font-size:11px;color:var(--muted);display:block;margin-top:4px}
.staffing-note{background:#f8fbff;border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:12px;color:#49698b;font-weight:700}.staffing-grid{display:grid;overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fff;max-height:680px}.staff-cell,.staff-day-head{border-right:1px solid var(--line);border-bottom:1px solid var(--line);min-height:44px;padding:8px;background:#fff;display:grid;align-items:center}.staff-cell.head,.staff-cell.subhead,.staff-day-head{background:#f3f7ff;font-weight:800;color:#15395f}.staff-cell.sticky{position:sticky;left:0;z-index:2}.staff-cell.rowhead{background:#fbfdff}.staff-cell.rowhead small,.staff-cell.subhead small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.staff-input{width:72px;text-align:center;height:32px;padding:0 6px}.staff-day-head{text-align:center;justify-content:center}.status-paused{filter:saturate(.75);outline:2px solid #f59e0b}.status-in_progress{outline:2px solid #16a34a}.status-done{opacity:.55}.work-table th:nth-child(4),.work-table th:nth-child(5),.work-table th:nth-child(6),.work-table th:nth-child(7){text-align:center}.gantt-bar span{display:inline-block}.gantt-bar{min-width:56px}.gantt-toolbar label{min-width:145px}.shift-day{width:192px;display:grid;grid-template-rows:24px 34px}.shift-day b{grid-column:1/-1;padding-top:6px}.shift-day span{font-weight:800;font-size:11px;padding-top:8px;border-top:1px solid #edf3ff}.shift-day span:nth-child(2){background:#e9faef;color:#15803d}.shift-day span:nth-child(3){background:#fff5df;color:#b45309}.shift-day span:nth-child(4){background:#eef5ff;color:#1d4ed8}
/* v20 test ready */
.top-actions{display:none}.work-one{min-width:115px}.work-one input{width:88px}.week-table th,.week-table td{min-width:70px;text-align:center}.week-table .sticky-col{position:sticky;left:0;background:#fbfdff;z-index:5;min-width:180px;text-align:left}.week-table input{width:64px;text-align:center;padding:0 6px}.staffing-note{background:#f8fbff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:14px;color:#315273}.shift-day{grid-auto-flow:column;grid-auto-columns:1fr}.shift-day span{min-width:64px}.status-paused{outline:2px solid #f59e0b;filter:saturate(.75)}.gantt-bar span{display:inline}.gantt-toolbar label{min-width:130px}.admin-row .btn.danger{white-space:nowrap}@media(max-width:1400px){.work-table th,.work-table td{padding:8px}.gantt-toolbar label{min-width:160px}}

/* v23 role based staffing + cleaner hours input */
.work-one input { min-width: 90px; }
.staffing-toolbar { align-items: end; flex-wrap: wrap; }
.staff-legend { display:flex; gap:12px; padding:8px 10px; color:#37537a; font-size:12px; }
.staff-legend span { background:#f7fbff; border:1px solid #d8e5f5; border-radius:999px; padding:5px 9px; }
.table-wrap.wide { overflow:auto; max-height: 68vh; border-radius:14px; }
.staff-table th.staff-day { min-width: 150px; text-align:center; vertical-align:top; }
.staff-table th.staff-day b { display:block; font-size:12px; color:#0b2a50; }
.staff-table th.staff-day small { display:block; color:#55708e; font-size:10px; line-height:1.25; margin-top:2px; }
.staff-table th.staff-day em { display:block; font-style:normal; color:#7890aa; font-size:10px; margin-top:3px; }
.staff-role-cell { min-width:150px; white-space:nowrap; text-align:center; }
.staff-role-cell input { width:32px; min-width:32px; padding:6px 4px; text-align:center; margin:0 2px; border-radius:9px; }
.staff-role-cell input[data-role=assembly] { border-color:#2f80ed; }
.staff-role-cell input[data-role=welding] { border-color:#ef6c00; }
.staff-role-cell input[data-role=cleaning] { border-color:#64748b; }
.staff-role-cell input[data-role=other] { border-color:#7c3aed; }
.work-table td small { display:block; margin-top:4px; color:#60789a; }

/* v26 - widoczniejsza operacja Turrety i edycja daty wysyłki */
.op-card.op-turrety {
  border-color: rgba(232, 121, 249, 0.55);
}
.order-meta span:first-child {
  font-weight: 650;
}


/* v27/v28 - czytelna tabela obsady: nie ściskać, tylko przewijać */
table input[type="number"] { width:54px !important; min-width:54px !important; height:42px !important; font-size:16px !important; font-weight:700 !important; text-align:center !important; padding:6px !important; box-sizing:border-box !important; }
.week-table input,.staff-table input,.staff-role-cell input,.cap-input{width:54px!important;min-width:54px!important;height:42px!important;font-size:16px!important;font-weight:700!important;text-align:center!important;}
.table-wrap,.table-wrap.wide,.staffing-grid,.staffing-table,.week-staffing,.capacity-grid,.capacity-table{overflow-x:auto!important;max-width:100%!important;-webkit-overflow-scrolling:touch!important;}
.week-table th,.week-table td,.staff-table th,.staff-table td{min-width:210px!important;white-space:nowrap!important;}
.week-table th:first-child,.week-table td:first-child,.staff-table th:first-child,.staff-table td:first-child{min-width:220px!important;position:sticky!important;left:0!important;z-index:8!important;background:#fff!important;box-shadow:2px 0 0 rgba(15,23,42,.1)!important;}
input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}


/* v28 - Gantt: wspólna szerokość osi, ścieżka zlecenia, szczegóły operacji */
.shift-line{overflow:hidden!important;position:relative;border-bottom:1px solid var(--line);background:#fff;}
.shift-left{z-index:12!important;box-shadow:2px 0 0 rgba(15,23,42,.08);}
.shift-grid{display:flex!important;transition:none!important;will-change:transform;}
.shift-day{display:grid!important;grid-template-rows:24px 38px!important;border-right:1px solid var(--line);text-align:center;}
.shift-day strong{grid-column:1/-1;padding-top:5px;font-weight:900;color:#0b2a50;}
.shift-day span{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;font-weight:900;border-top:1px solid #e2eaf6;}
.shift-day span small{font-size:10px;color:inherit;opacity:.95;}
.gantt{overflow:auto!important;max-height:68vh!important;background:#fff;position:relative;}
.gantt-table{position:relative!important;background:#fff;}
.gantt-row{display:flex;border-bottom:1px solid var(--line);}
.gantt-label{width:240px!important;min-width:240px!important;position:sticky!important;left:0!important;z-index:5!important;background:#fbfdff!important;box-shadow:2px 0 0 rgba(15,23,42,.08);}
.gantt-track{position:relative!important;overflow:visible!important;background-color:#fff;background-image:linear-gradient(to right,rgba(36,107,253,.12) 1px,transparent 1px),linear-gradient(to bottom,rgba(15,23,42,.06) 1px,transparent 1px);background-size:64px 100%,100% 38px;}
.gantt-bar{height:30px!important;border-radius:8px!important;padding:5px 10px!important;box-shadow:0 5px 14px rgba(15,23,42,.22)!important;border:1px solid rgba(255,255,255,.35);cursor:pointer;}
.gantt-bar.critical{outline:3px solid rgba(239,68,68,.38);box-shadow:0 0 0 3px rgba(239,68,68,.16),0 5px 16px rgba(15,23,42,.24)!important;}
.gantt-bar.dependency-blocked{filter:saturate(.85);background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.18) 0 7px,rgba(255,255,255,.04) 7px 14px);}
.gantt-bar.clipped{border-left-style:dashed!important;border-right-style:dashed!important;}
.gantt-bar b{font-size:12px!important;display:inline-block;margin-right:8px;}
.gantt-bar span{font-size:11px!important;font-weight:800!important;}
.gantt-table.compact .gantt-bar{height:22px!important;padding:3px 8px!important;font-size:11px!important;}
.gantt-table.path-mode .gantt-label{background:#f8fbff!important;}
.gantt-deps-svg{position:absolute;left:240px;top:0;z-index:3;pointer-events:none;overflow:visible;}
.gantt-deps-svg path{fill:none;stroke:#334155;stroke-width:2;stroke-dasharray:5 4;opacity:.55;}
.gantt-deps-svg path.critical{stroke:#ef4444;stroke-width:3;stroke-dasharray:none;opacity:.9;}
.gantt-insights{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr)) auto;gap:10px;padding:12px 16px;border-top:1px solid var(--line);background:#f8fbff;align-items:stretch;}
.gantt-kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:4px;}
.gantt-kpi b{font-size:12px;text-transform:uppercase;color:#49698b;}
.gantt-kpi span{font-weight:850;color:#0b2a50;}
.gantt-kpi.critical{border-color:#fecaca;background:#fff7f7;}
.gantt-detail-panel{position:fixed;right:24px;top:92px;width:380px;max-height:calc(100vh - 120px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 22px 60px rgba(15,23,42,.24);z-index:200;padding:18px;display:none;}
.gantt-detail-panel.open{display:block;}
.gantt-detail-panel h3{margin:0 36px 10px 0;font-size:18px;color:#0b2a50;}
.panel-close{position:absolute;top:10px;right:12px;border:0;background:#eef4ff;border-radius:10px;font-size:22px;width:34px;height:34px;cursor:pointer;}
.detail-pill{display:inline-flex;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:5px 10px;font-weight:900;font-size:12px;margin-bottom:12px;}
.detail-pill.critical{border-color:#fecaca;background:#fee2e2;color:#b91c1c;}
.gantt-detail-panel dl{display:grid;grid-template-columns:130px 1fr;gap:7px 10px;margin:10px 0 16px;}
.gantt-detail-panel dt{font-size:12px;color:#64748b;font-weight:800;text-transform:uppercase;}
.gantt-detail-panel dd{margin:0;font-weight:800;color:#0b2a50;}
.gantt-detail-panel h4{margin:14px 0 8px;color:#0b2a50;}
.gantt-detail-panel ul{margin:0;padding-left:18px;line-height:1.65;}
.gantt-detail-panel li.ok{color:#15803d;font-weight:800;}
.gantt-detail-panel li.bad{color:#b91c1c;font-weight:800;}
.detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;}
.gantt-empty-state{margin:20px;}
@media(max-width:1200px){.gantt-insights{grid-template-columns:1fr}.gantt-detail-panel{left:16px;right:16px;width:auto;top:80px}.gantt-label,.shift-left{width:200px!important;min-width:200px!important}.gantt-deps-svg{left:200px;}}

/* v29 - Druk Windows + MS Project style dla ścieżki krytycznej */
.gantt-print-header{display:none;border:1px solid var(--line);border-radius:14px;background:#fff;padding:12px 16px;margin:0 16px 10px;justify-content:space-between;gap:20px;align-items:flex-start;color:#0b2a50}
.gantt-print-header b{font-size:18px;display:block;margin-bottom:4px}.gantt-print-header span{display:block;color:#49698b;font-weight:700;font-size:12px;margin-top:2px}
.gantt-table.path-mode .gantt-label{border-right:1px solid #cbd8ea;background:linear-gradient(180deg,#f8fbff,#eef5ff)!important}.gantt-table.path-mode .gantt-row{border-bottom:1px solid #d7e4f3}.gantt-table.path-mode .gantt-bar{border-radius:5px!important;height:26px!important;padding:4px 9px!important;box-shadow:0 2px 7px rgba(15,23,42,.22)!important}.gantt-table.path-mode .gantt-bar.critical{outline:0!important;border:2px solid #ef4444!important;box-shadow:0 0 0 2px rgba(239,68,68,.16),0 3px 10px rgba(15,23,42,.25)!important}.gantt-table.path-mode .gantt-bar.critical::after{content:"";position:absolute;inset:-5px;border-radius:8px;border:1px solid rgba(239,68,68,.38);pointer-events:none}.gantt-table.path-mode .gantt-track{background-size:64px 100%,100% 32px;background-color:#fff}
.gantt-deps-svg.msproject{z-index:4}.gantt-deps-svg.msproject path{fill:none;stroke-linejoin:miter;stroke-linecap:square}.gantt-deps-svg.msproject path.normal{stroke:#64748b;stroke-width:1.8;stroke-dasharray:none;opacity:.75}.gantt-deps-svg.msproject path.critical{stroke:#ef4444;stroke-width:2.8;stroke-dasharray:none;opacity:.95}.gantt-deps-svg.msproject .arrow-normal{fill:#64748b}.gantt-deps-svg.msproject .arrow-critical{fill:#ef4444}.gantt-kpi.critical{border-left:5px solid #ef4444}.detail-pill.critical{box-shadow:inset 0 0 0 1px rgba(185,28,28,.2)}
#print-gantt{background:#fff;border-color:#bcd0ea;color:#0b2a50;font-weight:900}#print-gantt:hover{border-color:#246bfd;color:#246bfd}
@media print{
  @page{size:A3 landscape;margin:8mm}
  html,body{background:#fff!important;color:#000!important;overflow:visible!important}
  body.print-mode .side,body.print-mode .top,body.print-mode .nav,body.print-mode .card-head,body.print-mode .gantt-toolbar,body.print-mode .gantt-detail-panel,body.print-mode .no-print,body.print-mode button{display:none!important}
  body.print-mode .app-shell{display:block!important;background:#fff!important}
  body.print-mode .main{margin:0!important;padding:0!important;display:block!important;background:#fff!important;width:100%!important;max-width:none!important}
  body.print-mode .view{display:none!important}body.print-mode #view-gantt{display:block!important}
  body.print-mode .card.gantt-card{box-shadow:none!important;border:0!important;margin:0!important;padding:0!important;background:#fff!important;border-radius:0!important}
  body.print-mode .gantt-print-header{display:flex!important}
  body.print-mode .shift-line{overflow:visible!important;border:1px solid #cbd8ea!important;border-bottom:0!important;margin:0 16px!important;page-break-inside:avoid}
  body.print-mode .gantt{overflow:visible!important;max-height:none!important;margin:0 16px!important;border:1px solid #cbd8ea!important;background:#fff!important}
  body.print-mode .gantt-table{transform-origin:top left!important;page-break-inside:avoid;background:#fff!important}
  body.print-mode .gantt-label,body.print-mode .shift-left{position:relative!important;left:auto!important;background:#f8fbff!important;color:#000!important}
  body.print-mode .gantt-bar{print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important;color:#fff!important;box-shadow:none!important}
  body.print-mode .gantt-insights{display:grid!important;margin:8px 16px 0!important;border:1px solid #cbd8ea!important;background:#fff!important;page-break-inside:avoid}
  body.print-mode .gantt-deps-svg path.critical{stroke:#000!important;stroke-width:3!important}
}



/* PROPLAN v30 - wyraźne linie zmian Z1/Z2/Z3 + poprawa szerokości Gantta */
.shift-grid-v30 {
  overflow: visible !important;
  position: relative !important;
}

.shift-day-v30 {
  border-right: 2px solid #b8c8dc !important;
  box-sizing: border-box !important;
}

.shift-day-v30 > strong {
  border-bottom: 1px solid #bfd0e4 !important;
}

.shift-label {
  position: relative !important;
  border-left: 2px solid rgba(15, 23, 42, 0.18) !important;
  box-sizing: border-box !important;
}

.shift-label:first-of-type {
  border-left: 3px solid rgba(15, 23, 42, 0.30) !important;
}

.shift-label-1 {
  background: #e9f8ec !important;
  color: #075e22 !important;
}

.shift-label-2 {
  background: #fff1dc !important;
  color: #9a3b00 !important;
}

.shift-label-3 {
  background: #e8f2ff !important;
  color: #003e9a !important;
}

/* Linie zmian w całej siatce Gantta */
.gantt-track {
  position: relative !important;
  background-color: #fff !important;
}

.gantt-shift-line {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.gantt-shift-line.shift-start {
  border-left: 1.5px dashed rgba(30, 64, 175, 0.33) !important;
}

.gantt-shift-line.day-start {
  border-left: 3px solid rgba(15, 23, 42, 0.26) !important;
}

.gantt-shift-line.shift-1 {
  border-left-color: rgba(22, 163, 74, 0.45) !important;
}

.gantt-shift-line.shift-2 {
  border-left-color: rgba(234, 88, 12, 0.48) !important;
}

.gantt-shift-line.shift-3 {
  border-left-color: rgba(37, 99, 235, 0.45) !important;
}

.gantt-bar {
  z-index: 3 !important;
}

.gantt-deps-svg {
  z-index: 2 !important;
}

/* Druk: linie zmian muszą być mocne i wyraźne na A3/A1/A0 */
@media print {
  .shift-day-v30 {
    border-right: 2.5px solid #4b5563 !important;
  }

  .shift-label {
    border-left: 2px solid #4b5563 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .shift-label-1 {
    background: #dff5e4 !important;
  }

  .shift-label-2 {
    background: #ffe8bf !important;
  }

  .shift-label-3 {
    background: #dbeafe !important;
  }

  .gantt-shift-line.shift-start {
    border-left: 1.8px dashed #4b5563 !important;
  }

  .gantt-shift-line.day-start {
    border-left: 3px solid #111827 !important;
  }

  .gantt-track {
    background-color: #fff !important;
  }
}


/* PROPLAN v31 - poprawka zamykania panelu i rzeczywistych granic zmian */
.shift-grid-v31 {
  overflow: visible !important;
  position: relative !important;
  display: flex !important;
  align-items: stretch !important;
}

.shift-day-v31 {
  position: relative !important;
  display: block !important;
  height: 76px !important;
  border-right: 3px solid #a9bad0 !important;
  box-sizing: border-box !important;
  background: #f8fbff !important;
}

.shift-day-v31 > strong {
  display: block !important;
  height: 26px !important;
  line-height: 26px !important;
  text-align: center !important;
  font-weight: 900 !important;
  color: #0b2a50 !important;
  border-bottom: 1px solid #c3d2e5 !important;
  background: #f1f6fc !important;
}

.shift-day-body {
  position: relative !important;
  height: 50px !important;
}

.shift-day-v31 .shift-label {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border-left: 2px solid rgba(15, 23, 42, 0.28) !important;
  border-right: 2px solid rgba(15, 23, 42, 0.18) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.shift-day-v31 .shift-label b {
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

.shift-day-v31 .shift-label small {
  font-size: 10px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
}

.shift-label-1 { background: #e2f8e9 !important; color: #075e22 !important; }
.shift-label-2 { background: #fff0d5 !important; color: #9a3b00 !important; }
.shift-label-3 { background: #e4f0ff !important; color: #003e9a !important; }
.shift-label-4 { background: #f1e8ff !important; color: #5b21b6 !important; }

.gantt-shift-line.shift-boundary,
.gantt-shift-line.shift-start,
.gantt-shift-line.shift-end {
  border-left: 2px dashed rgba(30, 64, 175, 0.38) !important;
}

.gantt-shift-line.day-start {
  border-left: 4px solid rgba(15, 23, 42, 0.32) !important;
}

.gantt-shift-line.shift-1 { border-left-color: rgba(22, 163, 74, 0.55) !important; }
.gantt-shift-line.shift-2 { border-left-color: rgba(234, 88, 12, 0.58) !important; }
.gantt-shift-line.shift-3 { border-left-color: rgba(37, 99, 235, 0.55) !important; }
.gantt-shift-line.shift-4 { border-left-color: rgba(124, 58, 237, 0.55) !important; }

.panel-close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  user-select: none !important;
  z-index: 260 !important;
}

.panel-close:hover {
  background: #dbeafe !important;
  color: #0b2a50 !important;
  transform: translateY(-1px);
}

@media print {
  .shift-day-v31 {
    border-right: 3px solid #111827 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .shift-day-v31 > strong {
    border-bottom: 1.5px solid #111827 !important;
    background: #eef2f7 !important;
  }

  .shift-day-v31 .shift-label {
    border-left: 2.4px solid #111827 !important;
    border-right: 1.8px solid #4b5563 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .gantt-shift-line.shift-boundary,
  .gantt-shift-line.shift-start,
  .gantt-shift-line.shift-end {
    border-left: 2.2px dashed #374151 !important;
  }

  .gantt-shift-line.day-start {
    border-left: 4px solid #111827 !important;
  }
}
