:root{font-family:"Segoe UI",Arial,sans-serif;color:#243246;background:#fff;--navy:#13243d;--gold:#c5a363;--line:#d5dbe2;--row:30px;--split:55%}*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden;font-size:12px}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #bfc8d3;background:#fff;color:#253952;border-radius:2px;padding:5px 10px;min-height:28px}button:hover{background:#eaf0f7;border-color:#99adc4}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,[role=separator]:focus-visible{outline:2px solid #326baf;outline-offset:-2px}input,select{border:1px solid #bfc8d3;border-radius:2px;background:#fff;color:#253952;padding:4px 7px;height:28px;min-width:0}input[type=range]{padding:0;border:0;width:115px;accent-color:#203c60}.titlebar{height:39px;flex:none;background:var(--navy);color:#e7edf7;display:flex;align-items:center;gap:21px;padding:0 18px}.brand{font-size:23px;color:#fff;font-weight:700;text-decoration:none;letter-spacing:-1px}.brand span{color:#d2b77c}.app-title{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-title i{font-style:normal;margin:0 12px;color:#647a97}.app-title b{font-weight:400}.local{margin-left:auto;white-space:nowrap;color:#b8cbbf;font-size:10px}.tabs{height:35px;display:flex;align-items:stretch;border-bottom:1px solid #cbd3dd;flex:none;background:#f7f9fb}.tabs button{border:0;border-radius:0;padding:0 18px;background:transparent;font-size:12px}.tabs button.active{background:#fff;box-shadow:inset 0 -3px var(--gold);font-weight:600}.tabs .file-tab{background:#1e3654;color:#fff}.version{margin-left:auto;font-size:10px;color:#6b7b8e;align-self:center;padding-right:17px}.ribbon{display:flex;flex:none;overflow-x:auto;background:#f6f8fa;border-bottom:1px solid var(--line);min-height:94px;padding:7px 9px 3px;gap:0}.ribbon-group{padding:0 13px;border-right:1px solid #dbe1e8;display:flex;flex-direction:column;justify-content:space-between;flex-shrink:0}.group-actions{display:flex;align-items:center;gap:10px;height:63px}.ribbon-group>small{font-size:8px;color:#758292;letter-spacing:1px;text-align:center;padding:2px 0}.tool{border:1px solid transparent;background:none;font-size:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3px 9px;min-height:58px;line-height:1.1;gap:7px}.tool span{font-size:10px;white-space:nowrap}.compact-label{display:flex;flex-direction:column;gap:5px;font-size:10px;color:#5d6d80}.compact-label select{font-size:11px;max-width:155px;height:26px}.filterbar{display:flex;align-items:center;gap:12px;padding:7px 13px;border-bottom:1px solid var(--line);background:#fff;flex:none}.filterbar label{display:flex;align-items:center;gap:7px;font-size:10px;color:#65758a}.filterbar select{max-width:255px;font-size:11px}.search-label{flex:1;min-width:130px}.search-label input{width:100%;max-width:330px}.sample-picker{margin-left:auto}#status{font-size:10px;color:#5c6c80;background:#f4f7fa;padding:6px 13px;flex:none;border-bottom:1px solid #e0e5eb;min-height:27px;line-height:1.6}#status.error{background:#fff0ed;color:#a53b2f}#busy{padding:7px 13px;background:#faf0db;font-size:11px;flex:none}main{flex:1;min-height:0;position:relative;display:flex;flex-direction:column}#workspace{display:flex;flex-direction:column;min-height:0;height:100%}.document-bar{height:37px;display:flex;align-items:center;gap:20px;padding:0 13px;border-bottom:1px solid var(--line);flex:none;background:#fff;overflow:hidden}.document-bar>div{display:flex;align-items:center;gap:14px;min-width:0}.document-bar b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.document-bar small{font-size:9px;color:#728093;white-space:nowrap}#format{font-size:9px;color:#8a713e;white-space:nowrap}#stats{margin-left:auto;white-space:nowrap;font-size:10px;color:#64758b}.view-caption{height:28px;background:#edf2f7;border-bottom:1px solid var(--line);padding:0 13px;display:flex;align-items:center;gap:20px;flex:none;font-size:10px}.view-caption>span:first-child{font-weight:600}.legend{margin-left:auto;font-size:9px;color:#69768b;display:flex;align-items:center;gap:6px}.legend i{background:#456f9b;width:16px;height:7px;display:inline-block}.legend .summary-key{background:#2d3440;height:5px}.split-view{display:grid;grid-template-columns:minmax(0,var(--split)) 6px minmax(0,1fr);flex:1;min-height:0;overflow:hidden;position:relative}.split-view.table-only{grid-template-columns:1fr}.pane{overflow:auto;min-width:0;min-height:0;scrollbar-gutter:stable;background:white}.pane table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:100%;font-size:11px}.pane thead{position:sticky;top:0;z-index:10}.pane th{height:52px;text-align:left;background:linear-gradient(#fbfcfd,#edf1f5);border-bottom:1px solid #b9c3cf;border-right:1px solid var(--line);font-weight:500;color:#33465c;padding:0 7px;font-size:11px;white-space:nowrap}.pane td{height:var(--row);max-height:var(--row);border-bottom:1px solid #e1e5ea;border-right:1px solid #e7ebef;padding:0 7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#fff}.pane tbody tr:hover td{background:#f0f5fb}.pane tbody tr.selected td{background:#e2ecf8;box-shadow:inset 0 1px #99b8de,inset 0 -1px #99b8de}.pane tbody tr.summary td{font-weight:600;background:#fafbfc}.pane tbody tr.summary.selected td{background:#e2ecf8}.pane tbody tr.context td{color:#738197}.sheet th:first-child,.sheet td:first-child{position:sticky;left:0;z-index:2;background:#f0f3f6;text-align:center;color:#5d6c7d}.sheet th:first-child{z-index:12}.task-cell>div{display:flex;align-items:center;min-width:0;height:29px;gap:3px}.toggle{padding:0;min-height:22px;height:22px;width:22px;min-width:22px;border:0;background:transparent;color:#345475;font-size:14px;border-radius:2px}.toggle:hover{background:#dce7f3}.toggle-space{width:22px;min-width:22px}.task-name{font:inherit;font-weight:inherit;padding:0;border:0;background:none;min-height:25px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;color:inherit}.task-name:hover{background:transparent;border:0}.wbs-code{font-size:9px;color:#8b98a8;margin-right:5px;font-weight:400}.indicator{text-align:center;color:#91703b}.numeric{text-align:right}.summary-symbol{font-size:11px;color:#34465a}.chart .timeline{padding:0;position:relative;overflow:hidden;background-image:linear-gradient(to right,#e1e7ee 1px,transparent 1px);background-size:var(--tick) 100%}.chart tbody tr.summary td{background-color:#fafbfc;background-image:linear-gradient(to right,#e1e7ee 1px,transparent 1px)}.chart tbody tr.selected td{background-color:#e2ecf8}.axis{position:relative;height:51px;overflow:hidden}.axis .month{position:absolute;top:0;height:25px;border-right:1px solid #ccd5df;border-bottom:1px solid #ccd5df;padding:5px 8px;font-size:10px;font-weight:600;overflow:hidden;white-space:nowrap}.axis .day{position:absolute;top:25px;height:26px;padding:6px 4px;border-left:1px solid #d9e0e8;font-size:9px;overflow:hidden;white-space:nowrap}.bar{position:absolute;top:9px;height:12px;background:#6b93bc;border:1px solid #3d6792;border-radius:1px;min-width:3px;overflow:hidden}.bar i{display:block;height:100%;background:#274b72}.bar.summary{height:6px;top:11px;background:#303b48;border:0;overflow:visible}.bar.summary:before,.bar.summary:after{position:absolute;top:0;content:"";border-top:9px solid #303b48;border-right:4px solid transparent;border-left:4px solid transparent}.bar.summary:before{left:0}.bar.summary:after{right:0}.legacy-milestone-badge{position:static;font-size:inherit;color:inherit;line-height:inherit}.no-date{font-size:9px;color:#8a7a64;padding-left:10px}.empty-row{height:45px!important;text-align:center;color:#728197}#splitter{background:#e0e5eb;border-left:1px solid #b5c0cd;border-right:1px solid #b5c0cd;cursor:col-resize;touch-action:none;position:relative;z-index:15}#splitter:after{content:"⋮";position:absolute;top:45%;left:-1px;font-size:16px;color:#7c8a9b}#splitter:hover{background:#a9bfd8}body.resizing{cursor:col-resize;user-select:none}.pager{height:32px;display:flex;align-items:center;gap:16px;padding:0 10px;background:#f4f6f9;border-top:1px solid var(--line);flex:none;font-size:10px;color:#5e6e83}.pager>div{margin-left:auto;display:flex;gap:5px}.pager button{font-size:10px;min-height:23px;padding:2px 8px}#selection-info{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#45607d}.app-footer{height:25px;display:flex;align-items:center;justify-content:space-between;padding:0 13px;background:var(--navy);color:#c3cfdf;font-size:9px;flex:none}.app-footer>span:first-child{color:#d2b77c;font-size:8px;letter-spacing:1px}#empty{margin:auto;text-align:center;padding:35px;max-width:760px}.empty-icon{font-size:47px;color:#9d814c;margin:10px 0 20px}h1{font-size:25px;font-weight:500;letter-spacing:-.5px}#empty p{color:#6a7a8e;line-height:1.9;font-size:12px}.primary{background:var(--navy);color:#fff;border:0;padding:11px 22px;border-radius:3px;margin:15px 0}.primary:hover{background:#234263}.formats{margin-top:22px;font-size:11px!important}.limit{font-size:10px!important}#diagnostics{overflow:auto;padding:24px;line-height:1.8;flex:1;font-size:12px}#diagnostics li{margin:8px 0}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:11px monospace;background:#f1f4f8;padding:15px;max-height:330px;overflow:auto}dialog{width:min(780px,calc(100vw - 30px));max-height:85vh;border:1px solid #a8b7c9;padding:24px;border-radius:3px;color:#253952}dialog::backdrop{background:#162a4355}.eyebrow{font-size:10px;letter-spacing:1px;color:#977941}h2{font-size:20px;font-weight:500}h3{font-size:13px}dialog p{font-size:12px;line-height:1.7}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.detail-grid>div{border:1px solid #d7e0e9;padding:12px}.detail-grid small{display:block;color:#7c8a9b;margin-bottom:8px;font-size:10px}.detail-grid b{font-size:12px}#close-detail{margin-top:15px}[hidden]{display:none!important}@media(max-width:900px){.local,.version,#format,.document-bar small,.legend{display:none}.filterbar{flex-wrap:wrap;gap:5px}.filterbar label{font-size:9px}.filterbar select{max-width:200px}.filterbar .sample-picker{margin-left:0}.ribbon{min-height:88px}.ribbon-group{padding:0 10px}.group-actions{gap:7px}.app-footer>span:nth-child(2){display:none}}@media(max-width:580px){.titlebar{padding:0 9px;gap:12px}.app-title{font-size:10px}.tabs button{font-size:10px;padding:0 8px}.filterbar{padding:5px 8px}.filterbar select{max-width:160px}.search-label{min-width:150px}.sample-picker{display:none}.document-bar{height:31px;padding:0 8px}.document-bar b{max-width:240px;font-size:11px}#stats{display:none}.view-caption{font-size:9px;gap:12px}#selection-info{display:none}.pager{font-size:9px;gap:7px}.app-footer{font-size:8px}#empty{padding:20px}h1{font-size:21px}.ribbon{min-height:86px}.tool{font-size:21px}.tool span{font-size:9px}.detail-grid{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* Ferramentas clássicas de consulta · LPLAN 0.3 */
.optionsbar{display:flex;align-items:center;gap:10px;min-height:35px;padding:3px 12px;flex:none;border-bottom:1px solid var(--line);background:#f9fafc;font-size:10px;overflow-x:auto;white-space:nowrap}.optionsbar label{display:flex;align-items:center;gap:5px}.optionsbar input[type=checkbox],dialog input[type=checkbox]{height:15px;width:15px;accent-color:var(--navy);flex:none}.optionsbar input[type=date]{height:25px;font-size:10px;width:122px}.optionsbar button{font-size:10px;min-height:24px;padding:3px 8px}#filter-summary{margin-left:auto;color:#6c7f96;font-size:10px}.filterbar>button{font-size:10px;white-space:nowrap}#clear-filters{padding:4px 7px}.search-label input{max-width:270px}.pane th{white-space:normal}.head-sort{border:0;padding:0;background:none;width:100%;height:51px;text-align:inherit;color:inherit;line-height:1.3;font-size:10px;white-space:normal}.head-sort:hover{background:#dce7f3}.baseline-bar{position:absolute;top:24px;height:4px;background:#b49456;min-width:3px}.bar.critical{background:#d17b71;border-color:#a94739}.bar.critical i{background:#8a332d}.status-line{position:absolute;top:0;bottom:0;width:1px;border-left:2px dashed #ba752b;z-index:1;pointer-events:none}.axis .status-tick{position:absolute;top:23px;background:#b97731;height:28px;width:2px;z-index:2}.baseline-key{background:#b49456!important;height:4px!important}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.form-grid label,dialog>label,.saved-filter label{display:flex;flex-direction:column;gap:6px;font-size:11px}.field-help{color:#6d7d90;font-size:10px!important;line-height:1.7}.form-error{color:#a53426;min-height:18px}.dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;position:sticky;bottom:-24px;background:#fff;border-top:1px solid #dce3eb;padding:12px 0 0;margin-top:15px}.dialog-actions .primary{margin:0;padding:8px 14px}.saved-filter{display:flex;align-items:flex-end;gap:7px;flex-wrap:wrap;border-top:1px solid #dce3eb;padding-top:12px}.saved-filter>input{flex:1;min-width:120px}.column-item{display:grid;grid-template-columns:24px minmax(150px,1fr) 75px 34px 34px;gap:6px;align-items:center;padding:5px;border-bottom:1px solid #e0e5eb;font-size:11px}.column-item button{padding:0;min-height:26px}#column-list{max-height:40vh;overflow:auto;margin-top:13px;border:1px solid #dce3eb}.column-item input[type=number]{width:72px}.column-item label{cursor:pointer}.unit-note{font-size:10px;color:#7c8da1}.pane th[aria-sort=ascending],.pane th[aria-sort=descending]{background:#dfe9f5}.critical-key{color:#aa4b3d}.filter-count{background:#e7d5b1;color:#5b4119;border-radius:8px;padding:1px 5px}#project-dialog .detail-grid b{line-height:1.8}.column-item .locked{color:#73849b}@media(max-width:900px){.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filterbar .search-label{flex-basis:180px}}@media(max-width:580px){.form-grid{grid-template-columns:1fr}.optionsbar{gap:7px}.column-item{grid-template-columns:22px minmax(100px,1fr) 62px 28px 28px;font-size:10px}.column-item input[type=number]{width:58px}.saved-filter{align-items:stretch}.dialog-actions{gap:5px}}

#filter-summary{max-width:34%;overflow:hidden;text-overflow:ellipsis}.optionsbar input[type=checkbox]{margin:0}.unit-note{font-weight:400;font-size:9px;white-space:nowrap}

.planning-toolbar{display:flex;gap:5px;align-items:center;flex:none;overflow-x:auto;padding:5px 12px;background:#eef2f7;border-bottom:1px solid #c8d2df;white-space:nowrap}.planning-toolbar button{font-size:10px;padding:4px 8px;min-height:26px}.planning-toolbar .save-plan{background:#183553;color:white;border-color:#183553}#revision-state{font-size:10px;color:#64778e;margin-left:auto;padding-left:10px}.edit-toolbar{display:flex;align-items:center;gap:8px;margin:12px 0;flex-wrap:wrap}.edit-toolbar label{display:flex;gap:7px;align-items:center}.edit-toolbar select{max-width:440px}.edit-scroll{overflow:auto;max-height:45vh;border:1px solid #d4dde8}.edit-table{width:100%;border-collapse:collapse;font-size:11px}.edit-table th{position:sticky;top:0;background:#edf2f7;text-align:left;padding:10px 8px}.edit-table td{border-top:1px solid #dbe2eb;padding:8px}.edit-table button{font-size:10px;min-height:23px;padding:3px 6px;margin:2px}.edit-table input{width:130px}.link-row{display:grid;grid-template-columns:minmax(150px,1fr) 75px 110px 80px;gap:8px;align-items:center;border-bottom:1px solid #dce3ec;padding:8px 0;font-size:11px}#resource-dialog,#task-edit-dialog{width:min(1020px,calc(100vw - 30px))}#resource-message,#assignment-total{font-size:11px;line-height:1.7}textarea{font:inherit;border:1px solid #bfc8d3;padding:8px;resize:vertical}.form-grid textarea{width:100%;min-height:80px}#assignment-list input{max-width:140px}@media(max-width:580px){.planning-toolbar{padding:5px 7px}.planning-toolbar button{font-size:9px}.link-row{grid-template-columns:1fr 60px 80px}.link-row button{grid-column:3}.edit-table{font-size:10px}}

.planning-toolbar{flex-wrap:wrap;overflow-x:visible}.usage-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:7px 12px;background:#f4f7fa;border-bottom:1px solid #d3dce7;flex:none}.usage-controls label{display:flex;align-items:center;gap:5px;font-size:10px}.usage-controls input[type=number]{width:65px}.usage-controls button{font-size:10px}.usage-note{font-size:10px;color:#65778e;background:#f7f9fc;padding:8px 12px;margin:0;line-height:1.7;flex:none}#usage-panel{display:flex;flex-direction:column;flex:1;min-height:0}#usage-content{display:flex;flex-direction:column;flex:1;min-height:0}.usage-scroll{flex:1;overflow:auto;min-height:0}.usage-table{border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:11px}.usage-table th{height:48px;background:#edf2f7;border-right:1px solid #d5dde7;border-bottom:1px solid #bdcbdc;position:sticky;top:0;z-index:5;text-align:left;padding:7px;font-weight:500;font-size:10px}.usage-table td{height:30px;padding:0 7px;border-right:1px solid #e0e6ef;border-bottom:1px solid #e0e6ef;background:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.usage-table td:first-child{position:sticky;left:0;z-index:2}.usage-table th:first-child{position:sticky;left:0;z-index:7}.usage-table .summary td{background:#edf2f8;font-weight:600}.usage-name>div{display:flex;align-items:center;gap:4px;min-width:0;height:29px}.usage-resource td{background:#fafbfd;color:#536b84}.usage-table tr.selected td{background:#e3edf9}.usage-table tbody tr:hover td{background:#eef4fb}.usage-cell{font-variant-numeric:tabular-nums}.usage-note.error{color:#a53426}#column-search{max-width:100%}#summary-form>label{display:flex;flex-direction:column;gap:8px}@media(max-width:580px){.planning-toolbar button{padding:3px 6px}.usage-controls{gap:5px;padding:6px}.usage-note{font-size:9px}}

.assignment-branch{display:inline-block;width:9px;height:10px;border-left:1px solid #9bacc0;border-bottom:1px solid #9bacc0;margin:0 4px 5px 2px;flex:none}

/* Escala 0.6: limites reais de calendário, sem grade mensal aproximada. */
.time-controls{display:flex;align-items:center;gap:8px;padding:5px 12px;background:#f5f7fa;border-bottom:1px solid var(--line);flex:none;flex-wrap:wrap;font-size:10px}.time-controls label{display:flex;align-items:center;gap:5px}.time-controls input[type=number]{width:55px}.time-controls input[type=date]{width:123px}.time-controls button,.time-controls input,.time-controls select{min-height:25px;height:25px;font-size:10px;padding:3px 7px}#gantt-range,#usage-range{color:#6c7c90;font-size:10px;margin-left:auto}.chart .timeline,.chart tbody tr.summary td{background-image:none}.time-grid{position:absolute;top:0;bottom:0;border-left:1px solid #e0e6ed;pointer-events:none}.relation-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);padding-bottom:7px}.relation-tabs [aria-selected=true]{background:var(--navy);color:white;border-color:var(--navy)}#links-dialog{width:min(1000px,calc(100vw - 30px))}.link-row{grid-template-columns:minmax(150px,1fr) 230px 100px 75px}#links-list{max-height:32vh;overflow:auto}#link-selected{background:#edf2f7;padding:8px 12px;border-left:3px solid var(--gold);font-weight:600}.usage-controls{flex-wrap:wrap}.usage-controls select{max-width:150px}@media(max-width:700px){.link-row{grid-template-columns:1fr 160px}.link-row input{width:100%}.link-row button{grid-column:auto}.time-controls{gap:5px}#gantt-range,#usage-range{margin-left:0}}

/* LPLAN 1.0 · Virtualização, Gantt SVG, Edição Direta, Relatórios, Auditoria e Sobrecarga */
:root{--row:30px;--head-h:40px;--usage-head-h:48px}
#workspace{display:flex;flex-direction:column;min-height:0;flex:1}
#workspace[hidden],#reports-panel[hidden],#resource-usage-panel[hidden],#diagnostics[hidden],#usage-panel[hidden]{display:none!important}
.split-view{display:flex;flex:1;min-height:0;overflow:hidden;position:relative}
.split-view .sheet{flex:0 0 var(--split,55%);min-width:220px;overflow:auto;background:#fff;position:relative}
.split-view .chart{flex:1;min-width:200px;overflow:auto;background:#fff;position:relative}
.split-view:not(.table-only) .sheet,.split-view:not(.table-only) .chart{overflow-x:scroll;overflow-y:auto}
.split-view.table-only .sheet{flex:1 1 auto;overflow:auto}
#sheet th{height:var(--head-h);max-height:var(--head-h);box-sizing:border-box;position:relative;vertical-align:middle;white-space:nowrap;overflow:hidden;padding:0 7px}
.sheet-table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:auto}
.sheet-table tbody tr:not(.virtual-spacer){height:var(--row)}
.sheet-table tr.row-milestone{position:static;font-size:inherit;line-height:inherit}
.sheet-table th,.sheet-table td{box-sizing:border-box}
.sheet-table tbody tr:not(.virtual-spacer) td{height:var(--row);max-height:var(--row);padding:0 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pane tbody tr.virtual-spacer,.pane tbody tr.virtual-spacer td{height:auto!important;max-height:none!important;min-height:0!important;padding:0!important;border:0!important;margin:0!important;background:transparent!important;box-shadow:none!important;line-height:0!important;pointer-events:none}
.virtual-spacer-box{display:block;width:1px;pointer-events:none}
.sticky-col{position:sticky;z-index:2;background-color:#fff}
.sticky-1{left:0;z-index:3}
.sticky-2{left:var(--sticky-2-left,60px);z-index:3;box-shadow:1px 0 0 #d5dbe2}
.pane thead th.sticky-col{z-index:12;background:linear-gradient(#fbfcfd,#edf1f5)}
/* O deslocamento left pertence a uma célula sticky. position:relative deslocava
   apenas o título (Nome), deixando-o fora da coluna e vazando ao rolar. */
#sheet th.sticky-col,.usage-sheet th.sticky-col,.ru-sheet th.sticky-col{position:sticky}
.pane tbody tr.summary td.sticky-col{background-color:#fafbfc}
.pane tbody tr.virtual-group-row td.sticky-col{background-color:#eff4fb}
.pane tbody tr.usage-resource td.sticky-col{background-color:#fafbfd}
.pane tbody tr:hover td.sticky-col{background-color:#f0f5fb}
.pane tbody tr.selected td.sticky-col{background-color:#e2ecf8}
#sheet tbody tr td:first-child.sticky-1{background-color:#f0f3f6}
#sheet tbody tr.selected td:first-child.sticky-1{background-color:#d6e4f5}
.usage-sheet td:first-child,.ru-sheet td:first-child{text-align:left;color:inherit;background:#fff}
.usage-sheet th:first-child,.ru-sheet th:first-child{text-align:left;color:#33465c;background:linear-gradient(#fbfcfd,#edf1f5);z-index:12}
.usage-sheet tbody tr.summary td:first-child,.ru-sheet tbody tr.summary td:first-child{background-color:#fafbfc}
.usage-sheet tbody tr.virtual-group-row td:first-child{background-color:#eff4fb}
.usage-sheet tbody tr.usage-resource td:first-child,.ru-sheet tbody tr.usage-resource td:first-child{background-color:#fafbfd}
.usage-sheet tbody tr:hover td:first-child,.ru-sheet tbody tr:hover td:first-child{background-color:#f0f5fb}
.usage-sheet tbody tr.selected td:first-child,.ru-sheet tbody tr.selected td:first-child{background-color:#e2ecf8}
.col-sort-btn{appearance:none;border:0;background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer;width:calc(100% - 8px);height:calc(var(--head-h) - 2px);max-height:calc(var(--head-h) - 2px);line-height:1.2;text-align:left;padding:0;display:inline-flex;align-items:center;gap:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.col-resize{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:col-resize}
.col-resize:hover{background:rgba(18,42,74,.25)}
.sort-ind{color:#b45309;font-size:10px;font-weight:700}
.name-cell{display:flex;align-items:center;gap:4px;overflow:hidden}
.toggle,.toggle-space{flex:none;position:relative;z-index:2}
.cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-inactive{opacity:.56;text-decoration:line-through}
.virtual-group-row{background:#eff4fb!important;font-weight:600;color:#16325c}
td[data-editable="true"]{cursor:text}
.inline-cell-input{width:100%;height:24px;box-sizing:border-box;border:2px solid #1d4ed8;border-radius:3px;padding:1px 5px;font:inherit;background:#fff;color:#0f172a}
.timeline{position:relative}
.timeline-head{height:var(--head-h);box-sizing:border-box;position:sticky;top:0;z-index:6;background:#f5f7fa;border-bottom:1px solid var(--line);overflow:hidden}
.tl-top{position:relative;height:19px;border-bottom:1px solid #e1e7ef;font-size:10px;font-weight:600;color:#36495e}
.tl-sub{position:relative;height:20px;font-size:10px;color:#64748b}
.tl-group,.tl-col{position:absolute;top:0;bottom:0;border-left:1px solid #e0e6ed;padding:2px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
.chart-body{position:relative;overflow:hidden}
.gantt-window{position:absolute;left:0}
.gantt-row{position:absolute;left:0;right:0;border-bottom:1px solid #eef2f6;box-sizing:border-box;overflow:hidden}
.gantt-row.selected{background:rgba(29,78,216,.06)}
.gantt-arrows{position:absolute;left:0;top:0;pointer-events:none;z-index:2}
.gantt-datadate-line{position:absolute;top:0;bottom:0;width:0;border-left:2px dashed #dc2626;z-index:3;pointer-events:none}
.gantt-datadate-line span{position:sticky;top:4px;display:inline-block;margin-left:3px;padding:1px 4px;border-radius:3px;background:#dc2626;color:#fff;font-size:9px;font-weight:600;white-space:nowrap}
.gantt-bar{position:absolute;top:7px;height:15px;border-radius:3px;background:#2563eb;border:1px solid #1e40af;box-sizing:border-box;z-index:3;overflow:hidden;cursor:grab}
.gantt-bar.summary{top:9px;height:10px;background:#1e293b;border-color:#0f172a;cursor:default}
.gantt-bar.critical{background:#dc2626;border-color:#991b1b}
.gantt-bar.inactive{background:#94a3b8;border-color:#64748b;opacity:.65;cursor:default}
.bar-progress{height:100%;background:rgba(15,23,42,.28);pointer-events:none}
.bar-resize{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:ew-resize;background:rgba(255,255,255,.35)}
.bar-resize:hover{background:#fde047}
.gantt-milestone{position:absolute;top:9px;width:11px;height:11px;background:#b45309;transform:rotate(45deg);z-index:3;border:1px solid #78350f}
.gantt-milestone.critical{background:#dc2626;border-color:#991b1b}
.gantt-baseline{position:absolute;bottom:2px;height:4px;background:#f59e0b;border-radius:2px;z-index:1;opacity:.85}
.critical-legend-key{background:#dc2626!important;border-color:#991b1b!important}
.usage-export-bar{display:flex;justify-content:flex-end;padding:6px 12px;border-bottom:1px solid var(--line);background:#f8fafc;flex:none}
.overload-row{background:#fff1f2!important}
.overload-cell{background:#fee2e2;color:#991b1b;font-weight:700}
.ov-badge{display:block;font-size:9px;color:#b91c1c;font-weight:600}
#usage-grid{--split:var(--usage-split,46%)}
#ru-grid{--split:var(--ru-split,44%)}
.splitter-bar{background:#e0e5eb;border-left:1px solid #b5c0cd;border-right:1px solid #b5c0cd;cursor:col-resize;touch-action:none;position:relative;z-index:15}
.splitter-bar:after{content:"⋮";position:absolute;top:45%;left:-1px;font-size:16px;color:#7c8a9b}
.splitter-bar:hover{background:#a9bfd8}
.usage-sheet table,.usage-right-table,.ru-sheet table,.ru-right-table{border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:11px;width:auto}
.usage-sheet th,.usage-right-table th,.ru-sheet th,.ru-right-table th{height:var(--usage-head-h,48px);max-height:var(--usage-head-h,48px);box-sizing:border-box;position:relative;vertical-align:middle;white-space:nowrap;overflow:hidden;padding:0 7px;background:linear-gradient(#fbfcfd,#edf1f5);border-right:1px solid #d5dde7;border-bottom:1px solid #b9c3cf;font-weight:600;color:#33465c;font-size:10px}
.usage-right-table th,.ru-right-table th{text-align:center}
.usage-right-head-top{display:block;font-size:10px;font-weight:600;color:#33465c;line-height:1.2;overflow:hidden;text-overflow:ellipsis}
.usage-right-head-sub{display:block;font-size:9px;font-weight:400;color:#64748b;line-height:1.2;overflow:hidden;text-overflow:ellipsis}
.usage-sheet tbody tr:not(.virtual-spacer),.usage-right-table tbody tr:not(.virtual-spacer),.ru-sheet tbody tr:not(.virtual-spacer),.ru-right-table tbody tr:not(.virtual-spacer){height:var(--row)}
.usage-sheet tbody tr:not(.virtual-spacer) td,.usage-right-table tbody tr:not(.virtual-spacer) td,.ru-sheet tbody tr:not(.virtual-spacer) td,.ru-right-table tbody tr:not(.virtual-spacer) td{height:var(--row);max-height:var(--row);box-sizing:border-box;padding:0 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.usage-sheet .col-sort-btn,.ru-sheet .col-sort-btn{height:calc(var(--usage-head-h,48px) - 2px);max-height:calc(var(--usage-head-h,48px) - 2px)}
#usage-content,#resource-usage-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#resource-usage-panel{flex:1;overflow:hidden;display:flex;flex-direction:column;min-height:0}
#reports-panel{flex:1;display:flex;flex-direction:column;overflow:hidden}
.reports-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 12px;background:#f5f7fa;border-bottom:1px solid var(--line);font-size:11px}
#reports-content{flex:1;overflow:auto;padding:14px;background:#f8fafc}
.report-card{background:#fff;border:1px solid var(--line);border-radius:6px;padding:14px}
.report-kpis{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
.report-kpis>div{border:1px solid #e2e8f0;border-radius:5px;padding:7px 11px;background:#f8fafc;min-width:110px}
.report-kpis span{display:block;font-size:10px;color:#64748b}
.report-kpis strong{font-size:14px;color:#0f172a}
.report-svg{margin:12px 0;overflow-x:auto;border:1px solid #e2e8f0;border-radius:4px;padding:8px;background:#fff}
.report-table-wrap{overflow-x:auto;margin-top:10px}
.diag-panel{padding:14px;overflow:auto;max-width:1100px}
.audit-list{display:flex;flex-direction:column;gap:8px;margin:10px 0}
.audit-item{border:1px solid #cbd5e1;border-left-width:4px;border-radius:5px;padding:8px 12px;background:#fff;font-size:12px}
.audit-item.severity-critical{border-left-color:#dc2626;background:#fef2f2}
.audit-item.severity-warning{border-left-color:#d97706;background:#fffbeb}
.audit-item.severity-info{border-left-color:#2563eb;background:#eff6ff}
.audit-item button{margin-top:6px;font-size:11px}
.audit-note{padding:6px 10px;background:#fffbeb;border:1px solid #fde68a;border-radius:4px;color:#92400e;font-size:11px}
.edit-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0;align-items:center}
.edit-scroll{max-height:44vh;overflow:auto;border:1px solid #e2e8f0;border-radius:4px;padding:6px}
.edit-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 6px;border-bottom:1px solid #f1f5f9;font-size:11px}
.col-opt{display:flex;align-items:center;gap:6px;padding:3px 0;font-size:12px}
.form-error{color:#b91c1c;font-size:11px;min-height:14px;margin:4px 0}
#status.error{background:#fef2f2;color:#991b1b;border-bottom-color:#fecaca}
@media(max-width:760px){.split-view{flex-direction:column}.split-view .sheet,.split-view .chart{flex:1 1 50%!important;width:100%!important;overflow-x:auto!important}}

/* Sticky usa o scroll da pane; o overflow legado da timeline prendia o cabeçalho. */
.chart .timeline{overflow:visible}
