/* 分类资料窗口：左侧紧凑分类，右侧保留主要信息空间。 */
.categorized-page {
  height: min(650px, 72vh);
  display: flex;
  flex-direction: column;
}
.categorized-toolbar input { width: 340px; min-width: 260px; }
.categorized-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  flex: 1;
}
.categorized-sidebar { border: 1px solid var(--line); background: #fff; min-height: 0; }
.categorized-categories { height: calc(100% - 47px); overflow: auto; padding: 7px; }
.categorized-categories button { display: block; width: 100%; border: 0; text-align: left; padding: 8px 10px; }
.categorized-categories button.active { background: var(--blue); color: #fff; }
.categorized-category-actions { display: flex; gap: 4px; border-top: 1px solid var(--line); padding: 6px; }
.categorized-category-actions button { flex: 1; padding: 6px 3px; }
.categorized-layout .table-wrap { min-height: 0; }
.compact-reference { width: min(760px, 80vw); }
.compact-reference .table-wrap { min-height: 360px; max-height: 60vh; }
.sale-stock-actions { display: flex; gap: 6px; }

/* 分类名称只有一个主要输入项，使用紧凑居中弹窗，避免占满主窗口。 */
.modal-card.compact-category-modal {
  width: 380px;
  min-width: 0;
  max-width: calc(100vw - 32px);
}
.compact-category-modal .modal-head {
  height: 34px;
  padding: 0 11px;
}
.compact-category-modal .modal-head h3 { font-size: 14px; font-weight: 600; }
.compact-category-modal .modal-body,
.compact-category-modal #modal-body {
  padding: 14px 16px 15px;
  overflow: hidden;
}
.compact-category-modal .form { padding: 0; }
.compact-category-modal .actions {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
  justify-content: flex-end;
  gap: 8px;
}
.compact-category-modal .actions button {
  min-width: 62px;
  height: 30px;
  padding: 0 14px;
}

/* 供应商分类仅需名称和排序，避免通用资料弹窗的宽表单挤压。 */
.supplier-category-card { width:min(360px,calc(100vw - 32px)); }
.supplier-category-card .form { padding:14px 16px 12px; }
.supplier-category-card .form>label { display:grid;grid-template-columns:66px minmax(0,1fr);gap:8px;align-items:center;margin:0 0 9px; }
.supplier-category-card .form>label>span { margin:0;text-align:right; }
.supplier-category-card .form>label>input { width:100%;min-width:0;height:30px;box-sizing:border-box; }
.supplier-category-card .actions { margin:6px 0 0;padding-top:10px; }
.supplier-reference-manager .table-wrap th,.supplier-reference-manager .table-wrap td { text-align:center; }
.supplier-reference-manager .table-wrap tr.supplier-inactive td { color:#8a94a6; }
.supplier-note-card { width:min(540px,calc(100vw - 32px));height:auto;max-height:min(420px,calc(100vh - 32px));display:flex;flex-direction:column; }
.supplier-note-meta { display:grid;gap:5px;padding:12px 16px;border-bottom:1px solid #d8dee9;font-size:13px; }
.supplier-note-content { min-height:80px;overflow:auto;padding:14px 16px;white-space:pre-wrap;overflow-wrap:anywhere; }
.supplier-note-card .actions { margin:0 16px 12px;padding-top:10px; }
.supplier-manager-overlay .data-window-body { display:flex;min-height:0;overflow:hidden; }
.supplier-manager-overlay .supplier-reference-manager { flex:1;height:100%;min-height:0;overflow:hidden; }
.supplier-reference-manager .categorized-layout { min-height:0;overflow:hidden; }
.supplier-reference-manager .categorized-sidebar { display:grid;grid-template-rows:minmax(0,1fr) auto;overflow:hidden; }
.supplier-reference-manager .categorized-categories { height:auto;min-height:0;overflow:auto; }
.supplier-reference-manager .categorized-layout>.table-wrap { height:100%;min-height:0;overflow:auto; }
.supplier-manager-overlay .categorized-categories,.supplier-manager-overlay .categorized-layout>.table-wrap,
.tenant-phone-model-dialog .categorized-categories,.tenant-phone-model-dialog .phone-model-table-panel .table-wrap { scrollbar-width:thin;scrollbar-color:#aeb9ca transparent; }
.supplier-manager-overlay .categorized-categories::-webkit-scrollbar,.supplier-manager-overlay .categorized-layout>.table-wrap::-webkit-scrollbar,
.tenant-phone-model-dialog .categorized-categories::-webkit-scrollbar,.tenant-phone-model-dialog .phone-model-table-panel .table-wrap::-webkit-scrollbar { width:6px;height:6px; }
.supplier-manager-overlay .categorized-categories::-webkit-scrollbar-thumb,.supplier-manager-overlay .categorized-layout>.table-wrap::-webkit-scrollbar-thumb,
.tenant-phone-model-dialog .categorized-categories::-webkit-scrollbar-thumb,.tenant-phone-model-dialog .phone-model-table-panel .table-wrap::-webkit-scrollbar-thumb { background:#aeb9ca;border-radius:6px; }

/* 库存管理使用窄分类树，上方商品列表、下方批次与完整流水。 */
.inventory-page { min-height: calc(100vh - 115px); }
.inventory-top { display:flex; align-items:center; gap:6px; margin-bottom:10px; }
.inventory-top input { width:340px; flex:none; }
.inventory-page>.inventory-top>input{height:39px;min-height:39px;max-height:39px;padding:8px 10px;font-size:14px;line-height:21px}
.inventory-page>.inventory-top>button{height:36px;min-height:36px;max-height:36px;padding:0 13px;font-size:14px;line-height:21px;font-weight:400;white-space:nowrap}
.inventory-top .grow { flex:1; }
.inventory-layout { display:grid; grid-template-columns:155px minmax(0,1fr); gap:12px; min-height:650px; }
:is(.inventory-page,.unified-inventory-page) .inventory-category {display:flex;flex-direction:column;min-height:0;}
:is(.inventory-page,.unified-inventory-page) .inventory-category>.inventory-tree{height:0;min-height:0;flex:1;overflow:auto;}
:is(.inventory-page,.unified-inventory-page) .inventory-tree .tree-item[data-category-depth="1"]{--inventory-category-ink:#172033;font-weight:600}
:is(.inventory-page,.unified-inventory-page) .inventory-tree .tree-item[data-category-depth="2"]{--inventory-category-ink:#334155}
:is(.inventory-page,.unified-inventory-page) .inventory-tree .tree-item[data-category-depth="3"]{--inventory-category-ink:#64748b}
:is(.inventory-page,.unified-inventory-page) .inventory-tree .tree-item.active{color:#1d4ed8}
.inventory-category { border:1px solid var(--line); background:#fff; padding:8px; min-width:0; }
.inventory-category>b { display:block; margin-bottom:5px; }
.inventory-category-actions { display:grid; grid-template-columns:repeat(4,1fr); gap:0; margin:0 -2px 6px; padding:4px 0 5px; border-bottom:1px solid var(--line); }
.inventory-category-actions button { border:0; padding:2px 0; background:#fff; color:#26354a; line-height:1.15; }
.inventory-category-actions button:hover { background:#f4f7fb; }
.inventory-category-actions button.danger { color:#26354a; }
.inventory-category-actions .tool-icon { position:relative; display:block; width:18px; height:19px; margin:0 auto 2px; font-size:0; line-height:18px; }
.inventory-category-actions .tool-icon.add,
.inventory-category-actions .tool-icon.edit { color:#22a35a; }
.inventory-category-actions .tool-icon.add::before { content:"⊕"; font-size:18px; font-weight:500; }
.inventory-category-actions .tool-icon.edit::before { content:""; position:absolute; left:3px; top:4px; width:10px; height:9px; border:1.5px solid currentColor; }
.inventory-category-actions .tool-icon.edit::after { content:""; position:absolute; left:8px; top:2px; width:8px; height:2px; border:2px solid #fff; border-width:2px 0; background:currentColor; transform:rotate(-43deg); transform-origin:center; }
.inventory-category-actions .tool-icon.delete { color:#d92d20; }
.inventory-category-actions .tool-icon.delete::before { content:""; position:absolute; left:5px; top:6px; width:8px; height:10px; border:1.5px solid currentColor; border-top:0; }
.inventory-category-actions .tool-icon.delete::after { content:""; position:absolute; left:4px; top:3px; width:10px; height:2px; border-top:1.5px solid currentColor; border-bottom:1.5px solid currentColor; }
.inventory-category-actions .tool-icon.refresh { color:#1769d2; }
.inventory-category-actions .tool-icon.refresh::before { content:"↻"; font-size:20px; font-weight:500; }
.inventory-category-actions small { display:block; color:#1f2937; font-size:12px; white-space:nowrap; }
.inventory-tree { border-top:1px solid var(--line); padding-top:5px; overflow:auto; height:590px; }
.inventory-tree .tree-item { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding-top:6px; padding-bottom:6px; }
.inventory-tree .tree-item.active { background:#dce9fb; color:#1d4ed8; }
.inventory-tree .tree-item{position:relative}
.inventory-tree .tree-item.tree-child::before{content:"";position:absolute;left:calc(4px + (var(--tree-depth) - 1)*16px);top:-50%;bottom:50%;width:14px;border-left:1px dotted #8b98aa;border-bottom:1px dotted #8b98aa;pointer-events:none}
.inventory-tree.connected-category-tree .tree-item{height:28px;min-height:28px;line-height:20px;margin:0;padding:4px 6px 4px calc(8px + var(--connected-depth)*18px)!important;border:0;font-weight:400}
.inventory-tree.connected-category-tree .tree-item::before{display:none}
.connected-category-tree .category-connector{position:absolute;top:0;bottom:0;width:0;border-left:1px dotted #8b98aa;pointer-events:none}
.connected-category-tree .category-connector.branch::after{content:"";position:absolute;left:0;top:14px;width:7px;border-top:1px dotted #8b98aa}
.connected-category-tree .category-connector.parent-link::after{content:"";position:absolute;left:0;top:14px;width:18px;border-top:1px dotted #8b98aa}
.connected-category-tree .category-connector.parent-link.leaf::after{width:25px}
.connected-category-tree .category-connector.last{bottom:50%}
.connected-category-tree .category-connector.down{top:50%}
.connected-category-tree .tree-item:first-child .category-connector.down{top:25px}
.connected-category-tree .category-toggle{position:absolute;top:8px;z-index:2;display:inline-flex;width:11px;height:11px;align-items:center;justify-content:center;border:1px solid #8b98aa;background:#fff;color:#4b5563;font:10px/9px Arial,sans-serif;box-sizing:border-box;cursor:pointer}
.tree-toggle { display:inline-block; width:16px; text-align:center; }
.inventory-folder-icon { position:relative; display:inline-block; width:14px; height:10px; margin:0 6px 0 1px; vertical-align:-1px; background:#f5b51b; border:1px solid #d99800; border-radius:1px; box-shadow:inset 0 1px rgba(255,255,255,.35); }
.inventory-folder-icon::before { content:""; position:absolute; left:1px; top:-4px; width:7px; height:4px; background:#f5b51b; border:1px solid #d99800; border-bottom:0; border-radius:2px 2px 0 0; }
.inventory-main { display:grid; grid-template-rows:minmax(270px,44%) minmax(300px,56%); gap:10px; min-width:0; }
.inventory-products,.inventory-detail { min-height:0; display:flex; flex-direction:column; }
.inventory-section-title { display:flex; align-items:center; gap:14px; min-height:34px; padding:6px 9px; border:1px solid var(--line); border-bottom:0; background:#fff; }
.inventory-section-title span { color:var(--muted); font-size:12px; }
.inventory-products .table-wrap { min-height:0; flex:1; }
.inventory-detail-grid { display:grid; grid-template-rows:minmax(130px,40%) minmax(170px,60%); gap:8px; min-height:0; flex:1; }
.inventory-detail-grid .table-wrap { min-height:0; }
.inventory-detail .empty { padding:30px; }
.stock-number { border:0; background:transparent; padding:2px 8px; font-weight:700; cursor:pointer; }
.stock-normal { color:#1769d2; font-weight:700; }
.stock-zero { color:#d92d20; font-weight:700; }
.stock-warning { color:#e8790c; font-weight:700; }
.price-green { color:#16833b; font-weight:600; }
.inventory-column-options { display:grid; grid-template-columns:repeat(3,minmax(130px,1fr)); gap:12px; padding:8px 0 18px; }
.inventory-flow-summary { display:flex; gap:36px; padding:4px 2px 14px; }
.inventory-flow-summary b { color:#1769d2; }
.inventory-flow-table { max-height:480px; }
.inventory-products td.inventory-value-green{color:#16833b!important}
.inventory-top:has([data-toggle-inventory-values]){flex-wrap:wrap}
.inventory-top:has([data-toggle-inventory-values])>button{white-space:nowrap;flex-shrink:0}
.inventory-products td.inventory-value-red{color:#d92d20!important}
.inventory-products td.inventory-value-black{color:#000!important}
.inventory-products .stock-normal{color:#1769d2!important;font-weight:400!important}
.inventory-products .stock-zero{color:#d92d20!important;font-weight:400!important}
.inventory-products .stock-warning{color:#e8790c!important;font-weight:400!important}
.inventory-values-hidden th[data-sensitive],.inventory-values-hidden td[data-sensitive]{display:none}
.inventory-values-hidden .inventory-flow-summary>span:nth-child(n+2){visibility:hidden}
.modal-card.inventory-flow-modal .inventory-flow-table{overflow:auto;max-height:none}
.modal-card.inventory-flow-modal .inventory-flow-table table{min-width:1300px}
.modal-card.inventory-flow-modal .inventory-flow-table th,.modal-card.inventory-flow-modal .inventory-flow-table td{font-size:14px!important;line-height:20px!important;padding:4px 8px!important;height:28px;font-weight:400}
.trade-order-heading { display:flex; justify-content:space-between; align-items:center; padding:0 2px 12px; color:#344054; }
.trade-order-heading b { color:#101828; }
/* 左侧菜单采用分组式业务导航：小图标辅助扫描，选中项保持蓝底白字。 */
nav { padding:10px 10px 14px; }
.nav-section {
  margin:12px 6px 5px;
  font-size:11px;
  color:#8a94a6;
  font-weight:600;
}
.nav-btn {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:38px;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:5px;
  color:#23344d;
}
.nav-btn:hover {
  background:#eef4ff;
  border-color:#d6e3f8;
}
.nav-btn.active {
  background:#2563eb;
  border-color:#1d4ed8;
  color:#fff;
  box-shadow:inset 3px 0 0 #9cc2ff;
}
.nav-icon {
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:grid;
  place-items:center;
  border-radius:5px;
  background:#edf3ff;
  color:#1f5fbf;
  font-size:12px;
  font-weight:700;
}
.nav-btn.active .nav-icon {
  background:#fff;
  color:#1d4ed8;
}
.nav-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* 商品资料按业务录入顺序横向排列，新增时四行即可完成主要字段。 */
.product-form { width:min(980px,88vw); }
.product-form-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:14px 18px; }
.product-form-grid label span { color:#475467; }
.inventory-page,
#inventory-product-form,
#inventory-product-form button,
#inventory-product-form input,
#inventory-product-form select,
#inventory-product-form textarea {
  font-family:"Microsoft YaHei","Microsoft YaHei UI","SimHei","PingFang SC",sans-serif;
  font-size:15px;
  color:#172033;
}
#inventory-product-form .product-form-grid label>span {
  color:#111827;
  font-size:15px;
  font-weight:600;
  line-height:22px;
}
#inventory-product-form input,
#inventory-product-form select,
#inventory-product-form textarea {
  color:#111827;
  font-weight:500;
  line-height:22px;
}
#inventory-product-form input::placeholder,
#inventory-product-form textarea::placeholder {
  font-weight:400;
}
.pf-category { grid-column:1/span 5; grid-row:1; }
.pf-sku { grid-column:6/span 3; grid-row:1; }
.pf-barcode { grid-column:9/span 4; grid-row:1; }
.pf-name { grid-column:1/span 4; grid-row:2; }
.pf-spec { grid-column:5/span 5; grid-row:2; }
.pf-shelf { grid-column:10/span 3; grid-row:2; }
.pf-buy { grid-column:1/span 2; grid-row:3; }
.pf-sale { grid-column:3/span 2; grid-row:3; }
.pf-member { grid-column:5/span 2; grid-row:3; }
.pf-stock { grid-column:7/span 2; grid-row:3; }
.pf-warning { grid-column:9/span 2; grid-row:3; }
.pf-unit { grid-column:11/span 2; grid-row:3; }
.pf-average,.pf-amount,.pf-last-buy,.pf-last-sale { grid-column:span 3; }
.pf-compatible,.pf-parameters,.pf-remark { grid-column:1/-1; }
.pf-compatible textarea,.pf-parameters textarea,.pf-remark textarea{min-height:50px;height:50px;resize:vertical;line-height:20px;padding-top:4px;padding-bottom:4px;white-space:pre-wrap;overflow-wrap:anywhere}
.product-form input[readonly] { background:#f3f5f8; color:#475467; }
.inventory-category-form {
  display:grid;
  gap:9px;
}
.modal-card .inventory-category-form label {
  grid-template-columns:72px minmax(0,1fr);
  gap:8px;
  font-size:13px;
}
.inventory-category-form input,
.inventory-category-form select {
  height:28px;
  padding:3px 6px;
  border-color:#b8c4d6;
  font-size:13px;
}
.category-parent-picker {
  display:grid;
  grid-template-columns:minmax(0,1fr) 25px;
  gap:0;
}
.category-parent-picker > input:not([type=hidden]) {
  border-right:0;
  border-radius:3px 0 0 3px;
  background:#fff;
  cursor:pointer;
}
.category-parent-picker button {
  padding:0;
  min-width:25px;
  height:28px;
  border-radius:0 2px 2px 0;
  color:#2563eb;
  background:#f8fafc;
  border-color:#b8c4d6;
  font-size:14px;
  line-height:1;
}
.inventory-category-form .field-help {
  grid-column:2;
  color:#98a2b3;
  font-size:12px;
  margin-top:-3px;
}
.inventory-category-form input[type=number]::-webkit-outer-spin-button,
.inventory-category-form input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance:none;
  margin:0;
}
.inventory-category-form input[type=number] {
  appearance:textfield;
  -moz-appearance:textfield;
}
.modal-card.category-tree-picker-modal {
  width:min(380px,calc(100vw - 32px));
  height:min(510px,calc(100vh - 40px));
  min-width:0;
  max-width:none;
  display:flex;
  flex-direction:column;
}
.category-tree-picker-modal .modal-head{height:42px;padding:0 14px}
.category-tree-picker-modal .modal-head h3{font-size:16px}
.category-tree-picker-modal .modal-body,
.category-tree-picker-modal #modal-body { flex:1; min-height:0; padding:0; }
#category-tree-picker { height:100%; display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; background:#fff; }
.category-picker-toolbar { display:flex; align-items:center; gap:1px; padding:6px 8px; border-bottom:1px solid #dbe3ef; background:#f8fafc; }
.category-picker-toolbar button { min-width:43px; padding:2px 3px; border:0; background:transparent; color:#26354a; }
.category-picker-toolbar button:hover { background:#eaf2ff; }
.category-picker-toolbar b { display:block; height:17px; font-size:15px; line-height:17px; font-weight:600; }
.category-picker-toolbar span { display:block; margin-top:1px; font-size:14px; line-height:20px; font-weight:400; }
.category-picker-toolbar .add,.category-picker-toolbar .edit { color:#18a558; }
.category-picker-toolbar .delete { color:#dc2626; font-size:13px; }
.category-picker-toolbar .refresh { color:#1683d8; }
.category-picker-toolbar .fold { color:#f3a712; }
.category-tree-scroll { overflow:auto; padding:6px 7px 10px; background:#fff; }
.category-tree-row { display:flex; align-items:center; min-height:32px; padding:3px 7px 3px calc(7px + var(--category-level,0) * 18px); border-radius:3px; color:#253047; cursor:default; user-select:none; }
.category-tree-row:hover { background:#f1f5fa; }
.category-tree-row.selected { background:#d9eaff; color:#153e75; }
.category-tree-row.root-row { padding-left:8px; font-weight:400; }
.category-tree-toggle { width:18px; min-width:18px; height:22px; padding:0; border:0; background:transparent; color:#50627a; font-size:12px; }
.category-tree-toggle:disabled { opacity:0; }
.category-folder { width:19px; color:#f4ae1a; font-size:14px; transform:scaleX(1.1); }
.category-folder.root { color:#e69a00; }
.category-tree-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; line-height:22px; }
.category-picker-current { display:flex; gap:7px; min-height:34px; align-items:center; padding:5px 10px; border-top:1px solid #dbe3ef; background:#f8fafc; }
.category-picker-current small { color:#718096; font-size:13px; }
.category-picker-current strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.category-picker-actions { display:flex; justify-content:flex-end; gap:8px; padding:8px 10px; border-top:1px solid #dbe3ef; }
.category-picker-actions button { min-width:64px;height:32px;padding:0 12px }
/* 业务表单统一为“字段名：控件”的横向结构；登录页和表格内编辑不套用此规则。 */
.form label,
.modal-card form label,
.picker-card form label,
.data-window form label {
  display:grid;
  grid-template-columns:max-content minmax(0,1fr);
  align-items:center;
  gap:8px;
  min-width:0;
}
.form label>span,
.modal-card form label>span,
.picker-card form label>span,
.data-window form label>span {
  display:block;
  margin:0;
  color:#475467;
  white-space:nowrap;
}
.form label>span::after,
.modal-card form label>span::after,
.picker-card form label>span::after,
.data-window form label>span::after { content:"："; }
.form label>input,
.form label>select,
.form label>textarea,
.modal-card form label>input,
.modal-card form label>select,
.modal-card form label>textarea,
.picker-card form label>input,
.picker-card form label>select,
.picker-card form label>textarea,
.data-window form label>input,
.data-window form label>select,
.data-window form label>textarea { min-width:0; }
.form label>textarea,
.modal-card form label>textarea,
.picker-card form label>textarea,
.data-window form label>textarea { resize:vertical; }
@media print { #sidebar,.inventory-category,.inventory-top,.topbar { display:none!important; } .main { margin:0!important; } }
@media(max-width:1000px){.inventory-layout{grid-template-columns:140px minmax(0,1fr)}.inventory-top input{width:230px}.product-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-form-grid>label{grid-column:span 1}.product-form-grid .pf-remark{grid-column:1/-1}}
/* 进货、销售列表：操作集中在顶部，宽字段获得剩余空间。 */
.trade-list-page{height:100%;display:flex;flex-direction:column;gap:10px}
.trade-list-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.trade-list-toolbar input{width:330px;max-width:34vw}
.trade-list-toolbar button{height:40px;padding:0 18px;white-space:nowrap}
.trade-list-table{flex:1;min-height:360px;background:#fff;border:1px solid #d8e0ec}
.trade-list-table table{min-width:1180px;table-layout:fixed}
.trade-list-table th,.trade-list-table td{padding:11px 9px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inventory-batch-link{border:0;background:transparent;color:#2563eb;cursor:pointer;font:inherit;padding:0;text-decoration:none}
.inventory-batch-link:hover{text-decoration:underline}
.finance-summary{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:10px;margin:12px 0}.finance-summary>div{background:#fff;border:1px solid #cbd5e1;padding:12px;font-size:14px}.finance-summary b{display:block;color:#2563eb;font-size:20px;margin-top:6px}.finance-chart{margin:12px 0;padding:12px;background:#fff;border:1px solid #cbd5e1}.finance-chart svg{display:block;width:100%;height:180px;margin-top:8px}.finance-module-table,.finance-detail{background:#fff}
.trade-list-table th{background:#f3f6fa;color:#26364d;font-weight:700}
.trade-list-table .trade-wide{width:150px;text-align:left}
.trade-list-table tbody tr{cursor:pointer}
.trade-list-table tbody tr:hover{background:#f4f8ff}
.trade-list-table tbody tr.selected{background:#dbeafe;color:#173f7a}
.commission-review-shell{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto}.commission-review-shell>.commission-review-toolbar{display:grid;grid-template-columns:max-content minmax(180px,1fr) max-content;align-items:center;gap:18px;padding:10px 12px;border-bottom:1px solid #d7dde6}.commission-review-setting,.commission-review-tabs,.commission-review-days{display:flex;align-items:center;gap:8px}.commission-review-setting{white-space:nowrap}.commission-review-days{gap:0}.commission-review-days input{width:54px;height:32px;border-radius:3px 0 0 3px;text-align:center}.commission-review-days em{display:flex;align-items:center;height:32px;padding:0 9px;border:1px solid #b9c7da;border-left:0;border-radius:0 3px 3px 0;background:#f8fafc;color:#334155;font-style:normal}.commission-review-toolbar i{overflow:hidden;color:#64748b;font-style:normal;text-overflow:ellipsis;white-space:nowrap}.commission-review-tabs{justify-self:end}.commission-review-tabs button{min-width:70px}.commission-review-shell tbody tr.selected td{background:#dbeafe;font-weight:400}.commission-review-shell td,.commission-review-shell th{padding:4px;line-height:20px}.commission-review-shell footer{padding:8px;color:#64748b}.commission-adjust-overlay{position:absolute;inset:0;z-index:8;display:flex;align-items:center;justify-content:center;background:#0f172a55}.commission-adjust-overlay>section{width:520px;background:#fff;border:1px solid #cbd5e1;box-shadow:0 12px 36px #0f172a40}.commission-adjust-overlay header,.commission-adjust-overlay footer{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #d7dde6}.commission-adjust-overlay footer{justify-content:flex-end;gap:8px;border-top:1px solid #d7dde6;border-bottom:0}.commission-adjust-overlay header button{border:0}.commission-adjust-overlay section>div{display:grid;gap:12px;padding:16px}.commission-adjust-overlay label{display:flex;align-items:flex-start;gap:8px}.commission-adjust-overlay label>span{width:92px;text-align:right}.commission-adjust-overlay textarea{width:330px;height:90px;resize:none}.commission-adjust-overlay em{color:#dc2626;font-style:normal}
.payroll-shell{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto}.payroll-shell>header{display:grid;grid-template-columns:max-content minmax(260px,1fr);align-items:center;gap:22px;padding:10px 12px;border-bottom:1px solid #d7dde6}.payroll-filters{display:flex;align-items:center;gap:18px}.payroll-shell>header label{display:flex;align-items:center;gap:8px;white-space:nowrap}.payroll-shell>header input{width:150px}.payroll-shell>header select{width:150px}.payroll-shell>header>span{justify-self:end;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.payroll-shell>header>span,.payroll-shell>footer{color:#64748b}.payroll-shell td,.payroll-shell th{padding:4px;line-height:20px;white-space:nowrap}.payroll-shell tbody tr.selected td{background:#dbeafe;font-weight:400}.payroll-shell>footer{padding:8px}.payroll-editor-overlay input{width:220px}.payroll-editor-overlay textarea{height:70px}
.finance-ledger-shell{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto}.finance-ledger-shell>header{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #d7dde6}.finance-ledger-shell>header>[data-ledger-search]{width:220px}.finance-ledger-shell>header label{display:flex;align-items:center;gap:6px;white-space:nowrap}.finance-ledger-shell>header label input{width:130px}.finance-ledger-shell>[data-ledger-total]{padding:8px 12px;color:#475569}.finance-ledger-shell td,.finance-ledger-shell th{padding:4px;line-height:20px}.finance-ledger-form input,.finance-ledger-form select{width:260px}
.trade-list-footer{display:flex;justify-content:space-between;align-items:center;color:#64748b;font-size:13px;padding:2px 2px 0}

/* 日常收支新增记账：沿用维修单的紧凑字段和双入口图片区。 */
.finance-ledger-form>section{width:min(720px,calc(100vw - 48px))}
.finance-ledger-form>section>header>button[data-close]{display:grid;place-items:center;width:38px;height:38px;padding:0;font-size:27px;font-weight:700;line-height:1}
.finance-ledger-form section>.finance-ledger-fields{display:grid;grid-template-columns:258px 174px minmax(0,1fr);gap:10px;padding:16px 20px}
.finance-ledger-form .finance-ledger-fields label{display:grid;grid-template-columns:82px minmax(0,1fr);align-items:center;gap:6px;min-height:36px;font-size:14px;line-height:20px}
.finance-ledger-form .finance-ledger-fields label>span{display:flex;width:auto;height:36px;align-items:center;justify-content:flex-end;color:#334155;text-align:right;white-space:nowrap}
.finance-ledger-form .finance-ledger-fields label>span::after{content:"："}
.finance-ledger-form .finance-ledger-fields input,.finance-ledger-form .finance-ledger-fields select{width:100%;height:36px;box-sizing:border-box;padding:0 10px;font-size:14px;line-height:34px}
.finance-ledger-form .finance-ledger-time input{min-width:0}
.finance-ledger-form .finance-ledger-fields .finance-ledger-amount{grid-template-columns:82px 88px 14px;column-gap:6px}
.finance-ledger-form .finance-ledger-amount::after{content:"元";align-self:center;color:#334155;font-size:14px}
.finance-ledger-form .finance-ledger-name input{max-width:186px}
.finance-ledger-form .finance-ledger-cost-box{grid-column:2/4}
.finance-ledger-form .finance-ledger-remark{grid-column:1/-1;align-items:start}
.finance-ledger-form .finance-ledger-remark textarea{width:100%;height:36px;min-height:36px;box-sizing:border-box;padding:7px 10px;font-size:14px;line-height:20px;overflow-y:auto;resize:vertical}
.finance-ledger-shell tbody tr[data-id]{cursor:pointer}
.finance-ledger-shell tbody tr.selected td{background:#dbeafe;font-weight:400}
.finance-ledger-cost-box{display:flex;align-items:center;gap:6px;min-width:0;height:36px;box-sizing:border-box}
.finance-ledger-cost-box .finance-ledger-cost-label{flex:0 0 82px;color:#334155;font-size:14px;text-align:right;white-space:nowrap}
.finance-ledger-cost-box button{flex:0 0 70px;height:36px;background:#2563eb;color:#fff;border-color:#2563eb}
.finance-ledger-cost-box span{overflow:hidden;color:#64748b;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:760px){.finance-ledger-form section>.finance-ledger-fields{grid-template-columns:minmax(0,1fr)}.finance-ledger-form .finance-ledger-cost-box,.finance-ledger-form .finance-ledger-remark{grid-column:1}.finance-ledger-form .finance-ledger-name input{max-width:none}}
.finance-ledger-form .finance-ledger-images{display:grid;grid-template-columns:88px minmax(0,1fr);gap:10px;padding:0 20px 16px}
.finance-ledger-image-tools{display:flex;flex-direction:column;justify-content:center;gap:6px}
.finance-ledger-image-tools .repair-image-tool{display:flex;width:80px;min-width:80px;height:36px;align-items:center;justify-content:center;padding:4px 8px;background:#2563eb;color:#fff;border-color:#2563eb}
.finance-ledger-image-tools .repair-image-tool small{font-size:13px;color:inherit;white-space:nowrap}
.finance-ledger-image-preview{display:flex;align-items:flex-start;gap:6px;min-width:0;height:124px;padding:4px;box-sizing:border-box;border:1px solid #c5cdd8;background:#fff;overflow-x:auto;overflow-y:hidden}
.finance-ledger-image-preview>span{margin:auto;color:#94a3b8}
.finance-ledger-image-preview figure{position:relative;flex:0 0 68px;width:68px;height:112px;margin:0;border:2px solid transparent;background:#fff;overflow:hidden}
.finance-ledger-image-preview figure>img{width:100%;height:100%;object-fit:contain;background:#fff}
.finance-ledger-image-preview figure>span{display:flex;height:100%;align-items:center;justify-content:center;padding:4px;box-sizing:border-box;color:#64748b;font-size:12px;text-align:center;word-break:break-all}
.finance-ledger-image-preview figure>button{position:absolute;top:2px;right:2px;width:20px;min-width:20px;height:20px;padding:0;border:0;border-radius:50%;background:#ef4444;color:#fff;font-weight:700;line-height:20px}
.ledger-cost-dialog .repair-cost-choice-card{width:min(760px,calc(100vw - 48px))}
.ledger-cost-dialog .repair-cost-list{height:260px;min-height:260px}
.ledger-cost-dialog .repair-cost-list table{width:100%;table-layout:fixed}
.ledger-cost-dialog .ledger-cost-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ledger-custom-cost-layer,body:has(> .ledger-cost-dialog) > .inventory-select-overlay{z-index:10070}
.ledger-custom-cost-layer .repair-other-cost-card .repair-other-cost-grid{grid-template-columns:repeat(24,minmax(0,1fr));column-gap:5px}
.ledger-custom-cost-layer .repair-other-cost-card .repair-cost-supplier-field{grid-column:span 4}
.ledger-custom-cost-layer .repair-other-cost-card .repair-cost-supplier-name-field{grid-column:span 9}
.ledger-custom-cost-layer .repair-other-cost-card .repair-cost-contact-field{grid-column:span 5}
.ledger-custom-cost-layer .repair-other-cost-card .repair-cost-phone-field{grid-column:span 6}
.ledger-custom-cost-layer .repair-other-cost-card .repair-cost-name-field{grid-column:span 12}
.ledger-custom-cost-layer .repair-other-cost-card .repair-cost-amount-field,.ledger-custom-cost-layer .repair-other-cost-card .repair-cost-payment-field{grid-column:span 6}
.ledger-custom-cost-layer .repair-other-cost-card .repair-other-cost-grid [data-choose-supplier]{width:56px;background:#2563eb;color:#fff;border-color:#2563eb}
.ledger-custom-cost-layer .repair-other-cost-card .repair-other-cost-grid .repair-cost-amount-field{grid-template-columns:max-content 88px 14px;column-gap:4px}
.ledger-custom-cost-layer .repair-cost-amount-field .ledger-cost-unit{font-size:14px;color:#334155;white-space:nowrap}
.ledger-custom-cost-layer .repair-other-cost-card .repair-other-cost-grid .repair-cost-payment-field select{width:90px;justify-self:start}
body:has(> .ledger-custom-cost-layer) > .master-data-picker{z-index:10080}
.ledger-cost-delete{width:24px;min-width:24px;height:24px;padding:0;border:0;background:transparent}
.ledger-cost-delete svg{display:block;width:22px;height:22px}
.ledger-cost-delete circle{fill:#dc2626}.ledger-cost-delete path{fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round}
.ledger-custom-cost-card{width:min(460px,calc(100vw - 48px))}
.ledger-custom-cost-fields{display:grid;gap:10px;padding:16px}
.ledger-custom-cost-fields label{display:grid;grid-template-columns:80px minmax(0,1fr);align-items:center;gap:8px}
.ledger-custom-cost-fields label>span::after{content:"："}
.ledger-custom-cost-fields input{height:36px;box-sizing:border-box}

/* 进货、销售单据弹窗：紧凑抬头、大明细区、清晰底部操作。 */
.modal-card.trade-order-modal{width:min(1320px,98vw);height:min(720px,calc(100dvh - 40px));max-width:98vw;max-height:calc(100dvh - 40px);overflow:hidden;display:flex;flex-direction:column}
.trade-order-modal .modal-body{display:flex;flex:1;min-height:0;padding:0}
.trade-order-form{display:flex;flex-direction:column;flex:1;min-height:0;padding:16px 20px}
.trade-order-form .trade-order-heading{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;margin-bottom:10px;background:#f6f8fb;border:1px solid #dbe3ef;color:#22324a}
.trade-order-form .form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 16px;padding:12px 14px;border:1px solid #dbe3ef;background:#fff}
.trade-order-form .form-grid label{display:flex;align-items:center;gap:8px;min-width:0}
.trade-order-form .form-grid label>span{flex:0 0 auto;color:#334155;white-space:nowrap}
.trade-order-form .form-grid input,.trade-order-form .form-grid select,.trade-order-form .form-grid textarea{min-width:0;flex:1}
.trade-order-form .form-grid .span2,.trade-order-form .trade-remark-field,.trade-order-form .trade-internal-field{grid-column:span 2}
.trade-order-form .trade-remark-field textarea,.trade-order-form .trade-internal-field textarea{height:38px;min-height:38px;resize:vertical}
.trade-order-form .order-items{display:flex;flex-direction:column;flex:1;min-height:260px;margin-top:12px;border:1px solid #dbe3ef;background:#fff}
.trade-order-form .order-items>.toolbar{padding:9px 12px;background:#f6f8fb;border-bottom:1px solid #dbe3ef}
.trade-order-form .order-items table{width:100%;table-layout:fixed}
.trade-order-form .order-items th{height:40px;background:#eef2f7;color:#24344c}
.trade-order-form .order-items td{padding:5px}
.trade-order-form .order-items td input{width:100%;box-sizing:border-box}
.trade-order-form>.actions{margin-top:12px;padding-top:12px;border-top:1px solid #dbe3ef;justify-content:flex-end}
.trade-order-form>.actions button{min-width:96px;height:40px}
.trade-sheet-bottom{margin-top:10px;border-top:1px solid #dbe3ef;padding-top:10px;display:flex;flex-direction:column;gap:9px}
.trade-bottom-columns{display:grid;grid-template-columns:630px max-content 112px minmax(0,1fr);grid-template-rows:auto minmax(84px,1fr);gap:7px 6px;min-height:160px;align-items:start}
.trade-bottom-columns .trade-amount-row{grid-column:1;grid-row:1 / 3;display:grid;grid-template-columns:195px 390px;grid-template-rows:repeat(4,34px);align-items:center;align-content:start;gap:6px;white-space:nowrap}
.trade-bottom-columns .trade-amount-row>div,.trade-bottom-columns .trade-amount-row>label{display:grid;grid-template-columns:max-content 96px;align-items:center;justify-content:start;gap:5px;font-size:14px;font-weight:400}
.trade-bottom-columns .trade-amount-row b,.trade-bottom-columns .trade-amount-row input,.trade-bottom-columns .trade-amount-row select{width:96px;min-width:96px;height:34px;box-sizing:border-box;font:400 14px/1.2 "Microsoft YaHei",sans-serif}
.trade-bottom-columns .amount-total{grid-column:1;grid-row:1}.trade-bottom-columns .trade-discount{grid-column:1;grid-row:2}.trade-bottom-columns .amount-current-debt{grid-column:1;grid-row:3}.trade-bottom-columns .amount-cumulative-debt{grid-column:1;grid-row:4}.trade-bottom-columns .trade-paid{grid-column:2;grid-row:1}.trade-bottom-columns .quote-cost-total{grid-column:2;grid-row:2}.trade-bottom-columns .trade-business-status-slot,.trade-bottom-columns .quote-delivery-status{grid-column:2;grid-row:1;margin-left:202px}
.trade-bottom-columns .trade-internal-row{display:contents}
.trade-bottom-columns .trade-internal-row>span{grid-column:3;grid-row:1;align-self:start;justify-self:end;white-space:nowrap}
.trade-bottom-columns .trade-internal-row textarea{grid-column:4;grid-row:1 / 3;width:100%;height:126px;min-height:126px;max-height:150px;box-sizing:border-box;resize:vertical}
.trade-bottom-columns .trade-upload-row{grid-column:3;grid-row:2;width:112px;min-width:0;align-self:end;justify-self:end;transform:translateY(20px);align-content:center;border-bottom:0;padding-bottom:0}
.trade-amount-row{display:flex;align-items:center;gap:28px;min-height:38px;white-space:nowrap}
.trade-amount-row>div,.trade-amount-row>label{display:flex;align-items:center;gap:7px}
.trade-amount-row input{width:96px;height:34px}
.trade-amount-row b{display:inline-flex;align-items:center;min-width:92px;height:34px;padding:0 10px;border:1px solid #cbd5e1;background:#f1f5f9;color:#475569;box-sizing:border-box}
.trade-internal-row{display:flex;align-items:flex-start;gap:10px}
.trade-internal-row>span{padding-top:9px;white-space:nowrap}
.trade-internal-row textarea{flex:1;min-height:42px;max-height:78px;resize:vertical}
.trade-upload-row{display:flex;align-items:center;gap:10px;min-height:38px;border-bottom:1px solid #dbe3ef;padding-bottom:9px;color:#475569;font-size:13px}
.trade-upload-row .upload-button{display:inline-flex;align-items:center;height:36px;padding:0 18px;background:#2563eb;color:#fff;cursor:pointer}
#trade-image-list{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b}
.trade-upload-row.trade-repair-upload{display:grid;grid-template-columns:96px minmax(0,1fr);grid-template-rows:30px 30px 16px;align-items:stretch;gap:4px 10px;min-height:84px;padding-bottom:0}
.trade-upload-row.trade-repair-upload>.upload-button{grid-column:1;width:96px;height:30px;min-width:0;box-sizing:border-box;justify-content:center;padding:0 6px;margin:0}
.trade-upload-row.trade-repair-upload>label.upload-button{grid-row:1}
.trade-upload-row.trade-repair-upload>.phone-upload-button{grid-row:2}
.trade-upload-row.trade-repair-upload>span{grid-column:1;grid-row:3;align-self:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px}
.trade-upload-row.trade-repair-upload>#trade-image-list{grid-column:2;grid-row:1/4;display:flex;align-items:flex-start;gap:6px;min-width:0;min-height:80px;padding:4px;box-sizing:border-box;border:1px solid #c5cdd8;background:#fff;overflow:auto;white-space:normal}
.trade-upload-row.trade-repair-upload>#trade-image-list figure{position:relative;flex:0 0 70px;width:70px;height:70px;margin:0;border:1px solid #c5cdd8;background:#fff;overflow:hidden}
.trade-upload-row.trade-repair-upload>#trade-image-list img{width:100%;height:100%;object-fit:cover}
.trade-upload-row.trade-repair-upload>#trade-image-list button{position:absolute;top:1px;right:1px;width:18px;min-width:18px;height:18px;padding:0;border:1px solid #fca5a5;background:#fff;color:#dc2626;line-height:16px}
.mobile-upload-overlay{position:fixed;inset:0;z-index:10050;background:rgba(15,23,42,.42);display:grid;place-items:center;padding:20px}
.mobile-upload-card{width:min(420px,calc(100vw - 32px));background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-shadow:0 18px 45px rgba(15,23,42,.2);overflow:hidden}
.mobile-upload-card .section-title{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #e2e8f0}
.mobile-upload-card .section-title button{min-width:32px;padding:5px;background:#fff;color:#334155}
.mobile-upload-content{padding:20px;text-align:center}.mobile-upload-content img{display:block;width:230px;height:230px;margin:0 auto 12px}
.mobile-upload-content b{display:block;font-size:17px}.mobile-upload-content p{margin:8px 0;color:#64748b;line-height:1.6}
.mobile-upload-content small{display:block;margin-top:12px;color:#94a3b8;word-break:break-all}.mobile-upload-status{margin-top:12px;padding:9px;background:#eff6ff;color:#1d4ed8;border-radius:4px}
.phone-upload-button{margin-left:8px;background:#fff!important;color:#2563eb!important;border:1px solid #2563eb!important}
.trade-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}
.trade-print-options,.trade-footer-actions{display:flex;align-items:center;gap:10px}
.trade-footer-actions button{min-width:88px;height:38px}
.trade-status-field{display:none!important}

/* 进货、销售明细按业务字段分配列宽：名称、规格和备注优先占用空间。 */
.trade-master-field{display:flex!important;align-items:center;gap:8px}
.trade-master-field>span:first-child{flex:0 0 auto}
.trade-master-field .trade-name-prefix{font-weight:600;color:#334155}
.trade-master-field .trade-nickname-prefix{font-weight:600;color:#334155;white-space:nowrap}
.trade-master-field #quote-customer-nickname{width:118px!important;min-width:118px!important;flex:0 0 118px!important}
.trade-master-field input[name="customer_name_snapshot"]{width:150px!important;min-width:150px!important;flex:0 0 150px!important}
.trade-order-heading select{height:34px;min-width:140px;border:1px solid #b9c7da;background:#fff;padding:0 28px 0 9px;color:#172033}
.trade-order-form .form-grid .trade-full-remark{grid-column:1/-1!important;display:flex;align-items:flex-start}
.trade-order-form .trade-full-remark textarea{min-height:36px!important;height:36px!important;resize:vertical}
.trade-order-form input[readonly]{background:#f1f5f9!important;color:#64748b!important;border-color:#cbd5e1!important;cursor:not-allowed}
.trade-order-form .purchase-header-grid{grid-template-columns:310px 350px 370px minmax(0,1fr);width:100%;min-width:0;box-sizing:border-box;gap:6px 10px;padding:8px 10px}
.trade-order-form .purchase-header-supplier{grid-column:auto}
.trade-order-form .purchase-header-date input{width:222px!important;min-width:222px!important;font-variant-numeric:tabular-nums}
.trade-order-form .purchase-header-supplier{gap:6px}
.trade-order-form .purchase-header-supplier button{flex:0 0 auto;white-space:nowrap}
.trade-order-form .purchase-header-supplier input[name="customer_name_snapshot"]{width:112px!important;min-width:112px!important}
.trade-order-form .purchase-header-phone input{width:100%;min-width:0}
.trade-order-form .purchase-header-supplier input[readonly],.trade-order-form .purchase-header-phone input[readonly]{background:#e9eef5!important;color:#26364d!important;font-size:15px;font-weight:700}
.trade-order-form .purchase-header-grid label>span{display:flex;align-items:center;justify-content:center;height:34px;margin:0}
.trade-order-form .purchase-header-date>span,.trade-order-form .purchase-header-grid .trade-full-remark>span{flex:0 0 70px}
.trade-order-form .purchase-header-grid .trade-full-remark{display:grid!important;grid-template-columns:70px minmax(0,1fr);align-items:center!important;gap:8px;width:100%;min-width:0;box-sizing:border-box}
.trade-order-form .purchase-header-grid .trade-full-remark>span{width:70px;justify-content:center}
.trade-order-form .purchase-header-grid .trade-full-remark textarea{grid-column:2;width:100%!important;min-width:0!important;max-width:100%!important;margin:0;box-sizing:border-box;resize:none!important;overflow:hidden!important}
.trade-order-form:has(.purchase-header-grid){padding-top:12px;padding-bottom:10px}
.trade-order-form:has(.purchase-header-grid) .trade-order-heading{padding:7px 12px;margin-bottom:7px}
.trade-order-form:has(.purchase-header-grid) .purchase-header-grid input,.trade-order-form:has(.purchase-header-grid) .purchase-header-grid button{height:34px;padding-top:4px;padding-bottom:4px}
.trade-order-form:has(.purchase-header-grid) .order-items{margin-top:8px}
.trade-order-form:has(.purchase-header-grid) .order-items>.toolbar{padding:6px 10px}
.trade-order-form:has(.purchase-header-grid) .order-items th{height:34px}
.trade-order-form:has(.purchase-header-grid) .order-items td{padding:3px}
.purchase-quick-search{display:flex;align-items:center;gap:8px;margin-left:auto}
.purchase-quick-search input{width:300px;height:36px;background:#fff!important;border:1px solid #94a3b8!important;box-shadow:inset 0 0 0 1px #e2e8f0}
.purchase-quick-search button{height:36px}
.table-layout-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.resizable-data-table{table-layout:fixed!important;width:var(--saved-table-width,100%)!important;min-width:0!important}
.resizable-data-table th{position:relative;overflow:visible!important}
.column-resize-handle{position:absolute;z-index:3;top:0;right:-4px;width:8px;height:100%;cursor:col-resize;user-select:none}
.column-resize-handle::after{content:"";position:absolute;top:20%;bottom:20%;left:3px;border-left:1px solid transparent}
.resizable-data-table th:hover .column-resize-handle::after,.resizable-data-table.is-resizing .column-resize-handle::after{border-color:#2563eb}
body.column-resizing{cursor:col-resize!important;user-select:none!important}
.repair-list-page .trade-list-table th,.repair-list-page .trade-list-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.repair-list-text{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.repair-communication-cell{text-align:center}
.repair-communication{height:24px;min-width:0;padding:1px 6px;border:0;background:transparent;color:#dc2626;font-weight:700;cursor:pointer}
.repair-communication:hover{text-decoration:underline;background:#fee2e2}
.repair-communication-dialog{padding:8px 4px}.repair-communication-dialog textarea{display:block;width:100%;min-height:120px;resize:vertical;padding:10px;border:1px solid #94a3b8;background:#fff;font:inherit;line-height:1.5}.repair-communication-dialog .actions{margin-top:12px}
.repair-quick-order-meta{display:grid;grid-template-columns:1.2fr 1fr 1.25fr;gap:8px;margin-bottom:10px}.repair-quick-order-meta span{min-width:0;padding:7px 9px;border:1px solid #cbd5e1;background:#f8fafc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.repair-quick-order-meta b{margin-right:7px;color:#64748b;font-weight:500}
.repair-money-paid{color:#dc2626}.repair-money-outstanding{color:#f59e0b}.repair-money-profit{color:#16a34a}
.repair-progress{font-weight:600;cursor:pointer}.repair-progress.active{color:#2563eb}.repair-progress.completed{color:#16a34a}.repair-progress.failed{color:#dc2626}.repair-progress.abandoned{color:#6b7280}
.repair-progress-modal{width:680px!important;height:610px!important;max-height:82vh!important}.repair-progress-quick{height:100%;display:grid;grid-template-rows:auto minmax(220px,1fr) auto auto;padding:0}.repair-progress-toolbar{display:flex;gap:22px;padding:8px 14px;border-bottom:1px solid #cbd5e1}.repair-progress-toolbar button{min-width:48px;padding:2px 4px;border:0;background:transparent;color:#111}.repair-progress-toolbar i{display:block;font-size:24px;line-height:25px;color:#16a34a;font-style:normal}.repair-progress-toolbar button:nth-child(3) i{color:#dc2626}.repair-progress-toolbar button:nth-child(4) i{color:#2563eb}.repair-progress-table{align-content:start;overflow:auto;border-bottom:1px solid #cbd5e1}.repair-progress-head,.repair-progress-option{display:grid;grid-template-columns:155px 1fr 70px;min-height:30px;border-bottom:1px solid #d7dde6}.repair-progress-head{background:#f3f4f6;font-weight:700}.repair-progress-head span,.repair-progress-option>span{display:flex;align-items:center;padding:4px 8px;border-right:1px solid #d7dde6}.repair-progress-option{position:relative;cursor:pointer}.repair-progress-option>input{position:absolute;left:7px;top:9px}.repair-progress-option>span:first-of-type{padding-left:30px;font-weight:700}.repair-progress-option>span:last-child{justify-content:center;border-right:0}.repair-progress-option.selected{background:#a9d8f5}.repair-progress-details{display:grid;gap:12px;padding:14px 18px;background:#f8fafc}.repair-progress-details>label{display:flex;align-items:center;gap:10px}.repair-progress-details input[type="datetime-local"]{width:185px}.repair-progress-details fieldset{display:flex;align-items:center;gap:14px;margin:0;padding:0;border:0}.repair-progress-details legend{float:left;margin-right:10px}.repair-progress-details fieldset label{display:flex;align-items:center;gap:4px;white-space:nowrap}.repair-progress-foot{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;background:#f8fafc}.repair-progress-foot p{margin:0;color:#475569}.repair-progress-foot button{min-width:76px}
.repair-progress-details #repair-quick-pickup-status{width:120px}.repair-quick-pickup-mail{display:flex;align-items:center;gap:12px}.repair-quick-pickup-mail label{display:flex;align-items:center;gap:6px}.repair-quick-pickup-mail input{width:150px}.repair-quick-pickup-mail.hidden{display:none}
.repair-progress-option>input{width:14px!important;height:14px!important;margin:0!important}

.repair-cancel-layer{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;background:rgba(30,41,59,.48);border-radius:inherit}
.repair-cancel-dialog{width:440px;max-width:calc(100% - 40px);background:#fff;border:1px solid #cbd5e1;border-radius:7px;box-shadow:0 16px 42px rgba(15,23,42,.28);overflow:hidden}
.repair-cancel-dialog header,.repair-cancel-dialog footer{display:flex;align-items:center;padding:12px 16px;border-bottom:1px solid #d7dee9}
.repair-cancel-dialog header button{margin-left:auto;border:0;background:transparent;font-size:20px;padding:0 4px}
.repair-cancel-dialog footer{justify-content:flex-end;gap:8px;border-top:1px solid #d7dee9;border-bottom:0}
.repair-cancel-content{padding:18px 20px}
.repair-cancel-content p{margin:0 0 10px}
.repair-cancel-content label{display:grid;grid-template-columns:82px 1fr;align-items:start;gap:8px}
.repair-cancel-content textarea{width:100%;resize:vertical;min-height:90px}
.repair-cancel-reason{width:560px}
.sheet-actions.cancelled-repair-actions{justify-content:flex-end}
.repair-list-page .recycle-status-icon.cancelled{width:20px;height:20px;background:#f59e0b;color:#fff;border-radius:2px;font-family:"Segoe UI Symbol","Microsoft YaHei",sans-serif;font-size:18px;font-weight:700;line-height:20px}
.repair-list-page .trade-list-toolbar{gap:4px;flex-wrap:wrap;overflow:visible}
.repair-list-page .trade-list-toolbar>input{width:240px;flex:0 1 240px}
.repair-list-page .trade-list-toolbar>button{height:32px;padding:0 8px;font-size:15px;font-weight:400;line-height:21px;letter-spacing:.5px}
.trade-list-page:has(#order-template) .trade-list-toolbar{gap:4px;flex-wrap:wrap;overflow:visible}
.trade-list-page:has(#order-template) .trade-list-toolbar>button{height:32px;padding:0 8px;font-size:15px;font-weight:400;line-height:21px;letter-spacing:.5px}
.repair-list-page #order-export{margin-right:5px}
.required-mark{margin-right:3px;color:#ef4444;font-style:normal;font-weight:700}
.trade-order-form .purchase-header-supplier .trade-supplier-required{flex:0 0 auto;margin:0 -3px 0 0}
.trade-order-form .purchase-header-supplier .trade-contact-prefix{display:inline-flex;align-items:center;height:34px;white-space:nowrap}
.trade-order-form .purchase-header-supplier .trade-supplier-contact{width:104px!important;min-width:104px!important;max-width:104px!important}
.repair-list-progress-filter{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.repair-list-remark{cursor:pointer}.repair-list-remark:hover{color:#2563eb;text-decoration:underline}
.repair-finance-hidden [data-repair-sensitive]{display:none!important}
.mall-admin{height:100%;display:flex;flex-direction:column;gap:12px}.mall-admin>.table-wrap{flex:1}.mall-product-form{min-width:880px}.mall-variant-section{margin-top:14px;border:1px solid #dbe3ef;padding:12px}.mall-variant-row{display:grid;grid-template-columns:1fr 110px 140px 2fr 110px 70px;gap:8px;margin-top:8px}.mall-variant-row>*{min-width:0}.coupon-admin{min-width:850px}.coupon-admin tr.selected td{background:#dbeafe}.coupon-redeem-row{display:flex;justify-content:space-between;align-items:center;padding:12px;border-bottom:1px solid #e2e8f0}.coupon-redeem-row span{display:flex;flex-direction:column;gap:4px}.coupon-redeem-row small{color:#64748b}
.mall-editor-modal{width:min(1180px,96vw)!important;height:92vh}.mall-editor-modal #modal-body{overflow:auto}.mall-product-editor{padding:0 4px 70px}.mall-product-editor>section{margin-bottom:14px;padding:16px;border:1px solid #dbe3ef;border-radius:8px;background:#fff}.mall-product-editor h3{margin:0 0 15px;color:#172033}.subtitle-field{grid-template-columns:120px 1fr 48px!important}.subtitle-field input[type=color]{width:48px;padding:3px}.media-input,.inline-fields{display:flex;gap:8px}.media-input input,.inline-fields input,.inline-fields select{flex:1;min-width:0}.mall-media-list{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:8px}.mall-media-list span{position:relative;width:82px;height:82px;border:1px solid #dbe3ef;border-radius:6px;overflow:hidden}.mall-media-list img{width:100%;height:100%;object-fit:cover}.mall-media-list button{position:absolute;right:2px;top:2px;width:24px;height:24px;padding:0;border-radius:50%;background:#ef4444;color:#fff}.mall-variant-head,.mall-variant-row.advanced{display:grid;grid-template-columns:1.1fr 90px 70px 95px 95px 2fr 44px;gap:8px;align-items:center}.mall-variant-head{padding:8px;color:#64748b;background:#f4f7fb}.mall-variant-row.advanced>div{display:grid;grid-template-columns:110px 1fr;gap:6px}.switch-line{display:flex!important;grid-template-columns:none!important;align-items:center;gap:8px}.switch-line input{width:auto}.rich-toolbar{display:flex;align-items:center;gap:6px;padding:8px;border:1px solid #cbd5e1;border-bottom:0;background:#f8fafc}.rich-toolbar button,.rich-toolbar select{height:34px}.rich-toolbar input[type=color]{width:38px;height:34px;padding:2px}.rich-editor{min-height:260px;padding:14px;border:1px solid #cbd5e1;overflow:auto;outline:none}.rich-editor img,.rich-editor video{max-width:100%}.sticky-actions{position:sticky;bottom:-1px;z-index:5;padding:12px;background:rgba(255,255,255,.96);border-top:1px solid #dbe3ef}.mall-phone-preview{width:375px;max-height:70vh;overflow:auto;margin:auto;background:#f8fafc;padding:12px}.mall-phone-preview>img{width:100%;aspect-ratio:1;object-fit:cover}.mall-phone-preview h2{margin:12px 0 4px}.mall-phone-preview article{margin-top:16px}.mall-phone-preview article img,.mall-phone-preview article video{max-width:100%}
.primary-upload{display:inline-flex;align-items:center;justify-content:center;background:#2563eb!important;color:#fff!important;border:1px solid #2563eb!important;border-radius:4px;padding:0 16px;height:36px;white-space:nowrap;cursor:pointer}.mall-carousel-upload{display:flex;align-items:flex-start;gap:12px;min-height:82px}.mall-carousel-upload>.primary-upload{flex:0 0 auto}.mall-carousel-upload .mall-media-list{margin:0}.mall-spec-groups{display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.mall-spec-group{border:1px solid #dbe3ef;background:#f8fafc}.mall-spec-title{display:flex;align-items:center;gap:18px;padding:10px;background:#eef2f7}.mall-spec-title label{display:flex;align-items:center;gap:7px}.mall-spec-title input[type=text],.mall-spec-title input:not([type]){width:150px}.mall-spec-title input[type=checkbox]{width:auto}.mall-spec-title .danger{margin-left:auto}.mall-spec-values{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px}.mall-spec-values>span{display:flex;align-items:center;gap:4px;padding:4px;border:1px solid #cbd5e1;background:#fff;border-radius:4px}.mall-spec-values img{width:32px;height:32px;object-fit:cover}.mall-spec-values input{width:140px;border:0!important}.mall-spec-values span button{width:24px;padding:0;border:0;color:#64748b}.mall-spec-values span label{display:grid;place-items:center;width:30px;height:30px;background:#eaf1ff;color:#2563eb;cursor:pointer}.mall-variant-table-wrap{margin-top:14px;overflow:auto}.mall-variant-table{min-width:1040px}.mall-variant-table th{background:#eef2f7}.mall-variant-table td:first-child{display:flex;align-items:center;gap:8px;min-width:150px}.mall-variant-table td:first-child img{width:36px;height:36px;object-fit:cover;border-radius:4px}.mall-variant-table input,.mall-variant-table select{width:100%;min-width:80px}.rich-toolbar{flex-wrap:nowrap;overflow-x:auto;white-space:nowrap}.rich-toolbar>*{flex:0 0 auto}.rich-toolbar .primary-upload{height:34px}.rich-editor{min-height:310px;background:#fff}
.rich-toolbar{gap:1px;padding:4px;background:linear-gradient(#fff,#f1f3f6)}.rich-toolbar button,.rich-toolbar select,.rich-media-button{display:inline-flex;align-items:center;justify-content:center;height:30px;min-width:30px;padding:0 7px;border:1px solid transparent;border-radius:2px;background:transparent;color:#26364d;cursor:pointer}.rich-toolbar button:hover,.rich-toolbar button.active,.rich-media-button:hover{border-color:#94bdf7;background:#dbeafe}.rich-toolbar>i{width:1px;height:22px;margin:0 4px;background:#d5dbe5}.rich-toolbar input[type=color]{width:28px;height:28px;padding:2px;border:0;background:transparent}.rich-toolbar select{min-width:66px;border-color:#cbd5e1;background:#fff}.rich-media-button.video{color:#2563eb}.rich-editor[data-source=true]{font-family:Consolas,monospace;white-space:pre-wrap;color:#334155;background:#f8fafc}
.mall-editor-modal{width:min(1500px,97vw)!important;height:94vh}.mall-product-editor{background:#f5f6f8;padding:14px 14px 82px}.mall-product-editor>section{padding:0 0 22px;border-radius:0;margin-bottom:18px}.mall-product-editor>section>h3{height:56px;display:flex;align-items:center;margin:0 0 20px!important;padding:0 20px;border-bottom:1px solid #e1e6ee;background:#fafbfc;font-size:15px;font-weight:500}.mall-product-editor>section>.form-grid{padding:0 28px;gap:16px 34px}.mall-product-editor .form-grid>label{grid-template-columns:150px minmax(0,1fr)}.mall-product-editor .form-grid>label.span2{grid-template-columns:150px minmax(0,1fr)}.mall-product-editor .form-grid>label>span{text-align:right}.mall-category-content{padding:0 28px}.mall-category-content>label{display:grid;grid-template-columns:150px minmax(300px,880px);align-items:center;gap:8px}.mall-category-content>label>span{text-align:right}.mall-category-content>label>span::after{content:'：'}.mall-product-editor>section:nth-last-of-type(5),.mall-product-editor>section:nth-last-of-type(4),.mall-product-editor>section:nth-last-of-type(3),.mall-product-editor>section:nth-last-of-type(2),.mall-product-editor>section:nth-last-of-type(1){padding-left:28px;padding-right:28px}.mall-product-editor>section:nth-last-of-type(5)>h3,.mall-product-editor>section:nth-last-of-type(4)>h3,.mall-product-editor>section:nth-last-of-type(3)>h3,.mall-product-editor>section:nth-last-of-type(2)>h3,.mall-product-editor>section:nth-last-of-type(1)>h3{margin-left:-28px!important;margin-right:-28px!important}.mall-product-editor .rich-toolbar,.mall-product-editor .rich-editor{max-width:980px}.mall-product-editor .sticky-actions{position:fixed;left:0;right:0;bottom:0;margin:0;padding:12px 28px;background:#fff;box-shadow:0 -2px 10px #1e293b12}.mall-product-editor .sticky-actions .primary{min-width:78px}.mall-product-editor .sticky-actions button{min-width:78px}
.mall-product-editor .sticky-actions{position:sticky;left:auto;right:auto;bottom:-1px;margin:0 -14px}
.trade-item-table{width:100%;min-width:1120px;table-layout:fixed!important}
.trade-item-table th,.trade-item-table td{overflow:hidden}
.trade-item-table td input{width:100%;height:32px;box-sizing:border-box;border:1px solid #cbd5e1!important;background:#fff!important;padding:5px 7px!important;color:#172033}
.purchase-item-table th,.purchase-item-table td,.purchase-item-table td input,.purchase-item-table td button{font-size:12px!important}
.purchase-item-table td input[type="number"]{padding-left:5px!important;padding-right:3px!important}
.trade-item-table td input[readonly]{background:#f8fafc!important}
.trade-order-form .trade-item-table th{height:28px;padding:2px 8px;font-size:12px;line-height:18px}
.trade-order-form .trade-item-table td{height:28px;padding:4px 8px;font-size:13px;line-height:20px}.trade-order-form .trade-item-table td:has(>input){padding:0}
.trade-order-form .trade-item-table td input{display:block;width:100%;height:100%;min-height:28px;border:0!important;border-radius:0!important;background:transparent!important;padding:4px 8px!important;font-size:13px!important;line-height:20px!important;box-shadow:none!important}
.trade-order-form .trade-item-table td input[readonly]{background:transparent!important}
:root:not([data-input-modality="pointer"]) .trade-order-form .trade-item-table td input:focus{border:0!important;background:transparent!important;outline:0;box-shadow:none!important}
#modal-body form table tbody tr{height:28px!important}
#modal-body form table tbody td{height:28px!important;padding:0!important}
#modal-body form table td:has(>input:not([type="hidden"])),#modal-body form table td:has(>select),#modal-body form table td:has(>textarea){height:28px!important;padding:0!important}
#modal-body form table td>input:not([type="hidden"]),#modal-body form table td>select,#modal-body form table td>textarea{display:block;width:100%!important;height:28px!important;min-height:28px!important;box-sizing:border-box;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:4px 8px!important;font-size:13px!important;line-height:20px!important;outline:0!important}
#modal-body form table tbody td>output{display:block;height:28px!important;line-height:28px!important;padding:0 8px!important;box-sizing:border-box}
.trade-line-total,.purchase-subtotal{display:flex;align-items:center;justify-content:center;height:32px;white-space:nowrap}
.purchase-item-table th:nth-child(1){width:72px}.purchase-item-table th:nth-child(2){width:120px}.purchase-item-table th:nth-child(3){width:120px}.purchase-item-table th:nth-child(4){width:105px}.purchase-item-table th:nth-child(5){width:65px}.purchase-item-table th:nth-child(6){width:48px}.purchase-item-table th:nth-child(7){width:56px}.purchase-item-table th:nth-child(8){width:72px}.purchase-item-table th:nth-child(9){width:80px}.purchase-item-table th:nth-child(10){width:150px}.purchase-item-table th:nth-child(12){width:60px}
.trade-order-form .sale-header-grid{grid-template-columns:258px max-content 270px minmax(0,1fr);justify-content:start;width:100%;min-width:0;box-sizing:border-box;gap:8px 16px}
.trade-order-form .quote-header-grid{grid-template-columns:252px max-content 270px minmax(0,1fr)}
.trade-order-form .sale-header-grid .sale-header-customer{min-width:0;overflow:visible}
.trade-order-form .sale-header-grid .sale-header-phone{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:8px;min-width:0}
.trade-order-form .sale-header-grid .sale-header-phone input{width:100%!important;min-width:0!important}
.trade-order-form .sale-header-grid:not(.quote-header-grid) .sale-header-date input{width:180px!important;min-width:180px!important;font-variant-numeric:tabular-nums}
.trade-order-form .sale-header-grid:not(.quote-header-grid) .trade-nickname-prefix+input,
.trade-order-form .sale-header-grid:not(.quote-header-grid) .sale-header-customer input[name="customer_name_snapshot"]{width:150px!important;min-width:150px!important;max-width:150px!important;flex:0 0 150px!important}
.trade-order-form .trade-customer-value{font-size:15px!important;font-weight:700!important;color:#334155!important}
.trade-bottom-columns .trade-discount input,.trade-bottom-columns .trade-paid input{font-size:15px!important;font-weight:700!important;color:#172033!important}
.trade-bottom-columns .quote-cost-total input{font-size:15px!important;font-weight:700!important;color:#172033!important}
.quote-cost-reason-modal{align-items:center;justify-content:center}.quote-cost-reason-modal .modal-card{width:460px;max-width:calc(100vw - 40px);height:auto;max-height:calc(100vh - 40px)}.quote-cost-reason-form{display:grid;gap:16px}.quote-cost-reason-form label{display:grid;gap:8px}.quote-cost-reason-form textarea{width:100%;min-height:100px;box-sizing:border-box;resize:vertical}.quote-cost-reason-form .actions{justify-content:flex-end}
.trade-bottom-columns .sale-bottom-delivery{display:flex!important;align-items:center;gap:6px;margin:0}
.trade-bottom-columns .sale-bottom-delivery>span{height:auto!important;white-space:nowrap}
.trade-bottom-columns .sale-bottom-delivery select{width:96px!important;min-width:96px!important}
.trade-bottom-columns .trade-amount-row .sale-bottom-mail{grid-column:2;grid-row:2/5;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(2,34px);align-content:start;gap:6px;width:390px;min-width:390px;margin:0;padding:0}
.trade-bottom-columns .trade-amount-row .sale-bottom-mail.hidden{display:none}
.trade-bottom-columns .trade-amount-row .sale-bottom-mail label{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:6px;min-width:0}
.trade-bottom-columns .trade-amount-row .sale-bottom-mail label>span{height:auto}
.trade-bottom-columns .trade-amount-row .sale-bottom-mail input{width:100%;min-width:0;height:34px}
.trade-order-form .quote-header-grid .sale-header-date input{width:180px!important;min-width:180px!important;font-variant-numeric:tabular-nums}
.trade-image-dialog-trigger{width:112px;height:36px;align-self:end}
.trade-image-dialog{position:absolute;z-index:35;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(30,41,59,.48);border-radius:inherit}
.trade-image-dialog.hidden{display:none!important}
.trade-image-dialog-card{display:grid;grid-template-rows:48px 54px minmax(220px,1fr) 48px;width:min(760px,calc(100% - 64px));height:min(520px,calc(100% - 64px));overflow:hidden;border:1px solid #cbd5e1;border-radius:7px;background:#fff;box-shadow:0 18px 46px rgba(15,23,42,.3)}
.trade-image-dialog-card header,.trade-image-dialog-card footer{display:flex;align-items:center;padding:0 16px;border-bottom:1px solid #dbe3ef}
.trade-image-dialog-card header button{margin-left:auto;border:0;background:transparent;font-size:22px}
.trade-image-dialog-card footer{justify-content:space-between;border-top:1px solid #dbe3ef;border-bottom:0;color:#64748b}
.trade-image-dialog-tools{display:flex;align-items:center;gap:10px;padding:8px 16px;border-bottom:1px solid #dbe3ef}
.trade-image-dialog-tools .upload-button{display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 18px;background:#2563eb;color:#fff;cursor:pointer}
.trade-image-dialog-list{min-height:0;overflow:auto;padding:16px}
.trade-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:14px}
.trade-image-grid figure{position:relative;display:grid;grid-template-rows:104px 24px;margin:0;min-width:0;border:1px solid #cbd5e1;background:#fff}
.trade-image-grid figure>img,.trade-image-grid figure>div{width:100%;height:104px;object-fit:cover;display:grid;place-items:center;background:#f1f5f9;color:#94a3b8}
.trade-image-grid figure>span{overflow:hidden;padding:3px 6px;white-space:nowrap;text-overflow:ellipsis}
.trade-image-grid figure>button{position:absolute;top:3px;right:3px;width:22px;min-width:22px;height:22px;padding:0;border:1px solid #fecaca;background:#fff;color:#dc2626}
.trade-order-form .sale-header-grid label{flex-wrap:nowrap}
.trade-order-modal{color:#111827;font-size:12px;line-height:1.5}
.trade-order-modal .modal-head,.trade-order-form .order-items>.toolbar b{font-size:14px}
.trade-order-form .form-grid label>span,.trade-order-form .form-grid .trade-master-field>span{font-size:12px;font-weight:400;line-height:18px}
.trade-order-form .form-grid input,.trade-order-form .form-grid select,.trade-order-form .form-grid textarea,.trade-order-form .form-grid button{font-size:12px;line-height:18px}
.trade-order-form .sale-header-grid label>span,.trade-order-form .sale-header-grid .trade-master-field>span{display:flex;align-items:center;justify-content:center;height:34px;margin:0;white-space:nowrap;font-size:12px;line-height:18px}
.trade-order-form .sale-header-customer button{flex:0 0 84px;height:36px;white-space:nowrap;padding:0 12px}
.trade-order-form .quote-header-grid #trade-customer-nickname,
.trade-order-form .quote-header-grid .sale-header-customer input[name="customer_name_snapshot"]{width:126px!important;min-width:126px!important;max-width:126px!important;flex:0 0 126px!important;height:30px!important;min-height:30px!important;padding:4px 7px!important;box-sizing:border-box;font-size:13px!important;font-weight:700!important}
.trade-order-form .quote-header-grid .sale-header-customer button{height:30px!important;min-height:30px!important;font-size:13px!important;line-height:18px!important}
.trade-order-form .quote-header-grid .sale-header-phone input{width:130px!important;min-width:130px!important;max-width:130px!important;height:30px!important;min-height:30px!important;padding:4px 7px!important;box-sizing:border-box;font-size:13px!important;font-weight:700!important}
.trade-order-form .sale-header-grid .trade-full-remark{grid-column:1/-1!important;width:100%;min-width:0;box-sizing:border-box}
.trade-order-form .sale-header-grid .trade-full-remark textarea{flex:1 1 auto;width:auto!important;min-width:0!important;max-width:none!important;box-sizing:border-box;resize:none!important;overflow:hidden!important}
.trade-order-form .quote-header-grid .trade-full-remark textarea{height:30px!important;min-height:30px!important;max-height:30px!important}
.trade-order-form .sale-mail-fields{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(260px,420px));align-items:center;gap:10px;padding-left:240px}
.trade-order-form .sale-mail-fields.hidden{display:none}
.trade-order-form .sale-mail-fields label{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:6px}
.trade-order-form .sale-mail-fields label>span{height:34px}
.trade-order-form .sale-mail-fields input{height:34px}
.quote-template-picker table{font-size:14px;line-height:20px}
.quote-template-picker th,.quote-template-picker td{height:30px;padding:4px 10px!important;font-size:14px;line-height:20px;vertical-align:middle}
.sale-item-table th:nth-child(1){width:82px}.sale-item-table th:nth-child(2){width:15%}.sale-item-table th:nth-child(3){width:17%}.sale-item-table th:nth-child(4){width:54px}.sale-item-table th:nth-child(5){width:72px}.sale-item-table th:nth-child(6){width:62px}.sale-item-table th:nth-child(7){width:88px}.sale-item-table th:nth-child(8){width:88px}.sale-item-table th:nth-child(9){width:110px}.sale-item-table th:nth-child(10){width:15%}.sale-item-table th:nth-child(11){width:64px}
.category-product-picker{width:100%;height:34px;text-align:left;background:#fff;border:1px solid #b9c7da;color:#172033;padding:0 10px}

@media(max-width:900px){.trade-order-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.trade-list-toolbar input{width:100%;max-width:none}}
@media print{body *{visibility:hidden}.trade-list-table,.trade-list-table *{visibility:visible}.trade-list-table{position:absolute;inset:0;border:0}.trade-list-table tr:not(.print-selected){display:none}.trade-list-table thead tr{display:table-row!important}}

/* 首页统一经营工作台。 */
.dashboard-workbench{display:grid;grid-template-rows:auto auto minmax(210px,auto);gap:10px;min-height:0}
.dashboard-metrics{display:flex;align-items:center;flex-wrap:wrap;gap:24px}.dashboard-metrics{margin-top:18px;padding:14px 18px;border-top:1px solid #d7e0ec;background:#f8fafc}
.dashboard-metric-item{display:flex;flex:0 0 auto;align-items:center;gap:7px;min-height:42px;color:#172033;font-size:17px;font-weight:400;line-height:24px;white-space:nowrap}.dashboard-metric-item>button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:34px;padding:0 9px;border:1px solid #cbd5e1;border-radius:4px;background:#eef2f7;color:#2563eb;font-size:19px;font-weight:800;text-decoration:none}.dashboard-metric-item>button.is-zero{color:#94a3b8}.dashboard-metric-item>button:hover{border-color:#60a5fa;background:#e2e8f0}
.dashboard-metric-modal{width:min(1180px,92vw)!important;height:min(680px,82vh)!important}.dashboard-metric-modal #modal-body{height:calc(100% - 52px);overflow:hidden}.dashboard-metric-detail{display:grid;grid-template-rows:minmax(0,1fr) 52px;height:100%;padding:14px}.dashboard-metric-detail>.table-wrap{min-height:0;height:100%}.dashboard-metric-detail th,.dashboard-metric-detail td{height:30px;padding:4px 8px}.dashboard-metric-detail .empty{padding:30px}.dashboard-metric-detail footer{display:flex;align-items:center;justify-content:space-between;color:#64748b}.dashboard-metric-detail footer button{min-width:76px}
.dashboard-command{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:7px;border:1px solid #cbd5e1;background:#fff}.dashboard-command>button{flex:0 0 auto;min-width:0;height:36px;padding:8px 16px;font-size:14px;font-weight:400;line-height:18px;white-space:nowrap}.dashboard-search{display:grid;flex:0 0 500px;grid-template-columns:minmax(266px,1fr) 55px 82px;gap:8px}.dashboard-search-field{position:relative;min-width:0;height:36px}.dashboard-search-field input{width:100%;height:36px;padding:8px 106px 8px 10px;font-size:14px;font-weight:400}.dashboard-search-field select{position:absolute;top:1px;right:1px;width:96px;height:34px;padding:7px 8px;border-width:0 0 0 1px;border-radius:0;background-color:#fff;font-size:14px;font-weight:400;appearance:none;-webkit-appearance:none;-moz-appearance:none;cursor:pointer}.dashboard-search button{height:36px;padding:8px 12px;font-size:14px;font-weight:400;line-height:18px;white-space:nowrap}
.dashboard-results{min-height:210px;border:0;background:transparent}.dashboard-results>header{display:flex;align-items:center;gap:14px;height:40px;padding:0 12px;border:0;background:transparent}.dashboard-results>header b{font-size:15px}.dashboard-results>header span{color:#64748b}
#dashboard-global-result{display:grid;gap:14px;padding:12px}.dashboard-result-empty{place-items:center;min-height:145px;color:#7c8da5;font-size:15px;font-weight:600}
.dashboard-customer-matches>div{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px}.dashboard-customer-matches button{display:grid;grid-template-columns:1fr auto;gap:3px 10px;padding:10px 12px;text-align:left;background:#f8fbff}.dashboard-customer-matches button b{font-size:14px}.dashboard-customer-matches button span{grid-column:1;color:#64748b}.dashboard-customer-matches button em{grid-column:2;grid-row:1/3;align-self:center;color:#2563eb;font-style:normal}
.dashboard-result-section h3,.dashboard-customer-matches h3,.dashboard-customer-overview h3{margin:0 0 7px;font-size:14px}.dashboard-result-section th,.dashboard-result-section td,.dashboard-customer-overview th,.dashboard-customer-overview td{height:28px;padding:4px 8px;line-height:20px}
.dashboard-result-section .table-wrap{border:0}
.dashboard-exact-result{align-content:start;background:#f5f7fb}.dashboard-exact-result .dashboard-result-section .table-wrap{height:auto;min-height:0;max-height:calc(100vh - 350px);overflow:auto;background:#f5f7fb}.dashboard-exact-result .dashboard-result-section table{background:#fff}.dashboard-exact-result .dashboard-result-section td.empty{height:28px;padding:4px 8px;background:#fff}
.dashboard-customer-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:14px;width:100%;min-width:0}.dashboard-customer-overview>header,.dashboard-customer-overview>.dashboard-user-assets{grid-column:1/-1}.dashboard-customer-overview>header{display:flex;align-items:center;justify-content:space-between;min-height:64px;padding:12px 16px;border:1px solid #bfdbfe;background:linear-gradient(90deg,#eff6ff,#f8fbff)}.dashboard-customer-overview>header div{display:grid;gap:5px;min-width:0}.dashboard-customer-overview>header b{font-size:18px;color:#172033}.dashboard-customer-overview>header span{overflow:hidden;color:#475569;white-space:nowrap;text-overflow:ellipsis}.dashboard-user-assets{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px}.dashboard-user-assets span{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:10px 14px;border:1px solid #dbe3ef;background:#fff}.dashboard-user-assets b{font-size:18px;color:#2563eb}.dashboard-customer-overview>section{min-width:0;padding:12px;border:1px solid #dbe3ef;background:#f8fafc}.dashboard-customer-overview>section h3{padding-left:8px;border-left:3px solid #2563eb;color:#334155}.dashboard-customer-overview>section .table-wrap{min-height:0;max-height:300px;border-color:#dbe3ef}.dashboard-customer-overview>section table{font-size:12px}.dashboard-customer-overview>section .empty{height:62px;padding:18px 8px;background:#fff}.dashboard-customer-overview>section:first-of-type table{min-width:600px}.dashboard-customer-overview>section:nth-of-type(2) table,.dashboard-customer-overview>section:nth-of-type(3) table{min-width:430px}
@media(max-width:1500px){.dashboard-customer-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-customer-overview>section:first-of-type{grid-column:1/-1}}
@media(max-width:1300px){.dashboard-search{flex-basis:500px}}
.trade-order-modal .trade-order-form{font-size:14px;line-height:20px}.trade-order-modal .trade-order-form input,.trade-order-modal .trade-order-form select{min-width:0;box-sizing:border-box}.sale-order-modal .trade-list-table th,.sale-order-modal .trade-list-table td{font-size:14px;line-height:20px;padding:4px 8px}
.unified-inventory-page .inventory-main{flex:1;min-width:0}.unified-inventory-page .inventory-layout{display:flex}.unified-inventory-page .inventory-category{width:190px;flex:0 0 190px}
@media(max-width:900px){.dashboard-customer-overview{grid-template-columns:1fr}.dashboard-customer-overview>section:first-of-type{grid-column:auto}.dashboard-user-assets{grid-template-columns:repeat(2,1fr)}}

/* 用户全览采用纵向通栏列表；卡券详情从上方余量入口按需查看。 */
.dashboard-customer-overview{grid-template-columns:minmax(0,1fr)}
.dashboard-customer-overview>section,.dashboard-customer-overview>section:first-of-type{grid-column:1/-1;width:100%}
.dashboard-customer-overview>section:nth-of-type(2) table{min-width:600px}
.dashboard-customer-overview>section:first-of-type table{min-width:1700px}
.dashboard-customer-overview>section:nth-of-type(2) table{min-width:1350px}
.dashboard-user-assets button{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:10px 14px;border:1px solid #dbe3ef;border-radius:0;background:#fff;color:inherit;text-align:left}
.dashboard-user-assets button:hover{border-color:#60a5fa;background:#eff6ff}
.dashboard-user-assets button b{font-size:18px;color:#2563eb}
.dashboard-user-assets{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:24px;overflow-x:auto;padding-bottom:2px}
.dashboard-user-assets span,.dashboard-user-assets button{flex:0 0 auto;min-width:118px;width:max-content;max-width:100%;gap:18px;white-space:nowrap}
.dashboard-user-assets b.is-zero{color:#94a3b8}
.dashboard-customer-overview>header{align-items:center;gap:18px;min-height:66px;padding:14px 18px;box-sizing:border-box}.dashboard-customer-overview>header .dashboard-customer-profile{display:block;flex:1 1 auto;min-width:0;overflow-x:auto}.dashboard-customer-profile-fields{display:grid!important;width:100%;grid-template-columns:repeat(6,max-content) max-content minmax(240px,1fr);align-items:center;gap:24px}.dashboard-customer-overview>header .dashboard-customer-profile-fields>label{display:inline-flex;align-items:center;gap:7px;overflow:visible;color:#334155;font-size:14px;font-weight:400;line-height:20px;white-space:nowrap}.dashboard-customer-overview>header .dashboard-customer-profile-fields output{display:inline-flex;align-items:center;min-width:118px;height:34px;padding:6px 9px;border:1px solid #cbd5e1;border-radius:3px;background:#eef2f7;color:#172033;font-size:14px;font-weight:700;line-height:20px}.dashboard-customer-overview>header .dashboard-profile-address output{width:max-content;min-width:180px;max-width:none;overflow:visible;text-overflow:clip}.dashboard-customer-overview>header .dashboard-profile-remark{display:grid;grid-template-columns:max-content minmax(240px,1fr);min-width:0}.dashboard-customer-overview>header .dashboard-profile-remark output{width:100%;min-width:240px;overflow:hidden;text-overflow:ellipsis}.customer-sensitive-value{min-height:26px;padding:2px 8px;border:1px solid #cbd5e1;background:#fff;color:#475569}.customer-sensitive-value:hover{border-color:#60a5fa;background:#eff6ff}.dashboard-customer-profile-actions{display:flex!important;flex:0 0 auto;align-items:center;gap:8px}.customer-detail-summary dl{grid-template-columns:88px minmax(0,1fr) 88px minmax(0,1fr)}.customer-detail-summary .customer-detail-remark{white-space:pre-wrap}.customer-sensitive-value.revealed{color:#dc2626}
.dashboard-user-assets>span,.dashboard-user-assets>button,.dashboard-user-assets .dashboard-order-summary-item{min-width:0;min-height:42px;padding:4px 0;border:0;background:transparent;gap:7px}
.dashboard-user-assets>button:hover{border:0;background:transparent}
.dashboard-user-assets>span>b,.dashboard-user-assets>button>b,.dashboard-user-assets .dashboard-order-summary-item button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:34px;padding:0 9px;border:1px solid #dbe3ef;border-radius:4px;background:#fff;font-size:18px;font-weight:700}
.dashboard-user-assets>span>b,.dashboard-user-assets>button>b,.dashboard-user-assets .dashboard-order-summary-item button{border-color:#cbd5e1;background:#eef2f7;color:#2563eb}
.dashboard-user-assets .dashboard-asset-summary-item button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:34px;padding:0 9px;border:1px solid #cbd5e1;border-radius:4px;background:#eef2f7;color:#2563eb;font-size:18px;font-weight:700}
.dashboard-coupon-detail .table-wrap{max-height:420px}
.dashboard-coupon-detail footer{display:flex;align-items:center;justify-content:space-between;margin-top:12px;color:#64748b}
.dashboard-coupon-modal{width:min(760px,calc(100vw - 48px))}

/* 统一查询订单表与维修订单主列表采用相同的字号、单元格间距和行高。 */
.dashboard-customer-overview>section table{font-size:14px;line-height:21px}
.dashboard-customer-overview>section th,.dashboard-customer-overview>section td{height:auto;padding:11px 9px;line-height:21px;vertical-align:middle}

/* 用户全览中各业务独立通栏；表格随记录增高，最多显示 15 行。 */
.dashboard-customer-overview{min-height:0;align-content:start}.dashboard-customer-overview>.dashboard-business-section{padding:0;border:0;background:transparent}.dashboard-business-section h3{display:flex;align-items:center;gap:8px;margin:0 0 6px;padding:0 0 0 8px}.dashboard-business-section h3 span{color:#64748b;font-size:12px;font-weight:400}.dashboard-business-section .table-wrap{height:auto;min-height:128px;max-height:704px;overflow:auto;background:#fff}.dashboard-business-section table{width:100%;min-width:max-content!important}.dashboard-business-section th,.dashboard-business-section td{white-space:nowrap}.dashboard-business-section .empty{height:44px!important;padding:11px 9px!important}
.dashboard-user-assets .dashboard-order-summary-item{display:flex;align-items:center;white-space:nowrap}.dashboard-user-assets .dashboard-order-summary-item button{min-height:0;color:#2563eb;font-size:18px;font-weight:700;text-decoration:none}.dashboard-user-assets .dashboard-order-summary-item button:hover{border-color:#60a5fa;background:#e2e8f0}.dashboard-user-assets .dashboard-order-summary-item button.is-zero{color:#94a3b8}.dashboard-user-assets .dashboard-asset-summary-item{display:flex;align-items:center;white-space:nowrap}.dashboard-user-assets .dashboard-asset-summary-item button{min-height:0;color:#2563eb;text-decoration:none}.dashboard-user-assets .dashboard-asset-summary-item button:hover{border-color:#60a5fa;background:#e2e8f0}.dashboard-user-assets .dashboard-asset-summary-item button.is-zero{color:#94a3b8}.dashboard-order-detail-modal{width:min(1680px,96vw)!important;height:min(820px,86vh)!important}.dashboard-order-detail-modal #modal-body{height:calc(100% - 52px);overflow:hidden}.dashboard-order-detail{display:grid;grid-template-rows:minmax(0,1fr) 48px;height:100%;padding:12px}.dashboard-order-detail>.dashboard-business-section{min-height:0}.dashboard-order-detail .table-wrap{min-height:0;max-height:none;height:100%}.dashboard-order-detail th,.dashboard-order-detail td{height:30px;padding:4px 8px!important;font-size:14px;line-height:20px!important;vertical-align:middle}.dashboard-order-detail footer{display:flex;align-items:center;justify-content:space-between;color:#64748b}.dashboard-order-detail footer button{min-width:76px}
.dashboard-account-modal{width:min(1120px,92vw)!important;height:min(680px,82vh)!important}.dashboard-account-modal #modal-body{height:calc(100% - 52px);overflow:hidden}.dashboard-account-detail{display:grid;grid-template-rows:minmax(0,1fr) 48px;height:100%;padding:12px}.dashboard-account-detail .table-wrap{min-height:0;height:100%;overflow:auto}.dashboard-account-detail th,.dashboard-account-detail td{height:30px;padding:4px 8px!important;font-size:14px;line-height:20px!important;vertical-align:middle}.dashboard-account-detail td.positive{color:#16a34a}.dashboard-account-detail td.negative{color:#dc2626}.dashboard-account-detail footer{display:flex;align-items:center;justify-content:space-between;color:#64748b}.dashboard-account-detail footer button{min-width:76px}
.dashboard-customer-overview>header .dashboard-member-level.is-highlight{color:#2563eb;font-weight:800}

/* 回收单头部单行铺满，所有字段标签与备注上下居中。 */
.trade-order-form .recycle-header-grid{grid-template-columns:minmax(245px,1.1fr) minmax(440px,2fr) minmax(260px,1.15fr) minmax(190px,.8fr)!important;width:100%;column-gap:10px}
.trade-order-form .recycle-header-grid>label,.trade-order-form .recycle-header-grid>.trade-master-field{min-width:0;display:flex;align-items:center}
.trade-order-form .recycle-header-grid label>span,.trade-order-form .recycle-header-grid .trade-master-field>span{display:flex;align-items:center;height:34px;margin:0;white-space:nowrap;line-height:18px}
.trade-order-form .recycle-header-grid .trade-name-prefix{white-space:nowrap}
.trade-order-form .recycle-header-grid .trade-full-remark{grid-column:1/-1!important;align-items:center!important;width:100%}
.trade-order-form .recycle-header-grid .trade-full-remark>span{flex:0 0 auto;margin-right:8px}
.trade-order-form .recycle-header-grid .trade-full-remark textarea{flex:1 1 auto;width:auto;min-width:0}
/* 四类通用订单底部与维修单一致：沟通单行，双上传入口垂直居中，预览铺满余宽。 */
.trade-order-modal .trade-bottom-columns{grid-template-columns:630px max-content minmax(0,1fr);grid-template-rows:30px 132px;gap:6px;width:100%;min-width:0;min-height:162px;align-items:start;box-sizing:border-box}
.trade-order-modal .trade-bottom-columns .trade-amount-row{grid-column:1;grid-row:1/3}
.trade-order-modal .trade-bottom-columns .trade-internal-row{display:contents}
.trade-order-modal .trade-bottom-columns .trade-internal-row>span{grid-column:2;grid-row:1;align-self:center;justify-self:end;padding:0;white-space:nowrap}
.trade-order-modal .trade-bottom-columns .trade-internal-row textarea{grid-column:3;grid-row:1;justify-self:stretch;width:100%;min-width:0;max-width:100%;height:30px;min-height:30px;max-height:30px;margin:0;padding:4px 8px;box-sizing:border-box;resize:none}
.trade-order-modal .trade-bottom-columns .trade-upload-row.trade-inline-images{grid-column:2/4;grid-row:2;display:grid;grid-template-columns:80px minmax(0,1fr);grid-template-rows:1fr 1fr;width:100%;max-width:100%;height:124px;min-width:0;min-height:124px;margin:4px 0 0;padding:0;border:0;box-sizing:border-box;transform:none;align-self:start;justify-self:stretch;gap:6px 8px;overflow:hidden}
.trade-inline-image-tools{display:grid;grid-template-rows:1fr 1fr;align-self:stretch;height:124px;min-height:124px;gap:6px;transform:none!important}
.trade-inline-image-tools .repair-image-tool{display:flex;width:80px;height:36px;min-width:80px;box-sizing:border-box;align-items:center;justify-content:center;gap:5px;margin:0;padding:4px 8px;background:#2563eb;color:#fff;border-color:#2563eb;cursor:pointer}
.trade-inline-image-tools .repair-image-tool.local{grid-row:1;align-self:end;justify-self:center}
.trade-inline-image-tools .repair-image-tool.phone{grid-row:2;align-self:start;justify-self:center}
.trade-inline-image-tools .repair-image-tool svg{display:none}
.trade-inline-image-tools .repair-image-tool small{font-size:13px;color:inherit;white-space:nowrap}
.trade-inline-image-list{display:grid;grid-auto-flow:column;grid-auto-columns:72px;justify-content:start;gap:6px;min-width:0;height:124px;min-height:124px;padding:4px;box-sizing:border-box;border:1px solid #b9c7da;background:#fff;overflow-x:auto;overflow-y:hidden}
.trade-inline-image-list figure{position:relative;width:68px;height:112px;margin:0;border:2px solid transparent;background:#fff;overflow:hidden}
.trade-inline-image-list figure.selected{border-color:#2563eb;box-shadow:0 0 0 1px #2563eb}
.trade-inline-image-list figure>img,.trade-inline-image-list figure>div{display:grid;place-items:center;width:100%;height:100%;object-fit:contain;background:#f1f5f9;color:#94a3b8}
.trade-inline-image-list figure>span{display:none}
.trade-inline-image-list figure>button{position:absolute;top:2px;right:2px;width:20px;min-width:20px;height:20px;padding:0;border:1px solid #ef4444;border-radius:50%;background:#ef4444;color:#fff;line-height:18px}

/* 维修进度窗口：完成时间显示到秒，取机状态保持单行紧凑排列。 */
.repair-progress-details input[type="datetime-local"]{width:220px}
.repair-progress-details fieldset{display:flex;align-items:center;flex-wrap:nowrap;gap:10px}
.repair-progress-details fieldset legend{float:none;flex:0 0 64px;margin:0;white-space:nowrap}
.repair-progress-details #repair-quick-pickup-status{width:104px;min-width:104px}
.repair-progress-details fieldset.hidden{display:none}.repair-progress-details fieldset{position:relative;display:grid;grid-template-columns:270px 200px;grid-template-rows:38px 42px 28px;min-height:142px;align-content:start;gap:8px 14px}.repair-progress-details .repair-quick-pickup-time{display:grid;grid-template-columns:70px 190px;align-items:center}.repair-progress-details .repair-quick-pickup-time input{width:190px}.repair-progress-details .repair-quick-pickup-time.hidden{display:none}.repair-progress-details .repair-quick-pickup-select{display:grid;grid-template-columns:70px 116px;align-items:center}.repair-progress-details .repair-quick-pickup-select select{width:116px}.repair-progress-details .repair-quick-pickup-mail{grid-column:1/-1;display:flex;min-height:38px}.repair-progress-details .repair-quick-pickup-mail input{width:128px}.repair-progress-details .repair-quick-pickup-mail.hidden,.repair-progress-details .repair-quick-pickup-custom.hidden{visibility:hidden;pointer-events:none}.repair-progress-details .repair-quick-pickup-custom{grid-column:1/-1;grid-row:2;display:flex;min-height:38px}.repair-progress-toolbar button:disabled{opacity:.38;cursor:not-allowed}

/* 库存统一入口与整备单。 */
.unified-inventory-switch{display:inline-flex;align-items:center;gap:0;margin-right:4px;border:1px solid #9fb1c8;border-radius:3px;overflow:hidden;background:#fff}
.unified-inventory-switch button{height:36px;margin:0;padding:0 16px;border:0;border-right:1px solid #c7d2e1;border-radius:0;background:#fff;color:#334155;font-weight:400}
.unified-inventory-switch button:last-child{border-right:0}.unified-inventory-switch button.active{background:#2563eb;color:#fff}
.compact-action{height:26px!important;min-height:26px!important;padding:2px 8px!important;white-space:nowrap}
.refurbishment-form{min-width:760px}.refurbishment-device{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid #cbd5e1;background:#f8fafc}
.refurbishment-form .table-wrap{min-height:170px;max-height:260px}.refurbishment-form table select{width:100%;min-width:280px}.refurbishment-form table input{width:90px}
/* 订单列表与维修单统一紧凑排版：仅调整文字与间距，不改变结构。 */
.trade-list-table,.order-items,.trade-order-form,.trade-order-form table,.trade-order-form input,.trade-order-form select,.trade-order-form textarea { font-size: 13px; line-height: 20px; }
.trade-list-table th,.trade-list-table td,.trade-order-form table th,.trade-order-form table td { padding: 4px 8px; line-height: 20px; }
.modal-card .form,.modal-card .form table,.modal-card .form input,.modal-card .form select,.modal-card .form textarea { font-size: 13px; line-height: 20px; }
.modal-card .form table th,.modal-card .form table td { padding: 4px 8px; line-height: 20px; }
.inventory-detail tbody tr.selected,.inventory-batches tbody tr.selected { font-weight: 400 !important; }
.inventory-page tbody tr.selected { font-weight: 400 !important; }
.inventory-page tbody tr.selected td { font-weight: 400 !important; }
.inventory-page .inventory-detail tbody td,
.inventory-page .inventory-detail tbody td * { font-weight: 400 !important; }
.inventory-detail tr[data-order] td:nth-child(2), .inventory-detail tr[data-order] td:first-child { color:#2563eb; cursor:pointer; }
.inventory-detail tbody tr td:first-child,.inventory-batches tbody tr td:first-child { color: #2563eb; cursor: pointer; }

/* 新建业务单据统一采用维修单的三区域排版基线；仅调整布局和控件外观。 */
.trade-order-modal.business-sheet-modal{height:min(720px,calc(100dvh - 40px))!important;min-height:min(720px,calc(100dvh - 40px))!important;max-height:calc(100dvh - 40px)!important}
.trade-order-modal.business-sheet-modal #modal-body{overflow:hidden}
.trade-order-modal.business-sheet-modal #order-form{height:100%;min-height:0;padding:8px 12px!important;gap:6px!important;overflow:hidden;font-size:13px;line-height:20px}
.trade-order-modal.business-sheet-modal #order-form>.trade-order-heading{display:flex;height:30px;min-height:30px;margin:0 0 3px!important;padding:0!important;align-items:center;font-size:13px;line-height:20px}
.quote-order-modal #order-form>.trade-order-heading{padding-right:14px!important}
.trade-order-modal.business-sheet-modal #order-form>.form-grid{min-height:83px;margin:0;padding:6px 8px!important;align-content:start;row-gap:9px!important;column-gap:16px!important;font-size:13px;line-height:20px}
.trade-order-modal.business-sheet-modal #order-form>.form-grid label>span,
.trade-order-modal.business-sheet-modal #order-form>.form-grid .trade-master-field>span{height:20px!important;margin:0!important;font-size:13px!important;font-weight:400!important;line-height:20px!important}
.trade-order-modal.business-sheet-modal #order-form>.form-grid input:not([type="hidden"]),
.trade-order-modal.business-sheet-modal #order-form>.form-grid select,
.trade-order-modal.business-sheet-modal #order-form>.form-grid textarea{height:30px!important;min-height:30px!important;max-height:30px!important;padding:4px 7px!important;box-sizing:border-box;font-size:13px!important;line-height:20px!important}
.trade-order-modal.business-sheet-modal #order-form>.form-grid button{width:max-content!important;min-width:0!important;height:30px!important;min-height:30px!important;padding:4px 10px!important;box-sizing:border-box;font-size:13px!important;line-height:20px!important;white-space:nowrap}
.trade-order-modal.business-sheet-modal #order-form>.form-grid :is(.sale-header-date,.purchase-header-date,.recycle-header-date)>input[type="text"]{width:179px!important;min-width:179px!important;max-width:179px!important}
.trade-order-modal.business-sheet-modal #order-form>.form-grid :is(#trade-customer-nickname,.trade-nickname-prefix+input){width:126px!important;min-width:126px!important;max-width:126px!important;flex:0 0 126px!important;font-weight:700!important}
.trade-order-modal.business-sheet-modal #order-form>.form-grid input[name="customer_name_snapshot"],
.trade-order-modal.business-sheet-modal #order-form>.purchase-header-supplier input[name="customer_name_snapshot"]{width:138px!important;min-width:138px!important;max-width:138px!important;flex:0 0 138px!important;font-weight:700!important}
.trade-order-modal.business-sheet-modal #order-form>.form-grid :is(.sale-header-phone,.purchase-header-phone,.recycle-header-phone) input{width:130px!important;min-width:130px!important;max-width:130px!important;font-weight:700!important}
.trade-order-modal.business-sheet-modal #order-form>.form-grid .purchase-header-phone input{width:145px!important;min-width:145px!important;max-width:145px!important}
.trade-order-modal.business-sheet-modal #order-form>.purchase-header-grid{grid-template-columns:max-content max-content max-content minmax(0,1fr)!important;justify-content:start}
.trade-order-modal.business-sheet-modal #order-form>.form-grid .trade-full-remark textarea{width:100%!important;min-width:0!important;max-width:100%!important;font-weight:400!important;resize:none!important;overflow:hidden!important}
.trade-order-modal.business-sheet-modal #order-form>.order-items{flex:1 1 auto;min-height:0!important;margin:3px 0 0!important;overflow:hidden;font-size:13px;line-height:20px}
.trade-order-modal.business-sheet-modal #order-form>.order-items>.toolbar{display:flex;flex:0 0 39px;height:39px;margin:0!important;padding:0 8px 4px!important;align-items:center;gap:8px;font-size:13px;line-height:20px}
.trade-order-modal.business-sheet-modal #order-form>.order-items>.toolbar button{height:30px;min-height:30px;padding:4px 10px;font-size:13px;line-height:20px}
.trade-order-modal.business-sheet-modal #order-form>.order-items th{height:29px!important;padding:4px 6px!important;font-size:13px!important;font-weight:600!important;line-height:20px!important}
.trade-order-modal.business-sheet-modal #order-form>.order-items td{height:28px!important;padding:0!important;font-size:13px!important;font-weight:400!important;line-height:20px!important}
.trade-order-modal.business-sheet-modal #order-form>.trade-sheet-bottom{flex:0 0 auto;margin:0!important;padding:0!important;gap:6px!important;font-size:13px;line-height:20px}
.trade-order-modal.business-sheet-modal #order-form>.trade-sheet-bottom .trade-footer{min-height:39px;margin:0!important;padding:6px 0 0!important}
.trade-order-modal.business-sheet-modal #order-form>.trade-sheet-bottom :is(input,select,textarea,button){font-size:13px;line-height:20px}
.purchase-order-modal #order-form>.purchase-header-grid .trade-full-remark>span{display:flex;align-items:center;justify-content:flex-end;width:70px;text-align:right}
.purchase-order-modal #order-form>.purchase-header-grid .trade-full-remark>span::after{content:'：'}
.purchase-order-modal #order-form>.purchase-header-grid .purchase-header-date{display:grid!important;grid-template-columns:70px 222px;align-items:center!important;column-gap:8px!important}
.purchase-order-modal #order-form>.purchase-header-grid .purchase-header-date>span{width:70px;justify-content:flex-end;text-align:right}
.purchase-order-modal #order-form>.purchase-header-grid .purchase-header-supplier input[name="customer_name_snapshot"]{width:216px!important;min-width:216px!important;max-width:216px!important;flex:0 0 216px!important}
.purchase-order-modal #order-form>.order-items .purchase-item-table th:not(:nth-child(9)),.purchase-order-modal #order-form>.order-items .purchase-item-table td:not(:nth-child(9)){text-align:center!important}
.purchase-order-modal #order-form>.order-items .purchase-item-table td:not(:nth-child(9)) :is(input,output){text-align:center!important}
.purchase-order-modal #order-form>.order-items .purchase-item-table .purchase-subtotal{font-weight:400!important}
.purchase-order-modal #order-form>.order-items .purchase-item-table td:nth-child(9) input{text-align:left!important}
.purchase-order-modal #order-form>.order-items .purchase-item-table :is(th,td):nth-child(1){width:90px}
.purchase-order-modal #order-form>.order-items .purchase-item-table :is(th,td):nth-child(2){width:190px}
.purchase-order-modal #order-form>.order-items .purchase-item-table :is(th,td):nth-child(3){width:190px}
.purchase-order-modal #order-form>.order-items .purchase-item-table :is(th,td):nth-child(4){width:52px}
.purchase-order-modal #order-form>.order-items .purchase-item-table :is(th,td):nth-child(5){width:72px}
.purchase-order-modal #order-form>.order-items .purchase-item-table :is(th,td):nth-child(6){width:82px}
.purchase-order-modal #order-form>.order-items .purchase-item-table :is(th,td):nth-child(7){width:88px}
.purchase-order-modal #order-form>.order-items .purchase-item-table :is(th,td):nth-child(8){width:170px}
.purchase-order-modal #order-form>.order-items .purchase-item-table :is(th,td):nth-child(9){width:220px}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-internal-row>span{align-self:center}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-internal-row>span::after{content:none}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-internal-row textarea{align-self:start}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-upload-row.trade-inline-images{height:124px;min-height:124px;overflow:visible}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-inline-image-tools{transform:translateX(-17px)!important}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-inline-image-tools .repair-image-tool{display:flex!important;width:80px;min-width:80px;height:36px;padding:4px 8px;align-items:center!important;justify-content:center!important;border-radius:4px;transform:none!important}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-inline-image-tools .repair-image-tool small{display:flex;align-items:center;justify-content:center;width:100%;height:100%;line-height:20px;text-align:center}
#modal .trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .trade-item-table.purchase-item-table tbody tr{height:36px!important;background:transparent!important}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .trade-item-table.purchase-item-table tbody tr>td,.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .trade-item-table.purchase-item-table tbody tr:not(.selected):hover>td{height:36px!important;background:#fff!important;color:#172033!important;font-size:14px!important}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .trade-item-table.purchase-item-table tbody tr.selected>td{background:#f8f9fa!important}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .trade-item-table.purchase-item-table tbody tr.selected>td:first-child{box-shadow:inset 2px 0 #3b82f6}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .trade-item-table.purchase-item-table tbody tr>td input,.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .trade-item-table.purchase-item-table tbody tr>td .purchase-subtotal{color:#172033!important;font-size:14px!important}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items>.purchase-item-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:auto;overscroll-behavior:contain;scrollbar-gutter:auto}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items>.purchase-item-scroll{scrollbar-width:thin;scrollbar-color:#aab8ca transparent}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items>.purchase-item-scroll::-webkit-scrollbar{width:8px;height:8px}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items>.purchase-item-scroll::-webkit-scrollbar-track{background:transparent}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items>.purchase-item-scroll::-webkit-scrollbar-thumb{border-radius:8px;background:#aab8ca}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items>.purchase-item-scroll::-webkit-scrollbar-thumb:hover{background:#8697ac}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .purchase-item-table{height:auto!important}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .purchase-item-table thead th{position:sticky;top:0;z-index:1;height:34px!important;padding:5px 6px!important;font-size:14px!important;line-height:22px!important;background:#edf2f8}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .purchase-item-table tbody td> :not(input[type="hidden"]){height:32px!important;min-height:32px!important;max-height:32px!important;line-height:32px!important}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .purchase-item-table tbody td>input:not([type="hidden"]){line-height:22px!important;padding-top:5px!important;padding-bottom:5px!important}
#modal .trade-order-modal #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table thead th{height:34px!important;padding:5px 6px!important;font-size:14px!important;line-height:22px!important;background:#edf2f8}
#modal .trade-order-modal #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table tbody tr{height:36px!important}
#modal .trade-order-modal #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table tbody tr>td{height:36px!important;color:#172033!important;font-size:14px!important}
#modal .trade-order-modal:has(.sale-stock-actions) #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table tbody tr>td,
#modal .trade-order-modal:has(.sale-stock-actions) #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table tbody tr:hover>td{background:#fff!important}
#modal .trade-order-modal:has(.sale-stock-actions) #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table tbody tr.selected>td,
#modal .trade-order-modal:has(.sale-stock-actions) #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table tbody tr.selected:hover>td{background:#f8f9fa!important}
#modal .trade-order-modal #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table tbody td> :not(input[type="hidden"]){height:32px!important;min-height:32px!important;max-height:32px!important;font-size:14px!important}
#modal .trade-order-modal #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table tbody td>input:not([type="hidden"]){line-height:22px!important;padding-top:5px!important;padding-bottom:5px!important}
#modal .trade-order-modal #order-form.trade-order-form>.order-items .trade-item-table.sale-item-table tbody tr>td input[readonly]{color:#172033!important;-webkit-text-fill-color:#172033;opacity:1}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form .trade-footer-actions{margin-left:auto}
.trade-order-modal.purchase-order-modal #order-form.trade-order-form>.order-items .trade-item-table.purchase-item-table tbody tr>td input[readonly]{-webkit-text-fill-color:#172033;opacity:1}
.purchase-order-modal #order-form>.order-items .purchase-item-table tbody tr{cursor:default}
.purchase-order-modal #order-form>.order-items .purchase-item-table td>input[readonly]{pointer-events:none;user-select:none;cursor:default!important}
.purchase-order-modal #order-form>.order-items .purchase-item-table td>input:not([readonly]):not([type="hidden"]){cursor:text!important;caret-color:#1d4ed8}
:root:not([data-input-modality="pointer"]) .purchase-order-modal #order-form>.order-items .purchase-item-table td:has(>input:not([readonly]):not([type="hidden"])):focus-within{box-shadow:inset 0 0 0 2px #2563eb}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-inline-image-list{width:calc(100% + 17px);margin-left:-17px}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-inline-image-list{height:124px;min-height:124px}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-inline-image-list figure{width:68px;height:112px}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-inline-image-list figure>button{display:none;align-items:center;justify-content:center;line-height:1;text-align:center}
.trade-order-modal #order-form>.trade-sheet-bottom .trade-inline-image-list figure.selected>button{display:flex}
.trade-order-form[data-read-only="true"] .trade-inline-image-tools{visibility:hidden!important;pointer-events:none}
.inventory-no-cost th:nth-child(6),.inventory-no-cost td:nth-child(6){display:none!important}
.inventory-no-cost :is(th,td){overflow:hidden;text-overflow:ellipsis}
