/* V1.07 shared Legacy layout; every surface uses the same theme tokens. */
:root{--bg:#f3f6fb;--surface:#fff;--panel:#fff;--panel2:#eaf0f8;--ink:#18253b;--text:#18253b;--muted:#596d88;--line:#d7e0ed;--brand:#087567;--accent:#087567;--blue:#265bb0;--tint:#e2f3ee;--nav:#fff;--navtext:#405672;--input:#fff;--buttonink:#fff;--errorbg:#fff0ee;--errorink:#a13136;--radius:14px;color-scheme:light}
:root[data-theme=dark]{--bg:#080e1a;--surface:#111b2c;--panel:#111b2c;--panel2:#162237;--ink:#edf2ff;--text:#edf2ff;--muted:#a3b2ca;--line:#2c3b54;--brand:#5aecd0;--accent:#5aecd0;--blue:#91b6ff;--tint:#143338;--nav:#0b1322;--navtext:#bacbe3;--input:#0b1424;--buttonink:#062927;--errorbg:#3b2030;--errorink:#ffa1b2;color-scheme:dark}
body{font:14px/1.65 system-ui,-apple-system,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;background:var(--bg);color:var(--ink)}.app-shell{grid-template-columns:264px minmax(0,1fr)}.app-shell.guest{grid-template-columns:minmax(0,1fr)}.rail{background:var(--nav);border-right:1px solid var(--line);padding:28px 18px;color:var(--navtext)}.brand{color:var(--ink);padding:0 12px 8px;letter-spacing:1px}.brand span{color:var(--accent)}.brand small{color:var(--muted)}.nav-label{color:var(--muted);margin:22px 12px 12px;letter-spacing:1px}.rail nav a{font-size:12px;color:var(--navtext);padding:11px 12px;white-space:normal}.rail nav a>span{width:24px;font-size:17px}.rail nav a[aria-current],.rail nav a:hover{background:var(--tint);color:var(--accent);box-shadow:inset 3px 0 var(--accent)}.rail-foot,.rail-foot a{color:var(--muted)}.rail-foot{padding:20px 12px}.top{height:80px;letter-spacing:.7px;padding:0 30px;gap:16px}.theme-control{display:flex;flex-direction:row;align-items:center;gap:10px;letter-spacing:0;font-size:11px;flex-shrink:0}.theme-control select{width:auto;font-size:12px;padding:7px 10px}main{max-width:1480px;padding:28px 30px 45px;min-height:80vh}h1{font-size:28px;line-height:1.4;letter-spacing:-.5px}.heading{align-items:flex-start}h2{font-size:18px;line-height:1.6}.hero{background:linear-gradient(125deg,var(--tint),var(--panel));border:1px solid var(--line);border-radius:14px;padding:28px}.hero h2{font-size:26px;line-height:1.5;margin:12px 0}.hero p{color:var(--muted);max-width:720px}.hero-orbit{display:none}.panel,.card,.asset,.stats article{background:var(--panel);border-color:var(--line);border-radius:14px}.stats article{border-top:2px solid var(--accent)}.stats strong{font-size:30px}.tag,.pill,.badge{background:var(--tint);color:var(--accent);white-space:normal}.account-grid article,.empty{background:var(--panel2)}.asset img,.draft-images img,.thumb,.media-preview{background:var(--panel2)}.asset p{color:var(--muted)}label,legend{color:var(--ink)}input,select,textarea{background:var(--input);color:var(--ink);border-color:var(--line)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}button,.button{background:var(--accent);color:var(--buttonink);white-space:normal;line-height:1.6;min-height:44px;font-size:12px}button:hover,.button:hover{background:var(--accent);color:var(--buttonink);filter:brightness(.95);transform:none}.secondary{background:var(--panel2);color:var(--ink);border:1px solid var(--line)}.secondary:hover{background:var(--tint);color:var(--ink)}.notice,.success{background:var(--tint);color:var(--ink)}.notice.error,.error,.danger{background:var(--errorbg);color:var(--errorink)}.tag small{color:inherit}th{background:var(--panel2);letter-spacing:.2px}.table-wrap{max-width:100%}.table-wrap table{min-width:550px}.panel,.card,.grid>*,.two>*,.four>*,.draft>*{min-width:0}.section-heading{flex-wrap:wrap}.business-picker select{min-width:145px;max-width:260px}.business-picker{max-width:100%}.channel-tabs a.active{background:var(--tint);color:var(--accent);border-color:var(--line)}.verdict.good,.verdict.poor,.stat{background:var(--panel2)}.filter-bar{grid-template-columns:repeat(3,minmax(0,1fr))}.post-ref{border-color:var(--accent)}.check{align-items:flex-start;padding:4px 0}.check input{margin-top:5px}.list-row form{min-width:0}code{overflow-wrap:anywhere}.top>span{font-size:10px}.guest main{max-width:760px}.guest .top{justify-content:space-between}.badge.draft{display:inline-block}.draft.badge{display:inline-block}footer{color:var(--muted)}
@media(max-width:1100px){.app-shell{grid-template-columns:240px minmax(0,1fr)}main{padding:24px}.top{padding:0 24px}.heading{flex-wrap:wrap}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.four{grid-template-columns:repeat(2,minmax(0,1fr))}.draft{grid-template-columns:1fr}.draft-images{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.app-shell{display:block}.rail{position:static;height:auto;padding:16px}.brand{font-size:22px;padding:0}.brand small{display:block;font-size:8px}.nav-label{display:none}.rail nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;margin-top:14px;overflow:visible}.rail nav a{font-size:11px;padding:8px;min-height:40px;display:flex;align-items:center}.rail nav a>span{flex:0 0 21px;display:inline-block}.rail-foot{display:block;margin-top:10px;padding:8px 0 0;border-top:1px solid var(--line)}.rail-foot br{display:none}.rail-foot a{float:right}.top{height:auto;min-height:64px;padding:12px 16px;flex-wrap:wrap;gap:6px}.top>span{font-size:9px}.theme-control{font-size:10px}.theme-control select{font-size:12px}.heading{display:block}h1{font-size:24px}.business-picker{margin-top:15px}.business-picker select{max-width:100%;min-width:0}main{padding:20px 16px}.panel,.card{padding:18px}.hero{padding:22px}.hero h2{font-size:24px}.stats article{padding:16px}.stats span{font-size:11px}.stats strong{font-size:26px}.asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-bar label:nth-of-type(3),.filter-bar button{grid-column:1/-1}.grid,.two{grid-template-columns:1fr}.split{grid-template-columns:1fr}.media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.inline{flex-wrap:wrap}.inline label{flex:1}input,textarea,select{font-size:16px}.check{font-size:12px}.theme-control select{min-height:36px}.list-row{flex-wrap:wrap}.hero .button{margin-top:10px}.metric-row{grid-template-columns:1fr}}
@media(max-width:360px){.asset-grid,.four{grid-template-columns:1fr}.rail nav a{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.mobile-menu{display:none}
@media(max-width:760px){.js .mobile-menu{display:flex;margin-top:14px;width:100%;justify-content:flex-start}.js .rail:not([data-nav-open]) #workspace-nav{display:none}}

/* Campaign project navigation uses the existing canonical button treatment. */
body.ui2 .plan171-nav{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}

/* UX15 record-directory variant. Existing scroll owners retain keyboard focus and horizontal hints. */
body.ui2 .ui-record-table{table-layout:auto;width:100%;border-collapse:collapse}
body.ui2 .ui-record-table :is(th,td){vertical-align:top}
body.ui2 :is(.cmp-directory-table,.adv-plan-table,.cr-directory-table) :is(th,td):nth-child(1),body.ui2 .cr-collaboration-table :is(th,td):is(:nth-child(1),:nth-child(2)){min-width:210px;max-width:300px;white-space:normal;overflow-wrap:anywhere}
body.ui2 .cmp-directory-table :is(th,td):nth-child(2),body.ui2 .adv-plan-table :is(th,td):nth-child(4),body.ui2 .cr-collaboration-table :is(th,td):nth-child(4){min-width:155px;white-space:normal;word-break:normal;overflow-wrap:normal}
body.ui2 .adv-plan-table :is(th,td):nth-child(3),body.ui2 .cr-collaboration-table :is(th,td):nth-child(5){min-width:112px;white-space:nowrap;overflow-wrap:normal}
body.ui2 .cmp-directory-table :is(th,td):nth-child(3),body.ui2 .adv-plan-table :is(th,td):nth-child(5),body.ui2 .cr-directory-table :is(th,td):nth-child(7),body.ui2 .cr-collaboration-table :is(th,td):nth-child(3){min-width:160px;max-width:210px}
body.ui2 .cmp-directory-table :is(th,td):nth-child(3)>.ui-badge,body.ui2 .adv-plan-table :is(th,td):nth-child(5)>.ui-badge,body.ui2 .cr-directory-table :is(th,td):nth-child(7)>.ui-badge,body.ui2 .cr-collaboration-table :is(th,td):nth-child(3)>.ui-badge{display:inline-block;box-sizing:border-box;max-width:180px;white-space:normal;word-break:normal;overflow-wrap:break-word}
body.ui2 .cmp-directory-table{min-width:760px}
body.ui2 .cmp-directory-table :is(th,td):nth-child(2){white-space:nowrap}
body.ui2 .cmp-directory-table :is(th,td):nth-child(3)>.ui-badge{max-width:none;white-space:nowrap;overflow-wrap:normal}
body.ui2 .cmp-directory-table :is(th,td):nth-child(4){min-width:140px;white-space:nowrap}
body.ui2 .adv-plan-table{min-width:1000px}
body.ui2 .adv-plan-table :is(th,td):nth-child(4){min-width:220px}
body.ui2 .adv-plan-table :is(th,td):nth-child(2){min-width:160px;max-width:220px;overflow-wrap:anywhere}
body.ui2 .adv-plan-table :is(th,td):nth-child(6){min-width:70px}
body.ui2 .cr-directory-table{min-width:1080px}
body.ui2 .cr-directory-table :is(th,td):is(:nth-child(2),:nth-child(3),:nth-child(4),:nth-child(6)){min-width:100px;white-space:nowrap;overflow-wrap:normal}
body.ui2 .cr-directory-table :is(th,td):nth-child(5){min-width:170px;max-width:250px;overflow-wrap:anywhere}
body.ui2 .cr-collaboration-table{min-width:1040px}
body.ui2 .cr-collaboration-table :is(th,td):nth-child(6){min-width:120px;max-width:220px;overflow-wrap:anywhere}

/* UX15 work-order and product-directory variants. Existing table scroll regions remain the owners. */
body.ui2 .wo-directory-table{min-width:1020px}
body.ui2 .sales-product-table{min-width:860px}
body.ui2 :is(.wo-directory-table,.sales-product-table) :is(th,td){white-space:normal;word-break:normal;overflow-wrap:anywhere}
body.ui2 .wo-directory-table :is(th,td):nth-child(1){min-width:170px;max-width:240px}
body.ui2 .wo-directory-table :is(th,td):nth-child(2),body.ui2 .sales-product-table :is(th,td):is(:nth-child(1),:nth-child(2)){min-width:220px;max-width:300px}
body.ui2 .wo-directory-table :is(th,td):nth-child(3),body.ui2 .sales-product-table :is(th,td):nth-child(3){min-width:170px;max-width:240px}
body.ui2 .wo-directory-table :is(th,td):nth-child(4){min-width:160px;max-width:260px}
body.ui2 .wo-directory-table :is(th,td):nth-child(5){min-width:210px;white-space:nowrap;overflow-wrap:normal}
body.ui2 .sales-product-table :is(th,td):nth-child(4){min-width:240px;max-width:320px}
body.ui2 :is(.wo-directory-table,.sales-product-table) td.ui-record-state-known{white-space:nowrap;overflow-wrap:normal}
