/* Three compact office layouts. The original homepage uses no theme attribute. */
html[data-erp-theme=serene]{--bg:#f4f6fa;--card:#fff;--ink:#263448;--ink2:#52627a;--muted:#7a889b;--line:#dfe5ee;--line2:#f0f4f9;--brand:#3769cf;--brand2:#7598df;--brand-soft:#eaf0fc;--palette-side:#fff;--palette-edge:#d5dfef;--r:10px}
html[data-erp-theme=studio]{--bg:#f1f6f3;--card:#fff;--ink:#293c34;--ink2:#526d60;--muted:#788d81;--line:#dce6df;--line2:#f0f5f2;--brand:#33745c;--brand2:#81ad98;--brand-soft:#e7f1eb;--palette-side:#fff;--palette-edge:#cddfd3;--r:10px}
html[data-erp-theme=panorama]{--bg:#f6f4ef;--card:#fffefa;--ink:#39382f;--ink2:#6b6658;--muted:#8d8779;--line:#e3dfd5;--line2:#f2efe8;--brand:#846c4b;--brand2:#b8a78a;--brand-soft:#efe9de;--palette-side:#fffefa;--palette-edge:#ded4c2;--r:8px}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) body{background:var(--bg);color:var(--ink)}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side{background:var(--palette-side);border-color:var(--line);box-shadow:none}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side .logo .mk{background:var(--brand);box-shadow:none}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side-user{border-color:var(--line)}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side-user .su-meta b{color:var(--ink)}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side-user .su-out{color:var(--muted);background:var(--line2);border-color:var(--line)}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side-user .av{background:var(--brand)}
/* Let navigation labels follow the group, including an explicitly chosen dark palette. */
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .grp :is(.lbl,.ico,.caret){color:inherit}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .grp .ico{background:transparent;box-shadow:none}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .subnav a.on:before{background:var(--brand)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side .logo{border-color:var(--line)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side .logo b{color:var(--ink)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side :is(.logo small,.su-meta small,.gtitle){color:var(--muted)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .grp{background:transparent;color:var(--ink2)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .grp:hover{background:var(--line2);color:var(--ink)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .grp.on{background:var(--brand-soft);color:var(--brand)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .subnav{border-color:var(--line)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .subnav a{background:transparent;color:var(--ink2)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .subnav a:is(:hover,.on){background:var(--brand-soft);color:var(--brand)}
html:not([data-erp-color]):is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .side-user .su-out:hover{color:var(--brand);background:var(--brand-soft)}
html[data-erp-color]:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .grp:not(.on){background:transparent}
html[data-erp-color]:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .grp:not(.on):hover,
html[data-erp-color]:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .nav .subnav a:is(:hover,.on){background:rgba(255,255,255,.08)}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell .top{background:var(--card);backdrop-filter:none}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell.dash-noTop .hero-wrap{display:none}
html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell.dash-noTop .page{padding:20px 24px 28px;background:var(--bg)}
.wh-root{max-width:1560px;margin:auto;color:var(--ink);font-size:12px}
.wh-root *{box-sizing:border-box}
.wh-root :is(h1,h2,p,dl,dd){margin:0}
.wh-root button{font-family:inherit;cursor:pointer}
.wh-root button:disabled{cursor:default}
.wh-root button:focus-visible,.wh-root a:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.wh-root a{text-decoration:none}
.wh-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.wh-header>div{min-width:0}
.wh-header p{font-size:11px;color:var(--muted);line-height:1.5}
.wh-header p>span{display:inline-block;margin-left:12px;padding-left:12px;border-left:1px solid var(--line)}
.wh-header h1{font-size:22px;font-weight:600;line-height:1.4;margin-top:3px;letter-spacing:.2px}
.wh-header small{display:block;margin-top:3px;font-size:11px;color:var(--muted)}
.wh-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.wh-actions .wh-link{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 12px;border:1px solid var(--line);border-radius:5px;background:var(--card);color:var(--ink2);white-space:nowrap}
.wh-actions .wh-link:hover{border-color:var(--brand);color:var(--brand)}
.wh-actions .wh-primary{background:var(--brand);color:var(--card);border-color:var(--brand);font-weight:500}
.wh-actions .wh-primary:hover{background:var(--brand);color:var(--card);filter:brightness(.96)}
.wh-link{color:var(--brand);font-size:11px}
.wh-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.wh-metric{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:76px;padding:15px 18px;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--ink);text-align:left}
.wh-metric>span{font-size:12px;color:var(--ink2);line-height:1.45}
.wh-metric>b{font-size:27px;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap}
.wh-metric small{font-size:11px;font-weight:400;margin-left:4px;color:var(--muted)}
.wh-metric:not(:disabled):hover{border-color:var(--brand2)}
.wh-risk>b,.wh-root .wh-warning{color:#b85341}
.wh-panel{min-width:0;background:var(--card);border:1px solid var(--line);border-radius:8px;margin-bottom:14px;overflow:hidden}
.wh-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line)}
.wh-section-head h2{font-size:13px;line-height:1.4;font-weight:600;color:var(--ink)}
.wh-columns{display:grid;grid-template-columns:minmax(0,2.6fr) minmax(245px,1fr);gap:14px;align-items:start}
.wh-main,.wh-aside{min-width:0}
.wh-table-scroll{width:100%;overflow-x:auto}
.wh-root .wh-order-table{border-collapse:collapse;width:100%;min-width:600px;margin:0;font-size:12px;color:var(--ink2)}
.wh-root .wh-order-table th{padding:9px 14px;background:var(--line2);text-align:left;font-size:11px;font-weight:500;color:var(--muted);white-space:nowrap;border:0;border-bottom:1px solid var(--line)}
.wh-root .wh-order-table td{padding:10px 14px;border:0;border-bottom:1px solid var(--line);font-size:12px;line-height:1.55;vertical-align:middle}
.wh-root .wh-order-table tr:last-child td{border-bottom:0}
.wh-root .wh-order-table tbody tr:hover{background:var(--line2)}
.wh-order-table th:first-child{width:34%}
.wh-root .wh-order-table .wh-spec{max-width:220px;font-size:11px;overflow-wrap:anywhere}
.wh-order-table td:first-child>small{display:block;font-size:10px;color:var(--muted);margin-top:2px;overflow-wrap:anywhere}
.wh-order-link{display:inline-block;border:0;padding:0;background:transparent;color:var(--ink);font-size:12px;font-weight:500;text-align:left;overflow-wrap:anywhere}
.wh-order-link:hover{color:var(--brand)}
.wh-order-table .wh-number{font-variant-numeric:tabular-nums;white-space:nowrap}
.wh-status{display:inline-block;padding:2px 6px;border-radius:4px;background:var(--brand-soft);color:var(--brand);font-size:10px;white-space:nowrap}
.wh-stage-list{display:grid;gap:10px;padding:14px 16px}
.wh-stage-list>button{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 10px;padding:0;background:transparent;border:0;color:var(--ink2);font-size:11px;text-align:left}
.wh-stage-list>button:hover:not(:disabled){color:var(--brand)}
.wh-stage-list b{font-size:12px;font-weight:500;font-variant-numeric:tabular-nums;color:var(--ink)}
.wh-stage-list i{grid-column:1/-1;display:block;height:3px;background:var(--line2);border-radius:2px;overflow:hidden}
.wh-stage-list u{display:block;height:100%;background:var(--brand2);border-radius:2px}
.wh-production dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;padding:15px 16px}
.wh-production dt{font-size:11px;color:var(--muted);line-height:1.5}
.wh-production dd{margin-top:3px;font-size:20px;font-weight:500;line-height:1.3;font-variant-numeric:tabular-nums}
.wh-production dd small{font-size:11px;font-weight:400;margin-left:4px;color:var(--muted)}
.wh-chart{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;min-height:120px;padding:14px 16px}
.wh-chart>div{flex:1;min-width:0;display:flex;align-items:center;flex-direction:column;gap:5px}
.wh-chart b{font-size:10px;font-weight:400;color:var(--ink2);font-variant-numeric:tabular-nums}
.wh-chart i{display:block;width:44%;min-width:5px;max-width:22px;border-radius:3px 3px 0 0;background:var(--brand2)}
.wh-chart span{font-size:9px;color:var(--muted);text-align:center;overflow-wrap:anywhere}
.wh-root .wh-empty{text-align:center;padding:24px 14px;color:var(--muted);font-size:12px}
.wh-footer{display:flex;justify-content:space-between;gap:12px;padding-top:4px;color:var(--muted);font-size:10px}
/* Production: the progress row gets the first full-width position. */
.wh-production>.wh-stages .wh-stage-list{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:12px}
.wh-production>.wh-stages .wh-stage-list>button{padding:11px 12px;background:var(--line2);border-radius:5px}
.wh-production>.wh-stages .wh-stage-list b{font-size:19px}
.wh-production>.wh-stages .wh-stage-list i{height:2px;background:var(--line)}
.wh-production>.wh-stages .wh-stage-list u{background:var(--brand)}
/* Overview: a single summary strip and a broad ledger. */
.wh-overview .wh-metrics{gap:0;border:1px solid var(--line);border-radius:7px;background:var(--card);padding:3px 0}
.wh-overview .wh-metric{border:0;border-right:1px solid var(--line);border-radius:0;min-height:65px;background:transparent;padding:12px 20px}
.wh-overview .wh-metric:last-child{border-right:0}
.wh-overview .wh-metric:not(:disabled):hover{background:var(--line2)}
.wh-overview .wh-metric b{font-size:25px}
.wh-overview .wh-bottom{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}
.wh-overview .wh-bottom>.wh-panel{margin-bottom:0}
.wh-overview .wh-footer{margin-top:14px}
@media(max-width:1200px){.wh-columns{grid-template-columns:minmax(0,2fr) minmax(225px,1fr)}.wh-metric{padding:12px;min-height:70px}.wh-metric>b{font-size:24px}.wh-overview .wh-metric{padding:12px}.wh-header{align-items:flex-start}.wh-header p>span{display:block;padding:0;margin:0;border:0}.wh-actions{max-width:380px}}
@media(max-width:1000px){.wh-columns{grid-template-columns:1fr}.wh-aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}.wh-aside>.wh-panel{margin-bottom:0}.wh-aside{margin-bottom:14px}.wh-overview .wh-bottom{grid-template-columns:repeat(2,minmax(0,1fr))}.wh-production>.wh-stages .wh-stage-list{grid-template-columns:repeat(4,minmax(0,1fr))}.wh-metric{flex-direction:column;align-items:flex-start;gap:5px;min-height:74px}}
@media(max-width:620px){html:is([data-erp-theme=serene],[data-erp-theme=studio],[data-erp-theme=panorama]) #shell.dash-noTop .page{padding:14px 12px 24px}.wh-header{display:block;margin-bottom:14px}.wh-header p>span{display:inline-block;margin-left:8px}.wh-header h1{font-size:20px}.wh-header small{display:none}.wh-actions{justify-content:flex-start;max-width:none;margin-top:12px;gap:6px}.wh-actions .wh-link{min-height:34px;padding:0 10px;font-size:11px}.wh-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}.wh-metric{flex-direction:row;align-items:center;min-height:64px;padding:11px}.wh-metric>span{font-size:11px}.wh-metric>b{font-size:23px}.wh-panel{margin-bottom:10px}.wh-section-head{padding:11px 12px}.wh-aside,.wh-overview .wh-bottom{grid-template-columns:1fr;gap:10px}.wh-production>.wh-stages .wh-stage-list{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;gap:7px}.wh-production>.wh-stages .wh-stage-list>button{padding:10px}.wh-overview .wh-metrics{padding:0;gap:0}.wh-overview .wh-metric{min-height:63px}.wh-overview .wh-metric:nth-child(2){border-right:0}.wh-overview .wh-metric:nth-child(-n+2){border-bottom:1px solid var(--line)}.wh-footer{font-size:10px}}

/* 蓝色工厂：保留各模块原有行为，仅调整导航和真实首页数据的布局。 */
html[data-erp-theme=bluework]{--bg:#edf4fd;--card:#fff;--ink:#153461;--ink2:#4f6685;--muted:#8294ac;--line:#e0eaf7;--line2:#f1f6fd;--brand:#227cf0;--brand2:#54a0fc;--brand-soft:#e9f3ff;--r:10px}
html[data-erp-theme=bluework] body{background:var(--bg);color:var(--ink)}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .side{background:linear-gradient(165deg,#2776d9,#0750ae 65%,#084493);border:0}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .side .logo b,html[data-erp-theme=bluework]:not([data-erp-color]) #shell .side-user .su-meta b{color:#fff}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .side :is(.logo small,.su-meta small,.gtitle){color:#b1d2fb}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .nav .grp{color:#e0edff;background:transparent}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .nav .grp :is(.lbl,.ico,.caret){color:inherit}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .nav .grp .ico{background:transparent;box-shadow:none}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .nav .grp:hover{background:rgba(255,255,255,.12);color:#fff}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .nav .grp.on{background:#4499f7;color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.22)}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .nav .subnav{border-color:rgba(255,255,255,.25)}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .nav .subnav a{color:#d8eaff}
html[data-erp-theme=bluework]:not([data-erp-color]) #shell .nav .subnav a:is(:hover,.on){background:rgba(255,255,255,.13);color:#fff}
html[data-erp-theme=bluework] #shell.dash-noTop .hero-wrap{display:none}
html[data-erp-theme=bluework] #shell.dash-noTop .page{padding:20px 24px 28px;background:var(--bg)}
.wh-bluework{max-width:1700px;font-size:13px}
.wh-bluework .wh-header h1{font-weight:700;color:#153461}
.wh-bluework .wh-panel,.wh-bluework .wh-metric{border:1px solid #e5edf8;box-shadow:0 3px 12px rgba(47,103,174,.04);border-radius:10px}
.bw-top-grid{display:grid;grid-template-columns:180px minmax(0,1fr);gap:14px;align-items:stretch}
.bw-top-grid.bw-no-rail{grid-template-columns:1fr}
.bw-work{min-width:0}
.bw-rail{padding:18px 14px;display:flex;flex-direction:column;gap:10px}
.bw-rail h2{font-size:16px;margin:0 0 8px;color:#163765}
.bw-rail a{display:flex;align-items:center;gap:10px;min-height:54px;padding:10px;border-radius:7px;background:#edf5ff;color:#173c6e;font-weight:600}
.bw-rail a:hover{background:#dcecff;color:#1263ce}
.bw-rail a span{font-size:22px;color:#217df1;width:30px;text-align:center}
.wh-bluework .wh-metrics{gap:12px}
.wh-bluework .wh-metric{justify-content:flex-start;gap:10px;min-height:86px;padding:14px}
.wh-bluework .wh-metric:before{content:'▤';display:grid;place-items:center;flex:0 0 48px;height:48px;border-radius:9px;background:#287ff0;color:#fff;font-size:23px;font-weight:700}
.wh-bluework .wh-metric:nth-child(2):before{content:'!';background:#f6a34e}
.wh-bluework .wh-metric:nth-child(3):before{content:'✓';background:#19b8a1}
.wh-bluework .wh-metric:nth-child(4):before{content:'⇄';background:#7469eb}
.wh-bluework .wh-metric>span{flex:1;font-weight:600}
.wh-bluework .wh-metric>b{font-size:23px;color:#143865}
.wh-bluework .wh-risk>b{color:#bc4d40}
.wh-bluework .wh-section-head{border:0;padding:16px 18px 10px}
.wh-bluework .wh-section-head h2{font-size:16px;font-weight:700}
.bw-functions{padding-bottom:6px}
.bw-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:2px 14px 14px}
.bw-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:112px;padding:12px 8px;text-align:center;border:1px solid #e4eefb;border-radius:8px;background:#f1f7ff;color:#183961;transition:background .15s,border-color .15s}
.bw-tile:hover{background:#e5f1ff;border-color:#b9d8ff}
.bw-tile-icon{color:#227df0;font-size:28px;line-height:1;font-weight:700}
.bw-tile strong{font-size:14px}.bw-tile small{font-size:11px;color:#7187a4}
.bw-bottom{display:grid;grid-template-columns:minmax(250px,1fr) minmax(0,1.6fr);gap:14px;align-items:start}
.bw-bottom>.wh-panel{margin-bottom:0}.bw-bottom .wh-orders{min-width:0}
.wh-bluework .wh-order-table th{background:#f1f6fd;color:#7189a7}
.wh-bluework .wh-chart{min-height:155px}
.wh-bluework .wh-chart i{background:linear-gradient(#48a0ff,#1f76e7);max-width:28px}
.wh-bluework .wh-footer{margin-top:14px}
@media(max-width:1150px){.bw-top-grid{grid-template-columns:145px minmax(0,1fr)}.wh-bluework .wh-metric{flex-wrap:wrap}.wh-bluework .wh-metric:before{flex-basis:36px;height:36px;font-size:19px}.wh-bluework .wh-metric>span{min-width:70px}.wh-bluework .wh-metric>b{margin-left:46px}.bw-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:820px){.bw-top-grid{grid-template-columns:1fr}.bw-rail{display:none}.bw-bottom{grid-template-columns:1fr}.bw-bottom>.wh-panel{margin-bottom:0}}
@media(max-width:620px){html[data-erp-theme=bluework] #shell.dash-noTop .page{padding:14px 12px 24px}.wh-bluework .wh-metrics{gap:8px}.wh-bluework .wh-metric{min-height:68px;flex-wrap:nowrap;padding:9px;gap:7px}.wh-bluework .wh-metric:before{flex-basis:34px;height:34px;font-size:18px}.wh-bluework .wh-metric>span{min-width:0;font-size:11px}.wh-bluework .wh-metric>b{margin:0;font-size:19px}.bw-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:2px 10px 10px}.bw-tile{min-height:90px}.bw-bottom{gap:10px}}
