:root {
  --bg: #f2f5f5;
  --surface: rgba(255, 255, 255, .92);
  --surface-strong: #fff;
  --ink: #10272d;
  --muted: #667a80;
  --quiet: #91a0a4;
  --line: #dfe7e8;
  --teal: #0d8796;
  --teal-dark: #0a5965;
  --nav: #102d34;
  --coral: #ef626d;
  --green: #28a879;
  --amber: #f1a83b;
  --shadow: 0 18px 50px rgba(26, 62, 69, .08), 0 2px 8px rgba(26, 62, 69, .04);
  --shadow-soft: 0 8px 28px rgba(26, 62, 69, .07);
}

.journey-dock-go:disabled,
.journey-next-action .primary-button:disabled {
  cursor: default;
  opacity: .52;
  box-shadow: none;
  transform: none;
}

/* Relationship-aware order and procurement workbenches */
.relationship-workbench-modal .action-sheet{width:min(1380px,calc(100vw - 36px));max-height:calc(100vh - 28px)}
.relationship-workbench-modal .action-body{overflow:auto;padding:0;overflow-anchor:none}
.relationship-workbench{display:grid;grid-template-columns:minmax(330px,.62fr) minmax(620px,1.78fr);grid-template-rows:auto minmax(0,1fr);min-height:620px;background:#f8fafc}
.relationship-picker,.relationship-workbench>aside,.workbench-form{padding:24px;border-right:1px solid #dce4ef;min-width:0}
.relationship-picker{grid-column:1;grid-row:1;padding-bottom:12px}
.relationship-workbench>aside{grid-column:1;grid-row:2;padding-top:0;background:#f3f7ff;height:420px;overflow:auto;overflow-anchor:none;overscroll-behavior:contain}
.workbench-form{grid-column:2;grid-row:1/3;border-right:0;background:#fff}
.relationship-picker header{display:grid;gap:14px;margin-bottom:14px}
.relationship-picker header small,.line-editor-heading small,.hover-preview-card>small{color:#58708f;font-size:12px;font-weight:700;letter-spacing:.04em}
.relationship-picker h3,.line-editor-heading h3,.hover-preview-card h3{margin:3px 0 0;color:#13233f;font-size:20px}
.relationship-picker header label{height:42px;display:flex;align-items:center;gap:9px;padding:0 12px;border:1px solid #cbd7e6;border-radius:12px;background:#fff}
.relationship-picker header label:focus-within{border-color:#3673f4;box-shadow:0 0 0 3px rgba(54,115,244,.12)}
.relationship-picker header svg{width:17px;height:17px;color:#7184a0;fill:none;stroke:currentColor;stroke-width:1.8}
.relationship-picker header input{width:100%;border:0;outline:0;font-size:14px;color:#15243c;background:transparent}
.relationship-list{display:grid;gap:7px;max-height:505px;overflow:auto;padding-right:4px}
.relationship-option{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;padding:10px;border:1px solid transparent;border-radius:12px;text-align:left;background:transparent;color:#15243c}
.relationship-option:hover,.relationship-option:focus-visible{background:#fff;border-color:#b8c9e4;box-shadow:0 8px 24px rgba(30,54,91,.08);outline:0}
.relationship-option.selected{background:#eaf1ff;border-color:#4d82f3;box-shadow:inset 3px 0 #2f6ff2,0 8px 24px rgba(30,82,170,.1)}
.relationship-option>span{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#e7eef9;color:#275aa8;font-weight:800;font-size:12px}
.relationship-option b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.relationship-option small{display:block;margin-top:3px;color:#70829d;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.relationship-option em{display:grid;justify-items:end;gap:3px;font-size:11px;color:#526d93;font-style:normal;white-space:nowrap}
.relationship-option em i{padding:2px 6px;border-radius:999px;background:#edf2f8;color:#7b899c;font-size:9px;font-style:normal}
.relationship-option.selected em i{background:#2f6ff2;color:#fff}
.relationship-selected{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:9px;margin:10px 0 12px;padding:9px 10px;border:1px solid #c9daf8;border-radius:11px;background:#f2f6ff;color:#1a3358}
.relationship-selected>svg{width:16px;height:16px;padding:7px;border-radius:9px;background:#dfeaff;color:#2f6ff2;box-sizing:content-box}
.relationship-selected b,.relationship-selected small{display:block}
.relationship-selected b{font-size:12px}
.relationship-selected small{margin-top:2px;color:#687e9e;font-size:10px}
.relationship-selected>em{padding:4px 8px;border-radius:999px;background:#dff5eb;color:#13745f;font-size:10px;font-style:normal;font-weight:700}
.relationship-selected>[data-relationship-change]{padding:6px 9px;border:1px solid #a9c2ec;border-radius:8px;background:#fff;color:#285fae;font-size:10px;font-weight:750;cursor:pointer}
.relationship-selected>[data-relationship-change]:hover,.relationship-selected>[data-relationship-change]:focus-visible{border-color:#2f6ff2;box-shadow:0 0 0 3px rgba(47,111,242,.1);outline:0}
.relationship-selected.is-empty{border-style:dashed;background:#f8fafc;color:#718096}
.relationship-selected.is-empty>svg{background:#edf1f5;color:#8190a3}
.relationship-selected.is-empty>em{display:none}
.relationship-picker.is-relationship-collapsed .relationship-list{display:none}
.hover-preview-empty{display:grid;place-content:center;min-height:300px;text-align:center;color:#71839e}
.hover-preview-empty b{font-size:17px;color:#2a3f61}.hover-preview-empty p{max-width:250px;line-height:1.6;font-size:13px}
.hover-preview-card{position:sticky;top:0;padding:20px;border:1px solid #cbdaf3;border-radius:16px;background:#fff;box-shadow:0 14px 32px rgba(37,66,108,.08)}
.hover-preview-card p{color:#6a7e9c;font-size:13px;line-height:1.5}.hover-preview-card h4{margin:18px 0 8px;font-size:13px;color:#415675}
.hover-preview-card ul,.product-price-history ul{list-style:none;margin:0;padding:0;display:grid;gap:7px}
.hover-preview-card li,.product-price-history li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border-radius:10px;background:#f5f8fd}
.hover-preview-card li span,.product-price-history li span{min-width:0}.hover-preview-card li b,.product-price-history li b{display:block;font-size:12px;color:#243b5d}.hover-preview-card li small,.product-price-history li small{display:block;margin-top:2px;font-size:11px;color:#7a8ca5}.hover-preview-card li em,.product-price-history li em{font-size:11px;font-style:normal;color:#315f9e;white-space:nowrap}
.fact-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.fact-tags span{padding:4px 8px;border-radius:999px;background:#e8f5f0;color:#147c65;font-size:11px}.fact-tags.muted span{background:#eef2f6;color:#71839d}
.copy-source{display:grid;grid-template-columns:minmax(250px,1fr) 1fr;align-items:end;gap:12px;margin-bottom:18px;padding:14px;border:1px solid #d7e0ed;border-radius:14px;background:#f8fafc}.copy-source label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#405575;min-width:0}.copy-source select{width:100%;min-width:0;max-width:100%;height:40px;border:1px solid #c8d5e5;border-radius:10px;background:#fff;padding:0 10px;color:#1d304e}.copy-source small{font-size:12px;color:#71839d;line-height:1.5;min-width:0}
.receipt-declaration{margin-top:20px;padding:16px;border:1px solid #cadbf4;border-radius:16px;background:linear-gradient(135deg,#f5f8ff,#fff)}
.receipt-declaration>header{display:flex;align-items:center;justify-content:space-between;gap:18px}
.receipt-declaration>header small{color:#5273aa;font-size:10px;font-weight:800;letter-spacing:.04em}
.receipt-declaration>header h3{margin:3px 0 0;color:#18345e;font-size:16px}
.receipt-declaration>header p{max-width:610px;margin:5px 0 0;color:#6b7f9d;font-size:11px;line-height:1.55}
.receipt-declaration>header>label{display:flex;align-items:center;gap:8px;padding:9px 11px;border:1px solid #abc3ea;border-radius:10px;background:#fff;color:#285da8;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}
.receipt-declaration-fields{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:14px;padding-top:14px;border-top:1px solid #dce6f5}
.receipt-declaration-fields[hidden]{display:none}
.receipt-declaration-fields>label{display:grid;gap:6px;color:#405575;font-size:11px;font-weight:700}
.receipt-declaration-fields input,.receipt-declaration-fields textarea{width:100%;border:1px solid #c8d5e5;border-radius:10px;background:#fff;padding:10px;color:#1d304e;box-sizing:border-box}
.receipt-declaration-fields textarea{min-height:74px;resize:vertical}
.receipt-declaration-fields .wide{grid-column:1/-1}
.receipt-declaration-fields .receipt-customs{display:flex;grid-column:1/-1;align-items:center;gap:8px}
.receipt-declaration-fields .receipt-customs input{width:auto}
.order-draft-button{display:inline-flex;align-items:center;gap:6px}
.order-draft-button svg{width:15px;height:15px}
.line-editor-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:22px 0 10px}.line-editor-heading button{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 12px;border:1px solid #a9bfe0;border-radius:10px;background:#fff;color:#285da8;font-weight:700;font-size:12px}.line-editor-heading svg,.record-copy-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}
.business-line{display:grid;grid-template-columns:minmax(180px,1.35fr) 90px 120px minmax(120px,.8fr) 36px;align-items:end;gap:8px;padding:10px 0;border-bottom:1px solid #edf1f6}.business-line.purchase-line{grid-template-columns:minmax(160px,1.15fr) minmax(140px,1fr) 80px 120px 36px}.business-line label{display:grid;gap:5px}.business-line small{font-size:11px;color:#6c7f9c}.business-line input,.business-line select{height:39px;min-width:0;border:1px solid #cbd7e6;border-radius:9px;background:#fff;padding:0 9px;font-size:13px;color:#1d304e}.business-line>button{display:grid;place-items:center;width:36px;height:39px;border:0;border-radius:9px;background:#fff0f2;color:#c73c52}.business-line>button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}
.requisition-workbench{grid-template-columns:minmax(300px,340px) minmax(0,1fr)}
.procurement-workspace-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.warehouse-workspace-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.finance-workspace-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:2px}
.system-management-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;padding:2px}
.procurement-workspace-grid,
.warehouse-workspace-grid,
.finance-workspace-grid,
.sales-workspace-grid,
.sales-monthly-chart{margin-block-end:14px}
.system-management-card{min-width:0;min-height:154px;padding:16px;display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:1fr auto;gap:12px;color:var(--ink);text-align:left;background:linear-gradient(145deg,#fff 0%,var(--module-soft) 145%);border:1px solid color-mix(in srgb,var(--module-accent) 20%,var(--line));border-radius:18px;box-shadow:0 8px 24px rgba(23,38,65,.045);transition:.18s ease}
.system-management-card:hover,.system-management-card:focus-visible{border-color:color-mix(in srgb,var(--module-accent) 58%,var(--line));box-shadow:0 14px 30px rgba(23,38,65,.09);transform:translateY(-2px)}
.system-management-card>span{width:44px;height:44px;display:grid;place-items:center;color:var(--module-accent);background:#fff;border:1px solid color-mix(in srgb,var(--module-accent) 16%,var(--line));border-radius:14px}.system-management-card>span svg{width:22px;height:22px}.system-management-card div{min-width:0}.system-management-card small{display:block;margin-bottom:4px;color:var(--muted);font-size:.74rem}.system-management-card b{display:block;font-size:1rem}.system-management-card p{margin:7px 0 0;color:var(--muted);font-size:.82rem;line-height:1.55}.system-management-card em{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;color:var(--module-accent);font-style:normal;font-weight:700}.system-management-card em svg{width:16px;height:16px}.system-management-proof{margin-top:14px}.system-management-proof>p{max-width:920px;color:var(--muted);line-height:1.65}
.sales-progress-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px}.sales-progress-list{display:grid;gap:12px}.sales-progress-order{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff}.sales-progress-order>button{width:100%;padding:14px 16px;display:grid;grid-template-columns:minmax(240px,1.4fr) minmax(150px,.55fr) minmax(210px,.75fr) 22px;gap:16px;align-items:center;text-align:left;color:var(--ink);background:linear-gradient(90deg,var(--module-soft),#fff 56%);border:0;border-bottom:1px solid var(--line)}.sales-progress-order>button>span{min-width:0}.sales-progress-order>button small,.sales-progress-product small{display:block;color:var(--muted);font-size:.72rem}.sales-progress-order>button b{display:block;margin-top:3px}.sales-progress-order>button em{display:block;margin-top:4px;color:var(--muted);font-size:.78rem;font-style:normal}.sales-progress-order>button svg{width:18px;height:18px;color:var(--module-accent)}.sales-progress-products{padding:4px 16px 10px}.sales-progress-product{display:grid;grid-template-columns:minmax(210px,1.25fr) repeat(3,minmax(155px,1fr));gap:14px;align-items:center;padding:11px 0;border-bottom:1px dashed var(--line)}.sales-progress-product:last-child{border-bottom:0}.sales-progress-product b{display:block;margin-top:3px;font-size:.82rem;line-height:1.35}.sales-progress-product>span:first-child b{font-size:.9rem}
@media(max-width:1100px){.system-management-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1100px){.sales-progress-layout{grid-template-columns:1fr}.sales-progress-product{grid-template-columns:1fr 1fr}.sales-progress-order>button{grid-template-columns:1fr 1fr 22px}.sales-progress-order>button>span:first-child{grid-column:1/-1}}
@media(max-width:720px){.system-management-grid{grid-template-columns:1fr}.sales-progress-product,.sales-progress-order>button{grid-template-columns:1fr}.sales-progress-order>button svg{display:none}}
.sales-workspace-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;padding:2px}
.procurement-workspace-card,.warehouse-workspace-card,.finance-workspace-card,.sales-workspace-card{min-width:0;min-height:154px;padding:16px;display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:1fr auto;gap:12px;color:var(--ink);text-align:left;background:linear-gradient(145deg,#fff 0%,var(--module-soft) 145%);border:1px solid color-mix(in srgb,var(--module-accent) 20%,var(--line));border-radius:18px;box-shadow:0 8px 24px rgba(23,38,65,.045);transition:.18s ease}
.finance-workspace-card{background:linear-gradient(145deg,#fff 0%,#f3f7fb 82%,var(--module-soft) 150%);border-color:color-mix(in srgb,#234e78 22%,var(--line));box-shadow:0 10px 26px rgba(17,45,75,.06)}
.procurement-workspace-card:hover,.procurement-workspace-card:focus-visible,.warehouse-workspace-card:hover,.warehouse-workspace-card:focus-visible,.finance-workspace-card:hover,.finance-workspace-card:focus-visible,.sales-workspace-card:hover,.sales-workspace-card:focus-visible{border-color:color-mix(in srgb,var(--module-accent) 58%,var(--line));box-shadow:0 14px 30px rgba(23,38,65,.09);transform:translateY(-2px)}
.procurement-workspace-card>span,.warehouse-workspace-card>span,.finance-workspace-card>span,.sales-workspace-card>span{width:44px;height:44px;display:grid;place-items:center;color:var(--module-accent);background:#fff;border:1px solid color-mix(in srgb,var(--module-accent) 16%,var(--line));border-radius:14px}
.procurement-workspace-card>span svg,.warehouse-workspace-card>span svg,.finance-workspace-card>span svg,.sales-workspace-card>span svg{width:22px;height:22px}.procurement-workspace-card div,.warehouse-workspace-card div,.finance-workspace-card div,.sales-workspace-card div{min-width:0}.procurement-workspace-card small,.warehouse-workspace-card small,.finance-workspace-card small,.sales-workspace-card small{display:block;margin-bottom:4px;color:var(--muted);font-size:.74rem}.procurement-workspace-card b,.warehouse-workspace-card b,.finance-workspace-card b,.sales-workspace-card b{display:block;font-size:1rem}.procurement-workspace-card p,.warehouse-workspace-card p,.finance-workspace-card p,.sales-workspace-card p{margin:7px 0 0;color:var(--muted);font-size:.82rem;line-height:1.55}.procurement-workspace-card em,.warehouse-workspace-card em,.finance-workspace-card em,.sales-workspace-card em{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;color:var(--module-accent);font-style:normal;font-weight:700}.procurement-workspace-card em svg,.warehouse-workspace-card em svg,.finance-workspace-card em svg,.sales-workspace-card em svg{width:16px;height:16px}
.sales-monthly-chart{padding:20px;border:1px solid color-mix(in srgb,var(--module-accent) 18%,var(--line));border-radius:20px;background:linear-gradient(145deg,#fff,var(--module-soft));box-shadow:0 10px 30px rgba(24,50,82,.05)}.sales-monthly-chart>header{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:16px}.sales-monthly-chart header small{color:var(--module-accent);font-size:.76rem;font-weight:750}.sales-monthly-chart h2{margin:4px 0 0;font-size:1.15rem}.sales-monthly-chart header>span{color:var(--muted);font-size:.78rem}.sales-monthly-chart>div{display:grid;gap:9px}.sales-chart-row{display:grid;grid-template-columns:minmax(190px,.42fr) minmax(260px,1fr);align-items:center;gap:14px;width:100%;padding:8px 10px;border:0;border-radius:10px;color:var(--ink);background:rgba(255,255,255,.58);text-align:left;cursor:pointer}.sales-chart-row:hover,.sales-chart-row:focus-visible{background:#fff;box-shadow:0 5px 16px rgba(27,53,84,.07)}.sales-chart-row>span{display:flex;align-items:center;justify-content:space-between;gap:10px}.sales-chart-row b{font-size:.82rem}.sales-chart-row small{color:var(--muted);font-size:.75rem}.sales-chart-row>i{height:9px;overflow:hidden;border-radius:99px;background:#e8edf4}.sales-chart-row>i>em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--module-accent),color-mix(in srgb,var(--module-accent) 58%,#8ed9cc))}
#modulePrimary{white-space:nowrap;min-width:max-content}
.requisition-line-stage{background:#fff}.requisition-toolbar{display:grid;grid-template-columns:minmax(148px,auto) minmax(240px,1fr) minmax(170px,.55fr);align-items:end;gap:12px;margin:14px 0;padding:12px;border:1px solid #dbe5f2;border-radius:11px;background:#f7faff}.requisition-toolbar>label{display:grid;gap:5px;min-width:0;color:#425774;font-size:11px;font-weight:700}.requisition-toolbar>label:first-child{display:flex;align-items:center;gap:7px;height:40px;white-space:nowrap}.requisition-toolbar input[type="text"],.requisition-toolbar input[type="date"],.requisition-toolbar input:not([type]){width:100%;height:39px;border:1px solid #cbd7e6;border-radius:9px;padding:0 10px;background:#fff;color:#1d304e}
.requisition-line{display:grid;grid-template-columns:22px minmax(210px,1.4fr) 92px minmax(145px,.65fr);align-items:center;gap:12px;margin-bottom:8px;padding:12px;border:1px solid #dce5ef;border-radius:11px;background:#fff;cursor:pointer;transition:.18s ease}.requisition-line:hover{border-color:#9ebbea;box-shadow:0 7px 20px rgba(47,111,242,.07)}.requisition-line.selected{border-color:#6b99e5;background:#f5f8ff}.requisition-line>input{width:17px;height:17px;accent-color:#3d78d8}.requisition-line>span{display:flex;flex-direction:column;min-width:0}.requisition-line b{font-size:13px;color:#1b2f4c}.requisition-line small{margin-top:3px;color:#71839c;font-size:11px}.requisition-line>em{color:#33557e;font-size:12px;font-style:normal;font-weight:750}.requisition-price input{height:37px;border:1px solid #cbd7e6;border-radius:8px;padding:0 9px;background:#fff;color:#1c304e}.requisition-proof{display:flex;align-items:flex-start;gap:8px;margin:12px 0 0;padding:11px;border-radius:9px;color:#356856;background:#edf8f3;font-size:11px;line-height:1.55}.requisition-proof svg{flex:0 0 auto;width:15px;height:15px;margin-top:1px;fill:none;stroke:currentColor;stroke-width:1.8}
.workbench-checkbox{display:flex;align-items:center;gap:8px;font-size:13px;color:#405575}.workbench-checkbox input{width:17px;height:17px}
.instruction-prerequisite{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px;padding:14px 15px;border:1px solid #d9e4f3;border-radius:12px;background:#f7faff}.instruction-prerequisite small,.instruction-prerequisite b,.instruction-prerequisite p{display:block}.instruction-prerequisite small{color:#4775bf;font-size:10px;font-weight:800}.instruction-prerequisite b{margin-top:3px;color:#243a58;font-size:13px}.instruction-prerequisite p{margin:5px 0 0;color:#6e8099;font-size:11px;line-height:1.55}.instruction-prerequisite>div:last-child{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.instruction-prerequisite .ghost-button{min-height:36px;white-space:nowrap}
.product-price-history,.relationship-history{margin-top:20px;padding:16px;border:1px solid #d8e2ef;border-radius:15px;background:#fbfcfe}.product-price-history header,.relationship-history header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.product-price-history header small,.relationship-history header small{display:block;color:#71839d;font-size:11px}.product-price-history header b,.relationship-history header b{display:block;margin-top:2px;color:#203653;font-size:15px}.product-price-history>div{display:grid;grid-template-columns:1fr 1fr;gap:12px}.product-price-history article{padding:11px;border-radius:12px;background:#fff}.product-price-history h4{margin:0 0 8px;font-size:12px;color:#4a607f}.product-price-history li.empty,.relationship-history>p{justify-content:center;color:#8090a6;font-size:12px}
.relationship-history>button{display:grid;grid-template-columns:minmax(120px,.7fr) minmax(160px,1fr) 20px;align-items:center;gap:12px;width:100%;padding:10px;border:0;border-top:1px solid #e7edf5;background:transparent;text-align:left}.relationship-history>button:hover{background:#f2f6fd}.relationship-history>button b{display:block;font-size:12px;color:#223a5c}.relationship-history>button small{display:block;margin-top:2px;font-size:11px;color:#71839d}.relationship-history>button svg{width:16px;height:16px;fill:none;stroke:#55749e;stroke-width:1.8}
.record-copy-button{min-width:138px;margin-left:0;align-self:center;justify-self:end;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:36px;padding:0 12px;border:1px solid #bdcbe0;border-radius:10px;background:#fff;color:#315e9e;font-size:12px;font-weight:700;line-height:1;white-space:nowrap;word-break:keep-all}
.customer-copy-source{grid-template-columns:1fr;align-items:start;margin-bottom:16px}.customer-copy-source small{margin-top:2px}
@media(max-width:1100px){.procurement-workspace-grid,.warehouse-workspace-grid,.finance-workspace-grid,.sales-workspace-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.relationship-workbench{grid-template-columns:1fr 1fr}.workbench-form{grid-column:1/-1}.relationship-workbench>aside{border-right:0}.business-line,.business-line.purchase-line{grid-template-columns:1fr 1fr}.business-line>button{align-self:end}.requisition-toolbar{grid-template-columns:1fr 1fr}.requisition-toolbar>label:first-child{grid-column:1/-1}.requisition-line{grid-template-columns:22px 1fr 90px}.requisition-price{grid-column:2/-1}}
@media(max-width:720px){.procurement-workspace-grid,.warehouse-workspace-grid,.finance-workspace-grid,.sales-workspace-grid{grid-template-columns:1fr}.sales-chart-row{grid-template-columns:1fr}.relationship-workbench{display:block}.relationship-picker,.relationship-workbench>aside,.workbench-form{padding:16px;border-right:0;border-bottom:1px solid #dce4ef}.relationship-list{max-height:300px}.copy-source,.product-price-history>div{grid-template-columns:1fr}.business-line,.business-line.purchase-line{grid-template-columns:1fr}.business-line>button{width:100%}}
@media(max-width:1100px){
  .relationship-picker{grid-column:1;grid-row:auto}
  .relationship-workbench>aside{grid-column:2;grid-row:auto}
  .workbench-form{grid-column:1/-1;grid-row:auto}
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% -8%, rgba(171, 229, 223, .34), transparent 27rem),
    linear-gradient(135deg, #f6f8f7 0%, #eef3f3 100%);
  font-family: "DM Sans", "Noto Sans SC", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus:not(:focus-visible), input:focus:not(:focus-visible) { outline: none; }
button:focus-visible, input:focus-visible { outline: 2px solid rgba(47,111,242,.45); outline-offset: 2px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.prototype-note {
  position: fixed; z-index: 80; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  color: #496168; background: rgba(255,255,255,.86); border: 1px solid rgba(160,179,184,.35);
  box-shadow: 0 8px 26px rgba(20,45,51,.1); backdrop-filter: blur(14px); font-size: 11px; white-space: nowrap;
}
.prototype-note span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(40,168,121,.1); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 88px minmax(0, 1fr); }
.rail {
  position: fixed; z-index: 30; inset: 0 auto 0 0; width: 88px; display: flex; flex-direction: column; align-items: center;
  padding: 18px 10px 16px; background: linear-gradient(180deg, #102f36 0%, #0c252b 100%); color: #c1d0d3;
  box-shadow: inset -1px 0 rgba(255,255,255,.06);
}
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; padding: 8px; border: 0; border-radius: 15px; background: rgba(255,255,255,.07); cursor: pointer; transition: .2s ease; }
.brand-mark:hover { transform: translateY(-1px); background: rgba(255,255,255,.12); }
.brand-mark img { width: 31px; height: 31px; object-fit: contain; }
.rail-nav { display: flex; flex-direction: column; gap: 7px; width: 100%; margin-top: 38px; }
.rail-bottom { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 7px; margin-top: auto; }
.rail-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; padding: 10px 3px 8px; border: 0; border-radius: 16px; color: #9db2b7; background: transparent; font-size: 10px; cursor: pointer; transition: .18s ease; }
.rail-item svg { width: 21px; height: 21px; }
.rail-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.rail-item.is-active { color: #fff; background: rgba(84, 206, 211, .14); box-shadow: inset 0 0 0 1px rgba(110, 226, 226, .08); }
.rail-item.is-active::before { content: ""; position: absolute; left: -10px; top: 17px; width: 3px; height: 24px; border-radius: 0 4px 4px 0; background: #62d3d2; }
.rail-item b { position: absolute; top: 6px; right: 11px; display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; color: #fff; background: var(--coral); border: 2px solid var(--nav); font-size: 8px; }
.rail-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 14px; color: #8fa5aa; background: transparent; cursor: pointer; }
.rail-icon:hover { color: #fff; background: rgba(255,255,255,.07); }
.avatar { border: 0; border-radius: 50%; color: white; background: linear-gradient(135deg, #13a5b3, #097482); cursor: pointer; font-weight: 600; }
.avatar-small { width: 38px; height: 38px; margin-top: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.account-trigger[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(47,111,242,.16); }
.account-menu { position: fixed; z-index: 180; top: 68px; right: 24px; width: 286px; padding: 9px; border: 1px solid #e0e6ec; border-radius: 16px; color: #26384b; background: #fff; box-shadow: 0 24px 64px rgba(24,43,65,.18), 0 3px 10px rgba(24,43,65,.06); animation: account-menu-in .16s ease-out; }
.account-menu[hidden] { display: none; }
@keyframes account-menu-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } }
.account-menu > header { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 10px; margin: 1px 1px 7px; padding: 10px; border-radius: 11px; background: #f5f8fb; }
.account-menu-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(145deg,#17385d,#2f6ff2); font-size: 12px; font-weight: 700; }
.account-menu header div { min-width: 0; }
.account-menu header b, .account-menu header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu header b { font-size: 10px; }
.account-menu header small { margin-top: 4px; color: #7e8b9d; font-size: 8px; }
.account-menu > button, .account-menu form button { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; width: 100%; padding: 9px; border: 0; border-radius: 11px; color: #26384b; background: transparent; cursor: pointer; text-align: left; }
.account-menu > button:hover, .account-menu form button:hover, .account-menu > button:focus-visible, .account-menu form button:focus-visible { background: #f2f6fa; outline: none; }
.account-menu button > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #42617d; background: #edf3f8; }
.account-menu button > span svg { width: 15px; height: 15px; }
.account-menu button div { min-width: 0; }
.account-menu button b, .account-menu button small { display: block; }
.account-menu button b { font-size: 9px; }
.account-menu button small { margin-top: 3px; color: #8793a3; font-size: 7px; }
.account-menu-arrow { width: 13px; height: 13px; color: #9aa5b4; }
.account-menu-divider { height: 1px; margin: 6px 8px; background: #e8edf1; }
.account-menu form { margin: 0; }
.account-menu form .account-menu-logout { grid-template-columns: 34px 1fr; color: #a53945; }
.account-menu form .account-menu-logout > span { color: #b9414e; background: #fff0f1; }
.workspace-open-menu{position:fixed;z-index:230;width:238px;padding:8px;border:1px solid #dce4ef;border-radius:14px;background:#fff;box-shadow:0 22px 60px rgba(20,38,64,.22),0 3px 10px rgba(20,38,64,.08);color:#17243a}
.workspace-open-menu[hidden]{display:none}
.workspace-open-menu>small{display:block;padding:7px 9px 8px;color:#6f8098;font-size:10px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.workspace-open-menu>button{display:grid;grid-template-columns:32px 1fr;align-items:center;gap:9px;width:100%;padding:9px;border:0;border-radius:10px;background:transparent;color:inherit;text-align:left;cursor:pointer}
.workspace-open-menu>button:hover,.workspace-open-menu>button:focus-visible{background:#eef4ff;outline:0}
.workspace-open-menu>button>svg{width:16px;height:16px;padding:8px;border-radius:9px;background:#e7efff;color:#2f6ff2;box-sizing:content-box}
.workspace-open-menu>button span,.workspace-open-menu>button b,.workspace-open-menu>button small{display:block}
.workspace-open-menu>button b{font-size:12px}
.workspace-open-menu>button small{margin-top:3px;color:#7a899e;font-size:10px}

.workspace { min-width: 0; grid-column: 2; }
.topbar {
  position: sticky; z-index: 24; top: 0; height: 74px; padding: 0 30px; display: grid; grid-template-columns: minmax(215px, 1fr) minmax(330px, 580px) minmax(215px, 1fr); align-items: center; gap: 22px;
  background: rgba(249, 251, 250, .8); border-bottom: 1px solid rgba(193,208,211,.48); backdrop-filter: blur(18px) saturate(150%);
}
.workspace-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.workspace-logo { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #183c43, #0d8b99); box-shadow: 0 5px 12px rgba(13,135,150,.18); font-size: 13px; font-weight: 700; }
.workspace-id div { display: flex; flex-direction: column; min-width: 0; }
.workspace-id strong { font-size: 13px; line-height: 17px; }
.workspace-id small { color: var(--muted); font-size: 10px; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chevron { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 8px; color: var(--quiet); background: transparent; cursor: pointer; }
.chevron svg { width: 14px; height: 14px; }
.command-search { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 11px 0 14px; border: 1px solid rgba(176,194,198,.55); border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.78); box-shadow: 0 2px 8px rgba(28,65,72,.03); cursor: text; }
.command-search:hover { border-color: #a7c3c7; box-shadow: 0 5px 16px rgba(28,65,72,.06); }
.command-search svg { width: 17px; height: 17px; }
.command-search span { flex: 1; text-align: left; font-size: 12px; }
kbd { padding: 3px 7px; border: 1px solid #dce5e6; border-radius: 7px; color: #839398; background: #f5f8f8; box-shadow: 0 1px 0 #fff inset; font-family: inherit; font-size: 9px; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(186,202,205,.58); border-radius: 13px; background: rgba(255,255,255,.75); cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button i { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); border: 1px solid white; }
.create-button { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; border-radius: 13px; color: white; background: var(--nav); box-shadow: 0 7px 16px rgba(16,45,52,.16); cursor: pointer; font-size: 12px; font-weight: 600; }
.create-button:hover { transform: translateY(-1px); background: #173941; }
.create-button svg { width: 16px; height: 16px; }.create-button .mini { width: 12px; height: 12px; margin-left: 2px; opacity: .65; }

.content { width: 100%; max-width: 1540px; min-height: calc(100vh - 74px); margin: 0 auto; padding: 30px 34px 70px; }
.view { display: none; animation: view-in .32s cubic-bezier(.2,.75,.25,1) both; }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 25px; }
.page-intro-actions { display: flex; align-items: center; gap: 9px; }
.page-intro h1 { margin: 5px 0 6px; font-size: clamp(24px, 2.3vw, 35px); line-height: 1.22; letter-spacing: -.035em; font-weight: 650; }
.page-intro h1 em { color: #60747a; font-style: normal; font-weight: 450; }
.page-intro p { margin: 0; color: var(--muted); font-size: 12px; }
.eyebrow { color: #7d9095; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 10px; height: 10px; margin: 0 7px -1px 0; border-radius: 0; background: url("../logo-mark.png") center / contain no-repeat; box-shadow: none; vertical-align: middle; }
.intro-actions { display: flex; gap: 9px; flex: none; }
.primary-button, .ghost-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 13px; cursor: pointer; font-size: 12px; font-weight: 600; transition: .18s ease; }
.primary-button { border: 0; color: white; background: var(--teal); box-shadow: 0 8px 18px rgba(13,135,150,.18); }
.primary-button:hover { transform: translateY(-1px); background: #0a7885; box-shadow: 0 11px 22px rgba(13,135,150,.22); }
.primary-button svg, .ghost-button svg { width: 17px; height: 17px; }
.ghost-button { border: 1px solid #d6e1e3; color: #37535a; background: rgba(255,255,255,.74); }
.ghost-button:hover { border-color: #b6cacc; background: white; }
.compact-intro { align-items: center; margin-bottom: 22px; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr); gap: 17px; }
.focus-card, .pulse-card, .flow-card, .module-section, .assistant-card, .table-card, .receivable-card, .match-card {
  border: 1px solid rgba(199,213,216,.58); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-soft);
}
.focus-card { position: relative; min-height: 310px; padding: 25px 28px; overflow: hidden; background: linear-gradient(135deg, #f4fbfa 0%, #e8f4f2 62%, #e3efed 100%); }
.focus-topline { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.pill-coral { color: #c73e4d; background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px rgba(239,98,109,.18); }
.quiet { display: inline-flex; align-items: center; gap: 5px; color: #71888c; font-size: 10px; }.quiet svg { width: 14px; height: 14px; }
.focus-copy { position: relative; z-index: 2; margin-top: 20px; }
.order-code { color: var(--teal); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.focus-copy h2 { max-width: 660px; margin: 8px 0 9px; font-size: clamp(21px, 2vw, 29px); line-height: 1.3; letter-spacing: -.025em; font-weight: 650; }
.focus-copy p { max-width: 650px; margin: 0; color: #5b7479; font-size: 12px; line-height: 1.7; }
.focus-meta { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-top: 20px; }
.customer-stack { display: flex; align-items: center; gap: 9px; }
.customer-stack > span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 12px; color: #0c7180; background: rgba(255,255,255,.85); box-shadow: 0 4px 13px rgba(24,80,87,.08); font-size: 10px; font-weight: 700; }
.customer-stack div { display: flex; flex-direction: column; }.customer-stack b { font-size: 11px; }.customer-stack small { color: #71868b; font-size: 9px; }
.focus-progress { width: min(215px, 35%); }.focus-progress span { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 5px; color: #647b80; font-size: 9px; }.focus-progress span b { color: var(--teal-dark); }.focus-progress div { height: 5px; border-radius: 99px; background: rgba(23,93,100,.1); overflow: hidden; }.focus-progress i { display: block; width: 78%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #31b7b2, #0f8391); }
.focus-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 15px; margin-top: 18px; }
.primary-button.dark { height: 39px; background: #13373e; box-shadow: 0 8px 18px rgba(19,55,62,.14); }.primary-button.dark svg { width: 15px; height: 15px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; border: 0; color: #49666d; background: transparent; cursor: pointer; font-size: 10px; font-weight: 600; }.text-button:hover { color: var(--teal); }.text-button svg { width: 14px; height: 14px; }
.focus-orb { position: absolute; border-radius: 50%; filter: blur(1px); pointer-events: none; }.orb-one { right: -75px; top: -60px; width: 250px; height: 250px; background: radial-gradient(circle at 35% 40%, rgba(119,211,202,.28), rgba(119,211,202,0) 70%); }.orb-two { left: 43%; bottom: -130px; width: 280px; height: 250px; background: radial-gradient(circle, rgba(255,255,255,.5), rgba(255,255,255,0) 68%); }

.pulse-card { min-height: 310px; padding: 23px; background: rgba(255,255,255,.88); }
.card-heading, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.card-heading h3, .section-heading h2 { margin: 4px 0 0; font-size: 15px; letter-spacing: -.015em; }
.tiny-icon { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 10px; color: var(--quiet); background: #f2f6f6; cursor: pointer; }.tiny-icon svg { width: 16px; height: 16px; }
.money { display: block; margin-top: 24px; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -.035em; }
.trend { margin-top: 5px; color: var(--muted); font-size: 10px; }.trend span { margin-right: 5px; color: #14835f; font-weight: 700; }
.bars { height: 105px; display: flex; align-items: flex-end; gap: 9px; margin-top: 19px; padding: 0 3px; }.bars i { flex: 1; min-width: 7px; border-radius: 5px 5px 2px 2px; background: #dce9e9; }.bars i.active { background: linear-gradient(180deg, #48c1b6, #148a93); box-shadow: 0 4px 12px rgba(20,138,147,.2); }
.bar-labels { display: flex; justify-content: space-between; padding: 5px 3px 0; color: #92a1a5; font-size: 8px; }
.pulse-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding-top: 14px; border-top: 1px solid #ebf0f0; color: var(--muted); font-size: 9px; }.pulse-foot > span { display: flex; align-items: center; gap: 6px; }.pulse-foot button { display: flex; align-items: center; gap: 4px; border: 0; color: var(--teal); background: transparent; cursor: pointer; font-size: 9px; font-weight: 600; }.pulse-foot svg { width: 12px; height: 12px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }.dot.green { background: var(--green); }.dot.amber { background: var(--amber); }.dot.red { background: var(--coral); }

.flow-card { margin-top: 17px; padding: 21px 24px 24px; box-shadow: 0 10px 34px rgba(28,68,76,.05); }
.heading-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 9px; }.heading-meta > span { display: flex; align-items: center; gap: 5px; }
.process-line { display: grid; grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto; align-items: start; margin-top: 25px; }
.process-line > i { height: 2px; margin-top: 19px; background: linear-gradient(90deg, #83c8c7, #d9e5e5); }
.process-step { width: 92px; display: flex; flex-direction: column; align-items: center; border: 0; background: transparent; cursor: pointer; }
.process-step > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; color: #6c8388; background: #eff4f4; box-shadow: inset 0 0 0 1px #e0e8e9; transition: .18s ease; }.process-step:hover > span { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(33,80,88,.1); }.process-step > span svg { width: 18px; height: 18px; }.process-step b { margin-top: 8px; font-size: 10px; }.process-step small { margin-top: 2px; color: var(--quiet); font-size: 8px; }.process-step.done > span { color: #0d8470; background: #e1f6ef; box-shadow: inset 0 0 0 1px #c5eadf; }.process-step.active > span { color: white; background: linear-gradient(145deg, #11a5a5, #0b7585); box-shadow: 0 7px 16px rgba(13,135,150,.22); }.process-step.active small { color: #c2762e; font-weight: 600; }.process-step.paid > span { color: #d14050; background: #feecef; box-shadow: inset 0 0 0 1px #f8d4d9; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 17px; }
.metric-grid article { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid rgba(203,216,218,.55); border-radius: 18px; background: rgba(255,255,255,.72); }
.metric-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; }.metric-icon svg { width: 19px; height: 19px; }.metric-icon.blue { color: #217d9f; background: #e2f2f7; }.metric-icon.orange { color: #b56f2d; background: #fdefdf; }.metric-icon.violet { color: #7460a8; background: #ece8fa; }.metric-icon.green { color: #258264; background: #e0f3ea; }
.metric-grid article > div { min-width: 0; }.metric-grid small { display: block; color: var(--muted); font-size: 9px; }.metric-grid strong { display: block; margin: 3px 0; font-size: 20px; letter-spacing: -.03em; }.metric-grid strong em { margin-left: 2px; color: #5c7378; font-size: 10px; font-style: normal; font-weight: 500; }.metric-grid p { margin: 0; color: var(--quiet); font-size: 8px; }.metric-grid p b.up { margin-right: 3px; color: #168263; }

.lower-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(285px, .55fr); gap: 17px; margin-top: 17px; }
.module-section { padding: 21px 23px; }.section-heading.compact { align-items: center; }.section-heading.compact h2 { font-size: 14px; }
.module-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 17px; }
.module-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 122px; padding: 14px; border: 1px solid #e3eaea; border-radius: 16px; background: #fff; cursor: pointer; text-align: left; transition: .18s ease; }.module-card:hover { transform: translateY(-3px); border-color: #cbdadb; box-shadow: 0 10px 24px rgba(31,72,79,.08); }.module-card b { margin-top: 10px; font-size: 10px; }.module-card small { margin-top: 2px; color: var(--quiet); font-size: 8px; }.module-card em { position: absolute; right: 10px; top: 10px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; color: #c44855; background: #ffebee; font-size: 8px; font-style: normal; font-weight: 700; }
.module-icon { display: grid; place-items: center; width: 37px; height: 37px; flex: none; border-radius: 12px; }.module-icon svg { width: 18px; height: 18px; }.mint { color: #167e73; background: #dcf2ec; }.apricot { color: #a76426; background: #fbe9d4; }.lilac { color: #6d58a0; background: #eae5f8; }.sky { color: #2d7892; background: #e0f0f6; }.rose { color: #b34c5a; background: #f9e3e7; }
.assistant-card { padding: 20px; background: linear-gradient(155deg, #183c43 0%, #102c33 100%); color: #fff; border-color: rgba(255,255,255,.04); }
.assistant-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }.assistant-head > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 13px; color: #dafcfa; background: rgba(93,211,207,.15); }.assistant-head svg { width: 18px; height: 18px; }.assistant-head div { display: flex; flex-direction: column; }.assistant-head b { font-size: 11px; }.assistant-head small { color: #91aeb3; font-size: 8px; }
.assistant-card > button { width: 100%; display: grid; grid-template-columns: 27px 1fr 15px; align-items: center; gap: 8px; padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 13px; color: #dbe8ea; background: rgba(255,255,255,.045); cursor: pointer; text-align: left; margin-top: 7px; }.assistant-card > button:hover { background: rgba(255,255,255,.075); }.assistant-card > button > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: #73d7d2; background: rgba(88,203,199,.1); }.assistant-card > button svg { width: 14px; height: 14px; }.assistant-card > button div { display: flex; flex-direction: column; }.assistant-card > button b { font-size: 9px; }.assistant-card > button small { color: #83a1a6; font-size: 8px; }
.assistant-card > button:disabled, .focus-actions button:disabled { opacity: .58; cursor: wait; pointer-events: none; }
.assistant-card > button:disabled:hover { background: rgba(255,255,255,.045); }
.ask-box { display: flex; gap: 6px; margin-top: 12px; padding: 6px 6px 6px 10px; border: 1px solid rgba(128,198,199,.14); border-radius: 13px; background: rgba(5,21,25,.22); }.ask-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: #dce9eb; background: transparent; font-size: 8px; }.ask-box input::placeholder { color: #78969b; }.ask-box button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 9px; color: #123339; background: #73d7d2; cursor: pointer; }.ask-box svg { width: 14px; height: 14px; }

.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; border: 1px solid rgba(199,213,216,.58); border-radius: 19px; background: rgba(255,255,255,.77); overflow: hidden; }
.summary-strip > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 16px 19px; border-right: 1px solid #e7eeee; }.summary-strip > div:last-child { border-right: 0; }.summary-strip span { color: var(--muted); font-size: 9px; }.summary-strip b { grid-row: 1 / 3; grid-column: 2; font-size: 18px; letter-spacing: -.03em; }.summary-strip small { color: var(--quiet); font-size: 8px; }.positive { color: var(--green) !important; }.warning { color: #c37c2f !important; }
.table-card { overflow: hidden; }
.table-tools { display: flex; justify-content: space-between; gap: 18px; padding: 15px 17px; border-bottom: 1px solid #e6eded; }.segmented { display: flex; gap: 3px; padding: 3px; border-radius: 12px; background: #eef3f3; }.segmented button { height: 31px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; }.segmented button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 6px rgba(37,73,79,.08); font-weight: 600; }.segmented i { display: inline-grid; place-items: center; min-width: 15px; height: 15px; margin-left: 3px; border-radius: 99px; color: #b66c28; background: #fde5c8; font-size: 7px; font-style: normal; }
.tool-right { display: flex; gap: 8px; }.tool-right label { display: flex; align-items: center; gap: 7px; width: 225px; height: 37px; padding: 0 11px; border: 1px solid #dbe5e6; border-radius: 11px; background: #fff; }.tool-right label svg { width: 14px; height: 14px; color: var(--quiet); }.tool-right input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 9px; }.filter-button { display: flex; align-items: center; gap: 5px; padding: 0 12px; border: 1px solid #dbe5e6; border-radius: 11px; background: #fff; cursor: pointer; font-size: 9px; }.filter-button svg { width: 14px; height: 14px; }
.modern-table { min-width: 900px; }.table-row { width: 100%; display: grid; grid-template-columns: 1.15fr 1.6fr 1fr .9fr 1fr .85fr 25px; align-items: center; gap: 18px; min-height: 76px; padding: 12px 18px; border: 0; border-bottom: 1px solid #edf2f2; background: transparent; text-align: left; cursor: pointer; }.table-row:not(.table-head):hover { background: #f7fafa; }.table-row > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }.table-row b { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.table-row small { color: var(--quiet); font-size: 8px; white-space: nowrap; }.table-row > span:last-child svg { width: 14px; height: 14px; color: var(--quiet); }.table-head { min-height: 38px; color: #829397; background: #f5f8f8; cursor: default; font-size: 8px; font-weight: 600; }.mini-progress { width: 78px; height: 4px; border-radius: 99px; background: #e6eeee; overflow: hidden; }.mini-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #57c7bd, #118b97); }.danger-text { color: #c34b59; }.action-chip { display: inline-flex; align-self: flex-start; padding: 5px 8px; border-radius: 99px; font-size: 8px; font-style: normal; font-weight: 600; white-space: nowrap; }.action-chip.coral { color: #bd4856; background: #fee7ea; }.action-chip.blue { color: #24728c; background: #e4f2f7; }.action-chip.green { color: #247c61; background: #e2f3eb; }.action-chip.neutral { color: #64777b; background: #edf2f2; }.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; color: var(--quiet); font-size: 8px; }.table-footer button { border: 0; color: var(--teal); background: transparent; cursor: pointer; font-size: 9px; font-weight: 600; }

.board-overview { display: flex; align-items: center; gap: 18px; margin-bottom: 13px; color: var(--muted); font-size: 9px; }.board-overview > span { display: flex; align-items: center; gap: 5px; }.board-overview b { margin-left: auto; font-size: 10px; }
.ten-node-ribbon { display: grid; grid-template-columns: auto minmax(8px,1fr) auto minmax(8px,1fr) auto minmax(8px,1fr) auto minmax(8px,1fr) auto minmax(8px,1fr) auto minmax(8px,1fr) auto minmax(8px,1fr) auto minmax(8px,1fr) auto minmax(8px,1fr) auto; align-items: center; min-width: 980px; margin-bottom: 14px; padding: 15px 18px; border: 1px solid #e1e6ee; border-radius: 11px; background: #fff; overflow: hidden; }
.ten-node-ribbon > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }.ten-node-ribbon > span i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #758095; background: #f0f3f7; font-size: 8px; font-style: normal; font-weight: 700; }.ten-node-ribbon > span b { color: #556177; font-size: 8px; }.ten-node-ribbon > em { height: 1px; margin: 0 7px; background: #dfe5ed; }.ten-node-ribbon > span.done i { color: #fff; background: #2f6ff2; }.ten-node-ribbon > span.active i { color: #fff; background: #df2535; }.ten-node-ribbon > span.active b { color: #bd2634; }.ten-node-ribbon > span.paid i { color: #b23b4a; background: #fde8eb; }.board-section-label { display: flex; align-items: center; gap: 9px; margin: 0 2px 9px; }.board-section-label span { font-size: 9px; font-weight: 700; }.board-section-label small { color: var(--quiet); font-size: 8px; }
.board-canvas { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 12px; padding-bottom: 15px; overflow-x: auto; }
.board-lane { min-height: 570px; padding: 13px; border: 1px solid rgba(201,214,217,.58); border-radius: 20px; background: rgba(237,243,243,.7); }.board-lane.highlight { background: rgba(244,238,229,.72); border-color: #e7d8c1; }.board-lane header { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 9px; padding: 3px 3px 15px; }.lane-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; }.lane-icon svg { width: 17px; height: 17px; }.board-lane header div { display: flex; flex-direction: column; }.board-lane header b { font-size: 10px; }.board-lane header small { color: var(--quiet); font-size: 8px; }.board-lane header em { color: #a7b3b6; font-size: 9px; font-style: normal; font-weight: 700; }
.lane-card { margin-bottom: 9px; padding: 15px; border: 1px solid #e1e8e9; border-radius: 16px; background: #fff; box-shadow: 0 5px 15px rgba(31,66,72,.045); }.lane-card.subtle { opacity: .82; }.lane-card.risk { border-color: #eccfae; box-shadow: 0 7px 18px rgba(178,117,49,.08); }.lane-card.complete { border-color: #d5e8df; }.lane-card > b { display: block; margin-top: 11px; font-size: 10px; }.lane-card > p { margin: 4px 0 14px; color: var(--muted); font-size: 8px; }.lane-card > div { display: flex; align-items: center; justify-content: space-between; }.lane-card > div span { font-size: 9px; font-weight: 600; }.lane-card > div small { color: var(--quiet); font-size: 8px; }.lane-card > button { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 9px 10px; border: 0; border-radius: 10px; color: var(--teal-dark); background: #e7f4f3; cursor: pointer; font-size: 8px; font-weight: 600; }.lane-card > button svg { width: 13px; height: 13px; }.risk-tag { display: inline-flex; padding: 4px 7px; border-radius: 99px; font-size: 7px; font-style: normal; font-weight: 700; }.risk-tag.normal { color: #247c61; background: #e3f4ec; }.risk-tag.warning { color: #ac6727; background: #fde8cf; }.risk-tag.paid { color: #a84151; background: #fae5e9; }

.finance-hero { display: grid; grid-template-columns: 1.3fr repeat(3, .62fr); min-height: 175px; margin-bottom: 16px; border-radius: 22px; overflow: hidden; color: white; background: linear-gradient(130deg, #12373e 0%, #0d5a64 55%, #137985 100%); box-shadow: 0 16px 36px rgba(17,75,84,.15); }.finance-hero > div { padding: 24px; border-right: 1px solid rgba(255,255,255,.09); }.finance-hero > div:last-child { border-right: 0; }.eyebrow.inverse { color: #9dd1d0; }.finance-hero > div:first-child strong { display: block; margin: 12px 0 3px; font-size: 30px; letter-spacing: -.035em; }.finance-hero p { margin: 0; color: #aad0d1; font-size: 9px; }.hero-progress { width: min(420px, 90%); height: 5px; margin-top: 18px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }.hero-progress i { display: block; width: 82%; height: 100%; border-radius: inherit; background: #71d9cc; }.finance-mini { display: flex; flex-direction: column; justify-content: center; }.finance-mini span { color: #a9cbcd; font-size: 9px; }.finance-mini b { margin: 9px 0 3px; font-size: 20px; letter-spacing: -.03em; }.finance-mini small { color: #91b8bb; font-size: 8px; }
.finance-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, .6fr); gap: 16px; }.receivable-card { padding: 21px; }.receive-row { display: grid; grid-template-columns: 38px 1fr auto auto; align-items: center; gap: 13px; padding: 15px 0; border-bottom: 1px solid #edf2f2; }.receive-row:last-child { border-bottom: 0; }.customer-badge { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; font-size: 9px; font-weight: 700; }.receive-row > div { display: flex; flex-direction: column; }.receive-row > div b { font-size: 10px; }.receive-row > div small { color: var(--quiet); font-size: 8px; }.receive-row > strong { font-size: 11px; }
.payment-review-card { grid-column: 1 / -1; padding: 21px; border: 1px solid #dfe6f2; border-radius: 12px; background: #fff; box-shadow: var(--shadow-soft); }
.payment-review-card .section-heading > small { color: #697b96; font-size: 11px; }
.payment-review-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(320px,1fr)); gap: 10px; }
.payment-review-list > button { display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; align-items: center; gap: 12px; min-width: 0; padding: 13px; border: 1px solid #dbe4f0; border-radius: 12px; background: #f8fbff; text-align: left; cursor: pointer; }
.payment-review-list > button:hover { border-color: #7fa6f5; box-shadow: 0 8px 22px rgba(47,111,242,.09); }
.payment-review-list > button > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #2f6ff2; background: #e8f0ff; }.payment-review-list svg { width: 17px; height: 17px; }
.payment-review-list > button > div { min-width: 0; }.payment-review-list b,.payment-review-list small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.payment-review-list b { font-size: 11px; }.payment-review-list small { margin-top: 3px; color: #71829b; font-size: 9px; }.payment-review-list strong { font-size: 11px; white-space: nowrap; }.payment-review-list em { padding: 5px 8px; border-radius: 999px; color: #285fb7; background: #e7efff; font-size: 9px; font-style: normal; font-weight: 700; }.payment-review-list > p { margin: 0; padding: 18px; color: #718096; font-size: 11px; text-align: center; }
.record-manual-advance { border-color: #ead8bd; background: #fffaf2; }.record-manual-advance small { color: #9f6a22; }.record-manual-advance p { color: #7e705e; }.record-manual-advance button { border-color: #bd7726 !important; background: #b66e1f !important; }
.shipping-mode-manager { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 13px 14px; border: 1px solid #d9e3ef; border-radius: 12px; background: #f7faff; }.shipping-mode-manager > div { display: grid; gap: 3px; }.shipping-mode-manager small { color: #6f829e; font-size: 10px; }.shipping-mode-manager b { color: #213852; font-size: 12px; }.shipping-mode-manager label { display: flex; gap: 7px; }.shipping-mode-manager input { width: 210px; height: 36px; padding: 0 10px; border: 1px solid #c9d6e5; border-radius: 9px; background: #fff; }.shipping-mode-manager button { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 11px; border: 0; border-radius: 9px; color: #fff; background: #2f6ff2; font-size: 10px; font-weight: 700; }.shipping-mode-manager button svg { width: 14px; height: 14px; }
.match-card { padding: 24px; background: linear-gradient(145deg, #f5f1fa, #f3f7f7); }.match-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 20px; border-radius: 15px; color: #69539a; background: #e8e0f7; }.match-card h2 { margin: 7px 0 8px; font-size: 17px; line-height: 1.35; }.match-card > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }.match-preview { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin: 20px 0 12px; padding: 13px; border: 1px solid #dfd9ea; border-radius: 13px; background: rgba(255,255,255,.62); }.match-preview span { font-size: 9px; }.match-preview b { font-size: 10px; }.match-preview small { grid-column: 1 / -1; color: #7e65a9; font-size: 8px; }.primary-button.full { width: 100%; }.primary-button.full svg { width: 15px; height: 15px; }

.module-panel, .command-modal { position: fixed; z-index: 100; inset: 0; display: none; }.module-panel.is-open, .command-modal.is-open { display: block; }.panel-backdrop { position: absolute; inset: 0; background: rgba(8,29,34,.32); backdrop-filter: blur(5px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.module-sheet { position: absolute; left: 104px; bottom: 22px; width: min(760px, calc(100vw - 130px)); padding: 24px; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: rgba(251,253,252,.96); box-shadow: 0 28px 80px rgba(10,37,43,.25); animation: sheet-in .25s cubic-bezier(.2,.7,.2,1); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.module-sheet header { display: flex; justify-content: space-between; gap: 20px; }.module-sheet h2 { margin: 4px 0 3px; font-size: 22px; }.module-sheet header p { margin: 0; color: var(--muted); font-size: 9px; }.close-button { width: 32px; height: 32px; border: 0; border-radius: 11px; color: var(--muted); background: #edf2f2; cursor: pointer; font-size: 20px; }.panel-search { display: flex; align-items: center; gap: 8px; height: 41px; margin: 20px 0; padding: 0 13px; border: 1px solid #dce5e6; border-radius: 13px; background: #fff; }.panel-search svg { width: 16px; height: 16px; color: var(--quiet); }.panel-search input { flex: 1; border: 0; outline: 0; font-size: 10px; }.panel-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }.panel-groups > div { display: flex; flex-direction: column; gap: 7px; }.panel-groups > div > span { margin-bottom: 2px; color: var(--quiet); font-size: 8px; font-weight: 700; letter-spacing: .08em; }.panel-groups button { display: grid; grid-template-columns: 37px 1fr; gap: 9px; align-items: center; padding: 8px; border: 0; border-radius: 13px; background: transparent; text-align: left; cursor: pointer; }.panel-groups button:hover { background: #eef4f4; }.panel-groups button i { grid-row: 1 / 3; }.panel-groups button b { font-size: 9px; }.panel-groups button small { align-self: start; color: var(--quiet); font-size: 8px; }
.command-box { position: relative; width: min(590px, calc(100vw - 40px)); margin: 12vh auto 0; padding: 10px; border: 1px solid rgba(255,255,255,.8); border-radius: 22px; background: rgba(251,253,252,.98); box-shadow: 0 30px 90px rgba(10,37,43,.3); animation: sheet-in .22s ease; }.command-box > label { display: flex; align-items: center; gap: 10px; height: 53px; padding: 0 11px; border-bottom: 1px solid #e7eded; }.command-box > label svg { color: var(--teal); }.command-box > label input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 12px; }.command-hint { padding: 13px 11px 7px; color: var(--quiet); font-size: 8px; font-weight: 700; letter-spacing: .08em; }.command-box > button { width: 100%; display: grid; grid-template-columns: 37px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border: 0; border-radius: 14px; background: transparent; text-align: left; cursor: pointer; }.command-box > button:hover { background: #edf4f3; }.command-box > button div { display: flex; flex-direction: column; }.command-box > button b { font-size: 10px; }.command-box > button small { color: var(--quiet); font-size: 8px; }
.floating-assistant { position: fixed; z-index: 40; right: 24px; bottom: 22px; display: flex; align-items: center; gap: 8px; height: 43px; padding: 0 15px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg, #7051cb, #8d52eb); box-shadow: 0 12px 30px rgba(107,75,194,.28); cursor: pointer; font-size: 10px; font-weight: 600; }.floating-assistant:hover { transform: translateY(-2px); }.floating-assistant svg { width: 17px; height: 17px; }
.toast { position: fixed; z-index: 200; right: 20px; bottom: 20px; transform: translateY(8px); display: flex; align-items: center; gap: 8px; max-width: min(460px, calc(100vw - 40px)); padding: 11px 15px; border: 1px solid rgba(185,205,206,.7); border-radius: 13px; color: #2c555c; background: rgba(255,255,255,.96); box-shadow: 0 12px 32px rgba(17,51,58,.13); opacity: 0; pointer-events: none; transition: .22s ease; font-size: 11px; line-height: 1.5; }.toast.is-showing { opacity: 1; transform: translateY(0); }.toast svg { width: 14px; height: 14px; color: var(--green); }

@media (max-width: 1100px) {
  .topbar { grid-template-columns: 210px 1fr auto; padding: 0 20px; }.command-search { min-width: 260px; }.content { padding-inline: 24px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }.module-grid { grid-template-columns: repeat(3, 1fr); }.module-card:nth-child(n+4) { display: none; }
  .finance-hero { grid-template-columns: 1.2fr repeat(3, .65fr); }.finance-hero > div { padding: 20px 16px; }
}
@media (max-width: 850px) {
  .app-shell { grid-template-columns: 70px 1fr; }.rail { width: 70px; }.workspace { grid-column: 2; }.topbar { grid-template-columns: 1fr auto; }.command-search { display: none; }.top-actions { grid-column: 2; }.home-grid, .lower-grid, .finance-grid { grid-template-columns: 1fr; }.pulse-card { min-height: 280px; }.metric-grid { grid-template-columns: repeat(2,1fr); }.process-line { min-width: 680px; }.flow-card { overflow-x: auto; }.module-sheet { left: 80px; width: calc(100vw - 95px); }.finance-hero { grid-template-columns: repeat(3, 1fr); }.finance-hero > div:first-child { grid-column: 1 / -1; }.summary-strip { grid-template-columns: repeat(2, 1fr); }.summary-strip > div:nth-child(2) { border-right: 0; }.table-card { overflow-x: auto; }
}
@media (max-width: 600px) {
  .app-shell { display: block; padding-bottom: 68px; }.rail { inset: auto 8px 8px; width: auto; height: 60px; flex-direction: row; padding: 7px; border-radius: 20px; }.brand-mark { display: none; }.rail-nav { flex: 1; flex-direction: row; margin: 0; }.rail-bottom { width: auto; flex-direction: row; margin: 0; }.rail-icon, .avatar-small { display: none; }.rail-item { width: 54px; height: 46px; padding: 5px; }.rail-item span { font-size: 8px; }.rail-item svg { width: 18px; height: 18px; }.rail-item.is-active::before { display: none; }.workspace { width: 100%; }.topbar { height: 64px; padding: 0 14px; }.workspace-id small { display: none; }.create-button span, .create-button .mini { display: none; }.create-button { width: 40px; padding: 0; justify-content: center; }.content { padding: 22px 14px 80px; }.page-intro { align-items: flex-start; flex-direction: column; }.page-intro h1 { font-size: 25px; }.intro-actions { width: 100%; }.intro-actions button { flex: 1; }.focus-card { padding: 20px; }.focus-meta { align-items: flex-start; flex-direction: column; }.focus-progress { width: 100%; }.metric-grid { grid-template-columns: 1fr; }.module-grid { grid-template-columns: repeat(2,1fr); }.module-card:nth-child(n+5) { display: flex; }.heading-meta > span { display: none; }.summary-strip { grid-template-columns: 1fr; }.summary-strip > div { border-right: 0; border-bottom: 1px solid #e7eeee; }.finance-hero { grid-template-columns: 1fr; }.finance-hero > div:first-child { grid-column: auto; }.module-sheet { left: 10px; bottom: 78px; width: calc(100vw - 20px); max-height: 75vh; overflow-y: auto; }.panel-groups { grid-template-columns: 1fr; }.floating-assistant { right: 16px; bottom: 80px; }.prototype-note { display: none; }
}

/* Folderly 启发版：白色画布、顶部轻导航、细边框、单一蓝色动作强调。 */
:root {
  --bg: #f7f9fc;
  --surface: #fff;
  --surface-strong: #fff;
  --ink: #111c33;
  --muted: #68738a;
  --quiet: #97a1b4;
  --line: #e2e7ef;
  --teal: #2f6ff2;
  --teal-dark: #235bc9;
  --seal: #df2535;
  --ember: #ff7138;
  --ember-soft: #ffb267;
  --nav: #111c33;
  --shadow: 0 8px 24px rgba(31, 49, 82, .055);
  --shadow-soft: 0 3px 12px rgba(31, 49, 82, .04);
}
body { background: #fff; }
.app-shell { display: block; }
.rail { display: none; }
.workspace { grid-column: auto; }
.topbar {
  height: 66px; padding: 0 27px; display: flex; align-items: stretch; justify-content: space-between; gap: 24px;
  background: rgba(255,255,255,.94); border-color: #e5e9f0; backdrop-filter: blur(14px);
}
.top-left { display: flex; align-items: center; min-width: 0; gap: 6px; }
.app-launcher-button { display: grid; place-items: center; width: 35px; height: 35px; margin-right: 3px; border: 0; border-radius: 9px; color: #6d7890; background: transparent; cursor: pointer; }
.app-launcher-button:hover { color: #2f6ff2; background: #f2f6ff; }.app-launcher-button svg { width: 18px; height: 18px; }
.workspace-context { display: flex; align-items: center; gap: 9px; min-width: 0; height: 42px; }
.workspace-context-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid #e2e8f1; border-radius: 9px; color: #315b9d; background: #f5f8fd; }
.workspace-context-icon svg { width: 15px; height: 15px; }
.workspace-context > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.workspace-context small { color: #8a96a8; font-size: 8px; line-height: 11px; }
.workspace-context strong { overflow: hidden; color: #17233a; font-size: 13px; line-height: 17px; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.top-nav { align-self: stretch; display: flex; align-items: stretch; gap: 4px; }
.top-nav button { position: relative; display: flex; align-items: center; gap: 5px; padding: 0 13px; border: 0; color: #3f4a60; background: transparent; cursor: pointer; font-size: 11px; }
.top-nav button:hover { color: #2f6ff2; }.top-nav button.is-active { color: #2f6ff2; font-weight: 600; }.top-nav button.is-active::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: #2f6ff2; }
.top-nav i { display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; color: #2f6ff2; background: #edf3ff; font-size: 7px; font-style: normal; font-weight: 700; }
.top-actions { gap: 8px; }
.system-reliability { display: grid; grid-template-columns: auto; align-items: center; height: 36px; padding: 0 12px; border: 1px solid #dce5e4; border-radius: 9px; color: #294c49; background: #f8fbfa; cursor: pointer; text-align: left; }.system-reliability span { align-self: end; font-size: 8px; font-weight: 700; line-height: 11px; }.system-reliability small { align-self: start; color: #829592; font-size: 7px; line-height: 10px; }
.company-switch { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 11px; border: 1px solid #dfe5ee; border-radius: 9px; color: #4d5870; background: #fff; cursor: pointer; font-size: 9px; }.company-switch svg { width: 13px; height: 13px; color: #8b96a9; }
.search-icon-button { display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 8px; border: 1px solid #dfe5ee; border-radius: 9px; color: #68738a; background: #fff; cursor: pointer; }.search-icon-button svg { width: 15px; height: 15px; }.search-icon-button kbd { padding: 2px 4px; border: 0; background: #f3f6fa; font-size: 7px; }
.icon-button { width: 36px; height: 36px; border-radius: 9px; border-color: #dfe5ee; }.create-button { height: 36px; border-radius: 9px; background: #2f6ff2; box-shadow: none; }.create-button:hover { background: #235fd6; }.top-avatar { width: 34px; height: 34px; border-radius: 9px; color: #2f6ff2; background: #edf3ff; font-size: 10px; }
.content { max-width: 1450px; min-height: calc(100vh - 66px); padding: 29px 32px 70px; }
.page-intro { margin-bottom: 23px; }.page-intro h1 { font-size: clamp(24px, 2.1vw, 32px); }.eyebrow { color: #7e899e; }
.primary-button { border-radius: 9px; background: #2f6ff2; box-shadow: none; }.primary-button:hover { background: #235fd6; box-shadow: none; }.ghost-button { border-radius: 9px; border-color: #dfe5ee; }
.focus-card, .pulse-card, .flow-card, .module-section, .assistant-card, .table-card, .receivable-card, .match-card { border-color: #e1e6ee; border-radius: 12px; box-shadow: var(--shadow-soft); }
.focus-card { background: radial-gradient(circle at 92% 112%, rgba(255,113,56,.19) 0%, rgba(255,178,103,.08) 22%, transparent 42%), radial-gradient(circle at 77% -18%, rgba(47,111,242,.15), transparent 36%), linear-gradient(115deg, #f8faff 0%, #eff4ff 62%, #fbf8f6 100%); }.focus-card::before { content: ""; position: absolute; left: 0; top: 26px; width: 3px; height: 34px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg,var(--seal),var(--ember)); }.pill-coral { color: #bd2634; background: #fff5f6; box-shadow: inset 0 0 0 1px rgba(223,37,53,.16); }.order-code { color: #2f6ff2; }.focus-progress i { background: #2f6ff2; }.primary-button.dark { background: #111c33; }
.pulse-card { background: #fff; }.bars i { background: #edf1f7; }.bars i.active { background: #2f6ff2; box-shadow: none; }.pulse-foot button, .text-button:hover { color: #2f6ff2; }
.flow-card { box-shadow: none; }.process-step.active > span { background: #2f6ff2; box-shadow: 0 6px 14px rgba(47,111,242,.18); }.process-line > i { background: linear-gradient(90deg, #a9c2f8, #e2e7ef); }
.metric-grid article { border-color: #e3e8ef; border-radius: 11px; background: #fff; }.module-card { border-color: #e2e7ef; border-radius: 10px; }.module-card:hover { border-color: #b8caf0; box-shadow: 0 7px 18px rgba(47,111,242,.07); }.module-icon, .metric-icon { border-radius: 9px; }
.assistant-card { background: #111c33; }.summary-strip { border-color: #e1e6ee; border-radius: 11px; }.table-tools, .table-row { border-color: #e8ecf2; }.table-card { box-shadow: none; }.segmented { background: #f2f5f9; }.mini-progress i { background: #2f6ff2; }
.board-lane { border-color: #e1e6ee; border-radius: 12px; background: #f7f9fc; }.board-lane.highlight { background: #fff9f1; }.lane-card { border-color: #e1e6ee; border-radius: 10px; box-shadow: none; }
.finance-hero { border-radius: 12px; background: linear-gradient(120deg, #111c33 0%, #1d3564 55%, #2f6ff2 130%); box-shadow: none; }.hero-progress i { background: #75a0ff; }.match-card { background: #f7f9ff; }
.module-sheet { left: 50%; bottom: auto; top: 78px; transform: translateX(-50%); width: min(780px, calc(100vw - 40px)); border-color: #e1e6ee; border-radius: 14px; box-shadow: 0 24px 70px rgba(17,28,51,.18); }.panel-groups button:hover { background: #f3f6fb; }.floating-assistant { right: 20px; bottom: 20px; height: 42px; border-radius: 12px; background: #2f6ff2; box-shadow: 0 8px 20px rgba(47,111,242,.22); }
.prototype-note { bottom: 12px; border-color: #e1e6ee; color: #647087; box-shadow: 0 6px 18px rgba(31,49,82,.08); }.prototype-note span { background: #2f6ff2; box-shadow: 0 0 0 4px rgba(47,111,242,.08); }

/* 深色全流程指挥中心：稳定底色 + 清晰状态语义 + 可追溯信号。 */
.dark-board-shell { position: relative; padding: 17px; border: 1px solid #1c3746; border-radius: 15px; color: #e8f0f3; background: linear-gradient(160deg, #0d202b 0%, #0a1923 100%); box-shadow: 0 18px 45px rgba(9,27,37,.18), inset 0 1px rgba(255,255,255,.035); overflow: hidden; }
.dark-board-shell::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .62; background-image: radial-gradient(circle at 72% -6%, rgba(255,113,56,.16), transparent 24%), radial-gradient(circle at 18% 2%, rgba(59,124,244,.12), transparent 24%), radial-gradient(rgba(131,171,186,.12) .7px, transparent .8px); background-size: auto, auto, 16px 16px; mask-image: linear-gradient(to bottom, black, transparent 78%); }
.board-trustbar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 2px 3px 14px; border-bottom: 1px solid rgba(151,190,204,.12); }.trust-title { display: flex; align-items: center; gap: 9px; }.trust-title > span { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(104,212,180,.18); border-radius: 10px; color: #64d1ad; background: rgba(51,170,133,.09); }.trust-title svg { width: 16px; height: 16px; }.trust-title div { display: flex; flex-direction: column; }.trust-title b { color: #f2f7f8; font-size: 10px; }.trust-title small { margin-top: 2px; color: #78939d; font-size: 8px; }.trust-signals { display: flex; align-items: center; gap: 17px; color: #93a9b1; font-size: 8px; }.trust-signals > span { display: flex; align-items: center; gap: 5px; }.trust-signals svg { width: 12px; height: 12px; color: #6f8d98; }
.dark-board-shell .board-overview { position: relative; z-index: 1; margin: 13px 3px; color: #92a8b0; }.dark-board-shell .board-overview b { color: #d8e5e8; }
.dark-board-shell .ten-node-ribbon { position: relative; z-index: 1; border-color: #24414f; background: rgba(17,42,54,.88); box-shadow: inset 0 1px rgba(255,255,255,.025); }.dark-board-shell .ten-node-ribbon > span i { color: #8da3ac; background: #1a3746; }.dark-board-shell .ten-node-ribbon > span b { color: #a7bac1; }.dark-board-shell .ten-node-ribbon > em { background: #294554; }.dark-board-shell .ten-node-ribbon > span.done i { color: #fff; background: #3378f6; }.dark-board-shell .ten-node-ribbon > span.active i { color: #fff; background: #df2535; box-shadow: 0 0 0 3px rgba(223,37,53,.12); }.dark-board-shell .ten-node-ribbon > span.active b { color: #ff8992; }.dark-board-shell .ten-node-ribbon > span.paid i { color: #9be5c9; background: #194a3d; }.dark-board-shell .ten-node-ribbon > span.paid b { color: #83cdb2; }
.dark-board-shell .board-section-label { position: relative; z-index: 1; margin-top: 2px; }.dark-board-shell .board-section-label span { color: #d5e2e6; }.dark-board-shell .board-section-label small { color: #708a94; }
.dark-board-shell .board-canvas { position: relative; z-index: 1; }.dark-board-shell .board-lane { border-color: #203b49; background: rgba(17,39,50,.86); }.dark-board-shell .board-lane.highlight { border-color: #554a31; background: rgba(50,43,27,.78); }.dark-board-shell .board-lane header b { color: #e7eff2; }.dark-board-shell .board-lane header small, .dark-board-shell .board-lane header em { color: #718b95; }
.dark-board-shell .lane-card { border-color: #294552; color: #eaf1f3; background: #172f3c; box-shadow: 0 7px 18px rgba(0,0,0,.12); }.dark-board-shell .lane-card.risk { border-color: #725c36; background: #302a1e; box-shadow: 0 7px 18px rgba(0,0,0,.14); }.dark-board-shell .lane-card.complete { border-color: #285344; background: #17332d; }.dark-board-shell .lane-card > p { color: #8ca1a9; }.dark-board-shell .lane-card > div small { color: #78919a; }.dark-board-shell .lane-card > button { color: #a9d9e1; background: rgba(62,143,159,.13); }.dark-board-shell .risk-tag.normal { color: #7ed8b6; background: rgba(46,158,121,.14); }.dark-board-shell .risk-tag.warning { color: #f0bd73; background: rgba(206,137,49,.14); }.dark-board-shell .risk-tag.paid { color: #88d9ba; background: rgba(46,158,121,.14); }

@media (max-width: 980px) {
  .system-reliability { display: none; }.company-switch span { display: none; }.top-nav button { padding-inline: 8px; }.topbar { padding-inline: 16px; }
}
@media (max-width: 720px) {
  .top-nav button:nth-child(n+3) { display: none; }.workspace-context small { display: none; }.company-switch { display: none; }.content { padding-inline: 15px; }.module-sheet { top: 70px; }
}

/* v20 — task-shaped workspaces. The shared decorative shell is intentionally removed. */
#view-module[data-page-archetype="transaction"] .route-context-bar,
#view-module[data-page-archetype="dispatch"] .route-context-bar,
#view-module[data-page-archetype="issue"] .route-context-bar,
#view-module[data-page-archetype="receipt"] .route-context-bar,
#view-module[data-page-archetype="exception"] .route-context-bar,
#view-module[data-page-archetype="settings"] .route-context-bar { display: none; }
#view-module[data-page-archetype="transaction"] .module-page-intro #modulePrimary,
#view-module[data-page-archetype="dispatch"] .module-page-intro #modulePrimary,
#view-module[data-page-archetype="issue"] .module-page-intro #modulePrimary,
#view-module[data-page-archetype="receipt"] .module-page-intro #modulePrimary,
#view-module[data-page-archetype="exception"] .module-page-intro #modulePrimary { display: none; }
.signature-canvas[data-archetype] { min-height: 0; }
.operational-workspace { display: grid; gap: 14px; }
.operational-brief { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 22px 24px; border: 1px solid #dfe6ef; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(31,49,76,.055); }
.operational-brief-copy { max-width: 760px; }
.operational-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--module-accent); font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.operational-kicker svg { width: 17px; height: 17px; }
.operational-brief h2 { margin: 9px 0 7px; color: #17243a; font-size: clamp(21px,2vw,29px); letter-spacing: -.025em; }
.operational-brief p { margin: 0; color: #68778c; font-size: 12px; line-height: 1.65; }
.operational-primary { flex: none; min-height: 42px; padding: 0 15px; }
.operational-primary svg { width: 16px; height: 16px; }
.operational-steps { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.operational-steps li { position: relative; display: grid; grid-template-columns: 31px minmax(0,1fr); align-items: center; gap: 10px; min-height: 66px; padding: 11px 14px; border: 1px solid #e0e6ef; border-radius: 13px; background: #f8fafc; }
.operational-steps li::after { position: absolute; z-index: 2; right: -15px; width: 20px; height: 1px; background: #cfd8e5; content: ""; }
.operational-steps li:last-child::after { display: none; }
.operational-steps li > i { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: #6e7c90; background: #e9edf3; font-size: 11px; font-style: normal; font-weight: 850; }
.operational-steps li span { min-width: 0; }
.operational-steps li small,.operational-steps li b { display: block; }
.operational-steps li small { color: #8a96a7; font-size: 8px; }
.operational-steps li b { margin-top: 3px; color: #314057; font-size: 11px; }
.operational-steps li.is-current { border-color: color-mix(in srgb,var(--module-accent) 34%,#dce4ee); background: color-mix(in srgb,var(--module-soft) 72%,#fff); }
.operational-steps li.is-current > i { color: #fff; background: var(--module-accent); }
.operational-status-strip { display: grid; grid-template-columns: repeat(3,minmax(100px,140px)) minmax(210px,1fr); align-items: stretch; gap: 1px; overflow: hidden; border: 1px solid #dfe6ef; border-radius: 13px; background: #e7ecf3; }
.operational-status-strip > span { display: flex; flex-direction: column; justify-content: center; min-height: 58px; padding: 9px 13px; background: #fff; }
.operational-status-strip small { color: #8490a2; font-size: 8px; }
.operational-status-strip b { margin-top: 3px; color: #1e3049; font-size: 16px; }
.operational-status-strip > button { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 16px; border: 0; color: #315fbe; background: #f8faff; cursor: pointer; font-size: 10px; font-weight: 800; }
.operational-status-strip > button:hover { background: #eef4ff; }
.operational-status-strip svg { width: 15px; height: 15px; }
.operational-ledger { display: grid; gap: 10px; }
.operational-ledger .customer-directory-toolbar { align-items: center; }
.operational-evidence { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid #dfe6ef; border-radius: 12px; color: #637188; background: #fbfcfe; }
.operational-evidence > svg { width: 18px; height: 18px; color: #21816a; }
.operational-evidence span { min-width: 0; }
.operational-evidence b,.operational-evidence small { display: block; }
.operational-evidence b { color: #314057; font-size: 9px; }
.operational-evidence small { margin-top: 2px; font-size: 9px; line-height: 1.45; }
.operational-evidence em { color: #1e775f; font-size: 9px; font-style: normal; font-weight: 800; white-space: nowrap; }
.operational-dispatch .operational-brief { color: #eef5ff; border-color: #193c5b; background: linear-gradient(118deg,#102c45,#1e5075); }
.operational-dispatch .operational-brief h2 { color: #fff; }
.operational-dispatch .operational-brief p { color: #b9cedf; }
.operational-dispatch .operational-kicker { color: #80c9ff; }
.operational-dispatch .operational-steps li { border-radius: 6px; background: #f5f9fc; }
.operational-issue .operational-steps li { min-height: 82px; border-top: 3px solid color-mix(in srgb,var(--module-accent) 26%,#dce3ec); }
.operational-issue .operational-steps li.is-current { border-top-color: var(--module-accent); }
.operational-receipt .operational-status-strip > span { background: linear-gradient(145deg,#fff,#f5fbf8); }
.operational-receipt .operational-steps li:last-child { border-color: #cce8dd; background: #f2faf7; }
.operational-exception .operational-brief { border-left: 5px solid #bf5265; background: linear-gradient(110deg,#fff9fa,#fff); }
.operational-exception .operational-steps li.is-current { border-color: #e6b7c0; background: #fff3f5; }

/* Work Preferences is a settings surface, not another ledger template. */
#view-module[data-page-archetype="settings"] .module-page-intro { max-width: 1120px; margin-right: auto; margin-left: auto; padding-bottom: 17px; }
.preferences-settings-shell { max-width: 900px; margin: 0 auto; padding-bottom: 86px; }
.preferences-settings-main { overflow: hidden; border: 1px solid #dfe5ee; border-radius: 16px; background: #fff; box-shadow: 0 12px 34px rgba(31,49,76,.06); }
.settings-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 23px 25px; border-bottom: 1px solid #e9edf3; }
.settings-page-heading small { color: #356acb; font-size: 9px; font-weight: 850; letter-spacing: .06em; }
.settings-page-heading h2 { margin: 5px 0 4px; color: #17243a; font-size: 23px; }
.settings-page-heading p { margin: 0; color: #728095; font-size: 10px; }
.settings-save-state { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 999px; color: #26715c; background: #edf8f4; font-size: 8px; font-weight: 800; white-space: nowrap; }
.settings-save-state i { width: 6px; height: 6px; border-radius: 50%; background: #22a67e; }
.settings-heading-meta { display: grid; justify-items: end; gap: 7px; text-align: right; }
.settings-heading-meta > small { color: #7f8b9c; font-size: 8px; font-weight: 650; letter-spacing: 0; }
.settings-section { padding: 23px 25px; border-bottom: 1px solid #edf0f4; scroll-margin-top: 78px; }
.settings-section > header { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 11px; margin-bottom: 16px; }
.settings-section > header > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #436cb9; background: #eef3fb; font-size: 9px; font-weight: 850; }
.settings-section h3 { margin: 0; color: #26354d; font-size: 15px; }
.settings-section > header p { margin: 3px 0 0; color: #7e899a; font-size: 9px; }
.settings-section .preferences-field-grid label { padding: 14px; background: #fbfcfd; }
.settings-section .product-insight-setting { margin-top: 0; box-shadow: none; }
.archive-health-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 10px; }
.archive-health-row > span { padding: 9px 10px; border: 1px solid #e0e6ef; border-radius: 9px; background: #fbfcfe; }
.archive-health-row small,.archive-health-row b { display: block; }
.archive-health-row small { color: #7e8a9d; font-size: 8px; }
.archive-health-row b { margin-top: 3px; color: #2b3c55; font-size: 13px; }
.settings-save-bar { position: static; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 25px; border-top: 1px solid #e1e7ef; background: #fff; }
.settings-save-bar .preferences-save-feedback { margin: 0; }
.settings-save-bar .primary-button { min-width: 128px; }

/* 自动推进必须可验证：预览、执行结果、固定边界和审计历史同屏呈现。 */
#view-module[data-module="autopilot"] .module-page-intro #modulePrimary { display: none; }
.autopilot-console { display: grid; gap: 14px; max-width: 1180px; margin: 0 auto; }
.autopilot-command-card { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 24px 25px; border: 1px solid #dfe5ee; border-radius: 18px; background: #fff; box-shadow: 0 12px 32px rgba(31,49,76,.06); }
.autopilot-command-copy { max-width: 720px; }
.autopilot-command-copy h2 { margin: 8px 0 6px; color: #192840; font-size: clamp(22px,2.1vw,30px); letter-spacing: -.025em; }
.autopilot-command-copy p { margin: 0; color: #6d7b90; font-size: 11px; line-height: 1.7; }
.autopilot-command-actions { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 390px; }
.autopilot-command-actions button { min-height: 40px; }
.autopilot-command-actions svg { width: 15px; height: 15px; }
.autopilot-safety-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 14px; border: 1px solid #e7ccd1; border-radius: 12px; color: #8d4552; background: #fff7f8; }
.autopilot-safety-banner > span { display: grid; grid-template-columns: 8px auto; align-items: center; column-gap: 8px; }
.autopilot-safety-banner > span i { grid-row: 1 / span 2; width: 8px; height: 8px; border-radius: 50%; background: #d85668; box-shadow: 0 0 0 4px rgba(216,86,104,.09); }
.autopilot-safety-banner b,.autopilot-safety-banner small { display: block; }
.autopilot-safety-banner b { color: #703541; font-size: 10px; }
.autopilot-safety-banner small { margin-top: 2px; color: #a46a74; font-size: 8px; }
.autopilot-safety-banner em { font-size: 9px; font-style: normal; font-weight: 750; text-align: right; }
.autopilot-safety-banner.is-enabled { border-color: #bfe1d7; color: #28725f; background: #f2fbf8; }
.autopilot-safety-banner.is-enabled > span i { background: #20a47d; box-shadow: 0 0 0 4px rgba(32,164,125,.1); }
.autopilot-safety-banner.is-enabled b { color: #205d4e; }
.autopilot-safety-banner.is-enabled small { color: #5b8f81; }
.autopilot-overview-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 14px; align-items: stretch; }
.autopilot-candidate-card,.autopilot-history-card,.autopilot-rules-card { overflow: hidden; border: 1px solid #dfe5ee; border-radius: 16px; background: #fff; box-shadow: 0 10px 28px rgba(31,49,76,.045); }
.autopilot-candidate-card > header,.autopilot-history-card > header,.autopilot-rules-card > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid #e9edf3; }
.autopilot-candidate-card header small,.autopilot-history-card header small,.autopilot-rules-card header small { color: #c44f60; font-size: 8px; font-weight: 850; letter-spacing: .04em; }
.autopilot-candidate-card h3,.autopilot-history-card h3,.autopilot-rules-card h3 { margin: 3px 0 0; color: #223249; font-size: 15px; }
.autopilot-candidate-card > header > b { color: #d34a59; font-size: 29px; }
.autopilot-history-card header button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; color: #45699f; background: transparent; cursor: pointer; font-size: 8px; font-weight: 800; }
.autopilot-history-card header button svg { width: 12px; height: 12px; }
.autopilot-counts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; border-bottom: 1px solid #e9edf3; background: #e9edf3; }
.autopilot-counts span { padding: 12px 20px; background: #fbfcfe; }
.autopilot-counts small,.autopilot-counts b { display: block; }
.autopilot-counts small { color: #8390a3; font-size: 8px; }
.autopilot-counts b { margin-top: 3px; color: #273950; font-size: 17px; }
.autopilot-preview-results { min-height: 120px; padding: 16px 20px; color: #758297; font-size: 9px; line-height: 1.6; }
.autopilot-preview-results > p { margin: 0; }
.autopilot-preview-results > header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.autopilot-preview-results > header b { color: #2c3d55; font-size: 10px; }
.autopilot-preview-results > header small { color: #2f806a; }
.autopilot-preview-results ol { display: grid; gap: 7px; max-height: 360px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.autopilot-preview-results li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; padding: 10px 11px; border: 1px solid #e2e7ee; border-radius: 10px; background: #fbfcfe; }
.autopilot-preview-results li span small,.autopilot-preview-results li span b { display: block; }
.autopilot-preview-results li span small { color: #8793a4; font-size: 7px; }
.autopilot-preview-results li span b { margin-top: 2px; color: #2c3d55; font-size: 9px; }
.autopilot-preview-results li em { align-self: center; padding: 4px 7px; border-radius: 999px; color: #8e5260; background: #fff0f2; font-size: 7px; font-style: normal; font-weight: 850; }
.autopilot-preview-results li em[data-disposition="auto"] { color: #1e725c; background: #eaf8f3; }
.autopilot-preview-results li p { grid-column: 1 / -1; margin: 3px 0 0; color: #748196; font-size: 8px; }
.autopilot-preview-empty,.autopilot-empty-run { display: grid; place-items: center; min-height: 112px; text-align: center; }
.autopilot-preview-empty svg,.autopilot-empty-run svg { width: 22px; height: 22px; margin-bottom: 7px; color: #49a48a; }
.autopilot-preview-empty b,.autopilot-preview-empty small,.autopilot-empty-run b,.autopilot-empty-run small { display: block; }
.autopilot-preview-empty b,.autopilot-empty-run b { color: #34445a; font-size: 9px; }
.autopilot-preview-empty small,.autopilot-empty-run small { margin-top: 3px; color: #8b96a6; font-size: 8px; }
.autopilot-history-card ol { display: grid; gap: 0; margin: 0; padding: 8px 18px 13px; list-style: none; }
.autopilot-history-card li { padding: 10px 0; border-bottom: 1px solid #edf0f4; }
.autopilot-history-card li:last-child { border-bottom: 0; }
.autopilot-history-card li > span { display: flex; align-items: center; gap: 7px; }
.autopilot-history-card li i { width: 6px; height: 6px; border-radius: 50%; background: #2ba17d; }
.autopilot-history-card li b { color: #35465d; font-size: 8px; }
.autopilot-history-card li small { color: #909bad; font-size: 7px; }
.autopilot-history-card li p { margin: 5px 0 0 13px; color: #6f7d91; font-size: 8px; line-height: 1.45; }
.autopilot-rules-card > header { align-items: flex-end; }
.autopilot-rules-card > header p { margin: 4px 0 0; color: #7f8b9c; font-size: 9px; }
.autopilot-rules-card > header button { flex: none; }
.autopilot-rule-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.autopilot-rule-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 88px; padding: 14px 18px; border-right: 1px solid #e9edf3; border-bottom: 1px solid #e9edf3; }
.autopilot-rule-row:nth-child(2n) { border-right: 0; }
.autopilot-rule-row:nth-last-child(-n+2) { border-bottom: 0; }
.autopilot-rule-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #c24f60; background: #fff0f2; }
.autopilot-rule-icon svg { width: 16px; height: 16px; }
.autopilot-rule-row small,.autopilot-rule-row b { display: block; }
.autopilot-rule-row small { color: #8a96a7; font-size: 7px; }
.autopilot-rule-row b { margin-top: 3px; color: #2a3a51; font-size: 10px; }
.autopilot-rule-row p { margin: 4px 0 0; color: #758297; font-size: 8px; line-height: 1.4; }
.autopilot-rule-row > em { padding: 5px 7px; border-radius: 999px; color: #92535f; background: #fff1f3; font-size: 7px; font-style: normal; font-weight: 850; white-space: nowrap; }
.autopilot-rule-row > em[data-mode="auto"] { color: #1f765f; background: #eaf8f3; }
.autopilot-rule-row > em[data-mode="off"] { color: #727f91; background: #eef1f5; }

/* Task navigation: compact, actionable and blocker-aware. */
.journey-dock { width: min(950px,calc(100vw - 250px)); min-height: 58px; grid-template-columns: 38px minmax(105px,.7fr) minmax(160px,1.25fr) auto auto auto 24px; gap: 9px; padding: 7px 8px; cursor: default; }
.journey-dock:hover { transform: translateX(-50%); border-color: #cbd7e8; }
.journey-dock-blockers { padding: 5px 8px; border-radius: 999px; color: #23745e; background: #eaf7f2; font-size: 8px; font-weight: 800; white-space: nowrap; }
.journey-dock-blockers.has-blockers { color: #a44a32; background: #fff1e9; }
.journey-dock-go { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; max-width: 220px; padding: 0 12px; overflow: hidden; border: 0; border-radius: 10px; color: #fff; background: #2f6ff2; cursor: pointer; font-size: 9px; font-weight: 800; }
.journey-dock-go span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journey-dock-go svg { width: 13px; height: 13px; flex: none; }
.journey-dock-open { min-height: 34px; padding: 0 9px; border: 1px solid #d7e0ec; border-radius: 9px; color: #536783; background: #fff; cursor: pointer; font-size: 8px; font-weight: 750; }
.journey-dock-hide { display: grid; place-items: center; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; background: transparent; }
.journey-progress { margin: 18px 0; padding: 13px; border: 1px solid #e0e6ef; border-radius: 11px; background: #fff; }
.journey-progress header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.journey-progress header span { color: #53647e; font-size: 9px; font-weight: 800; }
.journey-progress header b { padding: 4px 7px; border-radius: 999px; color: #23745e; background: #eaf7f2; font-size: 8px; }
.journey-progress header b.has-blockers { color: #a44a32; background: #fff1e9; }
.journey-progress > i { display: block; height: 6px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #e8edf4; }
.journey-progress > i > em { display: block; width: var(--journey-progress,0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2f6ff2,#3ba58a); transition: width .25s ease; }
.journey-next-action > .primary-button { width: 100%; justify-content: center; margin-top: 13px; }
.journey-route-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.journey-route-actions > div { padding: 13px; border: 1px solid #e0e6ef; border-radius: 11px; background: #fff; }
.journey-route-actions small { color: #8a96a8; font-size: 8px; }
.journey-route-actions h3 { margin: 3px 0 9px; font-size: 12px; }
.journey-route-actions nav { display: grid; gap: 6px; }
.journey-route-actions nav button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 0 9px; border: 1px solid #dce4ef; border-radius: 8px; color: #355fae; background: #f8faff; cursor: pointer; font-size: 9px; font-weight: 750; }
.journey-route-actions nav button svg { width: 12px; height: 12px; }
.journey-route-actions nav > span { color: #8390a3; font-size: 9px; line-height: 1.5; }

body[data-theme="dark"] .operational-brief,
body[data-theme="dark"] .operational-steps li,
body[data-theme="dark"] .operational-status-strip > span,
body[data-theme="dark"] .operational-ledger,
body[data-theme="dark"] .operational-evidence,
body[data-theme="dark"] .preferences-settings-main,
body[data-theme="dark"] .settings-section .preferences-field-grid label,
body[data-theme="dark"] .archive-health-row > span,
body[data-theme="dark"] .autopilot-command-card,
body[data-theme="dark"] .autopilot-candidate-card,
body[data-theme="dark"] .autopilot-history-card,
body[data-theme="dark"] .autopilot-rules-card,
body[data-theme="dark"] .autopilot-rule-row,
body[data-theme="dark"] .journey-progress,
body[data-theme="dark"] .journey-route-actions > div { border-color: #2a374c; background: #141c28; }
body[data-theme="dark"] .operational-brief h2,
body[data-theme="dark"] .operational-steps li b,
body[data-theme="dark"] .operational-status-strip b,
body[data-theme="dark"] .operational-evidence b,
body[data-theme="dark"] .settings-page-heading h2,
body[data-theme="dark"] .settings-section h3,
body[data-theme="dark"] .archive-health-row b { color: #e8eef8; }
body[data-theme="dark"] .operational-status-strip,
body[data-theme="dark"] .settings-page-heading,
body[data-theme="dark"] .settings-section { border-color: #2a374c; background: #141c28; }
body[data-theme="dark"] .settings-save-bar { border-color: #2a374c; background: rgba(20,28,40,.96); }
body[data-theme="dark"] .journey-dock-go { background: #4e82ec; }

@media (max-width: 1100px) {
  .journey-dock { width: min(760px,calc(100vw - 120px)); grid-template-columns: 36px minmax(100px,.7fr) minmax(150px,1fr) auto auto 24px; }
  .journey-dock-blockers { display: none; }
  .autopilot-command-card { align-items: stretch; flex-direction: column; }
  .autopilot-command-actions { max-width: none; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .operational-brief { align-items: stretch; flex-direction: column; padding: 18px; }
  .operational-primary { width: 100%; justify-content: center; }
  .operational-steps,.operational-status-strip { grid-template-columns: 1fr; }
  .operational-steps li::after { display: none; }
  .operational-status-strip > button { min-height: 44px; justify-content: center; }
  .operational-evidence { grid-template-columns: 22px minmax(0,1fr); }
  .operational-evidence em { grid-column: 2; }
  .settings-page-heading { display: grid; padding: 19px; }
  .settings-heading-meta { justify-items: start; text-align: left; }
  .settings-section { padding: 19px; }
  .archive-health-row { grid-template-columns: 1fr; }
  .autopilot-overview-grid,.autopilot-rule-list { grid-template-columns: 1fr; }
  .autopilot-rule-row { border-right: 0; }
  .autopilot-rule-row:nth-last-child(2) { border-bottom: 1px solid #e9edf3; }
  .autopilot-safety-banner { align-items: flex-start; flex-direction: column; }
  .autopilot-safety-banner em { text-align: left; }
  .autopilot-command-actions button { flex: 1 1 140px; justify-content: center; }
  .settings-save-bar { align-items: stretch; flex-direction: column; padding: 12px 19px; }
  .journey-dock { bottom: 8px; width: calc(100vw - 16px); grid-template-columns: 32px minmax(0,1fr) auto 22px; min-height: 52px; }
  .journey-dock-next,.journey-dock-blockers,.journey-dock-open { display: none; }
  .journey-dock-go { max-width: 145px; min-height: 34px; }
  .journey-route-actions { grid-template-columns: 1fr; }
}

/* 首次使用模式只保留当前位置、风险与当前建议；关闭后恢复完整上下游和快捷入口。 */
.journey-sheet.is-beginner-guide .journey-route-actions,
.journey-sheet.is-beginner-guide .intent-section { display: none; }

/* 全屏指挥中心模式：进入看板即让深色覆盖整个工作视口。 */
body.board-mode { color: #e7f0f3; background: #091923; }
body.board-mode .topbar { border-color: #1b3543; color: #dbe8ec; background: rgba(9,25,35,.96); box-shadow: inset 0 -1px rgba(255,255,255,.018); }
body.board-mode .app-launcher-button { color: #89a1aa; }
body.board-mode .app-launcher-button:hover { color: #fff; background: rgba(255,255,255,.055); }
body.board-mode .workspace-context-icon { border-color: #28424e; color: #9ebcff; background: #102631; }
body.board-mode .workspace-context small { color: #718c95; }
body.board-mode .workspace-context strong { color: #f3f7f8; }
body.board-mode .top-nav button { color: #829aa4; }
body.board-mode .top-nav button:hover { color: #dbe9ed; }
body.board-mode .top-nav button.is-active { color: #fff; background: rgba(56,119,150,.09); }
body.board-mode .top-nav button.is-active::after { background: linear-gradient(90deg, #df2535 0 16%, #3b7cf4 16% 100%); }
body.board-mode .top-nav i { color: #8db3ff; background: rgba(59,124,244,.12); }
body.board-mode .system-reliability { border-color: #244450; color: #b9d0d5; background: #102a35; }
body.board-mode .system-reliability small { color: #718c95; }
body.board-mode .company-switch, body.board-mode .search-icon-button, body.board-mode .icon-button { border-color: #28424e; color: #b0c3c9; background: #102631; }
body.board-mode .company-switch svg, body.board-mode .search-icon-button svg { color: #728d97; }
body.board-mode .search-icon-button kbd { color: #718a94; background: #18313d; }
body.board-mode .top-avatar { color: #a9c2ff; background: #18345e; }
body.board-mode .content { width: 100%; max-width: none; min-height: calc(100vh - 66px); margin: 0; padding: 0; background: #091923; }
body.board-mode #view-board { min-height: calc(100vh - 66px); background: #091923; }
body.board-mode #view-board > .page-intro { position: relative; align-items: center; margin: 0; padding: 27px 32px 22px; border-bottom: 1px solid rgba(142,178,191,.08); background: linear-gradient(180deg, #0c202b 0%, #091923 100%); overflow: hidden; }
body.board-mode #view-board > .page-intro::before { content: ""; position: absolute; width: 560px; height: 330px; right: 13%; top: -245px; border-radius: 50%; pointer-events: none; background: radial-gradient(ellipse, rgba(255,106,49,.27) 0%, rgba(223,37,53,.09) 36%, transparent 70%); filter: blur(2px); }
body.board-mode #view-board > .page-intro::after { content: ""; position: absolute; inset: 0 25% 0 42%; pointer-events: none; opacity: .42; background-image: radial-gradient(rgba(156,190,201,.18) .75px, transparent .8px); background-size: 12px 12px; mask-image: radial-gradient(ellipse, black 0%, transparent 72%); }
body.board-mode #view-board > .page-intro > * { position: relative; z-index: 1; }
body.board-mode #view-board .eyebrow { color: #7e9ba5; }
body.board-mode #view-board .page-intro h1 { color: #f4f8f9; font-size: clamp(29px,2.65vw,42px); letter-spacing: -.042em; }
body.board-mode #view-board .page-intro h1 em { color: #9ab0b7; }
body.board-mode #view-board .page-intro p { color: #718b95; }
body.board-mode #view-board .ghost-button { border-color: #2b4753; color: #c6d7dc; background: #102731; }
body.board-mode #view-board .ghost-button:hover { border-color: #436776; background: #15313d; }
body.board-mode #view-board .primary-button { background: #3378f6; }
body.board-mode .dark-board-shell { min-height: calc(100vh - 186px); padding: 17px 31px 28px; border: 0; border-radius: 0; background: linear-gradient(165deg, #0b1e29 0%, #081720 100%); box-shadow: none; }
body.board-mode .dark-board-shell::before { opacity: .72; background-size: auto, auto, 17px 17px; }
body.board-mode .board-trustbar { padding-top: 1px; padding-bottom: 13px; }
body.board-mode .dark-board-shell .ten-node-ribbon { margin-bottom: 16px; padding-block: 16px; border-radius: 10px; }
body.board-mode .dark-board-shell .board-canvas { grid-template-columns: repeat(5,minmax(240px,1fr)); gap: 13px; min-height: calc(100vh - 365px); padding-bottom: 110px; }
body.board-mode .dark-board-shell .board-lane { min-height: calc(100vh - 366px); border-radius: 11px; }
body.board-mode .prototype-note { border-color: #24414e; color: #78939d; background: rgba(12,32,43,.9); box-shadow: 0 7px 24px rgba(0,0,0,.22); }

@media (max-width: 850px) {
  body.board-mode #view-board > .page-intro { padding-inline: 20px; }
  body.board-mode .dark-board-shell { padding-inline: 20px; }
  body.board-mode .dark-board-shell .board-canvas { grid-template-columns: repeat(5,250px); }
}

/* 经营航线：全局位置感、下一步建议和首次使用防迷路机制。 */
.journey-dock { position: fixed; z-index: 55; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(800px,calc(100vw - 230px)); min-height: 54px; display: grid; grid-template-columns: 38px auto minmax(120px,1fr) minmax(170px,1.15fr) auto; align-items: center; gap: 11px; padding: 7px 10px; border: 1px solid #dce4ec; border-radius: 15px; color: #1b2a41; background: rgba(255,255,255,.94); box-shadow: 0 14px 38px rgba(24,43,70,.14); backdrop-filter: blur(16px); cursor: pointer; text-align: left; }
.journey-dock:hover { border-color: #b9c9e8; transform: translateX(-50%) translateY(-2px); }.journey-dock-icon { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 6px; border: 1px solid #d8e1ec; border-radius: 11px; background: linear-gradient(145deg,#fff,#f3f6fa); box-shadow: 0 6px 16px rgba(24,43,70,.11); overflow: hidden; }.journey-dock-icon::after { position: absolute; right: 3px; bottom: 3px; width: 4px; height: 4px; border: 1.5px solid #fff; border-radius: 50%; background: #2f6ff2; content: ""; }.journey-dock-icon img { width: 25px; height: 25px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(95,20,29,.12)); }.journey-dock-place, .journey-dock-next { display: flex; flex-direction: column; min-width: 0; }.journey-dock small { color: #8a96a9; font-size: 7px; line-height: 11px; }.journey-dock b { overflow: hidden; color: #25334a; font-size: 9px; line-height: 13px; white-space: nowrap; text-overflow: ellipsis; }.journey-dock-track { display: flex; align-items: center; }.journey-dock-track i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #dfe5ed; }.journey-dock-track i.done { background: #2f6ff2; }.journey-dock-track i.active { background: #df2535; box-shadow: 0 0 0 4px rgba(223,37,53,.1); }.journey-dock-track em { flex: 1; height: 1px; background: #dfe5ed; }.journey-dock-open { display: flex; align-items: center; gap: 4px; color: #2f6ff2; font-size: 8px; font-weight: 700; white-space: nowrap; }.journey-dock-open svg { width: 12px; height: 12px; }
body.board-mode .journey-dock { border-color: #294754; color: #dce8ec; background: rgba(12,31,42,.94); box-shadow: 0 14px 38px rgba(0,0,0,.28); }.board-mode .journey-dock b { color: #dbe7eb; }.board-mode .journey-dock small { color: #6e8993; }.board-mode .journey-dock-track i { background: #26434f; }.board-mode .journey-dock-track em { background: #294753; }

.first-visit-banner { display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 12px; margin: -4px 0 17px; padding: 11px 13px; border: 1px solid #e0e6ef; border-radius: 11px; background: linear-gradient(90deg,#f8faff,#fffaf6); }.first-visit-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; color: #c52d3c; background: #fff0f1; }.first-visit-icon svg { width: 18px; height: 18px; }.first-visit-banner > div { display: flex; flex-direction: column; }.first-visit-banner b { font-size: 10px; }.first-visit-banner small { margin-top: 2px; color: #7c879c; font-size: 8px; }.first-visit-banner button { display: flex; align-items: center; gap: 5px; padding: 8px 11px; border: 1px solid #d6e1f7; border-radius: 9px; color: #2f63cc; background: #fff; cursor: pointer; font-size: 8px; font-weight: 700; }.first-visit-banner button svg { width: 12px; height: 12px; }

.today-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(290px,.55fr); gap: 16px; }.today-queue { display: flex; flex-direction: column; gap: 10px; }.guided-task { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 14px; padding: 17px; border: 1px solid #e1e7ef; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(31,49,82,.035); }.guided-task.primary-task { border-color: #e7d9d9; background: linear-gradient(110deg,#fff 0%,#fff9f7 100%); }.task-rank { display: grid; place-items: center; width: 29px; height: 29px; align-self: start; border-radius: 9px; color: #2f6ff2; background: #edf3ff; font-size: 10px; font-weight: 700; }.primary-task .task-rank { color: #fff; background: linear-gradient(145deg,#df2535,#ff7138); }.task-main { min-width: 0; }.task-main h2 { margin: 8px 0 4px; font-size: 14px; letter-spacing: -.015em; }.task-main > p { margin: 0; color: #738096; font-size: 9px; }.task-blue { color: #2f6ff2; background: #eef4ff; }.task-green { color: #24815f; background: #e6f5ee; }.why-impact { display: grid; grid-template-columns: 1fr 20px 1fr; align-items: center; gap: 9px; margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: rgba(246,248,251,.9); }.why-impact > span { display: flex; flex-direction: column; }.why-impact small { color: #929bad; font-size: 7px; }.why-impact b { margin-top: 2px; color: #405069; font-size: 8px; }.why-impact svg { width: 13px; height: 13px; color: #a7b1c1; }.task-inline-meta { display: flex; gap: 14px; margin-top: 10px; }.task-inline-meta span { display: flex; align-items: center; gap: 5px; color: #6f7d93; font-size: 8px; }.task-inline-meta svg { width: 13px; height: 13px; color: #7191c9; }.guide-action { align-self: center; white-space: nowrap; }
.day-finish-card { padding: 23px; border: 1px solid #dce5ee; border-radius: 12px; color: #e8f0f3; background: linear-gradient(155deg,#132b39,#0d1f2d); }.finish-ring { width: 92px; height: 92px; display: grid; place-items: center; margin: 22px auto; border: 8px solid #213e4c; border-top-color: #3c80f5; border-right-color: #df2535; border-radius: 50%; }.finish-ring strong { font-size: 24px; }.finish-ring small { color: #79929c; font-size: 10px; }.day-finish-card h2 { margin: 0; font-size: 16px; line-height: 1.4; }.day-finish-card > p { color: #8ea4ac; font-size: 9px; line-height: 1.6; }.finish-proof { display: flex; flex-direction: column; gap: 8px; margin: 18px 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }.finish-proof span { display: flex; align-items: center; gap: 7px; color: #a9bdc3; font-size: 8px; }.finish-proof svg { width: 13px; height: 13px; color: #64d1ad; }.day-finish-card > button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border: 1px solid #355565; border-radius: 9px; color: #cde0e5; background: #183644; cursor: pointer; font-size: 8px; font-weight: 700; }.day-finish-card > button svg { width: 13px; height: 13px; }

.route-context-bar { display: grid; grid-template-columns: 1fr 20px 1fr 20px 1fr auto; align-items: center; gap: 9px; margin-bottom: 13px; padding: 11px 13px; border: 1px solid #e0e6ee; border-radius: 11px; background: #f8fafc; }.route-context-bar > span { display: flex; flex-direction: column; }.route-context-bar small { color: #929bad; font-size: 7px; }.route-context-bar b { margin-top: 2px; font-size: 9px; }.route-context-bar > svg { width: 13px; height: 13px; color: #b0bac8; }.route-context-bar .current { padding: 7px 10px; border-radius: 8px; background: #edf3ff; }.route-context-bar .current b { color: #2f6ff2; }.route-context-bar button { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border: 1px solid #d7e1ef; border-radius: 8px; color: #536783; background: #fff; cursor: pointer; font-size: 8px; }.route-context-bar button svg { width: 13px; height: 13px; }
.module-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 14px; }.module-kpi { display: grid; grid-template-columns: 37px 1fr; align-items: center; gap: 10px; padding: 13px; border: 1px solid #e2e7ee; border-radius: 10px; background: #fff; }.module-kpi > span { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 9px; color: #2f6ff2; background: #edf3ff; }.module-kpi svg { width: 17px; height: 17px; }.module-kpi div { display: flex; flex-direction: column; }.module-kpi small { color: #8c96a8; font-size: 7px; }.module-kpi b { margin-top: 2px; font-size: 15px; }.module-kpi em { color: #39906f; font-size: 7px; font-style: normal; }
.universal-workspace { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,.5fr); gap: 14px; }.module-list-card, .module-next-card { border: 1px solid #e0e6ee; border-radius: 12px; background: #fff; }.module-list-card { overflow: hidden; }.module-list-card > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 16px; border-bottom: 1px solid #e9edf2; }.module-list-card h2 { margin: 3px 0 0; font-size: 13px; }.module-list-card label { width: 220px; display: flex; align-items: center; gap: 7px; height: 35px; padding: 0 10px; border: 1px solid #dce3eb; border-radius: 9px; }.module-list-card label svg { width: 14px; height: 14px; color: #929dae; }.module-list-card input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 8px; }.module-table-head, .universal-row { display: grid; grid-template-columns: 1.25fr 1.2fr .75fr .8fr; align-items: center; gap: 14px; padding: 10px 16px; }.module-table-head { color: #8f99aa; background: #f7f9fb; font-size: 7px; font-weight: 700; }.universal-row { min-height: 66px; border-top: 1px solid #edf1f4; }.universal-row:first-child { border-top: 0; }.universal-row:hover { background: #fafcfd; }.universal-row > span { display: flex; flex-direction: column; min-width: 0; }.universal-row b { overflow: hidden; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }.universal-row small { margin-top: 3px; color: #919bac; font-size: 7px; }.universal-row em { justify-self: start; padding: 5px 7px; border-radius: 99px; color: #267b5e; background: #e5f4ed; font-size: 7px; font-style: normal; font-weight: 700; }.universal-row button { justify-self: start; border: 0; color: #2f6ff2; background: transparent; cursor: pointer; font-size: 8px; font-weight: 700; }
.universal-row em.warn { color: #a96325; background: #fdebd8; }
.module-next-card { padding: 21px; background: linear-gradient(150deg,#f8faff,#fff9f6); }.next-card-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; border-radius: 12px; color: #fff; background: linear-gradient(145deg,#df2535,#ff7138); }.next-card-mark svg { width: 19px; height: 19px; }.module-next-card h2 { margin: 7px 0; font-size: 16px; }.module-next-card > p { margin: 0; color: #738096; font-size: 9px; line-height: 1.6; }.impact-preview { display: flex; flex-direction: column; margin: 18px 0 12px; padding: 12px; border: 1px solid #e3e7ef; border-radius: 9px; background: rgba(255,255,255,.7); }.impact-preview small { color: #929cad; font-size: 7px; }.impact-preview b { margin-top: 3px; font-size: 9px; }.explain-link { width: 100%; margin-top: 9px; border: 0; color: #69778d; background: transparent; cursor: pointer; font-size: 8px; }

.journey-panel { position: fixed; z-index: 130; inset: 0; display: none; }.journey-panel.is-open { display: block; }.journey-sheet { position: absolute; top: 0; right: 0; width: min(470px,100vw); height: 100%; padding: 24px; color: #17253d; background: #fbfcfd; box-shadow: -24px 0 70px rgba(9,27,43,.22); overflow-y: auto; animation: drawer-in .28s cubic-bezier(.2,.75,.25,1); }.journey-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }.journey-sheet h2 { margin: 5px 0 6px; font-size: 22px; letter-spacing: -.025em; }.journey-sheet header p { margin: 0; color: #768297; font-size: 9px; }.guide-mode { display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 10px; margin: 20px 0; padding: 11px; border: 1px solid #dfe6ef; border-radius: 11px; background: #fff; }.guide-mode > span { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; color: #2f6ff2; background: #edf3ff; }.guide-mode svg { width: 17px; height: 17px; }.guide-mode div { display: flex; flex-direction: column; }.guide-mode b { font-size: 9px; }.guide-mode small { color: #8994a7; font-size: 7px; }.guide-mode button { width: 34px; height: 19px; padding: 2px; border: 0; border-radius: 99px; background: #2f6ff2; cursor: pointer; }.guide-mode button i { display: block; width: 15px; height: 15px; margin-left: 15px; border-radius: 50%; background: #fff; transition: .18s ease; }.guide-mode button[aria-pressed="false"] { background: #cbd3df; }.guide-mode button[aria-pressed="false"] i { margin-left: 0; }
.journey-location { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; color: #eaf1f3; background: linear-gradient(145deg,#122d3a,#0e202c); }.location-pin { display: grid; place-items: center; width: 43px; height: 43px; padding: 7px; flex: none; border: 1px solid rgba(255,255,255,.15); border-radius: 13px; background: linear-gradient(145deg,rgba(255,255,255,.12),rgba(255,255,255,.05)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }.location-pin img { width: 29px; height: 29px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.2)); }.journey-location div { display: flex; flex-direction: column; }.journey-location small { color: #7f99a3; font-size: 7px; }.journey-location h3 { margin: 3px 0; font-size: 17px; }.journey-location p { margin: 0; color: #91a8b0; font-size: 8px; }
.journey-route-map { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; align-items: start; margin: 24px 0; }.journey-route-map > span { width: 75px; display: flex; flex-direction: column; align-items: center; text-align: center; }.journey-route-map > span i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: #7b879a; background: #edf1f5; font-size: 9px; font-style: normal; font-weight: 700; }.journey-route-map > span i svg { width: 14px; height: 14px; }.journey-route-map > span.done i { color: #fff; background: #2f6ff2; }.journey-route-map > span.active i { color: #fff; background: #df2535; box-shadow: 0 0 0 5px rgba(223,37,53,.08); }.journey-route-map b { margin-top: 7px; font-size: 8px; }.journey-route-map small { margin-top: 2px; color: #939dae; font-size: 6.5px; }.journey-route-map > em { height: 1px; margin-top: 15px; background: #dfe5ec; }
.journey-next-action { padding: 18px; border: 1px solid #e1e6ed; border-radius: 12px; background: #fff; }.journey-next-action h3 { margin: 7px 0 5px; font-size: 15px; }.journey-next-action > p { margin: 0; color: #788499; font-size: 8px; line-height: 1.6; }.journey-next-action > div { display: grid; grid-template-columns: .7fr 1.3fr; gap: 8px; margin: 13px 0; }.journey-next-action > div span { display: flex; flex-direction: column; padding: 9px; border-radius: 8px; background: #f5f7fa; }.journey-next-action small { color: #929cad; font-size: 7px; }.journey-next-action b { margin-top: 2px; font-size: 8px; }.intent-section { margin-top: 22px; }.intent-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; margin-top: 9px; }.intent-grid button { padding: 10px; border: 1px solid #dfe6ee; border-radius: 9px; color: #53627a; background: #fff; cursor: pointer; text-align: left; font-size: 8px; }.intent-grid button:hover { color: #2f6ff2; border-color: #bfcff0; }.journey-sheet footer { margin-top: 20px; padding-top: 15px; border-top: 1px solid #e4e9ef; }.journey-sheet footer span { display: flex; align-items: flex-start; gap: 7px; color: #7f8a9e; font-size: 7px; line-height: 1.5; }.journey-sheet footer svg { width: 13px; height: 13px; flex: none; color: #38936f; }
@keyframes drawer-in { from { opacity: .5; transform: translateX(24px); } }

.module-sheet { width: min(1180px,calc(100vw - 40px)); max-height: calc(100vh - 98px); overflow-y: auto; }.panel-groups { grid-template-columns: repeat(5,1fr); gap: 16px; }

@media (max-width: 1050px) { .journey-dock { width: min(690px,calc(100vw - 180px)); grid-template-columns: 38px auto 1fr auto; }.journey-dock-next { display: none; }.panel-groups { grid-template-columns: repeat(2,1fr); }.module-sheet { width: min(760px,calc(100vw - 40px)); }.today-layout, .universal-workspace { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .journey-dock { bottom: 8px; width: calc(100vw - 18px); grid-template-columns: 34px 1fr auto; min-height: 50px; }.journey-dock-track, .journey-dock-next { display: none; }.journey-dock-open { font-size: 0; }.journey-dock-open svg { width: 16px; height: 16px; }.first-visit-banner { grid-template-columns: 34px 1fr; }.first-visit-banner button { grid-column: 1 / -1; justify-content: center; }.guided-task { grid-template-columns: 27px 1fr; }.guide-action { grid-column: 2; justify-self: start; }.why-impact { grid-template-columns: 1fr; }.why-impact > svg { transform: rotate(90deg); }.route-context-bar { grid-template-columns: 1fr; }.route-context-bar > svg { transform: rotate(90deg); }.module-kpis { grid-template-columns: 1fr; }.module-list-card { overflow-x: auto; }.module-table-head, .universal-row { min-width: 650px; }.panel-groups { grid-template-columns: 1fr; }.journey-sheet { padding: 20px 16px 80px; } }

/* Customer identity watermark */
.company-watermark { position: fixed; z-index: 0; right: 3.5vw; top: 19vh; width: min(520px,42vw); height: min(520px,42vw); display: grid; place-items: center; pointer-events: none; opacity: .042; transform: rotate(-8deg); filter: grayscale(1); }
.company-watermark img { display: none; max-width: 100%; max-height: 100%; object-fit: contain; }
.company-watermark > span { display: grid; place-items: center; width: 78%; height: 78%; border: 28px solid #19324f; border-radius: 28% 42% 30% 44%; transform: rotate(8deg); }
.company-watermark > span b { color: #19324f; font-size: clamp(92px,10vw,176px); line-height: .9; letter-spacing: -.09em; }
.company-watermark > span small { color: #19324f; font-size: clamp(13px,1.3vw,22px); letter-spacing: .24em; }
body.has-company-logo .company-watermark img { display: block; }
body.has-company-logo .company-watermark > span { display: none; }
body.board-mode .company-watermark { z-index: 2; opacity: .045; filter: grayscale(1) brightness(2.5); mix-blend-mode: screen; }
.topbar, .content { position: relative; z-index: 6; }
.journey-dock { z-index: 120; }
/* 指挥中心一键隐藏：dock 右侧“收起 ×”，隐藏后底部只留一条小恢复条。 */
.journey-dock-hide { display: inline-flex; align-items: center; margin-left: 2px; padding: 3px 7px; border-radius: 8px; color: #98a5b8; font-size: 8px; font-weight: 600; white-space: nowrap; }
.journey-dock-hide:hover { color: #df2535; background: rgba(223,37,53,.08); }
body.board-mode .journey-dock-hide { color: #6e8993; }
body.board-mode .journey-dock-hide:hover { color: #ff8992; background: rgba(223,37,53,.14); }
.journey-dock-restore { position: fixed; z-index: 119; left: 50%; bottom: 8px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 14px; border: 1px solid #dce4ec; border-radius: 999px; color: #68738a; background: rgba(255,255,255,.9); box-shadow: 0 8px 22px rgba(24,43,70,.12); backdrop-filter: blur(12px); font-size: 10px; font-weight: 600; cursor: pointer; opacity: .75; }
.journey-dock-restore:hover { opacity: 1; color: #2f6ff2; }
.journey-dock-restore img { width: 15px; height: 15px; object-fit: contain; }
body.board-mode .journey-dock-restore { border-color: #294754; color: #8fa9b3; background: rgba(12,31,42,.92); }
body.board-mode .journey-dock-restore:hover { color: #9ecbff; }
body.dock-hidden .journey-dock { display: none; }
.floating-assistant { z-index: 60; }
.topbar { position: sticky; }
body:not(.board-mode) .topbar { background: #fff; border-bottom: 1px solid #e4e9ef; box-shadow: 0 1px 0 rgba(20,37,58,.025), 0 6px 18px rgba(28,48,73,.025); backdrop-filter: none; }
body.board-mode .content { z-index: 1; }

.company-switch { min-width: 190px; justify-content: flex-start; padding: 0 9px 0 6px; }
.company-switch-logo { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: #fff; background: linear-gradient(145deg,#18314f,#2f6ff2); overflow: hidden; font-size: 8px; font-weight: 800; }
.company-switch-logo img { display: none; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.company-switch-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.company-switch-copy b { max-width: 124px; overflow: hidden; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.company-switch-copy small { margin-top: 3px; color: #96a0b1; font-size: 6px; }
body.has-company-logo .company-switch-logo img { display: block; }
body.has-company-logo .company-switch-logo b { display: none; }

.brand-panel { position: fixed; z-index: 150; inset: 0; display: none; }.brand-panel.is-open { display: block; }
.brand-sheet { position: absolute; top: 50%; left: 50%; width: min(620px,calc(100vw - 32px)); max-height: calc(100vh - 44px); padding: 25px; border: 1px solid rgba(255,255,255,.8); border-radius: 18px; background: #fbfcfe; box-shadow: 0 30px 90px rgba(11,28,48,.28); overflow-y: auto; transform: translate(-50%,-50%); animation: sheet-in .25s cubic-bezier(.2,.7,.2,1); }
.brand-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }.brand-sheet h2 { margin: 5px 0 6px; font-size: 21px; letter-spacing: -.025em; }.brand-sheet header p { max-width: 450px; margin: 0; color: #788399; font-size: 9px; line-height: 1.55; }
.brand-company-card { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 13px; margin-top: 20px; padding: 15px; border: 1px solid #e0e6ee; border-radius: 13px; background: #fff; }.brand-company-logo { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; color: #fff; background: linear-gradient(145deg,#17324e,#2f6ff2); overflow: hidden; font-size: 15px; font-weight: 800; }.brand-company-logo img { display: none; width: 100%; height: 100%; object-fit: contain; background: #fff; }.brand-company-card div { min-width: 0; }.brand-company-card small { color: #8b96a8; font-size: 7px; }.brand-company-card h3 { margin: 3px 0; font-size: 12px; }.brand-company-card p { margin: 0; color: #7d899d; font-size: 7px; }.brand-company-card em { display: flex; align-items: center; gap: 6px; color: #24785d; font-size: 7px; font-style: normal; }.brand-company-card em i { width: 6px; height: 6px; border-radius: 50%; background: #28a879; box-shadow: 0 0 0 4px rgba(40,168,121,.1); }
.brand-preview-stage { margin-top: 14px; padding: 14px; border: 1px solid #e2e7ef; border-radius: 13px; background: linear-gradient(145deg,#f5f8fd,#fff); }.brand-preview-stage > span { color: #8893a6; font-size: 7px; font-weight: 700; }.brand-preview-stage > div { position: relative; height: 160px; display: grid; place-items: center; margin-top: 9px; border: 1px solid #e5eaf1; border-radius: 11px; background: #fff; overflow: hidden; }.brand-preview-stage > div::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#eef2f7 1px,transparent 1px),linear-gradient(90deg,#eef2f7 1px,transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg,transparent,#000,transparent); opacity: .7; }.brand-preview-stage img { position: relative; z-index: 1; display: none; max-width: 280px; max-height: 105px; object-fit: contain; opacity: .12; filter: grayscale(1); }.brand-preview-stage > div b { position: relative; z-index: 1; color: rgba(24,49,79,.11); font-size: 78px; letter-spacing: -.08em; }.brand-preview-stage > div small { position: absolute; z-index: 1; bottom: 14px; color: #8c97aa; font-size: 7px; letter-spacing: .08em; }.brand-preview-stage > p { margin: 9px 0 0; color: #8490a3; font-size: 7px; }
.brand-upload-actions { display: flex; align-items: center; gap: 9px; margin-top: 14px; }.brand-upload-actions input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }.brand-upload-actions label { cursor: pointer; }.brand-upload-actions .ghost-button { background: #fff; }
.brand-safety-note { display: flex; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 11px; color: #2c6f61; background: #edf8f4; }.brand-safety-note svg { flex: 0 0 auto; width: 17px; height: 17px; }.brand-safety-note p { display: flex; flex-direction: column; margin: 0; }.brand-safety-note b { font-size: 8px; }.brand-safety-note small { margin-top: 3px; color: #69877f; font-size: 7px; line-height: 1.45; }
body.has-company-logo .brand-company-logo img, body.has-company-logo .brand-preview-stage img { display: block; }.brand-stage-has-logo b, body.has-company-logo .brand-company-logo b { display: none; }

/* Distinct module workspaces */
#view-module { --module-accent:#2f6ff2; --module-soft:#edf3ff; }
#view-module .primary-button { background: var(--module-accent); }
.module-signature { min-height: 520px; }
.signature-canvas { position: relative; min-height: 520px; color: #17243a; animation: view-in .3s ease both; }
.signature-identity { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #e0e6ee; border-radius: 12px; background: linear-gradient(110deg,#fff,color-mix(in srgb,var(--module-soft) 70%,#fff)); }
.signature-glyph { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; color: var(--module-accent); background: var(--module-soft); }.signature-glyph svg { width: 21px; height: 21px; }.signature-identity div { display: flex; flex-direction: column; }.signature-identity small { color: #8792a5; font-size: 7px; }.signature-identity b { margin-top: 3px; font-size: 11px; }
.signature-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(270px,.55fr); gap: 12px; }.signature-grid.equal { grid-template-columns: repeat(2,minmax(0,1fr)); }.signature-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.signature-panel { min-width: 0; padding: 17px; border: 1px solid #e0e6ee; border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(27,48,78,.035); }.signature-panel.tinted { background: linear-gradient(145deg,var(--module-soft),#fff); }.signature-panel.dark { color: #eef4f8; border-color: #20394c; background: #102b3b; }.signature-panel.dark p,.signature-panel.dark small { color: #8fa6b2; }
.sig-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }.sig-head div { display: flex; flex-direction: column; }.sig-head small { color: #8a95a7; font-size: 7px; }.sig-head h2 { margin: 3px 0 0; font-size: 14px; }.sig-head button,.sig-link { border: 0; color: var(--module-accent); background: transparent; cursor: pointer; font-size: 8px; font-weight: 700; }
.sig-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }.sig-kpi { padding: 11px; border: 1px solid #e5e9ef; border-radius: 9px; background: #fff; }.sig-kpi small { display: block; color: #8d97a8; font-size: 7px; }.sig-kpi b { display: block; margin-top: 4px; font-size: 16px; }.sig-kpi em { color: #2d8c69; font-size: 7px; font-style: normal; }
.sig-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #edf0f4; }.sig-row:first-child { border-top: 0; }.sig-row span { display: flex; flex-direction: column; min-width: 0; }.sig-row b { overflow: hidden; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }.sig-row small { margin-top: 3px; color: #8995a8; font-size: 7px; }.sig-row em { padding: 5px 7px; border-radius: 99px; color: var(--module-accent); background: var(--module-soft); font-size: 7px; font-style: normal; font-weight: 700; }
.module-wayfinding { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 15px; padding: 12px 14px; border: 1px solid color-mix(in srgb,var(--module-accent) 20%,#e1e6ed); border-radius: 11px; background: color-mix(in srgb,var(--module-soft) 55%,#fff); }.module-wayfinding div { display: flex; flex-direction: column; }.module-wayfinding small { color: #8792a4; font-size: 7px; }.module-wayfinding b { margin-top: 3px; font-size: 9px; }.module-wayfinding-status { display:flex; align-items:center; gap:6px; color:color-mix(in srgb,var(--module-accent) 78%,#4e5d70); font-size:8px; font-weight:750; white-space:nowrap; }.module-wayfinding svg { width: 13px; height: 13px; }

.quote-funnel { display: grid; gap: 8px; padding: 5px 0; }.funnel-stage { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; min-height: 48px; padding: 0 12px; border-radius: 9px; color: #26334a; background: color-mix(in srgb,var(--module-soft) 68%,#fff); }.funnel-stage:nth-child(2) { width: 90%; }.funnel-stage:nth-child(3) { width: 78%; }.funnel-stage:nth-child(4) { width: 65%; }.funnel-stage i { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; color: #fff; background: var(--module-accent); font-size: 7px; font-style: normal; }.funnel-stage b { font-size: 9px; }.funnel-stage small { color: #8590a3; font-size: 7px; }
.account-grid,.product-grid,.people-grid,.help-topic-grid,.preference-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }.account-card,.product-tile,.person-card,.help-topic,.preference-card { min-width: 0; padding: 13px; border: 1px solid #e4e8ee; border-radius: 10px; background: #fff; }.account-card header,.person-card header { display: flex; align-items: center; gap: 9px; }.account-avatar,.person-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--module-accent); background: var(--module-soft); font-size: 8px; font-weight: 800; }.account-card b,.person-card b,.product-tile b,.help-topic b,.preference-card b { font-size: 9px; }.account-card p,.product-tile p,.person-card p,.help-topic p,.preference-card p { margin: 7px 0 0; color: #8591a4; font-size: 7px; line-height: 1.45; }
.product-visual { height: 82px; display: grid; place-items: center; margin-bottom: 9px; border-radius: 9px; color: var(--module-accent); background: var(--module-soft); }.product-visual svg { width: 32px; height: 32px; }.product-tile footer { display: flex; justify-content: space-between; margin-top: 9px; color: #7c879a; font-size: 7px; }
.bom-tree { padding: 8px 0; }.bom-node { position: relative; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; min-height: 48px; margin: 0 0 8px calc(var(--depth,0)*32px); padding: 8px 11px; border: 1px solid #e3e8ef; border-radius: 9px; background: #fff; }.bom-node::before { content:""; position:absolute; left:-18px; width:17px; height:1px; background:#d9e0e9; }.bom-node.root::before { display:none; }.bom-node i { display:grid;place-items:center;width:29px;height:29px;border-radius:8px;color:var(--module-accent);background:var(--module-soft);font-style:normal;font-size:8px; }.bom-node b { font-size:9px; }.bom-node small { color:#8792a5;font-size:7px; }
.score-bars { display:grid;gap:11px; }.score-bar { display:grid;grid-template-columns:100px 1fr 34px;align-items:center;gap:10px; }.score-bar span { font-size:8px;font-weight:700; }.score-bar div { height:7px;border-radius:99px;background:#edf0f4;overflow:hidden; }.score-bar i { display:block;height:100%;border-radius:inherit;background:var(--module-accent); }.score-bar b { font-size:9px; }
.milestone-line,.route-line,.automation-flow { display:flex;align-items:flex-start;gap:0;padding:19px 3px;overflow-x:auto; }.milestone,.route-stop,.flow-node { position:relative;min-width:112px;display:flex;flex-direction:column;align-items:center;text-align:center; }.milestone:not(:last-child)::after,.route-stop:not(:last-child)::after,.flow-node:not(:last-child)::after { content:"";position:absolute;left:62%;top:14px;width:76%;height:2px;background:#e0e6ee; }.milestone i,.route-stop i,.flow-node i { position:relative;z-index:1;display:grid;place-items:center;width:29px;height:29px;border-radius:9px;color:#8b96a8;background:#eef1f5;font-size:8px;font-style:normal;font-weight:800; }.milestone.done i,.route-stop.done i,.flow-node.done i { color:#fff;background:var(--module-accent); }.milestone b,.route-stop b,.flow-node b { margin-top:8px;font-size:8px; }.milestone small,.route-stop small,.flow-node small { margin-top:3px;color:#8b96a8;font-size:6px; }
.gantt { display:grid;gap:9px; }.gantt-row { display:grid;grid-template-columns:115px 1fr auto;align-items:center;gap:9px; }.gantt-row > span { display:flex;flex-direction:column; }.gantt-row b{font-size:8px}.gantt-row small{color:#8994a6;font-size:6px}.gantt-track{height:25px;padding:4px;border-radius:7px;background:#f0f3f7}.gantt-track i{display:block;width:var(--progress);height:100%;border-radius:5px;background:linear-gradient(90deg,var(--module-accent),color-mix(in srgb,var(--module-accent) 60%,#fff));}.gantt-row em{font-size:7px;font-style:normal;color:#7d899d}
.live-board { display:grid;grid-template-columns:1.1fr .9fr;gap:10px; }.live-number { display:grid;place-items:center;min-height:190px;border-radius:12px;color:#fff;background:linear-gradient(145deg,#102d3e,var(--module-accent)); }.live-number span{font-size:8px;opacity:.72}.live-number b{font-size:58px;line-height:1}.live-number small{font-size:8px;opacity:.75}.pulse-list{display:grid;gap:7px}.pulse-item{display:grid;grid-template-columns:7px 1fr auto;align-items:center;gap:8px;padding:9px;border-radius:8px;background:#f6f8fb}.pulse-item i{width:7px;height:7px;border-radius:50%;background:var(--module-accent)}.pulse-item b{font-size:8px}.pulse-item small{font-size:7px;color:#8691a4}
.station-console { min-height:315px;display:grid;grid-template-columns:1fr .7fr;gap:13px;padding:22px;border-radius:15px;color:#eff6f8;background:#0e2938; }.station-job{display:flex;flex-direction:column;justify-content:center}.station-job span{color:#89a4ae;font-size:8px}.station-job h2{margin:8px 0;font-size:25px}.station-job p{margin:0;color:#8fa7b0;font-size:9px}.station-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.station-actions button{border:1px solid #2b4a58;border-radius:12px;color:#dce9ed;background:#173746;font-size:9px;font-weight:700}.station-actions button.primary{grid-column:1/-1;color:#fff;border-color:var(--module-accent);background:var(--module-accent)}
.warehouse-grid { display:grid;grid-template-columns:repeat(8,1fr);gap:6px; }.warehouse-cell{aspect-ratio:1;display:grid;place-items:center;border-radius:7px;color:#68758b;background:#edf1f5;font-size:6px}.warehouse-cell.low{color:#a56529;background:#fde8cf}.warehouse-cell.focus{color:#fff;background:var(--module-accent)}
.route-map { position:relative;min-height:245px;border-radius:13px;background:radial-gradient(circle at 25% 40%,var(--module-soft),transparent 28%),linear-gradient(145deg,#f5f8fc,#fff);overflow:hidden}.route-map::before{content:"";position:absolute;inset:0;background-image:radial-gradient(#b8c4d3 1px,transparent 1px);background-size:18px 18px;opacity:.38}.route-map svg{position:absolute;inset:22% 12%;width:76%;height:55%;color:var(--module-accent)}.map-label{position:absolute;z-index:1;padding:7px 9px;border:1px solid #e1e7ee;border-radius:8px;background:#fff;box-shadow:0 7px 18px rgba(31,55,82,.08);font-size:7px;font-weight:700}.map-label.a{left:12%;top:28%}.map-label.b{right:14%;bottom:22%}
.document-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:9px; }.document-card{min-height:130px;padding:13px;border:1px solid #e1e6ed;border-radius:10px;background:#fff}.document-card>span{display:grid;place-items:center;width:31px;height:31px;border-radius:8px;color:var(--module-accent);background:var(--module-soft)}.document-card svg{width:15px;height:15px}.document-card b{display:block;margin-top:17px;font-size:9px}.document-card small{display:block;margin-top:4px;color:#8994a6;font-size:7px}.document-card em{display:inline-block;margin-top:10px;color:#2a8664;font-size:7px;font-style:normal}
.match-lanes { display:grid;grid-template-columns:1fr 36px 1fr;align-items:center;gap:10px; }.match-column{display:grid;gap:8px}.match-record{padding:11px;border:1px solid #e2e7ed;border-radius:9px;background:#fff}.match-record b{display:block;font-size:9px}.match-record small{display:block;margin-top:4px;color:#8994a6;font-size:7px}.match-center{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;color:#fff;background:var(--module-accent)}.match-center svg{width:16px;height:16px}
.chart-stage { min-height:215px;display:flex;align-items:flex-end;gap:11px;padding:20px 16px 8px;border-radius:12px;background:linear-gradient(180deg,#f7f9fc,#fff); }.chart-column{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:180px}.chart-column i{width:74%;height:var(--height);border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,var(--module-accent),color-mix(in srgb,var(--module-accent) 45%,#fff))}.chart-column small{margin-top:7px;color:#8994a6;font-size:6px}
.learning-steps,.audit-chain,.faq-items { display:grid;gap:8px; }.learning-step,.audit-event,.faq-item{display:grid;grid-template-columns:32px 1fr auto;align-items:center;gap:10px;padding:11px;border:1px solid #e2e7ee;border-radius:9px;background:#fff}.learning-step i,.audit-event i{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;color:var(--module-accent);background:var(--module-soft);font-size:8px;font-style:normal;font-weight:800}.learning-step b,.audit-event b,.faq-item b{font-size:9px}.learning-step small,.audit-event small,.faq-item small{display:block;margin-top:3px;color:#8994a6;font-size:7px}.learning-step em,.audit-event em{color:#2a8464;font-size:7px;font-style:normal}.faq-item{grid-template-columns:1fr auto}.faq-item button{border:0;color:var(--module-accent);background:transparent;font-size:16px}
.setting-list { display:grid;gap:8px; }.setting-row{display:grid;grid-template-columns:1fr 150px auto;align-items:center;gap:11px;padding:11px;border:1px solid #e3e7ee;border-radius:9px;background:#fff}.setting-row b{font-size:8px}.setting-row small{color:#8994a6;font-size:7px}.setting-control{height:8px;border-radius:99px;background:#e9edf3;overflow:hidden}.setting-control i{display:block;width:68%;height:100%;background:var(--module-accent)}.setting-row button{border:0;color:var(--module-accent);background:transparent;font-size:8px;font-weight:700}
.inbox-layout { display:grid;grid-template-columns:210px 1fr;min-height:330px;border:1px solid #e0e5ed;border-radius:12px;background:#fff;overflow:hidden}.inbox-list{border-right:1px solid #e4e8ee}.inbox-item{display:flex;flex-direction:column;padding:12px;border-bottom:1px solid #edf0f4}.inbox-item.active{background:var(--module-soft);box-shadow:inset 3px 0 var(--module-accent)}.inbox-item b{font-size:8px}.inbox-item small{margin-top:4px;color:#8994a6;font-size:7px}.inbox-message{padding:21px}.inbox-message h2{margin:5px 0 9px;font-size:16px}.inbox-message p{color:#6f7b90;font-size:9px;line-height:1.65}.message-action{margin-top:18px;padding:13px;border-radius:9px;background:#f5f7fa;font-size:8px}
.chat-layout{display:grid;grid-template-columns:1fr 280px;gap:11px}.chat-thread{min-height:320px;padding:17px;border:1px solid #e0e6ed;border-radius:12px;background:linear-gradient(145deg,#fff,var(--module-soft))}.chat-bubble{max-width:76%;margin-bottom:10px;padding:11px 13px;border-radius:12px 12px 12px 3px;color:#3f4d65;background:#fff;box-shadow:0 5px 14px rgba(32,53,80,.06);font-size:8px;line-height:1.55}.chat-bubble.user{margin-left:auto;border-radius:12px 12px 3px 12px;color:#fff;background:var(--module-accent)}.chat-sources{padding:17px;border:1px solid #e0e6ed;border-radius:12px;background:#fff}
.world-map { position:relative;min-height:350px;border-radius:14px;background:linear-gradient(145deg,#eaf2f7,#f9fbfc);overflow:hidden}.world-map::before{content:"";position:absolute;inset:12%;border-radius:44% 56% 47% 53%;background:color-mix(in srgb,var(--module-accent) 12%,#dbe5eb);box-shadow:140px 40px 0 -25px color-mix(in srgb,var(--module-accent) 10%,#dbe5eb),-180px 80px 0 -35px #dbe5eb}.map-pin{position:absolute;z-index:1;display:grid;place-items:center;width:27px;height:27px;border:4px solid #fff;border-radius:50%;color:#fff;background:var(--module-accent);box-shadow:0 6px 15px rgba(34,62,93,.2);font-size:6px}.map-pin.a{left:28%;top:42%}.map-pin.b{left:49%;top:31%}.map-pin.c{right:25%;bottom:30%}
.toggle-line{display:flex;align-items:center;justify-content:space-between;margin-top:10px}.fake-toggle{width:32px;height:18px;padding:2px;border-radius:99px;background:var(--module-accent)}.fake-toggle i{display:block;width:14px;height:14px;margin-left:14px;border-radius:50%;background:#fff}.automation-flow .flow-node{min-width:145px}.flow-node.trigger i{background:#172d46}.flow-node.action i{background:var(--module-accent)}.flow-node.guard i{color:#9f662c;background:#fde8cf}
.usage-layout{display:grid;grid-template-columns:220px 1fr;gap:12px}.usage-ring{display:grid;place-items:center;min-height:220px;border:1px solid #e1e6ed;border-radius:12px;background:conic-gradient(var(--module-accent) 0 64%,#edf1f5 64%)}.usage-ring>div{display:grid;place-items:center;width:145px;height:145px;border-radius:50%;background:#fff}.usage-ring b{font-size:32px}.usage-ring small{color:#8792a4;font-size:7px}.plan-card{padding:18px;border:1px solid #e1e6ed;border-radius:12px;background:linear-gradient(145deg,var(--module-soft),#fff)}

@media (max-width: 980px) { .company-switch { min-width:0; }.company-switch .company-switch-copy { display:none; }.signature-grid,.signature-grid.equal,.signature-grid.three,.live-board,.chat-layout,.usage-layout { grid-template-columns:1fr; }.account-grid,.product-grid,.people-grid,.help-topic-grid,.preference-grid { grid-template-columns:repeat(2,1fr); }.document-grid{grid-template-columns:1fr 1fr}.company-watermark{width:54vw;height:54vw;right:-3vw}.brand-company-card{grid-template-columns:52px 1fr}.brand-company-card em{grid-column:2} }
@media (max-width: 720px) { .company-watermark{width:72vw;height:72vw;right:-18vw;top:25vh}.company-watermark>span{border-width:16px}.brand-upload-actions{align-items:stretch;flex-direction:column}.brand-upload-actions label,.brand-upload-actions button{width:100%}.signature-identity{grid-template-columns:42px 1fr}.sig-kpis,.account-grid,.product-grid,.people-grid,.help-topic-grid,.preference-grid,.document-grid{grid-template-columns:1fr}.route-context-bar{display:none}.station-console,.station-actions{grid-template-columns:1fr}.station-actions button.primary{grid-column:auto}.warehouse-grid{grid-template-columns:repeat(5,1fr)}.inbox-layout{grid-template-columns:1fr}.inbox-list{border-right:0;border-bottom:1px solid #e4e8ee}.match-lanes{grid-template-columns:1fr}.match-center{margin:auto;transform:rotate(90deg)} }

/* Layer integrity: navigation must always be an opaque surface above page content. */
.topbar { position: sticky; z-index: 90; background: #fff; backdrop-filter: none; }
.content { position: relative; z-index: 1; }
body:not(.board-mode) .topbar { background: #fff; border-bottom-color: #e2e7ee; box-shadow: 0 1px 0 rgba(20,37,58,.035), 0 7px 20px rgba(28,48,73,.035); }
body.board-mode .topbar { z-index: 90; background: #091923; backdrop-filter: none; }
body.board-mode .content { z-index: 1; }

/* White application launcher even when it is opened from the dark board. */
.module-panel, .command-modal { z-index: 150; color: #17243a; }
.module-sheet, .command-box { color: #17243a; background: #fff; backdrop-filter: none; }
body.board-mode .module-sheet, body.board-mode .command-box { color: #17243a; background: #fff; }
body.board-mode .module-sheet h2, body.board-mode .module-sheet b, body.board-mode .module-sheet input,
body.board-mode .command-box b, body.board-mode .command-box input { color: #17243a; }
body.board-mode .module-sheet p, body.board-mode .module-sheet small, body.board-mode .panel-groups > div > span { color: #6f7c91; }
.module-sheet { border: 1px solid #dfe5ed; box-shadow: 0 28px 80px rgba(10,24,42,.24); }
.panel-groups button { color: #17243a; }
.panel-groups button b { color: #233149; }
.panel-groups button small { color: #778399; }
.module-search-empty { grid-column: 1 / -1; padding: 28px; border: 1px dashed #d9e1ec; border-radius: 12px; color: #768399; background: #f8faff; text-align: center; font-size: 12px; }

/* Shared business action dialog used by every module and record. */
.action-modal { position: fixed; z-index: 170; inset: 0; display: none; color: #17243a; }
.action-modal.is-open { display: block; }
.app-confirm-dialog { width:min(520px,calc(100vw - 32px)); padding:0; color:#17243a; background:transparent; border:0; border-radius:20px; box-shadow:0 28px 80px rgba(13,28,58,.3); }
.app-confirm-dialog::backdrop { background:rgba(15,27,47,.52); backdrop-filter:blur(5px); }
.app-confirm-card { overflow:hidden; background:#fff; border:1px solid #dfe7f2; border-radius:20px; }
.app-confirm-card header { display:flex; align-items:center; gap:13px; padding:20px 22px 14px; }
.app-confirm-icon { display:grid; place-items:center; width:42px; height:42px; flex:0 0 42px; color:#285fd4; background:#edf3ff; border-radius:13px; }
.app-confirm-icon svg { width:20px; height:20px; }
.app-confirm-card header small { display:block; margin-bottom:3px; color:#61718a; font-weight:750; }
.app-confirm-card h2 { margin:0; font-size:18px; line-height:1.35; }
.app-confirm-card > p { margin:0; padding:4px 22px 22px; color:#52627a; font-size:14px; line-height:1.75; }
.app-prompt-field { display:grid; gap:7px; margin:0 22px 20px; color:#33445e; font-size:13px; font-weight:750; }
.app-prompt-field textarea { width:100%; min-height:96px; resize:vertical; padding:12px 13px; color:#17243a; background:#fff; border:1px solid #cfd9e8; border-radius:12px; font:inherit; font-weight:500; line-height:1.55; }
.app-prompt-field textarea:focus { outline:3px solid rgba(47,105,225,.16); border-color:#5b83e8; }
.app-confirm-card footer { display:flex; justify-content:flex-end; gap:10px; padding:14px 22px 18px; background:#f7f9fc; border-top:1px solid #e7ecf3; }
.app-confirm-card footer button { min-width:92px; }
.action-sheet { position: absolute; left: 50%; top: 50%; width: min(900px,calc(100vw - 40px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; transform: translate(-50%,-50%); border: 1px solid #dde4ed; border-radius: 18px; background: #fff; box-shadow: 0 32px 90px rgba(12,28,52,.3); overflow: hidden; animation: action-in .24s cubic-bezier(.2,.78,.22,1); }
@keyframes action-in { from { opacity: 0; transform: translate(-50%,-47%) scale(.985); } }
.action-sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; border-bottom: 1px solid #e8ecf2; background: linear-gradient(120deg,#fff,#f7f9ff); }
.action-title-wrap { display: flex; align-items: flex-start; gap: 13px; }
.action-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; color: #fff; background: linear-gradient(145deg,var(--action-accent,#2f6ff2),color-mix(in srgb,var(--action-accent,#2f6ff2) 70%,#7657da)); box-shadow: 0 8px 20px color-mix(in srgb,var(--action-accent,#2f6ff2) 22%,transparent); }
.action-mark svg { width: 19px; height: 19px; }
.action-mark[hidden], #actionDescription:empty, #actionSafety:empty { display: none; }
.action-title-wrap > div { display: flex; flex-direction: column; }
.action-title-wrap small { color: #2f6ff2; font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.action-title-wrap h2 { margin: 4px 0 3px; font-size: 22px; letter-spacing: -.025em; }
.action-title-wrap p { margin: 0; color: #738096; font-size: 12px; }
.action-progress { display: none; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 10px; padding: 15px 24px; border-bottom: 1px solid #e9edf2; background: #fbfcfe; }
.action-modal.staged-action .action-progress { display: grid; }
.action-progress span { display: flex; align-items: center; gap: 7px; color: #8a95a7; font-size: 10px; }
.action-progress span i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: #edf1f6; font-size: 9px; font-style: normal; font-weight: 800; }
.action-progress span.active { color: #2f6ff2; }
.action-progress span.active i { color: #fff; background: #2f6ff2; }
.action-progress em { height: 1px; background: #dfe5ed; }
.action-body { min-height: 300px; padding: 22px 24px; overflow-y: auto; }
.action-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(230px,.6fr); gap: 18px; }
.action-form, .action-summary { min-width: 0; }
.action-form h3, .action-summary h3 { margin: 0 0 13px; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field > span { display: flex; justify-content: space-between; gap: 10px; color: #526077; font-size: 11px; font-weight: 650; }
.form-field > span small { color: #9aa4b4; font-size: 9px; font-weight: 500; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 42px; padding: 10px 11px; border: 1px solid #dce3ec; border-radius: 10px; color: #1c2940; background: #fff; outline: 0; font: inherit; font-size: 12px; }
.form-field textarea { min-height: 82px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #8aaaf2; box-shadow: 0 0 0 3px rgba(47,111,242,.09); }
.action-summary { padding: 16px; border: 1px solid #e0e6ef; border-radius: 12px; background: linear-gradient(145deg,#f7f9ff,#fffaf7); }
.action-summary-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid #e4e9f0; border-radius: 10px; background: #fff; }
.action-summary-card + .action-summary-card { margin-top: 9px; }
.action-summary-card small { color: #8994a6; font-size: 9px; }
.action-summary-card b { color: #26344c; font-size: 12px; }
.action-summary-card p { margin: 2px 0 0; color: #738096; font-size: 10px; line-height: 1.55; }
.action-impact { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 11px; border-radius: 10px; color: #2c6f61; background: #edf8f4; }
.action-impact svg { width: 16px; height: 16px; flex: none; }
.action-impact p { margin: 0; font-size: 10px; line-height: 1.5; }
.record-detail { display: grid; gap: 12px; }
.record-export-panel { display: grid; gap: 12px; padding: 14px; border: 1px solid #cbd9ef; border-radius: 12px; background: #f8fbff; }
.record-export-panel > header { display: flex; align-items: center; gap: 10px; }
.record-export-panel > header > span { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; height: 36px; border-radius: 10px; color: #315ed4; background: #eaf1ff; }
.record-export-panel > header svg { width: 17px; height: 17px; }
.record-export-panel > header > div { display: flex; flex-direction: column; min-width: 0; }
.record-export-panel > header small { color: #6f84a5; font-size: 8px; }
.record-export-panel > header b { margin-top: 2px; color: #182a47; font-size: 12px; }
.record-export-panel > header p { margin: 3px 0 0; color: #66758c; font-size: 9px; line-height: 1.45; }
.record-export-links { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 7px; }
.record-export-links a { display: grid; grid-template-columns: minmax(0,1fr) auto 12px; align-items: center; gap: 7px; min-height: 34px; padding: 0 9px; border: 1px solid #d7e2f3; border-radius: 9px; color: #223654; background: #fff; text-decoration: none; }
.record-export-links a:hover { border-color: #8babeb; background: #f1f6ff; }
.record-export-links a span { overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.record-export-links a em { color: #315ed4; font-size: 8px; font-style: normal; font-weight: 700; }
.record-export-links a svg { width: 11px; height: 11px; }
.record-hero { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 18px; border: 1px solid #e1e7ef; border-radius: 13px; background: linear-gradient(130deg,#f8faff,#fff); }
.record-hero small { color: #8290a5; font-size: 10px; }.record-hero h3 { margin: 4px 0; font-size: 21px; }.record-hero p { margin: 0; color: #68758b; font-size: 11px; }
.record-status { align-self: start; padding: 6px 9px; border-radius: 99px; color: #24775d; background: #e8f6ef; font-size: 10px; font-weight: 750; }
.record-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.record-facts span { display: flex; flex-direction: column; padding: 12px; border: 1px solid #e5eaf1; border-radius: 10px; background: #fff; }.record-facts small { color: #8a95a7; font-size: 9px; }.record-facts b { margin-top: 4px; font-size: 11px; }
.record-action-form { display: grid; gap: 12px; padding: 14px; border: 1px solid #ccdaf6; border-radius: 12px; background: linear-gradient(135deg,#f4f8ff,#fff); }
.record-action-form > div { display: flex; flex-direction: column; }.record-action-form > div small { color: #7586a1; font-size: 9px; }.record-action-form > div b { margin-top: 3px; color: #244f9e; font-size: 13px; }.record-action-form > p { margin: 0; color: #66758c; font-size: 10px; line-height: 1.55; }
.record-action-form .form-grid { margin-top: 0; }
.quick-create-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.quick-create-grid > button { display: grid; grid-template-columns: 38px minmax(0,1fr) 18px; grid-template-rows: auto auto; align-items: center; column-gap: 11px; min-width: 0; padding: 13px; border: 1px solid #dde4ed; border-radius: 12px; color: #1d2b42; background: #fff; cursor: pointer; text-align: left; transition: border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.quick-create-grid > button:hover { border-color: #adc4ef; box-shadow: 0 8px 22px rgba(37,74,125,.09); transform: translateY(-1px); }
.quick-create-grid > button > span { display: grid; grid-row: 1 / 3; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #2f6ff2; background: #edf3ff; }
.quick-create-grid > button > span svg { width: 18px; height: 18px; }.quick-create-grid > button b { align-self: end; font-size: 12px; }.quick-create-grid > button small { align-self: start; overflow: hidden; color: #7b879a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.quick-create-arrow { grid-column: 3; grid-row: 1 / 3; width: 15px; height: 15px; color: #8b98aa; }
.company-identity-settings { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; background: linear-gradient(135deg,#f7f9fc,#fff); }.company-identity-settings > div { min-width: 0; }.company-identity-settings small { color: #7a879a; font-size: 9px; }.company-identity-settings h2 { margin: 4px 0; font-size: 15px; }.company-identity-settings p { max-width: 700px; margin: 0; color: #6f7d92; font-size: 10px; line-height: 1.55; }.company-identity-settings > button { flex: none; }
@media (max-width:560px) { .quick-create-grid { grid-template-columns: 1fr; } }
.action-success { display: grid; place-items: center; min-height: 290px; text-align: center; }
.action-success > span { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; color: #fff; background: #28a879; box-shadow: 0 14px 30px rgba(40,168,121,.22); }.action-success svg { width: 28px; height: 28px; }.action-success h3 { margin: 16px 0 6px; font-size: 21px; }.action-success p { max-width: 420px; margin: 0; color: #738096; font-size: 12px; line-height: 1.6; }
.action-success > span { position: relative; }
.action-success > span::after { content: ""; position: absolute; inset: 0; border: 2px solid #28a879; border-radius: inherit; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .action-success > span { animation: action-success-badge .58s cubic-bezier(.2,.85,.3,1) backwards; }
  .action-success > span::after { animation: action-success-ring .95s .36s cubic-bezier(.2,.7,.3,1); }
  .action-success h3 { animation: action-success-rise .44s .24s cubic-bezier(.2,.8,.2,1) backwards; }
  .action-success p { animation: action-success-rise .44s .32s cubic-bezier(.2,.8,.2,1) backwards; }
  .action-success > button, .action-success .success-proof { animation: action-success-rise .44s .4s cubic-bezier(.2,.8,.2,1) backwards; }
}
@keyframes action-success-badge { 0% { opacity: 0; transform: scale(.4); border-radius: 50%; } 58% { opacity: 1; transform: scale(1.09); } 100% { transform: scale(1); } }
@keyframes action-success-ring { 0% { opacity: .5; transform: scale(1); } 100% { opacity: 0; transform: scale(1.75); } }
@keyframes action-success-rise { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: translateY(0); } }
.action-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 24px; border-top: 1px solid #e6ebf1; background: #fbfcfe; }
.action-footer > span { display: flex; align-items: center; gap: 7px; color: #718096; }.action-footer > span svg { width: 15px; height: 15px; color: #2c8a69; }.action-footer small { font-size: 9px; }.action-footer > div { display: flex; gap: 8px; }
.sig-row-button { width: 100%; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.sig-row-button { grid-template-columns: 1fr auto 18px; }
.sig-row-button:hover { padding-inline: 8px; border-radius: 9px; background: color-mix(in srgb,var(--module-soft) 55%,#fff); }
.sig-row-button > svg { width: 14px; height: 14px; color: var(--module-accent); }
.interactive-detail { cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }

/* 独立业务单据页：销售单、采购单分别开新页签，并用 draft 参数隔离各自草稿。 */
body.standalone-document-entry { min-width: 0; overflow: hidden; background: #f4f7fb; }
body.standalone-document-entry > .company-watermark,
body.standalone-document-entry > .journey-dock,
body.standalone-document-entry > .floating-assistant,
body.standalone-document-entry > .assistant-panel,
body.standalone-document-entry > .command-modal { display: none !important; }
body.standalone-document-entry .standalone-document-modal { position: fixed; inset: 0 0 0 232px; display: block; background: #f4f7fb; }
body.standalone-document-entry .standalone-document-modal > .panel-backdrop { display: none; }
body.standalone-document-entry .standalone-document-modal .action-sheet {
  position: absolute; inset: 0; left: 0; top: 0; width: 100%; height: 100%; max-height: none;
  transform: none; border: 0; border-radius: 0; box-shadow: none; animation: none;
}
body.standalone-document-entry .standalone-document-modal .action-sheet-header { padding: 18px 28px 15px; }
body.standalone-document-entry .standalone-document-modal .action-progress { padding: 12px 28px; }
body.standalone-document-entry .standalone-document-modal .action-body { min-height: 0; padding: 0; overflow: auto; }
body.standalone-document-entry .standalone-document-modal .action-footer { padding: 12px 28px; }
body.standalone-document-entry .standalone-document-modal .standalone-return-button {
  display: inline-flex; align-items: center; gap: 8px; width: auto; min-width: 138px; height: 38px;
  padding: 0 14px; border: 1px solid #d8e1ed; border-radius: 11px; color: #31547f; background: #fff;
  font-size: 12px; font-weight: 750; white-space: nowrap; box-shadow: 0 4px 14px rgba(24,49,83,.06);
}
body.standalone-document-entry .standalone-document-modal .standalone-return-button svg {
  width: 15px; height: 15px; transform: rotate(180deg);
}
body.standalone-document-entry .standalone-document-modal .relationship-workbench {
  grid-template-columns: minmax(350px,.62fr) minmax(760px,1.88fr);
  grid-template-rows: auto minmax(0,1fr);
  min-width: 1180px; min-height: 100%;
}
/* 独立单据页把核对卡片并入搜索列；选中主体后收起候选列表，把连续宽度留给单据内容。 */
body.standalone-document-entry .standalone-document-modal .relationship-picker {
  display: flex; flex-direction: column; min-height: 0;
}
body.standalone-document-entry .standalone-document-modal .relationship-list {
  flex: 0 1 auto; min-height: 0; max-height: clamp(240px, 42vh, 500px);
  align-content: start; grid-auto-rows: max-content;
}
body.standalone-document-entry .standalone-document-modal .relationship-workbench > aside {
  min-height: 0; padding-top: 0;
}
body.standalone-document-entry .standalone-document-modal .relationship-workbench > aside .hover-preview-card {
  position: static; padding: 16px; box-shadow: 0 8px 24px rgba(37,66,108,.06);
}
body.standalone-document-entry .standalone-document-modal .relationship-workbench > aside .hover-preview-empty {
  min-height: 150px;
}
body.standalone-purchase-entry .standalone-purchase-modal .action-sheet-header {
  background: #f7f9fc;
}
body.standalone-purchase-entry .standalone-purchase-modal .relationship-picker { background: #f4f7fb; }
body.standalone-purchase-entry .standalone-purchase-modal .relationship-workbench > aside { background: #f4f7fb; }
body.standalone-purchase-entry .standalone-purchase-modal .action-footer {
  border-top-color: #dce4ef; background: #f7f9fc;
}

/* 采购建单的物料数据始终保持一料一行；宽度不足时横向滚动，不把同一物料拆成多排字段。 */
.purchase-lines-scroll{position:relative;max-width:100%;overflow-x:auto;overflow-y:visible;border:1px solid #d8e1ec;border-radius:12px;background:#fff;box-shadow:0 7px 18px rgba(24,49,83,.04)}
.purchase-lines-table{width:100%;min-width:1320px;border-collapse:separate;border-spacing:0;table-layout:fixed}
.purchase-lines-table th{height:39px;padding:0 10px;border-bottom:1px solid #dbe3ed;color:#60718a;background:#f4f7fb;font-size:11px;font-weight:800;text-align:left;white-space:nowrap}
.purchase-lines-table th:first-child,.purchase-lines-table td:first-child{width:40px;text-align:center}
.purchase-lines-table th:nth-child(2){width:245px}.purchase-lines-table th:nth-child(3){width:180px}.purchase-lines-table th:nth-child(4){width:220px}.purchase-lines-table th:nth-child(5){width:110px}.purchase-lines-table th:nth-child(6){width:135px}.purchase-lines-table th:nth-child(7){width:120px}.purchase-lines-table th:nth-child(8){width:220px}.purchase-lines-table th:last-child{width:62px;text-align:center}
.purchase-lines-table td{height:56px;padding:7px 6px;border-bottom:1px solid #e8edf3;background:#fff;vertical-align:middle}
.purchase-lines-table tbody tr:last-child td{border-bottom:0}
.purchase-lines-table tbody tr{transition:background .16s ease,box-shadow .16s ease}
.purchase-lines-table tbody tr:focus-within td{background:#f8fbff;box-shadow:inset 0 1px #bfd1e7,inset 0 -1px #bfd1e7}
.purchase-lines-table input{display:block;width:100%;height:38px;box-sizing:border-box;border:1px solid #cad6e5;border-radius:8px;padding:0 9px;color:#1d304e;background:#fff;font:inherit;font-size:12px;outline:none}
.purchase-lines-table input:focus{border-color:#4776ad;box-shadow:0 0 0 3px rgba(71,118,173,.13)}
.purchase-lines-table input[readonly]{border-color:transparent;color:#42546b;background:transparent}
.purchase-line-seq{color:#73849a;font-size:11px;font-weight:800}
.purchase-line-amount{color:#183b68;font-size:12px;font-weight:800;white-space:nowrap}
.purchase-line-remove{text-align:center}
.purchase-line-remove button{display:inline-grid;width:34px;height:34px;place-items:center;border:0;border-radius:8px;color:#b44053;background:#fcecef;cursor:pointer}
.purchase-line-remove button:hover{background:#f7dce1}.purchase-line-remove svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}
.purchase-lines-table .product-search-wrap{position:relative}
.product-search-panel.product-search-panel--floating{position:fixed;z-index:1200;right:auto;min-width:320px}
body.standalone-purchase-entry .standalone-purchase-modal .workbench-form{min-width:0;padding:24px 28px 34px}
body.standalone-purchase-entry .standalone-purchase-modal [data-purchase-lines]{min-width:0}
body[data-theme="dark"] .purchase-lines-scroll{border-color:#324158;background:#121b29;box-shadow:none}
body[data-theme="dark"] .purchase-lines-table th{border-color:#334158;color:#9fafc3;background:#182334}
body[data-theme="dark"] .purchase-lines-table td{border-color:#29374c;background:#121b29}
body[data-theme="dark"] .purchase-lines-table tbody tr:focus-within td{background:#162235;box-shadow:inset 0 1px #3e5574,inset 0 -1px #3e5574}
body[data-theme="dark"] .purchase-lines-table input{border-color:#3b4b63;color:#dce5f2;background:#101824}
body[data-theme="dark"] .purchase-lines-table input[readonly]{border-color:transparent;color:#afbed1;background:transparent}
body[data-theme="dark"] .purchase-line-amount{color:#9bbce6}
body[data-theme="dark"] .purchase-line-remove button{color:#e89aa7;background:#3b1f2a}
@media(max-width:850px){.purchase-lines-table{min-width:1220px}body.standalone-purchase-entry .standalone-purchase-modal .workbench-form{padding:18px}}

.order-approval-workbench { max-width: 1040px; margin: 0 auto; padding: 28px; }
.order-approval-workbench > header { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 15px; padding: 20px; border: 1px solid #d6e1f0; border-radius: 18px; background: linear-gradient(125deg,#f4f8ff,#fff); }
.order-approval-workbench > header > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: #fff; background: linear-gradient(145deg,#2f6ff2,#6658dc); box-shadow: 0 10px 22px rgba(47,111,242,.2); }
.order-approval-workbench > header svg { width: 22px; height: 22px; }
.order-approval-workbench > header small { color: #58729a; font-size: 11px; font-weight: 750; }
.order-approval-workbench > header h3 { margin: 3px 0; color: #172b49; font-size: 23px; }
.order-approval-workbench > header p { margin: 0; color: #71819a; font-size: 12px; }
.order-approval-workbench > header em { align-self: start; padding: 7px 11px; border-radius: 999px; color: #9b6510; background: #fff3d8; font-size: 11px; font-style: normal; font-weight: 750; }
.order-created-exports { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; margin: 16px 0; padding: 15px 17px; border: 1px solid #cbdaf4; border-radius: 15px; background: #f6f9ff; }
.order-created-exports small,.order-created-exports b,.order-created-exports p { display: block; }
.order-created-exports small { color: #5674a4; font-size: 10px; font-weight: 750; }.order-created-exports b { margin-top: 3px; color: #17345d; font-size: 14px; }.order-created-exports p { margin: 4px 0 0; color: #6f7f96; font-size: 10px; line-height: 1.5; }
.order-created-exports > div:last-child { display: grid; grid-template-columns: repeat(2,minmax(120px,1fr)); gap: 7px; }
.order-created-exports a,.order-created-exports button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 11px; border: 1px solid #cbd8ec; border-radius: 10px; color: #234f93; background: #fff; font: inherit; font-size: 10px; font-weight: 750; text-decoration: none; cursor: pointer; }
.order-created-exports a:hover,.order-created-exports button:hover { border-color: #79a2ea; background: #edf4ff; }.order-created-exports svg { width: 14px; height: 14px; }
.record-export-links > button { display: grid; grid-template-columns: minmax(0,1fr) auto 12px; align-items: center; gap: 7px; width: 100%; min-height: 34px; padding: 0 9px; border: 1px solid #d7e2f3; border-radius: 9px; color: #223654; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.record-export-links > button:hover { border-color: #8babeb; background: #f1f6ff; }.record-export-links > button span { overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.record-export-links > button em { color: #315ed4; font-size: 8px; font-style: normal; font-weight: 700; }.record-export-links > button svg { width: 11px; height: 11px; }
.approval-decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 16px; }
.approval-decision-grid label { position: relative; cursor: pointer; }
.approval-decision-grid input { position: absolute; opacity: 0; pointer-events: none; }
.approval-decision-grid label > span { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; min-height: 210px; padding: 20px; border: 1px solid #d8e1ed; border-radius: 18px; background: #fff; box-shadow: 0 9px 24px rgba(28,55,91,.045); transition: .18s ease; }
.approval-decision-grid label:hover > span { border-color: #97b4e9; transform: translateY(-2px); box-shadow: 0 15px 30px rgba(28,55,91,.09); }
.approval-decision-grid label.selected > span { border-color: #3f79e2; background: linear-gradient(145deg,#f4f8ff,#fff); box-shadow: 0 0 0 3px rgba(63,121,226,.1),0 15px 30px rgba(28,55,91,.09); }
.approval-decision-grid i { grid-row: 1 / 5; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #2f6ff2; background: #eaf1ff; }
.approval-decision-grid label:last-child i { color: #9d6411; background: #fff1d9; }
.approval-decision-grid small { color: #6b7e9d; font-size: 10px; font-weight: 750; letter-spacing: .06em; }
.approval-decision-grid b { margin-top: 4px; color: #182c49; font-size: 18px; }
.approval-decision-grid p { margin: 8px 0 12px; color: #687a94; font-size: 12px; line-height: 1.65; }
.approval-decision-grid strong { align-self: end; color: #315e9e; font-size: 11px; }
.approval-note { display: grid; gap: 7px; padding: 16px; border: 1px solid #dce4ee; border-radius: 14px; background: #fff; }
.approval-note > span { color: #425976; font-size: 12px; font-weight: 750; }
.approval-note > span small { color: #8a98ac; font-weight: 500; }
.approval-note textarea { min-height: 84px; resize: vertical; padding: 11px 12px; border: 1px solid #cfd9e6; border-radius: 10px; color: #1d304d; font: inherit; font-size: 13px; }
.approval-proof { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 13px 15px; border-radius: 12px; color: #276c59; background: #edf8f4; }
.approval-proof svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; }
.approval-proof p { margin: 0; font-size: 11px; line-height: 1.6; }
body.standalone-order-entry .order-approval-step .action-body { padding: 0; background: #f7f9fc; }

@media (max-width: 760px) {
  .approval-decision-grid { grid-template-columns: 1fr; }
}
.interactive-detail:hover { border-color: color-mix(in srgb,var(--module-accent) 40%,#dfe5ed); box-shadow: 0 8px 22px rgba(31,49,82,.08); transform: translateY(-1px); }
.interactive-detail:focus-visible { outline: 2px solid color-mix(in srgb,var(--module-accent) 55%,#fff); outline-offset: 2px; }

/* Recognizable world map for customer, cargo and risk distribution. */
.geo-layout { grid-template-columns: minmax(0,1.65fr) minmax(270px,.45fr); }
.world-map { position: relative; min-height: 430px; border: 1px solid #dfe7ed; border-radius: 14px; background: radial-gradient(circle at 68% 30%,rgba(214,240,235,.58),transparent 28%), linear-gradient(160deg,#f7fbfc,#eaf3f5); overflow: hidden; }
.world-map-toolbar { position: absolute; z-index: 6; left: 15px; right: 15px; top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.world-map-toolbar > div:first-child { display: flex; flex-direction: column; }.world-map-toolbar small { color: #7e909d; font-size: 9px; }.world-map-toolbar b { margin-top: 2px; color: #23364a; font-size: 12px; }
.world-map-toolbar > div:last-child { display: flex; gap: 5px; padding: 4px; border: 1px solid rgba(204,218,225,.8); border-radius: 9px; background: rgba(255,255,255,.82); box-shadow: 0 5px 16px rgba(45,72,87,.07); backdrop-filter: blur(9px); }
.world-map-toolbar button { padding: 5px 8px; border: 0; border-radius: 6px; color: #71808e; background: transparent; cursor: pointer; font-size: 8px; }.world-map-toolbar button.active { color: #fff; background: #0a8578; }
.world-map-svg { position: absolute; inset: 47px 0 24px; width: 100%; height: calc(100% - 71px); }
.map-grid-lines { fill: none; stroke: #9eb9bd; stroke-width: 1; opacity: .17; stroke-dasharray: 3 8; }
.world-land path { fill: url(#land-fill); stroke: #a9c7c6; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map-routes { fill: none; stroke: #0a8578; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 5 7; opacity: .55; }
.geo-hub, .geo-pin { position: absolute; z-index: 5; left: var(--x); top: var(--y); transform: translate(-50%,-50%); }
.geo-hub { display: flex; align-items: center; gap: 7px; color: #123f47; font-size: 8px; font-weight: 800; }.geo-hub > i { width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: #df2535; box-shadow: 0 0 0 4px rgba(223,37,53,.17),0 5px 13px rgba(44,77,82,.2); }.geo-hub span { padding: 5px 7px; border: 1px solid #d6e2e5; border-radius: 7px; background: rgba(255,255,255,.9); box-shadow: 0 5px 13px rgba(44,77,82,.09); }
.geo-pin { display: flex; align-items: center; gap: 7px; padding: 0; border: 0; color: #173f46; background: transparent; cursor: pointer; text-align: left; }
.geo-pin > i { display: grid; place-items: center; width: 25px; height: 25px; flex: none; border: 3px solid #fff; border-radius: 50%; color: #fff; background: #0a8578; box-shadow: 0 0 0 3px rgba(10,133,120,.13),0 5px 14px rgba(39,78,83,.2); font-size: 7px; font-style: normal; font-weight: 800; }.geo-pin > i svg { width: 11px; height: 11px; }.geo-pin.port > i { background: #3278cf; box-shadow: 0 0 0 3px rgba(50,120,207,.13),0 5px 14px rgba(39,78,83,.2); }.geo-pin.risk > i { background: #df2535; box-shadow: 0 0 0 3px rgba(223,37,53,.13),0 5px 14px rgba(39,78,83,.2); }
.geo-pin > span { display: none; min-width: 118px; padding: 7px 8px; border: 1px solid #d7e2e5; border-radius: 8px; background: rgba(255,255,255,.94); box-shadow: 0 8px 20px rgba(37,66,78,.14); font-size: 8px; font-weight: 800; }.geo-pin > span small { display: block; margin-top: 2px; color: #7d8c99; font-size: 6.5px; font-weight: 500; }.geo-pin:hover { z-index: 8; }.geo-pin:hover > span,.geo-pin:focus-visible > span { display: block; }
.world-map-legend { position: absolute; z-index: 5; left: 14px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 11px; padding: 7px 9px; border: 1px solid rgba(208,222,227,.84); border-radius: 8px; color: #71828e; background: rgba(255,255,255,.86); backdrop-filter: blur(8px); font-size: 7px; }.world-map-legend span { display: flex; align-items: center; gap: 5px; }.world-map-legend i { width: 7px; height: 7px; border-radius: 50%; background: #0a8578; }.world-map-legend i.hub { background: #df2535; }.world-map-legend i.port { background: #3278cf; }.world-map-legend i.risk { background: #f0a23b; }
.geo-sidebar { min-height: 430px; }.geo-live-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 13px; padding: 10px; border-radius: 9px; color: #257363; background: #edf8f4; }.geo-live-note svg { width: 14px; height: 14px; flex: none; }.geo-live-note span { display: flex; flex-direction: column; }.geo-live-note b { font-size: 8px; }.geo-live-note small { margin-top: 2px; color: #6d8b84; font-size: 7px; line-height: 1.45; }

/* Full AI assistant drawer. */
.assistant-panel { position: fixed; z-index: 180; inset: 0; display: none; color: #17243a; }
.assistant-panel.is-open { display: block; }
.assistant-sheet { position: absolute; top: 0; right: 0; width: min(500px,100vw); height: 100%; display: flex; flex-direction: column; background: #fff; box-shadow: -28px 0 90px rgba(12,28,52,.28); animation: drawer-in .25s cubic-bezier(.2,.75,.25,1); }
.assistant-sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid #e5eaf1; background: linear-gradient(125deg,#111c33,#233b73); }
.assistant-identity { display: flex; align-items: center; gap: 12px; color: #fff; }.assistant-identity > span { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: linear-gradient(145deg,#2f6ff2,#8b5be7); }.assistant-identity svg { width: 19px; height: 19px; }.assistant-identity div { display: flex; flex-direction: column; }.assistant-identity small { color: #9eafd1; font-size: 9px; }.assistant-identity h2 { margin: 1px 0; font-size: 18px; }.assistant-identity p { display: flex; align-items: center; gap: 6px; margin: 0; color: #aebbd5; font-size: 9px; }.assistant-identity p i { width: 6px; height: 6px; border-radius: 50%; background: #55d6a9; box-shadow: 0 0 0 3px rgba(85,214,169,.13); }
.assistant-sheet-header .close-button { color: #b7c3d9; background: rgba(255,255,255,.09); }
.assistant-context { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; margin: 13px 15px 0; padding: 10px 11px; border: 1px solid #dfe6ef; border-radius: 11px; background: #f8faff; }.assistant-context > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #2f6ff2; background: #edf3ff; }.assistant-context svg { width: 15px; height: 15px; }.assistant-context div { display: flex; flex-direction: column; }.assistant-context small { color: #8994a7; font-size: 9px; }.assistant-context b { margin-top: 2px; font-size: 11px; }.assistant-context button { border: 0; color: #2f6ff2; background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.assistant-messages { flex: 1; display: flex; flex-direction: column; gap: 13px; padding: 18px 15px; overflow-y: auto; }
.assistant-message { display: flex; align-items: flex-start; gap: 9px; max-width: 90%; }.assistant-message.user { align-self: flex-end; flex-direction: row-reverse; }.assistant-mini-logo { display: grid; place-items: center; width: 29px; height: 29px; flex: none; border-radius: 9px; color: #fff; background: linear-gradient(145deg,#2f6ff2,#7657da); }.assistant-mini-logo svg { width: 13px; height: 13px; }
.assistant-message > div { padding: 11px 12px; border: 1px solid #e2e7ef; border-radius: 4px 13px 13px 13px; background: #f8faff; }.assistant-message.user > div { color: #fff; border-color: #2f6ff2; border-radius: 13px 4px 13px 13px; background: #2f6ff2; }.assistant-message b { font-size: 11px; }.assistant-message p { margin: 4px 0 0; color: #5e6c83; font-size: 11px; line-height: 1.6; }.assistant-message.user p { color: #fff; }.assistant-message ul { margin: 8px 0 0; padding-left: 17px; color: #5e6c83; font-size: 10px; line-height: 1.65; }
.assistant-source-card { margin-top: 10px; padding: 9px; border: 1px solid #dce5f4; border-radius: 9px; background: #fff; }.assistant-source-card small { display: block; color: #8793a6; font-size: 8px; }.assistant-source-card b { display: block; margin-top: 3px; color: #2d3c55; font-size: 10px; }.assistant-source-card button { margin-top: 8px; padding: 6px 8px; border: 0; border-radius: 7px; color: #fff; background: #2f6ff2; cursor: pointer; font-size: 9px; font-weight: 700; }
.assistant-suggestions { display: flex; gap: 7px; padding: 0 15px 10px; overflow-x: auto; }.assistant-suggestions button { flex: none; padding: 7px 9px; border: 1px solid #dce4ee; border-radius: 99px; color: #52617a; background: #fff; cursor: pointer; font-size: 9px; }.assistant-suggestions button:hover { color: #2f6ff2; border-color: #b9caf0; }
.assistant-composer { margin: 0 15px 15px; padding: 10px; border: 1px solid #dce4ee; border-radius: 13px; background: #fff; box-shadow: 0 8px 28px rgba(31,49,82,.08); }.assistant-composer textarea { width: 100%; min-height: 46px; max-height: 130px; padding: 0; border: 0; color: #203049; background: transparent; outline: 0; resize: none; font: inherit; font-size: 11px; line-height: 1.5; }.assistant-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.assistant-composer span { display: flex; align-items: center; gap: 5px; color: #8792a4; font-size: 8px; }.assistant-composer span svg { width: 12px; height: 12px; color: #2c8969; }.assistant-composer button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; color: #fff; background: #2f6ff2; cursor: pointer; }.assistant-composer button svg { width: 14px; height: 14px; }
.assistant-composer .assistant-composer-tools { display: flex; align-items: center; gap: 9px; }
.assistant-composer .assistant-composer-tools label { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border: 1px solid #dce4ee; border-radius: 7px; color: #51627d; background: #f8faff; cursor: pointer; font-size: 9px; font-style: normal; font-weight: 650; }
.assistant-composer .assistant-composer-tools label:hover { color: #2f6ff2; border-color: #b9cdfa; background: #f2f6ff; }
.assistant-composer .assistant-composer-tools label input { display: none; }
.assistant-composer .assistant-composer-tools i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; }
.assistant-attachments { display: flex !important; align-items: center; gap: 7px; margin: -1px 0 8px; padding-bottom: 8px; overflow-x: auto; border-bottom: 1px solid #edf1f6; }
.assistant-attachments[hidden] { display: none !important; }
.assistant-attachment { position: relative; flex: none; width: 54px; height: 54px; overflow: hidden; border: 1px solid #d8e1ef; border-radius: 9px; background: #f4f7fb; }
.assistant-attachment img { width: 100%; height: 100%; object-fit: cover; }
.assistant-attachment button { position: absolute; top: 2px; right: 2px; width: 17px; height: 17px; border-radius: 50%; color: #fff; background: rgba(16,28,51,.78); font-size: 12px; line-height: 1; }
.assistant-message .assistant-step-list { margin-top: 8px; padding: 8px 9px; border-radius: 8px; color: #64738a; background: #f1f5fb; font-size: 9px; line-height: 1.55; }
.assistant-message .assistant-step-list b { display: block; margin-bottom: 3px; color: #31415b; }

/* Xiao Ao standalone operations cockpit: one front door for every business document. */
#view-module[data-module="copilot"] { --module-accent: #6657d9; --module-soft: #f0efff; }
#view-module[data-module="copilot"] .module-page-intro { padding-bottom: 18px; }
#view-module[data-module="copilot"] .route-context-bar { border-color: #dddff0; background: linear-gradient(90deg,#fbfbff,#f6f8fc); }
#view-module[data-module="copilot"] .module-signature { padding-bottom: 34px; }
.copilot-console { display: grid; gap: 14px; color: #18243a; }
.copilot-command-hero { position: relative; display: grid; grid-template-columns: 150px minmax(0,1fr) auto; align-items: center; gap: 24px; min-height: 218px; padding: 28px 30px; overflow: hidden; border: 1px solid #1e2b4e; border-radius: 18px; color: #fff; background: radial-gradient(circle at 14% 15%,rgba(97,115,255,.22),transparent 31%),radial-gradient(circle at 84% 74%,rgba(48,175,189,.13),transparent 28%),linear-gradient(132deg,#101a31 0%,#172541 58%,#18223a 100%); box-shadow: 0 18px 42px rgba(20,30,55,.16); }
.copilot-command-hero::after { content: ""; position: absolute; right: -70px; top: -95px; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.05); border-radius: 50%; box-shadow: 0 0 0 38px rgba(255,255,255,.018),0 0 0 82px rgba(255,255,255,.012); pointer-events: none; }
.copilot-orbit { position: relative; width: 122px; height: 122px; border: 1px solid rgba(156,169,255,.25); border-radius: 50%; }
.copilot-orbit::before,.copilot-orbit::after { content: ""; position: absolute; inset: 18px; border: 1px dashed rgba(135,157,227,.22); border-radius: 50%; transform: rotate(23deg); }
.copilot-orbit::after { inset: 38px; border-style: solid; border-color: rgba(105,214,209,.22); }
.copilot-orbit > span { position: absolute; z-index: 2; inset: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; color: #fff; background: linear-gradient(145deg,#536ff0,#7557d9); box-shadow: 0 14px 28px rgba(36,45,110,.35); transform: rotate(-8deg); }
.copilot-orbit > span svg { width: 24px; height: 24px; }
.copilot-orbit > i { position: absolute; width: 10px; height: 10px; border: 2px solid #17233e; border-radius: 50%; background: #4ed0b6; box-shadow: 0 0 0 4px rgba(78,208,182,.12); }
.copilot-orbit > i:first-child { right: 4px; top: 29px; }.copilot-orbit > i:nth-child(2) { left: 8px; bottom: 25px; background: #ef4050; box-shadow: 0 0 0 4px rgba(239,64,80,.13); }
.copilot-hero-copy { position: relative; z-index: 2; max-width: 680px; }
.copilot-hero-copy .eyebrow { color: #aebcf1; }.copilot-hero-copy h2 { margin: 8px 0 10px; font-size: clamp(26px,3vw,39px); line-height: 1.12; letter-spacing: -.035em; }.copilot-hero-copy > p { max-width: 640px; margin: 0; color: #aebad1; font-size: 12px; line-height: 1.75; }
.copilot-trust-row { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 18px; color: #bdc8dc; font-size: 9.5px; }.copilot-trust-row span { display: flex; align-items: center; gap: 6px; }.copilot-trust-row svg { width: 13px; height: 13px; color: #7adbd0; }.copilot-trust-row span > i { width: 7px; height: 7px; border-radius: 50%; background: #f0a43b; box-shadow: 0 0 0 3px rgba(240,164,59,.12); }.copilot-trust-row .online > i { background: #4ed0a1; box-shadow: 0 0 0 3px rgba(78,208,161,.12); }
.copilot-hero-stats { position: relative; z-index: 2; display: grid; min-width: 235px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.045); backdrop-filter: blur(10px); }
.copilot-hero-stats > span { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 12px; padding: 13px 15px; border-bottom: 1px solid rgba(255,255,255,.08); }.copilot-hero-stats > span:last-child { border-bottom: 0; }.copilot-hero-stats small { grid-column: 1/-1; color: #8997b4; font-size: 8.5px; }.copilot-hero-stats b { margin-top: 2px; font-size: 22px; }.copilot-hero-stats em { color: #9ba8c2; font-size: 8px; font-style: normal; }
.copilot-flow-strip { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; padding: 13px 18px; border: 1px solid #e1e5ed; border-radius: 13px; background: #fff; box-shadow: 0 6px 18px rgba(26,44,73,.045); }
.copilot-flow-strip > span { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 0 9px; }.copilot-flow-strip > span > i { grid-row: 1/3; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #dce3ef; border-radius: 9px; color: #6f7e92; background: #f7f9fc; font-size: 9px; font-style: normal; font-weight: 800; }.copilot-flow-strip > span.active > i { color: #fff; border-color: #6657d9; background: #6657d9; box-shadow: 0 5px 12px rgba(102,87,217,.2); }.copilot-flow-strip b { font-size: 10.5px; }.copilot-flow-strip small { color: #8d98aa; font-size: 8px; }.copilot-flow-strip > em { width: 28px; height: 1px; background: #dfe4ec; }
.copilot-workspace-grid { display: grid; grid-template-columns: minmax(0,1fr) 330px; align-items: start; gap: 14px; }
.copilot-intake-column,.copilot-control-column { display: grid; gap: 14px; min-width: 0; }
.copilot-intake-card,.copilot-chat-console,.copilot-approval-panel,.copilot-routing-panel,.copilot-boundary-note { border: 1px solid #e0e5ee; border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(24,42,70,.05); }
.copilot-intake-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 21px 15px; }.copilot-intake-card > header h3,.copilot-approval-panel h3,.copilot-routing-panel h3,.copilot-chat-console h3 { margin: 4px 0 5px; font-size: 17px; }.copilot-intake-card > header p { margin: 0; color: #748096; font-size: 10px; line-height: 1.6; }
.copilot-drop-zone { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 13px; margin: 0 20px; padding: 17px; border: 1.5px dashed #bdc9df; border-radius: 13px; background: linear-gradient(120deg,#f9fbff,#f8f7ff); cursor: pointer; transition: .18s ease; }.copilot-drop-zone:hover,.copilot-drop-zone.is-dragover { border-color: #6d62dc; background: #f5f3ff; box-shadow: 0 0 0 4px rgba(102,87,217,.07); }.copilot-drop-zone > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #6657d9; background: #eceaff; }.copilot-drop-zone > span svg { width: 21px; height: 21px; }.copilot-drop-zone div { display: flex; flex-direction: column; }.copilot-drop-zone b { font-size: 12px; }.copilot-drop-zone small { margin-top: 4px; color: #7d899e; font-size: 9px; }.copilot-drop-zone > em { padding: 8px 12px; border-radius: 9px; color: #fff; background: #6657d9; font-size: 9px; font-style: normal; font-weight: 750; }.copilot-drop-zone input { display: none; }
.copilot-type-ribbon { display: flex; gap: 7px; margin: 12px 20px 0; overflow-x: auto; padding-bottom: 3px; }.copilot-type-ribbon > span { display: flex; flex: none; align-items: center; gap: 6px; padding: 5px 8px 5px 5px; border: 1px solid #e5e9f0; border-radius: 99px; color: #5f6c81; background: #fff; font-size: 8.5px; }.copilot-type-ribbon i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #506fe0; background: #edf3ff; }.copilot-type-ribbon i.type-1 { color: #158d78; background: #eaf8f4; }.copilot-type-ribbon i.type-2 { color: #d15a63; background: #fff0f1; }.copilot-type-ribbon i.type-3 { color: #a76b22; background: #fff4e4; }.copilot-type-ribbon i.type-4 { color: #7355c3; background: #f1ecff; }.copilot-type-ribbon svg { width: 11px; height: 11px; }
.copilot-file-queue { display: grid; gap: 7px; min-height: 112px; max-height: 390px; margin: 12px 20px 0; overflow-y: auto; }
.copilot-queue-empty { display: grid; place-items: center; align-content: center; min-height: 112px; border: 1px solid #edf0f5; border-radius: 11px; color: #94a0b2; background: #fbfcfe; text-align: center; }.copilot-queue-empty svg { width: 19px; height: 19px; }.copilot-queue-empty b { margin-top: 6px; color: #5f6c80; font-size: 10px; }.copilot-queue-empty small { margin-top: 3px; font-size: 8.5px; }
.copilot-queue-summary { position: sticky; bottom: 0; padding: 9px 12px; border: 1px solid #dce6f7; border-radius: 10px; color: #3d5f92; background: rgba(245,249,255,.96); box-shadow: 0 -5px 18px rgba(50,77,117,.07); font-size: 10px; font-weight: 700; text-align: center; }
.copilot-file-row { position: relative; display: grid; grid-template-columns: 36px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #e7eaf0; border-radius: 10px; background: #fff; }.copilot-file-row .file-kind { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #61708a; background: #f2f5f9; }.copilot-file-row .file-kind svg { width: 16px; height: 16px; }.copilot-file-row > div { min-width: 0; }.copilot-file-row b,.copilot-file-row small,.copilot-file-row p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.copilot-file-row b { font-size: 10px; }.copilot-file-row small { margin-top: 2px; color: #8691a3; font-size: 8px; }.copilot-file-row p { margin: 3px 0 0; color: #69778d; font-size: 8.5px; }.copilot-file-row > em { padding: 4px 7px; border-radius: 99px; color: #6d798c; background: #f1f4f8; font-size: 8px; font-style: normal; font-weight: 750; }.copilot-file-row > button { width: 22px; height: 22px; border: 0; border-radius: 7px; color: #9aa5b4; background: transparent; cursor: pointer; }.copilot-file-row.ready { border-color: #c7e7de; background: #fbfffd; }.copilot-file-row.ready .file-kind { color: #168970; background: #e9f7f3; }.copilot-file-row.ready > em { color: #13755f; background: #e7f6f1; }.copilot-file-row.done { border-color: #c9e4d8; background: #f8fdfb; }.copilot-file-row.done > em { color: #14745d; background: #e5f5ef; }.copilot-file-row.working .file-kind svg { animation: copilot-spin 1s linear infinite; }.copilot-file-row.working > em { color: #4d61c7; background: #edf0ff; }.copilot-file-row.error { border-color: #f0cece; background: #fffafa; }.copilot-file-row.error > em { color: #b34d55; background: #fff0f1; }.copilot-file-row.warn { border-color: #ecdcb8; background: #fffdf7; }.copilot-file-row.warn > em { color: #9c6b19; background: #fff4da; }
@keyframes copilot-spin { to { transform: rotate(360deg); } }
.copilot-intake-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 13px; padding: 13px 20px 17px; border-top: 1px solid #edf0f5; }.copilot-intake-actions > span { display: flex; align-items: flex-start; gap: 7px; max-width: 58%; color: #7f8a9c; }.copilot-intake-actions > span svg { width: 14px; height: 14px; flex: none; color: #278b76; }.copilot-intake-actions > span small { font-size: 8.5px; line-height: 1.55; }.copilot-intake-actions > div { display: flex; gap: 8px; }.copilot-intake-actions button:disabled { opacity: .45; cursor: not-allowed; }
.copilot-chat-console { overflow: hidden; }.copilot-chat-console > header { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 14px 17px; border-bottom: 1px solid #eaedf3; background: linear-gradient(90deg,#fff,#fafaff); }.copilot-chat-console > header > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #fff; background: linear-gradient(145deg,#536ff0,#7357d5); }.copilot-chat-console > header svg { width: 16px; height: 16px; }.copilot-chat-console > header small { color: #7b87a0; font-size: 8px; }.copilot-chat-console > header h3 { margin: 2px 0 0; font-size: 13px; }.copilot-chat-console > header > em { display: flex; align-items: center; gap: 6px; color: #6f7b8f; font-size: 8px; font-style: normal; }.copilot-chat-console > header > em i { width: 6px; height: 6px; border-radius: 50%; background: #3cc596; box-shadow: 0 0 0 3px rgba(60,197,150,.11); }
.copilot-chat-messages { display: flex; flex-direction: column; gap: 11px; min-height: 160px; max-height: 360px; padding: 16px 18px; overflow-y: auto; background: #fcfcfe; }.copilot-chat-message { display: flex; align-items: flex-start; gap: 8px; max-width: 86%; }.copilot-chat-message.user { align-self: flex-end; }.copilot-chat-message > span { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 9px; color: #fff; background: linear-gradient(145deg,#566ff0,#7756d7); }.copilot-chat-message > span svg { width: 12px; height: 12px; }.copilot-chat-message > div { padding: 9px 11px; border: 1px solid #e3e7ef; border-radius: 4px 12px 12px 12px; background: #fff; }.copilot-chat-message.user > div { color: #fff; border-color: #243a68; border-radius: 12px 4px 12px 12px; background: #243a68; }.copilot-chat-message b { font-size: 9px; }.copilot-chat-message p { margin: 3px 0 0; color: #59677d; font-size: 10px; line-height: 1.65; }.copilot-chat-message.user p { color: #fff; }.copilot-chat-message.thinking > div { color: #6c77a2; background: #f7f7ff; }
.copilot-chat-message p > span { display: block; }.copilot-chat-message p > br { display: block; height: 5px; content: ""; }.copilot-chat-message p hr { height: 1px; margin: 8px 0; border: 0; background: #e6e9f0; }.copilot-inline-heading { display: block; margin: 6px 0 3px; color: #26354d; font-size: 11px; }.copilot-inline-bullet { position: relative; padding-left: 12px; }.copilot-inline-bullet::before { content: ""; position: absolute; left: 2px; top: .65em; width: 4px; height: 4px; border-radius: 50%; background: #6657d9; }.copilot-chat-message code { padding: 1px 4px; border-radius: 4px; color: #5d4dc2; background: #efedff; font: inherit; font-size: 9px; }.copilot-inline-table { max-width: 100%; margin: 7px 0; overflow-x: auto; border: 1px solid #e2e6ee; border-radius: 8px; }.copilot-inline-table table { width: 100%; border-collapse: collapse; font-size: 8.5px; }.copilot-inline-table th,.copilot-inline-table td { padding: 5px 7px; border-right: 1px solid #e7eaf0; border-bottom: 1px solid #e7eaf0; text-align: left; white-space: nowrap; }.copilot-inline-table th { color: #4d5a73; background: #f5f7fb; }.copilot-inline-table tr:last-child td { border-bottom: 0; }.copilot-inline-table th:last-child,.copilot-inline-table td:last-child { border-right: 0; }
.copilot-route-actions { margin-top: 11px; padding-top: 10px; border-top: 1px solid #e6eaf1; }.copilot-route-actions > header { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }.copilot-route-actions > header > svg { width: 14px; height: 14px; color: #2f6ff2; }.copilot-route-actions > header span { display: flex; flex-direction: column; }.copilot-route-actions > header b { color: #223652; font-size: 10px; }.copilot-route-actions > header small { margin-top: 1px; color: #8a96a8; font-size: 8px; }.copilot-route-actions > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }.copilot-route-actions button { display: grid; grid-template-columns: 28px minmax(0,1fr) 12px; grid-template-rows: auto auto; align-items: center; gap: 1px 7px; padding: 7px 8px; border: 1px solid #dce4f0; border-radius: 9px; color: #29415f; background: #f8faff; cursor: pointer; text-align: left; }.copilot-route-actions button:hover { border-color: #a9c3ef; background: #eef4ff; transform: translateY(-1px); }.copilot-route-actions button > span { grid-row: 1/3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #2f6ff2; background: #e9f0ff; }.copilot-route-actions button > span svg { width: 14px; height: 14px; }.copilot-route-actions button b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.copilot-route-actions button small { overflow: hidden; color: #7d899a; font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }.copilot-route-actions .route-arrow { grid-column: 3; grid-row: 1/3; width: 11px; height: 11px; color: #8094b4; }
.copilot-chat-result { margin-top: 8px; padding: 8px 9px; border: 1px solid #e4e6f5; border-radius: 8px; background: #f8f8ff; }.copilot-chat-result small,.copilot-chat-result b { display: block; }.copilot-chat-result small { color: #878ead; font-size: 7.5px; }.copilot-chat-result b { margin-top: 3px; color: #4f597d; font-size: 8.5px; line-height: 1.55; }
.copilot-chat-attachments { display: flex; align-items: center; gap: 6px; max-width: 330px; margin-top: 8px; padding: 6px 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: #e7edff; background: rgba(255,255,255,.1); font-size: 8.5px; }.copilot-chat-attachments svg { width: 13px; height: 13px; flex: none; }.copilot-chat-attachments span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.copilot-chat-result.warning { border-color: #e1e5ec; background: #fff; }.copilot-chat-result.warning small { color: #93651c; }.copilot-chat-result.warning b { color: #4f5970; }
.copilot-chat-result.verified { border-color: #e1e5ec; background: #fff; }.copilot-chat-result.verified small { color: #24745d; }.copilot-chat-result.verified b { color: #4f5970; }
.copilot-chat-suggestions { display: flex; gap: 6px; padding: 0 17px 10px; overflow-x: auto; background: #fcfcfe; }.copilot-chat-suggestions button { flex: none; padding: 6px 8px; border: 1px solid #dfe3ec; border-radius: 99px; color: #5d6a80; background: #fff; cursor: pointer; font-size: 8.5px; }
#copilotConsoleComposer { margin: 0 16px 16px; padding: 10px; border: 1px solid #dce2ec; border-radius: 12px; box-shadow: 0 6px 18px rgba(26,44,73,.05); }#copilotConsoleComposer textarea { width: 100%; min-height: 42px; border: 0; outline: 0; resize: vertical; color: #26344c; font: inherit; font-size: 10px; line-height: 1.5; }#copilotConsoleComposer > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }#copilotConsoleComposer span { display: flex; align-items: center; gap: 5px; color: #7f8999; font-size: 8px; }#copilotConsoleComposer span svg { width: 12px; height: 12px; color: #288b74; }#copilotConsoleComposer button { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 8px; color: #fff; background: #6657d9; cursor: pointer; font-size: 8.5px; font-weight: 750; }#copilotConsoleComposer button svg { width: 12px; height: 12px; }
.copilot-approval-panel { overflow: hidden; }.copilot-approval-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }.copilot-approval-panel > header h3 { margin-bottom: 0; }.copilot-approval-panel > header > b { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: 10px; color: #fff; background: #6657d9; font-size: 13px; }.copilot-approval-panel > p { margin: 0; padding: 0 16px 13px; color: #758196; font-size: 9px; line-height: 1.55; }.copilot-approval-panel > div { display: grid; border-top: 1px solid #ebedf3; }
.copilot-approval-card { display: grid; grid-template-columns: 32px 1fr; gap: 9px; padding: 13px 14px; border-bottom: 1px solid #edf0f4; }.copilot-approval-card:last-child { border-bottom: 0; }.copilot-approval-card > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #7357d1; background: #f0edff; }.copilot-approval-card > span svg { width: 14px; height: 14px; }.copilot-approval-card small,.copilot-approval-card b,.copilot-approval-card p { display: block; }.copilot-approval-card small { color: #8a95a8; font-size: 7.5px; }.copilot-approval-card b { margin-top: 3px; font-size: 9.5px; line-height: 1.45; }.copilot-approval-card p { margin: 4px 0 0; color: #7c8798; font-size: 8px; line-height: 1.45; }.copilot-approval-card footer { display: flex; justify-content: flex-end; gap: 6px; margin-top: 9px; }.copilot-approval-card button { padding: 5px 8px; border: 1px solid #dce1ea; border-radius: 7px; color: #667286; background: #fff; cursor: pointer; font-size: 8px; }.copilot-approval-card button.approve { color: #fff; border-color: #6657d9; background: #6657d9; }
.copilot-empty-state { display: grid; place-items: center; padding: 28px 18px; color: #8d98aa; text-align: center; }.copilot-empty-state svg { width: 20px; height: 20px; color: #41ae8e; }.copilot-empty-state b { margin-top: 7px; color: #5e6a7e; font-size: 10px; }.copilot-empty-state small { max-width: 230px; margin-top: 4px; font-size: 8px; line-height: 1.5; }
.copilot-routing-panel { padding: 16px; }.copilot-routing-panel > h3 { margin-bottom: 12px; }.copilot-routing-panel > div { display: grid; gap: 8px; }.copilot-routing-panel > div > span { display: grid; grid-template-columns: 34px 1fr; gap: 1px 9px; padding: 9px; border: 1px solid #eaedf2; border-radius: 10px; }.copilot-routing-panel i { grid-row: 1/3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; }.copilot-routing-panel i svg { width: 15px; height: 15px; }.copilot-routing-panel b { font-size: 9.5px; }.copilot-routing-panel small { color: #818da0; font-size: 8px; line-height: 1.35; }
.copilot-boundary-note { display: flex; align-items: flex-start; gap: 10px; padding: 13px; color: #5d6882; border-color: #dfe1f4; background: #f8f8ff; }.copilot-boundary-note > svg { width: 17px; height: 17px; flex: none; color: #6657d9; }.copilot-boundary-note b { font-size: 9.5px; }.copilot-boundary-note p { margin: 4px 0 0; color: #747f98; font-size: 8px; line-height: 1.55; }
@media (max-width: 1120px) { .copilot-command-hero { grid-template-columns: 110px 1fr; }.copilot-orbit { width: 98px; height: 98px; }.copilot-orbit > span { inset: 29px; }.copilot-hero-stats { grid-column: 1/-1; grid-template-columns: repeat(3,1fr); }.copilot-hero-stats > span { border-right: 1px solid rgba(255,255,255,.08); border-bottom: 0; }.copilot-workspace-grid { grid-template-columns: 1fr; }.copilot-control-column { grid-template-columns: repeat(2,minmax(0,1fr)); }.copilot-boundary-note { grid-column: 1/-1; } }
@media (max-width: 720px) { .copilot-command-hero { grid-template-columns: 1fr; padding: 24px 20px; }.copilot-orbit { display: none; }.copilot-hero-stats { grid-template-columns: 1fr; }.copilot-hero-stats > span { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }.copilot-flow-strip { grid-template-columns: repeat(2,1fr); gap: 10px; }.copilot-flow-strip > em { display: none; }.copilot-intake-card > header,.copilot-intake-actions { align-items: stretch; flex-direction: column; }.copilot-drop-zone { grid-template-columns: 42px 1fr; }.copilot-drop-zone > em { grid-column: 1/-1; text-align: center; }.copilot-intake-actions > span { max-width: none; }.copilot-intake-actions > div { width: 100%; }.copilot-intake-actions button { flex: 1; }.copilot-control-column { grid-template-columns: 1fr; }.copilot-boundary-note { grid-column: auto; }.copilot-chat-console > header { grid-template-columns: 38px 1fr; }.copilot-chat-console > header > em { grid-column: 1/-1; }.copilot-file-row { grid-template-columns: 36px minmax(0,1fr) auto; }.copilot-file-row > button { position: absolute; right: 5px; top: 4px; }.copilot-file-row > em { grid-column: 3; grid-row: 1; }.copilot-file-row p { white-space: normal; } }

/* Conversation-first Xiao Ao console: one calm workspace, advanced controls stay contextual. */
body.copilot-mode .module-page-intro,
body.copilot-mode .route-context-bar { display: none; }
body.copilot-mode .journey-dock,
body.copilot-mode .floating-assistant { display: none; }
body.copilot-mode .content { padding-top: 28px; }
body.copilot-mode #view-module { width: min(1040px,100%); margin: 0 auto; }
.copilot-console-simple { width: 100%; margin: 0 auto; }
.copilot-chat-primary { position: relative; display: flex; min-height: calc(100vh - 122px); flex-direction: column; overflow: visible; border-color: #dce3ee; border-radius: 22px; background: rgba(255,255,255,.98); box-shadow: 0 22px 64px rgba(33,54,90,.11); }
.copilot-chat-primary::before { position: absolute; z-index: -1; inset: -1px; border-radius: inherit; background: radial-gradient(circle at 18% 0,rgba(82,110,240,.12),transparent 28%),radial-gradient(circle at 88% 8%,rgba(255,113,56,.08),transparent 24%); content: ""; filter: blur(22px); }
.copilot-chat-primary > header { position: relative; z-index: 5; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 18px 21px; border-bottom: 1px solid #e7ebf2; border-radius: 22px 22px 0 0; background: rgba(255,255,255,.95); }
.copilot-chat-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.copilot-chat-identity > span { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; color: #fff; background: linear-gradient(145deg,#3f70f0,#7557d9); box-shadow: 0 9px 20px rgba(74,91,207,.22); }
.copilot-chat-identity svg { width: 18px; height: 18px; }.copilot-chat-identity > div { display: flex; flex-direction: column; }.copilot-chat-identity small { color: #8792a6; font-size: 9px; }.copilot-chat-identity h3 { margin: 2px 0 0; color: #1c2942; font-size: 16px; }
.copilot-header-tools { display: flex; align-items: center; gap: 8px; }
.copilot-model-status { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid #e0e6ef; border-radius: 9px; color: #6e798b; background: #fafbfd; font-size: 8.5px; font-weight: 700; }.copilot-model-status i { width: 6px; height: 6px; border-radius: 50%; background: #e0a03e; }.copilot-model-status.online i { background: #35b889; box-shadow: 0 0 0 3px rgba(53,184,137,.1); }
.copilot-approval-menu { position: relative; }.copilot-approval-menu summary { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid #dfe5ef; border-radius: 9px; color: #59667d; background: #fff; cursor: pointer; list-style: none; font-size: 8.5px; font-weight: 700; }.copilot-approval-menu summary::-webkit-details-marker { display: none; }.copilot-approval-menu summary svg { width: 13px; height: 13px; color: #6657d9; }.copilot-approval-menu[open] summary { color: #5749bd; border-color: #cfc9f4; background: #f8f7ff; }.copilot-approval-menu > div { position: absolute; right: 0; top: 40px; width: min(360px,calc(100vw - 48px)); max-height: 420px; overflow-y: auto; border: 1px solid #dfe4ed; border-radius: 13px; background: #fff; box-shadow: 0 18px 48px rgba(25,40,69,.17); }
.copilot-chat-primary .copilot-chat-messages { flex: 1; min-height: 280px; max-height: none; padding: 26px 28px 18px; background: linear-gradient(180deg,#fbfcff 0,#fff 42%); }
.copilot-chat-primary .copilot-chat-message { max-width: 78%; }.copilot-chat-primary .copilot-chat-message > div { padding: 11px 13px; border-radius: 5px 15px 15px 15px; }.copilot-chat-primary .copilot-chat-message.user > div { border-radius: 15px 5px 15px 15px; background: #263b6d; }.copilot-chat-primary .copilot-chat-message p { font-size: 11px; line-height: 1.7; }
.copilot-chat-primary .copilot-chat-suggestions { padding: 4px 22px 10px; background: #fff; }.copilot-chat-primary .copilot-chat-suggestions button { padding: 7px 10px; font-size: 9px; }
.copilot-attachment-area { margin: 0 20px 10px; border: 1px solid #e3e8f1; border-radius: 13px; background: #fafbfe; }
.copilot-attachment-bar { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 9px; }.copilot-attachment-bar > span { flex: 1; color: #8994a6; font-size: 8.5px; }.copilot-attachment-bar > button { display: none; border: 0; color: #798599; background: transparent; cursor: pointer; font-size: 8.5px; }.copilot-attachment-area.has-files .copilot-attachment-bar > button { display: inline-flex; }
.copilot-attach-button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 1px solid #d7deeb; border-radius: 9px; color: #405c9c; background: #fff; cursor: pointer; font-size: 9px; font-weight: 750; transition: .18s ease; }.copilot-attach-button:hover,.copilot-attach-button.is-dragover { color: #5749bd; border-color: #bcb6eb; background: #f7f6ff; }.copilot-attach-button svg { width: 14px; height: 14px; }.copilot-attach-button input { display: none; }
.copilot-attachment-area .copilot-file-queue { display: none; min-height: 0; max-height: 230px; margin: 0; padding: 5px 9px 8px; border-top: 1px solid #e7ebf2; }.copilot-attachment-area.has-files .copilot-file-queue { display: grid; }.copilot-attachment-area .copilot-queue-empty { display: none; }
.copilot-attachment-area .copilot-intake-actions { display: none; justify-content: flex-end; margin: 0; padding: 8px 9px; border-top: 1px solid #e7ebf2; }.copilot-attachment-area.has-files .copilot-intake-actions { display: flex; }.copilot-attachment-area .copilot-intake-actions > div { display: flex; gap: 7px; }
.copilot-chat-primary #copilotConsoleComposer { margin: 0 20px 20px; padding: 13px 14px 11px; border-color: #cfd8e7; border-radius: 15px; background: #fff; box-shadow: 0 9px 26px rgba(34,53,86,.08); }.copilot-chat-primary #copilotConsoleComposer textarea { min-height: 52px; font-size: 11px; }.copilot-chat-primary #copilotConsoleComposer button { min-width: 78px; justify-content: center; padding: 9px 12px; border-radius: 9px; background: #5367db; }.copilot-chat-primary #copilotConsoleComposer button > span { color: #fff; font-size: 9px; }
@media (max-width: 720px) { body.copilot-mode .content { padding-top: 14px; }.copilot-chat-primary { min-height: calc(100vh - 96px); border-radius: 16px; }.copilot-chat-primary > header { grid-template-columns: 1fr; padding: 14px; border-radius: 16px 16px 0 0; }.copilot-header-tools { justify-content: space-between; }.copilot-chat-primary .copilot-chat-messages { min-height: 240px; padding: 18px 14px 12px; }.copilot-chat-primary .copilot-chat-message { max-width: 92%; }.copilot-attachment-area { margin-inline: 12px; }.copilot-attachment-bar > span { display: none; }.copilot-chat-primary #copilotConsoleComposer { margin: 0 12px 12px; }.copilot-chat-primary #copilotConsoleComposer > div > span { display: none; } }
.live-data-error { position: fixed; z-index: 190; left: 50%; top: 82px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 10px 12px; border: 1px solid #f2c7c7; border-radius: 10px; color: #8e3030; background: #fff7f7; box-shadow: 0 12px 34px rgba(64,24,24,.13); font-size: 10px; }
.live-data-error a { color: #2f6ff2; font-weight: 700; text-decoration: none; }
.runtime-error-panel { position: fixed; z-index: 400; right: 18px; bottom: 18px; max-width: 460px; padding: 16px 18px; border: 1px solid #f0b9b9; border-radius: 14px; background: #fff; box-shadow: 0 18px 46px rgba(80,20,20,.22); display: grid; gap: 8px; }
.runtime-error-panel b { color: #a02424; font-size: 13px; }
.runtime-error-panel p { margin: 0; color: #5d2b2b; font-size: 12px; line-height: 1.6; word-break: break-all; }
.runtime-error-panel small { color: #9a8a8a; font-size: 10px; line-height: 1.5; word-break: break-all; }
.runtime-error-panel div { display: flex; justify-content: flex-end; gap: 8px; }
.live-signature .signature-panel { min-width: 0; }
.live-module-stage { display: grid; gap: 14px; }
.live-module-route { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 15px; background: linear-gradient(130deg, var(--module-soft), #fff 68%); }
.live-module-route h2, .live-signature aside h2 { margin: 4px 0 5px; font-size: 18px; }
.live-module-route p, .live-signature aside > p { margin: 0; color: #6f7e91; font-size: 10px; line-height: 1.6; }
.live-route-glyph { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: var(--module-accent); background: var(--module-soft); }
.live-route-glyph svg { width: 25px; height: 25px; }
.live-analytics-panel .sig-kpis { margin-bottom: 14px; }
.live-world-map { min-height: 0; padding-bottom: 15px; background: #f8fbfc; }
.live-world-map::before, .live-world-map::after { display: none; }
.live-world-map > .world-map-toolbar { position: relative; inset: auto; padding: 14px 15px 11px; border-bottom: 1px solid #e5ecef; background: #fff; }
.live-world-map > .world-map-toolbar > div:first-child { min-width: 0; }
.live-world-map > .world-map-toolbar .primary-button { flex: none; padding: 8px 11px; color: #fff; background: var(--module-accent); }
.business-map-frame { position: relative; margin: 0 15px; border: 1px solid #d9e4e7; border-radius: 14px; background: #dbeaf1; box-shadow: 0 12px 30px rgba(28,63,76,.09); overflow: hidden; }
.business-map { z-index: 0; width: 100%; height: 430px; background: linear-gradient(145deg,#dcecf2,#eef5f6); }
/* Leaflet's CDN stylesheet can be blocked by an intranet policy; keep the structural map rules local. */
.business-map.leaflet-container { position: relative; overflow: hidden; outline: 0; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.business-map .leaflet-pane, .business-map .leaflet-tile, .business-map .leaflet-marker-icon, .business-map .leaflet-marker-shadow, .business-map .leaflet-tile-container, .business-map .leaflet-pane > svg, .business-map .leaflet-pane > canvas, .business-map .leaflet-zoom-box, .business-map .leaflet-image-layer { position: absolute; left: 0; top: 0; }
.business-map .leaflet-map-pane, .business-map .leaflet-pane { z-index: 1; }
.business-map .leaflet-tile-pane { z-index: 200; }.business-map .leaflet-overlay-pane { z-index: 400; }.business-map .leaflet-shadow-pane { z-index: 500; }.business-map .leaflet-marker-pane { z-index: 600; }.business-map .leaflet-tooltip-pane { z-index: 650; }.business-map .leaflet-popup-pane { z-index: 700; }
.business-map .leaflet-tile, .business-map .leaflet-marker-icon, .business-map .leaflet-marker-shadow { user-select: none; -webkit-user-drag: none; }
.business-map .leaflet-tile { visibility: hidden; max-width: none !important; max-height: none !important; }
.business-map .leaflet-tile-loaded { visibility: inherit; }
.business-map .leaflet-zoom-animated { transform-origin: 0 0; }
.business-map .leaflet-interactive { cursor: pointer; }
.business-map .leaflet-grab { cursor: grab; }.business-map .leaflet-dragging .leaflet-grab { cursor: grabbing; }
.business-map .leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.business-map .leaflet-top, .business-map .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.business-map .leaflet-top { top: 0; }.business-map .leaflet-right { right: 0; }.business-map .leaflet-bottom { bottom: 0; }.business-map .leaflet-left { left: 0; }
.business-map .leaflet-control { float: left; clear: both; }.business-map .leaflet-right .leaflet-control { float: right; }.business-map .leaflet-top .leaflet-control { margin-top: 10px; }.business-map .leaflet-bottom .leaflet-control { margin-bottom: 10px; }.business-map .leaflet-left .leaflet-control { margin-left: 10px; }.business-map .leaflet-right .leaflet-control { margin-right: 10px; }
.business-map .leaflet-bar a { display: block; border-bottom: 1px solid #dce4e8; background: #fff; text-align: center; text-decoration: none; }.business-map .leaflet-bar a:last-child { border-bottom: 0; }
.business-map .leaflet-popup { position: absolute; margin-bottom: 20px; text-align: center; }
.business-map .leaflet-popup-content-wrapper { padding: 1px; background: #fff; text-align: left; }
.business-map .leaflet-popup-content { line-height: 1.35; }
.business-map .leaflet-popup-tip-container { position: absolute; left: 50%; width: 40px; height: 20px; margin-left: -20px; overflow: hidden; pointer-events: none; }
.business-map .leaflet-popup-tip { width: 17px; height: 17px; margin: -10px auto 0; padding: 1px; background: #fff; box-shadow: 3px 3px 8px rgba(0,0,0,.12); transform: rotate(45deg); }
.business-map .leaflet-popup-close-button { position: absolute; z-index: 1; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; color: #83919a; background: transparent; text-align: center; text-decoration: none; font: 20px/24px Arial,sans-serif; }
.business-map .leaflet-tile-pane { filter: saturate(.73) contrast(.93) brightness(1.035); }
.business-map .leaflet-control-zoom { border: 0; box-shadow: 0 6px 18px rgba(30,57,70,.15); }
.business-map .leaflet-control-zoom a { width: 30px; height: 30px; border-color: #e3e9ec; color: #334f5c; line-height: 30px; }
.business-map .leaflet-control-attribution { padding: 3px 6px; color: #607783; background: rgba(255,255,255,.88); font-size: 8px; }
.business-map .leaflet-control-attribution a { color: #167e88; }
.business-map .leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 12px 34px rgba(20,48,61,.18); }
.business-map .leaflet-popup-content { margin: 11px 13px; }
.map-popup { min-width: 150px; }
.map-popup b, .map-popup small, .map-popup em { display: block; }
.map-popup b { color: #203943; font-size: 11px; }
.map-popup small { margin-top: 4px; color: #657b85; font-size: 9px; }
.map-popup em { margin-top: 7px; color: #148477; font-size: 8px; font-style: normal; }
.map-popup a { display: inline-block; margin-top: 8px; color: #2f6ff2; cursor: pointer; font-size: 8px; font-weight: 700; text-decoration: none; }
.apus-map-marker-shell { border: 0; background: transparent; }
.apus-map-marker { position: relative; display: grid; place-items: center; width: 28px; height: 28px; border: 3px solid #fff; border-radius: 50% 50% 50% 8px; color: #fff; background: #0a9183; box-shadow: 0 6px 18px rgba(10,82,84,.28); transform: rotate(-45deg); }
.apus-map-marker b { font-size: 8px; line-height: 1; transform: rotate(45deg); }
.apus-map-marker::after { content: ""; position: absolute; inset: -6px; z-index: -1; border: 1px solid rgba(10,145,131,.25); border-radius: 50%; animation: map-pulse 2.4s ease-out infinite; }
.apus-map-marker.hq { width: 32px; height: 32px; border-radius: 10px; background: #dd2435; box-shadow: 0 7px 20px rgba(190,34,51,.3); transform: rotate(45deg); }
.apus-map-marker.hq b { font-size: 9px; transform: rotate(-45deg); }
.apus-map-marker.hq::after { border-color: rgba(221,36,53,.28); }
@keyframes map-pulse { 0% { opacity: .7; transform: scale(.6); } 70%,100% { opacity: 0; transform: scale(1.35); } }
.business-map .apus-trade-route { stroke-linecap: round; }
.map-live-legend { position: absolute; z-index: 500; top: 12px; right: 12px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid rgba(198,214,219,.78); border-radius: 10px; color: #4e6873; background: rgba(255,255,255,.92); box-shadow: 0 6px 20px rgba(30,59,71,.1); backdrop-filter: blur(8px); font-size: 8px; }
.map-live-legend span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-live-legend i { width: 7px; height: 7px; border-radius: 50%; background: #0a9183; }
.map-live-legend i.hq { border-radius: 2px; background: #dd2435; transform: rotate(45deg); }
.map-load-status { position: absolute; z-index: 550; top: 50%; left: 50%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(194,210,216,.84); border-radius: 11px; color: #49636e; background: rgba(255,255,255,.94); box-shadow: 0 10px 26px rgba(29,58,70,.13); font-size: 9px; transform: translate(-50%,-50%); }
.map-load-status i { width: 13px; height: 13px; border: 2px solid #cbd9dd; border-top-color: #0a9183; border-radius: 50%; animation: map-loading .7s linear infinite; }
.map-load-status.is-error { color: #975047; }.map-load-status.is-error i { border-color: #edc8c2; border-top-color: #cc5b4c; }
@keyframes map-loading { to { transform: rotate(360deg); } }
.map-precision-note { position: absolute; z-index: 500; left: 12px; bottom: 12px; max-width: 360px; padding: 7px 9px; border: 1px solid rgba(205,219,224,.75); border-radius: 9px; color: #526b76; background: rgba(255,255,255,.91); box-shadow: 0 5px 16px rgba(25,54,66,.08); font-size: 8px; line-height: 1.45; backdrop-filter: blur(8px); }
.map-load-fallback { display: grid; place-items: center; height: 100%; padding: 30px; color: #536d78; text-align: center; }
.map-load-fallback b { display: block; color: #294752; font-size: 12px; }
.map-load-fallback small { display: block; margin-top: 6px; font-size: 9px; }
.map-country-list { position: relative; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 11px 15px 0; }
.map-country-card { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border: 1px solid rgba(133,166,170,.26); border-radius: 9px; color: #26434a; background: rgba(255,255,255,.88); cursor: pointer; text-align: left; }
.map-country-card:hover, .map-country-card:focus-visible { border-color: #8abbb6; background: #fff; box-shadow: 0 5px 15px rgba(34,82,86,.08); outline: none; transform: translateY(-1px); }
.map-country-card i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--module-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--module-accent) 12%, transparent); }
.map-country-card span { min-width: 0; }
.map-country-card b, .map-country-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-country-card b { font-size: 10px; }.map-country-card small { margin-top: 2px; color: #75868c; font-size: 8px; }
.map-country-card.is-unlocated { cursor: default; opacity: .62; }
.map-country-card.is-unlocated i { background: #9caab0; box-shadow: none; }
.table-empty, .lane-empty { padding: 22px; color: #839198; font-size: 10px; text-align: center; }
.receive-row { width: 100%; border: 0; border-top: 1px solid #edf1f3; background: transparent; cursor: pointer; text-align: left; }
@media (max-width: 760px) { .live-module-route { grid-template-columns: auto minmax(0,1fr); }.live-module-route > .primary-button { grid-column: 1 / -1; width: 100%; }.map-country-list { grid-template-columns: 1fr; }.business-map { height: 390px; }.map-live-legend { left: 10px; right: auto; }.map-precision-note { right: 10px; max-width: none; } }

@media (max-width: 720px) {
  .action-sheet { width: 100vw; max-height: 100vh; height: 100%; border: 0; border-radius: 0; }
  .action-layout, .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .action-progress { padding-inline: 15px; }
  .action-progress span b { display: none; }
  .action-sheet-header, .action-body, .action-footer { padding-inline: 15px; }
  .action-footer { align-items: stretch; flex-direction: column; }
  .action-footer > div button { flex: 1; }
  .record-facts { grid-template-columns: 1fr; }
  .world-map-toolbar { align-items: flex-start; flex-direction: column; }
  .world-map { min-height: 390px; }
  .world-map-svg { top: 82px; height: calc(100% - 106px); }
  .world-map-legend { right: 14px; }
}

@media (max-width: 980px) {
  .geo-layout { grid-template-columns: 1fr; }
  .geo-sidebar { min-height: 0; }
}

/* 可读性与个人快捷菜单：正文略放大，全部功能菜单优先保证首次使用时容易辨认。 */
body { font-size: 13px; }
.rail-item { font-size: 11px; }
.top-left { min-width: 0; }
.top-nav { min-width: 0; max-width: min(620px, 48vw); overflow-x: auto; scrollbar-width: none; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav button { flex: 0 0 auto; min-height: 100%; font-size: 12px; white-space: nowrap; }
.top-nav button > svg { width: 14px; height: 14px; color: #607495; }
.top-nav .shortcut-remove { display: grid; place-items: center; min-width: 15px; width: 15px; height: 15px; padding: 0; margin-left: 1px; border-radius: 50%; color: #8d99aa; background: #eef2f7; font-size: 12px; font-style: normal; line-height: 1; opacity: 0; transition: opacity .15s ease, color .15s ease; }
.top-nav [data-custom-shortcut]:hover .shortcut-remove,
.top-nav [data-custom-shortcut]:focus-visible .shortcut-remove { opacity: 1; }
.top-nav .shortcut-remove:hover { color: #c83543; background: #fff0f1; }
.top-nav.is-drop-target { overflow: visible; border-radius: 10px; background: #edf3ff; box-shadow: inset 0 0 0 2px #2f6ff2; }
.top-nav.is-drop-target::after { content: "松开放到个人菜单"; flex: 0 0 auto; align-self: center; margin: 0 8px; color: #2f6ff2; font-size: 11px; font-weight: 700; white-space: nowrap; }
body.is-dragging-module .topbar { z-index: 220; box-shadow: 0 9px 28px rgba(24,43,65,.13); }
.panel-groups > div > span { font-size: 10px; }
.panel-groups button { position: relative; min-height: 58px; padding: 9px 25px 9px 9px; cursor: grab; }
.panel-groups button:active { cursor: grabbing; }
.panel-groups button[draggable="true"]::after { content: ""; position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 8px; height: 18px; color: #b0b9c8; background: radial-gradient(circle, currentColor 1px, transparent 1.5px) center / 4px 5px; opacity: .55; }
.panel-groups button[draggable="true"]:hover::after { color: #2f6ff2; opacity: 1; }
.panel-groups button b { font-size: 12px; line-height: 1.25; }
.panel-groups button small { font-size: 10px; line-height: 1.35; }
.module-sheet header p, .panel-search input { font-size: 11px; }
.account-menu header b { font-size: 12px; }
.account-menu header small { font-size: 10px; }
.account-menu button b { font-size: 11px; }
.account-menu button small { font-size: 9px; }
.module-card b, .process-step b, .table-row b, .board-lane header b, .assistant-head b { font-size: 11px; }
.module-card small, .process-step small, .table-row small, .board-lane header small, .assistant-card > button small { font-size: 9px; }
.assistant-card > button b, .ask-box input, .summary-strip span, .summary-strip small, .segmented button, .tool-right input, .filter-button { font-size: 10px; }

.action-error { margin-bottom: 15px; padding: 12px 14px; border: 1px solid #f3c9ce; border-radius: 11px; color: #a53140; background: #fff3f4; }
.action-error b { font-size: 12px; }.action-error p { margin: 4px 0 0; font-size: 11px; line-height: 1.5; }
.new-batch-import { display: grid; gap: 14px; }
.batch-drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 210px; padding: 24px; border: 2px dashed #cbd6e8; border-radius: 16px; color: #53657f; background: linear-gradient(145deg,#f8faff,#fff); text-align: center; cursor: pointer; }
.batch-drop-zone:hover { border-color: #7fa4f8; background: #f4f7ff; }
.batch-drop-zone.is-dragover { border-color: #2f6ff2; background: #edf3ff; box-shadow: inset 0 0 0 2px rgba(47,111,242,.12); }
.batch-drop-zone > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #2f6ff2; background: #eaf1ff; }
.batch-drop-zone svg { width: 22px; height: 22px; }.batch-drop-zone h3 { margin: 12px 0 5px; font-size: 17px; }.batch-drop-zone p { max-width: 560px; margin: 0; color: #7c899d; font-size: 11px; line-height: 1.55; }
.batch-drop-zone > b { margin-top: 14px; padding: 9px 14px; border-radius: 9px; color: #fff; background: #2f6ff2; font-size: 11px; }.batch-drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.batch-import-list { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.batch-import-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e3e8ef; border-radius: 11px; background: #fff; }
.batch-import-row > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #557091; background: #eef3f8; }.batch-import-row svg { width: 15px; height: 15px; }
.batch-import-row div { display: flex; flex-direction: column; min-width: 0; }.batch-import-row b { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }.batch-import-row small { margin-top: 3px; color: #8290a3; font-size: 9px; }.batch-import-row em { padding: 5px 8px; border-radius: 99px; color: #5c6c82; background: #edf1f6; font-size: 9px; font-style: normal; font-weight: 700; }
.batch-import-row.ready { border-color: #cce8dd; }.batch-import-row.ready em { color: #25775c; background: #e8f6ef; }.batch-import-row.error { border-color: #f2cdd1; }.batch-import-row.error em { color: #ae3846; background: #fff0f1; }
.action-modal.record-mode .action-progress { display: none; }

.faq-live-layout { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,.5fr); gap:14px; }
.faq-live-panel #faqLiveResults { margin-top:14px; display:grid; gap:8px; }
.faq-live-empty { margin:18px 0 0; padding:18px; border:1px dashed #cfd8e5; border-radius:12px; color:#718096; text-align:center; }
.bom-ledger { display:grid; gap:14px; }
.bom-ledger-toolbar { display:flex; align-items:center; justify-content:space-between; gap:22px; padding:18px 20px; background:linear-gradient(135deg,#f7f8ff,#fbfdff); }
.bom-ledger-toolbar > div { display:flex; align-items:center; gap:14px; }
.bom-ledger-toolbar > div > span { display:grid; place-items:center; flex:0 0 46px; width:46px; height:46px; border-radius:13px; color:#5f4bd1; background:#ece9ff; }
.bom-ledger-toolbar svg { width:19px; height:19px; }
.bom-ledger-toolbar small { color:#6554c7; font-size:11px; font-weight:800; letter-spacing:.04em; }
.bom-ledger-toolbar h2 { margin:4px 0 3px; font-size:19px; }
.bom-ledger-toolbar p { margin:0; color:#66758b; font-size:12px; line-height:1.55; }
.bom-ledger-toolbar label { display:flex; align-items:center; gap:8px; width:min(340px,34%); padding:0 13px; border:1px solid #d9e1eb; border-radius:11px; background:#fff; }
.bom-ledger-toolbar label svg { color:#8290a5; width:15px; height:15px; }
.bom-ledger-toolbar input { box-sizing:border-box; width:100%; height:42px; border:0; outline:0; color:#1f2f48; background:transparent; font-size:12px; }
.bom-ledger-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; }
.bom-ledger-section { overflow:hidden; padding:0; }
.bom-ledger-section.is-main { border-top:3px solid #496bd6; }
.bom-ledger-section.is-child { border-top:3px solid #7659d6; }
.bom-ledger-section > header { display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:13px; padding:18px; border-bottom:1px solid #e5eaf2; background:#fafbff; }
.bom-ledger-section.is-child > header { background:#fbfaff; }
.bom-ledger-section-icon { display:grid; place-items:center; width:46px; height:46px; border-radius:13px; color:#4767cf; background:#eaf0ff; }
.bom-ledger-section.is-child .bom-ledger-section-icon { color:#6b50cc; background:#eeeaff; }
.bom-ledger-section-icon svg { width:20px; height:20px; }
.bom-ledger-section header small { color:#65738a; font-size:10px; font-weight:750; }
.bom-ledger-section header h2 { margin:3px 0; font-size:21px; }
.bom-ledger-section header p { margin:0; color:#6e7c91; font-size:11px; line-height:1.55; }
.bom-ledger-section-summary { display:flex; min-width:88px; flex-direction:column; padding-left:13px; border-left:1px solid #dfe5ef; }
.bom-ledger-section-summary b { color:#263751; font-size:19px; }
.bom-ledger-section-summary small { margin-top:2px; font-size:9px; white-space:nowrap; }
.bom-ledger-section .primary-button { min-height:39px; padding:0 13px; white-space:nowrap; }
.bom-ledger-header-actions { grid-column:1 / -1; display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; min-width:0; padding-top:2px; }
.bom-ledger-header-actions > :is(button,a) { flex:0 0 auto; min-inline-size:max-content; white-space:nowrap; word-break:keep-all; overflow-wrap:normal; }
.bom-ledger-list { display:grid; gap:8px; padding:12px; }
.bom-ledger-row { display:grid; grid-template-columns:38px minmax(0,1fr) 64px auto 16px; align-items:center; gap:10px; width:100%; padding:11px 12px; border:1px solid #e1e7f0; border-radius:11px; color:#1d2d46; background:#fff; text-align:left; cursor:pointer; transition:.18s ease; }
.bom-ledger-row:hover { border-color:#8297dc; background:#f8faff; transform:translateY(-1px); box-shadow:0 7px 18px rgba(47,70,126,.08); }
.bom-ledger-section.is-child .bom-ledger-row:hover { border-color:#9b88dc; background:#faf8ff; }
.bom-ledger-row-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:10px; color:#4767cf; background:#edf2ff; }
.bom-ledger-section.is-child .bom-ledger-row-icon { color:#7056cf; background:#f0edff; }
.bom-ledger-row-icon svg,.bom-ledger-row-arrow { width:15px; height:15px; }
.bom-ledger-row-copy { display:flex; min-width:0; flex-direction:column; }
.bom-ledger-row-copy b { overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.bom-ledger-row-copy small { margin-top:3px; overflow:hidden; color:#77859a; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.bom-ledger-row-fact { display:flex; flex-direction:column; align-items:flex-end; }
.bom-ledger-row-fact small { color:#8a96a8; font-size:9px; }
.bom-ledger-row-fact b { margin-top:2px; font-size:13px; }
.bom-ledger-row em { padding:5px 8px; border-radius:999px; font-size:9px; font-style:normal; font-weight:800; white-space:nowrap; }
.bom-ledger-row em.is-ready { color:#1d8066; background:#e8f7f1; }
.bom-ledger-row em.is-pending { color:#8a6725; background:#fff4dc; }
.bom-ledger-row em.is-selected { color:#4b5fb8; background:#edf1ff; }
.bom-ledger-row-arrow { color:#8190a7; }
.bom-ledger-empty { margin:12px; padding:24px 18px; border:1px dashed #cfd8e5; border-radius:12px; color:#708096; background:#fbfcfe; font-size:11px; line-height:1.6; text-align:center; }
.bom-ledger-empty.is-search { margin-top:0; }
.bom-workbench { min-height:360px; }
.bom-workbench > header { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; padding-bottom:18px; border-bottom:1px solid #e7ecf2; }
.bom-workbench > header small { color:#7160ce; font-size:10px; font-weight:800; letter-spacing:.06em; }
.bom-workbench > header h3 { margin:5px 0 3px; font-size:20px; }
.bom-workbench > header p { margin:0; color:#718096; font-size:11px; }
.bom-workbench > header label { width:min(310px,40%); display:flex; align-items:center; gap:8px; padding:0 12px; border:1px solid #d9e1eb; border-radius:10px; background:#fff; }
.bom-workbench > header label svg { width:15px; height:15px; color:#8794a8; }
.bom-workbench > header input { width:100%; height:40px; border:0; outline:0; font-size:12px; }
.bom-product-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:16px; }
.bom-product-picker > button { display:grid; grid-template-columns:40px minmax(0,1fr) auto 16px; align-items:center; gap:11px; padding:12px; border:1px solid #dfe5ee; border-radius:12px; color:#15243d; background:#fff; text-align:left; cursor:pointer; transition:.18s ease; }
.bom-product-picker > button:hover { border-color:#8775e6; background:#f8f7ff; transform:translateY(-1px); box-shadow:0 8px 22px rgba(92,74,177,.10); }
.bom-product-picker > button > span { display:grid; place-items:center; width:40px; height:40px; border-radius:10px; color:#6551d8; background:#eeebff; }
.bom-product-picker > button svg { width:16px; height:16px; }
.bom-product-picker > button > div { display:flex; min-width:0; flex-direction:column; }
.bom-product-picker > button b { font-size:12px; }
.bom-product-picker > button small { margin-top:3px; overflow:hidden; color:#7e899b; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.bom-product-picker > button em { color:#6551d8; font-size:9px; font-style:normal; font-weight:750; white-space:nowrap; }
.bom-workbench-group { display:grid; grid-template-columns:180px minmax(0,1fr); gap:18px; margin-top:18px; padding:16px; border:1px solid #dde5f0; border-radius:14px; background:#fbfcff; }
.bom-workbench-group.is-child { background:#f8fbff; }
.bom-workbench-group > div:first-child small { color:#6475d7; font-size:10px; font-weight:800; }
.bom-workbench-group > div:first-child h4 { margin:5px 0; font-size:17px; }
.bom-workbench-group > div:first-child p { margin:0; color:#718096; font-size:11px; line-height:1.6; }
.bom-workbench-group .bom-product-picker { margin-top:0; }
.bom-workbench.is-single-kind .bom-product-picker { margin-top:18px; }
.bom-workbench.is-single-kind .bom-product-picker > .faq-live-empty { grid-column:1 / -1; margin-top:0; }
.main-bom-selection { display:grid; gap:16px; }
.main-bom-selection > header { display:flex; align-items:flex-end; justify-content:space-between; gap:22px; padding-bottom:16px; border-bottom:1px solid #e4e9f1; }
.main-bom-selection > header small { color:#5b65c8; font-size:10px; font-weight:800; letter-spacing:.05em; }
.main-bom-selection > header h3 { margin:4px 0; font-size:21px; }
.main-bom-selection > header p { max-width:620px; margin:0; color:#6f7e93; font-size:11px; line-height:1.55; }
.main-bom-selection-search { display:flex; align-items:center; gap:8px; width:min(330px,38%); padding:0 12px; border:1px solid #d7e0ec; border-radius:11px; background:#fff; }
.main-bom-selection-search svg { width:15px; height:15px; color:#8190a6; }
.main-bom-selection-search input { width:100%; height:42px; border:0; outline:0; background:transparent; font-size:12px; }
.main-bom-selection-summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 15px; border:1px solid #dce5f1; border-radius:12px; background:#f8faff; }
.main-bom-selection-summary > span { display:flex; align-items:baseline; gap:7px; white-space:nowrap; }
.main-bom-selection-summary b { color:#3655be; font-size:21px; }
.main-bom-selection-summary small { color:#738198; font-size:10px; }
.main-bom-selection-summary p { display:flex; align-items:center; gap:7px; margin:0; color:#52647d; font-size:10px; line-height:1.45; }
.main-bom-selection-summary svg { flex:0 0 auto; width:15px; height:15px; color:#24806a; }
.main-bom-selection-list { display:grid; grid-template-columns:1fr; gap:9px; max-height:50vh; overflow:auto; padding:2px; }
.main-bom-selection-row { display:grid; grid-template-columns:20px 34px minmax(0,1fr) minmax(210px,auto); align-items:center; gap:12px; min-width:0; padding:12px 14px; border:1px solid #dde4ee; border-radius:12px; background:#fff; cursor:pointer; transition:border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.main-bom-selection-row:hover { border-color:#9aa9d8; box-shadow:0 7px 18px rgba(55,73,128,.08); }
.main-bom-selection-row.is-selected { border-color:#7690e0; background:#f7f9ff; }
.main-bom-selection-row.is-disabled { cursor:not-allowed; opacity:.58; }
.main-bom-selection-row > input { position:absolute; opacity:0; pointer-events:none; }
.main-bom-selection-check { display:grid; place-items:center; width:20px; height:20px; border:1px solid #bdc8d8; border-radius:6px; color:transparent; background:#fff; }
.main-bom-selection-check svg { width:13px; height:13px; }
.main-bom-selection-row.is-selected .main-bom-selection-check { border-color:#4f70d8; color:#fff; background:#4f70d8; }
.main-bom-selection-copy,.main-bom-selection-state { display:flex; min-width:0; flex-direction:column; }
.main-bom-selection-copy b { overflow:hidden; color:#1e2d46; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.main-bom-selection-copy small { margin-top:3px; overflow:hidden; color:#7d899c; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.main-bom-selection-state { align-items:flex-end; text-align:right; }
.main-bom-selection-state b { color:#596a83; font-size:10px; }
.main-bom-selection-row.is-selected .main-bom-selection-state b { color:#3758c2; }
.main-bom-selection-state small { margin-top:3px; color:#8a96a7; font-size:8.5px; line-height:1.35; }
.action-modal.bom-sheet-modal .action-sheet { width:min(1480px,96vw); }
.bom-sheet { min-height:0; }
.bom-sheet > header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:16px; padding:15px 18px; border:1px solid #dbe3ef; border-radius:14px; background:linear-gradient(135deg,#f6f8ff,#fbfdff); }
.bom-sheet > header span { color:#4b63c7; font-size:10px; font-weight:850; letter-spacing:.08em; }
.bom-sheet > header h3 { margin:3px 0; font-size:20px; }
.bom-sheet > header p { margin:0; color:#718096; font-size:11px; }
.bom-change-controls { display:grid; grid-template-columns:minmax(210px,.55fr) minmax(360px,1.45fr); gap:12px; margin:0 0 16px; padding:14px; border:1px solid #efd4da; border-radius:14px; background:linear-gradient(135deg,#fff8fa,#fbfcff); }
.bom-change-controls > label { display:grid; align-content:start; gap:7px; color:#27364f; font-size:11px; font-weight:800; }
.bom-change-controls > label small { color:#b84d62; font-size:9px; }
.bom-change-controls input,.bom-change-controls textarea { box-sizing:border-box; width:100%; min-height:40px; padding:9px 11px; border:1px solid #d9e1ed; border-radius:9px; outline:0; background:#fff; color:#17233b; font:inherit; font-weight:600; }
.bom-change-controls textarea { min-height:82px; resize:vertical; line-height:1.55; }
.bom-change-controls input:focus,.bom-change-controls textarea:focus { border-color:#b84d62; box-shadow:0 0 0 3px rgba(184,77,98,.1); }
.bom-revision-ledger { grid-column:1/-1; display:grid; align-content:start; gap:9px; max-height:430px; overflow:auto; padding:12px; border:1px solid #e1e7f0; border-radius:12px; background:#fff; }
.bom-sheet > .bom-revision-ledger { margin:0 16px 14px; }
.bom-revision-ledger > header { position:sticky; top:-12px; z-index:2; display:flex; justify-content:space-between; gap:16px; padding:5px 2px 10px; background:#fff; border-bottom:1px solid #e8edf4; }
.bom-revision-ledger > header div { display:grid; gap:3px; }
.bom-revision-ledger > header b { color:#17233b; font-size:13px; }
.bom-revision-ledger > header small { color:#68768c; font-size:10px; font-weight:600; }
.bom-revision-ledger > header em { align-self:center; padding:5px 8px; border-radius:999px; background:#fff0f3; color:#b84d62; font-size:10px; font-style:normal; font-weight:800; white-space:nowrap; }
.bom-revision-entry { overflow:hidden; border:1px solid #e1e7f0; border-radius:10px; background:#fbfcfe; }
.bom-revision-entry > summary { display:grid; grid-template-columns:auto minmax(0,1fr) auto 16px; align-items:center; gap:10px; padding:10px 11px; cursor:pointer; list-style:none; }
.bom-revision-entry > summary::-webkit-details-marker { display:none; }
.bom-revision-entry > summary:hover { background:#fff7f9; }
.bom-revision-entry > summary > span:nth-child(2) { display:grid; gap:2px; }
.bom-revision-entry > summary b { color:#17233b; font-size:11px; }
.bom-revision-entry > summary small { color:#68768c; font-size:9px; font-weight:600; }
.bom-revision-entry > summary em { color:#52637b; font-size:9px; font-style:normal; font-weight:800; }
.bom-revision-entry > summary svg { width:14px; height:14px; color:#7f8ba0; transition:transform .2s ease; }
.bom-revision-entry[open] > summary svg { transform:rotate(90deg); }
.bom-revision-version { display:grid!important; place-items:center; min-width:38px; height:28px; border-radius:8px; background:#fff0f3; color:#b84d62; font-size:10px; font-weight:900; }
.bom-revision-content { display:grid; gap:9px; padding:0 11px 11px; border-top:1px solid #edf1f6; background:#fff; }
.bom-revision-note { display:grid; grid-template-columns:auto 1fr; gap:9px; margin:10px 0 0; color:#52637b; font-size:10px; line-height:1.55; }
.bom-revision-note b { color:#25344d; }
.bom-revision-diff { display:flex; flex-wrap:wrap; gap:6px; }
.bom-revision-diff span { padding:5px 7px; border-radius:7px; background:#eaf7f2; color:#176b57; font-size:9px; font-weight:800; }
.bom-revision-diff.is-warning span { background:#fff4de; color:#9b5d14; }
.bom-revision-comparison { overflow:auto; border:1px solid #e5eaf1; border-radius:9px; }
.bom-revision-comparison table { width:100%; border-collapse:collapse; font-size:9px; }
.bom-revision-comparison th,.bom-revision-comparison td { padding:7px 8px; border-top:1px solid #edf1f6; text-align:left; white-space:nowrap; }
.bom-revision-comparison thead th { border-top:0; background:#f6f8fb; color:#65748b; }
.bom-revision-comparison td { color:#42536c; }
.bom-revision-comparison td em { display:inline-flex; padding:3px 6px; border-radius:999px; font-style:normal; font-weight:900; }
.bom-revision-comparison td em.is-added { background:#e8f6f0; color:#176b57; }
.bom-revision-comparison td em.is-removed { background:#fff0f2; color:#b63d50; }
.bom-revision-comparison td em.is-modified { background:#fff4de; color:#9b5d14; }
.bom-revision-lines { overflow:auto; border:1px solid #e5eaf1; border-radius:9px; }
.bom-revision-lines > header { display:flex; justify-content:space-between; padding:7px 9px; background:#f6f8fb; }
.bom-revision-lines > header b,.bom-revision-lines > header small { color:#52637b; font-size:9px; }
.bom-revision-lines table { width:100%; border-collapse:collapse; font-size:9px; }
.bom-revision-lines th,.bom-revision-lines td { padding:6px 8px; border-top:1px solid #edf1f6; text-align:left; white-space:nowrap; }
.bom-revision-lines th { color:#65748b; background:#fbfcfe; }
.bom-revision-lines td { color:#26354d; }
.bom-revision-empty { padding:14px; border:1px dashed #d8dfeb; border-radius:9px; background:#fbfcfe; }
.bom-revision-empty b { color:#26354d; font-size:11px; }
.bom-revision-empty p { margin:5px 0 0; color:#68768c; font-size:10px; line-height:1.55; }
.bom-hierarchy-legend { display:flex; gap:14px; }
.bom-hierarchy-legend span { display:flex; align-items:center; gap:6px; color:#536077!important; font-size:10px!important; letter-spacing:0!important; }
.bom-hierarchy-legend i { width:9px; height:9px; border-radius:3px; background:#4b63c7; }
.bom-hierarchy-legend span:nth-child(2) i { background:#7b60dc; }
.bom-hierarchy-legend span:nth-child(3) i { background:#28a18f; }
.bom-sheet-scroll { overflow:auto; max-height:58vh; border:1px solid #dbe3ed; border-radius:12px; background:#fff; }
.bom-sheet table { width:100%; min-width:1100px; border-collapse:collapse; table-layout:fixed; }
.bom-sheet th { position:sticky; top:0; z-index:1; padding:11px 9px; border-right:1px solid #e3e8ef; border-bottom:1px solid #d5dde8; color:#526079; background:#f2f5fa; font-size:10px; text-align:left; }
.bom-sheet th:nth-child(1) { width:42px; }
.bom-sheet th:nth-child(2) { width:78px; }
.bom-sheet th:nth-child(3) { width:270px; }
.bom-sheet th:nth-child(4) { width:190px; }
.bom-sheet th:nth-child(5),.bom-sheet th:nth-child(6) { width:125px; }
.bom-sheet th:nth-child(7) { width:190px; }
.bom-sheet th:nth-child(8) { width:48px; }
.bom-sheet td { height:48px; padding:5px 7px; border-right:1px solid #e7ebf1; border-bottom:1px solid #e7ebf1; color:#22324a; font-size:11px; }
.bom-sheet input { box-sizing:border-box; width:100%; height:36px; padding:0 9px; border:1px solid transparent; border-radius:6px; outline:0; background:transparent; font-size:11px; }
.bom-sheet input:focus { border-color:#5576e7; background:#fff; box-shadow:0 0 0 3px rgba(85,118,231,.10); }
.bom-material-search { display:flex; align-items:center; gap:5px; }
.bom-material-search svg { width:14px; height:14px; color:#7d8aa0; }
.bom-line-kind { display:inline-flex; padding:4px 7px; border-radius:999px; color:#147e70; background:#e8f8f4; font-size:9px; font-weight:800; }
.bom-line-kind.is-child-bom { color:#684fc8; background:#eeeaff; }
.bom-sheet-name { font-weight:700; }
.bom-sheet-seq { color:#7d899d!important; text-align:center; }
.bom-sheet-remove { display:grid; place-items:center; width:30px; height:30px; border:0; border-radius:7px; color:#cf4054; background:#fff0f2; cursor:pointer; }
.bom-sheet-remove svg { width:14px; height:14px; }
.bom-sheet > footer { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:14px; }
.bom-sheet > footer p { max-width:760px; margin:0; color:#68768c; font-size:10px; line-height:1.6; text-align:right; }
@media (max-width:1100px) { .bom-ledger-grid { grid-template-columns:1fr; } }
@media (max-width:900px) { .faq-live-layout { grid-template-columns:1fr; } .bom-ledger-toolbar { align-items:stretch; flex-direction:column; } .bom-ledger-toolbar label { width:100%; } .bom-ledger-section > header { grid-template-columns:46px minmax(0,1fr); } .bom-ledger-section-summary { grid-column:2 / 3; border:0; padding:0; } .bom-ledger-header-actions { grid-column:1 / -1; justify-content:flex-start; } .bom-workbench > header { align-items:stretch; flex-direction:column; } .bom-workbench > header label { width:100%; } .bom-product-picker { grid-template-columns:1fr; } }
@media (max-width:900px) { .main-bom-selection > header { align-items:stretch; flex-direction:column; } .main-bom-selection-search { width:100%; box-sizing:border-box; } .main-bom-selection-list { grid-template-columns:1fr; } }
@media (max-width:560px) { .main-bom-selection-summary { align-items:flex-start; flex-direction:column; } .main-bom-selection-row { grid-template-columns:20px 30px minmax(0,1fr); } .main-bom-selection-state { grid-column:2 / -1; align-items:flex-start; padding-left:0; text-align:left; } }
.action-modal.financial-sheet-modal .action-sheet { width:min(1500px,96vw); }
.financial-document-form { display:grid; gap:14px; }
.financial-document-header { display:grid; grid-template-columns:minmax(260px,1.4fr) minmax(180px,.7fr) minmax(140px,.45fr); gap:12px; padding:15px; border:1px solid #dce4ef; border-radius:13px; background:linear-gradient(135deg,#f8faff,#fff); }
.financial-document-header.is-expense { grid-template-columns:minmax(0,1fr) 220px; align-items:center; }
.financial-document-header.is-expense > div small { color:#7a64ce; font-size:10px; font-weight:800; }
.financial-document-header.is-expense > div b { display:block; margin-top:4px; font-size:17px; }
.financial-document-header.is-expense > div p { margin:4px 0 0; color:#6e7c91; font-size:10px; }
.financial-document-header label,.financial-document-note { display:flex; flex-direction:column; gap:6px; color:#617087; font-size:10px; font-weight:750; }
.financial-document-header input,.financial-document-header select,.financial-document-note textarea { box-sizing:border-box; width:100%; min-height:40px; padding:0 11px; border:1px solid #d8e0ec; border-radius:9px; outline:0; color:#20314a; background:#fff; font-size:11px; }
.financial-document-note { padding:14px; border:1px solid #dce4ef; border-radius:13px; background:#fff; }
.financial-document-note textarea { min-height:70px; padding:10px 11px; resize:vertical; }
.financial-source-selector,.financial-excel-sheet { overflow:hidden; border:1px solid #dce4ef; border-radius:13px; background:#fff; }
.financial-source-selector > header,.financial-excel-sheet > header { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 16px; border-bottom:1px solid #e3e9f1; background:#f8faff; }
.financial-source-selector header small,.financial-excel-sheet header small { color:#6251bd; font-size:9px; font-weight:800; }
.financial-source-selector header h3,.financial-excel-sheet header h3 { margin:3px 0; font-size:16px; }
.financial-source-selector header p,.financial-excel-sheet header p { margin:0; color:#758399; font-size:10px; }
.financial-source-selector header label { display:flex; align-items:center; gap:7px; width:min(330px,36%); padding:0 11px; border:1px solid #d8e0ec; border-radius:9px; background:#fff; }
.financial-source-selector header label svg { width:14px; height:14px; color:#7f8da1; }
.financial-source-selector header input { width:100%; height:38px; border:0; outline:0; font-size:11px; }
.invoice-purchase-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; max-height:230px; overflow:auto; padding:12px; }
.invoice-purchase-option { display:grid; grid-template-columns:18px minmax(0,1fr) auto; align-items:center; gap:9px; padding:10px; border:1px solid #e0e6ef; border-radius:10px; cursor:pointer; transition:.15s ease; }
.invoice-purchase-option:hover,.invoice-purchase-option.is-selected { border-color:#7d91d9; background:#f4f7ff; }
.invoice-purchase-option.is-disabled { opacity:.42; cursor:not-allowed; }
.invoice-purchase-option span { display:flex; min-width:0; flex-direction:column; }
.invoice-purchase-option b { font-size:11px; }
.invoice-purchase-option small { margin-top:3px; overflow:hidden; color:#79879b; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.invoice-purchase-option em { color:#53657d; font-size:9px; font-style:normal; white-space:nowrap; }
.financial-selection-summary { margin:0; padding:9px 14px; border-top:1px solid #e6ebf2; color:#53657e; background:#fbfcfe; font-size:10px; }
.financial-sheet-scroll { overflow:auto; max-height:42vh; }
.financial-excel-sheet table,.expense-detail-sheet table { width:100%; min-width:900px; border-collapse:collapse; table-layout:fixed; }
.financial-excel-sheet th,.expense-detail-sheet th { padding:10px 8px; border-right:1px solid #e3e8ef; border-bottom:1px solid #d9e1eb; color:#536178; background:#f2f5fa; font-size:10px; text-align:left; }
.financial-excel-sheet td,.expense-detail-sheet td { height:46px; padding:5px 7px; border-right:1px solid #e7ebf1; border-bottom:1px solid #e7ebf1; color:#26364e; font-size:10px; }
.financial-excel-sheet th:first-child { width:42px; }
.financial-excel-sheet th:last-child { width:46px; }
.financial-excel-sheet input,.financial-excel-sheet select { box-sizing:border-box; width:100%; height:35px; padding:0 8px; border:1px solid transparent; border-radius:6px; outline:0; background:transparent; font-size:10px; }
.financial-excel-sheet input:focus,.financial-excel-sheet select:focus { border-color:#5576e7; background:#fff; box-shadow:0 0 0 3px rgba(85,118,231,.10); }
.financial-excel-sheet tfoot td { height:40px; color:#34445c; background:#f5f7fb; font-weight:800; }
.financial-excel-sheet tfoot td:first-child { text-align:right; }
.expense-sheet-table th:nth-child(2),.expense-sheet-table th:nth-child(3) { width:150px; }
.expense-sheet-table th:nth-child(4) { width:140px; }
.expense-sheet-table th:nth-child(5) { width:130px; }
.expense-sheet-table th:nth-child(6) { width:auto; }
.financial-sheet-seq { color:#78869a!important; text-align:center; }
.financial-sheet-remove { display:grid; place-items:center; width:29px; height:29px; border:0; border-radius:7px; color:#c93f53; background:#fff0f2; cursor:pointer; }
.financial-sheet-remove svg { width:13px; height:13px; }
.expense-detail-sheet { overflow:auto; margin:12px 0; border:1px solid #dfe5ee; border-radius:10px; }
.expense-detail-sheet table { min-width:760px; }
.expense-detail-sheet th,.expense-detail-sheet td { font-size:10px; }
.invoice-linked-purchases { display:flex; align-items:flex-start; gap:12px; margin-top:12px; padding:11px; border:1px solid #e0e6ef; border-radius:10px; background:#f9fbfe; }
.invoice-linked-purchases > small { padding-top:4px; color:#6a788d; font-size:9px; font-weight:800; white-space:nowrap; }
.invoice-linked-purchases > div { display:flex; flex-wrap:wrap; gap:6px; }
.invoice-linked-purchases span { padding:4px 7px; border-radius:999px; color:#4058ae; background:#e9efff; font-size:9px; font-weight:750; }
@media (max-width:1000px) { .financial-document-header { grid-template-columns:1fr; } .financial-document-header.is-expense { grid-template-columns:1fr; } .invoice-purchase-list { grid-template-columns:1fr 1fr; } .financial-source-selector > header { align-items:stretch; flex-direction:column; } .financial-source-selector header label { width:100%; } }
.bank-import-preview { display: grid; gap: 18px; }
.bank-import-preview .summary-strip { margin: 0; }
.account-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.account-settings-card { padding: 16px; border: 1px solid #dfe6f1; border-radius: 14px; background: linear-gradient(145deg,#fff,#f8faff); }
.account-settings-card:last-child { grid-column: 1 / -1; }
.account-settings-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.account-settings-card header > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #2f6ff2; background: #eaf1ff; }
.account-settings-card header svg { width: 18px; height: 18px; }
.account-settings-card header div { display: flex; flex-direction: column; }
.account-settings-card header b { font-size: 13px; }.account-settings-card header small { margin-top: 3px; color: #7b899d; font-size: 10px; }
.account-settings-card .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.account-settings-card:last-child .form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.account-settings-feedback { min-height: 18px; margin: 8px 0; color: #6f7c90; font-size: 10px; }.account-settings-feedback.success { color: #16775d; }.account-settings-feedback.error { color: #b33745; }
.account-settings-card > .primary-button { min-height: 36px; padding: 0 13px; }
.account-email-verification { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.account-email-verification .secondary-button { min-height: 36px; flex: none; }
.account-email-verification > small { max-width: 330px; color: #7d899a; font-size: 9px; line-height: 1.55; }

/* Member accounts: explicit entry choice, free-form job names and exact workbench permissions. */
.member-entry-modal .action-sheet,.member-access-modal .action-sheet { width: min(1120px,calc(100vw - 40px)); }
.member-access-modal .action-layout { grid-template-columns: minmax(0,1.7fr) minmax(250px,.62fr); }
.member-entry-shell { display: grid; gap: 18px; }
.member-entry-shell > header { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 14px; align-items: center; }
.member-entry-shell > header > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: #fff; background: linear-gradient(145deg,#356dc9,#6a91d8); box-shadow: 0 12px 24px rgba(53,109,201,.22); }
.member-entry-shell > header svg { width: 21px; height: 21px; }
.member-entry-shell > header small { color: #5273ac; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.member-entry-shell > header h3 { margin: 4px 0 3px; color: #1e2c43; font-size: 20px; }
.member-entry-shell > header p { margin: 0; color: #748197; font-size: 11px; line-height: 1.6; }
.member-entry-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.member-entry-options > button { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 13px; min-width: 0; padding: 19px; border: 1px solid #dce5f1; border-radius: 17px; color: #233249; background: linear-gradient(145deg,#fff,#f7faff); cursor: pointer; text-align: left; transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.member-entry-options > button:hover { transform: translateY(-2px); border-color: #9cb8e7; box-shadow: 0 15px 34px rgba(36,74,138,.12); }
.member-entry-options > button > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #356dc9; background: #eaf2ff; }
.member-entry-options > button > span svg { width: 20px; height: 20px; }
.member-entry-options > button div { min-width: 0; }
.member-entry-options > button small { color: #78879c; font-size: 9px; }
.member-entry-options > button b { display: block; margin: 4px 0; font-size: 15px; }
.member-entry-options > button p { margin: 0; color: #69778d; font-size: 10.5px; line-height: 1.55; }
.member-entry-options > button em { grid-column: 2; display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: #356dc9; font-size: 10px; font-style: normal; font-weight: 750; }
.member-entry-options > button em svg { width: 13px; height: 13px; }
.member-entry-shell > aside { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #dceae5; border-radius: 12px; color: #2c6f61; background: #f0f8f5; }
.member-entry-shell > aside svg { flex: none; width: 17px; height: 17px; margin-top: 1px; }
.member-entry-shell > aside p { display: grid; gap: 2px; margin: 0; }
.member-entry-shell > aside b { font-size: 11px; }.member-entry-shell > aside span { font-size: 10px; line-height: 1.55; }
.member-permission-editor { grid-column: 1 / -1; margin-top: 18px; padding: 16px; border: 1px solid #dce5f1; border-radius: 15px; background: linear-gradient(145deg,#f8fbff,#ffffff); }
.member-permission-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.member-permission-editor > header small { color: #5273ac; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; }
.member-permission-editor > header h3 { margin: 4px 0 3px; color: #22304a; font-size: 14px; }
.member-permission-editor > header p { margin: 0; color: #7a879b; font-size: 9.5px; line-height: 1.55; }
.member-permission-editor > header button { flex: none; min-height: 34px; padding: 0 11px; font-size: 10px; }
.member-permission-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.member-permission-grid label { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 23px; gap: 9px; align-items: center; min-width: 0; padding: 11px 12px; border: 1px solid #e0e7f0; border-radius: 11px; background: #fff; cursor: pointer; transition: border-color .15s ease,background .15s ease; }
.member-permission-grid label:hover { border-color: #a8bee2; }
.member-permission-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.member-permission-grid label > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member-permission-grid label b { color: #26354d; font-size: 11px; }
.member-permission-grid label small { color: #8490a3; font-size: 8.5px; line-height: 1.4; }
.member-permission-grid label > i { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #cbd6e6; border-radius: 7px; color: transparent; background: #f8fafd; }
.member-permission-grid label > i svg { width: 13px; height: 13px; }
.member-permission-grid input:checked ~ i { border-color: #3f73c8; color: #fff; background: #3f73c8; box-shadow: 0 5px 12px rgba(63,115,200,.2); }
.member-permission-grid input:checked ~ span b { color: #245aad; }
.member-permission-grid input:focus-visible ~ i { outline: 3px solid rgba(63,115,200,.2); outline-offset: 2px; }
.member-permission-editor.is-admin .member-permission-grid label { cursor: default; border-color: #d8e4f5; background: #f1f6fd; }
.member-permission-editor.is-admin .member-permission-grid label:hover { border-color: #d8e4f5; }
.member-permission-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.member-permission-footer > p { display: flex; flex-direction: column; gap: 2px; margin: 0; color: #295ea9; }
.member-permission-footer > p b { font-size: 10px; }.member-permission-footer > p span { font-size: 8.5px; }
.member-permission-footer > span { margin-left: auto; color: #60718b; font-size: 10px; font-weight: 750; }
.member-finance-editor { grid-column: 1 / -1; margin-top: 13px; padding: 16px; border: 1px solid #dfe4ef; border-radius: 15px; background: linear-gradient(145deg,#fffdf8,#fff); }
.member-finance-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.member-finance-editor > header small,.member-finance-account-heading small { color: #9a6a23; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; }
.member-finance-editor > header h3 { margin: 4px 0 3px; color: #302a22; font-size: 14px; }
.member-finance-editor > header p { margin: 0; color: #847967; font-size: 9.5px; line-height: 1.55; }
.member-finance-editor > header button { flex: none; min-height: 34px; padding: 0 11px; font-size: 10px; }
.member-finance-scope-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.member-finance-scope-grid > label { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 23px; gap: 9px; align-items: center; min-width: 0; padding: 11px 12px; border: 1px solid #e9e1d4; border-radius: 11px; background: #fff; cursor: pointer; }
.member-finance-scope-grid > label:hover { border-color: #d7b77d; }
.member-finance-scope-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.member-finance-scope-grid label > span { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.member-finance-scope-grid b { color: #393126; font-size: 11px; }.member-finance-scope-grid small { color: #928673; font-size: 8.5px; line-height: 1.4; }
.member-finance-scope-grid label > i { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #d8cbb6; border-radius: 7px; color: transparent; background: #fffcf7; }
.member-finance-scope-grid label > i svg { width: 13px; height: 13px; }
.member-finance-scope-grid input:checked ~ i { color: #fff; border-color: #b98331; background: #b98331; box-shadow: 0 5px 12px rgba(185,131,49,.2); }
.member-finance-scope-grid input:checked ~ span b { color: #8a5b17; }
.member-finance-scope-grid input:focus-visible ~ i { outline: 3px solid rgba(185,131,49,.18); outline-offset: 2px; }
.member-finance-editor.is-admin .member-finance-scope-grid > label { cursor: default; border-color: #e5dbc9; background: #fbf7ef; }
.member-finance-account-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 9px; padding-top: 14px; border-top: 1px solid #eee6d9; }
.member-finance-account-heading > div { display: flex; flex-direction: column; gap: 3px; }.member-finance-account-heading b { color: #51483c; font-size: 10px; }
.member-finance-account-heading .secondary-button { min-height: 34px; padding: 0 10px; font-size: 9px; }
.member-fund-account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.member-fund-account { overflow: hidden; border: 1px solid #e8dfd1; border-radius: 12px; background: #fff; }
.member-fund-account > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 11px 12px 9px; border-bottom: 1px solid #f0e9df; }
.member-fund-account > header > div { min-width: 0; }.member-fund-account > header small,.member-fund-account > header b,.member-fund-account > header p { display: block; }
.member-fund-account > header small { color: #948873; font-size: 8px; }.member-fund-account > header b { margin-top: 2px; overflow: hidden; color: #3b3328; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.member-fund-account > header p { margin: 3px 0 0; color: #837866; font-size: 8.5px; }
.member-fund-account > header em { flex: none; padding: 4px 7px; border-radius: 999px; color: #287158; background: #eaf7f2; font-size: 8px; font-style: normal; font-weight: 750; }
.member-fund-account.is-pending_confirmation > header em { color: #9a681c; background: #fff5da; }.member-fund-account.is-archived > header em { color: #7f8793; background: #eef1f5; }
.member-fund-account > div { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px 11px 11px; }
.member-fund-account > div label { position: relative; display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border: 1px solid #e5ddd0; border-radius: 8px; color: #726757; background: #fffdf9; cursor: pointer; font-size: 8.5px; }
.member-fund-account > div input { position: absolute; width: 1px; height: 1px; opacity: 0; }.member-fund-account > div label:has(input:checked) { color: #fff; border-color: #b98331; background: #b98331; }.member-fund-account > div label:has(input:disabled) { cursor: default; opacity: .68; }
.member-fund-account > p,.member-fund-account-empty { margin: 0; padding: 0 12px 11px; color: #9a7950; font-size: 8.5px; line-height: 1.5; }
.member-finance-editor > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.member-finance-editor > footer > p { display: flex; flex-direction: column; gap: 2px; margin: 0; color: #8a5b17; }.member-finance-editor > footer > p b { font-size: 10px; }.member-finance-editor > footer > p span { font-size: 8.5px; }
.member-finance-editor > footer > span { margin-left: auto; color: #746957; font-size: 10px; font-weight: 750; }
.member-account-card { margin: 14px 0 6px; overflow: hidden; border: 1px solid #dfe7f1; border-radius: 18px; background: #fff; }
.member-account-hero { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 20px 22px; border-bottom: 1px solid #e7edf5; background: linear-gradient(120deg,#eef5ff,#fff 72%); }
.member-account-hero > span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px; color: #fff; background: linear-gradient(145deg,#3f73c8,#7396d2); font-size: 21px; font-weight: 800; box-shadow: 0 12px 24px rgba(63,115,200,.2); }
.member-account-hero > div { min-width: 0; }
.member-account-hero small { color: #7c8ba0; font-size: 9.5px; letter-spacing: .04em; }
.member-account-hero h4 { margin: 5px 0 3px; overflow-wrap: break-word; color: #1d2a40; font-size: 22px; }
.member-account-hero p { margin: 0; overflow-wrap: break-word; color: #66758c; font-size: 11px; }
.member-account-hero > em { padding: 6px 9px; border-radius: 999px; color: #24725c; background: #e8f6f1; font-size: 9.5px; font-style: normal; font-weight: 750; }
.member-account-hero > em.is-disabled { color: #a13d4c; background: #fff0f2; }.member-account-hero > em.is-pending { color: #996916; background: #fff7df; }
.member-account-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; border-bottom: 1px solid #e9eef4; background: #e9eef4; }
.member-account-facts > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; background: #fff; }
.member-account-facts small { color: #8793a5; font-size: 9.5px; }.member-account-facts b { overflow-wrap: break-word; color: #2a3950; font-size: 11.5px; }
.member-account-permissions { padding: 15px 20px; }
.member-account-permissions > header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.member-account-permissions > header > div { display: flex; flex-direction: column; gap: 3px; }
.member-account-permissions > header small { color: #8793a5; font-size: 9px; }.member-account-permissions > header b { color: #26354d; font-size: 12px; }
.member-account-permissions > header > em { padding: 5px 8px; border-radius: 999px; color: #315f9b; background: #eaf2ff; font-size: 8.5px; font-style: normal; font-weight: 750; }
.member-account-permissions > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.member-account-permissions > div em { padding: 5px 9px; border-radius: 999px; color: #315f9b; background: #edf4ff; font-size: 9px; font-style: normal; font-weight: 650; }
.member-account-permissions > div p { margin: 0; color: #8a96a8; font-size: 10px; }
.member-account-finance { border-top: 1px solid #edf1f5; background: #fffcf7; }
.member-account-finance > div:nth-of-type(2) em { color: #78511b; background: #fff0ce; }
.member-finance-legacy { width: 100%; padding: 9px 11px; border-radius: 9px; color: #9a681c !important; background: #fff5da; line-height: 1.5; }
.fund-account-manager { display: grid; gap: 14px; }
.fund-account-manager > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid #e8edf3; }
.fund-account-manager > header small { color: #9a6a23; font-size: 9px; font-weight: 800; letter-spacing: .08em; }.fund-account-manager > header h3 { margin: 4px 0 3px; color: #253249; font-size: 17px; }.fund-account-manager > header p { margin: 0; color: #788598; font-size: 10px; line-height: 1.55; }
.fund-account-manager > header button { flex: none; min-height: 38px; }
.fund-account-manager > div { display: grid; gap: 8px; }
.fund-account-manager-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; gap: 11px; align-items: center; min-width: 0; padding: 12px; border: 1px solid #e0e6ef; border-radius: 12px; background: #fff; }
.fund-account-manager-row > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #8a5b17; background: #fff2d6; }.fund-account-manager-row > span svg { width: 18px; height: 18px; }
.fund-account-manager-row > div { min-width: 0; }.fund-account-manager-row small,.fund-account-manager-row b,.fund-account-manager-row p { display: block; }.fund-account-manager-row small { color: #8a96a8; font-size: 8.5px; }.fund-account-manager-row b { margin-top: 2px; overflow: hidden; color: #29374e; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }.fund-account-manager-row p { margin: 3px 0 0; color: #758197; font-size: 9px; }
.fund-account-manager-row > em { padding: 5px 8px; border-radius: 999px; color: #287158; background: #e9f7f2; font-size: 8.5px; font-style: normal; font-weight: 750; }.fund-account-manager-row.is-pending_confirmation > em { color: #986719; background: #fff5db; }.fund-account-manager-row.is-archived > em { color: #788495; background: #eef1f5; }
.fund-account-manager-row > button { min-height: 32px; padding: 0 10px; font-size: 9px; }
.fund-account-manager > aside { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border: 1px solid #dce8e4; border-radius: 11px; color: #2d6d5f; background: #f1f8f5; }.fund-account-manager > aside svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }.fund-account-manager > aside p { margin: 0; }.fund-account-manager > aside b,.fund-account-manager > aside span { display: block; }.fund-account-manager > aside b { font-size: 10px; }.fund-account-manager > aside span { margin-top: 2px; font-size: 9px; line-height: 1.55; }
.fund-account-manager-empty { margin: 0; padding: 30px; border: 1px dashed #d9e0ea; border-radius: 12px; color: #8692a5; text-align: center; font-size: 10px; }
.member-admin-note { margin: 10px 0 0; padding: 9px 11px; border-radius: 9px; color: #526984; background: #f3f6fa; font-size: 9.5px; line-height: 1.55; }
.member-account-card > footer { display: flex; align-items: center; gap: 12px; padding: 13px 20px 17px; border-top: 1px solid #edf1f5; }
.member-account-card > footer > span { color: #8995a7; font-size: 9.5px; }

/* Customer identity: real customer logo first, readable initials as a stable fallback. */
.customer-logo { position: relative; display: grid; place-items: center; flex: none; overflow: hidden; color: #2458b6; background: linear-gradient(145deg,#eef4ff,#e4edff); box-shadow: inset 0 0 0 1px rgba(47,111,242,.12); }
.customer-logo-fallback { position: relative; z-index: 0; font-weight: 800; letter-spacing: .02em; }
.customer-logo img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; padding: 5px; object-fit: contain; background: #fff; opacity: 0; transition: opacity .16s ease; }
.customer-logo.has-image img { opacity: 1; }
.customer-row-logo { width: 34px; height: 34px; border-radius: 10px; font-size: 9px; }
.sig-row-button.has-customer-logo { grid-template-columns: 34px minmax(0,1fr) auto 18px; }
.sig-row-copy { min-width: 0; }
.account-avatar.customer-logo { width: 34px; height: 34px; border-radius: 10px; font-size: 9px; }
.action-mark.is-customer-identity { padding: 0; background: transparent; box-shadow: none; }
.action-customer-logo { width: 44px; height: 44px; border-radius: 12px; font-size: 11px; box-shadow: 0 8px 20px rgba(38,79,150,.14); }
.record-hero.has-customer-identity { grid-template-columns: 58px minmax(0,1fr) auto auto; align-items: center; }
.record-customer-logo { width: 58px; height: 58px; border-radius: 15px; font-size: 14px; box-shadow: 0 9px 24px rgba(36,78,147,.12); }
.customer-logo-manager { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 13px 15px; border: 1px solid #dfe6f2; border-radius: 12px; background: linear-gradient(120deg,#f7faff,#fff); }
.customer-logo-manager > div:first-child { min-width: 0; }.customer-logo-manager small,.customer-logo-manager b { display: block; }.customer-logo-manager small { color: #2f6ff2; font-size: 9px; font-weight: 750; }.customer-logo-manager b { margin-top: 3px; font-size: 12px; }.customer-logo-manager p { max-width: 570px; margin: 4px 0 0; color: #718096; font-size: 10px; line-height: 1.5; }
.customer-logo-manager > div:last-child { display: flex; align-items: center; gap: 7px; flex: none; }
.customer-logo-upload,.customer-logo-manager button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 11px; border: 1px solid #d6e0ef; border-radius: 9px; color: #315b9d; background: #fff; cursor: pointer; font-size: 9px; font-weight: 700; }
.customer-logo-upload:hover,.customer-logo-manager button:hover { border-color: #9fb8e8; background: #f5f8ff; }.customer-logo-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }.customer-logo-manager button { color: #6d788a; }

/* Complete customer ledger: server-backed search and pagination, never a decorative sample list. */
.customer-directory-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 14px; }
.customer-directory-panel { min-width: 0; }
.customer-directory-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.customer-directory-toolbar > div small { color: var(--module-accent,#2f6ff2); font-size: 9px; font-weight: 800; }.customer-directory-toolbar h2 { margin: 4px 0 3px; font-size: 18px; }.customer-directory-toolbar p { margin: 0; color: #77859a; font-size: 10px; }
.customer-directory-toolbar label { display: flex; align-items: center; gap: 8px; width: min(380px,42%); min-height: 38px; padding: 0 12px; border: 1px solid #dce4ef; border-radius: 10px; background: #fff; }.customer-directory-toolbar label:focus-within { border-color: #84a7eb; box-shadow: 0 0 0 3px rgba(47,111,242,.08); }.customer-directory-toolbar label svg { width: 15px; height: 15px; color: #70809a; }.customer-directory-toolbar input { width: 100%; border: 0; outline: 0; color: #24324a; background: transparent; font-size: 11px; }
.customer-directory-status { display: flex; align-items: center; justify-content: space-between; min-height: 30px; padding: 0 10px; border-radius: 8px; color: #6f7d91; background: #f7f9fc; font-size: 9px; }.customer-directory-status b { color: #31425e; font-size: 10px; }
.customer-directory-list { display: grid; gap: 5px; min-height: 82px; margin-top: 8px; transition: opacity .15s ease; }.customer-directory-list.is-loading { opacity: .45; pointer-events: none; }
.customer-directory-list .sig-row-button { min-height: 54px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; }.customer-directory-list .sig-row-button:hover { border-color: #dbe5f4; background: #f7faff; }
.customer-directory-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #edf0f5; }.customer-directory-pagination button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border: 1px solid #dce4ef; border-radius: 8px; color: #4b5b73; background: #fff; font-size: 9px; font-weight: 700; cursor: pointer; }.customer-directory-pagination button:disabled { opacity: .4; cursor: not-allowed; }.customer-directory-pagination button:first-child svg { transform: rotate(180deg); }.customer-directory-pagination svg { width: 12px; height: 12px; }.customer-directory-pagination span { min-width: 76px; color: #748197; text-align: center; font-size: 9px; }
.customer-directory-aside { align-self: start; position: sticky; top: 76px; }.customer-directory-aside > .primary-button { margin-top: 18px; }

/* Work preferences are real account settings with explicit saved state. */
.preferences-live-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 14px; }
.preferences-live-form > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }.preferences-live-form > header small { color: #c47a31; font-size: 9px; font-weight: 800; }.preferences-live-form > header h2 { margin: 5px 0 4px; font-size: 19px; }.preferences-live-form > header p { margin: 0; color: #77859a; font-size: 10px; }.preferences-live-form > header > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #b66b25; background: #fff0df; }.preferences-live-form > header svg { width: 23px; height: 23px; }
.preferences-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.preferences-field-grid label { display: flex; flex-direction: column; gap: 8px; padding: 13px; border: 1px solid #e3e7ee; border-radius: 12px; background: #fbfcfe; }.preferences-field-grid label > span { display: flex; flex-direction: column; color: #2c3950; font-size: 11px; font-weight: 800; }.preferences-field-grid label small { margin-top: 3px; color: #8792a3; font-size: 8.5px; font-weight: 500; }.preferences-field-grid select { min-height: 38px; padding: 0 10px; border: 1px solid #d9e1ec; border-radius: 9px; color: #334159; background: #fff; font-size: 10px; }
.product-insight-setting { margin-top: 14px; padding: 16px; border: 1px solid #dbe6f6; border-radius: 14px; background: linear-gradient(135deg,#f7faff 0%,#fff 62%); box-shadow: inset 3px 0 0 #3c78ec; }
.product-insight-setting > header { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 11px; }
.product-insight-setting > header > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #2e6ee7; background: #e8f1ff; }
.product-insight-setting > header svg { width: 18px; height: 18px; }
.product-insight-setting > header small { color: #3971d2; font-size: 8.5px; font-weight: 800; }
.product-insight-setting h3 { margin: 2px 0 3px; color: #253650; font-size: 14px; }
.product-insight-setting > header p { margin: 0; color: #718096; font-size: 9px; line-height: 1.5; }
.product-insight-setting > header em { align-self: start; padding: 5px 8px; border-radius: 999px; color: #246b57; background: #e8f7f1; font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.product-insight-safe-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0 9px 49px; }
.product-insight-safe-list span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid #dce6f4; border-radius: 8px; color: #526885; background: rgba(255,255,255,.84); font-size: 8.5px; font-weight: 700; }
.product-insight-safe-list svg { width: 12px; height: 12px; color: #3474eb; }
.product-insight-boundary { margin: 0 0 12px 49px; color: #6b788c; font-size: 9px; line-height: 1.65; }
.product-insight-boundary b { color: #36465f; }
.product-insight-toggle { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; min-height: 58px; padding: 11px 12px; border: 1px solid #dbe4f0; border-radius: 11px; background: #fff; cursor: pointer; }
.product-insight-toggle:hover { border-color: #b8cae7; background: #fbfdff; }
.product-insight-toggle > span { display: flex; flex-direction: column; min-width: 0; }
.product-insight-toggle > span > b { color: #2d3d55; font-size: 10.5px; }
.product-insight-toggle > span > small { margin-top: 4px; color: #7d899a; font-size: 8.5px; line-height: 1.45; }
.product-insight-toggle > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.product-insight-toggle > i { position: relative; width: 38px; height: 22px; border: 1px solid #c7cfdb; border-radius: 999px; background: #d9dfe8; transition: background .18s ease,border-color .18s ease,box-shadow .18s ease; }
.product-insight-toggle > i > b { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(29,42,63,.22); transition: transform .18s ease; }
.product-insight-toggle > input:checked + i { border-color: #2f75ed; background: #397cf1; }
.product-insight-toggle > input:checked + i > b { transform: translateX(16px); }
.product-insight-toggle > input:focus-visible + i { box-shadow: 0 0 0 4px rgba(47,117,237,.18); }
.product-insight-retention { display: block; margin: 8px 2px 0; color: #8590a1; font-size: 8px; line-height: 1.55; }
body[data-theme="dark"] .product-insight-setting { border-color: #30415b; background: linear-gradient(135deg,#172236,#131b29 62%); box-shadow: inset 3px 0 0 #5c8ff2; }
body[data-theme="dark"] .product-insight-setting > header > span { color: #82a9f6; background: #233553; }
body[data-theme="dark"] .product-insight-setting h3,body[data-theme="dark"] .product-insight-boundary b,body[data-theme="dark"] .product-insight-toggle > span > b { color: #e5ebf5; }
body[data-theme="dark"] .product-insight-setting > header p,body[data-theme="dark"] .product-insight-boundary,body[data-theme="dark"] .product-insight-toggle > span > small,body[data-theme="dark"] .product-insight-retention { color: #93a1b6; }
body[data-theme="dark"] .product-insight-safe-list span,body[data-theme="dark"] .product-insight-toggle { border-color: #33435b; color: #b9c6d9; background: #192435; }
body[data-theme="dark"] .product-insight-toggle:hover { border-color: #506887; background: #1b293d; }
.preferences-save-feedback { min-height: 18px; margin: 13px 0 8px; color: #768399; font-size: 9.5px; }.preferences-save-feedback.success { color: #16775d; }.preferences-save-feedback.error { color: #b33745; }.preferences-proof { align-self: start; }.preferences-proof p { color: #6f7d91; font-size: 10px; line-height: 1.65; }
body.density-compact .signature-panel { padding-top: 12px; padding-bottom: 12px; } body.density-compact .sig-row-button { min-height: 42px; padding-top: 5px; padding-bottom: 5px; } body.guide-hidden #journeyDock { display: none; }

/* 真实记录操作：详情与生命周期动作分离，避免整行按钮里嵌套按钮。 */
.sig-row-shell { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; border-top: 1px solid #edf0f4; }
.sig-row-shell:first-child { border-top: 0; }
.sig-row-shell > .sig-row { border-top: 0; }
.record-row-actions { display: inline-flex; align-items: center; gap: 7px; padding-right: 2px; }
.record-row-unreview { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px; border: 1px solid #cbd9ef; border-radius: 8px; color: #315f9e; background: #f7faff; cursor: pointer; font-size: 8px; font-weight: 700; white-space: nowrap; }
.record-row-unreview:hover { border-color: #91add7; color: #204c8a; background: #edf4ff; }
.record-row-unreview svg { width: 12px; height: 12px; }
.record-row-unreview.is-blocked { border-style: dashed; border-color: #d9dfe8; color: #748196; background: #fafbfc; }
.record-row-unreview.is-blocked:hover { border-color: #b8c1ce; color: #536176; background: #f4f6f8; }
.record-row-lifecycle { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 8px; border: 1px solid #f1cbd1; border-radius: 8px; color: #b53d4c; background: #fff8f9; cursor: pointer; font-size: 8px; font-weight: 700; white-space: nowrap; }
.record-row-lifecycle:hover { border-color: #dd8792; background: #fff0f2; }
.record-row-lifecycle svg { width: 12px; height: 12px; }
.sig-head-status { display: inline-flex; align-items: center; gap: 5px; color: #66808a; font-size: 8px; font-weight: 700; }
.sig-head-status i { width: 6px; height: 6px; border-radius: 50%; background: #28b48b; box-shadow: 0 0 0 3px #e8f8f2; }

.record-lifecycle-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid #f1cbd1; border-radius: 12px; background: #fff9fa; }
.record-lifecycle-panel > div { display: flex; flex-direction: column; min-width: 0; }
.record-lifecycle-panel small { color: #a45b66; font-size: 8px; }
.record-lifecycle-panel b { margin-top: 3px; font-size: 12px; }
.record-lifecycle-panel p { margin: 5px 0 0; color: #7b6870; font-size: 9px; line-height: 1.55; }
.record-lifecycle-panel button,.danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid #d85260 !important; border-radius: 9px; color: #fff !important; background: #c94453 !important; cursor: pointer; font-size: 9px; font-weight: 700; white-space: nowrap; }
.record-lifecycle-panel button svg { width: 13px; height: 13px; }
.record-secondary-panel { border-color: #cbdaf4; background: #f7faff; }
.record-secondary-panel small { color: #4b6eaa; }
.record-secondary-panel p { color: #62718a; }
.record-secondary-panel button { border-color: #315fae !important; background: #315fae !important; }
.record-alternate-panel { border-color: #c7d9f6; background: linear-gradient(135deg,#f2f7ff,#fff); }
.record-alternate-panel small { color: #3d6fb9; }
.record-alternate-panel p { color: #536b8d; }
.record-alternate-panel button { border-color: #3d78d8 !important; background: #3d78d8 !important; }
.danger-record-action { border-color: #efc4ca; background: linear-gradient(135deg,#fff4f5,#fff); }
.danger-record-action > div b { color: #b63f4d; }
.action-modal.danger-mode .action-mark { color: #bc3f4d; background: #fff0f2; }
.order-cancellation-record { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: start; gap: 12px; padding: 14px 16px; border: 1px solid #e6cbd0; border-left: 3px solid #b75b67; border-radius: 10px; background: #fffafb; }
.order-cancellation-record > svg { width: 18px; height: 18px; margin: 2px 0 0 6px; color: #a94e5b; }
.order-cancellation-record > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.order-cancellation-record small { color: #9c5963; font-size: 9px; font-weight: 750; letter-spacing: .04em; }
.order-cancellation-record b { color: #332b31; font-size: 12px; line-height: 1.55; }
.order-cancellation-record p { margin: 0; color: #786a70; font-size: 9.5px; line-height: 1.6; }

/* 产品主图与企业参数是产品主数据的一部分，而不是附件装饰。 */
.record-hero.has-product-image { grid-template-columns: 82px minmax(0,1fr) auto auto; }
.product-main-image { position: relative; display: grid; place-items: center; width: 76px; height: 76px; margin: 0; overflow: hidden; border: 1px solid #dce5f3; border-radius: 14px; color: #6680a9; background: linear-gradient(145deg,#eef4ff,#f8fbff); }
.product-main-image > span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.product-main-image > span svg { width: 24px; height: 24px; }
.product-main-image > span small { font-size: 7px; }
.product-main-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; opacity: 0; }
.product-main-image.has-image img { opacity: 1; }
.product-image-manager,.product-draft-image { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 13px; padding: 13px 14px; border: 1px solid #dce5f3; border-radius: 12px; background: #f7faff; }
.product-image-manager > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #356ee7; background: #e8f0ff; }
.product-image-manager > span svg { width: 18px; height: 18px; }
.product-image-manager > div,.product-draft-image > div { display: flex; flex-direction: column; }
.product-image-manager small,.product-draft-image small { color: #7182a0; font-size: 8px; }
.product-image-manager b,.product-draft-image b { margin-top: 2px; font-size: 12px; }
.product-image-manager p,.product-draft-image p { margin: 4px 0 8px; color: #6a7890; font-size: 9px; line-height: 1.5; }
.product-image-manager > div > div { display: flex; align-items: center; gap: 8px; }
.product-image-manager label,.product-draft-image label { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 30px; padding: 0 10px; border: 1px solid #b8cdf5; border-radius: 8px; color: #245fcf; background: #fff; cursor: pointer; font-size: 8px; font-weight: 700; }
.product-image-manager input,.product-draft-image input { display: none; }
.product-image-manager button { min-height: 30px; padding: 0 9px; border: 1px solid #efc7cc; border-radius: 8px; color: #b14553; background: #fff; cursor: pointer; font-size: 8px; font-weight: 700; }
.product-parameter-summary { padding: 14px; border: 1px solid #ded8f5; border-radius: 12px; background: #fbfaff; }
.product-parameter-summary header { display: flex; align-items: center; justify-content: space-between; }
.product-parameter-summary header > div { display: flex; flex-direction: column; }
.product-parameter-summary header small { color: #7e70b1; font-size: 8px; }
.product-parameter-summary header b { margin-top: 2px; font-size: 12px; }
.product-parameter-summary header em { padding: 4px 7px; border-radius: 99px; color: #6d57be; background: #eee9ff; font-size: 8px; font-style: normal; font-weight: 700; }
.product-parameter-summary > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.product-parameter-summary > div span { display: flex; flex-direction: column; min-width: 0; padding: 9px; border: 1px solid #e8e4f5; border-radius: 9px; background: #fff; }
.product-parameter-summary > div small { color: #8a819e; font-size: 7px; }
.product-parameter-summary > div b { margin-top: 3px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
.product-parameter-summary > p { margin: 12px 0 0; color: #817990; font-size: 9px; }
.product-parameter-summary footer { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #e7e1f4; color: #746c84; font-size: 8px; }
.receipt-batch-history { margin-top: 12px; padding: 12px; border: 1px solid #dfe7f2; border-radius: 11px; background: #fff; }
.receipt-batch-history > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.receipt-batch-history > header b { color: #213550; font-size: 10px; }
.receipt-batch-history > header small,.receipt-batch-history > p { margin: 0; color: #78869a; font-size: 8px; }
.receipt-batch-history .kitting-table td:first-child b,.receipt-batch-history .kitting-table td:first-child small { display: block; }
.product-master-relations { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.product-master-relations article { border:1px solid #dfe6f0; border-radius:14px; background:#fff; padding:14px; min-width:0; }
.product-master-relations header { display:flex; align-items:center; gap:9px; margin-bottom:11px; }
.product-master-relations header > span { display:grid; place-items:center; width:36px; height:36px; border-radius:11px; color:#356df3; background:#edf3ff; flex:0 0 auto; }
.product-master-relations header > span svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.product-master-relations header > div { display:grid; gap:2px; min-width:0; }
.product-master-relations header small,.product-master-relations li small,.internal-part-number small { color:#7b8799; font-size:8px; }
.product-master-relations header b { color:#14213b; font-size:11px; }
.product-master-relations header button { margin-left:auto; border:1px solid #bdd0fb; background:#f6f9ff; color:#245bda; border-radius:9px; padding:7px 9px; font-size:9px; font-weight:700; cursor:pointer; white-space:nowrap; }
.product-master-relations header button:hover { background:#eaf1ff; }
.product-master-relations header button:disabled { border-color:#dfe5ed; color:#9ba5b5; background:#f5f7fa; cursor:not-allowed; }
.product-master-relations ul { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.product-master-relations li { display:flex; justify-content:space-between; align-items:center; gap:10px; border-top:1px solid #edf1f7; padding-top:7px; }
.product-master-relations li span { display:grid; gap:2px; min-width:0; }
.product-master-relations li b { color:#14213b; font-size:9px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.product-master-relations li em { color:#334f7a; font-size:8px; font-style:normal; white-space:nowrap; }
.product-master-relations li.empty { border:1px dashed #d9e2ef; border-radius:10px; padding:10px; background:#fbfcfe; }
.instruction-bom-editor { grid-column:1 / -1; margin-top:16px; }
.instruction-bom-editor > article { grid-column:1 / -1; }
.instruction-bom-row { display:grid; grid-template-columns:minmax(200px,1.6fr) minmax(110px,.65fr) minmax(110px,.65fr) auto; align-items:end; gap:10px; padding:10px 0; border-top:1px solid #edf1f7; }
.instruction-bom-row .field { display:grid; gap:6px; color:#526077; font-size:10px; font-weight:650; }
.instruction-bom-row .field select,.instruction-bom-row .field input,.module-action-productionInstructions .field select,.module-action-productionInstructions .field input,.module-action-productionInstructions .field textarea,.module-action-outsourceInstructions .field select,.module-action-outsourceInstructions .field input,.module-action-outsourceInstructions .field textarea { width:100%; min-height:39px; padding:8px 10px; border:1px solid #dbe3ee; border-radius:9px; color:#17233a; background:#fff; font:inherit; }
.module-action-productionInstructions .field,.module-action-outsourceInstructions .field { display:grid; gap:6px; color:#526077; font-size:10px; font-weight:650; }
.module-action-productionInstructions .field-wide,.module-action-outsourceInstructions .field-wide { grid-column:1 / -1; }
.module-action-productionInstructions textarea,.module-action-outsourceInstructions textarea { min-height:78px; resize:vertical; }
.instruction-master-sync { display:flex; align-items:flex-start; gap:9px; margin-top:12px; padding:11px; border:1px solid #d8e5f8; border-radius:10px; color:#203552; background:#f7faff; cursor:pointer; }
.instruction-master-sync input { margin-top:2px; }
.instruction-master-sync span { display:grid; gap:3px; }.instruction-master-sync b { font-size:10px; }.instruction-master-sync small { color:#71819a; font-size:8px; font-weight:500; }
@media (max-width:760px) { .instruction-bom-row { grid-template-columns:1fr; }.instruction-bom-row .record-row-lifecycle { justify-content:center; }.module-action-productionInstructions .field-wide,.module-action-outsourceInstructions .field-wide { grid-column:auto; } }
@media (max-width:980px) { .bom-change-controls { grid-template-columns:1fr; }.bom-revision-ledger { max-height:360px; }.bom-revision-entry > summary { grid-template-columns:auto minmax(0,1fr) 16px; }.bom-revision-entry > summary em { display:none; } }
.internal-part-number { display:flex; justify-content:space-between; align-items:center; gap:10px; border:1px solid #e6ebf2; background:#fafcff; border-radius:10px; padding:9px 10px; margin-bottom:7px; }
.internal-part-number b { color:#14213b; font-size:9px; }
.product-draft-image { grid-template-columns: 96px minmax(0,1fr); margin-bottom: 14px; }
.draft-product-image { width: 92px; height: 92px; }
.product-field-divider { display: flex; align-items: center; justify-content: space-between; margin: 3px 0 11px; padding-bottom: 8px; border-bottom: 1px solid #e8edf5; }
.product-field-divider span { font-size: 11px; font-weight: 700; }
.product-field-divider em { color: #745bc4; font-size: 8px; font-style: normal; }

.kitting-review { display: flex; flex-direction: column; gap: 15px; }.kitting-review > header { display: grid; grid-template-columns: 50px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 17px; border: 1px solid #dfe7f2; border-radius: 14px; background: #f8faff; }.kitting-review > header > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; color: #2f6ff2; background: #e9f1ff; }.kitting-review > header > span svg { width: 23px; height: 23px; }.kitting-review > header small,.kitting-review > header h3,.kitting-review > header p { display: block; margin: 0; }.kitting-review > header small { color: #708098; font-size: 8px; }.kitting-review > header h3 { margin-top: 4px; color: #172943; font-size: 20px; }.kitting-review > header p { margin-top: 4px; color: #66758a; font-size: 9px; }.kitting-review > header em { padding: 5px 9px; border-radius: 99px; color: #a1283c; background: #ffe9ed; font-size: 8px; font-style: normal; font-weight: 700; }.kitting-review.ready > header em { color: #14735e; background: #e5f7f0; }.kitting-progress { height: 8px; overflow: hidden; border-radius: 99px; background: #edf1f6; }.kitting-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ef5a68,#f4ad52); }.kitting-review.ready .kitting-progress i { background: linear-gradient(90deg,#18a47f,#38c8a0); }.kitting-table { overflow-x: auto; border: 1px solid #e0e6ee; border-radius: 12px; }.kitting-table table { width: 100%; border-collapse: collapse; }.kitting-table th,.kitting-table td { padding: 9px 11px; border-bottom: 1px solid #e8ecf2; color: #526178; font-size: 9px; text-align: right; }.kitting-table th { color: #77849a; background: #f6f8fb; font-size: 8px; }.kitting-table th:first-child,.kitting-table td:first-child { text-align: left; }.kitting-table tr:last-child td { border-bottom: 0; }.kitting-table td b,.kitting-table td small { display: block; }.kitting-table td small { margin-top: 2px; color: #929cad; font-size: 7.5px; }.kitting-table td strong { color: #d33d52; }.kitting-clear { display: flex; align-items: center; gap: 10px; color: #16846b; }.kitting-clear > svg { width: 20px; height: 20px; }.kitting-clear span { text-align: left; }.kitting-review > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.kitting-route-actions { display: flex; flex-wrap: wrap; gap: 7px; }.kitting-route-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid #d9e2ef; border-radius: 9px; color: #3d5878; background: #fff; cursor: pointer; font-size: 8.5px; }.kitting-route-actions button:hover { color: #2f6ff2; border-color: #a8c1eb; background: #f3f7ff; }.kitting-route-actions button svg { width: 14px; height: 14px; }

@media (max-width: 760px) {
  .record-row-unreview span { display: none; }
  .record-row-lifecycle span { display: none; }
  .record-hero.has-product-image { grid-template-columns: 64px minmax(0,1fr); }
  .record-hero.has-product-image > .record-status { grid-column: 1 / -1; }
  .record-hero .record-copy-button { grid-column: 1 / -1; justify-self: stretch; width: 100%; }
  .product-main-image { width: 58px; height: 58px; }
  .product-parameter-summary > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-master-relations { grid-template-columns:1fr; }
}

/* Role-aware left workbench: icons carry recognition, labels explain the business meaning. */
@media (min-width: 851px) {
  .app-shell { display: grid; grid-template-columns: 232px minmax(0,1fr); }
  .rail { display: flex; width: 232px; align-items: stretch; padding: 14px 12px 12px; color: #33415a; background: #fff; border-right: 1px solid #e1e6ee; box-shadow: 6px 0 24px rgba(31,49,82,.035); }
  .workspace { grid-column: 2; }
  .rail-brand { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 12px; color: #16233a; background: transparent; cursor: pointer; text-align: left; }
  .rail-brand:hover { background: #f4f7fb; }.rail-brand img { width: 36px; height: 36px; object-fit: contain; }.rail-brand span { display: flex; flex-direction: column; min-width: 0; }.rail-brand b { font-size: 14px; }.rail-brand small { margin-top: 3px; color: #78869b; font-size: 10px; }
  .rail .top-nav { align-self: auto; display: flex; flex: 1; flex-direction: column; align-items: stretch; gap: 3px; max-width: none; margin: 8px 0 10px; padding: 0 2px 14px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cfd8e6 transparent; }
  .role-nav-heading { display: flex; flex-direction: column; padding: 4px 8px 8px; }.role-nav-heading small { color: #9aa4b4; font-size: 9px; }.role-nav-heading b { margin-top: 3px; color: #4b5870; font-size: 11px; }
  .rail .top-nav > button { display: grid; grid-template-columns: 32px minmax(0,1fr) 14px; align-items: center; gap: 9px; min-height: 42px; padding: 5px 8px; border: 0; border-radius: 10px; color: #536078; background: transparent; text-align: left; cursor: pointer; }
  .rail .top-nav > button:hover { color: #1f4f9d; background: #f3f7ff; }.rail .top-nav > button.is-active { color: #1f55ad; background: #edf3ff; box-shadow: inset 3px 0 #2f6ff2; }
  .rail .top-nav > button.is-active::after { display: none; }
  .role-nav-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #44658d; background: #edf2f7; }.rail .top-nav > button.is-active .role-nav-icon { color: #2f6ff2; background: #fff; box-shadow: 0 4px 12px rgba(47,111,242,.1); }.role-nav-icon svg { width: 16px !important; height: 16px !important; color: inherit !important; }
  .role-nav-copy { display: flex; flex-direction: column; min-width: 0; }.role-nav-copy b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.role-nav-copy small { margin-top: 3px; color: #98a2b2; font-size: 9px; }.role-nav-arrow { width: 12px; height: 12px; color: #a4afbf; }
  .full-nav-group { display: flex; align-items: center; gap: 7px; margin: 9px 8px 2px; color: #929eaf; font-size: 8px; font-weight: 750; letter-spacing: .08em; }.full-nav-group::after { content: ""; height: 1px; flex: 1; background: #e8ecf2; }
  .role-nav-divider { display: flex; align-items: center; gap: 8px; margin: 6px 8px 1px; color: #a2acba; font-size: 8px; }.role-nav-divider::after { content: ""; height: 1px; flex: 1; background: #e8ecf2; }
  .rail .shortcut-remove { opacity: .25; }.rail .top-nav [data-custom-shortcut]:hover .shortcut-remove { opacity: 1; }
  .rail .top-nav.is-drop-target { overflow-y: auto; padding: 5px; background: #edf3ff; }.rail .top-nav.is-drop-target::after { content: "松开放到左侧菜单"; margin: 5px 8px; }
  body.is-dragging-module .rail { z-index: 220; box-shadow: 10px 0 32px rgba(31,49,82,.14); }
  .rail-bottom { align-items: stretch; gap: 5px; padding-top: 10px; border-top: 1px solid #e8ecf2; }
  .rail-utility { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 0 11px; border: 0; border-radius: 10px; color: #657289; background: transparent; cursor: pointer; font-size: 10px; }.rail-utility:hover { color: #2f6ff2; background: #f4f7fb; }.rail-utility svg { width: 17px; height: 17px; }
  .rail-all-functions { display: none; }
  .rail-account { display: grid; grid-template-columns: 34px minmax(0,1fr) 16px; align-items: center; gap: 9px; width: 100%; margin-top: 3px; padding: 7px 9px; border: 1px solid #e4e8ef; border-radius: 11px; color: #33415a; background: #fafbfd; cursor: pointer; text-align: left; }.rail-account:hover { border-color: #cbd7e8; background: #fff; }.rail-account > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }.rail-account b { font-size: 10px; }.rail-account small { margin-top: 2px; color: #8a95a7; font-size: 8px; }.rail-account > svg { width: 15px; height: 15px; color: #8e9aac; }.rail-account .avatar-small { width: 32px; height: 32px; margin: 0; border-radius: 9px; }
  .topbar { padding-inline: 22px; }.top-left { gap: 10px; }.top-left #moduleToggle { display: none; }
  .content { max-width: 1540px; }
  .module-sheet { left: calc(50% + 116px); max-width: calc(100vw - 270px); }
  body.board-mode .rail { color: #c8d5de; background: #091923; border-right-color: #18303d; box-shadow: none; }
  body.board-mode .rail-all-functions { color: #dbe8ee; background: #102630; border-color: #29424e; }.board-mode .rail-all-functions:hover { color: #fff; background: #17333f; border-color: #3d5a67; }
  body.board-mode .rail-brand { color: #f1f6f8; }.board-mode .rail-brand:hover,.board-mode .rail .top-nav > button:hover,.board-mode .rail-utility:hover { background: rgba(255,255,255,.06); }.board-mode .rail-brand small,.board-mode .role-nav-heading small,.board-mode .role-nav-copy small,.board-mode .rail-account small { color: #7f96a4; }.board-mode .role-nav-heading b,.board-mode .rail .top-nav > button,.board-mode .rail-utility { color: #9eb1bd; }.board-mode .rail .top-nav > button.is-active { color: #fff; background: rgba(47,111,242,.22); }.board-mode .role-nav-icon { color: #9fb5c2; background: rgba(255,255,255,.06); }.board-mode .rail-account { color: #e6eef2; background: rgba(255,255,255,.04); border-color: #203846; }.board-mode .rail-bottom { border-color: #203846; }.board-mode .full-nav-group { color: #6f8795; }.board-mode .full-nav-group::after { background: #203846; }
}

@media (max-width: 720px) {
  .customer-directory-layout,.preferences-live-layout { grid-template-columns: 1fr; }.customer-directory-toolbar { align-items: stretch; flex-direction: column; }.customer-directory-toolbar label { width: 100%; }.customer-directory-aside { position: static; }.preferences-field-grid { grid-template-columns: 1fr; }
  .product-insight-setting { padding: 13px; }.product-insight-setting > header { grid-template-columns: 34px minmax(0,1fr); }.product-insight-setting > header > span { width: 34px; height: 34px; }.product-insight-setting > header em { grid-column: 2; justify-self: start; }.product-insight-safe-list,.product-insight-boundary { margin-left: 0; }.product-insight-toggle { gap: 10px; }
  .account-settings-grid { grid-template-columns: 1fr; }.account-settings-card:last-child { grid-column: auto; }.account-settings-card .form-grid,.account-settings-card:last-child .form-grid { grid-template-columns: 1fr; }
  .account-email-verification { align-items: stretch; flex-direction: column; }
  .account-email-verification > small { max-width: none; }
  .member-entry-options,.member-permission-grid,.member-finance-scope-grid,.member-fund-account-grid,.member-account-facts { grid-template-columns: 1fr; }
  .member-permission-editor > header,.member-permission-footer,.member-finance-editor > header,.member-finance-editor > footer,.member-finance-account-heading,.member-account-card > footer { align-items: stretch; flex-direction: column; }
  .fund-account-manager > header { align-items: stretch; flex-direction: column; }
  .fund-account-manager-row { grid-template-columns: 38px minmax(0,1fr) auto; }.fund-account-manager-row > button { grid-column: 2 / -1; justify-self: start; }
  .member-permission-editor > header button { width: 100%; justify-content: center; }
  .member-permission-footer > span { margin-left: 0; }
  .member-account-hero { grid-template-columns: 50px minmax(0,1fr); }
  .member-account-hero > span { width: 50px; height: 50px; border-radius: 14px; }
  .member-account-hero > em { grid-column: 2; justify-self: start; }
  .record-hero.has-customer-identity { grid-template-columns: 48px minmax(0,1fr); }.record-hero.has-customer-identity .record-status { grid-column: 2; justify-self: start; }.record-hero.has-customer-identity .record-copy-button { grid-column: 1 / -1; }.record-customer-logo { width: 48px; height: 48px; border-radius: 13px; }
  .customer-logo-manager { align-items: stretch; flex-direction: column; }.customer-logo-manager > div:last-child { align-items: stretch; flex-direction: column; }.customer-logo-upload,.customer-logo-manager button { width: 100%; }
}

/* Sales statistics: every displayed quantity drills into its originating orders. */
.sales-stat-layout { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:16px; }
.sales-stat-list { display:grid; gap:12px; }
.sales-stat-card { overflow:hidden; border:1px solid var(--line); border-radius:17px; background:#fff; box-shadow:0 8px 24px rgba(28,48,79,.04); }
.sales-stat-card > header { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 16px; background:linear-gradient(90deg,var(--module-soft),#fff 68%); border-bottom:1px solid var(--line); }
.sales-stat-card > header > button { min-width:0; display:flex; align-items:center; gap:10px; color:var(--ink); text-align:left; background:transparent; border:0; }
.sales-stat-card > header > button span { min-width:0; }.sales-stat-card > header small { display:block; color:var(--muted); font-size:.72rem; }.sales-stat-card > header b { display:block; margin-top:3px; font-size:.98rem; }.sales-stat-card > header svg { width:17px; height:17px; color:var(--module-accent); }
.sales-stat-card > header strong { flex:0 0 auto; padding:7px 10px; color:var(--module-accent); background:#fff; border:1px solid color-mix(in srgb,var(--module-accent) 18%,var(--line)); border-radius:999px; font-size:.78rem; }
.sales-stat-number-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:9px; padding:13px 16px 16px; }
.sales-stat-number { min-height:76px; padding:10px 12px; display:grid; grid-template-columns:1fr auto; align-items:end; gap:2px 8px; color:var(--ink); text-align:left; background:#fbfcfe; border:1px solid var(--line); border-radius:13px; transition:.16s ease; }
.sales-stat-number:hover,.sales-stat-number:focus-visible { color:var(--module-accent); background:var(--module-soft); border-color:color-mix(in srgb,var(--module-accent) 48%,var(--line)); transform:translateY(-1px); }
.sales-stat-number small { grid-column:1/-1; color:var(--muted); font-size:.7rem; }.sales-stat-number b { font-size:1.24rem; line-height:1; }.sales-stat-number span { color:var(--muted); font-size:.69rem; }
.sales-stat-number.compact { min-height:54px; min-width:142px; }
.customer-order-product-list { display:grid; }.customer-order-product { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 16px; border-bottom:1px dashed var(--line); }.customer-order-product:last-child { border-bottom:0; }.customer-order-product > span { min-width:0; }.customer-order-product > span small { display:block; color:var(--muted); font-size:.7rem; }.customer-order-product > span b { display:block; margin-top:3px; font-size:.86rem; }
.sales-stat-empty { grid-column:1/-1; margin:0; padding:18px; color:var(--muted); text-align:center; }
.sales-stat-drilldown { display:grid; gap:14px; }.sales-stat-drilldown > header small { color:var(--module-accent); font-weight:750; }.sales-stat-drilldown > header h3 { margin:5px 0 4px; font-size:1.25rem; }.sales-stat-drilldown > header p { margin:0; color:var(--muted); }
.sales-stat-table-wrap { max-height:55vh; overflow:auto; border:1px solid var(--line); border-radius:14px; }.sales-stat-table-wrap table { width:100%; border-collapse:collapse; }.sales-stat-table-wrap th,.sales-stat-table-wrap td { padding:11px 12px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; }.sales-stat-table-wrap th { position:sticky; top:0; z-index:1; color:#62708a; background:#f4f7fb; font-size:.73rem; }.sales-stat-table-wrap td { color:var(--ink); font-size:.8rem; }.sales-stat-table-wrap tr:last-child td { border-bottom:0; }
@media (max-width:1100px) { .sales-stat-layout { grid-template-columns:1fr; } }
@media (max-width:720px) { .sales-stat-card > header,.customer-order-product { align-items:stretch; flex-direction:column; }.sales-stat-card > header strong { align-self:flex-start; }.sales-stat-number-grid { grid-template-columns:1fr 1fr; }.sales-stat-number.compact { width:100%; }.sales-stat-table-wrap th,.sales-stat-table-wrap td { padding:9px 10px; } }

/* 下单产品统计：一行五个权威数量，点击后在本行下方展开来源，不跳离台账。 */
.sales-stat-layout.is-product-order-stat,.sales-stat-layout.is-customer-amount-stat { grid-template-columns:minmax(0,1fr); }
.sales-stat-layout.is-product-order-stat > aside,.sales-stat-layout.is-customer-amount-stat > aside { display:none; }
.sales-product-stat-row { border-radius:14px; box-shadow:none; }
.sales-product-stat-row > header { min-height:60px; padding:12px 16px; background:#fff; }
.sales-product-coverage { flex:0 0 auto; padding:6px 10px; color:#187254; background:#eaf8f2; border:1px solid #ccecdf; border-radius:999px; font-size:.72rem; }
.sales-product-coverage.is-short { color:#a94b2d; background:#fff2ed; border-color:#f3cfc1; }
.sales-product-metric-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border-top:1px solid var(--line); }
.sales-product-metric { position:relative; min-width:0; min-height:92px; padding:13px 36px 12px 15px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:4px; color:var(--ink); text-align:left; background:#fff; border:0; border-right:1px solid var(--line); transition:background-color .16s ease,color .16s ease,box-shadow .16s ease; }
.sales-product-metric:last-child { border-right:0; }
.sales-product-metric span { color:#64728a; font-size:.72rem; font-weight:700; }
.sales-product-metric b { color:#172943; font-size:1.28rem; line-height:1.05; font-variant-numeric:tabular-nums; }
.sales-product-metric small { color:#8a97aa; font-size:.67rem; white-space:nowrap; }
.sales-product-metric svg { position:absolute; right:13px; top:50%; width:15px; height:15px; color:#95a2b5; transform:translateY(-50%) rotate(90deg); transition:transform .16s ease,color .16s ease; }
.sales-product-metric:hover,.sales-product-metric:focus-visible,.sales-product-metric.is-active { z-index:1; color:var(--module-accent); background:color-mix(in srgb,var(--module-soft) 58%,#fff); box-shadow:inset 0 -2px var(--module-accent); }
.sales-product-metric:hover svg,.sales-product-metric:focus-visible svg,.sales-product-metric.is-active svg { color:var(--module-accent); }
.sales-product-metric.is-active svg { transform:translateY(-50%) rotate(-90deg); }
.sales-product-metric.is-unshipped b { color:#b44e30; }
.sales-product-inline-detail { padding:0 16px 16px; overflow:hidden; border-top:1px solid var(--line); background:#f8fafe; animation:sales-product-detail-in .18s ease-out; }
.sales-product-inline-detail > section { padding-top:15px; }
.sales-product-inline-detail > section > header { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.sales-product-inline-detail > section > header small { color:var(--module-accent); font-size:.68rem; font-weight:750; }
.sales-product-inline-detail > section > header h3 { margin:3px 0 0; color:#172943; font-size:.98rem; }
.sales-product-inline-detail > section > header > b { color:#172943; font-size:1.08rem; font-variant-numeric:tabular-nums; }
.sales-product-inline-detail > section > p { margin:8px 0 12px; color:#6d7b90; font-size:.72rem; }
.sales-product-detail-table { overflow:auto; border:1px solid #dde5f0; border-radius:11px; background:#fff; }
.sales-product-detail-table table { width:100%; min-width:760px; border-collapse:collapse; }
.sales-product-detail-table th,.sales-product-detail-table td { padding:10px 12px; border-bottom:1px solid #e8edf4; text-align:left; }
.sales-product-detail-table th { color:#6d7b90; background:#f5f7fb; font-size:.68rem; letter-spacing:.02em; }
.sales-product-detail-table td { color:#293950; font-size:.76rem; }
.sales-product-detail-table tr:last-child td { border-bottom:0; }
.sales-product-detail-table td:last-child,.sales-product-detail-table th:last-child { text-align:right; }
.sales-product-detail-table td button { padding:0; color:#2f6ff2; background:transparent; border:0; font-weight:750; }
.sales-product-detail-table td b,.sales-product-detail-table td small { display:block; }
.sales-product-detail-table td small { margin-top:2px; color:#8a97aa; font-size:.66rem; }
.sales-product-detail-table td strong { color:#172943; font-size:.84rem; font-variant-numeric:tabular-nums; }
.sales-product-detail-status { display:inline-flex; padding:4px 7px; color:#52637b; background:#eef2f7; border-radius:999px; font-size:.67rem; white-space:nowrap; }
@keyframes sales-product-detail-in { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
@media (prefers-reduced-motion:reduce) { .sales-product-inline-detail { animation:none; }.sales-product-metric,.sales-product-metric svg { transition:none; } }
@media (max-width:1100px) { .sales-product-metric-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }.sales-product-metric:nth-child(3) { border-right:0; }.sales-product-metric:nth-child(n+4) { border-top:1px solid var(--line); } }
@media (max-width:680px) { .sales-product-stat-row > header { align-items:flex-start; }.sales-product-metric-grid { grid-template-columns:1fr 1fr; }.sales-product-metric:nth-child(3) { border-right:1px solid var(--line); }.sales-product-metric:nth-child(even) { border-right:0; }.sales-product-metric:nth-child(n+3) { border-top:1px solid var(--line); }.sales-product-metric:last-child { grid-column:1/-1; }.sales-product-inline-detail { padding-inline:10px; } }

/* 客户下单金额：金额是主信息，展开后所有事实单元格均可进入原订单。 */
.customer-order-amount-row { border-radius:14px; box-shadow:none; }
.customer-order-amount-row > header { min-height:60px; padding:12px 16px; background:#fff; }
.customer-order-amount-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:1px solid var(--line); }
.customer-order-amount-metric { position:relative; min-width:0; min-height:94px; padding:14px 42px 13px 16px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:5px; color:#172943; text-align:left; background:#fff; border:0; border-right:1px solid var(--line); transition:background-color .16s ease,box-shadow .16s ease,color .16s ease; }
.customer-order-amount-metric:last-child { border-right:0; }
.customer-order-amount-metric span { color:#64728a; font-size:.72rem; font-weight:750; }
.customer-order-amount-metric b { font-size:1.18rem; line-height:1.1; font-variant-numeric:tabular-nums; }
.customer-order-amount-metric small { color:#8a97aa; font-size:.67rem; }
.customer-order-amount-metric svg { position:absolute; right:15px; top:50%; width:15px; height:15px; color:#95a2b5; transform:translateY(-50%) rotate(90deg); transition:transform .16s ease,color .16s ease; }
.customer-order-amount-metric:hover,.customer-order-amount-metric:focus-visible,.customer-order-amount-metric.is-active { z-index:1; color:var(--module-accent); background:color-mix(in srgb,var(--module-soft) 58%,#fff); box-shadow:inset 0 -2px var(--module-accent); }
.customer-order-amount-metric:hover svg,.customer-order-amount-metric:focus-visible svg,.customer-order-amount-metric.is-active svg { color:var(--module-accent); }
.customer-order-amount-metric.is-active svg { transform:translateY(-50%) rotate(-90deg); }
.customer-order-amount-metric.is-undelivered b { color:#ad4c32; }
.customer-order-amount-detail { padding:0 16px 16px; overflow:hidden; border-top:1px solid var(--line); background:#f8fafe; animation:sales-product-detail-in .18s ease-out; }
.customer-order-amount-detail > section { padding-top:15px; }
.customer-order-amount-detail > section > header { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.customer-order-amount-detail > section > header small { color:var(--module-accent); font-size:.68rem; font-weight:750; }
.customer-order-amount-detail > section > header h3 { margin:3px 0 0; color:#172943; font-size:.98rem; }
.customer-order-amount-detail > section > header > b { color:#172943; font-size:1.08rem; font-variant-numeric:tabular-nums; }
.customer-order-amount-detail > section > p { margin:8px 0 12px; color:#6d7b90; font-size:.72rem; }
.customer-order-amount-table { overflow:auto; border:1px solid #dde5f0; border-radius:11px; background:#fff; }
.customer-order-amount-table table { width:100%; min-width:820px; border-collapse:collapse; table-layout:fixed; }
.customer-order-amount-table th { padding:10px 12px; color:#6d7b90; background:#f5f7fb; border-bottom:1px solid #e8edf4; font-size:.68rem; text-align:left; }
.customer-order-amount-table th.num { text-align:right; }
.customer-order-amount-table td { padding:0; border-bottom:1px solid #e8edf4; }
.customer-order-amount-table tr:last-child td { border-bottom:0; }
.customer-order-amount-table td > button { width:100%; min-height:54px; padding:9px 12px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; color:#293950; text-align:left; background:transparent; border:0; transition:background-color .14s ease,color .14s ease; }
.customer-order-amount-table td.num > button { align-items:flex-end; text-align:right; }
.customer-order-amount-table td > button:hover,.customer-order-amount-table td > button:focus-visible { color:#2f6ff2; background:#f1f5ff; }
.customer-order-amount-table td b,.customer-order-amount-table td strong { color:inherit; font-size:.8rem; font-variant-numeric:tabular-nums; }
.customer-order-amount-table td span { font-size:.76rem; }
.customer-order-amount-table td small { color:#8a97aa; font-size:.66rem; }
.customer-order-delivery-state { display:inline-flex; padding:4px 7px; color:#a64b32; background:#fff0eb; border-radius:999px; font-size:.67rem !important; }
.customer-order-delivery-state.is-delivered { color:#187254; background:#eaf8f2; }
.action-sheet-header .action-return-button { width:auto; min-width:142px; height:38px; padding:0 14px; display:inline-flex; align-items:center; justify-content:center; gap:8px; color:#31547f; background:#fff; border:1px solid #d8e1ed; border-radius:11px; font-size:12px; font-weight:750; white-space:nowrap; box-shadow:0 4px 14px rgba(24,49,83,.06); }
.action-sheet-header .action-return-button svg { width:15px; height:15px; transform:rotate(180deg); }
@media (prefers-reduced-motion:reduce) { .customer-order-amount-detail { animation:none; }.customer-order-amount-metric,.customer-order-amount-metric svg,.customer-order-amount-table td > button { transition:none; } }
@media (max-width:720px) { .customer-order-amount-grid { grid-template-columns:1fr; }.customer-order-amount-metric { min-height:76px; border-right:0; border-bottom:1px solid var(--line); }.customer-order-amount-metric:last-child { border-bottom:0; }.customer-order-amount-detail { padding-inline:10px; }.customer-order-amount-detail > section > header { align-items:flex-start; flex-direction:column; gap:7px; } }

/* 销售业绩综合分析：年度金额是锚点，12 个月台账是核对依据。 */
.sales-performance-workbench { overflow:hidden; }
.sales-performance-list { display:grid; gap:14px; padding:14px; background:#f6f8fb; }
.sales-performance-ledger { overflow:hidden; border:1px solid #dce4ef; border-radius:14px; background:#fff; }
.sales-performance-ledger > header { min-height:68px; padding:14px 17px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid #e5ebf3; }
.sales-performance-ledger > header small,.sales-performance-ledger > header h3,.sales-performance-ledger > header p { display:block; margin:0; }
.sales-performance-ledger > header small { color:var(--module-accent); font-size:.69rem; font-weight:750; }
.sales-performance-ledger > header h3 { margin-top:3px; color:#172943; font-size:1.05rem; }
.sales-performance-ledger > header p { margin-top:3px; color:#7c899c; font-size:.7rem; }
.sales-performance-ledger > header > span { padding:7px 10px; color:#31547f; background:#eef4fb; border-radius:9px; font-size:.74rem; font-weight:800; letter-spacing:.04em; }
.sales-performance-total-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-bottom:1px solid #e5ebf3; }
.sales-performance-total { position:relative; min-width:0; min-height:104px; padding:16px 44px 15px 17px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:5px; color:#172943; text-align:left; background:#fff; border:0; border-right:1px solid #e5ebf3; transition:background-color .16s ease,box-shadow .16s ease; }
.sales-performance-total:last-child { border-right:0; }
.sales-performance-total span { color:#66758b; font-size:.72rem; font-weight:750; }
.sales-performance-total b { overflow:hidden; max-width:100%; font-size:1.25rem; line-height:1.15; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.sales-performance-total small { color:#8a97aa; font-size:.68rem; }
.sales-performance-total svg { position:absolute; right:16px; top:50%; width:15px; height:15px; color:#9aa7b8; transform:translateY(-50%) rotate(90deg); transition:transform .16s ease,color .16s ease; }
.sales-performance-total:not(:disabled):hover,.sales-performance-total:not(:disabled):focus-visible,.sales-performance-total.is-active { z-index:1; background:#f2f7ff; box-shadow:inset 0 -2px var(--module-accent); }
.sales-performance-total:not(:disabled):hover svg,.sales-performance-total:not(:disabled):focus-visible svg,.sales-performance-total.is-active svg { color:var(--module-accent); }
.sales-performance-total.is-active svg { transform:translateY(-50%) rotate(-90deg); }
.sales-performance-total.is-pending b { color:#a94b2d; }
.sales-performance-total:disabled { cursor:default; opacity:.6; }
.sales-performance-month-table { overflow:auto; }
.sales-performance-month-table table { width:100%; min-width:760px; border-collapse:collapse; table-layout:fixed; }
.sales-performance-month-table th,.sales-performance-month-table td { border-bottom:1px solid #e8edf4; }
.sales-performance-month-table thead th { padding:10px 13px; color:#66758b; background:#f8fafd; font-size:.68rem; font-weight:750; text-align:right; }
.sales-performance-month-table thead th:first-child { width:104px; text-align:left; }
.sales-performance-month-table thead small { margin-left:3px; color:#9aa7b8; font-size:.62rem; font-weight:650; }
.sales-performance-month-table tbody tr:last-child > * { border-bottom:0; }
.sales-performance-month-table tbody > tr > th { padding:10px 13px; color:#263851; text-align:left; }
.sales-performance-month-table tbody > tr > th b,.sales-performance-month-table tbody > tr > th small { display:block; }
.sales-performance-month-table tbody > tr > th b { font-size:.79rem; }
.sales-performance-month-table tbody > tr > th small { margin-top:2px; color:#96a2b3; font-size:.61rem; font-weight:500; }
.sales-performance-month-value { position:relative; width:100%; min-height:52px; padding:8px 31px 8px 13px; display:flex; flex-direction:column; align-items:flex-end; justify-content:center; gap:2px; color:#2b3b53; text-align:right; background:transparent; border:0; transition:background-color .14s ease,color .14s ease,box-shadow .14s ease; }
.sales-performance-month-value strong { max-width:100%; overflow:hidden; font-size:.78rem; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.sales-performance-month-value small { color:#98a4b5; font-size:.62rem; }
.sales-performance-month-value > svg { position:absolute; right:12px; top:50%; width:13px; height:13px; color:#9aa7b8; transform:translateY(-50%) rotate(90deg); transition:transform .16s ease,color .16s ease; }
.sales-performance-month-value:not(:disabled):hover,.sales-performance-month-value:not(:disabled):focus-visible,.sales-performance-month-value.is-active { color:#245dc7; background:#f1f6ff; box-shadow:inset 0 -2px var(--module-accent); }
.sales-performance-month-value:not(:disabled):hover > svg,.sales-performance-month-value:not(:disabled):focus-visible > svg,.sales-performance-month-value.is-active > svg { color:var(--module-accent); }
.sales-performance-month-value.is-active > svg { transform:translateY(-50%) rotate(-90deg); }
.sales-performance-month-value.is-pending:not(:disabled) strong { color:#a94b2d; }
.sales-performance-month-value:disabled { cursor:default; color:#9ba7b7; }
.sales-performance-month-value:disabled > svg { display:none; }
.sales-performance-month-table tbody > tr[data-sales-performance-month-row].is-expanded > th { color:#245dc7; background:#f1f6ff; box-shadow:inset 3px 0 var(--module-accent); }
.sales-performance-month-detail-row > td { padding:0; border-bottom:1px solid #dce4ef; }
.sales-performance-month-detail-row .sales-performance-detail { border-top:0; }
.sales-performance-detail { padding:0 17px 17px; border-top:1px solid #dce4ef; background:#f7f9fc; animation:sales-product-detail-in .18s ease-out; }
.sales-performance-detail > section { padding-top:16px; }
.sales-performance-detail > section > header { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.sales-performance-detail > section > header small { color:var(--module-accent); font-size:.68rem; font-weight:750; }
.sales-performance-detail > section > header h3 { margin:3px 0 0; color:#172943; font-size:.98rem; }
.sales-performance-detail > section > header > b { color:#172943; font-size:1.08rem; font-variant-numeric:tabular-nums; }
.sales-performance-detail > section > p { margin:8px 0 12px; color:#6f7d91; font-size:.71rem; }
.sales-performance-detail-table { overflow:auto; border:1px solid #dce4ef; border-radius:11px; background:#fff; }
.sales-performance-detail-table table { width:100%; min-width:780px; border-collapse:collapse; }
.sales-performance-detail-table th,.sales-performance-detail-table td { padding:10px 12px; border-bottom:1px solid #e8edf4; color:#2b3b53; font-size:.74rem; text-align:left; }
.sales-performance-detail-table th { color:#6c7a8f; background:#f5f7fb; font-size:.67rem; }
.sales-performance-detail-table tr:last-child td { border-bottom:0; }
.sales-performance-detail-table th.num,.sales-performance-detail-table td.num { text-align:right; }
.sales-performance-detail-table td b,.sales-performance-detail-table td small { display:block; }
.sales-performance-detail-table td small { margin-top:2px; color:#8d9aad; font-size:.64rem; }
.sales-performance-detail-table td > button { padding:0; color:#2f6ff2; background:transparent; border:0; font-weight:750; }
.sales-performance-empty { padding:24px; color:#68778d; text-align:center; background:#fff; border:1px dashed #d4deeb; border-radius:13px; }
.sales-performance-empty b { color:#273850; }.sales-performance-empty p { margin:5px 0 0; font-size:.75rem; }
@media (prefers-reduced-motion:reduce) { .sales-performance-detail { animation:none; }.sales-performance-total,.sales-performance-total svg,.sales-performance-month-value,.sales-performance-month-value > svg { transition:none; } }
@media (max-width:720px) { .sales-performance-list { padding:10px; }.sales-performance-total-grid { grid-template-columns:1fr; }.sales-performance-total { min-height:78px; border-right:0; border-bottom:1px solid #e5ebf3; }.sales-performance-total:last-child { border-bottom:0; }.sales-performance-detail { padding-inline:10px; }.sales-performance-detail > section > header { align-items:flex-start; flex-direction:column; gap:7px; } }

/* Sales order approval and per-line routing are two separate business decisions. */
.approval-line-summary { display:grid; gap:8px; padding:14px; border:1px solid var(--line); border-radius:14px; background:#fbfcff; }
.approval-line-summary h4 { margin:0 0 2px; color:var(--ink); font-size:.86rem; }
.approval-line-summary > div { display:grid; grid-template-columns:62px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:38px; padding:7px 9px; border:1px solid #e8edf5; border-radius:10px; background:#fff; }
.approval-line-summary b { color:#2f6ff2; font-size:.73rem; }.approval-line-summary span { min-width:0; overflow:hidden; color:#3e4b62; font-size:.78rem; text-overflow:ellipsis; white-space:nowrap; }.approval-line-summary strong { color:#172943; font-size:.8rem; }
.order-line-routing { display:grid; gap:15px; }.order-line-routing > header { display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:12px; padding:15px; border:1px solid #dfe7f2; border-radius:14px; background:linear-gradient(110deg,#f2f5ff,#fff); }
.order-line-routing > header > span { display:grid; place-items:center; width:46px; height:46px; border-radius:13px; color:#fff; background:linear-gradient(135deg,#5066df,#7359ca); box-shadow:0 9px 20px rgba(80,102,223,.2); }.order-line-routing > header svg { width:21px; height:21px; }.order-line-routing > header small,.order-line-routing > header h3,.order-line-routing > header p { display:block; margin:0; }.order-line-routing > header small { color:#718099; font-size:.69rem; }.order-line-routing > header h3 { margin-top:3px; color:#172943; font-size:1.1rem; }.order-line-routing > header p { margin-top:3px; color:#6c7a90; font-size:.76rem; }.order-line-routing > header em { padding:6px 9px; border-radius:99px; color:#4a55ad; background:#e9ecff; font-size:.7rem; font-style:normal; font-weight:750; }
.order-line-routing-list { display:grid; gap:10px; max-height:52vh; overflow:auto; padding-right:3px; }.order-line-routing-list > article { display:grid; gap:10px; padding:13px; border:1px solid #dfe5ee; border-radius:14px; background:#fff; }.order-line-routing-list > article > header { display:grid; grid-template-columns:54px minmax(0,1fr) auto; align-items:center; gap:10px; }.order-line-routing-list > article > header > span { justify-self:start; padding:5px 8px; border-radius:8px; color:#3556bd; background:#edf2ff; font-size:.7rem; font-weight:750; }.order-line-routing-list > article > header b,.order-line-routing-list > article > header small { display:block; }.order-line-routing-list > article > header b { color:#172943; font-size:.82rem; }.order-line-routing-list > article > header small { margin-top:3px; color:#7a879b; font-size:.68rem; }.order-line-routing-list > article > header strong { color:#172943; font-size:.83rem; }
.line-route-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.line-route-options label { cursor:pointer; }.line-route-options input { position:absolute; opacity:0; pointer-events:none; }.line-route-options label > span { display:grid; grid-template-columns:34px minmax(0,1fr); gap:2px 9px; min-height:64px; padding:10px; border:1px solid #e0e6ef; border-radius:11px; background:#fafbfe; transition:.16s ease; }.line-route-options svg { grid-row:1/3; align-self:center; width:20px; height:20px; color:#66799b; }.line-route-options b { align-self:end; color:#263650; font-size:.76rem; }.line-route-options small { color:#7d899d; font-size:.65rem; line-height:1.45; }.line-route-options input:checked + span { border-color:#7181e3; background:#f0f2ff; box-shadow:inset 0 0 0 1px #7181e3,0 6px 18px rgba(80,102,223,.09); }.line-route-options input:checked + span svg,.line-route-options input:checked + span b { color:#4d5fc7; }
@media (max-width:720px) { .order-line-routing > header { grid-template-columns:42px minmax(0,1fr); }.order-line-routing > header em { grid-column:2; justify-self:start; }.line-route-options { grid-template-columns:1fr; }.approval-line-summary > div { grid-template-columns:52px minmax(0,1fr); }.approval-line-summary strong { grid-column:2; } }

/* System sales-order drafts stay editable without entering formal ledgers. */
.order-drafts-modal .action-body { background:#f7f9fc; }
.order-drafts-loading,.order-drafts-empty { min-height:260px; display:grid; place-items:center; align-content:center; gap:10px; color:#607087; text-align:center; }
.order-drafts-loading i { width:28px; height:28px; border:3px solid #d9e3f0; border-top-color:#2f6df6; border-radius:50%; animation:order-drafts-spin .8s linear infinite; }
@keyframes order-drafts-spin { to { transform:rotate(360deg); } }
.order-drafts-list { display:grid; gap:12px; }
.order-drafts-list > header { display:flex; align-items:center; justify-content:space-between; gap:18px; padding-bottom:8px; }
.order-drafts-list > header small,.order-draft-row small { color:#6b7b91; }
.order-drafts-list > header h3 { margin:5px 0 0; }
.order-draft-row { width:100%; display:grid; grid-template-columns:46px minmax(0,1fr) auto; align-items:center; gap:14px; padding:15px; border:1px solid #dbe4ef; border-radius:16px; background:#fff; color:#17243d; text-align:left; transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease; }
.order-draft-row:hover,.order-draft-row:focus-visible { border-color:#7ca7ff; box-shadow:0 10px 25px rgba(35,75,135,.11); transform:translateY(-1px); }
.order-draft-row > span,.system-order-draft-banner > span { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:#315fc9; background:#edf3ff; }
.order-draft-row svg,.system-order-draft-banner svg,.order-drafts-empty svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; }
.order-draft-row div { min-width:0; }
.order-draft-row b,.order-draft-row small,.order-draft-row p { display:block; }
.order-draft-row p { margin:5px 0 0; color:#44536a; }
.order-draft-row em { display:inline-flex; align-items:center; gap:7px; color:#2f67d8; font-style:normal; font-weight:700; white-space:nowrap; }
.order-draft-row em svg { width:16px; height:16px; }
.order-drafts-empty svg { width:36px; height:36px; color:#6f8fc9; }
.order-drafts-empty p { margin:0; }
.system-order-draft-banner { display:flex; align-items:center; gap:12px; margin-bottom:14px; padding:12px 14px; border:1px solid #bfd3fa; border-radius:14px; background:#f2f6ff; }
.system-order-draft-banner.saved { border-color:#b9dfd0; background:#effaf5; }
.system-order-draft-banner.saved > span { color:#087d61; background:#ddf5eb; }
.system-order-draft-banner b,.system-order-draft-banner small { display:block; }
.system-order-draft-banner small { margin-top:3px; color:#5f6f84; }
@media (max-width:720px) { .order-drafts-list > header { align-items:stretch; flex-direction:column; }.order-draft-row { grid-template-columns:42px minmax(0,1fr); }.order-draft-row > em { grid-column:2; } }

/* Business information readability baseline.
   Applies to every formal ledger/workbench, not to decorative hero typography. */
.route-context-bar small { font-size: 9px; line-height: 1.35; }
.route-context-bar b { font-size: 11px; line-height: 1.35; }
.route-context-bar button { font-size: 10px; }
.signature-identity small { font-size: 9px; line-height: 1.35; }
.signature-identity b { font-size: 13px; line-height: 1.35; }
.sig-head small { font-size: 10px; line-height: 1.35; }
.sig-head h2 { font-size: 17px; line-height: 1.3; }
.sig-head button,
.sig-link,
.sig-head-status { font-size: 10px; }
.sig-kpi small { font-size: 10px; line-height: 1.35; }
.sig-kpi b { font-size: 18px; line-height: 1.25; }
.sig-kpi em { font-size: 9px; line-height: 1.4; }
.sig-row { min-height: 58px; padding-block: 12px; }
.sig-row b { font-size: 13px; line-height: 1.35; }
.sig-row small { margin-top: 4px; font-size: 11px; line-height: 1.5; }
.sig-row em { font-size: 10px; line-height: 1.3; }
.module-wayfinding small { font-size: 9.5px; line-height: 1.4; }
.module-wayfinding b { font-size: 11.5px; line-height: 1.4; }
.module-wayfinding-status { font-size: 10px; }
.module-table-head { font-size: 10px; }
.universal-row b { font-size: 12px; line-height: 1.4; }
.universal-row small { font-size: 10px; line-height: 1.45; }
.universal-row em,
.universal-row button { font-size: 10px; }
.customer-directory-toolbar > div small { font-size: 10px; }
.customer-directory-toolbar h2 { font-size: 20px; line-height: 1.3; }
.customer-directory-toolbar p { font-size: 11.5px; line-height: 1.55; }
.customer-directory-toolbar input { font-size: 12px; }
.customer-directory-status { min-height: 34px; font-size: 10.5px; }
.customer-directory-status b { font-size: 11.5px; }
.customer-directory-list .sig-row-button { min-height: 64px; padding: 10px 12px; }
.customer-directory-pagination button,
.customer-directory-pagination span { font-size: 10px; }
.live-module-route small { font-size: 10px; line-height: 1.4; }
.live-module-route h2 { line-height: 1.3; }
.live-module-route p,
.signature-panel > p,
.signature-panel > header + p { font-size: 11.5px; line-height: 1.55; }
.table-empty,
.lane-empty { font-size: 11.5px; line-height: 1.55; }
body.density-compact .sig-row-button { min-height: 54px; padding-top: 7px; padding-bottom: 7px; }

@media (max-width: 720px) {
  .sig-row b { font-size: 12px; }
  .sig-row small { font-size: 10.5px; }
  .customer-directory-list .sig-row-button { min-height: 60px; }
}
.split-ledger-shell{display:grid;gap:18px}
.split-ledger-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.split-ledger-toolbar small{display:block;color:var(--module-accent);font-weight:800;margin-bottom:5px}
.split-ledger-toolbar h2{margin:0;color:#14233d;font-size:22px}
.split-ledger-toolbar p{margin:6px 0 0;color:#65758d;font-size:14px}
.split-ledger-toolbar label{width:min(390px,40%);min-height:44px;border:1px solid #d7e0ed;border-radius:12px;background:#fff;display:flex;align-items:center;gap:9px;padding:0 13px}
.split-ledger-toolbar label svg{width:17px;height:17px;color:#7590b3}
.split-ledger-toolbar input{width:100%;border:0;outline:0;background:transparent;font:inherit;color:#17243c}
.split-ledger-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.split-ledger-expenseClaims,.split-ledger-expenseDetails{grid-template-columns:repeat(3,minmax(0,1fr))}
.split-ledger-section{min-width:0;border:1px solid color-mix(in srgb,var(--module-accent) 20%,#dbe3ee);border-radius:16px;background:color-mix(in srgb,var(--module-soft) 45%,#fff);overflow:hidden}
.split-ledger-section>header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:16px 17px;border-bottom:1px solid #e1e7f0;background:rgba(255,255,255,.72)}
.split-ledger-section h2{margin:0;font-size:18px;color:#182740}
.split-ledger-section p{margin:4px 0 0;color:#6b7990;font-size:13px;line-height:1.5}
.split-ledger-section>header>b{white-space:nowrap;border-radius:999px;padding:5px 9px;background:var(--module-soft);color:var(--module-accent);font-size:12px}
.split-ledger-list{min-height:120px;display:grid;align-content:start}
.split-ledger-row{border-bottom:1px solid #e5eaf2}
.split-ledger-row:last-child{border-bottom:0}
.split-ledger-row[hidden]{display:none}
.split-ledger-row button{width:100%;border:0;background:transparent;display:grid;grid-template-columns:minmax(0,1fr) auto auto 18px;align-items:center;gap:10px;text-align:left;padding:14px 16px;color:#17243c;cursor:pointer}
.split-ledger-row button:hover{background:#fff}
.split-ledger-row span{min-width:0}
.split-ledger-row b{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.split-ledger-row small{display:block;margin-top:4px;color:#718097;font-size:12px;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.split-ledger-row em{font-style:normal;font-size:12px;color:var(--module-accent);background:var(--module-soft);border-radius:999px;padding:5px 8px}
.split-ledger-row strong{font-size:12px;color:#326be9}
.split-ledger-row svg{width:16px;height:16px;color:#326be9}
.split-ledger-row.has-unreview{position:relative}
.split-ledger-row.has-unreview>button[data-record-open]{padding-right:112px}
.split-ledger-row .split-ledger-unreview{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:auto;min-height:34px;padding:0 10px;display:inline-flex;grid-template-columns:none;align-items:center;justify-content:center;gap:6px;border:1px solid #f1b9bf;border-radius:9px;background:#fff8f8;color:#b83b49;font-size:12px;font-weight:750;z-index:1}
.split-ledger-row .split-ledger-unreview:hover{background:#fff0f1;border-color:#dc7e88}
.split-ledger-row .split-ledger-unreview svg{width:14px;height:14px;color:currentColor}
.split-ledger-row .split-ledger-unreview.is-blocked{border-style:dashed;border-color:#d7dee8;color:#728096;background:#f8f9fb}
.split-ledger-row .split-ledger-unreview.is-blocked:hover{border-color:#aeb9c8;color:#4e5e76;background:#f2f4f7}
body[data-theme="dark"] .split-ledger-row .split-ledger-unreview{background:#321f27;border-color:#6c3942;color:#ff9ba7}
body[data-theme="dark"] .split-ledger-row .split-ledger-unreview:hover{background:#41232c;border-color:#a65461}
.split-ledger-row.is-compact button{min-height:58px}
.split-ledger-row.is-compact b{font-size:15px}
.split-ledger-row.has-payable-select{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:stretch}
.payable-select{display:flex;align-items:center;gap:7px;padding:0 0 0 15px;color:#596a82;font-size:12px;font-weight:750;cursor:pointer}
.payable-select input{width:17px;height:17px;accent-color:var(--module-accent)}
.payables-toolbar{display:flex;align-items:end;gap:12px;padding:13px 14px;border:1px solid #dfe6f0;border-radius:14px;background:#f8fafd}
.payables-toolbar label{display:grid;gap:5px;min-width:170px}
.payables-toolbar label span{color:#66768d;font-size:12px;font-weight:750}
.payables-toolbar input{min-height:40px;border:1px solid #d4deeb;border-radius:10px;background:#fff;padding:0 11px;color:#182740;font:inherit}
.payables-toolbar .primary-button{margin-left:auto;min-height:40px}
.split-ledger-empty{padding:34px 16px;text-align:center;color:#8794a8;font-size:13px}
.receipt-batch-history tr.is-reversed td{background:#fff8f8;color:#8b6670}
.receipt-batch-history tr.is-reversed b{text-decoration:line-through;text-decoration-thickness:1px}
.expense-claim-detail{border:1px solid #dfe5ef;border-radius:16px;padding:18px;background:#fbfcfe;display:grid;gap:15px}
.expense-claim-detail>header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}
.expense-claim-detail>header small{display:block;color:#73829a}
.expense-claim-detail>header b{display:block;margin-top:4px;font-size:18px}
.expense-claim-detail>header em{font-style:normal;font-size:18px;font-weight:800;color:#245ecf}
.expense-claim-detail>p{margin:0;color:#53627a}
.expense-flow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0;padding:0;list-style:none}
.expense-flow li{display:flex;gap:9px;align-items:flex-start;border:1px solid #e0e6ef;border-radius:11px;background:#fff;padding:11px}
.expense-flow i{width:9px;height:9px;border-radius:50%;margin-top:4px;background:#cbd3e0}
.expense-flow li.done i{background:#18a87b;box-shadow:0 0 0 4px #e6f8f2}
.expense-flow b,.expense-flow small{display:block}
.expense-flow b{font-size:13px}
.expense-flow small{margin-top:3px;font-size:11px;color:#7b889c}
.expense-evidence-group h4{display:flex;gap:8px;align-items:center;margin:0 0 9px;font-size:14px}
.expense-evidence-group h4 span{font-size:11px;color:#65758d}
.expense-evidence-group>div{display:flex;gap:10px;flex-wrap:wrap}
.expense-evidence-group figure{width:132px;margin:0;border:1px solid #dce3ed;border-radius:11px;background:#fff;overflow:hidden}
.expense-evidence-group figure img{display:block;width:100%;height:88px;object-fit:cover}
.expense-evidence-group figcaption{padding:8px}
.expense-evidence-group figcaption b,.expense-evidence-group figcaption small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.expense-evidence-group figcaption b{font-size:11px}.expense-evidence-group figcaption small{margin-top:3px;font-size:10px;color:#7b889c}
.expense-evidence-group>div>p{color:#8490a3;font-size:12px}
.expense-finance-review{display:grid!important;gap:12px!important;padding:14px!important;border:1px solid #b9cdf4!important;border-radius:13px!important;background:#fff!important}
.expense-finance-review>header{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:16px!important}
.expense-finance-review>header small,.expense-finance-review>header b,.expense-finance-review>header p{display:block}
.expense-finance-review>header small{color:#2d67d2!important;font-size:11px!important;font-weight:750}
.expense-finance-review>header b{margin-top:3px!important;color:#172842!important;font-size:15px!important}
.expense-finance-review>header p{margin:5px 0 0!important;color:#66758c!important;font-size:11px!important;line-height:1.55!important}
.expense-finance-review>header span{flex:none;padding:5px 9px;border-radius:999px;background:#edf4ff;color:#2c64ca;font-size:11px;font-weight:750}
.expense-finance-review-sheet{overflow:auto;border:1px solid #dfe6f0;border-radius:10px}
.expense-finance-review-sheet table{width:100%;min-width:790px;border-collapse:collapse;table-layout:fixed}
.expense-finance-review-sheet th{padding:9px 8px;border-right:1px solid #e2e8f1;border-bottom:1px solid #dce4ef;background:#f3f6fb;color:#54637a;font-size:10px;text-align:left}
.expense-finance-review-sheet td{padding:7px 8px;border-right:1px solid #e7ebf2;border-bottom:1px solid #e7ebf2;color:#27364d;font-size:11px;line-height:1.45}
.expense-finance-review-sheet th:nth-child(1){width:36px}.expense-finance-review-sheet th:nth-child(2){width:155px}.expense-finance-review-sheet th:nth-child(3){width:110px}.expense-finance-review-sheet th:nth-child(4){width:100px}.expense-finance-review-sheet th:nth-child(5){width:125px}
.expense-finance-review-sheet select{width:100%;min-height:36px;padding:0 30px 0 10px;border:1px solid #9eb9ed;border-radius:8px;background:#f8fbff;color:#183765;font:inherit;font-weight:750}
.expense-finance-review-sheet select:focus{outline:3px solid rgba(45,103,210,.15);border-color:#2d67d2}
.expense-finance-review-note{display:flex!important;align-items:center;gap:7px;margin:0!important;color:#46617e!important;font-size:10px!important}
.expense-finance-review-note svg{width:15px;height:15px;flex:none;color:#1b8f70}
.expense-attachment-picker{margin-top:14px;border:1px dashed #a9b9d1;border-radius:14px;padding:14px;background:#f8fbff}
.expense-attachment-picker>header{display:flex;justify-content:space-between;align-items:center;gap:14px}
.expense-attachment-picker small,.expense-attachment-picker b,.expense-attachment-picker p{display:block;margin:0}
.expense-attachment-picker b{margin-top:2px}.expense-attachment-picker p{margin-top:3px;color:#728096;font-size:12px}
.expense-attachment-picker label{display:flex;align-items:center;gap:7px;border:1px solid #b9c8dd;border-radius:10px;background:#fff;padding:9px 12px;color:#285fc4;font-weight:750;cursor:pointer}
.expense-attachment-picker label svg{width:16px;height:16px}.expense-attachment-picker input{display:none}
.expense-attachment-picker>[data-expense-attachment-list]{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}
.expense-attachment-picker figure{position:relative;width:112px;margin:0;border:1px solid #d8e0ec;border-radius:10px;background:#fff;overflow:hidden}
.expense-attachment-picker figure img{display:block;width:100%;height:72px;object-fit:cover}
.expense-attachment-picker figcaption{padding:6px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.expense-attachment-picker figure button{position:absolute;top:4px;right:4px;width:22px;height:22px;border:0;border-radius:50%;background:rgba(20,30,48,.78);color:#fff;cursor:pointer}
.expense-attachment-picker>[data-expense-attachment-list]>p{color:#8490a3;font-size:12px}
@media(max-width:1100px){.split-ledger-expenseClaims,.split-ledger-expenseDetails{grid-template-columns:1fr}.expense-flow{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.split-ledger-toolbar{display:grid}.split-ledger-toolbar label{width:100%}.split-ledger-grid{grid-template-columns:1fr}.payables-toolbar{display:grid}.payables-toolbar label{min-width:0}.payables-toolbar .primary-button{margin-left:0}.expense-flow{grid-template-columns:1fr}.expense-finance-review>header{display:grid!important}.expense-finance-review>header span{justify-self:start}}

/* Purchase statistics use the real purchase ledger and drill into source orders. */
.purchase-stat-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.purchase-stat-panel{min-width:0}
.purchase-stat-toolbar{display:grid;gap:18px;margin-bottom:14px}
.purchase-stat-toolbar small{display:block;color:var(--module-accent);font-size:11px;font-weight:800}
.purchase-stat-toolbar h2{margin:5px 0 4px;color:#16243c;font-size:22px}
.purchase-stat-toolbar p{max-width:720px;margin:0;color:#65758d;font-size:13px;line-height:1.55}
.purchase-stat-filter-bar{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr))auto;align-items:end;gap:10px;padding-top:16px;border-top:1px solid #e6ebf2}
.purchase-stat-filter-bar label>span:first-child{display:block;margin-bottom:6px;color:#55667e;font-size:11px;font-weight:800}
.purchase-stat-search{display:flex;align-items:center;gap:8px;padding:0 11px}
.purchase-stat-search{width:100%;min-height:42px;box-sizing:border-box;border:1px solid #d8e1ed;border-radius:11px;background:#fff;color:#192942;font:inherit;transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease}
.purchase-stat-search svg{width:16px;height:16px;color:#7790b1}
.purchase-stat-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;font:inherit}
.purchase-stat-search:focus-within{border-color:var(--module-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--module-accent) 14%,transparent)}
.purchase-stat-search.is-date input{color:#33445c}
.purchase-stat-filter-reset{min-height:42px;padding-inline:14px;white-space:nowrap}
.purchase-stat-filter-reset:disabled{opacity:.45;cursor:not-allowed;transform:none;box-shadow:none}
.purchase-stat-list{display:grid;border:1px solid #dfe6f0;border-radius:15px;overflow:hidden;background:#fff}
.purchase-stat-row{display:grid;grid-template-columns:minmax(260px,1fr)minmax(180px,.55fr)220px;align-items:center;gap:14px;min-height:76px;padding:11px 13px;border-bottom:1px solid #e5eaf2}
.purchase-stat-row:last-child{border-bottom:0}
.purchase-stat-row:hover{background:color-mix(in srgb,var(--module-soft) 42%,#fff)}
.purchase-stat-identity{min-width:0;display:flex;align-items:center;gap:10px;border:0;background:transparent;color:#182740;text-align:left}
.purchase-stat-identity span{min-width:0}.purchase-stat-identity small,.purchase-stat-identity b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.purchase-stat-identity small{color:#718098;font-size:11px}.purchase-stat-identity b{margin-top:4px;font-size:14px}
.purchase-stat-identity svg{width:16px;height:16px;color:var(--module-accent)}
.purchase-stat-secondary{color:#607089;font-size:12px}
.purchase-stat-value{display:grid;grid-template-columns:1fr auto;gap:3px 8px;min-height:54px;padding:8px 11px;border:1px solid color-mix(in srgb,var(--module-accent) 22%,#dce4ef);border-radius:11px;background:var(--module-soft);color:#172842;text-align:left}
.purchase-stat-value small{font-size:10px;color:#6d7c92}.purchase-stat-value b{grid-column:1/-1;font-size:15px}.purchase-stat-value span{grid-column:1/-1;color:var(--module-accent);font-size:10px;font-weight:750}
.purchase-stat-value:hover,.purchase-stat-value:focus-visible{border-color:var(--module-accent);box-shadow:0 7px 18px color-mix(in srgb,var(--module-accent) 14%,transparent)}
.supplier-bill-layout{display:grid;min-width:0}
.supplier-bill-panel{min-width:0}
.supplier-bill-toolbar{display:flex;align-items:end;justify-content:space-between;gap:24px;padding-bottom:16px;border-bottom:1px solid #e6ebf2}
.supplier-bill-toolbar>div{min-width:0}.supplier-bill-toolbar>div>small{display:block;color:var(--module-accent);font-size:11px;font-weight:800}.supplier-bill-toolbar h2{margin:5px 0 4px;color:#16243c;font-size:22px}.supplier-bill-toolbar p{max-width:760px;margin:0;color:#65758d;font-size:13px;line-height:1.55}
.supplier-bill-toolbar .purchase-stat-search{flex:0 1 330px;min-width:250px}
.supplier-bill-separation-note{display:flex;align-items:center;gap:11px;margin:14px 0;padding:12px 14px;border:1px solid color-mix(in srgb,var(--module-accent) 22%,#dfe7f0);border-radius:12px;background:var(--module-soft);color:#36465e}
.supplier-bill-separation-note>svg{flex:none;width:20px;height:20px;color:var(--module-accent)}.supplier-bill-separation-note span,.supplier-bill-separation-note b,.supplier-bill-separation-note small{display:block}.supplier-bill-separation-note b{font-size:13px}.supplier-bill-separation-note small{margin-top:2px;color:#687990;font-size:11px}
.supplier-bill-list{display:grid;gap:10px}
.supplier-bill-row{min-width:0;border:1px solid #dfe6f0;border-radius:14px;background:#fff;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease}
.supplier-bill-row.is-expanded{border-color:color-mix(in srgb,var(--module-accent) 35%,#dfe6f0);box-shadow:0 10px 28px rgba(31,51,78,.08)}
.supplier-bill-summary{display:grid;grid-template-columns:minmax(240px,1.25fr)minmax(110px,.45fr)minmax(100px,.4fr)minmax(210px,.72fr)24px;align-items:center;gap:18px;width:100%;min-height:78px;padding:14px 16px;border:0;background:#fff;color:#182740;text-align:left}
.supplier-bill-summary:hover,.supplier-bill-summary:focus-visible{background:color-mix(in srgb,var(--module-soft) 46%,#fff)}
.supplier-bill-summary>span{min-width:0}.supplier-bill-summary small,.supplier-bill-summary b{display:block}.supplier-bill-summary small{color:#728198;font-size:10px}.supplier-bill-summary b{margin-top:4px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.supplier-bill-summary>svg{width:18px;height:18px;color:var(--module-accent);transform:rotate(90deg);transition:transform .18s ease}.supplier-bill-summary[aria-expanded="true"]>svg{transform:rotate(-90deg)}
.supplier-bill-supplier b{font-size:15px}.supplier-bill-total{text-align:right}.supplier-bill-total b{color:#a9531e;font-size:16px;font-variant-numeric:tabular-nums}
.supplier-bill-orders{border-top:1px solid #e4eaf2;background:#fbfcfe}.supplier-bill-orders[hidden]{display:none}.supplier-bill-orders>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px}.supplier-bill-orders>header small,.supplier-bill-orders>header b{display:block}.supplier-bill-orders>header small{color:#79879a;font-size:10px}.supplier-bill-orders>header b{margin-top:3px;font-size:13px}.supplier-bill-orders>header>span{padding:6px 10px;border-radius:999px;background:#edf2f8;color:#66768d;font-size:11px;font-weight:750}
.supplier-bill-table-wrap{width:100%;overflow:auto;border-block:1px solid #e4eaf2;background:#fff}.supplier-bill-table-wrap table{width:100%;min-width:900px;border-collapse:collapse}.supplier-bill-table-wrap th{padding:9px 12px;background:#f6f8fb;color:#6c7c92;font-size:10px;text-align:left;white-space:nowrap}.supplier-bill-table-wrap td{padding:12px;border-top:1px solid #e8edf3;color:#33445c;font-size:12px;vertical-align:middle}.supplier-bill-table-wrap tbody tr:first-child td{border-top:0}.supplier-bill-table-wrap tbody tr:hover td{background:#fffaf6}.supplier-bill-select{width:48px;text-align:center}.supplier-bill-select input{width:17px;height:17px;accent-color:var(--module-accent)}.supplier-bill-products{display:block;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.supplier-bill-amount{font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.supplier-bill-state{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}.supplier-bill-state.is-requested{background:#e8f7f0;color:#177659}.supplier-bill-state.is-pending{background:#fff1e5;color:#a9531e}.supplier-bill-state.is-pending-review{background:#eef1f5;color:#69788d}.supplier-bill-request-meta{display:block;margin-top:4px;color:#7b899c;font-size:9px;white-space:nowrap}
.supplier-bill-orders>footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 16px}.supplier-bill-orders>footer p{display:flex;align-items:flex-start;gap:8px;max-width:720px;margin:0;color:#697990;font-size:11px;line-height:1.5}.supplier-bill-orders>footer p svg{flex:none;width:16px;height:16px;margin-top:1px;color:#1d8867}.supplier-bill-orders>footer .primary-button{flex:none;min-height:40px}.supplier-bill-orders>footer .primary-button:disabled{opacity:.46;cursor:not-allowed;transform:none;box-shadow:none}
.drilldown-order-link{border:0;background:transparent;color:#2f6eea;font:inherit;font-weight:750;text-decoration:underline;text-underline-offset:3px}

/* Accounting-voucher detail mirrors the printable debit/credit document. */
.accounting-voucher-preview{display:grid;gap:14px;margin-bottom:14px;padding:17px;border:1px solid #d9e3ed;border-radius:16px;background:#fbfdff}
.accounting-voucher-preview>header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}
.accounting-voucher-preview>header small,.accounting-voucher-preview>header h3,.accounting-voucher-preview>header p{display:block;margin:0}
.accounting-voucher-preview>header small{color:#697991;font-size:11px}.accounting-voucher-preview>header h3{margin-top:4px;color:#172943;font-size:20px}.accounting-voucher-preview>header p{margin-top:4px;color:#728197;font-size:12px}
.accounting-voucher-preview>header>span{border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800}
.accounting-voucher-preview>header>span.pending{color:#9a641d;background:#fff4d9}.accounting-voucher-preview>header>span.approved{color:#08775e;background:#e7f7f1}.accounting-voucher-preview>header>span.rejected{color:#b83449;background:#fdecef}
.voucher-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #dfe6ef;border-radius:12px;overflow:hidden}
.voucher-entry-grid>span{padding:11px 12px;border-right:1px solid #e3e8f0;border-bottom:1px solid #e3e8f0;background:#fff}.voucher-entry-grid>span:nth-child(2n){border-right:0}.voucher-entry-grid>span:nth-last-child(-n+2){border-bottom:0}
.voucher-entry-grid small,.voucher-entry-grid b,.voucher-signatures small,.voucher-signatures b{display:block}.voucher-entry-grid small,.voucher-signatures small{color:#748299;font-size:10px}.voucher-entry-grid b{margin-top:4px;color:#1b2b43;font-size:13px}
.voucher-signatures{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.voucher-signatures span{padding:9px 10px;border-top:1px solid #b8c5d5}.voucher-signatures b{margin-top:4px;font-size:11px;color:#253651}
.voucher-review-note{margin:0;padding:10px 12px;border-radius:10px;background:#fff6e8;color:#6c512a;font-size:12px}
.voucher-print-link{justify-self:start;display:flex;align-items:center;gap:8px;border:1px solid #b9c9dc;border-radius:10px;background:#fff;padding:9px 12px;color:#285eaf;font-weight:750}.voucher-print-link svg{width:17px;height:17px}
@media(max-width:1100px){.purchase-stat-filter-bar{grid-template-columns:repeat(2,minmax(220px,1fr))}.purchase-stat-filter-reset{justify-self:start}.supplier-bill-summary{grid-template-columns:minmax(220px,1fr)repeat(2,minmax(90px,.4fr))minmax(180px,.7fr)24px;gap:12px}}
@media(max-width:760px){.purchase-stat-filter-bar{grid-template-columns:1fr}.purchase-stat-filter-reset{width:100%}.purchase-stat-row{grid-template-columns:1fr}.purchase-stat-secondary{margin-top:-6px}.supplier-bill-toolbar{align-items:stretch;flex-direction:column}.supplier-bill-toolbar .purchase-stat-search{flex:auto;min-width:0}.supplier-bill-summary{grid-template-columns:1fr auto;padding:13px}.supplier-bill-summary>span:not(.supplier-bill-supplier):not(.supplier-bill-total){display:none}.supplier-bill-total{grid-column:1;text-align:left}.supplier-bill-summary>svg{grid-column:2;grid-row:1/3}.supplier-bill-orders>footer{align-items:stretch;flex-direction:column}.supplier-bill-orders>footer .primary-button{width:100%}.voucher-entry-grid,.voucher-signatures{grid-template-columns:1fr}.voucher-entry-grid>span{border-right:0}.voucher-entry-grid>span:nth-last-child(-n+2){border-bottom:1px solid #e3e8f0}.voucher-entry-grid>span:last-child{border-bottom:0}}

/* Dense material-entry rows keep codes, names and specifications visible without wasting the workspace. */
.business-line.purchase-line.is-material-record{grid-template-columns:minmax(140px,1fr) minmax(125px,.85fr) minmax(155px,1.1fr) 82px 106px minmax(140px,1fr) 36px}
.split-ledger-accountingVouchers,.split-ledger-inputInvoices{grid-template-columns:repeat(2,minmax(0,1fr))}
.split-ledger-inputInvoices .split-ledger-section:first-child{grid-column:1/-1}

/* 会计月结：预检、过账、损益结转和报表始终按人工确认的独立步骤呈现。 */
.accounting-close-workspace{display:grid;gap:16px;scroll-margin-top:82px}
.accounting-close-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:22px 24px;border:1px solid #dbe5f0;border-radius:18px;background:linear-gradient(135deg,#fff 35%,#f4f8fc);box-shadow:0 12px 32px rgba(34,67,104,.06)}
.accounting-close-header small{display:block;color:#2e5f91;font-size:11px;font-weight:850;letter-spacing:.06em}.accounting-close-header h2{margin:5px 0 6px;color:#15263d;font-size:23px}.accounting-close-header p{max-width:760px;margin:0;color:#62748b;font-size:13px;line-height:1.65}
.accounting-period-control{display:grid;grid-template-columns:auto auto;align-items:end;gap:6px 9px;flex:none}.accounting-period-control label{grid-column:1/-1;color:#60738d;font-size:11px;font-weight:800}.accounting-period-control input{min-width:154px;height:42px;padding:0 12px;border:1px solid #cdd9e8;border-radius:11px;background:#fff;color:#1b2d45;font:inherit;font-weight:750}.accounting-period-control button{height:42px;white-space:nowrap}
.accounting-close-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0;padding:0;border:1px solid #dce5ef;border-radius:16px;background:#fff;list-style:none;overflow:hidden}
.accounting-close-steps li{position:relative;display:grid;grid-template-columns:31px minmax(0,1fr);gap:10px;align-items:center;min-width:0;padding:15px 17px;border-right:1px solid #e4eaf2}.accounting-close-steps li:last-child{border-right:0}.accounting-close-steps li>i{display:grid;width:29px;height:29px;place-items:center;border:1px solid #cfdae8;border-radius:9px;color:#6f8095;background:#f7f9fc;font-size:12px;font-style:normal;font-weight:850}.accounting-close-steps span{display:flex;min-width:0;flex-direction:column;gap:2px}.accounting-close-steps b{color:#26374e;font-size:12px}.accounting-close-steps small{color:#7c8b9f;font-size:10px;line-height:1.4}.accounting-close-steps em{grid-column:2;justify-self:start;border-radius:999px;padding:3px 7px;color:#6e7e93;background:#f2f5f9;font-size:9px;font-style:normal;font-weight:800}.accounting-close-steps li.is-current{background:#f3f7fc}.accounting-close-steps li.is-current>i{border-color:#2e5f91;color:#fff;background:#2e5f91;box-shadow:0 6px 14px rgba(46,95,145,.2)}.accounting-close-steps li.is-current em{color:#2e5f91;background:#e5eef8}.accounting-close-steps li.is-complete>i{border-color:#188169;color:#fff;background:#188169}.accounting-close-steps li.is-complete em{color:#08775e;background:#e5f5ef}
.accounting-close-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(330px,.65fr);gap:16px}.accounting-precheck-panel,.accounting-report-panel,.accounting-run-history{min-width:0;padding:20px!important}.accounting-precheck-panel>header,.accounting-report-panel>header,.accounting-run-history>header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.accounting-precheck-panel>header small,.accounting-report-panel>header small,.accounting-run-history>header small{display:block;color:#2e5f91;font-size:10px;font-weight:850;letter-spacing:.055em}.accounting-precheck-panel>header h3,.accounting-report-panel>header h3,.accounting-run-history>header h3{margin:4px 0 0;color:#16283f;font-size:18px}.accounting-precheck-panel>header p,.accounting-report-panel>header p{margin:5px 0 0;color:#6b7d94;font-size:11px;line-height:1.55}
.accounting-period-badge{flex:none;border-radius:999px;padding:6px 10px;color:#52667f;background:#edf2f7;font-size:10px;font-weight:850}.accounting-period-badge.is-open{color:#85601e;background:#fff2d7}.accounting-period-badge.is-closing{color:#7650a7;background:#f2eafb}.accounting-period-badge.is-closed{color:#08755e;background:#e3f5ee}.accounting-period-badge.is-error{color:#b2384b;background:#fcebee}.accounting-period-badge.is-loading{animation:accountingPulse 1.2s ease-in-out infinite}
.accounting-close-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:17px 0}.accounting-close-metrics>span{display:flex;min-width:0;flex-direction:column;padding:12px;border:1px solid #dfe7f1;border-radius:12px;background:#f9fbfd}.accounting-close-metrics small{color:#73849a;font-size:9px}.accounting-close-metrics b{margin:4px 0 2px;color:#18304d;font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.accounting-close-metrics em{color:#8291a5;font-size:9px;font-style:normal}
.accounting-precheck-result{border:1px solid #dce5ef;border-radius:14px;background:#fbfcfe;overflow:hidden}.accounting-precheck-result>header{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #e4eaf1}.accounting-precheck-result>header>span{display:grid;width:28px;height:28px;place-items:center;border-radius:9px;color:#2e5f91;background:#eaf1f8}.accounting-precheck-result>header svg{width:15px;height:15px}.accounting-precheck-result>header div{display:flex;flex-direction:column;gap:2px}.accounting-precheck-result>header small{color:#77879a;font-size:9px}.accounting-precheck-result>header b{color:#24364c;font-size:12px}.accounting-precheck-result ul{display:grid;gap:0;margin:0;padding:0;list-style:none}.accounting-precheck-result li{display:flex;align-items:flex-start;gap:9px;padding:10px 14px;border-bottom:1px solid #edf1f5;color:#a14453}.accounting-precheck-result li:last-child{border-bottom:0}.accounting-precheck-result li>svg{flex:none;width:14px;height:14px;margin-top:2px}.accounting-precheck-result li>span{display:flex;min-width:0;flex-direction:column;gap:2px}.accounting-precheck-result li b{font-size:10.5px}.accounting-precheck-result li small{color:#8d7180;font-size:9px;line-height:1.45}.accounting-precheck-result li.is-clear{color:#10765f}.accounting-precheck-result li.is-clear small{color:#718b83}.accounting-precheck-result li.is-loading{color:#6f8096;font-size:10px}
.accounting-close-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:15px}.accounting-close-actions button{min-height:42px}.accounting-close-actions button[hidden]{display:none}.accounting-close-actions button[aria-busy="true"]{cursor:progress}.accounting-close-safety{display:flex;align-items:flex-start;gap:8px;margin:12px 0 0;color:#6f8197;font-size:10px;line-height:1.55}.accounting-close-safety svg{flex:none;width:14px;height:14px;margin-top:1px;color:#2e7b69}
.accounting-report-panel>header>span{display:grid;width:42px;height:42px;place-items:center;border-radius:13px;color:#fff;background:#2e5f91;box-shadow:0 8px 18px rgba(46,95,145,.2)}.accounting-report-panel>header>span svg{width:20px;height:20px}.accounting-report-grid{display:grid;gap:8px;margin-top:15px}.accounting-report-card{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center;width:100%;min-height:60px;padding:9px 10px;border:1px solid #dce5ef;border-radius:12px;color:#21354e;background:#fff;text-align:left;cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.accounting-report-card:hover:not(:disabled){border-color:#9fb8d2;box-shadow:0 8px 18px rgba(35,73,112,.08);transform:translateY(-1px)}.accounting-report-card:focus-visible{outline:3px solid rgba(46,95,145,.22);outline-offset:2px}.accounting-report-card:disabled{cursor:not-allowed;opacity:.5}.accounting-report-card>span{display:grid;width:34px;height:34px;place-items:center;border-radius:10px;color:#2e5f91;background:#eaf1f8}.accounting-report-card>span svg{width:17px;height:17px}.accounting-report-card>div{display:flex;min-width:0;flex-direction:column;gap:2px}.accounting-report-card b{font-size:11px}.accounting-report-card small{color:#7a899d;font-size:9px;line-height:1.4}.accounting-report-card em{display:flex;align-items:center;gap:4px;color:#3970a8;font-size:9px;font-style:normal;font-weight:850}.accounting-report-card em svg{width:12px;height:12px}.accounting-report-source{display:flex;align-items:flex-start;gap:8px;margin:12px 0 0;padding-top:11px;border-top:1px solid #e7ecf2;color:#78899e;font-size:9px;line-height:1.55}.accounting-report-source i{flex:none;width:7px;height:7px;margin-top:3px;border-radius:50%;background:#168169;box-shadow:0 0 0 4px #e6f4ef}
.accounting-run-history>header>span{color:#6d7f95;font-size:10px;font-weight:800}.accounting-run-history>[data-accounting-runs]{display:grid;gap:0;margin-top:12px;border:1px solid #e1e8f0;border-radius:12px;overflow:hidden}.accounting-run-history>[data-accounting-runs]>p{margin:0;padding:16px;color:#7a899b;font-size:10px}.accounting-run-history article{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #e8edf3}.accounting-run-history article:last-child{border-bottom:0}.accounting-run-history article>span{display:grid;width:27px;height:27px;place-items:center;border-radius:8px;color:#168069;background:#e6f4ef}.accounting-run-history article>span.failed{color:#b23a4c;background:#fcebed}.accounting-run-history article svg{width:13px;height:13px}.accounting-run-history article>div{display:flex;min-width:0;flex-direction:column;gap:2px}.accounting-run-history article b{color:#24364c;font-size:10.5px}.accounting-run-history article small{color:#7b8b9f;font-size:9px}.accounting-run-history article em{color:#5f7188;font-size:9px;font-style:normal}
.accounting-report-modal .action-dialog{width:min(1180px,calc(100vw - 34px))}.accounting-report-modal .action-body{overflow:auto}.accounting-report-loading{display:grid;min-height:260px;place-items:center;align-content:center;gap:8px;text-align:center}.accounting-report-loading i{width:34px;height:34px;border:3px solid #d9e4ef;border-top-color:#2e5f91;border-radius:50%;animation:accountingSpin .85s linear infinite}.accounting-report-loading b{color:#22364f;font-size:14px}.accounting-report-loading p{margin:0;color:#718198;font-size:11px}
.accounting-report-view{display:grid;gap:14px}.accounting-report-view>header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:13px;border-bottom:1px solid #e1e8f0}.accounting-report-view>header small{color:#2e5f91;font-size:10px;font-weight:850}.accounting-report-view>header h3{margin:4px 0;color:#162940;font-size:21px}.accounting-report-view>header p{margin:0;color:#6c7d92;font-size:10px}.accounting-report-view>header>span{flex:none;border-radius:999px;padding:6px 10px;font-size:10px;font-weight:850}.accounting-report-view>header>span.is-complete{color:#08745d;background:#e5f5ef}.accounting-report-view>header>span.is-ready{color:#84601c;background:#fff2d8}.accounting-report-view>header>span.is-incomplete{color:#af384b;background:#fcebee}.accounting-report-draft-note{display:flex;align-items:flex-start;gap:8px;margin:0;padding:10px 12px;border:1px solid #eed9a9;border-radius:10px;color:#7b5a19;background:#fff8e9;font-size:10px;line-height:1.5}.accounting-report-draft-note svg{flex:none;width:14px;height:14px}
.accounting-report-issues{border:1px solid #ead9dc;border-radius:12px;overflow:hidden}.accounting-report-issues>header{display:flex;align-items:center;gap:7px;padding:9px 11px;color:#9a3b4c;background:#fdf3f5}.accounting-report-issues>header svg{width:14px;height:14px}.accounting-report-issues>header b{font-size:10px}.accounting-report-issues ul{margin:0;padding:0;list-style:none}.accounting-report-issues li{display:flex;justify-content:space-between;gap:14px;padding:8px 11px;border-top:1px solid #f0e5e7;color:#713e47;font-size:9.5px}.accounting-report-issues li small{color:#90737a;font-size:8.5px}
.accounting-detail-ledgers,.accounting-statement-sections{display:grid;gap:14px}.accounting-detail-ledgers>section,.accounting-statement-section{border:1px solid #dfe7f0;border-radius:12px;overflow:hidden}.accounting-detail-ledgers>section>header,.accounting-statement-section>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#f6f9fc}.accounting-detail-ledgers h4,.accounting-statement-section h4{margin:2px 0 0;color:#21354e;font-size:12px}.accounting-detail-ledgers small{color:#627b97;font-size:9px}.accounting-detail-ledgers>section>header>span,.accounting-statement-section>header>span{color:#6a7c92;font-size:9px}.accounting-report-table{max-width:100%;overflow:auto}.accounting-report-table table,.voucher-lines-table table{width:100%;border-collapse:collapse;white-space:nowrap}.accounting-report-table th,.accounting-report-table td,.voucher-lines-table th,.voucher-lines-table td{padding:8px 10px;border-bottom:1px solid #e7ecf2;color:#34475f;font-size:9.5px;text-align:right}.accounting-report-table th,.voucher-lines-table th{color:#64768d;background:#fbfcfe;font-size:8.5px;font-weight:850}.accounting-report-table th:first-child,.accounting-report-table td:first-child,.accounting-report-table th:nth-child(2),.accounting-report-table td:nth-child(2),.accounting-report-table th:nth-child(3),.accounting-report-table td:nth-child(3),.voucher-lines-table th:nth-child(-n+4),.voucher-lines-table td:nth-child(-n+4){text-align:left}.accounting-report-table tbody tr:last-child td,.voucher-lines-table tbody tr:last-child td{border-bottom:0}.accounting-report-table td b{display:block;color:#21344c}.accounting-report-table td small{display:block;margin-top:2px;color:#7c8b9e;font-size:8px}.accounting-report-empty{padding:36px 18px;border:1px dashed #ccd8e5;border-radius:12px;color:#76879b;text-align:center;font-size:11px}.accounting-statement-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.accounting-statement-summary span{display:flex;min-width:0;flex-direction:column;padding:11px;border:1px solid #dfe7ef;border-radius:11px;background:#f8fafc}.accounting-statement-summary small{color:#78889b;font-size:8.5px}.accounting-statement-summary b{margin-top:4px;color:#1d354f;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.voucher-lines-table{max-width:100%;overflow:auto;border:1px solid #dce4ed;border-radius:12px}.voucher-header-facts{grid-template-columns:repeat(3,minmax(0,1fr))}.voucher-legacy-lines{grid-template-columns:repeat(2,minmax(0,1fr))}
@keyframes accountingPulse{50%{opacity:.55}}@keyframes accountingSpin{to{transform:rotate(360deg)}}
@media(max-width:1180px){.accounting-close-layout{grid-template-columns:1fr}.accounting-report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.accounting-close-header{align-items:stretch;flex-direction:column}.accounting-period-control{align-self:stretch;grid-template-columns:minmax(0,1fr) auto}.accounting-close-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-close-steps li:nth-child(2){border-right:0}.accounting-close-steps li:nth-child(-n+2){border-bottom:1px solid #e4eaf2}.accounting-close-metrics,.accounting-statement-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.accounting-close-header{padding:17px}.accounting-period-control{grid-template-columns:1fr}.accounting-period-control label{grid-column:auto}.accounting-period-control input{width:100%}.accounting-close-steps{grid-template-columns:1fr}.accounting-close-steps li,.accounting-close-steps li:nth-child(2){border-right:0;border-bottom:1px solid #e4eaf2}.accounting-close-steps li:last-child{border-bottom:0}.accounting-close-metrics,.accounting-report-grid,.accounting-statement-summary{grid-template-columns:1fr}.accounting-close-actions{display:grid}.accounting-close-actions button{width:100%}.accounting-report-view>header,.accounting-report-issues li{align-items:stretch;flex-direction:column}.voucher-header-facts,.voucher-legacy-lines{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.accounting-period-badge.is-loading,.accounting-report-loading i{animation:none}.accounting-report-card{transition:none}.accounting-report-card:hover:not(:disabled){transform:none}}
@media(forced-colors:active){.accounting-close-steps li.is-current>i,.accounting-close-steps li.is-complete>i,.accounting-report-panel>header>span{border:1px solid ButtonText}.accounting-report-card:focus-visible{outline:2px solid Highlight}}
.voucher-print-link.is-edit{border-color:#a9bfe1;background:#edf4ff;color:#245fc8;cursor:pointer}
.voucher-entry-grid>span:nth-last-child(-n+2){border-bottom:1px solid #e3e8f0}
.voucher-entry-grid>span:last-child{border-bottom:0}
@media(max-width:1100px){.business-line.purchase-line.is-material-record{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.business-line.purchase-line.is-material-record{grid-template-columns:1fr}}

/* Production material planning is an operational ledger, not a generic module card. */
.material-plan-shell{display:grid;gap:15px;padding:18px}
.material-plan-header{display:flex;align-items:flex-start;justify-content:space-between;gap:22px}
.material-plan-header small,.material-plan-header h2,.material-plan-header p{display:block;margin:0}
.material-plan-header small{color:var(--module-accent);font-size:11px;font-weight:800}
.material-plan-header h2{margin-top:5px;color:#162842;font-size:22px}
.material-plan-header p{max-width:760px;margin-top:5px;color:#60718a;font-size:13px;line-height:1.55}
.material-plan-actions{display:flex;align-items:center;gap:9px;flex:none}
.material-plan-actions button{min-height:42px;border-radius:11px}
.material-plan-actions .secondary-button{border:1px solid #cdd9e9;background:#fff;color:#2c5f9f;padding:0 13px;font-weight:750}
.material-plan-actions .primary-button b{margin-left:4px}
.material-plan-filters{display:grid;grid-template-columns:180px 180px minmax(230px,.7fr) minmax(250px,1fr);gap:10px;align-items:end;padding:13px;border:1px solid #dce5f0;border-radius:13px;background:#f8fbff}
.material-plan-filters>label>span:first-child{display:block;margin-bottom:6px;color:#5f6f86;font-size:11px;font-weight:750}
.material-plan-filters input[type="date"]{width:100%;min-height:40px;padding:0 10px;border:1px solid #d4dfec;border-radius:10px;background:#fff;color:#1b2c45;font:inherit}
.material-plan-shortage-only{display:flex;align-items:center;gap:9px;min-height:40px;padding:5px 10px;border:1px solid #d4dfec;border-radius:10px;background:#fff;cursor:pointer}
.material-plan-shortage-only input{width:16px;height:16px;accent-color:var(--module-accent)}
.material-plan-shortage-only span{min-width:0}
.material-plan-shortage-only b,.material-plan-shortage-only small{display:block}
.material-plan-shortage-only b{color:#20324b;font-size:12px}.material-plan-shortage-only small{margin-top:2px;color:#78879c;font-size:10px}
.material-plan-search{display:flex;align-items:center;gap:8px;min-height:40px;padding:0 11px;border:1px solid #d4dfec;border-radius:10px;background:#fff}
.material-plan-search svg{width:16px;height:16px;color:#7289a8}.material-plan-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:#1a2b44;font:inherit}
.material-plan-summary{display:flex;align-items:center;flex-wrap:wrap;gap:16px;color:#6f7e93;font-size:11px}
.material-plan-summary span{display:flex;align-items:center;gap:6px}.material-plan-summary b{color:#1d3554;font-size:13px}
.material-plan-summary i{width:8px;height:8px;border-radius:50%;background:#3973c5}.material-plan-summary i.warning{background:#df8436}
.material-plan-table-wrap{overflow:auto;border:1px solid #dce4ee;border-radius:14px;background:#fff}
.material-plan-table{width:100%;min-width:980px;border-collapse:collapse}
.material-plan-table th{padding:10px 12px;border-bottom:1px solid #dce4ee;background:#f3f7fb;color:#64748b;font-size:11px;text-align:left;white-space:nowrap}
.material-plan-table td{padding:13px 12px;border-bottom:1px solid #e7ecf3;color:#23354e;font-size:12px;vertical-align:middle}
.material-plan-table tr:last-child td{border-bottom:0}.material-plan-table tbody tr:hover{background:#f8fbff}
.material-plan-table td b,.material-plan-table td small,.material-plan-table td strong{display:block}
.material-plan-table td b{font-size:13px}.material-plan-table td small{margin-top:3px;color:#79879a;font-size:10px}
.material-plan-table td strong{font-size:14px;font-variant-numeric:tabular-nums}.material-plan-table td strong.is-shortage{color:#c95036}
.material-plan-check{width:54px;text-align:center}.material-plan-check input{width:17px;height:17px;accent-color:var(--module-accent)}
.material-demand-link{display:grid;gap:2px;border:0;background:transparent;color:#2768be;text-align:left;cursor:pointer}.material-demand-link:hover strong{text-decoration:underline;text-underline-offset:3px}
.material-plan-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
.material-plan-status.shortage{color:#b04431;background:#ffebe7}.material-plan-status.covered{color:#08755e;background:#e5f6ef}
.material-plan-table tbody.is-loading{opacity:.48;pointer-events:none}
.material-demand-detail{display:grid;gap:15px}
.material-demand-detail>header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:14px;border:1px solid #d8e4f2;border-radius:13px;background:#f7faff}
.material-demand-detail>header small,.material-demand-detail>header h3{display:block;margin:0}.material-demand-detail>header h3{margin-top:4px;color:#172a45;font-size:18px}
.material-demand-detail>header>div:last-child{display:grid;grid-template-columns:repeat(3,minmax(100px,1fr));gap:8px}
.material-demand-detail>header span{padding:9px 11px;border:1px solid #dce5f0;border-radius:10px;background:#fff}
.material-demand-detail>header span b{display:block;margin-top:3px;color:#1d3554;font-size:14px}
.material-demand-source-table{overflow:auto;border:1px solid #dde5ef;border-radius:12px}
.material-demand-source-table table{width:100%;min-width:850px;border-collapse:collapse}
.material-demand-source-table th{padding:9px 10px;background:#f3f6fa;color:#68778d;font-size:10px;text-align:left}
.material-demand-source-table td{padding:11px 10px;border-top:1px solid #e6ebf1;color:#293a52;font-size:11px}
.material-demand-source-table td b,.material-demand-source-table td small{display:block}.material-demand-source-table td small{margin-top:3px;color:#7d899b}
.material-demand-source-table td button{border:0;background:transparent;color:#2b69c5;font:inherit;font-weight:800;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.material-demand-source-table td strong{color:#1b3c69;font-size:12px}
@media(max-width:1150px){.material-plan-header{display:grid}.material-plan-actions{justify-content:start}.material-plan-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.material-plan-actions{display:grid}.material-plan-filters{grid-template-columns:1fr}.material-demand-detail>header{display:grid}.material-demand-detail>header>div:last-child{grid-template-columns:1fr}}
/* 车间工位 · 极简报工台（大按钮、大数字，产线人员三步完成：选工单→选工序→报数量） */
.workstation-stage{display:grid;gap:18px;min-width:0}
.ws-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px;min-width:0}
.ws-card{display:grid;gap:12px;padding:16px;border:1px solid #e2d9dc;border-radius:16px;background:#fff;box-shadow:0 1px 2px rgba(120,60,72,.05);min-width:0;overflow:hidden}
.ws-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.ws-card-head small{display:block;color:#97a0ac;font-size:10px;letter-spacing:.02em}
.ws-card-head b{display:block;margin-top:2px;color:#2b2733;font-size:17px}
.ws-card-head p{margin:3px 0 0;color:#6c7683;font-size:12px}
.ws-status{flex:none;padding:5px 10px;border-radius:999px;font-size:11px;font-weight:800}
.ws-status.wip{color:#a35b17;background:#fdf1e2}.ws-status.done{color:#08755e;background:#e5f6ef}.ws-status.pending{color:#5b6472;background:#eef1f5}
.ws-progress{position:relative;height:22px;border-radius:999px;background:#f3eef0;overflow:hidden}
.ws-progress i{position:absolute;inset:0 auto 0 0;border-radius:999px;background:linear-gradient(90deg,#c95036,var(--module-accent,#b84d62));transition:width .3s ease}
.ws-progress span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#413339;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
.ws-ops{display:grid;gap:10px}
.ws-op{padding:12px;border:1px solid #ece2e6;border-radius:13px;background:#fdfbfc}
.ws-op.is-done{background:#f4f8f6;border-color:#dcebe4}
.ws-op-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ws-op-name{display:flex;align-items:center;gap:7px}.ws-op-name b{color:#2b2733;font-size:14px}
.ws-op-tag{padding:2px 7px;border-radius:999px;background:#eaf0fb;color:#3a5ba8;font-size:10px;font-style:normal;font-weight:700}
.ws-op-progress{color:#8a7178;font-size:11px;font-variant-numeric:tabular-nums}
.ws-op-locked{display:flex;align-items:center;gap:6px;margin-top:8px;color:#08755e;font-size:12px;font-weight:700}
.ws-op-locked svg{width:15px;height:15px}
.ws-op-entry{display:grid;gap:9px;margin-top:10px;min-width:0}
.ws-qty-stepper{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;min-width:0}
.ws-qty-stepper button{height:52px;border:1px solid #ddcdd2;border-radius:12px;background:#fff;color:#7c2d3e;font-size:24px;font-weight:800;cursor:pointer}
.ws-qty-stepper button:hover{background:#faf3f4}
.ws-qty-stepper input{min-width:0;width:100%;height:52px;padding:0 8px;border:1.5px solid #d8c7cc;border-radius:12px;color:#2b2733;font-size:22px;font-weight:800;text-align:center;font-variant-numeric:tabular-nums;outline:none}
.ws-qty-stepper input:focus{border-color:var(--module-accent,#2e7d6b);box-shadow:0 0 0 3px rgba(46,125,107,.14)}
.ws-quick{display:flex;gap:8px;flex-wrap:wrap;min-width:0}
.ws-quick button{flex:1 1 56px;min-width:0;height:40px;padding:0 6px;border:1px dashed #d8c7cc;border-radius:10px;background:#fff;color:#7c5560;font-size:13px;font-weight:800;cursor:pointer;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ws-quick button:hover{background:#faf3f4;border-style:solid}
.ws-submit{display:flex;align-items:center;justify-content:center;gap:8px;height:54px;border:0;border-radius:13px;background:var(--module-accent,#b84d62);color:#fff;font-size:16px;font-weight:800;cursor:pointer}
.ws-submit:hover{filter:brightness(1.06)}
.ws-submit:disabled{opacity:.55;cursor:not-allowed}
.ws-submit svg{width:18px;height:18px}
.ws-receipt{margin:0;padding:9px 12px;border-radius:10px;background:#e5f6ef;color:#08755e;font-size:12px;font-weight:700}
.ws-receipt[data-tone="error"]{background:#ffebe7;color:#b04431}
.workstation-aside{align-self:start}
.ws-rule{margin:10px 0 0;color:#8a7178;font-size:11px;line-height:1.7}
@media(max-width:720px){.ws-grid{grid-template-columns:1fr}}
/* 配置中心 · 小奥用量与平台固定模型价目 */
.ai-usage-settings{display:grid;gap:14px}
.ai-usage-scenes{display:grid;gap:8px}
.ai-usage-note{margin:0;color:#8a7178;font-size:12px}
.ai-usage-scenes .is-unpriced,.sig-kpi.is-unpriced b{color:#a66218}
.ai-pricing-fixed-notice{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 16px;border:1px solid #d7e7df;border-radius:13px;background:#f4faf7}
.ai-pricing-fixed-notice>span{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;color:#176951;background:#dff2e9}
.ai-pricing-fixed-notice svg{width:18px;height:18px}
.ai-pricing-fixed-notice small,.ai-pricing-fixed-notice b{display:block}
.ai-pricing-fixed-notice small{color:#548173;font-size:10px}
.ai-pricing-fixed-notice b{margin-top:3px;color:#21483d;font-size:13px}
.ai-pricing-fixed-notice p{margin:4px 0 0;color:#68867d;font-size:11px;line-height:1.55}
.ai-pricing-fixed-notice em{padding:5px 8px;border-radius:999px;color:#176951;background:#dff2e9;font-size:10px;font-style:normal;font-weight:800}
@media(max-width:720px){.ai-pricing-fixed-notice{grid-template-columns:34px minmax(0,1fr)}.ai-pricing-fixed-notice em{grid-column:2;justify-self:start}}


/* 采购单详情 · 录入信息大字版 */
.purchase-detail { margin: 16px 0 6px; border: 1px solid #dde7e7; border-radius: 18px; background: #fff; overflow: hidden; }
.purchase-detail > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #e7eeee; background: linear-gradient(135deg, #f0f7f5, #f6f9f9); }
.purchase-detail > header small { display: block; margin-bottom: 3px; color: #68738a; font-size: 11px; }
.purchase-detail > header b { font-size: 19px; line-height: 1.3; }
.purchase-detail > header em { flex: none; padding: 6px 14px; border-radius: 999px; color: #155e55; background: #dff2ec; font-size: 12px; font-style: normal; font-weight: 700; }
.purchase-fact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #e7eeee; border-bottom: 1px solid #e7eeee; }
.purchase-fact-grid > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 13px 16px; background: #fff; }
.purchase-fact-grid small { color: #68738a; font-size: 11px; }
.purchase-fact-grid b { font-size: 14px; line-height: 1.45; word-break: break-word; }
.purchase-detail-table { padding: 8px 20px 6px; overflow-x: auto; }
.purchase-detail-table table { width: 100%; border-collapse: collapse; }
.purchase-detail-table th { padding: 10px 8px; color: #68738a; font-size: 11px; font-weight: 600; text-align: left; border-bottom: 1px solid #e7eeee; white-space: nowrap; }
.purchase-detail-table td { padding: 12px 8px; font-size: 13.5px; border-bottom: 1px solid #eef3f3; vertical-align: top; }
.purchase-detail-table td b { display: block; font-size: 13.5px; }
.purchase-detail-table td small { color: #8b95a7; font-size: 11px; }
.purchase-detail-table .num, .purchase-detail-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.purchase-detail-total { display: flex; justify-content: flex-end; gap: 36px; padding: 15px 20px 17px; }
.purchase-detail-total span { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.purchase-detail-total small { color: #68738a; font-size: 11px; }
.purchase-detail-total b { font-size: 17px; font-variant-numeric: tabular-nums; }
.purchase-detail-total .grand b { font-size: 22px; color: #123f3a; }
.purchase-payment-history { margin: 16px 0 6px; padding: 18px; border: 1px solid #dce6f3; border-radius: 18px; background: linear-gradient(145deg, #f8fbff, #fff); }
.purchase-payment-history > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.purchase-payment-history > header small,.purchase-payment-history > header b,.purchase-payment-history > header p { display: block; }
.purchase-payment-history > header small { color: #55708f; font-size: 11px; font-weight: 700; }
.purchase-payment-history > header b { margin-top: 3px; color: #172b46; font-size: 19px; }
.purchase-payment-history > header p { max-width: 760px; margin: 5px 0 0; color: #687991; font-size: 12px; line-height: 1.55; }
.purchase-payment-history > header > em { flex: none; padding: 6px 12px; border-radius: 999px; color: #245fc7; background: #eaf1ff; font-size: 12px; font-style: normal; font-weight: 700; }
.purchase-payment-document { padding: 15px 16px; border: 1px solid #dfe7f2; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(31,61,101,.04); }
.purchase-payment-document + .purchase-payment-document { margin-top: 10px; }
.purchase-payment-document-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.purchase-payment-document-main span > small,.purchase-payment-document-main span > b { display: block; }
.purchase-payment-document-main span > small { color: #75849a; font-size: 11px; }
.purchase-payment-document-main span > b { margin: 3px 0; color: #152a48; font-size: 18px; font-variant-numeric: tabular-nums; }
.purchase-payment-status { flex: none; padding: 5px 10px; border-radius: 999px; color: #23614f; background: #e8f5f0; font-size: 11px; font-style: normal; font-weight: 700; }
.purchase-payment-document dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 14px 0 0; }
.purchase-payment-document dl > div { min-width: 0; padding: 10px 12px; border-radius: 10px; background: #f5f8fc; }
.purchase-payment-document dt { color: #7a8799; font-size: 10px; }
.purchase-payment-document dd { margin: 4px 0 0; overflow: hidden; color: #263a55; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.payment-water-slips{margin-top:12px;padding-top:12px;border-top:1px solid #edf1f6}
.payment-water-slips>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.payment-water-slips>header span{display:flex;align-items:center;gap:7px;color:#29476b}
.payment-water-slips>header svg{width:15px;height:15px;color:#2a67cf}
.payment-water-slips>header b{font-size:12px}.payment-water-slips>header em{color:#718198;font-size:11px;font-style:normal}
.payment-water-slips>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,260px));gap:9px;margin-top:9px}
.payment-water-slips>div>p{margin:0;color:#8a96a8;font-size:11px}
.payment-water-slips button{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:9px;min-width:0;padding:6px;border:1px solid #d9e3ef;border-radius:11px;background:#f8fbff;color:#263a55;text-align:left;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease}
.payment-water-slips button:hover,.payment-water-slips button:focus-visible{border-color:#8fb2ee;background:#fff;box-shadow:0 6px 16px rgba(35,82,145,.09);outline:none}
.payment-water-slips button img{display:block;width:64px;height:48px;border-radius:7px;object-fit:cover;background:#edf2f8}
.payment-water-slips button span,.payment-water-slips button b,.payment-water-slips button small{display:block;min-width:0}
.payment-water-slips button b,.payment-water-slips button small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.payment-water-slips button b{font-size:11px}.payment-water-slips button small{margin-top:3px;color:#7b899d;font-size:9px}
.payment-water-slips button.is-expanded{grid-column:1/-1;grid-template-columns:1fr;padding:10px;background:#fff}
.payment-water-slips button.is-expanded img{width:100%;height:auto;max-height:520px;object-fit:contain}
.purchase-payment-document footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #edf1f6; }
.purchase-payment-document footer > span { margin-right: auto; color: #78869a; font-size: 11px; }
.purchase-payment-document footer button { min-height: 34px; padding: 7px 11px; }
.purchase-payment-empty { display: flex; flex-direction: column; gap: 4px; padding: 22px; border: 1px dashed #cfdceb; border-radius: 13px; color: #73839a; text-align: center; }
.purchase-payment-empty b { color: #314660; }
@media (max-width: 720px) {
  .purchase-payment-history { padding: 14px; }
  .purchase-payment-history > header,.purchase-payment-document-main { flex-direction: column; }
  .purchase-payment-document dl { grid-template-columns: 1fr 1fr; }
  .payment-water-slips>div{grid-template-columns:1fr}
}

/* 模块页右侧 · 业务流向卡 */
.live-route-flow { margin: 4px 0 14px; padding: 13px 15px; border: 1px solid #e1e9e9; border-radius: 13px; background: rgba(255,255,255,.65); }
.live-route-flow small { display: block; margin-bottom: 4px; color: #68738a; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.live-route-flow b { font-size: 13px; line-height: 1.5; }

@media (max-width: 850px) {
  .purchase-fact-grid { grid-template-columns: repeat(2, 1fr); }
  .purchase-detail-total { flex-wrap: wrap; gap: 18px; justify-content: flex-start; }
  .purchase-detail-total span { text-align: left; }
}


/* ==================== v12 · 高级感设计层 ==================== */
/* 1) 左侧导航：每个业务域专属色彩（--nav-accent 由 JS 按模块主题注入） */
@media (min-width: 851px) {
  body:not(.board-mode) .rail .top-nav > button { position: relative; transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
  body:not(.board-mode) .rail .top-nav > button .role-nav-icon { color: var(--nav-accent, #2f6f6a); background: color-mix(in srgb, var(--nav-accent, #2f6f6a) 12%, #ffffff); transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
  body:not(.board-mode) .rail .top-nav > button:hover { color: var(--nav-accent, #2f6f6a); background: color-mix(in srgb, var(--nav-accent, #2f6f6a) 7%, #ffffff); transform: translateX(2px); }
  body:not(.board-mode) .rail .top-nav > button.is-active { color: var(--nav-accent, #2f6f6a); background: color-mix(in srgb, var(--nav-accent, #2f6f6a) 11%, #ffffff); box-shadow: inset 3px 0 0 var(--nav-accent, #2f6f6a); }
  body:not(.board-mode) .rail .top-nav > button.is-active .role-nav-icon { color: #ffffff; background: linear-gradient(135deg, var(--nav-accent, #2f6f6a), color-mix(in srgb, var(--nav-accent, #2f6f6a) 70%, #ffffff)); box-shadow: 0 6px 14px color-mix(in srgb, var(--nav-accent, #2f6f6a) 32%, transparent); }
  body:not(.board-mode) .rail .top-nav > button .role-nav-arrow { opacity: 0; transition: opacity .18s ease; }
  body:not(.board-mode) .rail .top-nav > button:hover .role-nav-arrow { opacity: 1; color: var(--nav-accent, #2f6f6a); }
  body:not(.board-mode) .full-nav-group { font-size: 9px; }
}

/* 2) 模块页：信息字号整体上提（7-9px 时代结束） + 面板质感 */
.sig-head small { font-size: 10.5px; letter-spacing: .04em; }
.sig-head h2 { font-size: 17px; }
.sig-head-status { font-size: 9.5px; }
.sig-kpi { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.sig-kpi:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--module-accent, #2f6f6a) 35%, #e5e9ef); box-shadow: 0 10px 24px rgba(20,42,67,.08); }
.sig-kpi small { font-size: 10.5px; }
.sig-kpi b { margin-top: 5px; font-size: 21px; letter-spacing: -.01em; }
.sig-kpi em { font-size: 9.5px; }
.sig-row b { font-size: 12.5px; }
.sig-row small { margin-top: 4px; font-size: 10.5px; }
.sig-row em { font-size: 9.5px; }
.sig-row-button { transition: background .18s ease, padding .18s ease, border-radius .18s ease; }
.signature-identity { border-color: color-mix(in srgb, var(--module-accent, #2f6f6a) 18%, #e0e6ee); }
.signature-identity small { font-size: 10px; }
.signature-identity b { font-size: 14px; }
.signature-glyph { color: #ffffff; background: linear-gradient(135deg, var(--module-accent, #2f6f6a), color-mix(in srgb, var(--module-accent, #2f6f6a) 66%, #ffffff)); box-shadow: 0 8px 18px color-mix(in srgb, var(--module-accent, #2f6f6a) 28%, transparent); }
.live-route-glyph { color: #ffffff; background: linear-gradient(135deg, var(--module-accent, #2f6f6a), color-mix(in srgb, var(--module-accent, #2f6f6a) 66%, #ffffff)); box-shadow: 0 10px 22px color-mix(in srgb, var(--module-accent, #2f6f6a) 28%, transparent); }
.module-wayfinding b { font-size: 13px; }
.module-wayfinding small { font-size: 10.5px; }

/* 3) 全站动效：入场上浮、按钮按压反馈、行hover（仅 transform/opacity，性能安全） */
@keyframes v12Rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.signature-canvas > * { animation: v12Rise .38s cubic-bezier(.2,.7,.2,1) both; }
.signature-canvas > *:nth-child(2) { animation-delay: .05s; }
.signature-canvas > *:nth-child(3) { animation-delay: .1s; }
.record-detail > * { animation: v12Rise .3s ease both; }
.record-detail > *:nth-child(2) { animation-delay: .04s; }
.record-detail > *:nth-child(3) { animation-delay: .08s; }
.primary-button, .ghost-button { transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.primary-button:active { transform: translateY(0) scale(.98); }
.ghost-button:hover { transform: translateY(-1px); }

/* 4) 客户名片 */
.customer-card { margin: 14px 0 6px; border: 1px solid #e0e7ec; border-radius: 20px; background: #ffffff; overflow: hidden; }
.customer-card-banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px 26px; padding: 24px 26px 20px; border-bottom: 1px solid #e7edf0; background: linear-gradient(120deg, color-mix(in srgb, var(--action-accent, #2f6f6a) 12%, #ffffff), #ffffff 68%); }
.customer-card-id small { color: #7c8698; font-size: 11px; letter-spacing: .05em; }
.customer-card-id h4 { margin: 7px 0 5px; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.customer-card-id p { margin: 0; color: #68738a; font-size: 12.5px; }
.customer-card-kpis { display: flex; gap: 30px; }
.customer-card-kpis > span { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.customer-card-kpis small { color: #7c8698; font-size: 10.5px; }
.customer-card-kpis b { font-size: 19px; font-variant-numeric: tabular-nums; }
.customer-card-kpis b.is-due { color: #c2410c; }
.customer-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #edf1f4; border-bottom: 1px solid #edf1f4; }
.customer-card-grid > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 13px 18px; background: #ffffff; }
.customer-card-grid small { color: #8b95a7; font-size: 10.5px; }
.customer-card-grid b { font-size: 13.5px; line-height: 1.5; word-break: break-word; }
.customer-card-note { margin: 0; padding: 13px 22px; border-bottom: 1px solid #edf1f4; color: #4a5568; font-size: 12.5px; line-height: 1.65; }
.customer-card-note small { display: block; margin-bottom: 3px; color: #8b95a7; font-size: 10.5px; }
.customer-card-orders { padding: 14px 22px 8px; }
.customer-card-orders > small { display: block; margin-bottom: 6px; color: #8b95a7; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; }
.customer-card-orders > p { margin: 0 0 10px; color: #68738a; font-size: 12.5px; }
.customer-card-order { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid #f0f3f6; }
.customer-card-order b { font-size: 13px; }
.customer-card-order span { color: #68738a; font-size: 12px; }
.customer-card-order em { font-style: normal; font-size: 13px; font-variant-numeric: tabular-nums; }
.customer-card-actions { display: flex; align-items: center; gap: 14px; padding: 16px 22px 18px; }
.customer-card-actions > span { color: #96a0b0; font-size: 11px; }
.supplier-card .customer-card-banner { background: linear-gradient(120deg, color-mix(in srgb, #9a6b24 11%, #ffffff), #ffffff 68%); }
.supplier-card-logo { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border: 1px solid #ead9ba; border-radius: 18px; color: #79521c; background: linear-gradient(145deg, #fffaf0, #f4e4c7); font-size: 20px; font-weight: 800; box-shadow: 0 10px 24px rgba(121,82,28,.13); }

/* 5) 用户资料页 */
.profile-hero { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: center; margin-bottom: 18px; padding: 24px 26px; border: 1px solid #e0e7ec; border-radius: 20px; background: linear-gradient(120deg, #f2f8f6, #ffffff 72%); }
.profile-avatar { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; color: #ffffff; background: linear-gradient(135deg, #2f6f6a, #5aa39b); font-size: 30px; font-weight: 700; box-shadow: 0 12px 26px rgba(47,111,106,.28); }
.profile-id small { color: #7c8698; font-size: 11px; letter-spacing: .05em; }
.profile-id h3 { margin: 5px 0 3px; font-size: 24px; letter-spacing: -.01em; }
.profile-id p { margin: 0; color: #68738a; font-size: 12.5px; }
.profile-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.profile-facts > span { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 1px solid #e7edf0; border-radius: 13px; background: #ffffff; }
.profile-facts small { color: #8b95a7; font-size: 10.5px; }
.profile-facts b { font-size: 13.5px; word-break: break-word; }
.profile-perms { grid-column: 1 / -1; }
.profile-perms > small { display: block; margin-bottom: 7px; color: #8b95a7; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; }
.profile-perms > div { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-perms em { padding: 5px 12px; border-radius: 999px; color: #1f5c55; background: #e2f0ec; font-size: 11px; font-style: normal; font-weight: 600; }

/* 6) 通知铃铛真实角标 */
.icon-button { position: relative; }
#notificationBadge { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 99px; background: #e11d48; box-shadow: 0 0 0 2px #ffffff; }

@media (max-width: 850px) {
  .customer-card-grid { grid-template-columns: 1fr; }
  .customer-card-kpis { gap: 18px; }
  .customer-card-kpis > span { text-align: left; }
  .customer-card-order { grid-template-columns: 90px 1fr; }
  .customer-card-order em { grid-column: 2; }
  .profile-facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .signature-canvas > *, .record-detail > *, .action-modal.is-open .action-sheet { animation: none; }
  .rail .top-nav > button, .sig-kpi, .primary-button, .ghost-button { transition: none; }
}

/* 外发指令：方案 3 的专属命令工作区。全部规则限定在当前模块，左侧主菜单不参与覆盖。 */
#view-module[data-module="outsourceInstructions"] {
  --outsource-ink: #17233a;
  --outsource-muted: #6f7d92;
  --outsource-line: #dde4ed;
  --outsource-line-soft: #edf1f6;
  --outsource-blue: #276cf3;
  --outsource-blue-soft: #eef4ff;
  --outsource-orange: #d96a08;
  background: #f7f9fc;
}
#view-module[data-module="outsourceInstructions"]:has(.outsource-command-workspace) .module-page-intro,
#view-module[data-module="outsourceInstructions"]:has(.outsource-command-workspace) .route-context-bar { display: none; }
main.content:has(#view-module[data-module="outsourceInstructions"] .outsource-command-workspace) { width: auto; max-width: none; margin: 0; padding: 0 0 84px; }
#view-module[data-module="outsourceInstructions"]:has(.outsource-command-workspace) .module-signature { min-height: calc(100vh - 64px); padding: 0; }
#view-module[data-module="outsourceInstructions"]:has(.outsource-command-workspace) .signature-canvas { min-height: inherit; animation: none; }
#view-module[data-module="outsourceInstructions"]:has(.outsource-command-workspace) .signature-canvas > * { animation: none; }

.outsource-command-workspace { min-height: calc(100vh - 64px); color: var(--outsource-ink); background: #fff; }
.outsource-command-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 94px; padding: 24px 28px 18px; border-bottom: 1px solid var(--outsource-line); }
.outsource-command-header > div > span { display: block; margin-bottom: 5px; color: #8793a5; font-size: 11px; font-weight: 700; }
.outsource-command-header h1 { margin: 0; color: #12213a; font-size: clamp(25px, 2vw, 32px); line-height: 1.1; letter-spacing: -.02em; }
.outsource-command-header p { margin: 7px 0 0; color: var(--outsource-muted); font-size: 12px; line-height: 1.55; }
#view-module[data-module="outsourceInstructions"] .outsource-command-header .primary-button { min-height: 42px; padding-inline: 18px; border-color: #276cf3; border-radius: 8px; background: #276cf3; box-shadow: 0 5px 14px rgba(39,108,243,.18); }
.outsource-command-header .primary-button svg { width: 15px; height: 15px; }

.outsource-command-tabs { display: flex; align-items: stretch; gap: 2px; min-height: 54px; padding: 0 22px; border-bottom: 1px solid var(--outsource-line); background: #fff; overflow-x: auto; scrollbar-width: none; }
.outsource-command-tabs::-webkit-scrollbar { display: none; }
.outsource-command-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: max-content; min-height: 54px; padding: 0 14px; border: 0; color: #53627a; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.outsource-command-tabs button::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: transparent; }
.outsource-command-tabs button b { min-width: 20px; padding: 2px 6px; border-radius: 999px; color: #8390a3; background: #f1f4f8; font-size: 10px; text-align: center; }
.outsource-command-tabs button:hover { color: var(--outsource-blue); background: #fafcff; }
.outsource-command-tabs button.is-active { color: var(--outsource-blue); }
.outsource-command-tabs button.is-active::after { background: var(--outsource-blue); }
.outsource-command-tabs button.is-active b { color: var(--outsource-blue); background: var(--outsource-blue-soft); }

.outsource-command-toolbar { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 12px 22px; border-bottom: 1px solid var(--outsource-line); background: #fbfcfe; }
.outsource-command-toolbar label { display: flex; align-items: center; gap: 9px; min-height: 42px; border: 1px solid #d8e0eb; border-radius: 8px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.outsource-command-toolbar label:first-child { flex: 1; max-width: 560px; padding: 0 13px; }
.outsource-command-toolbar label:focus-within { border-color: #7ba5fb; box-shadow: 0 0 0 3px rgba(39,108,243,.1); }
.outsource-command-toolbar svg { flex: 0 0 auto; width: 15px; height: 15px; color: #77859a; }
.outsource-command-toolbar input,
.outsource-command-toolbar select { border: 0; outline: 0; color: #25344c; background: transparent; font-size: 12px; }
.outsource-command-toolbar input { width: 100%; }
.outsource-command-toolbar .ledger-sort { min-width: 142px; padding: 0 12px; }
.outsource-command-toolbar select { width: 100%; cursor: pointer; }

.outsource-command-shell { display: grid; grid-template-columns: minmax(0, 1fr) 0; min-height: calc(100vh - 280px); transition: grid-template-columns .2s ease; }
.outsource-command-shell.is-drawer-open { grid-template-columns: minmax(620px, 1fr) minmax(360px, calc(31.5vw - 73.08px)); }
.outsource-command-workspace:has(.outsource-command-shell.is-drawer-open) > .outsource-command-header,
.outsource-command-workspace:has(.outsource-command-shell.is-drawer-open) > .outsource-command-tabs,
.outsource-command-workspace:has(.outsource-command-shell.is-drawer-open) > .outsource-command-toolbar { width: calc(100% - max(360px, calc(31.5vw - 73.08px))); }
.outsource-command-main { min-width: 0; padding: 18px 22px 28px; background: #fff; }
.outsource-command-shell > [data-outsource-command-drawer-host] { min-width: 0; border-left: 0 solid transparent; overflow: hidden; }
.outsource-command-shell.is-drawer-open > [data-outsource-command-drawer-host] { position: fixed; z-index: 90; top: 0; right: 0; width: max(360px, calc(31.5vw - 73.08px)); height: calc(100vh - 66px); border-left-width: 1px; border-left-color: var(--outsource-line); background: #fff; }

.outsource-command-attention { margin-bottom: 14px; padding: 17px; border: 1px solid #dbe5f3; border-radius: 10px; background: #f7faff; }
.outsource-command-attention-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.outsource-command-attention small { color: #6f7f96; font-size: 10px; }
.outsource-command-attention h2 { margin: 3px 0 2px; color: #265ec7; font-size: 15px; }
.outsource-command-attention p { margin: 0; color: #8190a4; font-size: 11px; }
.outsource-command-attention-items { display: grid; grid-template-columns: repeat(2, minmax(0, 230px)); gap: 10px; margin-top: 13px; }
.outsource-command-attention-items button { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 11px; min-height: 62px; padding: 11px 13px; border: 1px solid #dfe6ef; border-radius: 8px; color: #223049; background: #fff; text-align: left; cursor: pointer; }
.outsource-command-attention-items button:hover { border-color: #a8c1ef; box-shadow: 0 4px 12px rgba(47,80,133,.08); }
.outsource-command-attention-items button > span { display: grid; grid-row: 1 / 3; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--outsource-blue); background: var(--outsource-blue-soft); }
.outsource-command-attention-items button:nth-child(2) > span { color: var(--outsource-orange); background: #fff3e8; }
.outsource-command-attention-items svg { width: 17px; height: 17px; }
.outsource-command-attention-items b { align-self: end; font-size: 12px; }
.outsource-command-attention-items small { align-self: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outsource-command-attention.is-clear { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.outsource-command-attention.is-clear > span { display: inline-flex; align-items: center; gap: 7px; color: #23845a; font-size: 11px; font-weight: 800; }
.outsource-command-attention.is-clear svg { width: 16px; height: 16px; }

.outsource-command-ledger { border: 1px solid var(--outsource-line); border-radius: 10px; background: #fff; overflow: hidden; }
.outsource-command-ledger > header,
.outsource-command-row { display: grid; grid-template-columns: minmax(132px, 1.05fr) minmax(150px, 1.25fr) minmax(86px, .7fr) minmax(145px, 1.2fr) minmax(86px, .72fr) minmax(94px, .8fr) 18px; align-items: center; column-gap: 14px; }
.outsource-command-row-shell { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; border-top: 1px solid var(--outsource-line-soft); background: #fff; }
.outsource-command-row-shell > .outsource-command-row { min-width: 0; border-top: 0; }
.outsource-command-row-shell > .outsource-ledger-detail { grid-column: 1 / -1; }
.outsource-command-row-shell.is-expanded { background: #fbfcff; }
.outsource-command-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 9px 12px 9px 4px; }
.outsource-command-workspace:not(.has-list-actions-visible) .outsource-command-row-actions { width: 0; padding: 0; overflow: hidden; }
.outsource-command-ledger > header { min-height: 40px; padding: 0 14px; color: #7b899d; background: #f8fafc; font-size: 10px; font-weight: 800; }
.outsource-command-ledger #moduleLedgerList { min-height: 230px; }
.outsource-command-row { width: 100%; min-height: 70px; padding: 11px 14px; border: 0; border-top: 1px solid var(--outsource-line-soft); color: #27364d; background: #fff; text-align: left; cursor: pointer; transition: background .14s ease, box-shadow .14s ease; }
.outsource-command-row:hover { background: #fafcff; }
.outsource-command-row.is-selected { background: #f2f6ff; box-shadow: inset 3px 0 0 var(--outsource-blue); }
.outsource-command-row > span { min-width: 0; }
.outsource-command-row b,
.outsource-command-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outsource-command-row b { color: #27364d; font-size: 11.5px; line-height: 1.45; }
.outsource-command-row small { margin-top: 3px; color: #7c899c; font-size: 10px; line-height: 1.4; }
.outsource-command-row > svg { width: 14px; height: 14px; color: #8a98aa; }
.outsource-command-record b { color: #2465dd; }
.outsource-command-status { display: inline-flex; align-items: center; justify-content: center; width: max-content; min-height: 24px; padding: 0 9px; border-radius: 999px; color: #5f6d80; background: #eef1f5; font-size: 10px; font-style: normal; font-weight: 800; }
.outsource-command-status.is-warning { color: #b55b08; background: #fff0df; }
.outsource-command-status.is-review { color: #865b12; background: #fff7dc; }
.outsource-command-status.is-pending { color: #c76300; background: #fff2df; }
.outsource-command-status.is-progress { color: #2367d8; background: #eaf2ff; }
.outsource-command-status.is-complete { color: #177b54; background: #e8f7f0; }
.outsource-command-ledger > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 9px 14px; border-top: 1px solid var(--outsource-line); }
#view-module[data-module="outsourceInstructions"] #moduleLedgerStatus { display: flex; flex-direction: column; gap: 2px; color: #8390a2; font-size: 10px; }
#view-module[data-module="outsourceInstructions"] #moduleLedgerStatus b { color: #344158; font-size: 11px; }
.outsource-command-pagination { display: flex; align-items: center; gap: 8px; }
.outsource-command-pagination button { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 10px; border: 1px solid #dce3ec; border-radius: 7px; color: #4f5d72; background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; }
.outsource-command-pagination button:disabled { opacity: .42; cursor: not-allowed; }
.outsource-command-pagination button:first-child svg { transform: rotate(180deg); }
.outsource-command-pagination svg { width: 12px; height: 12px; }
.outsource-command-pagination span { min-width: 62px; color: #77869a; text-align: center; font-size: 10px; }
.outsource-command-empty { display: grid; place-items: center; align-content: center; min-height: 230px; padding: 30px; color: #8794a6; text-align: center; }
.outsource-command-empty b { color: #43516a; font-size: 13px; }
.outsource-command-empty span { margin-top: 5px; font-size: 11px; }

.outsource-command-drawer { display: flex; flex-direction: column; width: 100%; min-width: 330px; height: 100%; background: #fff; outline: none; }
.outsource-command-drawer > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 21px 20px 16px; border-bottom: 1px solid var(--outsource-line); }
.outsource-command-drawer > header small { display: block; color: #8290a4; font-size: 10px; }
.outsource-command-drawer > header h2 { margin: 4px 0 8px; color: #16233a; font-size: 17px; }
.outsource-command-drawer > header button { min-width: 52px; min-height: 34px; border: 1px solid #dce3ec; border-radius: 7px; color: #536178; background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; }
.outsource-command-drawer > header button:hover { border-color: #9bb4df; color: #245fcf; }
.outsource-command-drawer > nav { display: flex; align-items: stretch; min-height: 49px; padding: 0 13px; border-bottom: 1px solid var(--outsource-line); overflow-x: auto; scrollbar-width: none; }
.outsource-command-drawer > nav::-webkit-scrollbar { display: none; }
.outsource-command-drawer > nav button { position: relative; min-width: max-content; padding: 0 10px; border: 0; color: #6e7c91; background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }
.outsource-command-drawer > nav button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: transparent; }
.outsource-command-drawer > nav button.is-active { color: var(--outsource-blue); }
.outsource-command-drawer > nav button.is-active::after { background: var(--outsource-blue); }
.outsource-command-drawer-body { flex: 1; min-height: 0; padding: 18px 20px 28px; overflow-y: auto; }
.outsource-command-drawer > footer { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; padding: 15px 20px 82px; border-top: 1px solid var(--outsource-line); background: #fff; }
.outsource-command-drawer > footer button { min-height: 42px; justify-content: center; }
#view-module[data-module="outsourceInstructions"] .outsource-command-drawer > footer .primary-button { border-color: #276cf3; background: #276cf3; }
.outsource-command-facts { display: grid; gap: 0; }
.outsource-command-facts > span { display: grid; grid-template-columns: minmax(88px, .75fr) 1.55fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--outsource-line-soft); }
.outsource-command-facts small { color: #77859a; font-size: 10px; }
.outsource-command-facts b { color: #344158; font-size: 11px; line-height: 1.5; }
.outsource-command-next { margin-top: 20px; padding: 14px; border: 1px solid #dfe6f0; border-radius: 8px; background: #fbfcfe; }
.outsource-command-next small { color: #78879c; font-size: 10px; }
.outsource-command-next b { display: block; margin-top: 5px; color: #24334c; font-size: 12px; }
.outsource-command-next p { margin: 6px 0 0; color: #748298; font-size: 10.5px; line-height: 1.55; }
.outsource-command-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.outsource-command-timeline li { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; min-height: 62px; }
.outsource-command-timeline li::before { content: ""; position: absolute; left: 6px; top: 17px; bottom: -3px; width: 1px; background: #dfe5ed; }
.outsource-command-timeline li:last-child::before { display: none; }
.outsource-command-timeline li > span { z-index: 1; width: 13px; height: 13px; margin-top: 3px; border: 3px solid #e4e9f0; border-radius: 50%; background: #fff; }
.outsource-command-timeline li.is-done > span { border-color: #bcd0fb; background: var(--outsource-blue); }
.outsource-command-timeline b { display: block; color: #39475e; font-size: 11px; }
.outsource-command-timeline small { display: block; margin-top: 4px; color: #8491a3; font-size: 10px; }
.outsource-command-audit { display: grid; gap: 4px; margin-top: 10px; padding: 13px; border-top: 1px solid var(--outsource-line); color: #77859a; font-size: 10px; }
.outsource-command-audit b { color: #344158; font-size: 11px; }
.outsource-command-materials { display: grid; gap: 8px; }
.outsource-command-materials article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--outsource-line); border-radius: 8px; }
.outsource-command-materials b,
.outsource-command-materials small { display: block; }
.outsource-command-materials b { color: #35435b; font-size: 11px; }
.outsource-command-materials small { margin-top: 3px; color: #8693a5; font-size: 9.5px; }
.outsource-command-materials em { color: #287657; font-size: 10px; font-style: normal; font-weight: 800; }
.outsource-command-materials em.is-shortage { color: #b75a05; }
.outsource-command-related { display: grid; gap: 10px; }
.outsource-command-related section { padding: 14px; border: 1px solid var(--outsource-line); border-radius: 8px; }
.outsource-command-related small { color: #8290a3; font-size: 10px; }
.outsource-command-related b { display: block; margin-top: 5px; color: #25344c; font-size: 12px; }
.outsource-command-related p { margin: 5px 0 0; color: #738197; font-size: 10px; }
.outsource-command-related button { margin-top: 10px; padding: 0; border: 0; color: var(--outsource-blue); background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }
.outsource-command-drawer-empty { display: grid; place-items: center; align-content: center; min-height: 260px; color: #8190a4; text-align: center; }
.outsource-command-drawer-empty svg { width: 28px; height: 28px; color: #8e9db2; }
.outsource-command-drawer-empty b { margin-top: 10px; color: #38475f; font-size: 12px; }
.outsource-command-drawer-empty p { max-width: 270px; margin: 6px 0 0; font-size: 10px; line-height: 1.55; }

body[data-theme="dark"] #view-module[data-module="outsourceInstructions"],
body[data-theme="dark"] .outsource-command-workspace,
body[data-theme="dark"] .outsource-command-main,
body[data-theme="dark"] .outsource-command-header,
body[data-theme="dark"] .outsource-command-tabs,
body[data-theme="dark"] .outsource-command-drawer,
body[data-theme="dark"] .outsource-command-drawer > footer { background: #111a28; }
body[data-theme="dark"] #view-module[data-module="outsourceInstructions"] { --outsource-ink: #e5edf8; --outsource-muted: #97a7bc; --outsource-line: #2a3748; --outsource-line-soft: #223043; }
body[data-theme="dark"] .outsource-command-toolbar,
body[data-theme="dark"] .outsource-command-ledger > header { background: #162131; }
body[data-theme="dark"] .outsource-command-toolbar label,
body[data-theme="dark"] .outsource-command-row,
body[data-theme="dark"] .outsource-command-row-shell,
body[data-theme="dark"] .outsource-command-ledger,
body[data-theme="dark"] .outsource-command-attention-items button { border-color: #2c3a4d; background: #131e2d; }
body[data-theme="dark"] .outsource-command-row.is-selected { background: #182945; }
body[data-theme="dark"] .outsource-command-attention { border-color: #2d4059; background: #17253a; }
body[data-theme="dark"] .outsource-command-header h1,
body[data-theme="dark"] .outsource-command-row b,
body[data-theme="dark"] .outsource-command-facts b,
body[data-theme="dark"] .outsource-command-next b { color: #e1e9f5; }

@media (max-width: 1180px) {
  .outsource-command-shell.is-drawer-open { grid-template-columns: minmax(520px, 1fr) minmax(320px, 36%); }
  .outsource-command-workspace:has(.outsource-command-shell.is-drawer-open) > .outsource-command-header,
  .outsource-command-workspace:has(.outsource-command-shell.is-drawer-open) > .outsource-command-tabs,
  .outsource-command-workspace:has(.outsource-command-shell.is-drawer-open) > .outsource-command-toolbar { width: calc(100% - 36%); }
  .outsource-command-shell.is-drawer-open > [data-outsource-command-drawer-host] { width: 36%; }
  .outsource-command-ledger > header,
  .outsource-command-row { grid-template-columns: minmax(126px, 1.1fr) minmax(145px, 1.3fr) 82px minmax(125px, 1fr) 84px 18px; }
  .outsource-command-ledger > header > span:nth-child(6),
  .outsource-command-row > span:nth-child(6) { display: none; }
}
@media (max-width: 960px) {
  .outsource-command-workspace:has(.outsource-command-shell.is-drawer-open) > .outsource-command-header,
  .outsource-command-workspace:has(.outsource-command-shell.is-drawer-open) > .outsource-command-tabs,
  .outsource-command-workspace:has(.outsource-command-shell.is-drawer-open) > .outsource-command-toolbar { width: 100%; }
  .outsource-command-shell,
  .outsource-command-shell.is-drawer-open { position: relative; grid-template-columns: minmax(0,1fr); }
  .outsource-command-shell > [data-outsource-command-drawer-host] { position: fixed; z-index: 150; top: 0; right: 0; width: min(440px, 92vw); height: calc(100vh - 60px); border-left: 1px solid var(--outsource-line); box-shadow: -12px 0 34px rgba(21,36,62,.16); }
  .outsource-command-shell:not(.is-drawer-open) > [data-outsource-command-drawer-host] { width: 0; border: 0; box-shadow: none; }
  .outsource-command-drawer { height: calc(100vh - 60px); min-width: min(440px,92vw); }
}
@media (max-width: 720px) {
  .outsource-command-header { align-items: stretch; flex-direction: column; padding: 20px 16px 15px; }
  .outsource-command-header .primary-button { justify-content: center; width: 100%; }
  .outsource-command-tabs { padding-inline: 8px; }
  .outsource-command-toolbar { align-items: stretch; flex-direction: column; padding: 12px 14px; }
  .outsource-command-toolbar label:first-child,
  .outsource-command-toolbar .ledger-sort { width: 100%; max-width: none; }
  .outsource-command-main { padding: 14px; }
  .outsource-command-attention-items { grid-template-columns: 1fr; }
  .outsource-command-attention.is-clear { align-items: flex-start; flex-direction: column; }
  .outsource-command-ledger { overflow-x: auto; }
  .outsource-command-ledger > header,
  .outsource-command-row { min-width: 690px; }
  .outsource-command-row-shell { min-width: 760px; }
  .outsource-command-ledger > footer { position: sticky; left: 0; width: min(690px, calc(100vw - 28px)); }
  .outsource-command-drawer > footer { padding-bottom: 76px; }
}

/* v12b · 防超框补丁 */
.sig-kpi { min-width: 0; }
.sig-kpi b { font-size: 19px; line-height: 1.3; overflow-wrap: break-word; word-break: break-all; }
.sig-kpis { min-width: 0; }
.customer-card-kpis { flex-wrap: wrap; }
.customer-card-kpis > span { min-width: 0; }
.customer-card-kpis b { overflow-wrap: break-word; word-break: break-all; }
.purchase-detail-total b, .purchase-detail-total .grand b { overflow-wrap: break-word; word-break: break-all; }
.record-hero > div { min-width: 0; }
.record-hero h3, .record-hero p { overflow-wrap: break-word; }
.customer-card-id { min-width: 0; }
.customer-card-id h4 { overflow-wrap: break-word; }
.profile-id { min-width: 0; }
.profile-id p { overflow-wrap: break-word; }
.signature-panel, .signature-panel * { min-width: 0; }
.live-route-flow b { overflow-wrap: break-word; }


/* ==================== v13 · 顶级审美重塑层 ==================== */
:root {
  --v13-brand: #2f6ff2;
  --v13-ink: #0f1c33;
  --v13-line: #e4e9f2;
  --v13-card-shadow: 0 1px 2px rgba(16,32,64,.04), 0 10px 28px rgba(16,32,64,.06);
  --v13-card-shadow-hover: 0 2px 4px rgba(16,32,64,.05), 0 18px 44px rgba(16,32,64,.12);
}

/* 1) 画布与基调 */
body { background: radial-gradient(circle at 84% -10%, rgba(47,111,242,.05), transparent 30rem), radial-gradient(circle at -8% 6%, rgba(20,184,166,.05), transparent 26rem), #f6f8fb; font-size: 13.5px; }
.topbar { background: rgba(255,255,255,.86); border-bottom: 1px solid rgba(226,232,243,.9); backdrop-filter: blur(22px) saturate(170%); }
.top-nav button { font-size: 12px; }
.top-nav button.is-active { font-weight: 650; }

/* 2) 按钮体系：更立体的层级与按压反馈 */
.primary-button { border-radius: 11px; background: linear-gradient(135deg, #3d7dff 0%, #2f6ff2 55%, #2557d6 100%); box-shadow: 0 8px 20px rgba(47,111,242,.26), inset 0 1px 0 rgba(255,255,255,.2); font-weight: 650; letter-spacing: .01em; }
.primary-button:hover { background: linear-gradient(135deg, #4f88ff 0%, #3a7bf6 55%, #2b5fe0 100%); box-shadow: 0 12px 28px rgba(47,111,242,.34), inset 0 1px 0 rgba(255,255,255,.2); }
.primary-button:disabled { opacity: .55; }
.ghost-button { border-radius: 11px; border-color: #dde4f0; background: #fff; box-shadow: 0 1px 2px rgba(16,32,64,.03); }
.ghost-button:hover { border-color: #b9c8e8; box-shadow: 0 6px 16px rgba(23,43,99,.08); }
.create-button { border-radius: 11px; background: linear-gradient(135deg, #1a2b4a, #111c33); box-shadow: 0 8px 18px rgba(17,28,51,.22); }
.create-button:hover { background: linear-gradient(135deg, #22375e, #16223c); }
.icon-button, .search-icon-button, .company-switch, .system-reliability { border-radius: 10px; transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease; }
.icon-button:hover, .search-icon-button:hover, .company-switch:hover { box-shadow: 0 6px 14px rgba(23,43,99,.08); }

/* 3) 左侧导航：轻盈彩色工作台 */
@media (min-width: 851px) {
  body:not(.board-mode) .rail { background: linear-gradient(180deg, #fcfdff 0%, #f5f8fc 100%); border-right: 1px solid #e6eaf3; box-shadow: 8px 0 28px rgba(23,43,99,.05); }
  body:not(.board-mode) .rail .top-nav > button { min-height: 46px; border-radius: 12px; }
  body:not(.board-mode) .rail .top-nav > button.is-active { box-shadow: inset 3px 0 0 var(--nav-accent, #2f6f6a), 0 8px 18px color-mix(in srgb, var(--nav-accent, #2f6f6a) 16%, transparent); }
  body:not(.board-mode) .role-nav-icon { border-radius: 11px; }
  body:not(.board-mode) .rail-brand b { font-size: 14.5px; letter-spacing: -.01em; }
  body:not(.board-mode) .rail-account { border-radius: 14px; background: #fff; box-shadow: 0 2px 10px rgba(23,43,99,.06); }
  body:not(.board-mode) .rail-account:hover { box-shadow: 0 8px 20px rgba(23,43,99,.1); }
  body:not(.board-mode) .role-nav-heading b { color: #3d4c66; }
}

/* 4) 面板与卡片体系：更柔和的圆角、分层阴影 */
.signature-panel { border: 1px solid var(--v13-line); border-radius: 18px; background: #fff; box-shadow: var(--v13-card-shadow); }
.signature-panel.tinted { background: linear-gradient(150deg, var(--module-soft), #fff 72%); }
.sig-kpi { border-radius: 14px; box-shadow: 0 1px 2px rgba(16,32,64,.03); }
.focus-card, .pulse-card, .flow-card, .module-section, .table-card, .receivable-card, .match-card { border-radius: 16px; }
.module-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.module-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(47,111,242,.1); }
.summary-strip { border-radius: 14px; }
.table-row b { font-size: 12px; }
.table-row small { font-size: 10px; }
.table-head { font-size: 10px; letter-spacing: .04em; }

/* 5) 记录行全局卡片化（采购单等所有模块台账受益） */
.customer-directory-list { gap: 10px; }
.customer-directory-list .sig-row-shell { border-top: 0; }
.customer-directory-list .sig-row { border-top: 0; }
.customer-directory-list .sig-row-button { min-height: 64px; padding: 13px 16px; border: 1px solid var(--v13-line); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(16,32,64,.03); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.customer-directory-list .sig-row-button:hover { padding-inline: 16px; transform: translateY(-1px); border-color: color-mix(in srgb, var(--module-accent, #2f6ff2) 38%, #e4e9f2); background: #fff; box-shadow: var(--v13-card-shadow-hover); }
.customer-directory-list .record-row-lifecycle { border-radius: 9px; }

/* 6) 客户名片网格 */
.customer-directory-list.is-card-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: stretch; }
.customer-card-shell { position: relative; display: block; }
.customer-card-shell .record-row-lifecycle { position: absolute; z-index: 2; top: 12px; right: 12px; min-height: 26px; background: #fff; }
.customer-card-shell .record-row-lifecycle span { display: none; }
.customer-directory-list .customer-grid-card { display: flex; flex-direction: column; align-items: stretch; gap: 13px; width: 100%; height: 100%; min-height: 0; padding: 18px; border-radius: 18px; }
.customer-grid-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.customer-grid-logo { width: 46px; height: 46px; border-radius: 14px; font-size: 15px; }
.customer-grid-title { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.customer-grid-title b { overflow: hidden; font-size: 15px; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.customer-grid-title small { overflow: hidden; margin-top: 0; color: #8b96ab; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-grid-card .customer-grid-status { flex: none; margin: 0; padding: 4px 10px; border-radius: 999px; color: #a87c0a; background: #fdf3de; font-size: 10px; font-weight: 700; }
.customer-grid-card .customer-grid-status.is-complete { color: #17795c; background: #e3f5ec; }
.customer-grid-lines { display: flex; flex-direction: column; gap: 6px; }
.customer-grid-lines > span { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; color: #5b6a82; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.customer-grid-lines svg { flex: none; width: 13px; height: 13px; color: #9aa7bd; }
.customer-grid-foot { display: flex; align-items: flex-end; gap: 18px; margin-top: auto; padding-top: 13px; border-top: 1px dashed #e7ecf4; }
.customer-grid-foot > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.customer-grid-foot small { color: #97a1b5; font-size: 10px; }
.customer-grid-foot b { font-size: 14px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.customer-grid-foot b.is-due { color: #c2410c; }
.customer-grid-terms { margin-left: auto; text-align: right; }
.customer-grid-terms b { font-size: 12px; }

/* 7) 订单精美卡片 */
#view-orders .modern-table.is-card-mode { min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; padding: 16px; background: #f8fafd; }
#view-orders .modern-table.is-card-mode .table-head { display: none; }
#view-orders .modern-table.is-card-mode .table-empty { grid-column: 1 / -1; }
#view-orders .order-card { grid-template-columns: none; grid-auto-rows: min-content; gap: 13px; min-height: 0; padding: 18px; border: 1px solid var(--v13-line); border-radius: 18px; background: #fff; box-shadow: var(--v13-card-shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
#view-orders .order-card:hover { transform: translateY(-3px); border-color: #c8d6f5; background: #fff; box-shadow: var(--v13-card-shadow-hover); }
#view-orders .order-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
#view-orders .order-card-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#view-orders .order-card-id b { overflow: hidden; color: var(--v13-brand); font-size: 15px; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
#view-orders .order-card-id small { color: #97a1b5; font-size: 10.5px; }
#view-orders .order-card-head .action-chip { flex: none; font-size: 10.5px; padding: 5px 11px; }
#view-orders .order-card-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#view-orders .order-card-main b { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
#view-orders .order-card-main small { overflow: hidden; color: #68738a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
#view-orders .order-card-progress { flex-direction: row; align-items: center; gap: 10px; }
#view-orders .order-card-progress .mini-progress { flex: 1; width: auto; height: 6px; }
#view-orders .order-card-progress > small { flex: none; color: #68738a; font-size: 11px; white-space: nowrap; }
#view-orders .order-card-foot { display: flex; align-items: flex-end; gap: 14px; margin-top: 1px; padding-top: 13px; border-top: 1px dashed #e7ecf4; }
#view-orders .order-card-foot > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#view-orders .order-card-foot small { color: #97a1b5; font-size: 10px; }
#view-orders .order-card-foot b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
#view-orders .order-card-foot .order-card-note { color: #8b96ab; font-size: 10.5px; }
#view-orders .order-card-amount { margin-left: auto; text-align: right; }
#view-orders .order-card-arrow { flex: none; width: 15px; height: 15px; align-self: center; color: #b6c1d4; }
#view-orders .order-card.is-cancelled { border-color: #e7dfe1; background: #fcfbfb; box-shadow: none; }
#view-orders .order-card.is-cancelled:hover { border-color: #d5c5c9; box-shadow: 0 10px 24px rgba(72,45,51,.08); }
#view-orders .order-card.is-cancelled .order-card-id b { color: #705e64; }
#view-orders .order-card-cancellation { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border-left: 2px solid #b75b67; background: #fff7f8; text-align: left; }
#view-orders .order-card-cancellation small { color: #a7656f; font-size: 10px; }
#view-orders .order-card-cancellation b { overflow: hidden; color: #5b454b; font-size: 11.5px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }

/* 订单总览：正式台账表格。操作固定在行尾，不再把订单包装成重复卡片。 */
#view-orders .table-card { overflow-x: auto; }
#view-orders .modern-table.order-ledger-table { min-width: 1120px; background: #fff; }
#view-orders .order-ledger-table .table-row { grid-template-columns: minmax(130px,.95fr) minmax(230px,1.55fr) minmax(145px,1fr) minmax(130px,.85fr) minmax(120px,.8fr) minmax(250px,1.35fr); gap: 18px; min-height: 72px; padding: 11px 18px; cursor: default; }
#view-orders .order-ledger-table .table-head { min-height: 42px; color: #76839a; background: #f7f9fc; font-size: 10px; letter-spacing: .035em; }
#view-orders .order-ledger-row { background: #fff; transition: background-color .15s ease, box-shadow .15s ease; }
#view-orders .order-ledger-row:hover { position: relative; z-index: 1; background: #fafcff; box-shadow: inset 3px 0 0 var(--ui-accent); }
#view-orders .order-ledger-row.is-expanded { background: #f7faff; box-shadow: inset 3px 0 0 var(--ui-accent); }
#view-orders .order-ledger-row.is-cancelled { background: #fcfbfb; }
#view-orders .order-ledger-row.is-cancelled:hover { background: #fffafa; box-shadow: inset 3px 0 0 #b75b67; }
#view-orders .order-ledger-open { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
#view-orders .order-ledger-open b { color: var(--ui-accent); font-size: 13px; }
#view-orders .order-ledger-open small { color: #8a96aa; font-size: 10px; font-variant-numeric: tabular-nums; }
#view-orders .order-ledger-open:hover b { text-decoration: underline; text-underline-offset: 3px; }
#view-orders .order-ledger-party b, #view-orders .order-ledger-delivery b, #view-orders .order-ledger-amount b { font-size: 12px; }
#view-orders .order-ledger-party small, #view-orders .order-ledger-delivery small, #view-orders .order-ledger-amount small { overflow: hidden; color: #7d899f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
#view-orders .order-ledger-amount { align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
#view-orders .order-ledger-stage { align-items: flex-start; gap: 7px; }
#view-orders .order-ledger-stage .action-chip { padding: 4px 8px; font-size: 9.5px; }
#view-orders .order-ledger-progress { display: flex; align-items: center; gap: 7px; width: 100%; }
#view-orders .order-ledger-progress .mini-progress { width: 72px; }
#view-orders .order-ledger-progress small { font-size: 9px; }
#view-orders .order-ledger-cancel-reason { display: block; max-width: 150px; overflow: hidden; color: #9e626c !important; text-overflow: ellipsis; white-space: nowrap; }
#view-orders .order-row-actions { display: flex; flex-flow: row wrap; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }
#view-orders .order-row-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 0 10px; border: 1px solid #dbe3ef; border-radius: 9px; color: #42516a; background: #fff; cursor: pointer; font-size: 10px; font-weight: 700; white-space: nowrap; transition: border-color .15s ease, color .15s ease, background-color .15s ease, transform .15s ease; }
#view-orders .order-row-action svg { width: 13px; height: 13px; }
#view-orders .order-row-action:hover { transform: translateY(-1px); border-color: #9fb5db; color: #245bd4; background: #f7faff; }
#view-orders .order-row-action.is-review { border-color: #b8d9c9; color: #176b50; background: #f2faf6; }
#view-orders .order-row-action.is-review:hover { border-color: #75b497; background: #eaf7f1; }
#view-orders .order-row-action.is-danger { border-color: #efd0d5; color: #a54150; background: #fff9fa; }
#view-orders .order-row-action.is-danger:hover { border-color: #d9939e; background: #fff1f3; }
#view-orders .order-row-action.is-blocked { border-style: dashed; border-color: #d7dee8; color: #728096; background: #f8f9fb; }
#view-orders .order-row-action.is-blocked:hover { transform: none; border-color: #aeb9c8; color: #4e5e76; background: #f2f4f7; }
#view-orders .order-row-toggle { width: 32px; padding: 0; border-color: #cbd7e8; color: #50627c; }
#view-orders .order-row-toggle svg { transition: transform .18s ease; }
#view-orders .order-row-toggle[aria-expanded="true"] { border-color: #9db4d9; color: var(--ui-accent); background: #eef4ff; }
#view-orders .order-row-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
#view-orders .order-row-action:focus-visible, #view-orders .order-ledger-open:focus-visible { outline: 3px solid color-mix(in srgb, var(--ui-accent) 28%, transparent); outline-offset: 2px; }
#view-orders .order-ledger-detail { min-width: 1120px; padding: 0 18px 16px; border-bottom: 1px solid #dfe7f2; background: #f7faff; animation: order-detail-reveal .18s ease-out; }
#view-orders .order-ledger-detail-inner { padding: 14px 16px 12px; border-left: 2px solid color-mix(in srgb, var(--ui-accent) 72%, #fff); background: #fff; box-shadow: 0 8px 20px rgba(41,64,97,.055); }
#view-orders .order-ledger-detail-inner > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 12px; border-bottom: 1px solid #e5eaf2; }
#view-orders .order-ledger-detail-inner > header > div { display: flex; flex-direction: column; gap: 3px; }
#view-orders .order-ledger-detail-inner > header small { color: #7f8ca1; font-size: 10px; }
#view-orders .order-ledger-detail-inner > header b { color: #24324a; font-size: 13px; }
#view-orders .order-ledger-detail-inner dl { display: grid; grid-template-columns: repeat(4, minmax(95px,1fr)); gap: 18px; margin: 0; }
#view-orders .order-ledger-detail-inner dl div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
#view-orders .order-ledger-detail-inner dt { color: #8a96a9; font-size: 9px; }
#view-orders .order-ledger-detail-inner dd { overflow: hidden; margin: 0; color: #3e4e68; font-size: 10.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
#view-orders .order-ledger-line-head,
#view-orders .order-ledger-line { display: grid; grid-template-columns: minmax(180px,1.35fr) minmax(190px,1.4fr) minmax(80px,.55fr) minmax(115px,.8fr) minmax(125px,.85fr) minmax(110px,.75fr); align-items: center; gap: 14px; }
#view-orders .order-ledger-line-head { min-height: 34px; color: #8a96aa; font-size: 9px; font-weight: 750; letter-spacing: .03em; }
#view-orders .order-ledger-line-head span:nth-child(n+3) { text-align: right; }
#view-orders .order-ledger-line { min-height: 54px; border-top: 1px solid #edf0f5; color: #34435c; }
#view-orders .order-ledger-line > span { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
#view-orders .order-ledger-line b { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
#view-orders .order-ledger-line small { overflow: hidden; color: #8a96a8; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
#view-orders .order-ledger-line .is-number { align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
#view-orders .order-ledger-line-route { align-items: flex-end; }
#view-orders .order-ledger-line-route em { padding: 3px 7px; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 750; }
#view-orders .order-ledger-line-route em.is-pending { color: #8a651e; background: #fff5dc; }
#view-orders .order-ledger-line-route em.is-routed { color: #176b50; background: #eaf7f1; }
#view-orders .order-ledger-detail-empty { padding: 18px 0 8px; color: #8995a8; font-size: 11px; }
@keyframes order-detail-reveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* 采购订单总览：正式表格与行内动作。仅作用于采购单模块，不改变全局导航。 */
#moduleLedgerList.is-purchase-order-ledger { display: block; overflow-x: auto; padding: 0; scrollbar-width: thin; }
.purchase-ledger-table { min-width: 1080px; color: #26344b; background: #fff; }
.purchase-ledger-head,
.purchase-ledger-row { display: grid; grid-template-columns: minmax(130px,.9fr) minmax(250px,1.75fr) minmax(130px,.85fr) minmax(145px,.9fr) minmax(120px,.75fr) minmax(250px,1.45fr); align-items: center; gap: 16px; }
.purchase-ledger-head { min-height: 42px; padding: 0 18px; border-bottom: 1px solid #e2e7ef; color: #718096; background: #f7f9fc; font-size: 10px; font-weight: 750; letter-spacing: .035em; }
.purchase-ledger-head span:nth-last-child(-n+2) { text-align: right; }
.purchase-ledger-row { min-height: 74px; padding: 11px 18px; border-bottom: 1px solid #e8edf4; background: #fff; transition: background-color .15s ease, box-shadow .15s ease; }
.purchase-ledger-row:last-child { border-bottom: 0; }
.purchase-ledger-row:hover { position: relative; z-index: 1; background: #fafcff; box-shadow: inset 3px 0 0 #e06c2d; }
.purchase-ledger-row.is-cancelled { background: #fcfbfb; }
.purchase-ledger-row.is-cancelled:hover { background: #fffafa; box-shadow: inset 3px 0 0 #b75b67; }
.purchase-ledger-row > span { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.purchase-ledger-open { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.purchase-ledger-open b { color: #b94f1c; font-size: 13px; font-variant-numeric: tabular-nums; }
.purchase-ledger-open small,
.purchase-ledger-supplier small,
.purchase-ledger-status small,
.purchase-ledger-eta small,
.purchase-ledger-amount small { overflow: hidden; color: #7c899f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.purchase-ledger-open:hover b { text-decoration: underline; text-underline-offset: 3px; }
.purchase-ledger-supplier b,
.purchase-ledger-eta b,
.purchase-ledger-amount b { overflow: hidden; color: #26344b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.purchase-ledger-status em { align-self: flex-start; padding: 4px 8px; border-radius: 999px; font-size: 9.5px; font-style: normal; font-weight: 750; }
.purchase-ledger-status em.is-review { color: #946016; background: #fff5dc; }
.purchase-ledger-status em.is-progress { color: #315d9c; background: #edf4ff; }
.purchase-ledger-status em.is-complete { color: #176b50; background: #eaf7f1; }
.purchase-ledger-status em.is-cancelled { color: #92515c; background: #fff0f2; }
.purchase-ledger-amount { align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.purchase-ledger-actions { display: flex !important; flex-flow: row wrap !important; align-items: center; justify-content: flex-end; gap: 7px !important; }
.purchase-ledger-system-note { display: inline-flex; min-height: 28px; align-items: center; color: #8490a3; font-size: 10px; font-weight: 700; white-space: nowrap; }
.purchase-ledger-action { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; border: 1px solid #d7e0ec; border-radius: 9px; color: #34445d; background: #fff; cursor: pointer; font-size: 10px; font-weight: 750; white-space: nowrap; transition: transform .15s ease, border-color .15s ease, color .15s ease, background-color .15s ease; }
.purchase-ledger-action svg { width: 13px; height: 13px; }
.purchase-ledger-action:hover { transform: translateY(-1px); border-color: #a9b9d0; color: #1f58b3; background: #f6f9ff; }
.purchase-ledger-action.is-review { border-color: #b8d9c9; color: #176b50; background: #f2faf6; }
.purchase-ledger-action.is-review:hover { border-color: #75b497; background: #eaf7f1; }
.purchase-ledger-action.is-danger { border-color: #efd0d5; color: #a54150; background: #fff9fa; }
.purchase-ledger-action.is-danger:hover { border-color: #d9939e; background: #fff1f3; }
.purchase-ledger-action.is-blocked { border-style: dashed; border-color: #d7dee8; color: #728096; background: #f8f9fb; }
.purchase-ledger-action.is-blocked:hover { transform: none; border-color: #aeb9c8; color: #4e5e76; background: #f2f4f7; }
.purchase-ledger-action:focus-visible,
.purchase-ledger-open:focus-visible { outline: 3px solid color-mix(in srgb, #e06c2d 28%, transparent); outline-offset: 2px; }

@media (max-width: 1280px) {
  .purchase-ledger-head,
  .purchase-ledger-row { grid-template-columns: 125px 230px 125px 135px 110px 230px; gap: 13px; padding-inline: 14px; }
}

@media (max-width: 900px) {
  #view-orders .modern-table.order-ledger-table { min-width: 1020px; }
  #view-orders .order-ledger-table .table-row { grid-template-columns: 125px 220px 140px 125px 115px 230px; gap: 14px; padding-inline: 14px; }
  #view-orders .order-ledger-detail { min-width: 1020px; padding-inline: 14px; }
  #view-orders .order-ledger-line-head,
  #view-orders .order-ledger-line { grid-template-columns: 170px 180px 70px 105px 115px 105px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #view-orders .order-ledger-detail { animation: none; }
  #view-orders .order-row-toggle svg { transition: none; }
}

/* 8) 公司名片 / 我的名片 */
.bizcard-wrap { display: flex; flex-direction: column; gap: 18px; padding: 6px 2px; }
.bizcard-style-picker { display: grid; grid-template-columns: minmax(150px,.7fr) minmax(0,2.1fr); gap: 16px; align-items: center; padding: 13px 14px; border: 1px solid #e1e7f0; border-radius: 16px; background: #f8fafd; }
.bizcard-style-picker > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.bizcard-style-picker > div:first-child b { color: #22304a; font-size: 12.5px; }
.bizcard-style-picker > div:first-child small { color: #8a96aa; font-size: 10px; }
.bizcard-style-picker > div:last-child { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.bizcard-style-picker button { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border: 1px solid #dfe5ee; border-radius: 11px; color: #4f5e76; background: #fff; cursor: pointer; text-align: left; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.bizcard-style-picker button:hover { transform: translateY(-1px); border-color: #b7c5da; }
.bizcard-style-picker button.is-active { border-color: var(--ui-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-accent) 13%, transparent); }
.bizcard-style-picker button > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bizcard-style-picker button b { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.bizcard-style-picker button small { overflow: hidden; color: #8a96aa; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.bizcard-style-swatch { flex: none; width: 25px; height: 31px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(22,35,55,.12); }
.bizcard-style-swatch-classic { background: linear-gradient(145deg, #122448, #2f6ff2); }
.bizcard-style-swatch-minimal { background: linear-gradient(90deg, #2f6ff2 0 4px, #fff 4px 100%); }
.bizcard-style-swatch-editorial { background: linear-gradient(145deg, #f5ead5, #d4b98b); }
.bizcard-style-swatch-midnight { background: linear-gradient(145deg, #080d17, #263047 70%, #d8ad63 72% 76%, #111827 78%); }
.bizcard { --bizcard-text: #fff; --bizcard-muted: rgba(255,255,255,.64); --bizcard-rule: rgba(255,255,255,.18); position: relative; isolation: isolate; overflow: hidden; min-height: 300px; padding: 30px 32px 23px; border: 1px solid transparent; border-radius: 22px; color: var(--bizcard-text); box-shadow: 0 24px 54px rgba(18,36,72,.22); }
.bizcard > * { position: relative; z-index: 1; }
.bizcard::before,.bizcard::after { position: absolute; z-index: 0; pointer-events: none; }
.bizcard-style-classic.bizcard-company { background: linear-gradient(125deg, #122448 0%, #1e3a7a 48%, #2f6ff2 125%); }
.bizcard-style-classic.bizcard-user { background: linear-gradient(125deg, #0e3a3a 0%, #0f5c56 50%, #12a48e 130%); }
.bizcard-style-classic::before { content: ""; inset: 0; background: radial-gradient(circle at 88% -20%, rgba(255,255,255,.2), transparent 42%), radial-gradient(circle at -10% 120%, rgba(120,170,255,.22), transparent 46%); }
.bizcard-style-classic::after { content: "APUS ONE"; right: -6px; bottom: -16px; color: rgba(255,255,255,.055); font-size: 72px; font-weight: 800; letter-spacing: .05em; }
.bizcard-style-minimal { --bizcard-text: #142033; --bizcard-muted: #67748a; --bizcard-rule: #dce4ee; padding-left: 42px; border-color: #e0e6ee; background: linear-gradient(135deg,#ffffff,#f3f6fa); box-shadow: 0 20px 46px rgba(31,49,76,.14); }
.bizcard-style-minimal::before { content: ""; inset: 0 auto 0 0; width: 12px; background: var(--ui-accent); }
.bizcard-style-minimal::after { content: ""; width: 260px; height: 260px; top: -170px; right: -70px; border-radius: 50%; background: color-mix(in srgb, var(--ui-accent) 9%, transparent); }
.bizcard-style-minimal .bizcard-logo { color: var(--ui-accent); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ui-accent) 35%, #dbe4ef); }
.bizcard-style-minimal .bizcard-signature span { color: var(--ui-accent); }
.bizcard-style-editorial { --bizcard-text: #33291f; --bizcard-muted: #756550; --bizcard-rule: rgba(51,41,31,.27); border-color: #dcc69f; background: linear-gradient(135deg,#f7eddc,#ead8b8); box-shadow: 0 22px 50px rgba(91,67,35,.22); font-family: Georgia, "Noto Serif SC", "Songti SC", serif; }
.bizcard-style-editorial::before { content: ""; inset: 15px; border: 1px solid rgba(51,41,31,.2); border-radius: 14px; }
.bizcard-style-editorial::after { content: "A"; right: 18px; bottom: -68px; color: rgba(154,68,58,.07); font: 800 210px Georgia,serif; }
.bizcard-style-editorial .bizcard-head { display: grid; grid-template-columns: minmax(0,1fr) 64px; align-items: start; }
.bizcard-style-editorial .bizcard-head > .bizcard-logo { grid-column: 2; grid-row: 1; width: 60px; height: 60px; border-radius: 50%; color: #fff8ea; background: #9a443a; box-shadow: none; }
.bizcard-style-editorial .bizcard-head > div { grid-column: 1; grid-row: 1; }
.bizcard-style-editorial .bizcard-head h3 { font-size: 28px; font-weight: 650; }
.bizcard-style-editorial .bizcard-lines { grid-template-columns: repeat(3,minmax(0,1fr)); }
.bizcard-style-editorial .bizcard-signature span { color: #9a443a; }
.bizcard-style-midnight { --bizcard-text: #f7f3e8; --bizcard-muted: #a9b2c2; --bizcard-rule: rgba(216,173,99,.36); border-color: rgba(216,173,99,.56); background: linear-gradient(125deg,#080d17,#141e2e); box-shadow: 0 26px 58px rgba(0,0,0,.38); }
.bizcard-style-midnight::before { content: ""; inset: -45%; opacity: .35; background: repeating-linear-gradient(132deg,transparent 0 54px,rgba(216,173,99,.09) 55px 56px); transform: rotate(-4deg); }
.bizcard-style-midnight::after { content: "◆"; right: 26px; top: 21px; color: #d8ad63; font-size: 18px; }
.bizcard-style-midnight .bizcard-logo { color: #d8ad63; background: rgba(216,173,99,.07); box-shadow: inset 0 0 0 1px rgba(216,173,99,.5); }
.bizcard-style-midnight .bizcard-lines li { padding: 11px 13px; border: 1px solid rgba(216,173,99,.13); border-radius: 12px; background: rgba(216,173,99,.055); }
.bizcard-style-midnight .bizcard-signature span { color: #d8ad63; }
.bizcard-template-label { position: absolute; top: 20px; right: 24px; padding: 5px 8px; border: 1px solid var(--bizcard-rule); border-radius: 999px; color: var(--bizcard-muted); font-size: 8.5px; font-weight: 750; letter-spacing: .08em; }
.bizcard-head { position: relative; display: flex; align-items: center; gap: 16px; min-width: 0; }
.bizcard-logo { display: grid; place-items: center; flex: none; width: 58px; height: 58px; border-radius: 16px; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.24); font-size: 23px; font-weight: 800; }
.bizcard-head > div { min-width: 0; }
.bizcard-head small { color: var(--bizcard-muted); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.bizcard-head h3 { margin: 5px 0 3px; overflow-wrap: break-word; font-size: 25px; letter-spacing: 0; }
.bizcard-head p { margin: 0; color: var(--bizcard-muted); font-size: 12.5px; overflow-wrap: break-word; }
.bizcard-lines { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 26px; margin: 24px 0 0; padding: 18px 0 0; border-top: 1px solid var(--bizcard-rule); list-style: none; }
.bizcard-lines li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bizcard-lines small { color: var(--bizcard-muted); font-size: 10px; letter-spacing: .08em; }
.bizcard-lines b { font-size: 13.5px; font-weight: 600; overflow-wrap: break-word; }
.bizcard-signature { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-top: 22px; color: var(--bizcard-muted); }
.bizcard-signature span { font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.bizcard-signature small { font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; }
.bizcard-actions { display: flex; align-items: center; gap: 10px; }
.bizcard-actions > span { color: #8b96ab; font-size: 11.5px; }

/* 9) 用户资料页增强 */
.profile-hero-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 16px; border-top: 1px dashed #e2e8f2; }
.profile-hero-actions > span { color: #96a0b4; font-size: 11.5px; }
.profile-activity-card { grid-column: 1 / -1; }
.profile-activity-list { margin: 0; padding: 0; list-style: none; }
.profile-activity-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 14px; padding: 11px 2px; border-top: 1px solid #eef2f7; }
.profile-activity-list li:first-child { border-top: 0; }
.profile-activity-list li.empty { display: block; color: #97a1b5; font-size: 12.5px; }
.profile-activity-list b { grid-column: 1; grid-row: 1; font-size: 12.5px; overflow-wrap: break-word; }
.profile-activity-list small { grid-column: 1; grid-row: 2; margin-top: 3px; color: #8b96ab; font-size: 11px; overflow-wrap: break-word; }
.profile-activity-list em { grid-column: 2; grid-row: 1 / 3; padding: 3px 10px; border-radius: 999px; color: #17795c; background: #e3f5ec; font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; }

/* 10) 弹窗与通知（桌面端；绝不动 transform 定位） */
@media (min-width: 851px) {
  .action-modal .action-sheet { border: 1px solid #e2e8f2; border-radius: 20px; box-shadow: 0 36px 100px rgba(13,28,58,.32), 0 4px 16px rgba(13,28,58,.1); }
  .account-menu { border-radius: 18px; box-shadow: 0 28px 70px rgba(24,43,65,.2), 0 4px 12px rgba(24,43,65,.07); }
  .account-menu button b { font-size: 12px; }
  .account-menu button small { font-size: 10px; }
  .account-menu header b { font-size: 12.5px; }
  .account-menu header small { font-size: 10px; }
}
.toast { border: 1px solid #dfe7f2; border-radius: 14px; box-shadow: 0 18px 44px rgba(13,28,58,.16); }

/* 11) 看板卡片悬浮反馈 */
.dark-board-shell .lane-card { transition: transform .18s ease, box-shadow .18s ease; }
.dark-board-shell .lane-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.2); }

/* 12) 卡片入场动效（仅 transform/opacity，性能安全） */
.customer-directory-list.is-card-grid > *, .modern-table.is-card-mode > .order-card { animation: v12Rise .4s cubic-bezier(.2,.7,.2,1) both; }
.customer-directory-list.is-card-grid > *:nth-child(2), .modern-table.is-card-mode > .order-card:nth-child(3) { animation-delay: .04s; }
.customer-directory-list.is-card-grid > *:nth-child(3), .modern-table.is-card-mode > .order-card:nth-child(4) { animation-delay: .08s; }
.customer-directory-list.is-card-grid > *:nth-child(4), .modern-table.is-card-mode > .order-card:nth-child(5) { animation-delay: .12s; }
.customer-directory-list.is-card-grid > *:nth-child(5), .modern-table.is-card-mode > .order-card:nth-child(6) { animation-delay: .16s; }
.customer-directory-list.is-card-grid > *:nth-child(n+6), .modern-table.is-card-mode > .order-card:nth-child(n+7) { animation-delay: .2s; }

/* 13) 响应式与动效兜底 */
@media (max-width: 720px) {
  .customer-directory-list.is-card-grid, #view-orders .modern-table.is-card-mode { grid-template-columns: 1fr; }
  .bizcard-style-picker { grid-template-columns: 1fr; }
  .bizcard-style-picker > div:last-child { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bizcard-lines { grid-template-columns: 1fr; }
  .bizcard { padding: 24px 22px 20px; }
  .bizcard-style-minimal { padding-left: 34px; }
  .bizcard-head h3 { font-size: 21px; }
  .bizcard-style-editorial .bizcard-lines { grid-template-columns: 1fr; }
  .bizcard-actions { flex-wrap: wrap; }
  .bizcard-actions > span { flex-basis: 100%; }
  .customer-grid-foot { flex-wrap: wrap; gap: 10px 14px; }
  .customer-grid-terms { margin-left: 0; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .customer-directory-list.is-card-grid > *, .modern-table.is-card-mode > .order-card { animation: none; }
  .customer-directory-list .sig-row-button, #view-orders .order-card, .dark-board-shell .lane-card, .module-card { transition: none; }
}


/* ==================== v13b · 深色侧栏 + 彩色身份体系 ==================== */
/* 1) 修复：.sig-row span 基础样式导致名片头部竖排 —— 提升权重强制横排 */
.customer-grid-card .customer-grid-head { display: flex; flex-direction: row; align-items: center; gap: 12px; min-width: 0; }
.customer-grid-card .customer-grid-lines { display: flex; flex-direction: column; gap: 6px; }
.customer-grid-card .customer-grid-lines > span { flex-direction: row; align-items: center; gap: 8px; }
.customer-grid-card .customer-grid-foot { display: flex; flex-direction: row; align-items: flex-end; gap: 18px; margin-top: auto; padding-top: 13px; border-top: 1px dashed #e7ecf4; }

/* 2) 头像字母全部居中 */
.avatar, .top-avatar, .account-menu-avatar, .rail-account .avatar-small, .profile-avatar, .bizcard-logo { display: grid; place-items: center; padding: 0; line-height: 1; text-align: center; }

/* 3) 客户专属色身份体系（--cust-hue 由 JS 按客户编号确定性生成） */
.customer-logo { background: linear-gradient(145deg, hsl(var(--cust-hue, 222) 88% 95%), hsl(var(--cust-hue, 222) 72% 88%)); color: hsl(var(--cust-hue, 222) 62% 38%); box-shadow: inset 0 0 0 1px hsl(var(--cust-hue, 222) 60% 82% / .65); }
.customer-directory-list .customer-grid-card { position: relative; overflow: hidden; }
.customer-directory-list .customer-grid-card::before { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, hsl(var(--cust-hue, 222) 72% 58%), hsl(var(--cust-hue, 222) 82% 74%)); }
.customer-directory-list .customer-grid-card > * { position: relative; z-index: 1; }

/* 4) 名片 / 列表 视图切换器 */
.customer-directory-tools { display: flex; align-items: center; gap: 10px; }
.customer-view-toggle { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #e2e8f2; border-radius: 11px; background: #f1f4fa; }
.customer-view-toggle button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; color: #68738a; background: transparent; cursor: pointer; font-size: 11.5px; font-weight: 600; transition: color .16s ease, background .16s ease, box-shadow .16s ease; }
.customer-view-toggle button:hover { color: #2f6ff2; }
.customer-view-toggle button.active { color: #2f6ff2; background: #fff; box-shadow: 0 2px 8px rgba(23,43,99,.12); }
.customer-view-toggle svg { width: 13px; height: 13px; }

/* 5) 客户名片详情：大 Logo 头版 */
.customer-card-main-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.customer-card-logo { width: 64px; height: 64px; border-radius: 18px; font-size: 20px; }

/* 6) 深色高级侧栏：全局框架瞬间换气质 */
@media (min-width: 851px) {
  body:not(.board-mode) .rail { color: #c6d2e8; background: linear-gradient(178deg, #101f3c 0%, #0c1830 52%, #0a1428 100%); border-right: 1px solid rgba(255,255,255,.06); box-shadow: 10px 0 34px rgba(8,18,40,.3); }
  body:not(.board-mode) .brand-mark { background: rgba(255,255,255,.09); }
  body:not(.board-mode) .brand-mark:hover { background: rgba(255,255,255,.15); }
  body:not(.board-mode) .rail-brand { color: #f3f7ff; }
  body:not(.board-mode) .rail-brand:hover { background: rgba(255,255,255,.06); }
  body:not(.board-mode) .rail-brand small { color: #7c8fb1; }
  body:not(.board-mode) .role-nav-heading small { color: #68799a; }
  body:not(.board-mode) .role-nav-heading b { color: #a9b9d6; }
  body:not(.board-mode) .full-nav-group { color: #5f7194; }
  body:not(.board-mode) .full-nav-group::after { background: rgba(255,255,255,.08); }
  body:not(.board-mode) .role-nav-divider { color: #5f7194; }
  body:not(.board-mode) .role-nav-divider::after { background: rgba(255,255,255,.08); }
  body:not(.board-mode) .rail .top-nav { scrollbar-color: #2c3d63 transparent; }
  body:not(.board-mode) .rail .top-nav > button { color: #aebdd9; }
  body:not(.board-mode) .rail .top-nav > button:hover { color: #fff; background: color-mix(in srgb, var(--nav-accent, #5b8cff) 15%, transparent); }
  body:not(.board-mode) .rail .top-nav > button.is-active { color: #fff; background: linear-gradient(90deg, color-mix(in srgb, var(--nav-accent, #5b8cff) 26%, transparent), color-mix(in srgb, var(--nav-accent, #5b8cff) 9%, transparent)); box-shadow: inset 3px 0 0 var(--nav-accent, #5b8cff), 0 8px 20px color-mix(in srgb, var(--nav-accent, #5b8cff) 22%, transparent); }
  body:not(.board-mode) .rail .top-nav > button .role-nav-icon { color: color-mix(in srgb, var(--nav-accent, #8fb0ff) 82%, #ffffff); background: color-mix(in srgb, var(--nav-accent, #5b8cff) 17%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nav-accent, #5b8cff) 24%, transparent); }
  body:not(.board-mode) .rail .top-nav > button.is-active .role-nav-icon { color: #fff; background: linear-gradient(135deg, var(--nav-accent, #5b8cff), color-mix(in srgb, var(--nav-accent, #5b8cff) 70%, #ffffff)); box-shadow: 0 6px 16px color-mix(in srgb, var(--nav-accent, #5b8cff) 42%, transparent); }
  body:not(.board-mode) .role-nav-copy small { color: #7385ab; }
  body:not(.board-mode) .rail .top-nav > button:hover .role-nav-arrow { color: color-mix(in srgb, var(--nav-accent, #8fb0ff) 85%, #ffffff); }
  body:not(.board-mode) .rail-utility { color: #8fa1c4; }
  body:not(.board-mode) .rail-utility:hover { color: #fff; background: rgba(255,255,255,.07); }
  body:not(.board-mode) .rail-bottom { border-top-color: rgba(255,255,255,.08); }
  body:not(.board-mode) .rail-account { color: #dbe5f7; background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); box-shadow: none; }
  body:not(.board-mode) .rail-account:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.16); box-shadow: none; }
  body:not(.board-mode) .rail-account small { color: #7c8fb1; }
  body:not(.board-mode) .rail-account > svg { color: #7c8fb1; }
}

/* 7) 顶栏与深色侧栏呼应：品牌高光描边 */
.topbar { box-shadow: 0 1px 0 rgba(47,111,242,.06), 0 8px 24px rgba(23,43,99,.04); }

/* 8) 响应式兜底 */
@media (max-width: 720px) {
  .customer-directory-tools { width: 100%; flex-wrap: wrap; }
  .customer-card-main-id { align-items: flex-start; }
  .customer-card-logo { width: 52px; height: 52px; border-radius: 15px; font-size: 16px; }
}


/* ==================== v14 主题色 · 侧栏外观 · 密度 · 我的工作台 ==================== */

/* 1) 主题色变量：全局强调色随 --ui-accent 联动 */
:root { --ui-accent: #2f6ff2; --teal: var(--ui-accent); }
body[data-accent="indigo"] { --ui-accent: #4f46e5; }
body[data-accent="teal"] { --ui-accent: #0d8796; }
body[data-accent="emerald"] { --ui-accent: #059669; }
body[data-accent="violet"] { --ui-accent: #7c3aed; }
body[data-accent="amber"] { --ui-accent: #d97706; }
body[data-accent="crimson"] { --ui-accent: #dc2626; }
body[data-accent="slate"] { --ui-accent: #475569; }

/* 品牌色覆盖：让硬编码色跟随主题 */
.primary-button { background: var(--ui-accent); box-shadow: 0 8px 18px color-mix(in srgb, var(--ui-accent) 22%, transparent); }
.primary-button:hover { background: color-mix(in srgb, var(--ui-accent) 88%, #000); box-shadow: 0 11px 22px color-mix(in srgb, var(--ui-accent) 26%, transparent); }
.primary-button.dark { background: #13373e; box-shadow: 0 8px 18px rgba(19,55,62,.14); }
.top-nav.is-active, .top-avatar, .account-menu-avatar, .profile-avatar { background: linear-gradient(135deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent) 68%, #fff)); }
#view-orders .order-card-id b, .order-code { color: var(--ui-accent); }
.mini-progress i { background: linear-gradient(90deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent) 60%, #fff)); }
.customer-view-toggle button.active { color: #fff; background: var(--ui-accent); box-shadow: 0 6px 14px color-mix(in srgb, var(--ui-accent) 24%, transparent); }
.app-launcher-button:hover, .icon-button:hover, .search-icon-button:hover { color: var(--ui-accent); border-color: color-mix(in srgb, var(--ui-accent) 40%, transparent); }
.process-step.active > span { background: var(--ui-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ui-accent) 14%, transparent); }
.bars i.active { background: var(--ui-accent); }
.module-card:hover { box-shadow: 0 12px 26px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
.ghost-button:hover { color: var(--ui-accent); border-color: color-mix(in srgb, var(--ui-accent) 45%, transparent); }
a { color: var(--ui-accent); }

/* 2) 浅色侧栏（data-rail="light"）：恢复清爽浅色系 */
@media (min-width: 851px) {
  body[data-rail="light"]:not(.board-mode) .rail { color: #3d4c66; background: linear-gradient(180deg, #fcfdff 0%, #f5f8fc 100%); border-right: 1px solid #e6eaf3; box-shadow: 8px 0 28px rgba(23,43,99,.05); }
  body[data-rail="light"]:not(.board-mode) .rail-brand { color: #16233c; }
  body[data-rail="light"]:not(.board-mode) .rail-brand:hover { background: #fff; }
  body[data-rail="light"]:not(.board-mode) .rail-brand small { color: #8b96ab; }
  body[data-rail="light"]:not(.board-mode) .rail .top-nav { scrollbar-color: #cdd6e4 transparent; }
  body[data-rail="light"]:not(.board-mode) .rail .top-nav > button { color: #4b5870; }
  body[data-rail="light"]:not(.board-mode) .rail .top-nav > button:hover { color: var(--nav-accent, var(--ui-accent)); background: color-mix(in srgb, var(--nav-accent, var(--ui-accent)) 7%, #fff); }
  body[data-rail="light"]:not(.board-mode) .rail .top-nav > button.is-active { color: var(--nav-accent, var(--ui-accent)); background: color-mix(in srgb, var(--nav-accent, var(--ui-accent)) 11%, #fff); box-shadow: inset 3px 0 0 var(--nav-accent, var(--ui-accent)), 0 8px 18px color-mix(in srgb, var(--nav-accent, var(--ui-accent)) 14%, transparent); }
  body[data-rail="light"]:not(.board-mode) .rail .top-nav > button .role-nav-icon { color: var(--nav-accent, var(--ui-accent)); background: color-mix(in srgb, var(--nav-accent, var(--ui-accent)) 12%, #fff); box-shadow: none; }
  body[data-rail="light"]:not(.board-mode) .rail .top-nav > button.is-active .role-nav-icon { color: #fff; background: linear-gradient(135deg, var(--nav-accent, var(--ui-accent)), color-mix(in srgb, var(--nav-accent, var(--ui-accent)) 70%, #fff)); }
  body[data-rail="light"]:not(.board-mode) .rail .top-nav > button:hover .role-nav-arrow { color: var(--nav-accent, var(--ui-accent)); }
  body[data-rail="light"]:not(.board-mode) .role-nav-heading b { color: #3d4c66; }
  body[data-rail="light"]:not(.board-mode) .role-nav-heading small { color: #68799a; }
  body[data-rail="light"]:not(.board-mode) .rail-utility { color: #68799a; }
  body[data-rail="light"]:not(.board-mode) .rail-utility:hover { color: var(--ui-accent); background: #fff; }
  body[data-rail="light"]:not(.board-mode) .rail-bottom { border-top-color: #e6eaf3; }
  body[data-rail="light"]:not(.board-mode) .rail-account { color: #2b3a55; background: #fff; border-color: #e6eaf3; box-shadow: 0 2px 10px rgba(23,43,99,.06); }
  body[data-rail="light"]:not(.board-mode) .rail-account:hover { background: #fff; border-color: #dbe2ee; box-shadow: 0 8px 20px rgba(23,43,99,.1); }
  body[data-rail="light"]:not(.board-mode) .rail-account small { color: #8b96ab; }
  body[data-rail="light"]:not(.board-mode) .rail-account > svg { color: #8b96ab; }
}

/* 3) 主题晕染侧栏（data-rail="accent"）：深色结构 + 主题色渲染 */
@media (min-width: 851px) {
  body[data-rail="accent"]:not(.board-mode) .rail { color: #e8edf8; background: linear-gradient(178deg, color-mix(in srgb, var(--ui-accent) 38%, #0d1628) 0%, color-mix(in srgb, var(--ui-accent) 18%, #0a1224) 58%, #0a1224 100%); border-right: 1px solid rgba(255,255,255,.08); }
  body[data-rail="accent"]:not(.board-mode) .rail-brand small { color: rgba(232,237,248,.62); }
  body[data-rail="accent"]:not(.board-mode) .rail .top-nav > button { color: rgba(232,237,248,.82); }
  body[data-rail="accent"]:not(.board-mode) .role-nav-heading b { color: rgba(232,237,248,.66); }
  body[data-rail="accent"]:not(.board-mode) .role-nav-heading small { color: rgba(232,237,248,.45); }
}

/* 4) 艺术留白（默认宽松密度） */
.content { padding: 36px 42px 84px; }
.page-intro { margin-bottom: 32px; }
.page-intro p { margin-top: 10px; font-size: 13px; line-height: 1.7; }
.signature-panel { padding: 26px; }
.signature-grid, .dashboard-grid, .finance-grid, .profile-grid { gap: 20px; }
.home-grid { gap: 20px; }
.focus-card { padding: 30px 32px; }
.summary-strip { gap: 14px; }
.summary-strip > div { padding: 16px 20px; }
.customer-directory-list.is-card-grid { gap: 18px; }
.customer-directory-list .customer-grid-card { padding: 22px; gap: 15px; }
.customer-grid-lines { gap: 8px; }
#view-orders .order-card, .modern-table.is-card-mode .order-card { padding: 22px; }
.modern-table.is-card-mode { gap: 18px; padding: 20px; }
.customer-directory-list { gap: 14px; }
.customer-directory-list .sig-row-button { min-height: 68px; padding: 15px 18px; }
.sig-row small { line-height: 1.6; }
.profile-hero { padding: 28px 30px; }
.module-section { padding: 22px; }
.action-sheet .action-body { line-height: 1.6; }

/* 5) 标准密度（data-density="compact"）：信息更紧凑 */
body[data-density="compact"] .content { padding: 26px 30px 60px; }
body[data-density="compact"] .page-intro { margin-bottom: 22px; }
body[data-density="compact"] .signature-panel { padding: 16px; }
body[data-density="compact"] .signature-grid, body[data-density="compact"] .dashboard-grid, body[data-density="compact"] .finance-grid, body[data-density="compact"] .profile-grid { gap: 12px; }
body[data-density="compact"] .home-grid { gap: 12px; }
body[data-density="compact"] .focus-card { padding: 20px 22px; }
body[data-density="compact"] .summary-strip > div { padding: 10px 14px; }
body[data-density="compact"] .customer-directory-list.is-card-grid { gap: 12px; }
body[data-density="compact"] .customer-directory-list .customer-grid-card { padding: 15px; gap: 10px; }
body[data-density="compact"] #view-orders .order-card, body[data-density="compact"] .modern-table.is-card-mode .order-card { padding: 15px; }
body[data-density="compact"] .modern-table.is-card-mode { gap: 12px; padding: 12px; }
body[data-density="compact"] .customer-directory-list { gap: 8px; }
body[data-density="compact"] .customer-directory-list .sig-row-button { min-height: 56px; padding: 10px 14px; }
body[data-density="compact"] .profile-hero { padding: 20px 22px; }
body[data-density="compact"] .module-section { padding: 14px; }

/* 6) 我的工作台 */
.studio-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.studio-widget { grid-column: span 4; display: flex; flex-direction: column; min-height: 200px; padding: 20px; border: 1px solid var(--v13-line, #e6ebf4); border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(16,32,64,.04); transition: transform .2s ease, box-shadow .2s ease; animation: v12Rise .4s ease both; }
.studio-widget:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,32,64,.08); }
.studio-widget[data-studio-widget^="flow"] { grid-column: span 6; }
.studio-widget > header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.studio-widget > header b { flex: 1; font-size: 14px; letter-spacing: -.01em; }
.studio-widget-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 11%, #fff); }
.studio-widget-icon svg { width: 17px; height: 17px; }
.studio-widget > header button[data-studio-remove] { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 8px; color: #a5b0c2; background: transparent; cursor: pointer; opacity: 0; transition: opacity .18s ease, background .18s ease, color .18s ease; }
.studio-widget:hover > header button[data-studio-remove] { opacity: 1; }
.studio-widget > header button[data-studio-remove]:hover { color: #dc2626; background: #fdf0f0; }
.studio-widget > header button[data-studio-remove] svg { width: 13px; height: 13px; transform: rotate(45deg); }
.studio-widget-body { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.studio-loading { padding: 24px 0; color: #8b96ab; font-size: 12px; text-align: center; }
.studio-metric { display: flex; flex-direction: column; gap: 5px; }
.studio-metric b { font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.studio-metric span { color: #3d4c66; font-size: 13px; font-weight: 600; }
.studio-metric small { color: #8b96ab; font-size: 11px; line-height: 1.5; }
.studio-widget-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: auto; padding: 8px 13px; border: 1px solid color-mix(in srgb, var(--ui-accent) 30%, #e6ebf4); border-radius: 10px; color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 5%, #fff); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.studio-widget-link:hover { background: color-mix(in srgb, var(--ui-accent) 10%, #fff); transform: translateY(-1px); }
.studio-widget-link svg { width: 12px; height: 12px; }
.studio-clock { display: flex; flex-direction: column; gap: 6px; }
.studio-clock b { color: var(--ui-accent); font-size: 34px; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.studio-clock span { color: #3d4c66; font-size: 13px; font-weight: 600; }
.studio-clock small { color: #8b96ab; font-size: 11px; }
.studio-inbox { display: flex; flex-direction: column; gap: 8px; }
.studio-inbox button { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px; border: 1px solid #eef1f7; border-radius: 12px; background: #fafbfd; text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.studio-inbox button:hover { border-color: color-mix(in srgb, var(--ui-accent) 35%, #eef1f7); background: #fff; }
.studio-inbox button b { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.studio-inbox button small { overflow: hidden; color: #8b96ab; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.studio-inbox p { margin: 8px 0; color: #8b96ab; font-size: 12px; }
.studio-board-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.studio-board-mini span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; background: color-mix(in srgb, var(--ui-accent) 5%, #f7f9fd); text-align: center; }
.studio-board-mini small { color: #68799a; font-size: 10.5px; font-weight: 600; }
.studio-board-mini b { color: var(--ui-accent); font-size: 20px; letter-spacing: -.02em; }
.studio-flow-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.studio-flow-actions button { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 14px; border: 1px solid #e9edf5; border-radius: 13px; color: #3d4c66; background: #fafbfd; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.studio-flow-actions button:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--ui-accent) 38%, #e9edf5); background: #fff; box-shadow: 0 8px 18px rgba(16,32,64,.07); }
.studio-flow-actions button svg { width: 17px; height: 17px; color: var(--ui-accent); }
.studio-flow-actions button.is-primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent) 74%, #000)); box-shadow: 0 8px 18px color-mix(in srgb, var(--ui-accent) 24%, transparent); }
.studio-flow-actions button.is-primary svg { color: #fff; }
.studio-flow-actions button.is-primary:hover { box-shadow: 0 12px 24px color-mix(in srgb, var(--ui-accent) 30%, transparent); }
.studio-recent { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; padding-top: 12px; border-top: 1px dashed #e6ebf4; }
.studio-recent > small { color: #17795c; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.studio-recent-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #d9efe3; border-radius: 12px; background: linear-gradient(150deg, #f2fbf6, #fff); animation: v12Rise .35s ease both; }
.studio-recent-item > span { display: grid; flex: none; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: #fff; background: #28a879; }
.studio-recent-item > span svg { width: 13px; height: 13px; }
.studio-recent-item > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.studio-recent-item b { font-size: 12.5px; }
.studio-recent-item small { overflow: hidden; color: #68799a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.studio-recent-item > button { flex: none; padding: 6px 11px; border: 1px solid #cfe7da; border-radius: 8px; color: #17795c; background: #fff; font-size: 11px; font-weight: 600; cursor: pointer; }
.studio-recent-item > button:hover { background: #f2fbf6; }
.studio-add-panel { margin-bottom: 18px; padding: 16px 18px; border: 1.5px dashed color-mix(in srgb, var(--ui-accent) 35%, #dbe2ee); border-radius: 16px; background: color-mix(in srgb, var(--ui-accent) 3%, #fff); }
.studio-add-panel > small { display: block; margin-bottom: 10px; color: #68799a; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.studio-add-panel > div { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-add-panel button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid #e6ebf4; border-radius: 10px; color: #3d4c66; background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .18s ease, color .18s ease, transform .18s ease; }
.studio-add-panel button:hover { border-color: color-mix(in srgb, var(--ui-accent) 45%, #e6ebf4); color: var(--ui-accent); transform: translateY(-1px); }
.studio-add-panel button svg { width: 14px; height: 14px; }
.studio-add-panel span { color: #8b96ab; font-size: 12px; }
@media (max-width: 1100px) {
  .studio-widget, .studio-widget[data-studio-widget^="flow"] { grid-column: span 6; }
}
@media (max-width: 720px) {
  .studio-widget, .studio-widget[data-studio-widget^="flow"] { grid-column: span 12; }
  .studio-flow-actions { grid-template-columns: repeat(2, 1fr); }
  .studio-board-mini { grid-template-columns: repeat(3, 1fr); }
}

/* 7) 外观个性化弹窗 */
.appearance-grid { display: flex; flex-direction: column; gap: 16px; }
.appearance-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid #e9edf5; border-radius: 16px; background: #fafbfd; }
.appearance-card > small { color: #8b96ab; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; }
.appearance-card > b { font-size: 14px; }
.appearance-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.appearance-swatches > button, .appearance-custom { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1.5px solid #e6ebf4; border-radius: 11px; color: #3d4c66; background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.appearance-swatches > button i, .appearance-custom i { display: block; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.appearance-swatches > button.active, .appearance-custom.active { border-color: var(--ui-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 15%, transparent); }
.appearance-custom { position: relative; overflow: hidden; }
.appearance-custom i { background: conic-gradient(#ef626d, #f1a83b, #28a879, #2f6ff2, #7c3aed, #ef626d); }
.appearance-custom input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.appearance-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-top: 10px; }
.appearance-options > button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 13px 14px; border: 1.5px solid #e6ebf4; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.appearance-options > button b { font-size: 13px; }
.appearance-options > button small { color: #8b96ab; font-size: 11px; line-height: 1.5; }
.appearance-options > button.active { border-color: var(--ui-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 15%, transparent); }

/* v14b 头像文字保持白色 */
.top-nav.is-active, .top-avatar, .account-menu-avatar, .profile-avatar { color: #fff; }
.top-nav.is-active svg, .top-avatar svg { color: #fff; }


/* v14c 工作台：任意导航模块卡片 */
.studio-kpis { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-kpis > span { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1; min-width: 84px; padding: 11px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ui-accent) 5%, #f7f9fd); }
.studio-kpis small { color: #68799a; font-size: 10.5px; font-weight: 600; }
.studio-kpis b { color: var(--ui-accent); font-size: 18px; letter-spacing: -.02em; }
.studio-rows { display: flex; flex-direction: column; gap: 8px; }
.studio-rows button { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px; border: 1px solid #eef1f7; border-radius: 12px; background: #fafbfd; text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.studio-rows button:hover { border-color: color-mix(in srgb, var(--ui-accent) 35%, #eef1f7); background: #fff; }
.studio-rows button b { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.studio-rows button small { overflow: hidden; color: #8b96ab; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.studio-empty { margin: 6px 0; color: #8b96ab; font-size: 12px; }
.studio-view-jump p { margin: 4px 0 0; color: #68799a; font-size: 12px; line-height: 1.7; }
.studio-add-group { margin-bottom: 12px; }
.studio-add-group:last-child { margin-bottom: 0; }
.studio-add-group > small { display: block; margin-bottom: 8px; color: #68799a; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.studio-add-group > div { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-add-panel { max-height: 340px; overflow: auto; }


/* v14d 添加模块按钮：展开时 + 旋转为 × */
[data-studio-add] svg { transition: transform .22s ease; }
[data-studio-add].is-open svg { transform: rotate(45deg); }


/* v14f 工作台模块拖拽排序 */
.studio-widget > header { cursor: grab; }
.studio-widget > header:active { cursor: grabbing; }
.studio-drag-handle { display: grid; flex: none; place-items: center; width: 22px; height: 26px; margin-left: auto; color: #c3ccd9; cursor: grab; transition: color .18s ease; }
.studio-drag-handle svg { width: 14px; height: 14px; }
.studio-widget:hover .studio-drag-handle { color: #8b96ab; }
.studio-widget > header .studio-drag-handle + button[data-studio-remove] { margin-left: 2px; }
.studio-widget.is-dragging { opacity: .45; transform: scale(.985); }
.studio-widget.drop-before, .studio-widget.drop-after { outline: 2px dashed var(--ui-accent); outline-offset: 4px; }
.studio-widget.drop-before { box-shadow: inset 4px 0 0 var(--ui-accent); }
.studio-widget.drop-after { box-shadow: inset -4px 0 0 var(--ui-accent); }


/* ==================== v15 工作台自由展示板 ==================== */
.studio-canvas { position: relative; width: 100%; border-radius: 20px; transition: background-image .25s ease; }
.studio-canvas[data-snap="on"] { background-image: radial-gradient(circle, rgba(16,32,64,.09) 1px, transparent 1.4px); background-size: 24px 24px; }
.studio-canvas .table-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.studio-widget { position: absolute; --widget-tint: var(--ui-accent); }
.studio-widget.is-moving { z-index: 30; box-shadow: 0 22px 46px rgba(16,32,64,.18); transition: none; animation: none; }
.studio-widget-body { overflow: auto; min-height: 0; scrollbar-width: thin; }

/* 头部控件：设置齿轮 + 移除 */
.studio-widget > header button[data-studio-settings], .studio-widget > header button[data-studio-remove] { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 8px; color: #a5b0c2; background: transparent; cursor: pointer; opacity: 0; transition: opacity .18s ease, background .18s ease, color .18s ease; }
.studio-widget:hover > header button[data-studio-settings], .studio-widget:hover > header button[data-studio-remove] { opacity: 1; }
.studio-widget > header button[data-studio-settings]:hover { color: var(--widget-tint); background: color-mix(in srgb, var(--widget-tint) 9%, #fff); }
.studio-widget > header button[data-studio-remove]:hover { color: #dc2626; background: #fdf0f0; }
.studio-widget > header button svg { width: 13px; height: 13px; }
.studio-widget > header button[data-studio-remove] svg { transform: rotate(45deg); }

/* 右下角缩放手柄 */
.studio-resize-handle { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #c3ccd9; cursor: nwse-resize; opacity: 0; transition: opacity .18s ease, color .18s ease, background .18s ease; }
.studio-widget:hover .studio-resize-handle { opacity: 1; }
.studio-resize-handle:hover { color: var(--widget-tint); background: color-mix(in srgb, var(--widget-tint) 9%, #fff); }
.studio-resize-handle svg { width: 13px; height: 13px; }

/* 板块设置弹层 */
.studio-settings { position: absolute; z-index: 40; top: 46px; right: 12px; width: 264px; padding: 14px; border: 1px solid #e6ebf4; border-radius: 14px; background: #fff; box-shadow: 0 18px 42px rgba(16,32,64,.16); animation: v12Rise .22s ease both; }
.studio-settings > small { display: block; margin: 0 0 7px; color: #8b96ab; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.studio-settings-variants { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.studio-settings-variants button { padding: 7px 11px; border: 1.5px solid #e6ebf4; border-radius: 9px; color: #3d4c66; background: #fff; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.studio-settings-variants button.active { border-color: var(--widget-tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--widget-tint) 14%, transparent); }
.studio-settings-tints { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-settings-tints > button, .studio-tint-custom { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1.5px solid #e6ebf4; border-radius: 9px; color: #3d4c66; background: #fff; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.studio-settings-tints > button i, .studio-tint-custom i { display: block; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.studio-settings-tints > button i[data-theme-dot] { background: linear-gradient(135deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent) 60%, #fff)); }
.studio-settings-tints > button.active { border-color: var(--widget-tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--widget-tint) 14%, transparent); }
.studio-tint-custom { overflow: hidden; }
.studio-tint-custom i { background: conic-gradient(#ef626d, #f1a83b, #28a879, #2f6ff2, #7c3aed, #ef626d); }
.studio-tint-custom input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* 板块配色生效点 */
.studio-widget .studio-widget-icon { color: var(--widget-tint); background: color-mix(in srgb, var(--widget-tint) 11%, #fff); }
.studio-widget .studio-metric b, .studio-widget .studio-clock b, .studio-widget .studio-kpis b, .studio-widget .studio-board-mini b, .studio-widget .studio-board-inline b { color: var(--widget-tint); }
.studio-widget .studio-kpis > span, .studio-widget .studio-board-mini span { background: color-mix(in srgb, var(--widget-tint) 5%, #f7f9fd); }
.studio-widget .studio-flow-actions button svg { color: var(--widget-tint); }
.studio-widget .studio-flow-actions button.is-primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--widget-tint), color-mix(in srgb, var(--widget-tint) 74%, #000)); box-shadow: 0 8px 18px color-mix(in srgb, var(--widget-tint) 24%, transparent); }
.studio-widget .studio-flow-actions button.is-primary svg { color: #fff; }
.studio-widget .studio-widget-link { color: var(--widget-tint); border-color: color-mix(in srgb, var(--widget-tint) 30%, #e6ebf4); background: color-mix(in srgb, var(--widget-tint) 5%, #fff); }
.studio-widget .studio-widget-link:hover { background: color-mix(in srgb, var(--widget-tint) 10%, #fff); }

/* UI 预设变体 */
.studio-metric.is-compact { flex-direction: row; align-items: center; gap: 14px; }
.studio-metric.is-compact b { font-size: 28px; }
.studio-metric.is-compact > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.studio-widget-link.is-corner { align-self: flex-start; padding: 8px; }
.studio-clock.is-date span { order: -1; font-size: 20px; letter-spacing: -.01em; }
.studio-clock.is-date b { font-size: 22px; }
.studio-board-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.studio-board-inline > span { display: flex; align-items: baseline; gap: 6px; }
.studio-board-inline b { font-size: 22px; letter-spacing: -.02em; }
.studio-board-inline small { color: #68799a; font-size: 11px; font-weight: 600; }
.studio-board-inline > i { color: #c3ccd9; font-style: normal; }
.studio-flow-actions.is-list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.studio-flow-actions.is-list button { flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12px; }
.studio-flow-actions.is-list button svg { width: 14px; height: 14px; }

/* 吸附开关按钮状态 */
[data-studio-snap].is-off { color: #8b96ab; }

/* v15 修复：自由高度不被旧最小高度限制 */
.studio-widget { min-height: 0; }


/* ==================== v16 设置弹层层级 / 板块模板 / 小奥布局 / 起始页图钉 ==================== */

/* 1) 设置弹层永远浮在最上 */
.studio-widget:has(.studio-settings:not([hidden])) { z-index: 60; }
.studio-settings { z-index: 61; }
.studio-settings-templates { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.studio-settings-templates button { padding: 7px 11px; border: 1.5px solid #e6ebf4; border-radius: 9px; color: #3d4c66; background: #fff; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.studio-settings-templates button.active { border-color: var(--widget-tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--widget-tint) 14%, transparent); }

/* 2) 板块模板：描边简洁 / 填色渐变 / 毛玻璃 / 极简线框 */
.studio-widget.tpl-outline { border: 2px solid color-mix(in srgb, var(--widget-tint) 34%, #e6ebf4); box-shadow: none; }
.studio-widget.tpl-filled { border-color: transparent; color: #fff; background: linear-gradient(158deg, var(--widget-tint), color-mix(in srgb, var(--widget-tint) 72%, #0b1220)); box-shadow: 0 14px 30px color-mix(in srgb, var(--widget-tint) 30%, transparent); }
.studio-widget.tpl-filled > header b, .studio-widget.tpl-filled .studio-metric span, .studio-widget.tpl-filled .studio-clock span { color: #fff; }
.studio-widget.tpl-filled .studio-metric small, .studio-widget.tpl-filled .studio-clock small, .studio-widget.tpl-filled .studio-empty, .studio-widget.tpl-filled .studio-view-jump p, .studio-widget.tpl-filled .studio-inbox p { color: rgba(255,255,255,.72); }
.studio-widget.tpl-filled .studio-widget-icon { color: #fff; background: rgba(255,255,255,.16); }
.studio-widget.tpl-filled .studio-metric b, .studio-widget.tpl-filled .studio-clock b, .studio-widget.tpl-filled .studio-kpis b, .studio-widget.tpl-filled .studio-board-mini b, .studio-widget.tpl-filled .studio-board-inline b { color: #fff; }
.studio-widget.tpl-filled .studio-kpis > span, .studio-widget.tpl-filled .studio-board-mini span { background: rgba(255,255,255,.12); }
.studio-widget.tpl-filled .studio-kpis small, .studio-widget.tpl-filled .studio-board-mini small, .studio-widget.tpl-filled .studio-board-inline small { color: rgba(255,255,255,.7); }
.studio-widget.tpl-filled .studio-inbox button, .studio-widget.tpl-filled .studio-rows button { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); }
.studio-widget.tpl-filled .studio-inbox button b, .studio-widget.tpl-filled .studio-rows button b { color: #fff; }
.studio-widget.tpl-filled .studio-inbox button small, .studio-widget.tpl-filled .studio-rows button small { color: rgba(255,255,255,.66); }
.studio-widget.tpl-filled .studio-flow-actions button { border-color: rgba(255,255,255,.2); color: #fff; background: rgba(255,255,255,.09); }
.studio-widget.tpl-filled .studio-flow-actions button svg { color: #fff; }
.studio-widget.tpl-filled .studio-flow-actions button.is-primary { background: rgba(255,255,255,.92); color: var(--widget-tint); box-shadow: none; }
.studio-widget.tpl-filled .studio-flow-actions button.is-primary svg { color: var(--widget-tint); }
.studio-widget.tpl-filled .studio-widget-link { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.1); }
.studio-widget.tpl-filled .studio-widget-link:hover { background: rgba(255,255,255,.18); }
.studio-widget.tpl-filled .studio-recent { border-top-color: rgba(255,255,255,.2); }
.studio-widget.tpl-filled .studio-recent > small { color: #b7f4d8; }
.studio-widget.tpl-filled .studio-drag-handle, .studio-widget.tpl-filled > header button, .studio-widget.tpl-filled .studio-resize-handle { color: rgba(255,255,255,.6); }
.studio-widget.tpl-glass { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.6); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.studio-widget.tpl-minimal { border-color: transparent; background: transparent; box-shadow: none; }
.studio-widget.tpl-minimal:hover { background: #fff; box-shadow: 0 1px 2px rgba(16,32,64,.04); }
.studio-widget.tpl-minimal > header { margin-bottom: 8px; }

/* 3) 岗位预设选择弹窗 */
.studio-preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.studio-preset-grid button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 1.5px solid #e6ebf4; border-radius: 14px; background: #fafbfd; text-align: left; cursor: pointer; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.studio-preset-grid button:hover { border-color: color-mix(in srgb, var(--ui-accent) 45%, #e6ebf4); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(16,32,64,.08); }
.studio-preset-grid b { font-size: 14px; }
.studio-preset-grid small { color: #8b96ab; font-size: 11.5px; line-height: 1.5; }

/* 4) 小奥操控台：对话区固定布局，输入框永远钉在底部 */
body.copilot-mode .content { height: calc(100vh - 74px); min-height: 0; padding-bottom: 26px; overflow: hidden; display: flex; flex-direction: column; }
body.copilot-mode #view-module.is-active { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.copilot-mode #moduleSignature { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.copilot-console-simple { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.copilot-chat-primary { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 20px; }
.copilot-chat-primary > header { flex: none; }
.copilot-chat-messages { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
.copilot-chat-suggestions { flex: none; }
.copilot-attachment-area { flex: none; }
#copilotConsoleComposer { flex: none; }

/* 5) 小奥操控台 UI 升级 */
.copilot-chat-primary { border: 1px solid #e4e9f3; background: linear-gradient(180deg, #ffffff, #fbfcff); box-shadow: 0 18px 44px rgba(23,43,99,.08); }
.copilot-chat-console > header { padding: 16px 20px; border-bottom: 1px solid #edf0f7; }
.copilot-chat-identity > span { width: 40px; height: 40px; border-radius: 13px; color: #fff; background: linear-gradient(140deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent) 62%, #8d52eb)); box-shadow: 0 8px 18px color-mix(in srgb, var(--ui-accent) 28%, transparent); }
.copilot-chat-identity h3 { letter-spacing: -.01em; }
.copilot-chat-messages { padding: 22px 24px; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--ui-accent) 3%, transparent), transparent 60%), #fafbfe; }
.copilot-chat-message > div { border-radius: 15px; }
.copilot-chat-message > div p { line-height: 1.75; }
.copilot-chat-message.ai > span { color: #fff; background: linear-gradient(140deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent) 62%, #8d52eb)); border-radius: 11px; }
.copilot-chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 20px 0; }
.copilot-chat-suggestions button { padding: 8px 14px; border: 1px solid #e4e9f3; border-radius: 999px; color: color-mix(in srgb, var(--ui-accent) 80%, #3d4c66); background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.copilot-chat-suggestions button:hover { border-color: color-mix(in srgb, var(--ui-accent) 45%, #e4e9f3); background: color-mix(in srgb, var(--ui-accent) 6%, #fff); transform: translateY(-1px); }
.copilot-attachment-area { padding: 8px 20px 0; }
.copilot-attachment-bar { border-radius: 12px; }
.copilot-attachment-bar > .copilot-workspace-button { display: inline-flex; }
.copilot-workspace-button.is-active { color: #287d65; border-color: #9fd7c6; background: #f2fbf8; }
.copilot-workspace-button:focus-visible,
.copilot-workspace-status button:focus-visible,
.copilot-workspace-panel button:focus-visible,
.copilot-workspace-panel input:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
#copilotWorkspaceMount:empty { display: none; }
.copilot-workspace-panel[hidden] { display: none; }
.copilot-workspace-panel { display: grid; gap: 12px; padding: 14px; border-top: 1px solid #e5eaf2; background: #fff; }
.copilot-workspace-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.copilot-workspace-panel > header > div { display: grid; gap: 3px; }
.copilot-workspace-panel > header b { color: #24324b; font-size: 12px; }
.copilot-workspace-panel > header small { color: #7f8ba0; font-size: 10px; line-height: 1.5; }
.copilot-workspace-panel > header > button { width: 28px; height: 28px; flex: 0 0 auto; border: 0; border-radius: 8px; color: #78859a; background: #f4f6fa; cursor: pointer; font-size: 18px; line-height: 1; }
.copilot-workspace-path { display: grid; gap: 6px; }
.copilot-workspace-path > span { color: #536078; font-size: 10px; font-weight: 700; }
.copilot-workspace-path input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #d7dfeb; border-radius: 10px; color: #26344d; background: #fafbfd; font: 500 12px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.copilot-workspace-options { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.copilot-workspace-options > label { display: flex; align-items: flex-start; gap: 9px; min-width: 0; cursor: pointer; }
.copilot-workspace-options input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--ui-accent); }
.copilot-workspace-options label > span { display: grid; gap: 2px; }
.copilot-workspace-options label b { color: #35445d; font-size: 10.5px; }
.copilot-workspace-options label small { color: #8793a6; font-size: 9.5px; line-height: 1.45; }
.copilot-workspace-options > button { min-width: 96px; height: 36px; padding: 0 14px; border: 0; border-radius: 9px; color: #fff; background: var(--ui-accent); cursor: pointer; font-size: 10px; font-weight: 750; }
.copilot-workspace-options > button:disabled { cursor: wait; opacity: .62; }
.copilot-workspace-panel > p { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 9px 10px; border-radius: 9px; color: #68768c; background: #f5f7fb; font-size: 9.5px; line-height: 1.55; }
.copilot-workspace-panel > p svg { width: 13px; height: 13px; margin-top: 1px; flex: 0 0 auto; color: #5c68d7; }
.copilot-workspace-status { display: grid; grid-template-columns: 32px minmax(0,1fr) auto auto auto; align-items: center; gap: 9px; padding: 9px 11px; border-top: 1px solid #e5eaf2; background: #f7faf9; }
.copilot-workspace-status > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #287d65; background: #e4f5ef; }
.copilot-workspace-status > span svg { width: 14px; height: 14px; }
.copilot-workspace-status > div { display: grid; min-width: 0; gap: 2px; }
.copilot-workspace-status b { color: #26364d; font-size: 10.5px; }
.copilot-workspace-status small { overflow: hidden; color: #7d899b; font: 9px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.copilot-workspace-status em { padding: 5px 8px; border-radius: 999px; font-size: 8.5px; font-style: normal; font-weight: 750; white-space: nowrap; }
.copilot-workspace-status em.readonly { color: #66748a; background: #e9edf3; }
.copilot-workspace-status em.write { color: #20735b; background: #dcf3eb; }
.copilot-workspace-status > button { border: 0; color: #607088; background: transparent; cursor: pointer; font-size: 9px; }
.copilot-chat-workspace { display: flex; align-items: center; gap: 6px; margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.82); font-size: 9px; }
.copilot-chat-workspace svg { width: 12px; height: 12px; }
#copilotConsoleComposer { margin: 12px 20px 18px; padding: 12px 14px; border: 1.5px solid #dfe5f0; border-radius: 16px; background: #fff; box-shadow: 0 10px 26px rgba(23,43,99,.08); transition: border-color .18s ease, box-shadow .18s ease; }
#copilotConsoleComposer:focus-within { border-color: color-mix(in srgb, var(--ui-accent) 55%, #dfe5f0); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent) 12%, transparent), 0 10px 26px rgba(23,43,99,.08); }
#copilotConsoleComposer textarea { font-size: 13px; line-height: 1.65; }
#copilotConsoleComposer button[type="submit"] { border-radius: 11px; font-weight: 700; }
.copilot-chat-console.is-drop-target { outline: 2.5px dashed var(--ui-accent); outline-offset: -6px; }
.copilot-chat-console.is-drop-target .copilot-chat-messages { background: color-mix(in srgb, var(--ui-accent) 5%, #fafbfe); }
.copilot-chat-console.is-drop-target::after { content: '松开鼠标，把资料交给小奥自动分类'; position: absolute; inset: auto 0 96px; margin: 0 auto; width: fit-content; padding: 10px 18px; border-radius: 999px; color: #fff; background: var(--ui-accent); font-size: 13px; font-weight: 700; box-shadow: 0 12px 28px color-mix(in srgb, var(--ui-accent) 35%, transparent); pointer-events: none; }
.copilot-chat-console { position: relative; }
@media (max-width: 720px) {
  .copilot-attachment-bar { flex-wrap: wrap; }
  .copilot-workspace-status { grid-template-columns: 32px minmax(0,1fr) auto; }
  .copilot-workspace-status > em { grid-column: 3; grid-row: 1; }
  .copilot-workspace-status > button { grid-row: 2; }
  .copilot-workspace-status > button:first-of-type { grid-column: 2; justify-self: end; }
  .copilot-workspace-status > button:last-of-type { grid-column: 3; }
  .copilot-workspace-options { align-items: stretch; flex-direction: column; }
  .copilot-workspace-options > button { width: 100%; }
}

/* 6) 起始页图钉 */
.workspace-pin { display: grid; place-items: center; width: 28px; height: 28px; margin-left: 4px; border: 0; border-radius: 9px; color: #b3bdcd; background: transparent; cursor: pointer; opacity: 0; transition: opacity .18s ease, color .18s ease, background .18s ease, transform .18s ease; }
.workspace-context:hover .workspace-pin, .workspace-pin.is-active { opacity: 1; }
.workspace-pin:hover { color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 9%, #fff); transform: translateY(-1px); }
.workspace-pin.is-active { color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 11%, #fff); }
.workspace-pin svg { width: 14px; height: 14px; }

/* 7) 设置中心·提醒与引导卡片 */
.settings-notify-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.settings-notify-grid label { display: flex; flex-direction: column; gap: 7px; }
.settings-notify-grid label > span { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; font-weight: 600; }
.settings-notify-grid label > span small { color: #8b96ab; font-size: 11px; font-weight: 400; }
.settings-notify-grid select { height: 38px; padding: 0 12px; border: 1px solid #dfe5f0; border-radius: 10px; background: #fff; font: inherit; font-size: 12.5px; }


/* ==================== 研发立项 ==================== */
.rd-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.rd-card { display: flex; flex-direction: column; border: 1px solid var(--v13-line, #e6ebf4); border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(16,32,64,.04); transition: transform .18s ease, box-shadow .18s ease; }
.rd-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,32,64,.08); }
.rd-card > header { padding: 16px 18px 0; }
.rd-card-id { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rd-card-id b { color: var(--module-accent, #4f46e5); font-size: 13px; letter-spacing: -.01em; }
.rd-stage-chip { padding: 4px 10px; border-radius: 999px; color: #4f46e5; background: #eef0ff; font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; }
.rd-stage-chip.stage-completed { color: #17795c; background: #e3f5ec; }
.rd-stage-chip.stage-molding, .rd-stage-chip.stage-sampling, .rd-stage-chip.stage-ce_apply { color: #a87c0a; background: #fdf3de; }
.rd-card-main { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 12px 18px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.rd-card-main > b { font-size: 15.5px; letter-spacing: -.01em; }
.rd-card-main > small { color: #68799a; font-size: 12px; }
.rd-card-cost { display: flex; gap: 12px; padding: 8px 11px; border-radius: 10px; background: #f6f7fd; font-size: 11.5px; }
.rd-card-cost span:first-child { font-weight: 700; }
.rd-card-cost span:last-child { color: #a87c0a; }
.rd-card-budget { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 11px; border:1px solid #e4e8f0; border-radius:10px; background:#fbfcfe; color:#64748b; font-size:11.5px; }
.rd-card-budget b { color:#18243a; font-size:12px; }
.rd-card > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 18px 16px; }
.rd-card > footer:empty { display: none; }
.rd-card > footer .primary-button, .rd-card > footer .ghost-button { height: 36px; padding: 0 13px; font-size: 11.5px; }

.rd-stage-track { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.rd-stage-track > span { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rd-stage-track i { display: block; width: 100%; height: 4px; border-radius: 99px; background: #e8ecf4; }
.rd-stage-track small { overflow: hidden; max-width: 100%; color: #98a4b8; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.rd-stage-track > span.done i { background: color-mix(in srgb, var(--module-accent, #4f46e5) 55%, #fff); }
.rd-stage-track > span.done small { color: #68799a; }
.rd-stage-track > span.active i { background: var(--module-accent, #4f46e5); box-shadow: 0 2px 8px color-mix(in srgb, var(--module-accent, #4f46e5) 40%, transparent); }
.rd-stage-track > span.active small { color: var(--module-accent, #4f46e5); font-weight: 700; }

/* 看板泳道 */
.rd-board-scroll { overflow-x: auto; padding-bottom: 10px; }
.rd-board-grid { display: grid; grid-template-columns: repeat(8, minmax(230px, 1fr)); gap: 14px; min-width: 1900px; }
.rd-lane { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--v13-line, #e6ebf4); border-radius: 16px; background: #f8fafc; }
.rd-lane > header { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; border-bottom: 1px solid #e9edf5; }
.rd-lane > header b { font-size: 12.5px; }
.rd-lane > header span { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; color: var(--module-accent, #7c3aed); background: #f4f0ff; font-size: 11px; font-weight: 700; }
.rd-lane-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid #e9edf5; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.rd-lane-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--module-accent, #7c3aed) 40%, #e9edf5); box-shadow: 0 8px 18px rgba(16,32,64,.07); }
.rd-lane-card b { color: var(--module-accent, #7c3aed); font-size: 12px; }
.rd-lane-card small { overflow: hidden; color: #68799a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rd-lane-card em { color: #a87c0a; font-size: 10.5px; font-style: normal; font-weight: 700; }
.rd-lane-empty { padding: 18px 6px; color: #a5b0c2; font-size: 11px; text-align: center; }

/* 详情弹窗 */
.rd-detail { display: flex; flex-direction: column; gap: 16px; }
.rd-detail .rd-stage-track { margin-top: 0; }
.rd-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rd-detail-grid > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: #f7f9fd; }
.rd-detail-grid small { color: #8b96ab; font-size: 10.5px; font-weight: 700; }
.rd-detail-grid b { font-size: 13px; }
.rd-detail-req { padding: 12px 14px; border: 1px dashed #dbe2ee; border-radius: 12px; }
.rd-detail-req small { color: #8b96ab; font-size: 10.5px; font-weight: 700; }
.rd-detail-req p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; }
.rd-cost-block { border: 1px solid #e9edf5; border-radius: 14px; overflow: hidden; }
.rd-cost-block > header { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: #f7f9fd; }
.rd-cost-block > header small { color: #68799a; font-size: 11px; font-weight: 700; }
.rd-cost-block > header span { color: #a87c0a; font-size: 11px; font-weight: 700; }
.rd-cost-row { display: grid; grid-template-columns: auto 1fr 1.4fr auto; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid #eef1f7; font-size: 12px; }
.rd-cost-row span { color: #68799a; font-size: 11.5px; }
.rd-cost-row button { padding: 6px 11px; border: 1px solid #d8e0ee; border-radius: 8px; color: var(--ui-accent); background: #fff; font-size: 11px; font-weight: 600; cursor: pointer; }
.rd-cost-row button:hover { border-color: var(--ui-accent); }
.rd-cost-empty { margin: 0; padding: 13px 14px; color: #98a4b8; font-size: 12px; }
.rd-timeline > small { display: block; margin-bottom: 8px; color: #8b96ab; font-size: 10.5px; font-weight: 700; }
.rd-timeline-item { display: flex; gap: 10px; padding: 7px 0; }
.rd-timeline-item > i { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--module-accent, #4f46e5); box-shadow: 0 0 0 3px color-mix(in srgb, var(--module-accent, #4f46e5) 15%, transparent); }
.rd-timeline-item b { display: block; font-size: 12.5px; font-weight: 600; }
.rd-timeline-item small { color: #98a4b8; font-size: 11px; }
.rd-detail-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; border-top: 1px dashed #e6ebf4; }
.rd-plan-costs { grid-column:1 / -1; display:grid; gap:12px; margin-top:4px; padding:16px; border:1px solid #dfe5ef; border-radius:14px; background:#fbfcfe; }
.rd-plan-costs > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.rd-plan-costs > header small, .rd-plan-costs > header b, .rd-plan-costs > header p { display:block; }
.rd-plan-costs > header small { color:#718096; font-size:10.5px; font-weight:700; }
.rd-plan-costs > header b { margin-top:2px; font-size:14px; }
.rd-plan-costs > header p { margin:4px 0 0; color:#718096; font-size:11.5px; line-height:1.55; }
.rd-plan-costs > header button { flex:none; display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:0 11px; border:1px solid #ccd6e5; border-radius:9px; background:#fff; color:#26344f; font-size:11.5px; font-weight:700; cursor:pointer; }
.rd-plan-costs > header svg, .rd-plan-cost-row > button svg { width:14px; height:14px; }
.rd-plan-costs > div { display:grid; gap:8px; }
.rd-plan-cost-row { display:grid; grid-template-columns:minmax(220px, 1fr) minmax(150px, .42fr) auto; align-items:end; gap:10px; }
.rd-plan-cost-row label { display:grid; gap:6px; color:#596984; font-size:11px; font-weight:700; }
.rd-plan-cost-row input { width:100%; min-height:40px; padding:0 11px; border:1px solid #ccd6e5; border-radius:9px; background:#fff; color:#18243a; font:inherit; font-weight:500; }
.rd-plan-cost-row > button { display:inline-flex; align-items:center; gap:5px; height:40px; padding:0 10px; border:1px solid #e2c5ca; border-radius:9px; background:#fff; color:#a13d49; font-size:11px; font-weight:700; cursor:pointer; }
.rd-plan-cost-row > button:disabled { opacity:.35; cursor:not-allowed; }
.rd-plan-costs > footer { display:flex; align-items:center; justify-content:flex-end; gap:10px; padding-top:10px; border-top:1px solid #e8ecf3; }
.rd-plan-costs > footer span, .rd-plan-costs > footer em { color:#718096; font-size:11.5px; font-style:normal; }
.rd-plan-costs > footer b { color:#18243a; font-size:13px; }
.rd-plan-costs > footer em.is-over { color:#b42336; font-weight:700; }
.rd-plan-cost-detail .rd-cost-row { grid-template-columns:36px 1fr auto 90px; }
.rd-plan-cost-detail .rd-cost-row strong { font-size:12px; }
.rd-plan-cost-detail .rd-cost-row em { color:#718096; font-size:10.5px; font-style:normal; text-align:right; }
@media (max-width:720px) { .rd-plan-cost-row { grid-template-columns:1fr; } .rd-plan-cost-row > button { justify-content:center; } .rd-plan-costs > header { flex-direction:column; } }


/* ==================== 删除模式与批量操作 ==================== */
/* 默认隐藏客户/供应商记录上的垃圾桶；开启删除模式才显示 */
.customer-directory-layout .record-row-lifecycle,
[data-ledger-entity="suppliers"] .record-row-lifecycle,
[data-ledger-entity="customers"] .record-row-lifecycle { display: none; }
.customer-directory-layout.directory-delete-mode .record-row-lifecycle,
[data-ledger-entity="suppliers"].directory-delete-mode .record-row-lifecycle,
[data-ledger-entity="customers"].directory-delete-mode .record-row-lifecycle { display: inline-flex; }

.directory-delete-toggle { height: 38px; padding: 0 13px; font-size: 11.5px; }
.directory-delete-toggle svg { width: 14px; height: 14px; }
.directory-delete-toggle.is-active { border-color: #dc2626; color: #dc2626; background: #fdf0f0; }

.directory-batch-check { display: none; width: 17px; height: 17px; accent-color: var(--ui-accent); cursor: pointer; }
.directory-delete-mode .directory-batch-check { display: block; }
.sig-row-shell, .customer-card-shell { position: relative; }
.sig-row-shell > .directory-batch-check { position: absolute; z-index: 3; left: 10px; top: 50%; transform: translateY(-50%); }
.directory-delete-mode .sig-row-shell .sig-row, .directory-delete-mode .sig-row-shell .sig-row-button { padding-left: 38px; }
.customer-card-shell > .directory-batch-check { position: absolute; z-index: 3; left: 12px; top: 14px; }

.directory-batch-bar { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; padding: 10px 14px; border: 1.5px dashed color-mix(in srgb, var(--ui-accent) 30%, #dbe2ee); border-radius: 12px; background: color-mix(in srgb, var(--ui-accent) 3%, #fff); animation: v12Rise .25s ease both; }
.directory-batch-all { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; cursor: pointer; }
.directory-batch-all input { width: 16px; height: 16px; accent-color: var(--ui-accent); }
.directory-batch-bar > span { flex: 1; color: #68799a; font-size: 12px; }
.directory-batch-bar > div { display: flex; gap: 8px; }
.directory-batch-bar .ghost-button { height: 34px; padding: 0 12px; font-size: 11.5px; }
.directory-batch-delete { height: 34px; padding: 0 13px; border: 0; border-radius: 9px; color: #fff; background: #dc2626; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.directory-batch-delete:hover:not(:disabled) { background: #b91c1c; transform: translateY(-1px); }
.directory-batch-delete:disabled, .directory-batch-bar .ghost-button:disabled { opacity: .45; cursor: not-allowed; }

.batch-result { display: flex; flex-direction: column; gap: 8px; }
.batch-result > p { margin: 0 0 6px; font-size: 13px; }
.batch-result-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 12px; }
.batch-result-row.ok { background: #f2fbf6; border: 1px solid #d9efe3; }
.batch-result-row.fail { background: #fdf3f3; border: 1px solid #f3d9d9; }
.batch-result-row b { flex: none; }
.batch-result-row small { color: #68799a; }


/* ==================== 产品档案只读视图 + 变体系统 ==================== */
.product-card-view { display: flex; flex-direction: column; gap: 16px; }
.product-card-hero { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 18px; background: linear-gradient(145deg, color-mix(in srgb, var(--ui-accent) 6%, #fff), #fff 70%); border: 1px solid color-mix(in srgb, var(--ui-accent) 12%, #e9edf5); }
.product-card-figure { display: grid; flex: none; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 18px; color: #fff; background: linear-gradient(140deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent) 62%, #8d52eb)); font-size: 19px; font-weight: 800; box-shadow: 0 10px 22px color-mix(in srgb, var(--ui-accent) 25%, transparent); }
.product-card-figure img { width: 100%; height: 100%; object-fit: cover; }
.product-card-title { min-width: 0; }
.product-card-title small { color: #68799a; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.product-card-title > b { display: block; margin: 4px 0 8px; font-size: 17px; line-height: 1.35; letter-spacing: -.01em; }
.product-card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.product-card-chips span { padding: 4px 10px; border-radius: 999px; color: color-mix(in srgb, var(--ui-accent) 80%, #3d4c66); background: color-mix(in srgb, var(--ui-accent) 8%, #fff); font-size: 10.5px; font-weight: 700; }
.product-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.product-card-stats > div { display: flex; flex-direction: column; gap: 5px; padding: 13px 15px; border: 1px solid #e9edf5; border-radius: 14px; background: #fff; }
.product-card-stats small { color: #8b96ab; font-size: 10.5px; font-weight: 700; }
.product-card-stats b { font-size: 15px; letter-spacing: -.01em; }
.product-card-params { padding: 16px 18px; border: 1px solid #e9edf5; border-radius: 16px; background: #fafbfd; }
.product-card-params > small { display: block; margin-bottom: 12px; color: #8b96ab; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.product-card-params > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.product-card-params span { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 11px; background: #fff; border: 1px solid #eef1f7; }
.product-card-params em { color: #98a4b8; font-size: 10px; font-style: normal; font-weight: 700; }
.product-card-params b { font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.product-card-params.is-empty p { margin: 0; color: #98a4b8; font-size: 12px; }
.product-card-variants { padding: 16px 18px; border: 1px solid #e9edf5; border-radius: 16px; background: #fff; }
.product-card-variants > small { display: block; margin-bottom: 10px; color: #8b96ab; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.product-card-variants table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.product-card-variants th { padding: 8px 10px; color: #98a4b8; background: #f7f9fd; font-size: 10.5px; font-weight: 700; text-align: left; }
.product-card-variants td { padding: 10px; border-top: 1px solid #eef1f7; }
.product-card-variants td:last-child { color: var(--ui-accent); font-weight: 700; white-space: nowrap; }
.product-card-actions { display: flex; justify-content: flex-end; gap: 9px; }
.product-file-library { display: grid; gap: 12px; padding: 16px; border: 1px solid #dce5f2; border-radius: 13px; background: #f8faff; }
.product-file-library > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.product-file-library > header small { display: block; color: #647895; font-size: 9px; font-weight: 800; letter-spacing: .03em; }
.product-file-library > header b { display: block; margin-top: 3px; color: #23334c; font-size: 14px; }
.product-file-library > header p { margin: 4px 0 0; color: #718199; font-size: 10px; line-height: 1.5; }
.product-file-library > header label { flex: none; cursor: pointer; }
.product-file-library > header input { display: none; }
.product-file-library [data-product-file-list] { display: grid; gap: 10px; }
.product-file-document { overflow: hidden; border: 1px solid #dce4ef; border-radius: 11px; background: #fff; }
.product-file-version { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 68px; padding: 11px 12px; }
.product-file-version + .product-file-version { border-top: 1px solid #edf1f6; }
.product-file-version.is-latest { background: #fff; }
.product-file-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: #356ee7; background: #eaf1ff; }
.product-file-icon svg { width: 17px; height: 17px; }
.product-file-version > div:nth-child(2) { min-width: 0; }
.product-file-version b { display: block; overflow: hidden; color: #283850; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-file-version small { display: block; margin-top: 3px; color: #7b899c; font-size: 9px; line-height: 1.45; }
.product-file-version p { margin: 4px 0 0; color: #5f7088; font-size: 9px; line-height: 1.45; }
.product-file-version code { display: block; margin-top: 4px; color: #93a0b1; font-size: 8px; }
.product-file-actions { display: flex; align-items: center; gap: 6px; }
.product-file-actions :is(a,button) { min-height: 32px; padding-inline: 9px; font-size: 9px; text-decoration: none; }
.product-file-actions svg { width: 13px; height: 13px; }
.product-file-document details { border-top: 1px solid #e8edf4; }
.product-file-document summary { padding: 9px 12px; color: #52657f; background: #f8fafc; font-size: 9px; font-weight: 750; cursor: pointer; }
.product-file-document details > div { border-top: 1px solid #edf1f6; }
.product-file-empty { display: grid; gap: 4px; place-items: center; min-height: 82px; padding: 16px; color: #7c8b9f; border: 1px dashed #cfd9e8; border-radius: 10px; background: #fff; font-size: 10px; text-align: center; }
.product-file-empty b { color: #384a63; font-size: 11px; }
.product-file-empty.is-error { color: #b54752; border-color: #efc9cd; background: #fff8f8; }

/* 变体编辑器 */
.variants-editor { margin-top: 16px; padding: 14px; border: 1px dashed #d8e0ee; border-radius: 14px; background: #fafbfd; }
.variants-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.variants-editor > header small { display: block; color: #3d4c66; font-size: 12.5px; font-weight: 700; }
.variants-editor > header p { margin: 4px 0 0; color: #8b96ab; font-size: 11px; line-height: 1.6; }
.variants-editor > header .ghost-button { flex: none; height: 34px; padding: 0 12px; font-size: 11.5px; }
.variants-rows { display: flex; flex-direction: column; gap: 8px; }
.variants-row { display: grid; grid-template-columns: 1.2fr 1.4fr 110px 34px; gap: 8px; align-items: center; }
.variants-row input { height: 38px; padding: 0 11px; border: 1px solid #dfe5f0; border-radius: 10px; background: #fff; font: inherit; font-size: 12.5px; }
.variants-row input:focus { border-color: var(--ui-accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
.variants-row button { display: grid; place-items: center; width: 34px; height: 38px; border: 0; border-radius: 10px; color: #dc2626; background: #fdf0f0; cursor: pointer; }
.variants-row button svg { width: 13px; height: 13px; transform: rotate(45deg); }
@media (max-width: 760px) {
  .product-card-stats { grid-template-columns: repeat(2, 1fr); }
  .variants-row { grid-template-columns: 1fr 1fr; }
  .variants-row [data-v-attrs] { grid-column: 1 / -1; }
}


/* ==================== 产品方案留版 + 侧栏搜索 ==================== */
.scheme-list { display: flex; flex-direction: column; gap: 10px; }
.scheme-row { display: grid; grid-template-columns: minmax(130px,.6fr) minmax(0,1.8fr) 56px 56px auto; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--v13-line, #e6ebf4); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.scheme-row:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--module-accent, #0d8796) 38%, #e6ebf4); box-shadow: 0 8px 20px rgba(16,32,64,.07); }
.scheme-row-version { display: flex; flex-direction: column; gap: 3px; }
.scheme-row-version b { color: var(--module-accent, #0d8796); font-size: 13px; }
.scheme-row-version i { color: #98a4b8; font-size: 10px; font-style: normal; font-weight: 700; }
.scheme-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.scheme-row-main b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.scheme-row-main small { overflow: hidden; color: #8b96ab; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.scheme-row-stats { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.scheme-row-stats b { font-size: 15px; }
.scheme-row-stats small { color: #98a4b8; font-size: 9.5px; }
.scheme-row-src { padding: 4px 9px; border-radius: 999px; color: #68799a; background: #f0f3f8; font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; }
.scheme-row-src.is-ai { color: #6d28d9; background: #f3f0fd; }

/* 侧栏搜索 */
.rail-search { display: flex; align-items: center; gap: 7px; width: 100%; height: 36px; margin: 10px 0 4px; padding: 0 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; color: #8fa1c4; background: rgba(255,255,255,.06); transition: border-color .18s ease, background .18s ease; }
.rail-search:focus-within { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); }
.rail-search svg { flex: none; width: 14px; height: 14px; }
.rail-search input { width: 100%; border: 0; outline: 0; color: #eef3fb; background: transparent; font: inherit; font-size: 12px; }
.rail-search input::placeholder { color: #7488ab; }
body[data-rail="light"]:not(.board-mode) .rail-search { border-color: #e2e8f2; color: #68799a; background: #fff; }
body[data-rail="light"]:not(.board-mode) .rail-search:focus-within { border-color: color-mix(in srgb, var(--ui-accent) 40%, #e2e8f2); }
body[data-rail="light"]:not(.board-mode) .rail-search input { color: #2b3a55; }
body[data-rail="light"]:not(.board-mode) .rail-search input::placeholder { color: #98a4b8; }
@media (max-width: 850px) { .rail-search { display: none; } }


/* ==================== 阶梯价 / 参数编辑器 ==================== */
.variant-tier { display: inline-flex; align-items: baseline; gap: 6px; margin: 0 10px 4px 0; padding: 4px 9px; border-radius: 8px; background: #f4f6fc; font-size: 11.5px; }
.variant-tier b { color: var(--ui-accent); }
.params-editor { margin-top: 16px; padding: 14px; border: 1px dashed #d8e0ee; border-radius: 14px; background: #fafbfd; }
.params-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.params-editor > header small { display: block; color: #3d4c66; font-size: 12.5px; font-weight: 700; }
.params-editor > header p { margin: 4px 0 0; color: #8b96ab; font-size: 11px; line-height: 1.6; }
.params-editor > header .ghost-button { flex: none; height: 34px; padding: 0 12px; font-size: 11.5px; }
.params-rows { display: flex; flex-direction: column; gap: 8px; }
.params-row { display: grid; grid-template-columns: minmax(140px, .8fr) minmax(0, 1.6fr) 34px; gap: 8px; align-items: center; }
.params-row input { height: 38px; padding: 0 11px; border: 1px solid #dfe5f0; border-radius: 10px; background: #fff; font: inherit; font-size: 12.5px; }
.params-row input:focus { border-color: var(--ui-accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
.params-row button { display: grid; place-items: center; width: 34px; height: 38px; border: 0; border-radius: 10px; color: #dc2626; background: #fdf0f0; cursor: pointer; }
.params-row button svg { width: 13px; height: 13px; transform: rotate(45deg); }

/* ==================== 主工作区暗夜主题（data-theme="dark"） ==================== */
body[data-theme="dark"] {
  --bg: #0d1420;
  --surface: rgba(22, 32, 48, .92);
  --surface-strong: #16202f;
  --ink: #e6edf7;
  --muted: #93a3bb;
  --quiet: #6b7d97;
  --line: #263449;
  color: #e6edf7;
  background: radial-gradient(circle at 74% -8%, rgba(46, 74, 110, .3), transparent 27rem), linear-gradient(135deg, #0b1120 0%, #0d1626 100%);
}
body[data-theme="dark"] .topbar { background: rgba(13, 20, 32, .82); border-bottom-color: #22304a; }
body[data-theme="dark"] .content { color: #dbe4f2; }
body[data-theme="dark"] .page-intro h1, body[data-theme="dark"] .section-heading h2, body[data-theme="dark"] .card-heading h3 { color: #eef3fb; }
body[data-theme="dark"] .page-intro h1 em { color: #7c8fb1; }
body[data-theme="dark"] .page-intro p, body[data-theme="dark"] .eyebrow { color: #7c8fb1; }
body[data-theme="dark"] .signature-panel, body[data-theme="dark"] .focus-card, body[data-theme="dark"] .pulse-card, body[data-theme="dark"] .flow-card, body[data-theme="dark"] .module-section, body[data-theme="dark"] .table-card, body[data-theme="dark"] .receivable-card, body[data-theme="dark"] .match-card,
body[data-theme="dark"] .customer-directory-list .sig-row-button, body[data-theme="dark"] .customer-directory-list .customer-grid-card, body[data-theme="dark"] #view-orders .order-card, body[data-theme="dark"] .modern-table.is-card-mode .order-card,
body[data-theme="dark"] .studio-widget, body[data-theme="dark"] .rd-card, body[data-theme="dark"] .scheme-row, body[data-theme="dark"] .rd-lane, body[data-theme="dark"] .rd-lane-card,
body[data-theme="dark"] .summary-strip, body[data-theme="dark"] .assistant-card-dark, body[data-theme="dark"] .product-card-params, body[data-theme="dark"] .product-card-variants, body[data-theme="dark"] .product-card-stats > div {
  border-color: #263449; background: #16202f; color: #dbe4f2; box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
body[data-theme="dark"] .signature-panel.tinted { background: linear-gradient(150deg, #1b2940, #16202f 72%); }
body[data-theme="dark"] .product-card-hero { border-color: #2b3b58; background: linear-gradient(145deg, color-mix(in srgb, var(--ui-accent) 14%, #16202f), #16202f 70%); }
body[data-theme="dark"] .product-card-params span, body[data-theme="dark"] .rd-detail-grid > div, body[data-theme="dark"] .studio-inbox button, body[data-theme="dark"] .studio-rows button, body[data-theme="dark"] .studio-flow-actions button { border-color: #2b3b58; background: #1a2639; }
body[data-theme="dark"] .product-card-variants table th { background: #1a2639; color: #7c8fb1; }
body[data-theme="dark"] .product-card-variants td { border-top-color: #263449; }
body[data-theme="dark"] .variant-tier { background: #223350; }
body[data-theme="dark"] .table-row:not(.table-head):hover, body[data-theme="dark"] .studio-inbox button:hover, body[data-theme="dark"] .studio-rows button:hover { background: #1c2940; }
body[data-theme="dark"] .table-head, body[data-theme="dark"] .customer-directory-status, body[data-theme="dark"] .rd-lane > header { background: #131c2c; color: #7c8fb1; }
body[data-theme="dark"] .modern-table .table-row, body[data-theme="dark"] .sig-row { border-bottom-color: #22304a; }
body[data-theme="dark"] b, body[data-theme="dark"] strong, body[data-theme="dark"] h2, body[data-theme="dark"] h3, body[data-theme="dark"] h4 { color: #e8eef8; }
body[data-theme="dark"] small, body[data-theme="dark"] .table-row small, body[data-theme="dark"] .customer-grid-lines > span, body[data-theme="dark"] .studio-empty { color: #8b9cb8; }
body[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]), body[data-theme="dark"] select, body[data-theme="dark"] textarea,
body[data-theme="dark"] .tool-right label, body[data-theme="dark"] .command-search, body[data-theme="dark"] .customer-directory-toolbar label {
  border-color: #2b3b58 !important; background: #131c2c !important; color: #e6edf7 !important;
}
body[data-theme="dark"] input::placeholder, body[data-theme="dark"] textarea::placeholder { color: #5f72a0; }
body[data-theme="dark"] .ghost-button { border-color: #2b3b58; color: #b9c7dd; background: #1a2639; }
body[data-theme="dark"] .ghost-button:hover { background: #223350; border-color: #3a4f75; }
body[data-theme="dark"] .icon-button, body[data-theme="dark"] .search-icon-button, body[data-theme="dark"] .company-switch { border-color: #2b3b58; background: #16202f; color: #b9c7dd; }
body[data-theme="dark"] .workspace-context strong { color: #e8eef8; }
body[data-theme="dark"] .workspace-context small { color: #7c8fb1; }
body[data-theme="dark"] .action-sheet, body[data-theme="dark"] .account-menu, body[data-theme="dark"] .workspace-open-menu, body[data-theme="dark"] .studio-settings { border-color: #2b3b58; background: #16202f; color: #dbe4f2; box-shadow: 0 24px 64px rgba(0,0,0,.55); }
body[data-theme="dark"] .action-sheet input:not([type="checkbox"]), body[data-theme="dark"] .action-sheet select, body[data-theme="dark"] .action-sheet textarea { background: #101827 !important; border-color: #2b3b58 !important; color: #e6edf7 !important; }
body[data-theme="dark"] .record-hero, body[data-theme="dark"] .record-facts, body[data-theme="dark"] .account-settings-card, body[data-theme="dark"] .appearance-card { border-color: #263449; background: #1a2639; }
body[data-theme="dark"] .member-entry-shell > header h3, body[data-theme="dark"] .member-entry-options > button b, body[data-theme="dark"] .member-permission-editor > header h3, body[data-theme="dark"] .member-permission-grid label b, body[data-theme="dark"] .member-account-hero h4, body[data-theme="dark"] .member-account-facts b, body[data-theme="dark"] .member-account-permissions > header b { color: #e6edf7; }
body[data-theme="dark"] .member-entry-options > button, body[data-theme="dark"] .member-permission-editor, body[data-theme="dark"] .member-permission-grid label, body[data-theme="dark"] .member-account-card, body[data-theme="dark"] .member-account-facts > span { border-color: #2b3b58; background: #1a2639; color: #dbe4f2; }
body[data-theme="dark"] .member-entry-options > button:hover, body[data-theme="dark"] .member-permission-grid label:hover { border-color: #48658f; background: #202e43; }
body[data-theme="dark"] .member-entry-shell > aside { border-color: #285746; color: #8ed2b7; background: #143024; }
body[data-theme="dark"] .member-permission-grid label > i { border-color: #40516b; background: #111a29; }
body[data-theme="dark"] .member-permission-editor.is-admin .member-permission-grid label { border-color: #334761; background: #172337; }
body[data-theme="dark"] .member-account-hero { border-color: #2b3b58; background: linear-gradient(120deg,#1b2b43,#1a2639 72%); }
body[data-theme="dark"] .member-account-facts { border-color: #2b3b58; background: #2b3b58; }
body[data-theme="dark"] .member-account-permissions > header > em, body[data-theme="dark"] .member-account-permissions > div em { color: #a9c8f5; background: #203553; }
body[data-theme="dark"] .member-admin-note { color: #a9b8cf; background: #202c40; }
body[data-theme="dark"] .member-account-card > footer { border-color: #2b3b58; }
body[data-theme="dark"] .member-finance-editor, body[data-theme="dark"] .member-finance-scope-grid > label, body[data-theme="dark"] .member-fund-account { border-color: #493f31; background: #201d18; }
body[data-theme="dark"] .member-finance-editor > header h3, body[data-theme="dark"] .member-finance-scope-grid b, body[data-theme="dark"] .member-fund-account > header b { color: #f0e6d7; }
body[data-theme="dark"] .member-finance-scope-grid small, body[data-theme="dark"] .member-fund-account > header small, body[data-theme="dark"] .member-fund-account > header p { color: #a89a86; }
body[data-theme="dark"] .member-finance-scope-grid label > i, body[data-theme="dark"] .member-fund-account > div label { border-color: #5b4b34; background: #17140f; }
body[data-theme="dark"] .member-finance-account-heading, body[data-theme="dark"] .member-fund-account > header, body[data-theme="dark"] .member-account-finance { border-color: #40372b; background: #1d1a15; }
body[data-theme="dark"] .fund-account-manager > header, body[data-theme="dark"] .fund-account-manager-row { border-color: #2b3b58; background: #1a2639; }body[data-theme="dark"] .fund-account-manager-row b { color: #e6edf7; }
body[data-theme="dark"] .studio-add-panel, body[data-theme="dark"] .directory-batch-bar, body[data-theme="dark"] .variants-editor, body[data-theme="dark"] .params-editor { border-color: #3a4f75; background: #14203380; }
body[data-theme="dark"] .studio-inbox button b, body[data-theme="dark"] .studio-rows button b, body[data-theme="dark"] .scheme-row-main b { color: #dbe4f2; }
body[data-theme="dark"] .studio-recent-item { border-color: #1f4d3a; background: #143024; }
body[data-theme="dark"] .rd-stage-track i { background: #263449; }
body[data-theme="dark"] .rd-lane { background: #131c2c; }
body[data-theme="dark"] .rd-card-cost { background: #223350; }
body[data-theme="dark"] .rd-card-budget, body[data-theme="dark"] .rd-plan-costs { border-color:#2b3b58; background:#172235; }
body[data-theme="dark"] .rd-card-budget b, body[data-theme="dark"] .rd-plan-costs > footer b { color:#dbe4f2; }
body[data-theme="dark"] .rd-plan-costs > header button, body[data-theme="dark"] .rd-plan-cost-row input, body[data-theme="dark"] .rd-plan-cost-row > button { border-color:#3a4f75; background:#1a2639; color:#dbe4f2; }
body[data-theme="dark"] .scheme-row-stats b { color: #dbe4f2; }
body[data-theme="dark"] .table-empty { color: #7c8fb1; }
body[data-theme="dark"] .customer-view-toggle button { color: #8b9cb8; background: #1a2639; }
body[data-theme="dark"] .segmented { background: #131c2c; }
body[data-theme="dark"] .segmented button { color: #8b9cb8; }
body[data-theme="dark"] .segmented button.active { background: #223350; color: #e8eef8; }
body[data-theme="dark"] .live-data-error { background: #3a1520; color: #ffb4b4; }
body[data-theme="dark"] .copilot-chat-primary { border-color: #2b3b58; background: linear-gradient(180deg, #16202f, #121a2a); }
body[data-theme="dark"] .copilot-chat-messages { background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--ui-accent) 8%, transparent), transparent 60%), #101827; }
body[data-theme="dark"] #copilotConsoleComposer { border-color: #2b3b58; background: #131c2c; }
body[data-theme="dark"] #copilotConsoleComposer textarea { color: #e6edf7; }
body[data-theme="dark"] .copilot-chat-suggestions button { border-color: #2b3b58; background: #1a2639; color: #9db4d8; }
body[data-theme="dark"] .copilot-attachment-bar { background: #131c2c; color: #8b9cb8; }
body[data-theme="dark"] .product-card-params.is-empty p, body[data-theme="dark"] .product-card-title small { color: #7c8fb1; }
body[data-theme="dark"] .product-card-title > b { color: #eef3fb; }
body[data-theme="dark"] .quick-create-grid button, body[data-theme="dark"] .studio-preset-grid button, body[data-theme="dark"] .appearance-options > button, body[data-theme="dark"] .appearance-swatches > button, body[data-theme="dark"] .appearance-custom { border-color: #2b3b58; background: #1a2639; color: #dbe4f2; }
body[data-theme="dark"] .studio-add-panel button { border-color: #2b3b58; background: #1a2639; color: #b9c7dd; }
body[data-theme="dark"] .rd-timeline-item b { color: #dbe4f2; }
body[data-theme="dark"] .rd-cost-block { border-color: #263449; }
body[data-theme="dark"] .rd-cost-block > header { background: #131c2c; }
body[data-theme="dark"] .rd-cost-row { border-top-color: #22304a; color: #dbe4f2; }
body[data-theme="dark"] .rd-cost-row button { border-color: #3a4f75; background: #1a2639; }


/* ==================== 侧栏分组折叠 ==================== */
.full-nav-group { position: relative; display: flex; align-items: center; gap: 7px; width: calc(100% - 16px); margin: 12px 8px 3px; padding: 2px 0; border: 0; background: transparent; color: #7f8ca3; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; cursor: pointer; text-align: left; }
.full-nav-group::after { content: ""; height: 1px; flex: 1; background: #e8ecf2; }
.full-nav-chevron { width: 12px; height: 12px; flex: none; transform: rotate(90deg); transition: transform .2s ease; }
.full-nav-group.is-collapsed .full-nav-chevron { transform: rotate(0deg); }
#quickNav > button.nav-group-hidden { display: none; }
.full-nav-group:hover { color: #5b6c85; }
body:not(.board-mode) .rail .full-nav-group { color: #7c8fb1; }
body:not(.board-mode) .rail .full-nav-group::after { background: rgba(255,255,255,.1); }
body:not(.board-mode) .rail .full-nav-group:hover { color: #c6d2e8; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group { color: #8b96ab; border-bottom-color: rgba(31,49,82,.22); }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group::after { background: #e6eaf3; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group:hover { color: #4b5870; }
body[data-theme="dark"] .full-nav-group { color: #7c8fb1; }
body[data-theme="dark"] .full-nav-group::after { background: #263449; }


/* ==================== 父级菜单标题强化（v18e） ==================== */
.full-nav-group { display: flex; align-items: center; gap: 8px; width: calc(100% - 16px); margin: 12px 8px 3px; padding: 3px 0 3px 2px; border: 0; background: transparent; color: #6b7a93; font-size: 12px; font-weight: 700; letter-spacing: .02em; cursor: pointer; text-align: left; }
.full-nav-group::after { content: none; }
.full-nav-group > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full-nav-group-icon { flex: none; width: 14px; height: 14px; color: #8b99b0; }
.full-nav-chevron { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(146,158,175,.4); border-radius: 7px; color: #7f8ca3; background: rgba(146,158,175,.08); font-style: normal; transition: transform .2s ease, background .18s ease, border-color .18s ease, color .18s ease; }
.full-nav-chevron svg { width: 11px; height: 11px; transform: rotate(90deg); transition: transform .2s ease; }
.full-nav-group.is-collapsed .full-nav-chevron svg { transform: rotate(0deg); }
.full-nav-group:hover .full-nav-chevron { border-color: rgba(146,158,175,.7); color: #5b6c85; background: rgba(146,158,175,.18); }
body:not(.board-mode) .rail .full-nav-group { color: #b8c6de; }
body:not(.board-mode) .rail .full-nav-group-icon { color: #8fa1c4; }
body:not(.board-mode) .rail .full-nav-chevron { border-color: rgba(255,255,255,.28); color: #b8c6de; background: rgba(255,255,255,.08); }
body:not(.board-mode) .rail .full-nav-group:hover .full-nav-chevron { border-color: rgba(255,255,255,.5); color: #fff; background: rgba(255,255,255,.16); }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group { color: #55648a; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-chevron { border-color: #cdd6e4; color: #68799a; background: #f2f5fa; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group:hover .full-nav-chevron { border-color: #a5b5cc; color: #2f6ff2; background: #e9efff; }
body[data-theme="dark"] .full-nav-group { color: #a9b9d6; }
body[data-theme="dark"] .full-nav-chevron { border-color: #3a4f75; color: #a9b9d6; background: #1a2639; }
body[data-theme="dark"] .full-nav-group:hover .full-nav-chevron { border-color: #55719f; color: #fff; background: #223350; }

/* 智能工作台静态父级标题 */
.full-nav-group.is-static { cursor: default; }
.full-nav-group.is-static:hover { color: inherit; }


/* ==================== 父级菜单视觉层级强化（v18g） ==================== */
/* 父级：图标文字更大、颜色更亮 */
.full-nav-group { gap: 9px; margin: 14px 8px 4px; padding: 5px 8px; border-radius: 10px; font-size: 13px; font-weight: 750; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.full-nav-group-icon { width: 17px; height: 17px; }
.full-nav-chevron { width: 24px; height: 24px; }
.full-nav-chevron svg { width: 12px; height: 12px; }
body:not(.board-mode) .rail .full-nav-group { color: #d5dff2; }
body:not(.board-mode) .rail .full-nav-group-icon { color: #a9bce0; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group { color: #3d4c66; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group-icon { color: #4b5870; }

/* 父级选中反馈：当前页所在组常驻高亮框；点击瞬间闪烁确认 */
.full-nav-group.is-current { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); color: #fff; }
.full-nav-group.is-current .full-nav-group-icon { color: #fff; }
.full-nav-group.is-current .full-nav-chevron { border-color: rgba(255,255,255,.45); color: #fff; background: rgba(255,255,255,.14); }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group.is-current { background: color-mix(in srgb, var(--ui-accent) 9%, #fff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ui-accent) 35%, transparent); color: var(--ui-accent); }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group.is-current .full-nav-group-icon { color: var(--ui-accent); }
@keyframes navGroupFlash { 0% { background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); } 100% { background: rgba(255,255,255,.06); } }
.full-nav-group.just-toggled { animation: navGroupFlash .45s ease-out; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group.just-toggled { animation: none; background: color-mix(in srgb, var(--ui-accent) 16%, #fff); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ui-accent) 45%, transparent); }

/* 子级：收敛一级，不与父级争视觉 */
body:not(.board-mode) .rail .top-nav > button[data-view], body:not(.board-mode) .rail .top-nav > button[data-module] { min-height: 42px; color: #9db0cf; }
body:not(.board-mode) .rail .top-nav > button .role-nav-icon { width: 32px; height: 32px; border-radius: 9px; }
body:not(.board-mode) .rail .top-nav > button .role-nav-icon svg { width: 15px !important; height: 15px !important; }
body:not(.board-mode) .rail .top-nav > button .role-nav-copy b { font-size: 10.5px; }
body:not(.board-mode) .rail .top-nav > button .role-nav-copy small { font-size: 8.5px; }


/* ==================== 父级菜单最终形态（v18i） ==================== */
/* 无箭头：整行即开关；父级文字更大 */
.full-nav-group { gap: 9px; margin: 13px 8px 4px; padding: 6px 9px; border-radius: 11px; font-size: 14px; font-weight: 750; }
.full-nav-group-icon { width: 18px; height: 18px; }

/* 展开态 = 选中框：左侧色条发光（霓虹），父级与子级一眼区分 */
.full-nav-group { position: relative; }
.full-nav-group.is-expanded { color: #fff; background: linear-gradient(90deg, rgba(255,255,255,.1), rgba(255,255,255,.04)); box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.full-nav-group.is-expanded::before, .full-nav-group.is-current::before { content: ""; position: absolute; left: 1px; top: 5px; bottom: 5px; width: 3.5px; border-radius: 4px; background: var(--ui-accent); box-shadow: 0 0 6px var(--ui-accent), 0 0 16px color-mix(in srgb, var(--ui-accent) 65%, transparent), 0 0 34px color-mix(in srgb, var(--ui-accent) 38%, transparent); }
.full-nav-group.is-expanded .full-nav-group-icon { color: #fff; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group.is-expanded { color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 10%, #fff); box-shadow: 0 6px 14px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group.is-expanded .full-nav-group-icon { color: var(--ui-accent); }
body[data-theme="dark"] .full-nav-group.is-expanded { background: linear-gradient(90deg, color-mix(in srgb, var(--ui-accent) 22%, transparent), color-mix(in srgb, var(--ui-accent) 8%, transparent)); }

/* 收起态：恢复低调灰 */
.full-nav-group.is-collapsed { color: #8fa1c4; }
.full-nav-group.is-collapsed .full-nav-group-icon { color: #7488ab; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group.is-collapsed { color: #68799a; }

/* 悬停提示可点 */
.full-nav-group:hover { background: rgba(255,255,255,.07); }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group:hover { background: color-mix(in srgb, var(--ui-accent) 6%, #fff); }


/* ==================== 暗夜主题补盲（v18j） ==================== */
/* 分区台账（凭证/应收应付/出纳等分区卡片） */
body[data-theme="dark"] .split-ledger-section { border-color: #263449; background: #131c2c; }
body[data-theme="dark"] .split-ledger-section > header, body[data-theme="dark"] .split-ledger-toolbar { border-bottom-color: #22304a; color: #dbe4f2; }
body[data-theme="dark"] .split-ledger-section > header b, body[data-theme="dark"] .split-ledger-section > header h3 { color: #e8eef8; }
body[data-theme="dark"] .split-ledger-section > header small, body[data-theme="dark"] .split-ledger-section > header p { color: #7c8fb1; }
body[data-theme="dark"] .split-ledger-list { background: transparent; }
body[data-theme="dark"] .split-ledger-row, body[data-theme="dark"] .split-ledger-row.has-payable-select { border-color: #2b3b58; background: #16202f; color: #dbe4f2; }
body[data-theme="dark"] .split-ledger-row:hover { border-color: #3a4f75; background: #1c2940; }
body[data-theme="dark"] .split-ledger-row b, body[data-theme="dark"] .split-ledger-row strong { color: #e8eef8; }
body[data-theme="dark"] .split-ledger-row small, body[data-theme="dark"] .split-ledger-row em { color: #8b9cb8; }
body[data-theme="dark"] .split-ledger-empty { color: #7c8fb1; }
body[data-theme="dark"] .signature-panel.split-ledger-shell { background: #16202f; border-color: #263449; }

/* 业务流向上下文条 / 工作方式条 / 底部证明条 */
body[data-theme="dark"] .route-context-bar { border-color: #263449; background: #16202f; color: #dbe4f2; }
body[data-theme="dark"] .route-context-bar span { background: transparent; }
body[data-theme="dark"] .route-context-bar small { color: #7c8fb1; }
body[data-theme="dark"] .route-context-bar b { color: #e8eef8; }
body[data-theme="dark"] .route-context-bar svg { color: #55719f; }
body[data-theme="dark"] .route-context-bar .current b { color: var(--ui-accent); }
body[data-theme="dark"] .module-way, body[data-theme="dark"] .module-way-strip { border-color: #263449; background: #16202f; color: #dbe4f2; }
body[data-theme="dark"] .module-way small, body[data-theme="dark"] .module-way-strip small { color: #7c8fb1; }
body[data-theme="dark"] .module-way b, body[data-theme="dark"] .module-way-strip b { color: #e8eef8; }
body[data-theme="dark"] .live-route-flow { border-color: #2b3b58; background: #1a2639; }
body[data-theme="dark"] .live-route-flow small { color: #7c8fb1; }
body[data-theme="dark"] .live-route-flow b { color: #dbe4f2; }
body[data-theme="dark"] .live-route-glyph { background: #223350; color: var(--ui-accent); }

/* 模块通用提示/证明/引导条 */
body[data-theme="dark"] .requisition-proof, body[data-theme="dark"] .system-management-proof, body[data-theme="dark"] .module-section > p, body[data-theme="dark"] .signature-panel > p { color: #8b9cb8; }
body[data-theme="dark"] .requisition-proof { background: #143024; border-color: #1f4d3a; color: #9fd8bd; }
body[data-theme="dark"] .module-footer-note, body[data-theme="dark"] .proof-strip { border-color: #263449; background: #131c2c; color: #8b9cb8; }

/* KPI 与指标卡 */
body[data-theme="dark"] .sig-kpi, body[data-theme="dark"] .summary-strip > div { border-color: #263449; background: #16202f; }
body[data-theme="dark"] .summary-strip > div { border-right-color: #22304a; }
body[data-theme="dark"] .sig-kpi small, body[data-theme="dark"] .summary-strip span { color: #7c8fb1; }
body[data-theme="dark"] .sig-kpi b, body[data-theme="dark"] .summary-strip b { color: #e8eef8; }
body[data-theme="dark"] .metric-grid article { border-color: #263449; background: #16202f; }

/* 记录行与台账列表 */
body[data-theme="dark"] .customer-directory-list { background: transparent; }
body[data-theme="dark"] .customer-directory-toolbar label svg { color: #55719f; }
body[data-theme="dark"] .customer-directory-pagination button { border-color: #2b3b58; background: #1a2639; color: #b9c7dd; }
body[data-theme="dark"] .customer-directory-pagination span { color: #8b9cb8; }
body[data-theme="dark"] .record-row-lifecycle { background: #223350; color: #b9c7dd; }
body[data-theme="dark"] .record-row-unreview { border-color: #365174; background: #1b2b43; color: #a9c7ee; }
body[data-theme="dark"] .record-row-unreview.is-blocked { border-color: #465166; color: #8996aa; background: #18212f; }
body[data-theme="dark"] .customer-grid-card .customer-grid-status { background: #3a2f14; color: #e5b95c; }
body[data-theme="dark"] .customer-grid-card .customer-grid-status.is-complete { background: #143024; color: #6fd3a5; }

/* 弹窗内部表单与说明 */
body[data-theme="dark"] .action-form label > span, body[data-theme="dark"] .action-form small { color: #8b9cb8; }
body[data-theme="dark"] .action-form label > b, body[data-theme="dark"] .form-field > span { color: #b9c7dd; }
body[data-theme="dark"] .action-progress span b { color: #7c8fb1; }
body[data-theme="dark"] .action-progress span.active b, body[data-theme="dark"] .action-progress span.done b { color: var(--ui-accent); }
body[data-theme="dark"] .action-sheet .action-body { color: #dbe4f2; }
body[data-theme="dark"] .action-sheet h3, body[data-theme="dark"] .action-sheet h2 { color: #e8eef8; }
body[data-theme="dark"] .relationship-workbench, body[data-theme="dark"] .relationship-picker, body[data-theme="dark"] .workbench-form, body[data-theme="dark"] .relationship-workbench > aside { background: #131c2c; border-color: #263449; color: #dbe4f2; }
body[data-theme="dark"] .relationship-option:hover, body[data-theme="dark"] .relationship-option:focus-visible { background: #1c2940; border-color: #3a4f75; }
body[data-theme="dark"] .relationship-option.selected { background: color-mix(in srgb, var(--ui-accent) 16%, #16202f); border-color: var(--ui-accent); }
body[data-theme="dark"] .business-line input, body[data-theme="dark"] .business-line select { background: #101827 !important; border-color: #2b3b58 !important; color: #e6edf7 !important; }

/* 看板与图表 */
body[data-theme="dark"] .bars i { background: #263449; }
body[data-theme="dark"] .process-step > span { background: #1a2639; color: #8b9cb8; box-shadow: inset 0 0 0 1px #2b3b58; }
body[data-theme="dark"] .process-line > i { background: #2b3b58; }
body[data-theme="dark"] .process-step b { color: #b9c7dd; }
body[data-theme="dark"] .focus-card { background: linear-gradient(135deg, #16283f 0%, #131c2c 62%, #101827 100%); }
body[data-theme="dark"] .focus-copy p, body[data-theme="dark"] .customer-stack small { color: #8b9cb8; }
body[data-theme="dark"] .assistant-card { background: linear-gradient(155deg, #131c2c 0%, #0f1624 100%); border-color: #263449; }
body[data-theme="dark"] .mini-progress { background: #263449; }
body[data-theme="dark"] .studio-canvas[data-snap="on"] { background-image: radial-gradient(circle, rgba(180,200,235,.16) 1px, transparent 1.4px); }


/* ==================== 暗夜体系重做（v19：层次化配色，取代此前扁平黑） ==================== */
/* 层级：页面 #0c1119 → 面板 #131a26 → 卡片 #1a2333 → 浮层 #222e44；文字全面提亮 */
body[data-theme="dark"] {
  --surface: rgba(19, 26, 38, .94);
  --surface-strong: #131a26;
  --ink: #e9eef7;
  --muted: #a9b8cf;
  --quiet: #7d8fa9;
  --line: #263348;
  background: radial-gradient(circle at 78% -10%, rgba(47, 111, 242, .12), transparent 30rem), linear-gradient(150deg, #0b0f18 0%, #0e141f 55%, #0b101a 100%);
}
/* 面板与卡片重新分层 */
body[data-theme="dark"] .signature-panel, body[data-theme="dark"] .focus-card, body[data-theme="dark"] .pulse-card, body[data-theme="dark"] .flow-card, body[data-theme="dark"] .module-section, body[data-theme="dark"] .table-card, body[data-theme="dark"] .receivable-card, body[data-theme="dark"] .match-card,
body[data-theme="dark"] .customer-directory-list .sig-row-button, body[data-theme="dark"] .customer-directory-list .customer-grid-card, body[data-theme="dark"] #view-orders .order-card, body[data-theme="dark"] .modern-table.is-card-mode .order-card,
body[data-theme="dark"] .studio-widget, body[data-theme="dark"] .rd-card, body[data-theme="dark"] .scheme-row, body[data-theme="dark"] .rd-lane,
body[data-theme="dark"] .summary-strip, body[data-theme="dark"] .sig-kpi, body[data-theme="dark"] .metric-grid article, body[data-theme="dark"] .product-card-stats > div,
body[data-theme="dark"] .split-ledger-row, body[data-theme="dark"] .split-ledger-row.has-payable-select, body[data-theme="dark"] .signature-panel.split-ledger-shell {
  border-color: #263348; background: #131a26; color: #dbe4f2; box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
body[data-theme="dark"] .signature-panel.tinted { background: linear-gradient(155deg, #1a2333, #131a26 70%); }
body[data-theme="dark"] .split-ledger-section { border-color: #263348; background: #10161f; }
body[data-theme="dark"] .split-ledger-row, body[data-theme="dark"] .split-ledger-row.has-payable-select { background: #1a2333; border-color: #2b3a52; }
body[data-theme="dark"] .split-ledger-row:hover { background: #222e44; border-color: #3a4f75; }
body[data-theme="dark"] .studio-widget:hover, body[data-theme="dark"] .rd-card:hover, body[data-theme="dark"] .scheme-row:hover, body[data-theme="dark"] .customer-directory-list .sig-row-button:hover, body[data-theme="dark"] .customer-directory-list .customer-grid-card:hover { background: #1a2333; border-color: #3a4f75; box-shadow: 0 10px 26px rgba(0,0,0,.4); }
/* 次级内容层（嵌套卡片） */
body[data-theme="dark"] .product-card-params, body[data-theme="dark"] .product-card-variants, body[data-theme="dark"] .product-card-params span, body[data-theme="dark"] .rd-detail-grid > div, body[data-theme="dark"] .studio-inbox button, body[data-theme="dark"] .studio-rows button, body[data-theme="dark"] .studio-flow-actions button, body[data-theme="dark"] .appearance-card, body[data-theme="dark"] .account-settings-card, body[data-theme="dark"] .record-hero, body[data-theme="dark"] .record-facts, body[data-theme="dark"] .rd-cost-block, body[data-theme="dark"] .rd-lane-card {
  border-color: #2b3a52; background: #1a2333;
}
/* 文字全面提亮 */
body[data-theme="dark"] small, body[data-theme="dark"] .table-row small, body[data-theme="dark"] .customer-grid-lines > span, body[data-theme="dark"] .studio-empty, body[data-theme="dark"] .sig-row small, body[data-theme="dark"] .scheme-row-main small, body[data-theme="dark"] .studio-inbox button small, body[data-theme="dark"] .studio-rows button small, body[data-theme="dark"] .rd-timeline-item small, body[data-theme="dark"] .product-card-params em, body[data-theme="dark"] .split-ledger-row small, body[data-theme="dark"] .split-ledger-row em, body[data-theme="dark"] .page-intro p, body[data-theme="dark"] .eyebrow { color: #a9b8cf; }
body[data-theme="dark"] .studio-metric small, body[data-theme="dark"] .studio-clock small, body[data-theme="dark"] .customer-grid-title small, body[data-theme="dark"] .table-head, body[data-theme="dark"] .customer-directory-status { color: #7d8fa9; }
/* 输入控件：与面板拉开层次，不再"黑洞" */
body[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]), body[data-theme="dark"] select, body[data-theme="dark"] textarea,
body[data-theme="dark"] .tool-right label, body[data-theme="dark"] .command-search, body[data-theme="dark"] .customer-directory-toolbar label,
body[data-theme="dark"] .action-sheet input:not([type="checkbox"]), body[data-theme="dark"] .action-sheet select, body[data-theme="dark"] .action-sheet textarea,
body[data-theme="dark"] .settings-notify-grid select, body[data-theme="dark"] .preferences-live-form select, body[data-theme="dark"] .params-row input, body[data-theme="dark"] .variants-row input, body[data-theme="dark"] .business-line input, body[data-theme="dark"] .business-line select {
  border-color: #33445f !important; background: #10161f !important; color: #e9eef7 !important;
}
body[data-theme="dark"] input:focus, body[data-theme="dark"] select:focus, body[data-theme="dark"] textarea:focus { border-color: var(--ui-accent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 22%, transparent) !important; }
body[data-theme="dark"] input::placeholder, body[data-theme="dark"] textarea::placeholder { color: #5f7392; }
/* 斑马纹清除：身份条 / 导览条 / 偏好页 / 提示条 */
body[data-theme="dark"] .signature-identity { border-color: #263348; background: linear-gradient(145deg, #1a2333, #131a26 75%); }
body[data-theme="dark"] .signature-identity small { color: #7d8fa9; }
body[data-theme="dark"] .signature-identity b { color: #dbe4f2; }
body[data-theme="dark"] .signature-glyph { background: #222e44; color: var(--ui-accent); }
body[data-theme="dark"] .module-wayfinding { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .module-wayfinding small { color: #7d8fa9; }
body[data-theme="dark"] .module-wayfinding b { color: #a9b8cf; }
body[data-theme="dark"] .module-wayfinding-status { color: #7d8fa9; }
body[data-theme="dark"] .preferences-live-form { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .preferences-live-form > header { border-bottom-color: #263348; }
body[data-theme="dark"] .preferences-live-form > header h2 { color: #e9eef7; }
body[data-theme="dark"] .preferences-live-form > header p, body[data-theme="dark"] .preferences-live-form > header small { color: #a9b8cf; }
body[data-theme="dark"] .preferences-field-grid label { border-color: #2b3a52; background: #1a2333; }
body[data-theme="dark"] .preferences-field-grid label > span { color: #dbe4f2; }
body[data-theme="dark"] .preferences-field-grid label > span small { color: #7d8fa9; }
body[data-theme="dark"] .preferences-save-feedback { color: #a9b8cf; }
body[data-theme="dark"] .route-context-bar { background: #131a26; }
/* 按钮与控件层次 */
body[data-theme="dark"] .ghost-button { border-color: #33445f; color: #c4d2e8; background: #1a2333; }
body[data-theme="dark"] .ghost-button:hover { background: #222e44; border-color: #4a608a; color: #e9eef7; }
body[data-theme="dark"] .icon-button, body[data-theme="dark"] .search-icon-button, body[data-theme="dark"] .company-switch { border-color: #33445f; background: #131a26; color: #c4d2e8; }
body[data-theme="dark"] .icon-button:hover, body[data-theme="dark"] .search-icon-button:hover, body[data-theme="dark"] .company-switch:hover { background: #1a2333; }
body[data-theme="dark"] .studio-widget-link { border-color: color-mix(in srgb, var(--ui-accent) 45%, #2b3a52); background: color-mix(in srgb, var(--ui-accent) 14%, #1a2333); }
body[data-theme="dark"] .studio-widget-icon { background: color-mix(in srgb, var(--ui-accent) 20%, #222e44); }
body[data-theme="dark"] .studio-kpis > span, body[data-theme="dark"] .studio-board-mini span { background: #1a2333; }
body[data-theme="dark"] .studio-recent { border-top-color: #2b3a52; }
body[data-theme="dark"] .customer-view-toggle { background: #10161f; }
body[data-theme="dark"] .segmented { background: #10161f; }
body[data-theme="dark"] .segmented button.active { background: #222e44; }
/* 顶部栏 */
body[data-theme="dark"] .topbar { background: rgba(12, 17, 25, .86); border-bottom-color: #1e2a3d; }
body[data-theme="dark"] .workspace-context-icon { color: var(--ui-accent); }
/* 弹窗 */
body[data-theme="dark"] .action-sheet, body[data-theme="dark"] .account-menu, body[data-theme="dark"] .workspace-open-menu, body[data-theme="dark"] .studio-settings { border-color: #2b3a52; background: #131a26; }
body[data-theme="dark"] .action-sheet .action-body { background: transparent; }
body[data-theme="dark"] .studio-add-panel { background: rgba(26, 35, 51, .6); }
body[data-theme="dark"] .studio-add-panel button, body[data-theme="dark"] .studio-preset-grid button, body[data-theme="dark"] .appearance-options > button, body[data-theme="dark"] .appearance-swatches > button, body[data-theme="dark"] .appearance-custom, body[data-theme="dark"] .quick-create-grid button { border-color: #2b3a52; background: #1a2333; }
body[data-theme="dark"] .studio-add-panel button:hover, body[data-theme="dark"] .studio-preset-grid button:hover, body[data-theme="dark"] .appearance-options > button:hover, body[data-theme="dark"] .appearance-swatches > button:hover { background: #222e44; }
/* 小奥 */
body[data-theme="dark"] .copilot-chat-primary { border-color: #2b3a52; background: linear-gradient(180deg, #131a26, #0f1520); }
body[data-theme="dark"] .copilot-chat-console > header { border-bottom-color: #263348; background: linear-gradient(90deg, #1a2333, #131a26); }
body[data-theme="dark"] .copilot-chat-messages { background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--ui-accent) 9%, transparent), transparent 60%), #0d1219; }
body[data-theme="dark"] .copilot-chat-message > div { color: #dbe4f2; }
body[data-theme="dark"] #copilotConsoleComposer { border-color: #33445f; background: #131a26; }
body[data-theme="dark"] .copilot-attachment-bar { background: #10161f; border-color: #263348; }
body[data-theme="dark"] .copilot-file-queue > div, body[data-theme="dark"] .copilot-file-queue article { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
/* 状态徽章与标签 */
body[data-theme="dark"] .record-row-lifecycle { background: #222e44; color: #c4d2e8; }
body[data-theme="dark"] .pill { background: #222e44; }
body[data-theme="dark"] .pill-coral { color: #ff9aa5; box-shadow: inset 0 0 0 1px rgba(239,98,109,.3); }


/* ==================== 小奥消息气泡暗色（v19b：黑底白字，不要灰字） ==================== */
body[data-theme="dark"] .copilot-chat-message > div { color: #eef3fb; }
body[data-theme="dark"] .copilot-chat-message.ai > div { border-color: #2b3a52; background: #1a2333; }
body[data-theme="dark"] .copilot-chat-message > div p { color: #eef3fb; }
body[data-theme="dark"] .copilot-chat-message > div b, body[data-theme="dark"] .copilot-chat-message > div strong { color: #ffffff; }
body[data-theme="dark"] .copilot-inline-heading { color: #ffffff; }
body[data-theme="dark"] .copilot-inline-table { border-color: #2b3a52; background: #10161f; }
body[data-theme="dark"] .copilot-inline-table table { color: #eef3fb; }
body[data-theme="dark"] .copilot-inline-table th { border-color: #2b3a52; background: #222e44; color: #ffffff; }
body[data-theme="dark"] .copilot-inline-table td { border-color: #263348; color: #eef3fb; }
body[data-theme="dark"] .copilot-inline-table tr:hover td { background: #1a2333; }
body[data-theme="dark"] .copilot-chat-message code { border-color: #33445f; background: #222e44; color: #ffd9a8; }
body[data-theme="dark"] .copilot-chat-message hr { border-color: #263348; }
body[data-theme="dark"] .copilot-chat-message em { color: #a9b8cf; }
body[data-theme="dark"] .copilot-chat-message li::marker { color: #7d8fa9; }
/* 快捷入口卡片 / 签批卡 / 警示卡 */
body[data-theme="dark"] .copilot-nav-card, body[data-theme="dark"] .copilot-nav-link { border-color: #2b3a52; background: #222e44; color: #eef3fb; }
body[data-theme="dark"] .copilot-nav-card:hover, body[data-theme="dark"] .copilot-nav-link:hover { background: #2b3a52; border-color: var(--ui-accent); }
body[data-theme="dark"] .copilot-nav-card b, body[data-theme="dark"] .copilot-nav-link b { color: #ffffff; }
body[data-theme="dark"] .copilot-nav-card small, body[data-theme="dark"] .copilot-nav-link small { color: #a9b8cf; }
body[data-theme="dark"] .copilot-approval-card { border-color: #3a4f75; background: #1a2333; color: #eef3fb; }
body[data-theme="dark"] .copilot-approval-card b { color: #ffffff; }
body[data-theme="dark"] .copilot-approval-card small { color: #a9b8cf; }
body[data-theme="dark"] .copilot-warning-card { border-color: #6b3a2a; background: #2b1a14; color: #ffb4a8; }
body[data-theme="dark"] .copilot-source-card, body[data-theme="dark"] .assistant-source-card { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .assistant-source-card small { color: #7d8fa9; }
body[data-theme="dark"] .assistant-source-card b { color: #ffffff; }
/* 用户气泡 */
body[data-theme="dark"] .copilot-chat-message.user > div { background: color-mix(in srgb, var(--ui-accent) 26%, #1a2333); color: #ffffff; }
body[data-theme="dark"] .copilot-chat-message.user > div p { color: #ffffff; }
/* 待签批浮层 */
body[data-theme="dark"] .copilot-approval-menu > div { border-color: #2b3a52; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .copilot-model-status { border-color: #2b3a52; background: #1a2333; color: #a9b8cf; }
body[data-theme="dark"] .copilot-approval-menu summary { color: #c4d2e8; }


/* ==================== 暗夜全面清扫（v19c：按 11 张截图逐区覆盖） ==================== */
/* 1) 今天要做 */
body[data-theme="dark"] .today-queue .guided-task, body[data-theme="dark"] .guided-task { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .guided-task .task-main h2, body[data-theme="dark"] .guided-task h2 { color: #e9eef7; }
body[data-theme="dark"] .guided-task .task-main p, body[data-theme="dark"] .guided-task p { color: #a9b8cf; }
body[data-theme="dark"] .task-rank { background: color-mix(in srgb, var(--ui-accent) 22%, #222e44); color: #fff; }
body[data-theme="dark"] .pill.task-blue { background: color-mix(in srgb, var(--ui-accent) 18%, #222e44); color: #bcd0f5; }
body[data-theme="dark"] .today-layout .primary-button, body[data-theme="dark"] .guided-task .primary-button { box-shadow: 0 8px 18px color-mix(in srgb, var(--ui-accent) 30%, transparent); }
body[data-theme="dark"] .journey-dock { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .journey-dock b { color: #e9eef7; }
body[data-theme="dark"] .journey-dock small { color: #a9b8cf; }
body[data-theme="dark"] .journey-dock-track { background: #10161f; }
body[data-theme="dark"] .journey-dock .primary-button, body[data-theme="dark"] .journey-dock .ghost-button { background: #1a2333; border-color: #33445f; color: #c4d2e8; }

/* 2) 经营总览：引导条 / 焦点卡内部 */
body[data-theme="dark"] .home-guide-strip, body[data-theme="dark"] .guide-strip, body[data-theme="dark"] .onboarding-strip, body[data-theme="dark"] .first-run-strip, body[data-theme="dark"] .home-onboarding { border-color: #263348; background: #131a26; color: #a9b8cf; }
body[data-theme="dark"] .home-guide-strip b, body[data-theme="dark"] .guide-strip b, body[data-theme="dark"] .onboarding-strip b { color: #e9eef7; }
body[data-theme="dark"] .customer-stack > span { background: #222e44; color: #c4d2e8; box-shadow: none; }
body[data-theme="dark"] .focus-copy h2 { color: #ffffff; }
body[data-theme="dark"] .focus-copy .order-code { color: var(--ui-accent); }
body[data-theme="dark"] .focus-actions .text-button, body[data-theme="dark"] .pulse-foot button { color: #c4d2e8; }
body[data-theme="dark"] .focus-actions .primary-button.dark { background: #222e44; }
body[data-theme="dark"] .pulse-card .money { color: #ffffff; }
body[data-theme="dark"] .focus-progress div { background: #263348; }

/* 3) BOM 配方工作区 */
body[data-theme="dark"] .bom-ledger-section { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .bom-ledger-section > header, body[data-theme="dark"] .bom-ledger-section-summary { border-bottom-color: #263348; color: #dbe4f2; }
body[data-theme="dark"] .bom-ledger-section-summary b, body[data-theme="dark"] .bom-ledger-section > header b { color: #e9eef7; }
body[data-theme="dark"] .bom-ledger-section-summary small { color: #a9b8cf; }
body[data-theme="dark"] .bom-ledger-list { background: transparent; }
body[data-theme="dark"] .bom-ledger-row { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .bom-ledger-row:hover { background: #222e44; border-color: #3a4f75; }
body[data-theme="dark"] .bom-ledger-row b, body[data-theme="dark"] .bom-ledger-row-copy b { color: #e9eef7; }
body[data-theme="dark"] .bom-ledger-row small, body[data-theme="dark"] .bom-ledger-row-fact small { color: #a9b8cf; }
body[data-theme="dark"] .bom-ledger-row-icon, body[data-theme="dark"] .bom-ledger-section-icon { background: #222e44; color: var(--ui-accent); }
body[data-theme="dark"] .bom-ledger-row-arrow { color: #7d8fa9; }
body[data-theme="dark"] .bom-ledger-row .is-ready { color: #6fd3a5; }
body[data-theme="dark"] .bom-ledger-row .is-pending { color: #e5b95c; }
body[data-theme="dark"] .bom-ledger-row .is-selected { color:#9fb5ff; background:#25304d; }
body[data-theme="dark"] .main-bom-selection > header { border-bottom-color:#263348; }
body[data-theme="dark"] .main-bom-selection > header h3 { color:#e9eef7; }
body[data-theme="dark"] .main-bom-selection > header p { color:#a9b8cf; }
body[data-theme="dark"] .main-bom-selection-search { border-color:#33445f; background:#10161f; }
body[data-theme="dark"] .main-bom-selection-search input { color:#e9eef7; }
body[data-theme="dark"] .main-bom-selection-summary { border-color:#2b3a52; background:#16202f; }
body[data-theme="dark"] .main-bom-selection-summary p { color:#a9b8cf; }
body[data-theme="dark"] .main-bom-selection-row { border-color:#2b3a52; background:#1a2333; }
body[data-theme="dark"] .main-bom-selection-row:hover { border-color:#4d6490; background:#222e44; }
body[data-theme="dark"] .main-bom-selection-row.is-selected { border-color:#607bd0; background:#202a43; }
body[data-theme="dark"] .main-bom-selection-check { border-color:#4a5971; background:#10161f; }
body[data-theme="dark"] .main-bom-selection-copy b { color:#e9eef7; }
body[data-theme="dark"] .main-bom-selection-copy small,body[data-theme="dark"] .main-bom-selection-state small { color:#8fa0b8; }
body[data-theme="dark"] .main-bom-selection-state b { color:#b9c7dd; }
body[data-theme="dark"] .main-bom-selection-row.is-selected .main-bom-selection-state b { color:#aebeff; }
body[data-theme="dark"] .bom-create-card, body[data-theme="dark"] .bom-kind-card { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .bom-create-card b, body[data-theme="dark"] .bom-kind-card b { color: #e9eef7; }
body[data-theme="dark"] .bom-create-card small, body[data-theme="dark"] .bom-kind-card small { color: #a9b8cf; }
body[data-theme="dark"] .bom-tree-node, body[data-theme="dark"] .bom-node { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }

/* 4) 表格体系（物料需求/所有 .modern-table） */
body[data-theme="dark"] .modern-table { background: #131a26; }
body[data-theme="dark"] .table-head { background: #10161f; color: #7d8fa9; border-bottom-color: #263348; }
body[data-theme="dark"] .table-row { border-bottom-color: #22304a; color: #dbe4f2; }
body[data-theme="dark"] .table-row > span { color: #dbe4f2; }
body[data-theme="dark"] .table-row b { color: #e9eef7; }
body[data-theme="dark"] .table-empty { background: transparent; color: #7d8fa9; }
body[data-theme="dark"] .table-card .table-tools { border-bottom-color: #263348; }
body[data-theme="dark"] .requisition-toolbar { background: #131a26; border-color: #263348; }
body[data-theme="dark"] .requisition-toolbar > label { color: #a9b8cf; }
body[data-theme="dark"] input[type="date"], body[data-theme="dark"] input[type="datetime-local"] { color-scheme: dark; }

/* 5) 资金/采购/仓库/销售/系统 工作台枢纽卡 */
body[data-theme="dark"] .procurement-workspace-card, body[data-theme="dark"] .warehouse-workspace-card, body[data-theme="dark"] .finance-workspace-card, body[data-theme="dark"] .sales-workspace-card, body[data-theme="dark"] .system-management-card {
  border-color: #2b3a52; background: linear-gradient(145deg, #1a2333 0%, #131a26 100%); color: #dbe4f2;
}
body[data-theme="dark"] .procurement-workspace-card:hover, body[data-theme="dark"] .warehouse-workspace-card:hover, body[data-theme="dark"] .finance-workspace-card:hover, body[data-theme="dark"] .sales-workspace-card:hover, body[data-theme="dark"] .system-management-card:hover,
body[data-theme="dark"] .procurement-workspace-card:focus-visible, body[data-theme="dark"] .warehouse-workspace-card:focus-visible, body[data-theme="dark"] .finance-workspace-card:focus-visible, body[data-theme="dark"] .sales-workspace-card:focus-visible, body[data-theme="dark"] .system-management-card:focus-visible {
  border-color: color-mix(in srgb, var(--ui-accent) 55%, #2b3a52); background: #222e44; box-shadow: 0 14px 30px rgba(0,0,0,.45);
}
body[data-theme="dark"] .procurement-workspace-card > span, body[data-theme="dark"] .warehouse-workspace-card > span, body[data-theme="dark"] .finance-workspace-card > span, body[data-theme="dark"] .sales-workspace-card > span, body[data-theme="dark"] .system-management-card > span {
  background: #222e44; border-color: #33445f; color: var(--ui-accent);
}
body[data-theme="dark"] .procurement-workspace-card small, body[data-theme="dark"] .warehouse-workspace-card small, body[data-theme="dark"] .finance-workspace-card small, body[data-theme="dark"] .sales-workspace-card small, body[data-theme="dark"] .system-management-card small { color: #a9b8cf; }
body[data-theme="dark"] .procurement-workspace-card b, body[data-theme="dark"] .warehouse-workspace-card b, body[data-theme="dark"] .finance-workspace-card b, body[data-theme="dark"] .sales-workspace-card b, body[data-theme="dark"] .system-management-card b { color: #e9eef7; }
body[data-theme="dark"] .procurement-workspace-card p, body[data-theme="dark"] .warehouse-workspace-card p, body[data-theme="dark"] .finance-workspace-card p, body[data-theme="dark"] .sales-workspace-card p, body[data-theme="dark"] .system-management-card p { color: #a9b8cf; }
body[data-theme="dark"] .procurement-workspace-card em, body[data-theme="dark"] .warehouse-workspace-card em, body[data-theme="dark"] .finance-workspace-card em, body[data-theme="dark"] .sales-workspace-card em, body[data-theme="dark"] .system-management-card em { color: var(--ui-accent); }

/* 6) 分区台账的 lane 头部与工具条 */
body[data-theme="dark"] .split-ledger-section > header { background: #10161f; }
body[data-theme="dark"] .split-ledger-toolbar { background: #131a26; }
body[data-theme="dark"] .split-ledger-toolbar input { background: #10161f !important; }
body[data-theme="dark"] .split-ledger-toolbar > span, body[data-theme="dark"] .split-ledger-toolbar label { color: #a9b8cf; }
body[data-theme="dark"] .has-payable-select input[type="checkbox"] { accent-color: var(--ui-accent); }

/* 7) 经营地图 */
body[data-theme="dark"] .world-map, body[data-theme="dark"] .live-world-map { border-color: #263348; background: #10161f; }
body[data-theme="dark"] .world-map-toolbar, body[data-theme="dark"] .live-world-map > header { background: #131a26; border-bottom-color: #263348; color: #dbe4f2; }
body[data-theme="dark"] .world-map-toolbar small { color: #a9b8cf; }
body[data-theme="dark"] .world-map-toolbar b { color: #e9eef7; }
body[data-theme="dark"] .business-map-frame { background: #0d1219; }
body[data-theme="dark"] .map-load-status { color: #a9b8cf; }
body[data-theme="dark"] .map-live-legend span { background: #1a2333; color: #a9b8cf; border-color: #2b3a52; }
body[data-theme="dark"] .map-precision-note { color: #7d8fa9; }
body[data-theme="dark"] .map-country-list { background: transparent; }
body[data-theme="dark"] .map-country-card { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .map-country-card:hover { background: #222e44; border-color: var(--ui-accent); }
body[data-theme="dark"] .map-country-card b { color: #e9eef7; }
body[data-theme="dark"] .map-country-card small { color: #a9b8cf; }
body[data-theme="dark"] .map-country-card.is-unlocated { opacity: .7; }
body[data-theme="dark"] .geo-sidebar { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .geo-sidebar b, body[data-theme="dark"] .geo-sidebar strong { color: #e9eef7; word-break: break-word; }
body[data-theme="dark"] .geo-sidebar small, body[data-theme="dark"] .geo-sidebar span { color: #a9b8cf; word-break: break-word; }
body[data-theme="dark"] .geo-sidebar .customer-logo { background: #222e44; color: #c4d2e8; }
body[data-theme="dark"] .geo-sidebar button { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .leaflet-container { background: #0d1219; }
body[data-theme="dark"] .leaflet-control-zoom a { background: #1a2333; color: #c4d2e8; border-color: #2b3a52; }
body[data-theme="dark"] .leaflet-control-attribution { background: rgba(19,26,38,.8); color: #7d8fa9; }

/* 8) 用量与平台固定模型价目 */
body[data-theme="dark"] .ai-pricing-fixed-notice { border-color: #29453e; background: #162721; }
body[data-theme="dark"] .ai-pricing-fixed-notice > span, body[data-theme="dark"] .ai-pricing-fixed-notice em { color: #8fd8c0; background: #203c33; }
body[data-theme="dark"] .ai-pricing-fixed-notice b { color: #dcefe9; }
body[data-theme="dark"] .ai-pricing-fixed-notice small, body[data-theme="dark"] .ai-pricing-fixed-notice p { color: #8eb3a7; }
body[data-theme="dark"] .ai-usage-scenes > div { border-bottom-color: #22304a; }
body[data-theme="dark"] .ai-usage-scenes b { color: #e9eef7; }
body[data-theme="dark"] .ai-usage-scenes small { color: #a9b8cf; }
body[data-theme="dark"] .ai-usage-scenes em { background: #222e44; color: #c4d2e8; }
body[data-theme="dark"] .ai-usage-note { color: #a9b8cf; }

/* 9) 小奥快捷导航卡（打开 SO-0008 等） */
body[data-theme="dark"] .copilot-nav-card, body[data-theme="dark"] .copilot-nav-link, body[data-theme="dark"] .copilot-quick-link, body[data-theme="dark"] .copilot-chat-message [data-real-href] {
  border-color: #2b3a52; background: #222e44; color: #eef3fb;
}
body[data-theme="dark"] .copilot-chat-message [data-real-href]:hover { background: #2b3a52; border-color: var(--ui-accent); }
body[data-theme="dark"] .copilot-chat-message [data-real-href] b { color: #ffffff; }
body[data-theme="dark"] .copilot-chat-message [data-real-href] small { color: #a9b8cf; }
body[data-theme="dark"] .copilot-chat-message [data-real-href] svg { color: var(--ui-accent); }

/* 10) 工作台（订单/采购关系工作台内层） */
body[data-theme="dark"] .relationship-workbench-modal .action-sheet { background: #131a26; }
body[data-theme="dark"] .relationship-picker header label { background: #10161f !important; }
body[data-theme="dark"] .relationship-selected { background: #1a2333; border-color: #33445f; color: #dbe4f2; }
body[data-theme="dark"] .relationship-selected.is-empty { border-color: #33445f; color: #7d8fa9; background: transparent; }
body[data-theme="dark"] .hover-preview-card { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .hover-preview-card li, body[data-theme="dark"] .product-price-history li { background: #10161f; }
body[data-theme="dark"] .copy-source { border-color: #2b3a52; background: #1a2333; }
body[data-theme="dark"] .instruction-issue-preview { color: #dbe4f2; }
body[data-theme="dark"] .receipt-declaration { border-color: #33445f; background: #1a2333; }
body[data-theme="dark"] .receipt-declaration-fields { border-top-color: #263348; }
body[data-theme="dark"] .product-price-history, body[data-theme="dark"] .relationship-history { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .product-price-history article { background: #1a2333; }
body[data-theme="dark"] .relationship-history > button { border-top-color: #22304a; }
body[data-theme="dark"] .relationship-history > button:hover { background: #1a2333; }


/* ==================== 暗夜最终矩阵（v19d：按全站选择器审计逐族覆盖） ==================== */
/* 销售分析与进度（图70/71：图表白卡） */
body[data-theme="dark"] .sales-monthly-chart { border-color: #2b3a52; background: #131a26; }
body[data-theme="dark"] .sales-monthly-chart > header { border-bottom-color: #263348; }
body[data-theme="dark"] .sales-monthly-chart h2, body[data-theme="dark"] .sales-monthly-chart header small { color: #e9eef7; }
body[data-theme="dark"] .sales-monthly-chart header > span { color: #a9b8cf; }
body[data-theme="dark"] .sales-chart-row { background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .sales-chart-row:hover, body[data-theme="dark"] .sales-chart-row:focus-visible { background: #222e44; box-shadow: 0 5px 16px rgba(0,0,0,.4); }
body[data-theme="dark"] .sales-chart-row b { color: #e9eef7; }
body[data-theme="dark"] .sales-chart-row small { color: #a9b8cf; }
body[data-theme="dark"] .sales-chart-row > i { background: #263348; }
body[data-theme="dark"] .sales-progress-order { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .sales-progress-order > button { border-bottom-color: #263348; background: linear-gradient(90deg, #1a2333, #131a26 56%); color: #dbe4f2; }
body[data-theme="dark"] .sales-progress-order > button:hover { background: #222e44; }
body[data-theme="dark"] .sales-progress-order > button b, body[data-theme="dark"] .sales-progress-product b { color: #e9eef7; }
body[data-theme="dark"] .sales-progress-order > button em, body[data-theme="dark"] .sales-progress-order > button small { color: #a9b8cf; }
body[data-theme="dark"] .sales-progress-product { border-bottom-color: #22304a; }
body[data-theme="dark"] .sales-progress-product > span b { color: #e9eef7; }
/* 采购统计（图72：排行卡与筛选） */
body[data-theme="dark"] .purchase-stat-filters select, body[data-theme="dark"] .purchase-stat-search { border-color: #33445f !important; background: #10161f !important; color: #e9eef7 !important; }
body[data-theme="dark"] .purchase-stat-filter-bar { border-top-color:#2b3a52; }
body[data-theme="dark"] .purchase-stat-filter-bar label>span:first-child { color:#b5c2d5; }
body[data-theme="dark"] .purchase-stat-search.is-date input { color:#e9eef7; color-scheme:dark; }
body[data-theme="dark"] .purchase-rank-card, body[data-theme="dark"] .purchase-stat-card { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .purchase-rank-card b, body[data-theme="dark"] .purchase-stat-card b { color: #e9eef7; }
body[data-theme="dark"] .purchase-rank-card small, body[data-theme="dark"] .purchase-stat-card small { color: #a9b8cf; }
body[data-theme="dark"] .purchase-stat-row { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .purchase-stat-row:hover { background: #222e44; }
body[data-theme="dark"] .purchase-stat-row b { color: #e9eef7; }
body[data-theme="dark"] .purchase-stat-row small { color: #a9b8cf; }
body[data-theme="dark"] .purchase-stat-row .primary-button, body[data-theme="dark"] .purchase-stat-row .ghost-button { background: #222e44; border-color: #33445f; color: #c4d2e8; }
/* 订单审批工作台 */
body[data-theme="dark"] .order-approval-workbench, body[data-theme="dark"] .order-approval-workbench > header { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .order-approval-workbench h3, body[data-theme="dark"] .order-approval-workbench b { color: #e9eef7; }
body[data-theme="dark"] .order-approval-workbench small { color: #a9b8cf; }
body[data-theme="dark"] .order-line-card, body[data-theme="dark"] .order-line-routing { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .order-line-card b { color: #e9eef7; }
body[data-theme="dark"] .order-line-card small { color: #a9b8cf; }
/* 财务单证 */
body[data-theme="dark"] .financial-document-header { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .financial-document-header b { color: #e9eef7; }
body[data-theme="dark"] .financial-document-header small { color: #a9b8cf; }
body[data-theme="dark"] .voucher-entry-grid > span { border-color: #2b3a52; background: #1a2333; }
body[data-theme="dark"] .voucher-entry-grid small { color: #a9b8cf; }
body[data-theme="dark"] .voucher-entry-grid b { color: #e9eef7; }
/* 费用流转 */
body[data-theme="dark"] .expense-flow li { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .expense-flow li b { color: #e9eef7; }
body[data-theme="dark"] .expense-flow li small { color: #a9b8cf; }
body[data-theme="dark"] .expense-attachment-card, body[data-theme="dark"] .expense-attachment-gallery img { border-color: #2b3a52; background: #10161f; }
/* 审批决策 */
body[data-theme="dark"] .approval-decision-grid label > span { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .approval-decision-grid input:checked + span { border-color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 16%, #1a2333); }
/* 小奥英雄区与批量上传 */
body[data-theme="dark"] .copilot-hero-stats > div, body[data-theme="dark"] .copilot-hero-card { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .copilot-hero-stats b, body[data-theme="dark"] .copilot-hero-card b { color: #e9eef7; }
body[data-theme="dark"] .copilot-hero-stats small, body[data-theme="dark"] .copilot-hero-card small { color: #a9b8cf; }
body[data-theme="dark"] .batch-drop-zone { border-color: #33445f; background: #131a26; color: #a9b8cf; }
body[data-theme="dark"] .batch-drop-zone.is-dragover { border-color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 10%, #131a26); }
body[data-theme="dark"] .batch-intake-card, body[data-theme="dark"] .batch-file-card { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
/* 品牌与身份弹窗 */
body[data-theme="dark"] .brand-sheet { border-color: #2b3a52; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .brand-sheet h2, body[data-theme="dark"] .brand-company-card h3 { color: #e9eef7; }
body[data-theme="dark"] .brand-company-card { border-color: #2b3a52; background: #1a2333; }
body[data-theme="dark"] .brand-company-card small, body[data-theme="dark"] .brand-sheet p { color: #a9b8cf; }
body[data-theme="dark"] .brand-preview-stage { border-color: #2b3a52; background: #10161f; }
body[data-theme="dark"] .brand-preview-stage span, body[data-theme="dark"] .brand-preview-stage small { color: #a9b8cf; }
body[data-theme="dark"] .brand-safety-note { border-color: #33445f; background: #1a2333; color: #a9b8cf; }
body[data-theme="dark"] .brand-safety-note b { color: #e9eef7; }
body[data-theme="dark"] .brand-mark img { filter: none; }
/* 记录操作 */
body[data-theme="dark"] .record-copy-button { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .record-copy-button:hover { background: #222e44; }
body[data-theme="dark"] .record-row-lifecycle span { color: #c4d2e8; }
/* 小助手与智能体 */
body[data-theme="dark"] .assistant-card > button { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .assistant-card > button:hover { background: #222e44; }
body[data-theme="dark"] .ask-box { border-color: #33445f; background: #10161f; }
body[data-theme="dark"] .ask-box input { color: #e9eef7; }
body[data-theme="dark"] .ask-box input::placeholder { color: #5f7392; }
/* 在线路由与实况 */
body[data-theme="dark"] .live-module-route { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .live-route-flow b { color: #e9eef7; }
/* 物料计划按钮 */
body[data-theme="dark"] .material-plan-actions .secondary-button, body[data-theme="dark"] .material-plan-toolbar { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .material-plan-table { background: #131a26; }
/* 个人资料与名片 */
body[data-theme="dark"] .profile-hero { border-color: #2b3a52; background: linear-gradient(145deg, #1a2333, #131a26 75%); color: #dbe4f2; }
body[data-theme="dark"] .profile-hero b, body[data-theme="dark"] .profile-hero h2 { color: #e9eef7; }
body[data-theme="dark"] .profile-hero small, body[data-theme="dark"] .profile-hero p { color: #a9b8cf; }
body[data-theme="dark"] .profile-card, body[data-theme="dark"] .profile-section { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .bizcard-style-picker { border-color: #2b3a52; background: #131a26; }
body[data-theme="dark"] .bizcard-style-picker > div:first-child b { color: #e9eef7; }
body[data-theme="dark"] .bizcard-style-picker > div:first-child small { color: #8fa0b8; }
body[data-theme="dark"] .bizcard-style-picker button { border-color: #33445f; color: #c4d2e8; background: #1a2333; }
body[data-theme="dark"] .bizcard-style-picker button small { color: #8fa0b8; }
/* 独立文档窗口 */
body[data-theme="dark"] .standalone-document-modal, body[data-theme="dark"] body.standalone-document-entry .standalone-document-modal { background: #0c1119; }
body[data-theme="dark"] body.standalone-document-entry .standalone-return-button { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
/* 工作台杂项 */
body[data-theme="dark"] .ws-card { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .ws-card b { color: #e9eef7; }
body[data-theme="dark"] .ws-card small { color: #a9b8cf; }
body[data-theme="dark"] .fact-tags span { background: #143024; color: #9fd8bd; }
body[data-theme="dark"] .fact-tags.muted span { background: #222e44; color: #a9b8cf; }
body[data-theme="dark"] .line-editor-heading button { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .prototype-note { border-color: #2b3a52; background: rgba(19,26,38,.92); color: #a9b8cf; }
body[data-theme="dark"] .guide-mode .page-intro p { color: #a9b8cf; }
body[data-theme="dark"] .copy-source select { background: #10161f !important; border-color: #33445f !important; color: #e9eef7 !important; }
body[data-theme="dark"] .geo-hub span { background: #222e44; color: #c4d2e8; }
body[data-theme="dark"] .world-map-toolbar > div:last-child { color: #a9b8cf; }
/* 看板模式补充（board-mode 已是暗色，仅修亮度不足的辅助文字） */
body.board-mode .role-nav-heading small, body.board-mode .role-nav-copy small { color: #7d8fa9; }
body.board-mode .journey-dock small { color: #a9b8cf; }


/* ==================== 暗夜矩阵补遗（v19e：机器审计残留族） ==================== */
body[data-theme="dark"] .bom-change-controls { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .bom-change-controls b { color: #e9eef7; }
body[data-theme="dark"] .bom-change-controls small { color: #a9b8cf; }
body[data-theme="dark"] .bom-change-controls button { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .bom-revision-ledger,
body[data-theme="dark"] .bom-revision-ledger > header,
body[data-theme="dark"] .bom-revision-content { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .bom-revision-entry { border-color: #2b3a52; background: #1a2333; }
body[data-theme="dark"] .bom-revision-entry > summary:hover { background: #222e44; }
body[data-theme="dark"] .bom-revision-entry > summary b,
body[data-theme="dark"] .bom-revision-note b,
body[data-theme="dark"] .bom-revision-empty b { color: #e9eef7; }
body[data-theme="dark"] .bom-revision-entry > summary small,
body[data-theme="dark"] .bom-revision-entry > summary em,
body[data-theme="dark"] .bom-revision-note,
body[data-theme="dark"] .bom-revision-lines td,
body[data-theme="dark"] .bom-revision-comparison td,
body[data-theme="dark"] .bom-revision-empty p { color: #a9b8cf; }
body[data-theme="dark"] .bom-revision-comparison,
body[data-theme="dark"] .bom-revision-lines,
body[data-theme="dark"] .bom-revision-comparison th,
body[data-theme="dark"] .bom-revision-comparison td,
body[data-theme="dark"] .bom-revision-lines th,
body[data-theme="dark"] .bom-revision-lines td { border-color: #2b3a52; }
body[data-theme="dark"] .bom-revision-comparison thead th,
body[data-theme="dark"] .bom-revision-lines > header,
body[data-theme="dark"] .bom-revision-lines th,
body[data-theme="dark"] .bom-revision-empty { background: #10161f; color: #c4d2e8; }
body[data-theme="dark"] .financial-excel-sheet { border-color: #263348; background: #10161f; color: #dbe4f2; }
body[data-theme="dark"] .financial-excel-sheet th { background: #1a2333; color: #e9eef7; border-color: #2b3a52; }
body[data-theme="dark"] .financial-excel-sheet td { border-color: #22304a; color: #dbe4f2; }
body[data-theme="dark"] .financial-document-note { border-color: #33445f; background: #1a2333; color: #a9b8cf; }
body[data-theme="dark"] .financial-source-selector { border-color: #2b3a52; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .financial-source-selector b { color: #e9eef7; }
body[data-theme="dark"] .customer-logo-manager { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .customer-logo-upload { border-color: #33445f; background: #1a2333; color: #a9b8cf; }
body[data-theme="dark"] .customer-logo-upload:hover { border-color: var(--ui-accent); }
body[data-theme="dark"] .module-action-productionInstructions .action-sheet, body[data-theme="dark"] .module-action-outsourceInstructions .action-sheet { background: #131a26; }
body[data-theme="dark"] .sales-stat-card { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .sales-stat-card b { color: #e9eef7; }
body[data-theme="dark"] .sales-stat-card small { color: #a9b8cf; }
body[data-theme="dark"] .requisition-line { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .requisition-line:hover { border-color: #3a4f75; background: #222e44; }
body[data-theme="dark"] .requisition-line.selected { border-color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 12%, #1a2333); }
body[data-theme="dark"] .requisition-line b { color: #e9eef7; }
body[data-theme="dark"] .requisition-line small, body[data-theme="dark"] .requisition-line em { color: #a9b8cf; }
body[data-theme="dark"] .record-export-links, body[data-theme="dark"] .order-created-exports { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .record-export-links a, body[data-theme="dark"] .order-created-exports a { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .product-image-manager { border-color: #263348; background: #131a26; color: #dbe4f2; }
body[data-theme="dark"] .product-image-manager label { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .instruction-bom-row { border-bottom-color: #22304a; color: #dbe4f2; }
body[data-theme="dark"] .instruction-bom-row b { color: #e9eef7; }
body[data-theme="dark"] .instruction-bom-row small { color: #a9b8cf; }
body[data-theme="dark"] .expense-attachment-picker { border-color: #33445f; background: #1a2333; color: #a9b8cf; }
body[data-theme="dark"] .form-field > span, body[data-theme="dark"] .form-field label { color: #c4d2e8; }
body[data-theme="dark"] .form-field small { color: #7d8fa9; }
body[data-theme="dark"] .guide-mode .sig-row-button, body[data-theme="dark"] .guide-mode .module-card { border-color: #2b3a52; background: #1a2333; }
body[data-theme="dark"] .rail-account { color: #dbe5f7; }
body[data-theme="dark"] .brand-mark { background: rgba(255,255,255,.08); }
body[data-theme="dark"] .brand-mark:hover { background: rgba(255,255,255,.14); }


/* ==================== 圈点精修（v19f：按 10 张圈图逐一命中） ==================== */
/* 图74 经营总览：模块卡与底部条 */
body[data-theme="dark"] .module-card { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .module-card:hover { border-color: color-mix(in srgb, var(--ui-accent) 45%, #2b3a52); background: #222e44; box-shadow: 0 10px 24px rgba(0,0,0,.4); }
body[data-theme="dark"] .module-card b { color: #e9eef7; }
body[data-theme="dark"] .module-card small { color: #a9b8cf; }
body[data-theme="dark"] .module-card em { background: color-mix(in srgb, var(--ui-accent) 18%, #222e44); color: #ffb4b4; }
body[data-theme="dark"] .module-icon.mint { background: #143024; color: #6fd3a5; }
body[data-theme="dark"] .module-icon.apricot { background: #3a2f14; color: #e5b95c; }
body[data-theme="dark"] .module-icon.lilac { background: #26204a; color: #b3a8f5; }
body[data-theme="dark"] .module-icon.sky { background: #16303f; color: #7cc4e8; }
body[data-theme="dark"] .module-icon.rose { background: #3a1a26; color: #f29bb0; }
/* 图73 小奥：待签批按钮 / 建议词条 / 上传条 */
body[data-theme="dark"] .copilot-approval-menu > summary { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .copilot-approval-menu[open] > summary { border-color: var(--ui-accent); }
body[data-theme="dark"] .copilot-chat-suggestions { background: #0f1520; border-top-color: #263348; }
body[data-theme="dark"] .copilot-attachment-area { background: #0f1520; }
body[data-theme="dark"] .copilot-attach-button { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .copilot-attach-button:hover { border-color: var(--ui-accent); color: #fff; }
body[data-theme="dark"] #copilotClearFiles { color: #a9b8cf; }
body[data-theme="dark"] .copilot-workspace-button.is-active { color: #82d7ba; border-color: #32765f; background: #16382d; }
body[data-theme="dark"] .copilot-workspace-panel { border-color: #263348; background: #121a27; }
body[data-theme="dark"] .copilot-workspace-panel > header b,
body[data-theme="dark"] .copilot-workspace-options label b,
body[data-theme="dark"] .copilot-workspace-status b { color: #e4ebf6; }
body[data-theme="dark"] .copilot-workspace-panel > header small,
body[data-theme="dark"] .copilot-workspace-options label small { color: #98a8c0; }
body[data-theme="dark"] .copilot-workspace-panel > header > button { color: #b4c1d4; background: #1b2637; }
body[data-theme="dark"] .copilot-workspace-path > span { color: #bcc9db; }
body[data-theme="dark"] .copilot-workspace-path input { color: #e1e8f2; border-color: #33445f; background: #0f1621; }
body[data-theme="dark"] .copilot-workspace-panel > p { color: #a9b7cb; background: #182334; }
body[data-theme="dark"] .copilot-workspace-status { border-color: #263348; background: #12241f; }
body[data-theme="dark"] .copilot-workspace-status > span { color: #86d8bd; background: #173c30; }
body[data-theme="dark"] .copilot-workspace-status small { color: #9cadc3; }
body[data-theme="dark"] .copilot-workspace-status > button { color: #aec0d5; }
/* 图75 滚动条（全局暗色滚动条） */
body[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
body[data-theme="dark"] ::-webkit-scrollbar-track { background: #0f1520; }
body[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2b3a52; border-radius: 6px; border: 2px solid #0f1520; }
body[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #3a4f75; }
body[data-theme="dark"] * { scrollbar-color: #2b3a52 #0f1520; }
/* 图76/77 销售统计：行卡、数量按钮、行内文本 */
body[data-theme="dark"] .sales-stat-card { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .sales-stat-card:hover { background: #222e44; border-color: #3a4f75; }
body[data-theme="dark"] .sales-stat-card b, body[data-theme="dark"] .sales-stat-card strong { color: #e9eef7; }
body[data-theme="dark"] .sales-stat-card small, body[data-theme="dark"] .sales-stat-card em { color: #a9b8cf; }
body[data-theme="dark"] .sales-stat-number { border-color: #33445f; background: #222e44; color: #c4d2e8; }
body[data-theme="dark"] .sales-stat-number:hover { border-color: var(--ui-accent); color: #fff; }
body[data-theme="dark"] .sales-stat-number b { color: #fff; }
body[data-theme="dark"] .customer-order-product { border-top-color: #22304a; }
body[data-theme="dark"] .customer-order-product b { color: #e9eef7; }
body[data-theme="dark"] .customer-order-product small { color: #a9b8cf; }
body[data-theme="dark"] .customer-order-product-list { background: transparent; }
body[data-theme="dark"] .sales-stat-empty { color: #7d8fa9; }
body[data-theme="dark"] .sales-stat-table-wrap { background: #10161f; }
body[data-theme="dark"] .sales-stat-drilldown { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .sales-product-stat-row > header,
body[data-theme="dark"] .sales-product-metric { background:#1a2333; border-color:#2b3a52; }
body[data-theme="dark"] .sales-product-metric b,
body[data-theme="dark"] .sales-product-inline-detail h3,
body[data-theme="dark"] .sales-product-inline-detail header > b,
body[data-theme="dark"] .sales-product-detail-table td strong { color:#e9eef7; }
body[data-theme="dark"] .sales-product-metric span,
body[data-theme="dark"] .sales-product-inline-detail > section > p { color:#a9b8cf; }
body[data-theme="dark"] .sales-product-metric:hover,
body[data-theme="dark"] .sales-product-metric:focus-visible,
body[data-theme="dark"] .sales-product-metric.is-active { background:#222e44; }
body[data-theme="dark"] .sales-product-inline-detail { border-color:#2b3a52; background:#131a26; }
body[data-theme="dark"] .sales-product-detail-table { border-color:#33445f; background:#1a2333; }
body[data-theme="dark"] .sales-product-detail-table th { color:#a9b8cf; background:#10161f; }
body[data-theme="dark"] .sales-product-detail-table td { color:#c4d2e8; border-color:#2b3a52; }
body[data-theme="dark"] .sales-product-detail-status { color:#c4d2e8; background:#222e44; }
body[data-theme="dark"] .customer-order-amount-row > header,
body[data-theme="dark"] .customer-order-amount-metric { background:#1a2333; border-color:#2b3a52; }
body[data-theme="dark"] .customer-order-amount-metric b,
body[data-theme="dark"] .customer-order-amount-detail h3,
body[data-theme="dark"] .customer-order-amount-detail header > b { color:#e9eef7; }
body[data-theme="dark"] .customer-order-amount-metric span,
body[data-theme="dark"] .customer-order-amount-detail > section > p { color:#a9b8cf; }
body[data-theme="dark"] .customer-order-amount-metric:hover,
body[data-theme="dark"] .customer-order-amount-metric:focus-visible,
body[data-theme="dark"] .customer-order-amount-metric.is-active { background:#222e44; }
body[data-theme="dark"] .customer-order-amount-detail { border-color:#2b3a52; background:#131a26; }
body[data-theme="dark"] .customer-order-amount-table { border-color:#33445f; background:#1a2333; }
body[data-theme="dark"] .customer-order-amount-table th { color:#a9b8cf; background:#10161f; border-color:#2b3a52; }
body[data-theme="dark"] .customer-order-amount-table td { border-color:#2b3a52; }
body[data-theme="dark"] .customer-order-amount-table td > button { color:#c4d2e8; }
body[data-theme="dark"] .customer-order-amount-table td > button:hover,
body[data-theme="dark"] .customer-order-amount-table td > button:focus-visible { color:#fff; background:#222e44; }
body[data-theme="dark"] .sales-performance-list { background:#10161f; }
body[data-theme="dark"] .sales-performance-ledger { border-color:#2b3a52; background:#1a2333; }
body[data-theme="dark"] .sales-performance-ledger > header,
body[data-theme="dark"] .sales-performance-total-grid { border-color:#2b3a52; }
body[data-theme="dark"] .sales-performance-ledger > header h3,
body[data-theme="dark"] .sales-performance-total b,
body[data-theme="dark"] .sales-performance-detail h3,
body[data-theme="dark"] .sales-performance-detail header > b { color:#e9eef7; }
body[data-theme="dark"] .sales-performance-ledger > header p,
body[data-theme="dark"] .sales-performance-total span,
body[data-theme="dark"] .sales-performance-detail > section > p { color:#a9b8cf; }
body[data-theme="dark"] .sales-performance-ledger > header > span { color:#bcd0ed; background:#222e44; }
body[data-theme="dark"] .sales-performance-total { color:#dbe4f2; background:#1a2333; border-color:#2b3a52; }
body[data-theme="dark"] .sales-performance-total:not(:disabled):hover,
body[data-theme="dark"] .sales-performance-total:not(:disabled):focus-visible,
body[data-theme="dark"] .sales-performance-total.is-active { background:#222e44; }
body[data-theme="dark"] .sales-performance-month-table thead th { color:#a9b8cf; background:#10161f; }
body[data-theme="dark"] .sales-performance-month-table th,
body[data-theme="dark"] .sales-performance-month-table td { border-color:#2b3a52; }
body[data-theme="dark"] .sales-performance-month-table tbody > tr > th,
body[data-theme="dark"] .sales-performance-month-value { color:#dbe4f2; }
body[data-theme="dark"] .sales-performance-month-value:not(:disabled):hover,
body[data-theme="dark"] .sales-performance-month-value:not(:disabled):focus-visible,
body[data-theme="dark"] .sales-performance-month-value.is-active { color:#fff; background:#222e44; }
body[data-theme="dark"] .sales-performance-month-table tbody > tr[data-sales-performance-month-row].is-expanded > th { color:#fff; background:#222e44; }
body[data-theme="dark"] .sales-performance-month-detail-row > td { border-color:#2b3a52; }
body[data-theme="dark"] .sales-performance-detail { border-color:#2b3a52; background:#131a26; }
body[data-theme="dark"] .sales-performance-detail-table { border-color:#33445f; background:#1a2333; }
body[data-theme="dark"] .sales-performance-detail-table th { color:#a9b8cf; background:#10161f; }
body[data-theme="dark"] .sales-performance-detail-table th,
body[data-theme="dark"] .sales-performance-detail-table td { color:#c4d2e8; border-color:#2b3a52; }
body[data-theme="dark"] .sales-performance-empty { color:#a9b8cf; background:#1a2333; border-color:#33445f; }
body[data-theme="dark"] .sales-performance-empty b { color:#e9eef7; }
body[data-theme="dark"] .action-sheet-header .action-return-button { color:#c4d2e8; background:#1a2333; border-color:#33445f; }
/* 图78 BOM 创建区 */
body[data-theme="dark"] .bom-ledger-grid .signature-panel, body[data-theme="dark"] .bom-ledger { border-color: #263348; background: #131a26; }
body[data-theme="dark"] .bom-ledger-section > header { background: #10161f; border-bottom-color: #263348; }
body[data-theme="dark"] .bom-ledger-section > header b, body[data-theme="dark"] .bom-ledger-section > header h3 { color: #e9eef7; }
body[data-theme="dark"] .bom-ledger-section > header small { color: #a9b8cf; }
body[data-theme="dark"] .bom-ledger-empty { color: #7d8fa9; }
body[data-theme="dark"] .bom-ledger aside h2 { color: #e9eef7; }
body[data-theme="dark"] .bom-ledger aside p { color: #a9b8cf; }
body[data-theme="dark"] .bom-ledger .primary-button { box-shadow: 0 8px 18px color-mix(in srgb, var(--ui-accent) 30%, transparent); }
/* 图79/80/81 筛选工具条与搜索框（最高优先级覆盖） */
body[data-theme="dark"] .split-ledger-toolbar, body[data-theme="dark"] .requisition-toolbar { background: #131a26; border-color: #263348; }
body[data-theme="dark"] .split-ledger-toolbar label, body[data-theme="dark"] .customer-directory-toolbar > label { background: #10161f !important; border-color: #33445f !important; }
body[data-theme="dark"] .split-ledger-toolbar label svg, body[data-theme="dark"] .customer-directory-toolbar > label svg { color: #55719f; }
body[data-theme="dark"] .split-ledger-toolbar label input, body[data-theme="dark"] .customer-directory-toolbar > label input { background: transparent !important; color: #e9eef7 !important; }
/* 图82 用量校准（特异性提升） */
body[data-theme="dark"] .signature-panel.ai-usage-settings { background: #131a26; border-color: #263348; }
body[data-theme="dark"] .ai-usage-settings .ai-price-channel { background: #1a2333; border-color: #2b3a52; }
body[data-theme="dark"] .ai-usage-settings .ai-price-channel > div, body[data-theme="dark"] .ai-usage-settings .ai-price-channel span { color: #dbe4f2; }
body[data-theme="dark"] .ai-usage-settings .ai-price-channel small { color: #a9b8cf; }
body[data-theme="dark"] .ai-usage-settings .ai-price-channel b { color: #e9eef7; }
body[data-theme="dark"] .ai-usage-settings .ai-price-row { border-bottom-color: #22304a; }
body[data-theme="dark"] .ai-usage-settings .ai-price-row input { background: #10161f !important; border-color: #33445f !important; color: #e9eef7 !important; }
body[data-theme="dark"] .ai-usage-settings .ai-usage-scenes > div { border-bottom-color: #22304a; color: #dbe4f2; }
/* 图79 物料需求表格头与空态 */
body[data-theme="dark"] .material-plan-table thead, body[data-theme="dark"] .material-plan-table th { background: #10161f; color: #a9b8cf; }
body[data-theme="dark"] .material-plan-table td { border-color: #22304a; color: #dbe4f2; }


/* ==================== 顽固亮色根除（v19g：四处源码级命中） ==================== */
/* 1) 今天要做：任务卡内"为什么/影响"白条 */
body[data-theme="dark"] .why-impact { border-color: #2b3a52; background: #10161f; }
body[data-theme="dark"] .why-impact > span { background: transparent; }
body[data-theme="dark"] .why-impact small { color: #7d8fa9; }
body[data-theme="dark"] .why-impact b { color: #dbe4f2; }
body[data-theme="dark"] .why-impact svg { color: #55719f; }
/* 2) 经营总览：顶部首次引导条 */
body[data-theme="dark"] .first-visit-banner { border-color: #2b3a52; background: #1a2333; color: #dbe4f2; }
body[data-theme="dark"] .first-visit-banner b { color: #e9eef7; }
body[data-theme="dark"] .first-visit-banner small, body[data-theme="dark"] .first-visit-banner p { color: #a9b8cf; }
body[data-theme="dark"] .first-visit-icon { background: #222e44; color: var(--ui-accent); }
/* 3) 配置中心：通道校准白卡 */
body[data-theme="dark"] .ai-price-row { border: 1px solid #2b3a52; background: #1a2333; }
body[data-theme="dark"] .ai-price-row label { background: transparent; }
body[data-theme="dark"] .ai-price-row label > span { color: #7d8fa9; }
body[data-theme="dark"] .ai-price-row input { background: #10161f !important; border-color: #33445f !important; color: #e9eef7 !important; }
body[data-theme="dark"] .ai-price-row .ai-price-channel { background: transparent; }
/* 4) 采买统计：数值白格与身份按钮 */
body[data-theme="dark"] .purchase-stat-value { border-color: #33445f; background: #222e44; color: #dbe4f2; }
body[data-theme="dark"] .purchase-stat-value:hover { border-color: var(--ui-accent); background: #2b3a52; }
body[data-theme="dark"] .purchase-stat-value small { color: #a9b8cf; }
body[data-theme="dark"] .purchase-stat-value b { color: #ffffff; }
body[data-theme="dark"] .purchase-stat-value span { color: var(--ui-accent); }
body[data-theme="dark"] .purchase-stat-identity { background: transparent; color: #dbe4f2; }
body[data-theme="dark"] .purchase-stat-identity:hover { background: #222e44; }
body[data-theme="dark"] .purchase-stat-identity b { color: #e9eef7; }
body[data-theme="dark"] .purchase-stat-identity small { color: #a9b8cf; }
body[data-theme="dark"] .purchase-stat-identity svg { color: #55719f; }
body[data-theme="dark"] .purchase-stat-secondary { color: #a9b8cf; }
body[data-theme="dark"] .supplier-bill-toolbar,body[data-theme="dark"] .supplier-bill-orders,body[data-theme="dark"] .supplier-bill-table-wrap{border-color:#2b3a52}
body[data-theme="dark"] .supplier-bill-toolbar h2,body[data-theme="dark"] .supplier-bill-summary b,body[data-theme="dark"] .supplier-bill-orders>header b{color:#eef3fb}
body[data-theme="dark"] .supplier-bill-toolbar p,body[data-theme="dark"] .supplier-bill-toolbar small,body[data-theme="dark"] .supplier-bill-summary small,body[data-theme="dark"] .supplier-bill-orders>footer p{color:#a9b8cf}
body[data-theme="dark"] .supplier-bill-row,body[data-theme="dark"] .supplier-bill-summary,body[data-theme="dark"] .supplier-bill-table-wrap{border-color:#2b3a52;background:#17202e}
body[data-theme="dark"] .supplier-bill-summary:hover,body[data-theme="dark"] .supplier-bill-summary:focus-visible{background:#222e44}
body[data-theme="dark"] .supplier-bill-orders{background:#131a26}body[data-theme="dark"] .supplier-bill-table-wrap th{background:#1d2839;color:#a9b8cf}body[data-theme="dark"] .supplier-bill-table-wrap td{border-color:#2b3a52;color:#dbe4f2}body[data-theme="dark"] .supplier-bill-table-wrap tbody tr:hover td{background:#222e44}
/* 5) 用量场景行与通用 sig-row 兜底 */
body[data-theme="dark"] .ai-usage-scenes .sig-row, body[data-theme="dark"] .ai-usage-settings .sig-row { border-bottom-color: #22304a; color: #dbe4f2; }
body[data-theme="dark"] .ai-usage-scenes .sig-row em, body[data-theme="dark"] .ai-usage-settings .sig-row em { background: #222e44; color: #c4d2e8; }
/* 6) 销售统计卡特异性提升（防止浅色渐变覆盖） */
body[data-theme="dark"] .sales-stat-list .sales-stat-card { background: #1a2333 !important; border-color: #2b3a52 !important; }
body[data-theme="dark"] .sales-stat-list .sales-stat-card:hover { background: #222e44 !important; }

/* 暗色模式文字选中态 */
body[data-theme="dark"] ::selection { background: color-mix(in srgb, var(--ui-accent) 55%, #10161f); color: #ffffff; }
body[data-theme="dark"] ::-moz-selection { background: color-mix(in srgb, var(--ui-accent) 55%, #10161f); color: #ffffff; }


/* ==================== 弹窗完整暗色（v19i：表单不再是灾难） ==================== */
/* 弹窗骨架 */
body[data-theme="dark"] .action-sheet { border-color: #2b3a52; background: #131a26; }
body[data-theme="dark"] .action-sheet-header { border-bottom-color: #263348; background: linear-gradient(120deg, #1a2333, #131a26); }
body[data-theme="dark"] .action-sheet-header small, body[data-theme="dark"] .action-sheet-header .eyebrow { color: #7d8fa9; }
body[data-theme="dark"] .action-sheet-header h2, body[data-theme="dark"] .action-sheet-header b { color: #e9eef7; }
body[data-theme="dark"] .action-sheet-header p, body[data-theme="dark"] .action-sheet-header .action-description { color: #a9b8cf; }
body[data-theme="dark"] .action-sheet-header .close-button { color: #a9b8cf; background: #1a2333; }
body[data-theme="dark"] .action-sheet-header .close-button:hover { color: #fff; background: #222e44; }
body[data-theme="dark"] .action-body { background: transparent; }
/* 表单与字段 */
body[data-theme="dark"] .action-form { color: #dbe4f2; }
body[data-theme="dark"] .action-form .form-field, body[data-theme="dark"] .form-field { color: #dbe4f2; }
body[data-theme="dark"] .action-form label { color: #c4d2e8; }
body[data-theme="dark"] .action-form label > span { color: #a9b8cf; }
body[data-theme="dark"] .action-form label > b, body[data-theme="dark"] .form-field > b { color: #dbe4f2; }
body[data-theme="dark"] .action-form em, body[data-theme="dark"] .form-field em { color: #7d8fa9; }
body[data-theme="dark"] .record-action-form { border-color: #263348; background: #10161f; }
body[data-theme="dark"] .record-action-form > div > small { color: #7d8fa9; }
body[data-theme="dark"] .record-action-form > div > b { color: #e9eef7; }
body[data-theme="dark"] .record-action-form p { color: #a9b8cf; }
body[data-theme="dark"] .record-lifecycle-panel { border-color: #3a2030; background: #2b1a1a; }
body[data-theme="dark"] .record-lifecycle-panel small { color: #c79a9a; }
body[data-theme="dark"] .record-lifecycle-panel b { color: #ffb4b4; }
body[data-theme="dark"] .record-lifecycle-panel p { color: #d8a8a8; }
body[data-theme="dark"] .order-cancellation-record { border-color: #5a3540; border-left-color: #d27683; background: #271c21; }
body[data-theme="dark"] .order-cancellation-record > svg, body[data-theme="dark"] .order-cancellation-record small { color: #e0909c; }
body[data-theme="dark"] .order-cancellation-record b { color: #f4dde1; }
body[data-theme="dark"] .order-cancellation-record p { color: #c9aeb4; }
body[data-theme="dark"] #view-orders .order-card.is-cancelled { border-color: #44363b; background: #201b1d; }
body[data-theme="dark"] #view-orders .order-card-cancellation { border-left-color: #cc7582; background: #2b2024; }
body[data-theme="dark"] #view-orders .order-card-cancellation small { color: #d78b96; }
body[data-theme="dark"] #view-orders .order-card-cancellation b { color: #ead4d8; }
/* 事实卡与说明条 */
body[data-theme="dark"] .record-facts > span { border-color: #2b3a52; background: #1a2333; }
body[data-theme="dark"] .record-facts small { color: #7d8fa9; }
body[data-theme="dark"] .record-facts b { color: #e9eef7; }
body[data-theme="dark"] .record-detail { color: #dbe4f2; }
body[data-theme="dark"] .action-notes, body[data-theme="dark"] .action-impact, body[data-theme="dark"] .action-after-note { border-color: #263348; background: #10161f; color: #a9b8cf; }
body[data-theme="dark"] .action-notes b, body[data-theme="dark"] .action-impact b { color: #dbe4f2; }
/* 流程步骤与进度 */
body[data-theme="dark"] .action-progress { border-bottom-color: #263348; }
body[data-theme="dark"] .action-progress span { color: #7d8fa9; }
body[data-theme="dark"] .action-progress span b { color: #7d8fa9; }
body[data-theme="dark"] .action-progress span.active b { color: var(--ui-accent); }
body[data-theme="dark"] .action-progress span.done b { color: #6fd3a5; }
body[data-theme="dark"] .action-progress i { background: #263348; }
body[data-theme="dark"] .action-progress span.active i, body[data-theme="dark"] .action-progress span.done i { background: var(--ui-accent); }
/* 导出与附件 */
body[data-theme="dark"] .record-export-links a, body[data-theme="dark"] .order-created-exports a { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .record-export-links a:hover, body[data-theme="dark"] .order-created-exports a:hover { border-color: var(--ui-accent); color: #fff; }
body[data-theme="dark"] .expense-attachment-gallery { color: #dbe4f2; }
/* 底部按钮区 */
body[data-theme="dark"] .action-footer { border-top-color: #263348; background: #10161f; }
body[data-theme="dark"] .action-footer .ghost-button, body[data-theme="dark"] #actionCancel { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .action-footer .ghost-button:hover { background: #222e44; color: #fff; }
body[data-theme="dark"] .action-safety-note, body[data-theme="dark"] #actionSafety { color: #7d8fa9; }
/* 成功页 */
body[data-theme="dark"] .action-success { color: #dbe4f2; }
body[data-theme="dark"] .action-success h3 { color: #e9eef7; }
body[data-theme="dark"] .action-success p { color: #a9b8cf; }
body[data-theme="dark"] .action-success .success-proof { border-color: #263348; background: #10161f; }
/* 下拉选项原生弹出层 */
body[data-theme="dark"] select option { background: #131a26; color: #e9eef7; }

/* 单证导出面板暗色 */
body[data-theme="dark"] .record-export-panel { border-color: #263348; background: #10161f; }
body[data-theme="dark"] .record-export-panel > header { border-bottom-color: #263348; }
body[data-theme="dark"] .record-export-panel > header small { color: #7d8fa9; }
body[data-theme="dark"] .record-export-panel > header b { color: #e9eef7; }
body[data-theme="dark"] .record-export-panel > header span { background: #222e44; color: var(--ui-accent); }
body[data-theme="dark"] .record-export-panel a, body[data-theme="dark"] .record-export-panel button { border-color: #33445f; background: #1a2333; color: #c4d2e8; }
body[data-theme="dark"] .record-export-panel a:hover, body[data-theme="dark"] .record-export-panel button:hover { border-color: var(--ui-accent); color: #fff; }
body[data-theme="dark"] .record-export-panel a span, body[data-theme="dark"] .record-export-panel button span { color: #e9eef7; }
body[data-theme="dark"] .record-export-panel a em, body[data-theme="dark"] .record-export-panel button em { color: #7d8fa9; }


/* ==================== 父级菜单结构化识别（v19k） ==================== */
/* 父级：更高对比 + 右端折叠箭头（展开朝下/收起朝右） */
.full-nav-group > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full-nav-twist { flex: none; width: 13px; height: 13px; color: #7488ab; transform: rotate(90deg); transition: transform .22s ease, color .18s ease; }
.full-nav-group.is-collapsed .full-nav-twist { transform: rotate(0deg); }
.full-nav-group:hover .full-nav-twist { color: #c6d2e8; }
.full-nav-group.is-expanded .full-nav-twist { color: #fff; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-twist { color: #98a4b8; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group.is-expanded .full-nav-twist { color: var(--ui-accent); }
/* 父级文字再亮一度、图标略大，与箭头形成"可开合行"的整体感 */
.full-nav-group { color: #e3e9f6; }
.full-nav-group .full-nav-group-icon { width: 19px; height: 19px; }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group { color: #2f3d5c; }
/* 子级：缩进 + 左侧引导线，一眼从属于父级 */
body:not(.board-mode) .rail .top-nav > button[data-nav-group] { position: relative; margin-left: 13px; width: calc(100% - 13px); }
body:not(.board-mode) .rail .top-nav > button[data-nav-group]::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 1.5px; border-radius: 2px; background: rgba(255,255,255,.1); }
body:not(.board-mode) .rail .top-nav > button[data-nav-group]:hover::before { background: color-mix(in srgb, var(--nav-accent, #5b8cff) 45%, transparent); }
body:not(.board-mode) .rail .top-nav > button[data-nav-group].is-active::before { background: var(--nav-accent, var(--ui-accent)); }
body[data-rail="light"]:not(.board-mode) .rail .top-nav > button[data-nav-group]::before { background: #dde4ef; }
/* 组内最后一个子级引导线收短，避免拖尾到下个父级 */
body:not(.board-mode) .rail .top-nav > button[data-nav-group].nav-group-hidden::before { display: none; }


/* ==================== 批量表格录入 + 客定要求列 ==================== */
.batch-create-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.batch-create-editor > header small { display: block; color: #3d4c66; font-size: 12.5px; font-weight: 700; }
.batch-create-editor > header p { margin: 4px 0 0; color: #8b96ab; font-size: 11px; line-height: 1.6; }
.batch-create-editor > header .ghost-button { flex: none; height: 34px; padding: 0 12px; font-size: 11.5px; }
.batch-create-head { display: grid; gap: 8px; margin-bottom: 6px; padding: 0 2px; }
.batch-create-head small { color: #8b96ab; font-size: 10.5px; font-weight: 700; }
.batch-create-head i { width: 34px; }
.batch-create-line { display: grid; gap: 8px; align-items: center; margin-bottom: 8px; }
.batch-create-line input, .batch-create-line select { height: 38px; min-width: 0; padding: 0 10px; border: 1px solid #dfe5f0; border-radius: 10px; background: #fff; font: inherit; font-size: 12.5px; }
.batch-create-line input:focus, .batch-create-line select:focus { border-color: var(--ui-accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
.batch-create-line > button { display: grid; place-items: center; width: 34px; height: 38px; border: 0; border-radius: 10px; color: #dc2626; background: #fdf0f0; cursor: pointer; }
.batch-create-line > button svg { width: 14px; height: 14px; }
.batch-create-row-group { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #edf1f6; }
.batch-create-row-group .batch-create-line { margin-bottom: 7px; }
.batch-product-files { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 42px; margin-left: 2px; padding: 7px 10px; border: 1px dashed #cbd8eb; border-radius: 9px; color: #365f9d; background: #f8faff; cursor: pointer; }
.batch-product-files > span { display: grid; grid-template-columns: 18px auto minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; }
.batch-product-files svg { width: 15px; height: 15px; }
.batch-product-files b { font-size: 10px; white-space: nowrap; }
.batch-product-files small { overflow: hidden; color: #7a899e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.batch-product-files em { flex: none; color: #2c64c9; font-size: 9px; font-style: normal; font-weight: 800; }
.batch-product-files input { display: none; }
body[data-theme="dark"] .batch-create-line input, body[data-theme="dark"] .batch-create-line select { background: #10161f !important; border-color: #33445f !important; color: #e9eef7 !important; }
body[data-theme="dark"] .batch-create-head small { color: #7d8fa9; }
body[data-theme="dark"] .batch-create-editor > header small { color: #dbe4f2; }
body[data-theme="dark"] .batch-create-editor > header p { color: #7d8fa9; }
body[data-theme="dark"] :is(.product-file-library,.batch-product-files) { border-color: #33445f; background: #131c2a; }
body[data-theme="dark"] :is(.product-file-document,.product-file-version,.product-file-empty) { border-color: #2f3e54; background: #172231; }
body[data-theme="dark"] .product-file-library > header b,
body[data-theme="dark"] .product-file-version b,
body[data-theme="dark"] .product-file-empty b { color: #e3ebf7; }

/* 订单行：客定要求列（行编辑器加宽一列） */
.business-line { grid-template-columns: minmax(170px,1.25fr) 76px 110px minmax(100px,.7fr) minmax(140px,1.1fr) 36px; }
.business-line .line-client-req input { border-color: color-mix(in srgb, var(--ui-accent) 30%, #cbd7e6); }
@media (max-width: 1100px) {
  .business-line, .business-line.purchase-line { grid-template-columns: 1fr 1fr; }
}

/* 新建销售/采购单右侧工作栏宽度有限：备注必须无需横向滚动即可看到。 */
.relationship-workbench .business-line,
.relationship-workbench .business-line.purchase-line.is-material-record {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.relationship-workbench .business-line :is(.line-client-req,.line-note) { grid-column:1/-1; }
.relationship-workbench .business-line > button { align-self:end; justify-self:end; }
.purchase-amount-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line, #d9e0e8);
  border-radius: 12px;
  background: var(--line, #d9e0e8);
}
.purchase-amount-summary span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 13px;
  background: var(--panel, #fff);
  color: var(--muted, #66758a);
  font-size: 12px;
}
.purchase-amount-summary b { color: var(--ink, #17243a); font-size: 13px; }
.purchase-amount-summary span:last-child b { color: var(--brand, #2868d8); font-size: 15px; }
.purchase-amount-summary.is-invalid { border-color: #dc5264; background: #dc5264; }
.purchase-amount-summary.is-invalid span:last-child b { color: #c9364b; }
@media (max-width: 720px) {
  .relationship-workbench .business-line,
  .relationship-workbench .business-line.purchase-line.is-material-record { grid-template-columns:1fr; }
  .purchase-amount-summary { grid-template-columns: 1fr; }
}


/* ==================== 数据迁移按钮与导入弹窗 ==================== */
.customer-directory-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.customer-directory-tools a.ghost-button { text-decoration: none; }
.ledger-sort { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid #e2e8f2; border-radius: 10px; background: #f8fafc; color: #68738a; }
.ledger-sort svg { width: 13px; height: 13px; }
.ledger-sort select { border: 0; background: transparent; color: #2c3a56; font-size: 12px; font-weight: 600; outline: none; cursor: pointer; }
.issue-actual { display: inline-flex; align-items: center; gap: 8px; }
.issue-actual small { color: #68738a; white-space: nowrap; }
.issue-actual input { width: 110px; height: 32px; padding: 0 10px; border: 1px solid #dfe5f0; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: #2c3a56; text-align: right; }
.issue-actual input:focus { border-color: var(--ui-accent); outline: none; }
.action-modal.instruction-document-modal .action-sheet { width: min(1260px, calc(100vw - 40px)); }
.action-modal.instruction-document-modal .action-layout { grid-template-columns: minmax(0,1fr) 248px; }
.action-modal.instruction-document-modal .action-body { padding: 18px 20px; }
.instruction-document-sheet { margin-top: 18px; border: 1px solid #dce4ef; border-radius: 14px; background: #fff; overflow: hidden; }
.instruction-document-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 15px 17px; border-bottom: 1px solid #e5eaf1; background: #f8faff; }
.instruction-document-sheet > header div { min-width: 0; }
.instruction-document-sheet > header small, .instruction-document-sheet > header b, .instruction-document-sheet > header p { display: block; }
.instruction-document-sheet > header small { color: var(--ui-accent); font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.instruction-document-sheet > header b { margin-top: 4px; color: #1f2d45; font-size: 14px; }
.instruction-document-sheet > header p { margin: 3px 0 0; color: #7b879b; font-size: 10.5px; }
.instruction-document-sheet > header em { flex: none; padding: 6px 9px; border-radius: 999px; color: #266c5b; background: #e8f7f1; font-size: 10px; font-style: normal; font-weight: 750; }
.instruction-sheet-scroll { width: 100%; overflow-x: auto; }
.instruction-document-sheet table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.instruction-document-sheet th { padding: 9px 12px; border-bottom: 1px solid #e7ecf3; color: #7a879a; background: #fbfcfe; font-size: 10px; font-weight: 700; text-align: left; }
.instruction-document-sheet th:first-child { width: 30%; }
.instruction-document-sheet td { padding: 11px 12px; border-bottom: 1px solid #edf1f6; color: #33425c; vertical-align: middle; }
.instruction-document-sheet tbody tr:last-child td { border-bottom: 0; }
.instruction-document-sheet td b, .instruction-document-sheet td strong, .instruction-document-sheet td small, .instruction-document-sheet td output { display: block; }
.instruction-document-sheet td b { overflow: hidden; color: #22314a; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.instruction-document-sheet td strong, .instruction-document-sheet td output { color: #243652; font-size: 12.5px; font-weight: 750; }
.instruction-document-sheet td small { margin-top: 3px; color: #8b96a8; font-size: 9.5px; line-height: 1.35; }
.instruction-document-sheet td input { width: 100%; max-width: 138px; height: 36px; padding: 0 10px; border: 1px solid #ccd7e7; border-radius: 9px; color: #1d2d49; background: #fff; font: inherit; font-size: 12px; font-weight: 700; text-align: right; outline: 0; }
.instruction-document-sheet td input:focus { border-color: var(--ui-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
.instruction-document-sheet tr.has-over-issue td { background: #fffaf0; }
.instruction-document-sheet tr.has-over-issue [data-issue-over] { color: #b65f13; }
.instruction-document-sheet tr.has-short-issue td { background: #fff3f4; }
.instruction-document-sheet tr.has-short-issue input { border-color: #e4939c; color: #b3293c; }
.instruction-document-sheet tr.has-return-input td { background: #f3fbf7; }
.instruction-return-sheet [data-return-loss] { color: #b65f13; }
.instruction-return-sheet tr.has-return-input [data-return-loss] { color: #26735f; }
.instruction-document-sheet > footer { display: flex; align-items: flex-start; gap: 8px; padding: 10px 13px; border-top: 1px solid #e7ecf3; color: #547063; background: #f0f8f5; font-size: 10px; line-height: 1.55; }
.instruction-document-sheet > footer svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: #25836b; }
body[data-theme="dark"] .instruction-document-sheet { border-color: #33445f; background: #111923; }
body[data-theme="dark"] .instruction-document-sheet > header, body[data-theme="dark"] .instruction-document-sheet th { border-color: #33445f; background: #151f2d; }
body[data-theme="dark"] .instruction-document-sheet > header b, body[data-theme="dark"] .instruction-document-sheet td b, body[data-theme="dark"] .instruction-document-sheet td strong, body[data-theme="dark"] .instruction-document-sheet td output { color: #e5edf8; }
body[data-theme="dark"] .instruction-document-sheet td { border-color: #29384e; color: #cfdaea; }
body[data-theme="dark"] .instruction-document-sheet td input { border-color: #3a4d68; color: #edf3fb; background: #0d1520; }
body[data-theme="dark"] .instruction-document-sheet tr.has-over-issue td { background: #2a2115; }
body[data-theme="dark"] .instruction-document-sheet tr.has-short-issue td { background: #2d1820; }
body[data-theme="dark"] .instruction-document-sheet tr.has-return-input td { background: #13271f; }
body[data-theme="dark"] .instruction-document-sheet > footer { border-color: #33445f; color: #a9cbbf; background: #14251f; }
@media (max-width: 1000px) {
  .action-modal.instruction-document-modal .action-layout { grid-template-columns: 1fr; }
  .action-modal.instruction-document-modal .action-summary { display: none; }
}
@media (max-width: 720px) {
  .action-modal.instruction-document-modal .action-body { padding: 13px; }
  .instruction-document-sheet { margin-top: 13px; }
  .instruction-document-sheet > header { padding: 12px; }
}
.md-import { display: flex; flex-direction: column; gap: 12px; }
.md-import-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.md-import-actions a { text-decoration: none; }
.md-import-file { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border: 1.5px dashed #cbd7e6; border-radius: 12px; color: #405575; background: #f8fafc; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.md-import-file:hover { border-color: var(--ui-accent); background: #fff; }
.md-import-file svg { width: 16px; height: 16px; color: var(--ui-accent); }
.md-import-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.md-import textarea { width: 100%; padding: 12px; border: 1px solid #dfe5f0; border-radius: 12px; background: #fff; font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.6; resize: vertical; box-sizing: border-box; }
.md-import textarea:focus { border-color: var(--ui-accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
.md-import [data-md-results] { overflow-x: auto; line-height: 1.65; }
.md-import [data-md-results] table { width: 100%; border-collapse: collapse; font-size: 13px; }
.md-import [data-md-results] th, .md-import [data-md-results] td { padding: 9px 12px; border-bottom: 1px solid #dfe5f0; text-align: left; vertical-align: top; }
.md-import [data-md-results] th { white-space: nowrap; }
.md-import [data-md-results] td:last-child { white-space: pre-wrap; overflow-wrap: anywhere; }
.batch-create-editor { overflow-x: auto; }
.batch-create-editor:has([data-bcol="wechat"]) .batch-create-head, .batch-create-editor:has([data-bcol="wechat"]) .batch-create-row-group { min-width: 1320px; }
body[data-theme="dark"] .md-import-file { border-color: #33445f; background: #10161f; color: #c4d2e8; }
body[data-theme="dark"] .md-import-file:hover { background: #1a2333; }
body[data-theme="dark"] .md-import textarea { background: #10161f; border-color: #33445f; color: #e9eef7; }
.bom-ledger-section > header .ghost-button, .bom-ledger-section > header a.ghost-button { height: 36px; padding: 0 12px; font-size: 11.5px; text-decoration: none; }


/* ==================== 产品搜索匹配面板 ==================== */
.product-search-wrap { position: relative; }
.product-search-panel { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 5px); max-height: 268px; overflow-y: auto; padding: 6px; border: 1px solid #dbe2ee; border-radius: 13px; background: #fff; box-shadow: 0 16px 40px rgba(23,43,99,.16); animation: v12Rise .16s ease both; }
.product-search-panel[hidden] { display: none; }
.product-search-panel > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.product-search-panel > button:hover, .product-search-panel > button.is-active { background: color-mix(in srgb, var(--ui-accent) 8%, #fff); }
.product-search-panel > button.is-picked { background: color-mix(in srgb, var(--ui-accent) 13%, #fff); box-shadow: inset 2.5px 0 0 var(--ui-accent); }
.product-search-panel > button > span { flex: none; display: flex; flex-direction: column; gap: 2px; min-width: 92px; }
.product-search-panel > button b { color: var(--ui-accent); font-size: 12.5px; }
.product-search-panel > button small { color: #98a4b8; font-size: 10px; }
.product-search-panel > button em { min-width: 0; overflow: hidden; color: #3d4c66; font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.product-search-empty { padding: 14px 12px; color: #8b96ab; font-size: 12px; text-align: center; }
body[data-theme="dark"] .product-search-panel { border-color: #33445f; background: #131a26; box-shadow: 0 16px 40px rgba(0,0,0,.55); }
body[data-theme="dark"] .product-search-panel > button:hover, body[data-theme="dark"] .product-search-panel > button.is-active { background: #222e44; }
body[data-theme="dark"] .product-search-panel > button.is-picked { background: color-mix(in srgb, var(--ui-accent) 18%, #131a26); }
body[data-theme="dark"] .product-search-panel > button em { color: #dbe4f2; }
body[data-theme="dark"] .product-search-panel > button small { color: #7d8fa9; }
body[data-theme="dark"] .product-search-empty { color: #7d8fa9; }

/* ==================== 父级菜单最终定制（2026-08-06）：放文件末尾，压过历代版本块 ==================== */
/* 父级：文字图标放大 + 组间距拉开 + 标题下凹槽分隔线（上暗下亮的雕刻质感），父级与子级明确分层 */
.full-nav-group { margin: 22px 8px 10px; padding: 6px 8px 10px; border-bottom: 0; font-size: 15px; }
.full-nav-group-icon { width: 19px; height: 19px; }
body:not(.keep-specificity) .rail .full-nav-group::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: -2px; height: 0; flex: none; background: transparent; border-top: 1.5px solid rgba(0,0,0,.55); border-bottom: 1px solid rgba(255,255,255,.14); }
body[data-rail="light"]:not(.board-mode) .rail .full-nav-group::after { border-top-color: rgba(31,49,82,.25); border-bottom-color: rgba(255,255,255,.9); }

/* ==================== Xiao Ao conversation workspace v20 (2026-08-10) ==================== */
/* This final, copilot-scoped layer intentionally replaces the legacy compact chat presentation. */
body.copilot-mode {
  --copilot-ink: #172033;
  --copilot-muted: #69758a;
  --copilot-line: #e4e8f1;
  --copilot-panel: rgba(255,255,255,.92);
  --copilot-soft: #f6f7fb;
  --copilot-accent: var(--ui-accent, #6257d8);
  --copilot-work-width: 1080px;
}
body.copilot-mode .content {
  padding-top: 18px;
  padding-bottom: 18px;
}
body.copilot-mode #view-module,
body.copilot-mode #view-module.is-active {
  width: min(1380px, 100%);
  margin: 0 auto;
}
body.copilot-mode #moduleSignature {
  padding-bottom: 0;
}
body.copilot-mode .copilot-console,
body.copilot-mode .copilot-console-simple {
  flex: 1;
  min-height: 0;
  display: flex;
}
body.copilot-mode .copilot-chat-primary {
  isolation: isolate;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(214,219,231,.9);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% -8%, color-mix(in srgb, var(--copilot-accent) 13%, transparent) 0, transparent 30%),
    radial-gradient(circle at 95% 2%, rgba(51,174,208,.08) 0, transparent 25%),
    #f8f9fc;
  box-shadow: 0 24px 70px rgba(28,37,63,.12), 0 2px 8px rgba(28,37,63,.04);
}
body.copilot-mode .copilot-chat-primary::before {
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(circle, rgba(77,87,120,.11) .7px, transparent .8px);
  background-size: 22px 22px;
  opacity: .24;
  filter: none;
  pointer-events: none;
}

/* Workspace header */
body.copilot-mode .copilot-chat-primary > header {
  z-index: 20;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 24px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(220,225,235,.92);
  border-radius: 24px 24px 0 0;
  background: rgba(255,255,255,.82);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(18px) saturate(1.15);
}
body.copilot-mode .copilot-chat-identity {
  gap: 13px;
}
body.copilot-mode .copilot-chat-identity > span {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 15px;
  background: linear-gradient(145deg, #4a6cea 0%, var(--copilot-accent) 55%, #8154c6 100%);
  box-shadow: 0 10px 25px color-mix(in srgb, var(--copilot-accent) 27%, transparent), inset 0 1px 0 rgba(255,255,255,.34);
}
body.copilot-mode .copilot-chat-identity > span::after {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2ebd88;
  content: "";
}
body.copilot-mode .copilot-chat-identity svg {
  width: 21px;
  height: 21px;
}
body.copilot-mode .copilot-chat-identity > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}
body.copilot-mode .copilot-chat-identity small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7b8498;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
body.copilot-mode .copilot-chat-identity small i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--copilot-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--copilot-accent) 10%, transparent);
}
body.copilot-mode .copilot-chat-identity h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 1px 0 0;
  color: var(--copilot-ink);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.025em;
}
body.copilot-mode .copilot-chat-identity h3 em {
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--copilot-accent) 17%, #e5e8f0);
  border-radius: 999px;
  color: color-mix(in srgb, var(--copilot-accent) 78%, #34405a);
  background: color-mix(in srgb, var(--copilot-accent) 6%, #fff);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: .02em;
}
body.copilot-mode .copilot-chat-identity p {
  overflow: hidden;
  margin: 2px 0 0;
  color: #7c8799;
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.copilot-mode .copilot-header-tools {
  gap: 8px;
}
body.copilot-mode .copilot-model-status,
body.copilot-mode .copilot-header-action,
body.copilot-mode .copilot-approval-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e1e5ee;
  border-radius: 11px;
  color: #5f6a7f;
  background: rgba(255,255,255,.8);
  box-shadow: 0 2px 5px rgba(37,45,70,.035);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
body.copilot-mode .copilot-header-action {
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
body.copilot-mode .copilot-header-action svg,
body.copilot-mode .copilot-approval-menu > summary svg {
  width: 14px;
  height: 14px;
}
body.copilot-mode .copilot-header-action:hover {
  color: var(--copilot-accent);
  border-color: color-mix(in srgb, var(--copilot-accent) 35%, #e1e5ee);
  background: color-mix(in srgb, var(--copilot-accent) 5%, #fff);
  transform: translateY(-1px);
}
body.copilot-mode .copilot-header-action:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
  box-shadow: none;
}
body.copilot-mode .system-menu-toggle[aria-expanded="true"] {
  color: var(--copilot-accent);
  border-color: color-mix(in srgb, var(--copilot-accent) 34%, #e1e5ee);
  background: color-mix(in srgb, var(--copilot-accent) 8%, #fff);
}
body.copilot-mode .copilot-model-status {
  border-color: rgba(46,189,136,.2);
  color: #267b61;
  background: rgba(236,250,245,.86);
}
body.copilot-mode .copilot-model-status i {
  width: 7px;
  height: 7px;
  background: #d79533;
}
body.copilot-mode .copilot-model-status.online i {
  background: #2ebd88;
  box-shadow: 0 0 0 4px rgba(46,189,136,.11);
  animation: copilotStatusPulse 2.6s ease-in-out infinite;
}
body.copilot-mode .copilot-approval-menu > summary {
  cursor: pointer;
}
body.copilot-mode .copilot-approval-menu > summary b {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  color: #fff;
  background: var(--copilot-accent);
  font-size: 9px;
}
body.copilot-mode .copilot-approval-menu[open] > summary {
  color: var(--copilot-accent);
  border-color: color-mix(in srgb, var(--copilot-accent) 35%, #dfe4ed);
  background: color-mix(in srgb, var(--copilot-accent) 6%, #fff);
}
body.copilot-mode .copilot-approval-menu > div {
  top: 44px;
  width: min(410px, calc(100vw - 40px));
  border: 1px solid #dfe4ed;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(26,33,55,.18);
}

/* Conversation canvas and message hierarchy */
body.copilot-mode .copilot-chat-primary .copilot-chat-messages {
  gap: 22px;
  min-height: 0;
  padding: 30px clamp(22px, 5vw, 72px) 22px;
  background: transparent;
  scrollbar-color: #c8cedb transparent;
  scrollbar-width: thin;
}
body.copilot-mode .copilot-chat-messages::-webkit-scrollbar {
  width: 7px;
}
body.copilot-mode .copilot-chat-messages::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: #c8cedb;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-message {
  width: min(100%, 1050px);
  max-width: none;
  gap: 12px;
  animation: copilotMessageReveal .25s ease both;
}
body.copilot-mode .copilot-chat-message.ai {
  align-self: flex-start;
}
body.copilot-mode .copilot-chat-message.user {
  align-self: flex-end;
  justify-content: flex-end;
}
body.copilot-mode .copilot-chat-message > .copilot-message-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: 2px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #5475ef, var(--copilot-accent) 58%, #8254c7);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--copilot-accent) 21%, transparent);
}
body.copilot-mode .copilot-chat-message > .copilot-message-avatar svg {
  width: 15px;
  height: 15px;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-message > .copilot-message-surface {
  min-width: 0;
  max-width: calc(100% - 48px);
  padding: 18px 20px 19px;
  border: 1px solid rgba(219,224,234,.94);
  border-radius: 6px 19px 19px 19px;
  color: var(--copilot-ink);
  background: var(--copilot-panel);
  box-shadow: 0 9px 28px rgba(35,43,68,.06), inset 0 1px 0 rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
}
body.copilot-mode .copilot-chat-message.welcome > .copilot-message-surface {
  border-color: color-mix(in srgb, var(--copilot-accent) 18%, #dfe4ed);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--copilot-accent) 5%, #fff), rgba(255,255,255,.94));
}
body.copilot-mode .copilot-chat-primary .copilot-chat-message.user > .copilot-message-surface {
  width: auto;
  max-width: min(78%, 760px);
  padding: 14px 17px;
  border: 1px solid rgba(51,66,109,.18);
  border-radius: 18px 6px 18px 18px;
  color: #fff;
  background: linear-gradient(135deg, #2e3f6e 0%, #344d83 58%, #3a4f82 100%);
  box-shadow: 0 10px 24px rgba(35,50,91,.16), inset 0 1px 0 rgba(255,255,255,.12);
}
body.copilot-mode .copilot-message-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
}
body.copilot-mode .copilot-message-author b {
  color: #1f2b43;
  font-size: 12px;
  font-weight: 800;
}
body.copilot-mode .copilot-message-author small {
  padding-left: 8px;
  border-left: 1px solid #dfe3eb;
  color: #9099aa;
  font-size: 9.5px;
  font-weight: 650;
}
body.copilot-mode .copilot-chat-message.user .copilot-message-author {
  justify-content: flex-end;
  margin-bottom: 6px;
}
body.copilot-mode .copilot-chat-message.user .copilot-message-author b,
body.copilot-mode .copilot-chat-message.user .copilot-message-author small {
  color: rgba(255,255,255,.78);
}
body.copilot-mode .copilot-chat-message.user .copilot-message-author small {
  border-left-color: rgba(255,255,255,.2);
}
body.copilot-mode .copilot-message-body {
  color: #3d4960;
  font-size: 14px;
  line-height: 1.82;
  overflow-wrap: anywhere;
}
body.copilot-mode .copilot-chat-message.user .copilot-message-body {
  color: #fff;
  font-size: 13.5px;
  line-height: 1.72;
}
body.copilot-mode .copilot-message-body .copilot-prose-paragraph {
  display: block;
  margin: 0 0 12px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
body.copilot-mode .copilot-message-body .copilot-prose-paragraph:last-child {
  margin-bottom: 0;
}
body.copilot-mode .copilot-message-body strong {
  color: #1d2940;
  font-weight: 780;
}
body.copilot-mode .copilot-chat-message.user .copilot-message-body strong {
  color: #fff;
}
body.copilot-mode .copilot-message-body .copilot-inline-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 9px;
  color: #1b2941;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -.01em;
}
body.copilot-mode .copilot-message-body .copilot-inline-heading:first-child {
  margin-top: 0;
}
body.copilot-mode .copilot-message-body .copilot-inline-heading::before {
  display: none;
  content: none;
}
body.copilot-mode .copilot-message-body .copilot-prose-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 15px;
  padding: 0;
  list-style: none;
  counter-reset: copilot-list;
}
body.copilot-mode .copilot-message-body ol.copilot-prose-list {
  counter-reset: copilot-list;
}
body.copilot-mode .copilot-message-body .copilot-prose-list li {
  position: relative;
  padding-left: 22px;
}
body.copilot-mode .copilot-message-body ul.copilot-prose-list li::before {
  position: absolute;
  left: 3px;
  top: .72em;
  width: 6px;
  height: 6px;
  border: 2px solid color-mix(in srgb, var(--copilot-accent) 76%, #50617f);
  border-radius: 50%;
  background: #fff;
  content: "";
}
body.copilot-mode .copilot-message-body ol.copilot-prose-list li {
  counter-increment: copilot-list;
}
body.copilot-mode .copilot-message-body ol.copilot-prose-list li::before {
  position: absolute;
  left: 0;
  top: .22em;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  color: var(--copilot-accent);
  background: color-mix(in srgb, var(--copilot-accent) 8%, #fff);
  content: counter(copilot-list);
  font-size: 9px;
  font-weight: 800;
}
body.copilot-mode .copilot-message-body blockquote {
  margin: 13px 0;
  padding: 11px 13px;
  border: 1px solid #e1e5ec;
  border-radius: 8px;
  color: #56627a;
  background: #f7f8fa;
}
body.copilot-mode .copilot-message-body hr {
  height: 1px;
  margin: 20px 0;
  border: 0;
  background: linear-gradient(90deg, #dfe3eb, transparent);
}
body.copilot-mode .copilot-message-body code {
  padding: 2px 5px;
  border: 1px solid #e4e0fa;
  border-radius: 5px;
  color: #5949b8;
  background: #f3f1ff;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}
body.copilot-mode .copilot-message-body .copilot-code-block {
  position: relative;
  max-width: 100%;
  margin: 13px 0;
  padding: 16px 17px;
  overflow: auto;
  border: 1px solid #29344b;
  border-radius: 13px;
  color: #e8edf7;
  background: #151c2a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
body.copilot-mode .copilot-message-body .copilot-code-block[data-language]::before {
  display: block;
  margin-bottom: 10px;
  color: #8d9ab2;
  content: attr(data-language);
  font: 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.copilot-mode .copilot-message-body .copilot-code-block code {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre;
}

/* Readable enterprise data tables */
body.copilot-mode .copilot-inline-table {
  max-width: 100%;
  margin: 14px 0 18px;
  overflow: auto;
  border: 1px solid #dfe4ed;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(29,41,65,.045);
}
body.copilot-mode .copilot-inline-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
  line-height: 1.55;
}
body.copilot-mode .copilot-inline-table th,
body.copilot-mode .copilot-inline-table td {
  max-width: 320px;
  padding: 10px 12px;
  border-right: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
  color: #4b586e;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}
body.copilot-mode .copilot-inline-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #303d55;
  background: #f3f5f9;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .015em;
}
body.copilot-mode .copilot-inline-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}
body.copilot-mode .copilot-inline-table tbody tr:hover td {
  background: color-mix(in srgb, var(--copilot-accent) 4%, #fff);
}
body.copilot-mode .copilot-inline-table tr:last-child td {
  border-bottom: 0;
}
body.copilot-mode .copilot-inline-table th:last-child,
body.copilot-mode .copilot-inline-table td:last-child {
  border-right: 0;
}

/* In-message actions and outcome cards */
body.copilot-mode .copilot-route-actions {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid #e8ebf1;
}
body.copilot-mode .copilot-route-actions > header {
  gap: 9px;
  margin-bottom: 10px;
}
body.copilot-mode .copilot-route-actions > header > svg {
  width: 16px;
  height: 16px;
  color: var(--copilot-accent);
}
body.copilot-mode .copilot-route-actions > header b {
  color: #27344d;
  font-size: 11px;
}
body.copilot-mode .copilot-route-actions > header small {
  color: #9099aa;
  font-size: 9px;
}
body.copilot-mode .copilot-route-actions > div {
  gap: 8px;
}
body.copilot-mode .copilot-route-actions button {
  grid-template-columns: 34px minmax(0,1fr) 14px;
  gap: 2px 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  background: #f8f9fc;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
body.copilot-mode .copilot-route-actions button:hover {
  border-color: color-mix(in srgb, var(--copilot-accent) 38%, #dfe5ef);
  background: color-mix(in srgb, var(--copilot-accent) 4%, #fff);
  box-shadow: 0 7px 16px rgba(37,46,73,.07);
  transform: translateY(-1px);
}
body.copilot-mode .copilot-route-actions button > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--copilot-accent);
  background: color-mix(in srgb, var(--copilot-accent) 9%, #fff);
}
body.copilot-mode .copilot-route-actions button b {
  color: #26344d;
  font-size: 10.5px;
}
body.copilot-mode .copilot-route-actions button small {
  color: #8490a3;
  font-size: 9px;
}
body.copilot-mode .copilot-chat-result,
body.copilot-mode .copilot-chat-attachments,
body.copilot-mode .copilot-chat-workspace {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e0e5ee;
  border-radius: 11px;
  color: #57657b;
  background: #f5f7fa;
  font-size: 10px;
}
body.copilot-mode .copilot-chat-result small {
  color: #8691a3;
  font-size: 9px;
}
body.copilot-mode .copilot-chat-result b {
  margin-top: 3px;
  color: #344258;
  font-size: 10.5px;
  line-height: 1.55;
}
body.copilot-mode .copilot-chat-message.user .copilot-chat-attachments,
body.copilot-mode .copilot-chat-message.user .copilot-chat-workspace {
  border-color: rgba(255,255,255,.16);
  color: rgba(255,255,255,.84);
  background: rgba(255,255,255,.08);
}
body.copilot-mode .copilot-thinking-dots {
  display: inline-flex;
  gap: 4px;
  margin-top: 4px;
}
body.copilot-mode .copilot-thinking-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--copilot-accent);
  animation: copilotThinking 1.15s ease-in-out infinite;
}
body.copilot-mode .copilot-thinking-dots i:nth-child(2) { animation-delay: .14s; }
body.copilot-mode .copilot-thinking-dots i:nth-child(3) { animation-delay: .28s; }

/* Quick tasks, attachments and the command dock */
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions {
  align-items: center;
  gap: 7px;
  padding: 9px clamp(20px, 4vw, 54px) 8px;
  overflow-x: auto;
  border-top: 1px solid rgba(226,230,238,.84);
  background: rgba(248,249,252,.78);
  scrollbar-width: none;
}
body.copilot-mode .copilot-chat-suggestions::-webkit-scrollbar { display: none; }
body.copilot-mode .copilot-chat-suggestions > span {
  flex: none;
  margin-right: 3px;
  color: #929bad;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .04em;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions button {
  position: relative;
  padding: 7px 11px;
  border: 1px solid #e0e4ed;
  border-radius: 999px;
  color: #566279;
  background: rgba(255,255,255,.82);
  font-size: 10px;
  font-weight: 650;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions button:hover {
  color: var(--copilot-accent);
  border-color: color-mix(in srgb, var(--copilot-accent) 32%, #e0e4ed);
  background: #fff;
  transform: translateY(-1px);
}
body.copilot-mode .copilot-attachment-area {
  margin: 0 clamp(18px, 4vw, 52px) 7px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
}
body.copilot-mode .copilot-attachment-bar {
  min-height: 38px;
  gap: 8px;
  padding: 4px 2px;
}
body.copilot-mode .copilot-attachment-bar > span {
  color: #939cad;
  font-size: 9.5px;
}
body.copilot-mode .copilot-attach-button {
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #647187;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}
body.copilot-mode .copilot-attach-button:hover,
body.copilot-mode .copilot-attach-button.is-dragover,
body.copilot-mode .copilot-workspace-button.is-active {
  color: var(--copilot-accent);
  border-color: color-mix(in srgb, var(--copilot-accent) 18%, #e5e8ef);
  background: color-mix(in srgb, var(--copilot-accent) 5%, #fff);
}
body.copilot-mode .copilot-attachment-bar > button#copilotClearFiles {
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  color: #a14f5a;
  background: #fff1f2;
  font-size: 9.5px;
}
body.copilot-mode .copilot-attachment-area .copilot-file-queue {
  max-height: 230px;
  padding: 9px;
  border: 1px solid #e1e6ef;
  border-radius: 12px;
  background: rgba(255,255,255,.86);
}
body.copilot-mode .copilot-file-row {
  border-radius: 11px;
}
body.copilot-mode #copilotWorkspaceMount:not(:empty) {
  overflow: hidden;
  border-radius: 12px;
}
body.copilot-mode .copilot-workspace-panel,
body.copilot-mode .copilot-workspace-status {
  border: 1px solid #e1e6ee;
  border-radius: 12px;
  background: rgba(255,255,255,.94);
}
body.copilot-mode .copilot-workspace-status + .copilot-workspace-panel {
  margin-top: 7px;
}
body.copilot-mode .copilot-workspace-panel > header {
  border: 0;
  background: transparent;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer {
  position: relative;
  margin: 0 clamp(18px, 4vw, 52px) clamp(16px, 2vw, 24px);
  padding: 13px 14px 11px 16px;
  border: 1px solid #cfd5e2;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 34px rgba(31,39,65,.11), 0 2px 8px rgba(31,39,65,.05), inset 0 1px 0 #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer:focus-within {
  border-color: color-mix(in srgb, var(--copilot-accent) 62%, #cfd5e2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--copilot-accent) 10%, transparent), 0 15px 38px rgba(31,39,65,.13);
  transform: translateY(-1px);
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer textarea {
  min-height: 50px;
  max-height: 180px;
  padding: 0 2px 4px;
  color: #29354b;
  background: transparent;
  caret-color: var(--copilot-accent);
  font-size: 14px;
  line-height: 1.65;
}
body.copilot-mode #copilotConsoleComposer textarea::placeholder {
  color: #99a2b2;
}
body.copilot-mode #copilotConsoleComposer > div {
  min-height: 36px;
}
body.copilot-mode #copilotConsoleComposer > div > span {
  color: #8c96a7;
  font-size: 9.5px;
}
body.copilot-mode #copilotConsoleComposer > div > span svg {
  width: 13px;
  height: 13px;
  color: #2d9875;
}
body.copilot-mode #copilotConsoleComposer > div > small {
  margin-left: auto;
  margin-right: 12px;
  color: #a0a8b7;
  font-size: 9px;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer button[type="submit"] {
  min-width: 82px;
  height: 36px;
  padding: 0 13px;
  border-radius: 11px;
  background: linear-gradient(135deg, #556fe6, var(--copilot-accent));
  box-shadow: 0 7px 16px color-mix(in srgb, var(--copilot-accent) 25%, transparent);
  font-size: 10.5px;
  transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer button[type="submit"] > span {
  color: #fff;
  font-size: 10.5px;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer button[type="submit"]:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 9px 20px color-mix(in srgb, var(--copilot-accent) 31%, transparent);
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer button[type="submit"]:disabled {
  box-shadow: none;
  filter: saturate(.5);
  cursor: not-allowed;
  opacity: .58;
}

/* Keyboard and accessibility states */
body.copilot-mode :where(button, summary, label[for], textarea, input):focus-visible {
  outline: 2px solid var(--copilot-accent);
  outline-offset: 3px;
}

/* Dark appearance */
body[data-theme="dark"].copilot-mode {
  --copilot-ink: #edf2fb;
  --copilot-muted: #9eabc0;
  --copilot-line: #2a3447;
  --copilot-panel: rgba(22,29,42,.94);
  --copilot-soft: #101722;
}
body[data-theme="dark"].copilot-mode .copilot-chat-primary {
  border-color: #2b3548;
  background:
    radial-gradient(circle at 10% -8%, color-mix(in srgb, var(--copilot-accent) 18%, transparent) 0, transparent 31%),
    radial-gradient(circle at 95% 2%, rgba(49,154,188,.11) 0, transparent 25%),
    #0f151f;
  box-shadow: 0 24px 70px rgba(0,0,0,.38), 0 2px 8px rgba(0,0,0,.24);
}
body[data-theme="dark"].copilot-mode .copilot-chat-primary::before {
  background-image: radial-gradient(circle, rgba(147,162,192,.15) .7px, transparent .8px);
}
body[data-theme="dark"].copilot-mode .copilot-chat-primary > header {
  border-bottom-color: #2a3446;
  background: rgba(17,24,35,.82);
  box-shadow: 0 1px 0 rgba(255,255,255,.025);
}
body[data-theme="dark"].copilot-mode .copilot-chat-identity > span::after { border-color: #121923; }
body[data-theme="dark"].copilot-mode .copilot-chat-identity h3,
body[data-theme="dark"].copilot-mode .copilot-message-author b,
body[data-theme="dark"].copilot-mode .copilot-message-body strong,
body[data-theme="dark"].copilot-mode .copilot-message-body .copilot-inline-heading,
body[data-theme="dark"].copilot-mode .copilot-route-actions > header b,
body[data-theme="dark"].copilot-mode .copilot-route-actions button b {
  color: #f1f5fc;
}
body[data-theme="dark"].copilot-mode .copilot-chat-identity p,
body[data-theme="dark"].copilot-mode .copilot-chat-identity small { color: #91a0b8; }
body[data-theme="dark"].copilot-mode .copilot-model-status,
body[data-theme="dark"].copilot-mode .copilot-header-action,
body[data-theme="dark"].copilot-mode .copilot-approval-menu > summary {
  border-color: #303b50;
  color: #bdc8d9;
  background: rgba(27,36,51,.86);
}
body[data-theme="dark"].copilot-mode .copilot-model-status.online {
  border-color: rgba(70,194,151,.24);
  color: #8ad5ba;
  background: rgba(25,62,51,.6);
}
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-message > .copilot-message-surface {
  border-color: #2b3548;
  background: rgba(22,29,42,.94);
  box-shadow: 0 10px 28px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.025);
}
body[data-theme="dark"].copilot-mode .copilot-chat-message.welcome > .copilot-message-surface {
  border-color: color-mix(in srgb, var(--copilot-accent) 30%, #2b3548);
  background: linear-gradient(120deg, color-mix(in srgb, var(--copilot-accent) 10%, #151d2a), #161d2a);
}
body[data-theme="dark"].copilot-mode .copilot-message-body { color: #c8d2e2; }
body[data-theme="dark"].copilot-mode .copilot-message-author small { border-left-color: #394459; color: #8492a8; }
body[data-theme="dark"].copilot-mode .copilot-message-body ul.copilot-prose-list li::before { background: #161d2a; }
body[data-theme="dark"].copilot-mode .copilot-message-body ol.copilot-prose-list li::before {
  color: #b9b1ff;
  background: color-mix(in srgb, var(--copilot-accent) 17%, #17202e);
}
body[data-theme="dark"].copilot-mode .copilot-message-body blockquote {
  color: #b3bfd2;
  background: color-mix(in srgb, var(--copilot-accent) 8%, #151d29);
}
body[data-theme="dark"].copilot-mode .copilot-message-body hr { background: linear-gradient(90deg, #354055, transparent); }
body[data-theme="dark"].copilot-mode .copilot-message-body code {
  border-color: #3a3c64;
  color: #c5bdff;
  background: #272747;
}
body[data-theme="dark"].copilot-mode .copilot-message-body .copilot-code-block { border-color: #38445b; background: #0b1018; }
body[data-theme="dark"].copilot-mode .copilot-message-body .copilot-code-block code { color: #e6edf8; background: transparent; }
body[data-theme="dark"].copilot-mode .copilot-inline-table { border-color: #303a4e; background: #151c28; }
body[data-theme="dark"].copilot-mode .copilot-inline-table th { color: #d9e1ed; background: #222c3d; }
body[data-theme="dark"].copilot-mode .copilot-inline-table td { border-color: #2a3447; color: #bcc7d8; background: #151c28; }
body[data-theme="dark"].copilot-mode .copilot-inline-table tbody tr:nth-child(even) td { background: #182130; }
body[data-theme="dark"].copilot-mode .copilot-inline-table tbody tr:hover td { background: color-mix(in srgb, var(--copilot-accent) 9%, #192231); }
body[data-theme="dark"].copilot-mode .copilot-route-actions,
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-suggestions { border-color: #293346; }
body[data-theme="dark"].copilot-mode .copilot-route-actions button {
  border-color: #303b4f;
  background: #192231;
}
body[data-theme="dark"].copilot-mode .copilot-route-actions button:hover { background: #202b3d; }
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-suggestions { background: rgba(14,20,29,.82); }
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-suggestions button {
  border-color: #303a4d;
  color: #aebbd0;
  background: #17202d;
}
body[data-theme="dark"].copilot-mode .copilot-attach-button { color: #9eabc0; }
body[data-theme="dark"].copilot-mode .copilot-attach-button:hover,
body[data-theme="dark"].copilot-mode .copilot-workspace-button.is-active { background: #1b2637; }
body[data-theme="dark"].copilot-mode .copilot-attachment-area .copilot-file-queue,
body[data-theme="dark"].copilot-mode .copilot-workspace-panel,
body[data-theme="dark"].copilot-mode .copilot-workspace-status {
  border-color: #2d384b;
  background: rgba(20,28,40,.95);
}
body[data-theme="dark"].copilot-mode .copilot-chat-primary #copilotConsoleComposer {
  border-color: #354158;
  background: rgba(21,29,42,.97);
  box-shadow: 0 13px 36px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.03);
}
body[data-theme="dark"].copilot-mode .copilot-chat-primary #copilotConsoleComposer textarea { color: #edf2fa; }

/* Responsive states */
@media (max-width: 960px) {
  body.copilot-mode .content { padding-top: 12px; padding-bottom: 12px; }
  body.copilot-mode .copilot-chat-primary { border-radius: 18px; }
  body.copilot-mode .copilot-chat-primary > header { border-radius: 18px 18px 0 0; }
  body.copilot-mode .copilot-chat-identity p { display: none; }
  body.copilot-mode .copilot-model-status { display: none; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-messages { padding-inline: 24px; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-message.user > .copilot-message-surface { max-width: 84%; }
}
@media (max-width: 720px) {
  body.copilot-mode .content { padding: 8px 0 0; }
  body.copilot-mode .copilot-chat-primary { border-inline: 0; border-bottom: 0; border-radius: 16px 16px 0 0; }
  body.copilot-mode .copilot-chat-primary > header {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 16px 16px 0 0;
  }
  body.copilot-mode .copilot-chat-identity { gap: 9px; }
  body.copilot-mode .copilot-chat-identity > span { width: 38px; height: 38px; border-radius: 12px; }
  body.copilot-mode .copilot-chat-identity h3 { font-size: 17px; }
  body.copilot-mode .copilot-chat-identity h3 em,
  body.copilot-mode .copilot-chat-identity small { display: none; }
  body.copilot-mode .copilot-header-tools { justify-content: flex-end; }
  body.copilot-mode .copilot-header-action { width: 36px; padding: 0; font-size: 0; }
  body.copilot-mode .copilot-header-action svg { width: 15px; height: 15px; }
  body.copilot-mode .copilot-approval-menu > summary { padding: 0 9px; font-size: 0; }
  body.copilot-mode .copilot-approval-menu > summary b { font-size: 9px; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-messages { gap: 17px; padding: 20px 13px 16px; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-message { gap: 8px; }
  body.copilot-mode .copilot-chat-message > .copilot-message-avatar { width: 30px; height: 30px; border-radius: 10px; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-message > .copilot-message-surface {
    max-width: calc(100% - 38px);
    padding: 15px 14px 16px;
    border-radius: 5px 15px 15px 15px;
  }
  body.copilot-mode .copilot-chat-primary .copilot-chat-message.user > .copilot-message-surface { max-width: 91%; padding: 12px 14px; }
  body.copilot-mode .copilot-message-body { font-size: 13px; line-height: 1.76; }
  body.copilot-mode .copilot-message-body .copilot-inline-heading { margin-top: 18px; font-size: 14px; }
  body.copilot-mode .copilot-route-actions > div { grid-template-columns: 1fr; }
  body.copilot-mode .copilot-inline-table { margin-inline: -3px; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions { padding-inline: 13px; }
  body.copilot-mode .copilot-chat-suggestions > span { display: none; }
  body.copilot-mode .copilot-attachment-area { margin-inline: 11px; }
  body.copilot-mode .copilot-attachment-bar > span { display: none; }
  body.copilot-mode .copilot-chat-primary #copilotConsoleComposer { margin: 0 10px 10px; padding: 11px 11px 9px 13px; border-radius: 16px; }
  body.copilot-mode .copilot-chat-primary #copilotConsoleComposer textarea { min-height: 46px; font-size: 13.5px; }
  body.copilot-mode #copilotConsoleComposer > div > span,
  body.copilot-mode #copilotConsoleComposer > div > small { display: none; }
  body.copilot-mode .copilot-chat-primary #copilotConsoleComposer button[type="submit"] { min-width: 72px; }
  body.copilot-mode .copilot-workspace-status { grid-template-columns: 30px minmax(0,1fr) auto; }
}

@keyframes copilotMessageReveal {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes copilotStatusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(46,189,136,.1); }
  50% { box-shadow: 0 0 0 6px rgba(46,189,136,.03); }
}
@keyframes copilotThinking {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  body.copilot-mode *, body.copilot-mode *::before, body.copilot-mode *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* v34 · Commercial readiness and accessibility hardening
   只调整内容区与小奥工作区；左侧系统菜单结构、业务动作和数据契约保持不变。 */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#view-module :is(button, details > summary, [role="button"]) { min-height: 38px; }
#view-module :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) { min-height: 40px; }
#view-module textarea { min-height: 76px; }
#view-module :is(a[href], button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--module-accent, #2f6ff2) 62%, #fff) !important;
  outline-offset: 2px;
}
#view-module :is(button, input, select, textarea):disabled,
#view-module [aria-disabled="true"] {
  opacity: .74;
}

/* Help becomes a role-oriented entry map instead of a short generic record list. */
.help-live-layout { display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;align-items:start; }
.help-live-panel,.help-support-panel { min-width:0;padding:22px!important; }
.help-live-heading { display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding-bottom:16px;border-bottom:1px solid #e6ebf2; }
.help-live-heading small,.help-support-panel>small { color:var(--module-accent,#3383bc);font-size:10px;font-weight:850;letter-spacing:.05em; }
.help-live-heading h2,.help-support-panel h2 { margin:5px 0;color:#172a43;font-size:22px;line-height:1.25; }
.help-live-heading p,.help-support-panel p { max-width:650px;margin:0;color:#667991;font-size:12px;line-height:1.65; }
.help-live-heading label { display:flex;align-items:center;gap:8px;width:min(360px,42%);min-height:42px;padding:0 12px;border:1px solid #cfdbea;border-radius:11px;background:#fff; }
.help-live-heading label:focus-within { border-color:var(--module-accent,#3383bc);box-shadow:0 0 0 3px color-mix(in srgb,var(--module-accent,#3383bc) 13%,transparent); }
.help-live-heading label svg { width:16px;height:16px;color:#6a7b91; }
.help-live-heading input { width:100%;border:0;outline:0;background:transparent;color:#20334d;font:inherit;font-size:12px; }
.help-role-filters { display:flex;flex-wrap:wrap;gap:7px;padding:14px 0 4px; }
.help-role-filters button { min-height:34px;padding:0 12px;border:1px solid #d7e0eb;border-radius:999px;color:#5d6e84;background:#fff;font-size:10px;font-weight:800;cursor:pointer; }
.help-role-filters button.is-active { border-color:color-mix(in srgb,var(--module-accent,#3383bc) 42%,#cbd7e6);color:#1c5f91;background:color-mix(in srgb,var(--module-soft,#edf6fb) 76%,#fff); }
.help-guide-list { display:grid;gap:8px;margin-top:10px; }
.help-guide-row { display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px 14px;border:1px solid #dfe7f0;border-radius:13px;background:#fff;transition:border-color .14s ease,box-shadow .14s ease; }
.help-guide-row:hover { border-color:#bfd0e1;box-shadow:0 8px 20px rgba(35,73,112,.07); }
.help-guide-row>span { display:grid;width:38px;height:38px;place-items:center;border-radius:11px;color:var(--module-accent,#3383bc);background:var(--module-soft,#edf6fb); }
.help-guide-row>span svg { width:18px;height:18px; }
.help-guide-row small { color:#4779a0;font-size:9px;font-weight:850; }
.help-guide-row h3 { margin:3px 0;color:#263a54;font-size:13px; }
.help-guide-row p { margin:0;color:#738298;font-size:10px;line-height:1.55; }
.help-guide-row>button { display:inline-flex;align-items:center;gap:5px;padding:0 10px;border:1px solid #d5e0ec;border-radius:9px;color:#326995;background:#fff;font-size:10px;font-weight:800;cursor:pointer; }
.help-guide-row>button svg { width:13px;height:13px; }
.help-support-panel { position:sticky;top:84px;background:linear-gradient(155deg,#f7fbfe,#eef6fb)!important; }
.help-support-panel .live-route-glyph { margin-bottom:18px; }
.help-support-facts { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:18px 0; }
.help-support-facts span { display:flex;min-width:0;flex-direction:column;padding:10px;border:1px solid #d7e3ee;border-radius:10px;background:rgba(255,255,255,.78); }
.help-support-facts b { color:#1f4f76;font-size:15px; }.help-support-facts small { margin-top:2px;color:#71849a;font-size:8px; }
.help-support-panel :is(.primary-button,.secondary-button) { width:100%;margin-top:8px;justify-content:center; }
.faq-live-empty { padding:24px;border:1px dashed #cbd8e6;border-radius:12px;color:#687a91;text-align:center; }

/* Honest commercial status: real service facts and real settings, never a decorative checkout. */
.billing-commercial { display:grid;gap:16px; }
.billing-plan-hero { display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:25px;border:1px solid #dfdce8;border-radius:18px;background:linear-gradient(135deg,#fff 38%,#f8f3f7);box-shadow:0 12px 30px rgba(62,43,77,.06); }
.billing-plan-icon { display:grid;width:42px;height:42px;margin-bottom:13px;place-items:center;border-radius:13px;color:#fff;background:#9f4770;box-shadow:0 8px 18px rgba(159,71,112,.2); }
.billing-plan-icon svg { width:21px;height:21px; }.billing-plan-hero small { color:#9a476d;font-size:10px;font-weight:850; }
.billing-plan-hero h2 { margin:5px 0;color:#281d2a;font-size:24px; }.billing-plan-hero p { max-width:760px;margin:0;color:#716776;font-size:12px;line-height:1.65; }
.billing-plan-hero>em { flex:none;border-radius:999px;padding:7px 11px;color:#19705a;background:#e7f5ef;font-size:10px;font-style:normal;font-weight:850; }
.billing-plan-hero>em.is-alert { color:#ad3b4b;background:#fcebed; }
.billing-plan-facts { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #e1e5ec;border-radius:15px;background:#fff;overflow:hidden; }
.billing-plan-facts article { display:flex;min-width:0;flex-direction:column;padding:17px 19px;border-right:1px solid #e7ebf1; }.billing-plan-facts article:last-child{border-right:0}
.billing-plan-facts small { color:#7d7380;font-size:9px; }.billing-plan-facts b { margin:5px 0 3px;color:#30263a;font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.billing-plan-facts span { color:#8b8290;font-size:9px; }
.billing-commercial-grid { display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:16px; }
.billing-governance,.billing-next-actions { padding:21px!important; }.billing-governance>header { display:flex;justify-content:space-between;gap:14px; }
.billing-governance small,.billing-next-actions>small { color:#9b466c;font-size:9px;font-weight:850; }.billing-governance h3,.billing-next-actions h3 { margin:4px 0;color:#34263b;font-size:17px; }
.billing-governance>header>span { align-self:flex-start;border-radius:999px;padding:5px 8px;color:#6d6171;background:#f2eef3;font-size:9px;font-weight:800; }
.billing-governance ul { display:grid;gap:0;margin:15px 0 0;padding:0;border:1px solid #e7e1e8;border-radius:12px;list-style:none;overflow:hidden; }
.billing-governance li { display:grid;grid-template-columns:24px minmax(0,1fr);gap:9px;padding:12px 13px;border-bottom:1px solid #ede8ee; }.billing-governance li:last-child{border-bottom:0}
.billing-governance li>svg { width:16px;height:16px;color:#19735c; }.billing-governance li span{display:flex;flex-direction:column;gap:3px}.billing-governance li b{color:#44374a;font-size:11px}.billing-governance li small{color:#817486;font-size:9px;line-height:1.5}
.billing-next-actions { align-self:start;background:#fbf8fb!important; }.billing-next-actions p{margin:6px 0 15px;color:#786d7b;font-size:10px;line-height:1.55}.billing-next-actions button{width:100%;justify-content:center;margin-top:8px}

/* Member page communicates governance before exposing individual records. */
.member-governance { display:grid;gap:16px; }
.member-governance-summary { padding:22px;border:1px solid #dce5ef;border-radius:17px;background:linear-gradient(140deg,#fff 42%,#f3f7fd);box-shadow:0 10px 28px rgba(34,67,104,.05); }
.member-governance-summary>header { display:flex;align-items:flex-start;justify-content:space-between;gap:18px; }
.member-governance-summary>header small { color:#3f73c8;font-size:10px;font-weight:850; }.member-governance-summary h2{margin:5px 0;color:#192c46;font-size:22px}.member-governance-summary p{margin:0;color:#687b94;font-size:11px;line-height:1.6}
.member-governance-summary>header>span { display:grid;width:44px;height:44px;place-items:center;border-radius:13px;color:#fff;background:#3f73c8;box-shadow:0 8px 18px rgba(63,115,200,.2) }.member-governance-summary>header svg{width:21px;height:21px}
.member-governance-summary>div { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:17px; }.member-governance-summary article{display:flex;min-width:0;flex-direction:column;padding:12px;border:1px solid #dfe7f1;border-radius:11px;background:rgba(255,255,255,.82)}.member-governance-summary article small{color:#78889d;font-size:9px}.member-governance-summary article b{margin:4px 0 2px;color:#203a5e;font-size:20px}.member-governance-summary article em{color:#8090a4;font-size:8px;font-style:normal}
.member-governance-alert { display:flex;align-items:flex-start;gap:8px;margin:12px 0 0!important;padding:10px 12px;border:1px solid #ead8aa;border-radius:10px;color:#78591f!important;background:#fff8e9;font-size:10px!important }.member-governance-alert svg{width:14px;height:14px;flex:none}
.member-governance-grid { display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start; }.member-directory-panel,.member-governance-policy{padding:20px!important}.member-governance-list{display:grid;gap:6px;margin-top:12px}
.member-governance-policy{position:sticky;top:84px}.member-governance-policy>small{color:#3f73c8;font-size:9px;font-weight:850}.member-governance-policy ol{display:grid;gap:0;margin:12px 0 16px;padding:0;border:1px solid #e1e8f1;border-radius:12px;list-style:none;overflow:hidden}.member-governance-policy li{display:grid;grid-template-columns:27px minmax(0,1fr);gap:9px;padding:12px;border-bottom:1px solid #e8edf3}.member-governance-policy li:last-child{border-bottom:0}.member-governance-policy li>i{display:grid;width:25px;height:25px;place-items:center;border-radius:8px;color:#3768ad;background:#eaf1fb;font-size:10px;font-style:normal;font-weight:850}.member-governance-policy li span{display:flex;flex-direction:column;gap:3px}.member-governance-policy li b{color:#30445f;font-size:11px}.member-governance-policy li small{color:#78889d;font-size:9px;line-height:1.45}.member-governance-policy button{width:100%;justify-content:center}

/* Long accounting surface gets local wayfinding without changing any accounting action. */
.accounting-section-nav { position:sticky;z-index:8;top:68px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:7px;border:1px solid #dce5ef;border-radius:13px;background:rgba(255,255,255,.94);box-shadow:0 8px 24px rgba(30,57,89,.08);backdrop-filter:blur(12px); }
.accounting-section-nav button { display:flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:9px;color:#5f7188;background:transparent;font-size:10px;font-weight:800;cursor:pointer; }
.accounting-section-nav button span { color:#8a98aa;font-size:8px; }.accounting-section-nav button.is-active{border-color:#cad9e8;color:#234d78;background:#f2f7fc;box-shadow:0 2px 8px rgba(37,75,116,.06)}
#month-close,#accountingPeriodWorkspace,#accountingRunHistory,#accountingControlCenter,#accountingVoucherLedger { scroll-margin-top:130px; }
.accounting-voucher-ledger-anchor { display:block; }

/* Loading stays legible: keep the existing rows as context and add a clear status layer. */
.customer-directory-list { position:relative; }
.customer-directory-list.is-loading { min-height:112px;opacity:1;pointer-events:none; }
.customer-directory-list.is-loading::before { content:"正在读取正式台账…";position:absolute;z-index:3;inset:0;display:grid;place-items:center;border:1px solid #dce6f1;border-radius:12px;color:#536b87;background:rgba(248,251,254,.94);font-size:11px;font-weight:800;letter-spacing:.02em; }
.customer-directory-list.is-loading::after { content:"";position:absolute;z-index:4;top:calc(50% - 24px);left:calc(50% - 8px);width:14px;height:14px;border:2px solid #bfd0e2;border-right-color:var(--module-accent,#2f6ff2);border-radius:50%;animation:commercialLoadingSpin .75s linear infinite; }
@keyframes commercialLoadingSpin { to { transform:rotate(360deg); } }

/* Preferences actions stay in document flow; dock clearance belongs outside the card. */
.preferences-settings-main .settings-section { scroll-margin-top:96px; }

/* Copilot keeps every function while making the task hierarchy and targets easier to scan. */
body.copilot-mode .copilot-left-controls .copilot-header-action { min-height:44px; }
body.copilot-mode .copilot-header-tools { row-gap:6px; }
body.copilot-mode .copilot-header-tools :is(button,summary) { min-height:38px; }
body.copilot-mode #copilotNewConversation { color:#245eb9;border-color:#bfd0ed;background:#edf4ff; }
body.copilot-mode #copilotMultiAgent { color:#6848b5;border-color:#d7cbef;background:#f5f1fc; }
body.copilot-mode :is(.copilot-chat-suggestions button,.copilot-attach-button,#copilotClearFiles) { min-height:38px; }
body.copilot-mode .copilot-chat-suggestions button:focus-visible,
body.copilot-mode .copilot-attach-button:focus-within { outline:3px solid rgba(78,107,229,.24);outline-offset:2px; }

body[data-theme="dark"] :is(.help-live-panel,.help-support-panel,.help-guide-row,.billing-plan-hero,.billing-plan-facts,.billing-governance,.billing-next-actions,.member-governance-summary,.member-directory-panel,.member-governance-policy,.accounting-section-nav) { border-color:#2d3c52;background:#141e2c!important; }
body[data-theme="dark"] :is(.help-live-heading h2,.help-support-panel h2,.help-guide-row h3,.billing-plan-hero h2,.billing-plan-facts b,.billing-governance h3,.billing-next-actions h3,.member-governance-summary h2,.member-governance-policy li b) { color:#e2eaf6; }
body[data-theme="dark"] :is(.help-live-heading p,.help-support-panel p,.help-guide-row p,.billing-plan-hero p,.billing-next-actions p,.member-governance-summary p) { color:#9baac0; }
body[data-theme="dark"] .accounting-section-nav button.is-active { border-color:#405675;color:#d8e7fb;background:#213149; }

@media (max-width:1100px) {
  .help-live-layout,.member-governance-grid,.billing-commercial-grid { grid-template-columns:1fr; }
  .help-support-panel,.member-governance-policy { position:static; }
  .help-support-facts { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .help-live-heading,.billing-plan-hero { align-items:stretch;flex-direction:column; }
  .help-live-heading label { width:100%; }
  .help-guide-row { grid-template-columns:34px minmax(0,1fr); }.help-guide-row>button{grid-column:2;justify-self:start;min-height:38px}
  .billing-plan-facts,.member-governance-summary>div { grid-template-columns:repeat(2,minmax(0,1fr)); }.billing-plan-facts article:nth-child(2){border-right:0}.billing-plan-facts article:last-child{grid-column:1/-1;border-top:1px solid #e7ebf1}
  .accounting-section-nav { top:58px;grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:480px) {
  .help-live-panel,.help-support-panel,.billing-governance,.billing-next-actions,.member-directory-panel,.member-governance-policy { padding:16px!important; }
  .help-support-facts,.billing-plan-facts,.member-governance-summary>div { grid-template-columns:1fr; }
  .billing-plan-facts article,.billing-plan-facts article:nth-child(2),.billing-plan-facts article:last-child { grid-column:auto;border-right:0;border-top:1px solid #e7ebf1; }.billing-plan-facts article:first-child{border-top:0}
  .accounting-section-nav button { justify-content:flex-start;padding-inline:10px; }
}
@media (forced-colors:active) {
  .help-guide-row,.billing-plan-hero,.billing-plan-facts,.member-governance-summary,.accounting-section-nav { border:1px solid CanvasText; }
  .help-role-filters button.is-active,.accounting-section-nav button.is-active { color:HighlightText;background:Highlight; }
  .customer-directory-list.is-loading::before { color:CanvasText;background:Canvas; }
}
@media (prefers-reduced-motion:reduce) {
  .help-guide-row,.customer-directory-list { transition:none; }
  .customer-directory-list.is-loading::after { animation:none; }
  html:focus-within { scroll-behavior:auto; }
}
/* /v34 */

/* v33 · Platform-wide work surface
   Shared module shells are intentionally refined here without touching the left navigation,
   route handlers, permissions, data attributes, or business actions. */
:root {
  --work-surface: #ffffff;
  --work-surface-muted: #f7f9fc;
  --work-line: #e2e8f0;
  --work-line-strong: #d5deea;
  --work-ink: #17243a;
  --work-muted: #6e7d92;
  --work-radius: 12px;
  --work-shadow: 0 1px 2px rgba(18, 38, 72, .035), 0 8px 22px rgba(18, 38, 72, .045);
}

/* One calm information hierarchy for all 74 module routes. */
#view-module .module-page-intro {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 0 18px;
}
#view-module .module-page-intro > div:first-child { max-width: 820px; }
#view-module .module-page-intro .eyebrow { margin-bottom: 6px; font-size: 10px; letter-spacing: .02em; }
#view-module .module-page-intro h1 {
  max-width: 920px;
  margin: 0;
  color: var(--work-ink);
  font-size: clamp(26px, 2.35vw, 38px);
  line-height: 1.13;
  letter-spacing: -.035em;
}
#view-module .module-page-intro h1 span { color: #667885; font-weight: 510; }
#view-module .module-page-intro p { max-width: 760px; margin: 9px 0 0; color: var(--work-muted); font-size: 12px; line-height: 1.65; }
#view-module .module-page-intro #modulePrimary { align-self: center; min-height: 42px; padding-inline: 17px; }

/* Keep route navigation usable, but remove the oversized repeated banner feeling. */
#view-module:not([data-module="copilot"]):not([data-module="outsourceInstructions"]) .route-context-bar {
  grid-template-columns: minmax(150px, 1fr) 14px minmax(150px, 1fr) 14px minmax(150px, 1fr) auto;
  gap: 7px;
  min-height: 42px;
  margin: 0 auto 12px;
  padding: 6px 7px 6px 12px;
  border-color: var(--work-line);
  border-radius: 10px;
  background: rgba(248, 250, 252, .88);
  box-shadow: none;
}
#view-module .route-context-bar > span { min-width: 0; }
#view-module .route-context-bar small { font-size: 8px; line-height: 1.25; }
#view-module .route-context-bar b { overflow: hidden; font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
#view-module .route-context-bar .current { padding: 5px 8px; border-radius: 7px; }
#view-module .route-context-bar button { min-height: 32px; padding: 5px 9px; font-size: 9px; }

#view-module .module-signature { min-height: 0; }
#view-module .signature-canvas:not(.page-archetype-command) { padding-bottom: 8px; }
#view-module .signature-grid,
#view-module .customer-directory-layout { gap: 12px; }
#view-module .signature-grid,
#view-module .searchable-ledger-layout { grid-template-columns: minmax(0, 1fr) 276px; }
#view-module .customer-directory-layout { grid-template-columns: minmax(0, 1fr) 276px; }
#view-module .searchable-ledger-layout,
#view-module .customer-directory-layout { grid-template-columns: minmax(0, 1fr); align-items: start; }

/* Official ledger: flatter, denser, and visually distinct from a marketing card grid. */
#view-module .signature-panel {
  border-color: var(--work-line);
  border-radius: var(--work-radius);
  background: var(--work-surface);
  box-shadow: var(--work-shadow);
}
#view-module .customer-directory-panel,
#view-module .operational-ledger,
#view-module .signature-panel.split-ledger-shell { padding: 0; overflow: hidden; }
#view-module .customer-directory-toolbar,
#view-module .split-ledger-toolbar {
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--work-line);
  background: #fff;
}
#view-module .customer-directory-toolbar > div:first-child { min-width: 210px; }
#view-module .customer-directory-toolbar > div small,
#view-module .split-ledger-toolbar small { font-size: 9px; letter-spacing: .025em; }
#view-module .customer-directory-toolbar h2,
#view-module .split-ledger-toolbar h2 { margin: 2px 0; color: var(--work-ink); font-size: 17px; line-height: 1.3; }
#view-module .customer-directory-toolbar p,
#view-module .split-ledger-toolbar p { max-width: 620px; margin: 0; color: var(--work-muted); font-size: 10px; line-height: 1.5; }
#view-module .customer-directory-tools { align-items: center; gap: 6px; }
#view-module .customer-directory-toolbar label,
#view-module .split-ledger-toolbar label { min-height: 36px; border-radius: 8px; }
#view-module .customer-directory-toolbar input,
#view-module .customer-directory-toolbar select,
#view-module .split-ledger-toolbar input { font-size: 11px; }
#view-module .customer-directory-status {
  min-height: 34px;
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px solid var(--work-line);
  color: var(--work-muted);
  background: var(--work-surface-muted);
}
#view-module .customer-directory-status b { color: #33445d; }
#view-module .customer-directory-list:not(.is-card-grid) {
  display: grid;
  gap: 0;
  min-height: 80px;
  margin: 0;
  background: #fff;
}
#view-module .customer-directory-list:not(.is-card-grid) .sig-row-shell,
#view-module .customer-directory-list:not(.is-card-grid) > .sig-row,
#view-module .operational-ledger .sig-row-shell { border-top: 1px solid #e9eef4; }
#view-module .purchase-orders .sig-row-shell,
#view-module [data-ledger-entity="purchases"] .sig-row-shell {
  column-gap: 16px;
  padding-right: 22px;
}
#view-module .purchase-orders .record-row-lifecycle,
#view-module [data-ledger-entity="purchases"] .record-row-lifecycle {
  flex: none;
  min-height: 32px;
}
#view-module .customer-directory-list:not(.is-card-grid) .sig-row-shell:first-child,
#view-module .customer-directory-list:not(.is-card-grid) > .sig-row:first-child { border-top: 0; }
#view-module .customer-directory-list:not(.is-card-grid) .sig-row-button,
#view-module .operational-ledger .sig-row-button {
  min-height: 54px;
  padding: 9px 14px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  transition: background-color 120ms ease;
}
#view-module .customer-directory-list:not(.is-card-grid) .sig-row-button:hover,
#view-module .operational-ledger .sig-row-button:hover {
  padding-inline: 14px;
  border: 0;
  background: #f7f9fc;
  box-shadow: none;
  transform: none;
}
#view-module .customer-directory-pagination {
  min-height: 48px;
  margin: 0;
  padding: 8px 14px;
  border-top: 1px solid var(--work-line);
  background: #fff;
}

/* Card view remains available, but uses a restrained information-density rhythm. */
#view-module .customer-directory-list.is-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
  padding: 12px;
}
#view-module .customer-directory-list.is-card-grid .customer-grid-card { gap: 11px; padding: 16px; border-radius: 12px; box-shadow: none; }
#view-module .customer-directory-list.is-card-grid .customer-grid-card:hover { transform: none; box-shadow: 0 8px 20px rgba(18, 38, 72, .07); }

/* Context inspector replaces the repeated colored KPI box without removing any action. */
#view-module .ledger-context-panel {
  position: static;
  grid-column: 1 / -1;
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(210px, .9fr) minmax(230px, 1.1fr) minmax(390px, 1.45fr) minmax(220px, .9fr) auto;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}
#view-module .ledger-context-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-right: 1px solid var(--work-line);
}
#view-module .ledger-context-head .live-route-glyph { width: 38px; height: 38px; margin: 0; border-radius: 10px; box-shadow: none; }
#view-module .ledger-context-head small { color: var(--work-muted); font-size: 9px; }
#view-module .ledger-context-head h2 { margin: 3px 0 0; color: var(--work-ink); font-size: 14px; line-height: 1.35; }
#view-module .ledger-context-flow { display: grid; align-content: center; gap: 4px; margin: 0; padding: 13px 14px; border-right: 1px solid var(--work-line); background: var(--work-surface-muted); }
#view-module .ledger-context-flow small { color: #8896a8; font-size: 9px; }
#view-module .ledger-context-flow b { color: #344760; font-size: 11px; line-height: 1.45; }
#view-module .ledger-context-panel .sig-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-right: 1px solid var(--work-line); }
#view-module .ledger-context-panel .sig-kpi { min-height: 68px; padding: 10px 14px; border: 0; border-right: 1px solid var(--work-line); border-radius: 0; background: #fff; box-shadow: none; }
#view-module .ledger-context-panel .sig-kpi:last-child { border-right: 0; }
#view-module .ledger-context-evidence { display: grid; grid-template-columns: 18px 1fr; align-content: center; gap: 8px; padding: 13px 14px; color: #65758a; }
#view-module .ledger-context-evidence svg { width: 16px; height: 16px; color: #2a8b69; }
#view-module .ledger-context-evidence b,
#view-module .ledger-context-evidence small { display: block; }
#view-module .ledger-context-evidence b { color: #394b62; font-size: 10px; }
#view-module .ledger-context-evidence small { margin-top: 2px; font-size: 9px; line-height: 1.45; }
#view-module .ledger-context-panel > :is(.primary-button, .secondary-button, .ghost-button) { align-self: center; margin: 12px 14px 12px 0; justify-content: center; }

/* Repeated split-state workspaces now read as one ledger with clear sections. */
#view-module .split-ledger-shell { gap: 0; }
#view-module .split-ledger-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(720px, 100%), 1fr));
  gap: 16px;
  padding: 16px;
}
#view-module .split-ledger-section { border-color: var(--work-line); border-radius: 10px; background: #fff; }
#view-module .split-ledger-section > header {
  align-items: center;
  min-height: 68px;
  padding: 14px 18px;
  background: var(--work-surface-muted);
}
#view-module .split-ledger-section h2 { font-size: 16px; }
#view-module .split-ledger-section p { margin-top: 4px; font-size: 10.5px; line-height: 1.55; }
#view-module .split-ledger-row > button[data-record-open] {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  min-height: 64px;
  padding: 12px 76px 12px 18px;
}
#view-module .split-ledger-row > button[data-record-open] > svg { display: none; }
#view-module .split-ledger-row b { font-size: 12.5px; }
#view-module .split-ledger-row small { margin-top: 3px; font-size: 10.5px; line-height: 1.55; }
#view-module .split-ledger-row em,
#view-module .split-ledger-row strong { font-size: 10.5px; white-space: nowrap; }
#view-module .split-ledger-row strong {
  min-width: 48px;
  padding-left: 16px;
  border-left: 1px solid #e2e8f0;
  text-align: center;
}

/* Hub, analytics, map, and settings variants keep their specialized behavior. */
#view-module[data-page-archetype="hub"] .signature-panel.tinted,
#view-module[data-page-archetype="analytics"] .signature-panel.tinted,
#view-module[data-page-archetype="workspace"] .signature-panel.tinted {
  border-color: var(--work-line);
  background: #fff;
  box-shadow: var(--work-shadow);
}
#view-module .live-analytics-panel .sig-kpis { margin-bottom: 10px; }
#view-module .geo-layout { grid-template-columns: minmax(0, 1fr) 340px; }
#view-module .geo-sidebar { position: sticky; top: 78px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#view-module .geo-sidebar .sig-row-button.has-customer-logo { grid-template-columns: 32px minmax(0, 1fr) auto 14px; gap: 8px; padding: 10px; }
#view-module .map-country-list { max-height: 360px; padding-right: 4px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#view-module[data-module="productSchemes"] .searchable-ledger-layout,
#view-module[data-module="bom"] .bom-ledger-grid { align-items: start; }
#view-module[data-module="productSchemes"] .scheme-list,
#view-module[data-module="bom"] .bom-ledger-list {
  max-height: 720px;
  padding-right: 4px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#view-module[data-module="productSchemes"] .scheme-row { min-height: 58px; padding: 10px 12px; border-radius: 9px; box-shadow: none; }
#view-module[data-module="productSchemes"] .scheme-row:hover { transform: none; }
#view-module[data-page-archetype="settings"] .module-signature { max-width: 1120px; margin-inline: auto; }
#view-module[data-page-archetype="settings"] .settings-section,
#view-module[data-page-archetype="settings"] .signature-panel { border-radius: 12px; box-shadow: none; }

/* Enterprise fit: keep the company identity readable instead of forcing it
   into the same narrow column as the two numeric counters. */
#view-module[data-module="training"] .signature-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
}
#view-module[data-module="training"] .signature-panel.tinted .sig-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#view-module[data-module="training"] .signature-panel.tinted .sig-kpi:first-child {
  grid-column: 1 / -1;
  min-height: 82px;
}
#view-module[data-module="training"] .signature-panel.tinted .sig-kpi b {
  max-width: 100%;
  color: var(--work-ink);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: break-word;
}
#view-module[data-module="training"] .signature-panel.tinted .sig-kpi:not(:first-child) b {
  font-size: 20px;
}

/* Main work areas receive the same calmer surfaces while retaining their own layouts. */
:is(#view-home, #view-today, #view-orders, #view-finance, #view-studio) :is(.focus-card, .pulse-card, .flow-card, .module-section, .table-card, .receivable-card, .match-card) {
  border-color: var(--work-line);
  border-radius: 12px;
  box-shadow: var(--work-shadow);
}
:is(#view-home, #view-today, #view-orders, #view-finance, #view-studio) .page-intro h1 { color: var(--work-ink); letter-spacing: -.035em; }

/* Long ledgers render incrementally and remain keyboard/scroll friendly. */
#view-module .customer-directory-list > *,
#view-module .split-ledger-row,
#view-module .accounting-control-panel,
#view-module .rd-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 64px;
}

body[data-theme="dark"] #view-module .signature-panel,
body[data-theme="dark"] #view-module .customer-directory-toolbar,
body[data-theme="dark"] #view-module .split-ledger-toolbar,
body[data-theme="dark"] #view-module .customer-directory-list:not(.is-card-grid),
body[data-theme="dark"] #view-module .customer-directory-list:not(.is-card-grid) .sig-row-button,
body[data-theme="dark"] #view-module .ledger-context-panel,
body[data-theme="dark"] #view-module .ledger-context-panel .sig-kpi,
body[data-theme="dark"] #view-module .split-ledger-section { border-color: #2c3a50; background: #151f2d; }
body[data-theme="dark"] #view-module :is(.customer-directory-status, .ledger-context-flow, .split-ledger-section > header) { border-color: #2c3a50; background: #101824; }
body[data-theme="dark"] #view-module :is(.ledger-context-head h2, .ledger-context-flow b, .customer-directory-toolbar h2, .split-ledger-toolbar h2) { color: #e5edf8; }

@media (max-width: 1180px) {
  #view-module .signature-grid,
  #view-module .searchable-ledger-layout,
  #view-module .customer-directory-layout,
  #view-module .geo-layout { grid-template-columns: 1fr; }
  #view-module .ledger-context-panel,
  #view-module .geo-sidebar { position: static; }
  #view-module .ledger-context-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-module .ledger-context-panel .sig-kpis { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--work-line); border-right: 0; }
  #view-module .ledger-context-evidence { border-top: 1px solid var(--work-line); }
  #view-module[data-module="training"] .signature-grid { grid-template-columns: 1fr; }
  #view-module[data-module="training"] .signature-panel.tinted .sig-kpis { grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(120px, .5fr)); }
  #view-module[data-module="training"] .signature-panel.tinted .sig-kpi:first-child { grid-column: auto; min-height: auto; }
}
@media (max-width: 760px) {
  #view-module .module-page-intro { padding-top: 20px; }
  #view-module .module-page-intro h1 { font-size: 27px; }
  #view-module:not([data-module="copilot"]):not([data-module="outsourceInstructions"]) .route-context-bar { display: none; }
  #view-module .customer-directory-toolbar,
  #view-module .split-ledger-toolbar { align-items: stretch; padding: 13px; }
  #view-module .customer-directory-tools { align-items: stretch; }
  #view-module .ledger-context-panel { grid-template-columns: 1fr; }
  #view-module .ledger-context-panel .sig-kpis { grid-column: auto; grid-template-columns: 1fr; }
  #view-module .ledger-context-head,
  #view-module .ledger-context-flow { border-right: 0; border-bottom: 1px solid var(--work-line); }
  #view-module .ledger-context-panel > :is(.primary-button, .secondary-button, .ghost-button) { margin: 0 13px 13px; }
  #view-module[data-module="training"] .signature-panel.tinted .sig-kpis { grid-template-columns: 1fr 1fr; }
  #view-module[data-module="training"] .signature-panel.tinted .sig-kpi:first-child { grid-column: 1 / -1; }
  .product-file-library > header { align-items: stretch; flex-direction: column; }
  .product-file-version { grid-template-columns: 36px minmax(0, 1fr); }
  .product-file-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .batch-product-files > span { grid-template-columns: 18px minmax(0, 1fr); }
  .batch-product-files small { grid-column: 2; white-space: normal; }
  #view-module .split-ledger-grid { grid-template-columns: 1fr; }
  #view-module .customer-directory-list.is-card-grid { grid-template-columns: 1fr; padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #view-module .customer-directory-list:not(.is-card-grid) .sig-row-button { transition: none; }
}
/* /v33 */
@media (forced-colors: active) {
  body.copilot-mode .copilot-chat-primary,
  body.copilot-mode .copilot-message-surface,
  body.copilot-mode #copilotConsoleComposer { border: 1px solid CanvasText; }
}

/* Chat-first refinement: a quiet, immediate-use surface with an on-demand navigation rail. */
body.copilot-mode .topbar {
  height: 58px;
  padding-inline: 20px;
  border-bottom-color: transparent;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px);
}
body.copilot-mode .content {
  height: calc(100vh - 58px);
  padding: 0;
}
body.copilot-mode #view-module,
body.copilot-mode #view-module.is-active {
  width: 100%;
  max-width: none;
}
body.copilot-mode .copilot-chat-primary {
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
body.copilot-mode .copilot-chat-primary::before { display: none; }
body.copilot-mode .copilot-chat-primary > header {
  padding: 12px 22px;
  border-bottom-color: #eceef2;
  border-radius: 0;
  background: rgba(255,255,255,.94);
  box-shadow: none;
}
body.copilot-mode .copilot-chat-identity > span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--copilot-accent) 19%, transparent);
}
body.copilot-mode .copilot-chat-identity > span::after { width: 9px; height: 9px; border-width: 2px; }
body.copilot-mode .copilot-chat-identity svg { width: 17px; height: 17px; }
body.copilot-mode .copilot-chat-identity small { font-size: 8.5px; }
body.copilot-mode .copilot-chat-identity h3 { margin-top: 0; font-size: 17px; }
body.copilot-mode .copilot-chat-identity p { font-size: 9.5px; }
body.copilot-mode .copilot-chat-primary .copilot-chat-messages {
  gap: 28px;
  padding: 36px max(24px, calc((100% - var(--copilot-work-width)) / 2)) 30px;
  background: #fff;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-message {
  width: 100%;
  max-width: var(--copilot-work-width);
  margin-inline: auto;
}
body.copilot-mode .copilot-chat-message > .copilot-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  box-shadow: none;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-message > .copilot-message-surface,
body.copilot-mode .copilot-chat-message.welcome > .copilot-message-surface {
  padding: 1px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body.copilot-mode .copilot-chat-message.welcome > .copilot-message-surface {
  padding-top: 3px;
}
body.copilot-mode .copilot-chat-message.welcome .copilot-message-author { display: none; }
body.copilot-mode .copilot-chat-message.welcome .copilot-message-body {
  color: #20293a;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.018em;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-message.user > .copilot-message-surface {
  max-width: min(74%, 680px);
  padding: 12px 16px;
  border: 1px solid #cbdcf5;
  border-radius: 18px 18px 5px 18px;
  color: #253047;
  background: #e7f0ff;
  overflow-wrap: anywhere;
  box-shadow: none;
}
body.copilot-mode .copilot-chat-message.user .copilot-message-author b,
body.copilot-mode .copilot-chat-message.user .copilot-message-author small,
body.copilot-mode .copilot-chat-message.user .copilot-message-body,
body.copilot-mode .copilot-chat-message.user .copilot-message-body strong {
  color: #253047;
}
body.copilot-mode .copilot-chat-message.user .copilot-message-author { display: none; }
body.copilot-mode .copilot-message-body {
  color: #374258;
  font-size: 14.5px;
  line-height: 1.86;
}
body.copilot-mode .copilot-message-author { margin-bottom: 8px; }
body.copilot-mode .copilot-route-actions {
  border-top-color: #eceef2;
}
body.copilot-mode .copilot-route-actions button {
  background: #fafafa;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions,
body.copilot-mode .copilot-attachment-area,
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer {
  width: min(var(--copilot-work-width), calc(100% - 32px));
  margin-inline: auto;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions {
  justify-content: flex-start;
  padding: 8px 0;
  border-top: 1px solid #edf0f4;
  background: #fff;
}
body.copilot-mode .copilot-attachment-area { margin-bottom: 4px; }
body.copilot-mode .copilot-attachment-bar { padding-inline: 0; }
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer {
  margin-top: 0;
  margin-bottom: 18px;
  padding: 14px 14px 11px 17px;
  border-color: #d9dde5;
  border-radius: 24px;
  box-shadow: 0 5px 20px rgba(28,35,53,.08), 0 1px 3px rgba(28,35,53,.04);
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer:focus-within {
  transform: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--copilot-accent) 9%, transparent), 0 7px 24px rgba(28,35,53,.1);
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer textarea {
  min-height: 54px;
  font-size: 14.5px;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer button[type="submit"] {
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer button[type="submit"] > span { display: none; }
body.copilot-mode .copilot-chat-primary.is-empty .copilot-chat-messages {
  flex: 0 0 auto;
  margin-top: auto;
  padding-bottom: 13px;
}
body.copilot-mode .copilot-chat-primary.is-empty .copilot-chat-message.welcome {
  align-items: center;
  justify-content: center;
  max-width: var(--copilot-work-width);
}
body.copilot-mode .copilot-chat-primary.is-empty .copilot-chat-message.welcome > .copilot-message-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}
body.copilot-mode .copilot-chat-primary.is-empty .copilot-chat-message.welcome > .copilot-message-surface {
  max-width: calc(100% - 56px);
}
body.copilot-mode .copilot-chat-primary.is-empty #copilotConsoleComposer {
  margin-bottom: auto;
}

/* Persistent left system navigation, matching all other workspaces. */
@media (min-width: 851px) {
  body.copilot-mode .app-shell { grid-template-columns: 232px minmax(0,1fr); }
  body.copilot-mode .workspace { grid-column: 2; width: 100%; }
  body.copilot-mode .rail { transform: none; pointer-events: auto; }
  body.copilot-mode .rail::after { display: none; content: none; }
}
#copilotSystemMenuToggle, #copilotSystemMenuClose { display: none !important; }


body[data-theme="dark"].copilot-mode .topbar,
body[data-theme="dark"].copilot-mode .copilot-chat-primary,
body[data-theme="dark"].copilot-mode .copilot-chat-primary > header,
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-messages,
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-suggestions {
  background: #0f141d;
}
body[data-theme="dark"].copilot-mode .copilot-chat-primary > header { border-bottom-color: #282f3d; }
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-message > .copilot-message-surface,
body[data-theme="dark"].copilot-mode .copilot-chat-message.welcome > .copilot-message-surface {
  border: 0;
  background: transparent;
  box-shadow: none;
}
body[data-theme="dark"].copilot-mode .copilot-chat-message.welcome .copilot-message-body { color: #f0f3f9; }
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-message.user > .copilot-message-surface { background: #1c3455; border-color: #395c86; }
body[data-theme="dark"].copilot-mode .copilot-chat-message.user .copilot-message-body { color: #edf1f7; }
body[data-theme="dark"].copilot-mode .copilot-chat-primary #copilotConsoleComposer {
  border-color: #353d4c;
  background: #1b212c;
  box-shadow: 0 7px 24px rgba(0,0,0,.25);
}

@media (max-width: 720px) {
  body.copilot-mode .topbar { height: 54px; padding-inline: 12px; }
  body.copilot-mode .content { height: calc(100vh - 54px); }
  body.copilot-mode .copilot-chat-primary > header { padding: 10px 12px; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-messages { padding: 24px 13px 18px; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-message > .copilot-message-surface { padding: 1px 0 0; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-message.user > .copilot-message-surface { max-width: 88%; padding: 11px 14px; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions,
  body.copilot-mode .copilot-attachment-area,
  body.copilot-mode .copilot-chat-primary #copilotConsoleComposer { width: calc(100% - 20px); }
  body.copilot-mode .copilot-chat-primary #copilotConsoleComposer { margin-inline: auto; }
  body.copilot-mode .copilot-chat-primary.is-empty .copilot-chat-message.welcome { align-items: flex-start; }
  body.copilot-mode .copilot-chat-primary.is-empty .copilot-chat-message.welcome > .copilot-message-avatar { width: 34px; height: 34px; border-radius: 11px; }
  body.copilot-mode .copilot-chat-primary.is-empty .copilot-chat-message.welcome .copilot-message-body { font-size: 16px; }
}

/* Pure-white work canvas and professional result hierarchy. */
body.copilot-mode,
body.copilot-mode .app-shell,
body.copilot-mode .workspace,
body.copilot-mode .content,
body.copilot-mode #view-module,
body.copilot-mode #moduleSignature,
body.copilot-mode .copilot-console,
body.copilot-mode .copilot-chat-primary,
body.copilot-mode .copilot-chat-primary .copilot-chat-messages {
  background: #fff;
}
body.copilot-mode .content {
  width: 100%;
  max-width: none;
  margin: 0;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-messages {
  padding-inline: max(24px, calc((100% - var(--copilot-work-width)) / 2));
}
body.copilot-mode .copilot-chat-primary .copilot-chat-message {
  max-width: var(--copilot-work-width);
}
body.copilot-mode .copilot-response-lead {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 0 0 20px;
  padding: 2px 0;
}
body.copilot-mode .copilot-response-lead > small {
  color: color-mix(in srgb, var(--copilot-accent) 78%, #33405a);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
}
body.copilot-mode .copilot-message-body .copilot-response-lead > .copilot-prose-paragraph {
  margin: 0;
  color: #182238;
  font-size: 15.5px;
  font-weight: 640;
  line-height: 1.72;
}
body.copilot-mode .copilot-message-body .copilot-inline-heading {
  margin-top: 24px;
  margin-bottom: 10px;
  color: #1e293d;
  font-size: 15px;
  letter-spacing: -.012em;
}
body.copilot-mode .copilot-message-body .copilot-inline-heading::before {
  width: 3px;
  height: 15px;
  background: var(--copilot-accent);
}
body.copilot-mode .copilot-message-body .copilot-prose-list {
  gap: 9px;
  margin: 8px 0 18px;
}
body.copilot-mode .copilot-message-body .copilot-prose-list li {
  padding-left: 23px;
  line-height: 1.76;
}
body.copilot-mode .copilot-inline-table {
  margin-block: 12px 22px;
  border-color: #e1e5ec;
  box-shadow: 0 3px 12px rgba(28,39,61,.035);
}
body.copilot-mode .copilot-inline-table th {
  color: #354157;
  background: #fff;
}
body.copilot-mode .copilot-inline-table tbody tr:nth-child(even) td {
  background: #fcfcfd;
}
body.copilot-mode .copilot-route-actions button,
body.copilot-mode .copilot-chat-result,
body.copilot-mode .copilot-chat-attachments,
body.copilot-mode .copilot-chat-workspace {
  background: #fff;
}
body[data-theme="dark"].copilot-mode .copilot-response-lead {
  border-color: transparent;
}
body[data-theme="dark"].copilot-mode .copilot-response-lead > small { color: #b9b2ff; }
body[data-theme="dark"].copilot-mode .copilot-message-body .copilot-response-lead > .copilot-prose-paragraph { color: #f0f3f9; }

/* Chat attachments follow the current light user bubble instead of the retired dark bubble palette. */
body.copilot-mode .copilot-chat-message.user .copilot-chat-attachments {
  border-color: #cbd3df;
  color: #344258;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20,35,58,.04);
}
body.copilot-mode .copilot-chat-message.user .copilot-chat-attachments svg { color: #4967a8; }
body.copilot-mode .copilot-chat-message.user .copilot-chat-attachments span { color: #344258; font-weight: 650; }

/* Generated work files are first-class deliverables: readable metadata and an explicit download target. */
body.copilot-mode .copilot-generated-artifacts {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
body.copilot-mode .copilot-artifact-download {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 9px 11px;
  border: 1px solid #d4dce8;
  border-radius: 11px;
  color: #26364e;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(24,39,64,.045);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
body.copilot-mode .copilot-artifact-download:hover {
  border-color: #9fb5dc;
  background: #fbfcff;
  box-shadow: 0 7px 18px rgba(37,74,137,.09);
  transform: translateY(-1px);
}
body.copilot-mode .copilot-artifact-download:focus-visible {
  outline: 3px solid rgba(47,111,242,.2);
  outline-offset: 2px;
  border-color: #5d84d4;
}
body.copilot-mode .copilot-artifact-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: #235fc7;
  background: #eaf1ff;
}
body.copilot-mode .copilot-artifact-download.is-xlsx .copilot-artifact-icon { color: #14755c; background: #e6f5ef; }
body.copilot-mode .copilot-artifact-download.is-pdf .copilot-artifact-icon { color: #b13d49; background: #fff0f1; }
body.copilot-mode .copilot-artifact-icon svg { width: 18px; height: 18px; }
body.copilot-mode .copilot-artifact-copy { min-width: 0; }
body.copilot-mode .copilot-artifact-copy b,
body.copilot-mode .copilot-artifact-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.copilot-mode .copilot-artifact-copy b { color: #26364e; font-size: 11px; }
body.copilot-mode .copilot-artifact-copy small { margin-top: 3px; color: #7d899d; font-size: 9px; }
body.copilot-mode .copilot-artifact-download em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #285fc4;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}
body.copilot-mode .copilot-artifact-download em svg { width: 13px; height: 13px; }
body[data-theme="dark"].copilot-mode .copilot-chat-message.user .copilot-chat-attachments {
  border-color: #424d60;
  color: #e4eaf3;
  background: #171e2a;
  box-shadow: none;
}
body[data-theme="dark"].copilot-mode .copilot-chat-message.user .copilot-chat-attachments span { color: #e4eaf3; }
body[data-theme="dark"].copilot-mode .copilot-artifact-download { border-color: #344156; color: #e3e9f3; background: #171f2c; box-shadow: none; }
body[data-theme="dark"].copilot-mode .copilot-artifact-download:hover { border-color: #526788; background: #1c2635; }
body[data-theme="dark"].copilot-mode .copilot-artifact-copy b { color: #e7edf6; }
body[data-theme="dark"].copilot-mode .copilot-artifact-copy small { color: #91a0b6; }
@media (max-width: 720px) {
  body.copilot-mode .copilot-artifact-download { grid-template-columns: 36px minmax(0,1fr); }
  body.copilot-mode .copilot-artifact-download em { grid-column: 2; margin-top: -2px; }
}
@media (max-width: 720px) {
  body.copilot-mode .copilot-chat-primary .copilot-chat-messages { padding-inline: 13px; }
  body.copilot-mode .copilot-response-lead { margin-bottom: 17px; padding-left: 12px; }
  body.copilot-mode .copilot-message-body .copilot-response-lead > .copilot-prose-paragraph { font-size: 14.5px; }
}

/* Persistent work kernel: tasks, checkpoints and the daily desk stay inside the conversation. */
body.copilot-mode .copilot-task-menu { position: relative; }
body.copilot-mode .copilot-task-menu > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #dfe5ef;
  border-radius: 10px;
  color: #59667d;
  background: #fff;
  cursor: pointer;
  list-style: none;
  font-size: 9px;
  font-weight: 750;
}
body.copilot-mode .copilot-task-menu > summary::-webkit-details-marker { display: none; }
body.copilot-mode .copilot-task-menu > summary svg { width: 13px; height: 13px; color: var(--copilot-accent); }
body.copilot-mode .copilot-task-menu > summary b,
body.copilot-mode .copilot-approval-menu > summary b {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding-inline: 4px;
  border-radius: 999px;
  color: #fff;
  background: #6574cf;
  font-size: 8px;
}
body.copilot-mode .copilot-task-menu[open] > summary {
  color: #4b55b4;
  border-color: #cfd4f3;
  background: #fafaff;
}
body.copilot-mode .copilot-task-menu > div {
  position: absolute;
  z-index: 12;
  top: 42px;
  right: 0;
  width: min(430px, calc(100vw - 34px));
  max-height: min(620px, calc(100vh - 96px));
  padding: 12px;
  overflow-y: auto;
  border: 1px solid #dfe4ed;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(25,40,69,.17);
}
body.copilot-mode .copilot-task-menu > div > section > h4 {
  margin: 14px 3px 7px;
  color: #7d8799;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
}
body.copilot-mode .copilot-context-meter {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  gap: 3px 9px;
  padding: 9px 10px 10px;
  border: 1px solid #e4e8f0;
  border-radius: 11px;
  background: #fff;
}
body.copilot-mode .copilot-context-meter > span { display: grid; place-items: center; grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 9px; color: #615dd1; background: #f1f0ff; }
body.copilot-mode .copilot-context-meter svg { width: 14px; height: 14px; }
body.copilot-mode .copilot-context-meter b,
body.copilot-mode .copilot-context-meter small { display: block; }
body.copilot-mode .copilot-context-meter > div > b { color: #27334a; font-size: 10px; }
body.copilot-mode .copilot-context-meter small { margin-top: 2px; color: #8a94a5; font-size: 8.5px; }
body.copilot-mode .copilot-context-meter > i { grid-column: 2; height: 3px; overflow: hidden; border-radius: 4px; background: #edf0f5; }
body.copilot-mode .copilot-context-meter > i > b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6a77db, #6757d9); }

body.copilot-mode .copilot-task-receipt {
  margin-top: 14px;
  padding: 12px 13px 10px;
  border: 1px solid #e1e5ed;
  border-radius: 12px;
  background: #fff;
}
body.copilot-mode .copilot-task-receipt > header {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
}
body.copilot-mode .copilot-task-receipt > header > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #5969d8; background: #f0f2ff; }
body.copilot-mode .copilot-task-receipt > header svg { width: 14px; height: 14px; }
body.copilot-mode .copilot-task-receipt > header small,
body.copilot-mode .copilot-task-receipt > header b { display: block; }
body.copilot-mode .copilot-task-receipt > header small { color: #939cab; font-size: 8px; }
body.copilot-mode .copilot-task-receipt > header b { margin-top: 2px; overflow: hidden; color: #29354a; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
body.copilot-mode .copilot-task-receipt > header em { padding: 4px 7px; border-radius: 999px; color: #59667b; background: #f1f3f6; font-size: 8px; font-style: normal; font-weight: 750; white-space: nowrap; }
body.copilot-mode .copilot-task-receipt.running > header em { color: #4d5bc0; background: #eef0ff; }
body.copilot-mode .copilot-task-receipt.approval > header em { color: #98651d; background: #fff5e4; }
body.copilot-mode .copilot-task-receipt.completed > header em { color: #247c5d; background: #eaf8f2; }
body.copilot-mode .copilot-task-receipt.paused > header em,
body.copilot-mode .copilot-task-receipt.failed > header em { color: #a94b56; background: #fff0f2; }
body.copilot-mode .copilot-task-receipt > ol { display: grid; gap: 7px; margin: 10px 0 0 14px; padding: 0 0 0 10px; border-left: 1px solid #e4e7ed; list-style: none; }
body.copilot-mode .copilot-task-receipt > ol li { position: relative; display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 7px; }
body.copilot-mode .copilot-task-receipt > ol li > i { position: relative; left: -15px; width: 7px; height: 7px; margin-top: 4px; border: 2px solid #fff; border-radius: 50%; background: #8792a5; box-shadow: 0 0 0 1px #d8dde6; }
body.copilot-mode .copilot-task-receipt > ol li.auto > i,
body.copilot-mode .copilot-task-receipt > ol li.read > i,
body.copilot-mode .copilot-task-receipt > ol li.completed > i { background: #36a27b; }
body.copilot-mode .copilot-task-receipt > ol li.proposed > i,
body.copilot-mode .copilot-task-receipt > ol li.waiting_approval > i { background: #d59a3a; }
body.copilot-mode .copilot-task-receipt > ol b,
body.copilot-mode .copilot-task-receipt > ol small { display: block; }
body.copilot-mode .copilot-task-receipt > ol b { color: #47536a; font-size: 9px; }
body.copilot-mode .copilot-task-receipt > ol small { margin-top: 1px; color: #8d96a5; font-size: 8px; line-height: 1.45; }
body.copilot-mode .copilot-task-receipt > p { margin: 9px 0 0; color: #8993a3; font-size: 9px; }
body.copilot-mode .copilot-task-receipt > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #eceef2; }
body.copilot-mode .copilot-task-receipt > footer span { overflow: hidden; color: #929aaa; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
body.copilot-mode .copilot-task-receipt > footer button { flex: none; padding: 5px 8px; border: 1px solid #d9deea; border-radius: 7px; color: #5562b9; background: #fff; font-size: 8px; font-weight: 750; }
body.copilot-mode .copilot-task-menu .copilot-task-receipt { margin-top: 7px; }
body.copilot-mode .copilot-task-menu .copilot-task-receipt > ol { max-height: 112px; overflow: hidden; }

body.copilot-mode .copilot-daily-desk {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #e3e6ed;
  border-radius: 14px;
  background: #fff;
}
body.copilot-mode .copilot-daily-desk > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
body.copilot-mode .copilot-daily-desk > header small,
body.copilot-mode .copilot-daily-desk > header b { display: block; }
body.copilot-mode .copilot-daily-desk > header small { color: #6874d0; font-size: 8.5px; font-weight: 800; letter-spacing: .06em; }
body.copilot-mode .copilot-daily-desk > header b { margin-top: 3px; color: #263249; font-size: 12px; }
body.copilot-mode .copilot-daily-desk > header button { padding: 7px 10px; border: 1px solid #d4d9ee; border-radius: 9px; color: #4f5db9; background: #f8f8ff; font-size: 8.5px; font-weight: 750; }
body.copilot-mode .copilot-daily-desk > div { display: grid; gap: 1px; margin-top: 10px; border: 1px solid #e8ebf0; border-radius: 10px; overflow: hidden; background: #e8ebf0; }
body.copilot-mode .copilot-daily-desk > div > button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 9px 10px; border: 0; text-align: left; background: #fff; }
body.copilot-mode .copilot-daily-desk > div > button:hover { background: #fafaff; }
body.copilot-mode .copilot-daily-desk > div span { min-width: 0; }
body.copilot-mode .copilot-daily-desk > div b,
body.copilot-mode .copilot-daily-desk > div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.copilot-mode .copilot-daily-desk > div b { color: #3a465c; font-size: 9.5px; }
body.copilot-mode .copilot-daily-desk > div small { margin-top: 2px; color: #8b95a5; font-size: 8px; }
body.copilot-mode .copilot-daily-desk > div em { flex: none; color: #738096; font-size: 8px; font-style: normal; }

body[data-theme="dark"].copilot-mode .copilot-task-menu > summary,
body[data-theme="dark"].copilot-mode .copilot-task-menu > div,
body[data-theme="dark"].copilot-mode .copilot-context-meter,
body[data-theme="dark"].copilot-mode .copilot-task-receipt,
body[data-theme="dark"].copilot-mode .copilot-daily-desk,
body[data-theme="dark"].copilot-mode .copilot-daily-desk > div > button { border-color: #303a4d; color: #dce4f0; background: #151c27; }
body[data-theme="dark"].copilot-mode .copilot-task-receipt > header b,
body[data-theme="dark"].copilot-mode .copilot-task-receipt > ol b,
body[data-theme="dark"].copilot-mode .copilot-context-meter > div > b,
body[data-theme="dark"].copilot-mode .copilot-daily-desk > header b,
body[data-theme="dark"].copilot-mode .copilot-daily-desk > div b { color: #edf2fa; }
body[data-theme="dark"].copilot-mode .copilot-task-receipt > footer { border-top-color: #2a3447; }
body[data-theme="dark"].copilot-mode .copilot-daily-desk > div { border-color: #303a4d; background: #303a4d; }

@media (max-width: 720px) {
  body.copilot-mode .copilot-task-menu > summary { width: 36px; padding: 0; justify-content: center; font-size: 0; }
  body.copilot-mode .copilot-task-menu > summary b { position: absolute; top: -4px; right: -4px; font-size: 7px; }
  body.copilot-mode .copilot-task-menu > div { position: fixed; top: 58px; right: 8px; left: 8px; width: auto; max-height: calc(100vh - 72px); }
  body.copilot-mode .copilot-daily-desk > header { align-items: flex-start; }
  body.copilot-mode .copilot-daily-desk > header button { max-width: 112px; }
}

/* Final-priority task navigation overrides (the legacy dock styles live earlier in this long-lived stylesheet). */
#journeyDock { width: min(950px,calc(100vw - 250px)); min-height: 58px; grid-template-columns: 38px minmax(105px,.7fr) minmax(160px,1.25fr) auto auto auto 24px; gap: 9px; padding: 7px 8px; cursor: default; }
#journeyDock:hover { transform: translateX(-50%); border-color: #cbd7e8; }
#journeyDock .journey-dock-blockers { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #23745e; background: #eaf7f2; font-size: 8px; font-weight: 800; white-space: nowrap; }
#journeyDock .journey-dock-blockers.has-blockers { color: #a44a32; background: #fff1e9; }
#journeyDock .journey-dock-go { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; max-width: 220px; padding: 0 12px; overflow: hidden; border: 0; border-radius: 10px; color: #fff; background: #2f6ff2; cursor: pointer; font-size: 9px; font-weight: 800; }
#journeyDock .journey-dock-go span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#journeyDock .journey-dock-go svg { width: 13px; height: 13px; flex: none; }
#journeyDock .journey-dock-open { display: inline-flex; align-items: center; min-height: 34px; padding: 0 9px; border: 1px solid #d7e0ec; border-radius: 9px; color: #536783; background: #fff; cursor: pointer; font-size: 8px; font-weight: 750; white-space: nowrap; }
#journeyDock .journey-dock-hide { display: grid; place-items: center; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; background: transparent; }
@media (max-width: 1100px) {
  #journeyDock { width: min(760px,calc(100vw - 120px)); grid-template-columns: 36px minmax(100px,.7fr) minmax(150px,1fr) auto auto 24px; }
  #journeyDock .journey-dock-blockers { display: none; }
}
@media (max-width: 760px) {
  #journeyDock { bottom: 8px; width: calc(100vw - 16px); grid-template-columns: 32px minmax(0,1fr) auto 22px; min-height: 52px; }
  #journeyDock .journey-dock-next,#journeyDock .journey-dock-blockers,#journeyDock .journey-dock-open { display: none; }
  #journeyDock .journey-dock-go { display: inline-flex; max-width: 145px; min-height: 34px; }
}

/* Xiao Ao paged transcript and cross-thread record search (2026-08-11). */
body.copilot-mode .copilot-history-boundary,
body.copilot-mode .copilot-history-newer,
body.copilot-mode .copilot-date-divider {
  width: min(100%, var(--copilot-work-width));
  margin-inline: auto;
}
body.copilot-mode .copilot-history-boundary {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #7c8798;
  font-size: 10px;
}
body.copilot-mode .copilot-history-boundary button,
body.copilot-mode .copilot-history-newer button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #e0e5ee;
  border-radius: 999px;
  color: #58657c;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}
body.copilot-mode .copilot-history-boundary button:hover,
body.copilot-mode .copilot-history-newer button:hover {
  color: var(--copilot-accent);
  border-color: color-mix(in srgb, var(--copilot-accent) 30%, #e0e5ee);
  background: color-mix(in srgb, var(--copilot-accent) 4%, #fff);
}
body.copilot-mode .copilot-history-boundary button:focus-visible,
body.copilot-mode .copilot-history-newer button:focus-visible,
body.copilot-mode .copilot-history-drawer button:focus-visible,
body.copilot-mode .copilot-history-drawer input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--copilot-accent) 22%, transparent);
  outline-offset: 2px;
}
body.copilot-mode .copilot-history-boundary svg { width: 13px; height: 13px; }
body.copilot-mode .copilot-history-boundary.is-start { min-height: 24px; color: #a0a7b4; }
body.copilot-mode .copilot-history-boundary.is-error { color: #a54f58; }
body.copilot-mode .copilot-history-boundary.is-error button { min-height: 28px; padding-inline: 10px; color: #a54f58; border-color: #eed5d9; }
body.copilot-mode .copilot-history-boundary.is-loading { color: #5f6a7e; }
body.copilot-mode .copilot-history-newer { display: flex; justify-content: center; padding-top: 2px; }
body.copilot-mode .copilot-history-newer button span { display: grid; min-width: 18px; height: 18px; place-items: center; padding-inline: 4px; border-radius: 999px; color: #fff; background: var(--copilot-accent); font-size: 8px; }
body.copilot-mode .copilot-history-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #dfe3eb;
  border-top-color: var(--copilot-accent);
  border-radius: 50%;
  animation: copilotHistorySpin .8s linear infinite;
}
body.copilot-mode .copilot-date-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #969eac;
  font-size: 9.5px;
  white-space: nowrap;
}
body.copilot-mode .copilot-date-divider::before,
body.copilot-mode .copilot-date-divider::after { height: 1px; flex: 1; background: #edf0f4; content: ""; }
body.copilot-mode .copilot-message-author time { margin-left: auto; color: #a0a8b6; font-size: 9px; font-weight: 500; }
body.copilot-mode .copilot-message-time { display: block; margin-top: 6px; color: #8d96a5; font-size: 8.5px; text-align: right; }
body.copilot-mode .copilot-chat-message.is-located { scroll-margin-block: 100px; }
body.copilot-mode .copilot-chat-message.is-located > .copilot-message-surface {
  border-radius: 8px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--copilot-accent) 13%, transparent);
}

body.copilot-mode .copilot-history-drawer {
  position: absolute;
  z-index: 45;
  top: 66px;
  right: 16px;
  bottom: 16px;
  display: flex;
  width: min(430px, calc(100% - 32px));
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe4ed;
  border-radius: 18px;
  color: #202b40;
  background: #fff;
  box-shadow: 0 22px 70px rgba(28,38,62,.18), 0 3px 12px rgba(28,38,62,.07);
}
body.copilot-mode .copilot-history-drawer[hidden] { display: none; }
body.copilot-mode .copilot-history-drawer > header {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px 16px;
  border-bottom: 1px solid #edf0f4;
}
body.copilot-mode .copilot-history-drawer > header small { color: #6d69cb; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; }
body.copilot-mode .copilot-history-drawer > header h3 { margin: 3px 0 0; color: #1f2a3d; font-size: 19px; letter-spacing: -.02em; }
body.copilot-mode .copilot-history-drawer > header p { margin: 4px 0 0; color: #818b9c; font-size: 10px; line-height: 1.45; }
body.copilot-mode .copilot-history-drawer > header button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid #e2e6ed;
  border-radius: 10px;
  color: #687386;
  background: #fff;
  cursor: pointer;
  font-size: 19px;
}
body.copilot-mode .copilot-history-search-form { display: grid; flex: none; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #edf0f4; }
body.copilot-mode .copilot-history-search-form label > span,
body.copilot-mode .copilot-history-search-form legend { display: block; margin-bottom: 6px; color: #667286; font-size: 9px; font-weight: 750; }
body.copilot-mode .copilot-history-keyword > i { display: grid; grid-template-columns: 16px minmax(0,1fr); align-items: center; gap: 8px; height: 40px; padding: 0 11px; border: 1px solid #dce2eb; border-radius: 11px; font-style: normal; }
body.copilot-mode .copilot-history-keyword > i:focus-within { border-color: color-mix(in srgb, var(--copilot-accent) 50%, #dce2eb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--copilot-accent) 8%, transparent); }
body.copilot-mode .copilot-history-keyword svg { width: 15px; height: 15px; color: #8993a3; }
body.copilot-mode .copilot-history-keyword input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: #273348; background: transparent; font: 11px/1.3 inherit; }
body.copilot-mode .copilot-history-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.copilot-mode .copilot-history-dates input { width: 100%; height: 38px; padding: 0 9px; border: 1px solid #dce2eb; border-radius: 10px; color: #344158; background: #fff; font: 10px/1 inherit; }
body.copilot-mode .copilot-history-search-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
body.copilot-mode .copilot-history-search-form fieldset > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding: 4px; border-radius: 11px; background: #f3f5f8; }
body.copilot-mode .copilot-history-search-form fieldset label { cursor: pointer; }
body.copilot-mode .copilot-history-search-form fieldset input { position: absolute; opacity: 0; pointer-events: none; }
body.copilot-mode .copilot-history-search-form fieldset label span { display: grid; min-height: 31px; place-items: center; margin: 0; border-radius: 8px; color: #6d788a; }
body.copilot-mode .copilot-history-search-form fieldset input:checked + span { color: #4f54b2; background: #fff; box-shadow: 0 1px 5px rgba(32,42,65,.08); }
body.copilot-mode .copilot-history-search-form fieldset input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--copilot-accent) 22%, transparent); outline-offset: 1px; }
body.copilot-mode .copilot-history-search-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
body.copilot-mode .copilot-history-search-form > footer button { min-height: 36px; padding: 0 12px; border: 1px solid #dfe4ec; border-radius: 10px; color: #6e798b; background: #fff; cursor: pointer; font: 9.5px/1 inherit; font-weight: 750; }
body.copilot-mode .copilot-history-search-form > footer button.primary { display: inline-flex; align-items: center; gap: 6px; color: #fff; border-color: var(--copilot-accent); background: var(--copilot-accent); }
body.copilot-mode .copilot-history-search-form > footer svg { width: 13px; height: 13px; }
body.copilot-mode .copilot-history-search-output { min-height: 0; flex: 1; padding: 10px 12px 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
body.copilot-mode .copilot-history-search-state { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 7px; padding: 24px; color: #818b9d; text-align: center; }
body.copilot-mode .copilot-history-search-state > svg { width: 28px; height: 28px; color: #8d88db; }
body.copilot-mode .copilot-history-search-state b { color: #3b475d; font-size: 11px; }
body.copilot-mode .copilot-history-search-state small { max-width: 280px; font-size: 9.5px; line-height: 1.55; }
body.copilot-mode .copilot-history-search-state button { min-height: 32px; margin-top: 4px; padding: 0 11px; border: 1px solid #e1d2d5; border-radius: 9px; color: #a64f58; background: #fff; cursor: pointer; font-size: 9px; font-weight: 750; }
body.copilot-mode .copilot-history-results { display: grid; gap: 5px; }
body.copilot-mode .copilot-history-result { display: grid; gap: 7px; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 12px; color: #344158; background: #fff; cursor: pointer; text-align: left; }
body.copilot-mode .copilot-history-result:hover { border-color: #dfe4ed; background: #fafbfc; }
body.copilot-mode .copilot-history-result-head,
body.copilot-mode .copilot-history-result-meta { display: flex; min-width: 0; align-items: center; gap: 8px; }
body.copilot-mode .copilot-history-result-head b { color: #4e5b70; font-size: 9px; }
body.copilot-mode .copilot-history-result-head time { margin-left: auto; color: #969eac; font-size: 8.5px; }
body.copilot-mode .copilot-history-result-text { display: -webkit-box; overflow: hidden; color: #354257; font-size: 10.5px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
body.copilot-mode .copilot-history-result-text mark { padding: 0 2px; border-radius: 3px; color: #4d469e; background: #eceaff; }
body.copilot-mode .copilot-history-result-meta { flex-wrap: wrap; color: #8892a2; font-size: 8.5px; }
body.copilot-mode .copilot-history-result-meta em { overflow: hidden; min-width: 0; max-width: 190px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
body.copilot-mode .copilot-history-result-meta i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; }
body.copilot-mode .copilot-history-result-meta svg { width: 11px; height: 11px; }
body.copilot-mode .copilot-history-search-more { display: block; min-height: 34px; margin: 10px auto 0; padding: 0 13px; border: 1px solid #dfe4ed; border-radius: 999px; color: #59667c; background: #fff; cursor: pointer; font-size: 9px; font-weight: 750; }
body.copilot-mode .copilot-history-search-more:disabled { cursor: wait; opacity: .65; }
body.copilot-mode .copilot-history-search-end { margin: 12px 0 2px; color: #a0a7b3; font-size: 8.5px; text-align: center; }

body[data-theme="dark"].copilot-mode .copilot-history-drawer,
body[data-theme="dark"].copilot-mode .copilot-history-drawer > header,
body[data-theme="dark"].copilot-mode .copilot-history-search-form,
body[data-theme="dark"].copilot-mode .copilot-history-result,
body[data-theme="dark"].copilot-mode .copilot-history-boundary button,
body[data-theme="dark"].copilot-mode .copilot-history-newer button { border-color: #303a4d; color: #c8d2e2; background: #151c27; }
body[data-theme="dark"].copilot-mode .copilot-history-drawer > header h3,
body[data-theme="dark"].copilot-mode .copilot-history-search-state b,
body[data-theme="dark"].copilot-mode .copilot-history-result-text { color: #e8edf6; }
body[data-theme="dark"].copilot-mode .copilot-history-keyword > i,
body[data-theme="dark"].copilot-mode .copilot-history-dates input { border-color: #354055; color: #dce4ef; background: #111823; }
body[data-theme="dark"].copilot-mode .copilot-history-keyword input { color: #e7edf7; }
body[data-theme="dark"].copilot-mode .copilot-history-search-form fieldset > div { background: #111823; }
body[data-theme="dark"].copilot-mode .copilot-history-search-form fieldset input:checked + span { color: #c2bcff; background: #252d3c; }
body[data-theme="dark"].copilot-mode .copilot-history-result:hover { border-color: #38445a; background: #1b2432; }
body[data-theme="dark"].copilot-mode .copilot-date-divider::before,
body[data-theme="dark"].copilot-mode .copilot-date-divider::after { background: #293345; }

@media (max-width: 960px) {
  body.copilot-mode #copilotHistoryToggle { width: 36px; padding: 0; font-size: 0; }
  body.copilot-mode #copilotHistoryToggle svg { width: 15px; height: 15px; }
}
@media (max-width: 720px) {
  body.copilot-mode .copilot-history-drawer { position: fixed; z-index: 150; inset: 54px 0 0; width: 100%; border: 0; border-radius: 0; box-shadow: none; }
  body.copilot-mode .copilot-history-drawer > header { padding: 15px 16px 13px; }
  body.copilot-mode .copilot-history-search-form { padding: 14px 16px; }
  body.copilot-mode .copilot-history-search-output { padding-inline: 8px; }
  body.copilot-mode .copilot-history-boundary { flex-direction: column; gap: 5px; }
  body.copilot-mode .copilot-history-boundary small { font-size: 8.5px; }
  body.copilot-mode .copilot-date-divider { font-size: 8.5px; }
}
@media (max-width: 420px) {
  body.copilot-mode .copilot-history-dates { grid-template-columns: 1fr; }
  body.copilot-mode .copilot-history-search-form { gap: 10px; }
}
@keyframes copilotHistorySpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  body.copilot-mode .copilot-history-spinner { animation: none; border-color: var(--copilot-accent); }
  body.copilot-mode .copilot-chat-message.is-located > .copilot-message-surface { transition: none; }
}
@media (forced-colors: active) {
  body.copilot-mode .copilot-history-drawer,
  body.copilot-mode .copilot-history-result,
  body.copilot-mode .copilot-history-boundary button { border: 1px solid CanvasText; }
}

/* 小奥多任务工作区：持久对话、同页并行与只读多 Agent */
body.copilot-mode .copilot-console-simple {
  position: relative;
  display: flex;
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: 1;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
}
body.copilot-mode .copilot-console-simple > .copilot-chat-primary { min-width: 0; flex: 1 1 auto; }
/* 小奥的两个工作区入口固定在会话画布左侧；其它页面不受这组规则影响。 */
body.copilot-mode .copilot-left-controls {
  z-index: 13;
  display: flex;
  width: 138px;
  min-width: 138px;
  min-height: 0;
  flex: 0 0 138px;
  flex-direction: column;
  gap: 8px;
  padding: 15px 11px;
  border-right: 1px solid #e8ecf2;
  background: #fff;
  transition: width .2s ease, min-width .2s ease, flex-basis .2s ease, padding .2s ease, opacity .16s ease;
}
body.copilot-mode .copilot-left-controls .copilot-header-action {
  width: 100%;
  justify-content: flex-start;
  padding-inline: 10px;
}
body.copilot-mode .copilot-left-controls[aria-hidden="true"] {
  width: 0;
  min-width: 0;
  flex-basis: 0;
  overflow: hidden;
  padding-inline: 0;
  border-right-width: 0;
  opacity: 0;
  pointer-events: none;
}
body.copilot-mode .copilot-left-controls .copilot-header-action:focus-visible {
  outline: 2px solid var(--copilot-accent);
  outline-offset: 2px;
}
body.copilot-mode .copilot-thread-rail {
  position: relative;
  z-index: 12;
  display: flex;
  width: 276px;
  min-width: 276px;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #e7ebf1;
  background: #fff;
  opacity: 1;
  transition: width .2s ease, min-width .2s ease, opacity .16s ease, transform .2s ease;
}
body.copilot-mode .copilot-thread-rail:not(.is-open) { width: 0; min-width: 0; border-right: 0; opacity: 0; pointer-events: none; }
body.copilot-mode .copilot-thread-rail > header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px 9px 16px;
}
body.copilot-mode .copilot-thread-rail > header > div { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
body.copilot-mode .copilot-thread-rail > header small { color: #8a94a5; font-size: 9px; letter-spacing: .05em; }
body.copilot-mode .copilot-thread-rail > header b { color: #172033; font-size: 14px; }
body.copilot-mode .copilot-thread-rail > header button {
  display: inline-flex;
  min-width: 88px;
  height: 36px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #dce3ed;
  border-radius: 9px;
  color: #52627a;
  background: #f8fafc;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
body.copilot-mode .copilot-thread-rail > header button svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; }
body.copilot-mode .copilot-thread-rail > header button:hover { border-color: #cbd6e5; color: #26354d; background: #eef2f7; }
body.copilot-mode .copilot-thread-rail > header button:active { transform: translateX(-1px); }
body.copilot-mode .copilot-thread-rail > header button:focus-visible,
body.copilot-mode .copilot-thread-rail button:focus-visible { outline: 2px solid #2f70ef; outline-offset: 2px; }
body.copilot-mode .copilot-thread-create { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 0 12px 11px; }
body.copilot-mode .copilot-thread-create button {
  display: inline-flex;
  min-width: 0;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #dce2eb;
  border-radius: 10px;
  color: #34445d;
  background: #fff;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}
body.copilot-mode .copilot-thread-create button:first-child { border-color: #1f65e9; color: #fff; background: #2569ed; box-shadow: 0 5px 14px rgba(37,105,237,.18); }
body.copilot-mode .copilot-thread-create svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.copilot-mode .copilot-thread-rail > nav { display: flex; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid #e8ebf0; }
body.copilot-mode .copilot-thread-rail > nav button { position: relative; height: 28px; padding: 0 9px; border: 0; border-radius: 8px; color: #798597; background: transparent; font-size: 9.5px; cursor: pointer; }
body.copilot-mode .copilot-thread-rail > nav button.is-active { color: #25344c; background: #e9edf3; font-weight: 700; }
body.copilot-mode .copilot-thread-rail > nav em { display: inline-grid; min-width: 16px; height: 16px; margin-left: 4px; place-items: center; border-radius: 8px; color: #fff; background: #e25662; font-size: 8px; font-style: normal; }
body.copilot-mode .copilot-thread-list { min-height: 0; flex: 1; overflow: auto; padding: 8px 8px 14px; scrollbar-width: thin; }
body.copilot-mode .copilot-thread-row { position: relative; margin-bottom: 3px; border: 1px solid transparent; border-radius: 11px; }
body.copilot-mode .copilot-thread-row:hover { border-color: #e1e6ee; background: #fafcff; }
body.copilot-mode .copilot-thread-row.is-current { border-color: #d7e2f8; background: #f7faff; box-shadow: 0 4px 13px rgba(38,59,96,.06); }
body.copilot-mode .copilot-thread-main { display: grid; width: 100%; min-width: 0; grid-template-columns: 25px minmax(0,1fr); gap: 7px; padding: 9px 8px 9px 9px; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
body.copilot-mode .copilot-thread-main > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
body.copilot-mode .copilot-thread-main b { overflow: hidden; color: #27364e; font-size: 10.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
body.copilot-mode .copilot-thread-main small { overflow: hidden; color: #909aad; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
body.copilot-mode .copilot-thread-run-badge { display: inline-flex; width: max-content; max-width: 100%; align-items: center; gap: 5px; overflow: hidden; color: #2b67d2; font-size: 8px; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
body.copilot-mode .copilot-thread-run-badge i { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #2f70ef; box-shadow: 0 0 0 3px rgba(47,112,239,.11); animation: copilotStatusPulse 1.8s ease-in-out infinite; }
body.copilot-mode .copilot-thread-row.is-running { border-color: #cfdcf7; background: #f7faff; }
body.copilot-mode .copilot-thread-icon { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; color: #6680aa; background: #edf1f7; }
body.copilot-mode .copilot-thread-row.is-current .copilot-thread-icon { color: #fff; background: #2f70ef; }
body.copilot-mode .copilot-thread-icon svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }
body.copilot-mode .copilot-thread-actions { position: absolute; right: 6px; bottom: 5px; display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(255,255,255,.96); opacity: 0; transform: translateY(2px); transition: opacity .14s ease, transform .14s ease; }
body.copilot-mode .copilot-thread-row:hover .copilot-thread-actions,
body.copilot-mode .copilot-thread-row:focus-within .copilot-thread-actions { opacity: 1; transform: none; }
body.copilot-mode .copilot-thread-actions button { display: grid; min-width: 23px; height: 23px; place-items: center; padding: 0 6px; border: 0; border-radius: 6px; color: #6f7d92; background: transparent; font-size: 8.5px; cursor: pointer; }
body.copilot-mode .copilot-thread-actions button:hover { color: #245fce; background: #edf3ff; }
body.copilot-mode .copilot-thread-row.is-current .copilot-thread-actions,
body.copilot-mode .copilot-thread-row:has([data-copilot-thread-op="restore"]) .copilot-thread-actions { opacity: 1; transform: none; }
body.copilot-mode .copilot-thread-row.is-current .copilot-thread-main,
body.copilot-mode .copilot-thread-row:has([data-copilot-thread-op="restore"]) .copilot-thread-main { padding-bottom: 32px; }
body.copilot-mode .copilot-thread-actions .copilot-thread-delete { color: #b33c42; }
body.copilot-mode .copilot-thread-actions .copilot-thread-delete:hover { color: #9d252c; background: #fff0f1; }
.copilot-image-previews { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; margin: 8px 0; }
.copilot-image-preview { display: flex; flex-direction: column; align-items: stretch; width: min(280px, 100%); padding: 5px; border: 1px solid #d2dced; border-radius: 10px; background: #fff; color: #344258; cursor: zoom-in; text-align: left; overflow: hidden; }
.copilot-image-preview img { display: block; width: 100%; height: 170px; object-fit: contain; background: #f5f7fb; border-radius: 6px; }
.copilot-image-preview span { padding: 6px 4px 2px; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.copilot-image-preview:focus-visible { outline: 2px solid #3277e9; outline-offset: 2px; }
.copilot-image-previews.is-compact { margin: 0; flex: 0 0 64px; }
.copilot-image-previews.is-compact .copilot-image-preview { width: 64px; padding: 2px; }
.copilot-image-previews.is-compact img { height: 56px; }
.copilot-image-previews.is-compact span { display: none; }
.copilot-image-dialog { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 12px; border: 1px solid #d2dced; border-radius: 14px; color: #253249; background: #fff; }
.copilot-image-dialog::backdrop { background: rgba(12,22,38,.72); }
.copilot-image-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.copilot-image-dialog header b { overflow-wrap: anywhere; font-size: 14px; }
.copilot-image-dialog header button { flex: 0 0 36px; height: 36px; border: 0; border-radius: 8px; cursor: pointer; font-size: 24px; color: inherit; background: #edf1f7; }
.copilot-image-dialog > img { display: block; max-width: 100%; max-height: calc(100dvh - 115px); margin: auto; object-fit: contain; }
body[data-theme="dark"] .copilot-image-preview, body[data-theme="dark"] .copilot-image-dialog { color: #e4eaf3; background: #172239; border-color: #344b74; }
body[data-theme="dark"] .copilot-image-preview img, body[data-theme="dark"] .copilot-image-dialog header button { background: #101823; }
@media (hover: none) {
  body.copilot-mode .copilot-thread-actions { opacity: 1; transform: none; }
  body.copilot-mode .copilot-thread-main { padding-bottom: 32px; }
}
body.copilot-mode .copilot-thread-actions svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.copilot-mode .copilot-thread-state { display: flex; min-height: 190px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; padding: 22px; color: #8290a4; text-align: center; }
body.copilot-mode .copilot-thread-state > svg { width: 24px; height: 24px; margin-bottom: 3px; fill: none; stroke: #9aa8bc; stroke-width: 1.5; }
body.copilot-mode .copilot-thread-state b { color: #56657a; font-size: 10.5px; }
body.copilot-mode .copilot-thread-state small { max-width: 190px; font-size: 8.5px; line-height: 1.55; }
body.copilot-mode .copilot-thread-state button { margin-top: 3px; padding: 6px 9px; border: 1px solid #d7dfe9; border-radius: 8px; color: #315fae; background: #fff; font-size: 9px; cursor: pointer; }
body.copilot-mode .copilot-thread-more { display: block; width: calc(100% - 8px); height: 30px; margin: 8px 4px 2px; border: 1px solid #dde4ee; border-radius: 9px; color: #5d6f88; background: #fff; font-size: 9px; font-weight: 650; cursor: pointer; }
body.copilot-mode .copilot-thread-more:hover { color: #245fce; border-color: #c9d8f3; background: #f7faff; }
body.copilot-mode .copilot-thread-more:disabled { cursor: wait; opacity: .65; }
body.copilot-mode .copilot-file-row.is-locked { border-color: #d9e4f6; background: #f8faff; }
body.copilot-mode .copilot-file-row button:disabled { cursor: not-allowed; opacity: .38; }
body.copilot-mode .copilot-thread-rail > footer { display: flex; align-items: center; gap: 7px; padding: 10px 13px 12px; border-top: 1px solid #e7ebf1; color: #8b96a8; font-size: 8px; line-height: 1.4; }
body.copilot-mode .copilot-thread-rail > footer svg { width: 12px; height: 12px; flex: none; fill: none; stroke: #34a579; stroke-width: 1.7; }
body.copilot-mode .copilot-agent-button { color: #5b3fb2 !important; border-color: #ded6f5 !important; background: #f7f4ff !important; }
body.copilot-mode .copilot-agent-button:hover { background: #eee8ff !important; }
body.copilot-mode .copilot-agent-thinking .copilot-message-avatar { color: #fff; background: linear-gradient(145deg,#6646c7,#3c72ed); }

body[data-theme="dark"].copilot-mode .copilot-thread-rail { border-right-color: #293243; background: #111722; }
body[data-theme="dark"].copilot-mode .copilot-left-controls { border-right-color: #293243; background: #0f141d; }
body[data-theme="dark"].copilot-mode .copilot-thread-rail > header b,
body[data-theme="dark"].copilot-mode .copilot-thread-main b { color: #dce4ef; }
body[data-theme="dark"].copilot-mode .copilot-thread-rail > header small,
body[data-theme="dark"].copilot-mode .copilot-thread-main small,
body[data-theme="dark"].copilot-mode .copilot-thread-rail > footer { color: #7f8ca0; }
body[data-theme="dark"].copilot-mode .copilot-thread-rail > header button { border-color: #344054; color: #c5cfdd; background: #182231; }
body[data-theme="dark"].copilot-mode .copilot-thread-rail > header button:hover { border-color: #46556d; color: #fff; background: #202d40; }
body[data-theme="dark"].copilot-mode .copilot-thread-run-badge { color: #83a8f4; }
body[data-theme="dark"].copilot-mode .copilot-thread-row.is-running { border-color: #344b74; background: #172239; }
body[data-theme="dark"].copilot-mode .system-menu-toggle[aria-expanded="true"] { color: #aebff2; border-color: #4a5d86; background: #222d43; }
body[data-theme="dark"].copilot-mode .copilot-thread-create button,
body[data-theme="dark"].copilot-mode .copilot-thread-row.is-current,
body[data-theme="dark"].copilot-mode .copilot-thread-row:hover,
body[data-theme="dark"].copilot-mode .copilot-thread-actions,
body[data-theme="dark"].copilot-mode .copilot-thread-more { border-color: #303b4e; background: #192231; }
body[data-theme="dark"].copilot-mode .copilot-thread-rail > nav,
body[data-theme="dark"].copilot-mode .copilot-thread-rail > footer { border-color: #293243; }
body[data-theme="dark"].copilot-mode .copilot-thread-rail > nav button.is-active,
body[data-theme="dark"].copilot-mode .copilot-thread-icon { background: #202a39; }

@media (max-width: 1180px) {
  body.copilot-mode .copilot-thread-rail { width: 242px; min-width: 242px; }
  body.copilot-mode .copilot-thread-create button { font-size: 9px; }
  body.copilot-mode .copilot-header-tools { gap: 5px; }
  body.copilot-mode .copilot-header-action { padding-inline: 8px; }
}
@media (max-width: 960px) {
  body.copilot-mode .copilot-left-controls { width: 58px; min-width: 58px; flex-basis: 58px; align-items: center; padding-inline: 10px; }
  body.copilot-mode .copilot-left-controls .copilot-header-action { width: 38px; padding: 0; justify-content: center; font-size: 0; }
  body.copilot-mode .copilot-left-controls .copilot-header-action svg { width: 15px; height: 15px; }
  body.copilot-mode .copilot-thread-rail {
    position: fixed;
    z-index: 145;
    inset: 52px auto 0 0;
    width: min(86vw, 310px);
    min-width: min(86vw, 310px);
    box-shadow: 18px 0 48px rgba(20,30,48,.2);
    transform: translateX(0);
  }
  body.copilot-mode .copilot-thread-rail:not(.is-open) { width: min(86vw, 310px); min-width: min(86vw, 310px); transform: translateX(-105%); }
  body.copilot-mode #copilotThreadToggle,
  body.copilot-mode #copilotMultiAgent { width: 36px; padding: 0; font-size: 0; }
  body.copilot-mode #copilotThreadToggle svg,
  body.copilot-mode #copilotMultiAgent svg { width: 15px; height: 15px; }
}
@media (max-width: 850px) {
  body.copilot-mode #copilotSystemMenuToggle { display: none; }
}
@media (max-width: 560px) {
  body.copilot-mode .copilot-thread-rail { top: 48px; }
  body.copilot-mode .copilot-model-status { display: none; }
  body.copilot-mode .copilot-header-tools { justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  body.copilot-mode .copilot-thread-rail,
  body.copilot-mode .copilot-thread-actions { transition: none; }
}

/* 全站次级按钮：补齐浏览器默认黑框此前暴露出的缺失组件状态。 */
.secondary-button {
  appearance: none;
  position: relative;
  display: inline-flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid #cfd8e7;
  border-radius: 10px;
  outline: 0;
  color: #2b4f83;
  background: linear-gradient(180deg, #fff, #f7f9fc);
  box-shadow: 0 1px 2px rgba(18,38,72,.05), inset 0 1px 0 rgba(255,255,255,.85);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.secondary-button svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.secondary-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(.is-loading) {
  color: #245fc5;
  border-color: #aebfe0;
  background: #fff;
  box-shadow: 0 7px 18px rgba(32,72,135,.11);
  transform: translateY(-1px);
}
.secondary-button:focus-visible {
  border-color: #3472e8;
  box-shadow: 0 0 0 3px rgba(52,114,232,.18), 0 6px 16px rgba(32,72,135,.09);
}
.secondary-button:active:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(.is-loading) {
  background: #eef3fb;
  box-shadow: inset 0 1px 3px rgba(27,55,101,.12);
  transform: translateY(0) scale(.985);
}
.secondary-button:disabled,
.secondary-button[aria-disabled="true"] {
  color: #8c98aa;
  border-color: #dde3ec;
  background: #f4f6f9;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .68;
  transform: none;
}
.secondary-button[aria-busy="true"],
.secondary-button.is-loading {
  color: #64758d;
  border-color: #cbd6e6;
  background: #f7f9fc;
  box-shadow: none;
  cursor: wait;
  pointer-events: none;
}
.secondary-button[aria-busy="true"]::before,
.secondary-button.is-loading::before {
  width: 13px;
  height: 13px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: secondaryButtonSpin .7s linear infinite;
}
@keyframes secondaryButtonSpin { to { transform: rotate(360deg); } }

body[data-theme="dark"] .secondary-button {
  color: #c3d2e8;
  border-color: #3a4960;
  background: linear-gradient(180deg, #202b3d, #192231);
  box-shadow: 0 1px 2px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.035);
}
body[data-theme="dark"] .secondary-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(.is-loading) {
  color: #dbe8ff;
  border-color: #5872a0;
  background: #26344a;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
body[data-theme="dark"] .secondary-button:focus-visible { border-color: #7ba2f4; box-shadow: 0 0 0 3px rgba(90,137,234,.28); }
body[data-theme="dark"] .secondary-button:active:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(.is-loading) { background: #151e2c; }
body[data-theme="dark"] .secondary-button:disabled,
body[data-theme="dark"] .secondary-button[aria-disabled="true"],
body[data-theme="dark"] .secondary-button[aria-busy="true"],
body[data-theme="dark"] .secondary-button.is-loading { color: #738198; border-color: #303b4d; background: #151d2a; box-shadow: none; }

@media (max-width: 560px) {
  .secondary-button { min-height: 42px; padding-inline: 12px; white-space: normal; }
  :where(.material-plan-actions, .autopilot-command-actions) > .secondary-button { flex: 1 1 150px; }
}
@media (forced-colors: active) {
  .secondary-button { border: 1px solid ButtonText; box-shadow: none; }
  .secondary-button:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .secondary-button { transition: none; }
  .secondary-button:hover:not(:disabled):not([aria-disabled="true"]) { transform: none; }
  .secondary-button[aria-busy="true"]::before,
  .secondary-button.is-loading::before { animation: none; }
  body.copilot-mode .copilot-thread-run-badge i { animation: none; }
}

body[data-theme="dark"] .accounting-close-header,
body[data-theme="dark"] .accounting-close-steps,
body[data-theme="dark"] .accounting-precheck-panel,
body[data-theme="dark"] .accounting-report-panel,
body[data-theme="dark"] .accounting-run-history,
body[data-theme="dark"] .accounting-report-card { border-color:#2c3c54; background:#151e2b; box-shadow:none; }
body[data-theme="dark"] .accounting-close-header { background:linear-gradient(135deg,#151e2b,#182536); }
body[data-theme="dark"] .accounting-close-header h2,
body[data-theme="dark"] .accounting-close-steps b,
body[data-theme="dark"] .accounting-precheck-panel>header h3,
body[data-theme="dark"] .accounting-report-panel>header h3,
body[data-theme="dark"] .accounting-run-history>header h3,
body[data-theme="dark"] .accounting-close-metrics b,
body[data-theme="dark"] .accounting-report-card,
body[data-theme="dark"] .accounting-report-view>header h3,
body[data-theme="dark"] .accounting-detail-ledgers h4,
body[data-theme="dark"] .accounting-statement-section h4,
body[data-theme="dark"] .accounting-statement-summary b,
body[data-theme="dark"] .accounting-report-loading b { color:#e5edf8; }
body[data-theme="dark"] .accounting-close-header p,
body[data-theme="dark"] .accounting-close-steps small,
body[data-theme="dark"] .accounting-precheck-panel>header p,
body[data-theme="dark"] .accounting-report-panel>header p,
body[data-theme="dark"] .accounting-report-card small,
body[data-theme="dark"] .accounting-report-source,
body[data-theme="dark"] .accounting-close-safety { color:#9aabc2; }
body[data-theme="dark"] .accounting-period-control input,
body[data-theme="dark"] .accounting-close-metrics>span,
body[data-theme="dark"] .accounting-precheck-result,
body[data-theme="dark"] .accounting-statement-summary span { border-color:#2c3c54; color:#d9e4f2; background:#101721; }
body[data-theme="dark"] .accounting-close-steps li,
body[data-theme="dark"] .accounting-precheck-result>header,
body[data-theme="dark"] .accounting-precheck-result li,
body[data-theme="dark"] .accounting-run-history article,
body[data-theme="dark"] .accounting-report-view>header { border-color:#27364b; }
body[data-theme="dark"] .accounting-close-steps li.is-current,
body[data-theme="dark"] .accounting-detail-ledgers>section>header,
body[data-theme="dark"] .accounting-statement-section>header { background:#1a2738; }
body[data-theme="dark"] .accounting-report-table th,
body[data-theme="dark"] .voucher-lines-table th { color:#9bacc3; background:#111925; }
body[data-theme="dark"] .accounting-report-table td,
body[data-theme="dark"] .voucher-lines-table td { border-color:#27364b; color:#c9d6e7; }
body[data-theme="dark"] .accounting-detail-ledgers>section,
body[data-theme="dark"] .accounting-statement-section,
body[data-theme="dark"] .voucher-lines-table,
body[data-theme="dark"] .accounting-run-history>[data-accounting-runs] { border-color:#2c3c54; }

/* 采购退货：由采购申请与仓库审核分别完成，绝不把待审核单当作已出库。 */
.purchase-return-workspace { --purchase-return-accent:#b85b48; display:grid; gap:18px; max-width:1360px; margin:0 auto; padding:30px clamp(20px,3vw,46px) 48px; }
.purchase-return-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; padding:4px 2px; }
.purchase-return-hero small, .purchase-return-ledger>header small, .purchase-return-request header small { color:var(--purchase-return-accent); font-weight:800; letter-spacing:.04em; }
.purchase-return-hero h1 { margin:5px 0 8px; color:#17243a; font-size:clamp(28px,3vw,42px); line-height:1.14; letter-spacing:-.035em; }
.purchase-return-hero h1 em { color:#667b83; font-style:normal; font-weight:650; }
.purchase-return-hero p { max-width:760px; margin:0; color:#68788f; font-size:14px; line-height:1.8; }
.purchase-return-hero-actions { display:flex; flex:none; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
.purchase-return-flow { display:flex; align-items:center; gap:11px; min-height:64px; padding:12px 16px; border:1px solid #dbe4ef; border-radius:14px; color:#64758c; background:#fbfcfe; font-size:13px; font-weight:700; }
.purchase-return-flow span { flex:1 1 150px; padding:9px 11px; border-radius:9px; }
.purchase-return-flow span:nth-of-type(2) { color:#754236; background:#fff1ed; }
.purchase-return-flow i { width:16px; height:1px; flex:none; background:#c5d0df; }
.purchase-return-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:hidden; border:1px solid #e0e7f0; border-radius:16px; background:#fff; box-shadow:0 10px 28px rgba(25,48,76,.055); }
.purchase-return-kpis article { min-height:100px; padding:17px 19px; border-right:1px solid #e7edf4; }
.purchase-return-kpis article:last-child { border-right:0; }
.purchase-return-kpis small { display:block; color:#73839a; font-size:12px; font-weight:700; }
.purchase-return-kpis b { display:block; margin:3px 0; color:#1d2b40; font-size:29px; line-height:1.15; }
.purchase-return-kpis span { color:#8391a4; font-size:12px; }
.purchase-return-grid { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:18px; }
.purchase-return-request, .purchase-return-ledger { overflow:hidden; border:1px solid #dfe7f0; border-radius:17px; background:#fff; box-shadow:0 10px 28px rgba(25,48,76,.06); }
.purchase-return-request>header, .purchase-return-ledger>header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px 21px 17px; border-bottom:1px solid #e7edf4; }
.purchase-return-request h2, .purchase-return-ledger h2 { margin:4px 0 5px; color:#1b2940; font-size:19px; letter-spacing:-.02em; }
.purchase-return-request p, .purchase-return-ledger p { margin:0; color:#728199; font-size:13px; line-height:1.65; }
.purchase-return-lock { display:inline-flex; align-items:center; gap:6px; flex:none; padding:7px 9px; border-radius:999px; color:#85685d; background:#fff5f2; font-size:12px; font-weight:800; }
.purchase-return-lock svg, .purchase-return-empty svg, .purchase-return-review-readonly svg { width:15px; height:15px; }
.purchase-return-request form { display:grid; gap:16px; padding:20px 21px 21px; }
.purchase-return-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.purchase-return-request label { display:grid; gap:6px; color:#63738a; font-size:12px; font-weight:800; }
.purchase-return-request label span em { margin-left:4px; color:#b64e3d; font-style:normal; }
.purchase-return-request input, .purchase-return-request select, .purchase-return-request textarea, .purchase-return-review textarea { width:100%; min-height:42px; box-sizing:border-box; border:1px solid #cfdbe9; border-radius:9px; padding:10px 11px; color:#1d2b40; background:#fff; font:inherit; font-size:14px; font-weight:500; }
.purchase-return-request textarea, .purchase-return-review textarea { min-height:80px; resize:vertical; line-height:1.55; }
.purchase-return-request :is(input,select,textarea):focus-visible, .purchase-return-review textarea:focus-visible, .purchase-return-filters button:focus-visible { outline:3px solid rgba(184,91,72,.2); outline-offset:1px; border-color:var(--purchase-return-accent); }
.purchase-return-lines { display:grid; gap:8px; }
.purchase-return-lines>div { display:grid; gap:2px; }
.purchase-return-lines>div small { color:#8290a2; font-size:12px; line-height:1.55; }
.purchase-return-line { grid-template-columns:minmax(0,1fr) 115px; align-items:center; padding:11px; border:1px solid #e3eaf2; border-radius:10px; background:#fbfcfe; }
.purchase-return-line span { display:grid; gap:3px; min-width:0; }
.purchase-return-line b { overflow:hidden; color:#27364e; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.purchase-return-line small { color:#7a899d; font-size:11px; font-weight:500; line-height:1.45; }
.purchase-return-line input { min-height:38px; padding:7px 8px; }
.purchase-return-po-picker { min-width:0; margin:0; border:1px solid #dce5ef; border-radius:12px; padding:13px; background:#f8fafc; }
.purchase-return-po-picker legend { padding:0 6px; color:#2b3a51; font-size:13px; font-weight:800; }
.purchase-return-po-picker legend small { color:#7b899b; font-weight:600; }
.purchase-return-po-picker>div { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:8px; }
.purchase-return-po-choice { display:grid!important; grid-template-columns:18px minmax(0,1fr); align-items:center; gap:9px!important; min-height:52px; padding:9px 11px; border:1px solid #dfe7f1; border-radius:9px; background:#fff; cursor:pointer; }
.purchase-return-po-choice:has(input:checked) { border-color:#7896f2; background:#f1f5ff; box-shadow:0 0 0 2px rgba(76,112,223,.08); }
.purchase-return-po-choice input { width:16px!important; min-height:16px!important; margin:0; accent-color:#356fea; }
.purchase-return-po-choice span { display:grid; gap:2px; min-width:0; }
.purchase-return-po-choice b { overflow:hidden; color:#25354d; text-overflow:ellipsis; white-space:nowrap; }
.purchase-return-po-choice small, .purchase-return-source-empty { color:#7b899c; font-size:11px; font-weight:500; line-height:1.45; }
.purchase-return-source-empty { grid-column:1/-1; margin:0; padding:12px; border:1px dashed #cad7e6; border-radius:9px; background:#fff; }
.purchase-return-source-empty.is-large { padding:22px; text-align:center; }
.purchase-return-table-wrap { overflow:auto; border:1px solid #dfe7f0; border-radius:11px; }
.purchase-return-source-table { width:100%; min-width:850px; border-collapse:collapse; table-layout:fixed; }
.purchase-return-source-table th { padding:10px 12px; border-bottom:1px solid #dfe7f0; color:#6d7d92; background:#f5f8fb; font-size:11px; text-align:left; }
.purchase-return-source-table td { padding:11px 12px; border-bottom:1px solid #e8edf3; color:#33435a; font-size:12px; vertical-align:middle; }
.purchase-return-source-table tbody tr:last-child td { border-bottom:0; }
.purchase-return-source-table tbody tr:has([data-purchase-return-line-toggle]:checked) { background:#f5f8ff; }
.purchase-return-source-table th:first-child, .purchase-return-source-table td:first-child { width:48px; text-align:center; }
.purchase-return-source-table th:nth-child(2) { width:190px; }
.purchase-return-source-table th:nth-child(3) { width:150px; }
.purchase-return-source-table th:nth-child(4) { width:220px; }
.purchase-return-source-table th:nth-child(5), .purchase-return-source-table th:nth-child(6) { width:110px; }
.purchase-return-source-table td b, .purchase-return-source-table td small { display:block; }
.purchase-return-source-table td small { margin-top:3px; color:#8491a3; }
.purchase-return-source-table input[type="checkbox"] { width:17px; min-height:17px; margin:0; accent-color:#356fea; }
.purchase-return-source-table input[type="number"] { min-height:36px; padding:7px 8px; }
.purchase-return-source-table input:disabled { color:#9aa6b5; background:#eef2f6; cursor:not-allowed; }
.purchase-return-request footer { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#purchaseReturnRequestFeedback { flex:1; color:#9a5a45; font-size:12px; line-height:1.5; }
.purchase-return-ledger>header { align-items:center; }
.purchase-return-filters { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
.purchase-return-filters button { min-height:32px; border:1px solid transparent; border-radius:8px; padding:5px 8px; color:#748299; background:transparent; font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.purchase-return-filters button:hover, .purchase-return-filters button.is-active { color:#83402f; border-color:#f0d3ca; background:#fff3ef; }
.purchase-return-list { display:grid; gap:10px; padding:14px; }
.purchase-return-card { overflow:hidden; border:1px solid #dfe7f0; border-left:4px solid #c6d0dc; border-radius:12px; background:#fff; }
.purchase-return-card.is-pending { border-left-color:#d8913b; }
.purchase-return-card.is-approved { border-left-color:#21966e; }
.purchase-return-card.is-rejected { border-left-color:#ba6470; }
.purchase-return-card>header { display:flex; justify-content:space-between; gap:14px; padding:14px 15px 11px; border-bottom:1px solid #edf1f5; }
.purchase-return-card small { color:#7b899d; font-size:11px; }
.purchase-return-card h3 { margin:4px 0 3px; color:#26364c; font-size:15px; }
.purchase-return-card header p { color:#6d7d91; font-size:12px; }
.purchase-return-status { flex:none; align-self:flex-start; border-radius:999px; padding:5px 8px; color:#845036; background:#fff0e9; font-size:11px; font-weight:900; }
.is-approved .purchase-return-status { color:#227759; background:#eaf8f2; }
.is-rejected .purchase-return-status { color:#944b59; background:#fff0f2; }
.purchase-return-card-body { display:grid; gap:9px; padding:12px 15px; }
.purchase-return-card-body ul { display:grid; gap:5px; margin:0; padding:0; list-style:none; }
.purchase-return-card-body li { display:flex; justify-content:space-between; gap:12px; color:#596a80; font-size:12px; }
.purchase-return-card-body li b { color:#304158; }
.purchase-return-card-body a { width:max-content; color:#276de8; font-size:12px; font-weight:800; text-decoration:none; }
.purchase-return-review-meta { padding-top:8px; border-top:1px dashed #e0e6ee; color:#66788d !important; white-space:pre-line; }
.purchase-return-voucher { width:max-content; padding:7px 9px; border-radius:8px; color:#9d4c3d; background:#fff1ee; font-size:12px; font-weight:800; line-height:1.5; }
.purchase-return-review { display:grid; gap:10px; padding:13px 15px 15px; border-top:1px solid #e9eff5; background:#fffaf8; }
.purchase-return-review label { display:grid; gap:6px; color:#6c7180; font-size:12px; font-weight:800; }
.purchase-return-review>div { display:flex; justify-content:flex-end; gap:8px; }
.purchase-return-review-readonly { display:flex; align-items:center; gap:7px; padding:11px 15px; border-top:1px solid #e9eff5; color:#738198; background:#fbfcfe; font-size:12px; line-height:1.5; }
.purchase-return-empty { display:grid; justify-items:center; gap:8px; min-height:170px; align-content:center; padding:22px; color:#6f7f94; text-align:center; }
.purchase-return-empty b { color:#35465d; }
.purchase-return-empty small { max-width:420px; line-height:1.55; }
.purchase-return-empty.is-error { color:#a85c4e; background:#fffaf9; }
body[data-theme="dark"] .purchase-return-hero h1, body[data-theme="dark"] .purchase-return-request h2, body[data-theme="dark"] .purchase-return-ledger h2, body[data-theme="dark"] .purchase-return-kpis b, body[data-theme="dark"] .purchase-return-card h3, body[data-theme="dark"] .purchase-return-card-body li b, body[data-theme="dark"] .purchase-return-empty b { color:#e1eafa; }
body[data-theme="dark"] :is(.purchase-return-flow,.purchase-return-kpis,.purchase-return-request,.purchase-return-ledger,.purchase-return-card) { border-color:#2d3d54; background:#151f2d; box-shadow:none; }
body[data-theme="dark"] .purchase-return-flow span:nth-of-type(2), body[data-theme="dark"] .purchase-return-filters button:hover, body[data-theme="dark"] .purchase-return-filters button.is-active { color:#f0b4a4; border-color:#70473d; background:#33231f; }
body[data-theme="dark"] :is(.purchase-return-request>header,.purchase-return-ledger>header,.purchase-return-card>header,.purchase-return-review,.purchase-return-review-readonly) { border-color:#2d3d54; background:#192535; }
body[data-theme="dark"] :is(.purchase-return-request input,.purchase-return-request select,.purchase-return-request textarea,.purchase-return-review textarea,.purchase-return-line) { border-color:#35475f; color:#dbe6f4; background:#101824; }
body[data-theme="dark"] :is(.purchase-return-po-picker,.purchase-return-po-choice,.purchase-return-source-empty,.purchase-return-table-wrap) { border-color:#35475f; background:#101824; }
body[data-theme="dark"] .purchase-return-source-table th { border-color:#35475f; color:#9fb0c5; background:#192535; }
body[data-theme="dark"] .purchase-return-source-table td { border-color:#2d3d54; color:#c3d0e0; }
body[data-theme="dark"] .purchase-return-po-choice b { color:#dbe6f4; }
body[data-theme="dark"] .purchase-return-line b, body[data-theme="dark"] .purchase-return-card-body li { color:#b8c6d8; }
body[data-theme="dark"] .purchase-return-empty.is-error { background:#2b1d20; }
@media (max-width:1040px) { .purchase-return-grid { grid-template-columns:1fr; } }
@media (max-width:700px) { .purchase-return-workspace { gap:14px; padding:22px 14px 38px; } .purchase-return-hero { align-items:flex-start; flex-direction:column; } .purchase-return-hero-actions { justify-content:flex-start; } .purchase-return-flow { align-items:stretch; flex-direction:column; } .purchase-return-flow i { width:1px; height:8px; margin-left:14px; } .purchase-return-kpis { grid-template-columns:1fr; } .purchase-return-kpis article { min-height:auto; border-right:0; border-bottom:1px solid #e7edf4; } .purchase-return-kpis article:last-child { border-bottom:0; } .purchase-return-form-grid { grid-template-columns:1fr; } .purchase-return-ledger>header { align-items:flex-start; flex-direction:column; } .purchase-return-filters { justify-content:flex-start; } }
@media (max-width:440px) { .purchase-return-request>header, .purchase-return-ledger>header, .purchase-return-request form { padding-inline:15px; } .purchase-return-line { grid-template-columns:1fr; } .purchase-return-request footer, .purchase-return-review>div { align-items:stretch; flex-direction:column; } .purchase-return-request footer .primary-button, .purchase-return-review>div button { width:100%; } .purchase-return-card>header { align-items:flex-start; flex-direction:column; } }

.purchase-return-settlement { display:grid; gap:12px; margin:0 14px 14px; padding:14px; border:1px solid #dbe5ef; border-radius:12px; background:#f8fbfe; }
.purchase-return-settlement>header, .purchase-return-credit>header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.purchase-return-settlement>header small, .purchase-return-credit>header small { display:block; color:#637a96; font-size:10px; font-weight:850; }
.purchase-return-settlement>header b, .purchase-return-credit>header b { display:block; margin-top:3px; color:#273b55; font-size:13px; }
.purchase-return-settlement>header span, .purchase-return-credit>header>span { flex:none; border-radius:999px; padding:5px 8px; color:#6b5b33; background:#fff3d9; font-size:10px; font-weight:800; }
.purchase-return-settlement.is-waiting p { margin:0; color:#728199; font-size:11px; line-height:1.6; }
.purchase-return-settlement-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.purchase-return-settlement label, .purchase-return-refund-form label { display:grid; gap:5px; color:#64758b; font-size:11px; font-weight:800; }
.purchase-return-settlement :is(input,select,textarea), .purchase-return-refund-form :is(input,select,textarea) { width:100%; min-height:40px; box-sizing:border-box; border:1px solid #cdd9e7; border-radius:9px; padding:9px 10px; color:#1e3048; background:#fff; font:inherit; font-size:12px; }
.purchase-return-settlement :is(input,select,textarea):focus-visible, .purchase-return-refund-form :is(input,select,textarea):focus-visible { outline:3px solid rgba(184,91,72,.2); outline-offset:1px; border-color:var(--purchase-return-accent); }
.purchase-return-settlement footer, .purchase-return-refund-form footer { display:flex; align-items:center; justify-content:space-between; gap:10px; grid-column:1/-1; }
.purchase-return-settlement footer [role="status"], .purchase-return-refund-form footer [role="status"] { color:#915548; font-size:10px; line-height:1.45; }
.purchase-return-credit { display:grid; gap:10px; padding:12px; border:1px solid #e1e8f0; border-radius:10px; background:#fff; }
.purchase-return-credit>a, .purchase-return-refund>a { width:max-content; color:#286dda; font-size:10px; font-weight:800; text-decoration:none; }
.purchase-return-settlement-review { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:end; gap:8px; padding-top:10px; border-top:1px dashed #dbe4ef; }
.purchase-return-settlement-review textarea { min-height:58px; resize:vertical; }
.purchase-return-refund { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; padding:10px; border-radius:9px; background:#f5f8fc; }
.purchase-return-refund>div:first-child { display:grid; gap:3px; }
.purchase-return-refund small, .purchase-return-refund span { color:#74849a; font-size:10px; }
.purchase-return-refund b { color:#29415e; font-size:11px; }
.purchase-return-refund .purchase-return-settlement-review { grid-column:1/-1; }
.purchase-return-refund-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:12px; border-top:1px solid #e1e8f0; }
body[data-theme="dark"] :is(.purchase-return-settlement,.purchase-return-credit,.purchase-return-refund) { border-color:#304159; background:#182435; }
body[data-theme="dark"] :is(.purchase-return-settlement>header b,.purchase-return-credit>header b,.purchase-return-refund b) { color:#dfe8f5; }
body[data-theme="dark"] :is(.purchase-return-settlement input,.purchase-return-settlement select,.purchase-return-settlement textarea,.purchase-return-refund-form input,.purchase-return-refund-form select,.purchase-return-refund-form textarea) { border-color:#3a4d67; color:#dce7f5; background:#101824; }
@media (max-width:700px) { .purchase-return-settlement-grid, .purchase-return-refund-form { grid-template-columns:1fr; } .purchase-return-settlement-review { grid-template-columns:1fr; } .purchase-return-settlement-review button { width:100%; } }

/* 会计控制面：异常只读，反向动作按申请/复核/执行拆开。 */
body[data-theme="dark"] .accounting-account-config-form :is(input,select){border-color:#40516a;color:#dbe6f5;background:#101824}
@media(max-width:600px){.accounting-account-config-form{grid-template-columns:1fr}.accounting-account-config-form button{width:100%}}
.accounting-account-config-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.accounting-account-config-form label{display:grid;gap:5px;color:#61738c;font-size:11px;font-weight:800}.accounting-account-config-form :is(input,select){min-height:40px;width:100%;box-sizing:border-box;border:1px solid #ccd9e8;border-radius:8px;padding:8px;color:#21334d;background:#fff;font:inherit;font-size:12px}.accounting-account-config-form :is(input,select):focus-visible{outline:3px solid rgba(46,95,145,.22);outline-offset:1px;border-color:#2e5f91}.accounting-account-config-form .accounting-account-cash{display:flex;align-items:center;gap:8px;min-height:40px}.accounting-account-config-form .accounting-account-cash input{width:16px;min-height:16px;accent-color:#2e5f91}.accounting-account-config-form button{grid-column:1/-1;justify-self:end;min-height:42px}
.accounting-control-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.accounting-control-panel{display:grid;align-content:start;gap:0;min-width:0;border:1px solid #dce5f0;border-radius:15px;overflow:hidden;background:#fff;box-shadow:0 8px 22px rgba(25,48,76,.05)}.accounting-control-panel>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid #e5ebf2}.accounting-control-panel>header small{color:#2e5f91;font-size:10px;font-weight:850}.accounting-control-panel>header h3{margin:4px 0;color:#1e314b;font-size:16px}.accounting-control-panel>header p{margin:0;color:#728298;font-size:11px;line-height:1.55}.accounting-control-panel>header .secondary-button{flex:none;min-height:34px;padding:6px 9px;font-size:11px}.accounting-control-empty{margin:0;padding:25px 16px;color:#77869a;font-size:12px;line-height:1.6;text-align:center}.accounting-readonly-chip{flex:none;border-radius:999px;padding:6px 8px;color:#63748b;background:#edf2f7;font-size:10px;font-weight:800}.accounting-exception-row{display:grid;grid-template-columns:25px minmax(0,1fr) auto;gap:9px;padding:13px 15px;border-bottom:1px solid #e9eef4}.accounting-exception-row:last-child{border-bottom:0}.accounting-exception-row>span{display:grid;width:24px;height:24px;place-items:center;border-radius:8px;color:#ac4d3e;background:#fff0ed}.accounting-exception-row svg{width:14px;height:14px}.accounting-exception-row b,.accounting-exception-row p,.accounting-exception-row small{display:block}.accounting-exception-row b{color:#38465b;font-size:11px}.accounting-exception-row p{margin:4px 0;color:#9d5143;font-size:11px;line-height:1.45}.accounting-exception-row small{color:#77869a;font-size:10px;line-height:1.5}.accounting-exception-row em{color:#8b98aa;font-size:10px;font-style:normal;white-space:nowrap}.accounting-reversal-row{padding:13px 15px;border-bottom:1px solid #e9eef4}.accounting-reversal-row:last-child{border-bottom:0}.accounting-reversal-row>header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.accounting-reversal-row header small,.accounting-reversal-row header b,.accounting-reversal-row header p{display:block}.accounting-reversal-row header small{color:#617f9f;font-size:10px;font-weight:800}.accounting-reversal-row header b{margin-top:3px;color:#2c3d55;font-size:12px}.accounting-reversal-row header p{margin:3px 0 0;color:#718095;font-size:10px;line-height:1.45}.accounting-reversal-row>header>em{flex:none;border-radius:999px;padding:5px 7px;color:#8a6522;background:#fff3db;font-size:9px;font-style:normal;font-weight:800}.accounting-reversal-row>header>em.is-approved{color:#2b6c8d;background:#e9f5fb}.accounting-reversal-row>header>em.is-executed{color:#16735b;background:#e7f6ef}.accounting-reversal-row>header>em.is-rejected{color:#a24655;background:#fdeef0}.accounting-reversal-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.accounting-reversal-links span{display:grid;gap:2px;min-width:100px;padding:6px 7px;border:1px solid #e1e8f0;border-radius:8px;background:#f8fafc}.accounting-reversal-links small{color:#7b8a9d;font-size:9px}.accounting-reversal-links b{color:#33527a;font-size:10px;word-break:break-all}.accounting-reversal-note{margin:8px 0 0;color:#62748b;font-size:10px;line-height:1.5}.accounting-reversal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.accounting-reversal-actions button{min-height:34px;padding:6px 9px;font-size:10px}.accounting-account-tree{display:grid;gap:4px;margin:0;padding:12px 14px 15px;list-style:none}.accounting-account-tree ul{display:grid;gap:4px;margin:4px 0 0;padding-left:12px;list-style:none}.accounting-account-tree li>div{display:grid;grid-template-columns:72px minmax(0,1fr);gap:3px 8px;align-items:center;padding:7px 8px;border-radius:8px;background:#f8fafc}.accounting-account-tree li[data-level="2"]>div{background:#f3f7fc}.accounting-account-tree li[data-level="3"]>div{background:#edf5ff}.accounting-account-tree li b{color:#356497;font-size:10px}.accounting-account-tree li span{min-width:0;color:#2e4058;font-size:11px;font-weight:750}.accounting-account-tree li small{grid-column:1/-1;overflow:hidden;color:#8290a2;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.accounting-voucher-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px;padding:10px;border:1px solid #dae4ef;border-radius:11px;background:#f8fbfe}.accounting-voucher-controls p{display:flex;align-items:flex-start;gap:6px;margin:0;color:#66778f;font-size:10px;line-height:1.55}.accounting-voucher-controls p svg{width:14px;height:14px;flex:none;color:#8c5e27}.accounting-multiline-editor{display:grid;gap:13px}.accounting-multiline-editor>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.accounting-multiline-editor>header small{color:#2e5f91;font-size:10px;font-weight:850}.accounting-multiline-editor>header h3{margin:4px 0;color:#1b2d45;font-size:20px}.accounting-multiline-editor>header p{margin:0;color:#6f7f94;font-size:11px;line-height:1.55}.accounting-multiline-editor>header>span{flex:none;border-radius:999px;padding:7px 9px;color:#a64d3e;background:#fff0ed;font-size:10px;font-weight:800}.accounting-multiline-editor>header>span.is-valid{color:#17745b;background:#e7f6ef}.accounting-multiline-editor>label{display:grid;gap:5px;color:#62738b;font-size:11px;font-weight:800}.accounting-multiline-editor>label input,.accounting-edit-table input{width:100%;box-sizing:border-box;border:1px solid #ccd9e8;border-radius:8px;padding:9px;color:#21334d;background:#fff;font:inherit;font-size:12px}.accounting-multiline-editor input:focus-visible,.accounting-voucher-controls button:focus-visible,.accounting-control-panel button:focus-visible{outline:3px solid rgba(46,95,145,.22);outline-offset:1px;border-color:#2e5f91}.accounting-edit-table{overflow:auto;border:1px solid #dce5ef;border-radius:11px}.accounting-edit-table table{width:100%;min-width:640px;border-collapse:collapse}.accounting-edit-table th,.accounting-edit-table td{padding:8px;border-bottom:1px solid #e6ecf3;color:#43546b;font-size:10px;text-align:left}.accounting-edit-table th{background:#f5f8fc;color:#66798f;font-weight:850}.accounting-edit-table tr:last-child td{border-bottom:0}.accounting-multiline-editor footer{display:flex;justify-content:space-between;gap:10px}.accounting-multiline-editor footer button{min-height:39px}.accounting-multiline-editor footer .secondary-button{font-size:11px}
body[data-theme="dark"] :is(.accounting-control-panel,.accounting-control-panel>header,.accounting-reversal-links span,.accounting-account-tree li>div,.accounting-voucher-controls,.accounting-edit-table th){border-color:#2d3d54;background:#151f2d}body[data-theme="dark"] :is(.accounting-control-panel h3,.accounting-exception-row b,.accounting-reversal-row header b,.accounting-account-tree li span,.accounting-multiline-editor>header h3){color:#e2eaf7}body[data-theme="dark"] :is(.accounting-exception-row,.accounting-reversal-row,.accounting-edit-table,.accounting-edit-table th,.accounting-edit-table td){border-color:#2d3d54}body[data-theme="dark"] :is(.accounting-multiline-editor>label input,.accounting-edit-table input){border-color:#40516a;color:#dbe6f5;background:#101824}body[data-theme="dark"] .accounting-voucher-controls{background:#192535}
@media(max-width:1120px){.accounting-control-grid{grid-template-columns:1fr 1fr}.accounting-accounts-panel{grid-column:1/-1}}@media(max-width:600px){.accounting-control-grid{grid-template-columns:1fr}.accounting-accounts-panel{grid-column:auto}.accounting-control-panel>header,.accounting-multiline-editor>header{flex-direction:column}.accounting-reversal-actions,.accounting-multiline-editor footer{align-items:stretch;flex-direction:column}.accounting-reversal-actions button,.accounting-multiline-editor footer button{width:100%}.accounting-exception-row{grid-template-columns:25px minmax(0,1fr)}.accounting-exception-row em{grid-column:2}.accounting-account-tree li>div{grid-template-columns:62px minmax(0,1fr)}}

.accounting-exception-row>[data-accounting-exception-retry]{grid-column:2/-1;justify-self:end;min-height:32px;padding:6px 10px;font-size:10px}
.accounting-exception-manual{grid-column:2/-1;justify-self:end;border-radius:999px;padding:5px 8px;color:#7b5a22;background:#fff3d8;font-size:10px;font-weight:800}

/* v32 · Design engineering button system
   高频企业操作保持克制：清楚的层级、100–160ms 反馈、原生语义和完整状态。 */
:root {
  --button-ease-out: cubic-bezier(.23, 1, .32, 1);
  --button-duration: 140ms;
  --button-radius: 10px;
  --button-focus-color: color-mix(in srgb, var(--ui-accent, #2f6ff2) 70%, #fff);
  --button-focus-ring: 0 0 0 3px color-mix(in srgb, var(--ui-accent, #2f6ff2) 20%, transparent);
  --button-surface-shadow: 0 1px 2px rgba(18,38,72,.06), 0 5px 14px rgba(32,72,135,.07);
  --button-surface-shadow-hover: 0 2px 4px rgba(18,38,72,.07), 0 9px 22px rgba(32,72,135,.12);
}

:where(button, a.primary-button, a.secondary-button, a.ghost-button) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* 大面积卡片只做轻微按压，其余原生按钮使用更清楚的 0.97 反馈。 */
:where(.module-card, .system-management-card, .procurement-workspace-card, .warehouse-workspace-card, .finance-workspace-card, .sales-workspace-card, .table-row, .sales-chart-row, .sig-row-button, .member-entry-options > button) {
  --button-press-scale: .99;
}
button:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not([draggable="true"]):active {
  transform: scale(var(--button-press-scale, .97));
  transition-duration: 100ms;
}

/* 主要、次要、幽灵、创建、危险和图标动作共享同一反馈节奏。 */
:is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action) {
  appearance: none;
  border-radius: var(--button-radius);
  font-weight: 700;
  transition-property: color, background-color, border-color, box-shadow, filter, opacity, transform;
  transition-duration: var(--button-duration);
  transition-timing-function: var(--button-ease-out);
}

.primary-button {
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--ui-accent, #2f6ff2) 78%, #173b79);
  color: #fff;
  background-color: var(--ui-accent, #2f6ff2);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ui-accent, #2f6ff2) 90%, #fff), var(--ui-accent, #2f6ff2));
  background-image: linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.055)) !important;
  box-shadow: 0 1px 2px rgba(22,52,105,.18), 0 7px 16px color-mix(in srgb, var(--ui-accent, #2f6ff2) 20%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
}
.secondary-button,
.ghost-button {
  border: 1px solid #ccd7e7;
  color: #31537f;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: var(--button-surface-shadow), inset 0 1px 0 rgba(255,255,255,.9);
}
.ghost-button { color: #4c5f78; border-color: #d8e0eb; background: rgba(255,255,255,.88); }
.create-button {
  border: 1px solid #172641;
  background: linear-gradient(180deg, #1d3154, #111c33);
  box-shadow: 0 1px 2px rgba(12,22,42,.2), 0 7px 16px rgba(17,28,51,.18), inset 0 1px 0 rgba(255,255,255,.12);
}
.danger-button,
.record-lifecycle-panel button {
  border-color: #bd3949 !important;
  background: linear-gradient(180deg, #d95362, #c63e4e) !important;
  box-shadow: 0 1px 2px rgba(92,18,31,.18), 0 7px 16px rgba(198,62,78,.16), inset 0 1px 0 rgba(255,255,255,.17);
}
.icon-button,
.search-icon-button,
.company-switch,
.filter-button,
.copilot-header-action {
  border-color: #d7dfeb;
  background-color: rgba(255,255,255,.94);
  box-shadow: 0 1px 2px rgba(18,38,72,.045);
}
body.copilot-mode .copilot-header-action {
  border-radius: var(--button-radius);
  transition-property: color, background-color, border-color, box-shadow, filter, opacity, transform;
  transition-duration: var(--button-duration);
  transition-timing-function: var(--button-ease-out);
}

/* 先清除旧的悬停位移，再仅在真实鼠标设备上恢复，避免触屏粘住 hover。 */
:is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action):hover {
  transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .primary-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
  .create-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
  .danger-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
    filter: brightness(1.045);
    box-shadow: 0 2px 4px rgba(22,52,105,.16), 0 10px 22px color-mix(in srgb, var(--ui-accent, #2f6ff2) 24%, transparent), inset 0 1px 0 rgba(255,255,255,.2);
    transform: translateY(-1px);
  }
  .secondary-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(.is-loading),
  .ghost-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
  .icon-button:hover:not(:disabled),
  .search-icon-button:hover:not(:disabled),
  .company-switch:hover:not(:disabled),
  .filter-button:hover:not(:disabled),
  .copilot-header-action:hover:not(:disabled) {
    color: var(--ui-accent, #2f6ff2);
    border-color: color-mix(in srgb, var(--ui-accent, #2f6ff2) 34%, #cfd9e8);
    background-color: #fff;
    box-shadow: var(--button-surface-shadow-hover);
    transform: translateY(-1px);
  }
}

/* 触屏与粗指针不继承旧选择器中的 hover 位移，避免点击后按钮“悬住”。 */
@media (hover: none), (pointer: coarse) {
  .primary-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
  .secondary-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(.is-loading),
  .ghost-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
  .create-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
  .danger-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
  body.copilot-mode .copilot-header-action:hover:not(:disabled) {
    filter: none;
    transform: none;
  }
}

:is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action):active:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(.is-loading) {
  filter: brightness(.97);
  box-shadow: inset 0 1px 3px rgba(18,38,72,.18);
  transform: scale(.97);
}

body button:focus-visible,
body a.primary-button:focus-visible,
body a.secondary-button:focus-visible,
body a.ghost-button:focus-visible {
  border-color: var(--button-focus-color);
  outline: 2px solid var(--button-focus-color) !important;
  outline-offset: 2px;
  box-shadow: var(--button-focus-ring), var(--button-surface-shadow);
}

:is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action):is(:disabled, [aria-disabled="true"]) {
  color: #8b97a8;
  border-color: #dce2ea;
  background: #f2f4f7;
  box-shadow: none;
  filter: none;
  opacity: .66;
  cursor: not-allowed;
  transform: none;
}
:is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action):is([aria-busy="true"], .is-loading) {
  box-shadow: none;
  filter: saturate(.72);
  opacity: .78;
  cursor: progress;
  transform: none;
}

body[data-theme="dark"] :is(.secondary-button, .ghost-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .copilot-header-action) {
  color: #c6d3e6;
  border-color: #394860;
  background: linear-gradient(180deg, #202b3c, #182231);
  box-shadow: 0 1px 2px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.035);
}
body[data-theme="dark"] :is(.primary-button, .create-button) { border-color: color-mix(in srgb, var(--ui-accent, #4e82ec) 70%, #0b1424); }

@media (max-width: 560px) {
  :is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button) { min-height: 42px; }
  :is(.icon-button, .search-icon-button, .company-switch, .app-launcher-button, .workspace-pin, .top-avatar, .journey-dock-hide) { min-width: 40px; min-height: 40px; }
  body #journeyDock .journey-dock-go { min-height: 40px; }
  body main .accounting-control-panel .secondary-button { min-height: 42px; }
}
@media (forced-colors: active) {
  :is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action) {
    border: 1px solid ButtonText !important;
    color: ButtonText;
    background: ButtonFace;
    box-shadow: none;
  }
  body button:focus-visible { outline-color: Highlight !important; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action),
  button:not([draggable="true"]) {
    transition-duration: 0ms;
  }
  button:not([draggable="true"]):active,
  :is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action):hover {
    transform: none;
  }
}

/* v35 · Final accessibility precedence
   Keep critical states readable after the shared button skin later in the cascade. */
body #journeyDock :is(.journey-dock-go, .journey-dock-open) { min-height: 40px; }
body #journeyDock .journey-dock-hide { width: 36px; height: 36px; }
body .workspace-pin { min-width: 38px; min-height: 38px; }
body :is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action):is(:disabled, [aria-disabled="true"]) {
  color: #738196;
  border-color: #d4dce7;
  background: #eef1f5;
  opacity: .78;
}
body[data-theme="dark"] :is(.primary-button, .secondary-button, .ghost-button, .create-button, .danger-button, .icon-button, .search-icon-button, .company-switch, .filter-button, .journey-dock-go, .copilot-header-action):is(:disabled, [aria-disabled="true"]) {
  color: #91a1b7;
  border-color: #36455a;
  background: #1c2736;
}

/* v37 · Form action contrast correction
   The primary action keeps a dark enough fill beneath white text; translucent highlights
   must never wash the control back into the surrounding white surface. */
.primary-button:not(.danger-button) {
  background-color: color-mix(in srgb, var(--ui-accent, #2f6ff2) 76%, #000);
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, var(--ui-accent, #2f6ff2) 82%, #000),
    color-mix(in srgb, var(--ui-accent, #2f6ff2) 70%, #000)
  ) !important;
}
.primary-button:is(:disabled, [aria-disabled="true"]) {
  color: #526176 !important;
  border-color: #c9d3df !important;
  background-color: #e6ebf2 !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
}
.primary-button:is(:disabled, [aria-disabled="true"]) :is(span, svg) {
  color: inherit;
}
body[data-theme="dark"] .primary-button:is(:disabled, [aria-disabled="true"]) {
  color: #aab8ca !important;
  border-color: #425168 !important;
  background-color: #202b3a !important;
}

body[data-theme="dark"] #view-orders .modern-table.order-ledger-table,
body[data-theme="dark"] #view-orders .order-ledger-row { background: #131a26; }
body[data-theme="dark"] #view-orders .order-ledger-row:hover { background: #182234; }
body[data-theme="dark"] #view-orders .order-ledger-row.is-cancelled { background: #1d181b; }
body[data-theme="dark"] #view-orders .order-ledger-row.is-expanded,
body[data-theme="dark"] #view-orders .order-ledger-detail { background: #151e2d; }
body[data-theme="dark"] #view-orders .order-ledger-table .table-head { color: #8090aa; background: #101721; }
body[data-theme="dark"] #view-orders .order-ledger-open small,
body[data-theme="dark"] #view-orders .order-ledger-party small,
body[data-theme="dark"] #view-orders .order-ledger-delivery small,
body[data-theme="dark"] #view-orders .order-ledger-amount small { color: #8391a8; }
body[data-theme="dark"] #view-orders .order-row-toggle[aria-expanded="true"] { border-color: #47658f; color: #9cc0ff; background: #1d2c45; }
body[data-theme="dark"] #view-orders .order-ledger-detail { border-bottom-color: #2b384c; }
body[data-theme="dark"] #view-orders .order-ledger-detail-inner { border-left-color: #4a82da; background: #131a26; box-shadow: 0 8px 20px rgba(0,0,0,.16); }
body[data-theme="dark"] #view-orders .order-ledger-detail-inner > header,
body[data-theme="dark"] #view-orders .order-ledger-line { border-color: #283548; }
body[data-theme="dark"] #view-orders .order-ledger-detail-inner > header b,
body[data-theme="dark"] #view-orders .order-ledger-detail-inner dd,
body[data-theme="dark"] #view-orders .order-ledger-line { color: #d4deed; }
body[data-theme="dark"] #view-orders .order-ledger-detail-inner > header small,
body[data-theme="dark"] #view-orders .order-ledger-detail-inner dt,
body[data-theme="dark"] #view-orders .order-ledger-line-head,
body[data-theme="dark"] #view-orders .order-ledger-line small { color: #7f8fa8; }
body[data-theme="dark"] #view-orders .order-row-action { border-color: #34435a; color: #c6d0df; background: #182233; }
body[data-theme="dark"] #view-orders .order-row-action:hover { border-color: #5e7fb6; color: #aecaef; background: #1d2b43; }
body[data-theme="dark"] #view-orders .order-row-action.is-review { border-color: #315e4d; color: #91d2b7; background: #14261f; }
body[data-theme="dark"] #view-orders .order-row-action.is-danger { border-color: #6b3c45; color: #e2a3ad; background: #28191d; }
body[data-theme="dark"] #view-orders .order-row-action.is-blocked,
body[data-theme="dark"] .purchase-ledger-action.is-blocked,
body[data-theme="dark"] .split-ledger-row .split-ledger-unreview.is-blocked { border-color: #465166; color: #8996aa; background: #18212f; }
body[data-theme="dark"] .purchase-ledger-table,
body[data-theme="dark"] .purchase-ledger-row { color: #ced7e6; background: #131a26; }
body[data-theme="dark"] .purchase-ledger-head { border-color: #2c3749; color: #8090aa; background: #101721; }
body[data-theme="dark"] .purchase-ledger-row { border-color: #293548; }
body[data-theme="dark"] .purchase-ledger-row:hover { background: #182234; }
body[data-theme="dark"] .purchase-ledger-row.is-cancelled { background: #1d181b; }
body[data-theme="dark"] .purchase-ledger-supplier b,
body[data-theme="dark"] .purchase-ledger-eta b,
body[data-theme="dark"] .purchase-ledger-amount b { color: #d7dfeb; }
body[data-theme="dark"] .purchase-ledger-action { border-color: #34435a; color: #c6d0df; background: #182233; }
body[data-theme="dark"] .purchase-ledger-action:hover { border-color: #5e7fb6; color: #aecaef; background: #1d2b43; }
body[data-theme="dark"] .purchase-ledger-action.is-review { border-color: #315e4d; color: #91d2b7; background: #14261f; }
body[data-theme="dark"] .purchase-ledger-action.is-danger { border-color: #6b3c45; color: #e2a3ad; background: #28191d; }
body[data-theme="dark"] .purchase-ledger-system-note { color: #7f8ca0; }

/* 全站正式列表的行内展开。只改变只读信息层级，不接管任何业务动作。 */
.ledger-row-expand {
  display: inline-grid;
  flex: none;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid #ccd8e8;
  border-radius: 9px;
  color: #50627c;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}
.ledger-row-expand:hover { border-color: #9db4d9; color: #2767d8; background: #f3f7ff; }
.ledger-row-expand:focus-visible { outline: 3px solid rgba(47, 111, 237, .22); outline-offset: 2px; }
.ledger-row-expand svg { width: 14px; height: 14px; transition: transform 180ms ease; }
.ledger-row-expand[aria-expanded="true"] { border-color: #9db4d9; color: #2767d8; background: #edf4ff; }
.ledger-row-expand[aria-expanded="true"] svg { transform: rotate(90deg); }
.record-row-actions .ledger-row-expand { margin-left: 1px; }
.sig-row-shell > .ledger-inline-detail { grid-column: 1 / -1; }
.sig-row-shell.is-expanded > .sig-row { background: #f8faff !important; }

.ledger-inline-detail {
  min-width: 0;
  padding: 0 14px 14px;
  background: #f7faff;
  animation: ledger-inline-reveal 180ms ease-out;
}
.ledger-inline-detail[hidden] { display: none !important; }
.ledger-inline-detail-inner {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce5f2;
  border-left: 3px solid var(--module-accent, #3477e8);
  border-radius: 0 0 10px 10px;
  background: #fff;
}
.ledger-inline-detail-inner > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 15px 11px;
  border-bottom: 1px solid #e6ebf2;
}
.ledger-inline-detail-inner > header > div { min-width: 0; }
.ledger-inline-detail-inner > header small { display: block; color: #718199; font-size: 9px; font-weight: 750; }
.ledger-inline-detail-inner > header b { display: block; margin-top: 3px; color: #26364e; font-size: 13px; }
.ledger-inline-detail-inner > header p { overflow: hidden; margin: 4px 0 0; color: #68788f; font-size: 10px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.ledger-inline-detail-inner > header > em { flex: none; padding: 5px 8px; border-radius: 999px; color: #315e9c; background: #edf4ff; font-size: 9px; font-style: normal; font-weight: 750; }
.ledger-inline-detail-inner > dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid #e7ecf3;
  background: #fbfcfe;
}
.ledger-inline-detail-inner > dl > div { min-width: 0; padding: 10px 14px; border-right: 1px solid #e9edf3; }
.ledger-inline-detail-inner > dl > div:last-child { border-right: 0; }
.ledger-inline-detail-inner dt { color: #8895a8; font-size: 8.5px; }
.ledger-inline-detail-inner dd { overflow: hidden; margin: 3px 0 0; color: #3a4b63; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.ledger-inline-lines { display: grid; }
.ledger-inline-line {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.15fr) minmax(90px, auto);
  align-items: center;
  gap: 16px;
  min-height: 54px;
  padding: 9px 15px;
  border-bottom: 1px solid #edf0f5;
}
.ledger-inline-line:last-child { border-bottom: 0; }
.ledger-inline-line-title { min-width: 0; }
.ledger-inline-line-title b { display: block; overflow: hidden; color: #2c3d55; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.ledger-inline-line-title small { display: block; overflow: hidden; margin-top: 3px; color: #8290a3; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.ledger-inline-line-metrics { display: grid; grid-template-columns: repeat(3, minmax(62px, 1fr)); gap: 12px; }
.ledger-inline-line-metrics > span { min-width: 0; }
.ledger-inline-line-metrics small { display: block; color: #8a96a8; font-size: 8px; }
.ledger-inline-line-metrics b { display: block; overflow: hidden; margin-top: 3px; color: #40516a; font-size: 9.5px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.ledger-inline-line > em { justify-self: end; padding: 4px 7px; border-radius: 999px; color: #256e56; background: #eaf7f1; font-size: 8.5px; font-style: normal; font-weight: 750; white-space: nowrap; }
.ledger-inline-empty { display: flex; align-items: center; gap: 10px; padding: 15px; color: #79879a; font-size: 9px; }
.ledger-inline-empty b { flex: none; color: #45566e; font-size: 10px; }
.ledger-inline-detail-inner > footer { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-top: 1px solid #e8edf3; color: #7c899b; background: #fbfcfe; font-size: 8.5px; }
.ledger-inline-detail-inner > footer svg { width: 13px; height: 13px; color: #29906e; }

.split-ledger-row { position: relative; }
.split-ledger-row.has-expand > button[data-record-open] { padding-right: 56px; }
.split-ledger-row.has-expand.has-unreview > button[data-record-open] { padding-right: 154px; }
.split-ledger-controls {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(-50%);
}
.split-ledger-row .split-ledger-controls > button { position: static; width: auto; transform: none; }
.split-ledger-row .split-ledger-controls .split-ledger-unreview { min-height: 32px; }
.split-ledger-row .split-ledger-controls .split-ledger-expand {
  display: inline-grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  padding: 0;
  border: 1px solid #ccd8e8;
  background: #fff;
}
#view-module .split-ledger-row .split-ledger-controls > .split-ledger-expand {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 9px;
}
#view-module .split-ledger-row .split-ledger-controls > .split-ledger-unreview {
  min-height: 36px;
  border-radius: 9px;
}
.split-ledger-row > .split-ledger-detail { grid-column: 1 / -1; padding: 0 10px 10px; }
.split-ledger-row.is-expanded > button[data-record-open] { background: #f8faff; }
.split-ledger-row.has-payable-select > .split-ledger-controls { top: 50%; }

.purchase-ledger-row.is-expanded { border-bottom: 0; background: #f8faff; }
.purchase-ledger-actions .purchase-ledger-expand { width: 32px; min-width: 32px; padding: 0; }
.purchase-ledger-detail { min-width: 1080px; padding: 0 18px 16px; border-bottom: 1px solid #e1e8f1; }

.sales-progress-order { position: relative; }
#view-module .sales-progress-layout {
  grid-template-columns: repeat(auto-fit, minmax(min(720px, 100%), 1fr));
  gap: 16px;
}
.sales-progress-order > button[data-record-open] { grid-template-columns: minmax(240px,1.4fr) minmax(150px,.55fr) minmax(210px,.75fr); padding-right: 64px; }
.sales-progress-order > button[data-record-open] > svg { display: none; }
.sales-progress-order > .sales-progress-expand {
  position: absolute;
  z-index: 2;
  top: 17px;
  right: 16px;
  display: inline-grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  padding: 0;
  border: 1px solid #ccd8e8;
  border-radius: 9px;
  color: #50627c;
  background: #fff;
}
.sales-progress-order > .sales-progress-expand svg { display: block; width: 14px; height: 14px; }
.sales-progress-products[hidden] { display: none; }
.sales-progress-order.is-expanded > button[data-record-open] { border-bottom-color: #dfe6ef; }

.purchase-return-card-tools { display: flex; flex: none; align-items: center; gap: 8px; }
.purchase-return-card .purchase-return-expand { width: 32px; min-width: 32px; }
.purchase-return-card.is-expanded > header { background: #fbfcfe; }

body[data-theme="dark"] .ledger-row-expand,
body[data-theme="dark"] .split-ledger-row .split-ledger-controls .split-ledger-expand,
body[data-theme="dark"] .sales-progress-order > .sales-progress-expand { border-color: #3d4d65; color: #b8c8df; background: #192436; }
body[data-theme="dark"] .ledger-row-expand:hover,
body[data-theme="dark"] .ledger-row-expand[aria-expanded="true"] { border-color: #5475a4; color: #9fc0f5; background: #1d2d46; }
body[data-theme="dark"] .ledger-inline-detail { background: #151e2d; }
body[data-theme="dark"] .ledger-inline-detail-inner { border-color: #2d3b50; background: #131a26; }
body[data-theme="dark"] .ledger-inline-detail-inner > header,
body[data-theme="dark"] .ledger-inline-detail-inner > dl,
body[data-theme="dark"] .ledger-inline-detail-inner > footer { border-color: #2b384b; background: #172130; }
body[data-theme="dark"] .ledger-inline-detail-inner > header b,
body[data-theme="dark"] .ledger-inline-line-title b,
body[data-theme="dark"] .ledger-inline-line-metrics b,
body[data-theme="dark"] .ledger-inline-detail-inner dd { color: #dce5f3; }
body[data-theme="dark"] .ledger-inline-detail-inner > header p,
body[data-theme="dark"] .ledger-inline-detail-inner > header small,
body[data-theme="dark"] .ledger-inline-line-title small,
body[data-theme="dark"] .ledger-inline-line-metrics small,
body[data-theme="dark"] .ledger-inline-detail-inner dt,
body[data-theme="dark"] .ledger-inline-detail-inner > footer { color: #94a4bb; }
body[data-theme="dark"] .ledger-inline-line { border-color: #263448; }
body[data-theme="dark"] .ledger-inline-empty b { color: #cbd6e6; }

@keyframes ledger-inline-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .ledger-inline-line { grid-template-columns: minmax(160px, 1fr) minmax(210px, 1fr) auto; }
  .sales-progress-order > button[data-record-open] { grid-template-columns: 1fr 1fr; }
  .sales-progress-order > button[data-record-open] > span:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .record-row-actions { gap: 5px; }
  .ledger-inline-detail { padding-inline: 8px; }
  .ledger-inline-detail-inner > header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .ledger-inline-detail-inner > header p { white-space: normal; }
  .ledger-inline-line { grid-template-columns: 1fr; gap: 8px; }
  .ledger-inline-line > em { justify-self: start; }
  .ledger-inline-line-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sales-progress-order > button[data-record-open] { grid-template-columns: 1fr; }
  .split-ledger-row.has-expand.has-unreview > button[data-record-open] { padding-right: 104px; }
  .split-ledger-unreview span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ledger-inline-detail { animation: none; }
  .ledger-row-expand svg { transition: none; }
}

/* 全系统单据台账：复用销售订单的六列阅读模型与行内展开节奏。 */
#view-module .customer-directory-list:has(> .document-ledger-table),
#view-module .operational-ledger #moduleLedgerList:has(> .document-ledger-table) {
  display: block;
  overflow-x: auto;
  scrollbar-width: thin;
}
.document-ledger-table {
  container: document-ledger / inline-size;
  width: 100%;
  min-width: 0;
  color: #26344b;
  background: #fff;
}
.document-ledger-head,
.document-ledger-row {
  display: grid;
  grid-template-columns: minmax(118px,.85fr) minmax(210px,1.55fr) minmax(145px,1fr) minmax(125px,.82fr) minmax(105px,.72fr) minmax(250px,1.35fr);
  align-items: center;
  gap: clamp(10px, 1vw, 16px);
  padding-inline: 16px;
}
.document-ledger-head {
  min-height: 42px;
  border-bottom: 1px solid #e2e7ef;
  color: #718096;
  background: #f7f9fc;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .035em;
}
.document-ledger-head span:nth-last-child(-n+2) { text-align: right; }
.document-ledger-row-shell { position: relative; border-bottom: 1px solid #e8edf4; background: #fff; }
.document-ledger-row-shell:last-child { border-bottom: 0; }
.document-ledger-row {
  min-height: 74px;
  padding-block: 11px;
  background: #fff;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.document-ledger-row-shell:hover > .document-ledger-row {
  position: relative;
  z-index: 1;
  background: #fafcff;
  box-shadow: inset 3px 0 0 var(--module-accent, #2f6ff2);
}
.document-ledger-row-shell.is-expanded > .document-ledger-row {
  background: #f7faff;
  box-shadow: inset 3px 0 0 var(--module-accent, #2f6ff2);
}
.document-ledger-row > span { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.document-ledger-open {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.document-ledger-open b {
  overflow: hidden;
  max-width: 100%;
  color: var(--module-accent, #2f6ff2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-ledger-open:hover b { text-decoration: underline; text-underline-offset: 3px; }
.document-ledger-open small,
.document-ledger-party small,
.document-ledger-stage small,
.document-ledger-date small,
.document-ledger-metric small {
  overflow: hidden;
  color: #7d899f;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-ledger-party b,
.document-ledger-date b,
.document-ledger-metric b {
  overflow: hidden;
  color: #26344b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-ledger-stage { align-items: flex-start; }
.document-ledger-stage em {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}
.document-ledger-stage em.is-review { color: #946016; background: #fff5dc; }
.document-ledger-stage em.is-progress { color: #315d9c; background: #edf4ff; }
.document-ledger-stage em.is-complete { color: #176b50; background: #eaf7f1; }
.document-ledger-stage em.is-danger { color: #92515c; background: #fff0f2; }
.document-ledger-metric { align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.document-ledger-actions {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center;
  justify-content: flex-end;
  gap: 7px !important;
}
.document-ledger-action {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid #d7e0ec;
  border-radius: 9px;
  color: #34445d;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  transition: transform .15s ease, border-color .15s ease, color .15s ease, background-color .15s ease;
}
.document-ledger-action svg { width: 13px; height: 13px; }
.document-ledger-action:hover { transform: translateY(-1px); border-color: #9fb5db; color: #245bd4; background: #f7faff; }
.document-ledger-action.is-review { border-color: #b8d9c9; color: #176b50; background: #f2faf6; }
.document-ledger-action.is-danger { border-color: #efd0d5; color: #a54150; background: #fff9fa; }
.document-ledger-action.is-blocked { border-style: dashed; border-color: #d7dee8; color: #728096; background: #f8f9fb; }
.document-ledger-action:focus-visible,
.document-ledger-open:focus-visible { outline: 3px solid color-mix(in srgb, var(--module-accent, #2f6ff2) 28%, transparent); outline-offset: 2px; }
.document-ledger-actions .document-ledger-expand { flex: 0 0 32px; width: 32px; min-width: 32px; height: 32px; padding: 0; }
.document-ledger-row-shell > .document-ledger-detail { padding: 0 16px 16px; }
.document-ledger-row-shell.is-expanded > .document-ledger-detail { background: #f7faff; }

@container document-ledger (max-width: 1120px) {
  .document-ledger-head,
  .document-ledger-row { grid-template-columns: minmax(105px,.8fr) minmax(180px,1.45fr) minmax(125px,1fr) minmax(110px,.8fr) minmax(95px,.7fr); }
  .document-ledger-head span:last-child { display: none; }
  .document-ledger-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    min-height: 40px;
    padding-top: 8px;
    border-top: 1px solid #edf1f6;
  }
}
@container document-ledger (max-width: 720px) {
  .document-ledger-head { display: none; }
  .document-ledger-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 14px; padding: 14px; }
  .document-ledger-open,
  .document-ledger-party { grid-column: 1; }
  .document-ledger-stage,
  .document-ledger-date,
  .document-ledger-metric { grid-column: 2; align-items: flex-end; text-align: right; }
  .document-ledger-actions { grid-column: 1 / -1; overflow-x: auto; flex-wrap: nowrap !important; padding-top: 10px; }
  .document-ledger-action span { display: none; }
}
body[data-theme="dark"] .document-ledger-table,
body[data-theme="dark"] .document-ledger-row-shell,
body[data-theme="dark"] .document-ledger-row { background: #131a26; }
body[data-theme="dark"] .document-ledger-head { border-color: #2c394c; color: #8090aa; background: #101721; }
body[data-theme="dark"] .document-ledger-row-shell { border-color: #283548; }
body[data-theme="dark"] .document-ledger-row-shell:hover > .document-ledger-row,
body[data-theme="dark"] .document-ledger-row-shell.is-expanded > .document-ledger-row { background: #182234; }
body[data-theme="dark"] .document-ledger-party b,
body[data-theme="dark"] .document-ledger-date b,
body[data-theme="dark"] .document-ledger-metric b { color: #d7e0ee; }
body[data-theme="dark"] .document-ledger-action { border-color: #365174; color: #a9c7ee; background: #1b2b43; }
body[data-theme="dark"] .document-ledger-row-shell.is-expanded > .document-ledger-detail { background: #151e2d; }
@media (prefers-reduced-motion: reduce) {
  .document-ledger-row,
  .document-ledger-action { transition: none; }
}

/* 列表操作按需展开：默认只保留详情箭头，降低误触和视觉拥挤。 */
.list-action-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 38px;
  margin: 0 0 8px;
  padding: 5px 8px;
  border: 1px solid #e4e9f1;
  border-radius: 10px;
  color: #718097;
  background: #fbfcfe;
}
.list-action-toolbar.is-inline { min-height: 34px; margin: 0; padding: 0; border: 0; background: transparent; }
.list-action-toolbar > span { display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.list-action-toolbar > span svg { width: 13px; height: 13px; }
.list-action-toolbar > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  color: #4e5d74;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.list-action-toolbar > button svg { width: 12px; height: 12px; }
.list-action-toolbar > button:hover { transform: translateY(-1px); border-color: #9fb4d7; color: #245bd4; background: #f6f9ff; }
.list-action-toolbar > button[aria-pressed="true"] { border-color: #789ceb; color: #174fca; background: #edf3ff; box-shadow: 0 0 0 2px rgba(47,111,242,.08); }
.list-action-toolbar > button.is-danger[aria-pressed="true"] { border-color: #d995a0; color: #a54150; background: #fff1f3; box-shadow: 0 0 0 2px rgba(190,68,83,.07); }
.list-action-toolbar > button:focus-visible { outline: 3px solid rgba(47,111,242,.22); outline-offset: 2px; }

[data-list-action-root] [data-list-action] {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
  overflow: hidden;
  border-width: 0 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(6px) scale(.97);
  transition: width .18s ease, max-width .18s ease, padding .18s ease, border-width .18s ease, opacity .13s ease, transform .18s ease, visibility 0s linear .18s;
}
[data-list-action-root].show-list-action-review [data-list-action="review"],
[data-list-action-root].show-list-action-edit [data-list-action="edit"],
[data-list-action-root].show-list-action-unreview [data-list-action="unreview"],
[data-list-action-root].show-list-action-copy [data-list-action="copy"],
[data-list-action-root].show-list-action-cancel [data-list-action="cancel"] {
  width: auto !important;
  min-width: max-content !important;
  max-width: 180px !important;
  padding-inline: 10px !important;
  border-width: 1px !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  transition-delay: 0s;
}

/* 通用单据行操作：动作属于当前单据，并在独立尾部轨道中展示，绝不覆盖摘要或状态。 */
.record-row-action,
.split-ledger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd9ef;
  border-radius: 8px;
  color: #315f9e;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}
.record-row-action svg,
.split-ledger-action svg { width: 12px; height: 12px; }
.record-row-action:hover,
.split-ledger-action:hover { border-color: #91add7; color: #204c8a; background: #edf4ff; }
.record-row-action.is-review,
.split-ledger-action.is-review { border-color: #8eb2f4; color: #174fca; background: #f3f7ff; }
.record-row-action.is-blocked,
.split-ledger-action.is-blocked { border-style: dashed; border-color: #d9dfe8; color: #748196; background: #fafbfc; }

/* 分区台账使用真实的尾部网格列；操作数量变化时只改变列宽，不再绝对定位压住正文。 */
#view-module .split-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}
#view-module .split-ledger-row.has-payable-select { grid-template-columns: auto minmax(0, 1fr) auto; }
#view-module .split-ledger-row > button[data-record-open] {
  grid-column: 1;
  grid-row: 1;
  padding-right: 16px;
}
#view-module .split-ledger-row.has-payable-select > button[data-record-open] { grid-column: 2; }
#view-module .split-ledger-controls {
  position: static;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 9px 12px 9px 4px;
  transform: none;
}
#view-module .split-ledger-row.has-payable-select > .split-ledger-controls { grid-column: 3; }
#view-module .split-ledger-row > .split-ledger-detail { grid-column: 1 / -1; grid-row: 2; }

body[data-theme="dark"] .record-row-action,
body[data-theme="dark"] .split-ledger-action { border-color: #365174; color: #a9c7ee; background: #1b2b43; }
body[data-theme="dark"] .record-row-action.is-review,
body[data-theme="dark"] .split-ledger-action.is-review { border-color: #5278ba; color: #c5dafb; background: #20324e; }
body[data-theme="dark"] .record-row-action.is-blocked,
body[data-theme="dark"] .split-ledger-action.is-blocked { border-color: #465166; color: #8996aa; background: #18212f; }

.table-tools { flex-wrap: wrap; }
.table-tools > .list-action-toolbar { margin-left: auto; }
.table-tools > .tool-right { margin-left: 0; }
.split-ledger-toolbar-actions { display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.split-ledger-toolbar-actions > label { flex: 0 1 390px; width: min(390px,100%); }

#view-orders .order-ledger-table .table-row {
  grid-template-columns: minmax(110px,.82fr) minmax(160px,1.45fr) minmax(110px,.96fr) minmax(92px,.76fr) minmax(100px,.8fr) var(--order-action-column, minmax(250px,1.35fr));
  gap: clamp(8px, 1vw, 14px);
  padding-inline: 14px;
  transition: grid-template-columns .2s ease, background-color .15s ease, box-shadow .15s ease;
}
#view-orders .table-card { --order-action-column: minmax(250px,1.35fr); }
#view-orders .modern-table.order-ledger-table { width: 100%; min-width: 0; }
#view-orders .order-row-actions { align-content: center; }
#view-orders .order-row-toggle { order: 99; flex: 0 0 32px; }
#view-orders .order-ledger-detail { min-width: 0; }

@media (max-width: 1280px) {
  #view-orders .order-ledger-table .table-row {
    grid-template-columns: minmax(90px,.85fr) minmax(145px,1.5fr) minmax(100px,1fr) minmax(82px,.78fr) minmax(90px,.85fr);
  }
  #view-orders .order-ledger-table .table-head span:last-child { display: none; }
  #view-orders .order-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    min-height: 40px;
    padding-top: 8px;
    border-top: 1px solid #edf1f6;
  }
}

[data-list-action-root="purchaseOrders"] .purchase-ledger-head,
[data-list-action-root="purchaseOrders"] .purchase-ledger-row {
  grid-template-columns: minmax(130px,.9fr) minmax(250px,1.75fr) minmax(130px,.85fr) minmax(145px,.9fr) minmax(120px,.75fr) var(--purchase-action-column, minmax(250px,1.45fr));
  transition: grid-template-columns .2s ease, background-color .15s ease, box-shadow .15s ease;
}
[data-list-action-root="purchaseOrders"] { --purchase-action-column: minmax(400px,1.7fr); }

/* 采购订单使用全宽工作区；原右侧状态栏移到列表上方，避免挤压逐行操作。 */
#view-module .searchable-ledger-layout.is-purchase-order-workspace {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
#view-module .purchase-order-status-overview {
  display: grid;
  grid-template-columns: minmax(230px,.8fr) minmax(360px,1.45fr) minmax(190px,.55fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
#view-module .purchase-order-status-copy {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 14px 16px;
}
#view-module .purchase-order-status-copy .live-route-glyph {
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 10px;
  box-shadow: none;
}
#view-module .purchase-order-status-copy small { color: var(--work-muted); font-size: 9px; }
#view-module .purchase-order-status-copy h2 { margin: 3px 0 0; color: var(--work-ink); font-size: 14px; line-height: 1.35; }
#view-module .purchase-order-status-copy p { overflow: hidden; margin: 4px 0 0; color: var(--work-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
#view-module .purchase-order-status-overview .sig-kpis {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 0;
  margin: 0;
  border-inline: 1px solid var(--work-line);
}
#view-module .purchase-order-status-overview .sig-kpi {
  display: flex;
  min-width: 0;
  min-height: 70px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid var(--work-line);
  border-radius: 0;
  box-shadow: none;
}
#view-module .purchase-order-status-overview .sig-kpi:last-child { border-right: 0; }
#view-module .purchase-order-status-overview .sig-kpi small { font-size: 9px; }
#view-module .purchase-order-status-overview .sig-kpi b { margin-top: 3px; font-size: 18px; }
#view-module .purchase-order-status-overview .sig-kpi em { margin-top: 2px; font-size: 9px; }
#view-module .purchase-order-status-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 16px;
}
#view-module .purchase-order-status-actions > span {
  display: grid;
  grid-template-columns: 16px minmax(0,1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #65758a;
}
#view-module .purchase-order-status-actions > span > svg { width: 16px; height: 16px; color: #2a8b69; }
#view-module .purchase-order-status-actions > span > span { display: flex; min-width: 0; flex-direction: column; }
#view-module .purchase-order-status-actions b { color: #394b62; font-size: 10px; }
#view-module .purchase-order-status-actions small { margin-top: 2px; font-size: 8.5px; line-height: 1.4; }
#view-module .purchase-order-status-actions > :is(.primary-button,.secondary-button,.ghost-button) { flex: none; margin: 0; }

#view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-table { min-width: 1320px; }
#view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-head,
#view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-row {
  grid-template-columns: minmax(130px,.85fr) minmax(250px,1.55fr) minmax(130px,.8fr) minmax(145px,.85fr) minmax(120px,.7fr) var(--purchase-action-column);
  gap: 16px;
}
#view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-actions {
  flex-flow: row nowrap !important;
  min-width: 0;
  overflow: visible;
}
#view-module [data-list-action-root="purchaseOrders"] { container: purchase-order-ledger / inline-size; }

@container purchase-order-ledger (max-width: 1319px) {
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-table { min-width: 0; }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-head,
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-row {
    grid-template-columns: minmax(110px,.75fr) minmax(210px,1.45fr) minmax(115px,.75fr) minmax(125px,.8fr) minmax(105px,.65fr);
    gap: 10px;
  }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-head > span:last-child { display: none; }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-row { min-height: 108px; align-content: center; }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
    padding-top: 9px;
    border-top: 1px solid #edf1f6;
  }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-detail { min-width: 0; }
}

@container purchase-order-ledger (max-width: 720px) {
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-head { display: none; }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-row {
    grid-template-columns: minmax(105px,.75fr) minmax(150px,1.35fr) auto;
    gap: 10px 12px;
    min-height: 154px;
  }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-open { grid-column: 1; grid-row: 1; }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-supplier { grid-column: 2; grid-row: 1; }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-status { grid-column: 3; grid-row: 1; }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-eta { grid-column: 1; grid-row: 2; }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-amount { grid-column: 2 / 4; grid-row: 2; }
  #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: flex-start;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

body[data-theme="dark"] #view-module .purchase-order-status-overview,
body[data-theme="dark"] #view-module .purchase-order-status-overview .sig-kpi { border-color: #2c3a50; background: #151f2d; }
body[data-theme="dark"] #view-module [data-list-action-root="purchaseOrders"] .purchase-ledger-actions { border-top-color: #2c3a50; }
body[data-theme="dark"] #view-module .purchase-order-status-copy h2,
body[data-theme="dark"] #view-module .purchase-order-status-actions b { color: #e5edf8; }

@media (max-width: 1180px) {
  #view-module .purchase-order-status-overview { grid-template-columns: minmax(260px,.8fr) minmax(0,1.5fr); }
  #view-module .purchase-order-status-actions { grid-column: 1 / -1; justify-content: space-between; border-top: 1px solid var(--work-line); }
}
@media (max-width: 760px) {
  #view-module .purchase-order-status-overview { grid-template-columns: 1fr; }
  #view-module .purchase-order-status-overview .sig-kpis { grid-template-columns: repeat(3,minmax(92px,1fr)); border: 0; border-block: 1px solid var(--work-line); overflow-x: auto; }
  #view-module .purchase-order-status-actions { grid-column: auto; align-items: stretch; flex-direction: column; }
  #view-module .purchase-order-status-actions > :is(.primary-button,.secondary-button,.ghost-button) { width: 100%; justify-content: center; }
}

#view-orders .order-row-action.is-approval-state,
[data-list-action-root="purchaseOrders"] .purchase-ledger-action.is-approval-state { min-width: 68px; }

.split-ledger-row.has-expand.has-unreview > button[data-record-open] { padding-right: 56px; transition: padding-right .18s ease, background-color .15s ease; }
#view-module [data-list-action-root].show-list-action-unreview .split-ledger-row.has-expand.has-unreview > button[data-record-open] { padding-right: 184px; }

body[data-theme="dark"] #view-module .split-ledger-row strong { border-left-color: #334158; }

body[data-theme="dark"] .list-action-toolbar { border-color: #2c3a50; color: #8fa0b8; background: #101824; }
body[data-theme="dark"] .list-action-toolbar.is-inline { background: transparent; }
body[data-theme="dark"] .list-action-toolbar > button { border-color: #3a4960; color: #b7c4d7; background: #182334; }
body[data-theme="dark"] .list-action-toolbar > button:hover { border-color: #5575a4; color: #b9d1f7; background: #1d2c43; }
body[data-theme="dark"] .list-action-toolbar > button[aria-pressed="true"] { border-color: #5d82c3; color: #c8dbfb; background: #20324e; }
body[data-theme="dark"] .list-action-toolbar > button.is-danger[aria-pressed="true"] { border-color: #8e4d59; color: #ffabb5; background: #37232b; }

@media (max-width: 1100px) {
  .table-tools > .list-action-toolbar { order: 3; width: 100%; justify-content: flex-start; margin-left: 0; }
  .split-ledger-toolbar-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 720px) {
  .list-action-toolbar { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .list-action-toolbar::-webkit-scrollbar { display: none; }
  .list-action-toolbar > span { position: sticky; left: 0; z-index: 1; padding-right: 5px; background: inherit; }
  .split-ledger-toolbar-actions { display: grid; }
  .split-ledger-toolbar-actions > label { width: 100%; }
  #view-module .split-ledger-grid { gap: 12px; padding: 12px; }
  #view-module .split-ledger-row > button[data-record-open] {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding-left: 14px;
  }
  #view-module .split-ledger-row > button[data-record-open] strong { display: none; }
  #view-module .split-ledger-row,
  #view-module .split-ledger-row.has-payable-select { grid-template-columns: minmax(0, 1fr) auto; }
  #view-module .split-ledger-row.has-payable-select > .payable-select { grid-column: 1 / -1; grid-row: 1; }
  #view-module .split-ledger-row.has-payable-select > button[data-record-open] { grid-column: 1; grid-row: 2; }
  #view-module .split-ledger-row > .split-ledger-controls,
  #view-module .split-ledger-row.has-payable-select > .split-ledger-controls { grid-column: 2; grid-row: 2; }
  #view-module .split-ledger-row > .split-ledger-detail { grid-row: 3; }
  .record-row-action span,
  .split-ledger-action span { display: none; }
  .show-list-action-unreview .split-ledger-row.has-expand.has-unreview > button[data-record-open] { padding-right: 108px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-list-action-root] [data-list-action],
  #view-orders .order-ledger-table .table-row,
  [data-list-action-root="purchaseOrders"] .purchase-ledger-head,
  [data-list-action-root="purchaseOrders"] .purchase-ledger-row { transition: none; }
}

/* 采购完成状态：用全宽台账替代拥挤的双栏，把摘要、状态与操作拆成稳定轨道。 */
[data-list-action-root="purchaseCompleted"] .split-ledger-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-section {
  border-radius: 12px;
  overflow: hidden;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-section > header {
  align-items: center;
  min-height: 68px;
  padding: 14px 18px;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-section > header > div { min-width: 0; }
[data-list-action-root="purchaseCompleted"] .split-ledger-section > header > b {
  min-width: 38px;
  padding: 6px 10px;
  text-align: center;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row {
  min-height: 64px;
  background: #fff;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 20px;
  min-height: 64px;
  padding: 12px 76px 12px 18px;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] > span {
  display: grid;
  grid-template-columns: minmax(108px, .22fr) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] b {
  font-size: 12.5px;
  letter-spacing: .01em;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] small {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.55;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] em {
  min-width: 72px;
  padding: 6px 10px;
  text-align: center;
  white-space: nowrap;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] strong {
  min-width: 48px;
  padding-left: 16px;
  border-left: 1px solid #e2e8f0;
  text-align: center;
  white-space: nowrap;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] > svg { display: none; }
[data-list-action-root="purchaseCompleted"] .split-ledger-controls {
  top: 50%;
  right: 16px;
  gap: 10px;
  transform: translateY(-50%);
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row .split-ledger-controls .split-ledger-expand {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 9px;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row .split-ledger-controls .split-ledger-unreview {
  min-height: 36px;
  border-radius: 9px;
}
[data-list-action-root="purchaseCompleted"].show-list-action-unreview .split-ledger-row.has-expand.has-unreview > button[data-record-open] {
  padding-right: 184px;
}
[data-list-action-root="purchaseCompleted"] .split-ledger-row:hover { background: #fbfcff; }
[data-list-action-root="purchaseCompleted"] .split-ledger-row + .split-ledger-row { border-top-color: #edf1f6; }

/* `#view-module` 的紧凑台账基线优先级更高；这里显式覆盖采购完成页的舒展节奏。 */
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-grid { gap: 16px; padding: 16px; }
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-section > header { min-height: 68px; padding: 14px 18px; }
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-section h2 { font-size: 16px; }
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-section p { margin-top: 4px; font-size: 10.5px; line-height: 1.55; }
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] {
  min-height: 64px;
  padding: 12px 76px 12px 18px;
}
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] b { font-size: 12.5px; }
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] small { margin-top: 0; font-size: 10.5px; }
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] em,
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] strong { font-size: 10.5px; }
#view-module [data-list-action-root="purchaseCompleted"] .split-ledger-row .split-ledger-controls > .split-ledger-expand {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}
#view-module [data-list-action-root="purchaseCompleted"].show-list-action-unreview .split-ledger-row.has-expand.has-unreview > button[data-record-open] {
  padding-right: 184px;
}

body[data-theme="dark"] [data-list-action-root="purchaseCompleted"] .split-ledger-row { background: #151f2d; }
body[data-theme="dark"] [data-list-action-root="purchaseCompleted"] .split-ledger-row:hover { background: #1a2638; }
body[data-theme="dark"] [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] strong { border-left-color: #334158; }

@media (max-width: 900px) {
  [data-list-action-root="purchaseCompleted"] .split-ledger-grid { gap: 12px; padding: 12px; }
  [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] > span {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] strong { display: none; }
}
@media (max-width: 640px) {
  [data-list-action-root="purchaseCompleted"] .split-ledger-section > header { min-height: 60px; padding: 12px 14px; }
  [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] { padding-left: 14px; }
  [data-list-action-root="purchaseCompleted"] .split-ledger-row > button[data-record-open] em { display: none; }
}

/* 操作记录详情：把“谁改了什么”呈现为可复核的字段差异，而不是只显示一句摘要。 */
.audit-entry-detail { display:grid; gap:14px; margin:14px 0; padding:16px; border:1px solid #dce4ef; border-radius:14px; background:#fbfcfe; }
.audit-entry-detail > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.audit-entry-detail > header div { display:grid; gap:4px; min-width:0; }
.audit-entry-detail > header small { color:#65748b; font-size:10px; font-weight:800; }
.audit-entry-detail > header b { color:#17233b; font-size:15px; }
.audit-entry-detail > header p { margin:0; color:#52637b; font-size:11px; line-height:1.55; }
.audit-entry-detail > header em { padding:6px 9px; border-radius:999px; background:#e8f6f0; color:#176b57; font-size:10px; font-style:normal; font-weight:900; white-space:nowrap; }
.audit-entry-detail > dl { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:0; overflow:hidden; border:1px solid #e2e8f0; border-radius:10px; background:#fff; }
.audit-entry-detail > dl div { display:grid; gap:4px; padding:11px 12px; border-right:1px solid #e8edf4; }
.audit-entry-detail > dl div:last-child { border-right:0; }
.audit-entry-detail dt { color:#7a8799; font-size:9px; font-weight:800; }
.audit-entry-detail dd { margin:0; color:#25344d; font-size:11px; font-weight:800; overflow-wrap:anywhere; }
.audit-entry-detail dd small { display:block; margin-top:3px; color:#7a8799; font-size:9px; font-weight:600; }
.audit-change-set { overflow:hidden; border:1px solid #e1e7f0; border-radius:11px; background:#fff; }
.audit-change-set > header { padding:10px 12px; border-bottom:1px solid #e8edf4; background:#f6f8fb; }
.audit-change-set > header div { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.audit-change-set > header b { color:#25344d; font-size:11px; }
.audit-change-set > header small { color:#68768c; font-size:9px; }
.audit-change-set > div { max-height:360px; overflow:auto; }
.audit-change-set table { width:100%; border-collapse:collapse; table-layout:fixed; }
.audit-change-set th,.audit-change-set td { padding:8px 10px; border-top:1px solid #edf1f6; color:#42536c; font-size:9.5px; line-height:1.5; text-align:left; vertical-align:top; overflow-wrap:anywhere; white-space:pre-wrap; }
.audit-change-set thead th { position:sticky; top:0; z-index:1; border-top:0; background:#fff; color:#65748b; }
.audit-change-set tbody th { width:24%; color:#25344d; background:#fbfcfe; }
.audit-change-set > p { margin:0; padding:14px; color:#68768c; font-size:10px; }
.audit-entry-detail > footer { display:flex; align-items:center; gap:9px; color:#68768c; font-size:9px; }
.audit-entry-detail > footer span { display:flex; align-items:center; gap:5px; color:#176b57; font-weight:800; }
.audit-entry-detail > footer svg { width:13px; height:13px; }
.audit-entry-detail > footer code { padding:4px 7px; border-radius:6px; background:#eef2f7; color:#42536c; font-size:8.5px; }
.audit-entry-detail > footer small { margin-left:auto; }
body[data-theme="dark"] .audit-entry-detail { border-color:#334158; background:#151f2d; }
body[data-theme="dark"] .audit-entry-detail > header b,body[data-theme="dark"] .audit-entry-detail dd,body[data-theme="dark"] .audit-change-set > header b,body[data-theme="dark"] .audit-change-set tbody th { color:#e7edf7; }
body[data-theme="dark"] .audit-entry-detail > dl,body[data-theme="dark"] .audit-change-set,body[data-theme="dark"] .audit-change-set thead th { border-color:#334158; background:#101927; }
body[data-theme="dark"] .audit-entry-detail > dl div,body[data-theme="dark"] .audit-change-set > header,body[data-theme="dark"] .audit-change-set th,body[data-theme="dark"] .audit-change-set td { border-color:#2b394f; }
body[data-theme="dark"] .audit-change-set > header,body[data-theme="dark"] .audit-change-set tbody th { background:#172235; }
@media (max-width: 760px) { .audit-entry-detail > dl { grid-template-columns:1fr 1fr; }.audit-entry-detail > dl div:nth-child(2) { border-right:0; }.audit-entry-detail > dl div:nth-child(-n+2) { border-bottom:1px solid #e8edf4; }.audit-entry-detail > footer { align-items:flex-start; flex-wrap:wrap; }.audit-entry-detail > footer small { width:100%; margin-left:0; } }

/* 反审核后的多行单据统一采用与新建单据一致的表格编辑器。 */
.action-modal.document-edit-modal .action-sheet { width:min(1480px,calc(100vw - 40px)); }
.action-modal.document-edit-modal .action-body { padding:18px 20px; }
.action-modal.document-edit-modal .record-detail { gap:14px; }

/* 送货出库：沿用采购入库的横向单据语法，一行一个产品，一批一次确认。 */
.action-modal.delivery-outbound-modal .action-sheet { width:min(1480px,calc(100vw - 36px)); }
.action-modal.delivery-outbound-modal .action-body { padding:18px 20px; }
.delivery-outbound-sheet { display:grid; gap:16px; min-width:0; }
.delivery-outbound-sheet > header { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:2px 2px 14px; border-bottom:1px solid #e0e7f0; }
.delivery-outbound-sheet > header small { color:#59718f; font-size:11px; font-weight:750; }
.delivery-outbound-sheet > header h3 { margin:5px 0 4px; color:#17263d; font-size:21px; }
.delivery-outbound-sheet > header p { margin:0; color:#697991; font-size:12px; line-height:1.6; }
.delivery-batch-summary { display:flex; flex:0 0 auto; gap:10px; }
.delivery-batch-summary span { min-width:106px; padding:10px 12px; border:1px solid #dce5f1; border-radius:10px; background:#f8fbff; }
.delivery-batch-summary small,.delivery-batch-summary b { display:block; white-space:nowrap; }
.delivery-batch-summary small { color:#77879b; font-size:10px; }
.delivery-batch-summary b { margin-top:3px; color:#1f3350; font-size:16px; }
.delivery-outbound-head { display:grid; grid-template-columns:160px 180px repeat(2,minmax(190px,1fr)); gap:12px; }
.delivery-outbound-head label,.delivery-outbound-sheet > footer > label { display:grid; gap:6px; min-width:0; }
.delivery-outbound-head label > span,.delivery-outbound-sheet > footer label > span { color:#425470; font-size:11px; font-weight:750; }
.delivery-outbound-head :is(input,select),.delivery-outbound-sheet > footer textarea { box-sizing:border-box; width:100%; min-height:42px; border:1px solid #cfdbea; border-radius:9px; padding:0 11px; color:#17263d; background:#fff; font:inherit; outline:0; }
.delivery-outbound-head :is(input,select):focus,.delivery-outbound-sheet > footer textarea:focus,.delivery-outbound-table input:focus { border-color:#4d7ee8; box-shadow:0 0 0 3px rgba(77,126,232,.12); }
.delivery-outbound-table-wrap { overflow-x:auto; border:1px solid #d9e2ee; border-radius:12px; background:#fff; }
.delivery-outbound-table { width:100%; min-width:1120px; border-collapse:collapse; table-layout:fixed; }
.delivery-outbound-table th { padding:10px 12px; border-bottom:1px solid #dce5f0; color:#5c6d84; background:#f6f9fd; font-size:11px; font-weight:800; text-align:left; white-space:nowrap; }
.delivery-outbound-table th:nth-child(1) { width:64px; text-align:center; }
.delivery-outbound-table th:nth-child(2) { width:31%; }
.delivery-outbound-table th:nth-child(3),.delivery-outbound-table th:nth-child(4),.delivery-outbound-table th:nth-child(5),.delivery-outbound-table th:nth-child(7) { width:112px; text-align:right; }
.delivery-outbound-table th:nth-child(6) { width:170px; }
.delivery-outbound-table td { padding:12px; border-bottom:1px solid #e5ebf3; color:#1d2e47; vertical-align:middle; }
.delivery-outbound-table tbody tr:last-child td { border-bottom:0; }
.delivery-outbound-table tbody tr.is-selected { background:#f5f8ff; box-shadow:inset 3px 0 #4778e8; }
.delivery-outbound-table td > b,.delivery-outbound-table td > small { display:block; }
.delivery-outbound-table td > b { overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.delivery-outbound-table td > small { margin-top:4px; overflow:hidden; color:#7b899c; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.delivery-outbound-table .number-cell { text-align:right; }
.delivery-select-cell { text-align:center; }
.delivery-select-cell label { display:inline-grid; place-items:center; width:30px; height:30px; cursor:pointer; }
.delivery-select-cell input { position:absolute; opacity:0; pointer-events:none; }
.delivery-select-cell label span { display:grid; place-items:center; width:18px; height:18px; border:1.5px solid #9cabc0; border-radius:5px; background:#fff; }
.delivery-select-cell input:checked + span { border-color:#346ee2; background:#346ee2; box-shadow:inset 0 0 0 4px #346ee2; }
.delivery-select-cell input:checked + span::after { content:'✓'; color:#fff; font-size:12px; font-weight:900; line-height:1; }
.delivery-select-cell input:disabled + span { border-color:#d7dee8; background:#eef1f5; cursor:not-allowed; }
.delivery-qty-cell input { box-sizing:border-box; width:100%; min-height:38px; border:1px solid #cfdae8; border-radius:8px; padding:0 9px; color:#17263d; background:#fff; font:inherit; text-align:right; outline:0; }
.delivery-qty-cell input:disabled { color:#9aa6b6; background:#f1f4f7; }
.delivery-outbound-sheet > footer { display:grid; grid-template-columns:minmax(320px,1fr) auto; align-items:end; gap:18px; padding:14px; border:1px solid #dce5f0; border-radius:11px; background:#f9fbfe; }
.delivery-outbound-sheet > footer textarea { min-height:68px; padding:9px 11px; resize:vertical; }
.delivery-outbound-sheet > footer > div { min-width:250px; text-align:right; }
.delivery-outbound-sheet > footer > div span,.delivery-outbound-sheet > footer > div small { display:block; }
.delivery-outbound-sheet > footer > div span { color:#2458bd; font-size:13px; font-weight:800; }
.delivery-outbound-sheet > footer > div small { margin-top:5px; color:#748399; font-size:10px; }
.delivery-batch-history { border:1px solid #dde5ef; border-radius:11px; overflow:hidden; }
.delivery-batch-history > header { display:flex; justify-content:space-between; gap:12px; padding:11px 13px; border-bottom:1px solid #e2e8f1; background:#f8fafc; }
.delivery-batch-history > header small { color:#77869a; }
.delivery-batch-history ul { margin:0; padding:0; list-style:none; }
.delivery-batch-history li { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:11px 13px; border-bottom:1px solid #e7ecf3; }
.delivery-batch-history li:last-child { border-bottom:0; }
.delivery-batch-history li span { min-width:0; }
.delivery-batch-history li b,.delivery-batch-history li small { display:block; }
.delivery-batch-history li b { font-size:12px; }
.delivery-batch-history li small { margin-top:3px; overflow:hidden; color:#77869a; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.delivery-batch-history li em { flex:0 0 auto; color:#2b5fc7; font-size:12px; font-style:normal; font-weight:800; }
.delivery-outbound-empty { padding:36px!important; color:#8190a4!important; text-align:center; }

/* BOM 分类：真实文件夹层级，不改变配方版本和业务关系。 */
.bom-folder-group { overflow:hidden; border:1px solid #dfe6ef; border-radius:12px; background:#fbfcff; }
.bom-folder-group + .bom-folder-group { margin-top:9px; }
.bom-folder-group > summary { display:grid; grid-template-columns:30px minmax(0,1fr) auto 16px; align-items:center; gap:9px; min-height:43px; padding:0 11px; color:#263a58; background:#f3f6fb; cursor:pointer; list-style:none; }
.bom-folder-group > summary::-webkit-details-marker { display:none; }
.bom-folder-group > summary:hover { background:#edf2f9; }
.bom-folder-group > summary b { overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.bom-folder-group > summary small { color:#738298; font-size:10px; white-space:nowrap; }
.bom-folder-icon { display:grid; place-items:center; width:28px; height:28px; border-radius:8px; color:#4b6bc9; background:#e5ecff; }
.bom-folder-icon svg,.bom-folder-chevron { width:14px; height:14px; }
.bom-folder-chevron { color:#75849a; transform:rotate(90deg); transition:transform .16s ease; }
.bom-folder-group:not([open]) .bom-folder-chevron { transform:rotate(0); }
.bom-folder-rows { display:grid; gap:7px; padding:8px; }
.bom-ledger-row-shell { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:stretch; gap:6px; min-width:0; }
.bom-ledger-row-shell[hidden] { display:none; }
.bom-ledger-row-shell .bom-ledger-row { min-width:0; padding:10px 11px; }
.bom-folder-move { display:inline-flex; align-items:center; justify-content:center; flex-direction:column; gap:2px; width:48px; border:1px solid #dfe6ef; border-radius:10px; color:#627590; background:#fff; cursor:pointer; }
.bom-folder-move:hover { border-color:#879bd4; color:#3f61bc; background:#f4f7ff; }
.bom-folder-move svg { width:14px; height:14px; }
.bom-folder-move span { font-size:9px; font-weight:750; white-space:nowrap; }

@media (max-width:900px) {
  .delivery-outbound-sheet > header,.delivery-outbound-sheet > footer { grid-template-columns:1fr; display:grid; }
  .delivery-outbound-head { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .delivery-outbound-sheet > footer > div { min-width:0; text-align:left; }
}
.record-action-form.has-document-editor { gap:10px; padding:0; overflow:hidden; border-color:#d9e2ee; background:#fff; }
.record-action-form.has-document-editor > div:first-child { padding:14px 16px 0; }
.document-edit-sheet { display:grid; gap:0; min-width:0; border-top:1px solid #e5eaf1; background:#fff; }
.document-edit-sheet-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:16px 18px; border-bottom:1px solid #e4e9f0; background:#f8faff; }
.document-edit-sheet-heading > div { display:grid; gap:3px; min-width:0; }
.document-edit-sheet-heading small,.document-edit-header-fields > div small,.document-line-section > header small { color:#64748b; font-size:9px; font-weight:800; letter-spacing:.03em; }
.document-edit-sheet-heading h3 { margin:0; color:#182942; font-size:17px; letter-spacing:-.015em; }
.document-edit-sheet-heading p { margin:0; color:#66768e; font-size:10px; line-height:1.55; }
.document-edit-sheet-heading > span { flex:none; padding:6px 10px; border:1px solid #d9e4f4; border-radius:999px; color:#315fbc; background:#edf3ff; font-size:10px; font-weight:800; white-space:nowrap; }
.document-edit-header-fields { display:grid; gap:12px; padding:16px 18px 18px; border-bottom:1px solid #e5eaf1; }
.document-edit-header-fields > div { display:flex; align-items:baseline; gap:10px; }
.document-edit-header-fields > div b,.document-line-section > header b { color:#23354f; font-size:12px; }
.document-edit-header-fields .form-grid { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:10px; }
.document-edit-header-fields .form-field > span { font-size:10px; }
.document-edit-header-fields .form-field input,.document-edit-header-fields .form-field select { min-height:38px; padding:8px 10px; border-radius:8px; font-size:11px; }
.document-edit-header-fields .form-field textarea { min-height:64px; }
.purchase-edit-amounts { display:grid; gap:12px; padding:16px 18px 18px; border-bottom:1px solid #e5eaf1; background:#fbfcfe; }
.purchase-edit-amounts > header { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.purchase-edit-amounts > header > div { display:grid; gap:3px; }
.purchase-edit-amounts > header small { color:#64748b; font-size:9px; font-weight:800; letter-spacing:.03em; }
.purchase-edit-amounts > header b { color:#23354f; font-size:12px; }
.purchase-edit-amounts > header p { max-width:560px; margin:0; color:#6c7b90; font-size:9.5px; line-height:1.5; text-align:right; }
.purchase-edit-amount-grid { display:grid; grid-template-columns:minmax(150px,.8fr) minmax(260px,1.4fr) minmax(170px,.9fr); gap:10px; align-items:stretch; }
.purchase-edit-amount-grid > span,.purchase-edit-amount-grid > label { display:flex; min-width:0; min-height:64px; flex-direction:column; justify-content:center; gap:5px; padding:10px 12px; border:1px solid #dfe6ef; border-radius:9px; background:#fff; }
.purchase-edit-amount-grid > span small,.purchase-edit-amount-grid > label > span { color:#65758b; font-size:10px; font-weight:700; }
.purchase-edit-amount-grid > label > span { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.purchase-edit-amount-grid > label > span small { color:#8a98ab; font-size:8.5px; font-weight:500; }
.purchase-edit-amount-grid > span b { color:#22344d; font-size:18px; font-variant-numeric:tabular-nums; }
.purchase-edit-amount-grid > label input { width:100%; min-height:34px; padding:7px 9px; border:1px solid #cdd8e7; border-radius:7px; color:#17263d; background:#fff; font-size:13px; font-variant-numeric:tabular-nums; }
.purchase-edit-amount-grid > .is-net { border-color:#bfd2f3; background:#f1f6ff; }
.purchase-edit-amount-grid > .is-net b { color:#2459b8; }
.purchase-edit-amount-status { margin:0; color:#6c7b90; font-size:9.5px; }
.purchase-edit-amounts.is-invalid .purchase-edit-amount-grid > label { border-color:#e8a7ae; background:#fff7f8; }
.purchase-edit-amounts.is-invalid .purchase-edit-amount-grid > label input { border-color:#d65b68; }
.purchase-edit-amounts.is-invalid .purchase-edit-amount-status { color:#b33b49; font-weight:700; }
.document-line-section { display:grid; min-width:0; }
.document-line-section > header { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; padding:14px 18px 10px; }
.document-line-section > header > div { display:grid; gap:3px; }
.document-line-section > header p { max-width:620px; margin:0; color:#6c7b90; font-size:9.5px; line-height:1.5; text-align:right; }
.document-line-scroll { max-height:48vh; margin:0 18px 18px; overflow:auto; border:1px solid #dce4ee; border-radius:10px; background:#fff; scrollbar-gutter:stable; }
.document-line-table { width:100%; min-width:920px; border-collapse:separate; border-spacing:0; table-layout:fixed; }
.document-line-table th { position:sticky; top:0; z-index:2; height:38px; padding:8px 10px; border-right:1px solid #e2e8f0; border-bottom:1px solid #d7e0ea; color:#596a82; background:#f3f6fa; font-size:9.5px; font-weight:800; text-align:left; white-space:nowrap; }
.document-line-table th:first-child { width:48px; text-align:center; }
.document-line-table th:last-child { border-right:0; }
.document-line-table td { min-height:52px; padding:7px 8px; border-right:1px solid #e8edf3; border-bottom:1px solid #e8edf3; color:#263750; background:#fff; font-size:10px; vertical-align:middle; }
.document-line-table tbody tr:last-child td { border-bottom:0; }
.document-line-table td:last-child { border-right:0; }
.document-line-table tbody tr:nth-child(even) td { background:#fbfcfe; }
.document-line-table tbody tr:focus-within td { background:#f4f8ff; }
.purchase-receipt-document-table { min-width:1200px; }
.purchase-receipt-document-table th:first-child { width:104px; }
.purchase-receipt-document-table th:nth-child(2) { width:280px; }
.purchase-receipt-document-table th:nth-child(3),
.purchase-receipt-document-table th:nth-child(4),
.purchase-receipt-document-table th:nth-child(5) { width:112px; }
.purchase-receipt-document-table th:nth-child(6),
.purchase-receipt-document-table th:nth-child(7) { width:150px; }
.purchase-receipt-document-table .document-readonly-value { padding-inline:12px; }
.purchase-receipt-document-table tbody tr td { transition:background-color .18s ease,box-shadow .18s ease; }
.purchase-receipt-document-table tbody tr.is-selected td { background:#f2f7ff; }
.purchase-receipt-document-table tbody tr.is-selected td:first-child { box-shadow:inset 3px 0 #2f6ff2; }
.purchase-receipt-select-cell { text-align:center; }
.purchase-receipt-select { display:inline-grid; justify-items:center; gap:5px; min-width:72px; padding:5px 6px; border:1px solid transparent; border-radius:8px; color:#5e6f87; cursor:pointer; user-select:none; }
.purchase-receipt-select:hover { border-color:#cfdcf2; background:#f7faff; }
.purchase-receipt-select input { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.purchase-receipt-select > span { display:grid; place-items:center; width:24px; height:24px; border:1px solid #b8c6da; border-radius:7px; color:transparent; background:#fff; transition:border-color .18s ease,background-color .18s ease,color .18s ease,box-shadow .18s ease; }
.purchase-receipt-select svg { width:13px; height:13px; }
.purchase-receipt-select small { color:inherit; font-size:8.5px; font-weight:750; line-height:1.2; }
.purchase-receipt-select input:focus-visible + span { border-color:#2f6ff2; box-shadow:0 0 0 3px rgba(47,111,242,.16); }
.purchase-receipt-select input:checked + span { border-color:#2f6ff2; color:#fff; background:#2f6ff2; }
.purchase-receipt-select:has(input:checked) { color:#2458bd; }
.purchase-receipt-selection-summary { display:grid; justify-items:end; gap:2px; min-width:240px; }
.purchase-receipt-selection-summary span { color:#2c4264; font-size:10px; font-weight:700; }
.purchase-receipt-selection-summary span b { color:#2563d8; font-size:13px; }
.purchase-receipt-selection-summary p { max-width:none !important; color:#6c7b90; font-size:9.5px; text-align:right; }
.document-line-table input,.document-line-table select,.document-line-table textarea { box-sizing:border-box; width:100%; min-width:0; height:38px; padding:7px 9px; border:1px solid #d5deea; border-radius:7px; outline:0; color:#1d304c; background:#fff; font:inherit; font-size:10.5px; }
.document-line-table textarea { min-height:54px; height:54px; resize:vertical; line-height:1.45; }
.document-line-table input:focus,.document-line-table select:focus,.document-line-table textarea:focus { border-color:#6f94e8; box-shadow:0 0 0 3px rgba(47,111,242,.09); }
.document-line-table input:disabled,.document-line-table select:disabled,.document-line-table textarea:disabled { border-color:#e1e7ef; color:#99a5b5; background:#f3f5f8; cursor:not-allowed; opacity:1; }
.document-line-seq { text-align:center; }
.document-line-seq span { display:inline-grid; place-items:center; width:25px; height:25px; border-radius:7px; color:#315fbc; background:#edf3ff; font-size:9px; font-weight:850; }
.document-line-identity { display:grid; gap:3px; }
.document-line-identity b { color:#1f314c; font-size:10.5px; }
.document-line-identity small,.document-product-cell small,.document-readonly-value small { display:block; margin-top:4px; color:#7a899e; font-size:8.5px; line-height:1.35; }
.document-readonly-value b { color:#273a56; font-size:11px; }
.document-line-empty { color:#8b98aa; font-size:9px; }
.document-line-empty-row { height:90px; color:#78869a !important; text-align:center; }
.sales-document-table { min-width:1120px; }
.sales-document-table th:nth-child(2) { width:250px; }
.sales-document-table th:nth-child(3) { width:110px; }
.sales-document-table th:nth-child(4) { width:140px; }
.sales-document-table th:nth-child(5) { width:160px; }
.purchase-document-table th:nth-child(2) { width:260px; }
.purchase-document-table th:nth-child(3) { width:220px; }
.purchase-document-table th:nth-child(4),.purchase-document-table th:nth-child(5) { width:140px; }
.production-document-table th:nth-child(2) { width:300px; }
.production-document-table th:nth-child(3),.production-document-table th:nth-child(4) { width:150px; }
.expense-document-table { min-width:1100px; }
.expense-document-table th:nth-child(2),.expense-document-table th:nth-child(3) { width:180px; }
.expense-document-table th:nth-child(4),.expense-document-table th:nth-child(5) { width:140px; }
.invoice-document-table { min-width:820px; }
.invoice-document-table th:not(:first-child) { width:190px; }

body[data-theme='dark'] .record-action-form.has-document-editor,body[data-theme='dark'] .document-edit-sheet,body[data-theme='dark'] .document-line-scroll { border-color:#304057; background:#111a27; }
body[data-theme='dark'] .document-edit-sheet-heading,body[data-theme='dark'] .document-line-table th { border-color:#304057; background:#1a2535; }
body[data-theme='dark'] .document-edit-sheet-heading h3,body[data-theme='dark'] .document-edit-header-fields > div b,body[data-theme='dark'] .document-line-section > header b,body[data-theme='dark'] .document-line-identity b,body[data-theme='dark'] .document-readonly-value b { color:#e7edf7; }
body[data-theme='dark'] .document-edit-header-fields,body[data-theme='dark'] .document-line-table td { border-color:#2b394f; background:#111a27; color:#dce5f2; }
body[data-theme='dark'] .purchase-edit-amounts { border-color:#2b394f; background:#121c2a; }
body[data-theme='dark'] .purchase-edit-amounts > header b,body[data-theme='dark'] .purchase-edit-amount-grid > span b { color:#e7edf7; }
body[data-theme='dark'] .purchase-edit-amount-grid > span,body[data-theme='dark'] .purchase-edit-amount-grid > label { border-color:#33445d; background:#172233; }
body[data-theme='dark'] .purchase-edit-amount-grid > label input { border-color:#435670; color:#e7edf7; background:#101927; }
body[data-theme='dark'] .purchase-edit-amount-grid > .is-net { border-color:#3f5f96; background:#172a47; }
body[data-theme='dark'] .purchase-edit-amount-grid > .is-net b { color:#9fc0ff; }
body[data-theme='dark'] .purchase-edit-amounts.is-invalid .purchase-edit-amount-grid > label { border-color:#944855; background:#2a1820; }
body[data-theme='dark'] .document-line-table tbody tr:nth-child(even) td { background:#151f2d; }
body[data-theme='dark'] .document-line-table tbody tr:focus-within td { background:#1b2940; }
body[data-theme='dark'] .document-line-table input,body[data-theme='dark'] .document-line-table select,body[data-theme='dark'] .document-line-table textarea { border-color:#35465f; color:#e7edf7; background:#0f1724; }
body[data-theme='dark'] .purchase-receipt-document-table tbody tr.is-selected td { background:#172743; }
body[data-theme='dark'] .purchase-receipt-select { color:#aab8cb; }
body[data-theme='dark'] .purchase-receipt-select:hover { border-color:#405573; background:#182438; }
body[data-theme='dark'] .purchase-receipt-select > span { border-color:#52647c; background:#111a27; }
body[data-theme='dark'] .purchase-receipt-select input:checked + span { border-color:#6e9cff; background:#3977f2; }
body[data-theme='dark'] .purchase-receipt-select:has(input:checked),body[data-theme='dark'] .purchase-receipt-selection-summary span b { color:#8bb0ff; }
body[data-theme='dark'] .purchase-receipt-selection-summary span { color:#d2dceb; }
body[data-theme='dark'] .document-line-table input:disabled,body[data-theme='dark'] .document-line-table select:disabled,body[data-theme='dark'] .document-line-table textarea:disabled { border-color:#2f3c50; color:#708097; background:#17202e; }

@media (max-width: 980px) {
  .action-modal.document-edit-modal .action-sheet { width:calc(100vw - 22px); max-height:calc(100vh - 22px); }
  .action-modal.document-edit-modal .action-body { padding:14px; }
  .document-edit-header-fields .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .purchase-edit-amount-grid { grid-template-columns:1fr 1fr; }
  .purchase-edit-amount-grid > label { grid-column:1 / -1; }
  .document-line-section > header { align-items:flex-start; flex-direction:column; }
  .document-line-section > header p { text-align:left; }
  .purchase-receipt-selection-summary { justify-items:start; min-width:0; }
  .purchase-receipt-selection-summary p { text-align:left; }
}
@media (max-width: 620px) {
  .document-edit-sheet-heading { align-items:flex-start; flex-direction:column; padding:14px; }
  .document-edit-header-fields { padding:14px; }
  .document-edit-header-fields .form-grid { grid-template-columns:1fr; }
  .purchase-edit-amounts { padding:14px; }
  .purchase-edit-amounts > header { flex-direction:column; gap:6px; }
  .purchase-edit-amounts > header p { text-align:left; }
  .purchase-edit-amount-grid { grid-template-columns:1fr; }
  .purchase-edit-amount-grid > label { grid-column:auto; }
  .document-line-section > header { padding:14px 14px 10px; }
  .document-line-scroll { margin:0 14px 14px; }
}

@media (prefers-reduced-motion:reduce) {
  .purchase-receipt-document-table tbody tr td,.purchase-receipt-select > span { transition:none; }
}
@media (forced-colors:active) {
  .purchase-receipt-select input:checked + span { color:HighlightText; background:Highlight; forced-color-adjust:none; }
  .purchase-receipt-document-table tbody tr.is-selected td:first-child { box-shadow:inset 3px 0 Highlight; }
}

/* 仓库产品进出汇总台账：筛选、四段库存口径与逐格穿透共用一张正式表。 */
.warehouse-product-ledger { grid-column:1/-1; min-width:0; padding:0; overflow:hidden; }
.warehouse-ledger-head { display:flex; align-items:flex-start; justify-content:space-between; gap:28px; padding:22px 24px 18px; border-bottom:1px solid #e4eaf2; }
.warehouse-ledger-head > div { display:grid; gap:4px; min-width:0; }
.warehouse-ledger-head small { color:#267c68; font-size:10px; font-weight:850; letter-spacing:.04em; }
.warehouse-ledger-head h2 { margin:0; color:#182942; font-size:21px; letter-spacing:-.025em; }
.warehouse-ledger-head p { max-width:820px; margin:0; color:#68778d; font-size:11px; line-height:1.6; }
.warehouse-ledger-head > span { display:flex; align-items:center; gap:7px; flex:none; padding:7px 10px; border:1px solid #d9e6e2; border-radius:999px; color:#28725f; background:#f2faf7; font-size:10px; font-weight:750; }
.warehouse-ledger-head > span svg { width:14px; height:14px; }
.warehouse-ledger-filters { display:grid; grid-template-columns:repeat(4,minmax(145px,1fr)) auto; align-items:end; gap:12px; padding:16px 24px; background:#f8fafc; }
.warehouse-ledger-filters label { display:grid; gap:6px; min-width:0; }
.warehouse-ledger-filters label > span { color:#52647d; font-size:9.5px; font-weight:800; }
.warehouse-ledger-filters input,.warehouse-ledger-filters select { box-sizing:border-box; width:100%; min-height:39px; padding:8px 10px; border:1px solid #d4deeb; border-radius:9px; outline:0; color:#243750; background:#fff; font:inherit; font-size:11px; }
.warehouse-ledger-filters input:focus,.warehouse-ledger-filters select:focus { border-color:#6d95e8; box-shadow:0 0 0 3px rgba(47,111,242,.09); }
.warehouse-ledger-filters > div { display:flex; align-items:center; gap:8px; }
.warehouse-ledger-filters button { min-height:39px; padding:8px 13px; white-space:nowrap; }
.warehouse-ledger-filters button svg { width:14px; height:14px; }
.warehouse-ledger-status { display:flex; align-items:center; gap:20px; min-height:38px; padding:8px 24px; border-top:1px solid #eef2f6; border-bottom:1px solid #dfe6ef; color:#65758b; background:#fff; font-size:9.5px; }
.warehouse-ledger-status > span { flex:none; color:#33465f; }
.warehouse-ledger-status > span b { color:#1f65d6; font-size:13px; }
.warehouse-ledger-status p { margin:0; }
.warehouse-ledger-status p b { color:#3c506c; }
.warehouse-ledger-status em { margin-left:auto; color:#26725f; font-style:normal; font-weight:750; white-space:nowrap; }
[data-warehouse-ledger-results] { min-height:180px; transition:opacity .16s ease; }
[data-warehouse-ledger-results].is-loading { opacity:.55; pointer-events:none; }
.warehouse-ledger-scroll { max-height:calc(100vh - 345px); overflow:auto; scrollbar-gutter:stable; background:#fff; }
.warehouse-ledger-table { width:100%; min-width:1540px; border-collapse:separate; border-spacing:0; table-layout:fixed; }
.warehouse-ledger-table th,.warehouse-ledger-table td { box-sizing:border-box; border-right:1px solid #e8edf3; border-bottom:1px solid #e7edf4; }
.warehouse-ledger-table thead th { position:sticky; z-index:5; height:35px; padding:8px 9px; color:#5c6c82; background:#f3f6fa; font-size:9px; font-weight:850; text-align:center; white-space:nowrap; }
.warehouse-ledger-table thead tr:first-child th { top:0; }
.warehouse-ledger-table thead tr:nth-child(2) th { top:35px; }
.warehouse-ledger-table thead th:first-child { left:0; z-index:8; width:250px; text-align:left; }
.warehouse-ledger-table thead th.is-opening { background:#f3f5f8; }
.warehouse-ledger-table thead th.is-inbound { color:#256d59; background:#edf8f4; }
.warehouse-ledger-table thead th.is-outbound { color:#8a5a22; background:#fff5e9; }
.warehouse-ledger-table thead th.is-closing { color:#2e5fae; background:#eef4ff; }
.warehouse-ledger-product-row > th { position:sticky; left:0; z-index:3; width:250px; padding:11px 13px; color:#243750; background:#fff; text-align:left; vertical-align:middle; }
.warehouse-ledger-product-row:nth-of-type(even) > th,.warehouse-ledger-product-row:nth-of-type(even) > td { background:#fbfcfe; }
.warehouse-ledger-product-row.is-expanded > th,.warehouse-ledger-product-row.is-expanded > td { background:#f4f8ff; }
.warehouse-ledger-product-row > th b,.warehouse-ledger-product-row > th small,.warehouse-ledger-product-row > th em { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.warehouse-ledger-product-row > th b { color:#1e304b; font-size:10.5px; }
.warehouse-ledger-product-row > th small { margin-top:3px; color:#718097; font-size:8.5px; font-weight:650; }
.warehouse-ledger-product-row > th em { margin-top:5px; color:#3d7a6c; font-size:8px; font-style:normal; font-weight:750; }
.warehouse-ledger-product-row > td { width:107px; height:62px; padding:0; color:#30435e; background:#fff; text-align:right; vertical-align:stretch; }
.warehouse-ledger-metric { display:grid; align-content:center; justify-items:end; gap:4px; width:100%; height:100%; min-height:61px; padding:9px 10px; border:0; outline:0; color:inherit; background:transparent; cursor:pointer; transition:background-color .16s ease,box-shadow .16s ease,color .16s ease; }
.warehouse-ledger-metric b { font-size:10px; font-variant-numeric:tabular-nums; }
.warehouse-ledger-metric i { padding:2px 4px; border-radius:4px; color:#986215; background:#fff1d5; font-size:7.5px; font-style:normal; }
.warehouse-ledger-metric:hover,.warehouse-ledger-metric:focus-visible,.warehouse-ledger-metric[aria-expanded="true"] { color:#185fd2; background:#edf4ff; box-shadow:inset 0 0 0 1px #93b4ee; }
.warehouse-ledger-private { display:grid; place-items:center; width:100%; height:100%; min-height:61px; color:#a2adbb; background:repeating-linear-gradient(135deg,transparent 0 8px,#f7f8fa 8px 9px); font-size:12px; }
.warehouse-ledger-detail-row > td { padding:0; border-right:0; background:#f1f6ff; }
.warehouse-ledger-detail-row > td > section { display:grid; gap:10px; margin:10px 14px 14px; overflow:hidden; border:1px solid #cfdcf0; border-radius:11px; background:#fff; box-shadow:0 8px 22px rgba(35,67,111,.06); animation:warehouse-ledger-reveal .18s ease-out; }
.warehouse-ledger-detail-row section > header { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:11px 13px 0; }
.warehouse-ledger-detail-row section > header div { display:grid; gap:2px; }
.warehouse-ledger-detail-row section > header small { color:#718198; font-size:8.5px; }
.warehouse-ledger-detail-row section > header b { color:#1f3554; font-size:11px; }
.warehouse-ledger-detail-row section > header button { display:flex; align-items:center; gap:5px; padding:6px 8px; border:1px solid #d4deeb; border-radius:8px; color:#526883; background:#fff; font-size:9px; cursor:pointer; }
.warehouse-ledger-detail-row section > header button svg { width:12px; height:12px; transform:rotate(-90deg); }
.warehouse-ledger-detail-row section > p { margin:0; padding:2px 13px 13px; color:#73839a; font-size:9.5px; }
.warehouse-ledger-detail-scroll { max-height:300px; overflow:auto; border-top:1px solid #e3eaf3; }
.warehouse-ledger-detail-scroll table { width:100%; min-width:860px; border-collapse:collapse; }
.warehouse-ledger-detail-scroll th,.warehouse-ledger-detail-scroll td { position:static; height:auto; padding:8px 10px; border-right:0; border-bottom:1px solid #edf1f6; color:#42546d; background:#fff; font-size:8.8px; text-align:left; }
.warehouse-ledger-detail-scroll thead th { position:sticky; top:0; z-index:1; color:#63738a; background:#f7f9fc; }
.warehouse-ledger-detail-scroll td:nth-child(4),.warehouse-ledger-detail-scroll td:nth-child(5),.warehouse-ledger-detail-scroll td:nth-child(6) { text-align:right; font-variant-numeric:tabular-nums; }
.warehouse-ledger-detail-scroll td:last-child b,.warehouse-ledger-detail-scroll td:last-child small { display:block; }
.warehouse-ledger-detail-scroll td:last-child small { margin-top:2px; color:#8491a3; font-size:8px; }
.warehouse-ledger-direction { display:inline-flex; padding:3px 6px; border-radius:999px; font-size:8px; font-weight:850; }
.warehouse-ledger-direction.is-in { color:#24715c; background:#e8f7f1; }
.warehouse-ledger-direction.is-out { color:#9a5e1e; background:#fff1df; }
.warehouse-ledger-empty { display:grid; justify-items:center; gap:5px; padding:54px 24px; color:#7a899d; text-align:center; }
.warehouse-ledger-empty svg { width:24px; height:24px; margin-bottom:4px; color:#7893b7; }
.warehouse-ledger-empty b { color:#31455f; font-size:12px; }
.warehouse-ledger-empty span { font-size:9.5px; }
@keyframes warehouse-ledger-reveal { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }

body[data-theme='dark'] .warehouse-product-ledger,body[data-theme='dark'] .warehouse-ledger-status,body[data-theme='dark'] .warehouse-ledger-scroll,body[data-theme='dark'] .warehouse-ledger-product-row > th,body[data-theme='dark'] .warehouse-ledger-product-row > td { border-color:#2c394d; background:#111a27; }
body[data-theme='dark'] .warehouse-ledger-head,body[data-theme='dark'] .warehouse-ledger-filters { border-color:#2e3b4f; background:#151f2d; }
body[data-theme='dark'] .warehouse-ledger-head h2,body[data-theme='dark'] .warehouse-ledger-product-row > th b,body[data-theme='dark'] .warehouse-ledger-detail-row section > header b,body[data-theme='dark'] .warehouse-ledger-empty b { color:#e3ebf6; }
body[data-theme='dark'] .warehouse-ledger-filters input,body[data-theme='dark'] .warehouse-ledger-filters select { border-color:#35465f; color:#e0e8f3; background:#0f1724; }
body[data-theme='dark'] .warehouse-ledger-table th,body[data-theme='dark'] .warehouse-ledger-table td { border-color:#283649; }
body[data-theme='dark'] .warehouse-ledger-table thead th { color:#9aabc1; background:#182334; }
body[data-theme='dark'] .warehouse-ledger-table thead th.is-inbound { color:#8dd1bc; background:#17342f; }
body[data-theme='dark'] .warehouse-ledger-table thead th.is-outbound { color:#e2b071; background:#35281b; }
body[data-theme='dark'] .warehouse-ledger-table thead th.is-closing { color:#a9c7f5; background:#1c2d49; }
body[data-theme='dark'] .warehouse-ledger-product-row:nth-of-type(even) > th,body[data-theme='dark'] .warehouse-ledger-product-row:nth-of-type(even) > td { background:#141e2c; }
body[data-theme='dark'] .warehouse-ledger-product-row.is-expanded > th,body[data-theme='dark'] .warehouse-ledger-product-row.is-expanded > td { background:#172744; }
body[data-theme='dark'] .warehouse-ledger-metric:hover,body[data-theme='dark'] .warehouse-ledger-metric:focus-visible,body[data-theme='dark'] .warehouse-ledger-metric[aria-expanded="true"] { color:#9fc1ff; background:#1c2f4e; box-shadow:inset 0 0 0 1px #4d72ad; }
body[data-theme='dark'] .warehouse-ledger-private { background:repeating-linear-gradient(135deg,transparent 0 8px,#172130 8px 9px); }
body[data-theme='dark'] .warehouse-ledger-detail-row > td { background:#121e30; }
body[data-theme='dark'] .warehouse-ledger-detail-row > td > section,body[data-theme='dark'] .warehouse-ledger-detail-scroll th,body[data-theme='dark'] .warehouse-ledger-detail-scroll td { border-color:#304057; background:#111a27; color:#cbd6e5; }
body[data-theme='dark'] .warehouse-ledger-detail-scroll thead th { background:#182334; }
body[data-theme='dark'] .warehouse-ledger-detail-row section > header button { border-color:#3d4d65; color:#b8c8df; background:#182334; }

@media (max-width:1100px) {
  .warehouse-ledger-head { align-items:flex-start; flex-direction:column; gap:12px; }
  .warehouse-ledger-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .warehouse-ledger-filters > div { grid-column:1/-1; }
  .warehouse-ledger-scroll { max-height:none; }
}
@media (max-width:620px) {
  .warehouse-ledger-head,.warehouse-ledger-filters { padding:15px; }
  .warehouse-ledger-filters { grid-template-columns:1fr; }
  .warehouse-ledger-filters > div { grid-column:auto; }
  .warehouse-ledger-status { align-items:flex-start; flex-direction:column; gap:4px; padding:10px 15px; }
  .warehouse-ledger-status em { margin-left:0; }
}
@media (prefers-reduced-motion:reduce) {
  [data-warehouse-ledger-results],.warehouse-ledger-metric { transition:none; }
  .warehouse-ledger-detail-row > td > section { animation:none; }
}

/* v45 · 全站横排文字完整性
   中文允许正常横向成行，但任何控件、表头或状态短标签都不得被挤成逐字竖排。 */
body :where(button,a,label,legend,th,td,caption,summary,p,h1,h2,h3,h4,h5,h6,span,b,strong,small,em,li,dt,dd) {
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
}
body :where(
  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button,
  .copilot-header-action,
  .operational-primary,
  .ledger-sort,
  [class*="status-chip"],
  [class*="status-pill"],
  [class*="status-badge"]
) {
  white-space:nowrap !important;
  word-break:keep-all !important;
  overflow-wrap:normal !important;
}
body th {
  white-space:nowrap;
  word-break:keep-all;
  overflow-wrap:normal;
}

/* v46 · 小奥真实中断与文档智能翻译工作台 */
#copilotConsoleComposer .copilot-composer-actions {
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer .copilot-interrupt-button {
  min-width:auto;
  border:1px solid #efb5bd;
  color:#b42335;
  background:#fff7f8;
  box-shadow:none;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer .copilot-interrupt-button:hover:not(:disabled) {
  border-color:#d94c5f;
  background:#fff0f2;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer .copilot-interrupt-button svg,
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer .copilot-interrupt-button > span {
  width:13px;
  color:inherit;
  font-size:12px;
}
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer .copilot-interrupt-button > span { width:auto; }

.document-studio-workspace {
  display:grid;
  gap:18px;
  max-width:1260px;
  margin:0 auto;
  color:#17243a;
}
.document-studio-heading {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding:22px 24px;
  border:1px solid #dce4f0;
  border-radius:18px;
  background:#fff;
  box-shadow:0 12px 32px rgba(24,48,88,.06);
}
.document-studio-heading > div:first-child { display:flex; align-items:flex-start; gap:15px; min-width:0; }
.document-studio-heading > div:first-child > span {
  display:grid;
  place-items:center;
  flex:0 0 48px;
  width:48px;
  height:48px;
  border-radius:14px;
  color:#fff;
  background:#2f6ff2;
}
.document-studio-heading svg { width:23px; height:23px; }
.document-studio-heading small { display:block; margin-bottom:5px; color:#2f6ff2; font-weight:750; }
.document-studio-heading h2 { margin:0; font-size:22px; line-height:1.25; }
.document-studio-heading p { max-width:720px; margin:7px 0 0; color:#66758c; line-height:1.65; }
.document-studio-badges { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.document-studio-badges span { padding:6px 9px; border:1px solid #dbe4f2; border-radius:999px; color:#52647d; background:#f8fafd; font-size:11px; }
.document-studio-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.72fr); gap:18px; }
.document-studio-form,.document-studio-progress,.document-studio-output {
  border:1px solid #dce4f0;
  border-radius:18px;
  background:#fff;
  box-shadow:0 12px 32px rgba(24,48,88,.055);
}
.document-studio-form { display:grid; gap:18px; padding:24px; }
.document-studio-drop {
  display:grid;
  place-items:center;
  min-height:240px;
  padding:28px;
  border:1.5px dashed #b9c9e5;
  border-radius:16px;
  text-align:center;
  background:#f8faff;
  cursor:pointer;
  transition:border-color .16s ease, background .16s ease, transform .16s ease;
}
.document-studio-drop:hover,.document-studio-drop.is-dragover { border-color:#2f6ff2; background:#f0f5ff; transform:translateY(-1px); }
.document-studio-drop input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.document-studio-drop > span { display:grid; place-items:center; width:52px; height:52px; margin-bottom:12px; border:1px solid #cfdbef; border-radius:15px; color:#2f6ff2; background:#fff; }
.document-studio-drop svg { width:24px; height:24px; }
.document-studio-drop b { max-width:100%; overflow:hidden; color:#17243a; font-size:16px; text-overflow:ellipsis; white-space:nowrap; }
.document-studio-drop small { margin-top:7px; color:#708099; }
.document-studio-drop em { margin-top:15px; padding:7px 11px; border:1px solid #c8d6eb; border-radius:9px; color:#315f9b; background:#fff; font-style:normal; font-weight:700; }
.document-studio-options { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.document-studio-options label { display:grid; gap:7px; color:#43536a; font-size:12px; font-weight:700; }
.document-studio-options select { min-height:43px; padding:0 12px; border:1px solid #ccd8e9; border-radius:10px; color:#17243a; background:#fff; font:inherit; }
.document-studio-check { display:flex; align-items:flex-start; gap:10px; padding:13px 14px; border:1px solid #dbe4f1; border-radius:12px; background:#f9fbfd; }
.document-studio-check input { width:17px; height:17px; margin-top:2px; accent-color:#2f6ff2; }
.document-studio-check span { display:grid; gap:3px; }
.document-studio-check b { color:#26364d; }
.document-studio-check small { color:#75849a; line-height:1.5; }
.document-studio-actions { display:flex; align-items:center; gap:10px; }
.document-studio-actions button { min-height:42px; padding:0 16px; border-radius:10px; font-weight:750; cursor:pointer; }
.document-studio-actions .primary-button { display:inline-flex; align-items:center; gap:8px; border:0; color:#fff; background:#2f6ff2; }
.document-studio-actions svg { width:16px; height:16px; }
.document-studio-interrupt { display:inline-flex; align-items:center; gap:8px; border:1px solid #efb5bd; color:#b42335; background:#fff7f8; }
.document-studio-interrupt > span { width:11px; height:11px; border-radius:2px; background:currentColor; }
.document-studio-progress { padding:22px; }
.document-studio-progress > header { display:flex; justify-content:space-between; gap:12px; color:#74849a; }
.document-studio-progress > header em { max-width:190px; overflow:hidden; color:#53647c; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.document-studio-status-icon { display:grid; place-items:center; width:44px; height:44px; margin-top:34px; border-radius:13px; color:#2f6ff2; background:#edf3ff; }
.document-studio-status-icon svg { width:21px; height:21px; }
.document-studio-progress h3 { margin:16px 0 7px; font-size:18px; }
.document-studio-progress > p { min-height:42px; margin:0; color:#697991; line-height:1.6; }
.document-studio-progress-line { position:relative; height:4px; margin:18px 0; overflow:hidden; border-radius:999px; background:#e5ebf4; }
.document-studio-progress-line i { position:absolute; inset:0 auto 0 0; width:38%; border-radius:inherit; background:#2f6ff2; animation:document-studio-progress 1.25s ease-in-out infinite alternate; }
@keyframes document-studio-progress { from { transform:translateX(-45%); } to { transform:translateX(210%); } }
.document-studio-progress ol { display:grid; gap:0; margin:24px 0 0; padding:0; list-style:none; }
.document-studio-progress li { position:relative; display:grid; grid-template-columns:18px 1fr; gap:10px; min-height:62px; color:#7b899c; }
.document-studio-progress li > i { position:relative; z-index:1; width:11px; height:11px; margin-top:4px; border:2px solid #c8d3e3; border-radius:50%; background:#fff; }
.document-studio-progress li:not(:last-child)::after { content:""; position:absolute; top:15px; bottom:-1px; left:5px; width:1px; background:#dce4ef; }
.document-studio-progress li span { display:grid; align-content:start; gap:3px; }
.document-studio-progress li b { color:#53637a; }
.document-studio-progress li small { line-height:1.5; }
.document-studio-progress li.done > i,.document-studio-progress li.active > i { border-color:#2f6ff2; background:#2f6ff2; }
.document-studio-progress li.done b,.document-studio-progress li.active b { color:#17243a; }
.document-studio-workspace[data-document-studio-status="completed"] .document-studio-status-icon { color:#147f6b; background:#eaf7f3; }
.document-studio-workspace[data-document-studio-status="error"] .document-studio-status-icon,
.document-studio-workspace[data-document-studio-status="interrupted"] .document-studio-status-icon { color:#b42335; background:#fff0f2; }
.document-studio-output { padding:22px 24px; }
.document-studio-output > header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.document-studio-output h3 { margin:4px 0 0; }
.document-studio-output > header span { padding:6px 9px; border-radius:8px; color:#52647c; background:#f1f4f8; font-size:11px; }
.document-studio-output .copilot-generated-artifacts { margin-top:16px; }
.document-studio-empty { display:flex; align-items:center; gap:11px; margin-top:16px; padding:14px; border:1px solid #e0e7f1; border-radius:12px; color:#68788f; background:#fafbfd; }
.document-studio-empty svg { flex:0 0 18px; width:18px; height:18px; color:#288b74; }
.document-studio-empty p { margin:0; line-height:1.6; }
body[data-theme="dark"] .document-studio-heading,
body[data-theme="dark"] .document-studio-form,
body[data-theme="dark"] .document-studio-progress,
body[data-theme="dark"] .document-studio-output { border-color:#31415a; color:#edf2fa; background:#121b2a; }
body[data-theme="dark"] .document-studio-drop { border-color:#405474; background:#162235; }
body[data-theme="dark"] .document-studio-drop b,
body[data-theme="dark"] .document-studio-options select,
body[data-theme="dark"] .document-studio-progress h3 { color:#edf2fa; }
body[data-theme="dark"] .document-studio-options select { border-color:#40516b; background:#152033; }
body[data-theme="dark"] .document-studio-check,
body[data-theme="dark"] .document-studio-empty { border-color:#31415a; background:#172235; }
@media (max-width:900px) {
  .document-studio-heading { flex-direction:column; }
  .document-studio-badges { justify-content:flex-start; }
  .document-studio-grid { grid-template-columns:1fr; }
}
@media (max-width:620px) {
  .document-studio-heading,.document-studio-form,.document-studio-progress,.document-studio-output { padding:17px; border-radius:14px; }
  .document-studio-options { grid-template-columns:1fr; }
  .document-studio-actions { align-items:stretch; flex-direction:column; }
  .document-studio-actions button { justify-content:center; }
  #copilotConsoleComposer .copilot-composer-actions { width:100%; }
  body.copilot-mode .copilot-chat-primary #copilotConsoleComposer .copilot-interrupt-button { flex:1; }
}
@media (prefers-reduced-motion:reduce) {
  .document-studio-progress-line i { animation:none; width:100%; transform:none; }
  .document-studio-drop { transition:none; }
}

/* v51 · 文档原版式直译：上传原文件，完成后直接下载同格式译稿 */
.document-studio-commandbar {
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) minmax(180px,1.15fr) auto;
  gap:12px;
  margin:16px 0;
  padding:16px 18px;
  border:1px solid #dce4f0;
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 28px rgba(24,48,88,.045);
}
.document-studio-commandbar > label:not(.document-studio-inline-check) { display:grid; gap:7px; color:#5d6d84; font-size:12px; font-weight:750; }
.document-studio-commandbar select { min-width:0; min-height:42px; padding:0 36px 0 12px; border:1px solid #ccd8e9; border-radius:10px; color:#17243a; background:#fff; font:inherit; }
.document-studio-inline-check { display:flex; align-items:center; align-self:end; min-height:42px; gap:9px; padding:0 13px; border:1px solid #d7e1ef; border-radius:10px; color:#3f5169; background:#f8fafd; font-weight:700; white-space:nowrap; }
.document-studio-inline-check input { width:17px; height:17px; accent-color:#2f6ff2; }
.document-studio-main { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(320px,.72fr); align-items:start; gap:18px; }
.document-studio-batch,.document-studio-inspector { min-width:0; overflow:hidden; border:1px solid #dce4f0; border-radius:18px; background:#fff; box-shadow:0 12px 32px rgba(24,48,88,.055); }
.document-studio-batch > header { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; padding:20px 22px 15px; border-bottom:1px solid #e6ebf3; }
.document-studio-batch > header small { display:block; margin-bottom:4px; color:#2f6ff2; font-weight:750; }
.document-studio-batch > header h3 { margin:0; color:#17243a; font-size:18px; }
.document-studio-batch > header > span { color:#74839a; font-size:12px; }
.document-studio-batch .document-studio-drop { grid-template-columns:52px minmax(0,1fr) auto; place-items:center stretch; min-height:154px; margin:18px 20px; padding:24px; text-align:left; }
.document-studio-batch .document-studio-drop > span { margin:0 16px 0 0; }
.document-studio-batch .document-studio-drop > div { display:grid; min-width:0; gap:6px; }
.document-studio-batch .document-studio-drop > div b { display:block; }
.document-studio-batch .document-studio-drop > div small { margin:0; line-height:1.55; }
.document-studio-batch .document-studio-drop > em { justify-self:end; margin:0 0 0 18px; }
.document-studio-queue-empty { display:grid; place-items:center; min-height:142px; margin:0 20px 18px; color:#7a899e; text-align:center; }
.document-studio-queue-empty svg { width:25px; height:25px; margin-bottom:10px; color:#8194b0; }
.document-studio-queue-empty b { color:#42536b; }
.document-studio-queue-empty span { margin-top:5px; font-size:12px; }
.document-studio-queue { display:grid; margin:0 20px 18px; overflow:hidden; border:1px solid #e0e7f1; border-radius:13px; }
.document-studio-queue-row { display:grid; grid-template-columns:48px minmax(0,1fr) 76px auto; align-items:center; gap:12px; min-height:68px; padding:10px 12px; border-bottom:1px solid #e7ecf3; background:#fff; transition:background-color 140ms ease, transform 140ms cubic-bezier(.23,1,.32,1); }
.document-studio-queue-row:last-child { border-bottom:0; }
.document-studio-queue-row.is-completed { background:#fbfefd; }
.document-studio-format { display:grid; place-items:center; width:44px; height:36px; border-radius:9px; color:#2f6ff2; background:#eef4ff; font-size:11px; font-weight:800; }
.document-studio-queue-row > div { display:grid; min-width:0; gap:4px; }
.document-studio-queue-row > div b,.document-studio-queue-row > div small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.document-studio-queue-row > div b { color:#213149; }
.document-studio-queue-row > div small { color:#74849a; }
.document-studio-queue-row > em { color:#66778e; font-size:12px; font-style:normal; text-align:right; }
.document-studio-queue-row > button { display:grid; place-items:center; width:36px; height:36px; border:1px solid #dbe4f1; border-radius:9px; color:#718199; background:#fff; cursor:pointer; }
.document-studio-queue-row > button svg { width:15px; height:15px; }
.document-studio-download { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-width:112px; min-height:38px; padding:0 12px; border-radius:9px; color:#fff; background:#2f6ff2; font-size:12px; font-weight:800; text-decoration:none; box-shadow:0 7px 16px rgba(47,111,242,.18); }
.document-studio-download svg { width:15px; height:15px; }
.document-studio-batch > .document-studio-actions { min-height:68px; padding:12px 20px; border-top:1px solid #e5ebf3; background:#fbfcfe; }
.document-studio-batch > .document-studio-actions p { flex:1; margin:0; color:#6c7d94; font-size:12px; line-height:1.5; }
.document-studio-inspector > nav { display:flex; align-items:center; justify-content:space-between; min-height:58px; padding:0 12px 0 16px; border-bottom:1px solid #e5eaf2; }
.document-studio-inspector > nav > div { display:flex; gap:4px; }
.document-studio-inspector > nav button { min-height:34px; padding:0 10px; border:0; border-radius:8px; color:#64758d; background:transparent; font-weight:750; cursor:pointer; }
.document-studio-inspector > nav button.is-active { color:#245fca; background:#edf3ff; }
.document-studio-inspector > nav > button:last-child { display:grid; place-items:center; width:34px; padding:0; border:1px solid #dce4f0; }
.document-studio-inspector > nav svg { width:15px; height:15px; }
.document-studio-inspector-body { min-height:360px; max-height:560px; overflow:auto; padding:8px 12px 14px; }
.document-studio-history { display:grid; }
.document-studio-history > a,.document-studio-history > div { display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:62px; padding:8px 6px; border-bottom:1px solid #edf0f5; color:inherit; text-decoration:none; }
.document-studio-history > a:last-child,.document-studio-history > div:last-child { border-bottom:0; }
.document-studio-history > a:hover { background:#f7faff; }
.document-studio-history-state { display:grid; place-items:center; width:32px; height:32px; border-radius:9px; color:#55708f; background:#f0f4f8; }
.document-studio-history-state.is-completed { color:#167b65; background:#e9f7f2; }
.document-studio-history-state.is-failed { color:#b42335; background:#fff0f2; }
.document-studio-history-state svg { width:15px; height:15px; }
.document-studio-history > a > span:nth-child(2),.document-studio-history > div > span:nth-child(2) { display:grid; min-width:0; gap:4px; }
.document-studio-history b,.document-studio-history small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.document-studio-history b { color:#273850; }
.document-studio-history small { color:#7a899d; }
.document-studio-history em { display:inline-flex; align-items:center; gap:5px; color:#2f6ff2; font-size:12px; font-style:normal; font-weight:800; white-space:nowrap; }
.document-studio-history em svg { width:14px; height:14px; }
.document-studio-panel-empty { display:grid; place-items:center; min-height:220px; color:#7a899d; text-align:center; }
.document-studio-library-list,.document-studio-memory { display:grid; }
.document-studio-library-list > button,.document-studio-memory > article { min-height:58px; padding:10px 8px; border:0; border-bottom:1px solid #edf0f5; color:inherit; background:transparent; text-align:left; }
.document-studio-library-list > button { display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; }
.document-studio-library-list > button > span { display:grid; gap:4px; }
.document-studio-library-list b { color:#273850; }
.document-studio-library-list small,.document-studio-library-list em { color:#78889d; font-style:normal; }
.document-studio-glossary-editor { display:grid; gap:12px; padding:8px; }
.document-studio-glossary-editor > header { display:flex; align-items:center; gap:8px; }
.document-studio-glossary-editor label { display:grid; gap:6px; color:#53647c; font-size:12px; font-weight:700; }
.document-studio-glossary-editor input,.document-studio-glossary-editor select,.document-studio-glossary-editor textarea { width:100%; min-width:0; padding:10px 11px; border:1px solid #ced9e9; border-radius:9px; color:#1f3048; background:#fff; font:inherit; }
.document-studio-glossary-languages { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.document-studio-glossary-editor footer { display:flex; gap:8px; }

body[data-theme="dark"] .document-studio-commandbar,body[data-theme="dark"] .document-studio-batch,body[data-theme="dark"] .document-studio-inspector { border-color:#31415a; color:#edf2fa; background:#121b2a; }
body[data-theme="dark"] .document-studio-commandbar select,body[data-theme="dark"] .document-studio-glossary-editor input,body[data-theme="dark"] .document-studio-glossary-editor select,body[data-theme="dark"] .document-studio-glossary-editor textarea { border-color:#40516b; color:#edf2fa; background:#152033; }
body[data-theme="dark"] .document-studio-queue-row { border-color:#293950; background:#131e2e; }
body[data-theme="dark"] .document-studio-queue-row.is-completed { background:#13251f; }
body[data-theme="dark"] .document-studio-history b,body[data-theme="dark"] .document-studio-queue-row > div b,body[data-theme="dark"] .document-studio-batch > header h3 { color:#edf2fa; }

@media (max-width:1100px) {
  .document-studio-commandbar { grid-template-columns:1fr 1fr; }
  .document-studio-main { grid-template-columns:1fr; }
  .document-studio-inspector-body { min-height:220px; max-height:420px; }
}
@media (max-width:680px) {
  .document-studio-commandbar { grid-template-columns:1fr; padding:14px; }
  .document-studio-batch .document-studio-drop { grid-template-columns:46px minmax(0,1fr); min-height:140px; margin:14px; padding:18px; }
  .document-studio-batch .document-studio-drop > em { grid-column:1 / -1; justify-self:stretch; margin:14px 0 0; text-align:center; }
  .document-studio-queue { margin:0 14px 14px; }
  .document-studio-queue-row { grid-template-columns:42px minmax(0,1fr) auto; }
  .document-studio-queue-row > em { display:none; }
  .document-studio-download { min-width:38px; padding:0 10px; }
  .document-studio-download span { display:none; }
}

/* 全系统菜单导出：固定在顶部上下文区，作为克制的次级动作，避免和“新建”争夺主视觉。 */
.menu-data-export{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:36px;padding:0 12px;border:1px solid #d8e2ef;border-radius:10px;color:#315477;background:#fff;box-shadow:0 2px 7px rgba(23,43,71,.035);font-size:10px;font-weight:750;white-space:nowrap;cursor:pointer;transition:border-color .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease}
.menu-data-export svg{width:15px;height:15px}.menu-data-export:hover:not(:disabled){border-color:#9fb8dd;color:#245fbd;background:#f7faff;box-shadow:0 5px 13px rgba(47,111,242,.08)}.menu-data-export:focus-visible{outline:2px solid rgba(47,111,242,.35);outline-offset:2px}.menu-data-export:disabled,.menu-data-export[aria-busy="true"]{cursor:wait;color:#8b99aa;background:#f4f6f9;border-color:#e0e6ee;box-shadow:none}.menu-data-export[aria-busy="true"] svg{animation:menu-export-pulse .9s ease-in-out infinite alternate}
@keyframes menu-export-pulse{to{transform:translateY(2px);opacity:.48}}
body.board-mode .menu-data-export{border-color:#28424e;color:#b9cbd2;background:#102631}body.board-mode .menu-data-export:hover:not(:disabled){border-color:#496a77;color:#fff;background:#17313d}
body[data-theme="dark"] .menu-data-export{border-color:#33445f;color:#c4d2e8;background:#131a26}body[data-theme="dark"] .menu-data-export:hover:not(:disabled){border-color:#50688c;color:#eaf1ff;background:#1a2333}
@media(max-width:1040px){.menu-data-export span{display:none}.menu-data-export{width:36px;padding:0}}
@media(max-width:720px){.menu-data-export{width:40px;height:40px}}

/* v84 · Apus One 视觉引导：中性灰工作区、清晰回复层级与完整暗色主题。 */
.rail-theme-switch {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  width:100%;
  padding:3px;
  gap:3px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:11px;
  background:rgba(4,12,27,.24);
}
.rail-theme-switch button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:0;
  height:31px;
  padding:0 6px;
  border:0;
  border-radius:8px;
  color:#8998ad;
  background:transparent;
  font:inherit;
  font-size:9px;
  font-weight:700;
  cursor:pointer;
  transition:color .16s ease,background-color .16s ease,transform .16s ease;
}
.rail-theme-switch button:hover { color:#e4e9ef; background:rgba(255,255,255,.065); }
.rail-theme-switch button:active { transform:translateY(1px); }
.rail-theme-switch button.is-active { color:#eef1f4; background:rgba(255,255,255,.13); box-shadow:0 1px 5px rgba(1,8,18,.2); }
.rail-theme-switch svg { width:13px; height:13px; flex:none; }
body[data-rail="light"] .rail-theme-switch { border-color:#dbe2ea; background:#eef1f4; }
body[data-rail="light"] .rail-theme-switch button { color:#768293; }
body[data-rail="light"] .rail-theme-switch button:hover { color:#253042; background:rgba(255,255,255,.68); }
body[data-rail="light"] .rail-theme-switch button.is-active { color:#1e2a3b; background:#fdfcf9; box-shadow:0 1px 5px rgba(24,36,52,.09); }

body.copilot-mode,
body.copilot-mode .app-shell,
body.copilot-mode .workspace,
body.copilot-mode .content,
body.copilot-mode #view-module,
body.copilot-mode #moduleSignature,
body.copilot-mode .copilot-console,
body.copilot-mode .copilot-chat-primary,
body.copilot-mode .copilot-chat-messages,
body.copilot-mode .copilot-chat-primary .copilot-chat-messages { background:#f1f3f5; }
body.copilot-mode .topbar,
body.copilot-mode .copilot-chat-primary > header { border-color:#dce1e6; background:rgba(248,249,250,.97); }
body.copilot-mode .copilot-chat-primary > header { padding-inline:22px; }
body.copilot-mode .copilot-header-tools {
  gap:5px;
  padding:4px;
  border:1px solid #dfe3e8;
  border-radius:13px;
  background:#eceff2;
}
body.copilot-mode .copilot-header-action,
body.copilot-mode .copilot-task-menu > summary,
body.copilot-mode .copilot-approval-menu > summary,
body.copilot-mode #copilotNewConversation,
body.copilot-mode .copilot-agent-button {
  min-height:34px;
  border-color:transparent !important;
  border-radius:9px;
  color:#3e4855 !important;
  background:transparent !important;
  box-shadow:none;
}
body.copilot-mode .copilot-header-action:hover,
body.copilot-mode .copilot-task-menu > summary:hover,
body.copilot-mode .copilot-approval-menu > summary:hover,
body.copilot-mode .copilot-agent-button:hover { color:#1d2733 !important; background:#f8f9fa !important; }
body.copilot-mode #copilotNewConversation {
  color:#f1f3f4 !important;
  background:#29333f !important;
}
body.copilot-mode #copilotNewConversation:hover { color:#fff !important; background:#1f2832 !important; }
body.copilot-mode .copilot-model-status {
  border-color:#cfe0d9;
  color:#2f6f5a;
  background:#e5f1ec;
}
body.copilot-mode .copilot-model-status i { background:#358f70; box-shadow:none; }
body.copilot-mode .copilot-chat-messages { padding-block:30px 42px; }
body.copilot-mode .copilot-chat-message.ai:not(.welcome) > .copilot-message-surface {
  padding:24px 26px 26px;
  border:1px solid #dce1e6;
  border-radius:18px;
  color:#303842;
  background:#f8f9fa;
  box-shadow:0 12px 30px rgba(35,45,58,.055);
}
body.copilot-mode .copilot-chat-message.ai:not(.welcome) .copilot-message-author { margin-bottom:15px; }
body.copilot-mode .copilot-message-author > span { color:#596675; }
body.copilot-mode .copilot-response-lead {
  position:relative;
  margin:2px 0 22px;
  padding:18px 20px 18px 23px;
  border:1px solid #d7dce2;
  border-radius:13px;
  background:#eef1f4;
}
body.copilot-mode .copilot-response-lead::before {
  content:"";
  position:absolute;
  top:19px;
  left:-6px;
  width:11px;
  height:12px;
  background:#697786;
  clip-path:polygon(25% 6.7%,75% 6.7%,100% 50%,75% 93.3%,25% 93.3%,0 50%);
}
body.copilot-mode .copilot-response-lead small { color:#566473; letter-spacing:.06em; }
body.copilot-mode .copilot-response-lead p { color:#242b32; font-size:16px; line-height:1.75; }
body.copilot-mode .copilot-inline-heading { color:#252d35; }
body.copilot-mode .copilot-inline-heading::after { background:#d9dee4; }
body.copilot-mode .copilot-prose-list li::before {
  width:7px;
  height:7px;
  border:0;
  border-radius:1px;
  background:#697786;
  clip-path:polygon(25% 6.7%,75% 6.7%,100% 50%,75% 93.3%,25% 93.3%,0 50%);
}
body.copilot-mode .copilot-inline-table { border-color:#d9dee4; border-radius:13px; background:#f8f9fa; }
body.copilot-mode .copilot-inline-table th { color:#4c5661; background:#e8ebef; }
body.copilot-mode .copilot-inline-table td { border-color:#dde2e7; color:#444f5b; background:#f6f7f8; }
body.copilot-mode .copilot-inline-table tr:nth-child(even) td { background:#eef1f4; }
body.copilot-mode .copilot-chat-result {
  border-color:#d9dee4;
  color:#35404b;
  background:#eef1f4;
}
body.copilot-mode .copilot-chat-result small { color:#5c6977; }
body.copilot-mode .copilot-chat-result.warning { border-color:#e3cdd2; background:#f5ecee; }
body.copilot-mode .copilot-chat-result.verified { border-color:#cbded5; background:#eaf2ee; }
body.copilot-mode .copilot-route-actions button {
  border-color:#d8dde3;
  color:#3b4651;
  background:#f6f7f8;
  box-shadow:none;
}
body.copilot-mode .copilot-route-actions button:hover { border-color:#bcc5cf; background:#fbfcfd; transform:translateY(-1px); }
body.copilot-mode .copilot-route-actions button:nth-child(4n+1) > span:first-child { color:#397e75; background:#e3f0ec; }
body.copilot-mode .copilot-route-actions button:nth-child(4n+2) > span:first-child { color:#996824; background:#f3ead9; }
body.copilot-mode .copilot-route-actions button:nth-child(4n+3) > span:first-child { color:#72588f; background:#eee8f3; }
body.copilot-mode .copilot-route-actions button:nth-child(4n+4) > span:first-child { color:#9a5752; background:#f4e7e4; }
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions {
  border-color:#dce1e6;
  background:transparent;
}
body.copilot-mode .copilot-chat-composer { border-color:#dce1e6; background:#f1f3f5; }
body.copilot-mode .copilot-chat-suggestions button { border-color:#d7dde3; color:#4b5661; background:#f8f9fa; }
body.copilot-mode .copilot-chat-suggestions button:hover { color:#262e36; background:#fff; }
body.copilot-mode .copilot-chat-primary #copilotConsoleComposer { border-color:#d5dbe2; background:#f8f9fa; box-shadow:0 12px 30px rgba(35,45,58,.06); }

body[data-theme="dark"] {
  --surface:rgba(24,29,36,.96);
  --surface-strong:#181d24;
  --ink:#e5e8eb;
  --muted:#adb5bf;
  --quiet:#7f8995;
  --line:#2c343e;
  color:#e5e8eb;
  background:#0d1015;
}
body[data-theme="dark"] .app-shell,
body[data-theme="dark"] .module-signature { background:#11151b; }
body[data-theme="dark"] .workspace,
body[data-theme="dark"] .content,
body[data-theme="dark"] #view-module { background:#11151b; }
body[data-theme="dark"] :where(h1,h2,h3,h4) { color:#e5e8eb; }
body[data-theme="dark"] :is(#view-home,#view-today,#view-orders,#view-finance,#view-studio,#view-module) .page-intro h1,
body[data-theme="dark"] #view-module .module-page-intro h1 span { color:#e5e8eb; }
body[data-theme="dark"] :is(#view-home,#view-today,#view-orders,#view-finance,#view-studio,#view-module) .page-intro h1 em { color:#aeb7c0; }
body[data-theme="dark"] .topbar { border-color:#292f37; background:rgba(17,21,27,.96); }
body[data-theme="dark"] .system-reliability {
  border-color:#30463f;
  color:#b1d5c7;
  background:#1a2923;
}
body[data-theme="dark"] .system-reliability small { color:#7f9b91; }
body[data-theme="dark"] .system-reliability::before { background:#4ca883; box-shadow:none; }
body[data-theme="dark"] .menu-data-export { border-color:#313943; color:#cbd1d8; background:#1a2028; }
body[data-theme="dark"] .menu-data-export:hover:not(:disabled) { border-color:#48525e; color:#e7eaed; background:#202731; }
body[data-theme="dark"] .create-button { border-color:#323b46; color:#e8ebee; background:#222a34; box-shadow:none; }
body[data-theme="dark"] .first-visit-banner button,
body[data-theme="dark"] .journey-dock-open {
  border-color:#38424d;
  color:#d4d9de;
  background:#202731;
  box-shadow:none;
}
body[data-theme="dark"] .first-visit-banner button:hover,
body[data-theme="dark"] .journey-dock-open:hover { border-color:#52606d; color:#eef0f2; background:#29323d; }

body.copilot-mode[data-theme="dark"] .workspace,
body.copilot-mode[data-theme="dark"] .content,
body.copilot-mode[data-theme="dark"] #view-module,
body.copilot-mode[data-theme="dark"] #moduleSignature,
body.copilot-mode[data-theme="dark"] .copilot-console,
body.copilot-mode[data-theme="dark"] .copilot-chat-primary,
body.copilot-mode[data-theme="dark"] .copilot-chat-messages { color:#e5e8eb; background:#11151b; }
body.copilot-mode[data-theme="dark"] .topbar,
body.copilot-mode[data-theme="dark"] .copilot-chat-primary > header { border-color:#2b323b; background:rgba(20,25,32,.97); }
body.copilot-mode[data-theme="dark"] .copilot-chat-identity h3,
body.copilot-mode[data-theme="dark"] .copilot-chat-message.ai .copilot-message-author b { color:#e7eaed; }
body.copilot-mode[data-theme="dark"] .copilot-chat-identity p,
body.copilot-mode[data-theme="dark"] .copilot-chat-identity small { color:#919ba7; }
body.copilot-mode[data-theme="dark"] .copilot-header-tools { border-color:#2c343e; background:#181e26; }
body.copilot-mode[data-theme="dark"] .copilot-header-action,
body.copilot-mode[data-theme="dark"] .copilot-task-menu > summary,
body.copilot-mode[data-theme="dark"] .copilot-approval-menu > summary,
body.copilot-mode[data-theme="dark"] .copilot-agent-button {
  border-color:transparent !important;
  color:#bdc5cd !important;
  background:transparent !important;
}
body.copilot-mode[data-theme="dark"] .copilot-header-action:hover,
body.copilot-mode[data-theme="dark"] .copilot-task-menu > summary:hover,
body.copilot-mode[data-theme="dark"] .copilot-approval-menu > summary:hover,
body.copilot-mode[data-theme="dark"] .copilot-agent-button:hover { color:#e8ebee !important; background:#242c35 !important; }
body.copilot-mode[data-theme="dark"] #copilotNewConversation {
  border-color:#394554 !important;
  color:#e6eaee !important;
  background:#27323d !important;
}
body.copilot-mode[data-theme="dark"] #copilotNewConversation:hover { color:#f0f2f4 !important; background:#303c49 !important; }
body.copilot-mode[data-theme="dark"] .copilot-model-status { border-color:#2f4a40; color:#9ccdbb; background:#192821; }
body.copilot-mode[data-theme="dark"] .copilot-chat-message.ai:not(.welcome) > .copilot-message-surface {
  border-color:#303842;
  color:#d8dde2;
  background:#191f27;
  box-shadow:0 14px 30px rgba(0,0,0,.16);
}
body.copilot-mode[data-theme="dark"] .copilot-chat-message.user > .copilot-message-surface { color:#dde1e5; background:#222933; }
body.copilot-mode[data-theme="dark"] .copilot-response-lead { border-color:#343c46; background:#222933; }
body.copilot-mode[data-theme="dark"] .copilot-response-lead::before { background:#83909e; }
body.copilot-mode[data-theme="dark"] .copilot-response-lead small { color:#aeb7c0; }
body.copilot-mode[data-theme="dark"] .copilot-response-lead p,
body.copilot-mode[data-theme="dark"] .copilot-inline-heading { color:#e6e8e9; }
body.copilot-mode[data-theme="dark"] .copilot-inline-heading::after { background:#353c44; }
body.copilot-mode[data-theme="dark"] .copilot-prose-paragraph,
body.copilot-mode[data-theme="dark"] .copilot-prose-list li { color:#cbd1d7; }
body.copilot-mode[data-theme="dark"] .copilot-inline-table { border-color:#333b45; background:#171c23; }
body.copilot-mode[data-theme="dark"] .copilot-inline-table th { color:#d8dde2; background:#242c36; }
body.copilot-mode[data-theme="dark"] .copilot-inline-table td { border-color:#303843; color:#c4cbd2; background:#1a2028; }
body.copilot-mode[data-theme="dark"] .copilot-inline-table tr:nth-child(even) td { background:#1e252e; }
body.copilot-mode[data-theme="dark"] .copilot-chat-result,
body.copilot-mode[data-theme="dark"] .copilot-chat-result.warning,
body.copilot-mode[data-theme="dark"] .copilot-chat-result.verified {
  border-color:#343d47;
  color:#d8dde2;
  background:#20262e;
}
body.copilot-mode[data-theme="dark"] .copilot-chat-result small { color:#aeb7c0; }
body.copilot-mode[data-theme="dark"] .copilot-chat-result b { color:#d8dde2; }
body.copilot-mode[data-theme="dark"] .copilot-route-actions button {
  border-color:#303a45;
  color:#d8dde2;
  background:#1b222b;
}
body.copilot-mode[data-theme="dark"] .copilot-route-actions button:hover { border-color:#4a5663; background:#222b35; }
body.copilot-mode[data-theme="dark"] .copilot-route-actions button b { color:#e2e5e8; }
body.copilot-mode[data-theme="dark"] .copilot-route-actions button small { color:#909aa5; }
body.copilot-mode[data-theme="dark"] .copilot-chat-suggestions,
body.copilot-mode[data-theme="dark"] .copilot-chat-composer { border-color:#2b333d; background:#151a21; }
body.copilot-mode[data-theme="dark"] .copilot-chat-suggestions button { border-color:#323b46; color:#b9c1c9; background:#1c232b; }
body.copilot-mode[data-theme="dark"] .copilot-chat-suggestions button:hover { color:#e1e5e8; background:#252d36; }
body.copilot-mode[data-theme="dark"] #copilotConsoleComposer {
  border-color:#313a45;
  color:#e2e5e8;
  background:#191f27;
  box-shadow:0 12px 30px rgba(0,0,0,.16);
}
body.copilot-mode[data-theme="dark"] #copilotConsoleComposer textarea { color:#e2e5e8; background:transparent; }
body.copilot-mode[data-theme="dark"] #copilotConsoleComposer textarea::placeholder { color:#7f8995; }
body.copilot-mode[data-theme="dark"] .copilot-history-drawer,
body.copilot-mode[data-theme="dark"] .copilot-task-menu > div,
body.copilot-mode[data-theme="dark"] .copilot-approval-menu > div { border-color:#303944; color:#dce1e5; background:#191f27; }

/* 2026-09-03 · 小奥快捷任务：账号级自定义、排序与空状态 */
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions {
  overflow:visible;
}
body.copilot-mode .copilot-quick-task-buttons {
  display:flex;
  min-width:0;
  gap:7px;
  overflow-x:auto;
  scrollbar-width:none;
}
body.copilot-mode .copilot-quick-task-buttons::-webkit-scrollbar { display:none; }
body.copilot-mode .copilot-quick-task-buttons > button { flex:none; }
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions .copilot-quick-task-manage {
  display:inline-flex;
  flex:none;
  align-items:center;
  gap:5px;
  margin-left:auto;
  padding-inline:9px;
  color:#5b6570;
  background:#eef1f4;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions .copilot-quick-task-manage svg {
  width:13px;
  height:13px;
}
body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions .copilot-quick-task-manage:hover {
  border-color:#bcc5cf;
  color:#252d35;
  background:#e5e9ed;
}
.copilot-quick-task-empty {
  align-self:center;
  padding:7px 2px;
  color:#7c8792;
  font-size:10px;
  font-style:normal;
  white-space:nowrap;
}
.action-modal.copilot-quick-task-modal .action-sheet { width:min(1120px,calc(100vw - 36px)); }
.copilot-quick-task-editor { display:grid; gap:18px; }
.copilot-quick-task-editor > header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:18px 20px;
  border:1px solid #dce1e6;
  border-radius:15px;
  background:#f4f6f8;
}
.copilot-quick-task-editor > header small { color:#6d7884; font-size:10px; font-weight:700; }
.copilot-quick-task-editor > header h3 { margin:5px 0 3px; color:#202a34; font-size:19px; }
.copilot-quick-task-editor > header p { margin:0; color:#65717d; font-size:11px; line-height:1.6; }
.copilot-quick-task-editor > header > strong {
  display:flex;
  align-items:baseline;
  gap:4px;
  color:#66717c;
  white-space:nowrap;
}
.copilot-quick-task-editor > header > strong b { color:#26313b; font-size:22px; }
.copilot-quick-task-editor-list { display:grid; gap:10px; }
.copilot-quick-task-editor-row {
  display:grid;
  grid-template-columns:38px minmax(150px,.34fr) minmax(300px,1fr) auto;
  align-items:end;
  gap:12px;
  padding:14px;
  border:1px solid #dce1e6;
  border-radius:14px;
  background:#fff;
}
.copilot-quick-task-order {
  display:grid;
  width:32px;
  height:38px;
  place-items:center;
  border-radius:10px;
  color:#596571;
  background:#eef1f4;
  font-size:12px;
  font-weight:800;
}
.copilot-quick-task-editor-row label { display:grid; min-width:0; gap:6px; }
.copilot-quick-task-editor-row label > span { color:#56626e; font-size:10px; font-weight:750; }
.copilot-quick-task-editor-row input,
.copilot-quick-task-editor-row textarea {
  width:100%;
  min-height:38px;
  box-sizing:border-box;
  padding:9px 11px;
  border:1px solid #cfd6dd;
  border-radius:10px;
  color:#28333d;
  background:#f8f9fa;
  font:inherit;
  font-size:11px;
  line-height:1.45;
  resize:vertical;
}
.copilot-quick-task-editor-row input:focus,
.copilot-quick-task-editor-row textarea:focus { outline:2px solid rgba(52,109,225,.16); border-color:#6e93de; background:#fff; }
.copilot-quick-task-row-actions { display:flex; gap:5px; padding-bottom:1px; }
.copilot-quick-task-row-actions button {
  min-height:38px;
  padding:0 9px;
  border:1px solid #d4dae0;
  border-radius:9px;
  color:#56616d;
  background:#f4f6f8;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
}
.copilot-quick-task-row-actions button:hover:not(:disabled) { border-color:#aeb8c2; color:#222c35; background:#e9edf0; }
.copilot-quick-task-row-actions button.danger { color:#a54f58; }
.copilot-quick-task-row-actions button:disabled { opacity:.36; cursor:not-allowed; }
.copilot-quick-task-editor-empty {
  padding:24px;
  border:1px dashed #ccd3da;
  border-radius:14px;
  color:#697580;
  background:#f7f8f9;
  text-align:center;
}
.copilot-quick-task-editor-empty b { display:block; color:#35404a; font-size:13px; }
.copilot-quick-task-editor-empty p { margin:5px 0 0; font-size:10px; }
.copilot-quick-task-editor > footer { display:flex; justify-content:space-between; gap:10px; }
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-suggestions .copilot-quick-task-manage {
  border-color:#39434e;
  color:#c0c7ce;
  background:#242c35;
}
body[data-theme="dark"].copilot-mode .copilot-chat-primary .copilot-chat-suggestions .copilot-quick-task-manage:hover { color:#e3e7ea; background:#2d3741; }
body[data-theme="dark"] .copilot-quick-task-editor > header,
body[data-theme="dark"] .copilot-quick-task-editor-row,
body[data-theme="dark"] .copilot-quick-task-editor-empty { border-color:#343d47; background:#1c232b; }
body[data-theme="dark"] .copilot-quick-task-editor > header h3,
body[data-theme="dark"] .copilot-quick-task-editor > header > strong b,
body[data-theme="dark"] .copilot-quick-task-editor-empty b { color:#e0e4e7; }
body[data-theme="dark"] .copilot-quick-task-editor > header small,
body[data-theme="dark"] .copilot-quick-task-editor > header p,
body[data-theme="dark"] .copilot-quick-task-editor > header > strong,
body[data-theme="dark"] .copilot-quick-task-editor-empty { color:#a5afb8; }
body[data-theme="dark"] .copilot-quick-task-order { color:#c6cdd3; background:#2b343e; }
body[data-theme="dark"] .copilot-quick-task-editor-row label > span { color:#b7c0c8; }
body[data-theme="dark"] .copilot-quick-task-editor-row input,
body[data-theme="dark"] .copilot-quick-task-editor-row textarea { border-color:#3b4652; color:#e0e4e7; background:#171d24; }
body[data-theme="dark"] .copilot-quick-task-editor-row input:focus,
body[data-theme="dark"] .copilot-quick-task-editor-row textarea:focus { border-color:#6688cd; background:#202832; }
body[data-theme="dark"] .copilot-quick-task-row-actions button { border-color:#3b4651; color:#c1c8cf; background:#242c35; }
body[data-theme="dark"] .copilot-quick-task-row-actions button:hover:not(:disabled) { border-color:#586572; color:#eef0f2; background:#2c3640; }
body[data-theme="dark"] .copilot-quick-task-row-actions button.danger { color:#e39aa2; }
@media (max-width:820px) {
  body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions { overflow-x:auto; }
  body.copilot-mode .copilot-quick-task-buttons { overflow:visible; }
  body.copilot-mode .copilot-chat-primary .copilot-chat-suggestions .copilot-quick-task-manage span { display:none; }
  .copilot-quick-task-editor-row { grid-template-columns:34px 1fr; align-items:start; }
  .copilot-quick-task-command,.copilot-quick-task-row-actions { grid-column:2; }
  .copilot-quick-task-row-actions { flex-wrap:wrap; }
}

@media (max-width:760px) {
  .rail-theme-switch { width:78px; }
  .rail-theme-switch button span { display:none; }
  body.copilot-mode .copilot-chat-message.ai:not(.welcome) > .copilot-message-surface { padding:18px 16px 20px; border-radius:15px; }
  body.copilot-mode .copilot-response-lead { padding:15px 16px 15px 19px; }
}

/* 2026-09-03 · 夜间模式业务工作台补盲：覆盖 v33 高优先级浅色工作面 */
body[data-theme="dark"] #view-module:not([data-module="copilot"]):not([data-module="outsourceInstructions"]) .route-context-bar {
  border-color:#303944;
  color:#d7dce1;
  background:#181e26;
}
body[data-theme="dark"] #view-module .route-context-bar .current { background:#202933; }
body[data-theme="dark"] #view-module .route-context-bar .current b { color:#aabedb; }
body[data-theme="dark"] #view-module .route-context-bar button {
  border-color:#36414d;
  color:#c3cbd3;
  background:#202731;
}
body[data-theme="dark"] #view-module .route-context-bar button:hover { border-color:#505d6a; color:#eceff1; background:#29323d; }
body[data-theme="dark"] #view-module .signature-panel {
  border-color:#2d3743;
  color:#d8dde2;
  background:#171d25;
  box-shadow:0 1px 3px rgba(0,0,0,.28);
}
body[data-theme="dark"] #view-module .signature-panel.tinted { background:linear-gradient(150deg,#1c242e,#171d25 72%); }
body[data-theme="dark"] #view-module[data-page-archetype="hub"] .signature-panel.tinted,
body[data-theme="dark"] #view-module[data-page-archetype="analytics"] .signature-panel.tinted,
body[data-theme="dark"] #view-module[data-page-archetype="workspace"] .signature-panel.tinted {
  border-color:#2d3743;
  background:linear-gradient(150deg,#1c242e,#171d25 72%);
  box-shadow:0 1px 3px rgba(0,0,0,.28);
}
body[data-theme="dark"] #view-module .ws-card { border-color:#303a46; color:#d8dde2; background:#181f28; box-shadow:none; }
body[data-theme="dark"] #view-module .ws-card-head b,
body[data-theme="dark"] #view-module .ws-op-name b,
body[data-theme="dark"] #view-module .ws-progress span { color:#e2e6ea; }
body[data-theme="dark"] #view-module .ws-card-head p,
body[data-theme="dark"] #view-module .ws-op-progress,
body[data-theme="dark"] #view-module .ws-rule { color:#9da7b1; }
body[data-theme="dark"] #view-module .ws-progress { background:#2a323c; }
body[data-theme="dark"] #view-module .ws-op { border-color:#323d49; background:#1d252f; }
body[data-theme="dark"] #view-module .ws-op.is-done { border-color:#30483f; background:#192720; }
body[data-theme="dark"] #view-module .ws-status.wip { color:#d8b37b; background:#33281c; }
body[data-theme="dark"] #view-module .ws-status.done { color:#91cbb4; background:#183027; }
body[data-theme="dark"] #view-module .ws-status.pending { color:#b3bcc5; background:#29313a; }
body[data-theme="dark"] #view-module .ws-op-tag { color:#b6c8e1; background:#283547; }
body[data-theme="dark"] #view-module .ws-qty-stepper button,
body[data-theme="dark"] #view-module .ws-quick button {
  border-color:#3a4653;
  color:#c8cfd6;
  background:#222a34;
}
body[data-theme="dark"] #view-module .ws-qty-stepper button:hover,
body[data-theme="dark"] #view-module .ws-quick button:hover { border-color:#566473; background:#2b3540; }
body[data-theme="dark"] #view-module .ws-qty-stepper input { border-color:#3a4653 !important; color:#e5e8eb !important; background:#121820 !important; }
body[data-theme="dark"] #view-module .ws-receipt { color:#9bd0bb; background:#193027; }
body[data-theme="dark"] #view-module .ws-receipt[data-tone="error"] { color:#e6a5aa; background:#351f24; }
body[data-theme="dark"] #journeyDock .journey-dock-open {
  border-color:#38424d;
  color:#d4d9de;
  background:#202731;
  box-shadow:none;
}
body[data-theme="dark"] #journeyDock .journey-dock-open:hover { border-color:#52606d; color:#eef0f2; background:#29323d; }
body[data-theme="dark"] #view-module .outsource-command-status.is-progress,
body[data-theme="dark"] #view-module .purchase-ledger-status em.is-progress,
body[data-theme="dark"] #view-module .document-ledger-stage em.is-progress { color:#a9c3eb; background:#20304a; }
body[data-theme="dark"] #view-module .outsource-command-status.is-complete,
body[data-theme="dark"] #view-module .purchase-ledger-status em.is-complete,
body[data-theme="dark"] #view-module .document-ledger-stage em.is-complete { color:#9bd0bb; background:#193027; }
body[data-theme="dark"] #view-module .material-plan-filters {
  border-color:#303a46;
  background:#181f28;
}
body[data-theme="dark"] #view-module .material-plan-filters > label > span:first-child { color:#a7b0ba; }
body[data-theme="dark"] #view-module .material-plan-shortage-only,
body[data-theme="dark"] #view-module .material-plan-search {
  border-color:#3a4653;
  color:#c9d0d7;
  background:#222a34;
}
body[data-theme="dark"] #view-module .material-plan-shortage-only b { color:#e0e4e8; }
body[data-theme="dark"] #view-module .material-plan-shortage-only small { color:#929da8; }
body[data-theme="dark"] #view-module .material-plan-table-wrap {
  border-color:#35414e;
  background:#171d25;
}
body[data-theme="dark"] #view-module .material-plan-table tbody tr:hover { background:#202832; }
body[data-theme="dark"] #view-module .material-demand-detail > header {
  border-color:#34414f;
  background:#1b232d;
}
body[data-theme="dark"] #view-module .material-demand-detail > header span {
  border-color:#3a4653;
  background:#222a34;
}
body[data-theme="dark"] #view-module .material-demand-detail > header h3,
body[data-theme="dark"] #view-module .material-demand-detail > header span b { color:#e1e5e9; }
body[data-theme="dark"] #view-module .material-demand-source-table { border-color:#35414e; background:#171d25; }
body[data-theme="dark"] #view-module .material-demand-source-table th { color:#a6b0ba; background:#202832; }
body[data-theme="dark"] #view-module .material-demand-source-table td { border-color:#303a46; color:#d0d6dc; }
body[data-theme="dark"] #view-module .operational-steps li,
body[data-theme="dark"] #view-module .operational-exception .operational-steps li.is-current,
body[data-theme="dark"] #view-module .operational-receipt .operational-steps li:last-child {
  border-color:#303a46;
  background:#181f28;
}
body[data-theme="dark"] #view-module .operational-steps li.is-current {
  border-color:color-mix(in srgb,var(--module-accent) 55%,#394451);
  background:color-mix(in srgb,var(--module-accent) 13%,#1b232d);
}
body[data-theme="dark"] #view-module .operational-steps li > i { color:#b4bdc6; background:#29323c; }
body[data-theme="dark"] #view-module .operational-steps li.is-current > i { color:#f1f3f5; background:var(--module-accent); }
body[data-theme="dark"] #view-module .operational-steps li::after { background:#3a4653; }
body[data-theme="dark"] #view-module .operational-status-strip { border-color:#303a46; background:#303a46; }
body[data-theme="dark"] #view-module .operational-status-strip > span { background:#181f28; }
body[data-theme="dark"] #view-module .operational-status-strip > button {
  color:#b7c7de;
  background:#202832;
}
body[data-theme="dark"] #view-module .operational-status-strip > button:hover { color:#e3e7eb; background:#29333e; }
body[data-theme="dark"] #view-module .customer-directory-pagination {
  border-color:#303a46;
  color:#aeb7c0;
  background:#171d25;
}
body[data-theme="dark"] #dockBlockers { color:#9bd0bb; background:#193027; }

/* 应付款工具条与状态标记：使用中性灰层级，避免浅色米黄和暗色模式亮白块。 */
#view-module [data-list-action-root="payables"] .split-ledger-row em,
#view-module [data-list-action-root="payables"] .split-ledger-section > header em {
  border:1px solid #d7dde3;
  color:#596675;
  background:#eef1f4 !important;
}
body[data-theme="dark"] #view-module [data-list-action-root="payables"] .payables-toolbar {
  border-color:#303a46 !important;
  color:#d8dde2;
  background:#171d25 !important;
}
body[data-theme="dark"] #view-module [data-list-action-root="payables"] .payables-toolbar label span { color:#a7b0ba; }
body[data-theme="dark"] #view-module [data-list-action-root="payables"] .payables-toolbar input {
  border-color:#3a4653;
  color:#e5e8eb;
  background:#121820;
  color-scheme:dark;
}
body[data-theme="dark"] #view-module [data-list-action-root="payables"] .split-ledger-row em,
body[data-theme="dark"] #view-module [data-list-action-root="payables"] .split-ledger-section > header em {
  border-color:#3a4653;
  color:#b7c0c9;
  background:#252d36 !important;
}
body[data-theme="dark"] .toast {
  border-color:#3a4653;
  color:#d8dde2;
  background:rgba(29,37,47,.97);
  box-shadow:0 12px 30px rgba(0,0,0,.32);
}
body[data-theme="dark"] #view-module .split-ledger-row.is-expanded > button[data-record-open] {
  color:#d8dde2;
  background:#202832;
}
body[data-theme="dark"] #view-module .payment-review-card {
  border-color:#303a46;
  color:#d8dde2;
  background:#171d25;
  box-shadow:0 1px 3px rgba(0,0,0,.28);
}

/* 2026-09-03 · 全站夜间表面完整性（v93）
   新增业务页必须落在同一套石墨灰层级；分页、表单和明细横表不能回退成纯白工作面。 */
body[data-theme="dark"] #view-module {
  --dark-canvas:#11151b;
  --dark-surface:#171d25;
  --dark-surface-raised:#1d252e;
  --dark-surface-control:#121820;
  --dark-line:#303a46;
  --dark-line-strong:#3a4653;
  --dark-ink:#d8dde2;
  --dark-muted:#a7b0ba;
}
body[data-theme="dark"] #view-module :is(
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="tel"],
  select,
  textarea
) {
  border-color:var(--dark-line-strong);
  color:var(--dark-ink);
  background-color:var(--dark-surface-control);
  color-scheme:dark;
}
body[data-theme="dark"] #view-module :is(input,textarea)::placeholder { color:#7f8993; }
body[data-theme="dark"] #view-module :is(input,select,textarea):disabled {
  border-color:#2e3741;
  color:#78828c;
  background-color:#1b222a;
}

/* Shared pagination is a quiet continuation of the ledger, never a detached light strip. */
body[data-theme="dark"] #view-module :is(
  .customer-directory-pagination,
  .outsource-command-pagination,
  [class$="-pagination"],
  [class*="-pagination "]
) {
  border-color:var(--dark-line);
  color:var(--dark-muted);
  background-color:var(--dark-surface);
}
body[data-theme="dark"] #view-module :is(
  .customer-directory-pagination,
  .outsource-command-pagination,
  [class$="-pagination"],
  [class*="-pagination "]
) button:not(.primary-button) {
  border-color:var(--dark-line-strong);
  color:#c3cbd3;
  background:#202832;
  box-shadow:none;
}
body[data-theme="dark"] #view-module :is(
  .customer-directory-pagination,
  .outsource-command-pagination,
  [class$="-pagination"],
  [class*="-pagination "]
) button:not(.primary-button):hover:not(:disabled) {
  border-color:#55616d;
  color:#eef0f2;
  background:#29333e;
}

/* Delivery outbound horizontal document. */
body[data-theme="dark"] #view-module :is(
  .delivery-outbound-sheet,
  .delivery-outbound-table-wrap,
  .delivery-batch-history
) {
  border-color:var(--dark-line);
  color:var(--dark-ink);
  background:var(--dark-surface);
}
body[data-theme="dark"] #view-module .delivery-outbound-sheet > header,
body[data-theme="dark"] #view-module .delivery-batch-history > header,
body[data-theme="dark"] #view-module .delivery-batch-history li { border-color:var(--dark-line); }
body[data-theme="dark"] #view-module :is(
  .delivery-outbound-sheet > header h3,
  .delivery-batch-summary b,
  .delivery-outbound-table td > b,
  .delivery-batch-history li b
) { color:#e3e7eb; }
body[data-theme="dark"] #view-module .delivery-batch-summary span {
  border-color:var(--dark-line);
  background:var(--dark-surface-raised);
}
body[data-theme="dark"] #view-module .delivery-outbound-table th {
  border-color:var(--dark-line);
  color:#aeb7c0;
  background:#202832;
}
body[data-theme="dark"] #view-module .delivery-outbound-table td {
  border-color:var(--dark-line);
  color:#d1d7dc;
  background:var(--dark-surface);
}
body[data-theme="dark"] #view-module .delivery-outbound-table tbody tr.is-selected td {
  background:#1c2a3d;
  box-shadow:none;
}
body[data-theme="dark"] #view-module .delivery-select-cell label span {
  border-color:#65717d;
  background:var(--dark-surface-control);
}
body[data-theme="dark"] #view-module .delivery-outbound-sheet > footer,
body[data-theme="dark"] #view-module .delivery-batch-history > header {
  border-color:var(--dark-line);
  background:#1a222b;
}

/* BOM folder hierarchy. */
body[data-theme="dark"] #view-module .bom-folder-group {
  border-color:var(--dark-line);
  background:var(--dark-surface);
}
body[data-theme="dark"] #view-module .bom-folder-group > summary {
  color:#d7dce1;
  background:#202832;
}
body[data-theme="dark"] #view-module .bom-folder-group > summary:hover { background:#29333e; }
body[data-theme="dark"] #view-module .bom-folder-icon { color:#a8bff2; background:#26344b; }
body[data-theme="dark"] #view-module .bom-folder-move {
  border-color:var(--dark-line-strong);
  color:#b7c0c9;
  background:var(--dark-surface-raised);
}
body[data-theme="dark"] #view-module .bom-folder-move:hover {
  border-color:#5b6a7a;
  color:#dce5f2;
  background:#29333e;
}

/* Recently added ledger shells and drill-down tables share the same three surface levels. */
body[data-theme="dark"] #view-module :is(
  .outsource-command-ledger > footer,
  .warehouse-ledger-detail-row > td > section,
  .warehouse-ledger-detail-scroll th,
  .warehouse-ledger-detail-scroll td,
  .document-edit-sheet,
  .document-line-scroll
) {
  border-color:var(--dark-line);
  color:#c9d0d7;
  background:var(--dark-surface);
}

/* Surfaces found by the 81-menu visual pass. */
body[data-theme="dark"] #view-module .bom-ledger-toolbar label {
  border-color:var(--dark-line-strong);
  background:var(--dark-surface-control);
}
body[data-theme="dark"] #view-module .purchase-stat-list {
  border-color:var(--dark-line);
  background:var(--dark-surface);
}
body[data-theme="dark"] #view-module .supplier-bill-separation-note {
  border-color:#4b4034;
  color:#d0c5b8;
  background:#28231e;
}
body[data-theme="dark"] #view-module .supplier-bill-separation-note small { color:#aaa096; }
body[data-theme="dark"] #view-module .map-precision-note {
  border-color:rgba(67,78,90,.88);
  color:#aeb7c0;
  background:rgba(27,34,43,.94);
  box-shadow:0 5px 16px rgba(0,0,0,.26);
}
body[data-theme="dark"] #view-module .member-governance-alert {
  border-color:#514630;
  color:#d4c59e !important;
  background:#29251c;
}
body[data-theme="dark"] #view-module .autopilot-safety-banner {
  border-color:#54353c;
  color:#d2aab1;
  background:#291d21;
}
body[data-theme="dark"] #view-module .autopilot-safety-banner b { color:#ebc6cc; }
body[data-theme="dark"] #view-module .autopilot-safety-banner small { color:#b78f97; }
body[data-theme="dark"] #view-module .autopilot-safety-banner.is-enabled {
  border-color:#2d5147;
  color:#9bc9bb;
  background:#192822;
}
body[data-theme="dark"] #view-module .autopilot-counts {
  border-color:var(--dark-line);
  background:var(--dark-line);
}
body[data-theme="dark"] #view-module .autopilot-counts span { background:var(--dark-surface); }
body[data-theme="dark"] #view-module .autopilot-counts b { color:#e1e5e9; }

/* 请款批次和申请书一一对应，沿用原工作台样式。 */
.supplier-application-history{padding:14px 18px;border-bottom:1px solid var(--line,#e4e7ec)}
.supplier-application-history>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}
.supplier-application-link{display:flex;flex-direction:column;gap:3px;border:1px solid var(--line,#e4e7ec);border-radius:7px;padding:9px 12px;color:inherit;text-decoration:none;font-size:12px}
.supplier-application-link:hover{border-color:#527bbd}.supplier-application-link span{font-size:11px;opacity:.7}
.supplier-application-details{border:0;border-top:1px solid var(--line,#e4e7ec);padding:14px 18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.supplier-application-details legend{padding:0 6px;font-weight:600;font-size:13px}.supplier-application-details p{grid-column:1/-1;font-size:12px;opacity:.7;margin:0}
.supplier-application-details label{display:flex;flex-direction:column;gap:6px;font-size:12px;min-width:0}
.supplier-application-details input{width:100%;box-sizing:border-box;border:1px solid var(--line,#d6dce4);border-radius:6px;padding:9px 10px;background:var(--surface,#fff);color:inherit}
body[data-theme="dark"] .supplier-application-details input{background:var(--dark-surface);border-color:var(--dark-line);color:#e1e5e9}
body[data-theme="dark"] .supplier-application-link{border-color:var(--dark-line)}
@media(max-width:680px){.supplier-application-details{grid-template-columns:1fr}.supplier-application-link{overflow-wrap:anywhere;max-width:100%}}

/* Compact left navigation stays visible on tablets and phones as well. */
@media (max-width: 850px) {
  body .app-shell { display:grid; grid-template-columns:112px minmax(0,1fr); }
  body.standalone-document-entry .standalone-document-modal { left:112px; }
  body .workspace { grid-column:2; min-width:0; width:100%; }
  body .rail { display:flex; flex-direction:column; position:fixed; inset:0 auto 0 0; width:112px; height:100dvh; padding:8px 5px; align-items:stretch; border-radius:0; transform:none; pointer-events:auto; }
  .rail .rail-brand { display:flex; align-items:center; justify-content:center; width:100%; padding:4px; background:transparent; border:0; }
  .rail .rail-brand img { width:32px; height:32px; }
  .rail-brand > span, .rail .role-nav-heading, .rail .role-nav-icon, .rail .role-nav-arrow, .rail .role-nav-copy small, .rail .rail-account, .rail .rail-utility, .rail .full-nav-group-icon, .rail .full-nav-twist { display:none; }
  .rail .top-nav { display:flex; flex:1; min-height:0; flex-direction:column; align-items:stretch; gap:4px; max-width:none; margin:5px 0; padding:0; overflow-x:hidden; overflow-y:auto; }
  body .rail #quickNav > button { display:block; width:100%; min-height:36px; margin:0; padding:6px 5px; text-align:left; white-space:normal; border:0; border-radius:5px; color:inherit; background:transparent; }
  body .rail #quickNav > button::before { display:none; }
  .rail .top-nav > button.is-active { background:rgba(100,160,255,.22); color:#fff; }
  .rail .role-nav-copy { display:block; }
  .rail .role-nav-copy b { font-size:10px; line-height:1.5; white-space:normal; }
  .rail .full-nav-group { display:block; padding:8px 4px 3px; margin:3px 0; font-size:10px; color:#d5dff2; }
  .rail .rail-bottom { margin-top:auto; }
  .rail .rail-theme-switch { width:100%; }
  .rail .top-nav > [hidden], .rail .top-nav > .nav-group-hidden { display:none !important; }
  .topbar { gap:4px; padding-inline:8px; }
  .top-left { min-width:0; }
  .journey-dock { left:calc(50% + 56px); max-width:calc(100vw - 128px); }
}

/* Document entry workbenches keep navigation available beside the form. */
body .relationship-workbench-modal { left:232px; }
body .relationship-workbench-modal .action-sheet { max-width:calc(100% - 20px); }
body.standalone-document-entry .standalone-document-modal .action-sheet { max-width:100%; }
@media (max-width:850px) { body .relationship-workbench-modal { left:112px; } }

/* v129 · Keep operational totals in the page header and expose inventory quantities at first sight. */
.module-headline-summary[hidden] { display:none !important; }
#view-module[data-module="salesOrderCompletion"] .module-page-intro {
  align-items:flex-end;
  gap:22px;
}
#view-module[data-module="salesOrderCompletion"] .module-page-intro > div:first-child {
  flex:1 1 520px;
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary {
  flex:0 1 500px;
  min-width:440px;
  padding-left:20px;
  border-left:1px solid var(--work-line);
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary > header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary > header > small {
  color:var(--work-ink);
  font-size:11px;
  font-weight:850;
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary > header > span {
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--work-muted);
  font-size:9px;
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary > header svg {
  width:12px;
  height:12px;
  color:#24956f;
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary > div {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary article {
  display:flex;
  min-width:0;
  flex-direction:column;
  padding:2px 16px;
  border-left:1px solid var(--work-line);
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary article:first-child {
  padding-left:0;
  border-left:0;
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary article small {
  overflow:hidden;
  color:var(--work-muted);
  font-size:9px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary article b {
  margin-top:4px;
  color:var(--work-ink);
  font-size:21px;
  line-height:1;
}
#view-module[data-module="salesOrderCompletion"] .module-headline-summary article em {
  overflow:hidden;
  margin-top:4px;
  color:var(--work-muted);
  font-size:8px;
  font-style:normal;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#view-module[data-module="salesOrderCompletion"] .sales-progress-layout { grid-template-columns:minmax(0,1fr); }

#view-module[data-module="inventory"] .inventory-quantity-table {
  min-width:0;
  border-top:1px solid var(--work-line);
  background:var(--work-surface);
}
#view-module[data-module="inventory"] :is(.inventory-quantity-head,.inventory-quantity-row) {
  display:grid;
  grid-template-columns:minmax(260px,1.5fr) repeat(3,minmax(128px,.62fr)) minmax(150px,.72fr);
  align-items:center;
}
#view-module[data-module="inventory"] .inventory-quantity-head {
  min-height:42px;
  padding:0 18px;
  color:var(--work-muted);
  background:var(--work-surface-muted);
  font-size:9px;
  font-weight:850;
  letter-spacing:.02em;
}
#view-module[data-module="inventory"] .inventory-quantity-row-shell {
  border-top:1px solid var(--work-line);
  background:var(--work-surface);
  transition:background .16s ease;
}
#view-module[data-module="inventory"] .inventory-quantity-row-shell:first-child { border-top:0; }
#view-module[data-module="inventory"] .inventory-quantity-row-shell:hover,
#view-module[data-module="inventory"] .inventory-quantity-row-shell.is-expanded { background:#f9fbfd; }
#view-module[data-module="inventory"] .inventory-quantity-row {
  min-height:68px;
  padding:0 18px;
}
#view-module[data-module="inventory"] .inventory-quantity-item {
  display:flex;
  min-width:0;
  height:100%;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  padding:10px 18px 10px 0;
  border:0;
  color:var(--work-ink);
  background:transparent;
  text-align:left;
  cursor:pointer;
}
#view-module[data-module="inventory"] .inventory-quantity-item b {
  overflow:hidden;
  max-width:100%;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#view-module[data-module="inventory"] .inventory-quantity-item small,
#view-module[data-module="inventory"] .inventory-quantity-state small {
  overflow:hidden;
  max-width:100%;
  margin-top:4px;
  color:var(--work-muted);
  font-size:8px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#view-module[data-module="inventory"] .inventory-quantity-value {
  display:flex;
  min-width:0;
  flex-direction:column;
  justify-content:center;
  padding:10px 12px 10px 0;
  border:0;
  color:var(--work-ink);
  background:transparent;
  font-variant-numeric:tabular-nums;
  text-align:left;
}
#view-module[data-module="inventory"] button.inventory-quantity-value { cursor:pointer; }
#view-module[data-module="inventory"] .inventory-quantity-value > small { display:none; }
#view-module[data-module="inventory"] .inventory-quantity-value > span { display:flex; align-items:center; gap:7px; }
#view-module[data-module="inventory"] .inventory-quantity-value > span > b { font-size:14px; }
#view-module[data-module="inventory"] button.inventory-quantity-value svg {
  width:13px;
  height:13px;
  color:var(--module-accent);
  transition:transform .16s ease;
}
#view-module[data-module="inventory"] button.inventory-quantity-value:hover > span > b { text-decoration:underline; text-underline-offset:3px; }
#view-module[data-module="inventory"] button.inventory-quantity-value[aria-expanded="true"] svg { transform:rotate(90deg); }
#view-module[data-module="inventory"] .inventory-quantity-value.is-demand > b { color:#9c681b; }
#view-module[data-module="inventory"] .inventory-quantity-value.is-demand > span > b { color:#9c681b; }
#view-module[data-module="inventory"] .inventory-quantity-value.is-available > b { color:#14775c; }
#view-module[data-module="inventory"] .inventory-quantity-value.is-available > span > b { color:#14775c; }
#view-module[data-module="inventory"] .inventory-quantity-state {
  display:flex;
  min-width:0;
  flex-direction:column;
  justify-content:center;
}
#view-module[data-module="inventory"] .inventory-quantity-state > b {
  align-self:flex-start;
  padding:4px 7px;
  border-radius:999px;
  color:#5a6574;
  background:#edf1f5;
  font-size:9px;
}
#view-module[data-module="inventory"] .inventory-quantity-state.is-available > b { color:#146a52; background:#e7f5f0; }
#view-module[data-module="inventory"] .inventory-quantity-state.is-locked > b { color:#8b5d18; background:#f8f0df; }
#view-module[data-module="inventory"] .inventory-quantity-detail {
  margin:0 18px 16px;
}

body[data-theme="dark"] #view-module[data-module="salesOrderCompletion"] .module-headline-summary,
body[data-theme="dark"] #view-module[data-module="salesOrderCompletion"] .module-headline-summary article { border-color:var(--dark-line); }
body[data-theme="dark"] #view-module[data-module="salesOrderCompletion"] .module-headline-summary :is(header > small,article b) { color:#e3e7eb; }
body[data-theme="dark"] #view-module[data-module="salesOrderCompletion"] .module-headline-summary :is(header > span,article small,article em) { color:#9ba5ae; }
body[data-theme="dark"] #view-module[data-module="inventory"] :is(.inventory-quantity-table,.inventory-quantity-row-shell) {
  border-color:var(--dark-line);
  background:var(--dark-surface);
}
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-quantity-head {
  color:#aeb7c0;
  background:#202832;
}
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-quantity-row-shell:hover,
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-quantity-row-shell.is-expanded { background:#1b242e; }
body[data-theme="dark"] #view-module[data-module="inventory"] :is(.inventory-quantity-item,.inventory-quantity-value) { color:#e0e5ea; }
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-quantity-value.is-demand > span > b { color:#e0b96e; }
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-quantity-value.is-available > span > b { color:#7fc6ad; }
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-quantity-state > b { color:#c0c8cf; background:#29333e; }
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-quantity-state.is-available > b { color:#8dd2ba; background:#1b3b32; }
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-quantity-state.is-locked > b { color:#dfbd79; background:#3b3020; }

@media (max-width:1100px) {
  #view-module[data-module="salesOrderCompletion"] .module-page-intro { align-items:flex-start; flex-wrap:wrap; }
  #view-module[data-module="salesOrderCompletion"] .module-headline-summary {
    width:100%;
    min-width:0;
    flex-basis:100%;
    padding:14px 0 0;
    border-top:1px solid var(--work-line);
    border-left:0;
  }
  #view-module[data-module="inventory"] :is(.inventory-quantity-head,.inventory-quantity-row) {
    grid-template-columns:minmax(220px,1.45fr) repeat(3,minmax(102px,.58fr)) minmax(120px,.7fr);
  }
}
@media (max-width:760px) {
  #view-module[data-module="salesOrderCompletion"] .module-headline-summary article { padding-inline:10px; }
  #view-module[data-module="salesOrderCompletion"] .module-headline-summary article b { font-size:18px; }
  #view-module[data-module="inventory"] .inventory-quantity-head { display:none; }
  #view-module[data-module="inventory"] .inventory-quantity-row {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px 8px;
    padding:14px;
  }
  #view-module[data-module="inventory"] .inventory-quantity-item { grid-column:1/-1; min-height:44px; padding:0; }
  #view-module[data-module="inventory"] .inventory-quantity-state { grid-column:1/-1; grid-row:3; flex-direction:row; align-items:center; gap:8px; }
  #view-module[data-module="inventory"] .inventory-quantity-state small { margin-top:0; }
  #view-module[data-module="inventory"] .inventory-quantity-value > small { display:block; margin-bottom:4px; color:var(--work-muted); font-size:8px; }
  #view-module[data-module="inventory"] .inventory-quantity-detail { margin:0 14px 14px; }
}
@media (max-width:480px) {
  #view-module[data-module="salesOrderCompletion"] .module-headline-summary > div { grid-template-columns:1fr; }
  #view-module[data-module="salesOrderCompletion"] .module-headline-summary article,
  #view-module[data-module="salesOrderCompletion"] .module-headline-summary article:first-child {
    padding:8px 0;
    border-top:1px solid var(--work-line);
    border-left:0;
  }
  #view-module[data-module="inventory"] .inventory-quantity-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #view-module[data-module="inventory"] .inventory-quantity-item { grid-column:1/-1; }
  #view-module[data-module="inventory"] .inventory-quantity-value.is-available { grid-column:1/-1; }
  #view-module[data-module="inventory"] .inventory-quantity-state { grid-row:4; }
}

/* v133 · 库存查询：业务排列方式与库存范围共用一条紧凑工具栏。 */
#view-module[data-module="inventory"] .customer-directory-tools {
  justify-content:flex-end;
}
#view-module[data-module="inventory"] .inventory-query-filters {
  display:flex;
  align-items:center;
  gap:6px;
}
#view-module[data-module="inventory"] .inventory-query-filters .inventory-query-select {
  width:auto;
  min-width:132px;
  flex:none;
  padding:0 10px;
  border-color:var(--work-line);
  background:var(--work-surface-muted);
}
#view-module[data-module="inventory"] .inventory-query-filters .inventory-query-select > span {
  flex:none;
  color:var(--work-muted);
  font-size:9px;
  font-weight:750;
}
#view-module[data-module="inventory"] .inventory-query-filters .inventory-query-select select {
  min-width:0;
  flex:1;
  color:var(--work-ink);
}
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-query-filters .inventory-query-select {
  border-color:var(--dark-line) !important;
  background:#19232e !important;
}
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-query-filters .inventory-query-select > span {
  color:#97a3ae;
}
body[data-theme="dark"] #view-module[data-module="inventory"] .inventory-query-filters .inventory-query-select select {
  color:#e0e5ea !important;
  background:transparent !important;
}
@media (max-width:900px) {
  #view-module[data-module="inventory"] .customer-directory-tools {
    width:100%;
    justify-content:stretch;
  }
  #view-module[data-module="inventory"] .inventory-query-filters {
    display:grid;
    width:100%;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #view-module[data-module="inventory"] .inventory-query-filters .inventory-query-select {
    width:100%;
    min-width:0;
  }
  #view-module[data-module="inventory"] .customer-directory-tools > label:last-child {
    width:100%;
    max-width:none;
  }
}
@media (max-width:480px) {
  #view-module[data-module="inventory"] .inventory-query-filters {
    grid-template-columns:1fr;
  }
}

/* 期初库存 / 库存盘点工作表 */
.stock-adjustment-sheet { display:grid; gap:14px; }
.stock-adjustment-sheet input[type="number"], .stock-adjustment-sheet input[list], .stock-adjustment-sheet select { width:100%; min-width:0; }
.stock-adjustment-sheet [data-freight-filter] { flex:none; width:min(260px, 48%); height:36px; padding:0 11px; border:1px solid #ccd7e7; border-radius:9px; color:#1d2d49; background:#fff; font:inherit; font-size:12px; outline:0; }
.stock-adjustment-sheet [data-freight-filter]:focus { border-color:var(--ui-accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
body[data-theme="dark"] .stock-adjustment-sheet [data-freight-filter] { border-color:#3a4d68; color:#edf3fb; background:#0d1520; }
.stock-adjustment-sheet [data-stocktake-diff] { font-variant-numeric:tabular-nums; }
.stock-adjustment-sheet tr.has-return-input [data-stocktake-diff] { color:#b65f13; font-weight:600; }
.stock-adjustment-tools { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; padding:12px 14px; }
.stock-adjustment-tools > label { flex:1 1 260px; display:grid; gap:4px; }
.stock-adjustment-tools textarea { width:100%; min-height:62px; font:inherit; resize:vertical; }
.stock-adjustment-history li span { flex:1; min-width:0; color:#4b5a6e; }
.stock-adjustment-loading { color:#77869a; }
@media (max-width:760px) {
  .stock-adjustment-tools { flex-direction:column; align-items:stretch; }
}

/* AI 积分面板 */
.ai-credits-settings h3 { margin:0 0 8px; font-size:14px; color:#4b5a6e; }
.ai-credits-columns { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:18px; margin-top:16px; }
.ai-credits-block { margin-top:16px; }
.ai-credits-settings .sig-row > button { margin-left:12px; flex:none; }
@media (max-width:760px) { .ai-credits-columns { grid-template-columns:1fr; } }

/* 下载提示里的“点此保存”（BROWSER-01）：只在提示带操作时接收点击。 */
.toast.has-action { pointer-events: auto; }
.toast-save-link { margin-left: 6px; color: inherit; font-weight: 600; text-decoration: underline; white-space: nowrap; cursor: pointer; }

/* 顶栏语言切换：低调，不加边框 */
.language-switch { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px; border: 0; border-radius: 8px; color: #8a95a8; background: transparent; cursor: pointer; font-size: 9px; font-weight: 600; letter-spacing: .02em; }
.language-switch svg { width: 15px; height: 15px; }
.language-switch:hover, .language-switch[aria-expanded="true"] { color: #44536a; background: rgba(47,111,242,.06); }
.language-menu { position: fixed; z-index: 181; min-width: 148px; padding: 6px; border: 1px solid #e0e6ec; border-radius: 12px; color: #26384b; background: #fff; box-shadow: 0 18px 44px rgba(24,43,65,.16); }
.language-menu[hidden] { display: none; }
.language-menu button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 7px 9px; border: 0; border-radius: 8px; color: inherit; background: transparent; cursor: pointer; font-size: 10px; text-align: left; }
.language-menu button:hover, .language-menu button:focus-visible { background: #f2f6fa; outline: none; }
.language-menu button[aria-checked="true"] { color: #2f6ff2; font-weight: 600; }
.language-menu svg { width: 13px; height: 13px; }
body[data-theme="dark"] .language-switch { color: #8d9ab0; }
body[data-theme="dark"] .language-switch:hover, body[data-theme="dark"] .language-switch[aria-expanded="true"] { color: #dbe4f2; background: rgba(255,255,255,.06); }
body[data-theme="dark"] .language-menu { border-color: #2b3a52; color: #dbe4f2; background: #131a26; box-shadow: 0 18px 44px rgba(0,0,0,.5); }
body[data-theme="dark"] .language-menu button:hover, body[data-theme="dark"] .language-menu button:focus-visible { background: #1c2636; }
@media (max-width: 720px) { .language-switch span { display: none; } }

/* 背景水印：去掉没有上传标识时的灰色圆环 + 缩写；上传了企业标识时，只在右下角留一个更小、更淡的标识，避开标题区 */
.company-watermark > span { display: none; }
body:not(.has-company-logo) .company-watermark { display: none; }
.company-watermark { top: auto; right: 3vw; bottom: 5vh; width: min(300px,24vw); height: min(300px,24vw); opacity: .03; transform: none; }
body.board-mode .company-watermark { opacity: .035; }
@media (max-width: 720px) { .company-watermark { display: none; } }

/* 深色主题对比度修正（清单 E6，2026-11-12 逐模块计算对比度后补齐） */
body[data-theme="dark"] .split-ledger-section > header > b,
body[data-theme="dark"] .split-ledger-row em,
body[data-theme="dark"] .bom-ledger-row em.is-ready { background: rgba(255,255,255,.07); background: color-mix(in srgb, var(--module-soft, #eaf7f2) 14%, transparent); }
body[data-theme="dark"] .bom-ledger-row em.is-ready { color: #8fdcb9; }
body[data-theme="dark"] .setting-row { border-color: #2b3a52; background: #16202f; }
body[data-theme="dark"] .sales-product-coverage { color: #8fdcb9; border-color: rgba(46,160,110,.38); background: rgba(46,160,110,.14); }
body[data-theme="dark"] .sales-product-coverage.is-short { color: #ffb196; border-color: rgba(220,100,60,.38); background: rgba(220,100,60,.14); }
body[data-theme="dark"] .sales-stat-card > header strong { border-color: #2b3a52; background: #1c2636; }
body[data-theme="dark"] .world-map-toolbar > div:last-child { background: rgba(22,32,47,.86); }
body[data-theme="dark"] .customer-directory-status b,
body[data-theme="dark"] #view-module .customer-directory-status b,
body[data-theme="dark"] .purchase-return-po-picker legend,
body[data-theme="dark"] .warehouse-ledger-status > span,
body[data-theme="dark"] .warehouse-ledger-status b,
body[data-theme="dark"] .studio-clock span { color: #aebdd3; }
body[data-theme="dark"] #view-module[data-module="training"] .signature-panel.tinted .sig-kpi b,
body[data-theme="dark"] .billing-governance li b { color: #e8eef8; }
body[data-theme="dark"] .accounting-control-panel > header small,
body[data-theme="dark"] .help-role-filters button.is-active { color: #8fbce9; }
body[data-theme="dark"] .sales-performance-month-value.is-pending:not(:disabled) strong,
body[data-theme="dark"] .sales-performance-total.is-pending b { color: #ffb48f; }
body[data-theme="dark"] #view-module #moduleLedgerStatus b { color: #aebdd3; }
body[data-theme="dark"] .member-governance-summary article,
body[data-theme="dark"] .help-support-facts span { border-color: #2b3a52; background: rgba(28,38,54,.86); }
body[data-theme="dark"] .member-governance-summary article small,
body[data-theme="dark"] .member-governance-summary article em,
body[data-theme="dark"] .help-support-facts small,
body[data-theme="dark"] .studio-metric span,
body[data-theme="dark"] .warehouse-ledger-filters label > span { color: #a9b8cf; }
body[data-theme="dark"] .accounting-account-tree li b { color: #8fbce9; }
body[data-theme="dark"] .studio-flow-actions button { color: #c3cfe0; }
body[data-theme="dark"].copilot-mode .copilot-thread-rail > nav button.is-active { color: #e3eaf5; }

/* 月末外币重估提醒（I6）：不是阻断项，用琥珀色区分。 */
.accounting-precheck-result li.is-reminder{color:#8a5a12}
.accounting-precheck-result li.is-reminder small{color:#8c7a5c}
body[data-theme="dark"] .accounting-precheck-result li.is-reminder{color:#e2b46a}
body[data-theme="dark"] .accounting-precheck-result li.is-reminder small{color:#b9a07a}

/* 初始配置：首页最上方的卡片；必做步骤没完成时，首页其它内容先不显示 */
#view-home.is-setup-pending > :not(#setupHomeCard){display:none !important}
.setup-home-card{margin:0 0 20px;padding:18px 20px;border:1px solid #d6e1f0;border-radius:16px;background:linear-gradient(180deg,#f6f9fe,#fff)}
.setup-home-card[hidden]{display:none}
.setup-home-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px 24px;flex-wrap:wrap}
.setup-home-head h2{margin:4px 0;font-size:18px;line-height:1.3;color:#17253d}
.setup-home-head p{margin:0;color:#6f8096;font-size:12px;line-height:1.5}
.setup-home-progress{display:grid;gap:5px;min-width:min(240px,100%);font-size:11px;color:#41546b}
.setup-home-progress i{display:block;height:6px;overflow:hidden;border-radius:99px;background:#e3e9f1}
.setup-home-progress em{display:block;height:100%;border-radius:inherit;background:#2e5f91;transition:width .3s}
.setup-home-progress b{font-weight:600;color:#17253d}
.setup-home-company{margin-top:12px;padding:10px 12px;border-radius:10px;background:#fff7ea;color:#8a5a12;font-size:12px}
.setup-home-company small{display:block;margin-top:2px;color:#8c7a5c;font-size:11px}
.setup-home-company div{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.setup-home-company em{padding:2px 8px;border-radius:99px;background:#fdebc8;font-style:normal;font-size:11px}
.setup-home-steps{margin-top:14px !important;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr))}
.setup-home-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;color:#6f8096;font-size:12px}
.setup-home-footer[hidden]{display:none}
/* 已完成的步骤收紧：只留标题、结果和“查看”，让还没做的步骤更显眼 */
.setup-home-steps .setup-guide-step.is-done small{display:none}
.setup-home-steps .setup-guide-step.is-done{padding:9px 12px;background:#fbfdfc}
body[data-theme="dark"] .setup-home-steps .setup-guide-step.is-done{background:#101a20}
body[data-theme="dark"] .setup-home-card{border-color:#27364b;background:linear-gradient(180deg,#121b27,#0f1620)}
body[data-theme="dark"] .setup-home-head h2,body[data-theme="dark"] .setup-home-progress b{color:#d9e4f2}
body[data-theme="dark"] .setup-home-head p,body[data-theme="dark"] .setup-home-footer{color:#a9b8cf}
body[data-theme="dark"] .setup-home-progress{color:#b3c2d6}
body[data-theme="dark"] .setup-home-progress i{background:#27364b}
body[data-theme="dark"] .setup-home-progress em{background:#4f86bd}
body[data-theme="dark"] .setup-home-company{background:#2a2114;color:#e2b46a}
body[data-theme="dark"] .setup-home-company small{color:#b9a07a}
body[data-theme="dark"] .setup-home-company em{background:#3a2c17}
.setup-guide-steps{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.setup-guide-step{display:grid;grid-template-columns:26px 1fr;gap:10px;padding:12px;border:1px solid #e3e9f1;border-radius:12px;background:#fff}
.setup-guide-step.is-next{border-color:#2e5f91;box-shadow:0 0 0 3px rgba(46,95,145,.10)}
.setup-guide-step.is-skipped{opacity:.72}
.setup-guide-mark{display:grid;width:24px;height:24px;place-items:center;border-radius:50%;color:#2e5f91;background:#eaf1f8;font-size:11px;font-weight:600}
.setup-guide-mark svg{width:13px;height:13px}
.setup-guide-step.is-done .setup-guide-mark{color:#fff;background:#10765f}
.setup-guide-step header{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.setup-guide-step header b{font-size:13px;color:#17253d}
.setup-guide-step header em{flex:none;font-style:normal;font-size:10px;color:#6f8096}
.setup-guide-step.is-done header em{color:#10765f}
.setup-guide-step small{display:block;margin-top:3px;color:#6f8096;font-size:11px;line-height:1.45}
.setup-guide-step p{margin:5px 0 0;color:#41546b;font-size:11px;line-height:1.45}
.setup-guide-step-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.setup-guide-step-actions button{font-size:11px}
body[data-theme="dark"] .setup-guide-step{border-color:#27364b;background:#121b27}
body[data-theme="dark"] .setup-guide-step header b{color:#d9e4f2}
body[data-theme="dark"] .setup-guide-step p{color:#b3c2d6}
body[data-theme="dark"] .setup-guide-mark{color:#9cc3ea;background:#1a2738}
body[data-theme="dark"] .setup-guide-step.is-next{border-color:#4f86bd}
