:root{color-scheme:dark;--bg:#090b10;--surface:#12161e;--surface-2:#181e27;--surface-3:#202733;--border:#29313d;--text:#f7f8fa;--text-muted:#a8b1be;--text-subtle:#7f8997;--accent:#e53935;--accent-hover:#c92f2c;--success:#39c66d;--warning:#f2bb55;--danger:#ef5b58;--shadow:0 8px 24px #0003;--radius-sm:9px;--radius-md:14px;--radius-lg:18px;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;--panel:var(--surface);--panel2:var(--surface-2);--line:var(--border);--muted:var(--text-muted);--red:var(--accent);--green:var(--success);--yellow:var(--warning)}
:root[data-theme="light"],:root[data-theme="system"][data-resolved-theme="light"]{color-scheme:light;--bg:#f5f7fa;--surface:#fff;--surface-2:#f0f3f7;--surface-3:#e8edf3;--border:#d7dde6;--text:#14181f;--text-muted:#667085;--text-subtle:#8490a2;--shadow:0 8px 24px #15223814}
body{background:var(--bg)!important;color:var(--text)!important;font-size:15px;line-height:1.45}.top{height:54px!important;background:color-mix(in srgb,var(--bg) 94%,transparent)!important;border-color:var(--border)!important}.page{max-width:1260px!important;padding:var(--space-5)!important}.hero{margin-bottom:var(--space-4)!important}.hero h1{font-size:clamp(24px,3vw,32px)!important;letter-spacing:-.025em}.sub,.muted,.field-note{color:var(--text-muted)!important;font-size:13px!important}.card,.row{background:var(--surface)!important;border-color:var(--border)!important;box-shadow:0 1px 0 #00000008}.card{border-radius:var(--radius-lg)!important}.row{border-radius:var(--radius-md)!important;min-height:52px}.btn{min-height:44px;border-radius:var(--radius-sm)!important;background:var(--surface-2)!important;border-color:var(--border)!important;color:var(--text)!important;font-weight:650}.btn.primary{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important}.btn.primary:hover{background:var(--accent-hover)!important}.btn.small{min-height:38px}.field input,.field select,.field textarea,.search{min-height:44px;background:var(--surface-2)!important;color:var(--text)!important;border-color:var(--border)!important}.empty{padding:13px!important;text-align:left!important}.empty:before{content:"✓ ";color:var(--success);font-weight:800}.pill{background:var(--surface-3)!important}.pill.ok{color:var(--success)!important}.pill.warn{color:var(--warning)!important}.progress{background:var(--surface-3)!important}.progress i{background:var(--success)!important}.sheet{background:var(--surface)!important;box-shadow:var(--shadow)}.sheet-actions{background:var(--surface)!important}.side-brand,.nav-group-label,.nav-account{display:none}.project-toolbar{display:grid;grid-template-columns:minmax(240px,2fr) repeat(3,minmax(130px,1fr)) auto;gap:10px;align-items:end}.customer-hero{padding:28px}.customer-gallery img{aspect-ratio:4/3;object-fit:cover}.milestone{display:flex;gap:12px;align-items:center}.milestone-mark{font-size:18px;width:24px;color:var(--text-subtle)}.milestone.complete .milestone-mark{color:var(--success)}.milestone.current{border-color:var(--accent)!important}.portal-shell{max-width:1080px;margin:auto}.nav-account small{display:block;color:var(--text-muted)}.avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--accent);color:#fff;font-weight:800}.icon-btn{border:0;background:transparent;color:var(--text);font-size:20px}
@media(min-width:1050px){.app{padding-left:224px!important}.top{margin-left:-224px!important;padding-left:248px!important}.nav{width:224px!important;padding:18px 12px!important;gap:3px}.side-brand{display:grid;padding:0 12px 22px}.side-brand b{font-size:24px;color:var(--accent)}.side-brand span{font-size:10px;letter-spacing:.16em;color:var(--text-muted)}.nav-group-label{display:block;padding:14px 12px 6px;font-size:10px;letter-spacing:.14em;color:var(--text-subtle)}.nav .management{margin-top:10px}.nav button{display:flex!important;align-items:center;gap:10px;min-height:44px;border-radius:10px!important}.nav button.active{background:var(--surface-2)!important;color:var(--text)!important}.nav button b{width:22px;text-align:center}.nav-account{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:9px;margin-top:auto;padding:14px 8px 4px;border-top:1px solid var(--border)}.nav-account button{display:block!important}.top .brand{display:none}}
@media(max-width:1049px){.nav-group-label,.nav .management,.side-brand,.nav-account,.nav button[data-tab="takeoffs"],.nav button[data-tab="employees"],.nav button[data-tab="customers"]{display:none!important}.nav{grid-template-columns:repeat(4,1fr)!important}.page{padding:18px!important}}
@media(max-width:699px){.project-toolbar{grid-template-columns:1fr 1fr}.project-toolbar .search-wrap,.project-toolbar .new-project{grid-column:1/-1}.grid,.grid4{grid-template-columns:1fr 1fr!important}.customer-gallery{grid-template-columns:repeat(2,1fr)!important}.detail-head{display:block}.detail-actions{margin-top:10px}}
@media(max-width:420px){.grid,.grid4{grid-template-columns:1fr!important}.customer-gallery{grid-template-columns:1fr!important}}

/* V26.3.1 final UI corrections */
:root{--sidebar-bg:#0d1118;--sidebar-text:#f7f8fa;--sidebar-muted:#9aa5b4;--sidebar-active-bg:#202733}
:root[data-theme="light"],:root[data-theme="system"][data-resolved-theme="light"]{--surface:#fff;--surface-2:#eef2f6;--surface-3:#e4e9f0;--border:#cdd5df;--shadow:0 2px 10px #15223812}
.nav{background:var(--sidebar-bg)!important;color:var(--sidebar-text)!important}.nav button,.nav-account,.nav-account b,.nav .icon-btn{color:var(--sidebar-text)!important}.nav-account small,.side-brand span,.nav-group-label{color:var(--sidebar-muted)!important}.nav button.active{background:var(--sidebar-active-bg)!important;color:var(--sidebar-text)!important}.nav-account{border-color:#29313d!important}
.project-card{text-align:left!important;display:grid;gap:var(--space-3)}.project-card h3{margin:0}.project-meta{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2)!important}.next-work{display:grid;gap:var(--space-1)}.project-nav{display:flex;gap:var(--space-2);overflow-x:auto;padding-bottom:var(--space-2);scrollbar-width:thin}.field-shell{max-width:920px;margin:0 auto}.employee-brand{display:grid!important;gap:2px}.employee-brand span{font-weight:800;letter-spacing:.04em}.employee-brand small{display:block;color:var(--text-muted);letter-spacing:.18em}.photo-actions{display:flex;flex-wrap:wrap;gap:var(--space-2)}
@media(max-width:699px){.project-card .detail-head{display:flex}.project-meta{gap:6px!important}.field-shell{max-width:none}.photo-actions>.btn{flex:1}}
