/* Customer interface: shared visual language with WIVEX administration. */
:root{--p-bg:#f5f5f7;--p-text:#1d1d1f;--p-muted:#64646b;--p-line:#dedee3;--p-blue:#0066cc;--p-soft:#e6f0fc}
body.portal-app,body.portal-login,body.portal-password-page{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--p-bg);color:var(--p-text);font-size:15px;line-height:1.5}
[hidden]{display:none!important}a,button,input,select,textarea{touch-action:manipulation}a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #80b9f3;outline-offset:3px}
.portal-shell{grid-template-columns:232px minmax(0,1fr)}.portal-sidebar{background:#eeeef0;color:var(--p-text);border-right:1px solid var(--p-line);padding:26px 16px}.portal-sidebar .portal-logo{color:var(--p-text);border-color:var(--p-line);padding-bottom:24px}.portal-logo{font-family:inherit;letter-spacing:-.07em}.portal-logo span{color:#247348}.portal-sidebar-label{color:var(--p-muted);font-size:11px;letter-spacing:.08em;margin:24px 12px 12px}.portal-sidebar nav a{color:#45454c;font-size:14px;font-weight:500;min-height:44px;padding:11px 12px}.portal-sidebar nav i{color:#64646b}.portal-sidebar nav a:hover{background:#e2e2e7;color:var(--p-text)}.portal-sidebar nav a[aria-current=page]{background:#fff;color:var(--p-blue);box-shadow:0 1px 3px #00000008}.portal-sidebar nav a[aria-current=page] i{color:var(--p-blue)}.portal-sidebar-bottom{border-color:var(--p-line);color:var(--p-text)}.portal-sidebar-bottom small{color:var(--p-muted);font-size:11px}.portal-sidebar-bottom strong{font-size:12px;font-weight:500}.portal-sidebar-bottom>a{color:var(--p-muted);display:grid;place-items:center;min-width:44px;min-height:44px}.portal-user-avatar{background:#dedee5;color:#45454c;border-radius:50%}.portal-menu-toggle{display:none}
.portal-main{max-width:1200px;padding:32px clamp(24px,4vw,56px) 64px}.portal-header{align-items:flex-start;margin-bottom:28px}.portal-header h1{font-family:inherit;font-size:32px;line-height:1.2;letter-spacing:-.04em;margin:5px 0 8px}.portal-header p{color:var(--p-muted);font-size:14px;line-height:1.5;margin:0;max-width:550px}.portal-kicker{font-size:11px;letter-spacing:.07em;color:var(--p-muted);font-weight:600}.portal-header-actions{flex-wrap:wrap;justify-content:flex-end}.portal-header-actions a{color:var(--p-muted);font-size:12px;min-height:44px;display:inline-flex;align-items:center}.portal-header-actions .portal-logout{color:var(--p-blue)}
.portal-project-select{gap:10px;margin-bottom:24px}.portal-project-select>span{width:100%;font-size:11px;color:var(--p-muted);letter-spacing:.06em}.portal-project-select a{padding:10px 14px;border-color:var(--p-line);border-radius:10px;color:var(--p-text);font-size:14px;font-weight:500;min-width:150px}.portal-project-select a small{font-size:12px;font-weight:400;color:var(--p-muted)}.portal-project-select a.active{background:var(--p-soft);border-color:#a6c9ee;color:var(--p-blue)}.portal-project-select a.active small{color:#42678d}.portal-project-add{background:#fff;border:1px solid var(--p-line);border-radius:10px;max-width:100%;color:var(--p-text)}.portal-project-add summary{min-height:44px;padding:10px 14px;color:var(--p-blue);font-size:14px}.portal-project-add form{padding:16px;gap:14px}.portal-project-add label{font-size:13px;color:var(--p-text)}.portal-project-add p{color:var(--p-muted);font-size:13px}
.portal-project-hero{background:#fff;color:var(--p-text);border:1px solid var(--p-line);border-radius:16px;min-height:180px;padding:28px;box-shadow:0 2px 8px #00000003}.portal-tag{background:#edf4ef;color:#247348;font-size:12px;font-weight:500}.portal-project-hero small{color:var(--p-muted);font-size:11px;letter-spacing:.06em;margin-top:16px}.portal-project-hero h2{font-size:28px;letter-spacing:-.03em}.portal-project-hero p{color:var(--p-muted);font-size:15px;overflow-wrap:anywhere}.portal-progress{border-color:var(--p-soft);width:120px;height:120px;border-width:7px}.portal-progress strong{color:var(--p-blue);font-size:30px}.portal-progress span{color:var(--p-muted);font-size:11px}
.portal-stat-grid{gap:14px;margin:18px 0}.portal-stat-grid article{border-color:var(--p-line);border-radius:16px;padding:20px}.portal-stat-grid span{font-size:11px;letter-spacing:.04em;color:var(--p-muted);font-weight:500}.portal-stat-grid strong{font-size:30px;font-weight:600;margin:8px 0 4px}.portal-stat-grid small{color:var(--p-muted);font-size:12px}
.portal-section{border-color:var(--p-line);border-radius:16px;padding:28px;margin-top:18px}.portal-section h2{font-size:24px;font-weight:600;letter-spacing:-.03em}.portal-section-note,.portal-section-help{color:var(--p-muted);font-size:13px;font-weight:400}.portal-two-col{display:block}.portal-onboarding{grid-template-columns:190px minmax(0,1fr);gap:24px}.portal-onboarding nav a{font-size:14px;font-weight:500;min-height:48px;color:var(--p-muted)}.portal-onboarding nav a.active{background:var(--p-soft);color:var(--p-blue)}.portal-onboarding nav b{background:#eeeef0;color:var(--p-muted);font-weight:500}.portal-onboarding nav a.active b{background:var(--p-blue)}.portal-step{background:#fafafa;border-color:#e8e8ed;padding:24px}.portal-step>span{color:var(--p-muted);font-size:11px;font-weight:500}.portal-step h3{font-size:22px;font-weight:600;letter-spacing:-.025em}
.portal-app label,.portal-login label,.portal-password-page label{color:#45454c;font-size:13px;font-weight:500;gap:7px}
.portal-app input:not([type=hidden]):not([type=checkbox]):not([type=file]),.portal-app select,.portal-app textarea,.portal-login input,.portal-password-page input:not([type=hidden]){font:inherit;font-size:16px;width:100%;min-height:46px;border:1px solid #ceced5;border-radius:10px;padding:10px 12px;color:var(--p-text);background:#fff;max-width:100%}
.portal-app textarea{min-height:120px}.portal-app input:focus,.portal-app textarea:focus,.portal-app select:focus,.portal-login input:focus,.portal-password-page input:focus{outline:3px solid #bedbfa;border-color:var(--p-blue)}
.portal-app button,.portal-login button,.portal-password-page button,.portal-download{font-family:inherit;font-size:14px;font-weight:500;min-height:44px;padding:11px 18px;border:0;border-radius:10px;background:var(--p-blue);color:#fff}
.portal-app button:hover,.portal-login button:hover,.portal-password-page button:hover{background:#0055aa}.portal-app .portal-delete-link{color:#a33131;background:transparent;padding:8px 0;font-size:12px}.portal-download{display:inline-flex;align-items:center;margin:8px 0 24px}.portal-onboarding-finish,.portal-onboarding-finish i,.portal-onboarding-finish a{color:var(--p-blue)}
.portal-next-step,.portal-first-steps{background:#fff;border:1px solid var(--p-line);border-radius:16px;padding:24px;margin:18px 0;color:var(--p-text)}.portal-next-step h2,.portal-first-steps h2{font-size:21px;letter-spacing:-.025em;font-weight:600}.portal-next-step p,.portal-first-steps p{font-size:14px;line-height:1.5;color:var(--p-muted)}.portal-next-icon{background:var(--p-soft);color:var(--p-blue)}.portal-next-step>a,.portal-first-list a{color:var(--p-blue);min-height:44px;display:inline-flex;align-items:center;font-size:14px}.portal-first-list{gap:12px}.portal-first-list li{background:#fafafa;border-color:var(--p-line);padding:14px}.portal-first-list li>span{background:var(--p-soft);color:var(--p-blue)}.portal-first-list strong{font-size:14px;font-weight:500}.portal-first-list small{color:var(--p-muted);font-size:12px}.portal-app .portal-intro-skip{background:transparent;color:var(--p-muted)}
.portal-feed article,.portal-list>a{border-color:#e5e5ea;background:#fafafa;border-radius:12px;padding:16px;color:var(--p-text);font-size:14px;overflow-wrap:anywhere}.portal-feed small,.portal-list small{color:var(--p-muted);font-size:12px}.portal-feed strong{font-size:15px;font-weight:600}.portal-feed p{font-size:15px;color:#45454c;line-height:1.6}.portal-list>p,.portal-feed>p,.portal-invoice-list>p{padding:24px;background:#fafafa;border-radius:12px;color:var(--p-muted);font-size:14px}.portal-chat{max-height:460px}.portal-chat article.mine{background:#edf4fc;border-color:#d7e5f4}.portal-inline-form{margin-top:20px;gap:16px}.portal-invoice-list>div{border-color:var(--p-line);padding:16px;gap:12px;flex-wrap:wrap}.portal-invoice-list strong{font-size:15px}.portal-invoice-list small{font-size:13px;color:var(--p-muted);line-height:1.6}.portal-invoice-list a{background:var(--p-soft);color:var(--p-blue);min-height:44px;display:inline-flex;align-items:center;padding:10px 14px;border-radius:10px;font-size:14px}
.portal-upload-picker{background:#fafafa;border-color:var(--p-line);color:var(--p-text);min-height:100px}.portal-upload-picker small,.portal-upload-help,.portal-upload-optimize small{color:var(--p-muted);font-size:12px;line-height:1.5}.portal-upload-optimize{font-size:14px}.portal-app input[type=checkbox]{width:18px;min-height:18px;height:18px;accent-color:var(--p-blue);flex:none}.portal-upload-status{font-size:14px}.portal-password-change{border-color:var(--p-line);margin-top:28px}.portal-password-change summary{color:var(--p-blue);min-height:44px;padding:12px 0;font-size:14px}.portal-chat-fab{display:none}.portal-alert,.portal-error{background:#fff0ed;color:#9b3026;padding:14px;border-radius:10px;font-size:14px}.portal-form-status{color:var(--p-muted);font-size:13px;min-height:20px}
.portal-login-brand{background:#eeeef0;color:var(--p-text)}.portal-login-brand .portal-logo{color:var(--p-text)}.portal-login-brand>div>span{color:var(--p-muted)}.portal-login-brand h1{font-size:clamp(35px,4vw,56px);font-weight:600;letter-spacing:-.05em;line-height:1.12}.portal-login-brand h1 em{color:var(--p-blue)}.portal-login-brand p,.portal-login-brand small{color:var(--p-muted)}.portal-login-form>div{background:#fff;border:1px solid var(--p-line);border-radius:20px;padding:32px;width:min(440px,100%)}.portal-login-form h2{font-size:32px;font-weight:600}.portal-login-form h2 span{color:var(--p-blue)}.portal-login-form p{color:var(--p-muted);font-size:14px}.portal-login-form a:not(.portal-logo){color:var(--p-blue);font-size:13px;margin-right:12px}.portal-password-card{border-color:var(--p-line);border-radius:20px;width:min(480px,100%)}.portal-password-card p{color:var(--p-muted);font-size:14px}.portal-document{max-width:850px;padding-top:40px}.portal-document> a{display:inline-flex;align-items:center;min-height:44px;color:var(--p-blue)}.portal-document h1{font-size:28px;letter-spacing:-.03em}.portal-decision{border-top:1px solid var(--p-line);padding-top:24px}.portal-decision label:has([type=checkbox]){display:flex;align-items:flex-start;gap:12px;font-size:14px}
@media(max-width:900px){.portal-header-actions .portal-website{display:none}.portal-first-heading{flex-wrap:wrap}}
@media(max-width:760px){.portal-shell{grid-template-columns:minmax(0,1fr)}.portal-sidebar{height:auto;min-height:0;position:sticky;top:0;z-index:10;display:grid;grid-template-columns:1fr auto;padding:12px 18px;border-right:0;border-bottom:1px solid var(--p-line)}.portal-sidebar .portal-logo{padding:0;border:0;font-size:26px;align-self:center}.portal-app .portal-menu-toggle{display:flex;gap:12px;background:#fff;color:var(--p-text);border:1px solid var(--p-line);padding:8px 12px}.portal-sidebar nav{display:none;grid-column:1/-1;overflow:visible;margin-top:12px;grid-template-columns:1fr 1fr;gap:6px}.portal-sidebar.is-open nav{display:grid}.portal-sidebar-label{display:none}.portal-sidebar-bottom{display:none}.portal-sidebar.is-open .portal-sidebar-bottom{display:flex;grid-column:1/-1;margin-top:12px}.portal-main{padding:24px 18px 48px}.portal-header{gap:12px;margin-bottom:20px}.portal-header h1{font-size:28px}.portal-header p{font-size:13px}.portal-header-actions .portal-logout{display:inline-flex;font-size:12px}.portal-onboarding{grid-template-columns:1fr}.portal-onboarding nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;gap:4px}.portal-onboarding nav a{display:flex;flex-direction:column;padding:8px 3px;gap:6px;font-size:11px;min-width:0}.portal-onboarding nav a span{display:block}.portal-section{padding:20px}.portal-step{padding:18px}.portal-project-hero{flex-direction:row;padding:22px;gap:15px}.portal-project-hero h2{font-size:24px}.portal-progress{width:95px;height:95px;margin:0;align-self:center}.portal-progress span{font-size:10px;max-width:80px}.portal-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.portal-stat-grid article{padding:14px 10px}.portal-stat-grid span{font-size:10px;letter-spacing:0}.portal-stat-grid strong{font-size:25px}.portal-stat-grid small{font-size:11px}.portal-first-list li{flex-wrap:wrap}.portal-first-list li a{margin-left:42px}.portal-next-step{flex-wrap:wrap;padding:20px}.portal-next-step>a{margin-left:0}.portal-login-brand{min-height:200px;padding:24px}.portal-login-brand h1{font-size:32px;margin:12px 0}.portal-login-brand p{font-size:13px;margin:0}.portal-login-form{padding:24px 18px}.portal-login-form>div{padding:24px}.portal-billing-grid{grid-template-columns:1fr}.portal-project-add[open]{width:100%}.portal-upload-choices{grid-template-columns:1fr}.portal-invoice-list>div>span{flex-basis:100%}.portal-document{padding-top:24px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}

body.portal-app .portal-next-step>a{background:#0066cc;color:#fff;border:0;padding:11px 18px;border-radius:10px}
body.portal-app .portal-project-add summary{background:#fff;border:0;color:#0066cc;font-weight:500}
body.portal-app .portal-header-actions a{border-color:#dedee3;font-weight:500}
.portal-section:focus,.portal-project-hero:focus,.portal-group:focus{outline:none}
@media(max-width:760px){.portal-section,.portal-project-hero{scroll-margin-top:90px}.portal-header{flex-direction:row;align-items:flex-start}.portal-header>div:first-child{min-width:0;flex:1}.portal-header-actions{width:auto;flex:none}.portal-header-actions .portal-logout{width:auto;padding:8px 10px}.portal-header h1{font-size:25px}.portal-header-actions .portal-logout i{display:none}}

@media(max-width:760px){html:not(.portal-js) .portal-sidebar nav{display:grid}html:not(.portal-js) .portal-menu-toggle{display:none}}
/* Guided customer setup and incoming documents */
.portal-setup-page .setup-shell{max-width:960px;margin:auto;padding:28px 24px 48px}
.setup-header{display:flex;justify-content:space-between;align-items:center;gap:16px}.setup-brand{font-size:22px;font-weight:750;letter-spacing:2px;text-decoration:none;color:#1d1d1f}.setup-header form{margin:0}.portal-setup-page .setup-skip{background:transparent;color:#64646b;border:1px solid #dedee3;min-height:44px}
.setup-heading{margin:42px 0 24px}.setup-heading h1{font-size:clamp(28px,4vw,40px);letter-spacing:-1px;margin:10px 0}.setup-heading p,.setup-footnote{color:#64646b;line-height:1.6}
.setup-progress{list-style:none;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:0;margin:0 0 24px}.setup-progress li{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:12px;color:#64646b;text-align:center;overflow-wrap:anywhere}.setup-progress li span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#e8e8ed;font-weight:700}.setup-progress .is-current{color:#0066cc;font-weight:650}.setup-progress .is-current span{background:#0066cc;color:white}.setup-progress .is-done span{background:#e3f2e9;color:#247348}
.setup-card{padding:28px!important}.setup-card h2{margin:8px 0 20px}.setup-form{display:grid;gap:18px}.setup-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.setup-form label{display:grid;gap:8px;font-size:14px;font-weight:550}.setup-form input,.setup-form textarea,.setup-form select{box-sizing:border-box;width:100%;min-width:0;min-height:44px;border:1px solid #dedee3;border-radius:10px;background:white;color:#1d1d1f;padding:12px;font:inherit}.setup-form textarea{resize:vertical;line-height:1.5}.setup-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:20px}.setup-actions>a{min-height:44px;display:inline-flex;align-items:center}.setup-actions form{margin:0}.setup-actions button,.setup-card button{min-height:44px}.setup-footnote{text-align:center;font-size:13px}
.portal-home-documents{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:24px 0}.portal-home-documents header{display:flex;justify-content:space-between;align-items:center;gap:12px}.portal-home-documents h2{font-size:20px}.portal-document-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 0;border-top:1px solid #e8e8ed}.portal-document-row small{display:block;color:#64646b;margin-top:6px}.portal-document-row a{display:inline-flex;align-items:center;min-height:44px;font-size:13px;text-align:right}.portal-setup-resume{padding:20px 24px;border:1px solid #c8dff6;background:#e6f0fc;border-radius:16px;margin:20px 0;display:flex;justify-content:space-between;gap:16px;align-items:center}.portal-setup-resume a{min-height:44px;display:inline-flex;align-items:center}
@media(max-width:600px){.portal-setup-page .setup-shell{padding:20px 16px 32px}.setup-header{align-items:flex-start}.setup-header button{font-size:12px;padding:10px}.setup-heading{margin:28px 0 20px}.setup-progress{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:16px}.setup-card{padding:20px!important}.setup-fields,.portal-home-documents{grid-template-columns:1fr}.setup-actions{flex-wrap:wrap}.setup-actions button{max-width:100%;white-space:normal}.portal-setup-resume{align-items:flex-start;flex-direction:column}.portal-document-row{gap:8px}.portal-document-row strong{overflow-wrap:anywhere}.setup-card .portal-upload-picker{box-sizing:border-box;max-width:100%}.setup-card input[type=file]{max-width:100%;min-width:0}}

/* Project progress on the overview. */
.portal-progress{position:relative;isolation:isolate;border:0;background:conic-gradient(var(--p-blue) var(--progress),var(--p-soft) 0);padding:10px;align-content:center}
.portal-progress::before{content:"";position:absolute;inset:10px;z-index:-1;border-radius:50%;background:#fff}
.portal-progress strong,.portal-progress span{position:relative;z-index:1}
.portal-overview-updates{margin-top:18px}
.portal-overview-updates .portal-feed{max-height:360px;overflow:auto}
@media(max-width:760px){
  .portal-app .portal-sidebar{box-sizing:border-box;width:100%;max-width:100vw;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 12px;padding:12px 18px}
  .portal-app .portal-menu-toggle{box-sizing:border-box;align-items:center;justify-content:center;width:96px;min-width:96px;height:44px;min-height:44px;margin:0;font-size:14px;line-height:1;font-weight:600;border-radius:9px}
  .portal-app .portal-sidebar nav{box-sizing:border-box;width:100%;min-width:0;max-height:min(60vh,440px);overflow-y:auto;overflow-x:hidden;margin:12px 0 0;padding:0}
  .portal-app .portal-sidebar nav a{box-sizing:border-box;min-width:0;min-height:44px;margin:0;padding:10px 12px;font-size:14px;line-height:1.25;white-space:normal}
  .portal-app .portal-sidebar-bottom{min-width:0;width:100%}
}
@media(max-width:430px){.portal-app .portal-sidebar nav{grid-template-columns:minmax(0,1fr)}}

/* Clear project summary and grouped portal areas. */
.portal-progress-wrap{display:flex;flex:none;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-width:142px}
.portal-progress-wrap>span{display:block;color:#45454c;font-size:13px;font-weight:600;line-height:1.3;text-align:center;white-space:nowrap}
.portal-progress{display:grid;place-items:center;place-content:center;width:120px;height:120px;margin:0}
.portal-progress strong{margin:0;color:#005bb8;font-size:30px;line-height:1;font-variant-numeric:tabular-nums}
.portal-group{min-width:0;padding-top:14px;scroll-margin-top:20px}
.portal-group-heading{margin:8px 0 22px}
.portal-group-heading h2{margin:5px 0;font-size:30px;line-height:1.2;letter-spacing:-.04em}
.portal-group-heading p{margin:0;color:var(--p-muted);font-size:15px;line-height:1.5}
.portal-group>.portal-section:first-of-type{margin-top:0}
.portal-group .portal-section{scroll-margin-top:20px}
.portal-app .portal-sidebar nav a[aria-current=page]{font-weight:650}
.portal-upload-preview{padding:16px;border:1px solid var(--p-line);border-radius:12px;background:#fafafa}
.portal-upload-preview-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;font-size:14px}
.portal-upload-preview-heading span{color:var(--p-muted);font-size:13px}
.portal-upload-preview-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.portal-upload-preview-card{min-width:0;overflow:hidden;border:1px solid var(--p-line);border-radius:10px;background:#fff}
.portal-upload-preview-media{display:grid;place-items:center;position:relative;height:112px;background:#edf1f5;color:#8090a0;font-size:28px}
.portal-upload-preview-fallback{display:grid;place-items:center;width:50px;height:50px;border:1px solid #c7d4e2;border-radius:10px;background:#fff;color:#4d657b;font-size:12px;font-weight:650}
.portal-upload-preview-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.portal-upload-preview-card>div:last-child{display:grid;gap:3px;padding:10px}
.portal-upload-preview-card strong{font-size:13px;line-height:1.3;overflow-wrap:anywhere}
.portal-upload-preview-card small{color:var(--p-muted);font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.portal-upload-preview-state{font-size:11px;font-weight:600}
.portal-upload-preview-card[data-state=uploading] .portal-upload-preview-state{color:var(--p-blue)}
.portal-upload-preview-card[data-state=saved] .portal-upload-preview-state{color:#247348}
.portal-upload-preview-card[data-state=error] .portal-upload-preview-state{color:#a52d24}
@media(max-width:760px){.portal-group,.portal-group .portal-section{scroll-margin-top:90px}.portal-project-hero{align-items:center}.portal-progress-wrap{min-width:112px}.portal-progress-wrap>span{font-size:12px}.portal-progress{width:96px;height:96px}.portal-progress::before{inset:9px}.portal-progress strong{font-size:25px}}
@media(max-width:600px){.portal-progress-wrap{align-self:flex-start;align-items:flex-start}.portal-progress-wrap>span{text-align:left}.portal-upload-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-group-heading h2{font-size:26px}}

/* Four direct destinations on phones and tablets. */
@media(max-width:760px){
  .portal-app .portal-sidebar{display:flex;justify-content:center;min-height:60px;padding:12px 18px}
  .portal-app .portal-sidebar .portal-logo{align-self:flex-start}
  .portal-app .portal-menu-toggle{display:none}
  .portal-app .portal-sidebar nav{display:grid;position:fixed;inset:auto 0 0;z-index:30;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;width:100%;max-height:none;margin:0;padding:7px 8px calc(7px + env(safe-area-inset-bottom));overflow:visible;border-top:1px solid var(--p-line);background:#fff;box-shadow:0 -4px 20px #0000000d}
  .portal-app .portal-sidebar nav a{display:flex;flex-direction:column;justify-content:center;gap:4px;min-height:56px;padding:5px 2px;border-radius:9px;font-size:11px;line-height:1.1;text-align:center;white-space:nowrap}
  .portal-app .portal-sidebar nav i{width:auto;font-size:17px}
  .portal-app .portal-sidebar nav a[aria-current=page]{background:var(--p-soft)}
  .portal-app .portal-sidebar-bottom,.portal-app .portal-sidebar.is-open .portal-sidebar-bottom{display:none}
  .portal-app .portal-main{padding-bottom:calc(110px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){.portal-app .portal-sidebar nav a{font-size:10px}}

/* Guided briefing choices in setup and the customer project area. */
.briefing-guided-field{display:grid;gap:20px;min-width:0}
.briefing-choice-group{min-width:0;margin:0;padding:0;border:0}
.briefing-choice-group legend{padding:0;color:var(--p-text);font-size:17px;font-weight:650;line-height:1.35}
.briefing-choice-group>p{margin:5px 0 12px;color:var(--p-muted);font-size:13px;line-height:1.5}
.briefing-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.portal-app .briefing-choice{display:flex;align-items:flex-start;gap:10px;min-width:0;min-height:54px;margin:0;padding:11px 12px;border:1px solid var(--p-line);border-radius:10px;background:#fff;color:var(--p-text);font-size:14px;line-height:1.35;cursor:pointer}
.portal-app .briefing-choice:hover{border-color:#8bbce9;background:#f8fbff}
.portal-app .briefing-choice:has(input:checked){border-color:var(--p-blue);background:#eef6ff}
.portal-app .briefing-choice:focus-within{outline:3px solid #80b9f3;outline-offset:2px}
.portal-app .briefing-guided-field .briefing-choice input[type=checkbox],.portal-app .briefing-guided-field .briefing-choice input[type=radio]{box-sizing:border-box;flex:none;width:18px;height:18px;min-height:18px;margin:1px 0 0;padding:0;accent-color:var(--p-blue)}
.briefing-choice-body{display:grid;gap:8px;min-width:0}
.briefing-choice-body strong{font-weight:550;overflow-wrap:anywhere}
.briefing-swatches{display:flex;gap:4px}
.briefing-swatches i{display:block;width:22px;height:22px;border:1px solid #0000001a;border-radius:50%;background:var(--swatch)}
.palette-0 i:nth-child(1){--swatch:#183d31}.palette-0 i:nth-child(2){--swatch:#7b9e84}.palette-0 i:nth-child(3){--swatch:#e7e9db}
.palette-1 i:nth-child(1){--swatch:#142c48}.palette-1 i:nth-child(2){--swatch:#5793bf}.palette-1 i:nth-child(3){--swatch:#e9f2f6}
.palette-2 i:nth-child(1){--swatch:#613c30}.palette-2 i:nth-child(2){--swatch:#c98460}.palette-2 i:nth-child(3){--swatch:#f1dfcf}
.palette-3 i:nth-child(1){--swatch:#1e1e24}.palette-3 i:nth-child(2){--swatch:#e7b941}.palette-3 i:nth-child(3){--swatch:#f5f2e8}
.palette-4 i:nth-child(1){--swatch:#181818}.palette-4 i:nth-child(2){--swatch:#929292}.palette-4 i:nth-child(3){--swatch:#f6f6f6}
.palette-5 i:nth-child(1){--swatch:#a8b6bd}.palette-5 i:nth-child(2){--swatch:#e0e6e9}.palette-5 i:nth-child(3){--swatch:#fff}
.portal-app .briefing-notes-label{display:grid;gap:7px;font-size:14px;font-weight:550}
.briefing-notes-label>span{color:var(--p-muted);font-size:12px;font-weight:400}
.briefing-notes-label textarea{min-height:92px;line-height:1.5}
@media(max-width:600px){.briefing-choice-grid{grid-template-columns:1fr}.briefing-palette-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-app .briefing-choice{min-height:50px}}
@media(max-width:380px){.briefing-palette-grid{grid-template-columns:1fr}}

/* Saved project images stay behind the customer's project authorization. */
.portal-saved-images,.portal-other-files{margin-top:24px;min-width:0}
.portal-saved-images h3,.portal-other-files h3{display:flex;align-items:baseline;gap:8px;margin:0 0 12px;font-size:17px;letter-spacing:-.02em}
.portal-saved-images h3 small,.portal-other-files h3 small{color:var(--p-muted);font-size:12px;font-weight:400}
.portal-saved-images-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.portal-saved-image{min-width:0;overflow:hidden;border:1px solid var(--p-line);border-radius:12px;background:#fff}
.portal-saved-image-preview{display:block;aspect-ratio:4/3;overflow:hidden;background:#edf1f5}
.portal-saved-image-preview img{display:block;width:100%;height:100%;object-fit:cover}
.portal-saved-image-preview:hover img{transform:scale(1.04);transition:transform .2s ease}
.portal-saved-image-details{display:grid;gap:5px;padding:11px}
.portal-saved-image-details strong,.portal-saved-image-details small{overflow-wrap:anywhere}
.portal-saved-image-details strong{font-size:13px;line-height:1.35}
.portal-saved-image-details small{color:var(--p-muted);font-size:11px}
.portal-saved-image-details a{justify-self:start;min-height:36px;display:inline-flex;align-items:center;color:var(--p-blue);font-size:13px}
.portal-files-empty{padding:18px;color:var(--p-muted);background:#fafafa;border-radius:10px}
@media(max-width:760px){
  .portal-app .portal-main,.portal-app .portal-group,.portal-app .portal-section,.portal-app .portal-step,.portal-app .portal-invoice-list,.portal-app .portal-invoice-list>div{min-width:0;max-width:100%}
  .portal-app .portal-section>header{align-items:flex-start;flex-wrap:wrap}
  .portal-app .portal-section h2,.portal-app .portal-group-heading h2{overflow-wrap:anywhere}
  .portal-app .portal-sidebar nav a[aria-current=page]{background:transparent;box-shadow:none;color:var(--p-blue)}
  .portal-app .portal-sidebar nav a[aria-current=page] i{color:var(--p-blue)}
  .portal-app .portal-onboarding nav a.active{background:transparent;color:var(--p-blue)}
  .portal-app .portal-invoice-list a{background:#fff;border:1px solid var(--p-line);max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
@media(max-width:600px){.portal-saved-images-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-app .portal-invoice-list>div{align-items:flex-start}.portal-app .portal-invoice-list>div>span{min-width:0;overflow-wrap:anywhere}}
@media(max-width:360px){.portal-saved-images-grid{grid-template-columns:1fr}}

.portal-overview-upload{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:18px 0;padding:18px 22px;border:1px solid var(--p-line);border-radius:16px;background:#fff}
.portal-overview-upload>div{display:grid;gap:3px;min-width:0}
.portal-overview-upload strong{font-size:16px}
.portal-overview-upload span{font-size:13px;color:var(--p-muted);line-height:1.45}
.portal-overview-upload>a{display:inline-flex;align-items:center;justify-content:center;gap:9px;flex:none;min-height:44px;padding:11px 16px;border-radius:10px;background:var(--p-blue);color:#fff;font-size:14px;font-weight:600;text-align:center}
.portal-overview-upload>a:hover{background:#0055aa}
.portal-upload-progress{display:grid;gap:7px;margin:14px 0 0;color:var(--p-text);font-size:13px;font-weight:600}
.portal-upload-progress progress{display:block;width:100%;height:12px;border:0;border-radius:99px;overflow:hidden;background:#e9edf2;accent-color:var(--p-blue)}
.portal-upload-progress progress::-webkit-progress-bar{background:#e9edf2;border-radius:99px}
.portal-upload-progress progress::-webkit-progress-value{background:var(--p-blue);border-radius:99px}
.portal-upload-progress progress::-moz-progress-bar{background:var(--p-blue);border-radius:99px}
@media(max-width:600px){.portal-overview-upload{align-items:stretch;flex-direction:column;padding:18px}.portal-overview-upload>a{width:100%}}

/* Wivex portal colours and compact, persistent navigation. */
:root{--p-bg:#f5f6f3;--p-line:#dfe2d9;--p-blue:#456000;--p-soft:#f0f7da;--p-lime:#c8ff00;--p-ink:#17171e;--p-focus:#566f00}
.portal-sidebar{background:#0f0f15;color:#f1f1f6;border-color:#30303c}
.portal-sidebar .portal-logo{color:#f1f1f6;border-color:#30303c}
.portal-sidebar .portal-logo span,.portal-topbar-brand span{color:var(--p-lime)}
.portal-sidebar-label,.portal-sidebar-bottom small{color:#b4b4c4}
.portal-sidebar-bottom{color:#f1f1f6;border-color:#30303c}
.portal-sidebar .portal-user-avatar{background:#2b3415;color:var(--p-lime)}
.portal-sidebar nav a,.portal-sidebar nav i{color:#c4c4d2}
.portal-sidebar nav a:hover{background:#23232f;color:#fff}
.portal-sidebar nav a[aria-current=page],.portal-sidebar nav a[aria-current=page] i{background:#2b3415;color:var(--p-lime);box-shadow:none}
.portal-sidebar nav a[aria-current=page]{box-shadow:inset 3px 0 0 var(--p-lime)}
.portal-topbar{position:fixed;top:0;right:0;left:232px;z-index:30;height:64px;padding:10px clamp(24px,4vw,56px);display:flex;align-items:center;justify-content:space-between;gap:12px;background:#0f0f15;color:#f1f1f6;border-bottom:1px solid #30303c}
.portal-topbar-brand{font-size:23px;font-weight:750;letter-spacing:-1px;white-space:nowrap}
.portal-topbar-actions{display:flex;align-items:center;gap:10px}
.portal-topbar-logout{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid #3a3a49;border-radius:10px;color:#f1f1f6;font-size:14px;font-weight:550}
.portal-topbar-logout:hover{background:#242430;color:var(--p-lime)}
.portal-app .portal-main{padding-top:88px}
.portal-header{margin-bottom:20px}
.portal-header h1{font-size:28px}
.portal-project-select{display:flex;align-items:flex-start;flex-wrap:wrap;gap:12px;margin-bottom:20px}
.portal-app .portal-project-switch{display:flex;align-items:center;gap:12px;flex:1;min-width:0;font-size:13px;white-space:nowrap}
.portal-app .portal-project-switch select{flex:1;width:auto;min-width:0;max-width:420px;font-size:14px}
body.portal-app .portal-project-add summary{color:var(--p-blue);min-height:46px}
.portal-project-add{flex:none}
body.portal-app button,body.portal-login button,body.portal-password-page button,body.portal-setup-page button,
body.portal-app .portal-next-step>a,body.portal-app .portal-overview-upload>a,body.portal-app .portal-chat-fab{background:var(--p-lime);border-color:var(--p-lime);color:var(--p-ink)}
body.portal-app button:hover,body.portal-login button:hover,body.portal-password-page button:hover,body.portal-setup-page button:hover,
body.portal-app .portal-next-step>a:hover,body.portal-app .portal-overview-upload>a:hover{background:#b5e600;border-color:#b5e600;color:var(--p-ink)}
body.portal-app .portal-topbar .portal-menu-toggle{background:#242430;border:1px solid #3a3a49;color:#f1f1f6;padding:10px 12px}
body.portal-app .portal-topbar .portal-menu-toggle:hover{background:#383849;color:#fff}
.portal-onboarding nav a.active b{background:var(--p-blue);color:#fff}
.portal-project-select a.active{border-color:#b5c88b}.portal-project-select a.active small{color:var(--p-blue)}
.portal-progress{background:conic-gradient(#83a800 var(--progress),var(--p-soft) 0)}
.portal-progress strong{color:var(--p-blue)}
.portal-setup-resume{background:var(--p-soft);border-color:#d4e3b1}
.portal-chat article.mine{background:var(--p-soft);border-color:#d4e3b1}
.portal-login-brand{background:#0f0f15;color:#f1f1f6}.portal-login-brand h1 em,.portal-login-brand .portal-logo span{color:var(--p-lime)}
body :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--p-focus);outline-offset:3px}
.portal-app :is(input,select,textarea):focus,.portal-login input:focus,.portal-password-page input:focus{outline-color:var(--p-focus);border-color:var(--p-focus)}
.portal-topbar :is(a,button):focus-visible,.portal-sidebar a:focus-visible{outline-color:var(--p-lime)}
body.portal-app .portal-delete-link,body.portal-app .portal-delete-link:hover{color:#a33131;background:transparent;border-color:transparent}
body.portal-setup-page .setup-skip,body.portal-setup-page .setup-skip:hover{background:#fff;color:var(--p-blue);border-color:var(--p-line)}
.setup-progress .is-current{color:var(--p-blue)}.setup-progress .is-current span{background:var(--p-blue);color:#fff}
.portal-app :is(.portal-section,.portal-group,.portal-project-hero){scroll-margin-top:84px}
@media(max-width:760px){
 .portal-topbar{left:0;padding:10px 16px}
 .portal-app .portal-sidebar{position:fixed;top:64px;left:0;right:0;z-index:25;display:none;padding:16px;border-bottom:1px solid #30303c;max-height:calc(100dvh - 64px);overflow-y:auto}
 .portal-app .portal-sidebar.is-open{display:block}
 .portal-sidebar>.portal-logo{display:none}
 .portal-app .portal-sidebar.is-open nav{display:grid;grid-template-columns:1fr;gap:6px;margin:0;max-height:none}
 .portal-app .portal-sidebar nav{position:static;inset:auto;z-index:auto;padding:0;border:0;background:transparent;box-shadow:none}
 .portal-app .portal-sidebar nav a{flex-direction:row;justify-content:flex-start;gap:12px;min-height:46px;padding:12px;font-size:14px;text-align:left}
 .portal-app .portal-sidebar nav i{width:20px;font-size:16px}
 .portal-app .portal-sidebar nav a[aria-current=page],.portal-app .portal-sidebar nav a[aria-current=page] i{background:#2b3415;color:var(--p-lime)}
 .portal-app .portal-sidebar.is-open .portal-sidebar-bottom{display:flex;margin-top:16px}
 .portal-app .portal-project-switch{display:grid;flex:1;gap:4px;font-size:12px}
 .portal-app .portal-project-switch select{max-width:none}
 .portal-project-add{align-self:flex-end;margin-left:0}
 .portal-app .portal-main{padding-top:84px}
 .portal-header h1{font-size:26px}
 .portal-header-actions{width:auto}
 .portal-app .portal-project-hero{min-height:0;padding:20px;gap:16px;flex-direction:row;align-items:center}
 .portal-project-hero h2{font-size:23px}
 .portal-project-hero p{font-size:14px}
 .portal-project-hero .portal-progress-wrap{flex:none;width:100px}
 .portal-project-hero .portal-progress{width:88px;height:88px;margin:0}
 body.portal-app .portal-topbar .portal-menu-toggle{display:flex;align-items:center;gap:8px;width:auto;min-width:0}
 .portal-app .portal-group-heading{margin:16px 0}
 .portal-app .portal-group-heading>.portal-kicker{display:none}
 .portal-app .portal-group-heading h2{font-size:23px;margin:0 0 6px}
 .portal-app .portal-group-heading p{font-size:13px;margin:0}
}
@media(max-width:760px){html:not(.portal-js) .portal-app .portal-sidebar{display:block;position:static;height:auto;margin-top:64px}html:not(.portal-js) .portal-app .portal-main{padding-top:24px}}

/* Mobile logout belongs to the expanded menu. */
.portal-mobile-logout{display:none}
@media(max-width:760px){
 .portal-topbar .portal-topbar-logout{display:none}
 .portal-topbar-actions{margin-left:auto}
 .portal-app .portal-sidebar.is-open .portal-mobile-logout{display:flex;align-items:center;gap:12px;min-height:46px;margin-top:12px;padding:12px;border:1px solid #3a3a49;border-radius:10px;color:#f1f1f6;font-size:14px;font-weight:550}
 .portal-app .portal-sidebar .portal-mobile-logout:hover{background:#242430;color:var(--p-lime)}
}
