:root{--ink:#142b3a;--muted:#6d7e89;--line:#dfe7ea;--wash:#f4f7f8;--white:#fff;--navy:#0d2839;--navy2:#16394c;--teal:#168a84;--teal-light:#e3f5f1;--blue-light:#eaf4ff;--blue:#246ea1;--orange:#d58b42;--shadow:0 8px 26px rgba(26,55,69,.055);font-family:Inter,'Segoe UI',Arial,sans-serif;color:var(--ink)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--wash)}button,input,select{font:inherit}button{cursor:pointer}input,select{outline:none}input:focus,select:focus,button:focus-visible{outline:2px solid #55aaa5;outline-offset:1px}.hidden{display:none!important}.align-right{text-align:right!important}.app-shell{display:flex;min-height:100vh}.sidebar{width:246px;min-width:246px;background:var(--navy);color:#d5e4e8;display:flex;flex-direction:column;padding:30px 16px 18px;position:sticky;top:0;height:100vh;z-index:15}.brand{display:flex;align-items:center;gap:12px;padding:0 11px 55px;color:#fff}.brand-mark{width:43px;height:43px;display:grid;place-items:center;border-radius:11px;background:var(--teal);font-size:20px;font-weight:850;letter-spacing:-2px}.brand-mark span{color:#93ded5}.brand strong{display:block;font-size:16px;letter-spacing:-.3px}.brand small{display:block;font-size:8px;letter-spacing:1.5px;color:#84a6af;margin-top:3px}.sidebar-label{font-size:10px;color:#608695;letter-spacing:1.8px;font-weight:750;padding:0 15px 14px}.main-nav{display:grid;gap:6px}.nav-item{width:100%;border:0;color:#a9c0c9;background:transparent;text-align:left;padding:12px 15px;display:flex;align-items:center;gap:13px;border-radius:8px;font-size:13px;font-weight:650}.nav-item:hover{background:#183c4f;color:#fff}.nav-item.active{background:#1e4657;color:#fff;box-shadow:inset 3px 0 var(--teal)}.nav-icon{font-size:19px;width:22px;line-height:1;text-align:center;font-weight:400}.nav-count{margin-left:auto;color:#88acb6;background:#294b5a;border-radius:4px;padding:2px 7px;font-size:10px}.sidebar-spacer{flex:1}.sidebar-bottom{border-top:1px solid #28485a;padding:22px 11px 9px}.offline-pill{font-size:10px;letter-spacing:1.2px;color:#95cec5;font-weight:700;margin:0 0 16px}.offline-dot{display:inline-block;width:7px;height:7px;background:#52cbb0;border-radius:50%;margin-right:7px}.sidebar-action{display:flex;gap:12px;color:#b1cad1;background:transparent;border:0;padding:10px 0;font-size:12px;font-weight:600;width:100%;text-align:left}.sidebar-action:hover{color:#fff}.sidebar-foot{font-size:10px;color:#668997;padding:11px;border-top:1px solid #28485a}.main-content{min-width:0;flex:1}.topbar{height:69px;background:#fff;border-bottom:1px solid var(--line);padding:0 38px;display:flex;align-items:center;justify-content:space-between}.breadcrumb{font-size:12px;color:#71838d;font-weight:650}.breadcrumb span{margin:0 8px;color:#b7c3c8}.topbar-right{display:flex;gap:21px;align-items:center}.topbar-date{font-size:11px;color:#7b8b93}.avatar{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:#dfeeed;color:#117e78;font-size:10px;font-weight:800}.mobile-nav{display:none;border:0;background:transparent;color:var(--ink);font-size:19px}.page{display:none;padding:35px 38px 70px;max-width:1700px;margin:0 auto}.page.active{display:block}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:29px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:850;color:var(--teal);margin:0 0 8px}.page-heading h1{font-size:31px;line-height:1.1;letter-spacing:-1.2px;margin:0;font-weight:770}.page-subtitle{font-size:13px;color:var(--muted);margin:9px 0 0}.btn{display:inline-flex;justify-content:center;align-items:center;gap:6px;white-space:nowrap;border-radius:7px;padding:11px 16px;border:1px solid transparent;font-size:12px;font-weight:720;line-height:1.1;transition:.15s}.btn:hover{transform:translateY(-1px)}.btn-primary{background:var(--teal);color:white;border-color:var(--teal)}.btn-primary:hover{background:#087972}.btn-outline{background:#fff;border-color:#d5e0e4;color:#315064}.btn-outline:hover{background:#f6fafb}.btn-small{padding:9px 12px}.btn-danger{background:#c44f4f;color:#fff}.heading-actions,.workspace-actions,.standards-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:36px}.stat-card{background:#fff;border:1px solid #e0e8eb;border-radius:10px;padding:20px 21px 17px;box-shadow:var(--shadow);min-height:126px}.stat-top{display:flex;justify-content:space-between;align-items:center;color:#6d8089;font-size:11px;font-weight:700}.stat-icon{display:grid;place-items:center;width:29px;height:29px;border-radius:7px;color:var(--teal);background:var(--teal-light);font-size:16px}.stat-card strong{font-size:24px;letter-spacing:-1px;display:block;margin:14px 0 3px}.stat-card small{font-size:10px;color:#8a9aa2}.section-header{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:15px}.section-header h2,.workspace-title h2,.standards-toolbar h2{font-size:17px;letter-spacing:-.3px;margin:0 0 5px}.section-header p,.workspace-title p,.standards-toolbar p{font-size:11px;color:#87969e;margin:0}.segmented{display:flex;background:#e9eff1;padding:3px;border-radius:7px}.segmented button{border:0;background:none;color:#71818c;font-size:11px;font-weight:700;padding:7px 12px;border-radius:5px}.segmented button.active{background:white;color:#254859;box-shadow:0 1px 4px #bccbd1}.table-card,.estimate-workspace,.standards-panel{background:#fff;border:1px solid #e0e8eb;border-radius:9px;box-shadow:var(--shadow)}.table-scroll{overflow:auto}.projects-table,.standards-table{width:100%;border-collapse:collapse;text-align:left}.projects-table th,.standards-table th{background:#f8fafb;color:#83929b;font-size:10px;letter-spacing:.8px;font-weight:800;padding:15px 19px;border-bottom:1px solid var(--line);white-space:nowrap}.projects-table td,.standards-table td{padding:16px 19px;border-bottom:1px solid #edf1f2;font-size:12px;color:#45606d}.projects-table tr:last-child td,.standards-table tr:last-child td{border-bottom:0}.project-name{font-size:13px;font-weight:740;color:#1b3949;display:block;margin-bottom:5px}.project-meta{color:#84939b;font-size:10px}.status-badge{display:inline-block;padding:6px 9px;border-radius:5px;background:#e8f3f2;color:#167c75;font-size:10px;font-weight:800}.status-badge.submitted{background:#fff1dd;color:#ad752c}.status-badge.hold{background:#eeeef1;color:#777a88}.status-badge.awarded{background:#e9f1ff;color:#5071ab}.table-actions{display:flex;gap:6px;white-space:nowrap}.text-button{border:0;background:transparent;color:#227f80;font-weight:700;font-size:11px;padding:4px}.text-button:hover{text-decoration:underline}.text-button.danger{color:#bf6562}.empty-state{padding:55px;text-align:center;color:#83939b;font-size:13px}.empty-state strong{display:block;color:#304d5a;font-size:17px;margin-bottom:7px}
.estimate-heading{margin-bottom:22px}.estimate-summary{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:12px;margin-bottom:21px}.summary-card{background:#fff;border:1px solid #dfe8eb;border-radius:8px;padding:17px 19px;min-height:84px}.summary-card.accent{background:var(--navy2);color:#fff;border-color:var(--navy2)}.summary-card span{display:block;font-size:10px;letter-spacing:.8px;font-weight:750;color:#82949c;text-transform:uppercase;margin-bottom:9px}.summary-card.accent span{color:#a7cbd0}.summary-card strong{font-size:20px;letter-spacing:-.5px}.summary-card:not(.accent) strong{font-size:15px}.summary-card small{display:block;margin-top:5px;color:#83939b;font-size:10px}.workspace-title{display:flex;align-items:center;justify-content:space-between;padding:20px 21px 17px;gap:10px}.sheet-toolbar{display:flex;align-items:center;gap:8px;padding:0 20px 17px;flex-wrap:wrap}.search-wrap,.standard-search{border:1px solid #dbe5e9;border-radius:6px;display:flex;align-items:center;color:#95a5ad;padding:0 10px;background:#fff;min-height:35px}.search-wrap{flex:1;min-width:200px;max-width:370px}.search-wrap span,.standard-search span{font-size:20px;line-height:1;margin-right:5px}.search-wrap input,.standard-search input{border:0;background:transparent;min-width:0;width:100%;font-size:11px;color:var(--ink);padding:7px 0}.sheet-toolbar select,.report-controls select{height:35px;border:1px solid #dbe5e9;border-radius:6px;background:#fff;color:#41606d;font-size:11px;padding:0 10px}.btn-toolbar{height:35px;padding:0 11px}.column-picker{position:relative}.column-menu{position:absolute;right:0;top:42px;background:#fff;border:1px solid #d8e4e8;border-radius:8px;box-shadow:0 15px 35px #12304027;padding:13px;width:220px;z-index:10;max-height:370px;overflow:auto}.column-menu h4{margin:0 0 8px;font-size:11px}.column-menu label{display:flex;align-items:center;gap:7px;padding:5px 1px;font-size:11px;color:#405b68}.column-menu input{accent-color:var(--teal)}.sheet-container{overflow:auto;max-height:580px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.estimate-table{border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:1800px;width:100%}.estimate-table th,.estimate-table td{border-right:1px solid #e8eef1;border-bottom:1px solid #e8eef1;height:37px;position:relative}.estimate-table th{position:sticky;top:0;z-index:3;background:#f2f6f7;color:#59707d;text-align:left;font-size:9px;line-height:1.25;letter-spacing:.35px;text-transform:uppercase;font-weight:800;padding:9px 10px;white-space:normal}.estimate-table th:first-child,.estimate-table td:first-child{position:sticky;left:0;z-index:2;background:#fff}.estimate-table th:first-child{z-index:4;background:#f2f6f7}.estimate-table td{font-size:11px;color:#30505e;padding:0}.estimate-table tbody tr:hover td{background:#f8fbfb}.estimate-table tbody tr:hover td:first-child{background:#f8fbfb}.estimate-table input,.estimate-table select{display:block;width:100%;height:36px;border:0;background:transparent;padding:6px 9px;color:#274959;font-size:11px;min-width:0}.estimate-table .number-input{text-align:right}.estimate-table .computed{background:var(--blue-light);height:36px;display:flex;align-items:center;justify-content:flex-end;padding:0 9px;color:#28648b;font-weight:700;font-variant-numeric:tabular-nums}.estimate-table td.computed-cell{background:var(--blue-light)!important}.estimate-table tbody tr:hover td.computed-cell{background:#deefff!important}.estimate-table .total-cell .computed{color:#175b86;font-weight:850}.estimate-table .row-code{display:flex;align-items:center;gap:3px}.estimate-table .row-code input{font-weight:700;color:#25817d;padding-right:0}.delete-row{border:0;background:transparent;color:#c2ced1;padding:5px;font-size:15px}.delete-row:hover{color:#c55050}.estimate-table .group-row td{height:32px;background:#e8f1f1!important;color:#376365;font-size:10px;font-weight:850;padding:0 11px;letter-spacing:.4px}.estimate-table tfoot td{background:#f4f8f8;font-weight:850;color:#1b465a;padding:10px;text-align:right;font-variant-numeric:tabular-nums}.estimate-table tfoot td:first-child{text-align:left;background:#f4f8f8;z-index:2}.sheet-footer{display:flex;justify-content:space-between;padding:11px 20px;color:#8799a2;font-size:10px}.legend-dot{display:inline-block;background:var(--blue-light);border:1px solid #d2e6fb;width:9px;height:9px;margin-right:5px}
.standards-tabs{display:flex;gap:22px;border-bottom:1px solid #dce6e9;margin-bottom:20px}.standards-tabs button{background:transparent;border:0;border-bottom:2px solid transparent;color:#80919a;font-weight:750;font-size:12px;padding:0 2px 13px}.standards-tabs button.active{border-color:var(--teal);color:#1f575a}.standards-tabs span{background:#e9eff0;color:#70858f;border-radius:5px;padding:2px 6px;font-size:9px;margin-left:5px}.standards-toolbar{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:22px 22px 18px}.standards-actions .btn{padding:9px 10px;font-size:10px}.standard-search{margin:0 22px 18px;max-width:340px}.standards-table td{padding:11px 19px}.standards-table .code-value{font-weight:800;color:#217e79}.standard-foot{padding:13px 20px;color:#8b9ba3;font-size:10px;border-top:1px solid #edf1f2}
.standard-filters{display:flex;align-items:center;gap:9px;margin:0 22px 18px}.standard-filters .standard-search{margin:0;width:340px}.standard-filters select{height:35px;border:1px solid #dbe5e9;border-radius:6px;background:#fff;color:#41606d;font-size:11px;padding:0 10px}.standards-table.database-mode{min-width:2350px}.standards-table.database-mode th,.standards-table.database-mode td{white-space:nowrap;padding:10px 12px}.standards-table.database-mode th:nth-child(2),.standards-table.database-mode td:nth-child(2){min-width:300px;max-width:420px;white-space:normal}.standards-table.database-mode th:nth-child(14),.standards-table.database-mode td:nth-child(14){min-width:300px;max-width:420px;white-space:normal}.standards-table.database-mode th:first-child{position:sticky;left:0;z-index:2}.standards-table.database-mode td:first-child{position:sticky;left:0;background:#fff;z-index:1}.standards-table.database-mode tr:hover td:first-child{background:#f8fbfb}
.report-controls{display:flex;gap:12px;margin-bottom:19px;flex-wrap:wrap}.report-controls label{font-size:11px;color:#6e838d;font-weight:750;display:flex;align-items:center;gap:8px}.report-stage{background:#dce4e7;border-radius:9px;padding:27px;overflow:auto}.report-paper{width:816px;min-height:1056px;background:#fff;margin:0 auto;box-shadow:0 6px 24px #21435425;padding:46px 52px;color:#1c3a48;font-family:'Segoe UI',Arial,sans-serif}.report-head{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:3px solid #187d78;padding-bottom:20px}.report-logo{display:flex;align-items:center;gap:10px}.report-logo img{max-width:150px;max-height:54px;object-fit:contain}.report-logo-mark{background:#15384a;color:white;font-size:22px;font-weight:900;letter-spacing:-2px;padding:10px;border-radius:5px}.report-logo-text{font-size:12px;font-weight:800;letter-spacing:.5px}.report-meta{text-align:right;font-size:10px;line-height:1.7;color:#6e8089}.report-meta strong{display:block;font-size:15px;color:#1c3a48}.report-title{margin:26px 0 3px;font-size:25px;letter-spacing:-.7px}.report-subtitle{font-size:10px;color:#7f9098;margin:0 0 18px}.report-table{border-collapse:collapse;width:100%;table-layout:fixed}.report-table th{background:#173d50;color:#fff;text-transform:uppercase;font-size:7px;letter-spacing:.25px;padding:9px 4px;text-align:right}.report-table th:first-child{text-align:left;padding-left:8px}.report-table td{border-bottom:1px solid #e5ebee;padding:8px 4px;font-size:8px;text-align:right;color:#365261;word-break:break-word}.report-table td:first-child{text-align:left;padding-left:8px}.report-table .report-group td{background:#e6f1f0;color:#236b69;font-weight:850;text-align:left;font-size:8px;padding:8px}.report-table .report-group-total td{background:#f4f8f8;font-weight:800}.report-totals{width:315px;margin:22px 0 0 auto;font-size:10px}.report-total-row{display:flex;justify-content:space-between;gap:14px;padding:7px 0;border-bottom:1px solid #e6ecee}.report-total-row span{color:#71848e}.report-total-row strong{font-variant-numeric:tabular-nums}.report-total-row.grand{background:#173d50;color:#fff;padding:11px 13px;margin:9px -13px 0;font-size:13px}.report-total-row.grand span{color:#fff}.report-chart-section{break-inside:avoid;margin-top:29px;border-top:1px solid #dce6e9;padding-top:18px}.report-chart-title{font-size:13px;font-weight:800;margin-bottom:12px}.chart-content{display:flex;align-items:center;gap:25px}.donut{width:148px;height:148px;border-radius:50%;flex:0 0 148px;position:relative}.donut:after{content:"";position:absolute;inset:29px;background:#fff;border-radius:50%}.chart-legend{display:grid;grid-template-columns:1fr 1fr;gap:9px 20px;flex:1}.legend-item{font-size:9px;display:flex;align-items:center;gap:6px;color:#56707b}.legend-swatch{width:8px;height:8px;border-radius:2px;flex:0 0 8px}.legend-item strong{margin-left:auto;color:#254b5b}.report-foot{font-size:8px;color:#9baab0;border-top:1px solid #dce6e9;margin-top:25px;padding-top:11px;display:flex;justify-content:space-between}
dialog{border:0;padding:0;border-radius:11px;box-shadow:0 24px 80px #0c2f4290;color:var(--ink);max-width:calc(100vw - 24px)}dialog::backdrop{background:#0e2937a6}.form-dialog{width:640px}.small-dialog{width:450px}.codes-dialog{width:600px}.dialog-header{display:flex;justify-content:space-between;align-items:flex-start;padding:23px 26px 18px;border-bottom:1px solid var(--line)}.dialog-header h2{margin:0;font-size:21px;letter-spacing:-.4px}.icon-button{border:0;background:#eef3f4;color:#617984;border-radius:5px;width:26px;height:26px;font-size:21px;line-height:1}.dialog-body{padding:22px 26px;max-height:65vh;overflow:auto}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field{display:flex;flex-direction:column;gap:6px;color:#526c78;font-size:11px;font-weight:750}.field.wide{grid-column:1/-1}.field input,.field select{border:1px solid #d7e3e7;border-radius:6px;background:#fff;height:35px;padding:7px 10px;color:#264b5b;font-size:12px;width:100%}.field small{font-size:9px;color:#92a0a6;font-weight:400}.form-section-title{font-size:12px;margin:25px 0 13px;border-top:1px solid #e6ecee;padding-top:17px}.form-section-title span{font-size:10px;color:#94a4ab;font-weight:400;margin-left:8px}.form-grid.compact{gap:11px}.dialog-footer{display:flex;justify-content:flex-end;gap:9px;padding:16px 26px 22px;border-top:1px solid var(--line)}.current-logo{font-size:10px;color:#718792;margin-top:11px}.confirm-message{font-size:12px;line-height:1.5;color:#5b727d;margin:0;padding:22px 26px}.code-picker-list{margin-top:13px;max-height:360px;overflow:auto;border:1px solid var(--line);border-radius:6px}.code-picker-item{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eaf0f1;padding:10px 12px;gap:10px}.code-picker-item:last-child{border-bottom:0}.code-picker-item strong{font-size:11px;color:#197873}.code-picker-item span{display:block;font-size:11px;margin-top:2px}.code-picker-item small{display:block;font-size:9px;color:#8b9da5;margin-top:3px}.code-picker-item button{border:1px solid #cddfe2;background:#f6faf9;color:#177d76;border-radius:4px;font-size:10px;font-weight:750;padding:5px 8px}.code-picker-item button:hover{background:#e2f2ef}.current-logo img{max-width:100px;max-height:40px}.standard-delete{color:#b9625f;border:0;background:none;font-size:11px;font-weight:700}#toast{position:fixed;bottom:24px;right:24px;background:#143e50;color:#fff;padding:12px 18px;border-radius:7px;font-size:12px;box-shadow:0 8px 30px #17374655;opacity:0;transform:translateY(10px);transition:.2s;pointer-events:none;z-index:100}#toast.show{opacity:1;transform:none}
.cloud-key-help{font-size:12px;line-height:1.5;color:var(--muted);margin:0 0 18px}.cloud-key-help+.field input{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;letter-spacing:.2px}
@media(max-width:1100px){.sidebar{width:210px;min-width:210px}.page{padding:26px 22px 60px}.topbar{padding:0 22px}.stats-grid{grid-template-columns:repeat(2,1fr)}.estimate-summary{grid-template-columns:repeat(2,1fr)}.standards-toolbar{align-items:flex-start;flex-direction:column}.report-stage{padding:15px}}
@media(max-width:760px){.sidebar{position:fixed;transform:translateX(-100%);transition:.2s;box-shadow:10px 0 28px #0d283940}.sidebar.open{transform:none}.mobile-nav{display:block}.topbar{justify-content:flex-start;gap:12px;height:56px}.topbar-right{margin-left:auto}.topbar-date{display:none}.page{padding:22px 15px 45px}.page-heading{align-items:flex-start;flex-direction:column}.page-heading h1{font-size:27px}.stats-grid,.estimate-summary{grid-template-columns:1fr 1fr;gap:9px}.stat-card{padding:15px;min-height:110px}.stat-card strong{font-size:20px}.section-header{align-items:flex-start;flex-direction:column}.workspace-title{align-items:flex-start;flex-direction:column}.sheet-toolbar{padding:0 15px 15px}.search-wrap{max-width:none;width:100%}.standards-tabs{gap:9px;overflow:auto}.standards-tabs button{white-space:nowrap;font-size:10px}.standards-toolbar{padding:17px}.standard-search{margin:0 17px 15px}.form-grid{grid-template-columns:1fr}.report-stage{padding:10px}.report-paper{transform-origin:top left;transform:scale(.72);margin-bottom:-295px}.report-controls{align-items:flex-start;flex-direction:column}}
@media(max-width:560px){.report-paper{transform:scale(.45);margin-bottom:-580px}.stats-grid,.estimate-summary{grid-template-columns:1fr 1fr}.heading-actions{width:100%}.heading-actions .btn{flex:1}.table-actions{flex-direction:column;align-items:flex-start}.projects-table th,.projects-table td{padding:12px;white-space:nowrap}}
@media print{*{-webkit-print-color-adjust:exact;print-color-adjust:exact}html,body{background:#fff}.sidebar,.topbar,.page:not(#page-reports),.page-heading,.report-controls{display:none!important}.main-content,.app-shell{display:block}.page#page-reports{display:block!important;padding:0!important;margin:0!important;max-width:none}.report-stage{background:#fff;padding:0;overflow:visible}.report-paper{box-shadow:none;width:auto;min-height:0;padding:.37in .42in;transform:none!important;margin:0!important}.report-table tr{break-inside:avoid}.report-chart-section{break-inside:avoid}@page{size:letter portrait;margin:.28in}}

/* Responsive workspace and dense standards controls */
.page{max-width:none;width:100%;margin:0;padding:28px clamp(16px,2vw,34px) 60px}
.topbar{padding-left:clamp(16px,2vw,34px);padding-right:clamp(16px,2vw,34px)}
.table-card,.estimate-workspace,.standards-panel{width:100%;min-width:0}
.projects-table th:first-child{min-width:220px}.projects-table .project-estimator{min-width:125px;white-space:nowrap}
.report-total-row.subtotal{font-weight:800;background:#f4f8f8;padding-left:8px;padding-right:8px}.report-total-row.cost-base{background:#e6f1f0;color:#1d5e60;margin-top:5px}.report-total-row.cost-base span{color:#1d5e60}
.theme-toggle{display:inline-flex;align-items:center;gap:7px;background:transparent;border:1px solid var(--line);border-radius:7px;color:var(--ink);font-size:11px;font-weight:700;padding:7px 10px;white-space:nowrap}
.theme-toggle:hover{background:var(--wash)}.theme-toggle #theme-icon{font-size:15px;line-height:1}
.standard-filters{flex-wrap:wrap;gap:8px;margin:0 20px 10px}.standard-filters .standard-search{max-width:none;flex:1 1 300px;min-width:220px;width:auto}
.standard-filters select,.standards-viewbar select{height:35px;border:1px solid var(--line);border-radius:6px;background:var(--white);color:var(--ink);font-size:11px;padding:0 10px;max-width:210px}
.standards-viewbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:0 20px 13px;border-bottom:1px solid var(--line)}
.viewbar-label{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px;font-weight:700}.view-count{margin-left:auto;color:var(--muted);font-size:11px}
.standard-selection-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:9px 20px;background:#f6faf9;border-bottom:1px solid var(--line);font-size:11px;color:var(--muted)}
.standard-selection-bar #standard-selected-count{font-weight:800;color:var(--ink);min-width:75px}.standard-selection-bar .btn{padding:7px 10px}.standard-selection-bar #standard-add-selected-btn{margin-left:auto}.btn:disabled,.text-button:disabled{opacity:.42;cursor:not-allowed;transform:none;text-decoration:none}
.standards-table.database-mode{min-width:100%;width:max-content}.standards-scroll{max-height:clamp(420px,calc(100vh - 360px),920px);min-height:350px;overflow:auto}
.horizontal-scroll-top{height:17px;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid var(--line);scrollbar-color:#a4b6bc transparent}.horizontal-scroll-top>div{height:1px}
.standards-table th{position:sticky;top:0;z-index:3}.standards-table th,.standards-table td{white-space:nowrap}.standards-table.database-mode th,.standards-table.database-mode td{padding:9px 12px}
.standards-table .standard-select-col{min-width:43px;width:43px;max-width:43px;text-align:center;padding-left:9px!important;padding-right:9px!important;position:sticky;left:0;z-index:2;background:var(--white)}
.standards-table th.standard-select-col{z-index:5;background:#f8fafb}.standards-table input[type=checkbox]{accent-color:var(--teal);width:14px;height:14px;cursor:pointer}
.standards-table.database-mode th:nth-child(2),.standards-table.database-mode td:nth-child(2){min-width:125px;max-width:none;white-space:nowrap;position:sticky;left:43px;z-index:2;background:var(--white)}
.standards-table.database-mode th:nth-child(2){z-index:5;background:#f8fafb}
.standards-table.database-mode th:nth-child(14),.standards-table.database-mode td:nth-child(14){min-width:0;max-width:none;white-space:nowrap}
.standards-table.database-mode [data-col="description"]{min-width:280px;max-width:420px;white-space:normal}
.standards-table.database-mode [data-col="divisionLabel"]{min-width:300px;max-width:430px;white-space:normal}
.standards-table.database-mode [data-col="trade"]{min-width:150px}.standards-table.database-mode [data-col="unit"]{min-width:66px}
.standards-table.database-mode [data-col="materialCost"],.standards-table.database-mode [data-col="subcontractor"],.standards-table.database-mode [data-col="otherCost"]{min-width:112px;text-align:right;font-variant-numeric:tabular-nums}
.standards-table .standard-actions-col{min-width:188px;width:188px;position:sticky;right:0;z-index:2;background:var(--white);box-shadow:-5px 0 10px #1a344308}.standards-table:not(.database-mode) .standard-actions-col{min-width:116px;width:116px}.standards-table th.standard-actions-col{z-index:5;background:#f8fafb}
.standards-table tbody tr:hover td.standard-select-col,.standards-table tbody tr:hover td.standard-actions-col,.standards-table.database-mode tbody tr:hover td:nth-child(2){background:#f8fbfb}
.standards-table .standard-group-row td{background:#eaf3f2;color:#286d69;font-size:11px;font-weight:850;letter-spacing:.2px;padding:10px 15px!important;border-bottom:1px solid #d1e3e1}
.standards-table.database-mode .standard-group-row td{position:static;left:auto;z-index:auto;background:#eaf3f2!important}
.standard-group-row span{font-weight:500;color:#648d8b}.standard-empty{padding:35px!important;text-align:center;color:var(--muted)}
.source-label{display:inline-block;padding:3px 6px;border-radius:4px;background:#eff3f4;color:#647c86;font-size:10px}

/* Dark appearance keeps the printed report as white paper. */
body[data-theme="dark"]{--ink:#e5f0f4;--muted:#9aafb9;--line:#2a4451;--wash:#0d1c27;--white:#172b38;--navy:#091923;--navy2:#1b4655;--teal:#44bdb0;--teal-light:#183c3d;--blue-light:#17364a;--shadow:0 8px 26px rgba(0,0,0,.16);background:var(--wash)}
body[data-theme="dark"] .sidebar{background:#091923;color:#b7cbd2}
body[data-theme="dark"] .topbar,body[data-theme="dark"] .stat-card,body[data-theme="dark"] .table-card,body[data-theme="dark"] .estimate-workspace,body[data-theme="dark"] .standards-panel,body[data-theme="dark"] .summary-card:not(.accent),body[data-theme="dark"] .btn-outline,body[data-theme="dark"] .column-menu,body[data-theme="dark"] .search-wrap,body[data-theme="dark"] .standard-search,body[data-theme="dark"] dialog{background:var(--white);color:var(--ink);border-color:var(--line)}
body[data-theme="dark"] .summary-card.accent{background:#1d4a58}body[data-theme="dark"] .stat-card,body[data-theme="dark"] .summary-card{border-color:var(--line)}
body[data-theme="dark"] .projects-table th,body[data-theme="dark"] .standards-table th,body[data-theme="dark"] .estimate-table th{background:#203744;color:#b1c5ce;border-color:var(--line)}
body[data-theme="dark"] .projects-table td,body[data-theme="dark"] .standards-table td,body[data-theme="dark"] .estimate-table td{color:#c7dbe2;border-color:var(--line)}
body[data-theme="dark"] .project-name,body[data-theme="dark"] .empty-state strong,body[data-theme="dark"] .standard-selection-bar #standard-selected-count{color:#e5f0f4}
body[data-theme="dark"] .projects-table tr:hover td,body[data-theme="dark"] .standards-table tbody tr:hover td,body[data-theme="dark"] .estimate-table tbody tr:hover td{background:#203a47}
body[data-theme="dark"] .standard-selection-bar,body[data-theme="dark"] .estimate-table tfoot td{background:#1b3440;color:#d4e7ed;border-color:var(--line)}
body[data-theme="dark"] .standards-table .standard-select-col,body[data-theme="dark"] .standards-table .standard-actions-col,body[data-theme="dark"] .standards-table.database-mode td:nth-child(2),body[data-theme="dark"] .estimate-table td:first-child{background:var(--white)}
body[data-theme="dark"] .standards-table th.standard-select-col,body[data-theme="dark"] .standards-table th.standard-actions-col,body[data-theme="dark"] .standards-table.database-mode th:nth-child(2),body[data-theme="dark"] .estimate-table th:first-child{background:#203744}
body[data-theme="dark"] .standards-table tbody tr:hover td.standard-select-col,body[data-theme="dark"] .standards-table tbody tr:hover td.standard-actions-col,body[data-theme="dark"] .standards-table.database-mode tbody tr:hover td:nth-child(2),body[data-theme="dark"] .estimate-table tbody tr:hover td:first-child{background:#203a47}
body[data-theme="dark"] .standards-table .standard-group-row td,body[data-theme="dark"] .estimate-table .group-row td{background:#20433f!important;color:#a8e0d7;border-color:#2e615a}
body[data-theme="dark"] .standards-table.database-mode .standard-group-row td{background:#20433f!important}
body[data-theme="dark"] .standard-group-row span{color:#a2c7c0}body[data-theme="dark"] .source-label{background:#284450;color:#b8cbd1}
body[data-theme="dark"] .estimate-table .computed,body[data-theme="dark"] .estimate-table td.computed-cell{background:#173c55!important;color:#b8def6}body[data-theme="dark"] .estimate-table tbody tr:hover td.computed-cell{background:#1f4962!important}
body[data-theme="dark"] .estimate-table input,body[data-theme="dark"] .estimate-table select,body[data-theme="dark"] .field input,body[data-theme="dark"] .field select,body[data-theme="dark"] .sheet-toolbar select,body[data-theme="dark"] .standard-filters select,body[data-theme="dark"] .standards-viewbar select,body[data-theme="dark"] .report-controls select{background:var(--white);color:var(--ink);border-color:var(--line)}
body[data-theme="dark"] .estimate-table input,body[data-theme="dark"] .estimate-table select{background:transparent}body[data-theme="dark"] .search-wrap input,body[data-theme="dark"] .standard-search input{color:var(--ink)}
body[data-theme="dark"] .field,body[data-theme="dark"] .column-menu label,body[data-theme="dark"] .viewbar-label,body[data-theme="dark"] .report-controls label{color:#bed0d7}
body[data-theme="dark"] .segmented{background:#19313f}body[data-theme="dark"] .segmented button.active{background:#2a4a58;color:#f1f8fa}
body[data-theme="dark"] .report-stage{background:#10212b}body[data-theme="dark"] .report-paper{background:#fff;color:#1c3a48}
body[data-theme="dark"] .code-picker-item,body[data-theme="dark"] .dialog-header,body[data-theme="dark"] .dialog-footer,body[data-theme="dark"] .standard-foot{border-color:var(--line)}
body[data-theme="dark"] .code-picker-item button,body[data-theme="dark"] .icon-button{background:#234753;color:#b9ece3;border-color:#315967}
body[data-theme="dark"] .standards-tabs button.active,body[data-theme="dark"] .standards-table .code-value,body[data-theme="dark"] .text-button,body[data-theme="dark"] .code-picker-item strong{color:#75d5c9}
body[data-theme="dark"] .standard-delete,body[data-theme="dark"] .text-button.danger{color:#ee9a94}

@media(max-width:1100px){.page{padding:24px 20px 55px}.topbar{padding:0 20px}.standards-viewbar{gap:7px}}
@media(max-width:760px){.page{padding:20px 14px 45px}.topbar{padding:0 14px}.topbar-right{gap:9px}.theme-toggle #theme-label{display:none}.theme-toggle{padding:6px 9px}.standard-filters,.standards-viewbar,.standard-selection-bar{padding-left:14px;padding-right:14px}.standard-filters{margin-left:0;margin-right:0}.standard-filters select{flex:1 1 120px}.view-count{width:100%;margin-left:0}.standards-scroll{max-height:calc(100vh - 330px);min-height:310px}}
@media print{body[data-theme="dark"],body[data-theme="dark"] .report-paper{background:#fff!important;color:#1c3a48!important}body[data-theme="dark"] .report-paper .report-table th{background:#173d50!important;color:#fff!important}}

/* Auburn-inspired navy and orange, with readable text in both themes. */
:root{--navy:#0b2341;--navy2:#233954;--teal:#b54c00;--teal-light:#fff0e6;--orange:#e86100}
.btn-primary{background:#e86100;border-color:#e86100;color:#0b2341}.btn-primary:hover{background:#f28a40;border-color:#f28a40;color:#0b2341}
.brand-mark{background:#e86100;color:#0b2341}.brand-mark span{color:#0b2341}.nav-item.active{box-shadow:inset 3px 0 #e86100}.sidebar{background:#0b2341}
.estimate-table .group-row td,.standards-table .standard-group-row td,.standards-table.database-mode .standard-group-row td{background:#fff0e6!important;color:#71320b;border-color:#f4d2b9}
.group-toggle{display:flex;align-items:center;gap:9px;width:100%;padding:3px 0;background:transparent;border:0;color:inherit;text-align:left;font:inherit;font-weight:800;cursor:pointer}
.group-toggle:hover{text-decoration:underline}.group-chevron{display:inline-grid;place-items:center;flex:0 0 16px;font-size:13px;color:#b54c00}.group-meta{font-weight:600;letter-spacing:0;opacity:.9}
.standards-table .standard-group-row .group-meta{color:inherit}.estimate-table .group-row td{padding:0 11px}.estimate-table .group-row .group-toggle{min-height:31px}
.standard-selection-bar .text-button,.standards-tabs button.active,.standards-table .code-value,.text-button{color:#a94700}
.summary-card.accent{background:#0b2341;border-color:#0b2341}.stat-icon{background:#fff0e6;color:#b54c00}.avatar{background:#fff0e6;color:#a94700}
.report-head{border-bottom-color:#e86100}.report-logo-mark,.report-table th,.report-total-row.grand{background:#0b2341}.report-table .report-group td{background:#fdefe5;color:#8b3d05}.report-total-row.cost-base{background:#fff0e6;color:#0b2341}.report-total-row.cost-base span{color:#0b2341}
.sheet-toolbar select,.standards-viewbar select{max-width:210px}

body[data-theme="dark"]{--ink:#f3f7fc;--muted:#bacbda;--line:#365473;--wash:#07182b;--white:#102a49;--navy:#07182b;--navy2:#0b2341;--teal:#ffb985;--teal-light:#413523;--blue-light:#244563;--shadow:0 8px 26px rgba(0,0,0,.26);background:var(--wash);color:var(--ink)}
body[data-theme="dark"] .sidebar{background:#0b2341;color:#e8f0f7}body[data-theme="dark"] .brand-mark{background:#e86100;color:#0b2341}body[data-theme="dark"] .brand-mark span{color:#0b2341}
body[data-theme="dark"] .nav-item{color:#d5e2ee}body[data-theme="dark"] .nav-item:hover,body[data-theme="dark"] .nav-item.active{background:#233954;color:#fff}body[data-theme="dark"] .nav-item.active{box-shadow:inset 3px 0 #e86100}
body[data-theme="dark"] .nav-count{background:#3c4f67;color:#fff}body[data-theme="dark"] .sidebar-label,body[data-theme="dark"] .sidebar-foot{color:#bacbda}body[data-theme="dark"] .sidebar-action{color:#e1ebf4}body[data-theme="dark"] .offline-pill{color:#ffb985}
body[data-theme="dark"] .btn-primary{background:#e86100;border-color:#e86100;color:#0b2341}body[data-theme="dark"] .btn-primary:hover{background:#f28a40;border-color:#f28a40;color:#0b2341}body[data-theme="dark"] .btn-outline:hover,body[data-theme="dark"] .theme-toggle:hover{background:#233954;color:#fff}
body[data-theme="dark"] .summary-card.accent{background:#0b2341;border-color:#e86100}body[data-theme="dark"] .stat-icon{background:#413523;color:#ffb985}body[data-theme="dark"] .avatar{background:#413523;color:#ffb985}
body[data-theme="dark"] .projects-table th,body[data-theme="dark"] .standards-table th,body[data-theme="dark"] .estimate-table th,body[data-theme="dark"] .standards-table th.standard-select-col,body[data-theme="dark"] .standards-table th.standard-actions-col,body[data-theme="dark"] .standards-table.database-mode th:nth-child(2),body[data-theme="dark"] .estimate-table th:first-child{background:#1a3859;color:#ecf3f9;border-color:#365473}
body[data-theme="dark"] .projects-table td,body[data-theme="dark"] .standards-table td,body[data-theme="dark"] .estimate-table td{color:#e6eef7;border-color:#365473}
body[data-theme="dark"] .projects-table tr:hover td,body[data-theme="dark"] .standards-table tbody tr:hover td,body[data-theme="dark"] .estimate-table tbody tr:hover td,body[data-theme="dark"] .standards-table tbody tr:hover td.standard-select-col,body[data-theme="dark"] .standards-table tbody tr:hover td.standard-actions-col,body[data-theme="dark"] .standards-table.database-mode tbody tr:hover td:nth-child(2),body[data-theme="dark"] .estimate-table tbody tr:hover td:first-child{background:#213f60}
body[data-theme="dark"] .estimate-table .group-row td,body[data-theme="dark"] .standards-table .standard-group-row td,body[data-theme="dark"] .standards-table.database-mode .standard-group-row td{background:#263e5b!important;color:#ffe0c7;border-color:#6c5849}
body[data-theme="dark"] .group-chevron,body[data-theme="dark"] .standard-group-row span,body[data-theme="dark"] .estimate-table .group-row span{color:#ffb985}
body[data-theme="dark"] .estimate-table .computed,body[data-theme="dark"] .estimate-table td.computed-cell{background:#244563!important;color:#eef6ff}body[data-theme="dark"] .estimate-table tbody tr:hover td.computed-cell{background:#2e5374!important}
body[data-theme="dark"] .standards-tabs button.active,body[data-theme="dark"] .standards-table .code-value,body[data-theme="dark"] .text-button,body[data-theme="dark"] .code-picker-item strong{color:#ffb985}
body[data-theme="dark"] .topbar-date,body[data-theme="dark"] .breadcrumb,body[data-theme="dark"] .project-meta,body[data-theme="dark"] .stat-top,body[data-theme="dark"] .stat-card small,body[data-theme="dark"] .summary-card small,body[data-theme="dark"] .summary-card span,body[data-theme="dark"] .section-header p,body[data-theme="dark"] .workspace-title p,body[data-theme="dark"] .standards-toolbar p,body[data-theme="dark"] .page-subtitle,body[data-theme="dark"] .sheet-footer,body[data-theme="dark"] .standard-foot,body[data-theme="dark"] .view-count,body[data-theme="dark"] .empty-state{color:#bacbda}
body[data-theme="dark"] .status-badge{background:#234f4a;color:#d7fff3}body[data-theme="dark"] .status-badge.submitted{background:#614020;color:#ffe2be}body[data-theme="dark"] .status-badge.hold{background:#41485d;color:#e3e7f0}body[data-theme="dark"] .status-badge.awarded{background:#29466c;color:#e1edff}
body[data-theme="dark"] .standards-tabs span,body[data-theme="dark"] .source-label{background:#294766;color:#dce8f3}body[data-theme="dark"] .segmented button{color:#d8e5ef}body[data-theme="dark"] .segmented button.active{background:#365473;color:#fff}
body[data-theme="dark"] .search-wrap input::placeholder,body[data-theme="dark"] .standard-search input::placeholder,body[data-theme="dark"] .estimate-table input::placeholder{color:#b2c5d5}
body[data-theme="dark"] .standards-tabs button,body[data-theme="dark"] .field small,body[data-theme="dark"] .form-section-title span,body[data-theme="dark"] .breadcrumb span,body[data-theme="dark"] .code-picker-item small{color:#bacbda}
body[data-theme="dark"] .field input::placeholder,body[data-theme="dark"] .code-picker-item input::placeholder{color:#b2c5d5}body[data-theme="dark"] .standard-selection-bar{background:#1a3859}body[data-theme="dark"] .offline-dot{background:#e86100}
@media print{body[data-theme="dark"] .report-stage{background:#fff!important}body[data-theme="dark"] .report-paper .report-table th{background:#0b2341!important}}

/* Cloud-ready workspace controls and identity. */
.brand-mark{display:block;width:43px;height:43px;flex:0 0 43px;border-radius:11px;object-fit:contain;background:transparent}
.affiliation-logo{width:112px;max-height:42px;object-fit:contain;flex:0 0 auto}
.sidebar-foot{line-height:1.6}.sidebar-foot strong{color:#e8f0f7}.sidebar-foot a{color:#ffb985;text-decoration:none}.sidebar-foot a:hover{text-decoration:underline}
.topbar-right{gap:9px}.save-status{font-size:11px;font-weight:700;color:#506575;white-space:nowrap;min-width:104px;text-align:right}.save-status.dirty{color:#a64b08}.save-status.error{color:#aa3030}
.topbar .btn-toolbar{padding:8px 10px}.topbar button:disabled{opacity:.43;cursor:not-allowed;transform:none}
body[data-theme="dark"] .save-status{color:#c5d7e5}body[data-theme="dark"] .save-status.dirty{color:#ffb985}body[data-theme="dark"] .save-status.error{color:#ff9b9b}
body[data-theme="dark"] .affiliation-logo{background:#fff;border-radius:4px;padding:3px}
@media(max-width:1200px){.topbar-date{display:none}.affiliation-logo{width:90px}.topbar-right{gap:6px}}
@media(max-width:850px){.affiliation-logo{display:none}.topbar .btn-toolbar{padding:7px}.save-status{min-width:0}}
@media(max-width:560px){.topbar .btn-toolbar{font-size:0;min-width:32px}.topbar #save-btn{font-size:11px;min-width:45px}.topbar #undo-btn::before{content:'↶';font-size:16px}.topbar #redo-btn::before{content:'↷';font-size:16px}.save-status{font-size:9px;max-width:72px;white-space:normal;line-height:1.1}}
