:root{
  --blue:#1f5eff;--dark:#111827;--muted:#6b7280;--line:#e5e7eb;--bg:#f7f8fb;
  --green:#17a673;--orange:#f59e0b;--purple:#8b5cf6;--red:#dc2626
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,'Noto Sans Hebrew',sans-serif;background:var(--bg);color:var(--dark)}
.page,body>h1,body>.doc-list{width:100%;max-width:none;margin:0;padding:14px}
.top{background:white;border-bottom:1px solid var(--line);padding:18px 28px;display:flex;justify-content:space-between;gap:12px;align-items:center}
.top h1{font-size:26px;margin:0}
.card{background:white;border:1px solid var(--line);border-radius:12px;padding:12px;box-shadow:0 8px 24px rgba(0,0,0,.04);margin-top:12px}
.grid{display:grid;grid-template-columns:minmax(680px,1fr) minmax(760px,1.25fr);gap:12px;align-items:start}
.tasks-collapsed{max-width:none;padding-left:6px;padding-right:6px}.tasks-collapsed .grid{grid-template-columns:1fr}.tasks-collapsed .tasks-card{display:none}.tasks-collapsed .gantt-card{width:100%;min-height:70vh}.tasks-collapsed .gantt{max-height:78vh;overflow:auto}.tasks-collapsed .timeline{min-width:1180px}.tasks-collapsed .bar{height:32px;font-size:14px}.tasks-collapsed .row{min-height:58px}.tasks-collapsed .day-cell{height:58px}
.tasks-only{max-width:none;padding-left:6px;padding-right:6px}.tasks-only .grid{grid-template-columns:1fr}.tasks-only .gantt-card{display:none}.tasks-only .tasks-card{width:100%;overflow-x:auto}.tasks-only .tasks-table{min-width:1450px}
.controls{display:flex;gap:10px;flex-wrap:wrap;align-items:end}
label{display:block;font-weight:700;font-size:13px;margin-bottom:6px}
input,textarea,select{border:1px solid #d1d5db;border-radius:10px;padding:10px 12px;font-size:15px;background:white;font-family:inherit}
textarea{resize:vertical;line-height:1.35}
button{border:0;border-radius:14px;padding:12px 16px;font-size:15px;font-weight:800;cursor:pointer}
.primary{background:var(--blue);color:white}.print{background:#111827;color:white}.secondary{background:#eef2ff;color:#1e3a8a}.danger{background:#fee2e2;color:#991b1b}.mini{padding:8px 10px;font-size:12px;border-radius:10px}
table{width:100%;border-collapse:collapse;font-size:14px;table-layout:fixed}
th,td{border-bottom:1px solid var(--line);padding:10px 8px;vertical-align:top;overflow-wrap:anywhere;line-height:1.45}
th{text-align:right;background:#f9fafb}
.tasks-table th:nth-child(1),.tasks-table td:nth-child(1){width:42px;text-align:center}
.tasks-table th:nth-child(2),.tasks-table td:nth-child(2){width:18%}
.tasks-table th:nth-child(3),.tasks-table td:nth-child(3){width:86px}
.tasks-table th:nth-child(4),.tasks-table td:nth-child(4){width:13%}
.tasks-table th:nth-child(5),.tasks-table td:nth-child(5){width:54px;text-align:center}
.tasks-table th:nth-child(6),.tasks-table td:nth-child(6){width:150px;text-align:center}
.tasks-table th:nth-child(7),.tasks-table td:nth-child(7){width:92px;text-align:center}
.tasks-table th:nth-child(8),.tasks-table td:nth-child(8){width:auto}
.tasks-table th:nth-child(9),.tasks-table td:nth-child(9){width:58px;text-align:center}
.days{font-weight:800;font-size:18px;color:#1e3a8a}.num{font-weight:800;color:#6b7280}
.edit-text{width:100%;min-width:0}.duration-input{width:58px;text-align:center;padding:8px}.lane-input,.owner-select,.deps-input{width:100%;min-width:0;text-align:center;padding:8px}.actual-grid{display:grid;grid-template-columns:1fr 56px;gap:4px}.actual-grid select,.actual-grid input{width:100%;padding:6px 5px;font-size:12px;border-radius:8px}.actual-grid input[type=date]{grid-column:span 2}.status-pill{display:inline-block;border-radius:999px;padding:3px 8px;font-size:12px;font-weight:800;background:#f1f5f9;color:#334155}.status-pill.completed{background:#dcfce7;color:#166534}.status-pill.in_progress{background:#dbeafe;color:#1d4ed8}.status-pill.blocked{background:#fee2e2;color:#991b1b}
.small{font-size:12px;color:var(--muted);line-height:1.45}.toolbar-card{margin-top:14px}.deps-help{margin-top:10px}.deps-help b{direction:ltr;display:inline-block;color:#1e3a8a}
.warn{border-color:#fecaca;background:#fff7f7}.warn b{color:#991b1b}.warn ul{margin:8px 0 0}.warn li{color:#991b1b;font-weight:700}
.lane-pill,.deps-pill{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:3px 8px;background:#f8fafc;font-size:12px;font-weight:700}.deps-pill{direction:ltr;color:#334155}
.gantt{overflow-x:auto;direction:ltr;padding-bottom:8px}.gantt-head{display:flex;justify-content:space-between;align-items:center;gap:12px;direction:rtl}.gantt-head h2{margin:0}.gantt-actions{display:flex;gap:8px;flex-wrap:wrap}.timeline{min-width:840px;position:relative}.dep-svg{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:visible}.dep-link{fill:none;stroke:#64748b;stroke-width:1.8;stroke-dasharray:4 3;opacity:.75}
.scale{display:grid;border-bottom:1px solid var(--line);font-size:12px;color:#4b5563;position:relative;z-index:1}.scale div{border-left:1px solid #eef0f3;text-align:center;padding:6px 2px;min-height:28px}
.lane-header{display:grid;background:#eef2ff;color:#1e3a8a;font-weight:900;border-bottom:1px solid var(--line);min-height:34px;align-items:center;position:relative;z-index:1}.lane-header>div{padding:8px 10px;direction:rtl;text-align:right}
.row{display:grid;align-items:center;min-height:52px;border-bottom:1px solid #f0f1f4;position:relative;z-index:1}.day-cell{border-left:1px solid #f1f2f4;height:52px}.gantt-label{direction:rtl;text-align:right;padding-left:10px;font-size:13px;font-weight:700}.gantt-label b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar{height:28px;border-radius:999px;color:white;display:flex;flex-direction:column;gap:1px;align-items:center;justify-content:center;font-size:12px;font-weight:800;padding:2px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;z-index:3;box-shadow:0 3px 8px rgba(0,0,0,.12)}.bar.critical{background:#dc2626!important;border:2px solid #7f1d1d}.bar.completed{background:#16a34a!important}.bar.delayed:not(.critical){background:#f97316!important}.progress-fill{position:absolute;inset:0 auto 0 0;background:rgba(0,0,0,.22);z-index:0}.baseline-bar{height:5px;border-radius:999px;background:#94a3b8;align-self:end;margin-bottom:4px;z-index:2;opacity:.9}.bar-title,.bar-owner{position:relative;z-index:1}.bar-title{max-width:100%;overflow:hidden;text-overflow:ellipsis}.bar-owner{max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:10px;font-weight:700;opacity:.9}.bar.milestone{border-radius:6px;min-width:24px;transform:rotate(45deg)}.bar.milestone .bar-title,.bar.milestone .bar-owner{transform:rotate(-45deg);font-size:9px}
.summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.metric{background:white;border:1px solid var(--line);border-radius:16px;padding:14px}.metric b{font-size:22px;display:block}.metric span{color:var(--muted)}
.revs li,.doc-list li{background:white;border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:8px;list-style:none}.doc-list a{font-weight:800;color:#1d4ed8;text-decoration:none;display:block}.doc-list span{color:var(--muted);font-size:13px}
.login{max-width:430px;margin:15vh auto;background:white;border:1px solid var(--line);border-radius:18px;padding:24px}.login input{width:100%;margin-bottom:12px}.login button{width:100%;background:var(--blue);color:white}.err{color:var(--red);font-weight:700}
.is-view .tasks-card{box-shadow:0 10px 30px rgba(0,0,0,.05)}
.is-view .tasks-table td{font-size:15px}.is-edit .grid{grid-template-columns:minmax(760px,1.1fr) minmax(560px,0.9fr)}
.tasks-collapsed.is-edit .grid{grid-template-columns:1fr}.tasks-only.is-edit .grid{grid-template-columns:1fr}.tasks-only.is-edit .tasks-card{display:block;width:100%;overflow-x:auto}.tasks-only.is-edit .gantt-card{display:none}
.gantt-card:fullscreen{background:white;overflow:auto;border-radius:0;padding:20px}.gantt-card:fullscreen .gantt{height:calc(100vh - 86px);max-height:none;overflow:auto}.gantt-card:fullscreen .timeline{min-width:1320px}.gantt-card:fullscreen .bar{height:34px;font-size:14px}.gantt-card:fullscreen .row{min-height:60px}.gantt-card:fullscreen .day-cell{height:60px}.gantt-card:fullscreen .scale{position:sticky;top:0;background:white;z-index:5}
@media(max-width:1150px){.grid,.is-edit .grid,.summary{grid-template-columns:1fr}.top{display:block}.controls{margin-top:12px}.timeline{min-width:760px}}
@media(max-width:700px){.page{padding:14px}.tasks-table{font-size:13px}.tasks-table th:nth-child(3),.tasks-table td:nth-child(3),.tasks-table th:nth-child(4),.tasks-table td:nth-child(4){display:none}.timeline{min-width:700px}}
@page{size:A3 landscape;margin:6mm}
@media print{
  html,body{background:white;width:100%;height:auto;overflow:visible}
  body{font-size:9px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .no-print,.controls,.savebox,.revs-card{display:none!important}
  .top{display:none!important}
  .page{max-width:none;padding:0;zoom:var(--print-scale,0.72)}
  .summary{grid-template-columns:repeat(3,1fr);gap:4px;margin-bottom:4px}
  .metric{padding:5px 7px;border-radius:8px}.metric b{font-size:14px}.metric span{font-size:9px}
  .card{box-shadow:none;border-radius:6px;margin-top:4px;padding:5px;break-inside:avoid;page-break-inside:avoid}
  .grid,.is-edit .grid,.tasks-only.is-edit .grid{display:grid;grid-template-columns:0.9fr 1.1fr!important;gap:5px;align-items:start}
  .tasks-card,.gantt-card{display:block!important;width:auto!important;overflow:visible!important}
  h2{font-size:13px;margin:0 0 4px}.tasks-table{min-width:0!important;font-size:8.5px;table-layout:fixed}.tasks-table th,.tasks-table td{padding:3px 3px;line-height:1.18}
  .tasks-table th:nth-child(1),.tasks-table td:nth-child(1){width:24px}.tasks-table th:nth-child(2),.tasks-table td:nth-child(2){width:22%}.tasks-table th:nth-child(3),.tasks-table td:nth-child(3){width:54px}.tasks-table th:nth-child(4),.tasks-table td:nth-child(4){width:13%}.tasks-table th:nth-child(5),.tasks-table td:nth-child(5){width:30px}.tasks-table th:nth-child(6),.tasks-table td:nth-child(6){width:76px}.tasks-table th:nth-child(7),.tasks-table td:nth-child(7){width:48px}
  .small{font-size:7.5px}.days{font-size:10px}.lane-pill,.deps-pill,.status-pill{font-size:7.5px;padding:1px 4px}
  .gantt{overflow:visible;padding:0}.timeline{min-width:0!important}.dep-svg{display:none}
  .scale{font-size:7px}.scale div{min-height:15px;padding:2px 0}.lane-header{min-height:18px}.lane-header>div{padding:3px 5px;font-size:9px}
  .row{min-height:25px}.day-cell{height:25px}.gantt-label{font-size:8px;padding-left:3px}.bar{height:15px;font-size:7.5px;padding:1px 3px;box-shadow:none}.bar-owner{display:none}.baseline-bar{height:2px;margin-bottom:2px}
}
