/* WBS and MTO workspaces */
.planning-flow{margin-block:18px 28px;border:1px solid #d5e5f4;border-radius:22px;background:#fff;box-shadow:0 13px 35px #174b7710;overflow:hidden}
.planning-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:25px 28px;background:linear-gradient(112deg,#e8f4ff,#f6fbff 70%,#fff);border-bottom:1px solid #dceaf6}
.planning-hero h2{margin:8px 0 6px;color:#153d65;font-size:22px}.planning-hero p{margin:0;color:#54728c;font-size:13px;line-height:1.8;max-width:680px}
.planning-status{display:grid;gap:3px;min-width:130px;padding:12px 18px;border:1px solid #bdd7ef;border-radius:14px;background:#f0f8ff;color:#1c6094;text-align:center;font-size:12px;font-weight:750}
.planning-status.locked{background:#e8f6fb;color:#145f84;border-color:#a8d5e5}.planning-status.draft{background:#fff7e6;color:#986719;border-color:#e7d6a8}.planning-status small{font-size:10px;font-weight:500}
.planning-toolbar{display:flex;gap:9px;flex-wrap:wrap;padding:17px 26px}.planning-caption{margin:0;padding:0 26px 14px;color:#5a7892;font-size:12px}.planning-tree{padding:0 22px 23px}
.planning-node,.planning-task{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:5px 0;padding:12px 14px;margin-inline-start:calc(var(--depth) * 22px);border-radius:12px;border:1px solid #d8e7f5;background:#f4f9ff;min-width:0}
.planning-node-main{display:flex;align-items:center;flex-wrap:wrap;gap:11px;min-width:0}.planning-node-main strong{font-size:13px;color:#194670}.planning-node-main small,.planning-task small{color:#7893aa;font-size:11px}.planning-node-actions{display:flex;gap:6px;flex-wrap:wrap}.planning-task{justify-content:flex-start;background:#fff;border-style:dashed;color:#2c5679;font-size:12px}.planning-task .tiny{margin-inline-start:auto}
.planning-code{padding:4px 8px;border-radius:7px;background:#e0eefc;color:#286c9e;font:700 11px/1.4 ui-monospace,Consolas,monospace;white-space:nowrap}
.planning-approval,.planning-import-summary{margin:12px 26px;padding:18px;border:1px solid #c3dbef;border-radius:14px;background:#f4faff}.planning-approval p{line-height:1.8}.planning-warning,.planning-error{padding:10px 12px;border-radius:9px;line-height:1.7}.planning-warning{background:#fff8e8;color:#725411}.planning-error{background:#fff0ee;color:#9d3531}
.planning-upload{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:20px 26px}.planning-upload label{display:grid;gap:8px;min-width:min(100%,310px);color:#355e81;font-size:12px}.planning-upload input{padding:10px;border:1px solid #bfd5e9;border-radius:9px}.planning-map-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,1fr);gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid #dce9f5}.planning-map-row select{padding:7px;border:1px solid #c7ddec;border-radius:7px}.planning-field-title{font-size:14px;font-weight:700;color:#285e8c}.planning-dependencies{max-height:280px;overflow:auto;padding:12px;border:1px solid #d4e5f1;border-radius:12px}.planning-dependencies>div{display:flex;gap:8px;align-items:center;margin:6px 0}.planning-dependencies label{flex:1}.planning-dependencies select{width:78px}.planning-dependencies input[type=number]{width:72px}
.planning-flow>.data-table,.planning-flow>.table-wrap{margin:15px 24px 24px;max-width:calc(100% - 48px)}
@media(max-width:680px){.planning-hero{padding:20px}.planning-toolbar{padding:15px 18px}.planning-tree{padding:0 12px 20px}.planning-node,.planning-task{margin-inline-start:calc(var(--depth) * 9px);flex-wrap:wrap}.planning-node-actions{width:100%}.planning-map-row{grid-template-columns:1fr}.planning-dependencies>div{flex-wrap:wrap}}

/* Read-only EPC WBS template preview; saving uses the separate dialog action. */
dialog.planning-template-dialog{width:min(850px,calc(100vw - 24px));max-width:850px;max-height:92dvh;padding:0;border:1px solid #d5e6f5;border-radius:24px;background:#f5f9fe;box-shadow:0 28px 85px #153b6050;overflow:hidden;direction:rtl}
#dialog.planning-template-dialog #entity-form{display:flex;flex-direction:column;max-height:92dvh;min-height:0;padding:0;overflow:hidden}
#dialog.planning-template-dialog .modal-head{flex:none;margin:0;padding:18px 25px;border-bottom:1px solid #dbe8f3;background:white}
#dialog.planning-template-dialog #form-fields{display:block;flex:1 1 auto;min-height:0;max-height:none;overflow:auto;padding:22px 25px!important;background:#f5f9fe}
#dialog.planning-template-dialog #form-error{flex:none;margin:0 25px 8px}
#dialog.planning-template-dialog #form-error:empty{display:none}
#dialog.planning-template-dialog .modal-actions{flex:none;display:flex;gap:10px;margin:0;padding:15px 25px;background:white;border-top:1px solid #dbe8f3}
.planning-template-preview{display:grid;gap:16px;text-align:right}
.planning-template-intro{padding:18px 20px;border:1px solid #c7e0f7;border-radius:18px;background:linear-gradient(120deg,#e9f4ff,#fff);color:#28577d}
.planning-template-intro .eyebrow{color:#2971af;font-weight:800}
.planning-template-intro p{margin:8px 0 0;line-height:1.9;font-size:13px}
.planning-template-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.planning-template-summary>div{display:flex;align-items:center;gap:10px;padding:12px 15px;border:1px solid #dae9f6;border-radius:14px;background:#fff;color:#567791;font-size:12px}
.planning-template-summary b{display:grid;place-items:center;min-width:37px;height:37px;border-radius:10px;background:#e6f2ff;color:#1761a4;font-size:17px}
.planning-template-tree>ul{display:grid;gap:11px;list-style:none;margin:0;padding:0}
.planning-template-tree>ul>li{padding:15px;border:1px solid #d8e8f6;border-radius:17px;background:#fff;box-shadow:0 8px 23px #1c517410}
.planning-template-branch{display:flex;align-items:center;gap:10px;min-width:0;color:#1b456e;font-size:13px}
.planning-template-branch strong{min-width:0;overflow-wrap:anywhere}
.planning-template-tree>ul>li>.planning-template-branch{font-size:15px}
.planning-template-tree ul ul{display:grid;gap:8px;list-style:none;margin:12px 14px 0 0;padding:0 14px 0 0;border-right:2px solid #cfe2f4}
.planning-template-tree ul ul li{padding:8px 10px;border-radius:10px;background:#f5f9fd}
.planning-template-note{margin:0;padding:12px 15px;border:1px solid #e7d8b7;border-radius:12px;background:#fffaf0;color:#76592e;line-height:1.8;font-size:12px}
@media(max-width:680px){#dialog.planning-template-dialog .modal-head,#dialog.planning-template-dialog #form-fields,#dialog.planning-template-dialog .modal-actions{padding-inline:16px!important}.planning-template-summary{grid-template-columns:1fr}.planning-template-tree ul ul{margin-right:6px;padding-right:9px}.planning-template-branch{flex-wrap:wrap}#dialog.planning-template-dialog .modal-actions{flex-wrap:wrap}}

/* Final WBS submission dialog */
dialog.planning-lock-dialog{width:min(780px,calc(100vw - 24px));max-width:780px;max-height:92dvh;padding:0;border:1px solid #cfe2f4;border-radius:26px;background:#f7fbff;box-shadow:0 30px 90px #123f6330;overflow:hidden;direction:rtl}
#dialog.planning-lock-dialog #entity-form{display:flex;flex-direction:column;max-height:92dvh;min-height:0;padding:0;overflow:hidden}
#dialog.planning-lock-dialog .modal-head{flex:none;margin:0;padding:25px 30px 21px;background:linear-gradient(135deg,#ffffff 0%,#eff7ff 100%);border-bottom:1px solid #dceaf6}
#dialog.planning-lock-dialog .modal-head h2{margin:7px 0 0;color:#153d65;font-size:24px;letter-spacing:-.03em}
#dialog.planning-lock-dialog .modal-head .eyebrow{color:#2874b4;letter-spacing:.04em}
#dialog.planning-lock-dialog #form-fields{display:grid;grid-template-columns:1fr;gap:17px;flex:1 1 auto;min-height:0;max-height:none;overflow:auto;padding:25px 30px 18px;background:#f7fbff}
#dialog.planning-lock-dialog #form-fields>.full{grid-column:1/-1}
.planning-lock-intro{display:flex;align-items:flex-start;gap:15px;padding:19px 20px;border:1px solid #c9e1f5;border-radius:18px;background:linear-gradient(120deg,#e8f5ff,#fff);color:#234f72}
.planning-lock-icon{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:14px;background:#237ac2;color:#fff;font-size:25px;font-weight:900;box-shadow:0 8px 18px #237ac236}
.planning-lock-intro h3{margin:5px 0 6px;color:#17466f;font-size:17px}
.planning-lock-intro p{margin:0;color:#56758e;font-size:12px;line-height:1.95}
.planning-lock-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.planning-lock-steps>div{display:flex;align-items:flex-start;gap:9px;min-width:0;padding:14px 12px;border:1px solid #d6e7f4;border-radius:14px;background:#fff}
.planning-lock-steps b{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:9px;background:#e3f1ff;color:#1c6ead;font-size:12px}
.planning-lock-steps span{display:grid;gap:4px;min-width:0}
.planning-lock-steps strong{color:#285a80;font-size:11px;line-height:1.55}
.planning-lock-steps small{color:#718ba0;font-size:10px;line-height:1.7}
.planning-lock-check{display:flex!important;align-items:flex-start;gap:12px;padding:16px 18px;border:1px solid #9fc9e9;border-radius:15px;background:#edf7ff;color:#255678;cursor:pointer}
.planning-lock-check input{flex:none;width:20px;height:20px;margin:2px 0 0;accent-color:#237ac2}
.planning-lock-check span{display:grid;gap:4px}
.planning-lock-check strong{font-size:12px;line-height:1.7}
.planning-lock-check small{color:#66839a;font-size:10px;line-height:1.7}
#dialog.planning-lock-dialog #form-error{flex:none;margin:0 30px 8px}
#dialog.planning-lock-dialog .modal-actions{flex:none;justify-content:flex-start;gap:10px;margin:0;padding:17px 30px 23px;background:#fff;border-top:1px solid #dceaf6}
#dialog.planning-lock-dialog #submit-dialog{background:linear-gradient(135deg,#1976c5,#1764a7);box-shadow:0 10px 24px #1976c52b;padding-inline:22px}
#dialog.planning-lock-dialog #submit-dialog:hover{background:linear-gradient(135deg,#176db5,#155a96)}
@media(max-width:680px){dialog.planning-lock-dialog{width:calc(100vw - 14px);border-radius:21px}#dialog.planning-lock-dialog .modal-head{padding:20px 18px 17px}#dialog.planning-lock-dialog .modal-head h2{font-size:20px}#dialog.planning-lock-dialog #form-fields{padding:18px 16px 14px}.planning-lock-intro{padding:15px}.planning-lock-icon{width:40px;height:40px;border-radius:12px;font-size:21px}.planning-lock-intro h3{font-size:15px}.planning-lock-steps{grid-template-columns:1fr}.planning-lock-steps>div{padding:12px}.planning-lock-check{padding:14px 13px}#dialog.planning-lock-dialog .modal-actions{padding:14px 16px 18px;flex-wrap:wrap}#dialog.planning-lock-dialog .modal-actions .btn{flex:1 1 150px}}

/* WBS approval call-to-action */
.planning-approval{display:flex;flex-direction:column;align-items:stretch;gap:9px;margin:12px 26px;padding:20px 22px;border:1px solid #a9d2f1;border-radius:17px;background:linear-gradient(120deg,#f2f9ff 0%,#e8f4ff 100%);box-shadow:0 8px 22px #1d6eaa12;direction:rtl}
.planning-approval>strong{color:#154f7c;font-size:15px;line-height:1.8}
.planning-approval>p{margin:0;color:#547794;font-size:12px;line-height:1.9}
.planning-approval .planning-decision-btn{align-self:flex-end;margin-right:auto;margin-left:0;width:min(300px,100%);min-height:56px;margin-top:8px;border:1px solid #1469ad;border-radius:13px;background:linear-gradient(135deg,#2184d2,#1265ab);color:#fff;font-size:14px;font-weight:850;box-shadow:0 12px 24px #1469ad33;justify-content:center;letter-spacing:-.01em}
.planning-approval .planning-decision-btn:hover{transform:translateY(-2px);background:linear-gradient(135deg,#2b91df,#105c9e);box-shadow:0 15px 28px #1469ad42}
.planning-approval .planning-decision-btn:focus-visible{outline:3px solid #8dcbf5;outline-offset:3px}
@media(max-width:680px){.planning-approval{margin:12px 12px;padding:16px}.planning-approval .planning-decision-btn{align-self:stretch;width:100%;min-height:52px;font-size:13px}}
/* Technical MTO item workspace */
dialog.mto-item-dialog{width:min(1120px,calc(100vw - 22px));max-width:1120px;max-height:94dvh;padding:0;border:1px solid #cfe0ef;border-radius:26px;background:#f5f9fd;box-shadow:0 30px 100px #153d6238;overflow:hidden;direction:rtl}
#dialog.mto-item-dialog #entity-form{display:flex;flex-direction:column;max-height:94dvh;min-height:0;padding:0;overflow:hidden}
#dialog.mto-item-dialog .modal-head{flex:none;margin:0;padding:24px 30px 20px;background:linear-gradient(135deg,#fff,#eef7ff);border-bottom:1px solid #dceaf5}
#dialog.mto-item-dialog .modal-head h2{margin:7px 0 0;color:#173f64;font-size:24px}
#dialog.mto-item-dialog #form-fields{display:block;flex:1;min-height:0;max-height:none;overflow:auto;padding:0;background:#f5f9fd}
#dialog.mto-item-dialog #form-error{flex:none;margin:0 30px 8px}
#dialog.mto-item-dialog .modal-actions{flex:none;margin:0;padding:16px 30px 22px;background:#fff;border-top:1px solid #dceaf5}
.mto-form-shell{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(0,1.55fr);gap:0;min-height:620px;direction:rtl}
.mto-wbs-picker{min-width:0;padding:24px 22px;border-left:1px solid #d7e6f2;background:linear-gradient(180deg,#edf7ff,#f7fbff);display:flex;flex-direction:column;gap:14px}
.mto-picker-head h3,.mto-editor-head h3{margin:5px 0;color:#194c75;font-size:17px}.mto-picker-head p{margin:0;color:#65829a;font-size:11px;line-height:1.8}
.mto-wbs-tree{display:grid;gap:7px;overflow:auto;min-height:240px;max-height:480px;padding:3px 2px 4px}
.mto-wbs-group{display:grid;gap:5px;margin-right:calc(var(--mto-depth) * 12px)}
.mto-node-choice,.mto-task-choice{display:flex;align-items:center;gap:8px;width:100%;border:1px solid #d5e6f3;border-radius:12px;background:#fff;text-align:right;color:#245675;padding:10px 11px;font:inherit;transition:.18s;min-width:0}
.mto-node-choice:hover,.mto-task-choice:hover{border-color:#71b0df;box-shadow:0 4px 13px #2474a514}.mto-node-choice.selected{border-color:#2585ca;background:#e6f4ff;box-shadow:0 5px 15px #2585ca1c}.mto-node-choice .mto-node-code{flex:none;padding:4px 6px;border-radius:7px;background:#dceeff;color:#1f6caa;font:700 10px ui-monospace,Consolas,monospace}.mto-node-choice span:nth-child(2),.mto-task-choice span:nth-child(2){display:grid;gap:2px;min-width:0;flex:1}.mto-node-choice b,.mto-task-choice b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mto-node-choice small,.mto-task-choice small{color:#7590a3;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mto-node-choice i{font-style:normal;color:#2b87c9;font-weight:900}.mto-task-choice{margin-right:16px;padding:8px 10px;background:#fafdff;border-style:dashed}.mto-task-choice.selected{border-color:#2585ca;background:#e5f4ff}.mto-task-dot{color:#3d91cd;font-size:17px;line-height:1}.mto-selection-summary{margin-top:auto;padding:13px 14px;border:1px solid #b8d9f0;border-radius:13px;background:#fff;color:#456d87;display:grid;gap:4px;font-size:11px;line-height:1.7}.mto-selection-summary b{color:#176cae;font-size:15px}.mto-selection-summary small{color:#6a879c}.mto-empty-tree,.mto-panel-empty{padding:18px;border:1px dashed #bfd7e8;border-radius:12px;color:#7390a3;text-align:center;font-size:11px}
.mto-item-editor{position:relative;min-width:0;padding:25px 29px 30px;background:#fff}.mto-editor-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:17px;margin-bottom:19px;border-bottom:1px solid #e5eef5}.mto-line-badge{padding:8px 12px;border-radius:10px;background:#e9f4ff;color:#2373ad;font-size:11px;font-weight:800;white-space:nowrap}.mto-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.mto-form-grid label{display:grid;gap:7px;color:#41657e;font-size:11px;font-weight:800}.mto-form-grid input,.mto-form-grid select,.mto-form-grid textarea{border-color:#d5e2ea;background:#fbfdff;border-radius:11px;font-size:12px}.mto-form-grid textarea{line-height:1.9;resize:vertical}.mto-form-grid .full{grid-column:1/-1}.mto-material-block,.mto-technical-block{display:grid;gap:9px;padding:14px;border:1px solid #dceaf4;border-radius:15px;background:#f8fbfe}.mto-field-title{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#285875;font-size:12px;font-weight:850}.mto-field-title small{color:#8198a8;font-size:10px;font-weight:500}.mto-picker-button,.mto-outline-button{border:1px solid #8fc3e8;border-radius:10px;background:#edf7ff;color:#176aa8;min-height:42px;padding:9px 13px;font:inherit;font-size:11px;font-weight:800}.mto-picker-button:hover,.mto-outline-button:hover{background:#dff0ff}.mto-picker-button:disabled{opacity:.5;cursor:not-allowed}.mto-inline-quantity{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mto-inline-quantity label{display:grid;gap:7px}.mto-selected-chip{padding:9px 11px;border-radius:9px;background:#eaf5fd;color:#3b7092;font-size:10px;min-height:32px}.mto-technical-block .mto-selected-chip{background:#f1f6fa}.mto-picker-panel{position:absolute;z-index:5;inset:95px 29px auto 29px;padding:17px;border:1px solid #b9d9ef;border-radius:17px;background:#fff;box-shadow:0 18px 55px #173f6226}.mto-picker-panel.hidden{display:none}.mto-panel-head{display:flex;align-items:center;justify-content:space-between;color:#1c557a;margin-bottom:12px}.mto-panel-close{border:0;background:#eef5f8;color:#55788c;border-radius:8px;width:30px;height:30px;font-size:19px}.mto-panel-search{margin-bottom:10px}.mto-choice-list{display:grid;gap:7px;max-height:280px;overflow:auto}.mto-choice-card{display:flex;align-items:center;gap:10px;width:100%;border:1px solid #dbe9f1;border-radius:11px;background:#fff;text-align:right;padding:10px 11px;color:#2d5b75;font:inherit}.mto-choice-card:hover,.mto-choice-card.selected{border-color:#2990d4;background:#edf8ff}.mto-choice-card span:nth-child(2){display:grid;gap:3px;flex:1;min-width:0}.mto-choice-card b{font-size:11px}.mto-choice-card small{color:#7691a1;font-size:9px}.mto-choice-card i{font-style:normal;color:#2081c4;font-weight:900}.mto-choice-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:#e3f2ff;color:#277bb4;font-size:15px}
@media(max-width:800px){dialog.mto-item-dialog{width:calc(100vw - 14px);border-radius:20px}#dialog.mto-item-dialog .modal-head{padding:20px 18px 17px}#dialog.mto-item-dialog .modal-head h2{font-size:20px}.mto-form-shell{grid-template-columns:1fr;min-height:0}.mto-wbs-picker{order:0;border-left:0;border-bottom:1px solid #d7e6f2;padding:17px 16px}.mto-wbs-tree{max-height:265px}.mto-item-editor{order:1;padding:20px 16px 24px}.mto-form-grid{grid-template-columns:1fr}.mto-form-grid .full{grid-column:auto}.mto-picker-panel{position:fixed;inset:12vh 8px auto;max-height:76vh}.mto-inline-quantity{grid-template-columns:1fr 1fr}#dialog.mto-item-dialog .modal-actions{padding:14px 16px 18px;flex-wrap:wrap}}
/* Visual project control lifecycle: WBS -> schedule -> approval -> CBS. */
.planning-lifecycle-rail{margin:0 0 18px;padding:20px 22px;border:1px solid #cfe1ef;border-radius:22px;background:linear-gradient(135deg,#eff8ff,#ffffff);box-shadow:0 14px 34px #17598512}
.planning-lifecycle-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:17px}.planning-lifecycle-head h3{margin:6px 0 0;color:#174f7c;font-size:19px}.planning-lifecycle-badge{padding:8px 12px;border-radius:999px;background:#e0f2ff;color:#16639b;font-size:11px;font-weight:800;white-space:nowrap}
.planning-lifecycle-track{display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;align-items:stretch;gap:8px}.planning-lifecycle-step{display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;min-width:0;padding:12px;border:1px solid #d6e6f1;border-radius:16px;background:#fff;color:#285877;text-align:start;cursor:pointer;transition:.2s}.planning-lifecycle-step:hover{border-color:#5b9ed1;transform:translateY(-1px);box-shadow:0 8px 18px #17598518}.planning-lifecycle-step.done{background:#effbf6;border-color:#b9e3d0}.planning-lifecycle-step.current{background:#edf6ff;border-color:#76b4e6;box-shadow:0 7px 20px #287dc31c}.planning-lifecycle-step.pending{background:#f8fafc;color:#879cac}.planning-lifecycle-index{grid-row:1 / span 2;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#e2eff9;color:#20679c;font-weight:900}.planning-lifecycle-step.done .planning-lifecycle-index{background:#31a67b;color:#fff}.planning-lifecycle-step.current .planning-lifecycle-index{background:#287dcc;color:#fff}.planning-lifecycle-step strong{font-size:12px;overflow-wrap:anywhere}.planning-lifecycle-step small{margin-top:3px;font-size:10px;line-height:1.7;color:#7590a2;overflow-wrap:anywhere}.planning-lifecycle-connector{display:grid;place-items:center;color:#73a0bc;font-size:25px}
.planning-decision-btn{background:#176fcf!important;color:#fff!important;border-color:#176fcf!important;min-height:50px;padding-inline:24px;font-size:13px;box-shadow:0 10px 22px #176fcf30}.planning-approval-summary{padding:14px 16px;border:1px solid #cfe3f3;border-radius:14px;background:#eef8ff;color:#285d81;line-height:1.9}
@media(max-width:760px){.planning-lifecycle-rail{padding:15px;margin-bottom:14px;border-radius:17px}.planning-lifecycle-head{display:grid;gap:9px}.planning-lifecycle-head h3{font-size:16px}.planning-lifecycle-badge{justify-self:start}.planning-lifecycle-track{grid-template-columns:1fr;gap:7px}.planning-lifecycle-connector{height:12px;transform:rotate(90deg)}.planning-lifecycle-step{min-height:62px}.planning-decision-btn{width:100%;min-height:48px}}

/* WBS tree beside the schedule entry table */
.schedule-wbs-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:18px;margin:18px 24px 28px;align-items:start;direction:ltr}
.schedule-wbs-tree,.schedule-activity-table{min-width:0;border:1px solid #d7e7f4;border-radius:20px;background:#fbfdff;box-shadow:0 10px 28px #174b7710;overflow:hidden;direction:rtl}
.schedule-wbs-tree{position:sticky;top:16px;max-height:calc(100dvh - 32px);display:flex;flex-direction:column}
.schedule-wbs-tree-head{display:flex;justify-content:space-between;gap:12px;padding:18px 18px 12px;background:linear-gradient(135deg,#eaf6ff,#fff);border-bottom:1px solid #dceaf5}
.schedule-wbs-tree-head h3,.schedule-activity-head h3{margin:5px 0 3px;color:#184e78;font-size:17px}.schedule-wbs-tree-head p,.schedule-activity-head p{margin:0;color:#6a879b;font-size:11px;line-height:1.8}.schedule-wbs-tree-count{display:grid;align-content:center;justify-items:end;white-space:nowrap}.schedule-wbs-tree-count strong{color:#1479b9;font-size:17px}.schedule-wbs-tree-count span{color:#7591a3;font-size:10px}
.schedule-wbs-legend{display:flex;flex-wrap:wrap;gap:6px 10px;padding:11px 16px;border-bottom:1px solid #e4eef5;background:#fff;color:#628096;font-size:10px}.schedule-wbs-legend span{display:inline-flex;align-items:center;gap:4px}.schedule-wbs-legend i{width:8px;height:8px;border-radius:50%;background:#b8c7d1}.schedule-wbs-legend i.complete{background:#27a97d}.schedule-wbs-legend i.partial{background:#e7a52e}.schedule-wbs-legend i.unscheduled{background:#a9bac7}.schedule-wbs-legend i.pending{background:#6c8cf2}
.schedule-wbs-tree-body{padding:12px 10px 18px;overflow:auto;direction:rtl}.schedule-wbs-branch{position:relative;margin:0 0 5px;padding-right:calc(var(--schedule-depth) * 14px)}.schedule-wbs-branch:before{content:"";position:absolute;right:calc(8px + (var(--schedule-depth) * 14px));top:0;bottom:5px;border-right:1px dashed #c7dce9}.schedule-wbs-node{position:relative;display:flex;align-items:center;gap:7px;min-height:44px;padding:8px 8px;border:1px solid #d8e8f3;border-radius:12px;background:#f5faff}.schedule-wbs-node-line{width:7px;height:25px;border-radius:8px;background:linear-gradient(#2f92ce,#76c0e6);flex:0 0 7px}.schedule-wbs-node-code,.schedule-wbs-code{padding:3px 6px;border-radius:6px;background:#e2f1fc;color:#216b9d;font:700 10px/1.35 ui-monospace,Consolas,monospace;white-space:nowrap}.schedule-wbs-node-main{display:grid;gap:2px;min-width:0;flex:1}.schedule-wbs-node-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#245676;font-size:11px}.schedule-wbs-node-main small{color:#7893a4;font-size:9px}.schedule-wbs-node-level{padding:3px 6px;border-radius:999px;background:#edf4f8;color:#718a9a;font-size:9px;white-space:nowrap}
.schedule-wbs-task{position:relative;display:flex;align-items:center;gap:7px;margin:4px 0;padding:7px 8px 7px 7px;border:1px solid #e0eaf1;border-radius:10px;background:#fff;box-shadow:0 2px 6px #174b7708}.schedule-wbs-task:before{content:"";position:absolute;right:calc(3px + (var(--schedule-depth) * 14px));top:-5px;width:12px;height:17px;border-right:1px dashed #c7dce9;border-bottom:1px dashed #c7dce9;border-bottom-right-radius:8px}.schedule-wbs-task-marker{width:8px;height:8px;border-radius:50%;background:#acbdc8;flex:0 0 8px}.schedule-wbs-task[data-action]{cursor:pointer}.schedule-wbs-task[data-action]:hover{border-color:#6ca9d2;box-shadow:0 7px 16px #174b7715;transform:translateY(-1px)}.schedule-wbs-task-complete{border-color:#b9e4d3;background:#fbfffd}.schedule-wbs-task-complete .schedule-wbs-task-marker{background:#25a97b}.schedule-wbs-task-partial{border-color:#ecd7a8;background:#fffdf8}.schedule-wbs-task-partial .schedule-wbs-task-marker{background:#e5a127}.schedule-wbs-task-pending{border-color:#d0d9fa;background:#fafbff}.schedule-wbs-task-pending .schedule-wbs-task-marker{background:#718cf0}.schedule-wbs-task-main{display:grid;gap:3px;min-width:0;flex:1}.schedule-wbs-task-title{display:flex;align-items:center;gap:6px;min-width:0}.schedule-wbs-task-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#2d5874;font-size:10px}.schedule-wbs-task-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8199a7;font-size:9px}.schedule-wbs-status,.schedule-table-status{padding:4px 7px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap}.schedule-wbs-status.complete,.schedule-table-status.complete{background:#e5f8ef;color:#16805d}.schedule-wbs-status.partial,.schedule-table-status.partial{background:#fff4d9;color:#a36a0b}.schedule-wbs-status.unscheduled,.schedule-table-status.unscheduled{background:#edf2f5;color:#6f8491}.schedule-wbs-status.pending,.schedule-table-status.pending{background:#edf0ff;color:#526bc3}.schedule-wbs-status.approved,.schedule-table-status.approved{background:#e5f1ff;color:#1d6ca3}.schedule-wbs-task-action{flex:0 0 auto}.schedule-wbs-task-action .tiny{font-size:9px;padding:5px 7px}.schedule-wbs-empty{padding:30px 14px;text-align:center;color:#8097a7;font-size:11px;line-height:2}
.schedule-activity-table{overflow:hidden}.schedule-activity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px 12px;border-bottom:1px solid #dceaf5;background:#fff}.schedule-activity-badge{padding:7px 10px;border-radius:999px;background:#e9f5fd;color:#1c76ac;font-size:10px;font-weight:800;white-space:nowrap}.schedule-activity-table>.table-wrap{margin:0;border:0;border-radius:0;box-shadow:none}.schedule-activity-table .table{min-width:900px}.schedule-activity-table .table td,.schedule-activity-table .table th{vertical-align:middle}.schedule-activity-table .table td:last-child{white-space:nowrap}
@media(max-width:1050px){.schedule-wbs-layout{grid-template-columns:300px minmax(0,1fr);margin-inline:16px}.schedule-wbs-status{display:none}}
@media(max-width:760px){.schedule-wbs-layout{grid-template-columns:1fr;margin:14px 12px 22px;gap:12px}.schedule-wbs-tree{position:static;max-height:none}.schedule-wbs-tree-body{max-height:52vh}.schedule-activity-head{padding:15px 16px}.schedule-activity-table>.table-wrap{overflow-x:auto}.schedule-wbs-task{padding-inline:6px}.schedule-wbs-node-level{display:none}}

/* MTO package procurement status report */
.mto-procurement-report{margin:18px 24px 30px;border:1px solid #cfe2f0;border-radius:20px;background:#fbfdff;box-shadow:0 12px 30px #174b7710;overflow:hidden;direction:rtl}.mto-report-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 22px 15px;background:linear-gradient(135deg,#eaf6ff,#fff);border-bottom:1px solid #dceaf5}.mto-report-head h3{margin:5px 0 4px;color:#174e78;font-size:18px}.mto-report-head p{margin:0;color:#6f899b;font-size:11px;line-height:1.9}.mto-report-revision{padding:7px 11px;border-radius:999px;background:#e3f2ff;color:#1673ad;font-size:10px;font-weight:800;white-space:nowrap}.mto-report-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;padding:14px 18px;background:#fff;border-bottom:1px solid #e4eef5}.mto-report-kpis>div{display:grid;gap:4px;padding:10px 9px;border:1px solid #dfeaf2;border-radius:12px;background:#f8fbfe;text-align:center}.mto-report-kpis strong{color:#1b6698;font-size:16px}.mto-report-kpis span{color:#7891a2;font-size:10px}.mto-report-kpis .has-request{background:#effaf5;border-color:#c9ead9}.mto-report-kpis .has-request strong{color:#16815d}.mto-report-kpis .no-request{background:#fff9ed;border-color:#efdbb5}.mto-report-kpis .no-request strong{color:#a66a16}.mto-procurement-report>.table-wrap{margin:0;border:0;border-radius:0;box-shadow:none;background:#fff}.mto-procurement-report .table{min-width:760px}.mto-report-package{display:grid;gap:3px}.mto-report-package b{color:#285a78;font-size:11px}.mto-report-package small,.mto-report-open{display:block;color:#8a9eaa;font-size:9px}.mto-report-open{margin-top:3px;color:#bd7a28}.mto-report-state{display:inline-flex;align-items:center;justify-content:center;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap}.mto-report-state.no_request{background:#fff1dc;color:#ad6b19}.mto-report-state.requested_not_ordered{background:#fff5df;color:#a76c16}.mto-report-state.ordered_not_received{background:#edf4ff;color:#3f72b0}.mto-report-state.partially_received{background:#f1efff;color:#665bb0}.mto-report-state.received{background:#e5f8ef;color:#16805d}.mto-report-empty{margin:15px 18px 20px;padding:26px;text-align:center;border:1px dashed #bfd7e7;border-radius:13px;color:#7993a4;font-size:11px;background:#fff}.mto-procurement-report .table td,.mto-procurement-report .table th{vertical-align:middle}
@media(max-width:1050px){.mto-report-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.mto-procurement-report{margin:14px 12px 22px;border-radius:16px}.mto-report-head{padding:16px;gap:10px}.mto-report-head h3{font-size:16px}.mto-report-kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:11px;gap:7px}.mto-procurement-report>.table-wrap{overflow-x:auto}.mto-report-revision{font-size:9px}}


/* Role aware report preview shown before opening the full report */
.report-preview-dialog{width:min(720px,calc(100vw - 28px));max-width:720px;max-height:min(88dvh,760px);padding:0;border:1px solid #c8dff0;border-radius:26px;background:#f7fbff;color:#183f5f;box-shadow:0 28px 90px #0d3c6526;overflow:hidden;direction:rtl}
.report-preview-dialog::backdrop{background:#0a2d4b8c;backdrop-filter:blur(5px)}
.report-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:25px 28px 20px;background:linear-gradient(135deg,#fff 0%,#eaf5ff 100%);border-bottom:1px solid #d6e8f5}
.report-preview-head h2{margin:7px 0 6px;color:#164b77;font-size:23px;line-height:1.45;letter-spacing:-.02em}
.report-preview-head p{margin:0;color:#68859a;font-size:11px;line-height:1.9}
.report-preview-head .eyebrow{color:#2c79b5;font-weight:800}
.report-preview-close{flex:none;width:36px;height:36px;border:1px solid #c6dceb;border-radius:11px;background:#fff;color:#4f7590;font-size:21px;line-height:1;cursor:pointer}
.report-preview-close:hover{background:#eaf5ff;color:#1767a4}
.report-preview-kpis{display:grid;grid-template-columns:1fr 1.5fr;gap:11px;padding:16px 22px;background:#fff;border-bottom:1px solid #e1edf5}
.report-preview-kpis>div{display:grid;gap:5px;min-width:0;padding:13px 15px;border:1px solid #dceaf4;border-radius:14px;background:#f8fbfe}
.report-preview-kpis span{color:#7893a6;font-size:10px}
.report-preview-kpis strong{overflow:hidden;color:#206999;font-size:17px;text-overflow:ellipsis;white-space:nowrap}
.report-preview-chart{margin:19px 22px;padding:19px 20px 15px;border:1px solid #d5e7f3;border-radius:19px;background:#fff;box-shadow:0 8px 25px #1b679312}
.report-preview-chart-title{display:flex;align-items:flex-start;justify-content:space-between;gap:13px;margin-bottom:18px}
.report-preview-chart-title h3{margin:0;color:#1e557c;font-size:15px}
.report-preview-chart-title small{color:#88a0b0;font-size:10px;line-height:1.7;text-align:left}
.report-preview-bar{display:grid;gap:7px;margin:14px 0}
.report-preview-bar-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#55768d;font-size:11px}
.report-preview-bar-head strong{color:#1b679a;font-size:12px}
.report-preview-track{height:11px;border-radius:999px;background:#edf4f8;overflow:hidden;direction:ltr}
.report-preview-fill{display:block;height:100%;min-width:0;border-radius:999px;background:linear-gradient(90deg,#2587cd,#1462a6);transition:width .35s ease}
.report-preview-fill.c1{background:linear-gradient(90deg,#37a88a,#178065)}
.report-preview-fill.c2{background:linear-gradient(90deg,#e6a744,#bd7318)}
.report-preview-fill.c3{background:linear-gradient(90deg,#8a75d1,#5a4aa5)}
.report-preview-fill.c4{background:linear-gradient(90deg,#e57982,#b64b59)}
.report-preview-actions{display:flex;justify-content:flex-start;gap:10px;padding:17px 22px 22px;background:#fff;border-top:1px solid #e0edf5}
.report-preview-actions .btn{min-width:145px}
.report-preview-actions .btn.primary{background:linear-gradient(135deg,#2585ce,#145f9f);box-shadow:0 9px 21px #1b70b42b}
.report-preview-loading,.report-preview-error,.report-preview-empty{margin:26px 22px;padding:34px 20px;border:1px dashed #b9d4e6;border-radius:16px;background:#fff;text-align:center;color:#6e8da2;font-size:12px;line-height:2}
.report-preview-error strong{display:block;margin-bottom:8px;color:#b34d53;font-size:15px}
.report-preview-error p{margin:0 0 15px;color:#6f8290;overflow-wrap:anywhere}
.report-preview-error .btn{margin-top:5px}
@media(max-width:600px){.report-preview-dialog{width:calc(100vw - 14px);border-radius:21px}.report-preview-head{padding:20px 17px 17px;gap:10px}.report-preview-head h2{font-size:19px}.report-preview-head p{font-size:10px}.report-preview-kpis{grid-template-columns:1fr;padding:12px}.report-preview-chart{margin:14px 12px;padding:15px 13px}.report-preview-chart-title{display:grid;gap:4px;margin-bottom:14px}.report-preview-chart-title small{text-align:right}.report-preview-actions{padding:13px 12px 17px;flex-wrap:wrap}.report-preview-actions .btn{flex:1 1 140px}.report-preview-loading,.report-preview-error,.report-preview-empty{margin:18px 12px;padding:26px 14px}}


/* Project guest account card */
.project-guest-panel{margin:18px 0;padding:20px 22px;border:1px solid #c9e1f2;border-radius:20px;background:linear-gradient(135deg,#f3faff,#fff);box-shadow:0 10px 28px #1a669b10;direction:rtl}
.project-guest-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.project-guest-head h3{margin:6px 0 5px;color:#174d76;font-size:17px}
.project-guest-head p{margin:0;color:#67869b;font-size:11px;line-height:1.9;max-width:680px}
.project-guest-badge{padding:7px 11px;border-radius:999px;background:#e4f3ff;color:#176ba5;font-size:10px;font-weight:800;white-space:nowrap}
.project-guest-credentials{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:17px;padding:15px;border:1px solid #cbe4f2;border-radius:15px;background:#fff}
.project-guest-credentials>strong{grid-column:1/-1;color:#1a5d89;font-size:12px}
.project-guest-credentials>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;border-radius:10px;background:#f5faff}
.project-guest-credentials span{color:#7692a5;font-size:10px}
.project-guest-credentials b{color:#154d75;font-size:12px;letter-spacing:.02em}
.project-guest-credentials small{grid-column:1/-1;color:#7892a2;font-size:10px;line-height:1.8}
@media(max-width:600px){.project-guest-panel{padding:16px;border-radius:16px}.project-guest-head{display:grid;gap:10px}.project-guest-badge{justify-self:start}.project-guest-credentials{grid-template-columns:1fr;padding:12px}.project-guest-credentials>strong,.project-guest-credentials small{grid-column:auto}}
