:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #1d252d;
  --muted: #667085;
  --line: #d8dee4;
  --accent: #0f766e;
  --accent-2: #345995;
  --warn: #b45309;
  --good: #15803d;
  --shadow: 0 12px 32px rgba(26, 32, 44, 0.08);
}

/* 教程库 */
.tutorial-table th:nth-child(1) { width: 22%; }
.tutorial-table th:nth-child(2) { width: 52%; }
.tutorial-table th:nth-child(3) { width: 110px; }
.tutorial-table th:nth-child(4) { width: 150px; }
.tutorial-url { color: #1677ff; word-break: break-all; }
.tutorial-qr { display: block; width: 72px; height: 72px; padding: 4px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.tutorial-row-actions { display: flex; gap: 8px; }
.tutorial-editor { min-width: min(620px, 80vw); }
.tutorial-qr-preview { min-height: 190px; margin-top: 18px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; }
.tutorial-qr-preview img { width: 150px; height: 150px; }

/* 出租创建页：同一订单的商品 SN 每行最多两台 */
.rental-create-page { padding: 0 0 28px; }
.rental-create-breadcrumb { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 0 0 12px; color: var(--ui-text-tertiary, #8f959e); font-size: 13px; }
.rental-create-breadcrumb i { color: var(--ui-border-strong, #d0d4da); font-style: normal; }
.rental-create-breadcrumb > span[aria-current="page"] { color: var(--ui-text, #1f2329); font-weight: 500; }
.rental-create-breadcrumb .rental-breadcrumb-link { min-height: auto; border: 0; border-radius: 4px; background: transparent; padding: 2px 0; color: var(--ui-text-secondary, #646a73); font-size: inherit; font-weight: 400; box-shadow: none; cursor: pointer; }
.rental-create-breadcrumb .rental-breadcrumb-link:hover { border: 0; background: transparent; color: var(--ui-primary, #1677ff); box-shadow: none; transform: none; }
.rental-create-panel { overflow: hidden; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; box-shadow: 0 8px 30px rgba(15, 23, 42, .04); }
.rental-create-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid #edf0f3; }
.rental-create-panel > header h2 { margin: 0; font-size: 18px; font-weight: 600; }
.rental-create-section { padding: 24px 26px; border-bottom: 1px solid #edf0f3; }
.rental-line { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 12px 18px; margin-bottom: 22px; }
.rental-line > span, .rental-two-columns label > span { color: #334155; font-size: 14px; }
.rental-line > span em { color: #ef4444; font-style: normal; }
.rental-line small { grid-column: 2; margin-top: -8px; color: #94a3b8; }
.rental-product-line { align-items: start; }
.rental-sn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rental-sn-card, .rental-add-sn-card { min-height: 190px; border-radius: 16px; }
.rental-sn-card { padding: 14px; border: 1px solid #dfe3e8; background: #fafafa; }
.rental-sn-card-head { display: flex; gap: 10px; }
.rental-sn-card-head select { min-width: 0; flex: 1; height: 42px; }
.rental-sn-remove { width: 38px; border: 0; border-radius: 8px; color: #94a3b8; background: transparent; font-size: 26px; cursor: pointer; }
.rental-sn-remove:hover { color: #ef4444; background: #fee2e2; }
.rental-sn-card-body { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 14px; margin-top: 16px; }
.rental-sn-card-body img, .rental-sn-image-placeholder { width: 92px; height: 92px; object-fit: contain; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
.rental-sn-image-placeholder { display: grid; place-items: center; color: #94a3b8; }
.rental-sn-card-body div:last-child { display: grid; gap: 7px; min-width: 0; }
.rental-sn-card-body strong, .rental-sn-card-body span, .rental-sn-card-body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-sn-card-body span, .rental-sn-card-body small { color: #64748b; }
.rental-add-sn-card { display: grid; place-items: center; align-content: center; gap: 12px; border: 2px dashed #cbd5e1; color: #64748b; background: #fff; cursor: pointer; }
.rental-add-sn-card:hover { border-color: #1677ff; color: #1677ff; background: #f7fbff; }
.rental-add-sn-card b { font-size: 34px; font-weight: 400; }
.rental-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 34px; }
.rental-two-columns label { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 14px; }
.rental-two-columns label.full { grid-column: 1 / -1; }
.rental-two-columns label.required > span::before { content: "* "; color: #ef4444; }
.rental-two-columns input, .rental-two-columns select, .rental-two-columns textarea, .rental-line input { width: 100%; min-width: 0; }
.rental-create-panel input:not([type="hidden"]),
.rental-create-panel select,
.rental-create-panel textarea {
  min-height: var(--ui-control-height, 34px);
  border: 1px solid var(--ui-border-strong, #d0d4da);
  border-radius: 6px;
  background: #fff;
  padding: 6px 10px;
  color: var(--ui-text, #1f2329);
  font: inherit;
  box-shadow: none;
}
.rental-create-panel textarea { min-height: 74px; padding-top: 8px; }
.rental-create-panel .rental-create-range-row { grid-column: 1 / -1; grid-template-columns: 120px minmax(360px, 720px); }
.rental-create-range-control { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rental-create-range-control .rental-range-button { flex: 1; min-width: 0; min-height: var(--ui-control-height, 34px); border-color: var(--ui-border-strong, #d0d4da); border-radius: 6px; padding: 6px 10px; color: var(--ui-text, #1f2329); }
.rental-create-range-control .rental-range-button:hover { border-color: var(--ui-primary, #1677ff); background: #fff; color: var(--ui-text, #1f2329); box-shadow: none; }
.rental-create-range-control small { flex: 0 0 auto; color: var(--ui-text-secondary, #646a73); }
.rental-create-panel input:not([type="hidden"]):focus,
.rental-create-panel select:focus,
.rental-create-panel textarea:focus {
  border-color: var(--ui-primary, #1677ff);
  outline: 2px solid rgba(22, 119, 255, 0.12);
  outline-offset: 0;
  box-shadow: none;
}
.rental-create-panel input:not([type="hidden"])[readonly],
.rental-create-panel input:not([type="hidden"]):disabled,
.rental-create-panel select:disabled,
.rental-create-panel textarea[readonly],
.rental-create-panel textarea:disabled {
  border-color: #dfe3e8;
  background: #f2f3f5;
  color: #8a9099;
  cursor: not-allowed;
  opacity: 1;
  -webkit-text-fill-color: #8a9099;
}
.rental-two-columns textarea { min-height: 76px; resize: vertical; }
.rental-two-columns label small { color: #64748b; white-space: nowrap; }
.rental-total { display: flex; align-items: center; gap: 24px; margin: 22px 0 0 158px; padding: 18px 20px; border-radius: 10px; background: #f6f7f9; }
.rental-total strong { color: #1677ff; font-size: 20px; }
.rental-create-panel > footer { display: flex; justify-content: center; gap: 16px; padding: 24px; }
.rental-create-panel > footer .button, .rental-create-panel > footer .ghost { min-width: 96px; }
.rental-create-panel > .form-feedback { margin: 16px 26px 0; }

/* 出租录入：基础信息与逐 SN 金额明细，不影响只读查看详情。 */
.rental-basic-order > header h2 { font-size: 30px; letter-spacing: .02em; }
.rental-basic-order > header small { display: block; margin-top: 4px; color: #94a3b8; }
.rental-basic-order h3 { margin: 0 0 16px; color: #1f2937; font-size: 16px; font-weight: 600; }
.rental-basic-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; }
.rental-basic-card { display: grid; gap: 14px; }
.rental-basic-card > label { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 34px; }
.rental-basic-card > label > span, .rental-time-field > span { color: #667085; }
.rental-basic-card strong { color: #344054; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-inline-select { justify-self: start; min-width: 180px; border: 1px solid #d9e2f0; border-radius: 7px; background: #fff; color: #1677ff; padding: 6px 10px; text-align: left; cursor: pointer; }
.rental-inline-select:hover { border-color: #1677ff; background: #f5f9ff; }
.rental-time-field { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.rental-date-time-inputs { display: flex; align-items: center; gap: 8px; }
.rental-date-time-inputs input { min-width: 0; }
.rental-date-time-inputs i { color: #98a2b3; font-style: normal; }
.rental-time-field small { display: block; margin-top: 6px; color: #98a2b3; }
.rental-time-field > strong { grid-column: 2; color: #475467; font-weight: 500; }
.rental-items-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rental-items-heading h3 { margin: 0; }
.rental-items-heading .button { min-height: 34px; border-color: #1677ff; background: #1677ff; color: #fff; }
.rental-item-table-wrap { position: relative; overflow: visible; border: 1px solid #e5e9ef; border-radius: 10px; }
.rental-item-table { width: 100%; min-width: 920px; border-collapse: collapse; }
.rental-item-table th { padding: 11px 14px; color: #667085; background: #f7f8fa; font-weight: 500; text-align: left; }
.rental-item-table td { padding: 14px; border-top: 1px solid #edf0f3; color: #475467; vertical-align: middle; }
.rental-item-table td:first-child { min-width: 230px; }
.rental-item-table td small { display: block; margin-top: 5px; color: #98a2b3; }
.rental-item-table input { min-width: 100px; max-width: 180px; }
.rental-line-table { min-width: 1080px; }
.rental-line-table { table-layout: fixed; }
.rental-line-date-col { width: 142px; }
.rental-line-days-col { width: 76px; }
.rental-line-product-col { width: 225px; }
.rental-line-sn-col { width: 260px; }
.rental-line-quantity-col { width: 76px; }
.rental-line-amount-col { width: 148px; }
.rental-line-table th { white-space: nowrap; text-align: center; }
.rental-line-table td { padding: 10px 12px; text-align: center; font-size: 13px; }
.rental-line-table td:first-child { min-width: 0; }
.rental-line-table td:nth-child(4),
.rental-line-table td:nth-child(5) { min-width: 0; }
.rental-range-split-inputs { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 12px; }
.rental-range-part { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 8px; }
.rental-range-part span { color: #667085; white-space: nowrap; }
.rental-range-part input { min-width: 0; width: 100%; }
.rental-line-date-field { display: block; min-width: 0; text-align: left; }
.rental-line-date-field input { width: 100%; min-width: 0; height: 32px; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #344054; font: inherit; font-size: 12px; }
.rental-line-date-field input:hover, .rental-line-date-field input:focus { border-color: #91caff; background: #fff; outline: none; }
.rental-accessory-line-table { min-width: 900px; }
.rental-accessory-line-table th:nth-child(1) { width: 22%; }
.rental-accessory-line-table th:nth-child(2) { width: 25%; }
.rental-accessory-line-table th:nth-child(3) { width: 28%; }
.rental-accessory-line-table th:nth-child(4) { width: 9%; }
.rental-accessory-line-table th:nth-child(5) { width: 16%; }
.rental-accessory-line-table .rental-accessory-manual-input { width: 100%; max-width: none; }
.rental-accessory-line-table .rental-accessory-number-input { width: 86px; min-width: 70px; max-width: 100%; text-align: center; }
.rental-line-datetime,
.rental-line-product,
.rental-line-quantity,
.rental-line-sn-trigger { min-width: 0; height: 34px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #344054; box-shadow: none; }
.rental-line-datetime { width: 136px; padding: 0 3px; font-size: 12px; }
.rental-line-table td > span { padding: 0 4px; color: #98a2b3; }
.rental-line-product { width: 100%; padding: 0 7px; }
.rental-line-quantity { width: 60px; padding: 0 6px; text-align: center; }
.rental-line-quantity-text { display: inline-block; min-width: 44px; text-align: center; color: #475467; }
.rental-line-product-select { display: flex; align-items: center; justify-content: space-between; min-height: 34px; border: 1px solid transparent; border-radius: 6px; padding-left: 7px; color: #344054; }
.rental-line-product-select:hover { border-color: #91caff; background: #fff; }
.rental-line-product-select span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-line-product-select button { width: 30px; height: 32px; flex: 0 0 30px; border: 0; background: transparent; color: #667085; cursor: pointer; font-size: 16px; }
.rental-line-product-select button:hover { color: #1677ff; }
.rental-line-range-field .rental-range-button { min-height: 34px; border-color: transparent; padding: 0 7px; background: transparent; font-size: 12px; font-weight: 600; white-space: nowrap; }
.rental-line-range-field .rental-range-button:hover,
.rental-line-range-field .rental-range-button:focus { border-color: #91caff; background: #fff; outline: none; }
.rental-line-sn-dropdown { position: relative; width: min(100%, 260px); max-width: 260px; margin: 0 auto; text-align: left; }
.rental-line-sn-dropdown[open],
.rental-line-product-dropdown[open] { z-index: 300; }
.rental-line-sn-dropdown[data-disabled] { pointer-events: none; opacity: .56; }
.rental-line-sn-dropdown summary { display: flex; align-items: center; justify-content: space-between; min-height: 36px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 8px; color: #344054; cursor: pointer; list-style: none; background: #fff; }
.rental-line-sn-dropdown summary::-webkit-details-marker { display: none; }
.rental-line-sn-dropdown summary:hover { border-color: #91caff; background: #fff; }
.rental-line-sn-dropdown summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-line-sn-summary { display: block; min-width: 0; }
.rental-line-sn-summary b { overflow: hidden; color: #344054; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.rental-line-sn-summary small { overflow: hidden; color: #98a2b3; font-size: 11px; line-height: 13px; text-overflow: ellipsis; white-space: nowrap; }
.rental-line-sn-dropdown summary i { color: #667085; font-style: normal; }
.rental-line-sn-dropdown-menu { position: absolute; z-index: 320; top: calc(100% + 5px); left: 0; width: min(280px, 40vw); max-height: 250px; overflow-y: auto; border: 1px solid #dfe3e8; border-radius: 8px; background: #fff; box-shadow: 0 12px 26px rgba(15, 23, 42, .16); }
.rental-line-sn-dropdown-option { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 7px; align-items: center; min-height: 36px; padding: 0 10px; color: #344054; cursor: pointer; }
.rental-line-sn-dropdown-option:hover { background: #f5faff; }
.rental-line-sn-dropdown-option input[type="checkbox"] { appearance: auto; box-sizing: border-box; min-width: 14px; max-width: 14px; width: 14px; min-height: 14px; max-height: 14px; height: 14px; padding: 0; margin: 0; border-radius: 2px; box-shadow: none; accent-color: #1677ff; justify-self: start; }
.rental-line-sn-dropdown-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-line-sn-dropdown-option small { color: #98a2b3; }
.rental-line-sn-dropdown-option:has(input:checked) { background: #edf5ff; color: #1677ff; }
.rental-line-sn-dropdown-option:has(input:checked) small { color: #1677ff; }
.rental-line-sn-dropdown-option.unavailable { color: #98a2b3; background: #fafafa; cursor: not-allowed; }
.rental-line-product-dropdown { position: relative; width: min(100%, 250px); margin: 0 auto; text-align: left; }
.rental-line-product-dropdown summary { display: flex; align-items: center; justify-content: space-between; min-height: 36px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 8px; color: #344054; cursor: pointer; list-style: none; background: #fff; }
.rental-line-product-dropdown summary::-webkit-details-marker { display: none; }
.rental-line-product-dropdown summary:hover { border-color: #91caff; background: #fff; }
.rental-line-product-dropdown summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-line-product-summary { display: block; min-width: 0; }
.rental-line-product-summary b { overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.rental-line-product-dropdown summary i { color: #667085; font-style: normal; }
.rental-line-product-dropdown-menu { position: absolute; z-index: 320; top: calc(100% + 5px); left: 0; width: min(300px, 42vw); max-height: 280px; overflow-y: auto; border: 1px solid #dfe3e8; border-radius: 8px; background: #fff; box-shadow: 0 12px 26px rgba(15, 23, 42, .16); }
.rental-line-product-dropdown-menu > input { position: sticky; z-index: 1; top: 0; width: calc(100% - 20px); min-width: 0; height: 34px; margin: 10px; border: 1px solid #dfe3e8; border-radius: 6px; padding: 0 8px; background: #fff; }
.rental-line-product-option { display: block; width: 100%; min-height: 40px; border: 0; background: #fff; color: #344054; cursor: pointer; padding: 0 12px; text-align: left; }
.rental-line-product-option > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-line-product-option:hover,
.rental-line-product-option.active { background: #edf5ff; color: #1677ff; }
.rental-deposit-method { width: 128px !important; }
.rental-amount-adjustment > div { display: grid; grid-template-columns: 76px 70px minmax(160px, 1fr); gap: 8px; align-items: center; }
.rental-amount-adjustment select,
.rental-amount-adjustment input { width: 100%; min-width: 0; }
.rental-amount-adjustment-type { position: relative; z-index: 1; cursor: pointer; }
.rental-amount-adjustment-value { max-width: 70px; }
.rental-line-product-option[hidden],
.rental-line-product-empty[hidden] { display: none; }
.rental-line-product-empty { display: block; padding: 10px 12px; color: #98a2b3; font-size: 13px; }
.rental-order-amount small { margin-left: 10px; color: #98a2b3; font-size: 12px; font-weight: 400; }
.rental-line-sn-trigger { width: 100%; max-width: 280px; padding: 0 7px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.rental-line-datetime:hover,
.rental-line-product:hover,
.rental-line-quantity:hover,
.rental-line-sn-trigger:hover,
.rental-line-datetime:focus,
.rental-line-product:focus,
.rental-line-quantity:focus,
.rental-line-sn-trigger:focus { border-color: #91caff; background: #fff; outline: none; }
.rental-line-sn-trigger:disabled { color: #98a2b3; cursor: not-allowed; }
.rental-line-total-cell { position: relative; text-align: center !important; }
.rental-line-total-cell > strong { display: inline-block; }
.rental-line-remove { position: absolute; top: 50%; right: 12px; margin: 0; transform: translateY(-50%); border: 1px solid #d0d5dd; border-radius: 5px; background: #fff; color: #667085; cursor: pointer; font-size: 12px; line-height: 24px; padding: 0 8px; }
.rental-line-remove:hover { border-color: #ff7875; color: #ff4d4f; }
.rental-line-add-row td { height: 58px; padding: 0; text-align: left; }
.rental-line-add-row button { width: auto; height: 34px; margin-left: 12px; border: 1px solid #91caff; border-radius: 6px; background: #fff; color: #1677ff; cursor: pointer; font-size: 14px; text-align: left; padding: 0 12px; }
.rental-line-add-row button:hover { background: #f5faff; }
.rental-line-add-row.empty td { height: 74px; }
.rental-line-add-row.empty button { color: #1677ff; }
.rental-line-sn-selector { min-width: min(720px, 88vw); }
.rental-line-sn-product { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; color: #667085; }
.rental-line-sn-product strong { color: #1d2939; font-size: 17px; }
.rental-line-sn-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-height: 440px; overflow-y: auto; }
.rental-line-sn-option { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 10px 12px; border: 1px solid #dfe3e8; border-radius: 8px; background: #fff; color: #344054; cursor: pointer; }
.rental-line-sn-option.active { border-color: #1677ff; background: #edf5ff; color: #1677ff; }
.rental-line-sn-option.unavailable { color: #98a2b3; background: #f8fafc; cursor: not-allowed; }
.rental-order-amount { display: flex; justify-content: flex-end; align-items: baseline; gap: 18px; margin-top: 14px; padding: 12px 4px 0; color: #475467; }
.rental-order-amount strong { color: #1677ff; font-size: 22px; }
.rental-other-section { padding-top: 16px; padding-bottom: 16px; }
.rental-other-section summary { color: #667085; cursor: pointer; user-select: none; }
.rental-other-section details[open] summary { margin-bottom: 16px; color: #344054; }
.rental-picker-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.rental-sn-picker-item.active { border-color: #1677ff; background: #f0f7ff; color: #1677ff; }
@media (max-width: 1050px) { .rental-basic-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .rental-basic-card > label, .rental-time-field { grid-template-columns: 1fr; } .rental-time-field > strong { grid-column: 1; } .rental-date-time-inputs { flex-direction: column; align-items: stretch; } .rental-date-time-inputs i { text-align: center; } }

@media (max-width: 1050px) {
  .rental-line { grid-template-columns: 110px minmax(0, 1fr); }
  .rental-two-columns { grid-template-columns: 1fr; }
  .rental-two-columns label.full { grid-column: auto; }
  .rental-total { margin-left: 128px; }
}

@media (max-width: 760px) {
  .rental-sn-grid { grid-template-columns: 1fr; }
  .rental-line, .rental-two-columns label { grid-template-columns: 1fr; }
  .rental-line small { grid-column: 1; }
  .rental-total { margin-left: 0; }
  .rental-create-panel .rental-create-range-row { grid-template-columns: 1fr; }
  .rental-create-range-control { align-items: flex-start; flex-direction: column; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(90deg, #17212b 0 236px, var(--bg) 236px 100%);
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 247, 248, 0.96)),
    #f5f7f8;
}

.login-card {
  width: min(380px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 22px;
}

.login-card p {
  color: var(--muted);
}

.login-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #17212b;
  color: #fff;
  font-weight: 800;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.login-card input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
}

.login-error {
  min-height: 20px;
  color: #b42318;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
}

button:hover {
  border-color: #98a2b3;
}

button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #f1f5f9;
  border-color: var(--line);
}

button:disabled:hover {
  border-color: var(--line);
}

button.is-loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: var(--loading-width, auto);
}

button.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
  opacity: 0.75;
}

.sidebar {
  flex: 0 0 236px;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #17212b;
  color: #f8fafc;
  padding: 20px 16px;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #11a37f;
  font-weight: 800;
}

.brand small {
  display: block;
  color: #b8c0cc;
}

.nav-menu {
  display: grid;
  gap: 14px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 0 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-title::after {
  content: "▾";
  color: #94a3b8;
  font-size: 13px;
}

.nav-group:not(.expanded) .nav-title::after {
  content: "▸";
}

.nav-children {
  display: grid;
  gap: 6px;
}

.nav-group:not(.expanded) .nav-children {
  display: none;
}

.nav-menu a,
.nav-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #dce3ea;
  text-decoration: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-menu .nav-title {
  color: #94a3b8;
}

.nav-menu a.active,
.nav-menu a:hover,
.nav-menu button.active,
.nav-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.app {
  flex: 1 1 auto;
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 16px;
}

.topbar p,
.muted {
  color: var(--muted);
}

.section {
  margin-bottom: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 16px;
  align-items: center;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  justify-self: center;
  width: 128px;
  aspect-ratio: 1;
  padding: 18px;
  border: 1px solid #d8e3e0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 62%, transparent 63%),
    conic-gradient(from 210deg, rgba(15, 118, 110, 0.95), rgba(52, 89, 149, 0.85), rgba(15, 118, 110, 0.18));
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px solid rgba(15, 118, 110, 0.1);
  pointer-events: none;
}

.metric span {
  position: relative;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  position: relative;
  display: block;
  max-width: 100%;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric em {
  position: relative;
  display: block;
  max-width: 100%;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.metric[role="button"] {
  cursor: pointer;
}

.metric[role="button"]:hover {
  border-color: rgba(15, 118, 110, 0.45);
  transform: translateY(-1px);
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.inline-check input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.schedule-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 2px 6px 2px 0;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
}

.schedule-chip.blue {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
}

.schedule-chip.amber {
  border-color: #fde68a;
  background: #fef3c7;
  color: #b45309;
}

.schedule-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.schedule-metric {
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.schedule-metric strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.schedule-metric span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.schedule-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #eef2f6;
}

.schedule-legend i.ship {
  border-color: #8bd8ce;
  background: #0f766e;
}

.schedule-legend i.busy {
  border-color: #f6c66b;
  background: #f59e0b;
}

.schedule-overview {
  margin-bottom: 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.schedule-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.schedule-detail-head {
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 0 16px;
}

.schedule-overview-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.schedule-overview-sidebar {
  min-height: 0;
  padding: 18px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #f8fafc;
}

.schedule-overview-head {
  margin-bottom: 14px;
}

.schedule-overview-head h3,
.schedule-detail-head h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 16px;
}

.schedule-overview-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  margin-top: 4px;
}

.schedule-overview-menu {
  display: grid;
  gap: 12px;
}

.schedule-overview-menu label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-overview-menu label > span {
  text-align: center;
}

.schedule-overview-menu label > span {
  text-align: center;
}

.schedule-detail-actions,
.schedule-view-menu {
  display: flex;
  align-items: center;
}

.schedule-detail-actions {
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.schedule-view-menu {
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.schedule-view-menu select {
  min-width: 112px;
}

.schedule-overview-menu select {
  width: 100%;
  min-height: 36px;
  padding: 5px 30px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
}

.schedule-overview-legend i {
  width: 10px;
  height: 10px;
  margin-left: 6px;
  border-radius: 3px;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.schedule-overview-legend i.full {
  background: #fee2e2;
  border-color: #fca5a5;
}

.schedule-overview-legend i.shortage {
  background: #fff1f2;
  border-color: #fb7185;
}

.schedule-workspace-content {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 16px;
}

.schedule-linked-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 36px;
}

.schedule-linked-head h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 16px;
}

.schedule-workspace .schedule-detail-head {
  margin: 4px -16px 0;
  padding: 14px 16px 0;
  border-top: 1px solid var(--line);
}

.schedule-overview-wrap {
  max-height: 280px;
  overflow: auto;
  overscroll-behavior-y: auto;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.schedule-overview-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.schedule-overview-table th,
.schedule-overview-table td {
  min-width: 126px;
  height: 54px;
  padding: 5px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  background: #ffffff;
}

.schedule-overview-table th:not(.schedule-overview-date) {
  text-align: left;
}

.schedule-overview-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 48px;
  background: #fbfdff;
}

.schedule-overview-table th strong,
.schedule-overview-table th small {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.schedule-overview-table th small {
  color: var(--muted);
  font-weight: 500;
}

.schedule-overview-table .schedule-overview-brand {
  margin-bottom: 3px;
}

.schedule-overview-table .schedule-overview-date {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 92px;
  width: 92px;
  background: #fbfdff;
}

.schedule-overview-table th.schedule-overview-date {
  z-index: 5;
}

.schedule-overview-date strong,
.schedule-overview-date span {
  display: block;
}

.schedule-overview-date span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-availability {
  min-height: 40px;
  display: grid;
  place-content: center;
  gap: 2px;
  border: 1px solid;
  border-radius: 7px;
}

.schedule-availability.available {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.schedule-availability.full {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
}

.schedule-availability.shortage {
  border-color: #fb7185;
  background: #fff1f2;
  color: #be123c;
}

.schedule-availability strong {
  font-size: 13px;
}

.schedule-availability span {
  font-size: 11px;
  opacity: 0.82;
}

.schedule-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.schedule-table-wrap {
  max-height: max(360px, calc(100vh - 300px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.schedule-table-wrap.paged-table-wrap {
  height: clamp(280px, 38vh, 430px);
  min-height: 280px;
}

.schedule-table-wrap:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.schedule-table th,
.schedule-table td {
  height: 58px;
  padding: 0;
  border-right: 1px solid var(--line);
  text-align: center;
}

.schedule-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 48px;
  background: #fbfdff;
  box-shadow: 0 1px 0 var(--line);
}

.schedule-table .schedule-machine {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 190px;
  min-width: 190px;
  padding: 10px 12px;
  text-align: left;
  background: #ffffff;
  box-shadow: 1px 0 0 var(--line);
}

.schedule-table th.schedule-machine {
  z-index: 5;
  background: #fbfdff;
}

.schedule-table .schedule-machine strong,
.schedule-table .schedule-machine span,
.schedule-table .schedule-machine em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-table .schedule-machine strong {
  color: var(--ink);
  font-size: 14px;
}

.schedule-table .schedule-machine span,
.schedule-table .schedule-machine em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.schedule-table th:not(.schedule-machine),
.schedule-table td:not(.schedule-machine) {
  width: 240px;
  min-width: 240px;
}

.schedule-table[data-view-mode="week"] th:not(.schedule-machine),
.schedule-table[data-view-mode="week"] td:not(.schedule-machine) {
  width: 280px;
  min-width: 280px;
}

.schedule-day {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 48px;
  font-weight: 700;
}

.schedule-day small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.schedule-cell {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 6px;
  background: #ffffff;
}

.schedule-free {
  width: 100%;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #eef2f6;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.schedule-booking {
  width: 100%;
  min-height: 46px;
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 4px 6px;
  border: 1px solid #f6c66b;
  border-radius: 6px;
  background: #fff3d6;
  color: #7c4a03;
  font-size: 12px;
  line-height: 1.18;
}

.schedule-booking.ship {
  border-color: #8bd8ce;
  background: #d9f3ef;
  color: #0b5f59;
}

.schedule-booking.busy {
  border-color: #f6c66b;
  background: #fff3d6;
  color: #7c4a03;
}

.schedule-booking strong,
.schedule-booking span,
.schedule-booking em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.schedule-booking em {
  opacity: 0.82;
}

.schedule-table td.schedule-event-cell {
  padding: 3px;
  background: #ffffff;
}

.schedule-event-cell-inner {
  min-height: 52px;
  padding: 2px;
}

.schedule-booking.schedule-event {
  min-height: 48px;
  padding: 5px 10px;
  border-width: 2px;
  box-shadow: 0 2px 7px rgb(15 23 42 / 10%);
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.schedule-booking.schedule-event:hover,
.schedule-booking.schedule-event:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 11px rgb(15 23 42 / 18%);
  outline: 2px solid rgb(37 99 235 / 32%);
  outline-offset: 1px;
}

.schedule-booking.schedule-reassignable { cursor: grab; }
.schedule-booking.schedule-reassignable:active { cursor: grabbing; }
.schedule-booking.schedule-dragging { opacity: .45; }
.schedule-table tr.schedule-drop-target > td { background: #eaf3ff; }
.schedule-table tr.schedule-drop-target > td.schedule-machine { box-shadow: inset 3px 0 #2563eb; }
.schedule-reassign-confirm .detail-grid { margin: 16px 0; }

.schedule-booking.schedule-event.pending-shipment {
  border-color: #f59e0b;
  background: linear-gradient(90deg, #fef3c7, #fff8e7);
  color: #92400e;
}

.schedule-booking.schedule-event.shipped {
  border-color: #22c55e;
  background: linear-gradient(90deg, #dcfce7, #effdf3);
  color: #166534;
}

.schedule-booking.schedule-event.return-transit {
  border-color: #14b8a6;
  background: linear-gradient(90deg, #ccfbf1, #e8fffb);
  color: #0f766e;
}

.schedule-booking.schedule-event.actual-transit {
  border-color: #dc2626;
  background: linear-gradient(90deg, #fee2e2, #fff1f2);
  color: #991b1b;
}

.schedule-actual-transit {
  color: #b91c1c;
  font-size: 13px;
  font-weight: 850;
}

.schedule-booking.schedule-event strong {
  font-size: 14px;
  line-height: 1.2;
}

.schedule-booking.schedule-event span,
.schedule-booking.schedule-event em {
  font-size: 11px;
}

.schedule-booking.schedule-event strong,
.schedule-booking.schedule-event span,
.schedule-booking.schedule-event em {
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.schedule-ship-date {
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.schedule-order-equipment-row {
  margin: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.schedule-order-equipment-row > .schedule-equipment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  padding: 0;
}

.schedule-buyer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
}

.schedule-buyer-content > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.schedule-buyer-content span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.schedule-copy-button {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 2px 8px;
  font-size: 11px;
}

.schedule-rental-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 8px 12px 0;
  padding: 9px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
}

.schedule-rental-row span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-rental-row strong {
  color: #1d4ed8;
  font-size: 14px;
  white-space: nowrap;
}

.detail-grid.schedule-deal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 12px 12px;
}

.schedule-deal-grid .detail-field {
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.schedule-note-grid {
  display: grid;
  gap: 10px;
  padding: 10px 14px;
}

.schedule-feishu-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .schedule-overview-layout {
    grid-template-columns: 1fr;
  }

  .schedule-overview-sidebar {
    min-height: 0;
  }

  .schedule-overview-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-overview-legend {
    grid-column: 1 / -1;
  }

  .detail-grid.schedule-deal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.schedule-event-legend,
.schedule-event-legend span {
  display: flex;
  align-items: center;
}

.schedule-event-legend {
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-event-legend span {
  gap: 5px;
  white-space: nowrap;
}

.schedule-event-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid;
}

.schedule-event-legend i.pending-shipment {
  border-color: #f59e0b;
  background: #fef3c7;
}

.schedule-event-legend i.shipped {
  border-color: #22c55e;
  background: #dcfce7;
}

.schedule-event-legend i.return-transit {
  border-color: #14b8a6;
  background: #ccfbf1;
}

.schedule-event-legend i.actual-transit {
  border-color: #dc2626;
  background: #fee2e2;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-income {
  background: #2563eb;
}

.legend-orders {
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.dashboard-chart {
  min-height: 260px;
  padding: 14px;
}

.chart-bars {
  position: relative;
  display: grid;
  grid-template-columns: repeat(31, minmax(4px, 1fr));
  align-items: end;
  height: 230px;
  gap: 5px;
  padding: 18px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f7faf9 100%);
  overflow: hidden;
}

.chart-bar {
  position: relative;
  z-index: 1;
  min-height: 6px;
  border-radius: 4px 4px 0 0;
  background: #dbeafe;
}

.chart-bars svg {
  position: absolute;
  inset: 16px 12px 22px;
  z-index: 2;
  width: calc(100% - 24px);
  height: calc(100% - 38px);
  pointer-events: none;
}

.chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.rank-list,
.todo-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.rank-row,
.todo-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.todo-row {
  grid-template-columns: 1fr auto auto;
}

.todo-row-with-action {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.rank-no {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eef6f4;
  color: var(--accent);
  font-weight: 800;
}

.row-title {
  font-weight: 800;
}

.row-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.amount {
  display: grid;
  gap: 2px;
  font-weight: 800;
}

.amount strong,
.amount em {
  font-style: normal;
}

.amount em {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.todo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 14px 0;
}

.todo-tabs button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.todo-tabs button.active,
.todo-tabs button:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: #eef6f4;
}

.qr-thumb {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
  background: #fff;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.segmented button {
  border: 0;
  background: transparent;
  min-height: 30px;
}

.segmented .selected {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.14);
}

.list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.item strong {
  display: block;
  margin-bottom: 4px;
}

.item span {
  color: var(--muted);
}

.compact .item {
  padding: 10px 12px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 14px;
}

.action-grid button {
  min-height: 42px;
  text-align: left;
}

.action-grid button[data-confirm="true"] {
  border-color: #f59e0b;
  color: var(--warn);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.actions input[type="search"] {
  width: min(360px, 54vw);
}

.output {
  margin: 0 14px 14px;
  min-height: 150px;
  max-height: 360px;
  overflow: auto;
  background: #111827;
  color: #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
}

input[type="search"] {
  width: min(360px, 100%);
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.customer-select-box {
  gap: 8px;
}

.customer-select-box input[type="search"],
.customer-select-box select {
  width: 100%;
}

.table-wrap {
  overflow: auto;
}

/* 客户管理由页面负责纵向滚动，避免表格再套一层独立滚动区域。 */
.customers-table-wrap { overflow-x: auto; overflow-y: visible; }
.customers-table-wrap > .table-pager { position: static; width: 100%; margin: 0; border-top: 1px solid #e8eaed; background: #fff; }

.category-settings-table {
  width: 100%;
  min-width: 920px;
  table-layout: fixed;
}

.category-settings-table .category-image-column {
  width: 64px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

.category-settings-table .category-name-column {
  width: 220px;
}

.category-settings-table .category-kind-column {
  width: 68px;
}

.category-settings-table .category-type-column {
  width: 112px;
}

.category-settings-table .category-brand-column {
  width: 88px;
}

.category-settings-table .category-prefix-column {
  width: 104px;
}

.category-settings-table .category-actions-column {
  width: 126px;
  white-space: nowrap;
}

.category-settings-table .category-name-cell {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.category-settings-table .category-note-cell {
  white-space: normal;
  overflow-wrap: anywhere;
}

.category-image-link {
  display: inline-flex;
  vertical-align: middle;
}

.customers-table {
  min-width: 1780px;
  table-layout: fixed;
}

.customers-table th:nth-child(1),
.customers-table td:nth-child(1) { width: 42px; }
.customers-table th:nth-child(2),
.customers-table td:nth-child(2) { width: 64px; }
.customers-table th:nth-child(3),
.customers-table td:nth-child(3) { width: 170px; }
.customers-table th:nth-child(4),
.customers-table td:nth-child(4) { width: 140px; }
.customers-table th:nth-child(5),
.customers-table td:nth-child(5) { width: 100px; }
.customers-table th:nth-child(6),
.customers-table td:nth-child(6) { width: 130px; }
.customers-table th:nth-child(7),
.customers-table td:nth-child(7) { width: 280px; }
.customers-table th:nth-child(8),
.customers-table td:nth-child(8) { width: 180px; }
.customers-table th:nth-child(9),
.customers-table td:nth-child(9) { width: 110px; }
.customers-table th:nth-child(10),
.customers-table td:nth-child(10) { width: 90px; text-align: center; }
.customers-table th:nth-child(11),
.customers-table td:nth-child(11) { width: 110px; }
.customers-table th:nth-child(12),
.customers-table td:nth-child(12) { width: 170px; }
.customers-table th:nth-child(13),
.customers-table td:nth-child(13) { width: 90px; }
.customers-table th:nth-child(14),
.customers-table td:nth-child(14) { width: 108px; }

.customer-id-cell {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.customer-panel-title {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.customer-workspace-head {
  align-items: flex-end;
}

.customer-list-actions {
  justify-content: flex-start;
  margin-right: auto;
}

.customer-list-actions input[type="search"] {
  width: 300px;
}

.customer-list-actions > span,
.order-primary-actions > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.customer-address-cell,
.customer-identity-cell,
.customer-note-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-list-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.customer-list-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b30;
}

.customer-list-status.active i { background: #34c759; }

.rental-manager-customer-form {
  width: min(860px, 100%);
  margin: 0 auto;
}

.rental-manager-customer-form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-form-summary {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f7f8fa;
  color: var(--muted);
}

.orders-workspace-head {
  display: block;
  padding-bottom: 10px;
}

.order-list-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 18px;
  border-top: 1px solid var(--ui-border);
  border-bottom: 1px solid var(--ui-border);
}

.order-detail-tabs {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border-bottom: 0;
}

.order-search-row {
  flex: 0 1 420px;
  min-width: 260px;
  margin-left: auto;
}

.order-search-row input[type="search"] {
  width: 100%;
}

.order-action-bars {
  display: grid;
  gap: 9px;
  padding: 0 18px 14px;
}

.order-primary-actions,
.order-sync-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* 租管家式轻表格：订单字段之间不画竖向分割线。 */
.orders-table-wrap .goofish-order-table thead th,
.orders-table-wrap .goofish-order-table tbody td,
.goofish-order-table .goofish-order-product-row td {
  border-right: 0;
}

.orders-table-wrap .goofish-order-table thead th:first-child {
  border-left: 0;
}

.goofish-order-table .goofish-order-product-row td {
  border-bottom-color: transparent;
}

.customer-add-button {
  margin-top: 8px;
}

.customer-address-cell {
  white-space: normal;
  overflow-wrap: anywhere;
}

.customer-chat-link {
  color: var(--accent-2);
  font-weight: 650;
  text-decoration: none;
}

.customer-chat-link:hover {
  text-decoration: underline;
}

.customer-channel-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}

.customer-channel-cell > span,
.customer-channel-cell > a {
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-channel-badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef1f5;
  color: #596272;
  font-size: 11px;
  line-height: 1.5;
}

.customer-channel-badge.channel-闲鱼 { background: #fff1dd; color: #a65c00; }
.customer-channel-badge.channel-微信 { background: #e8f8ee; color: #177a3d; }
.customer-channel-badge.channel-小红书 { background: #ffecee; color: #c93443; }
.customer-channel-badge.channel-线下 { background: #eef1f5; color: #596272; }

.customer-identity-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 650;
}

.customer-identity-status.stored {
  color: #166534;
  background: #dcfce7;
}

.customer-identity-status.empty {
  color: var(--muted);
  background: #f1f5f9;
}

.category-thumb {
  display: inline-grid;
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
  padding: 2px;
}

.category-thumb-placeholder {
  color: var(--muted);
  background: #f8fafc;
  font-size: 11px;
}

.goofish-order-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.goofish-order-table .order-col-select { width: 44px; }
.goofish-order-table .order-col-actions { width: 210px; }
.goofish-order-table .order-col-product { width: 330px; }
.goofish-order-table .order-col-rental,
.goofish-order-table .order-col-rent,
.goofish-order-table .order-col-buyer,
.goofish-order-table .order-col-method {
  width: calc((100% - 584px) / 4);
}

.goofish-order-table thead th {
  height: 48px;
  background: #fbfbfb;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.goofish-order-table thead th:first-child {
  border-left: 1px solid var(--line);
}

.orders-table-wrap {
  position: relative;
  max-height: calc(100vh - 210px);
  overflow: auto;
  overscroll-behavior: contain;
}

.orders-table-wrap .goofish-order-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 var(--line);
}

.orders-table-wrap .goofish-order-table thead th:first-child,
.orders-table-wrap .goofish-order-product-row td:first-child {
  position: sticky;
  left: 0;
  z-index: 12;
  width: 44px;
  min-width: 44px;
  background: #fff;
}

.orders-table-wrap .goofish-order-table thead th:first-child {
  z-index: 24;
  background: #fbfbfb;
}

.orders-table-wrap .goofish-order-table thead th:nth-child(2),
.orders-table-wrap .goofish-operation-cell {
  position: sticky;
  left: 44px;
  z-index: 11;
  width: 210px;
  min-width: 210px;
  background: #fff;
}

.orders-table-wrap .goofish-order-table thead th:nth-child(2) {
  z-index: 23;
  background: #fbfbfb;
}

.orders-table-wrap .goofish-order-table thead th:nth-child(3),
.orders-table-wrap .goofish-product-cell {
  position: sticky;
  left: 254px;
  z-index: 10;
  width: 330px;
  min-width: 330px;
  background: #fff;
  box-shadow: none;
}

.orders-table-wrap .goofish-order-table thead th:nth-child(3) {
  z-index: 22;
  background: #fbfbfb;
}

.goofish-order-table .goofish-order-head td {
  padding: 10px 12px;
  background: #f7f8fa;
  border-top: 8px solid #fff;
  border-bottom: 1px solid #edf0f3;
}

.goofish-order-table tbody > .goofish-order-head:first-child td {
  border-top: 0;
}

.goofish-order-meta,
.goofish-order-meta > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.goofish-order-meta {
  justify-content: space-between;
}

.goofish-order-meta > div strong {
  font-size: 13px;
}

.goofish-order-meta span {
  color: var(--muted);
  font-size: 12px;
}

.goofish-order-product-row td {
  padding: 12px 10px;
  vertical-align: top;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid #f1f3f5;
}

.goofish-order-product-row td:first-child {
  border-left: 1px solid var(--line);
}

.order-select-spacer {
  width: 44px;
}

.order-product-info {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.order-product-info > div:last-child {
  display: grid;
  gap: 5px;
}

.order-product-thumb {
  width: 70px;
  height: 70px;
  box-sizing: border-box;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}

.order-product-placeholder {
  padding: 0;
  display: grid;
  place-items: center;
  color: #b45309;
  background: #fef3c7;
  font-size: 22px;
  font-weight: 800;
}

.order-rental-cell {
  min-width: 150px;
  white-space: nowrap;
}

.order-rental-range {
  display: block;
  color: var(--text);
  font-weight: 650;
}

.goofish-status-cell {
  min-width: 150px;
  text-align: center;
}

.order-pickup-method-button {
  min-height: 32px;
  cursor: pointer;
  font: inherit;
}

.order-pickup-method-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.order-waybill-number {
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: center;
}

.order-shipment-created-action {
  color: var(--muted);
}

.goofish-status-stack {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.goofish-status-stack > strong {
  color: #111827;
  line-height: 1.4;
}

.goofish-price-cell,
.goofish-deal-cell,
.goofish-operation-cell {
  min-width: 120px;
}

.goofish-price-cell strong,
.goofish-price-cell span,
.goofish-deal-cell strong,
.goofish-deal-cell span {
  display: block;
  margin-bottom: 4px;
}

.goofish-buyer-cell {
  min-width: 0;
  max-width: none;
}

.orders-table-wrap .goofish-order-table .goofish-buyer-cell {
  padding-right: 22px;
  padding-left: 22px;
  text-align: left;
  line-height: 1.55;
}

.orders-table-wrap .goofish-order-table .goofish-buyer-cell .inline-link,
.orders-table-wrap .goofish-order-table .goofish-buyer-cell span {
  text-align: left;
}

.goofish-operation-cell {
  width: 150px;
  min-width: 150px;
  text-align: center;
}

.order-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 9px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.4;
}

.order-row-actions button {
  flex: 0 0 auto;
  padding-right: 0;
  padding-left: 0;
}

.order-action-separator {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: #c7cbd1;
  line-height: 1;
}

.paged-table-wrap {
  display: flex;
  flex-direction: column;
  height: var(--paged-table-height, calc(100dvh - 260px));
  min-height: 320px;
  max-height: none;
  overflow: hidden;
}

.paged-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.paged-table-scroll > table {
  margin: 0;
}

.paged-table-wrap > .table-pager {
  position: relative;
  z-index: 30;
  flex: 0 0 auto;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid #e8eaed;
  background: #fff;
}

.paged-table-wrap > .table-pager > span:first-child {
  margin-right: auto;
}

.table-page-size {
  width: auto;
  min-width: 92px;
  min-height: 32px;
  border: 1px solid #d9dde3;
  border-radius: 6px;
  padding: 0 28px 0 10px;
  background-color: #fff;
  color: #646a73;
  font-size: 12px;
}

.order-allocation-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -4px 0 10px;
  color: #8a9099;
  font-size: 12px;
}

.order-allocation-summary .available {
  color: #1677ff;
}

.rental-sn-picker-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.rental-sn-picker-copy small {
  overflow: hidden;
  color: #8a9099;
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clickable-row {
  cursor: pointer;
}

.clickable-cell {
  cursor: pointer;
}

.clickable-cell:hover {
  background: #f8fafc;
}

.clickable-row:hover {
  background: #f8fafc;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
}

th,
td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 650;
  background: #fbfcfd;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th::after {
  content: "↕";
  margin-left: 6px;
  color: #98a2b3;
  font-size: 11px;
}

th[data-sort-direction="asc"]::after {
  content: "↑";
  color: var(--accent);
}

th[data-sort-direction="desc"]::after {
  content: "↓";
  color: var(--accent);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: #edf7f4;
  color: var(--accent);
  font-weight: 650;
}

.status.unsynced {
  background: #fff7ed;
  color: var(--warn);
}

.ghost {
  background: transparent;
}

.row-action {
  min-height: 30px;
  padding: 0 10px;
}

.row-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 650;
}

.row-action-link:hover {
  border-color: #98a2b3;
}

.empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.compact-empty {
  padding: 10px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.18);
}

.order-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 21;
  width: min(760px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.14);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-head p {
  margin-top: 4px;
  color: var(--muted);
}

.drawer-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.drawer-body {
  overflow: auto;
  padding: 18px 20px 28px;
  background: #fbfcfd;
}

.detail-section {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.detail-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0;
  font-size: 14px;
}

.section-note {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field span {
  color: var(--muted);
  font-size: 12px;
}

.form-field input,
.form-field select,
.form-field textarea {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.form-field textarea {
  min-height: 72px;
  resize: vertical;
}

.rental-range-field {
  position: relative;
}

.rental-range-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rental-range-picker {
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 320px;
  max-width: calc(100vw - 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  padding: 10px;
}

.rental-range-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rental-range-head button,
.rental-range-days button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.rental-range-head button {
  width: 32px;
  height: 30px;
  font-size: 18px;
}

.rental-range-week,
.rental-range-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.rental-range-week span {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.rental-range-days button,
.rental-range-days span {
  min-height: 30px;
}

.rental-range-days button.in-range {
  background: #e8f2ff;
}

.rental-range-days button.selected {
  background: var(--accent);
  color: #fff;
}

.rental-range-hint {
  color: var(--muted);
  font-size: 12px;
}
.rental-range-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.rental-range-confirm { min-width: 56px; min-height: 30px; padding: 0 10px; font-size: 13px; }

.detail-field {
  display: grid;
  gap: 4px;
}

.detail-field span,
.detail-list-row span {
  color: var(--muted);
  font-size: 12px;
}

.detail-field strong {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.detail-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.detail-list-row .inline-edit-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.inline-edit-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border-top: 1px dashed var(--line);
}

.inline-edit-panel .drawer-actions {
  padding: 0;
}

.detail-list-row:last-child {
  border-bottom: 0;
}

.detail-list-row div {
  display: grid;
  gap: 3px;
}

.detail-list-row.selectable-row {
  cursor: pointer;
}

.detail-list-row.selectable-row:hover {
  background: #f8fafc;
}

.detail-list-row input[type="checkbox"] {
  margin-right: 6px;
}

.allocation-group {
  border-bottom: 1px solid var(--line);
}

.allocation-group:last-child {
  border-bottom: 0;
}

.allocation-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.allocation-group-head span {
  color: var(--muted);
  font-size: 12px;
}

.order-item-allocation-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  width: 100%;
}

.order-item-allocation-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.order-item-allocation-card.is-focused {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.order-item-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.order-item-card-head > div,
.order-item-card-meta,
.item-allocation-head,
.mini-row > div {
  display: grid;
  gap: 3px;
}

.order-item-card-head span,
.order-item-card-meta span,
.item-allocation-head span,
.mini-row span {
  color: var(--muted);
  font-size: 12px;
}

.order-item-card-meta,
.order-item-card-actions,
.item-allocation-block {
  padding: 0 12px;
}

.order-item-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-allocation-block {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
}

.item-allocation-head {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.mini-list {
  display: grid;
  gap: 6px;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.mini-row.selectable-row {
  cursor: pointer;
}

.mini-row.selectable-row:hover {
  background: #f8fafc;
}

.compact-history {
  margin-top: 10px;
  border-top: 1px dashed var(--line);
}

.right {
  text-align: right;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.drawer-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  padding: 0 14px 14px;
}

.form-feedback {
  flex: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.form-feedback.is-error {
  color: #b42318;
}

.form-feedback.is-info {
  color: #2563eb;
}

.danger {
  color: #b42318;
}

.loading-state {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 14px;
}

.loading-state div {
  display: grid;
  gap: 4px;
}

.loading-state span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #d7dee8;
  border-top-color: var(--accent-2);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.document-preview {
  box-sizing: border-box;
  width: min(100%, 760px);
  margin: 14px auto;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.order-drawer.center-modal.order-receipt-print-modal {
  width: min(1120px, calc(100vw - 48px));
  max-height: min(94vh, 980px);
}

.order-drawer.center-modal.order-receipt-print-modal .drawer-body {
  max-height: calc(min(94vh, 980px) - 68px);
  padding: 0 24px 20px;
  background: #fff;
}

.order-receipt-preview-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  place-items: start center;
  gap: 24px;
  min-height: 340px;
  padding: 28px;
  border-radius: 10px;
  background: #f3f5f7;
}

.order-receipt-preview-stage .receipt-page {
  display: grid;
  place-items: center;
  width: 100%;
}

.order-receipt-preview-stage .receipt-card {
  box-sizing: border-box;
  width: 320px;
  height: 240px;
  padding: 10px;
  color: #17191c;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.order-receipt-preview-stage .receipt-order-no {
  display: block;
  height: 28px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 26px;
}
.order-receipt-preview-stage .receipt-label-body {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  height: 192px;
}
.order-receipt-preview-stage .receipt-qr,
.order-receipt-preview-stage .receipt-qr-placeholder { display: block; width: 176px; height: 176px; }
.order-receipt-preview-stage .receipt-qr { object-fit: contain; }
.order-receipt-preview-stage .receipt-qr-placeholder { display: grid; place-content: center; gap: 5px; padding: 10px; text-align: center; border: 1px dashed #d97706; color: #92400e; }
.order-receipt-preview-stage .receipt-label-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 10px; overflow: hidden; }
.order-receipt-preview-stage .receipt-label-copy b { font-size: 14px; }
.order-receipt-preview-stage .receipt-label-copy strong,
.order-receipt-preview-stage .receipt-label-copy span { overflow-wrap: anywhere; font-size: 12px; line-height: 1.35; }
.order-receipt-preview-actions { justify-content: center; }

.order-picking-preview-stage {
  display: grid;
  gap: 20px;
  padding: 24px;
  border-radius: 10px;
  background: #f3f5f7;
}

.order-picking-preview-stage .print-order {
  box-sizing: border-box;
  width: min(100%, 850px);
  min-height: 520px;
  margin: 0 auto;
  padding: 28px 32px;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.order-picking-preview-stage .print-order h2 { margin: 0 0 18px; text-align: center; font-size: 22px; }
.order-picking-preview-stage .print-meta,
.order-picking-preview-stage .print-order footer { display: flex; justify-content: space-between; gap: 20px; }
.order-picking-preview-stage .print-customer { margin: 16px 0; padding: 12px 14px; background: #f5f6f8; }
.order-picking-preview-stage .print-customer p { margin: 6px 0 0; }
.order-picking-preview-stage table { width: 100%; border-collapse: collapse; }
.order-picking-preview-stage th,
.order-picking-preview-stage td { padding: 10px; border: 1px solid #d9dde3; text-align: left; vertical-align: middle; }
.order-picking-preview-stage th { background: #f8fafc; }
.order-picking-preview-stage td small { display: block; margin-top: 4px; color: #64748b; }
.order-picking-preview-stage .print-order footer { margin-top: 18px; }

.order-drawer.center-modal.outbound-document-modal {
  width: min(620px, calc(100vw - 32px));
  max-height: min(94vh, 980px);
}

.order-drawer.center-modal.outbound-document-modal .drawer-body {
  max-height: calc(min(94vh, 980px) - 68px);
}

.document-preview h3 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 18px;
}

.document-preview table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.document-preview th,
.document-preview td {
  border: 1px solid #cbd5e1;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.document-preview th {
  width: 92px;
  background: #f8fafc;
  font-weight: 650;
}

.outbound-document {
  color: #111827;
  font-size: 12px;
}

.outbound-document h3 {
  font-size: 20px;
  margin: 8px 0 26px;
}

.document-rule {
  border-top: 3px solid #111827;
  margin: 18px 0;
}

.document-dashed {
  border-top: 2px dashed #111827;
  margin: 18px 0;
}

.outbound-info-table th,
.outbound-info-table td,
.outbound-items-table th,
.outbound-items-table td,
.outbound-total-table th,
.outbound-total-table td {
  border-color: #111827;
}

.outbound-info-table th {
  width: 88px;
  text-align: center;
}

.outbound-items-table {
  table-layout: fixed;
}

.outbound-items-table th {
  text-align: center;
}

.outbound-items-table th:nth-child(1),
.outbound-items-table td:nth-child(1) {
  width: 5%;
}

.outbound-items-table th:nth-child(2),
.outbound-items-table td:nth-child(2) {
  width: 20%;
}

.outbound-items-table th:nth-child(3),
.outbound-items-table td:nth-child(3) {
  width: 14%;
}

.outbound-items-table th:nth-child(4),
.outbound-items-table td:nth-child(4) {
  width: 6%;
}

.outbound-items-table th:nth-child(5),
.outbound-items-table td:nth-child(5) {
  width: 6%;
}

.outbound-items-table th:nth-child(6),
.outbound-items-table td:nth-child(6),
.outbound-items-table th:nth-child(7),
.outbound-items-table td:nth-child(7) {
  width: 11%;
}

.outbound-items-table th:nth-child(8),
.outbound-items-table td:nth-child(8) {
  width: 13%;
}

.outbound-items-table td:first-child,
.outbound-items-table td:nth-child(4),
.outbound-items-table td:nth-child(5) {
  text-align: center;
}

.outbound-total-table {
  margin-left: auto;
  width: 100%;
}

.outbound-total-table th {
  text-align: right;
}

.outbound-total-table td { width: 110px; }

.outbound-accessory-table { margin-top: 10px; }
.outbound-accessory-table th { width: 110px; }

.outbound-terms {
  border: 1px solid #111827;
  padding: 12px 14px;
  line-height: 1.7;
}

.outbound-terms p {
  margin: 0 0 6px;
}

.outbound-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  line-height: 1.8;
  margin-top: 20px;
}

.outbound-footer p {
  margin: 0;
}

.outbound-sign {
  align-self: end;
  min-width: 180px;
  font-weight: 650;
}

.outbound-document {
  width: min(100%, 800px);
  padding: 28px 32px;
  color: #1d2736;
  font-size: 12px;
}
.outbound-document-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 16px; border-bottom: 3px solid #1464dc; }
.outbound-eyebrow { color: #1464dc; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.outbound-document h3 { margin: 4px 0 2px; text-align: left; font-size: 27px; line-height: 1.25; }
.outbound-document-head p { margin: 0; color: #718096; }
.outbound-document-code { max-width: 44%; text-align: right; }
.outbound-document-code span, .outbound-document-code small { display: block; color: #718096; }
.outbound-document-code strong { display: block; margin: 2px 0; font-size: 15px; overflow-wrap: anywhere; }
.outbound-section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 8px; }
.outbound-section-title b { font-size: 14px; }
.outbound-section-title span { color: #8b9aab; font-size: 10px; letter-spacing: .5px; }
.outbound-document th, .outbound-document td { border: 0; border-bottom: 1px solid #e1e7ef; padding: 9px 10px; vertical-align: middle; }
.outbound-document th { color: #65758a; background: #f3f6fa; font-weight: 500; }
.outbound-info-table th { width: 18%; text-align: left; }
.outbound-info-table td { width: 32%; font-weight: 600; }
.outbound-items-table thead th, .outbound-accessory-table thead th { color: #42556e; background: #edf3fc; font-weight: 650; }
.outbound-items-table th:nth-child(1), .outbound-items-table td:nth-child(1) { width: 8%; text-align: center; }
.outbound-items-table th:nth-child(2), .outbound-items-table td:nth-child(2) { width: 34%; }
.outbound-items-table th:nth-child(3), .outbound-items-table td:nth-child(3) { width: 9%; text-align: center; }
.outbound-items-table th:nth-child(4), .outbound-items-table td:nth-child(4) { width: 35%; text-align: left; }
.outbound-items-table th:nth-child(5), .outbound-items-table td:nth-child(5) { width: 14%; text-align: right; }
.outbound-document td small { display: block; margin-top: 2px; color: #718096; font-size: 11px; font-weight: 400; }
.outbound-accessory-table th:nth-child(1) { width: 45%; }
.outbound-accessory-table th:nth-child(2), .outbound-accessory-table td:nth-child(2) { width: 12%; text-align: center; }
.outbound-document .outbound-empty { text-align: center; color: #8b9aab; }
.outbound-note { display: flex; gap: 12px; margin-top: 8px; padding: 10px 12px; background: #f7f9fc; color: #435369; }
.outbound-note b { flex: none; }
.outbound-amount { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 12px 14px; border-top: 1px solid #d9e4f2; background: #edf4ff; }
.outbound-amount strong { color: #1557bd; font-size: 20px; }
.outbound-check-table td { width: 33%; border: 1px solid #dce5ef; color: #42556e; }
.outbound-signatures { display: flex; justify-content: space-between; gap: 20px; margin-top: 20px; }
.outbound-signatures > div { flex: 1; }
.outbound-signatures span { display: block; margin-top: 12px; }
.outbound-document-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 10px; border-top: 1px solid #dce5ef; color: #77869a; font-size: 10px; }

.outbound-image-list { display: grid; gap: 20px; padding: 12px 0 18px; }
.outbound-image-card { overflow: hidden; border: 1px solid #dce5ef; border-radius: 10px; background: #f3f6fa; }
.outbound-image-card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid #dce5ef; background: #fff; }
.outbound-image-card-head strong { overflow-wrap: anywhere; }
.outbound-image-preview { display: block; width: min(100% - 32px, 432px); height: auto; margin: 16px auto; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.raw-box {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  color: var(--ink);
  background: #fff;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.text-link {
  display: inline-flex;
  margin: 0 14px 14px;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 650;
}

.text-link:hover {
  text-decoration: underline;
}

.inline-link {
  color: var(--accent-2);
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* 商品与 SN 库存工作区 */
.inventory-panel-head {
  align-items: center;
  padding-bottom: 16px;
}

.inventory-primary-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inventory-view-tabs {
  display: flex;
  gap: 24px;
  min-height: 44px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.inventory-view-tabs button {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.inventory-view-tabs button.active {
  color: var(--ink);
}

.inventory-view-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  content: "";
}

.inventory-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  padding: 0 18px 16px;
}

.inventory-metric {
  display: flex;
  min-height: 72px;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.inventory-metric strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.inventory-metric span {
  color: var(--muted);
  font-size: 12px;
}

.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.inventory-filter-group,
.inventory-product-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-product-actions {
  width: 100%;
  margin-left: 0;
  order: -1;
  justify-content: flex-start;
}

.inventory-filter-group {
  width: 100%;
}

.inventory-product-actions > span {
  margin-right: 2px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.inventory-toolbar input[type="search"] {
  width: min(420px, 42vw);
  min-width: 250px;
}

.inventory-toolbar select {
  min-width: 140px;
}

.inventory-toolbar input[type="search"],
.inventory-toolbar select,
.inventory-toolbar .inventory-date-filter {
  height: 36px;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: var(--ink);
}

.inventory-date-filter {
  width: 142px;
}

.inventory-table-wrap {
  max-height: calc(100vh - 330px);
  min-height: 320px;
  overflow: auto;
}

.inventory-table {
  min-width: 1220px;
}

.inventory-table th,
.inventory-table td {
  border-right: 1px solid var(--line);
}

.inventory-table th:last-child,
.inventory-table td:last-child {
  border-right: 0;
  text-align: center;
}

.inventory-table th:nth-child(1) { width: 230px; }
.inventory-table th:nth-child(2) { width: 180px; }
.inventory-table th:nth-child(3) { width: 100px; }
.inventory-table th:nth-child(4) { width: 90px; }
.inventory-table th:nth-child(5) { width: 120px; }
.inventory-table th:nth-child(6) { width: 260px; }
.inventory-table th:nth-child(7) { width: 190px; }
.inventory-table th:nth-child(8) { width: 70px; }

.inventory-products-table {
  min-width: 900px;
  table-layout: fixed;
}

.inventory-products-table th:nth-child(1) { width: 44px; }
.inventory-products-table th:nth-child(2) { width: 230px; }
.inventory-products-table th:nth-child(3) { width: 100px; }
.inventory-products-table th:nth-child(4) { width: 140px; }
.inventory-products-table th:nth-child(5) { width: 180px; }
.inventory-products-table th:nth-child(6) { width: 100px; }
.inventory-products-table th:nth-child(7) { width: 58px; }
.inventory-products-table th:nth-child(8) { width: 128px; }

.inventory-check-column {
  padding-right: 8px !important;
  padding-left: 8px !important;
  text-align: center !important;
}

.inventory-check-column input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.inventory-product-offline td {
  background: #fbfcfd;
}

.inventory-product-offline .inventory-product,
.inventory-product-offline .inventory-sn,
.inventory-product-offline .inventory-price,
.inventory-product-offline .inventory-stock-count,
.inventory-product-offline .inventory-accessories-cell {
  opacity: 0.62;
}

.inventory-product-master .inventory-product-thumb {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
}

.inventory-price,
.inventory-stock-count {
  display: grid;
  gap: 5px;
}

.inventory-price strong,
.inventory-stock-count strong {
  color: var(--ink);
  font-size: 14px;
}

.inventory-price span,
.inventory-stock-count span,
.inventory-warning {
  color: var(--muted);
  font-size: 12px;
}

.inventory-accessories-cell {
  max-width: 220px;
  color: #475569;
  line-height: 1.5;
  white-space: normal;
}

.inventory-warning {
  display: block;
  margin-top: 5px;
}

.inventory-row-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.inventory-product {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.inventory-product-thumb {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  padding: 3px;
}

.inventory-product-placeholder {
  display: grid;
  place-items: center;
  color: #94a3b8;
  background: #f8fafc;
  font-size: 10px;
  text-align: center;
}

.inventory-product div,
.inventory-sn,
.inventory-asset,
.inventory-schedule {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.inventory-product strong,
.inventory-sn strong,
.inventory-asset strong {
  color: var(--ink);
  font-size: 13px;
}

.inventory-product span,
.inventory-sn span,
.inventory-asset span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.inventory-free {
  color: #047857;
  font-size: 12px;
  font-weight: 650;
}

.product-editor {
  display: grid;
  gap: 14px;
}

.product-editor-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 12px 2px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 650;
}

.product-editor-progress span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.product-editor-progress b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 12px;
}

.product-editor-progress span.active {
  color: var(--accent);
}

.product-editor-progress span.active b {
  background: var(--accent);
  color: #fff;
}

.product-editor-progress i {
  width: 72px;
  height: 1px;
  background: #dbe1e8;
}

.product-editor-section {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.product-editor-basic {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
}

.product-image-editor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.product-image-preview {
  display: grid;
  width: 138px;
  height: 138px;
  box-sizing: border-box;
  place-items: center;
  border: 1px dashed #b8c2cf;
  border-radius: 9px;
  overflow: hidden;
  background: #f8fafc;
  color: #94a3b8;
  cursor: pointer;
}

.product-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.product-image-preview span {
  display: grid;
  gap: 5px;
  place-items: center;
  font-size: 28px;
}

.product-image-preview small {
  font-size: 12px;
}

.product-image-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.product-image-upload span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.product-image-editor p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.product-main-fields {
  padding: 0;
}

.product-editor-actions {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
  background: #fcfdff;
}

.product-editor-page {
  position: static;
  z-index: auto;
  overflow: visible;
  background: transparent;
}

.product-editor-page-head {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  min-height: 86px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.product-editor-page-head > div:first-child {
  display: grid;
  gap: 3px;
}

.product-editor-page-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.product-editor-page-head span {
  color: var(--muted);
  font-size: 12px;
}

.product-editor-back {
  width: max-content;
  margin: 0 0 3px -10px;
  padding: 4px 10px;
  border: 0;
}

.product-editor-page-body {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.product-editor-page .product-editor {
  gap: 20px;
}

.product-editor-page .product-editor-progress {
  padding: 4px 0 8px;
}

.product-editor-page .product-editor-section {
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.product-editor-page .product-editor-basic {
  grid-template-columns: 210px minmax(0, 1fr);
  padding: 24px;
}

.product-editor-page .product-image-preview {
  width: 168px;
  height: 168px;
}

@media (max-width: 1050px) {
  .inventory-metrics {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .inventory-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .inventory-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 12px 12px;
  }

  .inventory-toolbar input[type="search"],
  .inventory-toolbar select {
    width: 100%;
    min-width: 0;
  }

  .inventory-table-wrap {
    max-height: 70vh;
  }

  .product-editor-basic {
    grid-template-columns: 1fr;
  }

  .product-editor-page-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .product-editor-page-body {
    width: calc(100% - 24px);
    padding-top: 16px;
  }

  .product-editor-page .product-editor-basic {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

@media (max-width: 1100px) {
  .sidebar {
    padding: 12px;
  }
  .brand {
    margin-bottom: 10px;
  }
  .nav-menu {
    display: grid;
    gap: 8px;
  }
  .nav-children {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app {
    padding: 16px;
  }
  .topbar {
    align-items: flex-start;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
  .split,
  .action-grid {
    grid-template-columns: 1fr;
  }
}

/* 收益核算与SN归属 */
.finance-status { padding: 3px 10px; border: 1px solid #f0cf86; border-radius: 999px; color: #9a6700; background: #fff8e6; font-size: 12px; }
.finance-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.finance-summary-grid .detail-field { min-height: 76px; }
.finance-summary-grid .detail-field strong { font-size: 17px; font-weight: 600; }
.finance-subsection { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e5e7eb; }
.finance-subsection-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.finance-subsection-head strong { font-weight: 600; }
.finance-subsection-head span { color: #94a3b8; font-size: 12px; }
.finance-cost-list, .finance-distribution-list { display: grid; gap: 6px; margin-bottom: 12px; }
.finance-cost-row { display: grid; grid-template-columns: 150px minmax(180px, 1fr) 100px 46px; align-items: center; gap: 12px; min-height: 40px; padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px; }
.finance-cost-row small { color: #64748b; }
.finance-cost-row strong { text-align: right; font-weight: 600; }
.finance-cost-form, .finance-commission-form, .equipment-ownership-form { margin-bottom: 10px; }
.finance-distribution-row { display: grid; grid-template-columns: 120px 1fr 110px 70px 100px; align-items: center; gap: 10px; min-height: 38px; padding: 6px 10px; border-bottom: 1px solid #eef1f4; }
.finance-distribution-row small, .finance-distribution-row strong { text-align: right; }
.equipment-ownership-section .detail-list { margin-bottom: 14px; }
@media (max-width: 900px) {
  .finance-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-cost-row, .finance-distribution-row { grid-template-columns: 1fr 1fr; }
  .finance-cost-row strong, .finance-cost-row small, .finance-distribution-row small, .finance-distribution-row strong { text-align: left; }
}

.order-select-column {
  width: 44px;
  min-width: 44px;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
}

th[data-no-sort] {
  cursor: default;
}

th[data-no-sort]::after {
  content: none;
}

.order-select-column input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
  cursor: pointer;
}

@media (max-width: 760px) {
  .order-sync-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .order-sync-actions input[type="search"] {
    width: 100%;
  }
}

/* Visual refresh: shadcn-like admin surface, without changing business layout. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #0f766e;
  --accent-soft: #ecfdf5;
  --accent-2: #2563eb;
  --warn: #b45309;
  --good: #15803d;
  --danger: #b42318;
  --sidebar: #0f172a;
  --sidebar-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 24px rgba(15, 23, 42, 0.05);
  --shadow-strong: 0 20px 55px rgba(15, 23, 42, 0.18);
}

body {
  background:
    linear-gradient(180deg, #fafafa 0, var(--bg) 260px),
    var(--bg);
  color: var(--ink);
  font: 14px/1.55 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell {
  background: linear-gradient(90deg, var(--sidebar) 0 248px, transparent 248px 100%);
}

.sidebar {
  flex-basis: 248px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.16), transparent 220px),
    var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 14px;
}

.brand {
  min-height: 56px;
  margin: 0 0 18px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.brand-mark,
.login-mark {
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 22px rgba(15, 118, 110, 0.2);
}

.brand strong {
  font-size: 14px;
}

.brand small {
  color: #94a3b8;
}

.nav-menu {
  gap: 8px;
}

.nav-group {
  gap: 5px;
}

.nav-title {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  color: #94a3b8;
  background: transparent;
}

.nav-menu a,
.nav-menu button:not(.nav-title) {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 8px;
  color: #dbe4ee;
  font-weight: 550;
}

.nav-menu a.active,
.nav-menu a:hover,
.nav-menu button.active,
.nav-menu button:hover {
  background: var(--sidebar-soft);
  color: #ffffff;
}

.nav-menu button.active {
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.app {
  padding: 24px 28px 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: -24px -28px 22px;
  padding: 18px 28px;
  background: rgba(246, 247, 249, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(12px);
}

h1 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: 0;
}

.topbar p,
.muted {
  color: var(--muted);
}

button,
.row-action-link {
  border-color: var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-weight: 600;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

button:hover,
.row-action-link:hover {
  border-color: #94a3b8;
  background: #f9fafb;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.32);
  outline-offset: 2px;
}

.button.primary,
button.primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.24);
}

.button.primary:hover,
button.primary:hover {
  border-color: #0b5f58;
  background: #0b5f58;
}

.ghost {
  background: #ffffff;
}

.danger {
  color: var(--danger);
}

.danger:hover {
  border-color: #fca5a5;
  background: #fff1f2;
}

.panel,
.detail-section,
.login-card {
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.panel {
  background: rgba(255, 255, 255, 0.96);
}

.panel-head,
.detail-section-head {
  min-height: 58px;
  background: #ffffff;
  border-bottom-color: var(--line);
}

.panel-head h2,
.detail-section h3 {
  color: #111827;
  font-weight: 700;
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 14px;
}

.metric {
  width: 148px;
  border-color: #dbe3ea;
  background:
    radial-gradient(circle at center, #ffffff 0 60%, transparent 61%),
    conic-gradient(from 230deg, #0f766e, #2563eb 42%, #f59e0b 68%, rgba(15, 118, 110, 0.16));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 26px rgba(15, 23, 42, 0.07);
}

.metric:hover {
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.metric strong {
  font-size: 22px;
  color: #0f172a;
}

.metric strong {
  font-size: clamp(17px, 1.45vw, 22px);
}

.metric strong:not(:only-child) {
  word-break: keep-all;
}

.chart-bars,
.rank-row,
.todo-row,
.item {
  border-color: var(--line);
  background: #ffffff;
}

.chart-bars {
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.04), transparent 55%),
    #ffffff;
}

.rank-row,
.todo-row,
.detail-list-row {
  transition: background 0.14s ease, border-color 0.14s ease;
}

.rank-row:hover,
.todo-row:hover,
.detail-list-row.selectable-row:hover,
.clickable-row:hover {
  background: #f8fafc;
}

.rank-no {
  background: #ecfdf5;
  color: #0f766e;
}

.todo-tabs {
  gap: 6px;
}

.todo-tabs button {
  border-radius: 8px;
  color: #374151;
}

.todo-tabs button.active {
  border-color: #0f766e;
  background: #ecfdf5;
  color: #0f766e;
}

.actions input[type="search"],
input[type="search"],
.form-field input,
.form-field select,
.form-field textarea,
.login-card input {
  border-color: var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.actions input[type="search"]:focus,
input[type="search"]:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.login-card input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.table-wrap {
  border-radius: 0 0 8px 8px;
  background: #ffffff;
}

table {
  font-size: 13px;
}

th,
td {
  padding: 12px 14px;
  border-bottom-color: var(--line);
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f9fafb;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.status {
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status.warn,
.status.unsynced {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #b45309;
}

.status.danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.row-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.drawer-backdrop {
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(2px);
}

.order-drawer {
  width: min(860px, 100vw);
  border-left-color: var(--line);
  box-shadow: var(--shadow-strong);
}

.drawer-head {
  min-height: 76px;
  padding: 18px 22px;
  background: #ffffff;
}

.drawer-body {
  padding: 18px 22px 30px;
  background: #f8fafc;
}

.detail-section {
  margin-bottom: 14px;
  background: #ffffff;
}

.section-note {
  background: #f9fafb;
  color: #64748b;
}

.detail-grid,
.form-grid {
  gap: 12px;
}

.readonly-field {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #fbfcfd;
}

.compact-info-list {
  display: grid;
  gap: 0;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #fbfcfd;
  overflow: hidden;
}

.compact-info-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf0f3;
}

.compact-info-row:last-child {
  border-bottom: 0;
}

.compact-info-row > span {
  color: #64748b;
  font-size: 12px;
}

.compact-info-row > strong {
  color: #111827;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.compact-info-row.amount-row > strong {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.compact-info-row.amount-row em {
  font-style: normal;
  white-space: nowrap;
}

.detail-field span,
.detail-list-row span,
.form-field span {
  color: #64748b;
  font-size: 12px;
}

.detail-field strong,
.detail-list-row strong {
  color: #111827;
}

.detail-list-row {
  padding: 13px 14px;
}

.allocation-group-head {
  background: #f9fafb;
}

.drawer-actions {
  padding: 0 14px 16px;
}

.empty {
  color: #94a3b8;
}

.login-screen {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 320px),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.1), transparent 360px),
    #f8fafc;
}

.login-card {
  padding: 30px;
}

.raw-box {
  background: #f8fafc;
  border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .shell {
    background: var(--bg);
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
  }

  .topbar {
    margin: -16px -16px 18px;
    padding: 16px;
  }
}

/* Prototype alignment: match the clickable prototype's lighter shadcn dashboard style. */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #d7dee8;
  --accent: #0f172a;
  --accent-soft: #f1f5f9;
  --accent-2: #2563eb;
  --sidebar: #fbfdff;
  --sidebar-soft: #f1f5f9;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-strong: -18px 0 40px rgba(15, 23, 42, 0.12);
}

body {
  background: #ffffff;
  color: var(--ink);
}

.shell {
  background: #ffffff;
}

.sidebar {
  flex-basis: 264px;
  background: var(--sidebar);
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 16px 14px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.28);
}

.brand {
  min-height: 44px;
  margin: 0 0 14px;
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.brand-mark,
.login-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: none;
}

.brand strong {
  color: var(--ink);
}

.brand small {
  color: var(--muted);
}

.nav-menu {
  gap: 10px;
}

.nav-title {
  min-height: 28px;
  padding: 0 10px 4px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.nav-title::after {
  color: var(--muted);
}

.nav-menu a,
.nav-menu button:not(.nav-title) {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  color: #334155;
  font-weight: 500;
}

.nav-menu a.active,
.nav-menu a:hover,
.nav-menu button.active,
.nav-menu button:hover {
  background: var(--sidebar-soft);
  color: var(--ink);
  box-shadow: none;
}

.nav-menu button.active {
  box-shadow: none;
  font-weight: 650;
}

.app {
  padding: 24px;
  background: #ffffff;
}

.topbar {
  margin: -24px -24px 24px;
  min-height: 64px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}

h1 {
  font-size: 24px;
  font-weight: 750;
}

h2 {
  font-size: 16px;
  font-weight: 750;
}

h3 {
  font-size: 13px;
  font-weight: 750;
}

button,
.row-action-link {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

button:hover,
.row-action-link:hover {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--ink);
}

.button.primary,
button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: none;
}

.button.primary:hover,
button.primary:hover {
  border-color: #020617;
  background: #020617;
}

.panel,
.detail-section,
.login-card {
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.panel-head,
.detail-section-head {
  min-height: auto;
  padding: 16px 18px 8px;
  background: #ffffff;
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.metric {
  width: auto;
  min-height: 112px;
  max-height: 136px;
  aspect-ratio: auto;
  justify-self: stretch;
  place-items: start;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: left;
}

.metric::before {
  display: none;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.metric strong {
  margin-top: 12px;
  color: var(--ink);
  max-width: 100%;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.08;
  font-weight: 800;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.metric em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.metric[role="button"]:hover {
  border-color: var(--line);
  background: #ffffff;
  transform: none;
}

.split {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 18px;
}

.dashboard-chart {
  padding: 10px 18px 18px;
}

.chart-bars {
  height: 260px;
  border-color: var(--line);
  background:
    linear-gradient(to top, transparent 24%, #f8fafc 24% 25%, transparent 25% 49%, #f8fafc 49% 50%, transparent 50% 74%, #f8fafc 74% 75%, transparent 75%),
    #ffffff;
}

.chart-bar {
  background: #dbeafe;
}

.rank-list,
.todo-list {
  gap: 10px;
  padding: 12px 18px 18px;
}

.rank-row,
.todo-row {
  min-height: 54px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.rank-row:last-child,
.todo-row:last-child {
  border-bottom: 0;
}

.rank-row:hover,
.todo-row:hover {
  background: transparent;
}

.rank-no {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: #475569;
}

.todo-tabs {
  padding: 14px 18px 0;
}

.todo-tabs button {
  height: 32px;
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.todo-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.actions input[type="search"],
input[type="search"],
.form-field input,
.form-field select,
.form-field textarea,
.login-card input {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: none;
}

.actions input[type="search"]:focus,
input[type="search"]:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.login-card input:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

th {
  background: #fbfdff;
  color: var(--muted);
  font-weight: 650;
}

td {
  color: #0f172a;
}

.clickable-row:hover {
  background: #f8fafc;
}

.status {
  border: 0;
  background: var(--accent-soft);
  color: #334155;
  font-weight: 650;
}

.status.warn,
.status.unsynced {
  border: 0;
  background: #fef3c7;
  color: #b45309;
}

.status.danger {
  border: 0;
  background: #fee2e2;
  color: #dc2626;
}

.status.info {
  border: 0;
  background: #dbeafe;
  color: #1d4ed8;
}

.status.cyan {
  border: 0;
  background: #cffafe;
  color: #0e7490;
}

.status.purple {
  border: 0;
  background: #ede9fe;
  color: #6d28d9;
}

.status.blue {
  border: 0;
  background: #e0e7ff;
  color: #4338ca;
}

.status.amber {
  border: 0;
  background: #ffedd5;
  color: #c2410c;
}

.status.success {
  border: 0;
  background: #dcfce7;
  color: #047857;
}

tbody tr:nth-child(even) td {
  background: #fafafa;
}

tbody tr:nth-child(odd) td {
  background: #ffffff;
}

tbody tr.clickable-row:hover td,
tbody tr:hover td {
  background: #f1f5f9;
}

.method-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.method-badge.info {
  background: #dbeafe;
  color: #1d4ed8;
}

.method-badge.success {
  background: #dcfce7;
  color: #047857;
}

.method-badge.purple {
  background: #ede9fe;
  color: #6d28d9;
}

.method-badge.amber {
  background: #ffedd5;
  color: #c2410c;
}

.method-badge.cyan {
  background: #cffafe;
  color: #0e7490;
}

.row-action {
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
}

.row-action.info {
  background: #dbeafe;
  color: #1d4ed8;
}

.row-action.success {
  background: #dcfce7;
  color: #047857;
}

.row-action.danger {
  background: #fee2e2;
  color: #dc2626;
}

.row-action:hover {
  border: 0;
  filter: brightness(0.97);
}

.row-action:disabled {
  background: #f1f5f9;
  color: #94a3b8;
}

/* Final shadcn-style tone-down: keep semantic hints without loud badge colors. */
.status,
.method-badge,
.row-action {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  box-shadow: none;
}

.status.warn,
.status.unsynced,
.status.amber,
.method-badge.amber {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.status.info,
.status.cyan,
.status.blue,
.status.purple,
.method-badge.info,
.method-badge.cyan,
.method-badge.purple,
.row-action.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.status.success,
.method-badge.success,
.row-action.success {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.status.danger,
.row-action.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.row-action {
  min-height: 28px;
  border-radius: 8px;
  padding: 0 9px;
}

.row-action:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  filter: none;
}

.row-action.success:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.row-action.danger:hover {
  border-color: #fca5a5;
  background: #fee2e2;
}

tbody tr:nth-child(even) td {
  background: #fcfcfd;
}

tbody tr:nth-child(odd) td {
  background: #ffffff;
}

tbody tr.clickable-row:hover td,
tbody tr:hover td {
  background: #f8fafc;
}

.table-pager {
  position: sticky;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: min(100%, 1040px);
  padding: 12px;
  color: #64748b;
  font-size: 13px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.pager-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pager-ellipsis {
  min-width: 22px;
  text-align: center;
  color: #94a3b8;
}

.table-pager .row-action.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
}

.drawer-backdrop {
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: none;
}

.order-drawer {
  width: min(780px, 100vw);
  box-shadow: var(--shadow-strong);
}

.order-drawer.center-modal {
  top: 50%;
  right: auto;
  left: 50%;
  width: min(720px, calc(100vw - 32px));
  height: auto;
  max-height: min(82vh, 760px);
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.order-drawer.center-modal.wide-modal {
  width: min(1040px, calc(100vw - 128px));
  max-width: calc(100vw - 32px);
  height: auto;
  max-height: min(86vh, 820px);
}

.order-drawer.center-modal .drawer-head {
  min-height: auto;
  padding: 14px 16px;
}

.order-drawer.center-modal .drawer-body {
  max-height: calc(min(82vh, 760px) - 73px);
  overflow: auto;
  padding: 14px 16px 18px;
}

.order-drawer.center-modal.wide-modal .drawer-body {
  max-height: calc(min(86vh, 820px) - 65px);
  padding: 14px 18px 18px;
}

.table-wrap th,
.table-wrap td {
  vertical-align: middle;
}

.order-drawer.center-modal .detail-section:last-child {
  margin-bottom: 0;
}

.drawer-head {
  min-height: auto;
  padding: 18px 20px;
}

.drawer-body {
  padding: 18px 20px 28px;
  background: #fcfdff;
}

.section-note,
.readonly-field,
.detail-list-row .inline-edit-panel,
.allocation-group-head {
  background: #fbfdff;
}

.readonly-field {
  border-color: var(--line);
}

@media (max-width: 1100px) {
  .sidebar {
    background: var(--sidebar);
  }

  .topbar {
    margin: -16px -16px 18px;
    padding: 16px;
  }

  .schedule-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    display: block;
    min-width: 0;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    display: none;
  }

  .nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    width: max-content;
  }

  .nav-group,
  .nav-children {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .nav-group:not(.expanded) .nav-children {
    display: none;
  }

  .nav-menu a,
  .nav-menu button,
  .nav-menu button:not(.nav-title),
  .nav-title {
    width: auto;
    min-height: 34px;
    padding: 0 9px;
    white-space: nowrap;
  }

  .app {
    width: 100%;
    padding: 12px;
  }

  .topbar {
    flex-wrap: wrap;
    margin: -12px -12px 12px;
    min-height: auto;
    padding: 12px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .topbar p {
    display: none;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-sync-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .order-sync-actions input[type="search"] {
    width: 100%;
  }

  .order-sync-actions button {
    flex: 1 1 auto;
  }
}

/* Apple-inspired 2026 visual system
   Uses Apple's clarity, spacing and neutral palette without copying brand assets. */
:root {
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.92);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: #eaf4ff;
  --sidebar: rgba(250, 250, 252, 0.86);
  --sidebar-soft: rgba(0, 113, 227, 0.09);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.035), 0 14px 32px rgba(0, 0, 0, 0.045);
  --shadow-strong: 0 24px 70px rgba(0, 0, 0, 0.16);
  --radius-large: 22px;
  --radius-medium: 14px;
  --radius-small: 10px;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.47;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(0, 113, 227, 0.18);
}

.shell {
  background: var(--bg);
}

.sidebar {
  flex-basis: 248px;
  padding: 20px 16px;
  background: var(--sidebar);
  border-right: 1px solid rgba(0, 0, 0, 0.07);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}

.brand {
  min-height: 52px;
  margin: 0 4px 20px;
  padding: 0 4px 18px;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.brand-mark,
.login-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2b2b2d, #050506);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}

.brand strong {
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.brand small {
  margin-top: 2px;
  color: #86868b;
  font-size: 11px;
}

.nav-menu {
  gap: 12px;
}

.nav-group {
  gap: 5px;
}

.nav-title {
  min-height: 25px;
  padding: 0 12px 3px;
  color: #86868b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-menu a,
.nav-menu button:not(.nav-title) {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  color: #424245;
  font-size: 13px;
  font-weight: 500;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-menu a:hover,
.nav-menu button:not(.nav-title):hover {
  background: rgba(0, 0, 0, 0.045);
  color: #1d1d1f;
}

.nav-menu a.active,
.nav-menu button.active:not(.nav-title) {
  background: var(--sidebar-soft);
  color: var(--accent);
  font-weight: 650;
}

.app {
  padding: 30px 32px 48px;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  min-height: 78px;
  margin: -30px -32px 28px;
  padding: 13px 32px 12px;
  background: rgba(245, 245, 247, 0.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.topbar h1,
h1 {
  color: #1d1d1f;
  font-size: 27px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.topbar p {
  margin-top: 5px;
  color: #6e6e73;
  font-size: 12px;
}

h2 {
  color: #1d1d1f;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.022em;
}

h3 {
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 650;
}

.section {
  margin-bottom: 22px;
}

.panel,
.detail-section,
.login-card,
.product-editor-section {
  border: 1px solid rgba(0, 0, 0, 0.065);
  border-radius: var(--radius-large);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  overflow: clip;
}

.panel-head,
.detail-section-head {
  min-height: 72px;
  padding: 20px 22px 14px;
  background: transparent;
  border-bottom-color: rgba(0, 0, 0, 0.07);
}

.panel-head .muted,
.detail-section-head .muted {
  margin-top: 4px;
  color: #86868b;
  font-size: 12px;
}

.metrics {
  gap: 16px;
}

.metric {
  min-height: 126px;
  max-height: none;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 252, 0.92));
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.metric span {
  color: #6e6e73;
  font-size: 12px;
  font-weight: 600;
}

.metric strong {
  margin-top: 14px;
  color: #1d1d1f;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.metric em {
  color: #86868b;
  font-size: 11px;
}

.metric[role="button"]:hover {
  border-color: rgba(0, 113, 227, 0.22);
  background: #fff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

button,
.row-action-link {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1d1d1f;
  font-weight: 500;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:hover,
.row-action-link:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
}

button:active,
.row-action-link:active {
  transform: scale(0.98);
}

.button.primary,
button.primary,
.table-pager .row-action.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.button.primary:hover,
button.primary:hover,
.table-pager .row-action.active:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 5px 14px rgba(0, 113, 227, 0.2);
}

button:disabled {
  border-color: transparent;
  background: #e8e8ed;
  color: #86868b;
  box-shadow: none;
}

.ghost {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: #424245;
}

input[type="search"],
.form-field input,
.form-field select,
.form-field textarea,
.login-card input,
select,
textarea {
  min-height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #1d1d1f;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

input::placeholder,
textarea::placeholder {
  color: #a1a1a6;
}

input[type="search"]:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.login-card input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.13);
}

.table-wrap {
  border-color: rgba(0, 0, 0, 0.075);
  border-radius: 16px;
  background: #fff;
}

.panel > .table-wrap {
  margin: 8px 18px 18px;
  width: calc(100% - 36px);
}

table {
  color: #1d1d1f;
}

th {
  height: 46px;
  background: #f5f5f7;
  color: #6e6e73;
  border-color: rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.005em;
}

td {
  min-height: 50px;
  padding-top: 13px;
  padding-bottom: 13px;
  color: #1d1d1f;
  border-color: rgba(0, 0, 0, 0.065);
}

tbody tr:nth-child(even) td,
tbody tr:nth-child(odd) td {
  background: #fff;
}

tbody tr.clickable-row:hover td,
tbody tr:hover td {
  background: #f7f7f9;
}

.orders-table-wrap .goofish-order-table thead th {
  background: rgba(245, 245, 247, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.status,
.method-badge,
.row-action {
  min-height: 27px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.status.info,
.status.cyan,
.status.blue,
.status.purple,
.method-badge.info,
.method-badge.cyan,
.method-badge.purple,
.row-action.info {
  border-color: rgba(0, 113, 227, 0.13);
  background: #eaf4ff;
  color: #0066cc;
}

.status.success,
.method-badge.success,
.row-action.success {
  border-color: rgba(36, 138, 61, 0.13);
  background: #edf8ef;
  color: #1b7f37;
}

.status.warn,
.status.unsynced,
.status.amber,
.method-badge.amber {
  border-color: rgba(181, 106, 0, 0.13);
  background: #fff6e5;
  color: #9a6700;
}

.status.danger,
.row-action.danger {
  border-color: rgba(215, 0, 21, 0.12);
  background: #fff0f1;
  color: #c70018;
}

.dashboard-chart,
.rank-list,
.todo-list {
  padding-left: 22px;
  padding-right: 22px;
}

.chart-bars {
  border-radius: 14px;
  background:
    linear-gradient(to top, transparent 24%, rgba(0, 0, 0, 0.035) 24% 25%, transparent 25% 49%, rgba(0, 0, 0, 0.035) 49% 50%, transparent 50% 74%, rgba(0, 0, 0, 0.035) 74% 75%, transparent 75%),
    #fbfbfd;
}

.chart-bar {
  background: linear-gradient(180deg, #7dc4ff, #d8edff);
  border-radius: 5px 5px 0 0;
}

.rank-no {
  border-radius: 9px;
  background: #f5f5f7;
  color: #6e6e73;
}

.todo-tabs button.active {
  border-color: #1d1d1f;
  background: #1d1d1f;
  color: #fff;
}

.drawer-backdrop {
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.order-drawer,
.order-drawer.center-modal,
.order-drawer.center-modal.wide-modal {
  border-color: rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-strong);
}

.drawer-head {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom-color: rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(20px);
}

.drawer-body,
.order-drawer.center-modal .drawer-body,
.order-drawer.center-modal.wide-modal .drawer-body {
  padding: 22px 24px 28px;
  background: #f5f5f7;
}

.detail-section {
  background: #fff;
}

.login-screen {
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 113, 227, 0.11), transparent 30%),
    radial-gradient(circle at 90% 85%, rgba(175, 82, 222, 0.09), transparent 32%),
    #f5f5f7;
}

.login-card {
  width: min(420px, 100%);
  padding: 38px;
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.12);
}

.login-card h1 {
  margin-top: 6px;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.product-editor-page {
  background: #f5f5f7;
}

.product-editor-page-head {
  background: rgba(245, 245, 247, 0.84);
  border-bottom-color: rgba(0, 0, 0, 0.07);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.product-editor-page-body {
  max-width: 1180px;
  margin: 0 auto;
}

.product-editor-section {
  padding: 22px;
}

.table-pager {
  background: rgba(255, 255, 255, 0.92);
  color: #6e6e73;
}

/* Compact 租管家-style product workspace. */
.inventory-toolbar {
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 10px;
  background: #fbfbfd;
}

.inventory-product-actions {
  width: 100%;
  margin: 0;
  justify-content: flex-start;
}

.inventory-product-actions > span {
  margin-left: 4px;
  margin-right: 0;
}

.inventory-filter-group {
  width: 100%;
  justify-content: flex-start;
}

.inventory-products-table,
.inventory-products-table th,
.inventory-products-table td,
.inventory-products-table strong,
.inventory-products-table button {
  font-size: 12px;
  font-weight: 400;
}

.inventory-products-table .inventory-product strong,
.inventory-products-table .inventory-price strong,
.inventory-products-table .inventory-stock-count strong {
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 400;
}

.inventory-products-table .inventory-product span,
.inventory-products-table .inventory-price span,
.inventory-products-table .inventory-stock-count span,
.inventory-products-table .inventory-warning,
.inventory-products-table .inventory-accessories-cell {
  font-size: 11px;
  font-weight: 400;
}

.inventory-product-master .inventory-product-thumb {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
}

.inventory-shelf-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a1a1a6;
  box-shadow: 0 0 0 3px rgba(161, 161, 166, 0.14);
  vertical-align: middle;
}

.inventory-shelf-dot.active {
  background: #34c759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.14);
}

.inventory-sn-back-context { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin:0 0 10px; }
.rental-workbench-editor .rental-create-panel > header .rental-order-created-at { display:block; margin-top:6px; color:var(--ds-secondary,#666); font-size:12px; line-height:20px; font-variant-numeric:tabular-nums; }
body :is(#rentalCreateForm,#rentalEditDrawerForm).rental-workbench-editor .rental-basic-note { display:grid; grid-template-columns:80px minmax(0,1fr); align-items:start; gap:12px; margin:16px 0 0; width:100%; }
body :is(#rentalCreateForm,#rentalEditDrawerForm).rental-workbench-editor .rental-basic-note > span { padding-top:10px; color:var(--ds-secondary,#666); font-size:13px; line-height:20px; }
body :is(#rentalCreateForm,#rentalEditDrawerForm).rental-workbench-editor .rental-basic-note > textarea { width:100%; min-width:0; min-height:40px; height:40px; max-height:160px; resize:vertical; box-sizing:border-box; padding:9px 12px; border:1px solid var(--ds-border,#e7e7e7); border-radius:5px; background:#fff; color:var(--ds-text,#333); font:inherit; font-size:13px; line-height:20px; }
body :is(#rentalCreateForm,#rentalEditDrawerForm).rental-workbench-editor .rental-basic-note > textarea:focus-visible { outline:2px solid #0052d91a; border-color:var(--ds-brand,#0052d9); }
@media(max-width:650px) { body :is(#rentalCreateForm,#rentalEditDrawerForm).rental-workbench-editor .rental-basic-note { grid-template-columns:1fr; gap:4px; } body :is(#rentalCreateForm,#rentalEditDrawerForm).rental-workbench-editor .rental-basic-note > span { padding-top:0; } }
.inventory-back-button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:4px 10px; border:1px solid var(--ds-border,#e7e7e7); border-radius:5px; background:#fff; color:var(--ds-text,#333); font:inherit; font-size:12px; line-height:20px; cursor:pointer; box-shadow:none; }
.inventory-back-button:hover { border-color:var(--ds-brand,#0052d9); color:var(--ds-brand,#0052d9); background:#f5f8ff; }
.inventory-back-button:focus-visible { outline:2px solid var(--ds-brand,#0052d9); outline-offset:2px; }
.inventory-back-scope { font-size:12px; color:var(--ds-secondary,#666); line-height:20px; overflow-wrap:anywhere; }
.inventory-sn-back-context.hidden { display:none; }

.inventory-shelf-dot.offline {
  background: #a1a1a6;
}

.product-editor-page {
  margin-bottom: 22px;
  background: transparent;
}

.product-editor-page-head {
  position: relative;
  min-height: 76px;
  padding: 16px 22px;
  border: 1px solid rgba(0, 0, 0, 0.065);
  border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.product-editor-page-body {
  width: 100%;
  max-width: none;
  padding: 16px 0 0;
}

.product-editor-page .product-editor {
  gap: 16px;
}

.product-editor-page .product-editor-section {
  border-radius: 18px;
}

@media (min-width: 1500px) {
  .app {
    padding-right: 44px;
    padding-left: 44px;
  }

  .topbar {
    margin-right: -44px;
    margin-left: -44px;
    padding-right: 44px;
    padding-left: 44px;
  }
}

@media (max-width: 1100px) {
  .app {
    padding: 22px;
  }

  .topbar {
    margin: -22px -22px 22px;
    padding: 14px 22px;
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 9px 10px;
    background: rgba(250, 250, 252, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .app {
    padding: 14px;
  }

  .topbar {
    position: static;
    margin: -14px -14px 16px;
    padding: 16px 14px 12px;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric {
    min-height: 114px;
    padding: 16px;
  }

  .metrics .metric:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .panel,
  .detail-section,
  .login-card {
    border-radius: 18px;
  }

  .panel-head {
    padding: 17px 16px 12px;
  }

  .panel > .table-wrap {
    margin: 6px 10px 12px;
    width: calc(100% - 20px);
  }

  .order-drawer.center-modal,
  .order-drawer.center-modal.wide-modal {
    width: calc(100vw - 18px);
    max-width: calc(100vw - 18px);
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* 商品 & SN：按租赁库存工作台的紧凑信息结构展示 */
.inventory-products-table {
  min-width: 1120px;
  table-layout: fixed;
}

.inventory-products-table th:nth-child(1) { width: 42px; }
.inventory-products-table th:nth-child(2) { width: 190px; }
.inventory-products-table th:nth-child(3) { width: 220px; }
.inventory-products-table th:nth-child(4) { width: 90px; text-align: center; }
.inventory-products-table th:nth-child(5),
.inventory-products-table th:nth-child(6),
.inventory-products-table th:nth-child(7),
.inventory-products-table th:nth-child(8) { width: 72px; text-align: center; }
.inventory-products-table th:nth-child(9) { width: 82px; text-align: center; }
.inventory-products-table th:nth-child(10) { width: 92px; }
.inventory-products-table th:nth-child(11) { width: 108px; }

.inventory-number-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.inventory-products-table th,
.inventory-products-table td {
  border-right: 0;
}

.inventory-products-table td:nth-child(4),
.inventory-products-table td:nth-child(9) {
  text-align: center;
}

.inventory-link-actions {
  justify-content: flex-start;
  gap: 10px;
  white-space: nowrap;
}

.inventory-link-actions button,
.inventory-text-action {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 2px 7px;
  color: #1677ff;
  font: inherit;
  line-height: 1.4;
  cursor: pointer;
}

.inventory-link-actions button:first-child {
  padding-left: 0;
}

.inventory-link-actions button:hover,
.inventory-text-action:hover {
  color: #0958d9;
  text-decoration: underline;
}

#equipmentSnPanel .inventory-table {
  min-width: 1320px;
  table-layout: fixed;
  font-size: 12px;
}

#equipmentSnPanel .inventory-table th:nth-child(1) { width: 42px; }
#equipmentSnPanel .inventory-table th:nth-child(2) { width: 150px; }
#equipmentSnPanel .inventory-table th:nth-child(3) { width: 120px; }
#equipmentSnPanel .inventory-table th:nth-child(4) { width: 92px; }
#equipmentSnPanel .inventory-table th:nth-child(5) { width: 300px; }
#equipmentSnPanel .inventory-table th:nth-child(6) { width: 100px; }
#equipmentSnPanel .inventory-table th:nth-child(7) { width: 100px; }
#equipmentSnPanel .inventory-table th:nth-child(8) { width: 120px; }
#equipmentSnPanel .inventory-table th:nth-child(9) { width: 130px; }
#equipmentSnPanel .inventory-table th:nth-child(10) { width: 110px; }

#equipmentSnPanel .inventory-table th,
#equipmentSnPanel .inventory-table td {
  border-right: 0;
  font-weight: 400;
}

#equipmentSnPanel .inventory-table thead th {
  height: 42px;
  background: #f7f8fa;
  color: #303133;
  font-weight: 500;
}

#equipmentSnPanel .inventory-table tbody td {
  height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
  vertical-align: middle;
}

#equipmentSnActions {
  order: 0;
}

#equipmentSnActions .button.primary {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 6px;
}

.inventory-sn-query-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inventory-sn-query-actions .button,
.inventory-sn-query-actions .ghost {
  min-height: 36px;
  padding: 0 14px;
}

.inventory-sn-code {
  color: #25324b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.inventory-sn-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.inventory-sn-status i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #8e8e93;
}

.inventory-sn-status i.available { background: #34c759; }
.inventory-sn-status i.rented { background: #f5a623; }
.inventory-sn-status i.service { background: #8b5cf6; }
.inventory-sn-status i.offline { background: #ff3b30; }

#equipmentSnPanel .inventory-product {
  gap: 10px;
}

#equipmentSnPanel .inventory-product-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
}

#equipmentSnPanel .inventory-product strong {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

#equipmentSnPanel .inventory-product span {
  margin-top: 2px;
  color: #7b8190;
  font-size: 11px;
}

#equipmentSnPanel .inventory-link-actions button + button::before {
  margin-right: 9px;
  color: #c7cbd1;
  content: "|";
}

.inventory-products-table .inventory-link-actions button + button::before {
  margin-right: 9px;
  color: #c7cbd1;
  content: "|";
}

.inventory-toolbar input[type="search"].equipment-sn-search-compact {
  width: 160px;
  min-width: 160px;
}

.inventory-filter-field {
  display: grid;
  position: relative;
  gap: 5px;
  color: #6e6e73;
  font-size: 11px;
}

.inventory-filter-group {
  align-items: flex-end;
}

.inventory-filter-field > span {
  height: 14px;
  line-height: 14px;
  text-align: center;
}

.inventory-filter-field > input,
.inventory-filter-field > select,
.inventory-filter-group > select,
.inventory-status-filter > summary {
  box-sizing: border-box;
  height: 36px;
}

.inventory-sn-query-actions {
  align-self: flex-end;
}

.inventory-filter-field > select,
.inventory-status-filter > summary {
  min-width: 140px;
  min-height: 36px;
}

.inventory-status-filter {
  position: relative;
}

.inventory-status-filter > summary {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.inventory-status-filter > summary::-webkit-details-marker {
  display: none;
}

.inventory-status-filter > summary::after {
  position: absolute;
  right: 14px;
  content: "⌄";
  color: #6e6e73;
}

.inventory-status-filter-menu {
  display: grid;
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .14);
}

.inventory-status-filter-menu button {
  display: flex;
  min-height: 34px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 7px 12px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.inventory-status-filter-menu button:last-child {
  border-bottom: 0;
}

.inventory-status-filter-menu button:hover {
  background: #f5f8ff;
}

.equipment-sn-status-form {
  min-width: min(420px, 72vw);
}

/* 配件管理与商品库存页保持同一套信息层级和操作密度 */
.accessory-products-table {
  min-width: 1120px;
  table-layout: fixed;
}

.accessory-products-table th:nth-child(1) { width: 42px; }
.accessory-products-table th:nth-child(2) { width: 190px; }
.accessory-products-table th:nth-child(3) { width: 220px; }
.accessory-products-table th:nth-child(4) { width: 90px; text-align: center; }
.accessory-products-table th:nth-child(5),
.accessory-products-table th:nth-child(6),
.accessory-products-table th:nth-child(7),
.accessory-products-table th:nth-child(8) { width: 72px; text-align: center; }
.accessory-products-table th:nth-child(9) { width: 82px; text-align: center; }
.accessory-products-table th:nth-child(10) { width: 92px; }
.accessory-products-table th:nth-child(11) { width: 108px; }

.accessory-products-table th,
.accessory-products-table td,
.accessory-stock-table th,
.accessory-stock-table td {
  border-right: 0;
}

.accessory-products-table td:nth-child(4),
.accessory-products-table td:nth-child(9) {
  text-align: center;
}

.accessory-stock-table {
  min-width: 1320px;
  table-layout: fixed;
  font-size: 12px;
}

.accessory-stock-table th:nth-child(1) { width: 42px; }
.accessory-stock-table th:nth-child(2) { width: 150px; }
.accessory-stock-table th:nth-child(3) { width: 125px; }
.accessory-stock-table th:nth-child(4) { width: 250px; }
.accessory-stock-table th:nth-child(5) { width: 90px; }
.accessory-stock-table th:nth-child(6) { width: 100px; }
.accessory-stock-table th:nth-child(7) { width: 110px; }
.accessory-stock-table th:nth-child(8) { width: 110px; }
.accessory-stock-table th:nth-child(9) { width: 130px; }
.accessory-stock-table th:nth-child(10) { width: 180px; }

.accessory-stock-table thead th {
  height: 42px;
  background: #f7f8fa;
  color: #303133;
  font-weight: 500;
}

.accessory-stock-table tbody td {
  height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
  vertical-align: middle;
}

#accessoryStockActions { order: 0; }

#accessoryStockActions .button.primary {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 6px;
}

.accessory-stock-table .inventory-link-actions button + button::before {
  margin-right: 9px;
  color: #c7cbd1;
  content: "|";
}

.rental-product-editor {
  width: 100%;
}

.rental-product-form {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.rental-product-form-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.rental-product-form-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

.rental-product-form-head span {
  color: var(--muted);
  font-size: 12px;
}

.rental-product-form-row {
  display: grid;
  grid-template-columns: 112px minmax(220px, 560px);
  align-items: center;
  gap: 14px;
  min-height: 54px;
  margin: 0;
  padding: 7px 20px;
  border-bottom: 1px solid #eef0f3;
}

.rental-product-form-row:last-child {
  border-bottom: 0;
}

.rental-product-form-row > span {
  color: #3a3a3c;
  font-size: 13px;
  text-align: right;
}

.rental-product-form-row.required > span::before {
  margin-right: 4px;
  color: #ff3b30;
  content: "*";
}

.rental-product-form-row input:not([type="file"]),
.rental-product-form-row select,
.rental-product-form-row textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 9px 11px;
  color: var(--ink);
  font: inherit;
}

.rental-product-form-row textarea {
  min-height: 68px;
  resize: vertical;
}

.rental-product-image-row {
  align-items: start;
  padding-top: 16px;
  padding-bottom: 16px;
}

.rental-product-category-fields {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(160px, 260px);
  gap: 10px;
}

.rental-product-image-row > span {
  padding-top: 5px;
}

.rental-product-image-row .product-image-editor {
  width: max-content;
  align-items: flex-start;
}

.rental-product-image-row .product-image-preview {
  width: 128px;
  height: 128px;
}

.rental-product-image-row .product-image-editor p {
  text-align: left;
}

.rental-product-image-row .product-image-editor.is-dragging .product-image-preview {
  border-color: #1677ff;
  background: #eef6ff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.12);
}

.rental-product-paired-fields {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 22px;
}

.rental-product-paired-fields > select {
  width: 100%;
}

.rental-product-required-label::before {
  margin-right: 4px;
  color: #ff3b30;
  content: "*";
}

.rental-product-paired-fields > label {
  display: grid;
  grid-template-columns: 58px minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
}

.rental-product-paired-fields > label > span {
  color: #3a3a3c;
  font-size: 13px;
  text-align: right;
}

.rental-product-stock-layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #eef0f3;
  background: #fafbfc;
}

.rental-product-stock-fields {
  overflow: hidden;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
}

.rental-product-compact-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 10px;
  border-bottom: 1px solid #edf0f3;
}

.rental-product-compact-row:last-child { border-bottom: 0; }
.rental-product-compact-row > span { color: #3a3a3c; font-size: 12px; text-align: right; }
.rental-product-compact-row.required > span::before { margin-right: 3px; color: #ff3b30; content: "*"; }
.rental-product-compact-row input,
.rental-product-compact-row textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  padding: 7px 9px;
  color: var(--ink);
  font: inherit;
}

.rental-product-compact-row .rental-product-input-unit,
.rental-product-compact-row .rental-product-input-unit input { width: 100%; max-width: none; }
.rental-product-compact-row .rental-product-input-unit { position: relative; }
.rental-product-compact-row .rental-product-input-unit input { padding-right: 48px; }
.rental-product-compact-row .rental-product-input-unit em { position: absolute; right: 9px; pointer-events: none; }
.rental-product-accessories-row { align-items: start; }
.rental-product-accessories-row > span { padding-top: 8px; }
.rental-product-accessories-row textarea { min-height: 72px; resize: vertical; }

.rental-product-sn-editor {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
}

.rental-product-sn-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #dce5ee;
}

.rental-product-sn-head strong { font-size: 14px; font-weight: 500; }
.rental-product-sn-head span { color: var(--muted); font-size: 12px; }
.rental-product-sn-table { overflow-x: auto; }

.rental-product-sn-header,
.rental-product-sn-row {
  display: grid;
  grid-template-columns: minmax(105px, .8fr) 82px minmax(105px, .8fr) 92px minmax(115px, .95fr) 90px 116px minmax(105px, .85fr);
  min-width: 860px;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
}

.rental-product-sn-header {
  background: #eaf6ff;
  color: #4c5968;
  font-size: 12px;
}

.rental-product-sn-row { border-top: 1px solid #edf0f3; }
.rental-product-sn-row input,
.rental-product-sn-row select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  padding: 5px 7px;
  color: var(--ink);
  font: inherit;
}

.rental-product-sn-code { display: flex; align-items: center; gap: 4px; }
.rental-product-sn-code button { flex: 0 0 auto; border: 0; background: transparent; color: #1677ff; font: inherit; font-size: 12px; white-space: nowrap; }
.rental-product-sn-code input[readonly] { background: #f7f8fa; color: #555b64; }
.rental-product-sn-rented { display: flex; flex-direction: column; gap: 1px; color: #1677ff; }
.rental-product-sn-rented small { color: var(--muted); font-size: 10px; }
.rental-product-sn-note-cell { min-width: 0; }
.rental-product-sn-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 8px 9px 10px; }
.rental-product-sn-actions .ghost { border-color: #1677ff; color: #1677ff; }
.rental-product-sn-actions small { color: var(--muted); font-size: 11px; }
#equipmentProductEditorForm .rental-product-submit-actions { justify-content:center; }
#equipmentProductEditorForm .rental-product-sn-header { text-align:center; }
#equipmentProductSaveButton { background:#1677ff; color:#fff; border:1px solid #1677ff; min-width:96px; }

.accessory-product-sn-table .rental-product-sn-header,
.accessory-product-sn-table .rental-product-sn-row {
  grid-template-columns: minmax(135px, 1fr) 90px 110px 100px 120px 125px minmax(130px, 1fr);
  min-width: 850px;
}

.rental-product-submit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
}

.rental-product-input-unit {
  display: flex;
  align-items: center;
  gap: 9px;
}

.rental-product-input-unit input {
  max-width: 260px;
}

.rental-product-input-unit em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .rental-product-form-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 14px 16px;
  }

  .rental-product-form-row > span {
    text-align: left;
  }

  .rental-product-paired-fields,
  .rental-product-category-fields,
  .rental-product-paired-fields > label {
    grid-template-columns: 1fr;
  }

  .rental-product-paired-fields > label > span { text-align: left; }

  .rental-product-stock-layout {
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }
}

/* Shared product/accessory entry layout: scan basic info first, stock second. */
.product-editor-page .product-entry-form {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px 24px;
  padding: 22px 24px;
  overflow: visible;
}

.product-editor-page:has(.product-entry-form) {
  max-width: 1240px;
  margin-right: auto;
  margin-left: auto;
}

.product-entry-form > .rental-product-form-head {
  grid-column: 1 / -1;
  margin: -22px -24px 2px;
  padding: 17px 24px;
}

.product-entry-form > .rental-product-form-row {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  border: 0;
}

.product-entry-form > .rental-product-form-row > span,
.product-entry-form .rental-product-paired-fields > label > span {
  color: var(--ui-text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.product-entry-form > .rental-product-category-row { grid-column: 2; grid-row: 2; }
.product-entry-form > .rental-product-form-row:has(> [data-field="name"]) { grid-column: 3; grid-row: 2; }
.product-entry-form > .rental-product-paired-row { grid-column: 2 / 4; grid-row: 3; }
.product-entry-form > .rental-product-form-row:has(> [data-field="isActive"]) { grid-column: 2; grid-row: 4; }
.product-entry-form > .rental-product-form-row:has(> [data-field="note"]) { grid-column: 3; grid-row: 4; }
.product-entry-form > .rental-product-image-row { grid-column: 1; grid-row: 2 / 5; }

.product-entry-form .rental-product-category-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-entry-form .rental-product-category-fields > :only-child { grid-column: 1 / -1; }

.product-entry-form .rental-product-paired-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.product-entry-form .rental-product-paired-fields > label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.product-entry-form .rental-product-input-unit input { max-width: none; }
.product-entry-form > .rental-product-form-row:has(> [data-field="note"]) textarea { min-height: 42px; }

.product-entry-form > .rental-product-image-row {
  min-height: 248px;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  background: #f8fafc;
}

.product-entry-form .rental-product-image-row .product-image-editor {
  width: 100%;
  align-items: center;
}

.product-entry-form .rental-product-image-row .product-image-preview {
  width: 144px;
  height: 144px;
}

.product-entry-form .rental-product-image-row .product-image-editor p {
  max-width: 180px;
  line-height: 1.45;
  text-align: center;
}

.product-entry-form > .rental-product-stock-layout {
  grid-column: 1 / -1;
  grid-row: 5;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.product-entry-form .rental-product-stock-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 18px;
  padding: 18px 20px;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
}

.product-entry-form .rental-product-stock-fields::before {
  grid-column: 1 / -1;
  color: var(--ui-text);
  content: "租金与库存设置";
  font-size: 14px;
  font-weight: 600;
}

.product-entry-form .rental-product-compact-row {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  border: 0;
}

.product-entry-form .rental-product-compact-row > span {
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.product-entry-form .rental-product-accessories-row { grid-column: span 2; }
.product-entry-form .rental-product-accessories-row > span { padding-top: 0; }
.product-entry-form .rental-product-accessories-row textarea {
  min-height: 40px;
  height: 40px;
  max-height: 40px;
  resize: none;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}
.product-entry-form .rental-product-sn-editor { width: 100%; }
.product-entry-form .rental-product-sn-head { padding: 14px 16px; }
.product-entry-form .rental-product-sn-header,
.product-entry-form .rental-product-sn-row { min-width: 880px; }
.product-entry-form > .rental-product-submit-actions {
  grid-column: 1 / -1;
  grid-row: 6;
  justify-content: flex-end;
  padding: 2px 0 0;
}

@media (max-width: 1180px) {
  .product-entry-form .rental-product-stock-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-entry-form .rental-product-accessories-row { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .product-editor-page .product-entry-form { grid-template-columns: 220px minmax(0, 1fr); }
  .product-entry-form > .rental-product-image-row { grid-column: 1; grid-row: 2 / 5; }
  .product-entry-form > .rental-product-category-row { grid-column: 2; grid-row: 2; }
  .product-entry-form > .rental-product-form-row:has(> [data-field="name"]) { grid-column: 2; grid-row: 3; }
  .product-entry-form > .rental-product-form-row:has(> [data-field="isActive"]) { grid-column: 2; grid-row: 4; }
  .product-entry-form > .rental-product-paired-row { grid-column: 1 / -1; grid-row: 5; }
  .product-entry-form > .rental-product-form-row:has(> [data-field="note"]) { grid-column: 1 / -1; grid-row: 6; }
  .product-entry-form > .rental-product-stock-layout { grid-row: 7; }
  .product-entry-form > .rental-product-submit-actions { grid-row: 8; }
}

@media (max-width: 680px) {
  .product-editor-page .product-entry-form { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .product-entry-form > .rental-product-form-head { margin: -16px -16px 2px; }
  .product-entry-form > .rental-product-category-row,
  .product-entry-form > .rental-product-form-row:has(> [data-field="name"]),
  .product-entry-form > .rental-product-form-row:has(> [data-field="isActive"]),
  .product-entry-form > .rental-product-form-row:has(> [data-field="note"]),
  .product-entry-form > .rental-product-image-row,
  .product-entry-form > .rental-product-paired-row,
  .product-entry-form > .rental-product-stock-layout,
  .product-entry-form > .rental-product-submit-actions { grid-column: 1; grid-row: auto; }
  .product-entry-form > .rental-product-image-row { min-height: 0; }
  .product-entry-form .rental-product-stock-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-entry-form .rental-product-accessories-row { grid-column: 1 / -1; }
  .product-entry-form .rental-product-category-fields { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .product-entry-form .rental-product-stock-fields,
  .product-entry-form .rental-product-paired-fields { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .rental-product-stock-layout { grid-template-columns: 1fr; }
}

/* Product and accessory editors follow the same top-to-bottom basic-info flow. */
.product-editor-page .product-entry-form {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.product-entry-form > .product-entry-overview,
.product-entry-form > .rental-product-stock-layout,
.product-entry-form > .rental-product-submit-actions {
  grid-column: 1;
  grid-row: auto;
}
.product-entry-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  background: var(--ui-surface-muted, #f8fafc);
}
.product-entry-overview > .rental-product-form-row {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  border: 0;
}
.product-entry-overview .rental-product-form-row > span,
.product-entry-overview .rental-product-paired-fields > label > span {
  color: var(--ui-text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}
.product-entry-overview > .rental-product-form-row > span {
  padding-top: 0;
}
.product-entry-form .product-entry-overview .rental-product-image-row .product-image-editor {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 128px;
  max-width: 100%;
  align-items: flex-start;
}
.product-entry-form .product-entry-overview .rental-product-image-row .product-image-preview {
  width: 128px;
  height: 128px;
}
.product-entry-overview .product-image-upload-button {
  width: 128px;
  box-sizing: border-box;
  justify-content: center;
}
.product-entry-form .product-entry-overview .rental-product-image-row .product-image-editor p {
  max-width: 128px;
  text-align: left;
  line-height: 1.6;
}
.product-entry-overview .product-image-editor:focus-visible {
  outline: 2px solid var(--ui-primary, #2563eb);
  outline-offset: 3px;
  border-radius: 8px;
}
.product-entry-attributes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0 0;
  border-top: 1px solid var(--ui-border);
}
.product-entry-attributes h4 {
  margin: 0;
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 600;
}
.product-entry-attribute-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  min-width: 0;
  padding: 0;
}
.product-entry-attributes .rental-product-form-row,
.product-entry-attributes .product-entry-attribute-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  min-width: 0;
  width: 100%;
  align-items: stretch;
}
.product-entry-attributes .rental-product-category-fields {
  display: block;
  width: 100%;
  max-width: none;
}
.product-entry-attributes .product-option-picker,
.product-entry-attributes .product-option-picker summary,
.product-entry-attributes .product-entry-attribute-field > .rental-product-input-unit,
.product-entry-attributes .rental-product-form-row > select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.product-entry-attributes .product-option-picker summary,
.product-entry-attributes .rental-product-form-row > select,
.product-entry-attributes .product-entry-attribute-field input:not([type="file"]),
.product-entry-overview > .rental-product-form-row > input {
  min-height: 40px;
}
.product-entry-attributes .product-entry-attribute-field > span {
  color: var(--ui-text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}
.product-entry-attributes .product-entry-attribute-field input:not([type="file"]) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 9px 11px;
  color: var(--ink);
  font: inherit;
}
.product-entry-attributes .product-entry-attribute-field.required > span::before { margin-right: 4px; color: #ff3b30; content: "*"; }
.product-entry-overview > .rental-product-form-row textarea { min-height: 72px; }
.product-entry-form > .rental-product-stock-layout {
  margin-top: 20px;
  padding-top: 0;
  border-top: 0;
}
.product-entry-form .rental-product-stock-fields {
  border-color: var(--ui-border);
  background: var(--ui-surface-muted, #f8fafc);
  padding: 20px 22px;
  gap: 18px 24px;
}
.product-entry-form .rental-product-stock-fields::before {
  padding-bottom: 4px;
  font-size: 14px;
}
.product-entry-form .rental-product-sn-editor {
  overflow: hidden;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  background: var(--ui-surface, #fff);
}
.product-entry-form .rental-product-sn-head {
  padding: 17px 20px;
  border-bottom: 1px solid var(--ui-border);
}
.product-entry-form > .rental-product-submit-actions {
  margin-top: 20px;
  padding: 20px 0 0;
  border-top: 1px solid var(--ui-border);
}
@media (max-width: 760px) {
  .product-entry-overview { padding: 16px; }
}
@media (max-width: 600px) {
  .product-entry-attribute-grid { grid-template-columns: minmax(0, 1fr); }
  .product-entry-form .product-entry-overview .rental-product-image-row .product-image-editor { width: 108px; }
  .product-entry-form .product-entry-overview .rental-product-image-row .product-image-preview { width: 108px; height: 108px; }
  .product-entry-overview .product-image-upload-button,
  .product-entry-form .product-entry-overview .rental-product-image-row .product-image-editor p { width: 108px; }
}
.rental-combined-picker .rental-sn-picker-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  align-items: center;
}
.rental-combined-picker .rental-sn-picker-item > span:last-child {
  text-align: right;
  white-space: nowrap;
}
.rental-combined-picker .rental-product-picker-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.inventory-shelf-dot.offline {
  background: #ff3b30;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.14);
}

.inventory-shelf-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.inventory-toolbar select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%236e6e73' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
}

.product-image-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.product-image-upload-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  padding: 0 13px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.order-drawer.center-modal.equipment-sn-modal {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(92vh, 880px);
}

.order-drawer.center-modal.equipment-sn-modal .drawer-body {
  max-height: calc(min(92vh, 880px) - 72px);
  padding: 0 22px 22px;
}

.order-drawer.center-modal.equipment-sn-modal .drawer-head {
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
}

.order-drawer.center-modal.equipment-sn-modal .drawer-head h2 {
  font-size: 20px;
}

.order-drawer.center-modal.equipment-sn-modal .drawer-head-actions {
  display: none;
}

.equipment-sn-create {
  padding-top: 34px;
}

.equipment-sn-create-product {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 34px;
}

.equipment-sn-create-product strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
}

.equipment-sn-create-product span {
  color: var(--muted);
  font-size: 16px;
}

.equipment-sn-create-workspace {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.equipment-sn-spec-card > strong {
  display: block;
  height: 43px;
  box-sizing: border-box;
  padding: 10px 14px;
  color: #4a4f58;
  font-size: 16px;
  font-weight: 600;
}

.equipment-sn-spec-card > div {
  display: flex;
  width: 170px;
  height: 230px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f7f7f8;
}

.equipment-sn-spec-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.equipment-sn-spec-card span {
  color: #a2a6ad;
  font-size: 12px;
}

.equipment-sn-create-editor {
  border: 0;
  border-radius: 0;
}

.equipment-sn-create-editor .rental-product-sn-table {
  overflow-x: auto;
}

.equipment-sn-create-editor .rental-product-sn-header,
.equipment-sn-create-editor .rental-product-sn-row {
  grid-template-columns: minmax(140px, .9fr) 105px 130px 110px minmax(140px, 1fr) 110px 135px minmax(130px, .9fr);
  min-width: 1040px;
  gap: 10px;
  padding: 10px 14px;
}

.equipment-sn-create-editor .rental-product-sn-header {
  height: 43px;
  box-sizing: border-box;
  background: transparent;
  border-bottom: 1px solid var(--line);
  color: #555b64;
  font-size: 14px;
}

.equipment-sn-create-editor .rental-product-sn-row {
  min-height: 62px;
  border-top: 0;
  border-bottom: 1px solid #edf0f3;
}

.equipment-sn-create-editor .rental-product-sn-row input,
.equipment-sn-create-editor .rental-product-sn-row select {
  min-height: 38px;
  border-radius: 6px;
  font-size: 14px;
}

.equipment-sn-create-editor .rental-product-sn-code button,
.equipment-sn-create-editor .inventory-text-action {
  font-size: 14px;
}

.equipment-sn-add-row {
  justify-content: center;
  padding: 20px 0 0;
}

.equipment-sn-add-row .ghost {
  min-height: 38px;
  border-color: #1677ff;
  color: #1677ff;
}

.equipment-sn-create-actions {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 92px;
}

.equipment-sn-create-actions .button,
.equipment-sn-create-actions .ghost {
  min-width: 82px;
  min-height: 48px;
  font-size: 16px;
}

.equipment-sn-create.is-editing-sn .equipment-sn-add-row,
.equipment-sn-create.is-editing-sn [data-action="save-equipment-batch"],
.equipment-sn-create.is-editing-sn [data-action="save-accessory-batch"] {
  display: none !important;
}

.equipment-sn-create.is-editing-sn .equipment-sn-create-actions {
  margin-top: 36px;
}

@media (max-width: 880px) {
  .equipment-sn-create-workspace {
    grid-template-columns: 1fr;
  }

  .equipment-sn-spec-card > div {
    width: 140px;
    height: 140px;
  }

  .equipment-sn-create-actions {
    margin-top: 36px;
  }
}

.order-drawer.center-modal.equipment-sn-print-modal {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(92vh, 900px);
}

.order-drawer.center-modal.equipment-sn-print-modal .drawer-body {
  max-height: calc(min(92vh, 900px) - 72px);
  padding: 22px;
}

.order-drawer.center-modal.equipment-sn-print-modal .drawer-head-actions {
  display: none;
}

.equipment-sn-print-toolbar {
  display: grid;
  grid-template-columns: 220px 220px 180px 1fr;
  align-items: end;
  gap: 14px;
}

.equipment-sn-print-toolbar > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #667085;
  font-size: 13px;
}

.equipment-sn-print-toolbar select,
.equipment-sn-copy-stepper {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
}

.equipment-sn-print-toolbar select {
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.equipment-sn-copy-stepper {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  overflow: hidden;
}

.equipment-sn-copy-stepper button,
.equipment-sn-copy-stepper input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  font: inherit;
}

.equipment-sn-copy-stepper button {
  color: #7b8190;
  font-size: 20px;
  cursor: pointer;
}

.equipment-sn-copy-stepper input {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.equipment-sn-print-toolbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

.equipment-sn-print-toolbar-actions .button,
.equipment-sn-print-toolbar-actions .ghost {
  min-width: 94px;
  min-height: 44px;
}

.equipment-sn-print-notice {
  margin-top: 18px;
  border: 1px solid #ffd591;
  border-radius: 8px;
  background: #fff8e8;
  padding: 14px 16px;
  color: #c77700;
  font-size: 13px;
}

.equipment-sn-print-summary {
  margin: 18px 0 10px;
  color: #7b8798;
  font-size: 13px;
}

.equipment-sn-label-preview {
  display: flex;
  min-height: 250px;
  align-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  border-radius: 10px;
  background: #f2f5f9;
  padding: 22px;
}

.equipment-sn-label {
  display: flex;
  width: 160px;
  height: 120px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  color: #111;
}

.equipment-sn-label strong {
  width: 100%;
  overflow: hidden;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-sn-label img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.equipment-sn-label span {
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .equipment-sn-print-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .equipment-sn-print-toolbar-actions {
    justify-content: flex-start;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  #orderDrawer.equipment-sn-print-modal,
  #orderDrawer.equipment-sn-print-modal * {
    visibility: visible !important;
  }

  #orderDrawer.equipment-sn-print-modal {
    position: static !important;
    width: auto !important;
    max-height: none !important;
    transform: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #orderDrawer.equipment-sn-print-modal .drawer-head,
  .equipment-sn-print-toolbar,
  .equipment-sn-print-notice,
  .equipment-sn-print-summary {
    display: none !important;
  }

  #orderDrawer.equipment-sn-print-modal .drawer-body {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .equipment-sn-label-preview {
    display: block !important;
    min-height: 0 !important;
    background: transparent !important;
    padding: 0 !important;
  }

  .equipment-sn-label {
    width: 40mm !important;
    height: 30mm !important;
    break-after: page;
    border: 0 !important;
    border-radius: 0 !important;
    page-break-after: always;
  }

  .equipment-sn-label:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}

/* 租管家式后台 UI 规范 v1.0
   后续全站视觉调整优先修改这一组变量和公共组件，不再逐页覆盖。 */
:root {
  --ui-primary: #1677ff;
  --ui-primary-hover: #0958d9;
  --ui-primary-soft: #eaf3ff;
  --ui-page: #f5f7fa;
  --ui-surface: #ffffff;
  --ui-text: #1f2329;
  --ui-text-secondary: #646a73;
  --ui-text-tertiary: #8f959e;
  --ui-border: #e5e8ed;
  --ui-border-strong: #d8dde5;
  --ui-success: #22a06b;
  --ui-warning: #f59e0b;
  --ui-danger: #e5484d;
  --ui-info: #1677ff;
  --ui-cyan: #13a8a8;
  --ui-sidebar-width: 216px;
  --ui-control-height: 34px;
  --ui-row-height: 52px;
  --ui-radius: 8px;
  --ui-space: 8px;

  --bg: var(--ui-page);
  --panel: var(--ui-surface);
  --ink: var(--ui-text);
  --muted: var(--ui-text-secondary);
  --line: var(--ui-border);
  --line-strong: var(--ui-border-strong);
  --accent: var(--ui-primary);
  --accent-hover: var(--ui-primary-hover);
  --accent-soft: var(--ui-primary-soft);
  --radius-large: 10px;
  --radius-medium: 8px;
  --radius-small: 6px;
  --shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
}

body {
  background: var(--ui-page);
  color: var(--ui-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

.shell {
  background: var(--ui-page);
}

.sidebar {
  flex: 0 0 var(--ui-sidebar-width);
  width: var(--ui-sidebar-width);
  padding: 16px 12px;
  background: #fbfcfe;
  border-right: 1px solid var(--ui-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand {
  min-height: 48px;
  margin: 0 4px 14px;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--ui-border);
}

.brand-mark,
.login-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--ui-radius);
  background: var(--ui-primary);
  box-shadow: none;
}

.brand strong { font-size: 14px; font-weight: 600; }
.brand small { color: var(--ui-text-tertiary); font-size: 11px; }

.nav-menu { gap: 4px; }
.nav-group { gap: 3px; }

.nav-menu .nav-direct,
.nav-menu .nav-title,
.nav-menu a,
.nav-menu button:not(.nav-title) {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  background: transparent;
  color: #3d424a;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  letter-spacing: 0;
}

.nav-menu .nav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #3d424a;
}

.nav-title::after {
  color: var(--ui-text-tertiary);
  font-size: 12px;
}

.nav-children {
  gap: 2px;
  padding: 0 0 2px 12px;
}

.nav-children button {
  color: var(--ui-text-secondary) !important;
  font-size: 13px !important;
}

.nav-menu a:hover,
.nav-menu button:hover,
.nav-menu button:not(.nav-title):hover {
  background: #f0f2f5;
  color: var(--ui-text);
}

.nav-menu a.active,
.nav-menu button.active,
.nav-menu button.active:not(.nav-title),
.nav-group.is-current > .nav-title {
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
  font-weight: 500;
}

.app {
  padding: 20px 24px 40px;
  background: var(--ui-page);
}

.topbar {
  min-height: 64px;
  margin: -20px -24px 20px;
  padding: 11px 24px 10px;
  background: rgba(245, 247, 250, 0.94);
  border-bottom: 1px solid var(--ui-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar h1,
h1 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0;
}

.topbar p { margin-top: 2px; color: var(--ui-text-tertiary); font-size: 12px; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: 0; }
h3 { font-size: 15px; font-weight: 600; }
.section { margin-bottom: 16px; }

.panel,
.detail-section,
.product-editor-section,
.rental-product-form {
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  background: var(--ui-surface);
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 68px;
  padding: 16px 18px 12px;
  border-bottom: 0;
}

.panel-head .muted { color: var(--ui-text-tertiary); font-size: 12px; }

.page-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 49px;
  overflow-x: auto;
  padding: 0 18px;
  border-bottom: 1px solid var(--ui-border);
  scrollbar-width: none;
}

.page-tabs::-webkit-scrollbar { display: none; }

.page-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  padding: 0 2px;
  background: transparent;
  color: var(--ui-text-secondary);
  font-size: 14px;
  font-weight: 400;
}

.page-tabs button:hover { color: var(--ui-primary); background: transparent; }

.page-tabs button.active {
  color: var(--ui-primary);
  font-weight: 500;
}

.page-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--ui-primary);
}

button,
.button,
input,
select,
textarea {
  font: inherit;
}

button,
.button,
.ghost {
  min-height: var(--ui-control-height);
  border-radius: 6px;
  box-shadow: none;
  font-weight: 400;
}

.button.primary {
  border-color: var(--ui-primary);
  background: var(--ui-primary);
  color: #fff;
}

.button.primary:hover {
  border-color: var(--ui-primary-hover);
  background: var(--ui-primary-hover);
}

.ghost {
  border-color: var(--ui-border-strong);
  background: #fff;
  color: var(--ui-text);
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="tel"],
select,
textarea {
  min-height: var(--ui-control-height);
  border: 1px solid var(--ui-border-strong);
  border-radius: 6px;
  background-color: #fff;
  color: var(--ui-text);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ui-primary);
  outline: 2px solid rgba(22, 119, 255, 0.12);
  outline-offset: 0;
}

.actions,
.inventory-toolbar,
.order-sync-actions {
  gap: 8px;
}

.table-wrap {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: #fff;
}

.panel > .table-wrap {
  width: calc(100% - 32px);
  margin: 4px 16px 16px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ui-text);
  font-size: 13px;
}

th {
  height: 44px;
  padding: 10px 12px;
  background: #f7f8fa;
  color: var(--ui-text-secondary);
  border-bottom: 1px solid var(--ui-border);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

td {
  min-height: var(--ui-row-height);
  padding: 11px 12px;
  border-bottom: 1px solid #edf0f3;
  color: var(--ui-text);
  font-weight: 400;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f7faff; }

.orders-table-wrap .goofish-order-table thead th {
  background: #f7f8fa;
  border-right: 1px solid var(--ui-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.orders-table-wrap .goofish-order-table thead th:last-child { border-right: 0; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  padding: 0;
  color: var(--ui-text-secondary) !important;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--ui-text-tertiary);
}

.status.success::before { background: var(--ui-success); }
.status.warn::before,
.status.unsynced::before,
.status.amber::before { background: var(--ui-warning); }
.status.danger::before { background: var(--ui-danger); }
.status.black::before { background: #1d1d1f; }
.status.info::before,
.status.blue::before,
.status.purple::before { background: var(--ui-info); }
.status.cyan::before { background: var(--ui-cyan); }

.fulfillment-waybill-status {
  color: var(--ui-text-secondary);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.fulfillment-copy-waybill {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ui-primary, #1677ff);
  font: inherit;
  font-weight: 400;
  line-height: inherit;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.fulfillment-copy-waybill:hover {
  color: var(--ui-primary-hover, #0958d9);
  text-decoration: none;
}

.fulfillment-copy-waybill.copied {
  color: var(--ui-success);
}

.rental-product-submit-actions {
  justify-content: flex-start;
  border-top: 1px solid var(--ui-border);
}

@media (max-width: 1100px) {
  .app { padding: 16px; }
  .topbar { margin: -16px -16px 16px; padding-right: 16px; padding-left: 16px; }
  .panel-head { align-items: flex-start; }
}

@media (max-width: 760px) {
  .sidebar {
    width: 100%;
    padding: 8px 10px;
  }

  .nav-menu { gap: 4px; }
  .nav-group,
  .nav-children { flex: 0 0 auto; }
  .nav-menu .nav-direct,
  .nav-menu .nav-title,
  .nav-menu button:not(.nav-title) { min-height: 36px; white-space: nowrap; }
  .page-tabs { gap: 18px; padding: 0 14px; }
  .panel > .table-wrap { width: calc(100% - 20px); margin: 4px 10px 10px; }
}

/* Order and customer workspace final specificity overrides. */
.customer-list-actions .customer-add-button { margin-top: 0; }
.customers-table .customer-address-cell,
.customers-table .customer-identity-cell,
.customers-table .customer-note-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.orders-table-wrap .goofish-order-table thead th,
.orders-table-wrap .goofish-order-table tbody td,
.orders-table-wrap .goofish-order-table .goofish-order-product-row td {
  border-right: 0;
}
.orders-table-wrap .goofish-order-table thead th:first-child { border-left: 0; }

/* 出租、SN 选择和订单列表统一版式 */
.rental-create-section .rental-line { grid-template-columns: 120px minmax(280px, 640px); justify-content: start; }
.rental-create-section .rental-product-line { grid-template-columns: 120px minmax(620px, 1040px); }
.rental-create-section .rental-two-columns { grid-template-columns: repeat(2, minmax(330px, 520px)); justify-content: start; gap: 18px 32px; }
.rental-create-section .rental-two-columns label { grid-template-columns: 120px minmax(180px, 360px); }
.rental-create-section .rental-two-columns label.full { grid-column: 1 / -1; grid-template-columns: 120px minmax(360px, 720px); }
.rental-create-section .rental-total { max-width: 720px; margin-left: 138px; }
.rental-sn-select-trigger { flex: 1; height: 42px; border: 1px solid #d9dee6; border-radius: 8px; color: #334155; background: #fff; cursor: pointer; text-align: left; padding: 0 13px; }
.rental-sn-select-trigger:hover { border-color: #1677ff; color: #1677ff; }
.rental-customer-field { position: relative; }
.rental-customer-field > input[type="hidden"] { display: none; }
.rental-customer-control { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rental-customer-control input { flex: 1; min-width: 0; }
.rental-customer-control .ghost { flex: 0 0 auto; white-space: nowrap; }

.order-drawer.center-modal.rental-picker-modal,
.order-drawer.center-modal.rental-customer-modal { width: min(1120px, calc(100vw - 54px)); max-width: 1120px; height: min(760px, calc(100vh - 54px)); }
.rental-selector-grid { --picker-line: #dfe3e8; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr); min-height: 560px; border: 1px solid var(--picker-line); border-radius: 10px; overflow: hidden; background: #fff; }
.rental-selector-pane { min-width: 0; padding: 18px; }
.rental-selector-pane + .rental-selector-pane { border-left: 1px solid var(--picker-line); }
.rental-selector-search { width: 100%; height: 42px; margin-bottom: 14px; border: 1px solid var(--picker-line); border-radius: 8px; background: #fff; box-shadow: none; }
.rental-customer-search-bar { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.rental-customer-search-bar .rental-selector-search { flex: 1; min-width: 0; margin-bottom: 0; }
.rental-new-customer-button { flex: 0 0 auto; min-height: 42px; white-space: nowrap; }
.rental-product-picker-list, .rental-sn-picker-list, .rental-customer-picker-list { max-height: 510px; overflow: auto; }
.rental-product-picker-list, .rental-sn-picker-list { display: grid; gap: 8px; align-content: start; }
.rental-product-picker-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 14px; width: 100%; margin: 0; padding: 11px; border: 1px solid var(--picker-line); border-radius: 10px; background: #fff; color: #1f2937; cursor: pointer; text-align: left; }
.rental-product-picker-item:hover { border-color: #93c5fd; background: #f8fbff; }
.rental-product-picker-item.active { border-color: #1677ff; background: #eff6ff; box-shadow: 0 0 0 1px rgba(22, 119, 255, .08); }
.rental-picker-image-frame, .rental-product-picker-item img, .picker-image-placeholder { width: 72px; height: 72px; }
.rental-picker-image-frame { position: relative; display: block; overflow: hidden; border: 1px solid var(--picker-line); border-radius: 9px; background: #fff; }
.rental-product-picker-item img { display: block; object-fit: contain; background: #fff; }
.picker-image-placeholder { display: grid; place-items: center; border: 0; background: #f7f8fa; color: #94a3b8; font-size: 12px; }
.rental-picker-image-frame .picker-image-placeholder { position: absolute; inset: 0; }
.rental-product-picker-item > span:last-child { display: grid; gap: 4px; }
.rental-product-picker-item strong { font-size: 16px; font-weight: 600; }
.rental-product-picker-item small { color: #64748b; }
.rental-sn-picker-item { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid var(--picker-line); border-radius: 8px; color: #1f2937; background: #fff; cursor: pointer; text-align: left; }
.rental-sn-picker-item:hover { border-color: #93c5fd; background: #f8fbff; }
.rental-sn-picker-item strong { font-weight: 500; }
.rental-sn-picker-item span { color: #475569; }
.rental-sn-picker-item.unavailable { border-color: #e7e9ed; color: #b5bac3; background: #fafafa; cursor: not-allowed; }
.rental-sn-picker-item.unavailable span { color: #b5bac3; }
.rental-sn-picker-item.selected { border-color: #1677ff; background: #eff6ff; color: #1677ff; cursor: default; }
.rental-sn-picker-item.selected span { color: #1677ff; }
.order-allocation-conflict { align-items: flex-start; min-height: 58px; padding-top: 10px; padding-bottom: 10px; cursor: default; }
.order-allocation-conflict .rental-sn-picker-copy { padding-top: 4px; }
.order-allocation-conflict-list { display: grid; min-width: 235px; gap: 6px; }
.order-allocation-conflict-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 22px; }
.order-allocation-conflict-label { color: #98a0ad !important; font-size: 12px; white-space: nowrap; }
.order-allocation-conflict .order-allocation-conflict-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.order-allocation-conflict .inventory-text-action { padding: 0; border: 0; background: transparent; color: #1677ff; font-size: 12px; font-weight: 400; cursor: pointer; }
.order-allocation-conflict .inventory-text-action:hover { color: #0958d9; text-decoration: underline; }
.order-allocation-conflict .inventory-text-action.disabled { color: #b5bac3; cursor: not-allowed; }
.order-allocation-conflict .inventory-text-action.disabled:hover { color: #b5bac3; text-decoration: none; }

.rental-customer-picker { min-width: 0; }
.rental-customer-picker-head, .rental-customer-picker-row { display: grid; grid-template-columns: 100px 150px 120px 150px minmax(260px, 1fr); align-items: center; gap: 12px; }
.rental-customer-picker-head { height: 44px; padding: 0 14px; border-bottom: 2px solid #d9dee6; color: #334155; background: #f8fafc; font-weight: 600; text-align: center; }
.rental-customer-picker-row { width: 100%; min-height: 56px; padding: 8px 14px; border: 0; border-bottom: 1px solid #eef1f4; background: #fff; color: #334155; cursor: pointer; text-align: center; }
.rental-customer-picker-row:hover { background: #eff6ff; }
.rental-customer-picker-row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-customer-picker-row .customer-chat-link { color: #1677ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.rental-customer-picker-row .customer-chat-link:hover { color: #0958d9; text-decoration: underline; }
.rental-customer-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 12px 14px; border-top: 1px solid #eef1f4; color: #667085; }
.rental-customer-pager > span:last-child { display: flex; gap: 8px; }
.rental-customer-pager .ghost { min-height: 30px; padding: 4px 10px; }
.rental-customer-pager .rental-customer-page-number { min-width: 30px; padding-inline: 7px; }
.rental-customer-pager .rental-customer-page-number.active { border-color: #1677ff; background: #1677ff; color: #fff; }
.rental-customer-page-ellipsis { align-self: center; color: #98a2b3; font-style: normal; }
.rental-customer-pager select { min-height: 30px; border: 1px solid #d9e2f0; border-radius: 6px; color: #475467; background: #fff; padding: 3px 6px; }

.order-action-bars { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; gap: 12px; }
.order-toolbar-group { min-width: 0; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
.order-toolbar-group + .order-toolbar-group { border-left: 3px solid #dbeafe; }
.order-toolbar-title { display: flex; align-items: baseline; gap: 9px; margin-bottom: 9px; }
.order-toolbar-title strong { color: #334155; font-size: 13px; font-weight: 600; }
.order-toolbar-title span { color: #94a3b8; font-size: 12px; }
.orders-table-wrap .goofish-order-table thead th { height: 50px; border-bottom: 1px solid #e3e7ec; text-align: center; font-weight: 500; vertical-align: middle; box-shadow: none; }
.orders-table-wrap .goofish-order-table .goofish-order-product-row td { vertical-align: middle; text-align: center; }
.orders-table-wrap .order-product-info { align-items: center; text-align: left; }
.orders-table-wrap .order-product-info strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-product-sn-list { color: #64748b; font-size: 12px; line-height: 1.55; white-space: normal; }
.sn-order-stage{display:inline-flex;align-items:center;gap:5px;width:max-content;margin-top:4px;font-size:12px;color:#64748b}.sn-order-stage i{width:7px;height:7px;border-radius:50%;background:#94a3b8}.sn-order-stage.awaiting{color:#9a6700}.sn-order-stage.awaiting i{background:#f5b800}.sn-order-stage.shipped{color:#9a6700}.sn-order-stage.shipped i{background:#f5b800}.sn-order-stage.picked{color:#1b7f3b}.sn-order-stage.picked i{background:#34c759}.sn-order-stage.returning{color:#1769aa}.sn-order-stage.returning i{background:#2f80ed}.sn-order-stage.overdue{color:#c62828}.sn-order-stage.overdue i{background:#ff3b30}
.order-product-sn-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.order-product-sn-row .sn-order-stage{margin-top:0}
.orders-table-wrap .goofish-deal-cell strong { font-weight: 500; }

.order-drawer.center-modal.order-rental-detail-modal {
  width: min(1280px, calc(100vw - 54px));
  max-width: 1280px;
  height: min(860px, calc(100vh - 54px));
}

.order-rental-detail-panel {
  border: 0;
  border-radius: 10px;
  box-shadow: none;
}

/* 查看详情：订单工作台版。结构与商品列表分开，避免继承列表的列宽与滚动样式。 */
.order-workbench { min-width: 0; background: #fff; }
.order-workbench-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 24px; border-bottom: 1px solid #edf0f3; }
.order-workbench-head > div:first-child { display: grid; gap: 5px; }
.order-workbench-head > div:first-child > span { color: #8a94a4; font-size: 12px; }
.order-workbench-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.order-workbench-no { color: #1f2937; font-size: 20px; font-weight: 650; letter-spacing: .01em; line-height: 1.2; }
.order-workbench-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.order-workbench-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 22px 24px 18px; }
.order-workbench-summary-column { display: grid; gap: 14px; min-width: 0; }
.order-workbench-summary-column > div { display: grid; grid-template-columns: 106px minmax(0, 1fr); align-items: start; gap: 16px; min-width: 0; }
.order-workbench-summary-column span { color: #7a8493; font-size: 14px; }
.order-workbench-summary-column strong { color: #334155; font-size: 14px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.order-workbench-summary-column .order-workbench-amount { color: #1677ff; font-size: 18px; font-weight: 650; }
.order-workbench-tabs { display: flex; align-items: flex-end; gap: 4px; padding: 0 24px; border-bottom: 1px solid #dfe3e8; }
.order-workbench-tab { min-height: 42px; padding: 0 20px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: transparent; color: #667085; font-size: 14px; cursor: pointer; }
.order-workbench-tab:hover { color: #1677ff; background: #f8fbff; }
.order-workbench-tab.active { position: relative; border-color: #dbe6f5; background: #fff; color: #1677ff; font-weight: 600; }
.order-workbench-tab.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: #1677ff; }
.order-workbench-content { min-height: 330px; padding: 0 24px 24px; }
.order-workbench-lines { overflow: auto; border: 1px solid #edf0f3; border-top: 0; }
.order-workbench-lines table { width: 100%; min-width: 790px; border-collapse: collapse; }
.order-workbench-lines th { padding: 12px 14px; background: #f8fafc; color: #667085; font-size: 13px; font-weight: 600; text-align: center; white-space: nowrap; }
.order-workbench-lines th:first-child, .order-workbench-lines td:first-child { text-align: left; }
.order-workbench-lines td { padding: 14px; border-top: 1px solid #edf0f3; color: #475569; font-size: 13px; text-align: center; vertical-align: middle; }
.order-workbench-lines td > span { display: block; line-height: 1.65; white-space: nowrap; }
.order-workbench-subsection-head { display: flex; align-items: baseline; gap: 12px; margin-top: 20px; padding: 0 2px 10px; }
.order-workbench-subsection-head strong { color: #334155; font-size: 15px; }
.order-workbench-subsection-head span { color: #8a94a4; font-size: 12px; }
.order-workbench-accessory-lines { border-top: 1px solid #edf0f3; }
.order-workbench-accessory-lines table { min-width: 560px; }
.order-workbench-product { display: flex; align-items: center; gap: 10px; min-width: 250px; }
.order-workbench-product .order-product-thumb { width: 46px; height: 46px; flex: 0 0 46px; }
.order-workbench-product > div { display: grid; gap: 4px; min-width: 0; }
.order-workbench-product strong { overflow: hidden; color: #334155; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.order-workbench-product span { color: #7a8493; font-size: 12px; }
.order-detail-date-fields { display: grid; gap: 7px; min-width: 145px; }
.order-detail-date-fields > span,
.order-detail-date-fields > label { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; color: #475569; font-size: 12px; text-align: left; }
.order-detail-date-fields b,
.order-detail-date-fields label span { color: #98a2b3; font-size: 11px; font-weight: 400; white-space: nowrap; }
.order-detail-date-fields input { width: 100%; min-width: 0; min-height: 30px; border: 1px solid #d9e2f0; border-radius: 6px; padding: 4px 6px; background: #fff; color: #344054; font: inherit; }
.order-workbench-detail-table { margin-top: 18px; overflow: auto; border: 1px solid #edf0f3; }
.order-workbench-detail-table table { width: 100%; min-width: 680px; border-collapse: collapse; }
.order-workbench-detail-table th, .order-workbench-detail-table td { padding: 14px 16px; border-bottom: 1px solid #edf0f3; color: #475569; font-size: 14px; text-align: left; vertical-align: top; }
.order-workbench-detail-table tr:last-child th, .order-workbench-detail-table tr:last-child td { border-bottom: 0; }
.order-workbench-detail-table th { width: 15%; background: #f8fafc; color: #667085; font-weight: 600; white-space: nowrap; }
.order-workbench-detail-table td { width: 35%; color: #334155; font-weight: 500; overflow-wrap: anywhere; }
.order-workbench-notes-table td { min-height: 46px; color: #667085; font-weight: 400; line-height: 1.7; white-space: pre-wrap; }

.order-detail-rental-card {
  min-height: 150px;
}

.order-detail-rental-card .rental-sn-card-head {
  color: #334155;
  font-size: 14px;
}

.order-current-product-card {
  cursor: default;
}

.order-current-product-card:hover {
  border-color: #1677ff;
  background: #eff6ff;
}

/* 分配 SN 仅有一个当前商品：缩小左侧展示，给 SN 列表更多空间。 */
.order-allocation-selector-grid {
  grid-template-columns: minmax(260px, .42fr) minmax(460px, 1fr);
  min-height: 400px;
}

.order-allocation-selector-grid .rental-selector-pane {
  padding: 14px;
}

.order-allocation-selector-grid .rental-product-picker-list,
.order-allocation-selector-grid .rental-sn-picker-list {
  max-height: 390px;
}

.order-allocation-selector-grid .order-current-product-card {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
}

.order-allocation-selector-grid .rental-picker-image-frame,
.order-allocation-selector-grid .rental-product-picker-item img,
.order-allocation-selector-grid .picker-image-placeholder {
  width: 54px;
  height: 54px;
}

.order-allocation-selector-grid .rental-product-picker-item strong {
  font-size: 14px;
}

/* 分配 SN：遵循后台的浅色层级、统一控件间距与明确的操作区。 */
.order-drawer.center-modal.order-allocation-picker-modal { height: min(660px, calc(100vh - 54px)); }
.order-allocation-picker-modal .order-allocation-selector-grid {
  grid-template-columns: minmax(260px, .42fr) minmax(460px, 1fr);
  min-height: 480px;
  background: var(--ui-surface);
  border-color: var(--ui-border);
}
.order-allocation-picker-modal .rental-selector-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px;
}
.order-allocation-picker-modal .rental-selector-pane + .rental-selector-pane { border-left-color: var(--ui-border); }
.order-allocation-pane-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  margin-bottom: 12px;
}
.order-allocation-pane-heading > div { display: grid; gap: 4px; min-width: 0; }
.order-allocation-pane-heading strong { color: var(--ui-text); font-size: 15px; font-weight: 600; line-height: 22px; }
.order-allocation-pane-heading small { overflow: hidden; color: var(--ui-text-secondary); font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.order-allocation-pane-heading > span { flex: 0 0 auto; color: var(--ui-text-tertiary); font-size: 12px; line-height: 22px; }
.order-allocation-picker-modal .rental-selector-search { margin: 0 0 12px; border-color: var(--ui-border-strong); }
.order-allocation-picker-modal .rental-selector-search:focus { border-color: var(--ui-primary); outline: 2px solid var(--ui-primary-soft); outline-offset: 0; }
.order-allocation-picker-modal .rental-product-picker-list,
.order-allocation-picker-modal .rental-sn-picker-list { flex: 1; max-height: none; min-height: 0; overflow: auto; }
.order-allocation-picker-modal .rental-product-picker-item,
.order-allocation-picker-modal .rental-sn-picker-item { border-color: var(--ui-border); background: var(--ui-surface); }
.order-allocation-picker-modal .rental-product-picker-item.active,
.order-allocation-picker-modal .rental-sn-picker-item.selected { border-color: var(--ui-primary); background: var(--ui-primary-soft); color: var(--ui-primary); }
.order-allocation-picker-modal .rental-product-picker-item:focus-visible,
.order-allocation-picker-modal .rental-sn-picker-item:focus-visible { outline: 2px solid var(--ui-primary); outline-offset: 2px; }
.rental-combined-picker .rental-product-picker-list { display: block; }
.rental-combined-picker .rental-product-picker-item { position: relative; min-height: 76px; height: auto; box-sizing: border-box; margin-bottom: 8px; }
.rental-combined-picker .rental-product-picker-item:last-child { margin-bottom: 0; }
.rental-picker-selected-count { position: absolute; top: 12px; right: 12px; padding: 3px 7px; border-radius: 5px; background: var(--ui-primary-soft); color: var(--ui-primary); font-size: 11px; font-style: normal; font-weight: 600; white-space: nowrap; }
.order-allocation-picker-modal .order-allocation-summary { flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.order-allocation-picker-modal .order-allocation-summary > span { padding: 3px 8px; border-radius: 4px; background: var(--ui-page); color: var(--ui-text-secondary); line-height: 18px; }
.order-allocation-picker-modal .order-allocation-summary .available { background: #e9f7ef; color: #1f8057; }
.order-allocation-picker-modal .order-allocation-summary .conflict { background: #fff5e6; color: #ad6800; }
.order-allocation-picker-modal .order-allocation-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; margin: 16px -20px -20px; padding: 14px 20px; border-top: 1px solid var(--ui-border); background: var(--ui-surface); color: var(--ui-text-secondary); font-size: 13px; }
.order-allocation-picker-modal .order-allocation-footer strong { color: var(--ui-text); }
.order-allocation-picker-modal .order-allocation-footer button { min-height: 36px; padding: 0 16px; white-space: nowrap; }
@media (max-width: 760px) {
  .order-allocation-picker-modal .order-allocation-selector-grid { grid-template-columns: 1fr; min-height: 0; }
  .order-allocation-picker-modal .rental-selector-pane + .rental-selector-pane { border-left: 0; border-top: 1px solid var(--ui-border); }
  .order-allocation-picker-modal .rental-product-picker-list,
  .order-allocation-picker-modal .rental-sn-picker-list { flex: initial; max-height: 28vh; }
}

@media (max-width: 1100px) {
  .order-action-bars { grid-template-columns: 1fr; }
  .rental-create-section .rental-product-line, .rental-create-section .rental-line { grid-template-columns: 110px minmax(0, 1fr); }
  .rental-create-section .rental-two-columns { grid-template-columns: 1fr; }
  .rental-create-section .rental-two-columns label.full { grid-column: auto; }
  .rental-selector-grid { grid-template-columns: 1fr; }
  .rental-selector-pane + .rental-selector-pane { border-left: 0; border-top: 1px solid #e5e7eb; }
  .order-workbench-summary { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 640px) {
  .order-workbench-head { align-items: stretch; flex-direction: column; padding: 16px; }
  .order-workbench-actions { justify-content: flex-start; }
  .order-workbench-summary { padding: 18px 16px; }
  .order-workbench-summary-column > div { grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
  .order-workbench-tabs, .order-workbench-content { padding-right: 16px; padding-left: 16px; }
  .order-workbench-tab { padding: 0 12px; }
  .order-workbench-detail-table { margin-top: 14px; }
}

/* 商品与 SN 选择：外层不滚动，头部、搜索、操作区始终可见。 */
.order-drawer.center-modal.order-allocation-picker-modal {
  width: min(1120px, calc(100vw - 32px));
  height: min(720px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 12px;
}
.order-drawer.center-modal.order-allocation-picker-modal > .drawer-head {
  position: static; min-width: 0; padding: 18px 24px; background: var(--ui-surface, #fff);
}
.order-allocation-picker-modal .drawer-head > div:first-child { min-width: 0; }
.order-allocation-picker-modal .drawer-head h2 { margin: 0; font-size: 16px; line-height: 24px; }
.order-allocation-picker-modal .drawer-head p { margin: 4px 0 0; font-size: 12px; line-height: 18px; }
.order-drawer.center-modal.order-allocation-picker-modal > .drawer-body {
  min-height: 0; max-height: none; overflow: hidden; padding: 0; background: var(--ui-surface, #fff);
}
.order-allocation-picker-modal .order-allocation-selector-grid {
  height: 100%; min-height: 0; grid-template-columns: minmax(280px, .44fr) minmax(0, 1fr);
  border: 0; border-radius: 0;
}
.order-allocation-picker-modal .rental-selector-pane { overflow: hidden; padding: 20px; }
.order-allocation-picker-modal .rental-selector-search,
.order-allocation-picker-modal .order-allocation-pane-heading,
.order-allocation-picker-modal .order-allocation-summary,
.order-allocation-picker-modal .rental-line-sn-product { flex-shrink: 0; }
.order-allocation-picker-modal .rental-line-sn-product { align-items: flex-start; gap: 12px; margin: 0 0 14px; line-height: 22px; }
.order-allocation-picker-modal .rental-line-sn-product strong { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.order-allocation-picker-modal .rental-line-sn-product > span { flex-shrink: 0; font-size: 12px; }
.order-allocation-picker-modal .rental-product-picker-list,
.order-allocation-picker-modal .rental-sn-picker-list { overscroll-behavior: contain; scrollbar-gutter: stable; padding: 2px; }
.order-allocation-picker-modal .rental-product-picker-item {
  display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px;
  min-height: 78px; height: auto; padding: 10px; text-align: left;
}
.order-allocation-picker-modal .rental-product-picker-item > span:not(.rental-picker-image-frame) {
  display: grid; min-width: 0; gap: 4px;
}
.order-allocation-picker-modal .rental-product-picker-item strong { line-height: 20px; white-space: normal; overflow-wrap: anywhere; }
.order-allocation-picker-modal .rental-product-picker-item small { line-height: 17px; overflow-wrap: anywhere; }
.order-allocation-picker-modal .rental-picker-selected-count { position: static; grid-column: 2; justify-self: start; margin-top: -2px; }
.order-allocation-picker-modal .rental-sn-picker-item { flex-shrink: 0; min-height: 52px; height: auto; padding: 12px 14px; gap: 12px; }
.order-allocation-picker-modal .rental-sn-picker-copy { min-width: 0; overflow-wrap: anywhere; }
.order-allocation-picker-modal .rental-sn-picker-item.rental-sn-conflict-item { display:block; cursor:default; color:var(--ui-text,#333); }
.order-allocation-picker-modal .rental-combined-picker:not(.rental-accessory-combined-picker) .rental-sn-picker-list { display:flex; flex-direction:column; align-items:stretch; }
.order-allocation-picker-modal .rental-sn-picker-item.rental-sn-conflict-item:has(details[open]) { min-height:max-content; height:max-content; }
.rental-sn-conflict-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px 12px; min-width:0; }
.rental-sn-conflict-head strong { overflow-wrap:anywhere; }
.order-allocation-picker-modal .rental-sn-conflict-item .rental-sn-conflict-head > span { color:#8b7250; font-size:12px; }
.rental-sn-conflict-details { margin-top:8px; }
.rental-sn-conflict-details > summary { display:list-item; width:fit-content; margin-left:14px; color:var(--ui-primary,#0052d9); cursor:pointer; font-size:12px; }
.rental-sn-conflict-record { margin-top:10px; padding:12px; background:#fff; border:1px solid var(--ui-border,#e5e7eb); border-radius:7px; font-size:12px; line-height:21px; color:#667085; overflow-wrap:anywhere; }
.rental-sn-conflict-record .inventory-text-action { padding:0; text-align:left; overflow-wrap:anywhere; }
.rental-conflict-order-preview { position:absolute; inset:0; z-index:5; display:flex; flex-direction:column; background:#fff; border-radius:inherit; min-height:0; }
.rental-conflict-order-preview > header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding:18px 24px; border-bottom:1px solid var(--ui-border,#e5e7eb); }
.rental-conflict-order-preview > header h3 { margin:0; font-size:16px; }
.rental-conflict-order-preview > header p { margin:4px 0 0; color:#8b95a5; font-size:12px; }
.rental-conflict-order-preview .rental-conflict-order-body { flex:1; min-height:0; overflow:auto; padding:20px 24px; color:#4b5563; font-size:13px; line-height:1.7; }
.order-allocation-picker-modal .order-allocation-footer > div { display: flex; gap: 8px; flex-shrink: 0; }
.order-allocation-picker-modal [hidden] { display: none !important; }
@media (max-width: 760px) {
  .order-allocation-picker-modal .order-allocation-selector-grid { grid-template-columns: minmax(160px, .42fr) minmax(0, 1fr); }
  .order-allocation-picker-modal .rental-selector-pane { padding: 12px; }
  .order-allocation-picker-modal .rental-selector-pane + .rental-selector-pane { border-top: 0; border-left: 1px solid var(--ui-border); }
  .order-allocation-picker-modal .rental-product-picker-list,
  .order-allocation-picker-modal .rental-sn-picker-list { flex: 1; max-height: none; }
  .order-allocation-picker-modal .rental-product-picker-item { grid-template-columns: 1fr; }
  .order-allocation-picker-modal .rental-picker-selected-count { grid-column: 1; }
  .order-allocation-picker-modal .rental-line-sn-product { flex-direction: column; gap: 2px; }
  .order-allocation-picker-modal .order-allocation-footer { flex-wrap: wrap; margin: 12px -12px -12px; padding: 12px; }
}

/* 弹窗必须覆盖订单冻结表头；保留列表内的冻结效果。 */
.drawer-backdrop { z-index: 1000; }
.order-drawer,
.order-drawer.center-modal,
.order-drawer.center-modal.wide-modal { z-index: 1001; }

/* 买家/收货信息列：数据左对齐，表头继续居中 */
.orders-table-wrap .goofish-order-table .goofish-order-product-row td.goofish-buyer-cell,
.orders-table-wrap .goofish-order-table .goofish-order-product-row td.goofish-buyer-cell .inline-link,
.orders-table-wrap .goofish-order-table .goofish-order-product-row td.goofish-buyer-cell span {
  text-align: left;
}

/* 发货管理保留主订单标题行，订单明细行不做跨行合并。 */
.goofish-order-table .order-level-operation-cell,
.goofish-order-table .order-level-buyer-cell,
.goofish-order-table .order-level-rent-cell,
.goofish-order-table .order-level-method-cell,
.goofish-order-table .order-merged-rental-cell {
  vertical-align: middle;
}

.goofish-order-table .order-level-operation-cell .order-row-actions {
  justify-content: center;
  white-space: nowrap;
}

/* 发货工作台：筛选、批量操作和表格保持同一视觉层级。 */
.fulfillment-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

/* 设备列始终按订单明细独立渲染：第一行商品，第二行 SN。 */
.fulfillment-equipment-cell > strong,
.fulfillment-equipment-cell > span {
  display: block;
}

.fulfillment-equipment-cell > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.fulfillment-toolbar #fulfillmentSearch {
  width: min(440px, 100%);
  margin-left: 4px;
}

.page-section[data-page="fulfillment"] .table-wrap table {
  min-width: 1320px;
  table-layout: fixed;
}

.page-section[data-page="fulfillment"] .table-wrap th:nth-child(1) { width: 44px; }
.page-section[data-page="fulfillment"] .table-wrap th:nth-child(2) { width: 190px; }
.page-section[data-page="fulfillment"] .table-wrap th:nth-child(3) { width: 160px; }
.page-section[data-page="fulfillment"] .table-wrap th:nth-child(4) { width: 100px; }
.page-section[data-page="fulfillment"] .table-wrap th:nth-child(5) { width: 170px; }
.page-section[data-page="fulfillment"] .table-wrap th:nth-child(6) { width: 220px; }
.page-section[data-page="fulfillment"] .table-wrap th:nth-child(7) { width: 260px; }
.page-section[data-page="fulfillment"] .table-wrap th:nth-child(8) { width: 110px; }

/* 发货明细统一缩小一级，缓解多列内容拥挤。 */
.page-section[data-page="fulfillment"] #fulfillmentBody td {
  font-size: 13px;
}

.page-section[data-page="fulfillment"] #fulfillmentBody .muted,
.page-section[data-page="fulfillment"] #fulfillmentBody .fulfillment-equipment-cell > span {
  font-size: 11px;
}

.page-section[data-page="fulfillment"] .fulfillment-rental-period {
  font-weight: 400;
}

.page-section[data-page="fulfillment"] .fulfillment-status-stack {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.page-section[data-page="fulfillment"] .fulfillment-status-waybill {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.page-section[data-page="fulfillment"] .fulfillment-status-waybill .fulfillment-copy-waybill {
  font-size: inherit;
}

.page-section[data-page="fulfillment"] .fulfillment-operation-cell {
  width: 210px;
}

.page-section[data-page="fulfillment"] .fulfillment-row-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
  white-space: nowrap;
}

.page-section[data-page="fulfillment"] .fulfillment-row-actions:has(> :only-child) {
  justify-content: center;
}

.page-section[data-page="fulfillment"] .fulfillment-buyer-cell {
  width: 260px;
  min-width: 220px;
  text-align: left;
  line-height: 1.55;
}

.page-section[data-page="fulfillment"] .fulfillment-buyer-cell .inline-link,
.page-section[data-page="fulfillment"] .fulfillment-buyer-cell span {
  text-align: left;
}

.page-section[data-page="fulfillment"] .fulfillment-buyer-cell .order-receiver-address {
  display: inline-block;
  max-width: 18em;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.page-section[data-page="fulfillment"] .todo-tabs {
  border-bottom: 1px solid var(--line);
}

.page-section[data-page="fulfillment"] .todo-tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.page-section[data-page="fulfillment"] .todo-tabs button.active {
  border-bottom: 2px solid var(--accent-2);
  background: transparent;
  color: var(--accent-2);
}

.page-section[data-page="fulfillment"] .row-actions {
  flex-wrap: wrap;
}

.fulfillment-row-actions .fulfillment-tracking-link,
.fulfillment-row-actions .fulfillment-tracking-link:hover {
  text-decoration: none;
}

.page-section[data-page="fulfillment"] .fulfillment-order-head td {
  padding: 10px 12px;
  background: #f7f8fa;
  border-top: 8px solid #fff;
  border-bottom: 1px solid #edf0f3;
}

.fulfillment-order-link {
  border: 0;
  background: none;
  padding: 0;
  color: #2563eb;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.fulfillment-order-link:hover { text-decoration: underline; }
.fulfillment-xianyu-sync { display:flex; flex-direction:column; align-items:center; gap:3px; margin-top:8px; font-size:11px; line-height:1.45; }
.fulfillment-xianyu-sync small { max-width:180px; color:var(--muted); overflow-wrap:anywhere; }
.fulfillment-xianyu-sync .success { color:#07834d; }
.fulfillment-xianyu-sync .warn { color:#a66200; }
.fulfillment-xianyu-sync .danger { color:#c9353f; }
#todoList .todo-row.todo-row-with-action { grid-template-columns:minmax(180px,.8fr) minmax(320px,1.5fr) 100px; gap:20px; }
#todoList .todo-order-detail { min-width:0; display:flex; flex-direction:column; gap:12px; }
#todoList .todo-shipment-plans { display:grid; gap:8px; }
#todoList .todo-shipment-plan { padding:10px 12px; background:#f7f9fc; border-radius:8px; }
#todoList .todo-shipment-plan-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; }
#todoList .todo-shipment-plan-head strong { font-size:13px; font-weight:600; color:#243240; }
#todoList .todo-shipment-plan-head small { font-size:12px; font-weight:400; color:#6b7785; }
#todoList .todo-shipment-products { display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:7px; font-size:12px; }
#todoList .todo-shipment-products small { color:#6b7785; }
#todoList .todo-shipment-plan-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; margin-top:5px; color:#75808e; font-size:11px; }
@media(max-width:850px) {
  #todoList .todo-row.todo-row-with-action { grid-template-columns:minmax(0,1fr) 90px; gap:12px; }
  #todoList .todo-order-detail { grid-column:1; grid-row:2; }
}

.page-section[data-page="fulfillment"] #fulfillmentBody > .fulfillment-order-head:first-child td {
  border-top: 0;
}

.page-section[data-page="fulfillment"] .fulfillment-device-continuation td {
  border-top-color: #f1f3f5;
}

@media (max-width: 760px) {
  .fulfillment-toolbar { flex-wrap: wrap; }
}

/* v20260914-schedule-01: one horizontal filter bar, full-width device calendar. */
[data-page="equipment-schedule"] [hidden] { display: none !important; }
[data-page="equipment-schedule"] .schedule-workspace-layout { display: block; }
[data-page="equipment-schedule"] .schedule-workspace-sidebar {
  padding: 12px 16px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}
[data-page="equipment-schedule"] .schedule-overview-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
[data-page="equipment-schedule"] .schedule-overview-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}
[data-page="equipment-schedule"] .schedule-overview-menu label { width: 150px; min-width: 0; }
[data-page="equipment-schedule"] .schedule-overview-menu .schedule-keyword { flex: 1 1 200px; }
[data-page="equipment-schedule"] .schedule-overview-menu input,
[data-page="equipment-schedule"] .schedule-overview-menu select { width: 100%; min-width: 0; height: 34px; }
[data-page="equipment-schedule"] .schedule-filter-buttons { display: flex; gap: 8px; }
[data-page="equipment-schedule"] .schedule-workspace-content { padding: 12px; gap: 10px; }
[data-page="equipment-schedule"] .schedule-workspace .schedule-detail-head { margin: 0; padding: 0; border: 0; }
[data-page="equipment-schedule"] .schedule-table-wrap.paged-table-wrap { height: var(--paged-table-height, calc(100dvh - 340px)); min-height: 260px; }
[data-page="equipment-schedule"] .schedule-table th:not(.schedule-machine),
[data-page="equipment-schedule"] .schedule-table td:not(.schedule-machine) { width: 156px; min-width: 156px; }
[data-page="equipment-schedule"] .schedule-table[data-view-mode="week"] th:not(.schedule-machine),
[data-page="equipment-schedule"] .schedule-table[data-view-mode="week"] td:not(.schedule-machine) { width: 180px; min-width: 180px; }
[data-page="equipment-schedule"] .schedule-event { border-width: 1px; padding: 5px 6px; box-shadow: none; }
[data-page="equipment-schedule"] .schedule-event strong,
[data-page="equipment-schedule"] .schedule-event .schedule-ship-date,
[data-page="equipment-schedule"] .schedule-event .schedule-actual-transit { font-size: 11px; font-weight: 400; color: inherit; }
[data-page="equipment-schedule"] .schedule-event.rental { background: #fff4ce; border-color: #f0d986; color: #775719; }
[data-page="equipment-schedule"] .schedule-event.pending-shipment,
[data-page="equipment-schedule"] .schedule-event.outbound,
[data-page="equipment-schedule"] .schedule-event.return,
[data-page="equipment-schedule"] .schedule-event.return-transit,
[data-page="equipment-schedule"] .schedule-event.actual-transit { background: #e9f8ec; border-color: #b7dfbd; color: #286b3a; }
[data-page="equipment-schedule"] .schedule-handoff-line { display: flex; flex-wrap: wrap; gap: 3px 8px; margin: 3px 0; }
[data-page="equipment-schedule"] .schedule-handoff-line > span { padding: 1px 4px; background: #e9f8ec; color: #286b3a; border-radius: 3px; white-space: nowrap; }
[data-page="equipment-schedule"] .schedule-event-legend i.rental { background: #fff4ce; border: 1px solid #f0d986; }
[data-page="equipment-schedule"] .schedule-event-legend i.actual-transit { background: #e9f8ec; border-color: #b7dfbd; }
[data-page="equipment-schedule"] .schedule-table th.schedule-today { background: #eaf2ff; color: #1677ff; box-shadow: inset 0 -2px #1677ff; }
[data-page="equipment-schedule"] .schedule-today-label { display: inline-block; background: #1677ff; color: #fff; font-size: 10px; border-radius: 3px; padding: 0 4px; }
[data-page="equipment-schedule"] .schedule-city { font-weight: 700; }
[data-page="equipment-schedule"] .schedule-phase-note { white-space: pre-wrap; }
[data-page="equipment-schedule"] .schedule-workspace-content { padding: 4px 8px 8px; gap: 0; }
[data-page="equipment-schedule"] .schedule-overview-menu { gap: 6px 10px; }
[data-page="equipment-schedule"] .schedule-overview-menu label { width: 130px; }
[data-page="equipment-schedule"] .schedule-overview-menu .schedule-view-menu { width: 110px; }
[data-page="equipment-schedule"] .schedule-event-legend { align-self: center; }
[data-page="equipment-schedule"] .schedule-drag-hint { align-self: center; color: #64748b; font-size: 11px; line-height: 1.35; }
[data-page="equipment-schedule"] .schedule-table tbody td { height: 40px; padding-top: 2px; padding-bottom: 2px; }
[data-page="equipment-schedule"] .schedule-cell { min-height: 36px; padding: 1px 2px; }
[data-page="equipment-schedule"] .schedule-booking.schedule-event { min-height: 36px; padding: 2px 5px; gap: 0; font-size: 11px; line-height: 14px; }
[data-page="equipment-schedule"] .schedule-compact-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-page="equipment-schedule"] .schedule-compact-person { font-weight: 600; }
[data-page="equipment-schedule"] .schedule-compact-status { font-size: 10px; opacity: .78; }
[data-page="equipment-schedule"] .schedule-machine strong { font-size: 12px; font-weight: 650; }
[data-page="equipment-schedule"] .schedule-table-wrap.paged-table-wrap { min-height: 260px; }
[data-page="equipment-schedule"] .schedule-table thead th { padding-top: 5px; padding-bottom: 5px; height: 34px; }
[data-page="equipment-schedule"] .schedule-day { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 22px; line-height: 22px; white-space: nowrap; }
[data-page="equipment-schedule"] .schedule-table thead th::after { display: none; }
[data-page="equipment-schedule"] .schedule-stacked-cell .schedule-event-cell-inner { display: grid; gap: 3px; }
[data-page="equipment-schedule"] .schedule-stacked-cell .schedule-event { min-height: 34px; }
[data-page="equipment-schedule"] .schedule-handoff-notice { display: block; width: 100%; color: #946000; font-size: 10px; line-height: 16px; }
@media (max-width: 900px) {
  [data-page="equipment-schedule"] .schedule-detail-head { flex-wrap: wrap; }
  [data-page="equipment-schedule"] .schedule-table-wrap.paged-table-wrap { height: 60dvh; }
}

/* v20260915-order-toolbar-01: compact order-list tools; no dialog/global overrides. */
[data-page="orders"] .orders-workspace-head { padding-bottom: 6px; }
[data-page="orders"] .order-action-bars {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 0 16px 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
[data-page="orders"] .order-toolbar-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
}
[data-page="orders"] .order-toolbar-title {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}
[data-page="orders"] .order-toolbar-title strong { font-size: 12px; }
[data-page="orders"] .order-toolbar-title span { display: none; }
[data-page="orders"] .order-primary-actions,
[data-page="orders"] .order-sync-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  width: auto;
  gap: 6px;
}
[data-page="orders"] .order-action-bars button {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 28px;
  height: 28px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
[data-page="orders"] .order-primary-actions > span {
  flex: 0 0 auto;
  font-size: 11px;
  white-space: nowrap;
}
.inventory-feishu-status{display:inline-flex;align-items:center;justify-content:center;min-width:62px;padding:3px 8px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.inventory-feishu-status.synced{background:#e8f7ef;color:#18794e}
.inventory-feishu-status.pending{background:#f3f4f6;color:#667085}
.inventory-feishu-status.partial{background:#fff6dc;color:#9a6700}
.inventory-feishu-status.failed{background:#fff0f0;color:#c73737}
.inventory-status-stack{display:flex;flex-direction:column;align-items:flex-start;gap:5px}

/* 列表改为整页纵向滚动；横向滚动仍留在表格容器内。 */
.topbar { position: static; }
.table-wrap.paged-table-wrap:not(.schedule-table-wrap) {
  display: block;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
.table-wrap.paged-table-wrap:not(.schedule-table-wrap) > .paged-table-scroll {
  height: auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: auto;
}
.table-wrap.paged-table-wrap:not(.schedule-table-wrap) > .table-pager { position: static; }
.list-sticky-header {
  position: fixed !important;
  top: 0;
  z-index: 60;
  display: block;
  overflow: hidden !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #e4e8ef) !important;
  border-radius: 0 !important;
  background: var(--ui-surface, #fff);
  box-shadow: 0 4px 12px rgba(20, 32, 54, .08);
}
.list-sticky-header[hidden] { display: none !important; }
.list-sticky-header table { border-collapse: separate; border-spacing: 0; margin: 0; }
.list-sticky-header th { box-sizing: border-box; }
.stats-page[data-page="equipment-stats"] .stats-heading,
.stats-page[data-page="equipment-stats"] .stats-toolbar,
.stats-page[data-page="equipment-stats"] .customer-stats-overview,
.stats-page[data-page="equipment-stats"] .stats-view-bar,
.stats-page[data-page="equipment-stats"] [data-stats-panel] {
  width: 1340px;
  max-width: calc(100% - 40px);
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

.stats-page[data-page="equipment-stats"] .customer-stats-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 760px) {
  .stats-page[data-page="equipment-stats"] .customer-stats-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

.order-drawer.center-modal.customer-create-modal {
  width: min(780px, calc(100vw - 32px));
  max-height: min(92vh, 760px);
  border-radius: 16px;
}
.order-drawer.center-modal.customer-create-modal .drawer-head {
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid #e8edf3;
}
.order-drawer.center-modal.customer-create-modal .drawer-body {
  max-height: calc(min(92vh, 760px) - 62px);
  padding: 14px 20px 18px;
  background: #f7f9fc;
}
.customer-create-form { display: grid; gap: 10px; }
.customer-create-section {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(36, 50, 64, .025);
}
.customer-create-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 18px;
  border-bottom: 1px solid #edf1f5;
  background: #fcfdff;
}
.customer-create-section-head h3 { margin: 0; font-size: 14px; font-weight: 700; color: #243240; }
.customer-create-section-index {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #edf3fd;
  color: #315d78;
  font-size: 11px;
  font-weight: 700;
}
.customer-create-generated { margin-left: auto; color: #8794a6; font-size: 12px; }
.customer-create-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  padding: 12px 18px 14px;
}
.customer-create-fields--profile { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.customer-create-wide { grid-column: 1 / -1; min-width: 0; }
.customer-create-fields .form-field { min-width: 0; align-content: start; gap: 7px; }
.customer-create-fields .form-field span { color: #47576a; font-size: 12px; font-weight: 600; line-height: 18px; }
.customer-create-fields .form-field input,
.customer-create-fields .form-field select,
.customer-create-fields .form-field textarea {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid #d5deea;
  border-radius: 7px;
  background: #fff;
  color: #243240;
  padding: 7px 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.customer-create-fields .form-field textarea { min-height: 48px; resize: vertical; }
.customer-create-fields .form-field input:focus,
.customer-create-fields .form-field select:focus,
.customer-create-fields .form-field textarea:focus { outline: none; border-color: #356db4; box-shadow: 0 0 0 3px rgba(53, 109, 180, .12); }
.customer-create-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 2px 0;
  border-top: 1px solid #e5ebf2;
}
.customer-create-actions button { min-width: 92px; min-height: 38px; border-radius: 7px; }
.customer-create-form .customer-form-summary { margin-top: 0; border: 1px solid #e2e8f0; background: #fff; }
.customer-create-actions .danger { margin-right: auto; }
@media (max-width: 640px) {
  .order-drawer.center-modal.customer-create-modal .drawer-body { padding: 12px; }
  .customer-create-fields,
  .customer-create-fields--profile { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .customer-create-wide { grid-column: auto; }
  .customer-create-section-head { padding: 0 14px; }
}
