/* AGRILLCONS D1: shared visual language. No business-state or permission changes. */
:root{--bg:#f5f6f4;--paper:#fff;--card:#fff;--panel:#fff;--surface:#fff;--ink:#182e3d;--text:#182e3d;--muted:#596d7c;--line:#d8e2e9;--border:#d8e2e9;--nav:#182e3d;--accent:#0869ad;--soft:#eaf2f7;--ui-selected:#fff0e4;--ui-selected-ink:#944108;--ui-focus:#0869ad;--ui-link:#0869ad;color-scheme:light}
html[data-theme=dark]{--bg:#0e1b26;--paper:#182e40;--card:#182e40;--panel:#182e40;--surface:#182e40;--ink:#edf4fa;--text:#edf4fa;--muted:#b3c6d5;--line:#3d566a;--border:#3d566a;--nav:#102332;--accent:#167bbb;--soft:#223e53;--ui-selected:#493326;--ui-selected-ink:#ffd1a6;--ui-focus:#85cbff;--ui-link:#85cbff;color-scheme:dark}
html[data-product=construction] body{margin:0;min-width:0;background:var(--bg);color:var(--ink)}
html[data-product=construction] *,html[data-product=construction] *:before,html[data-product=construction] *:after{box-sizing:border-box}
html[data-product=construction] :is(button,input,select,textarea){font:inherit;max-width:100%}
html[data-product=construction] :is(input,select,textarea){min-width:0;color:var(--ink);background:var(--paper);border-color:var(--line)}
html[data-product=construction] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
html[data-product=construction] :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
html[data-product=construction] :is(h1,h2,h3){font-family:inherit;font-weight:750;line-height:1.25;overflow-wrap:break-word}
html[data-product=construction] :is(.muted,.empty,.help){color:var(--muted)}
html[data-product=construction] :is(.panel,.stat,.card,.cons-panel,.cons-form,.portal-card,.portal-empty){background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:none;min-width:0}
html[data-product=construction] :is(.stats,.grid,.two-cols,.fields,.cons-fields)>*{min-width:0}
html[data-product=construction] :is(.stat b,.stat strong,.stats strong){font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
html[data-product=construction] :is(.stats .accent,.stat.accent){background:var(--nav);color:#f3f7fb;border-color:var(--nav)}
html[data-product=construction] .stat.accent :is(span,small){color:#c4d3de}
html[data-product=construction] :is(button,.button,.btn,.portal-button){border-radius:8px;min-height:44px;line-height:1.4}
html[data-product=construction] .tabs{flex-wrap:wrap;overflow:visible;gap:8px;padding:4px 0 12px}
html[data-product=construction] .tabs button{white-space:normal;max-width:100%;text-align:center}
html[data-product=construction] .tabs .active{background:var(--ui-selected);border-color:var(--ui-selected-ink);color:var(--ui-selected-ink)}
html[data-product=construction] :is(.side,.sidebar){background:var(--nav);color:#edf4fa;min-width:0}
html[data-product=construction] :is(.side,.sidebar) :is(.help,.eyebrow,.nav-group,small){color:#c1d2df}
html[data-product=construction] .sidebar nav a{color:#d6e3ed}
html[data-product=construction] .sidebar nav a.active{background:#2d495e;border-left-color:#ffc591;color:#fff}
html[data-product=construction] .wordmark{font-size:22px;line-height:1.3;letter-spacing:.3px;overflow-wrap:break-word}
html[data-product=construction] .wordmark span{letter-spacing:.5px;line-height:1.5}
html[data-product=construction] :is(.brand-logo,.cons-brand img,.admin-brand-logo){display:block;object-fit:contain;object-position:left center;background:transparent;border:0;border-radius:0;box-shadow:none;padding:0;max-width:100%}
html[data-product=construction] .side .brand{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:0}
html[data-product=construction] .side .brand-logo{width:190px;height:64px}
html[data-product=construction] .side .brand b{font-size:20px;line-height:1.3;letter-spacing:.2px;overflow-wrap:break-word}
html[data-product=construction] .side .brand small{font-size:11px;line-height:1.5}
html[data-product=construction] :is(.cons-brand img,.admin-brand-logo){width:190px;height:64px;filter:brightness(0) invert(1);margin-bottom:8px}
html[data-product=construction][data-nav-tone=dark] .side .brand-logo{filter:brightness(0) invert(1)}
html[data-product=construction][data-theme=dark] .login-card .brand-logo{filter:brightness(0) invert(1)}
html[data-product=construction] .login-card .brand-logo{width:160px;height:64px}
html[data-product=construction] .node{opacity:1;background:var(--bg);border-color:var(--line);color:var(--ink);display:flex;flex-direction:column;gap:6px}
html[data-product=construction] .node small{color:var(--muted)}
html[data-product=construction] .node.done{background:var(--soft);border-color:var(--accent)}
html[data-product=construction] .node .node-state{font-size:11px;font-weight:700;color:var(--muted)}
html[data-product=construction] .node.done .node-state{color:var(--ui-link)}
html[data-product=construction] .flow{grid-template-columns:repeat(3,minmax(0,1fr))}
html[data-product=construction] .notice{background:var(--soft);color:var(--ink);border-color:var(--line);border-left-color:var(--accent)}
html[data-product=construction] .badge{background:var(--soft);border-color:var(--line);color:var(--ink)}
html[data-product=construction] .badge.approved{background:#e0f2e8;color:#205d42}
html[data-product=construction] .badge.submitted{background:#fff0d7;color:#76430a}
html[data-product=construction] .badge.rejected{background:#ffe9e5;color:#92281f}
html[data-product=construction][data-theme=dark] .badge.approved{background:#173f33;color:#9fe6c5}
html[data-product=construction][data-theme=dark] .badge.submitted{background:#493923;color:#ffe0a7}
html[data-product=construction][data-theme=dark] .badge.rejected{background:#4b2b32;color:#ffc1c7}
html[data-product=construction] :is(.table-wrap,.table-scroll){max-width:100%;overflow-x:auto}
html[data-product=construction][data-surface=dashboard] :is(.project,summary){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-product=construction][data-surface=dashboard] :is(button,input,select){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-product=construction][data-surface=dashboard] .tag{background:var(--soft);color:var(--ink)}
html[data-product=construction][data-surface=dashboard] header{background:var(--nav)}
html[data-product=construction][data-surface=partners] header{background:var(--nav);flex-wrap:wrap}
html[data-product=construction][data-surface=partners] .tabs .active{background:var(--ui-selected);color:var(--ui-selected-ink)}
html[data-product=construction][data-surface=admin] .btn:not(.secondary):not(.danger){background:#0869ad;border-color:#0869ad;color:white}
html[data-product=construction][data-surface=admin] .panel{padding:24px}
html[data-product=construction][data-surface=admin] .sidebar-foot{color:#c1d2df}
html[data-product=construction][data-surface=admin] .topbar{align-items:flex-start;flex-wrap:wrap}
html[data-product=construction][data-surface=admin] .wordmark>span{font-size:11px;letter-spacing:0;opacity:1}
/* Public pages share identity; published CMS colors remain editable. */
html[data-product=construction][data-surface=public] body{line-height:1.65}
html[data-product=construction][data-surface=public] :is(.portal-header,body>header){background:var(--paper);border-color:var(--line);padding:14px 5vw;display:flex;align-items:center;gap:20px;flex-wrap:wrap}
html[data-product=construction][data-surface=public] :is(.portal-brand,.site-brand){margin:0;background:transparent;border:0;padding:0;box-shadow:none}
html[data-product=construction][data-surface=public] :is(.portal-brand img,.site-brand img){display:block;width:190px;height:62px;object-fit:contain;object-position:left center;background:transparent;padding:0;border:0;box-shadow:none;border-radius:0}
html[data-product=construction][data-surface=public] .portal-header nav{gap:8px 24px;margin-left:auto}
html[data-product=construction][data-surface=public] .portal-controls{flex:none;gap:12px;align-items:center}
html[data-product=construction][data-surface=public] #portal-theme{width:44px;height:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;background:var(--paper);border:1px solid var(--line);border-radius:8px;color:var(--ink)}
html[data-product=construction][data-theme=dark][data-surface=public] :is(.portal-brand img,.site-brand img){filter:brightness(0) invert(1)}
html[data-product=construction][data-surface=public] .portal-main{padding-top:30px}
html[data-product=construction][data-surface=public] .portal-introduction h1{font-size:clamp(32px,4.5vw,54px)}
html[data-product=construction][data-surface=public] .portal-empty{padding:36px 24px}
html[data-product=construction][data-surface=public] .portal-empty h2{font-size:26px}
html[data-product=construction][data-surface=public] .portal-button{background:var(--accent);color:#fff;padding:13px 22px;font-weight:650;box-shadow:none}
html[data-product=construction][data-surface=public] .portal-tabs a{border-radius:8px}
html[data-product=construction][data-surface=public] .cons-kicker{color:var(--ui-link)}
html[data-product=construction][data-surface=public] .cons-hero{gap:32px;padding:28px 0}
html[data-product=construction][data-surface=public] .cons-hero h1{font-size:clamp(32px,4.5vw,54px);letter-spacing:-1px}
html[data-product=construction][data-surface=public] .cons-step{border-color:var(--line)}
html[data-product=construction][data-surface=public] .cons-step b{color:var(--ui-link)}
html[data-product=construction][data-surface=public] :is(.cons-form input,.cons-form select,.cons-form textarea){background:var(--bg);color:var(--ink);border-color:var(--line)}
html[data-product=construction][data-surface=public] .cons-form button{background:var(--accent);color:white}
html[data-product=construction][data-surface=public] .cons-form fieldset{border:1px solid var(--line);border-radius:8px;min-width:0;margin:0;padding:16px}
html[data-product=construction][data-surface=public] .cons-form legend{font-size:14px;padding:0 6px}
html[data-product=construction][data-surface=public] .site-footer{padding:32px 0 22px;line-height:1.6}
html[data-product=construction][data-surface=public] .site-footer .footer-top{gap:24px;padding-bottom:24px}
html[data-product=construction][data-surface=public] .site-footer .footer-brand img{width:190px;height:64px;object-fit:contain;object-position:left center;margin-bottom:12px}
html[data-product=construction][data-surface=public] .site-footer .footer-top>div>.eyebrow{margin:8px 0 12px}
html[data-product=construction][data-surface=public] .site-footer .footer-invitation{padding-top:4px}
html[data-product=construction][data-surface=public] .site-footer .footer-bottom{gap:12px 20px}
@media(min-width:761px){html[data-product=construction][data-surface=field] .side{position:sticky;top:0;height:100dvh;overflow-y:auto}}
@media(max-width:900px){html[data-product=construction] .flow{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
 html[data-product=construction] :is(.stats,.grid,.two-cols,.fields,.cons-fields){grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-product=construction] :is(.fields,.cons-fields,.two-cols,.grid){grid-template-columns:minmax(0,1fr)}
 html[data-product=construction] :is(input,select,textarea){font-size:16px}
 html[data-product=construction] .tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 html[data-product=construction] .tabs button{font-size:13px;padding:10px 8px;min-width:0}
 html[data-product=construction] .flow{grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-product=construction] .node{padding:14px}
 html[data-product=construction][data-surface=field] .side{padding:16px;gap:12px}
 html[data-product=construction][data-surface=field] .side>.help,html[data-product=construction][data-surface=field] .side footer{display:none}
 html[data-product=construction][data-surface=public] :is(.portal-header,body>header){padding:10px 5vw;gap:8px 16px}
 html[data-product=construction][data-surface=public] :is(.portal-brand img,.site-brand img){width:158px;height:52px}
 html[data-product=construction][data-surface=public] .portal-header nav{order:3;width:100%;margin:0;gap:6px 16px;padding:8px 0 0;justify-content:flex-start;border-color:var(--line)}
 html[data-product=construction][data-surface=public] .portal-header nav a{font-size:13px;min-height:40px;padding:6px 0}
 html[data-product=construction][data-surface=public] .portal-controls{margin-left:auto;font-size:13px}
 html[data-product=construction][data-surface=public] .portal-main{padding:20px 5vw 40px}
 html[data-product=construction][data-surface=public] .cons-hero{grid-template-columns:1fr;padding:16px 0;gap:20px}
 html[data-product=construction][data-surface=public] .cons-form{padding:20px;margin-bottom:32px}
 html[data-product=construction][data-surface=public] .site-footer .footer-top{gap:20px 16px}
 html[data-product=construction][data-surface=public] .site-footer .wrap{width:90%}
 html[data-product=construction][data-surface=public] .site-footer .footer-invitation{margin:0;padding-top:16px}
 html[data-product=construction][data-surface=public] .site-footer .footer-bottom>*{flex:1 1 100%}
 html[data-product=construction][data-surface=admin] .workspace{padding:70px 16px 24px}
 html[data-product=construction][data-surface=admin] .panel{padding:18px}
}
@media(max-width:380px){html[data-product=construction] .flow{grid-template-columns:minmax(0,1fr)}}
@media print{html[data-product=construction] body{color:#000;background:#fff}html[data-product=construction] .tabs{display:none}html[data-product=construction] .node{color:#000;background:#fff;border-color:#aaa}}

/* AGRILLCONS D6: navigation hierarchy and work surfaces */
html[data-product=construction] .cons-hub-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:22px}
html[data-product=construction] .cons-hub-card{display:flex;flex-direction:column;gap:10px;padding:22px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:var(--paper);text-decoration:none;min-width:0}
html[data-product=construction] .cons-hub-card:hover{border-color:var(--ui-focus)}
html[data-product=construction] .cons-hub-card span{color:var(--muted);font-size:13px;line-height:1.6}
html[data-product=construction] .cons-process{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0;list-style-position:inside;counter-reset:process}
html[data-product=construction] .cons-process li{padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--soft);font-size:13px;line-height:1.6}
html[data-product=construction] .construction-more-label{display:flex;flex-direction:column;gap:5px;min-width:210px;font-size:12px;color:var(--muted);font-weight:600}
html[data-product=construction] .construction-more-label select{min-height:44px;font-weight:400;max-width:280px}
html[data-product=construction] .tabs{align-items:end}
html[data-product=construction] .cons-hub-card:focus-visible{outline-offset:3px}
html[data-product=construction] .side .nav-label{font-size:10px;letter-spacing:1.3px;padding:18px 10px 6px}
html[data-product=construction] .side .nav button{padding:11px 12px;min-height:44px;line-height:1.35;white-space:normal;text-align:left}
html[data-product=construction] .side .brand b{font-size:19px;line-height:1.3;letter-spacing:.2px}
html[data-product=construction] .side .brand-logo{height:58px;width:184px}
@media(min-width:821px){html[data-product=construction][data-surface=app] .shell{grid-template-columns:264px minmax(0,1fr)}html[data-product=construction][data-surface=app] .side{position:sticky;top:0;height:100dvh;overflow-y:auto}html[data-product=construction][data-surface=app] .main{min-width:0}}
@media(max-width:1000px){html[data-product=construction] .cons-hub-grid{grid-template-columns:1fr}html[data-product=construction] .cons-process{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){html[data-product=construction] .cons-hub-grid{padding:16px;gap:12px}html[data-product=construction] .cons-hub-card{padding:18px}html[data-product=construction] .construction-more-label{grid-column:1/-1;min-width:0}html[data-product=construction] .construction-more-label select{width:100%;max-width:none}html[data-product=construction] .cons-process{gap:8px}}
@media(max-width:380px){html[data-product=construction] .cons-process{grid-template-columns:1fr}}
