:root {
  --wh-ink: #17211f;
  --wh-ink-2: #24312d;
  --wh-paper: #f2eee4;
  --wh-raised: #fffdf7;
  --wh-soft: #f5f1e8;
  --wh-line: #c9c3b5;
  --wh-muted: #6c7772;
  --wh-orange: #f0642b;
  --wh-green: #b7c968;
  --wh-blue: #617b86;
  --wh-danger: #a83e36;
  --wh-shadow: 0 18px 50px rgb(23 33 31 / 10%);
  --wh-display: "STZhongsong", "Songti SC", "Microsoft YaHei UI", serif;
  --wh-body: "Source Han Sans SC", "Microsoft YaHei UI", sans-serif;
}

body { margin: 0; color: var(--wh-ink); background: var(--wh-paper); font-family: var(--wh-body); }
.navbar, .web-footer, .page-breadcrumbs { display: none !important; }
.web-page { padding: 0 !important; }
.web-page .page_content, .web-page .page-content, .page_content { max-width: none !important; padding: 0 !important; }
.container { max-width: none; padding: 0; }
.weihu-app * { box-sizing: border-box; }
.weihu-app button, .weihu-app input, .weihu-app textarea { font: inherit; }
.weihu-app button { border-radius: 0; }
.weihu-app { min-height: 100vh; background: linear-gradient(130deg, rgba(255,255,255,.34), transparent 42%), var(--wh-paper); }

.weihu-rail { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: 254px; flex-direction: column; padding: 26px 20px 20px; color: #f3f6f4; background: var(--wh-ink); }
.weihu-brand { display: flex; align-items: center; gap: 12px; color: inherit !important; text-decoration: none !important; }
.weihu-brand img { width: 52px; height: 52px; padding: 6px; border: 1px solid rgba(255,255,255,.18); background: #fff; object-fit: contain; }
.weihu-brand span, .weihu-brand small, .weihu-brand strong { display: block; }
.weihu-brand small { color: #91a19a; font: 700 9px/1.4 monospace; letter-spacing: .16em; }
.weihu-brand strong { margin-top: 4px; font-size: 20px; letter-spacing: .05em; }
.environment-mark { display: flex; align-items: center; gap: 8px; margin: 26px 0 15px; padding: 10px 11px; color: #dfe7e3; border: 1px solid rgba(255,255,255,.14); font-size: 11px; }
.environment-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--wh-green); box-shadow: 0 0 0 4px rgba(168,212,91,.1); }
.weihu-nav { display: grid; gap: 5px; }
.weihu-nav button { display: grid; grid-template-columns: 31px 1fr; align-items: center; gap: 10px; width: 100%; padding: 13px 12px; color: #aebbb5; text-align: left; border: 1px solid transparent; background: transparent; cursor: pointer; }
.weihu-nav button:hover { color: #fff; border-color: rgba(255,255,255,.14); }
.weihu-nav button.is-active { color: #fff; border-color: #3c4b46; background: var(--wh-ink-2); box-shadow: inset 4px 0 0 var(--wh-orange); }
.weihu-nav b { color: #73837c; font: 700 10px monospace; }
.weihu-nav button.is-active b { color: var(--wh-green); }
.weihu-nav span, .weihu-nav small { display: block; }
.weihu-nav span { font-size: 13px; font-weight: 700; }
.weihu-nav small { margin-top: 4px; color: #83918b; font-size: 9px; font-weight: 400; }
.rail-rule { margin-top: auto; padding: 14px; border-left: 3px solid var(--wh-green); background: #202d29; }
.rail-rule span { color: var(--wh-green); font: 700 9px monospace; }
.rail-rule p { margin: 7px 0 0; color: #bac6c0; font-size: 10px; line-height: 1.65; }
.admin-link { margin-top: 14px; color: #8d9b95 !important; font-size: 9px; text-decoration: none !important; }

.weihu-main { min-height: 100vh; margin-left: 254px; padding: 30px clamp(24px, 4vw, 58px) 70px; }
.weihu-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--wh-line); }
.eyebrow { margin: 0; color: var(--wh-muted); font: 800 9px/1.5 monospace; letter-spacing: .15em; text-transform: uppercase; }
.weihu-header h1 { margin: 7px 0 5px; font: 700 clamp(25px, 3vw, 38px)/1.15 var(--wh-display); letter-spacing: -.04em; }
.weihu-header > div > p:last-child { margin: 0; color: var(--wh-muted); font-size: 11px; }
.user-block { display: grid; justify-items: end; gap: 4px; min-width: 150px; padding-left: 18px; border-left: 1px solid var(--wh-line); font-size: 10px; }
.user-block span { color: var(--wh-muted); }
.user-block strong { font-size: 12px; }
.user-block a { color: var(--wh-ink); border-bottom: 1px solid var(--wh-ink); text-decoration: none; }
.test-warning { display: grid; grid-template-columns: auto 1fr; gap: 14px; margin: 15px 0 22px; padding: 11px 14px; color: #6d351e; border-left: 4px solid var(--wh-orange); background: #fff1e6; font-size: 10px; line-height: 1.55; }
.test-warning strong { white-space: nowrap; }
.portal-loading { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px; color: var(--wh-muted); border: 1px dashed var(--wh-line); font-size: 10px; }
.portal-loading span { width: 10px; height: 10px; border: 2px solid var(--wh-line); border-top-color: var(--wh-orange); border-radius: 50%; animation: wh-spin .8s linear infinite; }
@keyframes wh-spin { to { transform: rotate(360deg); } }
.portal-error { margin-bottom: 16px; padding: 13px; color: #fff; background: var(--wh-danger); font-size: 11px; }
.portal-view { display: none; }
.portal-view.is-active { display: block; animation: wh-enter .18s ease-out; }
@keyframes wh-enter { from { opacity: .45; transform: translateY(4px); } }

.action-hero { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 30px; padding: clamp(25px, 4vw, 46px); color: #f2f6f4; background: var(--wh-ink); box-shadow: var(--wh-shadow); }
.action-hero .eyebrow { color: var(--wh-green); }
.action-hero h2 { max-width: 680px; margin: 9px 0 12px; font: 700 clamp(23px, 3vw, 36px)/1.18 var(--wh-display); letter-spacing: -.035em; }
.action-hero p:not(.eyebrow) { max-width: 720px; margin: 0; color: #b9c5bf; font-size: 12px; line-height: 1.8; }
.hero-action { display: flex; min-height: 132px; flex-direction: column; align-items: flex-start; justify-content: center; padding: 22px; color: var(--wh-ink); text-align: left; border: 0; background: var(--wh-green); cursor: pointer; box-shadow: inset 0 -5px 0 rgba(23,33,31,.16); }
.hero-action:hover { transform: translateY(-2px); }
.hero-action > span { margin-bottom: 8px; font-size: 28px; line-height: 1; }
.hero-action { font-size: 16px; font-weight: 800; }
.hero-action small { display: block; margin-top: 7px; font-size: 9px; font-weight: 500; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0; border: 1px solid var(--wh-line); background: var(--wh-raised); }
.metric-grid article { min-height: 112px; padding: 18px; border-right: 1px solid var(--wh-line); }
.metric-grid article:last-child { border-right: 0; }
.metric-grid span, .metric-grid strong, .metric-grid small { display: block; }
.metric-grid span { color: var(--wh-muted); font-size: 9px; }
.metric-grid strong { margin: 12px 0 5px; font: 700 28px var(--wh-display); }
.metric-grid small { color: #929a96; font-size: 8px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); gap: 18px; }
.panel { padding: 22px; border: 1px solid var(--wh-line); background: var(--wh-raised); box-shadow: var(--wh-shadow); }
.panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--wh-line); }
.panel h2, .form-section h2, .directory-head h2, .order-summary h2 { margin: 5px 0 0; font: 700 18px var(--wh-display); }
.panel header button { padding: 7px 0; color: var(--wh-ink); border: 0; border-bottom: 1px solid; background: transparent; cursor: pointer; font-size: 10px; }
.recent-orders { display: grid; }
.recent-order { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid #e6e0d4; }
.recent-order:last-child { border-bottom: 0; }
.recent-order strong, .recent-order span, .recent-order small { display: block; }
.recent-order strong { font-size: 11px; }
.recent-order span { margin-top: 4px; color: var(--wh-muted); font-size: 9px; }
.recent-order small { color: var(--wh-muted); text-align: right; font-size: 8px; }
.flow-panel ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.flow-panel li { display: grid; grid-template-columns: 31px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid #e6e0d4; }
.flow-panel li:last-child { border-bottom: 0; }
.flow-panel li b { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; background: var(--wh-ink); font: 700 9px monospace; }
.flow-panel li span, .flow-panel li small { display: block; }
.flow-panel li span { font-size: 11px; font-weight: 700; }
.flow-panel li small { margin-top: 4px; color: var(--wh-muted); font-size: 8px; font-weight: 400; }

.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 286px; align-items: start; gap: 18px; }
.order-builder { display: grid; gap: 14px; }
.form-section { padding: 22px; border: 1px solid var(--wh-line); background: var(--wh-raised); box-shadow: var(--wh-shadow); }
.form-section > header { display: grid; grid-template-columns: 40px 1fr; gap: 13px; margin-bottom: 18px; }
.form-section > header > span { display: grid; width: 38px; height: 38px; place-items: center; color: var(--wh-green); background: var(--wh-ink); font: 800 10px monospace; }
.form-section header small { display: block; margin-top: 4px; color: var(--wh-muted); font-size: 9px; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.search-row label, .field-grid label, .attachment-field { display: grid; gap: 7px; }
.search-row label > span, .field-grid label > span, .attachment-field > span { color: #58635e; font-size: 9px; font-weight: 800; }
input, textarea, select { width: 100%; color: var(--wh-ink); border: 1px solid var(--wh-line); outline: none; background: #fff; }
input { min-height: 42px; padding: 9px 11px; }
select { min-height: 42px; padding: 9px 28px 9px 11px; }
textarea { padding: 10px 11px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--wh-ink); box-shadow: inset 3px 0 0 var(--wh-orange); }
.secondary-action, .primary-action { min-height: 42px; padding: 9px 15px; cursor: pointer; font-size: 10px; font-weight: 800; }
.secondary-action { color: var(--wh-ink); border: 1px solid var(--wh-ink); background: transparent; }
.secondary-action:hover { color: #fff; background: var(--wh-ink); }
.primary-action { color: #fff; border: 1px solid var(--wh-ink); background: var(--wh-ink); }
.primary-action:hover { border-color: var(--wh-orange); background: var(--wh-orange); }
.search-results, .product-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.result-card { position: relative; min-width: 0; padding: 14px; text-align: left; border: 1px solid var(--wh-line); background: var(--wh-soft); cursor: pointer; }
.result-card:hover { border-color: var(--wh-orange); transform: translateY(-1px); }
.result-card strong, .result-card span, .result-card small { display: block; }
.result-card strong { padding-right: 50px; font-size: 11px; line-height: 1.45; }
.result-card span { margin-top: 5px; color: var(--wh-muted); font: 700 8px monospace; }
.result-card small { margin-top: 7px; color: var(--wh-muted); font-size: 8px; line-height: 1.45; }
.result-card em { position: absolute; top: 12px; right: 12px; color: var(--wh-orange); font-size: 9px; font-style: normal; font-weight: 800; }
.selected-customer { margin-top: 11px; padding: 14px; color: #fff; border-left: 4px solid var(--wh-green); background: var(--wh-ink); }
.selected-customer strong, .selected-customer span { display: block; }
.selected-customer strong { font-size: 12px; }
.selected-customer span { margin-top: 5px; color: #b9c5bf; font-size: 9px; }
.selected-customer button { margin-top: 10px; padding: 0 0 3px; color: var(--wh-green); border: 0; border-bottom: 1px solid; background: transparent; cursor: pointer; font-size: 9px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field-wide { grid-column: 1 / -1; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.category-tabs button { min-height: 34px; padding: 7px 12px; color: var(--wh-muted); border: 1px solid var(--wh-line); background: var(--wh-soft); cursor: pointer; font-size: 9px; }
.category-tabs button:hover, .category-tabs button.is-active { color: #fff; border-color: var(--wh-ink); background: var(--wh-ink); }
.product-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 13px; border: 1px solid var(--wh-line); background: var(--wh-soft); }
.product-result strong, .product-result span, .product-result small { display: block; }
.product-result strong { font-size: 10px; }
.product-result span { margin-top: 4px; color: var(--wh-muted); font: 700 8px monospace; }
.product-result small { margin-top: 6px; color: var(--wh-muted); font-size: 8px; }
.product-result button { align-self: center; min-width: 68px; min-height: 34px; color: var(--wh-ink); border: 1px solid var(--wh-ink); background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.product-result button:hover { color: #fff; background: var(--wh-ink); }
.order-lines { display: grid; gap: 8px; }
.order-line { display: grid; grid-template-columns: minmax(140px, 1.2fr) 90px 100px minmax(120px, 1fr) minmax(120px, 1fr) 34px; align-items: end; gap: 8px; padding: 13px; border: 1px solid var(--wh-line); background: var(--wh-soft); }
.order-line .line-product { align-self: center; }
.order-line .line-product strong, .order-line .line-product small { display: block; }
.order-line .line-product strong { font-size: 10px; }
.order-line .line-product small { margin-top: 5px; color: var(--wh-muted); font: 700 8px monospace; }
.order-line label { display: grid; gap: 5px; }
.order-line label span { color: var(--wh-muted); font-size: 8px; font-weight: 700; }
.order-line input { min-height: 36px; padding: 7px 8px; font-size: 9px; }
.line-master-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 11px; border-left: 3px solid var(--steel-blue); background: #eef3f3; color: var(--wh-muted); font-size: 10px; line-height: 1.5; }
.line-master-facts strong { color: var(--ink); }
.remove-line { display: grid; width: 34px; height: 36px; place-items: center; color: var(--wh-danger); border: 1px solid #dab9b5; background: #fff; cursor: pointer; }
.order-summary { position: sticky; top: 18px; padding: 21px; color: #fff; background: var(--wh-ink); box-shadow: var(--wh-shadow); }
.order-summary .eyebrow { color: var(--wh-green); }
.order-summary h2 { color: #fff; }
.order-summary dl { margin: 20px 0; }
.order-summary dl div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #3a4944; }
.order-summary dt { color: #9daaa4; font-size: 9px; }
.order-summary dd { margin: 0; text-align: right; font-size: 10px; font-weight: 800; }
.attachment-field { margin: 17px 0; }
.attachment-field > span { color: #b9c5bf; }
.attachment-field input { min-height: 38px; padding: 7px; color: #dfe6e2; border-color: #45534e; background: #202d29; font-size: 8px; }
.attachment-field small { color: #829089; font-size: 8px; }
.draft-rule { margin: 16px 0; padding: 12px; color: var(--wh-ink); border-left: 4px solid var(--wh-green); background: #edf5df; }
.draft-rule strong { font-size: 10px; }
.draft-rule p { margin: 5px 0 0; font-size: 8px; line-height: 1.55; }
.order-summary .primary-action { width: 100%; color: var(--wh-ink); border-color: var(--wh-green); background: var(--wh-green); }
.order-summary .primary-action:disabled { opacity: .45; cursor: wait; }
.save-status { min-height: 16px; margin: 10px 0 0; color: #c6d2cc; font-size: 8px; line-height: 1.5; }

.directory-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .65fr); align-items: end; gap: 30px; margin-bottom: 16px; padding: 25px; color: #fff; background: var(--wh-ink); }
.directory-head .eyebrow { color: var(--wh-green); }
.directory-head h2 { color: #fff; font-size: 25px; }
.directory-head p:not(.eyebrow) { max-width: 620px; margin: 8px 0 0; color: #aebbb5; font-size: 10px; line-height: 1.65; }
.compact-search label > span { color: #c6d0cb; }
.compact-search input { border-color: #45534e; background: #fff; }
.compact-search .secondary-action { color: #fff; border-color: #8d9a94; }
.directory-categories { margin: 0 0 12px; }
.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.directory-card { padding: 17px; border: 1px solid var(--wh-line); background: var(--wh-raised); box-shadow: var(--wh-shadow); }
.directory-card header { display: flex; justify-content: space-between; gap: 12px; }
.directory-card h3 { margin: 5px 0 0; font: 700 14px var(--wh-display); }
.directory-card .card-code { color: var(--wh-orange); font: 700 8px monospace; }
.directory-card dl { margin: 14px 0 0; }
.directory-card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e7e1d5; }
.directory-card dt { color: var(--wh-muted); font-size: 8px; }
.directory-card dd { margin: 0; text-align: right; font-size: 9px; font-weight: 700; }
.stock-value { color: var(--wh-blue); font-size: 17px !important; }
.empty-state { grid-column: 1 / -1; margin: 0; padding: 16px; color: var(--wh-muted); border: 1px dashed var(--wh-line); background: rgba(255,255,255,.38); font-size: 9px; line-height: 1.6; }

.confirm-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(11,18,16,.72); backdrop-filter: blur(3px); }
.confirm-layer[hidden] { display: none; }
.confirm-card { width: min(520px, 100%); padding: 28px; border-top: 5px solid var(--wh-orange); background: var(--wh-raised); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.confirm-card h2 { margin: 8px 0 14px; font: 700 22px var(--wh-display); }
.confirm-card > p:not(.eyebrow) { color: var(--wh-muted); font-size: 10px; line-height: 1.65; }
.confirm-card dl { display: grid; gap: 7px; padding: 14px; background: var(--wh-soft); }
.confirm-card dl div { display: flex; justify-content: space-between; gap: 14px; }
.confirm-card dt { color: var(--wh-muted); font-size: 9px; }
.confirm-card dd { margin: 0; font-size: 10px; font-weight: 800; }
#confirm-layer .confirm-card { max-height: calc(100dvh - 40px); overflow-y: auto; }
#confirm-layer .confirm-card dd { min-width: 0; overflow-wrap: anywhere; text-align: right; font-size: 13px; }
#confirm-layer .confirm-card dt { flex-shrink: 0; font-size: 12px; }
.confirm-card .order-confirm-lines { border-left: 3px solid var(--wh-orange); }
.confirm-card > div:last-child { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.portal-toast { position: fixed; right: 24px; bottom: 24px; z-index: 120; max-width: 360px; padding: 13px 16px; color: #fff; background: var(--wh-ink); box-shadow: 0 12px 35px rgba(0,0,0,.22); font-size: 10px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .18s ease; }
.portal-toast.is-visible { opacity: 1; transform: translateY(0); }
.mobile-nav { display: none; }
.primary-nav [hidden], .mobile-nav [hidden], .portal-view[hidden] { display: none !important; }

.user-block small { display: block; margin-top: 3px; color: var(--wh-orange); font-size: 8px; font-weight: 800; }
.metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-grid article:nth-child(4) { border-right: 1px solid var(--wh-line); }
.role-template-strip { margin-top: 14px; }
.role-template-strip > header, .old-material-form-panel > header, .old-material-list-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.role-template-strip > header button { padding: 0 0 3px; color: var(--wh-orange); border: 0; border-bottom: 1px solid; background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.template-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.template-card { position: relative; min-height: 178px; padding: 18px; border: 1px solid var(--wh-line); background: var(--wh-raised); }
.template-card.is-live { border-top: 4px solid var(--wh-green); }
.template-card.is-planned { border-top: 4px solid #c8c1b4; background: #f3efe6; }
.template-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.template-card header span, .template-card header b { font-size: 8px; }
.template-card header span { color: var(--wh-muted); }
.template-card header b { color: var(--wh-green-dark); }
.template-card.is-planned header b { color: var(--wh-muted); }
.template-card h3 { margin: 18px 0 7px; font: 700 16px var(--wh-display); }
.template-card p { margin: 0; color: var(--wh-muted); font-size: 9px; line-height: 1.65; }
.template-card button { position: absolute; right: 18px; bottom: 16px; padding: 0 0 3px; color: var(--wh-orange); border: 0; border-bottom: 1px solid; background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.template-pending { position: absolute; right: 18px; bottom: 16px; color: var(--wh-muted); font-size: 8px; }
.role-summary { padding: 15px 18px; border-left: 4px solid var(--wh-green); background: #fff; }
.role-summary span, .role-summary strong, .role-summary small { display: block; }
.role-summary span, .role-summary small { color: var(--wh-muted); font-size: 8px; }
.role-summary strong { margin: 5px 0; font-size: 15px; }

.old-material-order-section { border-top: 4px solid var(--wh-orange); }
.old-material-picker-grid { display: grid; grid-template-columns: 1.1fr .65fr 1.3fr auto; align-items: end; gap: 9px; }
.old-material-results, .old-material-directory { display: grid; gap: 9px; margin-top: 12px; }
.old-material-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.old-material-card { padding: 15px; border: 1px solid var(--wh-line); background: var(--wh-soft); }
.old-material-card header { display: flex; justify-content: space-between; gap: 12px; }
.old-material-card h3 { margin: 3px 0 0; font: 700 14px var(--wh-display); }
.old-material-card header > span { align-self: start; padding: 4px 7px; color: var(--wh-green-dark); border: 1px solid #b7c9a0; background: #eef5e3; font-size: 8px; font-weight: 800; }
.old-material-card dl { margin: 12px 0 0; }
.old-material-card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #e4ded2; }
.old-material-card dt { color: var(--wh-muted); font-size: 8px; }
.old-material-card dd { max-width: 68%; margin: 0; text-align: right; font-size: 8px; font-weight: 700; line-height: 1.45; }
.old-material-card > button { width: 100%; min-height: 35px; margin-top: 12px; color: #fff; border: 1px solid var(--wh-ink); background: var(--wh-ink); cursor: pointer; font-size: 9px; font-weight: 800; }
.selected-allocations { display: grid; gap: 7px; margin-top: 12px; }
.allocation-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; color: #fff; background: var(--wh-ink); }
.allocation-chip strong, .allocation-chip span { display: block; }
.allocation-chip strong { font-size: 9px; }
.allocation-chip span { margin-top: 4px; color: #b8c4be; font-size: 8px; }
.allocation-chip button { color: #fff; border: 0; border-bottom: 1px solid var(--wh-orange); background: transparent; cursor: pointer; font-size: 8px; }

.old-material-layout { display: grid; grid-template-columns: minmax(430px, .85fr) minmax(0, 1.15fr); gap: 14px; }
.old-material-form-panel, .old-material-list-panel { align-self: start; }
.old-material-form label > small { display: block; margin-top: 5px; color: var(--wh-green-dark); font-size: 8px; font-weight: 800; }
.old-source-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 13px; border: 1px dashed #aaa391; background: #f5f1e7; }
.old-source-fields[hidden] { display: none; }
.old-source-fields > small, .old-source-fields > .form-note { grid-column: 1 / -1; margin: 0; color: var(--wh-muted); font-size: 12px; line-height: 1.6; }
.inline-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.draft-badge { padding: 5px 8px; color: var(--wh-orange); border: 1px solid var(--wh-orange); font-size: 8px; font-weight: 800; }
.old-material-form .save-status { color: var(--wh-muted); }

@media (max-width: 1180px) {
  .weihu-rail { width: 220px; }
  .weihu-main { margin-left: 220px; padding-inline: 24px; }
  .order-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .order-line { grid-template-columns: 1fr 82px 90px 1fr 34px; }
  .order-line label:nth-of-type(4) { grid-column: 1 / -2; }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  body { background: var(--wh-paper); }
  .weihu-rail { display: none; }
  .weihu-main { margin-left: 0; padding: 18px 14px 90px; }
  .weihu-header { gap: 10px; }
  .weihu-header h1 { font-size: 24px; }
  .weihu-header > div > p:last-child { display: none; }
  .user-block { min-width: 105px; }
  .test-warning { grid-template-columns: 1fr; gap: 4px; }
  .action-hero { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .hero-action { min-height: 105px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid article:nth-child(2) { border-right: 0; }
  .metric-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--wh-line); }
  .home-grid, .order-layout, .directory-head, .old-material-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; order: -1; }
  .search-results, .product-results, .directory-grid, .template-grid, .template-grid.compact, .old-material-results { grid-template-columns: 1fr; }
  .old-material-picker-grid { grid-template-columns: 1fr 1fr; }
  .order-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-line .line-product { grid-column: 1 / -1; }
  .order-line label:nth-of-type(4) { grid-column: auto; }
  .remove-line { grid-column: 2; justify-self: end; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #34433e; background: var(--wh-ink); }
  .mobile-nav button, .mobile-nav a { display: grid; justify-items: center; gap: 3px; min-height: 60px; padding: 8px 4px; color: #87958f; text-decoration: none; border: 0; border-right: 1px solid #34433e; background: transparent; cursor: pointer; font-size: 8px; }
  .mobile-nav button:last-child, .mobile-nav a:last-child { border-right: 0; }
  .mobile-nav b { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #4c5c56; font-size: 9px; }
  .mobile-nav button.is-active, .mobile-nav a.is-active { color: #fff; box-shadow: inset 0 3px 0 var(--wh-green); }
  .mobile-nav button.is-active b, .mobile-nav a.is-active b { color: var(--wh-green); border-color: var(--wh-green); }
  .portal-toast { right: 12px; bottom: 76px; left: 12px; }
}

@media (max-width: 520px) {
  .weihu-main { padding-inline: 10px; }
  .weihu-header { align-items: center; }
  .weihu-header .eyebrow { font-size: 7px; }
  .weihu-header h1 { font-size: 20px; }
  .user-block span { display: none; }
  .action-hero h2 { font-size: 24px; }
  .metric-grid article { min-height: 96px; padding: 14px; }
  .panel, .form-section { padding: 16px; }
  .search-row { grid-template-columns: 1fr; }
  .search-row button { width: 100%; }
  .field-grid { grid-template-columns: 1fr; }
  .old-source-fields { grid-template-columns: 1fr; }
  .old-material-picker-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .order-line { grid-template-columns: 1fr; }
  .order-line .line-product, .order-line label:nth-of-type(4), .remove-line { grid-column: auto; }
  .remove-line { justify-self: stretch; width: 100%; }
  .category-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .category-tabs button { padding-inline: 5px; }
  .directory-head { padding: 20px 16px; }
  .confirm-card { padding: 21px; }
  .confirm-card > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
}

/* 0.5.0 — employee shell aligned to the confirmed prototype */
:root {
  --ink: var(--wh-ink);
  --ink-soft: var(--wh-ink-2);
  --paper: var(--wh-paper);
  --paper-raised: var(--wh-raised);
  --line: var(--wh-line);
  --safety-orange: var(--wh-orange);
  --signal-green: var(--wh-green);
  --steel-blue: var(--wh-blue);
  --warning: #d9a429;
  --danger: var(--wh-danger);
  --display-font: "STZhongsong", "Songti SC", "Microsoft YaHei UI", serif;
}

body {
  min-width: 320px;
  background:
    linear-gradient(rgb(23 33 31 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 33 31 / 3%) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
}

.demo-ribbon { position: fixed; inset: 0 0 auto; z-index: 80; height: 34px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; color: #fffaf0; background: var(--ink); font-size: 10px; letter-spacing: .05em; }
.demo-ribbon__signal { width: 8px; height: 8px; border-radius: 50%; background: var(--signal-green); box-shadow: 0 0 0 4px rgb(168 212 91 / 18%); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(560px, 1fr) 330px; padding-top: 34px; }

.rail { position: sticky; top: 34px; z-index: 40; height: calc(100vh - 34px); display: flex; flex-direction: column; padding: 28px 22px 20px; color: #f8f3e8; background: var(--ink); overflow-y: auto; }
.brand { display: grid; gap: 10px; color: inherit !important; text-decoration: none !important; }
.brand__logo { display: block; width: min(100%, 202px); height: auto; }
.brand__symbol { display: none; width: 50px; height: 50px; object-fit: contain; }
.brand h1 { margin: 2px 0 0; color: #fff; font: 600 20px/1.1 var(--display-font); letter-spacing: .05em; }
.rail .eyebrow { color: #aebbb6; }
.primary-nav { margin-top: 42px; }
.rail-label { margin: 0 0 9px; color: #91a09a; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.rail-label--secondary { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 12%); }
.nav-button { position: relative; width: 100%; display: grid; grid-template-columns: 34px 1fr; align-items: center; min-height: 40px; padding: 10px; color: #b8c1bd; text-align: left; text-decoration: none; border: 0; background: transparent; cursor: pointer; font-size: 11px; }
.nav-button::after { content: ""; position: absolute; inset: 7px auto 7px 0; width: 3px; background: transparent; }
.nav-button:hover, .nav-button.is-active { color: #fff; background: rgb(255 255 255 / 6%); }
.nav-button.is-active::after { background: var(--safety-orange); }
.nav-button span { color: #71817a; font: 700 9px/1 monospace; }
.rail-user { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 11px; color: #e8eee9; text-align: left; border: 1px solid rgb(255 255 255 / 14%); background: rgb(255 255 255 / 5%); cursor: pointer; }
.rail-user:hover { border-color: var(--safety-orange); }
.rail-user__avatar { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink); background: var(--signal-green); font-weight: 800; }
.rail-user strong, .rail-user small { display: block; }
.rail-user strong { font-size: 10px; }
.rail-user small { margin-top: 3px; color: #95a29d; font-size: 8px; }
.rail-user small i { color: var(--signal-green); font-style: normal; }
.rail-note { margin-top: 14px; padding: 14px 0 0; border-top: 1px solid rgb(255 255 255 / 14%); }
.rail-note__index { color: var(--safety-orange); font-size: 9px; letter-spacing: .12em; }
.rail-note p { margin: 8px 0 0; color: #aab5b0; font-size: 9px; line-height: 1.65; }
.admin-link { margin-top: 11px; color: #91a09a !important; font-size: 8px; text-decoration: none !important; }

.workspace { min-width: 0; padding: 34px clamp(24px, 3vw, 52px) 70px; }
.workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.workspace-header h2 { margin: 7px 0 4px; font: 600 clamp(30px, 3vw, 46px)/1.05 var(--display-font); letter-spacing: .04em; }
.workspace-header__subtitle { margin: 0; color: #66716d; font-size: 11px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions time { color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.account-link { background: var(--paper-raised); }
.outline-button, .primary-button { display: inline-grid; min-height: 40px; align-items: center; padding: 0 16px; color: var(--ink); border: 1px solid var(--ink); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; text-decoration: none !important; }
.primary-button { color: #fff; background: var(--ink); }
.outline-button:hover { color: #fff; background: var(--ink); }
.primary-button:hover { background: #2d3b37; }
.portal-loading, .portal-error { margin-top: 18px; }
.portal-view { display: none; padding-top: 26px; }
.portal-view.is-active { display: block; animation: wh-enter .18s ease-out; }

.operations-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(230px, .8fr) auto; align-items: center; gap: 22px; padding: 28px; color: #eef2e7; background: linear-gradient(115deg, rgb(240 100 43 / 15%), transparent 45%), var(--ink); box-shadow: var(--wh-shadow); }
.operations-hero h3 { margin: 9px 0 7px; font: 600 25px/1.2 var(--display-font); }
.operations-hero p { margin: 0; color: #b3c0ba; font-size: 10px; line-height: 1.6; }
.operations-hero .primary-button { color: var(--ink); border-color: var(--signal-green); background: var(--signal-green); white-space: nowrap; }
.hero-linkage { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; padding-left: 18px; border-left: 1px solid rgb(255 255 255 / 18%); }
.hero-linkage span { color: #95a39d; font-size: 8px; }
.hero-linkage strong { color: #fff; font-size: 11px; }
.hero-linkage i { display: none; }
.status-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: var(--wh-shadow); }
.status-metric { position: relative; min-height: 108px; padding: 20px; border-right: 1px solid var(--line); }
.status-metric:last-child { border-right: 0; }
.status-metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--metric-color, var(--steel-blue)); }
.status-metric span { color: #68736e; font-size: 9px; }
.status-metric strong { display: block; margin-top: 13px; font: 600 31px/1 var(--display-font); }
.status-metric small { display: block; margin-top: 8px; color: #7a837f; font-size: 8px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 32px 0 14px; }
.section-heading h3 { margin: 0; font: 600 20px/1.2 var(--display-font); }
.section-heading p { margin: 0; color: #6c7772; font-size: 9px; }
.section-heading__rule { flex: 1; height: 1px; background: var(--line); }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.task-card { position: relative; min-height: 150px; padding: 20px; overflow: hidden; border: 1px solid var(--line); background: rgb(255 253 247 / 86%); }
.task-card::after { content: attr(data-index); position: absolute; right: 12px; bottom: -12px; color: rgb(23 33 31 / 4%); font: 700 78px/1 monospace; }
.task-card.is-alert { border-color: rgb(185 75 60 / 45%); }
.task-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-card h4 { margin: 18px 0 7px; font: 600 18px var(--display-font); }
.task-card p { position: relative; z-index: 1; margin: 0; color: #67716d; font-size: 10px; line-height: 1.6; }
.task-card button { position: relative; z-index: 2; margin-top: 18px; padding: 0; color: var(--ink); border: 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; font-size: 9px; }
.state-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; color: var(--ink); border: 1px solid var(--line); background: var(--paper); font-size: 8px; }
.state-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--steel-blue); }
.state-chip.is-danger::before { background: var(--danger); }
.state-chip.is-warning::before { background: var(--warning); }
.state-chip.is-success::before { background: var(--signal-green); }
.flow-board { display: grid; grid-template-columns: repeat(7, minmax(108px, 1fr)); border: 1px solid var(--line); background: var(--paper-raised); overflow-x: auto; }
.flow-step { min-height: 128px; padding: 16px; color: var(--ink); text-align: left; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; }
.flow-step:last-child { border-right: 0; }
.flow-step span { display: block; color: #87908c; font: 700 9px monospace; }
.flow-step strong { display: block; margin: 23px 0 7px; font: 600 14px var(--display-font); }
.flow-step small { color: #707a75; font-size: 8px; }
.flow-step:hover { background: #f3efe5; }
.flow-step.is-current { background: #edf0da; box-shadow: inset 0 -4px 0 var(--signal-green); }
.fulfillment-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--paper-raised); box-shadow: var(--wh-shadow); }
.fulfillment-route { min-height: 210px; padding: 20px; border-right: 1px solid var(--line); }
.fulfillment-route:last-child { border-right: 0; }
.fulfillment-route header span, .fulfillment-route header strong { display: block; }
.fulfillment-route header span { color: var(--safety-orange); font: 700 11px monospace; }
.fulfillment-route header strong { margin-top: 8px; font: 700 17px var(--display-font); }
.fulfillment-route ol { margin: 18px 0; padding-left: 20px; color: var(--wh-muted); font-size: 13px; line-height: 1.8; }
.fulfillment-route button, .fulfillment-route a { padding: 0 0 3px; color: var(--ink); border: 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; text-decoration: none; }
.quick-actions { display: grid; grid-template-columns: repeat(6, minmax(105px, 1fr)); border: 1px solid var(--line); background: var(--paper-raised); box-shadow: var(--wh-shadow); }
.quick-actions button { min-height: 132px; padding: 18px; color: var(--ink); text-align: left; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; transition: .18s ease; }
.quick-actions button:last-child { border-right: 0; }
.quick-actions button:hover { color: #fff; background: var(--ink); transform: translateY(-3px); }
.quick-actions span, .quick-actions strong, .quick-actions small { display: block; }
.quick-actions span { color: var(--safety-orange); font: 800 9px monospace; }
.quick-actions strong { margin-top: 21px; font: 600 14px var(--display-font); }
.quick-actions small { margin-top: 8px; color: #7a837f; font-size: 8px; line-height: 1.5; }
.quick-actions button:hover small { color: #aebbb5; }
.acceptance-entry { display: grid; grid-template-columns: 130px 230px minmax(0,1fr) auto; align-items: center; gap: 18px; margin-top: 14px; padding: 17px 20px; color: #eef4f1 !important; border-left: 5px solid var(--signal-green); background: var(--ink); text-decoration: none !important; box-shadow: var(--wh-shadow); }
.acceptance-entry span { color: var(--signal-green); font: 800 10px monospace; letter-spacing: .08em; }
.acceptance-entry strong { font: 700 16px var(--display-font); }
.acceptance-entry small { color: #aebbb5; line-height: 1.55; }
.acceptance-entry b { white-space: nowrap; }

.inbox-panel { position: sticky; top: 34px; height: calc(100vh - 34px); padding: 30px 24px; border-left: 1px solid var(--line); background: #e6e0d3; overflow-y: auto; }
.inbox-panel__head { display: flex; justify-content: space-between; gap: 12px; }
.inbox-panel h2 { margin: 6px 0 0; font: 600 23px var(--display-font); }
.count-badge { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: var(--safety-orange); font-weight: 800; }
.inbox-panel__intro { margin: 18px 0 22px; color: #65706b; font-size: 10px; line-height: 1.7; }
.inbox-list { display: grid; gap: 9px; }
.inbox-item { position: relative; width: 100%; padding: 16px; color: var(--ink); text-align: left; border: 1px solid #c9c1b2; background: rgb(255 253 247 / 68%); cursor: pointer; }
.inbox-item:hover { transform: translateX(-3px); border-color: var(--ink); }
.inbox-item.is-urgent::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--danger); }
.inbox-item__time, .inbox-item strong, .inbox-item small { display: block; }
.inbox-item__time { color: #858c88; font-size: 8px; }
.inbox-item strong { margin-top: 10px; font: 600 13px/1.4 var(--display-font); }
.inbox-item small { margin-top: 6px; color: #707975; font-size: 8px; line-height: 1.5; }
.text-button { margin-top: 20px; padding: 0 0 3px; color: var(--ink); border: 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; font-size: 9px; }

.sales-entry-head, .scan-intake { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 14px; padding: 24px; color: #eef2e7; background: var(--ink); }
.sales-entry-head h3, .scan-intake h3 { margin: 7px 0; font: 600 25px var(--display-font); }
.sales-entry-head p:not(.eyebrow), .scan-intake p:not(.eyebrow) { margin: 0; color: #acb8b2; font-size: 10px; }
.sales-entry-head .primary-button { color: var(--ink); border-color: var(--signal-green); background: var(--signal-green); }
.sales-tabs, .inventory-tabs { display: flex; gap: 0; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.sales-tabs button, .inventory-tabs button { padding: 11px 18px; color: #6e7873; border: 0; border-bottom: 3px solid transparent; background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.sales-tabs button.is-active, .inventory-tabs button.is-active { color: var(--ink); border-bottom-color: var(--safety-orange); }
.sales-subview, .inventory-subview { display: none; }
.sales-subview.is-active, .inventory-subview.is-active { display: block; }
.recent-orders { display: grid; gap: 8px; }
.recent-order { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 16px; border: 1px solid var(--line); background: var(--paper-raised); }
.recent-order strong, .recent-order span, .recent-order small { display: block; }
.recent-order span { margin-top: 5px; color: var(--wh-muted); font-size: 9px; }
.recent-order small { color: var(--wh-muted); text-align: right; font-size: 9px; }
.order-result { display: flex; align-items: center; gap: 12px; width: 100%; color: inherit; text-align: left; }
.order-result:hover { border-color: var(--safety-orange); }
.order-result__open { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; flex: 1; padding: 0; color: inherit; text-align: left; border: 0; background: transparent; cursor: pointer; }
.order-select { display: grid; justify-items: center; gap: 3px; color: var(--wh-muted); font-size: 8px; cursor: pointer; }
.order-select input { width: 16px; height: 16px; accent-color: var(--safety-orange); }
.order-batch-toolbar { display: grid; grid-template-columns: auto minmax(260px, 1fr) auto; gap: 14px; align-items: end; margin-bottom: 10px; padding: 14px 16px; border: 1px solid #d6c7b1; background: #fff4e6; }
.order-batch-toolbar[hidden] { display: none; }
.order-batch-toolbar label { display: grid; gap: 5px; color: var(--wh-muted); font-size: 9px; }
.order-batch-toolbar input { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); background: var(--paper-raised); }
.danger-action { min-height: 38px; padding: 8px 14px; color: #fff; border: 1px solid #9d3424; background: #9d3424; cursor: pointer; font-size: 9px; font-weight: 800; }
.danger-action:disabled { opacity: .5; cursor: wait; }
.order-detail { margin-top: 18px; padding: 22px; border: 1px solid var(--ink); background: var(--paper-raised); box-shadow: var(--wh-shadow); }
.order-detail > header { display: flex; justify-content: space-between; gap: 16px; align-items: start; border-bottom: 1px solid var(--line); }
.order-detail h3 { margin: 5px 0 16px; font: 600 22px var(--display-font); }
.order-detail label { display: grid; gap: 7px; margin-top: 16px; color: var(--wh-muted); font-size: 9px; font-weight: 700; }
.order-detail textarea { padding: 11px; border: 1px solid var(--line); background: var(--paper); }
.order-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sales-order-workbench { display: grid; grid-template-columns: 1fr; height: auto; min-height: 0; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: var(--wh-shadow); }
.sales-order-list-pane, .sales-order-detail-pane { min-width: 0; min-height: 0; }
.sales-order-list-pane { display: grid; grid-template-rows: auto auto minmax(0, 1fr); border-right: 1px solid var(--line); background: #f4f0e7; }
.sales-order-directory-head { display: grid; gap: 13px; margin: 0; padding: 18px; border-bottom: 1px solid var(--line); }
.sales-order-directory-head h2 { margin: 4px 0; font: 650 22px var(--display-font); }
.sales-order-directory-head p { margin: 0; color: var(--wh-muted); font-size: 12px; }
.sales-order-directory-head .compact-search { grid-template-columns: minmax(0, 1fr) minmax(112px, .45fr) auto; }
.sales-order-list-pane .order-batch-toolbar { grid-template-columns: 1fr; margin: 0; padding: 12px 14px; border-width: 0 0 1px; }
.sales-order-list-pane .recent-orders { align-content: start; gap: 0; min-height: 0; overflow: visible; }
.sales-order-list-pane .recent-order { padding: 14px 15px; border: 0; border-bottom: 1px solid var(--line); background: transparent; box-shadow: inset 4px 0 transparent; }
.sales-order-list-pane .recent-order:hover { background: #fffaf0; }
.sales-order-list-pane .recent-order.is-selected { background: #fff; box-shadow: inset 4px 0 var(--safety-orange); }
.order-result__open strong { font-size: 14px; line-height: 1.35; }
.order-result__open span { font-size: 11px; line-height: 1.5; }
.order-result__open small { min-width: 88px; font-size: 10px; line-height: 1.5; }
.order-list-action { margin-top: 7px; color: #3c6258; font-size: 11px; font-weight: 750; }
.sales-order-detail-pane { position: relative; background: #fffdf8; overflow: hidden; }
.order-detail-empty { height: 100%; display: grid; place-content: center; justify-items: center; padding: 40px; text-align: center; color: var(--wh-muted); }
.order-detail-empty > span { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: var(--ink); font: 800 12px var(--mono); }
.order-detail-empty strong { margin-top: 18px; color: var(--ink); font: 650 24px var(--display-font); }
.order-detail-empty p { max-width: 380px; margin: 8px 0 0; line-height: 1.7; }
.sales-order-detail-pane .order-detail { height: auto; display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; box-shadow: none; overflow: visible; }
.sales-order-detail-pane .order-detail[hidden] { display: none; }
.order-detail__sticky-head { flex: 0 0 auto; padding: 17px 20px 13px; background: #fffdf8; }
.order-detail__sticky-head h3 { margin: 3px 0 5px; font-size: 21px; }
.order-detail__sticky-head p:last-child { margin: 0; color: var(--wh-muted); font-size: 11px; }
.order-mobile-back { display: none; padding: 0; color: var(--ink); border: 0; background: transparent; font-weight: 800; }
.order-next-step { display: grid; grid-template-columns: minmax(150px, .42fr) minmax(0, 1fr); border-bottom: 1px solid #26332f; color: #eef3f0; background: var(--ink); }
.order-next-step > div { display: grid; gap: 5px; padding: 14px 18px; border-right: 1px solid #43514c; }
.order-next-step > div:last-child { border-right: 0; }
.order-next-step span { color: #a9b7b1; font-size: 10px; font-weight: 800; }
.order-next-step strong { font-size: 14px; line-height: 1.4; }
.order-blocker-panel { flex: 0 0 auto; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fff8ec; }
.order-blocker-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-blocker-panel h4 { margin: 0; font-size: 13px; }
.order-blocker-panel header span { min-width: 24px; height: 24px; display: grid; place-items: center; color: #fff; background: var(--safety-orange); font-size: 10px; font-weight: 850; }
.order-blocker-panel.is-clear { background: #edf4e8; }
.order-blocker-panel.is-clear header span { background: #47745f; }
.order-blocker-panel .empty-state { margin: 7px 0 0; padding: 0; font-size: 11px; }
.order-blocker-item { margin: 7px 0 0; padding-left: 13px; color: #873d2c; font-size: 11px; line-height: 1.5; }
.order-detail-tabs { flex: 0 0 auto; display: flex; border-bottom: 1px solid var(--line); background: #f5f1e8; }
.order-detail-tabs button { padding: 11px 17px; color: var(--wh-muted); border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.order-detail-tabs button.is-active { color: var(--ink); background: #fffdf8; box-shadow: inset 0 -3px var(--safety-orange); }
.order-detail-panel { display: none; min-height: 0; padding: 18px 20px 24px; overflow: visible; }
.order-detail-panel.is-active { display: block; flex: 1 1 auto; }
.order-detail-panel dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); }
.order-detail-panel dl > div { min-width: 0; padding: 11px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.order-detail-panel dl > div:nth-child(3n) { border-right: 0; }
.order-detail-panel dt { color: var(--wh-muted); font-size: 10px; font-weight: 800; }
.order-detail-panel dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.order-section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.order-section-title h4 { margin: 3px 0 0; font-size: 17px; }
.order-section-title > span { color: var(--wh-muted); font-size: 10px; }
.order-line-progress { display: grid; gap: 9px; margin-top: 10px; }
.order-line-progress-card { padding: 14px; border: 1px solid var(--line); background: #fff; }
.order-line-progress-card > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.order-line-progress-card h5 { margin: 0; font-size: 14px; }
.order-line-progress-card header span { padding: 5px 8px; color: #fff; background: #42665c; font-size: 9px; font-weight: 800; }
.order-line-progress-card__meta { margin: 5px 0 0; color: var(--wh-muted); font-size: 11px; }
.order-line-progress-card__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); }
.order-line-progress-card__facts div { min-width: 0; }
.order-line-progress-card__facts span, .order-line-progress-card__facts strong { display: block; }
.order-line-progress-card__facts span { color: var(--wh-muted); font-size: 9px; }
.order-line-progress-card__facts strong { margin-top: 3px; overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; }
.order-line-next { margin: 10px 0 0; padding: 8px 10px; border-left: 3px solid var(--safety-orange); background: #fff6e7; font-size: 11px; line-height: 1.5; }
.order-detail-footer { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 12px 18px; border-top: 1px solid var(--line); background: #f1ede4; }
.order-detail-footer label { margin: 0; }
.order-detail-footer textarea { min-height: 42px; max-height: 72px; resize: vertical; }
.order-detail-footer .order-detail-actions { margin: 0; }
.audit-panel { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.audit-panel h4 { margin: 0 0 10px; }
.audit-panel p { display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 9px; }
.audit-panel span { color: var(--wh-muted); }
.credit-release-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr) auto; gap: 16px; align-items: end; padding: 18px; border: 1px solid var(--line); background: var(--paper-raised); }
.credit-release-card strong, .credit-release-card span { display: block; }
.credit-release-card span, .credit-release-card p { color: var(--wh-muted); font-size: 9px; }
.credit-release-card label { display: grid; gap: 6px; color: var(--wh-muted); font-size: 8px; }
.credit-release-card textarea { padding: 9px; border: 1px solid var(--line); background: var(--paper); }
.credit-release-card > div:last-child { display: flex; gap: 7px; }
.planned-shell { padding: 28px; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: var(--wh-shadow); }
.planned-shell__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.planned-shell h3 { margin: 8px 0; font: 600 28px var(--display-font); }
.planned-shell p { margin: 0; color: var(--wh-muted); font-size: 10px; line-height: 1.7; }
.planned-badge { align-self: center; padding: 8px 10px; color: #6e756f; border: 1px solid var(--line); background: var(--paper); font-size: 8px; font-weight: 800; }
.planned-route { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 22px; border: 1px solid var(--line); }
.planned-route div { min-height: 110px; padding: 17px; border-right: 1px solid var(--line); }
.planned-route div:last-child { border-right: 0; }
.planned-route span, .planned-route strong, .planned-route small { display: block; }
.planned-route span { color: var(--safety-orange); font: 700 9px monospace; }
.planned-route strong { margin-top: 17px; font: 600 14px var(--display-font); }
.planned-route small { margin-top: 6px; color: var(--wh-muted); font-size: 8px; }
.inbox-directory { display: grid; gap: 9px; }
.inbox-controls { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto minmax(180px, .7fr) auto; gap: 10px; align-items: end; margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); background: var(--paper-raised); }
.inbox-controls label, .inbox-match-grid label { display: grid; gap: 6px; color: var(--wh-muted); font-size: 12px; }
.inbox-controls input, .inbox-controls select, .inbox-match-grid input, .inbox-match-grid select, .inbox-disposition input { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); background: #fff; }
.inbox-record { padding: 18px; border: 1px solid var(--line); background: var(--paper-raised); }
.inbox-record > header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.inbox-record > header span, .inbox-record > header strong { display: block; }
.inbox-record > header span, .inbox-record > p { color: var(--wh-muted); font-size: 12px; }
.inbox-record > header strong { margin-top: 5px; font-size: 15px; }
.inbox-target { padding: 9px 10px; border-left: 3px solid var(--steel-blue); background: #eef2f3; }
.inbox-match-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 9px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.inbox-match-grid [data-production-evidence] { grid-column: 1 / -1; min-width: 0; }
.inbox-match-grid [data-production-evidence][hidden] { display: none; }
.inbox-match-grid [data-production-evidence] select { max-width: 100%; width: 100%; min-height: 44px; }
.inbox-match-grid [data-production-evidence] button { min-height: 44px; margin-top: 8px; }
.inbox-record .inbox-target, .inbox-record a, [data-paper-candidate-error] { overflow-wrap: anywhere; }
.inbox-disposition { display: flex; justify-content: flex-end; gap: 9px; margin-top: 10px; }
.inbox-disposition input { min-width: 280px; }
.inbox-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid var(--line); background: var(--paper-raised); }
.inbox-row span, .inbox-row small { color: var(--wh-muted); font-size: 8px; }
.inbox-row strong { font-size: 10px; }
.ai-panel { display: grid; grid-template-columns: minmax(0, 1fr) 220px; min-height: 430px; border: 1px solid var(--line); background: var(--paper-raised); }
.ai-conversation { padding: 28px; }
.ai-conversation h3 { margin: 12px 0 24px; font: 600 28px/1.35 var(--display-font); }
.ai-input { display: grid; gap: 8px; }
.ai-input span { color: var(--wh-muted); font-size: 9px; font-weight: 700; }
.dialog-alert { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0; padding: 14px 16px; color: #fff; background: var(--ink); font-size: 9px; }
.ai-suggestions { padding: 24px; color: #dce2df; background: var(--ink); }
.ai-suggestions button { width: 100%; margin-top: 10px; padding: 10px; color: #dce2df; text-align: left; border: 1px solid rgb(255 255 255 / 18%); background: transparent; cursor: not-allowed; font-size: 9px; }
.portal-bridge-page { border: 1px solid var(--line); background: var(--paper-raised); box-shadow: var(--wh-shadow); }
.portal-bridge-page > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 25px 26px; color: #eef2e7; background: linear-gradient(110deg, rgb(240 100 43 / 15%), transparent 48%), var(--ink); }
.portal-bridge-page > header h3 { margin: 8px 0 7px; font: 600 28px/1.2 var(--display-font); }
.portal-bridge-page > header p:not(.eyebrow) { max-width: 760px; margin: 0; color: #b3c0ba; line-height: 1.7; }
.bridge-state { padding: 8px 10px; color: var(--ink); border: 1px solid var(--signal-green); background: var(--signal-green); font-size: 12px; font-weight: 800; }
.bridge-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bridge-action-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bridge-action-grid > * { position: relative; min-height: 190px; padding: 24px; color: var(--ink); text-align: left; border: 0; border-right: 1px solid var(--line); background: transparent; }
.bridge-action-grid > *:last-child { border-right: 0; }
.bridge-action-grid button { cursor: pointer; }
.bridge-action-grid button:hover { color: #fff; background: var(--ink); }
.bridge-action-grid span, .bridge-action-grid strong, .bridge-action-grid small, .bridge-action-grid b { display: block; }
.bridge-action-grid span { color: var(--safety-orange); font: 800 11px monospace; }
.bridge-action-grid strong { margin: 24px 0 9px; font: 600 18px/1.35 var(--display-font); }
.bridge-action-grid small { color: #6d7772; font-size: 13px; line-height: 1.7; }
.bridge-action-grid button:hover small { color: #aebbb5; }
.bridge-action-grid b { margin-top: 15px; color: #877f73; font-size: 12px; }
.event-dialog { width: min(620px, calc(100vw - 36px)); padding: 0; color: var(--ink); border: 1px solid var(--ink); background: var(--paper-raised); }
.event-dialog::backdrop { background: rgb(18 26 24 / 62%); }
.event-dialog form { padding: 26px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; }
.dialog-head h2 { margin: 6px 0 0; font: 600 24px var(--display-font); }
.dialog-close { width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.dialog-lead, .form-note { color: var(--wh-muted); font-size: 10px; line-height: 1.7; }
.login-facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 20px 0; padding: 18px; background: var(--paper); }
.login-facts span { color: var(--wh-muted); font-size: 9px; }
.login-facts strong { font-size: 10px; }

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 238px minmax(0, 1fr); }
  .inbox-panel { display: none; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .quick-actions button:nth-child(3) { border-right: 0; }
  .quick-actions button:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .acceptance-entry { grid-template-columns: 120px 1fr auto; }
  .acceptance-entry small { grid-column: 2 / -1; }
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .rail { padding: 22px 12px; }
  .brand > div:last-child, .rail-label, .rail-user, .rail-note, .admin-link { display: none; }
  .brand { justify-items: center; }
  .brand__logo { display: none; }
  .brand__symbol { display: block; }
  .primary-nav { margin-top: 26px; }
  .nav-button { grid-template-columns: 1fr; place-items: center; font-size: 0; }
  .nav-button span { font-size: 10px; }
  .operations-hero { grid-template-columns: 1fr; }
  .hero-linkage { padding: 12px 0 0; border-top: 1px solid rgb(255 255 255 / 18%); border-left: 0; }
  .order-layout, .old-material-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; order: -1; }
}

@media (max-width: 760px) {
  .demo-ribbon { height: 30px; padding: 0 8px; font-size: 8px; text-align: center; }
  .app-shell { display: block; padding-top: 30px; }
  .rail { position: static; width: 100%; height: auto; display: block; padding: 16px 18px; }
  .brand { grid-template-columns: 142px 1fr; align-items: center; justify-items: start; }
  .brand > div:last-child { display: block; }
  .brand__logo { display: block; width: 142px; }
  .brand__symbol { display: none; }
  .brand h1 { font-size: 19px; }
  .primary-nav, .rail-user, .rail-note, .admin-link { display: none; }
  .workspace { padding: 22px 14px 86px; }
  .workspace-header { align-items: flex-start; }
  .workspace-header h2 { font-size: 30px; }
  .workspace-header__subtitle, .header-actions time, .logout-link { display: none; }
  .header-actions .account-link { min-height: 36px; padding: 0 12px; font-size: 12px; }
  .operations-hero { padding: 20px; }
  .status-strip { grid-template-columns: repeat(2, 1fr); }
  .status-metric:nth-child(2) { border-right: 0; }
  .status-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .task-grid, .directory-grid, .search-results, .product-results, .old-material-results { grid-template-columns: 1fr; }
  .flow-board { grid-template-columns: repeat(7, 130px); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .quick-actions button { min-height: 118px; border-bottom: 1px solid var(--line); }
  .quick-actions button:nth-child(2n) { border-right: 0; }
  .quick-actions button:nth-child(3) { border-right: 1px solid var(--line); }
  .sales-entry-head, .scan-intake, .directory-head { grid-template-columns: 1fr; display: grid; }
  .planned-route { grid-template-columns: repeat(2, 1fr); }
  .planned-route div:nth-child(2) { border-right: 0; }
  .planned-route div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .ai-panel { grid-template-columns: 1fr; }
  .credit-release-card { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 90; height: 64px; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid #35423e; background: var(--ink); }
  .mobile-nav button, .mobile-nav a { display: grid; place-items: center; align-content: center; gap: 2px; color: #96a39e; text-decoration: none; border: 0; background: transparent; font-size: 8px; }
  .mobile-nav button span, .mobile-nav a span { font: 600 15px var(--display-font); }
  .mobile-nav button.is-active, .mobile-nav a.is-active { color: #fff; box-shadow: inset 0 3px 0 var(--safety-orange); }
}

.work-queue { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--raised); }
.work-queue > .empty-state { grid-column: 1 / -1; margin: 0; padding: 28px; }
.work-queue__item { display: grid; align-content: start; gap: 9px; min-height: 230px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work-queue__item:nth-child(3n) { border-right: 0; }
.work-queue__item header, .work-queue__item footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.work-queue__item header b { color: var(--safety-orange); font: 800 11px/1 var(--mono); }
.work-queue__item h4 { margin: 4px 0 0; font: 700 20px/1.25 var(--display); }
.work-queue__item p { margin: 0; color: var(--muted); line-height: 1.65; }
.work-queue__item small { color: var(--muted); }
.work-queue__item footer { align-self: end; margin-top: auto; padding-top: 8px; }
.work-queue__item footer > a { color: var(--ink); font-size: 12px; font-weight: 800; }
.work-queue__complete { display: flex; min-width: 0; }
.work-queue__complete input { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-right: 0; background: #fff; }
.work-queue__complete button { white-space: nowrap; }
.work-queue__owner { color: var(--muted); font-size: 12px; }
.work-overview { margin: 0 0 18px; padding: 20px; border: 1px solid var(--line); background: var(--raised); }
.work-overview__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.work-overview__head h3 { margin: 4px 0 5px; font: 700 21px/1.2 var(--display); }
.work-overview__head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.work-overview__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.work-overview__filters button { padding: 9px 13px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); cursor: pointer; }
.work-overview__filters button.is-active { color: var(--paper); border-color: var(--ink); background: var(--ink); }
.work-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.work-summary-card { display: grid; align-content: start; gap: 7px; min-height: 118px; padding: 14px; text-align: left; border: 1px solid var(--line); border-top: 3px solid var(--signal-green); color: var(--ink); background: var(--paper); cursor: pointer; }
.work-summary-card.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.work-summary-card span { color: var(--muted); font-size: 11px; }
.work-summary-card strong { font: 800 30px/1 var(--mono); }
.work-summary-card small { color: var(--muted); line-height: 1.45; }
.work-role-breakdown { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--muted); }
.work-role-breakdown small { flex-basis: 100%; }
.work-role-breakdown span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--line); background: var(--paper); }
.work-role-breakdown strong { color: var(--ink); font-family: var(--mono); }

@media (max-width: 1050px) {
  .work-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-queue__item:nth-child(3n) { border-right: 1px solid var(--line); }
  .work-queue__item:nth-child(2n) { border-right: 0; }
}

@media (max-width: 1180px) {
  .sales-order-workbench { grid-template-columns: minmax(300px, .72fr) minmax(460px, 1fr); }
  .sales-order-directory-head .compact-search { grid-template-columns: 1fr 1fr; }
  .sales-order-directory-head .compact-search button { grid-column: 1 / -1; }
  .order-detail-footer { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sales-order-workbench { position: relative; display: block; height: calc(100vh - 205px); min-height: 520px; overflow: hidden; }
  .sales-order-list-pane { height: 100%; border-right: 0; }
  .sales-order-detail-pane { position: fixed; inset: 0; z-index: 140; display: none; background: #fffdf8; }
  .sales-order-detail-pane.is-mobile-open { display: block; }
  .sales-order-detail-pane.is-mobile-open .order-detail { padding-bottom: env(safe-area-inset-bottom); }
  .order-mobile-back { display: inline-flex; }
  .order-detail__sticky-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .order-detail__sticky-head > .secondary-action { display: none; }
  .order-next-step { grid-template-columns: 120px minmax(0, 1fr); }
  .order-next-step > div { padding: 12px 14px; }
  .order-detail-panel { padding: 14px; }
  .order-detail-panel dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-detail-panel dl > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .order-detail-panel dl > div:nth-child(2n) { border-right: 0; }
  .order-detail-footer { padding: 10px 12px; }
  .order-detail-footer label { display: none; }
}

@media (max-width: 650px) {
  .work-overview { padding: 14px; }
  .work-overview__head { display: grid; align-items: start; }
  .work-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-queue { grid-template-columns: 1fr; }
  .work-queue__item, .work-queue__item:nth-child(2n), .work-queue__item:nth-child(3n) { border-right: 0; }
  .work-queue__item footer { align-items: stretch; flex-direction: column; }
  .work-queue__complete { width: 100%; }
  .work-queue__complete input { flex: 1; }
}

@media (max-width: 520px) {
  .workspace { padding-inline: 10px; }
  .section-heading p { display: none; }
  .status-metric { min-height: 96px; padding: 14px; }
  .status-metric strong { font-size: 25px; }
  .quick-actions strong { font-size: 13px; }
  .acceptance-entry { grid-template-columns: 1fr; gap: 8px; }
  .acceptance-entry small { grid-column: auto; }
  .sales-tabs, .inventory-tabs { overflow-x: auto; }
  .sales-tabs button, .inventory-tabs button { white-space: nowrap; }
  .planned-shell { padding: 20px 16px; }
  .planned-shell__head { grid-template-columns: 1fr; }
  .planned-route { grid-template-columns: 1fr; }
  .planned-route div { border-right: 0; border-bottom: 1px solid var(--line); }
  .inbox-row { grid-template-columns: 1fr; gap: 5px; }
}

/* 0.7.0 browser-print pilot */
.order-print-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 14px 0; padding: 14px; border: 1px solid var(--line); background: #eef2df; }
.order-print-actions > span { flex: 1 1 260px; color: var(--wh-muted); font-size: 9px; line-height: 1.6; }
.portal-print-dialog { width: min(1220px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; background: var(--paper); box-shadow: 0 22px 80px rgb(0 0 0 / 38%); }
.portal-print-dialog::backdrop { background: rgb(15 23 21 / 76%); backdrop-filter: blur(4px); }
.portal-print-shell { padding: 22px; }
.portal-print-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.portal-print-head h2 { margin: 6px 0 0; font: 600 25px var(--display-font); }
.portal-print-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 13px 15px; color: #e8efec; background: var(--ink); }
.portal-print-toolbar > div { display: flex; align-items: center; gap: 9px; }
.portal-print-toolbar > div:first-child { display: grid; gap: 4px; }
.portal-print-toolbar span { color: #b9c5c0; font-size: 9px; }
.portal-paper-control { display: grid; gap: 5px; min-width: 260px; }
.portal-paper-control[hidden] { display: none; }
.portal-paper-control span { color: #dce6e1; font-size: 11px; font-weight: 800; }
.portal-paper-control select { min-height: 42px; padding: 8px 30px 8px 11px; color: var(--ink); border: 1px solid #fff; background: #fff; font-size: 13px; }
.portal-print-start, .portal-print-confirm { min-height: 44px; padding: 0 17px; border: 1px solid rgb(255 255 255 / 55%); font-size: 12px; font-weight: 850; cursor: pointer; }
.portal-print-start { color: var(--ink); border-color: var(--signal-green); background: var(--signal-green); }
.portal-print-confirm { color: #fff; background: transparent; }
.portal-print-preview { overflow: auto; padding: 22px; background: #d8d4ca; }
.portal-print-paper { min-width: 980px; }
.portal-business-doc { width: 210mm; min-height: 277mm; margin: 0 auto; padding: 12mm; color: #000; background: #fff; border: 1px solid #777; box-sizing: border-box; font: 11.5pt/1.42 "SimSun", "宋体", "Microsoft YaHei", sans-serif; text-rendering: geometricPrecision; }
.portal-print-paper--delivery .portal-business-doc { width: 241mm; min-height: 130mm; }
.portal-business-doc--compact { padding: 7mm; }
.sales-entry-head h2 { color: #fff; }
.sales-order-directory-head { grid-template-columns: minmax(0, 1fr); }
.sales-order-directory-head .compact-search { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }
.sales-order-directory-head .compact-search label { min-width: 0; }
.sales-order-directory-head .compact-search button { grid-column: auto; }
.sales-order-directory-head .order-pagination .secondary-action { color: #fff; border-color: #8d9a94; }
.order-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.order-pagination button:disabled { opacity: .4; cursor: default; }
.portal-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 9px; border-bottom: 2px solid #000; }
.portal-doc-head > div:first-child { flex: 1; text-align: center; }
.portal-doc-head p { margin: 0 0 4px; color: #000; font-size: 13pt; font-weight: 700; letter-spacing: .06em; }
.portal-doc-head h2 { margin: 0; color: #000; font-family: "SimSun", "宋体", serif; font-size: 24pt; font-weight: 700; letter-spacing: .04em; }
.portal-doc-head span { display: block; margin-top: 5px; color: #111; font-size: 10pt; }
.portal-doc-code { display: grid; grid-template-columns: 34px auto; grid-template-rows: auto auto; gap: 0 8px; align-items: center; min-width: 185px; }
.portal-business-qr { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #111; background: #fff; overflow: hidden; }
.portal-business-qr svg { display: block; width: 100%; height: 100%; }
.portal-business-qr span { padding: 2px; font: 700 5px/1.1 Consolas, monospace; overflow-wrap: anywhere; text-align: center; }
.portal-doc-code small { color: #000; font-size: 9.5pt; font-weight: 700; }
.portal-doc-code strong { font-family: Consolas, monospace; font-size: 10pt; }
.portal-doc-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 10px 0; border: 1px solid #777; border-right: 0; border-bottom: 0; }
.portal-doc-meta span { min-height: 38px; padding: 6px 8px; color: #000; border-right: 1px solid #555; border-bottom: 1px solid #555; font-size: 10.5pt; line-height: 1.4; }
.portal-doc-meta b { margin-right: 6px; color: #000; font-size: 10.5pt; font-weight: 700; }
.portal-doc-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.order-line [data-line-amount] { grid-column: 1 / -1; display: block; padding: 6px 0; font-size: 18px; font-weight: 700; color: #172c25; }
.portal-doc-table th, .portal-doc-table td { min-height: 30px; padding: 6px 5px; border: 1px solid #555; text-align: center; vertical-align: middle; overflow-wrap: anywhere; }
.portal-doc-table th { color: #000; background: #fff; font-size: 13pt; font-weight: 700; }
.portal-doc-table td { height: 34px; color: #000; font-size: 12pt; }
.portal-doc-table th:first-child { width: 5%; }
.portal-doc-table th:nth-child(2) { width: 27%; }
.portal-doc-table th:nth-child(3) { width: 15%; }
.portal-doc-table td:nth-child(2) { text-align: left; }
.portal-doc-table--dense th, .portal-doc-table--dense td { padding: 4px 3px; font-size: 9.5pt; }
/* Delivery copies are read on the loading floor: do not shrink all lines to fit. */
.portal-print-paper--delivery .portal-doc-table--dense th,
.portal-print-paper--delivery .portal-doc-table--dense td { height: 9mm; padding: 2mm 1mm; font-size: 12pt; line-height: 1.4; }
.portal-print-paper--delivery .portal-doc-table--dense th { font-size: 13pt; }
.portal-print-paper--delivery .portal-doc-table--dense th:first-child { width: 6%; }
.portal-print-paper--delivery .portal-doc-table--dense th:nth-child(2) { width: 27%; }
.portal-print-paper--delivery .portal-doc-table--dense th:nth-child(3) { width: 15%; }
.portal-print-paper--delivery .portal-doc-table--dense td:nth-child(2),
.portal-print-paper--delivery .portal-doc-table--dense td:nth-child(3) { text-align: left; }
.portal-print-paper--delivery .portal-doc-table--outbound th:nth-child(2) { width: 25%; }
.portal-print-paper--delivery .portal-doc-table--outbound th:nth-child(3) { width: 12%; }
.portal-print-paper--delivery .portal-doc-table--outbound th:last-child { width: 11%; }
.portal-print-paper--delivery-140 .portal-doc-meta span,
.portal-print-paper--delivery-140 .portal-doc-meta b { font-size: 12pt; }
.portal-print-paper--delivery-140 .portal-doc-code strong { font-size: 11pt; }
.portal-print-paper--delivery-140 .portal-doc-signatures { margin-top: 36px; }
.portal-doc-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 6px; border: 1px solid #555; border-top: 0; }
.portal-doc-total strong { font-size: 13pt; }
.portal-doc-signatures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.portal-doc-signatures span { display: flex; align-items: baseline; gap: 4px; min-width: 0; min-height: 28px; white-space: nowrap; }
.portal-doc-signatures i { display: block; flex: 1 1 0; min-width: 0; border-bottom: 1px solid #333; }
.portal-print-paper--a4 .portal-doc-signatures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#weihu-print-root { display: none; }

/* 0.11.2 shared module identity: one brand, one route back, no cross-module action. */
.module-brand-link { display: grid; gap: 9px; width: 100%; padding: 14px; color: #fff !important; border: 0 !important; background: var(--wh-ink); text-decoration: none !important; }
.module-brand-link img { display: block; width: min(100%, 176px); height: auto; }
.module-brand-link span { padding-top: 9px; border-top: 1px solid rgba(255,255,255,.22); color: #d8e0dc; font-size: 13px; font-weight: 750; }
.module-brand-link span::before { content: "← "; color: var(--wh-green); }
.module-brand-link--dark { padding: 0; background: transparent; }
.module-brand-link--dark img { width: 176px; }
.portal-bridge-page > header h3, .action-hero h2 { color: #fff; }

/* 0.8.2 independent sales-order page */
.weihu-order-page { min-height: 100vh; padding: 32px clamp(24px, 5vw, 74px) 76px; color: var(--wh-ink); background: linear-gradient(rgba(23,33,31,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(23,33,31,.045) 1px, transparent 1px), var(--wh-paper); background-size: 36px 36px; font-size: 16px; }
.weihu-order-page * { box-sizing: border-box; }
.weihu-order-page button, .weihu-order-page input, .weihu-order-page textarea, .weihu-order-page select { font: inherit; }
.order-page-head { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: start; gap: 28px; max-width: 1500px; margin: 0 auto 24px; padding: 28px 32px; color: #fff; background: var(--wh-ink); box-shadow: var(--wh-shadow); }
.order-page-head .eyebrow { color: #91a6ad; font-size: 12px; }
.order-page-head h1 { margin: 8px 0 5px; color: #fff; font: 700 clamp(31px, 4vw, 47px)/1.12 var(--wh-display); letter-spacing: -.035em; }
.order-page-head p:last-child { margin: 0; color: #bcc8c3; font-size: 15px; line-height: 1.7; }
.order-page-back { min-height: 42px; padding: 10px 0; color: #fff !important; border-bottom: 1px solid #70807a; font-size: 15px; font-weight: 700; text-decoration: none !important; }
.order-page-state { padding: 10px 12px; color: var(--wh-ink); background: var(--wh-green); font-size: 14px; font-weight: 800; }
.weihu-order-page > .portal-loading, .weihu-order-page > .portal-error, .weihu-order-page > form { max-width: 1500px; margin-right: auto; margin-left: auto; }
.order-layout--standalone { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
.order-layout--standalone .form-section { padding: 26px; }
.order-layout--standalone .form-section > header { grid-template-columns: 46px 1fr; }
.order-layout--standalone .form-section > header > span { width: 44px; height: 44px; font-size: 12px; }
.order-layout--standalone .form-section h2 { font-size: 25px; }
.order-layout--standalone .form-section header small { font-size: 13px; }
.weihu-order-page .search-row label > span, .weihu-order-page .field-grid label > span, .weihu-order-page .attachment-field > span, .weihu-order-page .order-line label span { font-size: 14px; }
.weihu-order-page input, .weihu-order-page select { min-height: 50px; padding: 11px 13px; font-size: 16px; }
.weihu-order-page textarea { padding: 12px 13px; font-size: 16px; line-height: 1.6; }
.weihu-order-page .secondary-action, .weihu-order-page .primary-action { min-height: 50px; padding: 11px 18px; font-size: 15px; }
.weihu-order-page .category-tabs button { min-height: 42px; padding: 9px 15px; font-size: 14px; }
.weihu-order-page .result-card strong, .weihu-order-page .product-result strong { font-size: 15px; }
.weihu-order-page .result-card span, .weihu-order-page .result-card small, .weihu-order-page .product-result span, .weihu-order-page .product-result small { font-size: 13px; }
.weihu-order-page .product-result button { min-width: 84px; min-height: 42px; font-size: 14px; }
.weihu-order-page .order-line { grid-template-columns: minmax(170px, 1.2fr) 105px 115px minmax(150px, 1fr) minmax(150px, 1fr) 42px; padding: 16px; }
.weihu-order-page .order-line .line-product strong { font-size: 15px; }
.weihu-order-page .order-line .line-product small { font-size: 12px; }
.weihu-order-page .order-line input { min-height: 43px; font-size: 14px; }
.order-summary--standalone { top: 24px; padding: 26px; }
.order-summary--standalone h2 { font-size: 27px; }
.order-summary--standalone dt { font-size: 14px; }
.order-summary--standalone dd { font-size: 15px; }
.order-summary--standalone .draft-rule strong { font-size: 15px; }
.order-summary--standalone .draft-rule p, .order-summary--standalone .attachment-field small, .order-summary--standalone .save-status { font-size: 13px; }
.order-page-list-link { display: block; margin-top: 14px; color: var(--wh-green) !important; font-size: 14px; font-weight: 700; text-align: center; text-decoration: none !important; }
.product-master-entry { margin-left: auto; color: var(--wh-green) !important; font-size: 13px; font-weight: 800; text-decoration: none !important; white-space: nowrap; }
.product-master-entry:hover, .product-master-entry:focus-visible { color: var(--wh-orange) !important; text-decoration: underline !important; }
.header-link-button { align-self: start; padding: 0; border: 0; background: transparent; cursor: pointer; }
.customer-create-card { width: min(620px, 100%); }
.customer-create-fields { display: grid !important; grid-template-columns: minmax(0, 1fr) 180px; gap: 14px; margin-top: 18px; }
.customer-create-fields label { display: grid; gap: 7px; }
.customer-create-fields label.wide { grid-column: 1 / -1; }
.customer-create-fields label > span { color: #58635e; font-size: 13px; font-weight: 800; }
.customer-create-card .save-status { min-height: 22px; margin: 12px 0 0; color: var(--wh-orange); font-size: 13px; }
.product-master-empty p { margin: 0 0 8px; }
.product-master-empty a { color: var(--wh-green) !important; font-size: 12px; font-weight: 800; text-decoration: none !important; }
.product-master-empty a:hover, .product-master-empty a:focus-visible { color: var(--wh-orange) !important; text-decoration: underline !important; }

@media (max-width: 1050px) {
  .order-page-head { grid-template-columns: 1fr auto; }
  .order-page-back, .order-page-head .module-brand-link { grid-column: 1 / -1; width: 190px; }
  .order-layout--standalone { grid-template-columns: 1fr; }
  .order-summary--standalone { position: static; }
  .weihu-order-page .order-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weihu-order-page .order-line .line-product { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .customer-create-fields { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .weihu-order-page { padding: 14px 10px 50px; }
  .order-page-head { grid-template-columns: 1fr; padding: 22px 20px; }
  .order-page-state { width: max-content; }
  .order-layout--standalone .form-section { padding: 19px 16px; }
  .weihu-order-page .field-grid, .weihu-order-page .search-row, .weihu-order-page .order-line { grid-template-columns: 1fr; }
  .weihu-order-page .order-line .line-product { grid-column: auto; }
}

@page weihu-a4-portrait { size: A4 portrait; margin: 8mm; }
@page weihu-delivery-half { size: 241mm 140mm; margin: 5mm; }
@page weihu-delivery-third { size: 241mm 93mm; margin: 4mm; }
.portal-print-paper--a4 { page: weihu-a4-portrait; }
.portal-print-paper--delivery-140 { page: weihu-delivery-half; }
.portal-print-paper--delivery-93 { page: weihu-delivery-third; }
.portal-print-paper--delivery-93 .portal-business-doc { min-height: 83mm; padding: 5mm; }
.portal-print-paper--delivery-93 .portal-doc-head { padding-bottom: 5px; }
.portal-print-paper--delivery-93 .portal-doc-head h2 { font-size: 18pt; }
.portal-print-paper--delivery-93 .portal-doc-head span { margin-top: 2px; }
.portal-print-paper--delivery-93 .portal-doc-meta { margin: 5px 0; }
.portal-print-paper--delivery-93 .portal-doc-meta span { min-height: 28px; padding: 3px 5px; }
.portal-print-paper--delivery-93 .portal-doc-table th,
.portal-print-paper--delivery-93 .portal-doc-table td { height: 23px; padding: 2px 3px; }
.portal-print-paper--delivery-93 .portal-doc-total { padding: 4px; }
.portal-print-paper--delivery-93 .portal-doc-signatures { margin-top: 6px; }

@media print {
  html, body { width: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; background: #fff !important; }
  body.weihu-printing > *:not(#weihu-print-root) { display: none !important; }
  #weihu-print-root { display: block !important; width: 100%; margin: 0; padding: 0; color: #000; background: #fff; }
  #weihu-print-root, #weihu-print-root * { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #weihu-print-root .portal-print-paper { width: 100%; min-width: 0; margin: 0; padding: 0; break-inside: avoid-page; page-break-inside: avoid; }
  #weihu-print-root .portal-business-doc { width: 100%; min-height: 0; margin: 0; padding: 6mm; color: #000; border: 0; box-shadow: none; transform: none; }
  #weihu-print-root .portal-print-paper--delivery { break-inside: auto; page-break-inside: auto; }
  #weihu-print-root .portal-print-paper--delivery .portal-business-doc { width: 100%; min-height: 0; padding: 3mm 4mm; font-size: 11pt; }
  #weihu-print-root .portal-print-paper--delivery thead { display: table-header-group; }
  #weihu-print-root .portal-print-paper--delivery tr,
  #weihu-print-root .portal-print-paper--delivery .portal-doc-total,
  #weihu-print-root .portal-print-paper--delivery .portal-doc-signatures { break-inside: avoid; page-break-inside: avoid; }
  #weihu-print-root .portal-print-paper--delivery .portal-doc-head h2 { font-size: 19pt; }
  #weihu-print-root .portal-print-paper--delivery .portal-doc-signatures { margin-top: 22px; }
  #weihu-print-root .portal-print-paper--delivery-93 .portal-business-doc { padding: 2mm 3mm; font-size: 10.5pt; }
  #weihu-print-root .portal-print-paper--delivery-93 .portal-doc-head h2 { font-size: 17pt; }
  #weihu-print-root .portal-print-paper--delivery-93 .portal-doc-head p { font-size: 10pt; }
  #weihu-print-root .portal-print-paper--delivery-93 .portal-doc-head span { display: block; font-size: 8pt; }
  #weihu-print-root .portal-print-paper--delivery-93 .portal-doc-meta span,
  #weihu-print-root .portal-print-paper--delivery-93 .portal-doc-meta b { font-size: 10.5pt; }
  #weihu-print-root .portal-print-paper--delivery-93 .portal-doc-signatures { margin-top: 4px; }
}

@media (max-width: 760px) {
  .portal-print-toolbar { align-items: stretch; flex-direction: column; }
  .portal-print-toolbar > div:last-child { display: grid; grid-template-columns: 1fr; }
  .portal-bridge-page > header, .bridge-action-grid, .bridge-action-grid--two { grid-template-columns: 1fr; }
	.fulfillment-routes { grid-template-columns: 1fr; }
	.fulfillment-route { border-right: 0; border-bottom: 1px solid var(--line); }
	.inbox-controls, .inbox-match-grid { grid-template-columns: 1fr; }
	.inbox-disposition { align-items: stretch; flex-direction: column; }
	.inbox-disposition input { min-width: 0; }
  .bridge-action-grid > * { min-height: 150px; border-right: 0; border-bottom: 1px solid var(--line); }
  .bridge-action-grid > *:last-child { border-bottom: 0; }
}

/* 0.7.1 readability and account-onboarding pass. Print typography stays unchanged. */
.weihu-app { font-size: 15px; }
.weihu-app p { font-size: 14px; }
.weihu-app small { font-size: 12px; line-height: 1.55; }
.weihu-app button, .weihu-app input, .weihu-app select, .weihu-app textarea { font-size: 14px; }
.weihu-app label, .weihu-app dt, .weihu-app dd { font-size: 13px; }
.demo-ribbon { font-size: 13px; }
.eyebrow, .rail-label, .rail-note__index { font-size: 11px; }
.nav-button { min-height: 48px; font-size: 14px; }
.nav-button span { font-size: 13px; }
.rail-user strong { font-size: 14px; }
.rail-user small, .rail-note p, .admin-link { font-size: 12px; }
.workspace-header__subtitle { font-size: 14px; }
.header-actions time { font-size: 13px; }
.outline-button, .primary-button, .secondary-action, .primary-action { font-size: 14px; }
.operations-hero p, .sales-entry-head p:not(.eyebrow), .scan-intake p:not(.eyebrow), .planned-shell p { font-size: 14px; }
.hero-linkage span, .status-metric span, .section-heading p, .state-chip { font-size: 12px; }
.hero-linkage strong, .recent-order strong, .inbox-row strong { font-size: 14px; }
.status-metric small, .task-card p, .task-card button, .inbox-item small, .inbox-item__time,
.recent-order span, .recent-order small, .flow-step small, .quick-actions small,
.directory-card dt, .directory-card dd, .audit-panel p, .credit-release-card span,
.credit-release-card p, .planned-badge, .inbox-row span, .inbox-row small { font-size: 12px; }
.sales-tabs button, .inventory-tabs button, .text-button, .category-tabs button { font-size: 13px; }
.order-detail label, .search-row label > span, .field-grid label > span, .attachment-field > span { font-size: 13px; }
.portal-toast, .dialog-lead, .form-note, .login-facts strong { font-size: 14px; }
.login-facts span { font-size: 13px; }
.account-admin-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; padding: 16px; border-left: 4px solid var(--signal-green); background: var(--ink); color: #fff; }
.account-admin-box[hidden] { display: none; }
.account-admin-box > strong, .account-admin-box > p { grid-column: 1 / -1; }
.account-admin-box > p { margin: 0 0 4px; color: #c8d2ce; font-size: 13px; line-height: 1.7; }
.account-admin-box .primary-button { color: var(--ink); background: var(--signal-green); border-color: var(--signal-green); }
.account-admin-box .outline-button { color: #fff; border-color: #fff; }

@media (max-width: 760px) {
  .demo-ribbon { font-size: 11px; }
  .nav-button, .mobile-nav button, .mobile-nav a { font-size: 12px; }
  .mobile-nav button span, .mobile-nav a span { font-size: 16px; }
  .account-admin-box { grid-template-columns: 1fr; }
  .account-admin-box > * { grid-column: 1; }
}

/* 0.8.3 administrator-only employee login control */
.weihu-account-page { min-height: 100vh; padding: 32px clamp(24px, 5vw, 74px) 76px; color: var(--wh-ink); background: linear-gradient(rgba(23,33,31,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(23,33,31,.045) 1px, transparent 1px), var(--wh-paper); background-size: 36px 36px; font-size: 16px; }
.weihu-account-page * { box-sizing: border-box; }
.weihu-account-page button, .weihu-account-page input { font: inherit; }
.account-page-head { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: start; gap: 28px; max-width: 1500px; margin: 0 auto 22px; padding: 28px 32px; color: #fff; background: var(--wh-ink); box-shadow: var(--wh-shadow); }
.account-page-head h1 { margin: 8px 0 5px; color: #fff; font: 700 clamp(31px, 4vw, 47px)/1.12 var(--wh-display); letter-spacing: -.035em; }
.account-page-head p:last-child { max-width: 780px; margin: 0; color: #c5d0cc; font-size: 15px; line-height: 1.7; }
.account-advanced-link { min-height: 42px; padding: 10px 12px; color: var(--wh-ink) !important; background: var(--wh-green); font-size: 14px; font-weight: 800; text-decoration: none !important; }
.account-safety-note { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 18px; max-width: 1500px; margin: 0 auto 22px; padding: 18px 22px; color: #e8eee7; border-left: 5px solid var(--wh-green); background: #26302e; box-shadow: var(--wh-shadow); }
.account-safety-note strong { color: var(--wh-green); font-size: 15px; }
.account-safety-note span { color: #d2dbd7; font-size: 13px; line-height: 1.65; }
.weihu-account-page > .portal-loading, .weihu-account-page > .portal-error, .employee-account-directory { max-width: 1500px; margin-right: auto; margin-left: auto; }
.employee-account-directory { border: 1px solid var(--wh-line); background: var(--wh-raised); box-shadow: var(--wh-shadow); }
.employee-account-directory[hidden] { display: none; }
.employee-account-directory > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--wh-line); }
.employee-account-directory h2 { margin: 3px 0; font: 700 28px/1.2 var(--wh-display); }
.employee-account-directory header p:last-child { margin: 0; color: var(--wh-muted); font-size: 13px; }
.employee-account-list { display: grid; }
.employee-account-card { display: grid; grid-template-columns: 48px minmax(170px, .75fr) minmax(360px, 1.7fr) minmax(180px, .6fr); align-items: center; gap: 20px; min-height: 126px; padding: 20px 26px; border-bottom: 1px solid var(--wh-line); }
.employee-account-card:last-child { border-bottom: 0; }
.employee-account-card:hover { background: #f4f1e8; }
.employee-account-card.is-disabled { opacity: .58; }
.employee-account-index { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: var(--wh-orange); font: 800 12px/1 var(--wh-mono); }
.employee-account-identity h3 { margin: 3px 0; font: 700 23px/1.2 var(--wh-display); }
.employee-account-identity span { color: var(--wh-muted); font-size: 13px; }
.employee-account-card dl { display: grid; grid-template-columns: 1.4fr .75fr .85fr; gap: 10px; margin: 0; }
.employee-account-card dl > div { min-width: 0; padding-left: 14px; border-left: 1px solid var(--wh-line); }
.employee-account-card dt { margin-bottom: 6px; color: var(--wh-muted); font-size: 12px; }
.use-review { border-top: 3px solid var(--wh-orange); margin-top: 20px; padding-top: 16px; min-width: 0; }
.use-review [hidden] { display: none !important; }
.use-review p, .use-review legend { overflow-wrap: anywhere; }
.use-review fieldset { min-width: 0; margin: 16px 0; padding: 14px; border: 1px solid var(--wh-line); }
.use-review legend { max-width: 100%; font-weight: 700; line-height: 1.7; }
.use-review label { display: grid; gap: 6px; min-width: 0; margin: 8px 0; font-size: 13px; }
.use-review input, .use-review select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 9px; border: 1px solid var(--wh-line); background: #fff; color: var(--wh-ink); }
.use-review button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--wh-ink); background: var(--wh-raised); color: var(--wh-ink); white-space: normal; }
.use-review button:disabled { opacity: .5; cursor: not-allowed; }
.use-review [data-uaction="confirm"] { background: var(--wh-ink); color: #fff; }
.use-review [data-uaction="retry"] { border-color: var(--wh-orange); }
.use-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 18px; }
.use-history, .use-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.use-history select { flex: 1 1 220px; }
.use-note, [data-use-effective] { padding: 12px; background: #eee9dd; font-size: 13px; line-height: 1.75; }
.use-differences summary, .use-inputs > summary { cursor: pointer; padding: 14px 0; font-weight: 700; }
.use-table-scroll { max-width: 100%; overflow-x: auto; }
.use-table-scroll table { width: 100%; border-collapse: collapse; min-width: 520px; }
.use-table-scroll th, .use-table-scroll td { padding: 10px; text-align: left; border-bottom: 1px solid var(--wh-line); font-size: 13px; }
.use-table-scroll th { background: var(--wh-ink); color: #fff; }
@media(max-width:650px) { .use-grid { grid-template-columns: minmax(0,1fr); } .use-review fieldset { padding: 10px; } .use-actions button, .use-history button { width: 100%; } }
@media(max-width:650px) {
  .use-table-scroll table { min-width: 0; }
  .use-table-scroll thead { display: none; }
  .use-table-scroll tbody { display: block; }
  .use-table-scroll tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid var(--wh-line); margin: 12px 0; }
  .use-table-scroll td { min-width: 0; overflow-wrap: anywhere; border: 0; }
  .use-table-scroll td:first-child { grid-column: 1/-1; background: var(--wh-ink); color: #fff; }
  .use-table-scroll td::before { content: attr(data-use-label); display: block; opacity: .75; font-size: 11px; margin-bottom: 5px; }
}
.employee-account-card dd { margin: 0; overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.employee-account-action { display: grid; justify-items: end; gap: 12px; }
.employee-account-action .primary-action { min-height: 44px; padding: 10px 15px; font-size: 14px; }
.employee-password-dialog { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 30px); padding: 0; color: var(--wh-ink); border: 1px solid var(--wh-ink); background: var(--wh-raised); box-shadow: 0 22px 70px rgba(0,0,0,.35); }
.employee-password-dialog::backdrop { background: rgba(17,25,23,.78); backdrop-filter: blur(3px); }
.employee-password-dialog form { display: grid; gap: 20px; padding: 26px; }
.employee-password-dialog h2 { margin: 5px 0 0; font: 700 30px/1.15 var(--wh-display); }
.password-target { display: grid; grid-template-columns: 100px 1fr; gap: 5px 14px; padding: 16px 18px; color: #fff; background: var(--wh-ink); }
.password-target span { grid-row: 1 / 3; align-self: center; color: var(--wh-green); font-size: 13px; font-weight: 800; }
.password-target strong { font-size: 18px; }
.password-target small { color: #c6d0cc; font-size: 13px; }
.password-rule { padding: 14px 16px; border-left: 4px solid var(--wh-orange); background: #eee9dd; }
.password-rule p { margin: 5px 0 0; color: #485451; font-size: 13px; line-height: 1.65; }
.password-field { display: grid; gap: 8px; }
.password-field > span { font-size: 14px; font-weight: 800; }
.password-field > div { display: grid; grid-template-columns: 1fr auto; }
.password-field input { min-height: 52px; padding: 11px 13px; border: 1px solid #9c9687; border-right: 0; background: #fff; font-size: 17px; }
.password-field button { min-width: 78px; border: 1px solid #9c9687; background: #ece8dd; font-size: 13px; font-weight: 800; }
.password-field small { color: var(--wh-muted); font-size: 12px; }
.password-ack { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px dashed #aaa391; background: #faf8f0; font-size: 13px; line-height: 1.55; }
.password-ack input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--wh-ink); }
.employee-password-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; border-top: 1px solid var(--wh-line); }
.employee-password-dialog footer button { min-height: 48px; padding: 10px 18px; }

@media (max-width: 950px) {
  .account-page-head { grid-template-columns: 1fr auto; }
  .account-page-head .order-page-back, .account-page-head .module-brand-link { grid-column: 1 / -1; width: 190px; }
  .account-safety-note { grid-template-columns: 1fr; }
  .employee-account-card { grid-template-columns: 48px 1fr auto; }
  .employee-account-card dl { grid-column: 2 / -1; }
  .employee-account-action { grid-column: 3; grid-row: 1; }
}

@media (max-width: 650px) {
  .weihu-account-page { padding: 14px 10px 50px; }
  .account-page-head { grid-template-columns: 1fr; padding: 22px 20px; }
  .account-advanced-link { width: max-content; }
  .employee-account-directory > header { align-items: flex-start; flex-direction: column; }
  .employee-account-card { grid-template-columns: 42px 1fr; gap: 14px; padding: 18px 16px; }
  .employee-account-card dl { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .employee-account-action { grid-column: 1 / -1; grid-row: auto; justify-items: stretch; }
  .employee-password-dialog form { padding: 20px 16px; }
  .password-target { grid-template-columns: 1fr; }
  .password-target span { grid-row: auto; }
}
