/* Desktop-only stage 1. The tablet entry does not load this sheet. */
body.ruiwei-desktop {
  --ui-brand:#1F3A5F;--ui-brand-deep:#1F3A5F;--ui-brand-hover:#1F3A5F;--ui-brand-soft:#EAF0F7;
  --ui-canvas:#F4F5F7;--ui-surface:#fff;--ui-surface-alt:#F4F5F7;
  --ui-border:#E6E8EC;--ui-border-soft:#E6E8EC;--ui-border-subtle:#E6E8EC;
  --ui-text:#1A2433;--ui-text-dark:#1A2433;--ui-text-strong:#1A2433;
  --ui-label:#5B6676;--ui-text-subtle:#5B6676;--ui-text-muted:#5B6676;
  --ui-danger:#B02A18;--ui-danger-text:#B02A18;--ui-danger-surface:#FDF0EE;--ui-danger-border:#B02A18;
  --ui-warning-text:#9A5200;--ui-success:#1B6E43;--ui-success-text:#1B6E43;
  --ui-font-body:16px;--ui-font-table:14px;--ui-font-help:13px;--ui-shadow-panel:none;
  background:var(--ui-canvas);color:var(--ui-text);font-size:16px;line-height:1.5;
}
body.ruiwei-desktop .production-shell {grid-template-columns:200px minmax(0,1fr);gap:16px;padding:16px;max-width:none;}
body.ruiwei-desktop .production-shell .production-nav {width:200px;height:calc(100dvh - 32px);top:16px;padding:12px;background:#fff;border:1px solid var(--ui-border);border-radius:12px;}
body.ruiwei-desktop .production-shell .production-nav .nav-group button {font-size:14px;font-weight:400;padding:8px 12px;border:0;border-radius:8px;background:#fff;color:var(--ui-text);}
body.ruiwei-desktop .production-shell .production-nav .nav-group button.active {background:var(--ui-brand-soft);color:var(--ui-brand);font-weight:700;}
body.ruiwei-desktop .production-shell .production-nav .nav-group h2 {font-size:12px;color:var(--ui-text-subtle);margin:12px 0 4px;padding:0 12px;}
body.ruiwei-desktop .production-shell.nav-collapsed {grid-template-columns:44px minmax(0,1fr);}
body.ruiwei-desktop .production-shell.nav-collapsed .production-nav {width:44px;padding:4px;}
body.ruiwei-desktop .production-shell .panel {border:1px solid var(--ui-border);padding:16px;border-radius:12px;box-shadow:none;}
body.ruiwei-desktop .production-top {min-height:48px;padding:0;gap:8px;}
body.ruiwei-desktop .production-top .top-context {align-items:center;gap:8px;flex-wrap:wrap;}
body.ruiwei-desktop .top-context-controls {display:flex;align-items:center;gap:8px;min-width:0;}
body.ruiwei-desktop #top-wide-actions {display:none;}
body.ruiwei-desktop #top-user-menu {position:relative;z-index:60;}
body.ruiwei-desktop #top-user-menu > summary {list-style:none;cursor:pointer;padding:6px 10px;border:1px solid var(--ui-border);border-radius:8px;background:#fff;white-space:normal;max-width:200px;overflow-wrap:anywhere;}
body.ruiwei-desktop #top-user-menu > summary::-webkit-details-marker {display:none;}
body.ruiwei-desktop .top-user-menu-content {position:absolute;right:0;top:calc(100% + 6px);min-width:220px;max-width:min(360px,calc(100vw - 16px));display:grid;gap:8px;padding:12px;border:1px solid var(--ui-border);border-radius:10px;background:#fff;box-shadow:0 8px 24px #1a243326;white-space:normal;}
body.ruiwei-desktop #top-user-menu:not([open]) > .top-user-menu-content {display:none;}
body.ruiwei-desktop .top-user-menu-content #user-label {overflow-wrap:anywhere;}
body.ruiwei-desktop .top-user-menu-content button {text-align:left;}
body.ruiwei-desktop #top-mobile-view-actions:empty {display:none;}
body.ruiwei-desktop .top-user-menu-content .header-reminder-popover {position:static;width:auto;padding:8px;margin-top:4px;box-shadow:none;}
body.ruiwei-desktop .production-top .top-context {flex-wrap:nowrap;}
body.ruiwei-desktop .production-shell .panel > .overview-header .view-title,
body.ruiwei-desktop #panel-master > h2,body.ruiwei-desktop #panel-process-card-view > h2,
body.ruiwei-desktop #panel-quality > h2,body.ruiwei-desktop #panel-settings > h2,
body.ruiwei-desktop #production-history > .overview-header .view-title {display:none;}
body.ruiwei-desktop .production-shell .panel .data-read-time {display:none;}
body.ruiwei-desktop :is(#e1-refresh,#plan-refresh,#entry-refresh,[data-intake-refresh]) {display:none;}
body.ruiwei-desktop .production-shell .panel > .overview-header:has(.view-sub) {margin-bottom:12px;}
body.ruiwei-desktop .production-shell .panel > .overview-header .view-sub {color:var(--ui-text-subtle);font-size:13px;}
body.ruiwei-desktop :is(.simple-table,.products-table,.intake-table table,.e1-table,.reconciliation-table) tbody tr {min-height:48px;}
body.ruiwei-desktop :is(.simple-table,.products-table,.intake-table table,.e1-table,.reconciliation-table) tbody td {height:48px;vertical-align:middle;border-bottom:1px solid var(--ui-border);}
body.ruiwei-desktop :is(.simple-table,.products-table,.intake-table table,.e1-table,.reconciliation-table) tbody tr:hover {background:var(--ui-brand-soft);}
body.ruiwei-desktop .production-shell table tbody td {font-size:16px;}
body.ruiwei-desktop .production-shell table tbody td :is(b,strong) {font-size:16px;}
body.ruiwei-desktop #quality-content .quality-table-wrap {max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;}
body.ruiwei-desktop #panel-master .master-table-wrap {display:block;width:100%;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;}
body.ruiwei-desktop #panel-master .master-table-wrap:is([data-master-table="machines"],[data-master-table="molds"]) > table {min-width:680px;}
body.ruiwei-desktop #panel-material-pick {min-width:0;}
body.ruiwei-desktop .pick-notice {padding:12px 16px;background:var(--ui-brand-soft);border-radius:8px;}
body.ruiwei-desktop .pick-toolbar {display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:12px 0;}
body.ruiwei-desktop .pick-toolbar label {display:grid;gap:4px;}
body.ruiwei-desktop .pick-toolbar :is(input,select) {min-height:42px;padding:8px;max-width:100%;}
body.ruiwei-desktop .pick-table-wrap {max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;}
body.ruiwei-desktop .pick-table {min-width:980px;}
body.ruiwei-desktop .pick-table td b {font-weight:700;}
body.ruiwei-desktop .pick-table td small {display:inline;margin-left:8px;color:var(--ui-text-subtle);font-size:13px;}
body.ruiwei-desktop .pick-table .pick-number {text-align:right;font-variant-numeric:tabular-nums;}
body.ruiwei-desktop .pick-review {color:var(--ui-warning-text);}
body.ruiwei-desktop .pick-unassigned,body.ruiwei-desktop .pick-help {margin-top:14px;}
body.ruiwei-desktop .pick-pack-note {color:var(--ui-text-subtle);font-size:14px;}
body.ruiwei-desktop .pick-print-title {display:none;}
body.ruiwei-desktop .pick-scroll-note {display:none;color:var(--ui-text-subtle);font-size:13px;}
body.ruiwei-desktop :is(.simple-table,.products-table,.intake-table table,.reconciliation-table) tbody td {padding:4px 10px;}
body.ruiwei-desktop :is(.simple-table,.products-table,.intake-table table,.reconciliation-table) tbody td button {white-space:nowrap;}
body.ruiwei-desktop .production-shell :is(.simple-table,.products-table,.intake-table table,.reconciliation-table) tbody td button {box-sizing:border-box;height:38px;padding:4px 8px;line-height:24px;}
body.ruiwei-desktop .products-table {min-width:1050px;}
body.ruiwei-desktop .products-table tbody tr[data-product-row] {cursor:pointer;}
body.ruiwei-desktop .products-table tbody td:first-child {color:var(--ui-text-subtle);font-size:13px;}
body.ruiwei-desktop .products-table tbody td:nth-child(2) b {font-weight:700;color:var(--ui-text);}
body.ruiwei-desktop .products-table :is(th,td):nth-child(4),body.ruiwei-desktop .products-table :is(th,td):nth-child(5),
body.ruiwei-desktop .products-table :is(th,td):nth-child(7),body.ruiwei-desktop .products-table :is(th,td):nth-child(8) {text-align:right;}
body.ruiwei-desktop .products-table tfoot td {text-align:right;padding:10px 12px;color:var(--ui-text-subtle);border-top:1px solid var(--ui-border);font-size:13px;}
body.ruiwei-desktop :is(.products-table,.intake-table table,.e1-table) td:first-child strong,
body.ruiwei-desktop :is(.products-table,.intake-table table,.e1-table) td:first-child b {font-weight:700;color:var(--ui-text);}
body.ruiwei-desktop :is(.products-table,.intake-table table,.e1-table) td:first-child small {display:inline;margin-left:8px;color:var(--ui-text-subtle);font-size:13px;}
body.ruiwei-desktop .intake-table table {min-width:840px;}
body.ruiwei-desktop .intake-table table tbody td:first-child small {margin-top:0;}
body.ruiwei-desktop .intake-table .intake-key-cell,body.ruiwei-desktop .reconciliation-table :is(td,th):nth-child(n+3):nth-child(-n+6) {text-align:right;font-variant-numeric:tabular-nums;}
body.ruiwei-desktop :is(.simple-form,.factory-shift-form) label:not(:has(input[type="checkbox"])),
body.ruiwei-desktop :is(.kingdee-toolbar,.intake-toolbar,.e1-toolbar,.entry-toolbar,.filter-bar) > label {display:grid;align-content:start;gap:4px;}
body.ruiwei-desktop dialog form :is(button[type="submit"],button.primary) {justify-self:end;}
body.ruiwei-desktop dialog button[type="button"] {background:#fff;}
body.ruiwei-desktop :is(button[data-req-cancel],button[data-alias-remove],button[data-tablet-revoke]) {color:var(--ui-danger);background:#fff;}
body.ruiwei-desktop .home-empty,body.ruiwei-desktop .intake-empty,body.ruiwei-desktop .quality-empty {border:0;background:var(--ui-surface-alt);border-radius:8px;padding:16px;}
body.ruiwei-desktop .import-steps {display:flex;gap:8px;list-style:none;margin:0 0 12px;padding:0;flex-wrap:wrap;}
body.ruiwei-desktop .import-steps li {padding:5px 10px;border-radius:999px;background:var(--ui-brand-soft);color:var(--ui-brand);font-size:13px;font-weight:700;}
body.ruiwei-desktop .import-preview {padding:16px;margin:12px 0;border:1px solid var(--ui-border);border-radius:10px;background:#fff;}
body.ruiwei-desktop .import-preview h2 {margin:0 0 8px;}
body.ruiwei-desktop .import-preview .intake-table {max-height:300px;overflow:auto;}
body.ruiwei-desktop .import-actions {display:flex;gap:8px;justify-content:flex-end;margin-top:12px;}
body.ruiwei-desktop .production-top h1 {display:none;}
body.ruiwei-desktop #top-page-title {font-size:22px;line-height:1.3;white-space:nowrap;}
body.ruiwei-desktop #top-read-time {font-size:13px;color:var(--ui-text-subtle);white-space:nowrap;}
body.ruiwei-desktop #top-read-time.stale {color:var(--ui-warning-text);}
body.ruiwei-desktop #top-view-actions {display:flex;gap:8px;}
body.ruiwei-desktop #top-refresh {padding:4px 8px;}
body.ruiwei-desktop .top-actions {font-size:13px;gap:8px;}
body.ruiwei-desktop .top-actions button {font-size:13px;padding:4px 8px;}
body.ruiwei-desktop button,body.ruiwei-desktop input,body.ruiwei-desktop select,body.ruiwei-desktop textarea {border:1px solid var(--ui-border);border-radius:8px;font-size:inherit;}
body.ruiwei-desktop button {padding:8px 12px;background:#fff;color:var(--ui-text);}
body.ruiwei-desktop button.primary {background:var(--ui-brand);border-color:var(--ui-brand);color:#fff;}
body.ruiwei-desktop button:hover {background:var(--ui-brand-soft);}
body.ruiwei-desktop button.primary:hover {background:var(--ui-brand);}
body.ruiwei-desktop :focus-visible {outline:3px solid var(--ui-brand);outline-offset:2px;}
body.ruiwei-desktop h2,body.ruiwei-desktop h3 {font-size:16px;}
body.ruiwei-desktop .view-title {font-size:22px;}
body.ruiwei-desktop table {font-variant-numeric:tabular-nums;}
body.ruiwei-desktop table tbody tr {height:48px;}
body.ruiwei-desktop .e1-status-badge,body.ruiwei-desktop .req-status {border-radius:6px;}
body.ruiwei-desktop #panel-home,body.ruiwei-desktop #panel-production-requirements {min-width:0;}
body.ruiwei-desktop #panel-home {padding:0;border:0;background:transparent;}
body.ruiwei-desktop #panel-home > .view-sub,body.ruiwei-desktop #panel-home > .data-read-time,
body.ruiwei-desktop #home-adjust,body.ruiwei-desktop #panel-production-requirements > .overview-header {display:none;}
body.ruiwei-desktop .home-toolbar {margin:0 0 8px;padding:8px 12px;background:white;border-radius:8px;justify-content:flex-start;gap:16px;}
body.ruiwei-desktop .home-view-tabs {gap:0;border:1px solid var(--ui-border);border-radius:8px;}
body.ruiwei-desktop .home-view-tabs button {font-size:14px;min-width:64px;border:0;padding:4px 12px;}
body.ruiwei-desktop .home-view-tabs button.active {background:var(--ui-brand);color:#fff;}
body.ruiwei-desktop .home-blocks {gap:4px;}
body.ruiwei-desktop .home-block {padding:8px 16px;border:1px solid var(--ui-border);border-radius:12px;}
body.ruiwei-desktop .home-block h2 {font-size:16px;}
body.ruiwei-desktop .home-block > header {margin:0 0 4px;}
body.ruiwei-desktop .home-metrics {gap:0;grid-template-columns:repeat(6,minmax(0,1fr));}
body.ruiwei-desktop .home-metric {border:0;border-right:1px solid var(--ui-border);border-radius:0;background:white;padding:4px 12px;gap:4px;}
body.ruiwei-desktop .home-metric:last-child {border-right:0;}
body.ruiwei-desktop .home-metric b {font-size:22px;color:var(--ui-text);font-variant-numeric:tabular-nums;}
body.ruiwei-desktop .home-metric b.zero {color:var(--ui-text-subtle);}
body.ruiwei-desktop .home-metric.danger {background:var(--ui-danger-surface);color:var(--ui-danger);}
body.ruiwei-desktop .home-metric.danger b {color:var(--ui-danger);}
body.ruiwei-desktop .home-split-metric button {font-size:16px;border:0;text-align:left;padding:0;background:transparent;font-variant-numeric:tabular-nums;}
body.ruiwei-desktop .home-audit-scope {margin:4px 0 0;font-size:13px;color:var(--ui-text-subtle);}
body.ruiwei-desktop .home-shop-strip {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px;padding-top:8px;border-top:1px solid var(--ui-border);font-size:14px;}
body.ruiwei-desktop .home-shop-fault {font-size:13px;padding:4px 8px;color:var(--ui-danger);background:var(--ui-danger-surface);}
body.ruiwei-desktop .home-orders-tools {margin-bottom:8px;font-size:13px;}
body.ruiwei-desktop .home-orders-scroll {min-height:0;max-height:none;overflow:auto;}
body.ruiwei-desktop .home-orders {min-width:860px;}
body.ruiwei-desktop .home-orders th,body.ruiwei-desktop .home-orders td {font-size:16px;padding:8px;display:table-cell;white-space:nowrap;}
body.ruiwei-desktop .home-orders td:nth-child(n+4):nth-child(-n+6),body.ruiwei-desktop .home-orders th:nth-child(n+4):nth-child(-n+6) {text-align:right;white-space:nowrap;}
body.ruiwei-desktop .home-orders td:nth-child(2) span {display:inline;margin-left:8px;}
body.ruiwei-desktop .home-orders tr.overdue {background:var(--ui-danger-surface);}
body.ruiwei-desktop .home-orders tr.soon {background:white;}
body.ruiwei-desktop .home-overdue {color:var(--ui-danger);}
body.ruiwei-desktop .home-soon {color:var(--ui-warning-text);}
body.ruiwei-desktop .home-machine-count {margin:0 0 4px;font-size:14px;color:var(--ui-text-subtle);}
body.ruiwei-desktop .home-machines {grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;}
body.ruiwei-desktop .home-machine {padding:4px;gap:4px;background:white;border-radius:8px;display:grid;grid-template-columns:minmax(0,1fr) auto;}
body.ruiwei-desktop .home-machine b {grid-column:1;grid-row:1;}
body.ruiwei-desktop .home-machine em {grid-column:2;grid-row:1;}
body.ruiwei-desktop .home-machine span,body.ruiwei-desktop .home-machine small {grid-column:1 / -1;}
body.ruiwei-desktop .home-machine-progress {grid-column:1 / -1;height:6px;border-radius:999px;background:var(--ui-border);overflow:hidden;}
body.ruiwei-desktop .home-machine-progress i {display:block;height:100%;border-radius:inherit;background:var(--ui-brand);}
body.ruiwei-desktop .home-machine b {font-size:16px;white-space:normal;overflow:visible;}
body.ruiwei-desktop .home-machine span {font-size:16px;white-space:normal;overflow:visible;overflow-wrap:anywhere;}
body.ruiwei-desktop .home-machine small {font-size:13px;white-space:normal;overflow:visible;color:var(--ui-text-subtle);font-variant-numeric:tabular-nums;}
body.ruiwei-desktop .home-machine em {font-style:normal;font-size:13px;color:var(--ui-success);}
body.ruiwei-desktop .home-machine.fault {background:white;border:1px solid var(--ui-danger);}
body.ruiwei-desktop .home-machine.fault em {color:var(--ui-danger);}
body.ruiwei-desktop .home-idle-machines {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px;font-size:13px;}
body.ruiwei-desktop .home-idle-machines button {font-size:13px;padding:4px 8px;}
body.ruiwei-desktop .home-shifts {display:grid;grid-template-columns:1fr 1fr;gap:16px;}
body.ruiwei-desktop .home-shift {gap:8px;min-width:0;}
body.ruiwei-desktop .home-shift h3 {font-size:16px;white-space:nowrap;margin:0;}
body.ruiwei-desktop .home-shift .home-metric {min-width:0;padding:4px 8px;display:flex;flex-direction:row;flex-wrap:wrap;gap:4px;align-items:center;}
body.ruiwei-desktop .home-shift .home-metric b {font-size:16px;}
body.ruiwei-desktop .home-shift .home-metric small {font-size:13px;flex-basis:100%;}
body.ruiwei-desktop .requirement-toolbar {gap:12px;justify-content:space-between;padding:0;margin:0 0 12px;}
body.ruiwei-desktop .requirement-toolbar label {display:flex;align-items:center;gap:8px;font-size:14px;min-width:0;}
body.ruiwei-desktop .requirement-toolbar select {max-width:320px;min-width:0;}
body.ruiwei-desktop .requirement-list-head {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:8px 0;font-size:13px;}
body.ruiwei-desktop .requirement-status-filters {display:flex;gap:4px;flex-wrap:wrap;}
body.ruiwei-desktop .requirement-status-filters button {font-size:14px;padding:4px 8px;}
body.ruiwei-desktop .requirement-status-filters button[aria-pressed="true"] {background:var(--ui-brand);color:white;}
body.ruiwei-desktop .requirement-table {border:0;border-radius:0;overflow:auto;max-width:100%;max-height:448px;}
body.ruiwei-desktop .requirement-table table {width:100%;min-width:1040px;font-size:16px;border-collapse:collapse;}
body.ruiwei-desktop .requirement-table th,body.ruiwei-desktop .requirement-table td {font-size:16px;height:48px;padding:8px;border-bottom:1px solid var(--ui-border);vertical-align:middle;}
body.ruiwei-desktop .requirement-table td:first-child {white-space:nowrap;}
body.ruiwei-desktop .requirement-table td:first-child small {display:inline;margin-left:8px;font-size:13px;color:var(--ui-text-subtle);}
body.ruiwei-desktop .requirement-table .req-number {text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;}
body.ruiwei-desktop [data-req-row] {cursor:pointer;}
body.ruiwei-desktop .req-row-missing {background:#FFF8E8;}
body.ruiwei-desktop .req-weight-link {font-size:14px;padding:4px 8px;color:var(--ui-brand);background:transparent;}
body.ruiwei-desktop .req-row-missing .req-weight-link {color:var(--ui-warning-text);}
body.ruiwei-desktop .req-gross {display:inline;margin-left:8px;font-size:13px;color:var(--ui-text-subtle);}
body.ruiwei-desktop .requirement-table button {margin:0;}
body.ruiwei-desktop .req-date {white-space:nowrap;color:var(--ui-text-subtle);}
body.ruiwei-desktop .req-date.overdue {color:var(--ui-danger);}
body.ruiwei-desktop .req-date.soon {color:var(--ui-warning-text);}
body.ruiwei-desktop .req-date.completed {color:var(--ui-text-subtle);}
body.ruiwei-desktop .req-status {display:inline-block;padding:4px 8px;background:var(--ui-surface-alt);font-size:13px;white-space:nowrap;}
body.ruiwei-desktop .req-estimate-help {display:inline-block;position:relative;font-size:13px;margin:0 0 0 4px;}
body.ruiwei-desktop .req-estimate-help summary {list-style:none;}
body.ruiwei-desktop .req-estimate-help span {white-space:normal;display:block;min-width:200px;color:var(--ui-text-subtle);}
body.ruiwei-desktop .req-weight-summary {padding:12px 0;border:0;border-top:1px solid var(--ui-border);background:white;margin-top:12px;font-size:14px;}
body.ruiwei-desktop .req-material-groups {display:flex;flex-wrap:wrap;gap:8px 16px;padding:8px 0;font-variant-numeric:tabular-nums;}
body.ruiwei-desktop .req-weight-summary small {font-size:13px;color:var(--ui-text-subtle);}
body.ruiwei-desktop .requirement-history {margin:12px 0 0;border:0;padding:0;}
body.ruiwei-desktop .requirement-actions {display:flex;gap:8px;justify-content:flex-end;margin-top:16px;}
body.ruiwei-desktop [data-req-cancel] {color:var(--ui-danger);background:white;}
body.ruiwei-desktop dialog {max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--ui-border);border-radius:12px;padding:24px;width:min(760px,calc(100% - 32px));}
body.ruiwei-desktop #requirement-weight,body.ruiwei-desktop #requirement-loss {width:min(560px,calc(100% - 32px));}
body.ruiwei-desktop #req-weight-form label,body.ruiwei-desktop #req-loss-form label {display:grid;gap:4px;margin:12px 0;}
body.ruiwei-desktop #req-weight-form input,body.ruiwei-desktop #req-weight-form select,body.ruiwei-desktop #req-loss-form input {width:100%;padding:8px;}
body.ruiwei-desktop .req-weight-warning,body.ruiwei-desktop .req-weight-recent {font-size:14px;}
body.ruiwei-desktop .stage1-help {font-size:13px;}
body.ruiwei-desktop .stage1-help summary {list-style:none;cursor:pointer;}
body.ruiwei-desktop .stage1-help p {max-width:420px;margin:8px 0;}
@media(min-width:1366px) {
  body.ruiwei-desktop #top-wide-actions {display:flex;align-items:center;gap:8px;white-space:nowrap;}
  body.ruiwei-desktop #top-wide-actions #user-label {white-space:nowrap;}
}
@media(min-width:1000px) {
  body.ruiwei-desktop .production-workspace:has(#panel-home.active) {height:calc(100dvh - 32px);display:flex;flex-direction:column;gap:12px;}
  body.ruiwei-desktop .production-workspace:has(#panel-home.active) main {flex:1;min-height:0;display:flex;flex-direction:column;}
  body.ruiwei-desktop #panel-home.active {flex:1;min-height:0;display:flex;flex-direction:column;}
  body.ruiwei-desktop .home-blocks {flex:1;min-height:0;display:flex;flex-direction:column;}
  body.ruiwei-desktop [data-home-block="orders"] {flex:1;min-height:0;display:flex;flex-direction:column;}
  body.ruiwei-desktop .home-orders-scroll {flex:1;min-height:0;}
}
@media(max-width:999px) {
  body.ruiwei-desktop .home-metrics {grid-template-columns:repeat(3,minmax(0,1fr));}
  body.ruiwei-desktop .home-machines {grid-template-columns:repeat(3,minmax(0,1fr));}
  body.ruiwei-desktop .home-shifts {grid-template-columns:1fr;}
}
@media(max-width:760px) {
  body.ruiwei-desktop .production-shell {display:block;padding:8px;}
  body.ruiwei-desktop .production-shell .production-nav {width:40px;height:auto;padding:0;border:0;background:transparent;position:absolute;top:8px;left:8px;}
  body.ruiwei-desktop .production-shell.nav-collapsed .production-nav {width:40px;height:auto;padding:0;position:absolute;top:8px;left:8px;}
  body.ruiwei-desktop .production-shell .production-nav #nav-toggle {position:relative;z-index:8;background:white;width:40px;padding:8px;min-height:40px;}
  body.ruiwei-desktop .production-shell .production-top {padding:8px 0 8px 52px;}
  body.ruiwei-desktop .production-top {display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;gap:4px 8px;min-width:0;}
  body.ruiwei-desktop .production-top .top-context {display:contents;}
  body.ruiwei-desktop #top-page-title {grid-column:1;grid-row:1;overflow:hidden;text-overflow:ellipsis;}
  body.ruiwei-desktop .production-top .top-actions {grid-column:2;grid-row:1;width:auto;justify-content:flex-end;}
  body.ruiwei-desktop .top-context-controls {grid-column:1 / -1;grid-row:2;max-width:100%;overflow-x:auto;white-space:nowrap;flex-wrap:nowrap;scrollbar-width:thin;}
  body.ruiwei-desktop .top-context-controls > * {flex:none;}
  body.ruiwei-desktop #top-mobile-view-actions:not(:empty),body.ruiwei-desktop #top-mobile-view-actions #top-view-actions {display:grid;gap:8px;}
  body.ruiwei-desktop #top-page-title {font-size:22px;}
  body.ruiwei-desktop #top-read-time {flex-basis:auto;}
  body.ruiwei-desktop .top-actions {flex-wrap:nowrap;}
  body.ruiwei-desktop .home-metrics {grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ruiwei-desktop .home-metric {border-right:0;border-bottom:1px solid var(--ui-border);}
  body.ruiwei-desktop .home-block {padding:12px;}
  body.ruiwei-desktop .home-machines {grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ruiwei-desktop .home-orders thead {display:table-header-group;}
  body.ruiwei-desktop .home-orders tbody {display:table-row-group;}
  body.ruiwei-desktop .home-orders tr {display:table-row;margin:0;border:0;}
  body.ruiwei-desktop .home-orders td::before {display:none;}
  body.ruiwei-desktop .home-orders-tools {gap:8px;}
  body.ruiwei-desktop .home-orders-scroll {max-height:480px;}
  body.ruiwei-desktop .home-toolbar {flex-wrap:wrap;}
  body.ruiwei-desktop .requirement-toolbar {flex-wrap:wrap;}
  body.ruiwei-desktop .requirement-toolbar select {width:240px;max-width:100%;}
  body.ruiwei-desktop .production-shell .panel {padding:12px;}
  body.ruiwei-desktop .home-shift {flex-wrap:wrap;}
  body.ruiwei-desktop .home-shift h3 {width:100%;}
}
@page {size:A4 landscape;margin:10mm;}
@media (max-width:600px) {body.ruiwei-desktop .pick-scroll-note {display:block;margin:4px 0 8px;}}
body.ruiwei-desktop .inline-help,
body.ruiwei-desktop .field-help {display:inline-block;position:relative;margin-left:6px;vertical-align:middle;font-size:13px;font-weight:400;}
body.ruiwei-desktop :is(.inline-help,.field-help)>summary {display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid var(--ui-border);border-radius:50%;cursor:pointer;list-style:none;color:var(--ui-text-subtle);}
body.ruiwei-desktop :is(.inline-help,.field-help)>summary::-webkit-details-marker {display:none;}
body.ruiwei-desktop :is(.inline-help,.field-help)>span {display:block;max-width:330px;padding:7px 10px;background:#fff;border:1px solid var(--ui-border);border-radius:8px;color:var(--ui-text);box-shadow:0 2px 8px #0002;}
body.ruiwei-desktop .entry-no-plan {max-width:350px;}
body.ruiwei-desktop .entry-no-plan>summary {cursor:pointer;color:var(--ui-brand);font-weight:600;}
body.ruiwei-desktop .entry-no-plan>p {margin:5px 0;color:var(--ui-text-subtle);}
body.ruiwei-desktop .plan-pool-guide {font-size:14px;line-height:1.5;margin:0 0 10px;color:var(--ui-text-subtle);}
@media print {
  body.ruiwei-desktop .production-shell {display:block;padding:0;}
  body.ruiwei-desktop :is(.production-nav,.production-top,#material-pick-message,.pick-toolbar,.pick-help,.pick-unassigned) {display:none!important;}
  body.ruiwei-desktop .production-workspace {display:block;}
  body.ruiwei-desktop .production-shell .panel {display:none!important;}
  body.ruiwei-desktop #panel-material-pick.panel {display:block!important;border:0;padding:0;}
  body.ruiwei-desktop .pick-print-title {display:block;}
  body.ruiwei-desktop .pick-print-title h2 {font-size:18px;}
  body.ruiwei-desktop .pick-table-wrap {overflow:visible;}
  body.ruiwei-desktop .pick-table {min-width:0;width:100%;font-size:11px;}
  body.ruiwei-desktop .pick-table :is(th,td) {font-size:11px;padding:3px 5px;}
  body.ruiwei-desktop .pick-table td small {font-size:10px;}
  body.ruiwei-desktop .pick-notice {padding:0;background:none;}
}
.account-summary-table{width:100%}
.account-summary-table .account-editor-row td{background:var(--ui-surface,#fff);padding:14px}
.account-summary-table [data-account-summary-row] td{vertical-align:middle}
.account-summary-table [data-account-edit]{white-space:nowrap}
.account-roles{display:grid;gap:8px}
.account-role-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:6px}
.account-role-options label{display:grid;grid-template-columns:auto 1fr;column-gap:5px;align-items:start;padding:6px;border:1px solid var(--ui-legacy-c9d1dc);border-radius:6px}
.account-role-options small{grid-column:2;color:var(--ui-muted,#526070);font-size:11px}
.account-management{display:flex;gap:7px;align-items:center}
.account-editor-actions{display:flex;flex-wrap:wrap;gap:8px}
.account-editor-row[hidden]{display:none!important}
.account-preview-group{margin:12px 0}
.account-preview-group h4{margin:0 0 4px}
.account-preview-group :is(ul,p){margin:0}
body.ruiwei-desktop .production-nav .nav-readonly-tag{margin-left:6px;color:var(--ui-text-subtle);font-size:11px;font-weight:400}
@media(max-width:760px){
  .account-summary-table,.account-summary-table tbody{display:block;width:100%}
  .account-summary-table thead{display:none}
  body.ruiwei-desktop .account-summary-table tbody tr[data-account-summary-row]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:10px;border-bottom:1px solid var(--ui-border-soft);height:auto;min-height:0}
  body.ruiwei-desktop .account-summary-table tbody tr[data-account-summary-row] td{display:block;padding:0;border:0;min-width:0;height:auto;overflow-wrap:anywhere}
  .account-summary-table tr[data-account-summary-row] td:nth-child(1){font-weight:700}
  .account-summary-table tr[data-account-summary-row] td:nth-child(2),.account-summary-table tr[data-account-summary-row] td:nth-child(3),.account-summary-table tr[data-account-summary-row] td:nth-child(4){grid-column:1}
  .account-summary-table tr[data-account-summary-row] td:nth-child(5){grid-column:2;grid-row:1 / span 4;align-self:center}
  body.ruiwei-desktop .account-summary-table tbody .account-editor-row{display:block;width:100%;height:auto}
  body.ruiwei-desktop .account-summary-table tbody .account-editor-row td{display:block;padding:10px;height:auto}
}
#account-authz-preview{max-width:min(560px,90vw);border:0;border-radius:10px;padding:22px}
#panel-production-records.history-only > :not(#production-history){display:none!important}
#panel-purchase-intake.job-readonly-intake .import-steps,
#panel-purchase-intake.job-readonly-intake .intake-toolbar,
#panel-purchase-intake.job-readonly-intake #intake-line-detail,
#panel-purchase-intake.job-readonly-intake #intake-preview,
#panel-purchase-intake.job-readonly-intake #intake-file,
#panel-purchase-intake.job-readonly-intake [data-intake-reselect],
#panel-purchase-intake.job-readonly-intake [data-intake-match],
#panel-purchase-intake.job-readonly-intake [data-intake-minimal-product]{display:none!important}
#panel-production-requirements.job-readonly-requirements [data-req-new],
#panel-production-requirements.job-readonly-requirements [data-req-batch],
#panel-production-requirements.job-readonly-requirements #req-confirm-form,
#panel-production-requirements.job-readonly-requirements [data-req-cancel],
#panel-production-requirements.job-readonly-requirements [data-req-coverage],
#panel-production-requirements.job-readonly-requirements [data-req-use-stock],
#panel-production-requirements.no-reference-write [data-req-reference-save]{display:none!important}
#panel-production-requirements.no-weight-read [data-req-weight]{pointer-events:none;cursor:default}

.owner-view-toolbar{display:flex;align-items:end;gap:10px;margin:16px 0}
.owner-view-toolbar label{display:grid;gap:4px}
.owner-view-toolbar input,.owner-view-toolbar button{min-height:42px;padding:8px}
.owner-view-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.owner-view-card{border:1px solid var(--ui-legacy-c9d1dc);border-radius:12px;background:var(--ui-surface);padding:16px;min-width:0}
.owner-view-card h3{margin:0 0 10px;font-size:17px}
.owner-view-value{font-size:24px;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.owner-view-value small{font-size:14px;font-weight:400}
.owner-view-card>small{display:block;margin:12px 0;color:var(--ui-muted);font-size:12px}
.owner-view-card button{min-height:40px}
.owner-view-cost-item{margin-top:10px;font-size:16px}
.owner-view-cost-item b,.owner-view-cost-item small{display:block}
.owner-view-cost-item small{margin-top:4px}
.owner-view-machine-days,.owner-view-materials{display:grid;gap:5px;font-size:16px;font-weight:500}
@media(max-width:600px){.owner-view-cards{grid-template-columns:minmax(0,1fr)}.owner-view-card{padding:14px}.owner-view-value{font-size:21px}}
.family-preview{display:grid;gap:12px;max-width:100%;min-width:0}
.family-preview article{border:1px solid #cbd5e1;border-radius:8px;padding:12px;min-width:0;overflow-wrap:anywhere}
.family-preview h4{margin:0 0 8px;overflow-wrap:anywhere}
.family-change{display:flex;flex-wrap:wrap;gap:8px 16px;border-top:1px solid #e2e8f0;padding:8px 0;align-items:center}
.family-change span,.family-change label,.family-member-list{overflow-wrap:anywhere;min-width:0}
@media(max-width:600px){.family-change{display:grid;grid-template-columns:1fr}.family-change label{display:flex;gap:8px;align-items:flex-start}}
/* Wage controls stay inside their panel on desktop and narrow screens. */
.piecework-wage-days small{display:block;max-width:28rem;white-space:normal;overflow-wrap:anywhere}
#panel-piecework .piecework-wage-days .simple-table{min-width:900px}
#panel-piecework .piecework-worker-summary{min-width:950px}
#panel-piecework .piecework-worker-summary td:first-child{min-width:120px}
.piecework-wage-settings .simple-form{max-width:100%;min-width:0}
#piecework-hours-dialog{max-width:calc(100vw - 24px);box-sizing:border-box}
#piecework-hours-dialog .simple-form,#piecework-hours-dialog label{min-width:0;max-width:100%}
#piecework-hours-dialog input{box-sizing:border-box;max-width:100%}
@media(max-width:720px){
  #panel-piecework :is(.piecework-worker-summary,.piecework-wage-days .simple-table){min-width:0;width:100%;display:block}
  #panel-piecework :is(.piecework-worker-summary,.piecework-wage-days .simple-table) thead{display:none}
  #panel-piecework :is(.piecework-worker-summary,.piecework-wage-days .simple-table) tbody{display:block;width:100%}
  #panel-piecework :is(.piecework-worker-summary,.piecework-wage-days .simple-table) tbody tr{display:block;height:auto;padding:10px 0;border-bottom:1px solid var(--ui-border)}
  #panel-piecework :is(.piecework-worker-summary,.piecework-wage-days .simple-table) tbody td{display:block;height:auto;min-width:0;padding:5px 0;border:0;overflow-wrap:anywhere}
  #panel-piecework :is(.piecework-worker-summary,.piecework-wage-days .simple-table) td[data-label]::before{content:attr(data-label);display:block;color:var(--ui-text-muted);font-size:13px;font-weight:600}
  #panel-piecework .piecework-worker-summary .piecework-counts>*{max-width:100%;box-sizing:border-box}
}

/* Menu 1009: grouped navigation and a stable account disclosure. */
body.ruiwei-desktop .production-shell .production-nav .nav-group h2 {margin:8px 0 0;padding:0;border-top:1px solid var(--ui-border-soft);}
body.ruiwei-desktop .production-shell .production-nav .nav-group [data-nav-group-toggle] {display:flex;align-items:center;gap:5px;width:100%;font-weight:700;color:var(--ui-text);text-align:left;}
body.ruiwei-desktop .production-shell .production-nav .nav-group-items[hidden] {display:none!important;}
body.ruiwei-desktop .production-shell .production-nav .nav-group-items {display:grid;gap:2px;}
body.ruiwei-desktop .production-shell .production-nav .nav-group-items button {text-align:left;}
body.ruiwei-desktop .nav-todo-dot {width:7px;height:7px;background:var(--ui-danger);border-radius:50%;margin-left:auto;flex:none;}
body.ruiwei-desktop .nav-todo-dot[hidden] {display:none!important;}
body.ruiwei-desktop .top-user-menu-content {box-sizing:border-box;min-width:min(220px,calc(100vw - 16px));width:min(300px,calc(100vw - 16px));max-height:calc(100dvh - 100px);overflow:auto;}
body.ruiwei-desktop #top-user-menu > summary:focus-visible,body.ruiwei-desktop [data-nav-group-toggle]:focus-visible {outline:2px solid var(--ui-brand);outline-offset:2px;}
@media(max-width:760px){body.ruiwei-desktop #top-user-menu > summary{max-width:136px;}body.ruiwei-desktop .production-nav #nav-groups{max-height:calc(100dvh - 64px);overflow:auto;}}

/* Keep owner dates/source readable and inventory rows compact on shared mobile screens. */
body.ruiwei-desktop .owner-view-toolbar{flex-wrap:wrap;max-width:100%;}
body.ruiwei-desktop .owner-view-toolbar label{min-width:0;max-width:100%;}
body.ruiwei-desktop #owner-view-as-of{white-space:normal;overflow:visible;overflow-wrap:anywhere;max-width:100%;}
body.ruiwei-desktop #warehouse-inventory-table{height:auto;min-height:0;max-width:100%;}
body.ruiwei-desktop #warehouse-inventory-table table{min-width:780px;}
body.ruiwei-desktop #warehouse-inventory-table :is(th,td):first-child{min-width:220px;}
body.ruiwei-desktop #warehouse-inventory-table table{height:auto;}
body.ruiwei-desktop #warehouse-inventory-table :is(th,td){vertical-align:top;}
body.ruiwei-desktop #warehouse-inventory-table td small{display:block;}

/* Account creation and password reset use the existing settings form rhythm. */
#account-create-dialog,#account-reset-dialog{max-width:min(640px,calc(100vw - 32px));box-sizing:border-box;max-height:90vh;overflow:auto}
#account-create-dialog fieldset{display:flex;flex-wrap:wrap;gap:12px}
#account-create-dialog label,#account-reset-dialog label{min-width:0;max-width:100%}
#account-create-dialog input:not([type=checkbox]),#account-reset-dialog input,#account-reset-dialog textarea{box-sizing:border-box;width:100%;max-width:100%}
.account-summary-table td>small{display:block;color:var(--ui-text-muted)}

/* Mobile reporting cards share the desktop body class; reset its generic row height. */
@media(max-width:599.98px){
  body.ruiwei-desktop #panel-production-records #entry-rows>tr[data-entry-machine],
  body.ruiwei-desktop #panel-production-records #entry-rows>tr[data-entry-exception-row],
  body.ruiwei-desktop #panel-production-records #entry-rows>tr[data-entry-machine]>td,
  body.ruiwei-desktop #panel-production-records #entry-rows>tr[data-entry-exception-row]>td{height:auto;min-height:0;max-height:none}
}
#quality-content [data-quality-run-picker]{min-width:0;max-width:100%;grid-column:1/-1;display:grid;gap:10px;border:1px solid var(--ui-border);border-radius:8px;padding:12px}
#quality-content [data-quality-run-picker] label{min-width:0;max-width:100%}
#quality-content [data-quality-run-picker] :is(input,select){width:100%;min-width:0;max-width:100%;box-sizing:border-box}
#production-inbound-corrections-detail article{padding:12px 0;border-bottom:1px solid var(--ui-border);overflow-wrap:anywhere}

/* Kingdee handoff: source cards on phones, no sideways search for actions. */
@media(max-width:760px){
 #kingdee-handoffs-content .quality-table-wrap{overflow:visible;}
 #kingdee-handoffs-content .qf-handoff-table{display:block;width:100%;min-width:0;}
 #kingdee-handoffs-content .qf-handoff-table thead{display:none;}
 #kingdee-handoffs-content .qf-handoff-table tbody{display:block;}
 #kingdee-handoffs-content .qf-handoff-table tr{display:block;height:auto;min-height:0;max-height:none;margin:12px 0;border:1px solid var(--ui-border,#ddd);border-radius:8px;padding:8px;}
 #kingdee-handoffs-content .qf-handoff-table td{display:block;height:auto;min-height:0;max-height:none;width:auto;max-width:100%;padding:6px;white-space:normal;overflow-wrap:anywhere;}
 #kingdee-handoffs-content .qf-handoff-table td[data-label]::before{content:attr(data-label);display:block;font-weight:600;color:var(--ui-label,#555);}
 #kingdee-handoffs-content input[type=checkbox]{width:auto;min-width:0;margin-right:8px;}
 #kingdee-handoffs-content [data-qf-batch-panel]{max-width:100%;overflow-wrap:anywhere;}
 #kingdee-handoffs-content button{min-height:40px;white-space:normal;}
}
/* 维护者首页“待补资料”：默认收起一行；展开后在本区域内滚动，不遮挡首页其他内容 */
#home-maintenance{flex:none;min-width:0}
#home-maintenance>summary{cursor:pointer;font-weight:600;padding:6px 0}
#home-maintenance .home-maintenance-body{max-height:min(55vh,520px);overflow:auto;min-width:0}
#home-maintenance .workflow-list li ul{margin:4px 0 0;padding-left:16px}
#home-maintenance .workflow-list li ul li{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center}
/* 第11批：更新工艺——首次设置（连续表单，手机不横向滚动） */
#bridge-setup{border:1px solid var(--ui-border);border-radius:8px;padding:12px;margin:12px 0;min-width:0}
#bridge-setup fieldset{border:1px solid var(--ui-border);border-radius:8px;margin:10px 0;padding:10px;min-width:0}
#bridge-setup legend{font-weight:600}
#bridge-setup .bridge-setup-products{max-height:260px;overflow:auto;overscroll-behavior:contain}
#bridge-setup [data-setup-plan] button,#bridge-setup [data-setup-preview]{margin:6px 6px 6px 0}
#bridge-setup .bridge-setup-group{overflow-wrap:anywhere}
/* 网站备案号：登录页及各页底部；未配置时不占位置 */
.site-filing{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 16px;padding:16px;font-size:12px;color:var(--ui-muted,#667085)}
.site-filing:empty{display:none}
.site-filing a{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.site-filing a:hover{text-decoration:underline}
