:root{--portal-navy:#07172f;--portal-blue:#003d97;--portal-soft:#f4f7fb;--portal-line:#dce3ec;--portal-muted:#5d6a7c;--portal-white:#fff;--portal-success:#18794e;--portal-warning:#9a6700;--portal-danger:#b42318}body.portal-body,body.portal-auth-body{margin:0;background:#f3f6fa;color:#111827;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.portal-header{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:14px max(22px,calc((100vw - 1180px)/2));background:#fff;border-bottom:1px solid var(--portal-line)}.portal-brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--portal-navy)}.portal-brand img{width:58px;height:42px;object-fit:contain;background:#fff;border-radius:8px}.portal-brand span{display:flex;flex-direction:column;line-height:1.15}.portal-brand strong{font-size:.95rem}.portal-brand small{color:var(--portal-muted);font-size:.72rem;margin-top:4px}.portal-brand-light{color:#fff}.portal-brand-light small{color:#bfd0e4}.portal-nav{display:flex;align-items:center;gap:18px}.portal-nav a,.portal-link-button{border:0;background:none;color:#425066;font-weight:750;text-decoration:none;cursor:pointer}.portal-nav a:hover,.portal-link-button:hover{color:var(--portal-blue)}.portal-main{width:min(calc(100% - 40px),1180px);margin:0 auto;padding:42px 0 80px}.narrow-portal{max-width:760px}.portal-demo-bar{padding:11px 16px;margin-bottom:22px;border:1px solid #eed38b;border-radius:12px;background:#fff8dc;color:#765300;font-size:.86rem;font-weight:750}.portal-welcome{display:flex;align-items:flex-start;justify-content:space-between;gap:28px;margin-bottom:28px}.portal-kicker{margin:0 0 8px;color:var(--portal-blue);font-size:.72rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.portal-welcome h1,.portal-opportunity-hero h1,.portal-auth-brand h1{margin:0 0 12px;color:var(--portal-navy);font-size:clamp(2rem,4vw,3.5rem);line-height:1.04;letter-spacing:-.035em}.portal-welcome p,.portal-opportunity-hero p{margin:0;color:var(--portal-muted)}.portal-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 16px;border:1px solid transparent;border-radius:999px;font-weight:850;text-decoration:none;cursor:pointer}.portal-button-primary{background:var(--portal-blue);color:#fff}.portal-button-secondary{background:#fff;border-color:#bdc8d5;color:var(--portal-navy)}.portal-button-small{min-height:34px;padding:7px 12px;font-size:.8rem}.portal-button-full{width:100%}.portal-text-button{border:0;background:none;color:var(--portal-blue);font-weight:800;cursor:pointer}.portal-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px}.portal-stat{padding:21px;border:1px solid var(--portal-line);border-radius:17px;background:#fff}.portal-stat strong,.portal-stat span{display:block}.portal-stat strong{font-size:1.9rem;color:var(--portal-navy)}.portal-stat span{font-size:.82rem;color:var(--portal-muted)}.portal-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;align-items:start}.portal-panel{padding:24px;border:1px solid var(--portal-line);border-radius:19px;background:#fff;box-shadow:0 8px 26px rgba(7,23,47,.05)}.portal-panel-large{min-width:0}.portal-sidebar{display:grid;gap:20px}.portal-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:19px}.portal-panel-heading h2,.portal-panel h2{margin:0;color:var(--portal-navy);font-size:1.35rem}.portal-panel-heading p{margin-bottom:0}.portal-panel select,.portal-search{padding:9px 11px;border:1px solid var(--portal-line);border-radius:10px;background:#fff}.portal-opportunity-list{display:grid;gap:13px}.portal-opportunity-card{display:block;padding:19px;border:1px solid var(--portal-line);border-radius:15px;background:#fff;color:inherit;text-decoration:none;transition:.18s}.portal-opportunity-card:hover{border-color:#86afe2;box-shadow:0 10px 25px rgba(0,61,151,.08);transform:translateY(-1px)}.portal-opportunity-card.compact{display:flex;align-items:center;justify-content:space-between;gap:20px}.portal-card-top{display:grid;grid-template-columns:1fr auto;gap:18px}.portal-opportunity-card h3{margin:10px 0 5px;color:var(--portal-navy);font-size:1.08rem}.portal-opportunity-card p{margin:0;color:var(--portal-muted);font-size:.86rem}.portal-deadline{text-align:center;min-width:74px}.portal-deadline strong,.portal-deadline span{display:block}.portal-deadline strong{color:var(--portal-blue);font-size:1.5rem}.portal-deadline span{font-size:.72rem;color:var(--portal-muted)}.portal-progress{height:7px;margin:15px 0 10px;border-radius:999px;background:#e8edf3;overflow:hidden}.portal-progress span{display:block;height:100%;background:linear-gradient(90deg,var(--portal-blue),#4a80c7);border-radius:inherit}.portal-card-meta{display:flex;justify-content:space-between;gap:14px;color:var(--portal-muted);font-size:.75rem}.portal-status{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#edf3fb;color:#305f99;font-size:.68rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em}.portal-status.success{background:#e8f7ef;color:var(--portal-success)}.portal-status.warning{background:#fff5d9;color:var(--portal-warning)}.portal-status.danger{background:#ffebe8;color:var(--portal-danger)}.portal-action-list{display:grid;gap:8px}.portal-action-list a{display:grid;gap:2px;padding:11px;border-radius:11px;background:var(--portal-soft);text-decoration:none}.portal-action-list strong{color:var(--portal-navy);font-size:.86rem}.portal-action-list span{color:var(--portal-muted);font-size:.76rem}.portal-muted{color:var(--portal-muted)}.portal-empty,.portal-loading{padding:28px;text-align:center;border:1px dashed #cbd4df;border-radius:13px;color:var(--portal-muted)}.portal-empty.compact{padding:16px}.portal-section{margin-top:20px}.portal-back-link{display:inline-block;margin-bottom:18px;color:#dce8f7;text-decoration:none;font-weight:800}.portal-back-link.dark{color:var(--portal-blue)}.portal-opportunity-hero{display:flex;justify-content:space-between;gap:32px;padding:30px;border-radius:22px;background:linear-gradient(140deg,#07172f,#0b2b59);color:#fff}.portal-opportunity-hero h1{color:#fff;font-size:clamp(2rem,4vw,3.1rem)}.portal-opportunity-hero p{color:#c6d6e9}.portal-hero-deadline{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;min-width:210px}.portal-hero-deadline span{color:#bdd0e6;font-size:.78rem}.portal-hero-deadline strong{font-size:1.1rem}.portal-subnav{display:flex;gap:8px;flex-wrap:wrap;padding:14px 0}.portal-subnav a{padding:8px 12px;border-radius:999px;background:#fff;border:1px solid var(--portal-line);color:var(--portal-navy);font-size:.82rem;font-weight:800;text-decoration:none}.portal-workspace-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start}.portal-stage-tracker{display:grid;grid-template-columns:repeat(8,1fr);gap:7px;margin:10px 0 24px}.portal-stage{display:grid;gap:7px;text-align:center;position:relative}.portal-stage span{display:grid;place-items:center;width:30px;height:30px;margin:0 auto;border-radius:50%;background:#e7edf4;color:#7f8b9a;font-weight:900}.portal-stage small{font-size:.66rem;color:#778495;line-height:1.25}.portal-stage.complete span{background:#dff4e8;color:var(--portal-success)}.portal-stage.current span{background:var(--portal-blue);color:#fff}.portal-stage.current small{color:var(--portal-navy);font-weight:850}.portal-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.portal-summary-grid div{padding:13px;border-radius:11px;background:var(--portal-soft)}.portal-summary-grid span,.portal-summary-grid strong{display:block}.portal-summary-grid span{font-size:.72rem;color:var(--portal-muted)}.portal-summary-grid strong{margin-top:4px;color:var(--portal-navy);font-size:.88rem}.portal-document-list{display:grid;gap:14px}.portal-document-request{border:1px solid var(--portal-line);border-radius:15px;overflow:hidden}.portal-document-main{display:grid;grid-template-columns:1fr 260px;gap:24px;padding:19px}.portal-document-request h3{margin:9px 0 6px;color:var(--portal-navy)}.portal-document-request p{margin:0 0 5px;color:var(--portal-muted)}.portal-document-request small{color:var(--portal-muted)}.portal-upload-area{display:grid;align-content:center;gap:8px}.portal-upload-button{display:inline-flex;justify-content:center;padding:9px 12px;border:1px dashed #9db0c5;border-radius:10px;color:var(--portal-blue);font-weight:800;cursor:pointer}.portal-upload-area>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.76rem;color:var(--portal-muted)}.portal-file-list{padding:12px 19px;border-top:1px solid var(--portal-line);background:#f8fafc}.portal-file-list>div{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:6px 0}.portal-review-note{margin-top:10px;padding:10px;border-left:3px solid #d39a00;background:#fff8dc;font-size:.82rem}.portal-two-column,.portal-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.portal-message-list{display:grid;gap:10px;max-height:440px;overflow:auto}.portal-message{max-width:88%;padding:13px;border-radius:13px 13px 13px 4px;background:#eef3f8}.portal-message.client{margin-left:auto;border-radius:13px 13px 4px 13px;background:#e6f0ff}.portal-message>div{display:flex;justify-content:space-between;gap:16px}.portal-message strong{font-size:.82rem}.portal-message span{font-size:.7rem;color:var(--portal-muted)}.portal-message p{margin:6px 0 0;font-size:.88rem}.portal-inline-form{display:grid;gap:10px;margin-top:16px}.portal-inline-form textarea,.portal-inline-form input{padding:11px;border:1px solid var(--portal-line);border-radius:11px}.portal-activity-list{display:grid}.portal-activity-list article{display:grid;grid-template-columns:16px 1fr;gap:10px;padding:10px 0}.portal-activity-list article>span{width:10px;height:10px;margin-top:6px;border-radius:50%;background:var(--portal-blue)}.portal-activity-list p{margin:3px 0;color:var(--portal-muted);font-size:.82rem}.portal-activity-list small{color:#8a96a5}.portal-approval-form{display:grid;gap:12px;max-width:760px}.portal-approval-form label{display:flex;align-items:flex-start;gap:9px}.portal-approval-form label:last-of-type{display:grid}.portal-approval-form input[type=text]{padding:10px;border:1px solid var(--portal-line);border-radius:10px}.portal-form{display:grid;gap:14px}.portal-form.compact{gap:11px}.portal-form label{display:grid;gap:6px;color:var(--portal-navy);font-size:.82rem;font-weight:750}.portal-form input,.portal-form select,.portal-form textarea{width:100%;padding:11px;border:1px solid var(--portal-line);border-radius:10px;background:#fff}.portal-form-message{min-height:18px;margin:0;font-size:.82rem}.portal-form-message.success{color:var(--portal-success)}.portal-form-message.error{color:var(--portal-danger)}.portal-form-message.warning{color:var(--portal-warning)}.portal-admin-list{display:grid;gap:10px}.portal-admin-list article{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px;border-radius:12px;background:var(--portal-soft)}.portal-admin-list div{display:grid}.portal-admin-list span,.portal-admin-list small{color:var(--portal-muted);font-size:.78rem}.portal-auth-body{min-height:100vh;background:var(--portal-navy)}.portal-auth-shell{display:grid;grid-template-columns:1.05fr .95fr;min-height:100vh}.portal-auth-shell.single{display:grid;place-items:center;padding:28px}.portal-auth-brand{display:flex;flex-direction:column;justify-content:space-between;padding:54px max(36px,calc((100vw - 1180px)/2));padding-right:70px;color:#fff;background:radial-gradient(circle at 20% 10%,rgba(45,111,197,.35),transparent 30%),linear-gradient(140deg,#06152c,#0b2b59)}.portal-auth-brand h1{max-width:10ch;color:#fff}.portal-auth-brand p{max-width:600px;color:#c8d8ea}.portal-auth-features{display:grid;grid-template-columns:1fr 1fr;gap:10px 20px;padding:0;list-style:none}.portal-auth-features li{position:relative;padding-left:20px;color:#e0eaf6}.portal-auth-features li:before{content:'✓';position:absolute;left:0;color:#80b7ff}.portal-auth-card{align-self:center;width:min(calc(100% - 48px),540px);margin:40px auto;padding:35px;border-radius:23px;background:#fff;box-shadow:0 26px 70px rgba(0,0,0,.28)}.portal-tabs{display:grid;grid-template-columns:1fr 1fr;padding:4px;margin-bottom:25px;border-radius:999px;background:#edf1f6}.portal-tabs button{padding:10px;border:0;border-radius:999px;background:none;color:var(--portal-muted);font-weight:850;cursor:pointer}.portal-tabs button.active{background:#fff;color:var(--portal-navy);box-shadow:0 3px 12px rgba(7,23,47,.08)}.portal-demo-notice{display:grid;gap:2px;padding:12px;margin-bottom:18px;border:1px solid #eed38b;border-radius:12px;background:#fff8dc;color:#765300}.portal-demo-notice span{font-size:.78rem}.portal-demo-actions{display:grid;gap:8px;margin-top:22px;padding-top:18px;border-top:1px solid var(--portal-line)}.portal-demo-actions>span{font-size:.78rem;color:var(--portal-muted)}.portal-security-note{margin:22px 0 0;padding-top:18px;border-top:1px solid var(--portal-line);font-size:.74rem;color:var(--portal-muted)}.portal-back-link{color:#c2d5ec}.portal-search{min-width:230px}@media(max-width:1000px){.portal-layout,.portal-workspace-grid{grid-template-columns:1fr}.portal-sidebar{grid-template-columns:1fr 1fr}.portal-stage-tracker{grid-template-columns:repeat(4,1fr)}.portal-auth-shell{grid-template-columns:1fr}.portal-auth-brand{min-height:520px}.portal-summary-grid{grid-template-columns:1fr 1fr}}@media(max-width:760px){.portal-header{align-items:flex-start}.portal-nav{gap:10px;flex-wrap:wrap;justify-content:flex-end}.portal-main{width:min(calc(100% - 28px),1180px);padding-top:26px}.portal-welcome,.portal-opportunity-hero{flex-direction:column}.portal-stat-grid,.portal-two-column,.portal-admin-grid{grid-template-columns:1fr 1fr}.portal-sidebar{grid-template-columns:1fr}.portal-document-main{grid-template-columns:1fr}.portal-hero-deadline{align-items:flex-start}.portal-auth-brand{padding:35px 28px}.portal-auth-card{width:min(calc(100% - 28px),540px);padding:26px}.portal-auth-features{grid-template-columns:1fr}}@media(max-width:520px){.portal-brand span{display:none}.portal-nav a{font-size:.8rem}.portal-stat-grid,.portal-two-column,.portal-admin-grid,.portal-summary-grid{grid-template-columns:1fr}.portal-card-top{grid-template-columns:1fr}.portal-deadline{text-align:left}.portal-card-meta{flex-direction:column}.portal-stage-tracker{grid-template-columns:repeat(2,1fr)}.portal-panel{padding:18px}.portal-opportunity-hero{padding:22px}.portal-auth-brand{min-height:480px}.portal-welcome h1,.portal-opportunity-hero h1,.portal-auth-brand h1{font-size:2.15rem}}
/* Production portal controls — v2 */
.portal-stage-tracker{display:grid;gap:18px;margin:12px 0 24px}
.portal-stage-group{display:grid;gap:8px}.portal-stage-group h3{margin:0;color:var(--portal-muted);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}
.portal-stage-row{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:7px}.portal-stage-group:last-child .portal-stage-row{grid-template-columns:repeat(4,minmax(0,1fr))}
.portal-file-policy{margin:0 0 16px;padding:12px 14px;border:1px solid #c8d8eb;border-radius:12px;background:#f4f8fd;color:#42546a;font-size:.8rem}
.portal-request-form{margin:0 0 18px;padding:18px;border:1px solid var(--portal-line);border-radius:14px;background:#f8fafc}.portal-button-row,.portal-admin-actions,.portal-file-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.portal-file-version{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:start;padding:12px 0;border-bottom:1px solid var(--portal-line)}.portal-file-version:last-child{border-bottom:0}.portal-file-meta{display:grid;gap:5px}.portal-file-meta small{color:var(--portal-muted)}.portal-file-meta p{margin:3px 0;font-size:.82rem}.portal-file-actions{justify-content:flex-end}
.portal-review-form{grid-column:1/-1;display:grid;grid-template-columns:180px 1fr auto;gap:10px;align-items:end;padding:12px;border-radius:11px;background:#eef4fb}.portal-review-form label{display:grid;gap:5px;font-size:.76rem;font-weight:800;color:var(--portal-navy)}.portal-review-form select,.portal-review-form textarea{width:100%;padding:9px;border:1px solid var(--portal-line);border-radius:9px;background:#fff}
.portal-request-actions{display:flex;justify-content:flex-end;padding:9px 18px;border-top:1px solid var(--portal-line);background:#fbfcfd}.portal-text-button.danger{color:#a33333}.portal-text-button:disabled,.portal-button:disabled{opacity:.5;cursor:not-allowed}.portal-closed-request{align-self:center;padding:10px;border-radius:10px;background:#edf3f8;color:var(--portal-muted);font-size:.82rem;font-weight:800}
.portal-approval-reference{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:760px;margin:0 0 18px}.portal-approval-reference div{padding:13px;border-radius:11px;background:var(--portal-soft)}.portal-approval-reference span,.portal-approval-reference strong{display:block}.portal-approval-reference span{font-size:.72rem;color:var(--portal-muted)}.portal-approved-record{display:grid;gap:4px;max-width:760px;margin:0 0 18px;padding:16px;border:1px solid #a7d7bb;border-radius:13px;background:#effaf4;color:var(--portal-navy)}.portal-approved-record span,.portal-approved-record small{color:var(--portal-muted)}
.portal-consent{display:flex!important;grid-template-columns:auto 1fr!important;align-items:flex-start;gap:10px!important}.portal-consent input{width:auto!important;margin-top:4px}.portal-consent a{color:var(--portal-blue);font-weight:800}.portal-turnstile{min-height:68px}.portal-form label small{font-weight:500;color:var(--portal-muted)}
.portal-mfa-card{max-width:580px}.portal-mfa-qr{display:grid;place-items:center;margin:18px 0}.portal-mfa-qr img{width:220px;height:220px}.portal-secret{display:grid;gap:5px;margin:0 0 18px;padding:12px;border-radius:11px;background:var(--portal-soft)}.portal-secret span{font-size:.72rem;color:var(--portal-muted)}.portal-secret code{word-break:break-all;font-size:.86rem}
.portal-user-table{display:grid;gap:0;overflow-x:auto}.portal-user-row{display:grid;grid-template-columns:1.3fr 1.1fr .75fr .55fr .65fr;gap:12px;align-items:center;min-width:820px;padding:12px;border-bottom:1px solid var(--portal-line)}.portal-user-row>span{display:grid;gap:2px}.portal-user-row small{color:var(--portal-muted)}.portal-user-row select{padding:8px;border:1px solid var(--portal-line);border-radius:9px;background:#fff}.portal-user-head{background:var(--portal-soft);color:var(--portal-muted);font-size:.72rem;font-weight:900;letter-spacing:.05em;text-transform:uppercase}
@media(max-width:1000px){.portal-stage-row{grid-template-columns:repeat(4,1fr)}.portal-stage-group:last-child .portal-stage-row{grid-template-columns:repeat(4,1fr)}}
@media(max-width:760px){.portal-review-form{grid-template-columns:1fr}.portal-file-version{grid-template-columns:1fr}.portal-file-actions{justify-content:flex-start}.portal-approval-reference{grid-template-columns:1fr}}
@media(max-width:520px){.portal-stage-row,.portal-stage-group:last-child .portal-stage-row{grid-template-columns:repeat(2,1fr)}.portal-mfa-qr img{width:190px;height:190px}}
.portal-audit-list{display:grid}.portal-audit-list article{display:flex;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid var(--portal-line)}.portal-audit-list article:last-child{border-bottom:0}.portal-audit-list div{display:grid;gap:2px}.portal-audit-list span,.portal-audit-list small{color:var(--portal-muted);font-size:.78rem}.portal-audit-list strong{text-transform:capitalize;color:var(--portal-navy)}


/* Portal dark/light theme and mobile cleanup — August 2026 */
.theme-toggle-portal{margin-left:auto;flex:0 0 auto}
html[data-theme="dark"]{--portal-navy:#eef4fb;--portal-blue:#78adff;--portal-soft:#132943;--portal-line:#29405e;--portal-muted:#a9b7ca;--portal-white:#0f2035;--portal-success:#53c987;--portal-warning:#f0c96d;--portal-danger:#ff8f86}
html[data-theme="dark"] body.portal-body{background:#07111f;color:#e8eef7}
html[data-theme="dark"] body.portal-auth-body{background:#06101e;color:#e8eef7}
html[data-theme="dark"] .portal-header{background:#0a1728;border-color:#29405e}
html[data-theme="dark"] .portal-nav a,html[data-theme="dark"] .portal-link-button{color:#c5d1e0}
html[data-theme="dark"] .portal-nav a:hover,html[data-theme="dark"] .portal-link-button:hover{color:#8ab9ff}
html[data-theme="dark"] :is(.portal-panel,.portal-stat,.portal-opportunity-card,.portal-auth-card){background:#0f2035;border-color:#29405e;color:#e8eef7;box-shadow:0 10px 30px rgba(0,0,0,.2)}
html[data-theme="dark"] :is(.portal-welcome h1,.portal-panel h2,.portal-panel-heading h2,.portal-opportunity-card h3,.portal-stat strong,.portal-summary-grid strong,.portal-action-list strong,.portal-form label,.portal-brand,.portal-audit-list strong){color:#eef4fb}
html[data-theme="dark"] :is(.portal-welcome p,.portal-opportunity-card p,.portal-muted,.portal-stat span,.portal-card-meta,.portal-document-request p,.portal-document-request small,.portal-activity-list p,.portal-activity-list small,.portal-brand small){color:#a9b7ca}
html[data-theme="dark"] :is(.portal-button-secondary,.portal-subnav a,.portal-tabs button.active){background:#132943;border-color:#36516f;color:#eef4fb}
html[data-theme="dark"] :is(.portal-form input,.portal-form select,.portal-form textarea,.portal-inline-form input,.portal-inline-form textarea,.portal-panel select,.portal-search,.portal-review-form select,.portal-review-form textarea,.portal-user-row select,.portal-approval-form input[type=text]){background:#0a1728;border-color:#36516f;color:#eef4fb}
html[data-theme="dark"] :is(.portal-form input,.portal-form textarea,.portal-search)::placeholder{color:#7f90a8}
html[data-theme="dark"] :is(.portal-progress,.portal-stage span){background:#223650}
html[data-theme="dark"] :is(.portal-action-list a,.portal-summary-grid div,.portal-secret,.portal-user-head,.portal-closed-request){background:#132943}
html[data-theme="dark"] :is(.portal-file-list,.portal-request-form,.portal-request-actions,.portal-review-form){background:#0a192b;border-color:#29405e}
html[data-theme="dark"] .portal-file-policy{background:#102844;border-color:#36516f;color:#cbd8e8}
html[data-theme="dark"] .portal-message{background:#15283e;color:#e8eef7}
html[data-theme="dark"] .portal-message.client{background:#17375c}
html[data-theme="dark"] .portal-status{background:#173454;color:#9cc5ff}
html[data-theme="dark"] .portal-status.success{background:#143927;color:#74d7a1}
html[data-theme="dark"] .portal-status.warning{background:#3a3017;color:#f1d68c}
html[data-theme="dark"] .portal-status.danger{background:#40201e;color:#ffaaa3}
html[data-theme="dark"] .portal-empty,html[data-theme="dark"] .portal-loading{border-color:#3b526d;color:#a9b7ca}
html[data-theme="dark"] .portal-review-note,html[data-theme="dark"] .portal-demo-notice{background:#3a3017;border-color:#6f5d2f;color:#f1d68c}
html[data-theme="dark"] .portal-approved-record{background:#123522;border-color:#32704c;color:#e8eef7}
html[data-theme="dark"] .portal-tabs{background:#0a1728}
html[data-theme="dark"] .theme-toggle{background:#132943;border-color:#36516f;color:#eef4fb;box-shadow:none}
html[data-theme="dark"] .portal-auth-card .portal-brand{color:#eef4fb}

@media(max-width:760px){
  .portal-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 12px;padding:10px 14px;align-items:center}
  .portal-brand{min-width:0}.portal-brand img{width:48px;height:35px}.portal-brand strong{font-size:.86rem}.portal-brand small{font-size:.65rem}
  .theme-toggle-portal{grid-column:2;grid-row:1;min-width:40px;width:40px;height:40px;padding:0;border-radius:12px}
  .theme-toggle-portal .theme-toggle-label{display:none}
  .portal-nav{grid-column:1/-1;display:flex;justify-content:flex-start;gap:5px;width:100%;padding-top:9px;border-top:1px solid var(--portal-line);overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
  .portal-nav::-webkit-scrollbar{display:none}
  .portal-nav a,.portal-link-button{flex:0 0 auto;padding:8px 10px;border-radius:999px;background:var(--portal-soft);font-size:.78rem}
  .portal-main{width:min(calc(100% - 24px),1180px);padding:24px 0 54px}
  .portal-welcome{gap:16px;margin-bottom:20px}.portal-welcome h1,.portal-opportunity-hero h1{font-size:clamp(1.85rem,9vw,2.45rem)}
  .portal-stat-grid{grid-template-columns:1fr 1fr;gap:10px}.portal-stat{padding:16px;border-radius:14px}.portal-stat strong{font-size:1.55rem}
  .portal-layout,.portal-workspace-grid{gap:14px}.portal-sidebar{gap:14px}
  .portal-panel{padding:17px;border-radius:15px}.portal-panel-heading{align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:15px}.portal-panel-heading .portal-search{width:100%;min-width:0}
  .portal-opportunity-card{padding:16px}.portal-opportunity-card.compact{align-items:flex-start;flex-direction:column}
  .portal-opportunity-hero{padding:20px;border-radius:17px;gap:18px}.portal-hero-deadline{min-width:0;align-items:flex-start}
  .portal-subnav{display:flex;overflow-x:auto;flex-wrap:nowrap;padding:11px 0;scrollbar-width:none}.portal-subnav::-webkit-scrollbar{display:none}.portal-subnav a{flex:0 0 auto}
  .portal-document-main{padding:16px;gap:16px}.portal-file-list{padding:10px 16px}
  .portal-two-column,.portal-admin-grid{grid-template-columns:1fr;gap:14px}
  .portal-message-list{max-height:360px}
  .portal-auth-shell{display:block;min-height:100vh}
  .portal-auth-brand{min-height:auto;padding:26px 22px 22px}.portal-auth-brand h1{max-width:none;font-size:2rem}.portal-auth-brand p{margin-bottom:0}.portal-auth-features{display:none}
  .portal-auth-card{width:min(calc(100% - 24px),540px);margin:18px auto 30px;padding:24px 19px;border-radius:18px}
  .portal-auth-shell.single{padding:16px}.portal-auth-shell.single .portal-auth-card{margin:auto}
  .theme-toggle-auth{top:13px;right:13px;min-width:40px;width:40px;height:40px;padding:0;border-radius:12px}.theme-toggle-auth .theme-toggle-label{display:none}
  .portal-form input,.portal-form select,.portal-form textarea,.portal-inline-form input,.portal-inline-form textarea{font-size:16px}
  .portal-button{min-height:44px}
  .portal-review-form{grid-template-columns:1fr}.portal-file-version{grid-template-columns:1fr}.portal-file-actions{justify-content:flex-start}
  .portal-approval-reference{grid-template-columns:1fr}
  .portal-user-row{min-width:720px}
}

@media(max-width:520px){
  .portal-brand span{display:flex;min-width:0}.portal-brand small{display:none}.portal-brand strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:190px}
  .portal-stat-grid,.portal-summary-grid{grid-template-columns:1fr 1fr}
  .portal-card-top{gap:11px}.portal-card-meta{gap:7px}
  .portal-stage-row,.portal-stage-group:last-child .portal-stage-row{display:flex;grid-template-columns:none;gap:8px;overflow-x:auto;padding-bottom:7px;scroll-snap-type:x proximity;scrollbar-width:none}
  .portal-stage-row::-webkit-scrollbar{display:none}
  .portal-stage{flex:0 0 108px;padding:9px 7px;border:1px solid var(--portal-line);border-radius:12px;background:var(--portal-soft);scroll-snap-align:start}
  .portal-stage span{width:28px;height:28px}.portal-stage small{font-size:.65rem}
  .portal-document-request{border-radius:13px}.portal-upload-button{min-height:43px;align-items:center}
  .portal-file-actions .portal-button,.portal-file-actions .portal-text-button{width:100%;justify-content:center}
  .portal-admin-list article,.portal-audit-list article{align-items:flex-start;flex-direction:column}
  .portal-approval-form .portal-button,.portal-inline-form .portal-button{width:100%}
}


/* Balanced client login layout — July 2026 */
[hidden]{display:none!important}
.portal-auth-shell-balanced{grid-template-columns:minmax(360px,42%) minmax(0,58%);background:#eef3f9}
.portal-auth-shell-balanced .portal-auth-brand{justify-content:center;padding:48px clamp(36px,5vw,76px);min-height:100vh}
.portal-auth-brand-inner{width:min(100%,520px);display:grid;gap:30px;align-content:center}
.portal-auth-copy{display:grid;gap:12px}
.portal-auth-copy h1{max-width:11ch;font-size:clamp(2.5rem,4vw,4.15rem);margin:0;color:#fff}
.portal-auth-copy p{max-width:31rem;margin:0;color:#c8d8ea;font-size:1.02rem;line-height:1.65}
.portal-auth-features-compact{grid-template-columns:1fr;gap:12px;margin:0}
.portal-auth-features-compact li{padding-left:24px;font-size:.96rem}
.portal-auth-shell-balanced .portal-back-link{margin:0;color:#d9e7f6}
.portal-auth-card-wide{width:min(calc(100% - 64px),620px);padding:40px;margin:44px auto}
.portal-auth-card-wide h2{margin-bottom:8px;font-size:1.85rem;color:var(--portal-navy)}
.portal-optional{font-size:.72rem;font-weight:600;color:var(--portal-muted)}
html[data-theme="dark"] .portal-auth-shell-balanced{background:#07111f}
html[data-theme="dark"] .portal-auth-card-wide h2{color:#eef4fb}
@media(max-width:1000px){
  .portal-auth-shell-balanced{grid-template-columns:1fr}
  .portal-auth-shell-balanced .portal-auth-brand{min-height:auto;padding:34px 28px 30px}
  .portal-auth-brand-inner{width:min(100%,760px);margin:0 auto;gap:22px}
  .portal-auth-copy h1{max-width:none;font-size:clamp(2.2rem,7vw,3.3rem)}
  .portal-auth-features-compact{grid-template-columns:repeat(3,1fr);gap:10px}
  .portal-auth-features-compact li{padding:14px 14px 14px 34px;border:1px solid rgba(255,255,255,.14);border-radius:13px;background:rgba(255,255,255,.06);font-size:.84rem}
  .portal-auth-features-compact li:before{left:13px;top:14px}
  .portal-auth-card-wide{width:min(calc(100% - 32px),620px);margin:24px auto 40px}
}
@media(max-width:760px){
  .portal-auth-shell-balanced .portal-auth-brand{padding:24px 20px 22px}
  .portal-auth-brand-inner{gap:16px}
  .portal-auth-copy h1{font-size:2.05rem}
  .portal-auth-copy p{font-size:.92rem}
  .portal-auth-features-compact{display:none}
  .portal-auth-card-wide{width:min(calc(100% - 24px),620px);margin:16px auto 28px;padding:24px 19px}
}
