@import url("design-system.css");

html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: var(--ui-font);
  font-size: var(--ui-font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ui-primary); }
a:hover { color: var(--ui-primary-strong); }

.app-shell { min-height: 100vh; display: flex; }
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1035;
  width: var(--ui-sidebar-width); display: flex; flex-direction: column;
  background: var(--ui-sidebar); color: #dce6f2;
  border-right: 1px solid rgb(255 255 255 / 8%);
  transition: width .2s ease, transform .2s ease;
}
.app-brand {
  height: var(--ui-topbar-height); display: flex; align-items: center; gap: .75rem;
  padding: 0 1.25rem; color: #fff; text-decoration: none;
  border-bottom: 1px solid rgb(255 255 255 / 8%); white-space: nowrap; overflow: hidden;
}
.brand-mark {
  flex: 0 0 2rem; width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: .65rem; background: var(--ui-primary); font-weight: 750; letter-spacing: -.04em;
}
.brand-copy { line-height: 1.15; }
.brand-name { font-size: .92rem; font-weight: 700; }
.brand-subtitle { margin-top: .18rem; color: #8fa2b7; font-size: .68rem; font-weight: 500; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 1rem .75rem; scrollbar-width: thin; }
.nav-section { margin-bottom: 1rem; }
.nav-section-title {
  padding: .35rem .65rem; color: #778ca3; font-size: .66rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; overflow: hidden;
}
.sidebar-link {
  display: flex; align-items: center; gap: .72rem; min-height: 2.45rem; padding: .5rem .65rem;
  margin: .1rem 0; color: #b7c5d5; text-decoration: none; border-radius: var(--ui-radius-sm);
  font-size: .84rem; font-weight: 520; white-space: nowrap; overflow: hidden;
}
.sidebar-link:hover { color: #fff; background: rgb(255 255 255 / 7%); }
.sidebar-link.active { color: #fff; background: rgb(61 126 255 / 18%); box-shadow: inset 2px 0 0 #6ea0ff; }
.sidebar-link.disabled { color: #5d6f83; cursor: not-allowed; }
.nav-icon {
  flex: 0 0 1.65rem; width: 1.65rem; height: 1.65rem; display: grid; place-items: center;
  color: #8fa6c0; font-size: .66rem; font-weight: 750; border: 1px solid rgb(255 255 255 / 10%);
  border-radius: .42rem;
}
.sidebar-link.active .nav-icon { color: #fff; border-color: rgb(110 160 255 / 35%); }
.sidebar-footer { padding: .85rem 1rem; border-top: 1px solid rgb(255 255 255 / 8%); color: #71859a; font-size: .7rem; }
.app-main { min-width: 0; width: calc(100% - var(--ui-sidebar-width)); margin-left: var(--ui-sidebar-width); transition: margin .2s ease, width .2s ease; }
.app-topbar {
  position: sticky; top: 0; z-index: 1020; height: var(--ui-topbar-height);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 1.75rem; background: rgb(255 255 255 / 94%); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ui-border);
}
.topbar-left, .topbar-right, .user-chip { display: flex; align-items: center; }
.topbar-left { gap: .75rem; min-width: 0; flex: 1 1 auto; }
.topbar-right { gap: .65rem; margin-left: auto; flex: 0 0 auto; }
.topbar-refresh { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.list-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 0; }
.list-pagination-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; margin-left: auto; }
.page-size-form { display: flex; align-items: center; gap: .4rem; margin: 0; }
.page-size-form label { white-space: nowrap; margin: 0; }
.page-size-form .form-select { width: 5.5rem; }
.product-list-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem; }
.product-list-toolbar form { display: flex; gap: .75rem; align-items: center; margin: 0; }
.product-bulk-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.product-catalog-table { min-width: 980px; }
.product-select-cell { width: 2.75rem; text-align: center; }
.product-identity { display: flex; align-items: center; gap: .85rem; min-width: 260px; max-width: 360px; }
.product-thumbnail { display: flex; flex: 0 0 64px; align-items: center; justify-content: center; width: 64px; height: 64px; border: 1px solid var(--ui-border); border-radius: .65rem; background: #fff; overflow: hidden; }
.product-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.product-thumbnail span { font-size: .65rem; color: var(--ui-text-subtle); }
.product-name { margin-top: .3rem; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.product-special-label { display: inline-block; margin-top: .35rem; font-size: .65rem; color: #87590c; background: #fff6df; padding: .1rem .4rem; border-radius: .3rem; }
.product-spec-cell { min-width: 155px; max-width: 230px; line-height: 1.5; }
.product-row-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: .3rem; }
.product-row-actions form { margin: 0; }
.product-row-actions .btn { white-space: nowrap; }
.product-catalog-table tr.product-row-selected > td { background: var(--ui-primary-soft); }
.app-content:has(> .list-workspace) { padding-bottom: 1.75rem; }
.list-workspace { height: calc(100dvh - var(--ui-topbar-height) - 3.5rem); display: flex; flex-direction: column; gap: .85rem; min-height: 0; }
.list-workspace-title, .list-workspace-filters, .list-workspace-footer { flex: 0 0 auto; }
.list-workspace-title h1 { font-size: 1.6rem; }
.list-workspace-filters .card-body { padding: .9rem 1rem; }
.list-search-filters { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(130px, 1fr) minmax(110px, .7fr); gap: .6rem; align-items: start; }
.list-search-group { display: flex; gap: .5rem; min-width: 0; align-items: start; }
.list-search-group textarea { resize: vertical; min-height: 38px; max-height: 76px; }
.list-search-group .btn { flex-shrink: 0; min-height: 38px; }
.list-workspace-results { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 160px; overflow: hidden; }
.list-workspace-results .product-list-toolbar { flex-shrink: 0; padding: .75rem 1rem; }
.list-workspace-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.list-workspace-scroll thead th { position: sticky; top: 0; z-index: 2; background: var(--ui-bg-subtle, #f5f7fa); box-shadow: inset 0 -1px 0 var(--ui-border); }
.list-workspace-scroll:focus-visible { outline: 2px solid var(--ui-primary); outline-offset: -2px; }
.list-workspace-footer .list-pagination { padding: .65rem 0; }
.product-unmatched-skus { max-height: 55px; overflow: auto; overflow-wrap: anywhere; }
.shipping-settings-status { width: 9rem; }
.shipping-settings-table { min-width: 780px; }
.shipping-settings-table td:last-child { width: 145px; white-space: nowrap; }
.shipping-settings-text { max-width: 260px; white-space: pre-line; overflow-wrap: anywhere; }
.shipping-settings-editor { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.shipping-settings-editor .modal-body { overflow-y: auto; }
@media (min-width: 768px) {
  .shipping-settings-editor .modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .shipping-settings-editor .modal-body > .alert,
  .shipping-settings-editor .modal-body > div:has(textarea),
  .shipping-settings-editor .modal-body > div:has(.form-check) { grid-column: 1 / -1; }
}
@media (max-width: 991.98px) {
  .list-search-filters { grid-template-columns: 1fr 1fr; }
  .list-search-group { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .app-content:has(> .list-workspace) { padding-top: .75rem; padding-bottom: .75rem; }
  .list-workspace { height: calc(100dvh - var(--ui-topbar-height) - 1.5rem); gap: .6rem; }
  .list-workspace-title p { display: none; }
  .list-workspace-results .product-list-toolbar > div:first-child .text-secondary { display: none; }
}
@media print {
  .list-workspace { height: auto; display: block; }
  .list-workspace-results, .list-workspace-scroll { overflow: visible; display: block; }
  .list-workspace-scroll thead th { position: static; }
}
.user-copy { max-width: 11rem; }
.user-name, .user-dept { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-toggle { border: 0; background: transparent; color: var(--ui-text-muted); padding: .35rem; border-radius: .45rem; }
.sidebar-toggle:hover { background: var(--ui-bg-subtle); color: var(--ui-text); }
.breadcrumb-mini { min-width: 0; font-size: .8rem; color: var(--ui-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb-mini strong { color: var(--ui-text); font-weight: 600; }
.global-search {
  width: 13rem; height: 2.15rem; display: flex; align-items: center; gap: .55rem;
  padding: 0 .75rem; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-sm);
  color: var(--ui-text-subtle); background: var(--ui-bg-subtle); font-size: .78rem;
}
.global-search kbd { margin-left: auto; border: 0; background: #fff; color: var(--ui-text-subtle); box-shadow: 0 0 0 1px var(--ui-border); font-size: .62rem; }
.global-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ui-text); background: transparent; font-size: .78rem; }
.global-search input::placeholder { color: var(--ui-text-subtle); }
.user-chip { gap: .65rem; border: 0; background: transparent; padding: .25rem .35rem; text-align: left; }
.user-avatar {
  width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--ui-primary-soft); color: var(--ui-primary); font-weight: 750; font-size: .76rem;
}
.user-name { color: var(--ui-text); font-size: .8rem; font-weight: 650; }
.user-dept { color: var(--ui-text-subtle); font-size: .68rem; }
.app-content { width: 100%; max-width: var(--ui-content-max); margin: 0 auto; padding: 1.75rem 2rem 3rem; }

body.sidebar-collapsed .app-sidebar { width: var(--ui-sidebar-collapsed); }
body.sidebar-collapsed .app-main { margin-left: var(--ui-sidebar-collapsed); width: calc(100% - var(--ui-sidebar-collapsed)); }
body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .sidebar-link span:not(.nav-icon),
body.sidebar-collapsed .sidebar-footer { display: none; }
body.sidebar-collapsed .app-brand, body.sidebar-collapsed .sidebar-link { justify-content: center; padding-left: .4rem; padding-right: .4rem; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.page-eyebrow { margin-bottom: .35rem; color: var(--ui-text-subtle); font-size: .72rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.page-title { margin: 0; color: var(--ui-text); font-size: var(--ui-font-title); line-height: 1.25; font-weight: 720; letter-spacing: -.025em; }
.page-description { max-width: 46rem; margin: .42rem 0 0; color: var(--ui-text-muted); font-size: .84rem; }
.page-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

.summary-header {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem;
  padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; background: #fff;
  border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg);
}
.summary-title-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.summary-title { margin: 0; font-size: 1.35rem; font-weight: 730; letter-spacing: -.02em; }
.summary-subtitle { margin-top: .3rem; color: var(--ui-text-muted); font-size: .84rem; }
.summary-facts { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; margin-top: 1.15rem; }
.summary-fact { min-width: 7rem; }
.summary-fact-label { color: var(--ui-text-subtle); font-size: .68rem; font-weight: 650; text-transform: uppercase; letter-spacing: .045em; }
.summary-fact-value { margin-top: .18rem; color: var(--ui-text); font-size: .9rem; font-weight: 630; }
.summary-amount { font-size: 1.45rem; font-weight: 750; letter-spacing: -.025em; }

.section { margin-top: 1.35rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.section-title { margin: 0; font-size: var(--ui-font-section); font-weight: 680; letter-spacing: -.012em; }
.section-description { margin: .18rem 0 0; color: var(--ui-text-muted); font-size: .76rem; }
.surface { background: #fff; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); }
.surface-header { padding: .85rem 1rem; border-bottom: 1px solid var(--ui-border); font-weight: 660; }
.surface-body { padding: 1rem; }

.filter-bar {
  display: flex; align-items: end; gap: .65rem; flex-wrap: wrap;
  padding: .8rem; margin-bottom: 1rem; background: #fff; border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
}
.filter-field { min-width: 10rem; flex: 1 1 10rem; }
.filter-field.search { flex-basis: 15rem; }
.filter-label { display: block; margin-bottom: .28rem; color: var(--ui-text-muted); font-size: .68rem; font-weight: 620; }

.table-shell { overflow: hidden; background: #fff; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); }
.table-responsive { scrollbar-width: thin; }
.table { --bs-table-bg: transparent; --bs-table-hover-bg: var(--ui-primary-faint); margin-bottom: 0; color: var(--ui-text); font-size: var(--ui-font-table); }
.table > :not(caption) > * > * { padding: .72rem 1rem; border-bottom-color: var(--ui-border-soft); vertical-align: middle; }
.table thead th {
  height: 2.7rem; color: var(--ui-text-muted); background: var(--ui-bg-subtle);
  border-bottom: 1px solid var(--ui-border); font-size: .68rem; font-weight: 700;
  letter-spacing: .035em; text-transform: uppercase; white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s ease; }
.table-link { color: var(--ui-text); font-weight: 680; text-decoration: none; }
.table-link:hover { color: var(--ui-primary); }
.cell-primary { color: var(--ui-text); font-weight: 620; }
.cell-secondary { margin-top: .15rem; color: var(--ui-text-subtle); font-size: .72rem; }
.cell-money { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.table-action { color: var(--ui-text-muted); text-decoration: none; font-size: .78rem; font-weight: 620; }
.table-action:hover { color: var(--ui-primary); }

.status-badge {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 1.5rem;
  padding: .18rem .5rem; border-radius: .38rem; font-size: .68rem; font-weight: 700;
  letter-spacing: .01em; white-space: nowrap;
}
.status-badge::before { content: ""; width: .36rem; height: .36rem; border-radius: 50%; background: currentColor; opacity: .75; }
.status-neutral { color: #556273; background: #eef1f4; }
.status-info { color: #235fa4; background: #eaf3ff; }
.status-success { color: #16724b; background: #e9f7f0; }
.status-warning { color: #8a5a08; background: #fff5dd; }
.status-danger { color: #a13b3b; background: #fdeeee; }

.btn { --bs-btn-font-size: .78rem; --bs-btn-font-weight: 650; --bs-btn-border-radius: var(--ui-radius-sm); min-height: var(--ui-control-height); padding: .45rem .8rem; box-shadow: none; }
.btn-sm { min-height: 2rem; padding: .3rem .65rem; font-size: .72rem; }
.btn-primary { --bs-btn-bg: var(--ui-primary); --bs-btn-border-color: var(--ui-primary); --bs-btn-hover-bg: var(--ui-primary-strong); --bs-btn-hover-border-color: var(--ui-primary-strong); }
.btn-outline-secondary { --bs-btn-color: var(--ui-text-muted); --bs-btn-border-color: var(--ui-border-strong); --bs-btn-hover-bg: var(--ui-bg-subtle); --bs-btn-hover-color: var(--ui-text); --bs-btn-hover-border-color: var(--ui-border-strong); }
.btn-quiet { color: var(--ui-text-muted); background: transparent; border: 1px solid transparent; }
.btn-quiet:hover { color: var(--ui-text); background: var(--ui-bg-subtle); }

.form-control, .form-select {
  min-height: var(--ui-control-height); border-color: var(--ui-border-strong);
  border-radius: var(--ui-radius-sm); color: var(--ui-text); font-size: .8rem;
}
.form-control:focus, .form-select:focus { border-color: #7aa7ff; box-shadow: 0 0 0 .2rem rgb(49 109 232 / 10%); }
.form-label { margin-bottom: .35rem; color: var(--ui-text-muted); font-size: .72rem; font-weight: 650; }
.form-text { color: var(--ui-text-subtle); font-size: .7rem; }
.invalid-feedback, .errorlist { color: var(--ui-danger); font-size: .72rem; }
.errorlist { list-style: none; margin: .3rem 0 0; padding: 0; }
.form-section { padding: 1.1rem; margin-bottom: 1rem; background: #fff; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); }
.form-section-title { margin: 0 0 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--ui-border-soft); font-size: .9rem; font-weight: 680; }

.nav-tabs { gap: 1.2rem; border-bottom-color: var(--ui-border); }
.nav-tabs .nav-link { padding: .72rem 0; color: var(--ui-text-muted); border: 0; border-bottom: 2px solid transparent; font-size: .78rem; font-weight: 640; }
.nav-tabs .nav-link:hover { color: var(--ui-text); border-color: transparent; }
.nav-tabs .nav-link.active { color: var(--ui-primary); background: transparent; border-bottom-color: var(--ui-primary); }
.tab-content { padding-top: 1.1rem; }

.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.metric-card { min-width: 0; padding: .95rem 1rem; background: #fff; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); text-decoration: none; }
.metric-card:hover { border-color: #c5d5ef; }
.metric-label { color: var(--ui-text-muted); font-size: .72rem; font-weight: 620; }
.metric-value { margin-top: .3rem; color: var(--ui-text); font-size: 1.45rem; line-height: 1.2; font-weight: 750; letter-spacing: -.025em; }
.metric-meta { margin-top: .35rem; color: var(--ui-text-subtle); font-size: .68rem; }

.progress-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.progress-item { padding: .85rem .95rem; background: var(--ui-bg-subtle); border-radius: var(--ui-radius-sm); }
.progress-label { display: flex; justify-content: space-between; gap: .5rem; color: var(--ui-text-muted); font-size: .72rem; }
.progress-value { margin-top: .22rem; font-size: .9rem; font-weight: 680; }
.progress { height: .35rem; margin-top: .55rem; background: #e5eaf0; }
.progress-bar { background: var(--ui-primary); }

.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before { content: ""; position: absolute; left: .48rem; top: .55rem; bottom: .55rem; width: 1px; background: var(--ui-border-strong); }
.timeline-item { position: relative; padding: 0 0 1.25rem .35rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker { position: absolute; left: -1.65rem; top: .2rem; z-index: 1; width: .68rem; height: .68rem; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--ui-border-strong); background: #aab4c0; }
.timeline-item.success .timeline-marker { background: var(--ui-success); box-shadow: 0 0 0 1px var(--ui-success); }
.timeline-item.current .timeline-marker { background: var(--ui-primary); box-shadow: 0 0 0 1px var(--ui-primary); }
.timeline-item.danger .timeline-marker { background: var(--ui-danger); box-shadow: 0 0 0 1px var(--ui-danger); }
.timeline-title { font-size: .8rem; font-weight: 680; }
.timeline-meta { margin-top: .15rem; color: var(--ui-text-muted); font-size: .72rem; }
.timeline-comment { margin-top: .35rem; color: var(--ui-text-muted); font-size: .76rem; }

.empty-state { padding: 3.5rem 1.5rem; text-align: center; }
.empty-icon { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; margin: 0 auto .85rem; border-radius: .8rem; background: var(--ui-bg-subtle); color: var(--ui-text-subtle); font-size: .75rem; font-weight: 750; }
.empty-title { margin: 0; font-size: .9rem; font-weight: 690; }
.empty-description { max-width: 28rem; margin: .35rem auto 0; color: var(--ui-text-muted); font-size: .76rem; }
.empty-action { margin-top: 1rem; }

.comparison-wrap { overflow-x: auto; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: #fff; }
.comparison-table { min-width: 900px; table-layout: fixed; }
.comparison-table th:first-child, .comparison-table td:first-child { position: sticky; left: 0; z-index: 2; width: 14rem; background: #fff; box-shadow: 1px 0 0 var(--ui-border); }
.comparison-table thead th:first-child { background: var(--ui-bg-subtle); }
.comparison-supplier { min-width: 13rem; }
.comparison-highlight { display: inline-flex; padding: .12rem .4rem; border-radius: .3rem; color: #17603f; background: #eaf7f0; font-size: .64rem; font-weight: 700; }
.exception-row { background: #fff9ed; }

.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--ui-border-soft); }
.info-item { min-width: 0; padding: .85rem 1rem; background: #fff; }
.info-label { color: var(--ui-text-subtle); font-size: .68rem; font-weight: 630; }
.info-value { margin-top: .22rem; overflow-wrap: anywhere; font-size: .8rem; font-weight: 590; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }

.alert { border: 1px solid transparent; border-radius: var(--ui-radius-md); font-size: .78rem; }
.alert-success { color: #17603f; background: #edf8f2; border-color: #d1eddf; }
.alert-danger, .alert-error { color: #8b3030; background: #fff0f0; border-color: #f2d3d3; }
.alert-info { color: #24588e; background: #eef6ff; border-color: #d5e8fb; }
.dropdown-menu { padding: .4rem; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); box-shadow: var(--ui-shadow-lg); font-size: .78rem; }
.dropdown-item { padding: .48rem .6rem; border-radius: .38rem; }
.card { border: 1px solid var(--ui-border) !important; border-radius: var(--ui-radius-md); box-shadow: none; }
.card-header { min-height: 2.9rem; display: flex; align-items: center; padding: .75rem 1rem; background: #fff !important; border-bottom-color: var(--ui-border); }
.card-body { padding: 1rem; }
.badge { font-weight: 650; letter-spacing: .01em; }
.text-bg-primary { color: #235fa4 !important; background: #eaf3ff; }
.text-bg-success { color: #16724b !important; background: #e9f7f0; }
.text-bg-warning { color: #8a5a08 !important; background: #fff5dd; }
.text-bg-danger { color: #a13b3b !important; background: #fdeeee; }
.text-bg-secondary, .text-bg-dark { color: #556273 !important; background: #eef1f4; }
dl dt { color: var(--ui-text-muted); font-size: .72rem; font-weight: 650; }
dl dd { color: var(--ui-text); font-size: .8rem; }
.pagination { gap: .25rem; }
.page-link { min-width: 2rem; border-color: var(--ui-border); border-radius: .42rem !important; color: var(--ui-text-muted); font-size: .74rem; text-align: center; }
.page-link:hover { background: var(--ui-bg-subtle); color: var(--ui-primary); }

.htmx-status { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1080; display: none; align-items: center; gap: .55rem; padding: .65rem .85rem; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: #fff; box-shadow: var(--ui-shadow-lg); font-size: .76rem; }
.htmx-request .htmx-status, .htmx-status.is-visible { display: flex; }
.loading-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--ui-primary); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .35; transform: scale(.75); } }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: #fff; }
.login-aside { display: flex; flex-direction: column; justify-content: space-between; padding: 3rem; color: #fff; background: linear-gradient(145deg, #101c2c, #142943 58%, #163b6f); }
.login-panel { display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(100%, 24rem); }
.login-panel { position: relative; }
.login-icp { position: absolute; left: 0; right: 0; bottom: 1rem; text-align: center; }
.shipping-mark-live-preview { min-height: 26rem; padding: 2rem; border: 3px solid #182230; background: #fff; color: #111; }
.shipping-mark-sheet { break-after: page; page-break-after: always; border: 3px solid #111 !important; color: #111; background: #fff; }
.shipping-mark-sheet:last-child { break-after: auto; page-break-after: auto; }

@media print {
  @page { size: A4; margin: 12mm; }
  .app-sidebar, .app-topbar, .page-header, .messages, .htmx-status { display: none; }
  .app-main { width: 100% !important; margin: 0; }
  .app-content { max-width: none !important; padding: 0; }
  .shipping-mark-sheet { min-height: 120mm; margin: 0 !important; box-shadow: none; }
}

@media (max-width: 1199.98px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search { display: none; }
  .app-content { padding-left: 1.4rem; padding-right: 1.4rem; }
}
@media (max-width: 767.98px) {
  .app-sidebar { transform: translateX(-100%); width: var(--ui-sidebar-width); }
  .app-main, body.sidebar-collapsed .app-main { width: 100%; margin-left: 0; }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  body.sidebar-collapsed .app-sidebar { width: var(--ui-sidebar-width); }
  body.sidebar-collapsed .brand-copy, body.sidebar-collapsed .nav-section-title, body.sidebar-collapsed .sidebar-link span:not(.nav-icon), body.sidebar-collapsed .sidebar-footer { display: block; }
  body.sidebar-collapsed .app-brand, body.sidebar-collapsed .sidebar-link { justify-content: flex-start; padding-left: .65rem; padding-right: .65rem; }
  .app-topbar { padding: 0 1rem; }
  .topbar-right { gap: .4rem; }
  .topbar-refresh-label { display: none; }
  .app-content { padding: 1.25rem 1rem 2rem; }
  .page-header, .summary-header { grid-template-columns: 1fr; flex-direction: column; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-summary, .info-grid { grid-template-columns: 1fr; }
  .user-copy { display: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}
.bulk-record-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--border-color, #dce3ed); background:#fff; flex-wrap:wrap; }
.bulk-check-cell { width:42px; text-align:center; }
.list-workspace-panel { display:flex; flex-direction:column; flex:1 1 auto; min-height:160px; overflow:hidden; }
.list-workspace > .page-header, .list-workspace > .filter-bar { margin-bottom:0; flex-shrink:0; }
.list-workspace-panel > form, .list-workspace-panel > .surface-body, .list-workspace-panel > .card-body { flex-shrink:0; }
@media (max-width:767px) {
  .list-workspace-panel { min-height:0; overflow:visible; }
  .list-workspace-panel .list-workspace-scroll { flex:0 0 auto; height:auto; max-height:65vh; overflow:auto; }
  .bulk-record-toolbar > div { max-width:100%; }
}
.product-edit-workspace { max-width:1280px; margin:0 auto; }
.product-edit-columns { display:grid; grid-template-columns:280px minmax(0,1fr); gap:20px; align-items:start; }
.product-edit-photo { position:sticky; top:80px; }
.product-photo-preview { aspect-ratio:1; width:100%; padding:0; display:flex; align-items:center; justify-content:center; background:var(--ui-bg-subtle,#f5f7fa); border:1px solid var(--ui-border); border-radius:8px; margin-bottom:10px; overflow:hidden; color:var(--ui-text-muted); cursor:zoom-in; }
.product-photo-preview:disabled { cursor:default; }
.product-photo-preview:focus-visible { outline:2px solid var(--ui-primary); outline-offset:3px; }
.product-photo-preview img { width:100%; height:100%; object-fit:contain; }
.product-image-viewer { background:var(--ui-bg-subtle,#f5f7fa); }
.product-image-viewer img { display:block; width:100%; height:65vh; object-fit:contain; }
.product-edit-sections { display:grid; gap:16px; min-width:0; }
.product-edit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.product-edit-field { min-width:0; }
.product-edit-field input, .product-edit-field select { width:100%; }
.product-edit-full { grid-column:1/-1; }
.product-edit-save { position:sticky; bottom:0; display:flex; justify-content:flex-end; align-items:center; gap:16px; padding:16px; margin-top:20px; background:#fff; border:1px solid var(--ui-border); border-radius:10px; z-index:3; }
@media(max-width:900px) { .product-edit-columns { grid-template-columns:1fr; } .product-edit-photo { position:static; } .product-photo-preview { max-width:240px; } }
@media(max-width:576px) { .product-edit-grid { grid-template-columns:1fr; } .product-edit-save { justify-content:space-between; } }
/* Development copy banner (only rendered when DEV_AUTO_LOGIN_USERNAME is active). */
.dev-copy-banner { padding:6px 16px; background:var(--ui-warning); color:#fff; font-size:var(--ui-font-body); font-weight:600; text-align:center; line-height:1.4; }
/* Inventory metric cards hold long CNY amounts: scale with viewport and wrap instead of clipping. */
.inventory-metrics .metric-value { font-size: clamp(1.15rem, 4.2vw, 1.6rem); overflow-wrap: anywhere; }
/* Inventory product thumbnails (local product photo, else Qianyi SKU image). */
.inventory-sku-cell { display:flex; align-items:center; gap:.65rem; min-width:220px; }
.inventory-reason { max-width: 260px; white-space: normal; line-height: 1.35; }

/* ---------- 滞销分析 dashboard ---------- */
.slow-filter { align-items: flex-end; }
.slow-filter .filter-field { flex: 0 1 13rem; }
.slow-filter-meta { flex: 1 1 18rem; align-self: center; }
.slow-filter-meta > div { margin-bottom: 0; }
.slow-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slow-page .surface-card { padding: 1.1rem 1.3rem; }
.slow-page .metric-card { padding: 1.1rem 1.3rem; }
.slow-kpi-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: .9rem; }
.amount-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .45rem 0 .8rem; }
.amount-chip { border: 1px solid #e4e7ec; background: #fff; border-radius: 999px; padding: .2rem .75rem; font-size: .78rem; color: #1e2737; cursor: pointer; }
.amount-chip:hover { border-color: #c9ceff; }
.amount-chip.active { background: #eef0ff; border-color: transparent; color: #4b57e0; font-weight: 600; }
.amount-chip.chip-slow.active { background: #fff3d6; color: #8f5c00; }
.amount-chip.chip-dead.active { background: #fde9e7; color: #b0362f; }
.amount-chip.chip-healthy.active { background: #efffd9; color: #3a6f0d; }
.amount-chip.chip-new.active { background: #f0f1f4; color: #5f6675; }
.amount-figures { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.amount-side { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; font-size: .82rem; color: #5f6675; }
.amount-side strong { color: #1e2737; font-size: .95rem; }
.target-row { display: flex; justify-content: space-between; align-items: center; margin-top: .45rem; font-size: .85rem; }
.target-meta { font-size: .74rem; color: #9aa0ab; }
.aged-split { height: .5rem; border-radius: .25rem; background: #a8dc63; overflow: hidden; margin: .7rem 0 .55rem; }
.aged-split > span { display: block; height: 100%; background: #e5534b; }
.aged-legend { display: grid; gap: .45rem; font-size: .8rem; }
.aged-legend i { display: inline-block; width: .6rem; height: .6rem; border-radius: .15rem; margin-right: .35rem; }
.aged-bad { background: #e5534b; } .aged-selling { background: #a8dc63; }
.trend-summary { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; align-items: center; font-size: .85rem; margin-bottom: .6rem; }
.trend-chart { width: 100%; height: auto; display: block; }
.trend-grid { stroke: #eef0f3; stroke-width: 1; }
.trend-axis { font-size: 11px; fill: #9aa0ab; }
.trend-slow { fill: #f0b429; opacity: .85; } .trend-dead { fill: #e5534b; opacity: .9; }
.trend-share { fill: none; stroke: #6e7bff; stroke-width: 2; }
.trend-share-key { background: #6e7bff; height: .2rem; }
.metric-unit { font-size: .8rem; font-weight: 500; color: var(--ui-text-muted, #6b7280); }
.slow-note { font-size: .78rem; color: #8f5c00; margin: -.35rem 0 .9rem; }
.slow-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .8rem; }
.health-legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-left: auto; font-size: .74rem; color: var(--ui-text-muted, #6b7280); }
.health-legend i, .health-row-shares i { display: inline-block; width: .65rem; height: .65rem; border-radius: .2rem; margin-right: .3rem; vertical-align: -1px; }
.health-rows { display: grid; gap: .2rem; }
.health-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 8.5rem; align-items: center; gap: .9rem; padding-top: .45rem; }
.health-row.is-total .health-row-label, .health-row.is-total .health-row-value { font-weight: 650; }
.health-row-label { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.health-row-value { text-align: right; font-size: .85rem; font-variant-numeric: tabular-nums; }
.health-bar { display: flex; height: .9rem; border-radius: .45rem; overflow: hidden; background: #eef0f3; }
.health-bar > span { height: 100%; min-width: 2px; }
.health-row-shares { display: flex; flex-wrap: wrap; gap: .1rem .85rem; padding-left: 7.4rem; font-size: .72rem; color: var(--ui-text-muted, #6b7280); }
.seg-new { background: #c3c8d2; } .seg-healthy { background: #86d61f; } .seg-watch { background: #6e7bff; }
.seg-slow { background: #f0b429; } .seg-dead { background: #e5534b; }
.slow-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.reason-row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid #eef0f3; color: inherit; text-decoration: none; }
.reason-row:first-of-type { border-top: 0; padding-top: .2rem; }
.reason-row .small { color: var(--ui-text-muted, #6b7280); }
a.reason-row:hover { background: #f6f7ff; }
.reason-row.is-danger, .reason-row.is-danger .small { color: #b0362f; }
.age-rows { display: grid; gap: .55rem; }
.age-row { display: grid; grid-template-columns: 5.8rem minmax(0, 1fr) 7.5rem; align-items: center; gap: .7rem; font-size: .82rem; font-variant-numeric: tabular-nums; }
.age-track { height: .65rem; background: #eef0f3; border-radius: .35rem; overflow: hidden; }
.age-track > span { display: block; height: 100%; border-radius: .35rem; }
.age-ok { background: #a8dc63; } .age-watch { background: #f6cf6b; } .age-slow { background: #f0a24a; } .age-dead { background: #e5534b; }
.rule-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.rule-metric-group { background: #f6f7f9; border-radius: .9rem; padding: .85rem 1rem; }
.rule-metric-title { font-weight: 650; font-size: .85rem; margin-bottom: .45rem; }
.rule-metric { display: grid; grid-template-columns: 1fr auto; column-gap: .5rem; padding: .3rem 0; }
.rule-metric span { color: var(--ui-text-muted, #6b7280); font-size: .82rem; }
.rule-metric strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.rule-metric small { grid-column: 1 / -1; color: #9aa0ab; font-size: .72rem; }
.worklist-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.worklist-tab { padding: .25rem .8rem; border-radius: 999px; border: 1px solid #e4e7ec; font-size: .8rem; color: inherit; text-decoration: none; background: #fff; }
.worklist-tab span { color: #9aa0ab; margin-left: .15rem; }
.worklist-tab:hover { border-color: #c9ceff; }
.worklist-tab.active { border-color: transparent; background: #eef0ff; color: #4b57e0; font-weight: 600; }
.worklist-tab.active.is-dead { background: #fde9e7; color: #b0362f; }
.worklist-tab.active.is-slow { background: #fff3d6; color: #8f5c00; }
.worklist-reason { min-width: 240px; max-width: 340px; white-space: normal; line-height: 1.4; }
.worklist-hint { margin-top: .2rem; font-size: .78rem; font-weight: 600; color: #3e49c9; }
@media (max-width: 1199.98px) {
  .slow-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slow-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slow-kpi-row .amount-picker { grid-column: 1 / -1; }
  .rule-metrics { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  .slow-grid-2 { grid-template-columns: 1fr; }
  .slow-kpi-row { grid-template-columns: 1fr; }
  .health-row { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .health-row-value { grid-column: 2; text-align: left; font-size: .78rem; color: #6b7280; }
  .health-row-shares { padding-left: 0; }
  .age-row { grid-template-columns: 4.8rem minmax(0, 1fr) 6.2rem; }
}
.inventory-sku-cell .min-w-0 { min-width:0; }
.inventory-thumb { flex:0 0 48px; width:48px; height:48px; }
.inventory-detail-image { width:140px; height:140px; display:flex; align-items:center; justify-content:center; border:1px solid var(--ui-border); border-radius:.75rem; background:#fff; overflow:hidden; color:var(--ui-text-subtle); font-size:.75rem; }
.inventory-detail-image img { width:100%; height:100%; object-fit:contain; }

/* 账号与权限（用户 / 部门 / 角色 / 操作日志 合并在一个页面） */
.accounts-tabs { display:flex; flex-wrap:wrap; gap:.4rem; margin:0 0 1rem; }
.accounts-tab { display:inline-flex; align-items:center; gap:.45rem; padding:.5rem 1rem; border-radius:999px; background:#fff; color:var(--ui-text-muted); font-weight:640; font-size:.85rem; text-decoration:none; box-shadow:0 1px 2px rgb(30 39 55 / 6%); }
.accounts-tab:hover { color:var(--ui-text); }
.accounts-tab.active { background:var(--ui-primary); color:#fff; }
.accounts-tab-count { min-width:1.5rem; padding:.05rem .45rem; border-radius:999px; background:rgb(30 39 55 / 8%); font-size:.72rem; text-align:center; }
.accounts-tab.active .accounts-tab-count { background:rgb(255 255 255 / 22%); }
.accounts-table td, .accounts-log-table td { white-space:nowrap; }
.accounts-row-actions { display:flex; gap:.35rem; justify-content:flex-end; flex-wrap:nowrap; }
.accounts-row-actions form { margin:0; }
.role-pill { display:inline-block; padding:.2rem .65rem; border-radius:999px; font-size:.76rem; font-weight:650; background:#f0f1f4; color:#444b59; }
.role-pill.role-admin { background:#eef0ff; color:#3e49c9; }
.role-pill.role-inventory-manager { background:#efffd9; color:#3a6f0d; }
.role-pill.role-shop-operator { background:#fff3d6; color:#8f5c00; }
.accounts-role-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:1rem; }
.accounts-role-card .card-body { padding:1.1rem 1.2rem; }
.accounts-role-members { display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.6rem; }
.accounts-role-members span { padding:.1rem .5rem; border-radius:.5rem; background:#f6f7f9; font-size:.76rem; }
.accounts-matrix td, .accounts-matrix th { padding:.55rem .9rem; }
.matrix-yes { color:#3a8a0a; font-weight:700; }
.matrix-no { color:#b8bcc6; }
.log-action { font-weight:600; background:#f0f1f4; color:#444b59; }
.log-action.log-create { background:#efffd9; color:#3a6f0d; }
.log-action.log-update { background:#eef0ff; color:#3e49c9; }
.log-action.log-delete { background:#fde9e7; color:#b0362f; }
.log-action.log-status_change { background:#fff3d6; color:#8f5c00; }
.accounts-log-row { cursor:pointer; }
.accounts-log-object { max-width:28rem; overflow:hidden; text-overflow:ellipsis; }
@media (min-width: 992px) {
  .accounts-user-filters { grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(120px, 1fr)); }
  .accounts-log-filters { grid-template-columns: minmax(240px, 1.7fr) repeat(3, minmax(120px, 1fr)) repeat(2, minmax(130px, .85fr)); }
}
.accounts-log-meta { display:grid; grid-template-columns:5rem 1fr; gap:.35rem 1rem; margin-bottom:1rem; }
.accounts-log-meta dt { color:var(--ui-text-muted); font-weight:500; }
.accounts-log-meta dd { margin:0; word-break:break-all; }
.accounts-diff td { word-break:break-all; font-size:.82rem; }
.accounts-diff tr.is-changed td:nth-child(3) { background:#f6fff0; }
.accounts-checklist { display:flex; flex-wrap:wrap; gap:.4rem 1.2rem; padding:.6rem .8rem; border:1px solid var(--ui-border); border-radius:.75rem; }
.accounts-checklist .form-check { margin:0; }
@media (max-width: 767px) {
  .accounts-tabs { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-bottom:.6rem; }
  .accounts-tab { flex:0 0 auto; padding:.45rem .8rem; }
}

/* 商品弹窗（新建 / 编辑 / 详情）与店铺与仓库页面 */
.product-modal-grid { display:grid; grid-template-columns:240px minmax(0,1fr); gap:1.5rem; align-items:start; }
.product-modal-photo .product-photo-preview { cursor:default; }
a.product-photo-preview { cursor:zoom-in; }
.product-photo-strip { display:flex; flex-wrap:wrap; gap:.4rem; }
.product-photo-strip img { width:52px; height:52px; object-fit:contain; border:1px solid var(--ui-border); border-radius:.5rem; background:#fff; }
.product-modal-section { margin:1.1rem 0 .6rem; font-size:.82rem; font-weight:700; color:var(--ui-text-muted); }
.product-modal-section:first-child { margin-top:0; }
.product-modal-form .product-edit-field { margin-bottom:.8rem; }
.product-modal-form .product-edit-grid { gap:0 1rem; }
.product-edit-grid-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.product-edit-grid-5 { grid-template-columns:repeat(5,minmax(0,1fr)); }
.product-pack-title { font-size:.8125rem; font-weight:600; color:var(--bs-secondary-color); margin:.5rem 0 .125rem; }
.product-pack-title span { font-weight:400; }
.product-facts { display:grid; grid-template-columns:6rem 1fr; gap:.45rem 1rem; margin:0; }
.product-facts dt { color:var(--ui-text-muted); font-weight:500; }
.product-facts dd { margin:0; word-break:break-word; }
.store-muted { color:var(--ui-text-subtle); font-size:.76rem; }
@media (max-width: 767px) {
  .product-modal-grid { grid-template-columns:1fr; }
  .product-modal-photo .product-photo-preview { max-width:220px; }
  .product-edit-grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .product-edit-grid-5 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* 配置中心 */
.config-page { max-width: 1280px; }
.config-header { display:flex; flex-wrap:wrap; gap:1rem; justify-content:space-between; align-items:flex-end; margin-bottom:1.1rem; }
.config-progress { display:flex; gap:.6rem; }
.config-progress > div { display:flex; flex-direction:column; align-items:center; min-width:5.5rem; padding:.55rem .8rem; border-radius:14px; background:#fff; box-shadow:0 1px 2px rgb(30 39 55 / 6%); }
.config-progress-num { font-size:1.15rem; font-weight:750; color:var(--ui-text); }
.config-progress-label { font-size:.72rem; color:var(--ui-text-muted); }
.config-attention { margin-bottom:1.1rem; padding:.85rem 1.1rem; border-radius:18px; background:#fff8e6; border:1px solid #f6e0a8; }
.config-attention-title { font-weight:700; font-size:.82rem; color:#8f5c00; margin-bottom:.35rem; }
.config-attention-row { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.5rem; padding:.3rem 0; font-size:.85rem; border-top:1px dashed #f0d79a; }
.config-attention-row:first-of-type { border-top:0; }
.config-attention-row a { font-weight:650; white-space:nowrap; }
.config-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(330px, 1fr)); gap:1rem; }
.config-card { display:flex; flex-direction:column; gap:1rem; padding:1.15rem 1.2rem; border-radius:20px; background:#fff; box-shadow:0 1px 2px rgb(30 39 55 / 6%); }
.config-card-head { display:flex; gap:.8rem; align-items:center; }
.config-card-head h2 { margin:0; font-size:1rem; font-weight:720; }
.config-card-head p { margin:.1rem 0 0; font-size:.78rem; color:var(--ui-text-muted); }
.config-icon { flex:0 0 42px; height:42px; display:grid; place-items:center; border-radius:13px; font-weight:800; font-size:.95rem; }
.config-icon.is-violet { background:#eef0ff; color:#3e49c9; }
.config-icon.is-lime { background:#efffd9; color:#3a6f0d; }
.config-icon.is-amber { background:#fff3d6; color:#8f5c00; }
.config-icon.is-slate { background:#eef0f3; color:#444b59; }
.config-icon.is-sky { background:#e6f4ff; color:#1f5f99; }
.config-icon.is-rose { background:#fde9e7; color:#b0362f; }
.config-stats { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:.5rem; }
.config-stats-2 { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.config-stats > div { padding:.55rem .65rem; border-radius:12px; background:#f6f7f9; min-width:0; }
.config-stats b { display:block; font-size:1.1rem; font-weight:750; line-height:1.2; color:var(--ui-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.config-stats b small { font-size:.75rem; font-weight:600; color:var(--ui-text-muted); }
.config-stats b.config-text { font-size:.95rem; }
.config-stats span { display:block; font-size:.7rem; color:var(--ui-text-muted); line-height:1.3; margin-top:.15rem; }
.config-stats > div.is-warn { background:#fff3d6; }
.config-stats > div.is-warn b { color:#8f5c00; }
.config-actions { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:auto; }
.store-hidden-switch { color:var(--ui-text-muted); }
@media (max-width: 767px) {
  .config-grid { grid-template-columns:1fr; }
  .config-stats { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* 生成并复制账号密码 */
.credential-list { display:grid; gap:.7rem; }
.credential-card { padding:.8rem .9rem; border:1px solid var(--ui-border); border-radius:14px; background:#fafbfc; }
.credential-head { display:flex; align-items:center; gap:.5rem; margin-bottom:.4rem; }
.credential-fields { display:grid; grid-template-columns:3rem 1fr; gap:.15rem .6rem; margin:0 0 .55rem; font-size:.85rem; }
.credential-fields dt { color:var(--ui-text-muted); font-weight:500; }
.credential-fields dd { margin:0; word-break:break-all; user-select:all; }
.credential-password { font-size:1rem; font-weight:700; letter-spacing:.04em; }

/* 清货任务 */
.clearance-page { max-width: 1320px; }
.clearance-kpis { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:.8rem; margin-bottom:1rem; }
.clearance-bar { height:8px; border-radius:999px; background:#eef0f3; overflow:hidden; min-width:120px; }
.clearance-bar span { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg, #6e7bff, #8fd14f); }
.clearance-progress-cell { min-width:180px; }
.speed-badge { display:inline-block; padding:.15rem .55rem; border-radius:999px; font-size:.78rem; font-weight:700; background:#f0f1f4; color:#444b59; white-space:nowrap; }
.speed-badge.is-good { background:#efffd9; color:#3a6f0d; }
.speed-badge.is-bad { background:#fde9e7; color:#b0362f; }
.clearance-board td { white-space:nowrap; }
.clearance-note { padding:.7rem 1rem; border-radius:14px; background:#f6f7ff; font-size:.88rem; }
.clearance-note.is-done { background:#f3fbea; }
.clearance-timeline { padding:0 1rem 1rem; }
.clearance-event { display:grid; grid-template-columns:3.5rem 1fr; gap:.8rem; padding:.7rem 0; border-top:1px solid var(--ui-border); }
.clearance-event:first-child { border-top:0; }
.clearance-event-date { font-weight:700; color:var(--ui-text-muted); font-size:.85rem; }
.clearance-pick { max-height:260px; overflow:auto; border:1px solid var(--ui-border); border-radius:12px; }
.clearance-filters { grid-template-columns: repeat(2, minmax(140px, 220px)); }
.worklist-select { width:2rem; }
.worklist-issue-bar { display:flex; align-items:center; gap:.6rem; padding:.5rem 1rem; border-top:1px solid var(--ui-border); background:#fafbff; }
@media (max-width: 767px) { .clearance-kpis { grid-template-columns:repeat(2, minmax(0, 1fr)); } }

/* 库存预警规则 */
.policy-page { max-width: 1280px; padding-bottom: 1rem; }
.policy-ladder { margin-bottom: 1.1rem; padding: 1rem 1.15rem; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgb(30 39 55 / 6%); }
.policy-ladder-title { font-weight: 700; margin-bottom: .7rem; }
.policy-ladder-title span { margin-left: .5rem; font-size: .78rem; font-weight: 500; color: var(--ui-text-muted); }
.policy-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.policy-step { display: flex; flex-direction: column; gap: .2rem; padding: .6rem .75rem; border-radius: 14px; border-left: 4px solid; background: #f6f7f9; min-width: 0; }
.policy-step b { font-size: .9rem; }
.policy-step span { font-size: .76rem; color: var(--ui-text-muted); line-height: 1.35; }
.policy-step.is-new { border-color: #9aa0ab; }
.policy-step.is-healthy { border-color: #6bbf2a; background: #f3fbea; }
.policy-step.is-watch { border-color: #6e7bff; background: #f3f4ff; }
.policy-step.is-slow { border-color: #e0a100; background: #fff8e6; }
.policy-step.is-dead { border-color: #d0453c; background: #fdeeec; }
.policy-ladder-note { margin-top: .65rem; font-size: .78rem; color: var(--ui-text-muted); }
.policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.policy-card { padding: 1.15rem 1.2rem 1.25rem; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgb(30 39 55 / 6%); }
.policy-card-wide { grid-column: 1 / -1; }
.policy-card > header { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; }
.policy-card > header h2 { margin: 0; font-size: 1rem; font-weight: 720; }
.policy-card > header p { margin: .2rem 0 0; font-size: .78rem; color: var(--ui-text-muted); }
.policy-num { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: #eef0ff; color: #3e49c9; font-weight: 800; font-size: .85rem; }
.policy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.policy-field-label { display: block; margin-bottom: .35rem; font-size: .82rem; font-weight: 650; color: var(--ui-text); }
.policy-input { position: relative; display: flex; align-items: center; }
.policy-input .form-control, .policy-input .form-select { padding-right: 3.6rem; }
.policy-input .form-select { padding-right: 2.2rem; }
.policy-unit { position: absolute; right: .85rem; font-size: .78rem; color: var(--ui-text-muted); pointer-events: none; }
.policy-hint { margin-top: .35rem; font-size: .74rem; line-height: 1.45; color: var(--ui-text-muted); }
.policy-field.has-error .form-control { border-color: #d0453c; }
.policy-switch, .policy-toggle { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.policy-switch { margin-bottom: 1rem; padding: .75rem .9rem; border-radius: 14px; background: #f6f7f9; }
.policy-switch b { display: block; font-size: .85rem; }
.policy-switch small { display: block; font-size: .74rem; color: var(--ui-text-muted); }
.policy-toggles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.policy-toggle { align-items: center; padding: .7rem .85rem; border-radius: 14px; border: 1px solid var(--ui-border); font-size: .85rem; }
.policy-switch .form-check-input, .policy-toggle .form-check-input { width: 2.3em; height: 1.25em; margin: 0; cursor: pointer; }
.policy-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center;
  margin-top: 1rem; padding: .75rem 1.1rem; border-radius: 16px; background: rgb(255 255 255 / 94%); box-shadow: 0 -4px 18px rgb(30 39 55 / 8%); backdrop-filter: blur(6px); }
@media (max-width: 1100px) { .policy-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .policy-grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .policy-steps, .policy-fields { grid-template-columns: 1fr 1fr; }
  .policy-toggles { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .policy-fields { grid-template-columns: 1fr; } }

/* 数据来源行：立即同步按钮 / 同步中提示 */
.sync-hint-button { margin-left: .5rem; padding: .05rem .6rem; font-size: .78rem; line-height: 1.5; vertical-align: baseline; }
.sync-hint-busy { margin-left: .5rem; color: var(--bs-primary); white-space: nowrap; }
.sync-hint-busy .spinner-border { width: .8rem; height: .8rem; border-width: .15em; }
/* 爆品 / 起量 标签与状态变化 */
.status-hot { color:#fff; background:#f57c00; }
.status-surge { color:#7a3fd0; background:#f1e9ff; }
.status-clearing { color:#0f7a5c; background:#dcf4ea; }
.status-urgent { color:#fff; background:#d32f2f; }
.status-pending { font-size:.72rem; color:#a16207; white-space:nowrap; }
/* 库存表：表头固定（表格区域内滚动，表头一直可见） */
.sticky-table-scroll { max-height: calc(100dvh - var(--ui-topbar-height) - 1.5rem); overflow: auto; overscroll-behavior: contain; }
.sticky-table-scroll thead th { position: sticky; top: 0; z-index: 3; background: var(--ui-bg-subtle, #f5f7fa); box-shadow: inset 0 -1px 0 var(--ui-border); }
.sticky-table-scroll:focus-visible { outline: 2px solid var(--ui-primary); outline-offset: -2px; }
/* 销量悬浮卡 */
.sales-pop { cursor: help; border-bottom: 1px dashed #9aa3b5; }
.sales-pop-hint { font-size: .7rem; color: #9aa3b5; font-weight: 400; }
.popover.sales-popover { font-family: var(--ui-font); --bs-popover-max-width: 290px; --bs-popover-body-padding-x: .75rem; --bs-popover-body-padding-y: .55rem; font-size: .8rem; }
.sales-pop-title { font-size: .7rem; font-weight: 600; color: #6b7280; margin-top: .3rem; }
.sales-pop-title:first-child { margin-top: 0; }
.sales-pop-row { display: grid; grid-template-columns: minmax(4.5rem, 1fr) 3.5rem 3.5rem; gap: .75rem; line-height: 1.7; }
.sales-pop-row b, .sales-pop-row em { text-align: right; font-variant-numeric: tabular-nums; }
.sales-pop-row em { font-style: normal; color: #4b5563; }
.sales-pop-head b, .sales-pop-head em { font-size: .68rem; font-weight: 600; color: #8a93a6; }
.sales-pop-note { margin-top: .35rem; padding-top: .35rem; border-top: 1px solid var(--ui-border, #e5e7eb); color: #8a93a6; font-size: .7rem; line-height: 1.4; }
.recent-rate-mark { margin-left:.25rem; font-size:.68rem; color:#c2410c; cursor:help; }
/* 库存余量条：可用（实色）+ 在途（浅色），竖线 = 补货周期，满格 = 滞销起点 */
.stock-gauge { position:relative; display:flex; width:96px; height:6px; margin:.35rem 0 .1rem auto; border-radius:3px; background:rgba(110,123,150,.18); }
.stock-gauge > span { height:100%; background:var(--gauge, #8a93a6); }
.stock-gauge > span:first-child { border-radius:3px 0 0 3px; }
.stock-gauge-transit { opacity:.4; }
.stock-gauge-lead { position:absolute; top:-2px; width:2px; height:10px; margin-left:-1px; background:#5b6476; opacity:.45; border-radius:1px; }
.stock-gauge.is-over::after { content:""; position:absolute; right:-5px; top:-1px; border-left:5px solid var(--gauge); border-top:4px solid transparent; border-bottom:4px solid transparent; }
.stock-gauge.tone-urgent { --gauge:#d32f2f; background:rgba(211,47,47,.16); } .stock-gauge.tone-low { --gauge:#f57c00; } .stock-gauge.tone-ok { --gauge:#2e9d5b; }
.stock-gauge.tone-watch { --gauge:#c9a400; } .stock-gauge.tone-slow { --gauge:#7b8fb5; } .stock-gauge.tone-over { --gauge:#6b5bc4; }
.stock-gauge.tone-idle > span:first-child { background:repeating-linear-gradient(45deg, #b8bfcc 0 4px, #dfe3ea 4px 8px); border-radius:3px; }
.change-arrow { color:#8a93a6; margin:0 .25rem; }
.change-group-title { font-weight:700; font-size:.85rem; padding:.6rem 1rem .3rem; }
.change-group-title.is-worse { color:#b5381b; } .change-group-title.is-better { color:#17794a; }
/* 库存分析驾驶舱 */
.slow-kpi-row.cockpit-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr); }
.cockpit-top .cockpit-score { order: 1; } .cockpit-top .amount-picker { order: 2; } .cockpit-top .cockpit-stockout { order: 3; }
.cockpit-help { font-size: .72rem; color: #8a93a6; cursor: help; margin-left: .25rem; font-weight: 400; }
.cockpit-score { --score: #8a93a6; }
.cockpit-score.tone-success { --score: #2e9d5b; } .cockpit-score.tone-warning { --score: #c98a00; } .cockpit-score.tone-danger { --score: #d32f2f; }
.cockpit-score-main { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; margin: .1rem 0 .45rem; }
.cockpit-score-value { font-size: 2.2rem; font-weight: 700; line-height: 1; color: var(--score); font-variant-numeric: tabular-nums; }
.cockpit-score-max { color: #8a93a6; font-size: .85rem; }
.cockpit-delta { margin-left: auto; font-size: .75rem; color: #8a93a6; white-space: nowrap; }
.cockpit-delta.is-up { color: #2e9d5b; } .cockpit-delta.is-down { color: #d32f2f; }
.cockpit-part { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) 2rem; align-items: center; gap: .5rem; font-size: .78rem; line-height: 1.9; }
.cockpit-part small { color: #8a93a6; }
.cockpit-part b { text-align: right; font-variant-numeric: tabular-nums; }
.cockpit-part-bar { height: 6px; border-radius: 3px; background: rgba(110,123,150,.16); overflow: hidden; }
.cockpit-part-bar i { display: block; height: 100%; background: var(--score); border-radius: 3px; }
.cockpit-spark { display: block; width: 100%; height: 40px; margin-top: .5rem; color: var(--score); }
.cockpit-stock-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem .55rem; margin-top: .35rem; border-radius: 8px; color: inherit; text-decoration: none; background: rgba(110,123,150,.07); }
.cockpit-stock-row:hover { background: rgba(110,123,150,.14); }
.cockpit-stock-row small { color: #8a93a6; font-size: .7rem; margin-left: .2rem; }
.cockpit-stock-row b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.cockpit-stock-row.is-urgent b { color: #d32f2f; } .cockpit-stock-row.is-urgent { background: rgba(211,47,47,.08); }
.cockpit-stock-row.is-risk b { color: #f57c00; }
.cockpit-stock-note { font-size: .72rem; color: #8a93a6; margin: .2rem .1rem 0; }
.todo-table .todo-rank { width: 2rem; text-align: center; }
.compare-table .compare-total td { font-weight: 600; background: rgba(110,123,150,.06); }
.compare-group-title { font-size: .75rem; font-weight: 600; color: #8a93a6; padding-top: .7rem; }
.compare-health { white-space: nowrap; }
.compare-health b { margin-left: .4rem; font-variant-numeric: tabular-nums; }
.compare-score { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: rgba(110,123,150,.16); vertical-align: middle; overflow: hidden; }
.compare-score i { display: block; height: 100%; border-radius: 3px; background: #8a93a6; }
.compare-score.tone-success i { background: #2e9d5b; } .compare-score.tone-warning i { background: #c98a00; } .compare-score.tone-danger i { background: #d32f2f; }
@media (max-width: 1199.98px) {
  .slow-kpi-row.cockpit-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cockpit-top .amount-picker { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 767.98px) { .slow-kpi-row.cockpit-top { grid-template-columns: 1fr; } }
/* 首页待处理 */
.pending-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; padding: .6rem .9rem; border-radius: 12px; background: #fff7e6; border: 1px solid #ffe2a8; }
.pending-strip-title { font-weight: 700; color: #8f5c00; }
.pending-item { color: #5b4300; text-decoration: none; padding: .15rem .55rem; border-radius: 999px; background: rgba(255,255,255,.7); }
.pending-item:hover { background: #fff; }
.pending-item b { color: #c2410c; }
/* 今日优先处理：今天不看 */
.todo-dismiss { font-size: .75rem; white-space: nowrap; }
.todo-restore { padding: .5rem .75rem 0; }
/* 库存预警：批量知悉 */
.alert-status-tabs { display: flex; gap: .35rem; flex-wrap: wrap; }
.alert-bulk-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .6rem; padding: .55rem .75rem; border-radius: 10px; background: rgba(110,123,150,.07); }
.alert-bulk-bar input[name=note] { max-width: 320px; flex: 1 1 200px; }
.alert-reason { max-width: 260px; white-space: normal; line-height: 1.35; }
.metric-card.is-active { outline: 2px solid var(--ui-primary, #6e7bff); }
/* 现状 / 变化 切换 */
.view-toggle { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem; border-radius: 999px; background: rgba(110,123,150,.1); }
.view-toggle-item { padding: .3rem .9rem; border-radius: 999px; color: #4b5563; text-decoration: none; font-size: .85rem; }
.view-toggle-item.active { background: #fff; color: var(--ui-text, #111827); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.view-toggle-sep { width: 1px; height: 1.2rem; background: rgba(110,123,150,.3); margin: 0 .25rem; }
/* 变化视图 */
.change-clear-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.25rem; align-items: center; }
.change-bars { display: grid; gap: .35rem; }
.change-bar-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 7.5rem; gap: .6rem; align-items: center; font-size: .82rem; }
.change-bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.change-bar { display: block; height: 10px; border-radius: 5px; background: rgba(110,123,150,.14); overflow: hidden; }
.change-bar i { display: block; height: 100%; border-radius: 5px; background: #b7bfd0; }
.change-bar.is-cur i { background: #2e9d5b; }
.change-mini { min-width: 120px; } .change-mini .change-bar { height: 6px; margin: 2px 0; }
.change-stack-row { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .6rem; align-items: center; font-size: .8rem; margin-bottom: .35rem; }
.health-stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: rgba(110,123,150,.12); }
.health-stack span { display: block; height: 100%; }
.status-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.change-score { font-size: 1.6rem; font-weight: 700; margin: .25rem 0 .75rem; }
.change-score-from { color: #8a93a6; }
.change-moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.change-move { display: block; padding: .7rem .8rem; border-radius: 10px; text-decoration: none; color: inherit; }
.change-move b { font-size: 1.4rem; margin-right: .25rem; }
.change-move small { display: block; color: #6b7280; font-size: .75rem; margin-top: .15rem; }
.change-move.is-worse { background: #fde9e7; } .change-move.is-worse b { color: #b5381b; }
.change-move.is-better { background: #e6f6ec; } .change-move.is-better b { color: #17794a; }
@media (max-width: 767.98px) {
  .change-clear-main, .change-moves { grid-template-columns: 1fr; }
  .change-bar-row { grid-template-columns: 5rem minmax(0, 1fr) 6.5rem; }
}
.alert-status-tabs .worklist-tab.active { background: #e8ebff; color: #3e49c9; font-weight: 600; }
.change-table td, .change-table th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.change-table .change-name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
/* 变化：时间轴 */
.timeline-form { display: grid; gap: .6rem; }
.timeline-presets { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border-radius: 999px; background: rgba(110,123,150,.1); width: fit-content; }
.timeline-dates { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-size: .85rem; }
.timeline-dates label { display: inline-flex; align-items: center; gap: .35rem; }
.timeline-dates input { width: 9.5rem; }
.timeline-axis { position: relative; height: 2.4rem; }
.timeline-track { position: absolute; left: 0; right: 0; top: .7rem; height: 6px; border-radius: 3px; background: rgba(110,123,150,.18); }
.timeline-range { position: absolute; top: 0; height: 100%; border-radius: 3px; background: var(--ui-primary, #6e7bff); }
.timeline-thumb { position: absolute; left: 0; right: 0; top: .25rem; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; height: 1rem; }
.timeline-thumb::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--ui-primary, #6e7bff); cursor: pointer; }
.timeline-thumb::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--ui-primary, #6e7bff); cursor: pointer; }
.timeline-ends { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: .7rem; color: #8a93a6; }
.change-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
/* 评分排名 */
.rank-title { font-size: .78rem; font-weight: 700; color: #6b7280; margin: .6rem 0 .25rem; }
.rank-table .rank-worst { color: #b5381b; font-weight: 700; }
.rank-problem { min-width: 220px; white-space: normal; }
/* 周 K 线 */
.kline-wrap { position: relative; }
.kline-svg { width: 100%; height: auto; display: block; }
.kline-grid { stroke: rgba(110,123,150,.18); stroke-width: 1; }
.kline-label { font-size: 10px; fill: #8a93a6; }
.kline-hit { fill: transparent; }
.kline-candle:hover .kline-hit { fill: rgba(110,123,150,.08); }
.kline-candle.is-up .kline-body, .kline-candle.is-up .kline-wick { fill: #e5534b; stroke: #e5534b; }
.kline-candle.is-down .kline-body, .kline-candle.is-down .kline-wick { fill: #2e9d5b; stroke: #2e9d5b; }
.kline-wick { stroke-width: 1.5; }
.kline-vol { fill: rgba(110,123,255,.45); }
.kline-tip { position: absolute; z-index: 5; min-width: 190px; padding: .5rem .7rem; border-radius: 8px; background: #fff; box-shadow: 0 6px 20px rgba(17,24,39,.15); font-size: .78rem; pointer-events: none; }
.kline-tip div { display: flex; justify-content: space-between; gap: 1rem; line-height: 1.7; }
.kline-tip b { font-variant-numeric: tabular-nums; }
@media (max-width: 991.98px) { .change-summary { grid-template-columns: 1fr; } }
/* 处理清单搜索（搜索按钮紧挨输入框） */
.worklist-search { display: flex; gap: .5rem; align-items: flex-start; padding: .6rem 1rem; }
.worklist-search textarea { flex: 1 1 auto; max-width: 560px; min-height: 31px; max-height: 90px; resize: vertical; }
.worklist-search .btn { flex-shrink: 0; }
.quick-stop { font-size: .72rem; color: #b5381b; margin-left: .35rem; }
.todo-stock { min-width: 110px; }
tr:target > td { background: #fff7d6 !important; transition: background 1.5s; }
.move-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.move-tile { display: block; padding: .55rem .7rem; border-radius: 10px; text-decoration: none; color: inherit; border: 2px solid transparent; }
.move-tile b { font-size: 1.25rem; margin-right: .2rem; }
.move-tile small { display: block; color: #6b7280; font-size: .72rem; margin-top: .1rem; }
.move-tile.is-worse { background: #fde9e7; } .move-tile.is-worse b { color: #b5381b; }
.move-tile.is-better { background: #e6f6ec; } .move-tile.is-better b { color: #17794a; }
.move-tile.is-risk { background: #fff1e6; } .move-tile.is-risk b { color: #c2410c; }
.move-tile.is-dead { background: #f3eefe; } .move-tile.is-dead b { color: #6b46c1; }
.move-tile.active { border-color: rgba(17,24,39,.25); }
/* 顶部页签 */
.page-tabs { position: sticky; top: var(--ui-topbar-height); z-index: 1010; display: flex; gap: .25rem; overflow-x: auto; padding: .35rem 1rem 0; background: var(--ui-bg, #f3f4f8); border-bottom: 1px solid var(--ui-border, #e5e7eb); }
.page-tab { display: flex; align-items: center; flex: 0 0 auto; max-width: 200px; border-radius: 8px 8px 0 0; background: rgba(110,123,150,.1); }
.page-tab.active { background: #fff; box-shadow: 0 -1px 0 var(--ui-border, #e5e7eb) inset; }
.page-tab-label { border: 0; background: none; padding: .35rem .7rem; font-size: .8rem; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.page-tab.active .page-tab-label { color: var(--ui-text, #111827); font-weight: 600; }
.page-tab-icon { border: 0; background: none; padding: 0 .4rem; color: #8a93a6; font-size: .85rem; line-height: 1; }
.page-tab-icon:hover { color: #111827; }
.tab-frames { width: 100%; }
.tab-frame { display: block; width: 100%; height: calc(100dvh - var(--ui-topbar-height) - 2.4rem); border: 0; background: var(--ui-bg, #f3f4f8); }
/* 页面在页签（iframe）里：不显示侧栏、顶栏 */
html.in-tab { --ui-topbar-height: 0px; }
html.in-tab .app-sidebar, html.in-tab .app-topbar, html.in-tab .page-tabs, html.in-tab .dev-copy-banner { display: none; }
html.in-tab .app-main { margin-left: 0 !important; width: 100%; }
@media (max-width: 767.98px) { .page-tabs { display: none; } }

/* ---------- 采购登记 ---------- */
.purchase-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .75rem; }
.purchase-tab { padding: .35rem .8rem; border-radius: 999px; background: var(--ui-bg-subtle, #eef0f5); color: #4a5568; font-size: .82rem; text-decoration: none; }
.purchase-tab span { margin-left: .25rem; color: #8a94a6; font-variant-numeric: tabular-nums; }
.purchase-tab.active { background: var(--ui-primary); color: #fff; }
.purchase-tab.active span { color: rgb(255 255 255 / 80%); }
.filter-search { flex: 2 1 20rem; }
.purchase-filter .filter-field:not(.filter-search):not(.purchase-dates) { flex: 0 1 10.5rem; }
.purchase-dates { flex: 0 1 20rem; }
.purchase-dates input { min-width: 0; }
.search-with-button { display: flex; gap: .35rem; align-items: flex-start; }
.search-with-button textarea { flex: 1 1 auto; min-height: calc(1.5em + .75rem + 2px); resize: vertical; }
.search-with-button .btn { flex: 0 0 auto; white-space: nowrap; border-radius: var(--ui-radius, .6rem); }
.purchase-table { font-size: .8rem; }
.purchase-table th { white-space: nowrap; }
.purchase-row { cursor: pointer; }
.purchase-note { min-width: 9rem; max-width: 16rem; white-space: normal; }
.purchase-name { min-width: 8rem; max-width: 12rem; white-space: normal; font-weight: 600; }
.purchase-logistics { min-width: 5rem; white-space: normal; }
.purchase-cat { max-width: 8rem; white-space: normal; }
.purchase-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: .45rem; background: #f2f4f8; }
.purchase-bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .6rem 1rem; border-top: 1px solid var(--ui-border, #e5e7eb); }
.purchase-stage-requested { background: #fff4d6; color: #8a5a00; }
.purchase-stage-approved { background: #e8ecff; color: #3843b8; }
.purchase-stage-purchased { background: #e2f4ff; color: #075985; }
.purchase-stage-arrived { background: #e5f6e8; color: #1f7a35; }
.purchase-stage-cancelled { background: #f1f2f4; color: #6b7280; }
.purchase-detail-images { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.purchase-detail-images figure { margin: 0; width: 160px; }
.purchase-detail-images img { width: 160px; height: 160px; object-fit: contain; border-radius: .6rem; background: #f2f4f8; }
.purchase-detail-images figcaption { font-size: .72rem; margin-top: .25rem; }
.purchase-detail-grid { display: grid; grid-template-columns: 11rem 1fr; gap: .35rem 1rem; font-size: .85rem; margin: 0; }
.purchase-detail-grid dt { color: #6b7280; font-weight: 500; }
.purchase-detail-grid dd { margin: 0; word-break: break-word; }
.purchase-price-box { margin-top: 1rem; padding: .75rem 1rem; border-radius: .75rem; background: var(--ui-primary-faint, #f6f7ff); }
.purchase-form-section { margin: .25rem 0 .5rem; font-size: .78rem; font-weight: 700; color: #6b7280; letter-spacing: .02em; }
.purchase-price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.purchase-price-cards .surface-card { padding: .9rem 1rem; }
@media (max-width: 767.98px) { .purchase-detail-grid { grid-template-columns: 1fr; } .purchase-detail-grid dt { margin-top: .4rem; } }
.purchase-order-waitbuyerpay { background: #fff4d6; color: #8a5a00; }
.purchase-order-waitsellersend { background: #e8ecff; color: #3843b8; }
.purchase-order-waitbuyerreceive, .purchase-order-confirm_goods, .purchase-order-confirm_goods_but_not_fund { background: #e2f4ff; color: #075985; }
.purchase-order-success { background: #e5f6e8; color: #1f7a35; }
.purchase-order-cancel, .purchase-order-terminated { background: #f1f2f4; color: #6b7280; }

/* 采购登记 v2：状态标签、简洁视图（左侧固定列）、按单分组 */
.purchase-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.purchase-toolbar .purchase-tabs { margin-bottom: 0; }
.purchase-toolbar-right { display: flex; align-items: center; gap: .5rem; }
.purchase-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: -.1rem 0 .6rem; }
.purchase-chip { padding: .2rem .65rem; border: 1px solid var(--ui-border, #e5e7eb); border-radius: 999px; font-size: .76rem; color: #4a5568; text-decoration: none; background: #fff; }
.purchase-chip.active { border-color: var(--ui-primary); color: var(--ui-primary); background: var(--ui-primary-faint, #f6f7ff); }
.purchase-tag-requested { background: #fff4d6; color: #8a5a00; }
.purchase-tag-to_buy { background: #ffe9e6; color: #b42318; }
.purchase-tag-transit, .purchase-tag-transit_offline { background: #e2f4ff; color: #075985; }
.purchase-tag-qianyi_transit { background: #e8ecff; color: #3843b8; }
.purchase-tag-partial { background: #fff1e0; color: #9a4b00; }
.purchase-tag-arrived { background: #e5f6e8; color: #1f7a35; }
.purchase-tag-overdue { background: #fde68a; color: #7a4a00; }
.purchase-tag-cancelled { background: #f1f2f4; color: #6b7280; }
.purchase-progress { margin-top: .15rem; font-size: .72rem; color: #6b7280; }
.purchase-sub { font-size: .72rem; color: #8a94a6; font-weight: 400; }
.purchase-table-compact { font-size: .82rem; }
.purchase-table-compact td { padding-top: .45rem; padding-bottom: .45rem; }
.purchase-table-compact .pin { position: sticky; z-index: 2; background: #fff; }
.purchase-table-compact thead .pin { z-index: 5; background: var(--ui-bg-subtle, #f5f7fa); }
.purchase-table-compact .pin-0 { left: 0; width: 2.2rem; min-width: 2.2rem; }
.purchase-table-compact .pin-1 { left: 0; width: 3.6rem; min-width: 3.6rem; }
.purchase-table-compact.has-check .pin-1 { left: 2.2rem; }
.purchase-table-compact .pin-2 { left: 3.6rem; min-width: 14rem; max-width: 18rem; box-shadow: 6px 0 6px -6px rgb(15 23 42 / 18%); }
.purchase-table-compact.has-check .pin-2 { left: 5.8rem; }
.purchase-table-compact tbody tr:hover .pin { background: #f7f8fb; }
.purchase-thumb-empty { display: inline-block; }
.purchase-name-line { font-weight: 600; line-height: 1.3; white-space: normal; }
.purchase-sku-line { font-size: .76rem; margin-top: .1rem; }
.purchase-note-line { font-size: .72rem; color: #8a94a6; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.purchase-qty { font-variant-numeric: tabular-nums; }
.purchase-qty .arrow { margin: 0 .3rem; color: #b6bdca; }
.purchase-order-cell { max-width: 13rem; }
.purchase-group-row td { background: #f3f5fa !important; font-size: .76rem; font-weight: 600; color: #475569; padding-top: .35rem !important; padding-bottom: .35rem; }
.purchase-group-row .pin-text { position: sticky; left: .5rem; }
.purchase-tag-order_cancelled { background: #fde2e1; color: #9b1c1c; }
.purchase-tag-exception { background: #fee2e2; color: #b91c1c; }
.purchase-tag-bought_no_order { background: #e0f2fe; color: #0369a1; }

/* 采购登记表单 v2 */
.purchase-template-bar { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; padding: .5rem .75rem; border-radius: .6rem; background: var(--ui-bg-subtle, #f5f7fa); }
.purchase-template-bar select { max-width: 18rem; }
.purchase-lookup-wrap { position: relative; }
.purchase-lookup-menu { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: .2rem; max-height: 22rem; overflow-y: auto; background: #fff; border: 1px solid var(--ui-border, #e5e7eb); border-radius: .6rem; box-shadow: 0 12px 28px rgb(15 23 42 / 14%); }
.purchase-lookup-item { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .45rem .65rem; border: 0; background: none; text-align: left; font-size: .82rem; }
.purchase-lookup-item:hover, .purchase-lookup-item.active { background: var(--ui-primary-faint, #f6f7ff); }
.purchase-lookup-item.new { position: sticky; top: 0; z-index: 1; background: #fff; border-bottom: 1px solid var(--ui-border, #e5e7eb); color: var(--ui-primary); }
.purchase-lookup-item.new span { color: #6b7280; }
.purchase-lookup-item img, .purchase-lookup-item .ph { flex: 0 0 36px; width: 36px; height: 36px; object-fit: cover; border-radius: .4rem; background: #f2f4f8; }
.purchase-lookup-item small { color: #6b7280; }
.purchase-lookup-item .warn, .purchase-warn b { color: #b45309; }
.purchase-last-box { margin: .25rem 0 .5rem; padding: .6rem .8rem; border: 1px dashed var(--ui-border, #d8dce5); border-radius: .6rem; background: #fbfcfe; }
.purchase-last-head { font-size: .8rem; color: #475569; margin-bottom: .35rem; }
.purchase-last-body { display: flex; gap: .6rem; align-items: flex-start; }
.purchase-last-body img { width: 64px; height: 64px; object-fit: cover; border-radius: .5rem; background: #f2f4f8; }
.purchase-warn { margin-top: .35rem; font-size: .78rem; color: #92400e; background: #fff7e6; border-radius: .4rem; padding: .25rem .5rem; }
.purchase-image-slots { display: flex; flex-wrap: wrap; gap: .75rem; margin: .25rem 0 .75rem; }
.purchase-image-slot { width: 13rem; padding: .5rem; border: 1.5px dashed #c7cdd9; border-radius: .7rem; cursor: pointer; background: #fbfcfe; outline: none; }
.purchase-image-slot:focus, .purchase-image-slot.over { border-color: var(--ui-primary); background: var(--ui-primary-faint, #f6f7ff); }
.purchase-image-slot.filled { border-style: solid; }
.purchase-image-slot input[type=file] { display: none; }
.purchase-image-slot-title { font-size: .76rem; font-weight: 700; color: #475569; margin-bottom: .3rem; }
.purchase-image-slot-body { min-height: 5.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; font-size: .74rem; color: #8a94a6; text-align: center; }
.purchase-image-slot-body img { max-width: 100%; max-height: 7rem; border-radius: .45rem; }
.purchase-image-slot.reused .purchase-image-slot-body img { cursor: zoom-in; }
.purchase-lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; background: rgb(15 23 42 / 82%); cursor: zoom-out; }
.purchase-lightbox img { max-width: 92vw; max-height: 86vh; border-radius: .5rem; background: #fff; box-shadow: 0 20px 50px rgb(0 0 0 / 40%); }
.purchase-lightbox span { color: #e2e8f0; font-size: .8rem; }
.purchase-price-field { position: relative; }
.purchase-price-hint { min-height: 1rem; font-size: .72rem; margin-top: -.6rem; }
.purchase-price-hint.warn { color: #b45309; font-weight: 600; }
.purchase-price-pop { position: absolute; z-index: 30; left: 0; top: calc(100% + .15rem); width: 22rem; padding: .55rem .7rem; background: #fff; border: 1px solid var(--ui-border, #e5e7eb); border-radius: .6rem; box-shadow: 0 12px 28px rgb(15 23 42 / 14%); font-size: .78rem; }
.purchase-price-pop .row-line { display: grid; grid-template-columns: 5.5rem 4.5rem 3rem 1fr; gap: .4rem; padding: .12rem 0; border-top: 1px solid #f1f3f7; }
.purchase-price-pop .sup { color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 采购审核 / 提交需求 / 填写采购信息 */
.purchase-section-tabs { margin: -.25rem 0 .75rem; }
.review-table .review-check { width: 2rem; }
.review-product { display: flex; gap: .55rem; align-items: flex-start; min-width: 14rem; }
.review-product img, .review-product .ph { flex: 0 0 44px; width: 44px; height: 44px; object-fit: cover; border-radius: .45rem; background: #f2f4f8; }
.review-actions-col { min-width: 15rem; }
.review-actions { display: flex; gap: .35rem; align-items: center; }
.review-actions input { width: 5.5rem; }
.purchase-flow-hint { font-size: .78rem; color: #6b7280; margin: 0 0 .25rem; }
.purchase-req .purchase-form-section:first-of-type { margin-top: 0; }
.purchase-req-bottom { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: .75rem; }
.purchase-req-bottom .purchase-image-slots { margin: 0; }
.purchase-pack-details { margin-top: .25rem; }
.purchase-pack-details > summary { cursor: pointer; font-size: .8rem; color: var(--ui-primary); margin-bottom: .35rem; }
.purchase-pack-details .purchase-pack-paste, .purchase-pack-details + .purchase-pack-sync { margin-left: 0; }
.purchase-buy-summary { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem .8rem; border-radius: .6rem; background: var(--ui-bg-subtle, #f5f7fa); }
.purchase-buy-summary img { width: 56px; height: 56px; object-fit: cover; border-radius: .45rem; }
.purchase-fill-qty { font-size: .75rem; margin-top: -.4rem; }
.modal-header .purchase-template-bar { margin-bottom: 0; padding: 0; background: none; }
.modal-header .purchase-template-bar .btn { white-space: nowrap; }
.modal-header .purchase-template-bar select { width: auto; min-width: 9rem; }
@media (max-width: 767px) { .purchase-req-bottom { grid-template-columns: 1fr; } }

/* 采购登记：箱规四组数据（厂家整箱 / 厂家单个 / 实测整箱 / 实测单个） */
.purchase-pack-ref { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem .75rem; margin: .1rem 0 .5rem; padding: .5rem .75rem; border-radius: .6rem; background: var(--ui-bg-subtle, #f5f7fa); font-size: .78rem; }
.purchase-pack-ref .k { color: #6b7280; font-size: .72rem; }
.purchase-pack-ref .v { font-weight: 600; }
.purchase-pack-ref .v.empty { font-weight: 400; color: #9ca3af; }
.purchase-pack-ref .note { grid-column: 1 / -1; color: #6b7280; }
.purchase-pack-grid { display: grid; grid-template-columns: 6.5rem 1fr; gap: .35rem .75rem; align-items: center; }
.purchase-pack-label { font-size: .8rem; font-weight: 600; color: #475569; }
.purchase-pack-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; }
.purchase-pack-field { display: flex; flex-direction: column; gap: .1rem; width: 6.5rem; margin: 0; }
.purchase-pack-field > span:first-child { font-size: .72rem; color: #6b7280; }
.purchase-pack-field input { padding: .25rem .45rem; font-size: .85rem; }
.purchase-pack-note { font-size: .72rem; color: #8a94a6; align-self: center; }
.purchase-pack-paste { display: flex; align-items: center; gap: .5rem; margin: .45rem 0 .25rem 7.25rem; }
.purchase-pack-paste input { max-width: 28rem; }
.purchase-pack-sync { margin: .15rem 0 .25rem 7.25rem; }
@media (max-width: 767px) {
  .purchase-pack-ref { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-pack-grid { grid-template-columns: 1fr; }
  .purchase-pack-paste, .purchase-pack-sync { margin-left: 0; }
  .purchase-pack-field { width: calc(33% - .4rem); }
}

/* 弹窗内容外面包了一层 form / div 时，Bootstrap 的“可滚动弹窗”找不到 .modal-body：让这一层撑满弹窗高度，正文区滚动，标题和按钮固定 */
.modal-dialog-scrollable #page-modal-content > form,
.modal-dialog-scrollable #page-modal-content > [data-modal-size] { display: flex; flex-direction: column; min-height: 0; max-height: 100%; overflow: hidden; }
.modal-dialog-scrollable #page-modal-content > form > .modal-body,
.modal-dialog-scrollable #page-modal-content > [data-modal-size] > .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* 箱唛规则 / 生成箱唛 */
.carton-header-text { white-space: pre-line; font-weight: 600; min-width: 10rem; line-height: 1.35; }
.carton-placeholder-help code { color: var(--ui-primary); background: var(--ui-primary-faint, #f6f7ff); padding: 0 .25rem; border-radius: .25rem; }
.carton-insert-bar { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .35rem; }
.carton-insert-bar .btn { padding: .1rem .45rem; font-size: .75rem; }
.carton-rule-layout { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1.25rem; }
.carton-canvas, .carton-preview canvas { display: block; width: 100%; aspect-ratio: 2 / 3; height: auto; border: 1px solid var(--ui-border, #e5e7eb); border-radius: .5rem; background: #fff; box-shadow: 0 1px 3px rgb(15 23 42 / 6%); }
.carton-make { display: grid; grid-template-columns: minmax(18rem, 25rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.carton-settings { padding: 1rem 1.1rem; }
.carton-line-list { margin: .35rem 0 .9rem; padding-left: 1.1rem; max-height: 9rem; overflow: auto; }
.carton-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.carton-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 18rem)); gap: 1rem; }
.carton-preview { margin: 0; }
.carton-preview figcaption { margin-top: .35rem; display: flex; align-items: center; justify-content: center; gap: .35rem; font-size: .78rem; color: #6b7280; }
.carton-preview figcaption span { margin-right: auto; font-weight: 600; color: #344054; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carton-preview figcaption .btn { padding: .1rem .55rem; font-size: .75rem; }
.carton-output { display: grid; gap: 1rem; min-width: 0; }
.carton-copybar { padding: .85rem 1rem .1rem; border-color: var(--ui-primary-soft, #dfe3ff); background: var(--ui-primary-faint, #f6f7ff); }
.carton-copybar-title { font-weight: 700; margin-bottom: .5rem; }
.carton-copybar-title span, .carton-block-head h2 span { font-weight: 400; font-size: .8rem; color: #6b7280; margin-left: .4rem; }
.carton-block { border-top: 1px solid var(--ui-border, #e5e7eb); padding-top: .85rem; }
.carton-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem; }
.carton-block-head h2 { font-size: 1rem; font-weight: 700; margin: 0 0 .5rem; }
.carton-block-head .carton-actions { margin-bottom: .5rem; }
.carton-labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 15rem)); gap: 1rem; }
.carton-labels canvas { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; border: 1px solid var(--ui-border, #e5e7eb); border-radius: .4rem; background: #fff; box-shadow: 0 1px 3px rgb(15 23 42 / 6%); }
.carton-script { font-size: .875rem; line-height: 1.6; }
.carton-script-form textarea { font-size: .875rem; line-height: 1.6; }
@media (max-width: 991.98px) { .carton-make, .carton-rule-layout { grid-template-columns: 1fr; } .carton-rule-preview { max-width: 15rem; } }
.purchase-bulk-sep { width: 1px; height: 1.2rem; margin: 0 .2rem; background: var(--ui-border, #e5e7eb); }

/* ===== 采购登记 / 采购审核 v3（2026-11-26 重做） ===== */
.pr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: .25rem 0 1rem; }
.pr-eyebrow { font-size: .72rem; font-weight: 600; color: var(--ui-text-subtle, #9aa0ab); letter-spacing: .04em; }
.pr-title { font-size: 1.6rem; font-weight: 700; margin: .1rem 0 .35rem; color: var(--ui-ink, #1e2737); }
.pr-flow { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; padding: 0; margin: 0; font-size: .76rem; color: var(--ui-text-muted, #5f6675); }
.pr-flow li { display: inline-flex; align-items: center; gap: .25rem; }
.pr-flow li + li::before { content: "›"; color: var(--ui-text-subtle, #9aa0ab); margin-right: .1rem; }
.pr-head-actions { display: flex; gap: .5rem; align-items: center; }
.pr-btn { border-radius: 999px; padding: .5rem 1.05rem; font-weight: 600; font-size: .86rem; display: inline-flex; align-items: center; gap: .35rem; }
.pr-btn.btn-light { background: #fff; border: 1px solid var(--ui-border, #e4e7ec); }
.pr-btn-sm { border-radius: 999px; padding: .38rem .8rem; font-size: .8rem; font-weight: 600; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); }
.pr-count { display: inline-block; min-width: 1.35rem; padding: .05rem .4rem; border-radius: 999px; font-size: .7rem; font-weight: 600; text-align: center; background: #eef0f3; color: #5f6675; font-variant-numeric: tabular-nums; }
.pr-count.warn { background: #fff1d6; color: #9a5b00; }
.pr-count.danger { background: #fde4e2; color: #b42318; }
.pr-card { background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: var(--ui-radius-md, 1.125rem); box-shadow: 0 1px 2px rgb(30 39 55 / 4%); overflow: hidden; }
.pr-tabs { display: flex; gap: 1.35rem; padding: 0 1.25rem; border-bottom: 1px solid var(--ui-border, #e4e7ec); overflow-x: auto; scrollbar-width: none; }
.pr-tab { position: relative; display: inline-flex; align-items: center; gap: .35rem; padding: .9rem 0 .8rem; font-size: .86rem; font-weight: 500; color: var(--ui-text-muted, #5f6675); text-decoration: none; white-space: nowrap; }
.pr-tab:hover { color: var(--ui-ink, #1e2737); }
.pr-tab.active { color: var(--ui-ink, #1e2737); font-weight: 650; }
.pr-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ui-primary, #6e7bff); }
.pr-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem 1.25rem 0; }
.pr-chip { padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--ui-border, #e4e7ec); font-size: .76rem; color: var(--ui-text-muted, #5f6675); text-decoration: none; background: #fff; }
.pr-chip.active { border-color: var(--ui-primary, #6e7bff); color: var(--ui-primary-strong, #5562f0); background: var(--ui-primary-faint, #f6f7ff); }
.pr-chip-n { font-variant-numeric: tabular-nums; opacity: .75; margin-left: .15rem; }
.pr-kind-hint { font-size: .78rem; color: var(--ui-text-muted, #5f6675); padding: .45rem 1.25rem 0; }
.pr-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--ui-border-soft, #eef0f3); }
.pr-search { position: relative; display: flex; flex: 1 1 22rem; min-width: 14rem; }
.pr-search-icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-52%); color: var(--ui-text-subtle, #9aa0ab); font-size: 1.05rem; pointer-events: none; }
.pr-search textarea { flex: 1; resize: none; height: 2.4rem; min-height: 2.4rem; padding: .55rem .75rem .55rem 2.1rem; border: 1px solid var(--ui-border, #e4e7ec); border-right: 0; border-radius: 999px 0 0 999px; font-size: .86rem; line-height: 1.3; background: var(--ui-bg-subtle, #f6f7f9); overflow: hidden; white-space: nowrap; }
.pr-search textarea:focus { outline: none; background: #fff; border-color: var(--ui-primary, #6e7bff); box-shadow: 0 0 0 3px var(--ui-primary-soft, #eef0ff); }
.pr-search .btn { border-radius: 0 999px 999px 0; padding: 0 1rem; height: 2.4rem; font-weight: 600; font-size: .84rem; }
/* 搜索联想下拉（像谷歌）：js/search-suggest.js */
.search-suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 1060; margin: 0; padding: .3rem 0; list-style: none; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .8rem; box-shadow: 0 10px 28px rgba(16, 24, 40, .12); max-height: 22rem; overflow-y: auto; }
.search-suggest li { display: flex; align-items: baseline; gap: .6rem; padding: .45rem .9rem; cursor: pointer; font-size: .86rem; }
.search-suggest li.active, .search-suggest li:hover { background: var(--ui-primary-soft, #eef0ff); }
.search-suggest .ss-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ui-text, #1f2430); }
.search-suggest .ss-sku { flex: none; color: var(--ui-text-subtle, #8a909c); font-size: .78rem; }
.search-suggest b { font-weight: 700; color: var(--ui-primary, #4f5bd5); }
.pr-select { width: auto; min-width: 8.5rem; height: 2.4rem; border-radius: 999px; font-size: .84rem; border-color: var(--ui-border, #e4e7ec); }
.pr-more { position: relative; }
.pr-more > summary { list-style: none; cursor: pointer; height: 2.4rem; display: inline-flex; align-items: center; }
.pr-more > summary::-webkit-details-marker { display: none; }
.pr-more > summary.active { color: var(--ui-primary, #5b5ef0); border-color: currentColor; font-weight: 600; }
.pr-more-panel { position: absolute; z-index: 40; top: calc(100% + .4rem); right: 0; width: 18rem; display: grid; gap: .55rem; padding: .9rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; box-shadow: 0 16px 36px rgb(30 39 55 / 14%); }
.pr-more-panel label { display: grid; gap: .2rem; font-size: .74rem; color: var(--ui-text-muted, #5f6675); }
.pr-seg { margin-left: auto; display: inline-flex; padding: .2rem; border-radius: 999px; background: var(--ui-bg-subtle, #f6f7f9); border: 1px solid var(--ui-border-soft, #eef0f3); }
.pr-seg a { padding: .32rem .85rem; border-radius: 999px; font-size: .8rem; font-weight: 500; color: var(--ui-text-muted, #5f6675); text-decoration: none; }
.pr-seg a.active { background: #fff; color: var(--ui-ink, #1e2737); font-weight: 600; box-shadow: 0 1px 3px rgb(30 39 55 / 12%); }
.pr-scroll { max-height: calc(100vh - 19rem); overflow: auto; }
.pr-table { margin: 0; font-size: .84rem; }
.pr-table thead th { position: sticky; top: 0; z-index: 3; background: #fafbfc; color: var(--ui-text-subtle, #9aa0ab); font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: .6rem .75rem; border-bottom: 1px solid var(--ui-border, #e4e7ec); white-space: nowrap; }
.pr-table td { padding: .7rem .75rem; border-color: var(--ui-border-soft, #eef0f3); vertical-align: middle; }
.pr-table tbody tr.pr-row { cursor: pointer; transition: background-color .12s; }
.pr-table tbody tr.pr-row:hover { background: #f8f9ff; }
.pr-table tbody tr.pr-row:hover .pr-chev-col { color: var(--ui-primary, #6e7bff); }
.pr-check { width: 2.5rem; padding-left: 1.25rem; }
.pr-product { display: flex; align-items: center; gap: .75rem; min-width: 16rem; }
.pr-w-who { width: 8.5rem; } .pr-w-qty { width: 7rem; } .pr-w-price { width: 13rem; } .pr-w-status { width: 9.5rem; }
.pr-thumb { flex: 0 0 48px; width: 48px; height: 48px; border-radius: .7rem; object-fit: cover; background: #f2f4f7; border: 1px solid var(--ui-border-soft, #eef0f3); }
.pr-thumb-empty { display: inline-block; background: repeating-linear-gradient(135deg, #f4f5f8 0 6px, #eef0f4 6px 12px); }
.pr-product-text { min-width: 0; }
.pr-name { font-weight: 600; color: var(--ui-ink, #1e2737); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .2rem; font-size: .72rem; color: var(--ui-text-subtle, #9aa0ab); }
.pr-sku { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .72rem; color: var(--ui-text-muted, #5f6675); background: var(--ui-bg-subtle, #f6f7f9); padding: .05rem .35rem; border-radius: .3rem; }
.pr-mini { font-size: .66rem; font-weight: 600; padding: .05rem .4rem; border-radius: .3rem; background: #eef0f3; color: #5f6675; }
.pr-mini.warn { background: #fff1d6; color: #9a5b00; }
.pr-note { margin-top: .2rem; font-size: .72rem; color: var(--ui-text-muted, #5f6675); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22rem; }
.pr-note::before { content: "“"; } .pr-note::after { content: "”"; }
.pr-who { white-space: nowrap; }
.pr-sub { font-size: .72rem; color: var(--ui-text-subtle, #9aa0ab); }
.pr-qty { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-big { font-size: 1.02rem; font-weight: 700; color: var(--ui-ink, #1e2737); line-height: 1.2; }
.pr-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-money { font-weight: 600; color: var(--ui-ink, #1e2737); }
.pr-supplier { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; }
.pr-status { white-space: nowrap; }
.pr-status .purchase-progress { font-size: .7rem; }
.pr-chev-col { width: 1.75rem; padding-right: 1.1rem !important; color: #c9ced8; font-size: 1.15rem; text-align: right; }
.pr-group-row td { background: #f6f7fb !important; font-size: .76rem; font-weight: 600; color: #475569; padding: .45rem 1.25rem; }
.pr-bulk { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .65rem 1.25rem; background: #1e2737; color: #fff; }
.pr-bulk .text-secondary { color: #aab2c2; }
.pr-bulk .btn { border-radius: 999px; font-weight: 600; }
.pr-bulk .btn-outline-success { color: #b8f27c; border-color: #4f6b2d; }
.pr-bulk .btn-outline-secondary { color: #dfe3ea; border-color: #4a5466; }
.pr-bulk .btn-outline-danger { color: #ffb4ab; border-color: #7a3a35; }
.pr-bulk .btn-outline-primary { color: #c5cbff; border-color: #4b54a8; }
.pr-bulk .btn:hover { background: rgb(255 255 255 / 10%); }
.pr-bulk-n { font-size: .84rem; margin-right: .25rem; }
.pr-foot { padding: .5rem 1.25rem; border-top: 1px solid var(--ui-border-soft, #eef0f3); }
.pr-card .purchase-table-full { margin: 0; }
.purchase-tag-rejected { background: #fde4e2; color: #b42318; }
@media (max-width: 767px) {
  .pr-head { align-items: flex-start; }
  .pr-head-actions { width: 100%; }
  .pr-head-actions .pr-btn { flex: 1; justify-content: center; }
  .pr-tabs, .pr-toolbar, .pr-chips, .pr-kind-hint { padding-left: .9rem; padding-right: .9rem; }
  .pr-seg { margin-left: 0; }
  .pr-scroll { max-height: none; }
  .pr-product { min-width: 12rem; }
}
.pr-flow li.now { color: var(--ui-primary-strong, #5562f0); font-weight: 600; }
.rv-checkall { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--ui-text-muted, #5f6675); }
.rv-list { padding: .9rem 1.25rem; display: grid; gap: .7rem; background: var(--ui-bg-subtle, #f6f7f9); }
.rv-card { display: grid; grid-template-columns: auto 72px minmax(0, 1.25fr) minmax(0, 1.2fr) 15.5rem; gap: 1rem; align-items: center; padding: .9rem 1.1rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: 1rem; transition: border-color .12s, box-shadow .12s; }
.rv-card.done { grid-template-columns: 72px minmax(0, 1.25fr) minmax(0, 1.2fr) 15.5rem; }
.rv-card:hover { border-color: var(--ui-border-strong, #d5d9e0); box-shadow: 0 4px 14px rgb(30 39 55 / 6%); }
.rv-card.picked { border-color: var(--ui-primary, #6e7bff); box-shadow: 0 0 0 3px var(--ui-primary-soft, #eef0ff); }
.rv-check { display: flex; align-items: center; }
.rv-thumb { display: block; width: 72px; height: 72px; border-radius: .85rem; overflow: hidden; background: #f2f4f7; border: 1px solid var(--ui-border-soft, #eef0f3); }
.rv-thumb img, .rv-thumb span { display: block; width: 100%; height: 100%; object-fit: cover; }
.rv-main { min-width: 0; }
.rv-name { display: block; font-weight: 650; font-size: .95rem; color: var(--ui-ink, #1e2737); text-decoration: none; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-name:hover { color: var(--ui-primary-strong, #5562f0); }
.rv-who { display: flex; align-items: center; gap: .35rem; margin-top: .45rem; font-size: .8rem; color: var(--ui-text, #1e2737); }
.rv-avatar { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--ui-primary-soft, #eef0ff); color: var(--ui-primary-strong, #5562f0); font-size: .68rem; font-weight: 700; }
.rv-note { margin-top: .45rem; padding: .35rem .6rem; border-radius: .55rem; background: #fffaf0; color: #7a5a1e; font-size: .76rem; line-height: 1.45; max-height: 3.2rem; overflow: hidden; }
.rv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.rv-stats > div { padding: .4rem .5rem; border-radius: .6rem; background: var(--ui-bg-subtle, #f6f7f9); }
.rv-stats span { display: block; font-size: .66rem; color: var(--ui-text-subtle, #9aa0ab); white-space: nowrap; }
.rv-stats b { display: block; font-size: .95rem; font-weight: 700; color: var(--ui-ink, #1e2737); font-variant-numeric: tabular-nums; }
.rv-stats > div.hot { background: #fff4e0; } .rv-stats > div.hot b { color: #9a5b00; }
.rv-last { margin-top: .45rem; font-size: .74rem; color: var(--ui-text-muted, #5f6675); }
.rv-decide { display: grid; gap: .5rem; justify-items: stretch; }
.rv-qty label { display: block; font-size: .68rem; color: var(--ui-text-subtle, #9aa0ab); margin-bottom: .2rem; }
.rv-qty input { height: 2.3rem; border-radius: .7rem; font-weight: 700; font-size: .95rem; text-align: center; }
.rv-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.rv-ok { background: #2f9e44; color: #fff; border: 0; border-radius: 999px; font-weight: 600; height: 2.2rem; }
.rv-ok:hover { background: #2b8a3e; color: #fff; }
.rv-no { background: #fff; color: #c2413a; border: 1px solid #f3c2bd; border-radius: 999px; font-weight: 600; height: 2.2rem; }
.rv-no:hover { background: #fff3f2; color: #b42318; }
.rv-decide .status-badge { justify-self: start; }
.rv-result { font-size: .82rem; color: var(--ui-text, #1e2737); }
.rv-empty { padding: 3rem 1rem; text-align: center; background: #fff; border: 1px dashed var(--ui-border-strong, #d5d9e0); border-radius: 1rem; }
.rv-empty-title { font-weight: 600; margin-bottom: .25rem; }
#review-bulk .pr-bulk { margin: 0; }
@media (max-width: 1100px) {
  .rv-card { grid-template-columns: auto 64px minmax(0, 1fr) 14rem; }
  .rv-card.done { grid-template-columns: 64px minmax(0, 1fr) 14rem; }
  .rv-ref { grid-column: 3 / -1; grid-row: 2; }
  .rv-card.done .rv-ref { grid-column: 2 / -1; }
  .rv-thumb { width: 64px; height: 64px; }
}
@media (max-width: 767px) {
  .rv-list { padding: .7rem; }
  .rv-card, .rv-card.done { grid-template-columns: auto 56px minmax(0, 1fr); gap: .7rem; }
  .rv-card.done { grid-template-columns: 56px minmax(0, 1fr); }
  .rv-thumb { width: 56px; height: 56px; }
  .rv-ref, .rv-decide { grid-column: 1 / -1; grid-row: auto; }
  .rv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== 提交采购需求：一张单多个 SKU ===== */
.bt-body { background: var(--ui-bg-subtle, #f6f7f9); }
.bt-section-title { font-size: .82rem; font-weight: 650; color: var(--ui-ink, #1e2737); margin-bottom: .45rem; }
.bt-section-title span { font-weight: 400; color: var(--ui-text-subtle, #9aa0ab); margin-left: .35rem; font-size: .76rem; }
.bt-header { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem .75rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; }
.bt-header label { display: grid; gap: .25rem; font-size: .74rem; color: var(--ui-text-muted, #5f6675); margin: 0; }
.bt-header .bt-static { background: var(--bs-tertiary-bg, #f4f5f7); color: var(--bs-body-color, #1f2430); cursor: default; }
.bt-header .bt-note { grid-column: 3 / -1; }
.bt-header .bt-offer { grid-column: 1 / 3; }
.bt-add { display: flex; gap: .5rem; align-items: center; }
.bt-search { position: relative; flex: 1; }
.bt-search .pr-search-icon { left: .8rem; }
.bt-search input { height: 2.6rem; padding-left: 2.1rem; border-radius: 999px; border-color: var(--ui-border, #e4e7ec); font-size: .9rem; }
.bt-search input:focus { border-color: var(--ui-primary, #6e7bff); box-shadow: 0 0 0 3px var(--ui-primary-soft, #eef0ff); }
.bt-paste { margin-top: .6rem; padding: .75rem; background: #fff; border: 1px dashed var(--ui-border-strong, #d5d9e0); border-radius: .8rem; }
.bt-paste textarea { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
.bt-rows { margin-top: .6rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; overflow: hidden; }
.bt-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 6.5rem 8.5rem 6.5rem 2rem; gap: .5rem .75rem; align-items: center; padding: .65rem .9rem; border-top: 1px solid var(--ui-border-soft, #eef0f3); outline: none; transition: background-color .3s; }
.bt-row:focus-within, .bt-row:focus { background: #fafbff; }
.bt-row.flash { background: #fff7e0; }
.bt-row-head { border-top: 0; padding-top: .5rem; padding-bottom: .5rem; background: #fafbfc; font-size: .7rem; font-weight: 600; color: var(--ui-text-subtle, #9aa0ab); }
.bt-thumb { position: relative; width: 56px; height: 56px; margin: 0; border-radius: .7rem; overflow: hidden; background: #f2f4f7; border: 1px dashed var(--ui-border-strong, #d5d9e0); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bt-thumb-empty { font-size: .68rem; color: var(--ui-text-subtle, #9aa0ab); }
.bt-name-line { display: flex; align-items: center; gap: .45rem; }
.bt-name-line .pr-sku { flex: 0 0 auto; }
.bt-name-line .pr-sku.bt-new { background: #fff1d6; color: #9a5b00; font-family: inherit; font-weight: 600; }
.bt-name { border-color: transparent; background: transparent; font-weight: 600; padding-left: .25rem; }
.bt-name:hover, .bt-name:focus { border-color: var(--ui-border, #e4e7ec); background: #fff; }
.bt-info { font-size: .72rem; color: var(--ui-text-subtle, #9aa0ab); margin-top: .2rem; line-height: 1.4; }
.bt-info .warn { color: #b45309; font-weight: 600; }
.bt-row-error { font-size: .74rem; color: #c2413a; }
.bt-row-error:empty { display: none; }
.bt-qty { height: 2.4rem; text-align: center; font-weight: 700; font-size: 1rem; border-radius: .7rem; }
.bt-remove { width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: transparent; color: #b6bdca; font-size: 1.2rem; line-height: 1; }
.bt-remove:hover { background: #fde4e2; color: #b42318; }
.bt-empty { padding: 1.6rem 1rem; text-align: center; color: var(--ui-text-subtle, #9aa0ab); font-size: .84rem; border-top: 1px solid var(--ui-border-soft, #eef0f3); }
@media (max-width: 767px) {
  .bt-header { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-header .bt-note, .bt-header .bt-offer { grid-column: 1 / -1; }
  .bt-row { grid-template-columns: 48px minmax(0, 1fr) 5rem 2rem; }
  .bt-row .bt-price { grid-column: 2 / 3; }
  .bt-row .bt-sub { grid-column: 3 / 5; text-align: left; }
  .bt-row-head { display: none; }
}

/* ===== 采购单：列表行 / 整单详情 / 整单采购 / 审核分组 ===== */
.pr-w-date { width: 5.5rem; } .pr-w-amount { width: 7.5rem; }
.pr-date { white-space: nowrap; }
.pr-date-day { font-size: 1rem; font-weight: 700; color: var(--ui-ink, #1e2737); font-variant-numeric: tabular-nums; }
.pr-stack { position: relative; isolation: isolate; flex: 0 0 64px; width: 64px; height: 48px; }  /* 叠放的 z-index 只在组内生效，不会盖住固定表头 */
.pr-stack img, .pr-stack .pr-thumb-empty { position: absolute; top: 0; width: 44px; height: 44px; border-radius: .6rem; object-fit: cover; border: 2px solid #fff; box-shadow: 0 1px 3px rgb(30 39 55 / 15%); background: #f2f4f7; }
.pr-stack > :nth-child(1) { left: 0; z-index: 3; } .pr-stack > :nth-child(2) { left: 10px; top: 2px; z-index: 2; } .pr-stack > :nth-child(3) { left: 20px; top: 4px; z-index: 1; }
.pr-stack .pr-thumb-empty { display: block; }
.pr-batch-no { font-weight: 600; color: var(--ui-text-muted, #5f6675); font-variant-numeric: tabular-nums; }
.pr-note-inline { color: var(--ui-text-muted, #5f6675); max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-tagline { display: flex; align-items: center; gap: .3rem; margin: .1rem 0; }
.bd-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem .9rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; }
.bd-head span { display: block; font-size: .7rem; color: var(--ui-text-subtle, #9aa0ab); }
.bd-head b { font-size: .9rem; color: var(--ui-ink, #1e2737); word-break: break-all; }
.bd-head em { display: block; font-style: normal; font-size: .74rem; color: var(--ui-text-muted, #5f6675); }
.bd-head .bd-note { grid-column: 1 / -1; font-size: .82rem; }
.bd-lines { margin-top: .75rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; overflow: hidden; }
.bd-line { display: grid; grid-template-columns: 52px minmax(0, 1fr) 8.5rem 7.5rem 8.5rem 3.6rem; gap: .75rem; align-items: center; padding: .6rem .9rem; border-top: 1px solid var(--ui-border-soft, #eef0f3); font-size: .84rem; }
.bd-line .pr-thumb { width: 48px; height: 48px; }
.bd-line-head { border-top: 0; background: #fafbfc; font-size: .7rem; font-weight: 600; color: var(--ui-text-subtle, #9aa0ab); padding-top: .45rem; padding-bottom: .45rem; }
.bd-qty { font-variant-numeric: tabular-nums; color: var(--ui-text-muted, #5f6675); }
.bd-qty b { color: var(--ui-ink, #1e2737); }
.bp-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 4.5rem 7rem 7rem 7.5rem; gap: .75rem; align-items: center; padding: .6rem .9rem; border-top: 1px solid var(--ui-border-soft, #eef0f3); }
.bp-row .pr-thumb { width: 48px; height: 48px; }
.bp-row input { height: 2.3rem; border-radius: .6rem; text-align: right; font-variant-numeric: tabular-nums; }
.bp-row .bp-qty { font-weight: 700; text-align: center; }
.bp-skip { opacity: .55; }
.bp-skip-note { grid-column: 3 / -1; font-size: .78rem; color: var(--ui-text-muted, #5f6675); }
.rv-batch { background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: 1rem; overflow: hidden; }
.rv-batch-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 1rem; background: #fafbfc; border-bottom: 1px solid var(--ui-border-soft, #eef0f3); }
.rv-batch-title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .84rem; color: var(--ui-text-muted, #5f6675); }
.rv-batch-title b { color: var(--ui-ink, #1e2737); font-size: .92rem; }
.rv-batch-note { color: #7a5a1e; }
.rv-batch-actions { display: flex; gap: .4rem; align-items: center; }
.rv-batch-actions .rv-ok { height: 2rem; }
.rv-card.rv-card-in { border: 0; border-radius: 0; border-top: 1px solid var(--ui-border-soft, #eef0f3); box-shadow: none; }
.rv-batch > .rv-card.rv-card-in:first-of-type { border-top: 0; }
.rv-card.rv-card-in.picked { box-shadow: inset 3px 0 0 var(--ui-primary, #6e7bff); background: #fafbff; }
@media (max-width: 767px) {
  .bd-line { grid-template-columns: 44px minmax(0, 1fr) 4rem; }
  .bd-line > :nth-child(n+4) { grid-column: 2 / -1; }
  .bd-line-head { display: none; }
  .bp-row { grid-template-columns: 44px minmax(0, 1fr) 4rem; }
  .bp-row input { grid-column: auto; }
}
/* 采购单详情：每个 SKU 一张卡（图片、数量、箱规、历代价格） */
.bd-tags { display: flex; flex-wrap: wrap; gap: .25rem; }
.bd-card { display: grid; grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.1rem; margin-top: .75rem; padding: 1rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: 1rem; }
.bd-photo > a > img, .bd-photo-empty { display: flex; align-items: center; justify-content: center; width: 9rem; height: 9rem; border-radius: .9rem; object-fit: cover; background: #f2f4f7; border: 1px solid var(--ui-border-soft, #eef0f3); font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); }
.bd-photo-more { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.bd-photo-more a { position: relative; display: block; }
.bd-photo-more img { width: 2.6rem; height: 2.6rem; border-radius: .5rem; object-fit: cover; border: 1px solid var(--ui-border-soft, #eef0f3); }
.bd-photo-more span { position: absolute; left: 0; right: 0; bottom: 0; font-size: .58rem; text-align: center; color: #fff; background: rgb(30 39 55 / 65%); border-radius: 0 0 .5rem .5rem; }
.bd-info { min-width: 0; }
.bd-title { display: flex; align-items: center; gap: .45rem; }
.bd-idx { flex: 0 0 auto; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--ui-primary-soft, #eef0ff); color: var(--ui-primary-strong, #5562f0); font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bd-name { font-size: 1rem; font-weight: 700; color: var(--ui-ink, #1e2737); line-height: 1.3; }
.bd-status { margin: .45rem 0; }
.bd-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.bd-nums > div { padding: .35rem .5rem; border-radius: .55rem; background: var(--ui-bg-subtle, #f6f7f9); }
.bd-nums > div.main { background: var(--ui-primary-faint, #f6f7ff); }
.bd-nums span { display: block; font-size: .64rem; color: var(--ui-text-subtle, #9aa0ab); }
.bd-nums b { font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--ui-ink, #1e2737); }
.bd-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.bd-actions .btn { border-radius: 999px; font-weight: 600; }
.bd-side { display: grid; gap: .75rem; align-content: start; }
.bd-side section { padding: .6rem .75rem; border-radius: .75rem; background: var(--ui-bg-subtle, #f6f7f9); }
.bd-side-title { font-size: .76rem; font-weight: 650; color: var(--ui-ink, #1e2737); margin-bottom: .35rem; }
.bd-side-title span { font-weight: 400; color: var(--ui-text-subtle, #9aa0ab); margin-left: .25rem; }
.bd-pack { display: grid; grid-template-columns: 4.2rem 1fr; gap: .15rem .5rem; margin: 0; font-size: .76rem; }
.bd-pack dt { color: var(--ui-text-subtle, #9aa0ab); font-weight: 500; }
.bd-pack dd { margin: 0; color: var(--ui-ink, #1e2737); }
.bd-warn { margin-top: .35rem; font-size: .72rem; color: #9a5b00; }
.bd-prices { width: 100%; font-size: .76rem; font-variant-numeric: tabular-nums; }
.bd-prices td { padding: .15rem .25rem; border-top: 1px solid var(--ui-border-soft, #eef0f3); color: var(--ui-text-muted, #5f6675); }
.bd-prices tr:first-child td { border-top: 0; }
.bd-prices tr.now td { color: var(--ui-primary-strong, #5562f0); }
.bd-prices .sup { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 991px) { .bd-card { grid-template-columns: 7rem minmax(0, 1fr); } .bd-side { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; } .bd-photo > a > img, .bd-photo-empty { width: 7rem; height: 7rem; } }
@media (max-width: 575px) { .bd-card { grid-template-columns: 1fr; } .bd-side { grid-template-columns: 1fr; } }
/* 整单采购：每个 SKU 一张卡，采购信息一样不少 */
.bp-card { margin-top: .6rem; padding: .75rem .9rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; outline: none; }
.bp-card:focus-within { border-color: var(--ui-border-strong, #d5d9e0); }
.bp-main { display: grid; grid-template-columns: 52px minmax(0, 1fr) 7.5rem 7rem 7.5rem 6.5rem; gap: .75rem; align-items: center; }
.bp-main .pr-thumb { width: 48px; height: 48px; }
.bp-field .form-label { font-size: .68rem; margin-bottom: .1rem; color: var(--ui-text-subtle, #9aa0ab); }
.bp-field .form-control { height: 2.25rem; }
.bp-field .form-text, .bp-field small.text-secondary { display: none; }
.bp-more { margin-top: .55rem; }
.bp-more > summary { cursor: pointer; font-size: .78rem; color: var(--ui-primary-strong, #5562f0); }
.bp-more-body { margin-top: .55rem; padding-top: .55rem; border-top: 1px dashed var(--ui-border, #e4e7ec); }
.bp-other { display: flex; gap: 1rem; align-items: flex-start; margin-top: .6rem; }
.bp-mark { flex: 0 0 11rem; width: 11rem; }
.bp-skip { opacity: .55; }
@media (max-width: 991px) { .bp-main { grid-template-columns: 48px minmax(0, 1fr) repeat(2, minmax(0, 7rem)); } .bp-other { flex-direction: column; } .bp-mark { width: 100%; } }
/* 采购登记：站点三大类 */
.pr-sites { display: flex; gap: .5rem; margin: 0 0 .75rem; flex-wrap: wrap; }
.pr-site { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.2rem; border-radius: .9rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); font-weight: 650; font-size: .95rem; color: var(--ui-text-muted, #5f6675); text-decoration: none; }
.pr-site span { font-size: .74rem; font-weight: 500; color: var(--ui-text-subtle, #9aa0ab); font-variant-numeric: tabular-nums; }
.pr-site:hover { border-color: var(--ui-border-strong, #d5d9e0); color: var(--ui-ink, #1e2737); }
.pr-site.active { background: var(--ui-ink, #1e2737); border-color: var(--ui-ink, #1e2737); color: #fff; }
.pr-site.active span { color: #aab2c2; }
.pr-buy-bar { background: var(--ui-primary-strong, #5562f0); }
.pr-buy-bar .btn-light { font-weight: 700; border-radius: 999px; }
/* 采购表（待采购勾选下单 / 改采购信息） */
.sh-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .9rem 0 .45rem; }
.sh-table { background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; overflow: hidden; }
.sh-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 7.5rem 8rem 7.5rem 6.5rem 4.2rem; gap: .65rem; align-items: center; }
.sh-head { padding: .45rem .9rem; background: #fafbfc; font-size: .7rem; font-weight: 600; color: var(--ui-text-subtle, #9aa0ab); }
.sh-item { padding: .65rem .9rem; border-top: 1px solid var(--ui-border-soft, #eef0f3); outline: none; }
.sh-item:focus-within { background: #fcfcff; }
.sh-item .pr-thumb { width: 48px; height: 48px; }
.sh-prod { min-width: 0; }
.sh-last { margin-top: .2rem; font-size: .72rem; color: var(--ui-text-muted, #5f6675); }
.sh-cell input { height: 2.25rem; border-radius: .6rem; font-variant-numeric: tabular-nums; }
.sh-with-copy { display: flex; gap: .2rem; }
.sh-copy { flex: 0 0 1.6rem; border: 1px solid var(--ui-border, #e4e7ec); background: #fff; border-radius: .5rem; color: var(--ui-text-muted, #5f6675); font-size: .8rem; }
.sh-copy:hover { border-color: var(--ui-primary, #6e7bff); color: var(--ui-primary-strong, #5562f0); }
.sh-use { margin-top: .2rem; padding: .1rem .45rem; border: 1px solid var(--ui-primary-soft, #eef0ff); background: var(--ui-primary-faint, #f6f7ff); color: var(--ui-primary-strong, #5562f0); border-radius: 999px; font-size: .7rem; font-weight: 600; }
.sh-use:hover { background: var(--ui-primary-soft, #eef0ff); }
.sh-hist-toggle { border: 0; background: transparent; color: var(--ui-primary-strong, #5562f0); font-size: .76rem; font-weight: 600; }
.sh-add { margin: .2rem 0 .6rem; flex-wrap: wrap; }
.sh-add .bt-search { min-width: 18rem; }
.sh-sku-tools { display: inline-flex; gap: .5rem; margin-left: .2rem; }
.sh-link { border: 0; padding: 0; background: transparent; color: var(--ui-primary-strong, #5562f0); font-size: .74rem; font-weight: 600; }
.sh-link:hover { text-decoration: underline; }
.sh-link.danger { color: #c2410c; }
.sh-swap { margin-top: .35rem; max-width: 24rem; }
.sh-swap input { height: 2.1rem; font-size: .82rem; }
.sh-swap-note { margin-top: .25rem; font-size: .78rem; color: var(--ui-primary-strong, #5562f0); }
.sh-item.sh-removing { opacity: .5; }
.sh-item.sh-removing .pr-name { text-decoration: line-through; }
.sh-item.sh-removing .bp-more, .sh-item.sh-removing .sh-cell { pointer-events: none; }
.sh-added { background: #fbfcff; }
.sh-new-tag { padding: 0 .4rem; border-radius: 999px; background: var(--ui-primary-soft, #eef0ff); color: var(--ui-primary-strong, #5562f0); font-size: .68rem; font-weight: 700; }
.sh-calc { font-weight: 600; font-size: .85rem; }
.bd-fix { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .4rem; }
.bd-ratio { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .78rem; color: var(--ui-text-muted, #5f6675); }
.bd-ratio input { width: 5.5rem; }
.sh-hist { display: grid; grid-template-columns: 1fr 1.2fr; gap: .75rem; margin-top: .55rem; padding: .6rem .75rem; border-radius: .75rem; background: var(--ui-bg-subtle, #f6f7f9); }
.sh-pack-tools { display: flex; gap: .4rem; margin-bottom: .45rem; }
@media (max-width: 991px) { .sh-row { grid-template-columns: 44px minmax(0, 1fr) repeat(2, minmax(0, 7rem)); } .sh-head { display: none; } .sh-hist { grid-template-columns: 1fr; } }
/* 提交需求：每行的厂家箱规和历代记录 */
.bt-price { display: grid; gap: .15rem; }
.bt-price-box { position: relative; }
.bt-price-box span { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); font-size: .8rem; color: var(--ui-text-subtle, #9aa0ab); }
.bt-price-box input { height: 2.4rem; padding-left: 1.4rem; border-radius: .7rem; font-weight: 600; }
.bt-sub { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ui-ink, #1e2737); }
.bt-sub.empty { color: var(--ui-text-subtle, #9aa0ab); font-weight: 400; }
.bt-link { border: 0; background: transparent; padding: .1rem .2rem; font-size: .74rem; color: var(--ui-primary, #5b67f1); text-align: left; white-space: nowrap; }
.bt-link:hover { text-decoration: underline; }
.bt-row-note { grid-column: 2 / -2; height: 2rem; font-size: .8rem; }
.bt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .55rem; font-size: .76rem; color: var(--ui-text-muted, #5f6675); }
.bt-tool { border: 1px solid var(--ui-border, #e4e7ec); background: #fff; border-radius: 999px; padding: .2rem .7rem; font-size: .76rem; color: var(--ui-ink, #1e2737); }
.bt-tool:hover { border-color: var(--ui-primary, #6e7bff); color: var(--ui-primary, #5b67f1); }
.bt-tools-tip { color: var(--ui-text-subtle, #9aa0ab); margin-left: .3rem; }
.bt-pack { grid-column: 2 / -1; display: grid; gap: .4rem; padding: .55rem .7rem; background: #fafbfc; border: 1px solid var(--ui-border-soft, #eef0f3); border-radius: .7rem; }
.bt-pack-line { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.bt-pack-label { flex: 0 0 4.6rem; font-size: .76rem; font-weight: 600; color: var(--ui-text-muted, #5f6675); }
.bt-dim { display: inline-flex; align-items: center; gap: .3rem; margin: 0; font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); }
.bt-dim input { width: 5.2rem; height: 2.1rem; padding: .2rem .5rem; font-size: .85rem; text-align: center; border-radius: .5rem; background: #fff; }
.bt-dim-gap { margin-left: .9rem; }
.bt-pack-line i { font-style: normal; color: var(--ui-text-subtle, #9aa0ab); }
.bt-pack-line em { font-style: normal; font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); }
.bt-pack-actions { display: flex; flex-wrap: wrap; gap: .2rem .8rem; padding-left: 4.95rem; }
.bt-hist { grid-column: 2 / -1; margin-top: .2rem; }
@media (max-width: 767px) { .bt-pack, .bt-hist, .bt-row-note { grid-column: 1 / -1; } .bt-pack-label { flex-basis: 100%; } .bt-pack-actions { padding-left: 0; } .bt-dim-gap { margin-left: 0; } }
.pr-site-note { align-self: center; font-size: .78rem; color: var(--ui-text-muted, #5f6675); }
.bt-row-error.bt-ok { color: #1f7a4d; }

/* 采购审核（2026-11-26 第二轮）：一张需求单一张卡片，点开整单审核 */
.rv-batch-click { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.rv-batch-click:hover, .rv-batch-click:focus-visible { border-color: var(--ui-primary, #6e7bff); box-shadow: 0 0 0 3px var(--ui-primary-soft, #eef0ff); outline: none; }
.rv-open { font-size: .8rem; font-weight: 650; color: var(--ui-primary, #5b67f1); white-space: nowrap; }
.rv-batch .rv-card, .rv-batch .rv-card.done { grid-template-columns: 52px minmax(0, 1.3fr) minmax(0, 1.25fr) 10.5rem; gap: .9rem; padding: .6rem 1rem; border: 0; border-top: 1px solid var(--ui-border-soft, #eef0f3); border-radius: 0; box-shadow: none; }
.rv-batch .rv-card:first-of-type { border-top: 0; }
.rv-batch .rv-thumb { width: 52px; height: 52px; border-radius: .7rem; }
.rv-batch .rv-stats > div { padding: .25rem .45rem; }
.rv-batch .rv-stats b { font-size: .85rem; }
.rv-inline-note { color: #7a5a1e; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 991px) { .rv-batch .rv-card, .rv-batch .rv-card.done { grid-template-columns: 52px minmax(0, 1fr) 9rem; } .rv-batch .rv-ref { grid-column: 2 / -1; grid-row: 2; } }
@media (max-width: 767px) { .rv-batch .rv-card, .rv-batch .rv-card.done { grid-template-columns: 48px minmax(0, 1fr); } .rv-batch .rv-ref, .rv-batch .rv-decide { grid-column: 1 / -1; grid-row: auto; } }

.rv-hint { margin: .8rem 0 .6rem; font-size: .76rem; color: var(--ui-text-subtle, #9aa0ab); }
.rvb-item { display: grid; gap: .55rem; padding: .85rem 1rem; margin-bottom: .6rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; transition: opacity .15s; }
.rvb-item.dropped { opacity: .55; background: #fafafa; }
.rvb-item.dropped .rvb-name { text-decoration: line-through; }
.rvb-main { display: grid; grid-template-columns: 64px minmax(0, 1fr) 8rem 9rem 6.5rem auto; gap: .8rem; align-items: center; }
.rvb-thumb { display: block; width: 64px; height: 64px; border-radius: .75rem; overflow: hidden; background: #f2f4f7; border: 1px solid var(--ui-border-soft, #eef0f3); }
.rvb-thumb img, .rvb-thumb span { display: block; width: 100%; height: 100%; object-fit: cover; }
.rvb-info { min-width: 0; }
.rvb-name { font-weight: 650; font-size: .92rem; color: var(--ui-ink, #1e2737); line-height: 1.3; }
.rvb-stats { display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin-top: .3rem; font-size: .72rem; color: var(--ui-text-subtle, #9aa0ab); }
.rvb-stats b { color: var(--ui-ink, #1e2737); font-weight: 650; }
.rvb-stats .hot b { color: #9a5b00; }
.rvb-field { display: grid; gap: .2rem; margin: 0; font-size: .7rem; color: var(--ui-text-subtle, #9aa0ab); }
.rvb-field input { height: 2.4rem; border-radius: .7rem; font-weight: 650; }
.rvb-qty { text-align: center; font-size: 1rem; }
.rvb-sub { display: grid; gap: .2rem; text-align: right; font-size: .7rem; color: var(--ui-text-subtle, #9aa0ab); }
.rvb-sub b { font-size: .95rem; color: var(--ui-ink, #1e2737); font-variant-numeric: tabular-nums; }
.rvb-drop { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-size: .8rem; color: #b42318; white-space: nowrap; cursor: pointer; }
.rvb-pack { grid-column: 1 / -1; margin-left: calc(64px + .8rem); }
.rvb-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.rvb-note { flex: 1 1 18rem; display: grid; gap: .2rem; margin: 0; font-size: .72rem; color: var(--ui-text-muted, #5f6675); }
.rvb-btns { display: flex; gap: .5rem; }
.rvb-btns .btn { height: 2.4rem; border-radius: 999px; font-weight: 600; min-width: 5.5rem; }
@media (max-width: 991px) { .rvb-main { grid-template-columns: 56px minmax(0, 1fr) 7rem 8rem; } .rvb-sub, .rvb-drop { grid-row: 2; } .rvb-sub { grid-column: 3; } .rvb-drop { grid-column: 4; } .rvb-pack { margin-left: 0; } }
@media (max-width: 575px) { .rvb-main { grid-template-columns: 48px minmax(0, 1fr); } .rvb-field, .rvb-sub, .rvb-drop { grid-column: auto; grid-row: auto; } .rvb-btns { width: 100%; } .rvb-btns .btn { flex: 1; min-width: 0; } }

/* 分组详情（完整记录 / 商品详情 / 订单详情通用）：一组一张卡，字段名在上、值在下，没填的可选字段不显示 */
.rec-top { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1rem; margin-bottom: .75rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; }
.rec-photos { display: flex; flex-wrap: wrap; gap: .5rem; align-content: flex-start; }
.rec-photos figure { margin: 0; flex: 0 0 4.4rem; }
.rec-photos figure.big, .rec-photos figure:only-child { flex: 1 1 100%; }
.rec-photos figure:not(.big) figcaption { font-size: .64rem; text-align: center; }
.rec-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #f6f7f9; border-radius: .7rem; border: 1px solid var(--ui-border-soft, #eef0f3); }
.rec-photos figcaption { margin-top: .25rem; font-size: .7rem; color: var(--ui-text-muted, #5f6675); }
.rec-photos figcaption span { color: var(--ui-text-subtle, #9aa0ab); }
.rec-photo-empty { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #f6f7f9; border-radius: .7rem; color: var(--ui-text-subtle, #9aa0ab); font-size: .8rem; }
.rec-summary { min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.rec-name { font-size: 1.05rem; font-weight: 650; color: var(--ui-ink, #1e2737); line-height: 1.35; }
.rec-qty { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .45rem; margin-top: auto; }
.rec-keys { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); padding: .2rem 0 .1rem; }
.rec-qty > div { padding: .5rem .6rem; border-radius: .7rem; background: var(--ui-bg-subtle, #f6f7f9); }
.rec-qty > div.main { background: var(--ui-primary-soft, #eef0ff); }
.rec-qty span { display: block; font-size: .68rem; color: var(--ui-text-subtle, #9aa0ab); }
.rec-qty b { display: block; font-size: 1rem; font-weight: 700; color: var(--ui-ink, #1e2737); font-variant-numeric: tabular-nums; }
.rec-sec { margin-bottom: .65rem; padding: .8rem 1rem .9rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; }
.rec-title { display: flex; align-items: baseline; gap: .45rem; margin-bottom: .6rem; font-size: .85rem; font-weight: 650; color: var(--ui-ink, #1e2737); }
.rec-title::before { content: ""; width: .25rem; height: .85rem; border-radius: 2px; background: var(--ui-primary, #6e7bff); align-self: center; }
.rec-title span { font-size: .72rem; font-weight: 400; color: var(--ui-text-subtle, #9aa0ab); }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .65rem 1.25rem; }
.rec-f { min-width: 0; }
.rec-f > span { display: block; font-size: .7rem; color: var(--ui-text-subtle, #9aa0ab); margin-bottom: .1rem; }
.rec-f > b { display: block; font-size: .86rem; font-weight: 500; color: var(--ui-ink, #1e2737); word-break: break-word; }
.rec-f > b em { font-style: normal; font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); }
.rec-f.wide { grid-column: 1 / -1; }
.rec-f.warn > b { color: #9a5b00; }
.rec-foot { margin-top: .7rem; padding-top: .55rem; border-top: 1px dashed var(--ui-border, #e4e7ec); font-size: .76rem; color: var(--ui-text-muted, #5f6675); }
.rec-source { padding: .2rem .25rem; font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); }
.rec-source details { margin-top: .35rem; }
.rec-source summary { cursor: pointer; }
.rec-source ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.rec-table { margin: 0; font-size: .82rem; }
@media (max-width: 767px) { .rec-top { grid-template-columns: 1fr; } .rec-photos figure.big { max-width: 12rem; } .rec-qty { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rec-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .7rem; }
.rec-gallery figure { margin: 0; }
.rec-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #f6f7f9; border-radius: .7rem; border: 1px solid var(--ui-border-soft, #eef0f3); }
.rec-gallery figcaption { margin-top: .25rem; font-size: .7rem; color: var(--ui-text-muted, #5f6675); }
.rec-gallery figcaption span { color: var(--ui-text-subtle, #9aa0ab); }

/* 待采购整单编辑 / 下单 / 额外费用（2026-11-26） */
.sh-hist { grid-template-columns: 1fr 1.2fr 1fr; }
.sh-photo { display: block; width: 56px; height: 56px; border-radius: .65rem; overflow: hidden; background: #f2f4f7; border: 1px solid var(--ui-border-soft, #eef0f3); }
.sh-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-photo-empty { display: flex; align-items: center; justify-content: center; font-size: .68rem; color: var(--ui-text-subtle, #9aa0ab); }
.cs-box { margin-top: .8rem; padding: .8rem 1rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; }
.cs-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.cs-rows { display: grid; gap: .4rem; }
.cs-row { display: grid; grid-template-columns: 11rem 9rem minmax(0, 1fr) 2rem; gap: .5rem; align-items: center; }
.cs-amount { position: relative; }
.cs-amount span { position: absolute; left: .55rem; top: 50%; transform: translateY(-50%); font-size: .78rem; color: var(--ui-text-subtle, #9aa0ab); }
.cs-amount input { padding-left: 1.3rem; font-weight: 600; }
.cs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .55rem; }
.cs-add { border: 1px dashed var(--ui-border-strong, #d5d9e0); background: #fafbfc; border-radius: .6rem; padding: .3rem .8rem; font-size: .8rem; color: var(--ui-primary, #5b67f1); font-weight: 600; }
.cs-add:hover { border-color: var(--ui-primary, #6e7bff); background: var(--ui-primary-soft, #eef0ff); }
.cs-total { font-size: .8rem; font-weight: 650; color: var(--ui-ink, #1e2737); }
.cs-msg { font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); }
.po-channels { display: flex; flex-wrap: wrap; gap: .5rem; }
.po-channel { display: inline-flex; align-items: center; gap: .4rem; margin: 0; padding: .45rem .9rem; border: 1px solid var(--ui-border, #e4e7ec); border-radius: 999px; font-size: .85rem; cursor: pointer; }
.po-channel:has(input:checked) { border-color: var(--ui-primary, #6e7bff); background: var(--ui-primary-soft, #eef0ff); color: var(--ui-primary-strong, #5562f0); font-weight: 600; }
.po-hint { margin: .5rem 0 .2rem; font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); }
.po-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .75rem; margin-top: .5rem; }
.po-fields label { display: grid; gap: .25rem; margin: 0; font-size: .74rem; color: var(--ui-text-muted, #5f6675); }
.po-line { display: grid; grid-template-columns: 48px minmax(0, 1fr) 4.5rem 5.5rem 7rem; gap: .75rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--ui-border-soft, #eef0f3); }
.po-line:first-of-type { border-top: 0; }
.po-num { text-align: right; } .po-num b { display: block; font-size: .9rem; } .po-num span { font-size: .68rem; color: var(--ui-text-subtle, #9aa0ab); }
@media (max-width: 767px) { .cs-row { grid-template-columns: 1fr 1fr 2rem; } .cs-row [name=cost_note] { grid-column: 1 / -1; grid-row: 2; } .po-fields { grid-template-columns: 1fr; } .po-line { grid-template-columns: 40px minmax(0, 1fr) 4rem; } .po-line .po-num:nth-last-child(-n+2) { display: none; } .sh-hist { grid-template-columns: 1fr; } }
.sh-row { grid-template-columns: 56px minmax(0, 1fr) 7.5rem 8rem 7.5rem 6.5rem 4.2rem; }
.purchase-tag-ready { background: #e8f0ff; color: #3651c9; }
/* 采购表底部：货款 + 额外费用 = 总价 */
.sh-foot { align-items: center; }
.sh-sum { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; }
.sh-sum > div { display: grid; line-height: 1.15; }
.sh-sum span { font-size: .7rem; color: var(--ui-text-subtle, #9aa0ab); }
.sh-sum b { font-size: 1rem; font-weight: 650; color: var(--ui-ink, #1e2737); font-variant-numeric: tabular-nums; }
.sh-sum em { font-style: normal; font-size: .7rem; color: var(--ui-text-subtle, #9aa0ab); }
.sh-sum i { font-style: normal; color: var(--ui-text-subtle, #9aa0ab); font-size: .95rem; }
.sh-sum .total { padding: .3rem .85rem; border-radius: .7rem; background: var(--ui-primary-soft, #eef0ff); }
.sh-sum .total span { color: var(--ui-primary-strong, #5562f0); }
.sh-sum .total b { font-size: 1.35rem; font-weight: 750; color: var(--ui-primary-strong, #5562f0); }
.bd-head .bd-total { padding: .35rem .7rem; border-radius: .7rem; background: var(--ui-primary-soft, #eef0ff); }
.bd-head .bd-total span { color: var(--ui-primary-strong, #5562f0); }
.bd-head .bd-total b { font-size: 1.2rem; color: var(--ui-primary-strong, #5562f0); }
/* 采购选项（物流 / 额外费用类型） */
.op-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr)); gap: 1rem; align-items: start; }
.op-card { background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: 1rem; padding: 1rem 1.1rem; scroll-margin-top: 5rem; }
.op-head { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; margin-bottom: .6rem; }
.op-head h2 { font-size: 1rem; font-weight: 650; margin: 0 0 .15rem; }
.op-head p { font-size: .76rem; color: var(--ui-text-subtle, #9aa0ab); margin: 0; }
.op-row { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem 4rem 3.5rem auto; gap: .5rem; align-items: center; padding: .35rem 0; border-top: 1px solid var(--ui-border-soft, #eef0f3); margin: 0; }
.op-row-head { border-top: 0; font-size: .7rem; color: var(--ui-text-subtle, #9aa0ab); font-weight: 600; }
.op-row.off input { color: var(--ui-text-subtle, #9aa0ab); }
.op-used { font-size: .76rem; color: var(--ui-text-muted, #5f6675); font-variant-numeric: tabular-nums; }
.op-btns { display: flex; gap: .3rem; justify-content: flex-end; }
.op-add { display: flex; gap: .5rem; margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed var(--ui-border, #e4e7ec); }
.op-empty { padding: 1rem 0; font-size: .82rem; color: var(--ui-text-subtle, #9aa0ab); }
@media (max-width: 575px) { .op-grid { grid-template-columns: 1fr; } .op-row { grid-template-columns: minmax(0, 1fr) 4rem auto; } .op-row .op-used, .op-row > span:nth-of-type(2), .op-row-head { display: none; } }
.op-head .pr-count, .op-add .btn, .op-btns .btn { white-space: nowrap; flex-shrink: 0; }
.bt-header .bt-offer { grid-column: span 3; }
.bt-header .bt-note { grid-column: 1 / -1; }
@media (max-width: 767px) { .bt-header .bt-offer { grid-column: 1 / -1; } }
.op-flow { margin-bottom: 1rem; }
.op-switch .form-switch { display: flex; gap: .7rem; align-items: flex-start; padding-left: 0; }
.op-switch .form-switch .form-check-input { margin: .2rem 0 0; float: none; flex-shrink: 0; width: 2.4rem; height: 1.3rem; }
.op-switch + .op-switch { margin-top: .75rem; }
/* 列表行上的小按钮（箱唛） */
.pr-act { width: 5.6rem; text-align: center; }
.pr-row-btn { display: inline-block; padding: .2rem .65rem; border: 1px solid var(--ui-border, #e4e7ec); border-radius: 999px; font-size: .76rem; font-weight: 600; color: var(--ui-primary-strong, #5562f0); background: #fff; text-decoration: none; white-space: nowrap; }
.pr-row-btn:hover { border-color: var(--ui-primary, #6e7bff); background: var(--ui-primary-soft, #eef0ff); }
.pr-table a.pr-row-btn.pr-row-btn-strong, a.pr-row-btn.pr-row-btn-strong { color: #fff; background: var(--ui-primary, #6e7bff); border-color: var(--ui-primary, #6e7bff); }
.pr-table a.pr-row-btn.pr-row-btn-strong:hover, a.pr-row-btn.pr-row-btn-strong:hover { color: #fff; background: var(--ui-primary-strong, #5562f0); }
.pr-toolbar .pr-sort { width: auto; max-width: 10.5rem; }
.status-badge.purchase-label-ready { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.purchase-tag-closed { background: #eef0f3; color: #4b5563; }
/* 库存分析 · 本周关注：分类页签 + 批量“本周不看” */
.watch-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-left: .9rem; }
.watch-tab { border: 1px solid var(--ui-border, #e4e7ec); background: #fff; border-radius: 999px; padding: .2rem .8rem; font-size: .82rem; font-weight: 600; color: var(--ui-text-muted, #5f6675); }
.watch-tab span { margin-left: .15rem; font-weight: 500; color: var(--ui-text-subtle, #9aa0ab); }
.watch-tab:hover { border-color: var(--ui-primary, #6e7bff); color: var(--ui-primary-strong, #5562f0); }
.watch-tab.active { background: var(--ui-primary, #6e7bff); border-color: var(--ui-primary, #6e7bff); color: #fff; }
.watch-tab.active span { color: rgb(255 255 255 / 80%); }
.watch-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .5rem 0; padding: .45rem .8rem; border-radius: .7rem; background: var(--ui-primary-soft, #eef0ff); font-size: .84rem; }
.watch-bulk[hidden] { display: none; }
.watch-check { width: 2rem; }
.todo-table tr.picked td { background: #f5f7ff; }
/* 库存明细 · 自定义监控分组 */
.mg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .8rem; }
.mg-title { font-size: .8rem; font-weight: 650; color: var(--ui-text-muted, #5f6675); margin-right: .2rem; }
.mg-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .8rem; border: 1px solid var(--ui-border, #e4e7ec); border-radius: 999px; background: #fff; font-size: .82rem; font-weight: 600; color: var(--ui-ink, #1e2737); text-decoration: none; }
.mg-chip span { font-weight: 500; color: var(--ui-text-subtle, #9aa0ab); }
.mg-chip i { font-style: normal; color: #f59e0b; }
.mg-chip em { font-style: normal; font-size: .66rem; padding: 0 .35rem; border-radius: 999px; background: var(--ui-primary-soft, #eef0ff); color: var(--ui-primary-strong, #5562f0); }
.mg-chip:hover { border-color: var(--ui-primary, #6e7bff); }
.mg-chip.active { background: var(--ui-primary, #6e7bff); border-color: var(--ui-primary, #6e7bff); color: #fff; }
.mg-chip.active span, .mg-chip.active em { color: rgb(255 255 255 / 85%); background: transparent; }
.mg-manage { border: 1px dashed var(--ui-border-strong, #d5d9e0); background: transparent; border-radius: 999px; padding: .26rem .8rem; font-size: .8rem; color: var(--ui-primary-strong, #5562f0); }
.mg-tip { font-size: .76rem; color: var(--ui-text-subtle, #9aa0ab); }
.mg-pick { margin-left: auto; font-size: .76rem; color: var(--ui-text-muted, #5f6675); text-decoration: none; }
.mg-pick b { color: var(--ui-ink, #1e2737); }
.mg-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .55rem .9rem; background: var(--ui-primary-soft, #eef0ff); border-top: 1px solid var(--ui-border, #e4e7ec); }
.mg-actions[hidden] { display: none; }
.mg-actions .form-select, .mg-actions .form-control { width: auto; min-width: 12rem; }
.mg-count { font-size: .84rem; }
.mgm-list { display: grid; gap: .1rem; }
.mgm-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--ui-border-soft, #eef0f3); }
.mgm-row:first-child { border-top: 0; }
.mgm-name { display: flex; gap: .35rem; flex: 1 1 14rem; margin: 0; }
.mgm-name input { max-width: 16rem; }
.mgm-meta { font-size: .76rem; color: var(--ui-text-subtle, #9aa0ab); }
.mgm-btns { display: flex; gap: .25rem; margin-left: auto; }
.mgm-btns form { margin: 0; }
.mgm-ro { margin-left: auto; font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); }
.mg-sku { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .8rem; }
.mg-sku .form-select, .mg-sku .form-control { width: auto; min-width: 10rem; }
/* 库存明细 · 常用筛选 + 紧凑筛选栏 */
.inv-filter-card { margin-bottom: 1rem; padding: .75rem .9rem .85rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: 1rem; }
.ft-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding-bottom: .65rem; margin-bottom: .65rem; border-bottom: 1px dashed var(--ui-border, #e4e7ec); }
.ft-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .24rem .75rem; border-radius: .6rem; background: var(--ui-bg-subtle, #f6f7f9); border: 1px solid transparent; font-size: .8rem; font-weight: 600; color: var(--ui-ink, #1e2737); text-decoration: none; }
.ft-chip i { font-style: normal; color: #f59e0b; }
.ft-chip em { font-style: normal; font-size: .64rem; color: var(--ui-primary-strong, #5562f0); }
.ft-chip:hover { border-color: var(--ui-primary, #6e7bff); }
.ft-chip.active { background: var(--ui-primary-soft, #eef0ff); border-color: var(--ui-primary, #6e7bff); color: var(--ui-primary-strong, #5562f0); }
.ft-save { position: relative; }
.ft-save summary { list-style: none; cursor: pointer; }
.ft-save summary::-webkit-details-marker { display: none; }
.ft-save-form { position: absolute; z-index: 20; top: calc(100% + .35rem); left: 0; display: flex; align-items: center; gap: .45rem; padding: .55rem .65rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .75rem; box-shadow: 0 8px 24px rgb(30 39 55 / 12%); white-space: nowrap; }
.ft-save-form .form-control { width: 14rem; }
.inv-filter-card .filter-bar.inv-filter { margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; gap: .5rem .6rem; align-items: flex-end; }
.inv-filter .filter-field { flex: 1 1 8.6rem; min-width: 8.6rem; }
.inv-filter .filter-field.search { flex: 1.6 1 13rem; }
.inv-filter .filter-label { margin-bottom: .18rem; font-size: .68rem; }
.inv-filter .form-select, .inv-filter .form-control { min-height: 2.05rem; height: 2.05rem; padding-top: .25rem; padding-bottom: .25rem; font-size: .82rem; border-radius: .55rem; }
.inv-filter textarea.form-control { resize: none; overflow: hidden; line-height: 1.4; }
.inv-filter-btns { display: flex; gap: .35rem; }
.inv-filter-btns .btn { height: 2.05rem; padding: .25rem .9rem; font-size: .82rem; border-radius: .55rem; }
.mgm-create { padding: .65rem .75rem; border-radius: .8rem; background: var(--ui-bg-subtle, #f6f7f9); }
.mgm-create-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .4rem; font-size: .84rem; }
.mgm-create-body { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) auto; gap: .45rem; align-items: start; }
.mgm-create-body textarea { resize: vertical; min-height: 2rem; }
.mgm-skus { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: .3rem; }
.mgm-sku { display: inline-flex; align-items: center; gap: .15rem; padding: .08rem .2rem .08rem .5rem; border-radius: .45rem; background: var(--ui-bg-subtle, #f6f7f9); font-family: ui-monospace, Consolas, monospace; font-size: .74rem; }
.mgm-sku button { border: 0; background: transparent; color: #b6bdca; font-size: .9rem; line-height: 1; padding: 0 .2rem; }
.mgm-sku button:hover { color: #b42318; }
.mgm-add { flex: 1 1 100%; display: flex; gap: .35rem; margin: 0; }
.mgm-add input { max-width: 26rem; }
@media (max-width: 575px) { .mgm-create-body { grid-template-columns: 1fr; } }
.ft-chip.is-group span { font-weight: 500; color: var(--ui-text-subtle, #9aa0ab); }
.ft-chip.is-group { background: #fff; border-color: var(--ui-border, #e4e7ec); }
.ft-chip.partial { border-color: var(--ui-primary, #6e7bff); color: var(--ui-primary-strong, #5562f0); }
.ft-chip.active.is-group span { color: var(--ui-primary-strong, #5562f0); }
.mgm-tabs { margin: 0 0 .8rem; }
.ft-save-form .form-select { min-width: 9.5rem; width: auto; }
/* 库存明细：常用筛选只放标签；存模板在筛选条；分组 / 清货操作在列表上方工具条（2026-11-26） */
.ft-ico { width: .85rem; height: .85rem; flex: none; color: var(--ui-text-subtle, #9aa0ab); }
.ft-chip.active .ft-ico, .ft-chip.partial .ft-ico { color: currentColor; }
.ft-legend { margin-left: auto; display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; color: var(--ui-text-subtle, #9aa0ab); }
.ft-legend .ft-ico { width: .75rem; height: .75rem; margin-left: .35rem; }
.inv-filter-btns .ft-save-btn { display: inline-flex; align-items: center; height: 2.05rem; padding: .25rem .8rem; font-size: .82rem; border-radius: .55rem; white-space: nowrap; }
.ft-save-right { left: auto; right: 0; }
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; padding: .55rem .9rem; border-bottom: 1px solid var(--ui-border, #e4e7ec); background: #fafbff; border-radius: 1rem 1rem 0 0; }
.list-toolbar.is-clear { background: #fffaf2; }
.list-toolbar .worklist-issue-bar { flex: 1; padding: 0; border: 0; background: transparent; }
.pick-switch { display: inline-flex; align-items: center; gap: .15rem; padding: .18rem; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .65rem; background: #fff; }
.pick-switch-label { padding: 0 .45rem 0 .35rem; font-size: .74rem; color: var(--ui-text-muted, #5f6675); }
.pick-opt { padding: .2rem .7rem; border-radius: .5rem; font-size: .8rem; color: var(--ui-text-muted, #5f6675); text-decoration: none; }
.pick-opt:hover { color: var(--ui-ink, #1e2737); background: var(--ui-bg-subtle, #f6f7f9); }
.pick-opt.on { background: var(--ui-primary-soft, #eef0ff); color: var(--ui-primary-strong, #5562f0); font-weight: 600; box-shadow: inset 0 0 0 1px rgb(110 123 255 / 35%); }
.pick-opt-clear.on { background: #fff4e0; color: #b45309; box-shadow: inset 0 0 0 1px rgb(217 119 6 / 35%); }
.mg-toolbar { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin: 0; }
.mg-toolbar .mg-count { font-size: .82rem; color: var(--ui-text-muted, #5f6675); }
.mg-add summary.btn { font-size: .8rem; }
.mg-add-form { flex-direction: column; align-items: stretch; min-width: 19rem; gap: .55rem; }
.mg-scope { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; }
.mg-target { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.mg-target .form-select, .mg-target .form-control { flex: 1 1 10rem; width: auto; }
.confirm-mode { display: inline-block; margin-bottom: .6rem; padding: .15rem .6rem; border-radius: .45rem; font-size: .76rem; font-weight: 600; }
.confirm-mode.is-group { background: var(--ui-primary-soft, #eef0ff); color: var(--ui-primary-strong, #5562f0); }
.confirm-mode.is-clear { background: #fff4e0; color: #b45309; }
.confirm-mode.is-danger { background: #fdecec; color: #b42318; }
@media (max-width: 640px) { .ft-legend { display: none; } .mg-add-form { min-width: 0; width: calc(100vw - 3rem); } .ft-save-right { right: auto; left: 0; } }
.mg-add summary, .pick-opt, .pick-switch-label { white-space: nowrap; }
@media (max-width: 640px) { .mg-toolbar { flex: 1 1 100%; } .mg-toolbar .mg-count { flex: 1 1 100%; } }

/* 多 SKU 搜索框：一键清空 + 点进去展开（static/js/app.js） */
.multi-search { position: relative; display: block; flex: 1 1 auto; min-width: 0; }
.multi-search > textarea { width: 100%; padding-right: 2.2rem; resize: none; overflow: hidden; }
.multi-search.has-value > textarea { padding-right: 3.6rem; }
.multi-search.open > textarea { position: absolute; top: 0; left: 0; right: 0; z-index: 30; overflow-y: auto; box-shadow: 0 10px 24px rgba(15, 23, 42, .16); }
.multi-search-clear { position: absolute; top: 50%; right: .45rem; transform: translateY(-50%); z-index: 31; display: none; align-items: center; justify-content: center;
  width: 1.35rem; height: 1.35rem; padding: 0; border: 0; border-radius: 50%; background: var(--bs-secondary-bg, #e9ecef); color: var(--bs-secondary-color, #6c757d); font-size: 1rem; line-height: 1; cursor: pointer; }
.multi-search-clear:hover { background: #dc3545; color: #fff; }
.multi-search.open .multi-search-clear { top: .55rem; transform: none; }
.multi-search.has-value .multi-search-clear { display: inline-flex; }
.multi-search-count { position: absolute; top: 50%; right: 2.05rem; transform: translateY(-50%); z-index: 31; font-size: .72rem; color: var(--bs-secondary-color, #6c757d); pointer-events: none; white-space: nowrap; }
.multi-search.open .multi-search-count { top: .7rem; transform: none; }
.multi-search.is-sm .multi-search-clear { width: 1.15rem; height: 1.15rem; font-size: .85rem; }
.pr-channel .pr-seg-n { margin-left: .2rem; font-size: .72rem; opacity: .7; font-variant-numeric: tabular-nums; }

/* 系统在 1688 建单（purchasing/_create_1688.html） */
.c1688-entry { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; color: var(--bs-body-color); }
.c1688-entry span { font-size: .78rem; color: var(--bs-secondary-color, #6c757d); }
.c1688-steps { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .75rem; font-size: .8rem; color: var(--bs-secondary-color, #6c757d); }
.c1688-steps .on { color: var(--ystc-primary, #5562f0); font-weight: 600; }
.c1688-steps i { font-style: normal; opacity: .5; }
.c1688-line { align-items: center; }
.c1688-num { display: flex; flex-direction: column; gap: .15rem; width: 5.6rem; font-size: .72rem; color: var(--bs-secondary-color, #6c757d); }
.c1688-num input { text-align: right; font-variant-numeric: tabular-nums; }
.c1688-preview { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: baseline; margin-top: .5rem; padding: .5rem .75rem; border-radius: .6rem; font-size: .85rem; }
.c1688-preview.ok { background: #ecfdf3; color: #146c43; }
.c1688-preview.bad { background: #fdecec; color: #b02a37; }
.c1688-preview.stale { opacity: .45; text-decoration: line-through; }
.c1688-preview .total b { font-size: 1rem; }
.c1688-preview em { flex-basis: 100%; font-style: normal; font-size: .78rem; }
@media (max-width: 575.98px) { .c1688-line { flex-wrap: wrap; } .c1688-num { width: calc(50% - .5rem); } }
.status-soon { color:#fff; background:#ef6c00; }
.status-restock { color:#0b6e79; background:#e0f4f6; border:1px solid #9fd8de; }   /* 刚补货：日销仅供参考 */
.restock-note { color:#0b6e79; white-space:nowrap; }   /* 即将断货：紧急（红）和缺货风险之间 */
.cockpit-stock-row.is-soon b { color: #ef6c00; } .cockpit-stock-row.is-soon { background: rgba(239,108,0,.08); }
.cockpit-stock-row.is-risk b { color: #b7791f; }
/* 物流与海外仓（2026-11-27 整理）：页签 + 一行工具栏；路线图形；物流商 / 海外仓卡片 */
.lg-tabs { display: flex; gap: .25rem; box-shadow: inset 0 -1px 0 var(--ui-border, #e2e5ea); margin: 0 0 .9rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.lg-tab { padding: .55rem .9rem; border-bottom: 2px solid transparent; color: var(--ui-text-muted, #5f6675); font-weight: 500; text-decoration: none; white-space: nowrap; }
.lg-tab:hover { color: var(--ui-ink, #1e2737); }
.lg-tab.active { color: var(--ystc-primary, #5562f0); border-bottom-color: var(--ystc-primary, #5562f0); font-weight: 600; }
.lg-tab-n { margin-left: .35rem; font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: var(--ui-bg-subtle, #f1f3f6); color: var(--ui-text-muted, #5f6675); }
.lg-tab.active .lg-tab-n { background: #eef0ff; color: var(--ystc-primary, #5562f0); }
.lg-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; }
.lg-toolbar-left, .lg-toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.lg-toolbar .pr-seg { margin-left: 0; }
.lg-off { opacity: .55; }
.lg-badge { display: inline-block; font-size: .7rem; padding: .05rem .45rem; border-radius: 6px; background: #f1f3f6; color: #5f6675; font-weight: 500; }
.lg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.lg-empty { grid-column: 1 / -1; }
.lg-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ui-border-soft, #eef0f3); border-radius: 12px; padding: .9rem 1rem .75rem; box-shadow: 0 1px 2px rgb(30 39 55 / 4%); }
.lg-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .6rem; }
.lg-card-head h3 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--ui-ink, #1e2737); }
.lg-card-head span { font-size: .78rem; color: var(--ui-text-muted, #5f6675); }
.lg-fields { display: grid; grid-template-columns: 4.8rem 1fr; gap: .35rem .6rem; margin: 0 0 .6rem; font-size: .82rem; }
.lg-fields dt { color: var(--ui-text-muted, #5f6675); font-weight: 400; }
.lg-fields dd { margin: 0; color: var(--ui-ink, #1e2737); word-break: break-word; }
.lg-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lg-route-pill { display: inline-block; margin: 0 .25rem .25rem 0; padding: .05rem .45rem; border-radius: 6px; background: var(--ui-bg-subtle, #f1f3f6); font-size: .74rem; white-space: nowrap; }
.lg-card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding-top: .55rem; border-top: 1px solid var(--ui-border-soft, #eef0f3); }
.route-legend { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; }
.route-map { display: grid; gap: 1rem; }
.route-group { background: #fff; border: 1px solid var(--ui-border-soft, #eef0f3); border-radius: 14px; padding: .9rem 1.1rem 1.1rem; box-shadow: 0 1px 2px rgb(30 39 55 / 4%); }
.route-group-head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .6rem; }
.route-site { font-weight: 700; font-size: 1rem; color: var(--ui-ink, #1e2737); }
.route-flow { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(230px, 1.2fr) minmax(180px, .85fr); row-gap: .55rem; align-items: center; }
.route-col-title { font-size: .72rem; color: var(--ui-text-muted, #5f6675); letter-spacing: .04em; padding: 0 .2rem .1rem; }
.route-node { position: relative; display: flex; align-items: stretch; border: 1px solid var(--ui-border, #e2e5ea); border-radius: 10px; background: var(--ui-bg-subtle, #f8f9fb); min-width: 0; transition: box-shadow .15s, border-color .15s; }
.route-node:hover { border-color: var(--ystc-primary, #5562f0); box-shadow: 0 2px 8px rgb(85 98 240 / 15%); }
.route-node-main { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: .55rem .75rem; display: flex; flex-direction: column; gap: .15rem; border-radius: 10px; }
.route-node-main:focus-visible { outline: 2px solid var(--ystc-primary, #5562f0); outline-offset: -2px; }
.route-node b { font-size: .9rem; color: var(--ui-ink, #1e2737); }
.route-node small { color: var(--ui-text-muted, #5f6675); font-size: .75rem; }
.route-from { grid-column: 1; }
.route-to { grid-column: 3; align-self: stretch; background: #eef1ff; border-color: #c9d0ff; border-left: 4px solid var(--ystc-primary, #5562f0); }
.route-to .route-node-main { justify-content: center; }
.route-to b { font-size: 1rem; }
.route-hide { align-self: flex-start; margin: .4rem .45rem 0 0; border: 0; background: transparent; color: var(--ui-text-muted, #5f6675); font-size: .72rem; padding: .1rem .35rem; border-radius: 6px; white-space: nowrap; }
.route-hide:hover, .route-hide:focus-visible { background: #fff; color: var(--ui-ink, #1e2737); box-shadow: 0 0 0 1px var(--ui-border, #e2e5ea); outline: none; }
.route-link { grid-column: 2; position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; --route-color: #2b6cb0; }
.route-link.is-air { --route-color: #dd6b20; }
.route-link::before { content: ""; position: absolute; left: 0; right: 10px; top: 50%; border-top: 2px solid var(--route-color); }
.route-link::after { content: ""; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-left: 9px solid var(--route-color); border-right: 0; }
.route-link-body { position: relative; z-index: 1; display: inline-flex; align-items: center; background: #fff; border-radius: 999px; border: 1px solid var(--route-color); max-width: calc(100% - 28px); }
.route-link-edit { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem; border: 0; background: transparent; padding: .2rem .55rem; border-radius: 999px; }
.route-link-edit:hover .route-code, .route-link-edit:focus-visible .route-code { color: var(--ystc-primary, #5562f0); text-decoration: underline; }
.route-link-edit:focus-visible { outline: none; }
.route-code { font-weight: 700; font-size: .78rem; color: var(--ui-ink, #1e2737); }
.route-chip { display: inline-block; white-space: nowrap; font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; background: var(--ui-bg-subtle, #f1f3f6); color: var(--ui-text-muted, #5f6675); }
.route-chip.is-sea { background: #e6f0fa; color: #2b6cb0; }
.route-chip.is-air { background: #fdeee2; color: #c05621; }
.route-mark { font-size: .72rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ui-ink, #1e2737); }
.route-tag { display: inline-block; align-self: flex-start; font-size: .68rem; padding: .02rem .4rem; border-radius: 6px; background: #f1f3f6; color: #5f6675; white-space: nowrap; }
.route-tag.is-ok { background: #e7f6ec; color: #23824a; }
.route-tag.is-warn { background: #fff4e0; color: #a5620b; }
.route-node.is-off, .route-link.is-off { opacity: .5; }
.route-link.is-off::before { border-top-style: dashed; }
@media (max-width: 767.98px) {
  .route-flow { grid-template-columns: 1fr; row-gap: .35rem; }
  .route-flow > * { grid-column: 1 !important; grid-row: auto; }
  .route-col-title { display: none; }
  .route-link { min-height: 2.6rem; }
  .route-link::before { left: 50%; right: auto; top: 0; bottom: 10px; border-top: 0; border-left: 2px solid var(--route-color); }
  .route-link::after { right: auto; left: 50%; top: auto; bottom: 0; transform: translateX(-50%); border: 6px solid transparent; border-top: 9px solid var(--route-color); border-bottom: 0; }
  .route-to { margin-top: .4rem; }
  .lg-toolbar { align-items: stretch; }
}
/* 商品资料：备注 / 截图（2026-12-01） */
.pn-item { position: relative; display: grid; grid-template-columns: 5.5rem 1fr auto; gap: .5rem; align-items: start; padding: .5rem 0; border-top: 1px solid var(--ui-border-soft, #eef0f3); }
.pn-item:first-of-type { border-top: 0; }
.pn-no { font-size: .74rem; font-weight: 600; color: var(--ui-text-muted, #5f6675); padding-top: .1rem; }
.pn-text { font-size: .84rem; white-space: normal; word-break: break-word; }
.pn-src { margin-top: .2rem; font-size: .72rem; color: var(--ui-text-subtle, #9aa0ab); }
.pn-del { border: 0; background: transparent; color: var(--ui-text-subtle, #9aa0ab); font-size: 1rem; line-height: 1; padding: .1rem .3rem; border-radius: .4rem; }
.pn-del:hover { color: #c0392b; background: #fdecea; }
.pn-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .6rem; margin-top: .6rem; }
.pn-shot { position: relative; margin: 0; border: 1px solid var(--ui-border-soft, #eef0f3); border-radius: .6rem; overflow: hidden; background: #fff; }
.pn-shot img { display: block; width: 100%; height: 7.5rem; object-fit: contain; background: #f6f7f9; }
.pn-shot figcaption { padding: .35rem .5rem; font-size: .72rem; color: var(--ui-text-muted, #5f6675); }
.pn-shot figcaption span { display: block; color: var(--ui-text-subtle, #9aa0ab); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-shot .pn-del { position: absolute; top: .25rem; right: .25rem; background: rgb(255 255 255 / 85%); }
.pn-empty { font-size: .8rem; color: var(--ui-text-subtle, #9aa0ab); padding: .25rem 0; }
.pn-add { display: grid; gap: .4rem; margin-top: .75rem; }
.pn-add-row { display: flex; gap: .4rem; }
.pn-add-row input[type=file] { flex: 1 1 auto; min-width: 0; }
@media (max-width: 575.98px) { .pn-item { grid-template-columns: 4.5rem 1fr auto; } .pn-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 商品资料列表（2026-12-01）：快捷筛选、点行看详情、备注 / 截图数 */
.pd-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.product-catalog-table tr.pd-row { cursor: pointer; }
.pd-chev-col { width: 2rem; }
.pd-chev { color: var(--ui-text-subtle, #9aa0ab); font-size: 1.2rem; text-align: center; }
.pd-flag { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .72rem; background: #fff4e5; color: #9a5b00; border: 1px solid #ffe2b8; }
.pd-notes { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .74rem; background: var(--ui-primary-faint, #f6f7ff); color: var(--ui-primary-strong, #5562f0); border: 1px solid var(--ui-primary-soft, #e4e7ff); white-space: nowrap; }
.rec-photos .rec-photo-empty { aspect-ratio: auto; min-height: 7rem; }  /* 没图时不占一大块正方形 */
/* 采购登记列表（2026-12-01）：物流一列、商品名下面一行备注 */
.pr-w-logi { width: 8rem; }
.pr-logi { font-size: .8rem; white-space: nowrap; }
.pr-logi .pr-sub { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; }
.pr-rownote { margin-top: .2rem; font-size: .72rem; color: var(--ui-text-muted, #5f6675); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30rem; }
.po-fields-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.po-fields-3 .po-no { grid-column: 1 / -1; }
.pn-add-row .btn { flex: 0 0 auto; white-space: nowrap; }

.op-deduct { display: inline-flex; align-items: center; gap: .25rem; margin-left: .5rem; font-size: .75rem; color: #475467; white-space: nowrap; }
.purchase-tag-sheet_diff, .purchase-tag-sheet_missing { background: #fff1e6; color: #b54708; }
/* 采购看板 */
.pd-sub { margin: .35rem 0 0; font-size: .82rem; color: #667085; max-width: 60rem; }
.pd-tabs { margin: .9rem 0 1rem; }
.pd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.pd-cards-sm { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); margin: .75rem 0 0; }
.pd-card { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--ui-border, #e5e7eb); border-radius: .9rem; color: inherit; text-decoration: none; min-width: 0; }
.pd-card:hover { border-color: var(--ui-primary, #6e7bff); }
.pd-card span { font-size: .78rem; color: #667085; }
.pd-card b { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; }
.pd-card em { font-style: normal; font-size: .76rem; color: #667085; overflow-wrap: anywhere; }
.pd-card em i { font-style: normal; font-weight: 700; }
.pd-card em i.up { color: #b42318; } .pd-card em i.down { color: #067647; }
.pd-card.pd-main { background: var(--ui-primary-faint, #f6f7ff); border-color: #dfe3ff; }
.pd-card.pd-main b { color: var(--ui-primary-strong, #5562f0); }
.pd-card.warn b { color: #b54708; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: 1rem; }
.pd-box { background: #fff; border: 1px solid var(--ui-border, #e5e7eb); border-radius: .9rem; padding: 1rem 1.1rem; min-width: 0; }
.pd-box.pd-wide { grid-column: 1 / -1; }
.pd-box h2 { font-size: 1rem; font-weight: 700; margin: 0 0 .7rem; }
.pd-box h3 { font-size: .9rem; font-weight: 700; margin: 1rem 0 .5rem; }
.pd-box h2 span, .pd-box h3 span { font-size: .76rem; font-weight: 400; color: #667085; margin-left: .4rem; }
.pd-note { font-size: .78rem; color: #667085; margin: .5rem 0 0; }
.pd-hint { font-size: .72rem; color: #98a2b3; }
.pd-funnel { display: flex; align-items: stretch; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; }
.pd-funnel > i { align-self: center; color: #98a2b3; font-style: normal; }
.pd-step { flex: 1 0 7.5rem; display: flex; flex-direction: column; gap: .1rem; padding: .65rem .75rem; border-radius: .7rem; background: #f8f9fc; color: inherit; text-decoration: none; }
.pd-step:hover { background: var(--ui-primary-faint, #f6f7ff); }
.pd-step span { font-size: .78rem; color: #475467; } .pd-step b { font-size: 1.3rem; }
.pd-step em { font-style: normal; font-size: .76rem; color: #475467; } .pd-step small { font-size: .72rem; color: #98a2b3; }
.pd-step.warn b { color: #b54708; }
.pd-bar { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 6.5rem 4.5rem; align-items: center; gap: .5rem; font-size: .82rem; margin-bottom: .45rem; }
.pd-bar > div { height: .6rem; background: #f2f4f7; border-radius: 999px; overflow: hidden; }
.pd-bar > div i { display: block; height: 100%; background: var(--ui-primary, #6e7bff); border-radius: 999px; }
.pd-bar b { text-align: right; } .pd-bar em { font-style: normal; color: #667085; text-align: right; }
.pd-table { width: 100%; font-size: .82rem; border-collapse: collapse; }
.pd-table td, .pd-table th { padding: .38rem .3rem; border-bottom: 1px solid #f2f4f7; vertical-align: top; }
.pd-table th { font-weight: 600; color: #667085; font-size: .75rem; }
.pd-table .num { text-align: right; white-space: nowrap; }
.pd-table .muted, .pd-table td.muted { color: #98a2b3; }
.pd-table .warn { color: #b54708; font-weight: 700; }
.pd-table tr.done td { color: #98a2b3; }
.pd-list td { white-space: normal; }
.pd-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.pd-chart { margin: 0; }
.pd-chart figcaption { font-size: .8rem; color: #475467; margin-bottom: .3rem; }
.pd-chart figcaption b { color: #101828; margin-left: .3rem; }
.pd-chart svg { width: 100%; height: auto; background: #fafbff; border-radius: .5rem; }
.pd-chart svg path { fill: none; stroke: var(--ui-primary, #6e7bff); stroke-width: 2; vector-effect: non-scaling-stroke; }
.pd-chart svg circle { fill: var(--ui-primary-strong, #5562f0); }
.pd-axis { display: flex; justify-content: space-between; gap: .5rem; font-size: .7rem; color: #98a2b3; margin-top: .2rem; }
.pd-runs { display: flex; gap: .5rem; overflow-x: auto; }
.pd-runs div { display: flex; flex-direction: column; align-items: center; min-width: 3.5rem; padding: .4rem; background: #f8f9fc; border-radius: .5rem; }
.pd-runs b { font-size: 1.1rem; } .pd-runs span { font-size: .72rem; color: #667085; }
@media (max-width: 575.98px) { .pd-bar { grid-template-columns: 4.5rem minmax(0, 1fr) 5.5rem; } .pd-bar em { display: none; } }
.op-board { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-top: .75rem; font-size: .85rem; }
.op-board input { display: inline-block; width: 3.5rem; margin: 0 .2rem; }
/* 方数 / 临时 SKU / 到货入库 / 少收（2026-12-04） */
.purchase-tag-to_receive { background: #ede9fe; color: #5b21b6; }
.pr-w-cbm { width: 6.2rem; }
.pr-cbm { font-size: .78rem; white-space: nowrap; }
.pr-cbm-line b { font-weight: 600; }
.pr-cbm-miss { white-space: normal; max-width: 6.2rem; line-height: 1.2; }
.pr-mini.temp { background: #fef3c7; color: #92400e; }
.purchase-short { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: #fdecec; color: #b02a37; white-space: nowrap; }
.bd-pack dd { display: flex; justify-content: space-between; gap: .5rem; }
.bd-cbm { font-weight: 500; color: var(--ui-text-muted, #5f6675); white-space: nowrap; }
.bd-inbound { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-top: .4rem; padding: .35rem .6rem; border-radius: .5rem; background: #f5f3ff; font-size: .8rem; }
.bd-inbound-title { font-weight: 600; color: #5b21b6; }
.ib-short { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0; }
.ib-short .form-select { width: 7rem; } .ib-short .form-control { width: 10rem; }
.ib-short em { font-style: normal; font-size: .75rem; }
.ib-steps { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .75rem; font-size: .8rem; color: var(--bs-secondary-color, #6c757d); }
.ib-steps .on { color: var(--ystc-primary, #5562f0); font-weight: 600; } .ib-steps i { font-style: normal; opacity: .5; }
.ib-head { display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin-bottom: .6rem; }
.ib-head label { display: flex; flex-direction: column; gap: .15rem; font-size: .75rem; color: var(--ui-text-muted, #5f6675); min-width: 7rem; }
.ib-head label:first-child { min-width: 14rem; } .ib-head .ib-remark { flex: 1 1 12rem; }
.ib-table { font-size: .82rem; } .ib-table .ib-w { width: 6.5rem; } .ib-table .pr-thumb { width: 2.2rem; height: 2.2rem; }
.ib-skip { font-size: .8rem; padding: .15rem 0; } .ib-skip em { font-style: normal; color: #b45309; margin-left: .4rem; }
.bt-name-line .pr-sku.bt-temp { background: #fef3c7; color: #92400e; font-family: inherit; font-weight: 600; }
/* 订单弹窗每个 SKU 的方数框（2026-12-04） */
.bd-vol { margin-top: .5rem; padding: .5rem .65rem .55rem; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .6rem; background: #fafbfc; }
.bd-vol-head { font-size: .74rem; font-weight: 600; color: var(--ui-ink, #1e2737); margin-bottom: .3rem; }
.bd-vol-head span { font-weight: 400; color: var(--ui-text-subtle, #9aa0ab); margin-left: .4rem; }
.bd-vol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem .5rem; }
.bd-vol-cell { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 .5rem; padding: .25rem .45rem; border-radius: .45rem; background: #fff; border: 1px solid transparent; }
.bd-vol-cell.on { border-color: var(--ui-primary-soft, #e4e7ff); background: var(--ui-primary-faint, #f6f7ff); }
.bd-vol-label { font-size: .72rem; color: var(--ui-text-muted, #5f6675); white-space: nowrap; }
.bd-vol-label i { font-style: normal; font-size: .64rem; font-weight: 600; margin-left: .3rem; padding: 0 .3rem; border-radius: .25rem; background: var(--ui-primary, #5562f0); color: #fff; }
.bd-vol-cell b { text-align: right; font-size: .9rem; }
.bd-vol-cell em { grid-column: 1 / -1; font-style: normal; font-size: .68rem; color: var(--ui-text-subtle, #9aa0ab); }
.bd-vol-cell.none b { color: var(--ui-text-subtle, #9aa0ab); font-weight: 400; }
@media (max-width: 575.98px) { .bd-vol-grid { grid-template-columns: minmax(0, 1fr); } }
/* 实测和厂家箱规差太多（老板 2026-12-04） */
.status-badge.purchase-pack-diff { background: #fffaeb; color: #b54708; border: 1px solid #fedf89; }
/* 国内到货日期（老板 2026-12-04）：列表里点一下填；第二行是 1688 物流进度 */
.pr-dom-btn { display: block; width: calc(100% + .7rem); border: 0; background: none; padding: .15rem .35rem; margin: -.15rem -.35rem; border-radius: .45rem; text-align: left; color: inherit; cursor: pointer; }
.pr-dom-btn:hover { background: var(--ui-primary-faint, #f6f7ff); }
.pr-dom-fill { font-size: .82rem; font-weight: 600; line-height: 1.5rem; color: var(--ui-primary-strong, #5562f0); white-space: nowrap; }
.pr-dom-none { font-size: 1rem; line-height: 1.5rem; color: var(--ui-text-subtle, #9aa0ab); }
.pr-ship, .bd-ship, .pr-chip-ship { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.pr-ship { font-size: .72rem; line-height: 1.25; color: var(--ui-text-muted, #5f6675); }
.pr-ship::before, .bd-ship::before, .pr-chip-ship::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: #98a2b3; flex: none; }
.ship-unshipped::before { background: #f79009; }
.ship-nobill::before { background: #98a2b3; }
.ship-shipped::before, .ship-moving::before { background: #2e90fa; }
.ship-signed::before { background: #12b76a; }
.pr-chip-group { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: .4rem; padding-left: .55rem; margin-left: .15rem; border-left: 1px solid var(--ui-border, #e4e7ec); }
@media (max-width: 575.98px) { .pr-chip-group { flex-wrap: wrap; padding-left: 0; margin-left: 0; border-left: 0; } }
.pr-chip-label { align-self: center; font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); }
/* 订单弹窗：1688 物流轨迹（只存时间、动作、站点） */
.bd-trace { margin-top: .75rem; background: #fff; border: 1px solid var(--ui-border, #e4e7ec); border-radius: .9rem; }
.bd-trace summary { display: flex; align-items: center; gap: .6rem; padding: .65rem 1rem; cursor: pointer; list-style: none; }
.bd-trace summary::-webkit-details-marker { display: none; }
.bd-trace summary b { font-size: .88rem; color: var(--ui-ink, #1e2737); }
.bd-trace summary span { font-size: .76rem; color: var(--ui-text-muted, #5f6675); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-trace summary em { margin-left: auto; font-style: normal; font-size: .76rem; color: var(--ui-primary-strong, #5562f0); flex: none; }
.bd-trace summary em::after { content: " ▾"; }
.bd-trace[open] summary em { font-size: 0; }
.bd-trace[open] summary em::after { content: "收起 ▴"; font-size: .76rem; }
.bd-trace-pack { padding: 0 1rem .4rem 1.1rem; }
.bd-trace-bill { font-size: .74rem; color: var(--ui-text-subtle, #9aa0ab); margin: .2rem 0 .35rem; }
.bd-trace-list { list-style: none; margin: 0; padding: 0 0 0 .9rem; border-left: 2px solid #eaecf0; }
.bd-trace-list li { position: relative; display: grid; grid-template-columns: 6.2rem 4.6rem minmax(0, 1fr); gap: .5rem; padding: .28rem 0; font-size: .8rem; }
.bd-trace-list li::before { content: ""; position: absolute; left: -1.21rem; top: .62rem; width: .5rem; height: .5rem; border-radius: 50%; background: #d0d5dd; box-shadow: 0 0 0 2px #fff; }
.bd-trace-list li.trace-moving::before, .bd-trace-list li.trace-picked::before { background: #84adff; }
.bd-trace-list li.trace-delivering::before, .bd-trace-list li.trace-locker::before { background: #2e90fa; }
.bd-trace-list li.trace-signed::before { background: #12b76a; }
.bd-trace-list time { color: var(--ui-text-muted, #5f6675); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-trace-list b { font-weight: 600; color: var(--ui-text-muted, #5f6675); white-space: nowrap; }
.bd-trace-list li:first-child b { color: var(--ui-ink, #1e2737); }
.bd-trace-list span { color: var(--ui-text-muted, #5f6675); overflow-wrap: anywhere; }
.bd-trace-note { margin: 0; padding: .2rem 1rem .75rem; font-size: .72rem; color: var(--ui-text-subtle, #9aa0ab); }
@media (max-width: 576px) { .bd-trace-list li { grid-template-columns: 5.8rem minmax(0, 1fr); } .bd-trace-list span { grid-column: 2; } }
.bd-dom { margin-left: .4rem; font-size: .75rem; color: #475467; white-space: nowrap; }
.dm-day { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.dm-day label { font-weight: 600; }
.dm-day input { width: auto; }
.dm-list { border: 1px solid #eaecf0; border-radius: .6rem; max-height: 50vh; overflow: auto; }
.dm-all { display: flex; gap: .5rem; align-items: center; padding: .5rem .75rem; font-size: .8rem; color: #475467; border-bottom: 1px solid #eaecf0; }
.dm-row { display: flex; gap: .6rem; align-items: center; padding: .45rem .75rem; border-bottom: 1px solid #f2f4f7; cursor: pointer; }
.dm-row:last-child { border-bottom: 0; }
.dm-row img, .dm-thumb { width: 36px; height: 36px; border-radius: .35rem; object-fit: cover; background: #f2f4f7; flex: none; }
.dm-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dm-name b { font-weight: 600; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-name em, .dm-now em { font-style: normal; font-size: .75rem; color: #667085; }
.dm-now { font-size: .8rem; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; }

/* 海外仓入库：日期悬停出千易入库单，每张可复制（2026-12-04） */
.pr-asn { display: inline-block; border-radius: .45rem; padding: .1rem .35rem; margin: -.1rem -.35rem; cursor: default; }
.pr-asn:hover, .pr-asn:focus { background: var(--ui-primary-faint, #f6f7ff); outline: none; }
.pr-asn .pr-sub { text-decoration: underline dotted #b9c0cc; text-underline-offset: 3px; }
.pr-asn-wait { color: #b54708; }
.popover.asn-popover { font-family: var(--ui-font); --bs-popover-max-width: 380px; --bs-popover-body-padding-x: .7rem; --bs-popover-body-padding-y: .55rem; font-size: .8rem; }
.asn-head { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; color: var(--ui-ink, #1e2737); margin-bottom: .35rem; }
.asn-head span { font-weight: 400; font-size: .72rem; color: var(--ui-text-subtle, #9aa0ab); }
.asn-row { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: .6rem; padding: .25rem 0; border-top: 1px solid #f0f1f4; }
.asn-no { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ui-ink, #1e2737); }
.asn-at, .asn-qty { color: var(--ui-text-muted, #5f6675); font-variant-numeric: tabular-nums; white-space: nowrap; }
.asn-foot { border-top: 1px solid #f0f1f4; padding-top: .4rem; text-align: right; }
.asn-copy { border: 1px solid #d0d5dd; background: #fff; color: #344054; border-radius: .4rem; font-size: .72rem; line-height: 1.2; padding: .12rem .45rem; cursor: pointer; white-space: nowrap; }
.asn-copy:hover { border-color: var(--ui-primary, #5b5bd6); color: var(--ui-primary, #5b5bd6); }
.asn-copy.is-done { border-color: #12b76a; color: #067647; }
.bd-asns { display: flex; flex-wrap: wrap; gap: .3rem .6rem; font-style: normal; }
.bd-asn { display: inline-flex; align-items: center; gap: .3rem; font-variant-numeric: tabular-nums; }

