:root{color-scheme:light;--ink:#203d37;--muted:#63766f;--green:#154e41;--line:#dfe7e2;--paper:#f4f6f3;--white:#fff;--gold:#e3c68c;--amber:#7f5b22;--radius:16px}
*{box-sizing:border-box}body{margin:0;background:var(--paper);font-family:"Segoe UI",Tahoma,Arial,sans-serif;color:var(--ink);font-size:15px;line-height:1.8}button{font:inherit}button:focus-visible,a:focus-visible{outline:3px solid #c99a38;outline-offset:4px}button{cursor:pointer}button:disabled{cursor:wait}a{color:var(--green)}.skip-link{position:absolute;top:-100px;right:12px;z-index:10;background:white;padding:12px}.skip-link:focus{top:8px}.shell{display:grid;grid-template-columns:255px minmax(0,1fr);min-height:100vh}.sidebar{background:#123e34;color:#f0f5f1;padding:32px 20px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;margin-bottom:46px}.brand strong{font-size:20px}.brand small{display:block;color:#acc5ba;font-size:12px}.brand-mark{width:44px;height:44px;background:var(--gold);border-radius:12px;color:#163f35;display:grid;place-items:center;font-size:28px;font-weight:700}.nav-caption{font-size:11px;color:#aac3b9;margin:0 14px 12px;letter-spacing:1px}nav{display:flex;flex-direction:column;gap:6px}.nav-button{display:flex;gap:9px;align-items:center;justify-content:space-between;text-align:right;border:0;background:transparent;color:#d6e6de;border-radius:10px;padding:11px 12px;font-size:13px;line-height:1.7;width:100%}.nav-button[aria-current=page]{background:#295c4e;color:white;box-shadow:inset -3px 0 0 var(--gold)}.nav-button:hover{background:#244d42}.nav-button small{font-size:10px;color:#b8cfc3;white-space:nowrap}.sidebar-foot{margin-top:auto;padding:48px 14px 0;color:#dce9e2;font-size:13px}.sidebar-foot small{display:block;color:#a9c2b5}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#dcc28a;margin-left:5px}.workspace{min-width:0}.topbar{height:76px;background:white;border-bottom:1px solid var(--line);padding:0 40px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px}.top-tag{font-size:12px;color:var(--muted);border:1px solid var(--line);border-radius:30px;padding:4px 12px}.environment{margin:26px 40px 0;padding:10px 16px;background:#fcf4e4;color:#795822;border:1px solid #eadbbb;border-radius:10px;font-size:13px}main{padding:28px 40px 12px;max-width:1560px;margin:auto}h1,h2,h3,p{margin:0}h1{font-size:29px;font-weight:650;line-height:1.5;letter-spacing:-.5px}h2{font-size:19px;line-height:1.6}h3{font-size:15px}.eyebrow{font-size:12px;color:var(--muted);margin-bottom:6px}.page-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.page-head p{color:var(--muted);font-size:13px;margin-top:5px}.pill{border:1px solid var(--line);background:white;border-radius:30px;padding:5px 13px;color:var(--muted);font-size:12px;white-space:nowrap}.hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,290px);gap:28px;padding:28px 30px;background:#e7eee8;border:1px solid #d1dfd4;border-radius:var(--radius);margin-bottom:20px}.hero h2{font-size:21px;max-width:760px}.hero .eyebrow{color:#527260}.hero p{margin-top:10px;color:#506a5c;font-size:13px}.hero-status{border-right:1px solid #cbd9cd;padding-right:26px;display:flex;flex-direction:column;justify-content:center}.hero-status strong{font-size:28px;color:var(--green)}.hero-status small{color:#566d5e;font-size:12px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}.card{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:22px}.metric-label{font-size:12px;color:var(--muted);margin-bottom:10px}.metric-value{font-size:24px;font-weight:650;line-height:1.5;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.metric-value.empty-value{font-size:18px;color:#60776c;font-weight:500}.metric-note{font-size:12px;color:var(--muted);margin-top:6px}.money-unit{font-size:12px;font-weight:400;margin-right:6px;color:var(--muted)}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:30px 0 14px}.section-title span{font-size:12px;color:var(--muted)}.finance-note{font-size:12px;color:var(--muted);margin-top:-9px}.followup{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.followup .card{padding:19px}.followup h3{font-size:13px}.empty-dash{font-size:25px;color:#a5b5aa;margin:9px 0}.followup p{font-size:12px;color:var(--muted)}.notice{margin-top:22px;border-right:3px solid #cab17b;padding:9px 16px;background:#efefe6;font-size:13px;color:#62664f}.project-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px;margin:0}.field{padding:19px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.field:first-child{grid-column:1/-1}.field dt{color:var(--muted);font-size:12px;margin-bottom:4px}.field dd{margin:0;font-size:16px}.empty-panel{text-align:center;padding:60px 28px}.empty-icon{display:grid;place-items:center;width:62px;height:62px;margin:0 auto 22px;border:1px solid #c6d7cd;border-radius:18px;color:#537a65;font-size:28px;background:#eff4ef}.empty-panel p{max-width:660px;margin:14px auto;color:var(--muted)}.empty-panel small{display:block;color:#819087;margin-top:20px}.retry{margin-top:16px;background:var(--green);color:white;border:0;border-radius:8px;padding:10px 22px}.loading{padding:90px;text-align:center;color:var(--muted)}footer{color:#7b8a82;font-size:11px;margin:24px 40px;padding:17px 0;border-top:1px solid var(--line)}
@media(min-width:1600px){main{padding-top:36px}.metric-value{font-size:28px}}
@media(max-width:1150px){.shell{grid-template-columns:220px minmax(0,1fr)}main{padding:24px}.topbar{padding:0 24px}.environment{margin:22px 24px 0}.hero{grid-template-columns:1fr}.hero-status{border-right:0;border-top:1px solid #cbd9cd;padding:14px 0 0}.followup{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-value{font-size:20px}}
@media(max-width:760px){.shell{display:block}.sidebar{padding:16px}.brand{margin-bottom:18px}.brand strong{font-size:18px}.brand-mark{width:38px;height:38px;font-size:24px}.nav-caption,.sidebar-foot{display:none}nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}.nav-button{font-size:12px;padding:8px}.topbar{height:56px;padding:0 18px;font-size:12px}.top-tag{font-size:10px}.environment{margin:16px 16px 0;padding:10px 12px;font-size:12px}main{padding:22px 16px 8px}h1{font-size:24px}.page-head{gap:12px}.page-head .pill{display:none}.hero{padding:22px;gap:12px}.hero h2{font-size:19px}.hero-status strong{font-size:24px}.metrics{grid-template-columns:1fr;gap:12px}.card{padding:20px}.metric-value{font-size:25px}.followup{gap:10px}.followup .card{padding:15px}.section-title{align-items:flex-start}.section-title span{max-width:130px}.project-list{grid-template-columns:1fr}.field:first-child{grid-column:auto}.empty-panel{padding:38px 20px}footer{margin:16px}.loading{padding:40px 12px}}
@media(prefers-reduced-motion:no-preference){.nav-button{transition:background .15s ease}}
.key-metrics .card{border-top:3px solid #bda06a}.key-metrics .metric-value{font-size:22px}.actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:16px 0 22px}.button{display:inline-block;border:1px solid var(--green);background:var(--green);color:white;border-radius:9px;padding:9px 17px;text-decoration:none;font:inherit;font-size:13px;cursor:pointer}.button.secondary{background:white;color:var(--green);border-color:#c9d7cc}.button:disabled{opacity:.5;cursor:not-allowed}.text-button{border:0;background:transparent;text-decoration:underline;color:var(--green);font:inherit;font-size:12px;cursor:pointer}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:20px 0}.form-field{display:flex;flex-direction:column;gap:5px;font-size:13px;color:var(--ink);min-width:0}.form-field input,.form-field textarea,.form-field select{border:1px solid #cbd7ce;border-radius:8px;background:white;padding:10px;font:inherit;color:var(--ink);min-width:0;width:100%}.form-field input[type=checkbox]{width:20px;height:20px}.form-field input[type=date]{direction:ltr;text-align:right}.form-field select[multiple]{min-height:90px}.form-field input:focus,.form-field select:focus,.form-field textarea:focus{outline:2px solid #93ae9d;outline-offset:1px}.form-footer{grid-column:1/-1}.form-message .notice{margin-top:12px}.filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0 22px;align-items:end}.record-list{margin:15px 0}.record-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;background:white;border:1px solid var(--line);border-radius:11px;margin:8px 0;padding:14px;overflow-wrap:anywhere}.record-link{border:0!important;text-align:right;font-weight:600;padding:0;max-width:65%}.record-row .metric-note{text-align:left;font-size:12px}.error{background:#fff0ec;color:#903e2e;border-color:#c45e48}.card+.card{margin-top:18px}.metrics .card,.followup .card{margin-top:0}.print-note{margin:18px 0 10px;font-size:12px;color:var(--muted)}main>section.card{margin-top:18px}main>.button{margin:10px 0 10px 8px}.record-row button{white-space:normal}.empty-dash{font-variant-numeric:tabular-nums}.form-grid [disabled]{background:#eef0ed}
@media(max-width:1000px){.filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.form-grid{grid-template-columns:1fr}.record-row{display:block}.record-link{max-width:100%}.record-row .metric-note{display:block;text-align:right}.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.key-metrics .metric-value{font-size:21px}.actions .button{flex-grow:1;text-align:center}.form-field{font-size:14px}}
@media print{.sidebar,.topbar,nav,.actions,button,.button,.filters,footer{display:none!important}.shell{display:block}.environment{background:white;color:black;border:1px solid black;margin:0}.workspace main{padding:12px}.card,.record-row{break-inside:avoid;border-color:#bbb;box-shadow:none}.print-note{display:block;font-weight:bold;color:black}body{background:white}.form-grid{display:none}}
/* Module skeletons reuse the shared palette and shell. */
.structure-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}.structure-grid .card{margin:0;display:flex;flex-direction:column;gap:12px}.structure-grid .button{margin-top:auto;align-self:flex-start}.structure-steps{display:flex;flex-wrap:wrap;gap:12px 32px;padding-right:24px;margin:18px 0}.structure-steps li{padding:6px 10px;background:var(--paper);border-radius:8px}.structure-tabs [aria-current=page]{background:var(--green);color:white}.structure-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;margin:0}.structure-fields .field:first-child{grid-column:auto}.structure-fields dd{color:var(--muted);font-size:13px}.structure-table{overflow-x:auto;margin-top:16px}.structure-table table{width:100%;border-collapse:collapse;text-align:right;font-size:13px}.structure-table th{background:#edf2ed;padding:12px;white-space:nowrap}.structure-table td{padding:30px 16px;color:var(--muted);border-bottom:1px solid var(--line)}.structure-table caption{text-align:right;font-size:12px;color:var(--muted);padding:8px 0}.structure-search{width:230px;max-width:100%;border:1px solid var(--line);border-radius:8px;padding:8px;font:inherit}.structure-search-results{display:flex;flex-wrap:wrap;gap:8px;margin:12px 40px}.structure-search-results:empty{display:none}[hidden]{display:none!important}
@media(max-width:1150px){.structure-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar:has(.structure-search){height:auto;min-height:76px;flex-wrap:wrap;padding-top:12px;padding-bottom:12px}}
@media(max-width:760px){.structure-grid,.structure-fields{grid-template-columns:1fr}.structure-search{width:100%}.structure-search-results{margin:12px 16px}.structure-steps{display:block}.structure-steps li{margin-bottom:8px}}
.document-extra{grid-column:1/-1;border-top:1px solid var(--line);padding-top:14px;min-width:0}.document-extra summary{cursor:pointer;color:var(--green);font-size:14px;font-weight:600;padding:6px 0}.document-extra summary:focus-visible{outline:3px solid #c99a38;outline-offset:3px}.document-extra>.metric-note{margin-top:8px}.document-extra-fields{margin-bottom:0}
/* Unified workspace navigation stays visible during page changes. */
@media(min-width:761px){.sidebar{position:sticky;top:0;height:100vh;overflow:auto}.brand{margin-bottom:26px}.sidebar-foot{padding-top:24px}}
.topbar{position:sticky;top:0;z-index:2}.dashboard-metrics{margin-top:24px}.upload-pages{grid-column:1/-1}.upload-pages .record-row{align-items:center}.upload-pages .record-row>span{flex:1;overflow-wrap:anywhere}.upload-finance{margin:0}.compact-filters{grid-template-columns:2fr 1fr 1fr auto}.login-card{max-width:600px;margin:50px auto}.login-card>.button{margin-top:24px}.card>h2+.metric-note{margin-top:10px}
@media(max-width:760px){.compact-filters{grid-template-columns:1fr 1fr}.upload-pages .record-row{display:flex;flex-wrap:wrap}.topbar{position:static}.dashboard-metrics{grid-template-columns:1fr}}
.page-thumbnail{width:72px;height:96px;object-fit:contain;background:#f1f3f0;border:1px solid var(--line);border-radius:4px}
.topbar{height:auto;min-height:76px;flex-wrap:wrap;padding-top:12px;padding-bottom:12px}.topbar>.button{font-size:12px;padding:7px 12px}
.finance-table{width:100%;border-collapse:collapse;margin:16px 0;font-size:13px}.finance-table td,.finance-table th{padding:10px;border-bottom:1px solid var(--line);text-align:right}.finance-table th{background:#eff3ef}.finance-table input{width:100%;min-width:105px;padding:10px;border:1px solid #cbd7ce;border-radius:6px;font:inherit;direction:ltr;text-align:right}.finance-table .form-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.finance-table-wrap{overflow:auto;max-width:100%}.finance-import-row{display:grid;grid-template-columns:2fr 1fr 1.5fr;gap:12px;align-items:end;padding:12px 0;border-bottom:1px solid var(--line)}@media(max-width:760px){.finance-import-row{grid-template-columns:1fr}.finance-table{min-width:500px}}
/* Finance form: editable amounts first, no cell-mapping review grid. */
.finance-section-heading{grid-column:1/-1;padding-top:20px;margin-top:4px;border-top:1px solid var(--line)}.finance-section-heading h2{font-size:20px}.finance-money-input{text-align:left!important;direction:ltr;font-variant-numeric:tabular-nums;font-size:16px!important}.finance-table input{background:#f9fbf9;border-color:#d9e3dc}.finance-table th{font-weight:600;color:var(--muted)}.finance-table td:first-child{width:45%}.finance-allocations{background:#f7f9f6;border:1px solid var(--line);border-radius:10px;padding:12px 16px}.excel-read-status .notice{margin-top:12px;border:1px solid #d3e3d8;border-radius:8px;background:#eef6f0;color:#315b42}.excel-read-status .error{background:#fff0ec;color:#903e2e;border-color:#c45e48}.finance-import-row{display:none}
.finance-save-bar{position:sticky;bottom:12px;z-index:3;background:white;border:1px solid var(--line);border-radius:10px;padding:12px 16px;box-shadow:0 4px 18px #173f3220;margin-top:8px}.finance-save-bar>.button{min-width:180px}.finance-save-bar .notice{margin-top:10px}
/* Files are the primary content; previews never use public Drive URLs. */
.attachment-row{padding:1rem 0;border-bottom:1px solid #dce5e1;overflow-wrap:anywhere}
.attachment-row:last-child{border-bottom:0}
.attachment-row>.actions{margin-top:.8rem}
.file-preview{position:fixed;inset:1rem;z-index:1000;background:#fff;border:1px solid #dce5e1;border-radius:14px;box-shadow:0 16px 60px #123d3140;display:flex;flex-direction:column;padding:1rem;gap:1rem}
.file-preview-toolbar{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}
.file-preview-toolbar strong{flex:1;overflow-wrap:anywhere}
.file-preview-content{flex:1;width:100%;min-height:0;border:0;background:#f2f5f3;object-fit:contain}
.file-share{background:#f2f5f3;padding:1rem;border-radius:10px}
.file-share .button{margin:.3rem}
.pdf-preview-host{flex:1;min-height:0;display:flex;flex-direction:column;gap:.5rem}
.pdf-pages{flex:1;overflow:auto;background:#e9eeeb;text-align:center;padding:1rem}
.pdf-pages canvas{display:block;margin:auto;background:white;max-width:none}
.pdf-controls{justify-content:center;margin:0}
.project-switcher{display:flex;align-items:center;gap:.5rem;max-width:100%;flex-wrap:wrap}
.project-switcher select{max-width:310px;padding:.6rem;border:1px solid #c9d8d0;border-radius:9px;background:#fff;color:#163f35}
.workbook-host{overflow:hidden}
.workbook-controls{display:flex;gap:.65rem;align-items:center;flex-wrap:wrap;direction:rtl;padding:.4rem 0}
.workbook-controls select,.workbook-controls input:not([type=checkbox]){font:inherit;padding:.65rem .8rem;border:1px solid #c8d9d1;border-radius:9px;background:#fff;min-height:42px}
.workbook-controls select{min-width:190px;max-width:100%}.workbook-controls input:not([type=checkbox]){flex:1;min-width:170px}
.workbook-references{display:flex;align-items:center;gap:.4rem;font-size:.85rem;color:#5d746b;white-space:nowrap}
.workbook-scroll{overflow:auto;flex:1;min-height:0;border:1px solid #dce5e1;border-radius:10px;direction:rtl;background:#fff;overscroll-behavior:contain}
.workbook-table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:1rem;direction:rtl;line-height:1.9;color:#243e34}
.workbook-table th,.workbook-table td{border:1px solid #dce5e1;padding:.8rem .85rem;white-space:pre-wrap;overflow-wrap:anywhere;text-align:right;vertical-align:middle}
.workbook-table thead th{position:sticky;top:0;background:#eef3f0;color:#667b72;z-index:1;font-size:.8rem;padding:.3rem}
.workbook-table .workbook-source-row{background:#f6f8f7;font-size:.75rem;font-weight:400;color:#71847c}
.workbook-table .workbook-number{direction:ltr;text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums}
.workbook-heading{color:#123f32;border-top:2px solid #a8bdb1!important;padding-top:1rem!important;padding-bottom:1rem!important}
.workbook-title{background:#edf4ef;font-weight:700;text-align:center!important;padding:1.2rem!important}
.reference-library{display:grid;gap:20px;margin-top:22px}.reference-group h2{font-size:19px;margin:0 0 12px}.reference-card{margin:0 0 14px;padding:22px;display:flex;flex-direction:column;gap:15px;border-right:4px solid var(--green)}
.reference-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.reference-name{border:0;background:transparent;color:var(--green);font:inherit;font-size:20px;font-weight:700;text-align:right;cursor:pointer;line-height:1.7;padding:0}.reference-name:hover{text-decoration:underline}.reference-name:focus-visible{outline:3px solid #c99a38;outline-offset:4px}
.reference-format{font-size:12px;direction:ltr;color:#536b61;background:#edf3ef;border-radius:6px;padding:4px 9px}.reference-card .file-actions{margin:0;gap:10px}.reference-card .file-actions .button{min-width:112px;font-size:15px}.reference-manage .button{border:0;padding:3px 0;font-size:13px;color:#637c70;background:transparent}
.reference-options{margin-top:16px;color:#60776c;font-size:13px}.reference-options summary{cursor:pointer;display:inline-block}.reference-options .filters{margin-top:12px}.file-action-message:empty{display:none}.file-action-message .notice,.file-action-message p{margin:0;font-size:14px}
@media(max-width:650px){.reference-card{padding:16px}.reference-name{font-size:18px}.reference-card .file-actions{display:grid;grid-template-columns:repeat(3,1fr)}.reference-card .file-actions .button{min-width:0;padding:.7rem .5rem}}
.attachment-current{display:inline-block;background:#e3f0e8;color:#164a39;border-radius:20px;padding:.2rem .7rem;margin-inline-start:.6rem}
@media(max-width:650px){.file-preview{inset:.3rem;padding:.6rem}.attachment-row .actions{display:grid;grid-template-columns:1fr 1fr}.file-preview-toolbar .button{padding:.6rem}}
.material-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.material-heading h2{margin:0;font-size:1.15rem}.material-status{border-radius:20px;padding:7px 14px;background:#eef2f1;font-size:.9rem}.material-status.complete{background:#dcefe4;color:#175338}.material-status.missing{background:#fff1d6;color:#805316}.material-card{margin:14px 0}.material-card>.actions{margin-top:14px}.material-file{padding:16px 0;border-bottom:1px solid #dde5e0}.material-save{position:sticky;top:0;z-index:2;background:#f3f6f3;padding:14px;border:1px solid #d6e0da;border-radius:12px}.material-proposal{margin-top:16px}.material-proposal details{padding-top:12px}.material-proposal input[type=checkbox]{width:24px;height:24px;accent-color:#175a49}.full-width{grid-column:1/-1}.material-form .actions{margin-top:16px}.materials-register .reference-file-actions{flex-wrap:wrap}
