/* VEHM Documents / RFIs: isolated controls, approved workspace v0.2 layout unchanged. */
body.controls-mode #notice,body.controls-mode #kpi-grid,body.controls-mode .workspace-region,body.controls-mode .bottom-grid,body.controls-mode .top-subline,body.controls-mode #financials-root{display:none!important}
body:not(.controls-mode) #controls-root{display:none!important}
.ctl-wrapper{margin-top:24px;max-width:1650px;color:var(--text,#ebf4ff);padding-bottom:38px}
.ctl-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:19px;flex-wrap:wrap}
.ctl-eyebrow{font-size:10px;color:#e7b45d;letter-spacing:1.3px;font-weight:800;text-transform:uppercase}
.ctl-top h2{font-size:25px;color:var(--text,#f4f7ff);margin:5px 0}
.ctl-top p{font-size:12px;color:var(--muted,#9cb0ca);margin:0}
.ctl-actions{display:flex;gap:9px;align-items:center}
.ctl-actions button,.ctl-filter select,.ctl-link,.ctl-modal-card button,.ctl-upload button{cursor:pointer;border:1px solid #2e506b;background:#11263c;color:#eaf3ff;border-radius:7px;padding:10px 13px;font:inherit}
.ctl-actions button:hover,.ctl-link:hover,.ctl-modal-card button:hover{border-color:#dfa643}
.ctl-actions .ctl-gold,.ctl-modal-card .ctl-small-gold{background:linear-gradient(140deg,#f3ca80,#ca953b);border-color:#b77a30;color:#152236;font-weight:750}
.ctl-notice{font-size:12px;line-height:1.7;color:#b0c8dc;border-radius:10px;background:#0d2940;border:1px solid #1d4860;padding:13px 17px;margin-bottom:14px}
.ctl-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin-bottom:14px}
.ctl-stats>div{background:linear-gradient(155deg,#102a44,#0a1b2c);padding:14px 17px;border-radius:11px;border:1px solid #254564;display:flex;flex-direction:column;gap:5px}
.ctl-stats b{font-size:25px;color:#f7f4f1}.ctl-stats span{font-size:11px;color:#98b3ce}
.ctl-filter{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:17px 0}
.ctl-filter label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#a3bbd3}
.ctl-filter input,.ctl-filter select{box-sizing:border-box;min-height:39px;background:#0e2135;border:1px solid #2b4b65;border-radius:7px;padding:8px 11px;color:#e9f6ff;font:inherit}
.ctl-filter input{width:min(440px,75vw)}
.ctl-found{font-size:11px;color:#93b8cc;margin-left:auto;padding-bottom:10px}
.ctl-table-wrap{border:1px solid #284761;border-radius:11px;overflow:auto;background:#091a2c}
.ctl-table{width:100%;border-collapse:collapse;font-size:12px;min-width:980px}
.ctl-table thead{background:#14314e;color:#92afc9;position:sticky;top:0;z-index:1;text-align:left}
.ctl-table th{font-size:11px;font-weight:700;letter-spacing:.35px;padding:13px 12px;text-transform:uppercase;border-bottom:1px solid #345775}
.ctl-table td{padding:13px 12px;vertical-align:top;border-bottom:1px solid #213950;color:#d7e7f5}
.ctl-table tr:hover td{background:#102b44}
.ctl-table td:first-child{min-width:270px;max-width:370px}
.ctl-table td strong{display:block;margin-bottom:4px;color:#fff;font-size:11px}
.ctl-cell-title{max-width:365px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ctl-table small{display:block;color:#90aac4;margin-top:5px}
.ctl-table .ctl-late{color:#ffb6a2;font-weight:700}
.ctl-pill{border:1px solid #455773;border-radius:100px;padding:4px 8px;display:inline-block;white-space:nowrap;font-size:10px;color:#c4d8ec}
.ctl-pill.accepted,.ctl-pill.closed,.ctl-pill.response_received{color:#7cedcb;border-color:#277969;background:#103e3a}
.ctl-pill.submitted,.ctl-pill.formally_submitted,.ctl-pill.ready_to_submit{color:#97d4ff;border-color:#376d9f;background:#102e4e}
.ctl-pill.on_hold,.ctl-pill.revise_resubmit,.ctl-pill.duplicate{color:#ffd499;border-color:#77582d;background:#392916}
.ctl-progress{font-weight:800;color:#e7b96d}
.ctl-file-number{display:inline-grid;place-items:center;border:1px solid #3c6074;border-radius:4px;padding:4px 8px;font-weight:800}
.ctl-link{font-size:11px;padding:7px 10px;white-space:nowrap}
.ctl-empty{padding:40px!important;text-align:center;color:#9fb5c8!important}
.ctl-footer{color:#7796ad;font-size:10px;margin-top:13px;line-height:1.5}
.ctl-error{color:#ffc5ba;background:#421e27;padding:12px;border-radius:8px;font-size:12px;margin-bottom:9px}
.ctl-feedback{color:#9be3c4;font-size:12px;margin:8px 0}
.ctl-modal-mask{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;background:rgba(0,0,0,.73);padding:18px;box-sizing:border-box}
.ctl-modal-mask[hidden]{display:none!important}
.ctl-modal-card{background:#101f34;border:1px solid #385a76;color:#e7f2ff;border-radius:15px;width:min(960px,96vw);max-height:88vh;box-shadow:0 28px 70px #0009;overflow:auto;font-size:12px}
.ctl-modal-card>div{padding:25px 29px}
.ctl-modal-card header{display:flex;justify-content:space-between;align-items:start;gap:18px;border-bottom:1px solid #3c5166;padding-bottom:14px}
.ctl-modal-card header h2{margin:6px 0 8px;font-size:20px;line-height:1.4;color:#f9fbff}
.ctl-modal-card header button{font-size:22px;background:transparent;border:0;padding:0 5px;line-height:1.1}
.ctl-modal-card h3{font-size:13px;color:#eec47e;margin:22px 0 12px}
.ctl-summary{display:flex;gap:20px;flex-wrap:wrap;margin:16px 0;padding:10px 14px;background:#0b2a41;border-radius:7px;font-size:11px;color:#b9cce1}
.ctl-summary b{color:#fff}
.ctl-detail-cols{display:grid;grid-template-columns:1fr 1fr;gap:28px}
.ctl-checks{display:flex;flex-direction:column;gap:11px}
.ctl-check{display:flex;gap:10px;align-items:center;color:#dcebf7}
.ctl-check input{width:16px;height:16px;accent-color:#d9a957}
.ctl-small-gold{margin-top:13px}
.ctl-body-note{color:#9cb6cd;line-height:1.6;overflow-wrap:anywhere}
.ctl-files-list{border-radius:9px;background:#091b2e;overflow:hidden;border:1px solid #29465b}
.ctl-files-list>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 13px;border-bottom:1px solid #294054}
.ctl-files-list>div:last-child{border-bottom:0}
.ctl-files-list small{display:block;color:#8eaac2;margin-top:4px;font-size:10px}
.ctl-files-list button{padding:6px 9px;font-size:11px}
.ctl-files-list p{padding:8px 14px;color:#90a8c0}
.ctl-upload{display:flex;align-items:start;flex-direction:column;gap:10px;margin-top:16px;padding-top:16px;border-top:1px solid #345067}
.ctl-upload .ctl-attestation{display:flex;gap:7px;line-height:1.45;color:#ffd29f}
.ctl-upload input[type=file]{width:100%;font-size:11px}
.ctl-upload small{color:#859db5}
.ctl-modal-card footer{display:flex;justify-content:end;gap:10px;border-top:1px solid #32485e;margin-top:20px;padding-top:16px}
.ctl-count{color:#95bbdc}
.ctl-form{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-top:18px}
.ctl-form label{display:flex;flex-direction:column;gap:6px;font-size:11px;color:#a6bad0}
.ctl-form .ctl-span{grid-column:span 2}
.ctl-form input,.ctl-form select,.ctl-form textarea{width:100%;box-sizing:border-box;min-height:37px;background:#0a2034;border:1px solid #36546a;border-radius:7px;color:#eef8ff;font:inherit;padding:9px 12px}
.ctl-form-actions{grid-column:span 2;display:flex;justify-content:end;gap:10px;margin-top:6px}
.ctl-modal-feedback{color:#9ad8af;line-height:1.55;font-size:12px;grid-column:span 2}
body[data-theme='light'] .ctl-wrapper{color:#17324c}
@media(max-width:850px){.ctl-stats{grid-template-columns:repeat(2,1fr)}.ctl-detail-cols,.ctl-form{grid-template-columns:1fr}.ctl-form .ctl-span,.ctl-form-actions{grid-column:span 1}.ctl-modal-card>div{padding:18px}.ctl-found{margin-left:0}}

body.controls-mode #import-button,body.controls-mode #export-changes,body.controls-mode .top-search{display:none!important}

/* Reliance Planroom — compact package navigator and light Documents treatment. */
.ctl-packages{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0 16px;align-items:center}
.ctl-package{padding:9px 13px;border-radius:7px;border:1px solid #c9d7e5;background:#fff;color:#334b64;font-size:12px;cursor:pointer;font-weight:700}
.ctl-package span{display:inline-block;margin-left:7px;padding:2px 6px;background:#e9eff6;border-radius:4px;color:#607892;font-size:10px}
.ctl-package:hover{border-color:#6f9bc9}
.ctl-package.selected{border-color:#2d67aa;color:#174d86;background:#eaf3ff;box-shadow:inset 0 0 0 1px #2d67aa}
body[data-theme='light'] .ctl-wrapper{color:#17324c}
body[data-theme='light'] .ctl-eyebrow{color:#4778a8}
body[data-theme='light'] .ctl-notice{color:#4d647b;background:#f4f8fc;border-color:#dbe5ee}
body[data-theme='light'] .ctl-stats>div{background:#fff;border-color:#dbe5ef;box-shadow:none}
body[data-theme='light'] .ctl-stats b,body[data-theme='light'] .ctl-top h2{color:#153555}
body[data-theme='light'] .ctl-stats span,body[data-theme='light'] .ctl-filter label{color:#5a7189}
body[data-theme='light'] .ctl-table-wrap{background:#fff;border-color:#dce5ee}
body[data-theme='light'] .ctl-table thead{background:#f3f7fc;color:#415a73}
body[data-theme='light'] .ctl-table th{border-color:#d6e2ec}
body[data-theme='light'] .ctl-table td{color:#203a51;border-color:#e7edf4}
body[data-theme='light'] .ctl-table td strong{color:#204f83}
body[data-theme='light'] .ctl-table tr:hover td{background:#f4f8fd}
body[data-theme='light'] .ctl-table small{color:#657d91}
body[data-theme='light'] .ctl-table .ctl-late{color:#a83931}
body[data-theme='light'] .ctl-filter input,body[data-theme='light'] .ctl-filter select{background:#fff;border-color:#cbd8e6;color:#1c3851}
body[data-theme='light'] .ctl-found,body[data-theme='light'] .ctl-footer{color:#5d7487}
body[data-theme='light'] .ctl-modal-card{background:#fff;border-color:#ccdbe8;color:#263f58;box-shadow:0 25px 60px #25456233}
body[data-theme='light'] .ctl-modal-card header{border-color:#dbe5ee}
body[data-theme='light'] .ctl-modal-card header h2{color:#183e63}
body[data-theme='light'] .ctl-summary,body[data-theme='light'] .ctl-files-list{background:#f4f8fc;color:#48657f;border-color:#dbe6ef}
body[data-theme='light'] .ctl-summary b{color:#183d60}
body[data-theme='light'] .ctl-modal-card h3{color:#245c93}
body[data-theme='light'] .ctl-check,body[data-theme='light'] .ctl-body-note{color:#4e667e}
body[data-theme='light'] .ctl-form label{color:#4e687f}
body[data-theme='light'] .ctl-form input,body[data-theme='light'] .ctl-form select,body[data-theme='light'] .ctl-form textarea{background:#fff;color:#173b60;border-color:#c5d4e3}
body[data-theme='light'] .ctl-files-list>div{border-color:#dce6ee}
body[data-theme='light'] .ctl-actions button:not(.ctl-gold),body[data-theme='light'] .ctl-link,body[data-theme='light'] .ctl-modal-card button:not(.ctl-small-gold){color:#214e7a;background:#fff;border-color:#c8d9e8}
body[data-theme='light'] .ctl-upload .ctl-attestation{color:#725331}

/* Controlled-document previews: files remain in private Supabase Storage. */
.ctl-row-preview,.ctl-file-title{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;text-align:left;white-space:normal;word-break:break-word}
.ctl-row-preview:hover,.ctl-file-title:hover{color:#87c8ff;text-decoration:underline}
.ctl-file-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:end}
.ctl-preview-overlay[hidden]{display:none!important}
.ctl-preview-overlay{position:fixed;inset:0;z-index:100000;background:rgba(3,8,15,.91);display:flex;align-items:center;justify-content:center;padding:16px;color:#edf3fc}
.ctl-preview-dialog{width:min(1380px,100%);height:min(94vh,1050px);display:flex;flex-direction:column;overflow:hidden;border:1px solid #3e5673;border-radius:13px;background:#101a2a;box-shadow:0 20px 90px rgba(0,0,0,.6)}
.ctl-preview-toolbar{padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:#142236;border-bottom:1px solid #344860}
.ctl-preview-toolbar strong{font-size:14px;display:block;overflow-wrap:anywhere}
.ctl-preview-kicker{font-size:10px;letter-spacing:.12em;color:#a6b5ca;margin-bottom:5px}
.ctl-preview-commands{display:flex;gap:8px;flex-shrink:0}
.ctl-preview-commands button{cursor:pointer;border-radius:6px;border:1px solid #53708e;background:#20364f;color:#fff;padding:9px 13px}
.ctl-preview-commands button:disabled{opacity:.4;cursor:not-allowed}
.ctl-preview-status{padding:8px 18px;font-size:12px;color:#b7cce0;border-bottom:1px solid #32465e}
.ctl-preview-error{color:#ffb1a7}
.ctl-preview-content{flex:1;overflow:auto;min-height:0;background:#edf1f6;color:#233046}
.ctl-preview-pdf{border:0;width:100%;height:100%;display:block}
.ctl-preview-office{max-width:1050px;min-height:100%;margin:0 auto;padding:38px 48px;background:white;font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:1.5;word-break:break-word}
.ctl-preview-word p{margin:0 0 9px}.ctl-preview-word h3{font-size:17px;margin:16px 0 8px}
.ctl-doc-spacer{height:9px}
.ctl-doc-table{border-collapse:collapse;min-width:70%;margin:12px 0;font-size:12px}
.ctl-doc-table td{border:1px solid #c3cbd6;padding:5px 8px;vertical-align:top;min-width:28px}
.ctl-doc-table p{margin:0}.ctl-preview-sheet{overflow:auto;max-width:100%;padding-bottom:10px}
.ctl-preview-excel section{margin-bottom:25px}.ctl-preview-text{padding:28px;white-space:pre-wrap;font-family:Consolas,monospace;font-size:12px}
@media(max-width:680px){.ctl-preview-dialog{height:95vh}.ctl-preview-toolbar{align-items:flex-start;flex-direction:column}.ctl-preview-office{padding:18px}.ctl-preview-commands{width:100%}.ctl-preview-commands button{flex:1}}

/* Every record row is an operable target; attached-file names open previews. */
.ctl-table tbody tr[data-ctl-row]{cursor:pointer}
.ctl-table tbody tr[data-ctl-row]:focus-visible{outline:2px solid #7bb7ff;outline-offset:-2px}
.ctl-record-open{border:0;background:transparent;color:inherit;font:inherit;padding:0;margin:0;text-align:left;cursor:pointer;max-width:100%;overflow-wrap:anywhere}
.ctl-table .ctl-record-open:hover,.ctl-record-open:focus-visible{color:#83c9ff;text-decoration:underline}


/* Restricted to the Office quick-preview. Site-wide table hover colors must never
   tint a controlled document's own white paper or Excel grid. */
body .ctl-preview-overlay .ctl-preview-office .ctl-doc-table tr:hover,
body .ctl-preview-overlay .ctl-preview-office .ctl-doc-table tbody tr:hover,
body .ctl-preview-overlay .ctl-preview-office .ctl-doc-table tr:hover > td,
body .ctl-preview-overlay .ctl-preview-office .ctl-doc-table tr:hover > th {
 background:transparent !important;
 color:inherit !important;
}
body .ctl-preview-overlay .ctl-preview-office .ctl-doc-table tr {cursor:text !important;}

.ctl-version-tag{display:inline-block;vertical-align:middle;font-size:9px;letter-spacing:.055em;font-weight:800;padding:2px 5px;margin:0 6px 4px 0;border-radius:4px;}
.ctl-version-tag.current{background:#163e35;color:#a7f3d0;border:1px solid #3b795e}.ctl-version-tag.previous{background:#2a3442;color:#b9c7d5;border:1px solid #4a586a}

/* Final-file library behavior; original records remain available through Details. */
.ctl-table tbody tr[data-ctl-row]{cursor:pointer}
.ctl-table .ctl-row-preview,.ctl-table .ctl-record-open{font-weight:650;text-align:left}
.ctl-table .ctl-row-preview:hover,.ctl-table .ctl-record-open:hover{color:#87c8ff;text-decoration:underline}
.ctl-cleanup{border:1px solid #b56b42!important;background:#3b261c!important;color:#ffe2bd!important}
.ctl-cleanup:hover{background:#593020!important}

/* RFI discipline and contractor-to-GC workflow */
.ctl-discipline{white-space:normal;color:#d7e7f5;font-weight:700}.ctl-table th:nth-child(3){min-width:125px}.ctl-table td:nth-child(2){min-width:170px}.ctl-table .ctl-row-preview,.ctl-table .ctl-record-open{cursor:pointer}.ctl-pill{white-space:normal;line-height:1.4}.ctl-table .ctl-view-file{white-space:nowrap}
