:root {
  --ink: #1f2a1f;
  --muted: #617067;
  --panel: rgba(255, 252, 245, 0.84);
  --line: rgba(33, 45, 35, 0.12);
  --accent: #256f4d;
  --accent-soft: #dff2e4;
  --warn: #d96c1f;
  --warn-soft: #fff0df;
  --ready: #155eef;
  --ready-soft: #e7f0ff;
  --shadow: 0 18px 50px rgba(39, 45, 31, 0.12);
}

.employee-list-panel {
  display: grid;
  gap: 16px;
}

.employee-list-count-metric {
  white-space: nowrap;
}

.employee-create-form,
.employee-list-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.employee-create-form > label:first-child,
.employee-keyword-label {
  flex: 1 1 260px;
}

.employee-create-form label > span,
.employee-list-toolbar label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.employee-role-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.employee-list-message {
  min-height: 20px;
  color: #0f766e;
}

.employee-list-message.is-error {
  color: #b91c1c;
}

.employee-list-grid {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.employee-list-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(220px, 1.4fr) 90px minmax(160px, 1fr) minmax(210px, auto);
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #e7ddd0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.employee-list-head {
  background: #f4ede2;
  color: var(--muted);
}

.employee-list-roles,
.employee-list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.employee-role-tag,
.employee-departed-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e8f4ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.employee-status-inactive {
  background: #f8f3f0;
  color: #7c4a3e;
}

.employee-status-inactive .employee-list-status,
.employee-departed-tag {
  color: #9f3a2d;
  background: #fde9e4;
}

@media (max-width: 900px) {
  .employee-list-top-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .employee-list-count-metric {
    padding-inline: 9px;
  }

  .employee-create-form,
  .employee-list-toolbar {
    align-items: stretch;
  }

  .employee-create-form > label:first-child,
  .employee-keyword-label {
    flex-basis: 100%;
  }

  .employee-list-head {
    display: none;
  }

  .employee-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .employee-list-name {
    font-size: 17px;
  }

  .employee-list-roles,
  .employee-list-actions {
    grid-column: 1 / -1;
  }

  .employee-list-row time {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
  }

  .employee-list-actions > button {
    flex: 1 1 calc(50% - 4px);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(56, 127, 89, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(217, 108, 31, 0.12), transparent 24%),
    linear-gradient(135deg, #f8f4eb 0%, #efe6d7 100%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.admin-page-shell {
  width: min(1880px, calc(100% - 2px));
}

.admin-home-page.session-loading .admin-page-shell,
.admin-home-page.session-loading dialog {
  visibility: hidden;
}

.admin-home-page.session-loading::before {
  content: attr(data-session-message);
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(56, 127, 89, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(217, 108, 31, 0.12), transparent 24%),
    linear-gradient(135deg, #f8f4eb 0%, #efe6d7 100%);
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 24px;
  margin-bottom: 24px;
}

.single-panel-layout {
  display: grid;
}

.inventory-lookup-strip {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: center;
  margin: -10px 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

body:not(.admin-home-page) > .page-shell > .inventory-lookup-strip {
  display: none;
}

.inventory-lookup-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 104px;
  gap: 8px;
  align-items: end;
}

.inventory-lookup-form label {
  display: grid;
  gap: 5px;
}

.inventory-lookup-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-lookup-form input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
}

.inventory-lookup-form button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.inventory-lookup-result {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(249, 250, 251, 0.9);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.inventory-lookup-result.is-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.inventory-lookup-result.has-result {
  display: grid;
  gap: 7px;
  color: var(--text);
}

.inventory-product-line,
.inventory-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inventory-product-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inventory-product-line span {
  flex: 0 0 auto;
  color: #166534;
  font-weight: 900;
}

.inventory-product-meta,
.inventory-stock-row small {
  color: var(--muted);
  font-size: 12px;
}

.inventory-stock-list {
  display: grid;
  gap: 5px;
}

.inventory-stock-row {
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.inventory-stock-row strong {
  color: #166534;
}

.layout,
.admin-layout {
  display: grid;
  gap: 24px;
}

.layout {
  grid-template-columns: 1fr 1.2fr;
}

.admin-layout {
  grid-template-columns: 0.68fr 1.32fr;
}

.hero-copy,
.hero-card,
.panel,
.top-title-bar,
.top-metrics-row {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.top-title-bar {
  position: relative;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  margin-bottom: 12px;
  padding: 8px 14px;
}

.top-title-bar h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.brand-macy {
  color: #c96a2b;
  letter-spacing: 0;
}

.admin-top-bar {
  gap: 20px;
  overflow: visible;
}

.top-title-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: min(820px, 62vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-items: center;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.96);
  text-align: center;
}

.top-title-center h1 {
  width: 100%;
  display: grid;
  place-items: center;
}

.admin-home-top-bar .top-title-center {
  width: min(360px, 34vw);
  padding: 0;
  background: transparent;
  transform: translate(-50%, calc(-50% - 4px));
}

.admin-home-top-bar .page-tab-strip {
  position: absolute;
  left: 50%;
  top: -42px;
  transform: translateX(-50%);
  width: calc(100vw - 32px);
  max-width: calc(100vw - 32px);
  min-height: 22px;
  max-height: 22px;
  gap: 3px;
  justify-content: flex-start;
  justify-content: safe center;
  overflow-x: auto;
}

.admin-home-top-bar .page-tab-pill {
  max-height: 22px;
  gap: 3px;
}

.admin-home-top-bar .page-tab-pill a {
  height: 22px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1;
}

.admin-home-top-bar .page-tab-pill button {
  width: 22px;
  min-width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1;
}

.exchange-rate-strip {
  position: absolute;
  left: 50%;
  top: calc(100% + 1px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: auto;
  white-space: nowrap;
}

.exchange-rate-chip {
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid rgba(15, 63, 143, 0.18);
  border-radius: 7px;
  background: rgba(239, 246, 255, 0.94);
  color: #0f3f8f;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.exchange-rate-chip:hover,
.exchange-rate-chip:focus-visible {
  border-color: rgba(15, 63, 143, 0.36);
  background: #eaf2ff;
}

.exchange-rate-value {
  color: #0f3f8f;
  font-size: 12px;
  font-weight: 900;
}

.exchange-rate-dialog-card {
  width: min(360px, calc(100vw - 32px));
}

.exchange-rate-field {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
}

.exchange-rate-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.exchange-rate-field input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #0f3f8f;
  font-size: 18px;
  font-weight: 900;
}

.inventory-review-page .admin-top-bar {
  display: grid;
  grid-template-columns: minmax(210px, max-content) minmax(0, 1fr) 96px;
  align-items: center;
  gap: 8px;
}

.inventory-review-page .inventory-nav-actions {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  position: relative;
  z-index: 3;
}

.inventory-review-page .inventory-nav-actions .report-entry {
  width: auto;
  min-width: 84px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  text-align: center;
  line-height: 1;
}

.inventory-review-page .inventory-nav-actions .report-entry strong {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1;
}

.inventory-review-page .inventory-nav-actions .warehouse-system-entry {
  min-width: 112px;
}

.inventory-review-page .admin-top-bar > .report-entry {
  min-width: 0;
}

.inventory-review-page .admin-top-bar > .warehouse-system-entry {
  grid-row: 1;
}

.inventory-review-page .admin-top-bar .top-title-center {
  position: static;
  grid-column: 2;
  grid-row: 1;
  width: min(420px, 100%);
  background: transparent;
  transform: none;
  pointer-events: auto;
  justify-self: center;
  padding: 0;
}

.inventory-review-page .admin-top-bar > .top-metric {
  grid-column: 3;
  grid-row: 1;
  width: 100%;
}

.cargo-library-page .admin-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cargo-library-page .cargo-library-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 3;
}

.cargo-library-page .cargo-library-nav-actions .report-entry {
  width: auto;
  min-width: 86px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  text-align: center;
  line-height: 1;
}

.cargo-library-page .cargo-library-nav-actions .report-entry:last-child {
  min-width: 132px;
}

.cargo-library-page .cargo-library-nav-actions .report-entry strong {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1;
}

.cargo-library-page .admin-top-bar .top-title-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, 100%);
  padding: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.mobile-query-link {
  display: none;
}

.mobile-entry-toggle,
.mobile-menu-action {
  display: none;
}

.total-report-menu {
  position: relative;
  z-index: 10000;
}

.total-report-menu summary {
  height: auto;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.total-report-menu summary::-webkit-details-marker {
  display: none;
}

.total-report-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 2147483647;
  display: grid;
  gap: 4px;
  width: 128px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(32, 44, 57, 0.16);
  transform: none;
}

.header-report-menu {
  display: inline-grid;
  align-self: center;
}

.header-report-menu summary {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(217, 108, 31, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff6e8 0%, #ffe7c4 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.total-report-options a,
.total-report-options button {
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.menu-account-chip {
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 4px 6px;
  border-radius: 8px;
  background: #fff7ed;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.menu-account-chip strong {
  color: #b54708;
}

.page-tab-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  min-height: 28px;
  max-height: 28px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  pointer-events: auto;
}

.page-tab-strip::-webkit-scrollbar {
  display: none;
}

.page-tab-strip[hidden] {
  display: flex;
  visibility: hidden;
}

.page-tab-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-height: 28px;
}

.page-tab-pill a {
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #1d4ed8;
  background: #eff6ff;
  text-decoration: none;
}

.page-tab-pill button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #b91c1c;
  background: #fff5f5;
}

.top-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
}

.top-metric {
  margin: 0;
  min-width: 158px;
}

.top-metric-highlight {
  background: linear-gradient(135deg, #fff6e8 0%, #ffe7c4 100%);
  border-color: rgba(217, 108, 31, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.top-metric-highlight strong {
  color: #b54708;
}

.top-metric-highlight.alt {
  background: linear-gradient(135deg, #eaf2ff 0%, #d7e6ff 100%);
  border-color: rgba(21, 94, 239, 0.18);
}

.top-metric-highlight.alt strong {
  color: #155eef;
}

.report-entry {
  text-decoration: none;
  color: inherit;
}

.report-entry strong {
  font-size: 17px;
}

.fit-text-metric {
  width: max-content;
  min-width: 0;
  padding-inline: 12px;
}

.top-picked-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.account-chip span {
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.account-chip strong {
  font-size: 17px;
}

.logout-button {
  height: 34px;
  border-radius: 8px;
  white-space: nowrap;
}

.refresh-orders-button,
.delivery-notice-button,
.cargo-entry-button {
  height: 34px;
  border-radius: 12px;
  white-space: nowrap;
  border: 1px solid rgba(217, 108, 31, 0.22);
  background: linear-gradient(135deg, #fff6e8 0%, #ffe7c4 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  color: var(--ink);
  font-weight: 800;
}

.cargo-entry-button {
  height: 34px;
  min-width: 58px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  font-size: 17px;
  line-height: 1;
}

.refresh-status {
  width: 54px;
  align-self: center;
  color: #d92d20;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  visibility: visible;
}

.refresh-status[hidden] {
  display: inline-block;
  visibility: hidden;
}

.picked-drawer-toggle {
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #155eef 0%, #0b63f6 100%);
}

.picked-drawer-toggle strong {
  margin-left: 4px;
  color: #7c3aed;
}

.admin-top-bar .header-report-menu summary,
.admin-top-bar .review-entry-button,
.admin-top-bar .inventory-review-entry-button,
.admin-top-bar .account-chip,
.admin-top-bar .picked-drawer-toggle,
.admin-top-bar .refresh-orders-button,
.admin-top-bar .delivery-notice-button,
.admin-top-bar .logout-button {
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(217, 108, 31, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff6e8 0%, #ffe7c4 100%);
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.admin-top-bar .review-entry-button strong,
.admin-top-bar .review-entry-button span,
.admin-top-bar .inventory-review-entry-button strong,
.admin-top-bar .inventory-review-entry-button span {
  color: inherit;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
}

.admin-top-bar .review-entry-button,
.admin-top-bar .inventory-review-entry-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  text-align: center;
}

.admin-top-bar .review-entry-button.has-review-pending,
.admin-top-bar .inventory-review-entry-button.has-review-pending {
  border-color: rgba(217, 45, 32, 0.36);
  background: linear-gradient(135deg, #fff1f0 0%, #ffd7d2 100%);
  color: #b42318;
}

.review-pending-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.28);
}

.review-pending-badge[hidden] {
  display: none;
}

.inventory-review-entry-button .inventory-review-process-badge {
  left: -7px;
  right: auto;
  background: linear-gradient(135deg, #a855f7 0%, #6d28d9 100%);
  box-shadow: 0 4px 10px rgba(109, 40, 217, 0.28);
}

.inventory-review-entry-button .inventory-review-needs-badge {
  left: auto;
  right: -7px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 4px 10px rgba(185, 28, 28, 0.28);
}

.picked-drawer {
  margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(57, 61, 68, 0.96) 0%, rgba(40, 43, 49, 0.96) 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.picked-drawer .panel-head h2,
.picked-drawer .order-subtitle,
.picked-drawer .order-mini,
.picked-drawer .summary-toggle,
.picked-drawer .empty-state,
.picked-drawer .metric span,
.picked-drawer .packing-image-count {
  color: #d7dde7;
}

.picked-drawer-total-amount {
  display: inline-flex;
  align-items: center;
  margin-left: 14px;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.16);
  color: #93c5fd;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.picked-drawer .admin-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.picked-drawer .admin-card-head h3,
.picked-drawer .admin-card strong {
  color: #f6f8fb;
}

.picked-card-amount {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #f6f8fb;
  font-weight: 800;
  white-space: nowrap;
}

.picked-drawer .secondary-button {
  background: rgba(255, 255, 255, 0.12);
  color: #f6f8fb;
  border-color: rgba(255, 255, 255, 0.14);
}

.review-drawer,
.review-page-panel {
  margin-bottom: 10px;
}

.review-drawer-actions,
.review-record-side,
.review-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.review-filter-bar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) 150px 150px 150px auto;
  gap: 8px;
  align-items: end;
  flex: 1;
  max-width: 1140px;
}

.review-status-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.review-filter-bar input,
.review-filter-bar select {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-filter-bar button {
  height: 34px;
  border-radius: 8px;
  white-space: nowrap;
}

.review-status-button.is-active {
  border-color: rgba(21, 94, 239, 0.5);
  background: rgba(21, 94, 239, 0.12);
  color: var(--accent);
}

.review-list,
.review-items-list {
  display: grid;
  gap: 10px;
}

.review-record-card-list {
  position: relative;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.review-record-card-list.is-draft {
  border-color: rgba(21, 94, 239, 0.38);
  background: #f8fbff;
}

.review-record-card-list.is-record-reviewed {
  border-color: rgba(37, 111, 77, 0.28);
}

.review-record-card-list.is-record-processed {
  border-color: rgba(21, 94, 239, 0.32);
}

.review-record-card-list.needs-review {
  border-color: rgba(217, 108, 31, 0.24);
}

.review-record-stamp {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 2;
  width: 72px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(37, 111, 77, 0.34);
  border-radius: 8px;
  color: rgba(37, 111, 77, 0.42);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(-8deg);
}

.review-record-card-list.needs-review .review-record-stamp {
  border-color: rgba(217, 108, 31, 0.4);
  color: rgba(217, 108, 31, 0.5);
}

.review-record-card-list.is-record-processed .review-record-stamp {
  border-color: rgba(21, 94, 239, 0.38);
  color: rgba(21, 94, 239, 0.46);
}

.review-process-note {
  margin-top: 3px;
}

.review-issue-card {
  width: min(92vw, 420px);
}

.review-issue-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 8px;
}

.review-issue-actions button {
  min-height: 42px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

.review-result-emphasis {
  color: #b42318;
  font-weight: 900;
}

.review-record-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.review-record-head h3 {
  margin-bottom: 4px;
  font-size: 16px;
}

.review-record-head h3 span {
  color: #c96a2b;
  font-size: 13px;
}

.review-master-fields {
  display: grid;
  grid-template-columns: 150px 150px 140px 120px 90px;
  gap: 8px;
  margin-bottom: 10px;
}

.review-master-fields label,
.review-child-row label {
  display: grid;
  gap: 4px;
}

.review-master-fields span,
.review-child-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-master-fields input,
.review-child-row input {
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-record-images {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.review-record-images > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-record-images em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.review-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2000;
  min-width: 140px;
  padding: 12px 22px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.94);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.review-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.review-folder-children,
.review-items-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-left: 28px;
  padding-left: 14px;
  border-left: 3px solid rgba(21, 94, 239, 0.18);
}

.review-folder-children.is-hidden {
  display: none;
}

.review-child-row,
.review-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px 140px 150px 88px minmax(150px, 220px) minmax(110px, 150px) minmax(300px, auto);
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8f3;
}

.review-item.is-checked {
  opacity: 0.72;
}

.review-child-row.is-checked {
  opacity: 0.72;
}

.review-item-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.review-item-main span,
.review-draft-title {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-item-main strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.review-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.review-image-thumb,
.review-add-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.review-image-thumb {
  position: relative;
  display: inline-flex;
}

.review-image-thumb img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

.review-image-thumb.is-pending img {
  border-style: dashed;
  border-color: rgba(37, 111, 77, 0.56);
  opacity: 0.86;
}

.review-delete-image {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(180, 35, 24, 0.35);
  border-radius: 50%;
  background: #fff;
  color: #b42318;
  font-size: 14px;
  font-weight: 900;
  line-height: 18px;
  cursor: pointer;
}

.review-add-image {
  border: 1px dashed var(--accent);
  background: #fff;
  color: var(--accent);
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
}

.review-add-image:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.review-checked-note {
  color: var(--muted);
  font-size: 12px;
}

.review-pending-image-count {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

.review-child-actions .review-image-grid {
  margin-bottom: 0;
}

.review-inline-add,
.review-draft-remove {
  height: 32px;
  border-radius: 8px;
}

.admin-dialog-card-wide {
  min-width: 980px;
  max-width: min(96vw, 1400px);
}

.hero-copy {
  padding: 34px;
}

.hero-links {
  margin-top: 18px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.04;
}

.hero-text {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-card {
  display: grid;
  gap: 18px;
  padding: 28px;
  align-content: center;
}

.metric {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.metric strong {
  font-size: 38px;
  line-height: 1;
}

.compact-metric {
  padding: 8px 12px;
  border-radius: 16px;
}

.compact-metric span {
  margin-bottom: 4px;
  font-size: 12px;
}

.compact-metric strong {
  font-size: 22px;
}

.review-entry-button {
  cursor: pointer;
  color: inherit;
  text-align: left;
}

.detail-title-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.panel {
  padding: 24px;
}

.admin-layout .panel {
  padding: 12px;
}

.entry-panel {
  position: relative;
  z-index: 20;
  margin-bottom: 8px;
  padding: 8px 10px;
}

.entry-panel-row {
  display: grid;
  grid-template-columns: minmax(0, 60%) minmax(320px, 38%);
  align-items: end;
  gap: 8px 2%;
  justify-content: stretch;
}

.entry-command-row {
  order: 0;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.entry-secondary-row {
  order: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  justify-self: stretch;
  min-width: 0;
}

.desktop-entry-toggle {
  min-width: 104px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.entry-panel.is-entry-collapsed .admin-form-wide {
  display: none;
}

.entry-panel.is-entry-open .admin-form-wide {
  display: grid;
}

.admin-inventory-lookup-form {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 58px;
  align-items: end;
  gap: 6px;
  min-width: 0;
}

.admin-inventory-lookup-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-inventory-lookup-form span {
  font-size: 12px;
  font-weight: 700;
}

.admin-inventory-lookup-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.admin-inventory-lookup-form button {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-inventory-total-export-button {
  min-width: 0;
}

.admin-inventory-lookup-result {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1200;
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(32, 44, 57, 0.18);
}

.admin-inventory-lookup-result[hidden] {
  display: none;
}

.inventory-only-page .review-entry-button,
.inventory-only-page .inventory-review-entry-button,
.inventory-only-page .mobile-entry-toggle,
.inventory-only-page .top-picked-entry,
.inventory-only-page .summary-stack,
.inventory-only-page .picked-drawer,
.inventory-only-page #user-message-form,
.inventory-only-page #customer-receivable-panel,
.inventory-only-page .order-search-field,
.inventory-only-page #cargo-reservation-command-form,
.inventory-only-page #addon-voice-unlock,
.inventory-only-page #admin-form {
  display: none !important;
}

.inventory-only-page .entry-panel {
  max-width: min(980px, calc(100vw - 32px));
  margin: 32px auto 0;
}

.inventory-only-page .entry-command-row {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  justify-content: stretch;
}

.inventory-only-page .admin-inventory-lookup-form {
  width: min(1180px, calc(100vw - 64px));
  max-width: 100%;
  justify-self: stretch;
}

.inventory-only-page .admin-inventory-lookup-form input {
  width: 100%;
  min-width: min(320px, 100%);
}

.inventory-only-page .admin-inventory-lookup-form label {
  width: 100%;
}

.inventory-only-page .admin-inventory-lookup-result {
  min-width: min(1180px, calc(100vw - 64px));
  max-width: min(1180px, calc(100vw - 64px));
}

.inventory-only-page .admin-inventory-result-header,
.inventory-only-page .admin-inventory-result-row {
  grid-template-columns: 86px 142px 92px minmax(260px, 1fr) 72px 72px 104px 72px 72px 98px 98px;
}

.inventory-only-page .admin-inventory-result-header.without-pending-orders-column,
.inventory-only-page .admin-inventory-result-row.without-pending-orders-column {
  grid-template-columns: 86px 142px 92px minmax(260px, 1fr) 72px 104px 72px 72px 98px 98px;
}

.inventory-only-page .admin-inventory-result-row .result-name,
.inventory-only-page .admin-inventory-result-row span,
.inventory-only-page .admin-inventory-result-row strong,
.inventory-only-page .admin-inventory-result-header span {
  white-space: nowrap;
}

.admin-inventory-result-message {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-inventory-result-message.is-error {
  color: #b42318;
}

.admin-inventory-result-row {
  display: grid;
  grid-template-columns: 86px 124px 86px minmax(180px, 1fr) 68px 68px 82px 64px 64px 76px 76px;
  gap: 0;
  align-items: center;
  width: 100%;
  min-height: 82px;
  padding: 9px 10px;
  border: 1px solid rgba(33, 45, 35, 0.1);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  text-align: left;
}

.admin-inventory-result-header {
  position: sticky;
  top: -8px;
  z-index: 1;
  display: grid;
  grid-template-columns: 86px 124px 86px minmax(180px, 1fr) 68px 68px 82px 64px 64px 76px 76px;
  gap: 0;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-inventory-result-header.without-pending-orders-column,
.admin-inventory-result-row.without-pending-orders-column {
  grid-template-columns: 86px 124px 86px minmax(180px, 1fr) 68px 82px 64px 64px 76px 76px;
}

.admin-inventory-result-row:hover {
  border-color: rgba(37, 111, 77, 0.35);
  background: #f0fdf4;
}

.admin-inventory-result-row strong,
.admin-inventory-result-row span,
.admin-inventory-result-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-inventory-result-row .result-yiwu-price {
  display: none;
}

.admin-inventory-result-row > span:not(.inventory-result-thumb),
.admin-inventory-result-row > strong,
.admin-inventory-result-header span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.32);
}

.admin-inventory-result-header span {
  min-height: 30px;
  border-left-color: rgba(148, 163, 184, 0.22);
}

.admin-inventory-result-row > span:last-child,
.admin-inventory-result-row > strong:last-child,
.admin-inventory-result-header span:last-child {
  border-right: 1px solid rgba(148, 163, 184, 0.32);
}

.inventory-number-cell {
  justify-content: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: #f8fafc;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.admin-inventory-result-row .result-pending-ordered {
  color: #92400e;
  font-weight: 900;
}

.admin-inventory-result-row .result-retail-stock {
  color: #1d4ed8;
  font-weight: 900;
}

.admin-inventory-result-row .result-retail-stock.is-retail-negative {
  color: #b42318;
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.35);
}

.admin-inventory-result-row .result-pending-ordered.has-pending-orders {
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.28);
}

.admin-inventory-result-row .stock-value {
  color: #166534;
  font-weight: 900;
  font-size: 16px;
}

.admin-inventory-result-row .stock-value.is-stock-warning {
  color: #b42318;
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.35);
}

.admin-inventory-result-row .result-barcode.has-matched-barcode {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  line-height: 1.15;
}

.admin-inventory-result-row .result-barcode small {
  display: block;
  overflow: hidden;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-result-thumb {
  width: 76px;
  height: 76px;
  display: block;
  border: 1px solid rgba(33, 45, 35, 0.12);
  border-radius: 6px;
  background: #fff;
  object-fit: cover;
}

.inventory-result-thumb.is-empty {
  background: #eef2f7;
}

.inventory-image-preview {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.inventory-image-preview img {
  max-width: min(92vw, 980px);
  max-height: 88vh;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.inventory-image-preview-close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.inventory-sales-history-dialog {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.inventory-sales-history-dialog[hidden] {
  display: none;
}

.inventory-sales-history-card {
  position: relative;
  width: min(1280px, calc(100vw - 56px));
  height: min(860px, calc(100vh - 56px));
  max-height: min(860px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid rgba(89, 213, 203, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 18px 20px;
}

.inventory-sales-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 58px;
}

.inventory-sales-history-head > div:first-child {
  min-width: 0;
}

.inventory-sales-history-head strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.inventory-sales-history-head span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.inventory-sales-history-purchase-box-summary {
  display: grid;
  gap: 3px;
  justify-items: end;
  max-width: min(520px, 44vw);
  margin-left: auto;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.inventory-sales-history-purchase-box-summary[hidden] {
  display: none;
}

.inventory-sales-history-purchase-box-summary-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  white-space: nowrap;
}

.inventory-sales-history-purchase-box-summary-row span,
.inventory-sales-history-purchase-box-summary-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-sales-history-purchase-box-summary-row strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.inventory-sales-history-form {
  display: grid;
  grid-template-columns: 170px 170px minmax(220px, 1fr) 108px;
  gap: 8px;
  align-items: end;
}

.inventory-sales-history-form label {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.inventory-sales-history-form input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.inventory-sales-history-form button {
  height: 38px;
  border-radius: 8px;
}

.inventory-sales-history-list {
  min-height: 180px;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.inventory-sales-history-message {
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.inventory-sales-history-message.is-error {
  color: #b42318;
}

.inventory-sales-history-message.is-warning {
  color: #92400e;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
}

.inventory-sales-history-summary {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.inventory-sales-history-summary strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.inventory-sales-history-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-sales-history-table {
  display: grid;
  min-width: 1120px;
}

.inventory-sales-history-row {
  display: grid;
  grid-template-columns: 104px 116px minmax(220px, 1fr) 150px 86px 86px 92px 92px 86px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.inventory-sales-history-row > * {
  min-width: 0;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-sales-history-row strong {
  font-weight: 900;
}

.inventory-ledger-in-qty.is-purchase-in {
  color: #dc2626;
}

.inventory-sales-history-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.inventory-sales-history-header {
  position: sticky;
  top: 65px;
  z-index: 1;
  min-height: 36px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .inventory-sales-history-dialog {
    padding: 10px;
  }

  .inventory-sales-history-card {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    padding: 14px 12px;
  }

  .inventory-sales-history-head strong {
    font-size: 17px;
  }

  .inventory-sales-history-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .inventory-sales-history-purchase-box-summary {
    width: 100%;
    justify-items: start;
    max-width: 100%;
    margin-left: 0;
    font-size: 11px;
  }

  .inventory-sales-history-purchase-box-summary-row {
    justify-content: flex-start;
    max-width: 100%;
    white-space: normal;
  }

  .inventory-sales-history-purchase-box-summary-row strong {
    font-size: 11px;
  }

  .inventory-sales-history-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-sales-history-form label:nth-child(3),
  .inventory-sales-history-form button {
    grid-column: 1 / -1;
  }

  .inventory-sales-history-summary {
    grid-template-columns: 1fr;
  }

  .inventory-sales-history-table {
    min-width: 960px;
  }

  .inventory-sales-history-row {
    grid-template-columns: 92px 104px 180px 130px 76px 76px 82px 82px 76px;
    font-size: 12px;
  }
}

.compact-strip-panel {
  padding: 10px 12px;
  margin-bottom: 10px;
}

.summary-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.summary-panel {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-head h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.admin-layout .panel-head {
  margin-bottom: 10px;
}

.admin-layout .panel-head h2 {
  font-size: 17px;
}

.lane-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.pending-title-row,
.ready-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pending-head-side,
.ready-head-side {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pending-amount-total,
.ready-amount-total {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.pending-amount-total {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.pending-pickup-filter-bar,
.ready-pickup-filter-bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 8px;
}

.pending-pickup-filter-button,
.ready-pickup-filter-button {
  height: 24px;
  padding: 0 9px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f8fafc;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.ready-pickup-filter-bar {
  max-width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.ready-pickup-filter-button {
  flex: 0 0 auto;
  height: 22px;
  padding: 0 6px;
  font-size: 11px;
  white-space: nowrap;
}

.ready-pickup-filter-label {
  flex: 0 0 auto;
  color: #c2410c;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.pending-pickup-filter-button.is-active {
  color: #fff;
  background: #16a34a;
  border-color: #16a34a;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
}

@media (min-width: 901px) {
  .ready-title-row {
    min-width: 0;
    flex-wrap: nowrap;
  }

  .pending-title-row {
    flex-wrap: nowrap;
  }

  .pending-pickup-filter-bar {
    flex-wrap: nowrap;
  }

  .pending-order-search-slot {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 3em;
  }

  .pending-order-search-slot .order-search-field {
    display: inline-grid;
    grid-template-columns: auto 170px max-content;
    align-items: center;
    gap: 6px;
    width: auto;
    margin-left: 0;
  }

  .pending-order-search-slot .order-search-field span {
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .pending-order-search-slot .order-search-field input {
    width: 170px;
  }

  .pending-order-search-slot .order-search-field small {
    min-height: 0;
    max-width: 150px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.ready-pickup-filter-button.is-active {
  color: #fff;
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.22);
}

.employee-picker-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  margin: -4px 0 2px;
}

.employee-picker-toolbar .secondary-button {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
}

.compact-strip-head {
  margin-bottom: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.status-chip.alt {
  background: #ece6ff;
  color: #5d3fd3;
}

.admin-layout .status-chip {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.lookup-form,
.admin-form {
  display: grid;
  gap: 14px;
}

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

.admin-form {
  gap: 10px;
}

.admin-form-wide {
  order: 2;
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  grid-template-columns:
    minmax(150px, 200px)
    minmax(112px, 150px)
    minmax(88px, 108px)
    minmax(150px, 170px)
    minmax(190px, 210px)
    minmax(82px, 96px)
    minmax(120px, 150px)
    64px;
  align-items: end;
  gap: 8px;
  justify-content: start;
}

.admin-form-wide .full-span {
  grid-column: auto;
}

.admin-form-wide .compact-field {
  width: 126px;
  max-width: 126px;
  justify-self: start;
}

.admin-form-wide .customer-picker-field {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: none;
}

.customer-picker-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.customer-new-button {
  min-width: 52px;
  padding: 0 10px;
}

.customer-suggestion-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 2000;
  display: grid;
  gap: 4px;
  width: 260px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(32, 44, 57, 0.16);
}

.customer-suggestion-list[hidden] {
  display: none;
}

.customer-suggestion-list button {
  width: 100%;
  height: 30px;
  justify-content: flex-start;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--ink);
  text-align: left;
}

.customer-suggestion-empty {
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.admin-form-wide .form-order-number {
  width: 100%;
  max-width: none;
  justify-self: start;
}

.admin-form-wide .form-estimated-amount {
  width: 100%;
  max-width: none;
  justify-self: start;
}

.admin-form-wide .field-date-compact {
  width: 100%;
  max-width: none;
  justify-self: start;
}

.admin-form-wide .field-delivery-compact {
  width: 100%;
  max-width: none;
  justify-self: start;
}

.admin-form-wide .delivery-location-compact {
  width: 100%;
  max-width: none;
  justify-self: start;
}

.admin-form-wide .remark-field {
  grid-column: span 1;
  width: 100%;
  max-width: none;
  justify-self: start;
}

.admin-form-wide .remark-field span {
  width: 100%;
  text-align: center;
}

.admin-form-wide .submit-order-button {
  width: 64px;
  justify-self: end;
  min-width: 64px;
}

@media (min-width: 769px) and (max-width: 1680px) {
  .entry-panel-row {
    grid-template-columns: minmax(0, 60%) minmax(320px, 38%);
    gap: 8px 2%;
  }

  .admin-form-wide {
    grid-column: 1 / -1;
    grid-template-columns:
      minmax(160px, 1.2fr)
      minmax(120px, 0.9fr)
      minmax(100px, 0.75fr)
      minmax(360px, 1.36fr)
      minmax(360px, 1.36fr)
      minmax(132px, 0.8fr);
    gap: 14px;
  }

  .admin-form-wide .submit-order-button {
    grid-column: -2 / -1;
  }
}

.user-message-form {
  order: 1;
  display: grid;
  grid-template-columns: 58px minmax(0, 216px) 58px;
  align-items: end;
  align-self: end;
  gap: 6px;
  width: 360px;
  margin-left: 0;
  padding: 6px;
  border: 2px solid #d92d20;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.user-message-form label {
  display: grid;
  gap: 5px;
}

.user-message-form span {
  font-size: 12px;
  font-weight: 700;
}

.user-message-form input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.user-message-send {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border-color: rgba(22, 163, 74, 0.24);
  background: #16a34a;
  color: #fff;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  white-space: nowrap;
}

.user-message-history-button {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  white-space: nowrap;
}

.mobile-message-history-button {
  display: none;
}

.customer-receivable-panel {
  order: 0;
  position: relative;
  display: grid;
  width: 100%;
  align-self: end;
  margin-left: 0;
}

.customer-receivable-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: end;
  gap: 4px;
}

.customer-receivable-search-form label,
.customer-receivable-detail-form label {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.customer-receivable-search-form > label > span,
.customer-receivable-detail-form span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.customer-receivable-search-form > label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.customer-receivable-order-status {
  min-height: 14px;
  overflow: hidden;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-receivable-search-form input,
.customer-receivable-detail-form input {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.customer-receivable-search-form button,
.customer-receivable-detail-form button {
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-receivable-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 2300;
  display: grid;
  gap: 6px;
  width: auto;
  max-height: min(560px, calc(100vh - 170px));
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(20, 184, 166, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.customer-receivable-popover[hidden] {
  display: none;
}

.customer-receivable-detail-dialog,
.customer-sales-orders-dialog {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: grid;
  place-items: start center;
  padding: 112px 24px 24px;
  background: rgba(15, 23, 42, 0.34);
}

.customer-receivable-detail-dialog[hidden],
.customer-sales-orders-dialog[hidden] {
  display: none;
}

.customer-receivable-ledger-password-card input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
}

.customer-receivable-ledger-dialog {
  position: fixed;
  inset: 0;
  z-index: 5100;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: rgba(15, 23, 42, 0.38);
}

.customer-receivable-ledger-dialog[hidden] {
  display: none;
}

.customer-receivable-ledger-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(1120px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 80px));
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(20, 184, 166, 0.34);
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.customer-receivable-ledger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 44px;
}

.customer-receivable-ledger-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}

.customer-receivable-ledger-header strong {
  padding: 6px 12px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 13px;
  white-space: nowrap;
}

.customer-receivable-ledger-card > input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.customer-receivable-ledger-list {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: #fff;
}

.customer-receivable-ledger-head,
.customer-receivable-ledger-row {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1.6fr) 160px 160px 140px 70px;
  align-items: center;
  gap: 10px;
}

.customer-receivable-ledger-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.34);
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.customer-receivable-ledger-row {
  width: 100%;
  min-height: 50px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.customer-receivable-ledger-row:hover {
  background: #f0fdfa;
}

.customer-receivable-ledger-row span,
.customer-receivable-ledger-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-receivable-ledger-head .ledger-amount,
.customer-receivable-ledger-row .ledger-amount {
  justify-self: end;
  text-align: right;
}

.customer-receivable-ledger-row .ledger-amount {
  color: #047857;
  font-size: 15px;
  font-weight: 900;
}

.customer-receivable-ledger-row .ledger-action {
  justify-self: end;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 900;
}

.customer-receivable-ledger-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.customer-sales-order-detail-dialog {
  position: fixed;
  inset: 0;
  z-index: 5300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
}

.customer-sales-order-detail-dialog[hidden] {
  display: none;
}

.customer-receivable-dialog-card {
  position: relative;
  display: grid;
  width: min(980px, calc(100vw - 48px));
  max-height: min(640px, calc(100vh - 160px));
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.customer-sales-order-card {
  position: relative;
  display: grid;
  gap: 10px;
  width: min(1160px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 150px));
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.customer-sales-order-detail-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(980px, calc(100vw - 48px));
  max-height: min(680px, calc(100vh - 80px));
  min-height: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.customer-receivable-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.customer-receivable-result,
.customer-receivable-detail {
  display: grid;
  gap: 6px;
}

.customer-receivable-result[hidden],
.customer-receivable-detail[hidden] {
  display: none;
}

.customer-receivable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px auto 42px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.customer-receivable-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-receivable-row-main strong,
.customer-receivable-detail-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-receivable-row-main small,
.customer-receivable-detail-summary span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-receivable-row-amount,
.customer-receivable-current {
  color: #047857;
  font-weight: 900;
  white-space: nowrap;
}

.customer-receivable-row-action {
  display: inline-grid;
  min-height: 26px;
  place-items: center;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.customer-receivable-row-sales {
  display: inline-grid;
  min-height: 26px;
  place-items: center;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-receivable-message {
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-receivable-message.is-error {
  color: #b42318;
}

.customer-receivable-detail {
  padding-top: 4px;
  border-top: 1px solid rgba(20, 184, 166, 0.22);
}

.customer-receivable-detail-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 108px;
  align-items: end;
  gap: 6px;
  padding-right: 42px;
}

.customer-sales-orders-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 104px 104px;
  align-items: end;
  gap: 6px;
  padding-right: 42px;
}

.customer-sales-orders-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.customer-sales-orders-form span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.customer-sales-orders-form input {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.customer-sales-orders-form button {
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-receivable-detail-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff;
}

.customer-sales-orders-list {
  display: grid;
  gap: 8px;
  min-height: 80px;
  overflow: auto;
}

.customer-sales-order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.customer-sales-order-summary > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-sales-order-summary-main {
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 8px;
}

.customer-sales-order-summary-main > span {
  grid-column: 1 / -1;
}

.customer-sales-order-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.customer-sales-order-filter-button {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-sales-order-filter-button.is-active {
  border-color: #5eead4;
  background: #ccfbf1;
  color: #0f766e;
}

.customer-sales-order-export-selected {
  justify-self: end;
  min-height: 34px;
  white-space: nowrap;
}

.customer-sales-order-summary strong,
.customer-sales-order-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-sales-order-summary span {
  color: var(--muted);
  font-size: 11px;
}

.customer-sales-order-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(520px, calc(100vh - 300px));
  overflow: auto;
}

.customer-sales-order-group {
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-sales-order-head {
  display: grid;
  grid-template-columns: 34px minmax(170px, 1fr) minmax(190px, 280px) 110px 76px 110px 120px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  font-size: 12px;
}

.customer-sales-order-select {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
}

.customer-sales-order-select input {
  width: 18px;
  height: 18px;
  accent-color: #0d9488;
}

.customer-sales-order-head span,
.customer-sales-order-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-sales-order-payment {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  justify-self: center;
  max-width: 100%;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.customer-sales-order-payment.is-paid {
  background: #dcfce7;
  color: #047857;
}

.customer-sales-order-payment.is-unpaid {
  background: #fee2e2;
  color: #b91c1c;
}

.customer-sales-order-payment.is-partial {
  background: #ede9fe;
  color: #6d28d9;
}

.customer-sales-order-status {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  font-weight: 900;
}

.customer-sales-order-detail-button {
  display: inline-grid;
  min-height: 26px;
  place-items: center;
  justify-self: end;
  padding: 0 10px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.customer-sales-order-detail-button:hover {
  background: #ccfbf1;
}

.customer-sales-order-actions { display: flex; gap: 6px; justify-content: flex-end; }
.customer-sales-order-print-button { background: #2563eb; border-color: #2563eb; color: white; }
.customer-sales-order-print-button:hover { background: #1d4ed8; }

.customer-sales-order-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-right: 38px;
}

.customer-sales-order-detail-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-sales-order-detail-head strong,
.customer-sales-order-detail-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-sales-order-detail-head span {
  color: var(--muted);
  font-size: 12px;
}

.customer-sales-order-detail-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.customer-sales-order-detail-summary {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 110px 76px 110px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
}

.customer-sales-order-detail-summary span,
.customer-sales-order-detail-summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-sales-order-lines {
  display: grid;
}

.customer-sales-order-line {
  display: grid;
  grid-template-columns: 34px 66px minmax(220px, 1fr) 72px 84px 96px;
  align-items: center;
  gap: 8px;
  min-width: 720px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.customer-sales-order-line-index {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #e8f8f3;
  color: #087767;
  font-weight: 900;
}

.customer-sales-order-thumb {
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  object-fit: cover;
  font-size: 11px;
  font-weight: 900;
}

.customer-sales-order-product {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-sales-order-product strong,
.customer-sales-order-product span,
.customer-sales-order-line > span,
.customer-sales-order-line > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-sales-order-product span {
  color: var(--muted);
  font-size: 11px;
}

.customer-receivable-detail-summary > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-receivable-detail-table {
  display: grid;
  max-height: min(360px, calc(100vh - 390px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-receivable-detail-head,
.customer-receivable-detail-row {
  display: grid;
  grid-template-columns: 150px minmax(140px, 1fr) minmax(170px, 1.15fr) 94px 94px 108px;
  align-items: center;
  gap: 6px;
  min-width: 820px;
  padding: 6px 8px;
  font-size: 12px;
}

.customer-receivable-detail-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 900;
}

.customer-receivable-detail-row {
  border-top: 1px solid var(--line);
}

.customer-receivable-detail-row span,
.customer-receivable-detail-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-receivable-detail-row small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-search-field {
  order: 1;
  display: grid;
  align-self: end;
  gap: 5px;
  width: 150px;
  margin-left: auto;
}

.order-search-field span {
  font-size: 12px;
  font-weight: 700;
}

.order-search-field input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.order-search-field small {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.user-message-toast {
  position: fixed;
  top: 108px;
  right: 16px;
  z-index: 12000;
  width: min(360px, calc(100vw - 24px));
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(217, 108, 31, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(32, 44, 57, 0.18);
}

.user-message-toast[hidden] {
  display: none;
}

.user-message-toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-message-toast-head strong {
  color: var(--accent);
  font-size: 15px;
}

.user-message-toast-body {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
}

.user-message-toast-actions {
  display: flex;
  justify-content: flex-end;
}

.user-message-toast-actions .secondary-button {
  height: 32px;
  border-radius: 8px;
}

.addon-alert-toast {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.26);
}

.addon-alert-toast[hidden] {
  display: none;
}

.addon-alert-toast-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(460px, calc(100vw - 40px));
  padding: 30px 28px 26px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.addon-alert-toast-card .dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
}

.addon-alert-toast-card span {
  color: #2563eb;
  font-size: 16px;
  font-weight: 900;
}

.addon-alert-toast-card strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1.15;
}

.addon-alert-toast-card p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.inventory-review-master-fields {
  grid-template-columns: minmax(260px, 520px);
}

.inventory-review-item-stamp {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 1;
  width: 68px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(217, 108, 31, 0.34);
  border-radius: 8px;
  color: rgba(217, 108, 31, 0.48);
  font-size: 15px;
  font-weight: 900;
  pointer-events: none;
  transform: translateX(-50%) rotate(-8deg);
}

.review-child-row.is-checked .inventory-review-item-stamp {
  border-color: rgba(21, 94, 239, 0.34);
  color: rgba(21, 94, 239, 0.48);
}

.inventory-review-process-note {
  display: grid;
  gap: 6px;
}

.inventory-review-process-note input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reservation-success-toast {
  position: fixed;
  inset: 0;
  z-index: 13200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.reservation-success-toast[hidden] {
  display: none;
}

.reservation-success-toast.is-visible {
  opacity: 1;
}

.reservation-success-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
  padding: 24px 22px 22px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.reservation-success-card span {
  color: #2563eb;
  font-size: 14px;
  font-weight: 900;
}

.reservation-success-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.3;
}

.addon-voice-unlock {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 12500;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 8px;
  color: #fff;
  background: #2563eb;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.addon-voice-unlock[hidden] {
  display: none;
}

.user-message-history-card {
  width: min(520px, calc(100vw - 24px));
}

.user-message-history-list {
  display: grid;
  gap: 8px;
  max-height: min(62vh, 520px);
  overflow: auto;
}

.user-message-history-item {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.user-message-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.user-message-history-meta strong {
  color: var(--accent);
  font-size: 14px;
}

.user-message-history-text {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.lookup-form label,
.admin-form label {
  display: grid;
  gap: 8px;
}

.entry-panel .admin-form label {
  gap: 5px;
  min-width: 0;
}

.form-fixed-value {
  display: grid;
  gap: 8px;
  align-content: start;
}

.lookup-form span,
.admin-form span,
.form-fixed-value span {
  font-size: 14px;
  font-weight: 700;
}

.entry-panel .admin-form span {
  font-size: 12px;
}

.form-fixed-value strong {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.full-span {
  grid-column: 1 / -1;
}

.is-hidden {
  display: none !important;
}

input,
button,
select {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

input {
  height: 52px;
  padding: 0 16px;
}

select {
  height: 48px;
  padding: 0 12px;
}

.admin-form input,
.admin-form select,
.inline-editor input,
.count-editor input,
.card-actions select {
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
}

.entry-panel .admin-form input,
.entry-panel .admin-form select {
  height: 34px;
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(37, 111, 77, 0.2);
  border-color: rgba(37, 111, 77, 0.45);
}

button {
  height: 54px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #256f4d 0%, #1d5b9d 100%);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.admin-form button {
  height: 44px;
  border-radius: 12px;
}

.entry-panel .admin-form button {
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
}

.secondary-button,
.danger-button {
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}

.admin-layout .secondary-button,
.admin-layout .danger-button {
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
}

.danger-button {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.18);
  background: #fff3f2;
}

.admin-home-top-bar .cargo-entry-button.secondary-button,
.admin-home-top-bar .refresh-orders-button.secondary-button,
.admin-home-top-bar .delivery-notice-button.secondary-button {
  border: 1px solid rgba(217, 108, 31, 0.22);
  background: linear-gradient(135deg, #fff6e8 0%, #ffe7c4 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  color: var(--ink);
  font-weight: 800;
}

.toolbar {
  margin-top: 16px;
}

.admin-layout .toolbar {
  margin-top: 10px;
}

.entry-panel .toolbar {
  margin-top: 10px;
}

.hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.admin-layout .hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.picking-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
}

.picking-pill {
  position: relative;
  padding: 3px 5px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  overflow: visible;
}

.picking-pill.is-new-order {
  background: linear-gradient(180deg, #fff7cc 0%, #fff0ad 100%);
  border-color: rgba(217, 108, 31, 0.32);
  box-shadow: 0 10px 26px rgba(217, 108, 31, 0.16);
}

.picking-pill.is-addon-order {
  background: linear-gradient(180deg, #fff0f6 0%, #ffd9e8 100%);
  border-color: rgba(219, 39, 119, 0.34);
  box-shadow: 0 10px 26px rgba(219, 39, 119, 0.16);
}

.picking-pill.is-search-match {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.28), 0 10px 26px rgba(17, 24, 39, 0.2);
}

#ready-summary .picking-pill.is-ready-reviewed-recently {
  border-bottom-color: #16a34a;
  border-bottom-width: 3px;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.18), inset 0 -5px 0 rgba(22, 163, 74, 0.18);
}

#picking-summary .picking-pill {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 98px;
}

#pending-summary .picking-pill {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 98px;
}

#pending-summary .picking-pill .picking-pill-watermark {
  top: 32%;
}

.picking-pill-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 0;
  font-size: 12px;
}

.picking-pill-main strong {
  font-size: 15px;
  line-height: 1.2;
}

.picking-pill-name-block {
  display: grid;
  gap: 2px;
}

.new-order-badge {
  display: grid;
  place-items: center;
  position: absolute;
  right: -7px;
  top: -9px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 2px solid #16a34a;
  border-radius: 999px 999px 999px 12px;
  color: #155eef;
  background: #f0fdf4;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.22);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.addon-order-badge {
  display: grid;
  place-items: center;
  position: absolute;
  right: -7px;
  top: -9px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 2px solid #db2777;
  border-radius: 999px 999px 999px 12px;
  color: #6d28d9;
  background: #fff;
  box-shadow: 0 8px 20px rgba(219, 39, 119, 0.22);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

#picking-summary .addon-order-badge {
  left: calc(50% - 82px);
  right: auto;
  top: 54%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 8px;
}

.addon-alert-bubble {
  position: absolute;
  right: 10px;
  top: -14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 18px;
  min-width: 46px;
  min-height: 18px;
  padding: 0 6px;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.18);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.addon-alert-bubble::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -5px;
  width: 9px;
  height: 7px;
  background: #2563eb;
  clip-path: polygon(0 0, 100% 0, 12% 100%);
}

.addon-alert-text,
.addon-alert-count {
  pointer-events: none;
}

.addon-alert-count {
  position: absolute;
  right: -5px;
  top: -7px;
  display: grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-size: 8px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.24);
}

.addon-detail-button {
  color: #166534;
  border-color: rgba(22, 163, 74, 0.35);
  background: #f0fdf4;
}

.addon-detail-card {
  max-width: 960px;
  width: min(960px, calc(100vw - 36px));
}

.addon-detail-actions {
  margin-top: 14px;
}

.addon-detail-actions .secondary-button,
.addon-detail-actions .quick-primary-button {
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
}

.addon-note-editor {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.addon-note-editor textarea {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.addon-drop-zone {
  display: grid;
  place-items: center;
  min-height: 52px;
  margin: 10px 0 12px;
  border: 1px dashed rgba(22, 163, 74, 0.45);
  border-radius: 8px;
  color: #166534;
  background: #f0fdf4;
  font-size: 13px;
  font-weight: 800;
}

.packing-detail-content.is-dragging-addon .addon-drop-zone {
  border-color: #16a34a;
  background: #dcfce7;
  box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.18);
}

.addon-batch-list {
  display: grid;
  gap: 12px;
}

.addon-batch-card {
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: rgba(240, 253, 244, 0.5);
}

.addon-batch-card.is-canceled {
  opacity: 0.62;
  background: #f8fafc;
}

.addon-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.addon-batch-head > div {
  display: grid;
  gap: 3px;
}

.addon-batch-head strong {
  color: #166534;
  font-size: 14px;
}

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

.addon-batch-action {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.addon-image-section .image-delete-button {
  width: 40px;
  height: 16px;
  min-width: 40px;
  min-height: 16px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1;
}

#pending-summary .picking-pill.is-addon-order .picking-pill-side {
  transform: translateY(12px);
}

.delivery-count-row {
  position: relative;
  z-index: 1;
  margin: 6px 0 2px;
  color: #d92d20;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.pending-schedule-row {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  text-align: center;
}

.pending-schedule-row .quick-pickup-time {
  font-size: 11px;
  font-weight: 700;
}

#pending-summary .picking-pill-actions {
  padding-top: 0;
}

@media (max-width: 900px) {
  #pending-summary .quick-action-button {
    height: 22px;
    padding: 0 7px;
    font-size: 10px;
  }

  #pending-summary .picking-pill-main strong {
    font-size: 13px;
  }
}

.picking-pill-main span,
.picking-pill-state {
  color: var(--muted);
  font-size: 11px;
}

.picking-pill-order-number {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 1px;
  color: #c96a2b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.estimate-pill-button {
  flex: 0 0 auto;
  min-width: 0;
  height: 18px;
  padding: 0 5px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.estimate-dialog-card {
  width: min(420px, calc(100vw - 32px));
}

.estimate-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.estimate-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.estimate-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.estimate-summary-grid strong {
  color: var(--ink);
  font-size: 17px;
}

.picking-pill-side {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: end;
  gap: 2px;
  flex-shrink: 0;
}

.picking-pill-side-centered {
  justify-items: center;
  text-align: center;
}

.delivery-center-info {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  margin: 6px 0 3px;
  text-align: center;
}

.delivery-center-date {
  color: #7c3aed;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.delivery-center-time {
  color: #b42318;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.delivery-reminder-card {
  min-width: 620px;
  max-width: min(86vw, 820px);
  padding: 26px 28px;
  border: 3px solid rgba(217, 45, 32, 0.28);
  border-radius: 26px;
  background: linear-gradient(180deg, #fff7f5 0%, #fff1ef 100%);
  box-shadow: 0 28px 80px rgba(180, 35, 24, 0.18);
}

.delivery-reminder-card .admin-dialog-head h3 {
  font-size: 30px;
}

.delivery-reminder-text {
  margin: 14px 0 6px;
  color: #b42318;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.delivery-notice-card {
  width: min(920px, calc(100vw - 32px));
  max-width: none;
}

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

.delivery-notice-section {
  min-width: 0;
}

.delivery-notice-section h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 900;
}

.delivery-notice-list {
  display: grid;
  gap: 8px;
  max-height: 60vh;
  overflow: auto;
}

.delivery-notice-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8f3;
}

.delivery-notice-item strong {
  font-size: 15px;
}

.delivery-notice-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .delivery-notice-card {
    width: calc(100vw - 20px);
  }

  .delivery-notice-columns {
    grid-template-columns: 1fr;
  }

  .delivery-notice-list {
    max-height: 34vh;
  }
}

.picking-pill-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  opacity: 0.28;
  pointer-events: none;
  white-space: nowrap;
  color: #c96a2b;
}

.picking-pill-watermark.progress {
  color: #155eef;
}

.picking-pill-watermark.audit {
  color: #7c3aed;
}

.picking-pill-watermark.ready {
  color: #d92d20;
}

.delivery-stamp {
  position: absolute;
  top: -10px;
  right: -12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 3px solid #d92d20;
  border-radius: 999px;
  color: #7c3aed;
  background: rgba(255, 248, 248, 0.72);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  transform: rotate(14deg);
  box-shadow: 0 3px 10px rgba(217, 45, 32, 0.12);
  pointer-events: none;
}

.pending-today-stamp {
  position: absolute;
  top: -10px;
  right: -12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 3px solid #d92d20;
  border-radius: 999px;
  color: #7c3aed;
  background: rgba(255, 248, 248, 0.76);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  transform: rotate(14deg);
  box-shadow: 0 3px 10px rgba(217, 45, 32, 0.12);
  pointer-events: none;
}

.pending-today-stamp.urgent {
  color: #d92d20;
  border-color: #b42318;
  background: rgba(255, 243, 242, 0.82);
}

.quick-pickup-time {
  color: var(--muted);
  font-size: 10px;
}

.quick-pickup-time.is-today {
  color: #127a43;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #f08a24;
  border-radius: 999px;
  background: #fff4e8;
  font-weight: 800;
}

.picking-pill-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  min-height: 0;
}

.picking-pill-meta-centered {
  justify-content: center;
  margin-top: 0;
  margin-bottom: 1px;
}

.picking-pill-meta.inline-meta {
  justify-content: space-between;
  gap: 6px;
}

.quick-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff0df;
  color: #b54708;
  font-size: 11px;
  font-weight: 800;
}

.quick-status-badge.ready {
  background: #dff4e8;
  color: #127a43;
}

.quick-status-badge.progress {
  background: #eaf2ff;
  color: #155eef;
}

.quick-status-badge.audit {
  background: #f3e8ff;
  color: #7c3aed;
}

.quick-status-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-count-inline-ready {
  color: #d92d20;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.quick-amount-inline {
  display: inline-block;
  margin-left: 0;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

#ready-summary .quick-amount-inline {
  transform: translateY(11px);
}

.quick-status-trigger {
  border: 0;
  cursor: pointer;
}

.quick-count-text {
  color: #127a43;
  font-size: 11px;
  font-weight: 800;
}

.picking-pill-hint {
  margin-top: 4px;
  color: #b54708;
  font-size: 10px;
}

.compact-empty {
  padding: 10px 12px;
  font-size: 12px;
}

.summary-lane .compact-empty {
  min-height: 68px;
  display: flex;
  align-items: center;
}

.picking-pill-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.ready-flow-actions {
  display: grid;
  gap: 3px;
}

.ready-flow-actions .quick-action-button {
  min-width: 58px;
}

#ready-summary .picking-pill-actions {
  align-items: flex-end;
  gap: 3px;
  margin-top: 0;
}

#ready-summary .picking-pill-meta {
  display: grid;
  justify-items: start;
  gap: 3px;
  margin-top: 1px;
  line-height: 1;
}

#ready-summary .ready-flow-actions {
  gap: 1px;
}

#ready-summary .quick-action-button {
  height: 22px;
  padding: 0 7px;
}

#ready-summary .delivery-center-info {
  position: absolute;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -50%);
  z-index: 0;
  gap: 0;
  margin: 0;
  pointer-events: none;
}

#ready-summary .delivery-center-date {
  font-size: 13px;
}

#ready-summary .delivery-center-time {
  font-size: 13px;
}

#picking-summary .picking-pill-actions {
  margin-top: auto;
  padding-top: 10px;
}

#pending-summary .picking-pill-actions {
  margin-top: auto;
  padding-top: 1px;
}

.picking-pill-actions select {
  width: auto;
  min-width: 92px;
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 12px;
}

.quick-action-button {
  height: 26px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 11px;
}

.quick-primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #0b63f6 0%, #1d4ed8 100%);
}

.quick-count-editor {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  align-items: center;
}

.quick-pickup-editor {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  align-items: center;
}

.quick-schedule-popover {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 42px;
  z-index: 16000;
}

.quick-schedule-popover-floating {
  position: fixed;
  left: var(--schedule-popover-left, 12px);
  top: var(--schedule-popover-top, 120px);
  right: auto;
  bottom: auto;
  width: var(--schedule-popover-width, min(300px, calc(100vw - 24px)));
}

.quick-schedule-card {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(11, 99, 246, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 24px rgba(23, 32, 54, 0.14);
}

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

.quick-schedule-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.quick-schedule-card input,
.quick-schedule-card select {
  height: 34px;
  border-radius: 10px;
}

.quick-schedule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.admin-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.admin-dialog::backdrop {
  background: rgba(18, 24, 31, 0.28);
}

.admin-dialog-card {
  min-width: 360px;
  max-width: 420px;
  max-height: 88vh;
  overflow: auto;
  padding: 18px;
  border-radius: 20px;
  background: #fffdf9;
  border: 1px solid rgba(33, 45, 35, 0.12);
  box-shadow: 0 18px 50px rgba(39, 45, 31, 0.18);
}

.admin-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-dialog-head h3 {
  margin: 0;
  font-size: 20px;
}

.dialog-close {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.dialog-hint {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.admin-dialog-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.admin-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.detail-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.detail-title-line h3 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-title-edit {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}

.packing-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.packing-detail-grid div {
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8f8f3;
}

.packing-detail-grid .detail-estimate-edit-button {
  align-self: stretch;
  width: 100%;
  min-height: 0;
  padding: 0 6px;
  border-radius: 8px;
  color: #137047;
  background: #e6f6ee;
  border: 1px solid #b9e4cd;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.packing-detail-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.packing-image-section {
  margin-top: 14px;
}

.detail-status-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  margin-top: 8px;
}

.detail-status-editor label {
  flex: 1;
  display: grid;
  gap: 6px;
  margin: 0;
}

.detail-status-editor span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-status-editor input,
.detail-status-editor select {
  min-width: 0;
  height: 34px;
  border-radius: 12px;
}

#detail-packing-people-save,
#picked-detail-packing-people-save {
  width: fit-content;
  justify-self: start;
}

.detail-compact-grid {
  grid-template-columns: minmax(0, 1fr) 96px 70px;
  gap: 6px;
}

.detail-compact-grid .detail-order-number strong {
  word-break: normal;
}

.detail-compact-grid .detail-order-number {
  padding: 4px 10px 5px;
}

.detail-order-number-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.detail-order-number-head span {
  margin-bottom: 0;
}

.detail-order-number-line strong {
  display: block;
  min-width: 0;
  line-height: 1.15;
  white-space: nowrap;
}

.detail-order-number-edit {
  height: 20px;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 11px;
  white-space: nowrap;
}

.detail-compact-grid .detail-count-small {
  text-align: center;
}

.detail-compact-grid .detail-estimate-edit-button {
  grid-column: 3 / 4;
  align-self: center;
  min-height: 34px;
}

.detail-compact-grid .detail-full-row {
  grid-column: 1 / -1;
}

.detail-compact-grid .detail-delivery-small {
  grid-column: 1 / 2;
}

.detail-compact-grid .detail-packing-people-wide {
  grid-column: 2 / 4;
}

.detail-compact-grid .detail-packing-people-wide strong {
  white-space: nowrap;
}

.detail-compact-grid .detail-time-row {
  grid-column: 1 / 3;
  min-height: 54px;
}

.detail-compact-grid .detail-time-total {
  grid-column: 3 / 4;
  grid-row: span 2;
  display: grid;
  align-content: center;
  min-height: 114px;
}

.detail-compact-grid > div:nth-child(4),
.detail-compact-grid > div:nth-child(5) {
  min-height: 48px;
}

.detail-people-editor {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.detail-group-editor-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.detail-group-editor-row > div {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.detail-status-edit-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.detail-final-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.detail-final-row > div {
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8f8f3;
}

.detail-final-row span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-mini-button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  white-space: nowrap;
}

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

.image-delete-all-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.detail-status-placeholder {
  flex: 1;
}

.app-confirm-card {
  width: min(420px, calc(100vw - 32px));
}

.app-confirm-card .dialog-hint {
  margin: 8px 0 18px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.packing-image-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.packing-image-head h4 {
  margin: 0;
  font-size: 15px;
}

.packing-image-count {
  color: var(--muted);
  font-size: 12px;
}

.packing-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.packing-image-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.packing-image-card img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
  cursor: zoom-in;
}

.packing-image-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.packing-image-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
}

.packing-image-card-footer span {
  min-width: 0;
  flex: 1;
  padding: 0;
}

.image-delete-button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(185, 28, 28, 0.2);
  border-radius: 8px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 11px;
  font-weight: 800;
}

.image-preview-card {
  position: relative;
  width: min(98vw, 1680px);
  max-width: min(98vw, 1680px);
  max-height: 96vh;
  padding: 12px;
  border-radius: 22px;
  background: #fffdf9;
  border: 1px solid rgba(33, 45, 35, 0.12);
  box-shadow: 0 18px 50px rgba(39, 45, 31, 0.18);
}

.image-preview-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: calc(96vh - 24px);
  object-fit: contain;
}

.image-preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.quick-confirm-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}

.quick-count-editor input {
  width: 96px;
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 12px;
}

.result-area {
  margin-top: 20px;
  min-height: 240px;
}

.empty-state,
.order-card,
.notice,
.admin-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.empty-state,
.notice {
  padding: 20px;
}

.notice {
  background: #fff7ef;
  color: #8a4a17;
}

.notice-error {
  color: #b42318;
}

.result-list,
.admin-orders {
  display: grid;
  gap: 14px;
}

.admin-orders {
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-card,
.admin-card {
  padding: 18px;
}

.admin-card {
  padding: 12px 14px;
  border-radius: 18px;
}

.done-card {
  opacity: 0.76;
}

.order-head,
.admin-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.order-head h3,
.admin-card-head h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.admin-card-head h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.order-subtitle {
  color: var(--muted);
  font-size: 14px;
}

.admin-card .order-subtitle {
  font-size: 12px;
}

.admin-card-summary {
  list-style: none;
  cursor: pointer;
}

.admin-card-summary::-webkit-details-marker {
  display: none;
}

.admin-card-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.count-editor {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.inline-editor {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.count-editor label {
  flex: 1;
  display: grid;
  gap: 8px;
}

.inline-editor label {
  flex: 1;
  display: grid;
  gap: 8px;
}

.count-editor span {
  font-size: 14px;
  font-weight: 700;
}

.inline-editor span,
.name-time {
  font-size: 14px;
  font-weight: 700;
}

.name-time {
  margin-left: 8px;
  color: #0b63f6;
  text-shadow: 0 0 18px rgba(11, 99, 246, 0.16);
  font-weight: 600;
}

.summary-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.summary-toggle,
.order-mini {
  color: var(--muted);
  font-size: 13px;
}

.order-mini {
  margin-top: 8px;
}

.admin-card .summary-toggle,
.admin-card .order-mini {
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.admin-card .badge {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.badge.picking {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.ready {
  background: var(--ready-soft);
  color: var(--ready);
}

.order-grid,
.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-card-grid {
  gap: 8px;
}

.order-item,
.admin-card-grid div {
  padding: 14px;
  border-radius: 16px;
  background: #f8f8f3;
}

.admin-card-grid div {
  padding: 10px 12px;
  border-radius: 12px;
}

.order-item span,
.admin-card-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-card-grid span {
  margin-bottom: 4px;
  font-size: 12px;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}

.card-actions select {
  max-width: 136px;
}

.table-wrap {
  overflow: auto;
}

.report-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 12px;
  margin-bottom: 14px;
}

.report-toolbar-wide {
  grid-template-columns: repeat(4, minmax(0, 220px));
}

.report-toolbar label {
  display: grid;
  gap: 6px;
}

.cargo-query-toolbar {
  align-items: end;
}

.cargo-query-toolbar button {
  height: 42px;
}

.report-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.report-actions button {
  min-width: 96px;
}

.order-detail-mobile-info {
  display: none;
}

.report-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.report-summary-strip div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-summary-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.report-summary-strip strong {
  font-size: 16px;
  font-weight: 800;
}

.report-summary-strip .shangsu-wholesale-summary-actions {
  gap: 8px;
}

.compact-action-button {
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.shangsu-wholesale-dialog-card {
  box-sizing: border-box;
  width: min(1120px, calc(100vw - 96px));
  max-width: none;
  max-height: min(86vh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 26px 28px;
}

.shangsu-wholesale-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(360px, auto);
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}

.shangsu-wholesale-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.shangsu-wholesale-toolbar input {
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.shangsu-wholesale-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
}

.shangsu-wholesale-actions .secondary-button,
.shangsu-wholesale-actions .quick-primary-button {
  min-width: 82px;
  min-height: 46px;
  padding-inline: 18px;
}

.shangsu-wholesale-total {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.shangsu-wholesale-total div {
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.shangsu-wholesale-total span,
.shangsu-wholesale-cache-note {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.shangsu-wholesale-total strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.shangsu-wholesale-table-wrap {
  max-height: 420px;
  overflow: auto;
}

.shangsu-wholesale-table-wrap table {
  width: 100%;
  min-width: 980px;
}

.shangsu-wholesale-order-detail-row > td {
  background: #f8fafc;
  padding: 10px 14px;
}

.shangsu-wholesale-order-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.shangsu-wholesale-order-details table {
  width: 100%;
  min-width: 1080px;
}

.shangsu-wholesale-order-details th,
.shangsu-wholesale-order-details td {
  padding: 8px 10px;
  font-size: 13px;
}

.shangsu-profit-export-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.shangsu-wholesale-result .is-error {
  color: #b42318;
}

.wholesale-audit-toolbar {
  grid-template-columns: repeat(2, minmax(180px, 240px)) auto;
}

.wholesale-audit-summary strong {
  white-space: nowrap;
}

.wholesale-audit-table-wrap {
  max-height: 62vh;
  overflow: auto;
}

.wholesale-audit-table-wrap table {
  min-width: 1120px;
}

.wholesale-audit-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fffdf9;
  box-shadow: 0 1px 0 var(--line);
}

.wholesale-audit-table-wrap td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.wholesale-audit-table-wrap .audit-loss {
  color: #b42318;
  font-weight: 900;
}

.wholesale-audit-page .empty-state.is-error {
  color: #b42318;
}

.branch-pos-toolbar {
  grid-template-columns: repeat(3, minmax(180px, 240px)) minmax(420px, auto);
}

.branch-pos-actions {
  flex-wrap: wrap;
}

.branch-pos-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.branch-pos-tab-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.branch-pos-tab-button.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: var(--primary);
}

.branch-pos-tab-panel[hidden] {
  display: none !important;
}

.branch-pos-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
}

.branch-pos-summary div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 58px;
  background: #f8fafc;
}

.branch-pos-overall-summary div {
  min-width: 0;
}

.branch-pos-summary span {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.branch-pos-summary strong {
  font-size: 16px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.branch-pos-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 8px;
}

.branch-pos-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.branch-pos-sort-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.branch-pos-sort-button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.branch-pos-sort-button.is-active {
  background: #eff6ff;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.branch-pos-orders-head {
  position: relative;
  z-index: 5;
  gap: 12px;
}

.branch-pos-order-tools {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.branch-pos-product-search {
  flex: 1 1 460px;
  min-width: 260px;
  max-width: 680px;
}

.branch-pos-product-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.branch-pos-product-search-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.branch-pos-product-search-control input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  font-size: 15px;
  font-weight: 700;
}

.branch-pos-product-search-control input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(37, 99, 235, 0.14);
}

.branch-pos-product-search-control .secondary-button {
  height: 42px;
  flex: 0 0 auto;
}

.branch-pos-product-search-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.branch-pos-product-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 40;
  max-height: min(68vh, 680px);
  margin-top: 0;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.branch-pos-product-result-summary {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #cbd5e1;
  background: #eff6ff;
}

.branch-pos-product-result-summary div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
}

.branch-pos-product-result-summary span,
.branch-pos-product-result-summary strong {
  display: block;
}

.branch-pos-product-result-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.branch-pos-product-result-summary strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.branch-pos-product-result-note {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.branch-pos-product-result-list {
  display: grid;
}

.branch-pos-product-result-row {
  display: grid;
  grid-template-columns: 72px minmax(220px, 1.3fr) minmax(520px, 2fr);
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-top: 1px solid #e2e8f0;
}

.branch-pos-product-result-thumb {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.branch-pos-product-result-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.branch-pos-product-result-thumb.is-empty {
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.branch-pos-product-result-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.branch-pos-product-result-main strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.branch-pos-product-result-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.branch-pos-product-result-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.branch-pos-product-result-metrics div {
  min-width: 0;
}

.branch-pos-product-result-metrics span,
.branch-pos-product-result-metrics strong {
  display: block;
}

.branch-pos-product-result-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.branch-pos-product-result-metrics strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.branch-pos-product-search-empty {
  padding: 18px 14px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.branch-pos-overall-daily-wrap,
.branch-pos-daily-wrap,
.branch-pos-orders-wrap,
.branch-pos-wholesale-wrap {
  max-height: 46vh;
  overflow: auto;
  overflow-x: hidden;
}

.branch-pos-overall-daily-wrap table,
.branch-pos-daily-wrap table,
.branch-pos-orders-wrap table,
.branch-pos-wholesale-wrap table,
.branch-pos-wholesale-wrap .shangsu-wholesale-order-details table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.branch-pos-overall-daily-wrap th,
.branch-pos-overall-daily-wrap td,
.branch-pos-daily-wrap th,
.branch-pos-daily-wrap td,
.branch-pos-orders-wrap th,
.branch-pos-orders-wrap td,
.branch-pos-wholesale-wrap th,
.branch-pos-wholesale-wrap td {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.branch-pos-overall-daily-wrap thead th,
.branch-pos-daily-wrap thead th,
.branch-pos-orders-wrap thead th,
.branch-pos-wholesale-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fffdf9;
  box-shadow: 0 1px 0 var(--line);
}

.branch-pos-positive {
  color: #067647;
  font-weight: 900;
}

.branch-pos-negative {
  color: #b42318;
  font-weight: 900;
}

.purchase-assistant-page .admin-page-shell {
  width: min(1680px, calc(100% - 28px));
}

.purchase-assistant-top-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.purchase-assistant-title {
  position: static;
  transform: none;
  pointer-events: auto;
  justify-self: center;
  text-align: center;
}

.purchase-assistant-title h1 {
  margin: 0;
  font-size: 30px;
}

.purchase-assistant-panel .panel-head {
  align-items: center;
}

.purchase-assistant-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.purchase-assistant-toolbar-row {
  display: grid;
  gap: 10px;
  align-items: end;
}

.purchase-assistant-toolbar-primary {
  grid-template-columns: minmax(136px, 160px) minmax(136px, 160px) minmax(240px, 320px) minmax(0, 1fr);
  justify-content: stretch;
  align-items: center;
}

.purchase-assistant-toolbar-secondary {
  grid-template-columns: repeat(9, minmax(88px, max-content));
  justify-content: end;
  align-items: center;
}

.purchase-assistant-date-field,
.purchase-assistant-search-field {
  justify-content: end;
  gap: 0;
}

.purchase-assistant-search-field {
  min-width: 240px;
  max-width: 320px;
}

.purchase-assistant-search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 6px;
}

.purchase-assistant-home-link {
  align-self: center;
  width: auto;
  min-width: 70px;
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 18px;
}

.purchase-assistant-home-link strong {
  line-height: 1;
}

.purchase-assistant-toolbar input,
.purchase-assistant-toolbar select {
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
}

.purchase-assistant-search-control input {
  text-align: left;
}

.purchase-assistant-toolbar-button {
  display: inline-flex;
  height: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.purchase-assistant-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
  justify-content: flex-end;
}

.purchase-assistant-quick-ranges,
.purchase-assistant-primary-actions {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, max-content);
  align-items: center;
  gap: 8px;
}

.purchase-assistant-primary-actions {
  grid-auto-columns: minmax(80px, max-content);
}

.purchase-assistant-more-menu {
  position: relative;
  align-self: center;
}

.purchase-assistant-more-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  list-style: none;
}

.purchase-assistant-more-trigger::-webkit-details-marker {
  display: none;
}

.purchase-assistant-more-trigger span {
  font-size: 24px;
  line-height: 1;
}

.purchase-assistant-more-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 28px rgba(31, 41, 55, 0.14);
}

.purchase-assistant-more-list .secondary-button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.purchase-assistant-source-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.purchase-assistant-source-status span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-source-status span.is-warning,
.purchase-assistant-page .empty-state.is-error,
#purchase-assistant-status.is-warning {
  color: #b42318;
}

.purchase-assistant-filter-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 12px;
}

.purchase-assistant-filter-strip[hidden] {
  display: none;
}

.purchase-assistant-level-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.purchase-assistant-level-filters[hidden] {
  display: none;
}

.purchase-assistant-level-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
  white-space: nowrap;
}

.purchase-assistant-inline-status-tools {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
}

.purchase-assistant-rule-help {
  min-height: 26px;
  margin-left: auto;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-assistant-inline-status {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.purchase-assistant-level-filter strong {
  color: inherit;
  font-size: 12px;
}

.purchase-assistant-level-filter.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.purchase-assistant-level-filter.is-urgent.is-active {
  border-color: #dc2626;
  background: #fef2f2;
  color: #b42318;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

.purchase-assistant-level-filter.is-discard.is-active {
  border-color: #64748b;
  background: #f8fafc;
  color: #334155;
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.14);
}

.purchase-assistant-level-filter.is-replenish.is-active {
  border-color: #ea580c;
  background: #fff7ed;
  color: #c2410c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.12);
}

.purchase-assistant-level-filter.is-slow.is-active {
  border-color: #16a34a;
  background: #ecfdf3;
  color: #067647;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

.purchase-assistant-speed-filters .purchase-assistant-speed-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
  white-space: nowrap;
}

.purchase-assistant-speed-filter strong {
  color: inherit;
  font-size: 11px;
}

.purchase-assistant-speed-filter.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.purchase-assistant-speed-filter.is-fast.is-active {
  border-color: #dc2626;
  background: #fef2f2;
  color: #b42318;
}

.purchase-assistant-speed-filter.is-stagnant.is-active,
.purchase-assistant-speed-filter.is-insufficient.is-active {
  border-color: #64748b;
  background: #f8fafc;
  color: #334155;
}

.purchase-assistant-progress {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-progress-inline {
  width: 140px;
  min-width: 140px;
  margin: 0;
  padding: 5px 7px;
  border-radius: 8px;
  box-shadow: none;
}

.purchase-assistant-progress[hidden] {
  display: none;
}

.purchase-assistant-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-progress-inline .purchase-assistant-progress-head {
  gap: 5px;
  margin-bottom: 4px;
  font-size: 9px;
  line-height: 1;
}

.purchase-assistant-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.purchase-assistant-progress-inline .purchase-assistant-progress-track {
  height: 5px;
}

.purchase-assistant-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 0.24s ease;
}

.purchase-assistant-diagnostic-panel {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-diagnostic-panel[hidden] {
  display: none;
}

.purchase-assistant-diagnostic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.purchase-assistant-diagnostic-head strong {
  font-size: 14px;
}

.purchase-assistant-diagnostic-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.purchase-assistant-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.purchase-assistant-diagnostic-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 128px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.purchase-assistant-diagnostic-card strong {
  color: var(--ink);
  font-size: 13px;
}

.purchase-assistant-diagnostic-card span,
.purchase-assistant-diagnostic-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.purchase-assistant-diagnostic-card.is-warning,
.purchase-assistant-diagnostic-card .is-warning {
  color: #b42318;
}

.purchase-assistant-action-summary-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-action-summary-panel[hidden] {
  display: none;
}

.purchase-assistant-action-summary-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
}

.purchase-assistant-action-summary-head strong {
  font-size: 15px;
}

.purchase-assistant-action-summary-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-action-summary-head .is-warning {
  color: #b42318;
}

.purchase-assistant-action-summary-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.purchase-assistant-action-selection {
  display: inline-flex;
  align-items: center;
}

.purchase-assistant-action-order {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.purchase-assistant-action-order:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.purchase-assistant-action-summary-export,
.purchase-assistant-action-delete {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.purchase-assistant-action-summary-table-wrap {
  overflow-x: auto;
}

.purchase-assistant-action-summary-table {
  min-width: 1060px;
  width: 100%;
  border-collapse: collapse;
}

.purchase-assistant-action-summary-table th,
.purchase-assistant-action-summary-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

.purchase-assistant-action-summary-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-action-summary-table td {
  font-size: 13px;
  font-weight: 800;
}

.purchase-assistant-action-summary-table .purchase-assistant-action-checkbox {
  width: 38px;
  min-width: 38px;
  padding-right: 4px;
  text-align: center;
}

.purchase-assistant-action-checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
}

.purchase-assistant-order-records-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-order-records-panel[hidden] {
  display: none;
}

.purchase-assistant-order-records-head,
.purchase-assistant-order-records-tools,
.purchase-assistant-order-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.purchase-assistant-order-records-head {
  justify-content: space-between;
}

.purchase-assistant-order-records-head strong {
  font-size: 15px;
}

.purchase-assistant-order-records-head span,
.purchase-assistant-order-selected-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-order-error {
  color: #b42318 !important;
}

.purchase-assistant-order-status-filters button,
.purchase-assistant-order-records-tools button,
.purchase-assistant-order-action {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.purchase-assistant-order-status-filter.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: #eff6ff;
}

.purchase-assistant-order-records-tools {
  justify-content: flex-end;
}

.purchase-assistant-order-records-tools button:disabled,
.purchase-assistant-order-records-panel input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.purchase-assistant-order-records-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.purchase-assistant-order-records-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
}

.purchase-assistant-order-records-table th,
.purchase-assistant-order-records-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

.purchase-assistant-order-records-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-order-records-table td {
  font-size: 13px;
  font-weight: 800;
}

.purchase-assistant-order-checkbox {
  width: 46px;
  min-width: 46px;
  text-align: center !important;
}

.purchase-assistant-order-checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
}

.purchase-assistant-order-image-cell,
.purchase-assistant-action-image-cell {
  width: 58px;
  min-width: 58px;
}

.purchase-assistant-order-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #475467;
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-order-status-badge.is-ordered {
  color: #175cd3;
  background: #eff8ff;
}

.purchase-assistant-order-status-badge.is-loaded {
  color: #6941c6;
  background: #f4f3ff;
}

.purchase-assistant-order-status-badge.is-converted_to_order {
  color: #027a48;
  background: #ecfdf3;
}

.purchase-assistant-order-status-badge.is-received {
  color: #067647;
  background: #dcfae6;
}

.purchase-assistant-order-empty {
  padding: 14px;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 720px) {
  .purchase-assistant-action-summary-head,
  .purchase-assistant-action-summary-tools {
    align-items: stretch;
    width: 100%;
  }

  .purchase-assistant-action-summary-tools {
    justify-content: flex-start;
  }

  .purchase-assistant-action-summary-tools > span {
    flex-basis: 100%;
  }

  .purchase-assistant-order-records-head,
  .purchase-assistant-order-records-tools,
  .purchase-assistant-order-status-filters {
    width: 100%;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .purchase-assistant-order-records-tools {
    justify-content: flex-start;
  }

  .purchase-assistant-order-records-tools > span {
    flex-basis: 100%;
  }

  .purchase-assistant-order-records-tools button,
  .purchase-assistant-order-status-filters button {
    min-height: 36px;
  }
}

.purchase-assistant-accept-overlay {
  position: fixed;
  inset: 0;
  z-index: 71;
  background: rgba(15, 23, 42, 0.32);
}

.purchase-assistant-accept-overlay[hidden],
.purchase-assistant-accept-modal[hidden] {
  display: none;
}

.purchase-assistant-accept-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 72;
  display: grid;
  gap: 12px;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  transform: translate(-50%, -50%);
}

.purchase-assistant-accept-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.purchase-assistant-accept-head strong,
.purchase-assistant-accept-product strong {
  display: block;
  color: var(--text);
  font-weight: 900;
}

.purchase-assistant-accept-head span,
.purchase-assistant-accept-product span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.purchase-assistant-accept-product {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
}

.purchase-assistant-accept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.purchase-assistant-accept-grid span {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.purchase-assistant-accept-grid strong {
  color: var(--text);
}

.purchase-assistant-accept-field {
  display: grid;
  gap: 6px;
}

.purchase-assistant-accept-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-accept-field input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 900;
}

.purchase-assistant-accept-error {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-accept-error[hidden] {
  display: none;
}

.purchase-assistant-accept-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.purchase-assistant-task-runs-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-task-runs-panel[hidden] {
  display: none;
}

.purchase-assistant-task-runs-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
}

.purchase-assistant-task-runs-head strong {
  font-size: 15px;
}

.purchase-assistant-task-runs-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-task-runs-head .is-warning,
.purchase-assistant-task-runs-table tr.is-warning {
  color: #b42318;
}

.purchase-assistant-task-runs-table-wrap {
  overflow-x: auto;
}

.purchase-assistant-task-runs-table {
  min-width: 860px;
  width: 100%;
  border-collapse: collapse;
}

.purchase-assistant-task-runs-table th,
.purchase-assistant-task-runs-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

.purchase-assistant-task-runs-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-task-runs-table td {
  font-size: 13px;
  font-weight: 800;
}

.purchase-assistant-table-wrap {
  height: clamp(520px, calc(100vh - 320px), 760px);
  max-height: none;
  overflow: auto;
}

.purchase-assistant-pagination {
  margin: 8px 0 10px;
}

.purchase-assistant-pagination input {
  text-align: center;
}

.purchase-assistant-table-wrap table {
  width: 100%;
  min-width: 2044px;
  table-layout: fixed;
}

.purchase-assistant-table .purchase-assistant-col-seq {
  width: 42px;
}

.purchase-assistant-table .purchase-assistant-col-level {
  width: 62px;
}

.purchase-assistant-table .purchase-assistant-col-speed {
  width: 70px;
}

.purchase-assistant-table .purchase-assistant-col-ai {
  width: 72px;
}

.purchase-assistant-table .purchase-assistant-col-image {
  width: 64px;
}

.purchase-assistant-table .purchase-assistant-col-product {
  width: 140px;
}

.purchase-assistant-table .purchase-assistant-col-spec {
  width: 72px;
}

.purchase-assistant-table .purchase-assistant-col-barcode {
  width: 128px;
}

.purchase-assistant-table .purchase-assistant-col-sku {
  width: 88px;
}

.purchase-assistant-table .purchase-assistant-col-sell70 {
  width: 64px;
}

.purchase-assistant-table .purchase-assistant-col-date {
  width: 94px;
}

.purchase-assistant-table .purchase-assistant-col-qty {
  width: 78px;
}

.purchase-assistant-table .purchase-assistant-col-small-qty {
  width: 64px;
}

.purchase-assistant-table .purchase-assistant-col-rate {
  width: 78px;
}

.purchase-assistant-table .purchase-assistant-col-stock {
  width: 70px;
}

.purchase-assistant-table .purchase-assistant-col-action {
  width: 66px;
}

.purchase-assistant-table .purchase-assistant-col-gap {
  width: 78px;
}

.purchase-assistant-table-wrap th,
.purchase-assistant-table-wrap td {
  padding: 7px 5px;
  border-right: 1px solid var(--line);
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.purchase-assistant-table-wrap th:last-child,
.purchase-assistant-table-wrap td:last-child {
  border-right: 0;
}

.purchase-assistant-table-wrap .purchase-assistant-product-cell {
  text-align: left;
}

.purchase-assistant-table-wrap .purchase-assistant-barcode {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  font-variant-numeric: tabular-nums;
}

.purchase-assistant-table-wrap .purchase-assistant-sell70-days {
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

.purchase-assistant-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fffdf9;
  box-shadow: 0 1px 0 var(--line);
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.purchase-assistant-table-wrap td strong,
.purchase-assistant-table-wrap td small {
  display: block;
}

.purchase-assistant-table-wrap td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.purchase-assistant-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 26px;
  padding: 0 6px;
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-assistant-level-button {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.purchase-assistant-level-button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.purchase-assistant-speed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 26px;
  padding: 0 6px;
  border-radius: 7px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-assistant-speed.is-fast {
  background: #fef2f2;
  color: #b42318;
}

.purchase-assistant-speed.is-normal {
  background: #eff8ff;
  color: #175cd3;
}

.purchase-assistant-speed.is-slow {
  background: #fff7ed;
  color: #c2410c;
}

.purchase-assistant-speed.is-stagnant {
  background: #f8fafc;
  color: #475467;
}

.purchase-assistant-speed.is-insufficient {
  background: #f4f3ff;
  color: #5925dc;
}

.purchase-assistant-row.is-urgent .purchase-assistant-level {
  background: #fef2f2;
  color: #b42318;
}

.purchase-assistant-row.is-discard .purchase-assistant-level {
  background: #f8fafc;
  color: #475467;
}

.purchase-assistant-row.is-replenish .purchase-assistant-level {
  background: #fff7ed;
  color: #c2410c;
}

.purchase-assistant-row.is-slow .purchase-assistant-level {
  background: #ecfdf3;
  color: #067647;
}

.purchase-assistant-image-cell {
  text-align: center;
}

.purchase-assistant-ai-cell,
.purchase-assistant-action-cell,
.purchase-assistant-net-demand-cell {
  white-space: nowrap;
}

.purchase-assistant-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.purchase-assistant-image-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-detail-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.purchase-assistant-ai-inline-button {
  min-height: 28px;
  padding: 0 6px;
  border-radius: 8px;
  color: #4338ca;
  white-space: nowrap;
}

.purchase-assistant-table-wrap .is-negative-stock {
  color: #b42318;
  font-weight: 900;
}

.purchase-assistant-table-wrap .is-pending-arrival {
  color: #7c3aed;
  font-weight: 900;
}

.purchase-assistant-table-wrap .purchase-assistant-sequence-cell.has-accepted-history {
  background: #e5f6e9;
  color: #27633a;
  font-weight: 700;
}

.purchase-assistant-table-wrap .purchase-assistant-ordered-qty {
  color: #8a5a12;
  font-weight: 700;
}

.purchase-assistant-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(15, 23, 42, 0.32);
}

.purchase-assistant-detail-overlay[hidden] {
  display: none;
}

.purchase-assistant-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 12001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(520px, calc(100vw - 28px));
  height: 100vh;
  padding: 18px;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #fffdf9;
  box-shadow: -24px 0 54px rgba(15, 23, 42, 0.2);
}

.purchase-assistant-detail-panel[hidden] {
  display: none;
}

.purchase-assistant-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.purchase-assistant-detail-product {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  align-items: center;
}

.purchase-assistant-detail-product .purchase-assistant-image,
.purchase-assistant-detail-product .purchase-assistant-image-placeholder {
  width: 64px;
  height: 64px;
}

.purchase-assistant-detail-product strong,
.purchase-assistant-detail-product small {
  display: block;
}

.purchase-assistant-detail-product strong {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.25;
}

.purchase-assistant-detail-product small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.purchase-assistant-detail-rule {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.purchase-assistant-detail-rule strong {
  font-size: 13px;
}

.purchase-assistant-detail-rule span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.purchase-assistant-detail-inputs {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-detail-input-head {
  display: grid;
  gap: 4px;
}

.purchase-assistant-detail-input-head strong {
  font-size: 14px;
}

.purchase-assistant-detail-input-head span,
.purchase-assistant-detail-input-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.purchase-assistant-detail-input-note {
  margin: 0;
}

.purchase-assistant-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.purchase-assistant-detail-value {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-detail-value span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.purchase-assistant-detail-value strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.25;
}

.purchase-assistant-action-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-action-form-head {
  display: grid;
  gap: 4px;
}

.purchase-assistant-action-form-head strong {
  font-size: 14px;
}

.purchase-assistant-action-form-head span,
.purchase-assistant-action-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.purchase-assistant-action-form label {
  display: grid;
  gap: 6px;
}

.purchase-assistant-action-form input {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.purchase-assistant-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.purchase-assistant-action-records {
  display: grid;
  gap: 8px;
}

.purchase-assistant-ai-explanation {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-ai-actions {
  display: flex;
  justify-content: flex-start;
}

.purchase-assistant-ai-result {
  display: grid;
  gap: 8px;
}

.purchase-assistant-ai-text {
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.purchase-assistant-ai-modal-overlay,
.purchase-assistant-rule-modal-overlay,
.purchase-assistant-pending-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 12200;
  background: rgba(15, 23, 42, 0.34);
}

.purchase-assistant-ai-modal-overlay[hidden],
.purchase-assistant-ai-modal[hidden],
.purchase-assistant-rule-modal-overlay[hidden],
.purchase-assistant-rule-modal[hidden],
.purchase-assistant-pending-modal-overlay[hidden],
.purchase-assistant-pending-modal[hidden],
.purchase-assistant-image-preview-overlay[hidden] {
  display: none;
}

.purchase-assistant-ai-modal,
.purchase-assistant-rule-modal,
.purchase-assistant-pending-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 12201;
  display: grid;
  gap: 12px;
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 36px));
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  transform: translate(-50%, -50%);
}

.purchase-assistant-rule-modal {
  width: min(560px, calc(100vw - 28px));
}

.purchase-assistant-pending-modal {
  width: min(460px, calc(100vw - 28px));
}

.purchase-assistant-ai-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.purchase-assistant-ai-modal-close {
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
}

.purchase-assistant-rule-modal-close,
.purchase-assistant-pending-modal-close {
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
}

.purchase-assistant-rule-modal-body {
  display: grid;
  gap: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.purchase-assistant-rule-modal-body p {
  margin: 0;
}

.purchase-assistant-rule-list {
  display: grid;
  gap: 8px;
}

.purchase-assistant-rule-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.purchase-assistant-rule-item strong {
  color: #b42318;
}

.purchase-assistant-pending-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 26px;
  padding: 0 7px;
  border: 1px solid rgba(124, 58, 237, 0.26);
  border-radius: 7px;
  background: #f4f3ff;
  color: #7c3aed;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.purchase-assistant-pending-button:hover {
  border-color: #7c3aed;
  background: #ede9fe;
}

.purchase-assistant-pending-modal-body {
  display: grid;
  gap: 10px;
}

.purchase-assistant-pending-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  background: #f5f3ff;
  color: #5b21b6;
  font-weight: 900;
}

.purchase-assistant-pending-list {
  display: grid;
  gap: 8px;
}

.purchase-assistant-pending-line {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 78px minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.purchase-assistant-pending-line strong {
  color: var(--ink);
}

.purchase-assistant-pending-line span:last-child {
  color: #7c3aed;
  font-weight: 900;
}

.purchase-assistant-pending-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.purchase-assistant-image-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 12300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
  cursor: zoom-out;
}

.purchase-assistant-image-preview-overlay img {
  display: block;
  max-width: min(920px, 92vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.35);
}

.purchase-assistant-action-record {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.purchase-assistant-action-record > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.purchase-assistant-action-record strong {
  font-size: 13px;
}

.purchase-assistant-action-record span,
.purchase-assistant-action-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.purchase-assistant-action-empty {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.purchase-assistant-action-empty.is-error {
  color: #b42318;
  border-color: #fecaca;
  background: #fef2f2;
}

.purchase-assistant-detail-product .purchase-assistant-level.is-urgent {
  background: #fef2f2;
  color: #b42318;
}

.purchase-assistant-detail-product .purchase-assistant-level.is-discard {
  background: #f8fafc;
  color: #475467;
}

.purchase-assistant-detail-product .purchase-assistant-level.is-replenish {
  background: #fff7ed;
  color: #c2410c;
}

.purchase-assistant-detail-product .purchase-assistant-level.is-slow {
  background: #ecfdf3;
  color: #067647;
}

@media (max-width: 720px) {
  .purchase-assistant-detail-panel {
    width: 100vw;
    padding: 14px;
  }

  .purchase-assistant-detail-grid {
    grid-template-columns: 1fr;
  }
}

.branch-pos-report-page .empty-state.is-error,
#branch-pos-sync-status.is-warning {
  color: #b42318;
}

.branch-pos-detail-card {
  width: min(1560px, calc(100vw - 48px));
  max-width: none;
}

.branch-pos-detail-content {
  overflow-x: hidden;
}

.branch-pos-detail-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.branch-pos-detail-summary div {
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.branch-pos-detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.branch-pos-detail-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 900;
}

.branch-pos-detail-card h4 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: 16px;
}

.branch-pos-line-cards {
  display: grid;
  gap: 10px;
}

.branch-pos-line-card,
.branch-pos-payment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.branch-pos-line-card-main {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.branch-pos-line-card-main strong {
  font-size: 15px;
  color: var(--ink);
}

.branch-pos-line-card-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.branch-pos-line-card-metrics,
.branch-pos-payment-card {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.branch-pos-payment-card {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.branch-pos-line-card-metrics div,
.branch-pos-payment-card div {
  min-width: 0;
}

.branch-pos-line-card-metrics span,
.branch-pos-payment-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.branch-pos-line-card-metrics strong,
.branch-pos-payment-card strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.branch-pos-payment-cards {
  display: grid;
  gap: 8px;
}

@media (max-width: 900px) {
  .branch-pos-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .branch-pos-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .branch-pos-actions {
    grid-column: 1 / -1;
  }

  .branch-pos-detail-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .branch-pos-line-card-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .branch-pos-payment-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .branch-pos-order-tools {
    width: 100%;
  }

  .branch-pos-product-search {
    max-width: none;
  }

  .branch-pos-product-result-row {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
  }

  .branch-pos-product-result-thumb {
    width: 64px;
    height: 64px;
  }

  .branch-pos-product-result-metrics {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .branch-pos-toolbar {
    grid-template-columns: 1fr;
  }

  .branch-pos-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .branch-pos-actions .quick-primary-button {
    grid-column: 1 / -1;
  }

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

  .branch-pos-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .branch-pos-sort-controls {
    width: 100%;
    overflow-x: auto;
  }

  .branch-pos-order-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .branch-pos-product-search {
    width: 100%;
    min-width: 0;
  }

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

  .branch-pos-line-card-metrics,
  .branch-pos-payment-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .branch-pos-product-result-summary {
    gap: 6px;
    padding: 8px;
  }

  .branch-pos-product-result-summary div {
    padding: 7px;
  }

  .branch-pos-product-result-summary strong {
    font-size: 15px;
  }

  .branch-pos-product-result-row {
    gap: 10px;
    padding: 10px;
  }

  .branch-pos-product-result-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .branch-pos-product-result-metrics div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .shangsu-wholesale-dialog-card {
    width: calc(100vw - 32px);
    max-height: 88vh;
    padding: 20px;
  }

  .shangsu-wholesale-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shangsu-wholesale-total {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shangsu-wholesale-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .shangsu-wholesale-dialog-card {
    width: calc(100vw - 20px);
    padding: 16px 14px;
  }

  .shangsu-wholesale-dialog-card .admin-dialog-head {
    align-items: flex-start;
  }

  .shangsu-wholesale-dialog-card .admin-dialog-head h3 {
    font-size: 18px;
    line-height: 1.25;
  }

  .shangsu-wholesale-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
  }

  .shangsu-wholesale-total {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
  }

  .shangsu-wholesale-toolbar label {
    min-width: 0;
    margin-bottom: 0;
    font-size: 12px;
  }

  .shangsu-wholesale-toolbar input {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .shangsu-wholesale-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column: 1 / -1;
    gap: 8px;
  }

  .shangsu-wholesale-actions .quick-primary-button {
    grid-column: 1 / -1;
    order: 1;
  }

  .shangsu-wholesale-actions .secondary-button {
    order: 2;
  }

  .shangsu-wholesale-actions .secondary-button,
  .shangsu-wholesale-actions .quick-primary-button {
    min-width: 0;
    min-height: 42px;
    padding-inline: 8px;
    font-size: 14px;
  }

  .shangsu-wholesale-total div {
    min-height: 72px;
    padding: 10px 12px;
  }

  .shangsu-wholesale-total span,
  .shangsu-wholesale-cache-note {
    font-size: 11px;
  }

  .shangsu-wholesale-total strong {
    font-size: 18px;
    line-height: 1.15;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .shangsu-wholesale-table-wrap {
    max-height: 240px;
  }

  .shangsu-wholesale-table-wrap table {
    min-width: 900px;
    font-size: 12px;
  }
}

.report-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

.report-pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.report-pagination-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.report-pagination-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.report-pagination-controls select,
.report-pagination-controls input {
  width: auto;
  min-width: 88px;
  height: 34px;
  border-radius: 8px;
}

.report-pagination-controls input {
  width: 82px;
}

.report-pagination-controls button {
  min-width: 72px;
  height: 34px;
  border-radius: 8px;
}

.customer-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-inline-message {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cargo-panel {
  margin-bottom: 12px;
}

.cargo-header-action {
  width: auto;
  min-width: 110px;
  height: 40px;
  border-radius: 8px;
  padding: 0 18px;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.cargo-header-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cargo-nav-left-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cargo-library-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cargo-database-import-progress {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cargo-database-import-progress[hidden] {
  display: none;
}

.cargo-database-import-progress progress {
  width: 100%;
  height: 10px;
  accent-color: #2563eb;
}

.cargo-reservation-command-form {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(140px, 190px) auto;
  align-items: end;
  gap: 5px;
}

.cargo-reservation-command-form label {
  display: grid;
  gap: 3px;
}

.cargo-reservation-command-form span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.cargo-reservation-command-form input {
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}

.cargo-reservation-command-form button {
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}

.cargo-reservation-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 10010;
  width: min(520px, 90vw);
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.cargo-reservation-suggestions button {
  width: 100%;
  height: auto;
  min-height: 44px;
  display: grid;
  justify-items: start;
  gap: 3px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
}

.cargo-reservation-suggestions button + button {
  margin-top: 5px;
}

.cargo-reservation-suggestions strong,
.cargo-reservation-suggestions span {
  font-size: 12px;
  line-height: 1.2;
}

.cargo-reservation-list {
  display: grid;
  gap: 14px;
}

.cargo-reservation-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
}

.cargo-reservation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cargo-reservation-head h3 {
  margin: 0;
  font-size: 20px;
}

.cargo-reservation-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cargo-reservation-table th,
.cargo-reservation-table td {
  vertical-align: top;
}

.cargo-reservation-image {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.cargo-reservation-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cargo-reservation-edit-grid label {
  display: grid;
  gap: 5px;
}

.cargo-reservation-edit-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cargo-sheet-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.cargo-sheet-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.cargo-sheet-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  color: #1d4ed8;
  font-size: 24px;
  white-space: nowrap;
}

.cargo-arrival-button {
  height: 26px;
  min-width: 54px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.cargo-arrival-button.is-arrived {
  border-color: #93c5fd;
  background: #2563eb;
  color: #fff;
}

.cargo-sheet-card label,
.cargo-search-field {
  display: grid;
  gap: 6px;
}

.cargo-sheet-card span,
.cargo-search-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cargo-sheet-card > div:first-child {
  display: grid;
  gap: 4px;
}

.cargo-sheet-card input,
.cargo-search-field input {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
}

.cargo-sheet-card-actions,
.cargo-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.cargo-sheet-card-actions .secondary-button,
.cargo-sheet-card-actions .quick-primary-button,
.cargo-editor-actions .secondary-button {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.cargo-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.cargo-locator-row {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 6px 0;
  flex-wrap: wrap;
}

.cargo-locator-row .quick-primary-button {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.cargo-locator {
  display: grid;
  grid-template-columns: auto minmax(220px, 360px);
  align-items: center;
  gap: 10px;
  margin: 0;
}

.cargo-locator span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cargo-locator input {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
}

.cargo-search-count {
  min-width: 92px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.cargo-search-count.is-active {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
}

.cargo-full-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin: 2px 0 4px;
  padding: 6px 12px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  background: #eff6ff;
  color: var(--ink);
  visibility: visible;
}

.cargo-full-preview.is-empty {
  border-color: rgba(148, 163, 184, 0.28);
  background: #f8fafc;
  color: var(--muted);
}

.cargo-full-preview span {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.cargo-full-preview strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.3;
}

.cargo-full-preview.is-empty strong {
  font-size: 13px;
  font-weight: 800;
}

.cargo-delete-confirm {
  position: fixed;
  top: 252px;
  left: 50%;
  z-index: 40;
  width: min(420px, calc(100vw - 28px));
  transform: translateX(-50%);
}

.cargo-sheet-editor-page .cargo-payment-confirm {
  left: 8px;
  top: 120px;
  z-index: 120;
  transform: none;
}

.cargo-delete-confirm-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
}

.cargo-delete-confirm-card strong {
  color: #991b1b;
  font-size: 17px;
  font-weight: 900;
}

.cargo-delete-confirm-card > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.cargo-delete-confirm-card label {
  display: grid;
  gap: 5px;
}

.cargo-delete-confirm-card label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cargo-delete-confirm-card input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

.cargo-delete-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cargo-delete-confirm-actions button {
  height: 32px;
  border-radius: 8px;
  font-weight: 900;
}

.cargo-payment-confirm-card {
  border-color: #bfdbfe;
}

.cargo-payment-confirm-card strong {
  color: #1d4ed8;
}

.purchase-anchor-popover {
  position: fixed;
  left: 8px;
  top: 120px;
  z-index: 130;
  width: min(430px, calc(100vw - 16px));
}

.purchase-anchor-popover-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
}

.purchase-anchor-popover-card strong {
  color: #1d4ed8;
  font-size: 17px;
  font-weight: 900;
}

.purchase-anchor-popover-card > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.cargo-summary div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.cargo-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cargo-summary strong {
  color: var(--ink);
  font-size: 20px;
}

.cargo-summary strong.danger-text {
  color: #dc2626;
}

.cargo-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 250px);
}

.cargo-table {
  width: max-content;
  min-width: 1360px;
}

.cargo-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f6f2;
}

.cargo-table th,
.cargo-table td {
  padding-left: 5px;
  padding-right: 5px;
}

.cargo-table input,
.cargo-table select {
  height: 30px;
  min-width: 64px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 12px;
}

.cargo-input-barcode {
  width: 108px;
}

.cargo-input-supplier {
  width: 160px;
}

.cargo-input-sku {
  width: 74px;
}

.cargo-input-name {
  width: 190px;
}

.cargo-input-small {
  width: 46px;
}

.cargo-input-small[data-field="domesticUnitPrice"],
.cargo-input-small[data-field="actualPayment"] {
  width: 52px;
}

.cargo-input-volume {
  width: 104px;
}

.cargo-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cargo-field-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

.cargo-field-multi-barcode {
  border-color: #16a34a !important;
  background: #ecfdf3 !important;
  color: #166534 !important;
}

.cargo-field-new-barcode {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
  color: #92400e !important;
}

.cargo-field-payment-mismatch {
  border-color: #f472b6 !important;
  background: #fdf2f8 !important;
  color: #9d174d !important;
}

.cargo-trend-button {
  width: 18px;
  height: 28px;
  min-width: 18px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
}

.cargo-trend-button.is-up {
  color: #ef4444;
}

.cargo-trend-button.is-down {
  color: #2563eb;
}

.cargo-input-unit {
  width: 44px;
  min-width: 44px;
  padding: 0 4px;
}

.cargo-input-note {
  width: 118px;
  color: #dc2626;
  font-weight: 800;
}

.cargo-action-count {
  color: #2563eb;
  font-weight: 900;
}

.cargo-supplier-wrap {
  position: relative;
  display: inline-grid;
}

.cargo-supplier-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 5px);
  z-index: 8;
  display: none;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.cargo-supplier-wrap:focus-within .cargo-supplier-menu,
.cargo-supplier-wrap:hover .cargo-supplier-menu,
.cargo-supplier-menu:hover {
  display: inline-flex;
}

.cargo-supplier-menu button {
  height: 26px;
  min-width: 48px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}

.cargo-line-number {
  min-width: 42px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.cargo-check-cell {
  min-width: 72px;
  max-width: 90px;
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
  white-space: normal;
}

.cargo-row-actions {
  display: flex;
  gap: 6px;
  position: relative;
}

.cargo-row-actions button {
  height: 30px;
  min-width: 54px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.cargo-edit-menu-wrap {
  position: relative;
  display: inline-grid;
}

.cargo-edit-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 8;
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.cargo-edit-menu::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  transform: rotate(45deg);
}

.cargo-edit-menu button {
  position: relative;
  z-index: 1;
}

.cargo-table tr.is-extra-cargo {
  background: #eff6ff;
}

.cargo-table tr.is-confirmed-cargo {
  background: #f0fdf4;
}

.cargo-table tr.is-cargo-search-match {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
  background: #dbeafe;
}

.cargo-table tr.is-confirmed-cargo input,
.cargo-table tr.is-confirmed-cargo select {
  color: #374151;
  background: #f8fafc;
  cursor: default;
}

.cargo-confirm-button.is-confirmed {
  border-color: #22c55e;
  background: #16a34a;
  color: #fff;
}

.cargo-dialog-card {
  max-width: min(960px, calc(100vw - 40px));
}

.cargo-import-card {
  width: min(880px, calc(100vw - 40px));
  max-width: min(880px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 56px));
  padding: 16px 18px;
}

.cargo-import-card .cargo-search-field {
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  margin-bottom: 8px;
}

.cargo-query-wrap {
  max-height: calc(100vh - 260px);
}

.cargo-query-table {
  min-width: 1500px;
}

.cargo-query-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f6f2;
  white-space: nowrap;
  word-break: keep-all;
}

.cargo-query-table td {
  white-space: nowrap;
}

.cargo-query-table .cargo-query-multiline {
  white-space: pre-line;
  min-width: 170px;
  line-height: 1.35;
}

.cargo-library-table td {
  vertical-align: middle;
}

.cargo-library-table {
  width: max-content;
  min-width: 100%;
}

.cargo-library-table th {
  white-space: nowrap;
  writing-mode: horizontal-tb;
  word-break: keep-all;
}

.cargo-library-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 6px;
}

.cargo-library-summary-row .customer-inline-message {
  margin: 0;
}

.cargo-library-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.cargo-library-actions button {
  min-width: 70px;
  height: 30px;
  padding: 0 10px;
}

.cargo-library-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cargo-library-edit-wide {
  grid-column: span 3;
}

.cargo-library-edit-grid label {
  display: grid;
  gap: 6px;
}

.cargo-library-edit-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cargo-price-trend {
  color: var(--muted);
  font-weight: 900;
}

.cargo-price-trend.is-up {
  color: #dc2626;
}

.cargo-price-trend.is-down {
  color: #16a34a;
}

.cargo-library-product-image {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cargo-library-image-editor {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  align-items: stretch;
}

.cargo-library-image-preview {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.review-add-image.is-drag-over {
  border-color: #7c3aed;
  background: #f3e8ff;
  color: #6d28d9;
  box-shadow: inset 0 0 0 2px rgba(124, 58, 237, 0.22);
}

.cargo-library-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cargo-library-image-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: stretch;
}

.cargo-library-image-drop {
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 112px;
  cursor: pointer;
}

.cargo-library-image-drop strong {
  font-size: 34px;
  line-height: 1;
  color: var(--primary);
}

.cargo-library-image-drop.is-dragging {
  border-color: var(--primary);
  background: #eef6ff;
}

.cargo-library-image-tools .secondary-button {
  align-self: center;
  min-height: 40px;
}

.cargo-column-filter-open {
  margin-left: auto;
  min-width: 96px;
}

.cargo-column-filter-card {
  width: min(760px, calc(100vw - 24px));
  padding: 18px;
}

.cargo-column-filter-card .admin-dialog-head {
  margin-bottom: 10px;
}

.cargo-column-filter-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.cargo-column-filter-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.cargo-column-filter-options input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.cargo-column-filter-card .cargo-import-actions {
  margin-top: 12px;
  justify-content: flex-end;
  gap: 8px;
}

.cargo-column-filter-card .cargo-import-actions button {
  min-width: 78px;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .cargo-column-filter-card {
    width: min(96vw, 720px);
    padding: 14px;
  }

  .cargo-column-filter-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 58vh;
  }

  .cargo-library-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cargo-library-edit-wide {
    grid-column: span 2;
  }

  .cargo-library-image-editor {
    grid-template-columns: 1fr;
  }

  .cargo-library-image-tools {
    grid-template-columns: 1fr;
  }
}

.cargo-import-update-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-left: 4px;
  white-space: nowrap;
}

.cargo-import-update-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
}

.cargo-row-image-button {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.cargo-row-image-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cargo-image-preview-card {
  width: auto;
  max-width: min(50vw, 720px);
  padding: 16px;
}

.cargo-image-preview-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(50vw, 720px);
  max-height: 50vh;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

#cargo-image-preview-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

@media (min-width: 901px) and (max-width: 1400px) {
  .cargo-sheet-page .admin-top-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 0;
    padding: 6px 8px;
    border-radius: 16px;
    overflow: hidden;
  }

  .cargo-sheet-page .admin-top-bar .top-title-center {
    position: static;
    grid-column: 2;
    grid-row: 1;
    width: auto;
    transform: none;
    pointer-events: auto;
    justify-self: stretch;
    padding: 0 6px;
  }

  .cargo-sheet-page .cargo-nav-left-actions {
    grid-column: 1;
    grid-row: 1;
    gap: 4px;
  }

  .cargo-sheet-page .cargo-header-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(170px, 1.4fr) 38px;
    gap: 6px;
    align-items: center;
    justify-self: stretch;
    transform: none;
  }

  .cargo-sheet-page .cargo-header-action {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
  }

  .cargo-sheet-page .cargo-header-actions a[href="./cargo-query.html"] {
    min-width: 0;
    font-size: 12px;
  }

  .cargo-sheet-page #cargo-new-sheet {
    display: none;
  }

  .cargo-sheet-page .cargo-menu-button {
    width: 38px;
    min-width: 38px;
    height: 32px;
    padding: 0;
  }

  .cargo-sheet-page .cargo-sheet-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .cargo-sheet-page .cargo-sheet-card label,
  .cargo-sheet-page .cargo-sheet-card-actions .secondary-button {
    display: none;
  }

  .cargo-sheet-page .cargo-sheet-card-actions {
    justify-content: end;
  }

  .cargo-sheet-page .cargo-sheet-card-actions .quick-primary-button {
    height: 34px;
    padding: 0 14px;
  }

  .cargo-sheet-page .cargo-editor-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .cargo-sheet-page .cargo-editor-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    white-space: normal;
  }

  .cargo-sheet-page .cargo-editor-actions .secondary-button {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
  }

  .cargo-sheet-page #cargo-extra-open,
  .cargo-sheet-page #cargo-left-open,
  .cargo-sheet-page #cargo-warehouse-open {
    grid-row: 2;
  }
}

@media (min-width: 901px) and (max-width: 1400px) {
  .admin-home-page .admin-page-shell {
    width: min(100%, calc(100% - 14px));
    padding-top: 8px;
  }

  .admin-home-page .admin-home-top-bar {
    display: grid;
    grid-template-columns: auto auto auto auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    min-height: 0;
    padding: 5px 7px;
    border-radius: 16px;
  }

  .admin-home-page .admin-home-top-bar .header-report-menu {
    grid-column: 1;
    grid-row: 1;
  }

  .admin-home-page .admin-home-top-bar .inventory-review-entry-button {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-home-page .admin-home-top-bar .review-entry-button {
    grid-column: 3;
    grid-row: 1;
  }

  .admin-home-page .admin-home-top-bar .mobile-entry-toggle {
    grid-column: 4;
    grid-row: 1;
  }

  .admin-home-page .cargo-reservation-command-form {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr) 58px;
    width: 100%;
  }

  .admin-home-page .admin-home-top-bar .top-title-center {
    position: absolute;
    left: 50%;
    top: 5px;
    z-index: 1;
    width: min(260px, 36vw);
    transform: translateX(-50%);
    pointer-events: none;
    text-align: center;
  }

  .admin-home-page .admin-home-top-bar .top-title-center h1 {
    font-size: 18px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .admin-home-page .admin-home-top-bar .page-tab-strip {
    justify-content: center;
    top: 22px;
  }

  .admin-home-page .admin-home-top-bar .inventory-review-entry-button,
  .admin-home-page .admin-home-top-bar .account-chip,
  .admin-home-page .admin-home-top-bar .review-entry-button,
  .admin-home-page .admin-home-top-bar .mobile-entry-toggle,
  .admin-home-page .admin-home-top-bar .top-picked-entry > *,
  .admin-home-page .admin-home-top-bar .header-report-menu summary {
    min-height: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .admin-home-page .admin-home-top-bar .inventory-review-entry-button span,
  .admin-home-page .admin-home-top-bar .inventory-review-entry-button strong,
  .admin-home-page .admin-home-top-bar .account-chip span,
  .admin-home-page .admin-home-top-bar .account-chip strong,
  .admin-home-page .admin-home-top-bar .review-entry-button span,
  .admin-home-page .admin-home-top-bar .review-entry-button strong,
  .admin-home-page .admin-home-top-bar .header-report-menu summary {
    font-size: 12px;
    line-height: 1;
  }

  .admin-home-page .admin-home-top-bar .mobile-entry-toggle {
    display: inline-grid;
    place-items: center;
  }

  .admin-home-page .admin-home-top-bar .top-picked-entry {
    grid-column: 1 / -1;
    display: contents;
    margin-left: 0;
  }

  .admin-home-page .admin-home-top-bar .refresh-status {
    grid-column: 5;
    grid-row: 1;
    justify-self: end;
  }

  .admin-home-page .admin-home-top-bar .refresh-orders-button {
    grid-column: 6;
    grid-row: 1;
  }

  .admin-home-page .admin-home-top-bar .delivery-notice-button {
    grid-column: 7;
    grid-row: 1;
  }

  .admin-home-page .admin-home-top-bar .picked-drawer-toggle {
    grid-column: 1 / 3;
    grid-row: 2;
    justify-self: start;
  }

  .admin-home-page .admin-home-top-bar .cargo-entry-button[href="./cargo-query.html"] {
    grid-column: 5 / 7;
    grid-row: 2;
    justify-self: end;
    min-width: 132px;
    font-size: 12px;
  }

  .admin-home-page .admin-home-top-bar .cargo-entry-button[href="./cargo-sheet.html"] {
    grid-column: 7;
    grid-row: 2;
    justify-self: end;
    width: auto;
    min-width: 54px;
    padding: 0 10px;
  }

  .admin-home-page .admin-home-top-bar .mobile-message-history-button {
    display: none;
  }

  .admin-home-page .entry-panel,
  .admin-home-page .compact-strip-panel {
    border-radius: 16px;
    padding: 8px;
  }

  .admin-home-page .entry-panel-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .admin-home-page .entry-command-row {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-home-page .entry-secondary-row {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-home-page .desktop-entry-toggle,
  .admin-home-page .admin-inventory-lookup-form {
    width: 100%;
  }

  .admin-home-page .admin-inventory-result-row {
    grid-template-columns: 82px minmax(0, 1fr) 72px 74px 64px;
    grid-template-areas:
      "thumb name name name name"
      "thumb barcode barcode barcode sku"
      "thumb pending stock spec vip3";
    align-items: start;
    min-height: 96px;
    gap: 4px 0;
    padding: 8px;
  }

  .admin-home-page .admin-inventory-result-row.without-pending-orders-column {
    grid-template-columns: 82px minmax(0, 1fr) 74px 64px;
    grid-template-areas:
      "thumb name name name"
      "thumb barcode barcode sku"
      "thumb stock spec vip3";
    gap: 3px 9px;
  }

  .admin-home-page .admin-inventory-result-header {
    display: none;
  }

  .admin-home-page .admin-inventory-result-row span,
  .admin-home-page .admin-inventory-result-row strong {
    white-space: normal;
  }

  .admin-home-page .admin-inventory-result-row .inventory-result-thumb {
    grid-area: thumb;
    align-self: end;
  }

  .admin-home-page .admin-inventory-result-row:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: minmax(0, 1fr) 72px 74px 64px;
    grid-template-areas:
      "name name name name"
      "barcode barcode barcode sku"
      "pending stock spec vip3";
  }

  .admin-home-page .admin-inventory-result-row.without-pending-orders-column:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: minmax(0, 1fr) 74px 64px;
    grid-template-areas:
      "name name name"
      "barcode barcode sku"
      "stock spec vip3";
  }

  .admin-home-page .admin-inventory-result-row .inventory-result-thumb.is-empty {
    display: none;
  }

  .admin-home-page .admin-inventory-result-row .result-name {
    grid-area: name;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
  }

  .admin-home-page .admin-inventory-result-row .result-barcode {
    grid-area: barcode;
  }

  .admin-home-page .admin-inventory-result-row .result-sku {
    grid-area: sku;
    text-align: right;
  }

  .admin-home-page .admin-inventory-result-row .result-stock {
    text-align: left;
  }

  .admin-home-page .admin-inventory-result-row .result-pending-ordered {
    grid-area: pending;
    text-align: center;
  }

  .admin-home-page .admin-inventory-result-row .result-vip3 {
    text-align: right;
  }

  .admin-home-page .admin-inventory-result-row .result-stock {
    grid-area: stock;
  }

  .admin-home-page .admin-inventory-result-row .result-spec {
    grid-area: spec;
    text-align: center;
  }

  .admin-home-page .admin-inventory-result-row .result-vip3 {
    grid-area: vip3;
  }

  .admin-home-page .admin-inventory-result-row .result-stock,
  .admin-home-page .admin-inventory-result-row .result-pending-ordered,
  .admin-home-page .admin-inventory-result-row .result-spec,
  .admin-home-page .admin-inventory-result-row .result-vip3 {
    align-self: end;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
  }

  .admin-home-page .admin-inventory-result-row .result-stock {
    font-size: 14px;
  }

  .admin-home-page .admin-inventory-result-row .result-pending-ordered::before {
    content: "已订 ";
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .admin-home-page .admin-inventory-result-row .result-stock::before {
    content: "库存(inventario) ";
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .admin-home-page .admin-inventory-result-row .result-spec::before {
    content: "cantidad/caja ";
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .admin-home-page .admin-inventory-result-row .result-vip3::before {
    content: "价3 ";
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .admin-home-page .admin-inventory-result-row .result-unit,
  .admin-home-page .admin-inventory-result-row .result-vip2 {
    display: none;
  }

  .admin-home-page .entry-panel .admin-form-wide {
    display: none;
  }

  .admin-home-page .entry-panel.is-mobile-entry-open .admin-form-wide {
    display: grid;
  }

  .admin-home-page .entry-panel .user-message-form,
  .admin-home-page .entry-panel .customer-receivable-panel,
  .admin-home-page .entry-panel .order-search-field {
    width: 100%;
  }

  .admin-home-page .entry-panel .user-message-form {
    grid-template-columns: 54px minmax(0, 1fr) 54px;
  }

  .admin-home-page .entry-panel .user-message-history-button,
  .admin-home-page .entry-panel .user-message-send {
    width: 100%;
    justify-content: center;
    align-content: center;
    text-align: center;
  }

  .admin-home-page .admin-form-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-home-page .admin-form-wide .compact-field,
  .admin-home-page .admin-form-wide .form-order-number,
  .admin-home-page .admin-form-wide .form-estimated-amount,
  .admin-home-page .admin-form-wide .field-date-compact,
  .admin-home-page .admin-form-wide .field-delivery-compact,
  .admin-home-page .admin-form-wide .delivery-location-compact,
  .admin-home-page .admin-form-wide .remark-field,
  .admin-home-page .admin-form-wide #delivery-time-row,
  .admin-home-page .admin-form-wide .submit-order-button {
    grid-column: auto;
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .admin-home-page .summary-stack {
    gap: 10px;
  }

  .admin-home-page .compact-strip-head {
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .admin-home-page .picking-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-home-page .picking-pill {
    min-width: 0;
    padding: 8px;
    border-radius: 10px;
  }

  .admin-home-page #pending-summary .picking-pill,
  .admin-home-page #picking-summary .picking-pill,
  .admin-home-page #ready-summary .picking-pill {
    min-height: 0;
  }

  .admin-home-page .picking-pill-main strong {
    font-size: 14px;
  }

  .admin-home-page .picking-pill-actions {
    gap: 4px;
  }

  .admin-home-page .quick-action-button,
  .admin-home-page .picking-pill-actions select {
    height: 26px;
    padding: 0 6px;
    border-radius: 8px;
    font-size: 10px;
  }
}

@media (min-width: 901px) and (max-width: 1080px) {
  .admin-home-page .admin-home-top-bar {
    grid-template-columns: auto minmax(100px, auto) minmax(86px, auto) minmax(86px, auto) minmax(0, 1fr);
  }

  .admin-home-page .admin-form-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-home-page .picking-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cargo-extra-form {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 1.2fr) minmax(160px, 1.5fr) minmax(70px, 0.6fr) minmax(70px, 0.6fr) minmax(140px, 1.2fr) auto;
  gap: 8px;
  align-items: end;
  margin: 10px 0;
}

.cargo-extra-form label {
  display: grid;
  gap: 5px;
}

.cargo-extra-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cargo-extra-form input {
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 14px;
}

.cargo-extra-form .quick-primary-button {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.cargo-import-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.cargo-import-map label {
  display: grid;
  gap: 5px;
}

.cargo-import-map span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cargo-import-map select {
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
}

.cargo-import-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.cargo-menu-button {
  min-width: 42px;
  padding: 0 12px;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
}

.cargo-hidden-column {
  display: none;
}

.cargo-loading-state {
  display: grid;
  gap: 6px;
  min-height: 96px;
  align-content: center;
  justify-items: start;
  padding: 18px;
  border: 1px dashed rgba(82, 102, 77, 0.28);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.cargo-loading-state strong {
  color: var(--ink);
  font-size: 16px;
}

.cargo-loading-state span {
  font-size: 13px;
}

.cargo-loading-state::after {
  content: "";
  width: min(280px, 70vw);
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.16), rgba(22, 163, 74, 0.24), rgba(37, 99, 235, 0.16));
  background-size: 180% 100%;
  animation: cargo-loading-bar 1.2s linear infinite;
}

@keyframes cargo-loading-bar {
  from {
    background-position: 180% 0;
  }

  to {
    background-position: 0 0;
  }
}

.cargo-permission-settings {
  display: grid;
  gap: 12px;
  max-height: 56vh;
  overflow: auto;
  padding-right: 4px;
}

.cargo-permission-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.cargo-permission-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.cargo-permission-card h4 span {
  color: var(--muted);
  font-size: 12px;
}

.cargo-permission-card div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.cargo-permission-card label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.cargo-settings-panel {
  display: grid;
  gap: 12px;
}

.cargo-settings-head {
  align-items: center;
}

.cargo-settings-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
}

.cargo-settings-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.cargo-settings-password {
  display: grid;
  gap: 5px;
  width: min(360px, 100%);
}

.cargo-settings-password span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cargo-settings-password input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.cargo-permission-settings-page {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cargo-permission-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) repeat(var(--cargo-user-count, 3), minmax(128px, 0.7fr));
  min-width: 720px;
}

.cargo-permission-grid-head,
.cargo-permission-label,
.cargo-permission-check {
  min-height: 42px;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cargo-permission-grid-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  align-items: center;
  background: #eef2f7;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.cargo-user-head {
  text-align: center;
}

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

.cargo-permission-label {
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.cargo-permission-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.cargo-permission-check input {
  width: 18px;
  height: 18px;
}

.cargo-permission-check input:disabled + span {
  color: var(--muted);
}

@media (max-width: 760px) {
  .cargo-settings-page .admin-top-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
  }

  .cargo-settings-page .admin-top-bar .secondary-button,
  .cargo-settings-page .admin-top-bar .quick-primary-button {
    height: 36px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .cargo-settings-page .report-page-title h1 {
    font-size: 20px;
  }

  .cargo-settings-toolbar {
    padding: 8px;
  }

  .cargo-permission-grid {
    grid-template-columns: minmax(150px, 1.2fr) repeat(var(--cargo-user-count, 3), minmax(84px, 0.7fr));
    min-width: 430px;
  }

  .cargo-permission-grid-head,
  .cargo-permission-label,
  .cargo-permission-check {
    min-height: 38px;
    padding: 7px 6px;
  }

  .cargo-permission-label,
  .cargo-permission-check {
    font-size: 12px;
  }

  .cargo-permission-check {
    gap: 5px;
  }
}

.customer-number-head,
.customer-number-cell {
  text-align: center;
}

.customer-history-card {
  width: min(92vw, 1040px);
  max-width: min(94vw, 1040px);
}

.customer-history-card .table-wrap {
  overflow-x: auto;
}

.customer-history-card table {
  min-width: 820px;
  table-layout: auto;
}

.customer-history-card th,
.customer-history-card td {
  white-space: nowrap;
}

.customer-history-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.customer-history-summary div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-history-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.customer-history-summary strong {
  font-size: 16px;
  font-weight: 800;
}

.customer-rename-button {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.customer-sort-button,
.customer-error-link {
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: left;
  box-shadow: none;
}

.customer-sort-button {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  cursor: pointer;
}

.report-sort-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
}

.report-sort-button.is-active {
  color: #1d4ed8;
}

.packing-report-page .packing-employee-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.packing-report-page .packing-employee-summary strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.packing-report-page #packing-employee-wrap table {
  border-collapse: collapse;
}

.packing-report-page #packing-employee-wrap th,
.packing-report-page #packing-employee-wrap td {
  border: 1px solid var(--line);
}

.packing-report-page #packing-employee-wrap th:nth-child(3),
.packing-report-page #packing-employee-wrap th:nth-child(4),
.packing-report-page #packing-employee-wrap th:nth-child(5),
.packing-report-page #packing-employee-wrap th:nth-child(6),
.packing-report-page #packing-employee-wrap th:nth-child(7),
.packing-report-page #packing-employee-wrap td:nth-child(3),
.packing-report-page #packing-employee-wrap td:nth-child(4),
.packing-report-page #packing-employee-wrap td:nth-child(5),
.packing-report-page #packing-employee-wrap td:nth-child(6),
.packing-report-page #packing-employee-wrap td:nth-child(7) {
  text-align: center;
}

.employee-report-page #employee-report-table-wrap th:nth-child(6),
.employee-report-page #employee-report-table-wrap th:nth-child(7),
.employee-report-page #employee-report-table-wrap td:nth-child(6),
.employee-report-page #employee-report-table-wrap td:nth-child(7) {
  text-align: center;
}

.packing-date-actions {
  align-self: end;
}

.packing-group-editor {
  display: grid;
  gap: 10px;
}

#packing-start-form {
  max-width: min(94vw, 620px);
}

.packing-group-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.packing-group-head,
.packing-group-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.packing-group-head .danger {
  justify-self: end;
}

.packing-group-note,
.packing-group-person-row {
  display: grid;
  gap: 6px;
}

.packing-group-person-row {
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  margin-top: 6px;
}

.packing-group-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.packing-person-mini {
  min-width: 0;
  width: 42px;
  padding: 0;
}

.packing-group-add {
  width: 100%;
}

.packing-groups-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.packing-group-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
}

.review-group-choice-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.review-group-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.review-group-choice small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.customer-error-link {
  color: #1d4ed8;
}

.customer-error-cell {
  display: inline-grid;
  grid-template-columns: 44px minmax(24px, auto) 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.customer-error-number {
  text-align: center;
}

.customer-error-cell .customer-error-link {
  padding: 2px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  font-size: 12px;
  line-height: 1.4;
}

.customer-review-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.customer-review-status.is-empty {
  color: var(--muted);
  border: 1px solid var(--line);
  background: #fff;
}

.customer-review-status.is-linked {
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}

.employee-error-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -4px 0 14px;
}

.employee-error-summary span,
.employee-error-summary strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.employee-error-summary span {
  color: var(--muted);
}

.employee-error-summary strong {
  color: #b42318;
}

.settings-user-table input,
.settings-user-table select {
  width: 100%;
  min-width: 96px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.settings-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.settings-local-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.settings-toggle-row {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-toggle-row select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.settings-local-note {
  margin-top: 12px;
}

.settings-user-dialog-card {
  display: flex;
  flex-direction: column;
  width: min(1080px, calc(100vw - 32px));
  max-width: none;
  min-width: 0;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
}

.settings-user-dialog-card .admin-dialog-head {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
}

.settings-user-dialog-card .dialog-hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 18px 10px;
  border-bottom: 1px solid var(--line);
}

#settings-user-dialog-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.settings-dialog-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  flex: 0 0 auto;
  gap: 8px 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.settings-account-details {
  flex: 0 0 auto;
}

.settings-account-summary {
  display: none;
}

.settings-user-dialog-card .settings-dialog-account-grid label,
.settings-user-dialog-card .settings-permission-toolbar label,
.settings-user-dialog-card .settings-permission-option {
  margin: 0;
}

.settings-dialog-account-grid label {
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.settings-dialog-account-grid input,
.settings-dialog-account-grid select,
.settings-permission-toolbar input,
.settings-permission-toolbar select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.settings-permission-manager {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.settings-permission-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 10px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
}

.settings-permission-search-field {
  flex: 1 1 320px;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.settings-user-dialog-card .settings-permission-toolbar .settings-permission-page-select-wrap {
  display: none;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.settings-permission-change-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.settings-dialog-save-status {
  flex: 1 1 100%;
  order: -1;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.settings-dialog-save-status.is-error {
  color: #b42318;
}

.settings-permission-toolbar > .settings-permission-change-count {
  align-self: center;
}

.settings-permission-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 360px;
  max-height: 56vh;
  margin: 10px 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.settings-permission-page-nav {
  min-width: 0;
  padding: 8px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.settings-permission-nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 34px;
  margin: 0 0 3px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

.settings-permission-nav-button span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.settings-permission-nav-button:hover {
  background: #eef2f7;
}

.settings-permission-nav-button[aria-current="page"] {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
}

.settings-permission-nav-button[aria-current="page"] span {
  color: #1d4ed8;
}

.settings-permission-nav-button:focus-visible,
.settings-permission-option:has(input:focus-visible) {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.settings-permission-nav-empty {
  margin: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.settings-permission-page-panel {
  min-width: 0;
  padding: 14px 16px;
  overflow-y: auto;
  overflow-x: hidden;
}

.settings-permission-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.settings-permission-panel-head h4 {
  margin: 0;
  font-size: 17px;
}

.settings-permission-panel-head p,
.settings-fixed-permission-card p,
.settings-permission-empty p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-permission-page-actions,
.settings-dialog-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-permission-page-actions button,
.settings-dialog-footer button {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
}

.settings-dialog-footer .quick-primary-button {
  background: #2563eb;
}

.settings-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.settings-user-dialog-card .settings-permission-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.settings-user-dialog-card .settings-permission-option:has(input:checked) {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.settings-user-dialog-card .settings-permission-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.68;
}

.settings-permission-option input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #2563eb;
}

.settings-permission-option span {
  min-width: 0;
  line-height: 1.35;
}

.settings-fixed-permission-list {
  display: grid;
  gap: 8px;
}

.settings-fixed-permission-card {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.settings-fixed-permission-card strong {
  font-size: 13px;
}

.settings-permission-empty {
  display: grid;
  place-content: center;
  min-height: 220px;
  text-align: center;
}

.settings-dialog-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: #fffdf9;
}

.device-code-cell {
  min-width: 230px;
  max-width: 360px;
  white-space: nowrap;
  word-break: normal;
  color: #2563eb;
  font-weight: 800;
}

.device-note-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
}

.device-note-input {
  min-width: 130px;
  max-width: 180px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
}

.operation-log-table {
  table-layout: auto;
}

.operation-log-table th,
.operation-log-table td {
  white-space: nowrap;
}

.log-time-cell {
  min-width: 148px;
  white-space: nowrap;
}

.log-detail-cell {
  min-width: 260px;
  max-width: 520px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
}

.operation-device-card {
  max-width: min(980px, calc(100vw - 28px));
}

.device-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.device-detail-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.device-detail-grid span,
.device-alias-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.device-detail-grid strong {
  word-break: break-word;
}

.device-detail-wide {
  grid-column: 1 / -1;
}

.device-alias-form {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}

.device-alias-form label {
  flex: 1;
}

.device-alias-form input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 1500px) {
  .entry-panel-row {
    grid-template-columns: minmax(0, 60%) minmax(300px, 38%);
    gap: 8px 2%;
  }

  .admin-form-wide {
    grid-column: 1 / -1;
    grid-template-columns:
      minmax(150px, 1.35fr)
      minmax(96px, 0.9fr)
      minmax(98px, 0.9fr)
      minmax(220px, 1.15fr)
      minmax(300px, 1.4fr)
      minmax(72px, 0.72fr)
      minmax(98px, 0.9fr)
      minmax(80px, 0.78fr)
      minmax(80px, 0.78fr)
      56px;
  }

  .admin-form-wide .submit-order-button {
    width: 56px;
    min-width: 56px;
  }

  .user-message-form {
    grid-template-columns: 44px minmax(0, 196px) 46px;
    width: 312px;
  }

  .customer-receivable-panel {
    width: 100%;
  }

  .user-message-send {
    padding: 0 8px;
  }

  .order-search-field {
    width: 140px;
  }

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

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

  .report-toolbar-wide {
    grid-template-columns: repeat(2, minmax(0, 220px));
  }
}

@media (max-width: 900px) {
  .review-page-panel .compact-strip-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .review-filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-width: none;
  }

  .review-status-filters {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .review-status-button {
    min-width: 0;
    padding: 0 6px;
  }

  .review-filter-bar input[type="search"] {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .review-filter-bar select {
    grid-column: 3;
    grid-row: 2;
  }

  .review-filter-bar > button {
    grid-column: 4;
    grid-row: 2;
    min-width: 0;
    padding: 0 10px;
  }

  .review-filter-bar input[type="date"] {
    grid-column: span 2;
    grid-row: 3;
    min-width: 0;
    color: var(--ink);
    background: #fff;
    color-scheme: light;
    appearance: auto;
    -webkit-appearance: auto;
  }

  .review-filter-bar input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 1;
  }

  .review-drawer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .review-drawer-actions button {
    width: 100%;
  }

  .review-record-head,
  .review-master-fields,
  .review-item-main,
  .review-draft-item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .review-record-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    overflow-x: visible;
    padding-bottom: 2px;
  }

  .review-record-side .status-chip,
  .review-record-side .review-checked-note,
  .review-record-side button {
    flex: 0 0 auto;
  }

  .review-record-side .status-chip {
    flex: 1 0 100%;
    justify-content: center;
  }

  .review-record-side button {
    width: auto;
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .review-child-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .review-field-sku,
  .review-field-barcode {
    grid-column: span 2;
  }

  .review-field-name,
  .review-field-missing {
    grid-column: span 1;
  }

  .review-field-problem {
    grid-column: span 3;
  }

  .review-note-field,
  .review-child-actions {
    grid-column: 1 / -1;
  }

  .review-folder-children,
  .review-items-list {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .page-shell,
  .admin-page-shell {
    width: min(100%, calc(100% - 16px));
    padding: 12px 0 24px;
  }

  .hero,
  .inventory-lookup-strip,
  .layout,
  .admin-layout,
  .summary-stack,
  .admin-form,
  .admin-form-wide,
  .top-metrics-row,
  .order-grid,
  .admin-card-grid,
  .admin-orders {
    grid-template-columns: 1fr;
  }

  .panel,
  .top-title-bar,
  .top-metrics-row {
    border-radius: 22px;
  }

  .entry-panel,
  .compact-strip-panel,
  .admin-layout .panel,
  .panel {
    padding: 14px;
  }

  .top-title-bar,
  .inventory-product-line,
  .inventory-stock-row,
  .panel-head,
  .order-head,
  .admin-card-head,
  .card-actions,
  .count-editor,
  .inline-editor {
    flex-direction: column;
  }

  .top-title-bar,
  .admin-top-bar,
  .top-picked-entry {
    align-items: stretch;
  }

  .inventory-lookup-strip {
    margin: -4px 0 14px;
    padding: 10px;
  }

  .inventory-lookup-form {
    grid-template-columns: 1fr;
  }

  .top-title-center {
    position: static;
    width: 100%;
    transform: none;
    pointer-events: auto;
    order: -1;
    justify-items: start;
    text-align: left;
  }

  .top-title-center h1 {
    font-size: 24px;
  }

  .top-metric,
  .compact-metric {
    min-width: 0;
    width: 100%;
  }

  .cargo-import-card {
    width: min(100%, calc(100vw - 24px));
    max-width: min(100%, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
  }

  .cargo-import-card .cargo-search-field,
  .cargo-import-map {
    grid-template-columns: 1fr;
  }

  .top-picked-entry {
    gap: 12px;
  }

  .picked-drawer-toggle,
  .top-picked-entry button,
  .submit-order-button,
  .status-chip {
    width: 100%;
  }

  .admin-top-bar {
    display: grid;
    grid-template-columns: repeat(8, max-content);
    grid-auto-columns: max-content;
    gap: 4px;
    align-items: center;
    justify-content: start;
    padding: 8px;
    overflow: visible;
    scrollbar-width: none;
  }

  .admin-top-bar::-webkit-scrollbar {
    display: none;
  }

  .admin-top-bar .top-title-center {
    grid-column: 1 / -1;
    width: 100%;
    justify-items: center;
    justify-self: center;
    text-align: center;
  }

  .admin-top-bar .top-title-center h1 {
    text-align: center;
  }

  .admin-top-bar .text-link {
    font-size: 17px;
  }

  .admin-top-bar .top-picked-entry {
    display: contents;
    margin-left: 0;
  }

  .inventory-review-page .admin-top-bar {
    grid-template-columns: minmax(150px, auto) minmax(0, 1fr) 82px;
    justify-content: stretch;
    align-items: center;
    gap: 6px;
    min-height: 64px;
    padding: 8px;
  }

  .inventory-review-page .inventory-nav-actions {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 3;
  }

  .inventory-review-page .inventory-nav-actions .report-entry {
    width: auto;
    min-width: 54px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    text-align: center;
    line-height: 1;
  }

  .inventory-review-page .inventory-nav-actions .warehouse-system-entry {
    min-width: 86px;
  }

  .inventory-review-page .admin-top-bar .top-title-center {
    position: static;
    grid-column: 2;
    grid-row: 1;
    order: initial;
    width: min(260px, 100%);
    padding: 0;
    background: transparent;
    transform: none;
    pointer-events: auto;
    justify-self: center;
    justify-items: center;
    text-align: center;
  }

  .inventory-review-page .admin-top-bar .top-title-center h1 {
    margin: 0;
    font-size: 22px;
    text-align: center;
    white-space: nowrap;
  }

  .inventory-review-page .admin-top-bar .top-title-center .page-tab-strip {
    justify-content: center;
  }

  .inventory-review-page .admin-top-bar > .top-metric {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 6px;
    border-radius: 10px;
  }

  .inventory-review-page .admin-top-bar > .top-metric span {
    margin: 0;
    font-size: 11px;
  }

  .inventory-review-page .admin-top-bar > .top-metric strong {
    font-size: 15px;
  }

  .admin-top-bar .report-entry,
  .admin-top-bar .header-report-menu,
  .admin-top-bar .mobile-query-link,
  .admin-top-bar .account-chip,
  .admin-top-bar .top-metric,
  .admin-top-bar .compact-metric,
  .admin-top-bar .picked-drawer-toggle,
  .admin-top-bar .refresh-orders-button,
  .admin-top-bar .delivery-notice-button,
  .admin-top-bar .logout-button {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: 32px;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    gap: 0;
    font-size: 17px;
    line-height: 1;
    white-space: nowrap;
  }

  .admin-top-bar .account-chip {
    border-radius: 10px;
  }

  .admin-top-bar .account-chip span,
  .admin-top-bar .top-metric span,
  .admin-top-bar .compact-metric span,
  .admin-top-bar .report-entry span {
    font-size: 17px;
    line-height: 1;
  }

  .admin-top-bar .account-chip strong,
  .admin-top-bar .top-metric strong,
  .admin-top-bar .compact-metric strong,
  .admin-top-bar .report-entry strong,
  .admin-top-bar .header-report-menu summary {
    font-size: 17px;
    line-height: 1.05;
  }

  .admin-top-bar .review-entry-button span,
  .admin-top-bar .review-entry-button strong {
    font-size: 17px;
  }

  .cargo-sheet-page .admin-top-bar {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 6px;
    overflow: hidden;
  }

  .cargo-sheet-page .admin-top-bar .top-title-center {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .cargo-sheet-page .cargo-nav-left-actions {
    grid-column: 1;
    grid-row: 2;
    gap: 4px;
  }

  .cargo-sheet-page .cargo-header-actions {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(132px, 1.4fr) 34px;
    gap: 5px;
    align-items: center;
    justify-self: stretch;
    transform: translateX(-6px);
  }

  .cargo-sheet-page .cargo-header-action {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    font-size: 13px;
    white-space: nowrap;
  }

  .cargo-sheet-page .cargo-header-actions a[href="./cargo-query.html"] {
    padding: 0 10px;
    font-size: 12px;
  }

  .cargo-sheet-page #cargo-new-sheet {
    display: none;
  }

  .cargo-sheet-page .cargo-menu-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
  }

  .cargo-sheet-page .cargo-sheet-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .cargo-sheet-page .cargo-sheet-card label,
  .cargo-sheet-page .cargo-sheet-card-actions .secondary-button {
    display: none;
  }

  .cargo-sheet-page .cargo-sheet-card-actions {
    justify-content: end;
  }

  .cargo-sheet-page .cargo-sheet-card-actions .quick-primary-button {
    height: 34px;
    padding: 0 12px;
  }

  .cargo-sheet-page .cargo-editor-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .cargo-sheet-page .cargo-editor-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    white-space: normal;
  }

  .cargo-sheet-page .cargo-editor-actions .secondary-button {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 6px;
    font-size: 12px;
  }

  .cargo-sheet-page #cargo-extra-open,
  .cargo-sheet-page #cargo-left-open,
  .cargo-sheet-page #cargo-warehouse-open {
    grid-row: 2;
  }

  .admin-top-bar .refresh-status {
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 17px;
  }

  .admin-top-bar .refresh-status[hidden] {
    display: inline-block;
    visibility: hidden;
  }

  .admin-home-top-bar .cargo-entry-button[href="./cargo-query.html"] {
    min-width: 142px;
    padding: 0 10px;
    transform: translateX(-8px);
    font-size: 12px;
  }

  .admin-home-top-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    align-items: center;
    column-gap: 5px;
    row-gap: 0;
    padding: 3px 4px;
    border-radius: 12px;
  }

  .admin-home-top-bar .top-title-center {
    display: none;
  }

  .admin-home-top-bar .account-chip {
    grid-column: 4;
    grid-row: 1;
    justify-self: stretch;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: none;
  }

  .admin-home-top-bar .account-chip span {
    display: inline;
  }

  .admin-home-top-bar .mobile-message-history-button {
    grid-column: 4;
    grid-row: 2;
    display: inline-grid;
    width: 100%;
    height: 22px;
    min-height: 22px;
    padding: 0 4px;
    place-items: center;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1;
  }

  .admin-home-top-bar .inventory-review-entry-button {
    grid-column: 4;
    grid-row: 1;
    justify-self: stretch;
    width: 100%;
  }

  .admin-home-top-bar .cargo-entry-button[href="./cargo-query.html"] {
    grid-column: 2;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    height: 24px;
    min-height: 24px;
    padding: 0 3px;
    transform: translateX(-6px);
    border-radius: 7px;
    font-size: 10px;
    line-height: 1;
  }

  .admin-home-top-bar .cargo-entry-button[href="./cargo-sheet.html"] {
    grid-column: 3;
    grid-row: 2;
    justify-self: center;
    width: 54px;
    min-width: 54px;
    height: 24px;
    min-height: 24px;
    padding: 0 6px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1;
  }

  .admin-home-top-bar .header-report-menu {
    grid-column: 1;
    grid-row: 1;
  }

  .admin-home-top-bar .review-entry-button {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-home-top-bar .mobile-entry-toggle {
    grid-column: 3;
    grid-row: 1;
    display: inline-grid;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 24px;
    padding: 0 4px;
    border: 1px solid rgba(217, 108, 31, 0.22);
    border-radius: 10px;
    background: linear-gradient(135deg, #fff6e8 0%, #ffe7c4 100%);
    color: var(--ink);
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  }

  .admin-home-top-bar .mobile-entry-toggle.is-hidden {
    display: none;
  }

  .admin-home-top-bar .cargo-reservation-command-form {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr) 52px;
    width: 100%;
    gap: 4px;
  }

  .admin-home-top-bar .cargo-reservation-command-form input,
  .admin-home-top-bar .cargo-reservation-command-form button {
    height: 24px;
    min-height: 24px;
    font-size: 12px;
  }

  .admin-home-top-bar .cargo-reservation-command-form span {
    display: none;
  }

  .admin-home-top-bar .mobile-query-link,
  .admin-home-top-bar .picked-drawer-toggle,
  .admin-home-top-bar .refresh-orders-button,
  .admin-home-top-bar .refresh-status {
    display: none;
  }

  .admin-home-top-bar .delivery-notice-button,
  .admin-home-top-bar .logout-button,
  .desktop-message-history-button {
    display: none;
  }

  .admin-home-top-bar .mobile-menu-action {
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #f6f8fb;
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
  }

  .admin-home-top-bar .header-report-menu summary,
  .admin-home-top-bar .review-entry-button,
  .admin-home-top-bar .inventory-review-entry-button,
  .admin-home-top-bar .mobile-entry-toggle {
    width: 100%;
    padding-inline: 4px;
  }

  .admin-home-top-bar .header-report-menu summary,
  .admin-home-top-bar .review-entry-button,
  .admin-home-top-bar .inventory-review-entry-button,
  .admin-home-top-bar .account-chip,
  .admin-home-top-bar .mobile-entry-toggle {
    height: 24px;
    min-height: 24px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1;
  }

  .admin-home-top-bar .account-chip {
    padding-inline: 4px;
    gap: 2px;
  }

  .admin-home-top-bar .inventory-review-entry-button span,
  .admin-home-top-bar .inventory-review-entry-button strong,
  .admin-home-top-bar .account-chip span,
  .admin-home-top-bar .account-chip strong,
  .admin-home-top-bar .review-entry-button span,
  .admin-home-top-bar .review-entry-button strong,
  .admin-home-top-bar .header-report-menu summary {
    font-size: 12px;
    line-height: 1;
  }

  .admin-home-top-bar .header-report-menu {
    width: 100%;
  }

  .admin-form-wide {
    width: 100%;
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .entry-panel-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .entry-command-row {
    grid-template-columns: 1fr;
  }

  .entry-command-row .admin-inventory-lookup-form {
    order: 0;
  }

  .entry-command-row .desktop-entry-toggle {
    order: 1;
  }

  .entry-secondary-row {
    grid-template-columns: 1fr;
  }

  .desktop-entry-toggle,
  .admin-inventory-lookup-form {
    width: 100%;
  }

  .admin-inventory-result-row {
    grid-template-columns: 82px minmax(0, 1fr) 72px 74px 64px;
    grid-template-areas:
      "thumb name name name name"
      "thumb barcode barcode barcode sku"
      "thumb pending stock spec vip3";
    align-items: start;
    min-height: 96px;
    gap: 4px 0;
    padding: 8px;
  }

  .admin-inventory-result-row.without-pending-orders-column {
    grid-template-columns: 82px minmax(0, 1fr) 74px 64px;
    grid-template-areas:
      "thumb name name name"
      "thumb barcode barcode sku"
      "thumb stock spec vip3";
    gap: 3px 9px;
  }

  .admin-inventory-result-header {
    display: none;
  }

  .admin-inventory-result-row span,
  .admin-inventory-result-row strong {
    white-space: normal;
  }

  .admin-inventory-result-row .inventory-result-thumb {
    grid-area: thumb;
    align-self: center;
  }

  .admin-inventory-result-row:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: minmax(0, 1fr) 72px 74px 64px;
    grid-template-areas:
      "name name name name"
      "barcode barcode barcode sku"
      "pending stock spec vip3";
  }

  .admin-inventory-result-row.without-pending-orders-column:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: minmax(0, 1fr) 74px 64px;
    grid-template-areas:
      "name name name"
      "barcode barcode sku"
      "stock spec vip3";
  }

  .admin-inventory-result-row .inventory-result-thumb.is-empty {
    display: none;
  }

  .admin-inventory-result-row .result-name {
    grid-area: name;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
  }

  .admin-inventory-result-row .result-barcode {
    grid-area: barcode;
  }

  .admin-inventory-result-row .result-sku {
    grid-area: sku;
    text-align: right;
  }

  .admin-inventory-result-row .result-stock {
    grid-area: stock;
  }

  .admin-inventory-result-row .result-pending-ordered {
    grid-area: pending;
    text-align: center;
  }

  .admin-inventory-result-row .result-spec {
    grid-area: spec;
    text-align: center;
  }

  .admin-inventory-result-row .result-vip3 {
    grid-area: vip3;
  }

  .admin-inventory-result-row .result-stock,
  .admin-inventory-result-row .result-pending-ordered,
  .admin-inventory-result-row .result-spec,
  .admin-inventory-result-row .result-vip3 {
    align-self: end;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
  }

  .admin-inventory-result-row .result-stock {
    font-size: 14px;
    text-align: left;
  }

  .admin-inventory-result-row .result-pending-ordered::before {
    content: "已订 ";
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .admin-inventory-result-row .result-vip3 {
    text-align: right;
  }

  .admin-inventory-result-row .result-stock::before {
    content: "库存(inventario) ";
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .admin-inventory-result-row .result-spec::before {
    content: "cantidad/caja ";
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .admin-inventory-result-row .result-vip3::before {
    content: "价3 ";
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .admin-inventory-result-row .result-unit,
  .admin-inventory-result-row .result-vip2 {
    display: none;
  }

  .admin-inventory-lookup-result {
    max-height: min(34vh, 240px);
    overflow-x: hidden;
    overflow-y: auto;
    gap: 5px;
    padding: 6px;
    border-radius: 12px;
  }

  .admin-inventory-result-row {
    grid-template-columns: 58px minmax(0, 1fr) 64px 64px;
    grid-template-areas:
      "thumb name name sku"
      "thumb barcode barcode barcode"
      "pending stock spec vip3";
    min-height: 72px;
    gap: 4px 4px;
    padding: 6px;
    border-radius: 10px;
  }

  .admin-inventory-result-row.without-pending-orders-column {
    grid-template-columns: 58px minmax(0, 1fr) 64px 64px;
    grid-template-areas:
      "thumb name name sku"
      "thumb barcode barcode barcode"
      "stock stock spec vip3";
    min-height: 72px;
    gap: 4px 4px;
  }

  .admin-inventory-result-row:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: minmax(0, 1fr) 64px 64px;
    grid-template-areas:
      "name name sku"
      "barcode barcode barcode"
      "pending stock spec";
  }

  .admin-inventory-result-row.without-pending-orders-column:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: minmax(0, 1fr) 64px 64px;
    grid-template-areas:
      "name name sku"
      "barcode barcode barcode"
      "stock spec vip3";
  }

  .admin-inventory-result-row .inventory-result-thumb {
    width: 52px;
    height: 52px;
    align-self: center;
  }

  .admin-inventory-result-row > span:not(.inventory-result-thumb),
  .admin-inventory-result-row > strong {
    min-height: 0;
    padding: 0 4px;
    border-left: 0;
  }

  .admin-inventory-result-row > span:last-child,
  .admin-inventory-result-row > strong:last-child {
    border-right: 0;
  }

  .admin-inventory-result-row span,
  .admin-inventory-result-row strong {
    white-space: nowrap;
  }

  .admin-inventory-result-row .result-name {
    font-size: 13px;
    line-height: 1.12;
  }

  .admin-inventory-result-row .result-barcode,
  .admin-inventory-result-row .result-sku {
    font-size: 11px;
    line-height: 1.05;
  }

  .admin-inventory-result-row .result-stock,
  .admin-inventory-result-row .result-pending-ordered,
  .admin-inventory-result-row .result-spec,
  .admin-inventory-result-row .result-vip3 {
    align-self: stretch;
    min-height: 34px;
    justify-content: center;
    padding: 3px 4px;
    font-size: 12px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .admin-inventory-result-row .result-stock {
    font-size: 15px;
    text-align: center;
  }

  .admin-inventory-result-row .result-pending-ordered::before {
    content: "已订";
    font-size: 10px;
    line-height: 1;
  }

  .admin-inventory-result-row .result-stock::before {
    content: "库存";
    font-size: 10px;
    line-height: 1;
  }

  .admin-inventory-result-row .result-spec::before {
    content: "规格";
    font-size: 10px;
    line-height: 1;
  }

  .admin-inventory-result-row .result-vip3::before {
    content: "价3";
    font-size: 10px;
    line-height: 1;
  }

  .admin-inventory-lookup-result {
    max-height: min(46vh, 420px);
    overflow-x: hidden;
    overflow-y: auto;
    gap: 8px;
    padding: 8px;
    border-radius: 14px;
  }

  .admin-inventory-result-row {
    grid-template-columns: 64px minmax(0, 1fr) 76px 86px;
    grid-template-areas:
      "thumb name name sku"
      "thumb barcode barcode sku"
      "pending stock spec vip3";
    min-height: 112px;
    row-gap: 6px;
    column-gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    overflow: hidden;
  }

  .admin-inventory-result-row.without-pending-orders-column {
    grid-template-columns: 64px minmax(0, 1fr) 76px 86px;
    grid-template-areas:
      "thumb name name sku"
      "thumb barcode barcode sku"
      "stock stock spec vip3";
    min-height: 112px;
    row-gap: 6px;
    column-gap: 8px;
  }

  .admin-inventory-result-row:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: 64px minmax(0, 1fr) 76px 86px;
    grid-template-areas:
      "name name name sku"
      "barcode barcode barcode sku"
      "pending stock spec vip3";
  }

  .admin-inventory-result-row.without-pending-orders-column:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: 64px minmax(0, 1fr) 76px 86px;
    grid-template-areas:
      "name name name sku"
      "barcode barcode barcode sku"
      "stock stock spec vip3";
  }

  .admin-inventory-result-row .inventory-result-thumb {
    width: 62px;
    height: 62px;
    border-radius: 8px;
  }

  .admin-inventory-result-row .result-name {
    align-self: end;
    padding-left: 0;
    font-size: 14px;
    line-height: 1.18;
  }

  .admin-inventory-result-row .result-barcode {
    align-self: start;
    padding-left: 0;
    color: #344238;
    font-size: 12px;
    line-height: 1.1;
  }

  .admin-inventory-result-row .result-sku {
    align-self: start;
    justify-content: flex-end;
    min-height: 28px;
    padding: 2px 4px;
    color: #1f2a1f;
    font-size: 12px;
    font-weight: 900;
  }

  .admin-inventory-result-row .result-stock,
  .admin-inventory-result-row .result-pending-ordered,
  .admin-inventory-result-row .result-spec,
  .admin-inventory-result-row .result-vip3 {
    align-self: stretch;
    min-height: 40px;
    flex-direction: column;
    justify-content: center;
    padding: 4px 5px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .admin-inventory-result-row .result-stock {
    color: #047857;
    font-size: 18px;
    text-align: center;
  }

  .admin-inventory-result-row .result-pending-ordered::before,
  .admin-inventory-result-row .result-stock::before,
  .admin-inventory-result-row .result-spec::before,
  .admin-inventory-result-row .result-vip3::before {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
  }

  .admin-inventory-result-row .result-vip3::before {
    content: "批发价";
  }

  .admin-home-page .admin-inventory-lookup-result {
    max-height: min(46vh, 420px);
    overflow-x: hidden;
    overflow-y: auto;
    gap: 8px;
    padding: 8px;
    border-radius: 14px;
  }

  .admin-home-page .admin-inventory-result-row {
    grid-template-columns: 64px minmax(0, 1fr) 76px 86px;
    grid-template-areas:
      "thumb name name sku"
      "thumb barcode barcode sku"
      "pending stock spec vip3";
    align-items: stretch;
    min-height: 112px;
    row-gap: 6px;
    column-gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    overflow: hidden;
  }

  .admin-home-page .admin-inventory-result-row.without-pending-orders-column {
    grid-template-columns: 64px minmax(0, 1fr) 76px 86px;
    grid-template-areas:
      "thumb name name sku"
      "thumb barcode barcode sku"
      "stock stock spec vip3";
    min-height: 112px;
    row-gap: 6px;
    column-gap: 8px;
  }

  .admin-home-page .admin-inventory-result-row:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: 64px minmax(0, 1fr) 76px 86px;
    grid-template-areas:
      "name name name sku"
      "barcode barcode barcode sku"
      "pending stock spec vip3";
  }

  .admin-home-page .admin-inventory-result-row.without-pending-orders-column:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: 64px minmax(0, 1fr) 76px 86px;
    grid-template-areas:
      "name name name sku"
      "barcode barcode barcode sku"
      "stock stock spec vip3";
  }

  .admin-home-page .admin-inventory-result-row .inventory-result-thumb {
    width: 62px;
    height: 62px;
    align-self: center;
    border-radius: 8px;
  }

  .admin-home-page .admin-inventory-result-row .result-name {
    align-self: end;
    padding-left: 0;
    font-size: 14px;
    line-height: 1.18;
  }

  .admin-home-page .admin-inventory-result-row .result-barcode {
    align-self: start;
    padding-left: 0;
    color: #344238;
    font-size: 12px;
    line-height: 1.1;
  }

  .admin-home-page .admin-inventory-result-row .result-sku {
    align-self: start;
    justify-content: flex-end;
    min-height: 28px;
    padding: 2px 4px;
    color: #1f2a1f;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
  }

  .admin-home-page .admin-inventory-result-row .result-stock,
  .admin-home-page .admin-inventory-result-row .result-pending-ordered,
  .admin-home-page .admin-inventory-result-row .result-spec,
  .admin-home-page .admin-inventory-result-row .result-vip3 {
    align-self: stretch;
    min-height: 40px;
    flex-direction: column;
    justify-content: center;
    padding: 4px 5px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.05;
    text-align: center;
    white-space: nowrap;
  }

  .admin-home-page .admin-inventory-result-row .result-stock {
    color: #047857;
    font-size: 18px;
  }

  .admin-home-page .admin-inventory-result-row .result-pending-ordered::before,
  .admin-home-page .admin-inventory-result-row .result-stock::before,
  .admin-home-page .admin-inventory-result-row .result-spec::before,
  .admin-home-page .admin-inventory-result-row .result-vip3::before {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
  }

  .admin-home-page .admin-inventory-result-row .result-vip3::before {
    content: "批发价";
  }

  .entry-panel .admin-form-wide {
    display: none;
  }

  .entry-panel.is-mobile-entry-open .admin-form-wide {
    display: grid;
  }

  .entry-panel:not(.is-mobile-entry-open) .customer-receivable-panel {
    display: none;
  }

  .entry-panel.is-mobile-entry-open .customer-receivable-panel {
    display: grid;
  }

  .order-search-field {
    width: 100%;
    margin-left: 0;
    flex-basis: auto;
  }

  .user-message-form {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .customer-receivable-panel {
    width: 100%;
  }

  .customer-receivable-popover {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 6px;
  }

  .customer-receivable-detail-dialog,
  .customer-sales-orders-dialog {
    place-items: start center;
    padding: 66px 10px 16px;
  }

  .customer-receivable-ledger-dialog {
    place-items: stretch;
    padding: 10px;
  }

  .customer-receivable-ledger-card {
    width: min(100%, calc(100vw - 20px));
    height: calc(100vh - 20px);
    padding: 12px;
    border-radius: 14px;
  }

  .customer-receivable-ledger-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .customer-receivable-ledger-header h2 {
    font-size: 20px;
  }

  .customer-receivable-ledger-card > input {
    font-size: 16px;
  }

  .customer-receivable-ledger-head,
  .customer-receivable-ledger-row {
    grid-template-columns: 92px minmax(0, 1fr) 100px 52px;
    gap: 7px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .customer-receivable-ledger-head .ledger-time,
  .customer-receivable-ledger-head .ledger-order,
  .customer-receivable-ledger-row .ledger-time,
  .customer-receivable-ledger-row .ledger-order {
    display: none;
  }

  .customer-sales-order-detail-dialog {
    padding: 10px;
  }

  .customer-receivable-dialog-card,
  .customer-sales-order-card {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 84px);
    padding: 12px;
  }

  .customer-sales-order-detail-card {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .customer-receivable-detail-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 38px;
  }

  .customer-receivable-detail-form button {
    grid-column: 1 / -1;
  }

  .customer-sales-orders-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 38px;
  }

  .customer-sales-orders-form button {
    grid-column: span 1;
  }

  .customer-sales-order-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-sales-order-summary-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-sales-order-filter-actions {
    grid-column: 1 / -1;
  }

  .customer-sales-order-export-selected {
    justify-self: start;
  }

  .customer-sales-order-detail-head {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 38px;
  }

  .customer-sales-order-detail-head button {
    justify-self: start;
  }

  .customer-sales-order-detail-summary {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  .customer-sales-order-head {
    grid-template-columns: 28px minmax(0, 1fr) 82px 58px;
  }

  .customer-sales-order-head .customer-sales-order-select {
    grid-column: 1 / 2;
    grid-row: 1 / 4;
    align-self: center;
  }

  .customer-sales-order-head > strong:first-of-type {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .customer-sales-order-head .customer-sales-order-date {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    justify-self: end;
  }

  .customer-sales-order-head .customer-sales-order-payment {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    justify-self: start;
  }

  .customer-sales-order-head .customer-sales-order-status {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
  }

  .customer-sales-order-head .customer-sales-order-amount {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    justify-self: start;
  }

  .customer-sales-order-head .customer-sales-order-actions {
    grid-column: 4 / 5;
    grid-row: 1 / 4;
    align-self: center;
    flex-direction: column;
  }

  .customer-sales-order-groups {
    max-height: calc(100vh - 290px);
  }

  .user-message-toast {
    top: 86px;
    right: 8px;
  }

  .admin-form-wide .compact-field,
  .admin-form-wide .form-order-number,
  .admin-form-wide .form-estimated-amount,
  .admin-form-wide .field-date-compact,
  .admin-form-wide .field-delivery-compact,
  .admin-form-wide .delivery-location-compact,
  .admin-form-wide .remark-field,
  .admin-form-wide .submit-order-button {
    width: 100%;
    max-width: none;
    min-width: 0;
    justify-self: stretch;
  }

  .admin-form-wide .compact-field,
  .admin-form-wide .form-order-number,
  .admin-form-wide .form-estimated-amount,
  .admin-form-wide .field-date-compact {
    grid-column: span 3;
  }

  .admin-form-wide .field-delivery-compact,
  .admin-form-wide .remark-field,
  .admin-form-wide .submit-order-button {
    grid-column: span 2;
  }

  .admin-form-wide .delivery-location-compact,
  .admin-form-wide #delivery-time-row {
    grid-column: span 3;
  }

  .customer-suggestion-list {
    width: 100%;
  }

  .detail-title-line {
    flex-wrap: wrap;
  }

  .entry-panel .admin-form input,
  .entry-panel .admin-form select,
  .entry-panel .admin-form button {
    height: 38px;
    font-size: 14px;
  }

  .entry-panel .admin-form .field-date-compact input {
    padding: 0 4px;
    font-size: 12px;
    text-align: center;
  }

  .entry-panel .admin-form span,
  .admin-layout .panel-head h2,
  .admin-layout .hint {
    font-size: 14px;
  }

  .panel-head {
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
  }

  .status-chip {
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .pending-pickup-filter-bar {
    display: none;
  }

  .ready-pickup-filter-bar {
    display: inline-flex;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .ready-pickup-filter-label,
  .ready-pickup-filter-button[data-filter-group="collection"] {
    display: none;
  }

  .picking-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .picking-pill {
    min-width: 0;
    padding: 8px;
  }

  #pending-summary .picking-pill,
  #picking-summary .picking-pill,
  #ready-summary .picking-pill {
    min-height: 0;
  }

  .picking-pill-main {
    align-items: flex-start;
  }

  .picking-pill-main strong {
    font-size: 14px;
  }

  .picking-pill-order-number,
  .delivery-count-row,
  .quick-count-text,
  .picking-pill-main span,
  .picking-pill-state,
  .quick-pickup-time,
  .order-subtitle,
  .admin-card .order-subtitle {
    font-size: 11px;
  }

  .picking-pill-watermark {
    font-size: 18px;
    opacity: 0.24;
  }

  .picking-pill-actions {
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
  }

  .quick-action-button,
  .picking-pill-actions select {
    width: auto;
    min-width: 0;
    height: 24px;
    padding: 0 6px;
    font-size: 10px;
    border-radius: 8px;
  }

  .quick-count-editor,
  .quick-pickup-editor,
  .quick-confirm-row,
  .quick-schedule-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  #picking-summary .picking-pill-watermark,
  #pending-summary .picking-pill-watermark {
    top: 42%;
    font-size: 17px;
    opacity: 0.22;
  }

  #picking-summary .picking-pill-actions {
    justify-content: center;
    margin-top: 4px;
    padding-top: 0;
  }

  #ready-summary .picking-pill {
    padding-bottom: 6px;
  }

  #ready-summary .picking-pill-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2px;
    width: 100%;
  }

  #ready-summary .quick-action-button {
    min-width: 0;
    height: 22px;
    padding: 0 4px;
    font-size: 9px;
    border-radius: 8px;
  }

  #ready-summary .ready-flow-actions {
    gap: 1px;
  }

  #ready-summary .ready-flow-actions .quick-action-button {
    min-width: 32px;
  }

  #ready-summary .delivery-center-info {
    top: 46%;
  }

  #ready-summary .delivery-center-date,
  #ready-summary .delivery-center-time {
    font-size: 10px;
    line-height: 1.1;
  }

  #ready-summary .quick-amount-inline {
    transform: translateY(3px);
    font-size: 10px;
  }

  .picking-pill .estimate-pill-button {
    display: none;
  }

  #ready-summary .quick-count-inline-ready {
    font-size: 11px;
  }

  #ready-summary .picking-pill-meta {
    gap: 5px;
    margin-top: 0;
    min-height: 26px;
  }

  .settings-dialog-grid,
  .settings-permission-grid,
  .device-detail-grid {
    grid-template-columns: 1fr;
  }

  .device-alias-form {
    display: grid;
  }

  .admin-dialog-card-wide,
  .image-preview-card {
    min-width: 0;
    width: calc(100vw - 16px);
  }

  .packing-detail-grid {
    grid-template-columns: 1fr;
  }

  .packing-detail-grid.detail-compact-grid {
    grid-template-columns: minmax(0, 1fr) 78px 58px;
  }

  .detail-people-editor {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .detail-status-edit-row,
  .detail-final-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .detail-mini-button {
    min-height: 32px;
    padding: 0 10px;
  }

  .report-toolbar,
  .report-toolbar-wide {
    grid-template-columns: 1fr;
  }

  .report-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lane-move-hint {
    display: none;
  }

  @media (pointer: coarse) {
    .addon-detail-button,
    .addon-alert-bubble,
    .addon-alert-toast {
      display: none;
    }
  }

  .pickup-report-page .admin-top-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .pickup-report-page .admin-top-bar .report-entry {
    grid-column: 1;
    grid-row: 1;
  }

  .pickup-report-page .report-page-title {
    grid-column: 2;
    grid-row: 1;
    order: 0;
    min-width: 0;
  }

  .pickup-report-page .report-page-title .text-link {
    display: none;
  }

  .pickup-report-page .report-page-title h1 {
    font-size: 21px;
    text-align: center;
  }

  .pickup-report-page .report-summary-metric {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
  }

  .pickup-report-page .report-summary-metric span,
  .pickup-report-page .report-summary-metric strong {
    font-size: 15px;
    line-height: 1;
  }

  .pickup-report-panel .panel-head .status-chip,
  .packing-daily-panel .panel-head {
    display: none;
  }

  .pickup-report-page .report-toolbar-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .pickup-report-page .report-toolbar-wide label:nth-child(1) {
    grid-column: 1 / -1;
  }

  .pickup-report-page .report-toolbar-wide label:nth-child(2),
  .pickup-report-page .report-toolbar-wide label:nth-child(3) {
    grid-column: span 2;
  }

  .pickup-report-page .report-toolbar-wide label:nth-child(4) {
    grid-column: 1 / 3;
  }

  .pickup-report-page .report-actions {
    grid-column: 3 / 5;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .pickup-report-page .report-toolbar-wide input,
  .pickup-report-page .report-toolbar-wide select,
  .pickup-report-page .report-actions button {
    width: 100%;
    min-width: 0;
  }

  .pickup-report-page .report-mobile-hide {
    display: none;
  }

  .order-detail-mobile-info {
    display: none;
  }

  .pickup-report-page th,
  .pickup-report-page td {
    padding: 8px 5px;
    font-size: 12px;
    white-space: nowrap;
  }

  .pickup-report-page table,
  .order-detail-page table,
  .employee-report-page table {
    table-layout: fixed;
    min-width: 0;
  }

  .pickup-report-page .pickup-report-customer-col {
    width: 3.6em;
    max-width: 3.6em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pickup-report-page .pickup-report-order-date-col {
    width: 68px;
  }

  .pickup-report-page .pickup-report-picked-date-col {
    width: 74px;
  }

  .pickup-report-page .pickup-report-count-col {
    width: 34px;
  }

  .pickup-report-page .pickup-report-action-col {
    width: 54px;
    text-align: right;
  }

  .pickup-report-page .quick-action-button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }

  .packing-report-page .admin-top-bar {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .packing-report-page .admin-top-bar > .report-entry:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .packing-report-page .packing-report-title {
    grid-column: 2;
    grid-row: 1;
    order: 0;
    min-width: 0;
  }

  .packing-report-page .packing-report-title .text-link {
    display: none;
  }

  .packing-report-page .packing-report-title h1 {
    font-size: 21px;
    text-align: center;
  }

  .packing-report-page .packing-report-record-link {
    grid-column: 1;
    grid-row: 2;
    width: auto;
  }

  .packing-report-page .packing-report-total-metric {
    grid-column: 2;
    grid-row: 2;
    width: auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-self: start;
    gap: 4px;
    padding: 3px 8px;
  }

  .packing-report-page .packing-report-total-metric span,
  .packing-report-page .packing-report-total-metric strong {
    font-size: 15px;
    line-height: 1;
  }

  .packing-report-page .report-toolbar-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .packing-report-page .report-toolbar-wide label:nth-child(1),
  .packing-report-page .report-toolbar-wide label:nth-child(2) {
    grid-column: span 2;
  }

  .packing-report-page .packing-date-actions {
    grid-column: 1 / 3;
  }

  .packing-report-page .report-toolbar-wide label:nth-child(4) {
    grid-column: 3 / 5;
  }

  .packing-report-page .report-actions:not(.packing-date-actions) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .packing-report-page .report-toolbar-wide input,
  .packing-report-page .report-actions button {
    width: 100%;
    min-width: 0;
  }

  .packing-group-head,
  .packing-group-columns {
    grid-template-columns: 1fr;
  }

  .packing-group-head .danger {
    justify-self: stretch;
  }

  .order-detail-page .admin-top-bar,
  .employee-report-page .admin-top-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .order-detail-page .admin-top-bar .report-entry:first-child,
  .employee-report-page .admin-top-bar .report-entry:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .order-detail-page .admin-top-bar .report-entry:not(:first-child),
  .employee-report-page .admin-top-bar .report-entry:not(:first-child) {
    display: none;
  }

  .order-detail-page .order-detail-title,
  .employee-report-page .employee-report-title {
    grid-column: 2;
    grid-row: 1;
    order: 0;
    min-width: 0;
  }

  .order-detail-page .order-detail-title .text-link,
  .employee-report-page .employee-report-title .text-link {
    display: none;
  }

  .order-detail-page .order-detail-title h1,
  .employee-report-page .employee-report-title h1 {
    font-size: 21px;
    text-align: center;
  }

  .order-detail-page .order-detail-total-metric,
  .employee-report-page .employee-report-total-metric {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
  }

  .order-detail-page .order-detail-total-metric span,
  .order-detail-page .order-detail-total-metric strong,
  .employee-report-page .employee-report-total-metric span,
  .employee-report-page .employee-report-total-metric strong {
    font-size: 15px;
    line-height: 1;
  }

  .order-detail-panel .panel-head,
  .employee-report-panel .panel-head {
    display: none;
  }

  .order-detail-page .report-toolbar-wide,
  .employee-report-page .report-toolbar-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .order-detail-page .report-toolbar-wide label:nth-child(1) {
    grid-column: 1 / -1;
  }

  .order-detail-page .report-toolbar-wide label:nth-child(2),
  .order-detail-page .report-toolbar-wide label:nth-child(3) {
    grid-column: span 2;
  }

  .order-detail-page .report-toolbar-wide label:nth-child(4) {
    grid-column: 1 / 3;
  }

  .order-detail-page .report-actions {
    grid-column: 3 / 5;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .employee-report-page .report-toolbar-wide label:nth-child(1) {
    grid-column: 1 / -1;
  }

  .employee-report-page .report-toolbar-wide label:nth-child(3),
  .employee-report-page .report-toolbar-wide label:nth-child(4) {
    grid-column: span 2;
    grid-row: 2;
  }

  .employee-report-page .report-toolbar-wide label:nth-child(2) {
    grid-column: 1 / 3;
    grid-row: 3;
  }

  .employee-report-page .report-actions {
    grid-column: 3 / 5;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .order-detail-page .report-toolbar-wide input,
  .order-detail-page .report-toolbar-wide select,
  .order-detail-page .report-actions button,
  .employee-report-page .report-toolbar-wide input,
  .employee-report-page .report-toolbar-wide select,
  .employee-report-page .report-actions button {
    width: 100%;
    min-width: 0;
  }

  .report-pagination {
    align-items: stretch;
  }

  .report-pagination-controls {
    width: 100%;
  }

  .report-pagination-controls button,
  .report-pagination-controls select,
  .report-pagination-controls label {
    flex: 1 1 auto;
  }

  .order-detail-page .report-mobile-hide,
  .employee-report-page .report-mobile-hide {
    display: none;
  }

  .order-detail-page .order-detail-mobile-info {
    display: table-cell;
    width: 110px;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
  }

  .order-detail-page .order-detail-mobile-info small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
  }

  .order-detail-page th,
  .order-detail-page td,
  .employee-report-page th,
  .employee-report-page td {
    padding: 8px 5px;
    font-size: 12px;
    white-space: nowrap;
  }

  .order-detail-page .order-detail-customer-col {
    width: 3.6em;
    max-width: 3.6em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .order-detail-page .order-detail-box-col {
    width: 34px;
  }

  .order-detail-page .order-detail-amount-col {
    width: 64px;
  }

  .order-detail-page .order-detail-action-col {
    width: 54px;
    text-align: right;
  }

  .employee-report-page th:first-child,
  .employee-report-page td:first-child {
    width: 72px;
  }

  .employee-report-page th:nth-child(2),
  .employee-report-page td:nth-child(2) {
    width: 4.2em;
    max-width: 4.2em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .employee-report-page th:nth-child(6),
  .employee-report-page td:nth-child(6) {
    width: 40px;
  }

  .employee-report-page th:nth-child(7),
  .employee-report-page td:nth-child(7) {
    width: 68px;
  }

  .order-detail-page .quick-action-button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }

  .total-report-options a[href="./operation-log.html"],
  .admin-top-bar a[href="./operation-log.html"] {
    display: none;
  }
}

@media (max-width: 520px) {
  .purchase-assistant-diagnostic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .picking-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .picking-pill {
    padding: 7px;
    border-radius: 12px;
  }

  .pending-schedule-row {
    margin-top: 10px;
  }

  .pending-schedule-row .quick-pickup-time,
  .delivery-center-date,
  .delivery-center-time {
    font-size: 11px;
  }

  .picking-pill-actions {
    gap: 3px;
  }

  .quick-action-button,
  .picking-pill-actions select {
    height: 22px;
    padding: 0 5px;
    font-size: 9px;
  }

  .entry-panel .admin-form .field-date-compact input {
    padding: 0 2px;
    font-size: 11px;
  }

  #ready-summary .quick-action-button {
    height: 21px;
    padding: 0 3px;
    font-size: 8.5px;
  }

  #ready-summary .ready-flow-actions .quick-action-button {
    min-width: 30px;
  }

  #ready-summary .picking-pill-actions {
    gap: 1px;
  }
}

@media (max-width: 620px) {
  .admin-home-page .admin-home-top-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
    padding: 8px;
  }

  .admin-home-page .admin-home-top-bar .header-report-menu {
    grid-column: 1;
    grid-row: 1;
  }

  .admin-home-page .admin-home-top-bar .review-entry-button {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-home-page .admin-home-top-bar .cargo-entry-button[href="./cargo-query.html"] {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    height: 32px;
    min-height: 32px;
    transform: none;
    font-size: 13px;
  }

  .admin-home-page .admin-home-top-bar .cargo-entry-button[href="./cargo-sheet.html"] {
    grid-column: 4;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    height: 32px;
    min-height: 32px;
    font-size: 13px;
  }

  .admin-home-page .admin-home-top-bar .header-report-menu summary,
  .admin-home-page .admin-home-top-bar .review-entry-button,
  .admin-home-page .admin-home-top-bar .cargo-entry-button {
    height: 32px;
    min-height: 32px;
    border-radius: 10px;
    padding: 0 4px;
    font-size: 13px;
    white-space: nowrap;
  }

  .admin-home-page .admin-home-top-bar .review-entry-button span,
  .admin-home-page .admin-home-top-bar .review-entry-button strong,
  .admin-home-page .admin-home-top-bar .header-report-menu summary {
    font-size: 13px;
  }

  .admin-home-page .admin-home-top-bar .cargo-reservation-command-form,
  .admin-home-page .admin-home-top-bar .inventory-review-entry-button,
  .admin-home-page .admin-home-top-bar .mobile-entry-toggle,
  .admin-home-page .admin-home-top-bar .mobile-message-history-button {
    display: none !important;
  }

  .admin-home-page .entry-panel .user-message-form {
    display: none !important;
  }

  .branch-pos-report-page .admin-page-shell,
  .packing-report-page .admin-page-shell {
    width: min(100%, calc(100% - 16px));
    padding-top: 12px;
  }

  .branch-pos-report-page .admin-top-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 72px;
    padding: 10px;
    overflow: hidden;
  }

  .branch-pos-report-page .admin-top-bar > .report-entry {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-width: 60px;
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
  }

  .branch-pos-report-page .branch-pos-title {
    position: static;
    grid-column: 2;
    grid-row: 1;
    order: 0;
    width: 100%;
    padding: 0;
    background: transparent;
    transform: none;
    pointer-events: auto;
    justify-self: center;
    justify-items: center;
    text-align: center;
  }

  .branch-pos-report-page .branch-pos-title h1 {
    font-size: 26px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .branch-pos-report-page .page-tab-strip {
    display: none !important;
  }

  .branch-pos-report-page .branch-pos-total-metric {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    min-width: 108px;
    height: 46px;
    padding: 4px 8px;
    border-radius: 14px;
    justify-self: end;
  }

  .branch-pos-report-page .branch-pos-total-metric span {
    font-size: 11px;
    line-height: 1;
  }

  .branch-pos-report-page .branch-pos-total-metric strong {
    font-size: 19px;
    line-height: 1;
  }

  .branch-pos-report-page .branch-pos-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .branch-pos-report-page .branch-pos-panel .panel-head {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
  }

  .branch-pos-report-page .branch-pos-panel .panel-head h2 {
    font-size: 26px;
    line-height: 1.15;
    text-align: left;
  }

  .branch-pos-report-page #branch-pos-sync-status {
    width: 100%;
    min-height: 46px;
    font-size: 17px;
    white-space: nowrap;
  }

  .branch-pos-report-page .branch-pos-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .branch-pos-report-page .branch-pos-toolbar label:nth-child(1),
  .branch-pos-report-page .branch-pos-toolbar label:nth-child(2) {
    grid-column: auto;
    min-width: 0;
  }

  .branch-pos-report-page .branch-pos-toolbar label:nth-child(3) {
    display: none;
  }

  .branch-pos-report-page .branch-pos-toolbar input {
    width: 100%;
    height: 58px;
    min-width: 0;
    padding: 0 8px;
    font-size: 16px;
    text-align: center;
  }

  .branch-pos-report-page .branch-pos-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .branch-pos-report-page .branch-pos-actions .secondary-button,
  .branch-pos-report-page .branch-pos-actions .quick-primary-button {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    height: 54px;
    padding: 0 8px;
    border-radius: 16px;
    font-size: 16px;
  }

  .branch-pos-report-page .branch-pos-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
  }

  .branch-pos-report-page .branch-pos-tab-button {
    height: 54px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 16px;
    white-space: nowrap;
  }

  .branch-pos-report-page .branch-pos-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .branch-pos-report-page .branch-pos-summary div {
    min-height: 58px;
    padding: 9px 10px;
    border-radius: 8px;
  }

  .branch-pos-report-page .branch-pos-summary span,
  .branch-pos-report-page .branch-pos-summary strong {
    white-space: nowrap;
  }

  .branch-pos-report-page .branch-pos-section-head {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0 8px;
  }

  .branch-pos-report-page .branch-pos-sort-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    overflow: visible;
  }

  .branch-pos-report-page .branch-pos-sort-button {
    height: 36px;
    min-height: 36px;
    padding: 0 6px;
    font-size: 13px;
  }

  .branch-pos-report-page .branch-pos-overall-daily-wrap,
  .branch-pos-report-page .branch-pos-daily-wrap,
  .branch-pos-report-page .branch-pos-orders-wrap,
  .branch-pos-report-page .branch-pos-wholesale-wrap {
    max-height: 58vh;
    overflow-x: auto;
    overflow-y: auto;
  }

  .branch-pos-report-page .branch-pos-overall-daily-wrap table,
  .branch-pos-report-page .branch-pos-daily-wrap table,
  .branch-pos-report-page .branch-pos-orders-wrap table,
  .branch-pos-report-page .branch-pos-wholesale-wrap table,
  .branch-pos-report-page .branch-pos-wholesale-wrap .shangsu-wholesale-order-details table {
    table-layout: auto;
    min-width: 780px;
  }

  .branch-pos-report-page .branch-pos-orders-wrap table {
    min-width: 980px;
  }

  .branch-pos-report-page .branch-pos-overall-daily-wrap th,
  .branch-pos-report-page .branch-pos-overall-daily-wrap td,
  .branch-pos-report-page .branch-pos-daily-wrap th,
  .branch-pos-report-page .branch-pos-daily-wrap td,
  .branch-pos-report-page .branch-pos-orders-wrap th,
  .branch-pos-report-page .branch-pos-orders-wrap td,
  .branch-pos-report-page .branch-pos-wholesale-wrap th,
  .branch-pos-report-page .branch-pos-wholesale-wrap td {
    padding: 10px 12px;
    white-space: nowrap;
    overflow-wrap: normal;
    font-size: 13px;
  }

  .branch-pos-report-page .branch-pos-detail-card {
    width: calc(100vw - 16px);
    padding: 16px;
  }

  .branch-pos-report-page .branch-pos-detail-content {
    overflow-x: hidden;
  }

  .purchase-assistant-page .admin-page-shell {
    width: min(100%, calc(100% - 16px));
    padding-top: 12px;
  }

  .purchase-assistant-top-bar {
    min-height: 72px;
    padding: 10px;
    overflow: hidden;
  }

  .purchase-assistant-top-bar > .report-entry {
    width: auto;
    min-width: 60px;
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
  }

  .purchase-assistant-title h1 {
    font-size: 25px;
    line-height: 1;
    white-space: nowrap;
  }

  .purchase-assistant-total-metric {
    width: auto;
    min-width: 96px;
    height: 46px;
    padding: 4px 8px;
    border-radius: 14px;
  }

  .purchase-assistant-total-metric span {
    font-size: 11px;
    line-height: 1;
  }

  .purchase-assistant-total-metric strong {
    font-size: 18px;
    line-height: 1;
  }

  .purchase-assistant-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .purchase-assistant-panel .panel-head {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
  }

  .purchase-assistant-panel .panel-head h2 {
    font-size: 25px;
    line-height: 1.15;
  }

  .purchase-assistant-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .purchase-assistant-toolbar-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-assistant-toolbar-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-assistant-toolbar-secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .purchase-assistant-toolbar label {
    min-width: 0;
  }

  .purchase-assistant-home-link {
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 18px;
  }

  .purchase-assistant-toolbar input,
  .purchase-assistant-toolbar select {
    width: 100%;
    height: 44px;
    min-height: 44px;
    min-width: 0;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
  }

  .purchase-assistant-search-control input {
    text-align: left;
  }

  .purchase-assistant-search-field {
    grid-column: 1 / -1;
    min-width: 0;
    max-width: none;
  }

  .purchase-assistant-search-control {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .purchase-assistant-snapshot-search {
    height: 44px;
    min-height: 44px;
    min-width: 86px;
    padding: 0 8px;
    font-size: 13px;
  }

  .purchase-assistant-toolbar-right {
    grid-column: 1 / -1;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 0;
  }

  .purchase-assistant-quick-ranges,
  .purchase-assistant-primary-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(62px, max-content);
    grid-template-columns: none;
    gap: 6px;
  }

  .purchase-assistant-more-menu {
    width: auto;
  }

  .purchase-assistant-more-trigger {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .purchase-assistant-more-list {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .purchase-assistant-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .purchase-assistant-toolbar-secondary .secondary-button,
  .purchase-assistant-toolbar-secondary .quick-primary-button,
  .purchase-assistant-actions .secondary-button,
  .purchase-assistant-actions .quick-primary-button {
    width: 100%;
    min-width: 0;
    height: 54px;
    padding: 0 8px;
    border-radius: 16px;
    font-size: 16px;
  }

  .purchase-assistant-filter-strip {
    gap: 6px;
  }

  .purchase-assistant-inline-status-tools {
    flex: 1 1 100%;
  }

  .purchase-assistant-inline-status {
    min-height: 30px;
    font-size: 11px;
  }

  .purchase-assistant-progress-inline {
    width: 120px;
    min-width: 120px;
  }

  .purchase-assistant-level-filter,
  .purchase-assistant-speed-filters .purchase-assistant-speed-filter {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .purchase-assistant-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .purchase-assistant-summary div {
    min-height: 58px;
    padding: 9px 10px;
    border-radius: 8px;
  }

  .purchase-assistant-source-status span {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    min-width: 0;
    white-space: nowrap;
  }

  .purchase-assistant-diagnostic-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .purchase-assistant-diagnostic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-assistant-table-wrap {
    max-height: 58vh;
    overflow-x: auto;
    overflow-y: auto;
  }

  .purchase-assistant-table-wrap table {
    table-layout: auto;
    min-width: 1784px;
  }

  .purchase-assistant-table-wrap th,
  .purchase-assistant-table-wrap td {
    padding: 10px 12px;
    white-space: nowrap;
    overflow-wrap: normal;
    font-size: 13px;
  }

  .packing-report-page .admin-top-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 112px;
    padding: 10px;
    overflow: hidden;
  }

  .packing-report-page .admin-top-bar > .report-entry:first-child {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-width: 70px;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
  }

  .packing-report-page .packing-report-record-link {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    min-width: 96px;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    justify-self: end;
  }

  .packing-report-page .packing-report-title {
    position: static;
    grid-column: 2;
    grid-row: 1;
    order: 0;
    width: 100%;
    padding: 0;
    background: transparent;
    transform: none;
    pointer-events: auto;
    justify-self: center;
    justify-items: center;
    text-align: center;
  }

  .packing-report-page .packing-report-title h1 {
    font-size: 25px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .packing-report-page .page-tab-strip {
    display: none !important;
  }

  .packing-report-page .packing-report-total-metric {
    grid-column: 2;
    grid-row: 2;
    justify-self: center;
    width: auto;
    min-width: 116px;
    height: 38px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: 12px;
  }

  .packing-report-page .packing-report-total-metric span,
  .packing-report-page .packing-report-total-metric strong {
    font-size: 16px;
    line-height: 1;
  }

  .packing-report-page .packing-daily-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .packing-report-page .report-toolbar-wide {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 8px;
    align-items: end;
  }

  .packing-report-page .report-toolbar-wide label:nth-child(1),
  .packing-report-page .report-toolbar-wide label:nth-child(2) {
    grid-column: span 2;
    min-width: 0;
  }

  .packing-report-page .packing-date-actions {
    grid-column: 1 / 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .packing-report-page .report-toolbar-wide label:nth-child(4) {
    grid-column: 3 / 5;
    min-width: 0;
  }

  .packing-report-page .report-actions:not(.packing-date-actions) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .packing-report-page .report-toolbar-wide input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 4px;
    font-size: 14px;
    text-align: center;
  }

  .packing-report-page .report-actions button {
    width: 100%;
    min-width: 0;
    height: 52px;
    border-radius: 14px;
    font-size: 16px;
    white-space: nowrap;
  }

  .packing-report-page #packing-employee-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .packing-report-page #packing-employee-wrap table {
    min-width: 860px;
  }

  .packing-report-page #packing-employee-wrap th,
  .packing-report-page #packing-employee-wrap td {
    white-space: nowrap;
  }
}

.purchase-editor-top-link {
  align-self: center;
  white-space: nowrap;
}

.purchase-tablet-header-actions {
  display: none;
}

.purchase-editor-shell {
  gap: 8px;
}

.cargo-sheet-editor-page .page-shell {
  padding-top: 8px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.cargo-sheet-editor-page .top-title-bar {
  min-height: 58px;
  margin-bottom: 6px;
  padding: 6px 12px;
}

.purchase-editor-test-page .admin-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.purchase-editor-test-page .admin-top-bar .top-title-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(360px, 28vw);
  min-width: 0;
  transform: translate(-50%, -50%);
  background: transparent;
  pointer-events: none;
}

.purchase-editor-test-page .admin-top-bar .top-title-center h1 {
  overflow: hidden;
  font-size: 24px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-editor-test-page .admin-top-bar .top-title-center p {
  overflow: hidden;
  margin: 0;
  max-width: 100%;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-editor-test-page .admin-top-bar .cargo-header-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.purchase-editor-test-page .admin-top-bar .cargo-header-actions[hidden] {
  display: none;
}

.purchase-action-menu {
  position: relative;
  z-index: 10;
}

.purchase-action-menu summary {
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.purchase-action-menu summary::-webkit-details-marker {
  display: none;
}

.purchase-action-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10001;
  display: grid;
  gap: 6px;
  width: 168px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(32, 44, 57, 0.16);
}

.purchase-action-options .secondary-button,
.purchase-action-options .quick-primary-button,
.purchase-action-options .danger-button {
  width: 100%;
  height: 36px;
  min-height: 36px;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
}

.cargo-flow-panel {
  padding: 16px;
}

.cargo-flow-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 14px;
}

.cargo-flow-side-panel,
.cargo-flow-meta-card {
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.cargo-flow-main-panel,
.cargo-flow-editor-view {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.cargo-sheet-editor-page .cargo-flow-editor-view {
  flex: 1 1 auto;
  min-height: 0;
}

.cargo-flow-detail-view[hidden],
.cargo-flow-editor-view[hidden] {
  display: none;
}

.cargo-flow-editor-view .purchase-editor-panel {
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.cargo-sheet-editor-page .purchase-editor-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.cargo-flow-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cargo-flow-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.cargo-flow-list-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.cargo-flow-list-item.is-active {
  border-color: #2563eb;
  background: #edf5ff;
}

.cargo-flow-list-item span,
.cargo-flow-note,
.cargo-flow-empty {
  color: #52616f;
  font-size: 13px;
}

.cargo-flow-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.cargo-flow-meta-grid label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.cargo-flow-meta-grid input,
.cargo-flow-meta-grid select {
  min-height: 36px;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
  padding: 6px 8px;
}

.cargo-code-generator-card,
.cargo-code-generator-history-card,
.cargo-code-generator-confirm-card,
.cargo-code-generator-result-card,
.cargo-code-generator-adjust-card {
  max-width: 960px;
}

.cargo-mobile-links {
  display: none;
}

.cargo-code-generator-page .page-shell {
  width: min(1280px, calc(100% - 32px));
}

.cargo-code-generator-page-panel {
  padding: 20px;
}

.cargo-code-generator-page-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cargo-code-generator-page-section-head h3 {
  margin: 0;
  font-size: 20px;
}

.cargo-code-generator-section + .cargo-code-generator-section {
  margin-top: 16px;
}

.cargo-code-generator-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cargo-code-generator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.cargo-code-generator-grid-barcode {
  grid-template-columns: minmax(220px, 320px);
}

.cargo-code-generator-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cargo-code-generator-button {
  flex: 1 1 auto;
}

.cargo-code-generator-button-stacked {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: center;
  gap: 2px;
  text-align: center;
}

.cargo-code-generator-button-label,
.cargo-code-generator-button-format {
  display: block;
  width: 100%;
  line-height: 1.15;
}

.cargo-code-generator-button-label {
  color: var(--ink);
  font-weight: 800;
}

.cargo-code-generator-button-format {
  color: #155eef;
  font-weight: 900;
}

.cargo-code-generator-history-button {
  flex: 0 0 auto;
  min-width: 64px;
}

.cargo-code-generator-history-body {
  display: grid;
  gap: 8px;
}

.cargo-code-generator-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cargo-code-generator-history-row strong,
.cargo-code-generator-result-value {
  font-size: 28px;
  line-height: 1.1;
  color: var(--ink);
}

.cargo-code-generator-history-row span,
.cargo-code-generator-result-time {
  color: var(--muted);
  font-size: 14px;
}

.cargo-code-generator-result-body {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 12px 0 6px;
}

.cargo-code-generator-confirm-message {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 16px;
}

.cargo-code-generator-adjust-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cargo-code-generator-adjust-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.cargo-code-generator-adjust-form input,
.cargo-code-generator-adjust-form select {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.cargo-flow-note {
  margin-top: 10px;
}

.purchase-editor-panel .panel-head p {
  margin: 4px 0 0;
}

.purchase-editor-test-page .purchase-editor-panel .panel-head:has([hidden]:only-child) {
  display: none;
}

.purchase-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.purchase-settings-grid[hidden] {
  display: none;
}

.purchase-settings-grid label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}

.purchase-settings-grid input,
.purchase-editor-table input {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.purchase-settings-grid input {
  min-height: 34px;
  padding: 6px 8px;
  width: 100%;
  min-width: 0;
}

.purchase-table-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 260px;
  max-height: none;
  width: 100%;
  max-width: 100%;
  overflow: auto;
}

.purchase-sticky-header {
  position: sticky;
  top: var(--purchase-header-sticky-top, 88px);
  z-index: 9;
  width: 100%;
  overflow: hidden;
  background: #fff;
}

.purchase-sticky-header-scroll {
  width: max-content;
  will-change: transform;
}

.purchase-editor-table {
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0.5ch 4px;
}

.purchase-editor-table th,
.purchase-editor-table td {
  padding: 0;
  vertical-align: middle;
}

.purchase-editor-table th {
  position: static;
  z-index: auto;
  background-clip: padding-box;
}

.purchase-editor-body-table thead {
  visibility: hidden;
}

.purchase-sticky-header-table thead {
  visibility: visible;
}

.purchase-editor-table input {
  display: block;
  width: 25ch;
  min-height: 28px;
  margin: 0;
  padding: 1px;
}

.purchase-editor-table input[data-field="barcode"] {
  width: 14ch;
}

.purchase-editor-table input[data-field="sku"] {
  width: 9ch;
}

.purchase-editor-table input[data-field="purchaseCount"] {
  width: 4ch;
  min-width: 4ch;
  max-width: 4ch;
}

.purchase-editor-table input[data-field="spec"] {
  width: 6ch;
}

.purchase-editor-table input[data-field="domesticUnitPrice"] {
  width: 6ch;
}

.purchase-editor-table input[data-field="volumeText"] {
  width: 12ch;
}

.purchase-editor-table input[data-field="cubicMeters"] {
  width: 6ch;
}

.purchase-editor-table input[data-field="unit"] {
  width: 11ch;
}

.purchase-editor-table input[data-field="actualPayment"] {
  width: 8ch;
}

.purchase-editor-table input[data-field="landedPrice"] {
  width: 5.5ch;
}

.purchase-editor-table input[data-field="retailPrice"] {
  width: 5.5ch;
}

.purchase-editor-table input[data-field="memberPrice"] {
  width: 5.5ch;
}

.purchase-editor-table input[data-field="member2Price"] {
  width: 5.5ch;
}

.purchase-editor-table input[data-field="member3Price"] {
  width: 5.5ch;
}

.purchase-editor-table input[data-field="member4Price"] {
  width: 5.5ch;
}

.purchase-editor-table input[data-field="member5Price"] {
  width: 5.5ch;
}

.purchase-editor-table input[data-field="branchRetailPrice"] {
  width: 5.5ch;
}

.purchase-line-number-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-weight: 700;
}

.purchase-image-head,
.purchase-image-cell {
  width: 34px;
  min-width: 34px;
  text-align: center;
}

.purchase-row-image-button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}

.purchase-row-image-icon {
  font-size: 14px;
  color: #64748b;
}

.purchase-row-image-icon.is-ready {
  color: #2563eb;
  border-color: #93c5fd;
  background: #eff6ff;
}

.purchase-row-image-icon.is-missing {
  color: #94a3b8;
  border-style: dashed;
}

.purchase-image-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #94a3b8;
}

.purchase-editor-table .purchase-input-name {
  width: 28ch;
}

.purchase-editor-table .purchase-input-note {
  width: 12ch;
}

.purchase-editor-table [data-role="use-system-name"] {
  display: block;
  width: 6em;
  min-width: 6em;
  max-width: 6em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-editor-table .purchase-input-error {
  border-color: #b00020;
  box-shadow: inset 0 0 0 1px #b00020;
}

.purchase-editor-table .purchase-input-multibarcode {
  background: #fff7cc;
  border-color: #f2c94c;
}

.purchase-editor-table .purchase-input-locked {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.purchase-system-price-head,
.purchase-system-price-cell {
  background: #ffffff;
}

.purchase-system-price-cell .purchase-readonly,
.purchase-system-price-value {
  min-width: 8ch;
  border: 1px solid #d5dde8;
  background: #ffffff;
  text-align: right;
}

.purchase-system-price-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  height: 28px;
  min-height: 28px;
  padding: 3px 5px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.purchase-system-price-button.is-higher,
.purchase-system-preview-value.is-higher {
  color: #b00020;
}

.purchase-system-price-button.is-lower,
.purchase-system-preview-value.is-lower {
  color: #15803d;
}

.purchase-system-price-button:hover {
  border-color: #64b874;
  background: #edfbee;
}

.purchase-inline-trend {
  position: relative;
  display: inline-block;
}

.purchase-inline-trend input {
  padding-right: 23px;
}

.purchase-inline-trend .purchase-readonly {
  padding-right: 23px;
}

.purchase-trend-button {
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  width: 18px;
  min-width: 18px;
  height: 28px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: #ffffff;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
}

.purchase-trend-button.is-down {
  color: #2563eb;
}

.purchase-trend-button.is-up {
  color: #ef4444;
}

.purchase-check-head,
.purchase-check-cell {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
}

.purchase-check-cell {
  color: #b00020;
  font-weight: 800;
}

.purchase-line-number-cell {
  position: relative;
  width: 48px;
  min-width: 48px;
  text-align: center;
}

.purchase-line-number-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.purchase-line-number-label {
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0 4px;
  border: 1px solid #d6dce5;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
}

.purchase-row-delete-button {
  min-height: 28px;
  padding: 4px 6px;
  white-space: nowrap;
}

.purchase-readonly {
  display: inline-block;
  min-width: 62px;
  max-width: 180px;
  min-height: 28px;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-readonly-error {
  border-color: #b00020;
  box-shadow: inset 0 0 0 1px #b00020;
  background: #fff7f7;
}

.purchase-readonly[data-role="use-system-name"] {
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 700;
}

.purchase-calculated-head,
.purchase-calculated-cell {
  background: #f7f9fc;
}

.purchase-price-head,
.purchase-price-cell {
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #e2e8f0;
}

.purchase-price-head {
  background: #eef4ff;
}

.purchase-current-price-head,
.purchase-current-price-cell {
  background: #fff4a8;
}

.purchase-current-price-head {
  font-weight: 900;
}

.purchase-current-price-cell .purchase-input,
.purchase-current-price-cell .purchase-input-name,
.purchase-current-price-cell .purchase-input-note,
.purchase-current-price-cell .purchase-readonly {
  background: #fff9cf;
  font-weight: 800;
}

.purchase-price-history-popover {
  position: fixed;
  z-index: 50;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #b9c5d6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
}

.purchase-price-history-popover strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 14px;
}

.purchase-price-history-popover span {
  display: block;
  color: #475569;
  font-size: 13px;
}

.purchase-price-history-popover table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.purchase-price-history-popover th,
.purchase-price-history-popover td {
  padding: 6px 8px;
  border: 1px solid #d8dee8;
  text-align: left;
  white-space: nowrap;
}

.purchase-price-history-popover th {
  background: #f1f5f9;
  color: #334155;
}

.purchase-preview-action {
  min-height: 28px;
  padding: 4px 8px;
  white-space: nowrap;
}

.cargo-sheet-editor-page #purchase-full-preview {
  position: sticky;
  top: 48px;
  z-index: 5;
  background: #eef5ff;
  box-shadow: 0 2px 8px rgba(125, 135, 151, 0.12);
}

.purchase-note-divider {
  border-right: 3px solid #7d8797;
}

.purchase-warning-text {
  color: #b42318;
  font-weight: 800;
}

.purchase-editor-table tr.has-warning {
  background: #fff7ed;
}

.purchase-editor-table tr.is-selected-purchase-row {
  background: #dbeafe;
  box-shadow: inset 4px 0 0 #2563eb;
}

.purchase-editor-table tr.is-selected-purchase-row td {
  background: #dbeafe;
}

.purchase-editor-table tr.is-selected-purchase-row input,
.purchase-editor-table tr.is-selected-purchase-row .purchase-readonly {
  background: #eff6ff;
}

.purchase-editor-table tr.is-extra-cargo td {
  background: #f0fdf4;
}

.purchase-summary-row {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin: 8px 0;
  padding: 4px 0;
  background: #fff;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.purchase-movement-summary {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.purchase-summary-search {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex: 0 1 220px;
  min-width: 190px;
  margin: 0 10px 0 6px;
}

.purchase-search-field {
  display: grid;
  gap: 3px;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.purchase-search-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.purchase-search-field input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 9px;
  border: 1px solid #f472b6;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  box-shadow: 0 0 0 1px rgba(244, 114, 182, 0.08);
}

.purchase-search-field input:focus {
  outline: none;
  border-color: #ec4899;
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.16);
}

.purchase-search-submit {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.purchase-summary-actions {
  position: relative;
  z-index: 7;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
}

.purchase-summary-actions-fold {
  display: contents;
}

.purchase-summary-actions-toggle {
  display: none;
}

.purchase-summary-actions .secondary-button {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 13px;
  white-space: nowrap;
}

.purchase-submit-all-button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.purchase-sync-status-button[data-state="pending"] {
  border-color: #c0841a;
  color: #92400e;
  background: #fff7ed;
}

.purchase-sync-status-button[data-state="saving"] {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.purchase-sync-status-button[data-state="failed"] {
  border-color: #dc2626;
  color: #b91c1c;
  background: #fef2f2;
}

.purchase-sync-status-button[data-state="synced"] {
  border-color: #16a34a;
  color: #166534;
  background: #f0fdf4;
}

.purchase-movement-summary div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  flex: 0 0 8ch;
  width: 8ch;
  max-width: 8ch;
}

.purchase-movement-summary .purchase-summary-extra-box {
  flex-basis: 10ch;
  width: 10ch;
  max-width: 10ch;
}

.purchase-movement-summary .purchase-summary-total-cubic,
.purchase-movement-summary .purchase-summary-issues {
  flex-basis: 8ch;
  width: 8ch;
  max-width: 8ch;
}

.purchase-movement-summary .purchase-summary-expected-payment,
.purchase-movement-summary .purchase-summary-actual-payment {
  flex-basis: 10ch;
  width: 10ch;
  max-width: 10ch;
}

.purchase-movement-summary span {
  overflow: hidden;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-movement-summary strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.05;
}

.purchase-movement-summary strong.danger-text {
  color: #b00020;
}

.purchase-editor-table tr.is-located-purchase-row,
.purchase-editor-table tr.is-located-purchase-row td {
  animation: purchase-row-locate-flash 1.7s ease;
}

@keyframes purchase-row-locate-flash {
  0% {
    background: #fde68a;
  }
  100% {
    background: inherit;
  }
}

.purchase-search-results-card {
  width: min(720px, 92vw);
}

.purchase-search-results-list {
  display: grid;
  gap: 10px;
  max-height: min(70vh, 560px);
  overflow: auto;
}

.purchase-search-result-item {
  display: grid;
  gap: 6px;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fbff;
  text-align: left;
  cursor: pointer;
}

.purchase-search-result-item span {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-all;
}

@media (min-width: 721px) and (max-width: 1400px), (max-width: 900px) and (orientation: landscape) {
  .cargo-sheet-editor-page .page-shell {
    width: 100%;
    padding: 0.3ch 0 20px;
  }

  .cargo-sheet-editor-page .admin-top-bar {
    gap: 0.3ch;
    padding: 6px 8px;
  }

  .cargo-sheet-editor-page .cargo-flow-editor-view {
    gap: 6px;
  }

  .cargo-flow-editor-view .purchase-editor-panel {
    padding: 6px;
  }

  .cargo-sheet-editor-page .purchase-summary-row {
    flex-wrap: nowrap;
    gap: 4px;
    margin: 4px 0;
  }

  .cargo-sheet-editor-page .purchase-movement-summary {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .cargo-sheet-editor-page .purchase-movement-summary div {
    padding: 4px 5px;
  }

  .cargo-sheet-editor-page .purchase-movement-summary span {
    font-size: 11px;
  }

  .cargo-sheet-editor-page .purchase-movement-summary strong {
    font-size: 14px;
  }

  .cargo-sheet-editor-page .purchase-summary-search {
    flex: 0 1 280px;
    min-width: 220px;
  }

  .cargo-sheet-editor-page .purchase-summary-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 4px;
    margin-left: 0;
  }

  .cargo-sheet-editor-page .purchase-summary-actions .secondary-button {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 13px;
    white-space: nowrap;
  }
}

@media (min-width: 600px) and (max-width: 1800px) and (hover: none),
  (min-width: 600px) and (max-width: 1800px) and (pointer: coarse),
  (min-width: 600px) and (max-width: 1800px) and (any-pointer: coarse) {
  .cargo-sheet-editor-page .admin-top-bar {
    justify-content: flex-start;
    gap: 6px;
  }

  .cargo-sheet-editor-page .admin-top-bar .report-entry {
    flex: 0 0 auto;
  }

  .cargo-sheet-editor-page .purchase-tablet-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
  }

  .cargo-sheet-editor-page .purchase-tablet-header-actions .secondary-button {
    min-height: 30px;
    height: 30px;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .cargo-sheet-editor-page .purchase-summary-row {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    overflow: visible;
  }

  .cargo-sheet-editor-page .purchase-movement-summary {
    order: 1;
    display: flex;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    gap: 5px;
  }

  .cargo-sheet-editor-page .purchase-movement-summary .purchase-summary-main-box,
  .cargo-sheet-editor-page .purchase-movement-summary .purchase-summary-extra-box {
    display: none;
  }

  .cargo-sheet-editor-page .purchase-summary-search {
    order: 2;
    display: grid;
    grid-template-columns: minmax(190px, 260px) auto;
    align-items: end;
    flex: 0 0 330px;
    min-width: 0;
    margin: 0;
    gap: 6px;
  }

  .cargo-sheet-editor-page .purchase-summary-actions {
    order: 2;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 5px;
    margin-left: 0;
    min-width: 0;
    overflow: visible;
  }

  .cargo-sheet-editor-page .purchase-summary-actions .secondary-button,
  .cargo-sheet-editor-page .purchase-submit-all-button,
  .cargo-sheet-editor-page .purchase-action-menu summary {
    min-height: 32px;
    height: 32px;
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .cargo-sheet-editor-page .purchase-submit-all-button {
    min-width: 94px;
    font-size: 0;
  }

  .cargo-sheet-editor-page .purchase-submit-all-button::after {
    content: "全部完毕";
    font-size: 12px;
  }
}

@media (min-width: 600px) and (max-width: 1400px) and (hover: none),
  (min-width: 600px) and (max-width: 1400px) and (pointer: coarse),
  (min-width: 600px) and (max-width: 1400px) and (any-pointer: coarse) {
  .admin-home-page #user-message-form,
  .admin-home-page .order-search-field {
    display: none;
  }

  .admin-home-page .entry-panel-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .admin-home-page .entry-command-row {
    grid-template-columns: minmax(520px, 760px);
    justify-content: start;
    align-items: end;
    gap: 10px;
    width: 100%;
  }

  .admin-home-page .entry-secondary-row {
    grid-template-columns: minmax(260px, 360px);
    justify-content: start;
    align-items: end;
    width: 100%;
  }

  .admin-home-page .desktop-entry-toggle {
    min-width: 96px;
  }

  .admin-home-page .admin-inventory-lookup-form {
    width: min(760px, calc(100vw - 180px));
    grid-template-columns: minmax(420px, 1fr) 72px 58px;
    gap: 8px;
  }

  .admin-home-page .admin-inventory-lookup-form input {
    min-width: 0;
  }
}

@media (min-width: 1501px) {
  .admin-home-page .picking-summary {
    padding-right: 6px;
  }
}

@media (min-width: 1501px) and (max-width: 1800px) {
  .admin-home-page .picking-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.cargo-sheet-editor-page,
.cargo-sheet-editor-page .page-shell,
.cargo-sheet-editor-page .purchase-editor-shell,
.cargo-sheet-editor-page .cargo-flow-editor-view,
.cargo-sheet-editor-page .purchase-editor-panel {
  max-width: 100%;
  min-width: 0;
}

.cargo-sheet-editor-page {
  overflow-x: hidden;
}

.purchase-warehouse-body {
  max-height: min(58vh, 520px);
}

.purchase-warehouse-table th,
.purchase-warehouse-table td {
  border: 1px solid #d8dee8;
  white-space: nowrap;
}

.purchase-extra-form {
  margin-top: 10px;
}

.purchase-supplier-wrap {
  position: relative;
  display: inline-block;
}

.purchase-supplier-same {
  position: absolute;
  z-index: 5;
  left: 0;
  top: calc(100% + 2px);
  min-width: 130px;
  max-width: 240px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #8b95a5;
  border-radius: 4px;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.purchase-database-preview {
  max-height: 62vh;
}

.purchase-database-table {
  min-width: 980px;
}

.purchase-multi-barcode-link {
  border: 0;
  background: transparent;
  color: #15803d;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
}

.purchase-multi-barcode-card {
  max-width: 420px;
}

.purchase-multi-barcode-body {
  display: grid;
  gap: 8px;
  color: #111827;
}

.purchase-multi-barcode-body span {
  padding: 6px 8px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #f8fafc;
  font-weight: 800;
}

.purchase-image-preview-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
}

.purchase-image-preview-card {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 14px;
}

.purchase-sync-dialog-card {
  width: min(860px, calc(100vw - 32px));
}

.purchase-sync-overview {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.purchase-sync-progress-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.purchase-sync-progress-track {
  position: relative;
  flex: 1 1 auto;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf7;
}

.purchase-sync-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #16a34a 100%);
  transition: width 180ms ease;
}

.purchase-sync-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.purchase-sync-stats span {
  padding: 6px 10px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.purchase-sync-summary {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.purchase-sync-list {
  display: grid;
  gap: 8px;
  max-height: min(50vh, 420px);
  overflow: auto;
}

.purchase-sync-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  background: #fff;
}

.purchase-sync-item-row {
  color: #0f172a;
  font-weight: 800;
}

.purchase-sync-item-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.purchase-sync-item-main strong,
.purchase-sync-item-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-sync-item-main span {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.purchase-sync-item-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-sync-item-status[data-status="pending"] {
  color: #92400e;
  background: #fff7ed;
}

.purchase-sync-item-status[data-status="saving"] {
  color: #1d4ed8;
  background: #eff6ff;
}

.purchase-sync-item-status[data-status="failed"] {
  color: #b91c1c;
  background: #fef2f2;
}

.purchase-sync-item-status[data-status="deleted"] {
  color: #374151;
  background: #f3f4f6;
}

.purchase-sync-item-status[data-status="synced"] {
  color: #166534;
  background: #f0fdf4;
}

.purchase-sync-empty {
  padding: 18px 14px;
  border: 1px dashed #d8dee8;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.purchase-image-preview-img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 96px);
  object-fit: contain;
  border-radius: 8px;
}

.purchase-image-preview-close {
  position: absolute;
  right: 10px;
  top: 10px;
}

.purchase-import-map-card {
  max-width: 760px;
}

.purchase-import-map-note {
  margin: 0 0 10px;
  color: #475569;
  font-size: 13px;
}

.purchase-import-map-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  max-height: 58vh;
  overflow: auto;
}

.purchase-import-map-row {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
}

.purchase-import-map-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.purchase-import-map-label input {
  width: 14px;
  height: 14px;
}

.purchase-import-map-row select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
}

.purchase-column-card {
  max-width: 520px;
}

.purchase-column-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 58vh;
  overflow: auto;
}

.purchase-column-tools {
  display: flex;
  justify-content: flex-start;
  margin: 8px 0 10px;
}

.purchase-column-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.purchase-column-option input {
  width: 14px;
  height: 14px;
}

.purchase-preview-error,
.purchase-preview-compare {
  display: block;
  margin-left: 12px;
  font-style: normal;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-preview-error {
  color: #b00020;
}

.purchase-preview-compare {
  color: #1d4ed8;
}

.purchase-system-price-grid {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  max-width: min(620px, 48vw);
  overflow: hidden;
}

.purchase-system-price-grid + .purchase-preview-compare {
  display: none;
}

.purchase-system-apply-card,
.purchase-cancel-actions-card,
.purchase-confirm-card {
  width: min(460px, calc(100vw - 28px));
}

.purchase-system-apply-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.purchase-system-apply-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #f8fbff;
  font-weight: 800;
  color: #334155;
}

.purchase-system-apply-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.purchase-cancel-actions-list {
  display: grid;
  gap: 10px;
}

.purchase-cancel-actions-list button {
  justify-content: flex-start;
}

.purchase-system-price-item {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 1px;
  min-width: 64px;
  padding: 2px 4px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #334155;
  font-size: 10px;
  line-height: 1.05;
  white-space: nowrap;
}

.purchase-system-price-item b {
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 900;
}

@media (max-width: 720px) {
  .purchase-system-apply-options {
    grid-template-columns: 1fr;
  }
}

.purchase-system-price-item i {
  font-style: normal;
  font-weight: 800;
}

.purchase-editor-test-page #purchase-full-preview strong {
  display: block;
  flex: 0 0 30ch;
  width: 30ch;
  max-width: 30ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-editor-test-page #purchase-full-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.purchase-editor-test-page #purchase-full-preview span {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .cargo-sheet-page .admin-top-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto auto;
    align-items: center;
    gap: 6px;
    padding: 8px;
  }

  .cargo-sheet-page .admin-top-bar .top-title-center {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    padding: 0;
    justify-items: center;
    text-align: center;
  }

  .cargo-sheet-page .admin-top-bar .page-tab-strip {
    display: none;
  }

  .cargo-sheet-page .cargo-nav-left-actions {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-width: 0;
  }

  .cargo-sheet-page .cargo-header-actions {
    grid-column: 3;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    min-width: 0;
  }

  .cargo-sheet-page .cargo-header-actions::before {
    content: "";
  }

  .cargo-sheet-page .cargo-header-action,
  .cargo-sheet-page .cargo-nav-left-actions .report-entry,
  .cargo-sheet-page .cargo-menu-button {
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .cargo-sheet-page .cargo-nav-left-actions .report-entry {
    margin-right: 0;
  }

  .cargo-sheet-page .cargo-nav-left-actions .cargo-header-action {
    display: none;
  }

  .cargo-sheet-page .cargo-header-actions a[href="./cargo-query.html"] {
    display: none;
  }

  .cargo-sheet-page #cargo-new-sheet {
    display: none;
  }

  .cargo-sheet-page .cargo-header-actions a[href="./cargo-query.html"] {
    padding: 0 8px;
    font-size: 11px;
  }

  .cargo-sheet-page .cargo-menu-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }

  .cargo-sheet-page .admin-top-bar .cargo-mobile-links {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .cargo-sheet-page .admin-top-bar .cargo-mobile-links .cargo-header-action {
    width: 100%;
    padding: 0 4px;
    text-align: center;
    font-size: 11px;
  }

  .purchase-editor-test-page .admin-top-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 6px;
    padding: 8px;
  }

  .purchase-editor-test-page .admin-top-bar .report-entry {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    min-height: 34px;
    padding: 6px 9px;
    font-size: 13px;
  }

  .purchase-editor-test-page .admin-top-bar .top-title-center {
    grid-column: 2;
    grid-row: 1;
    position: static;
    width: auto;
    min-width: 0;
    transform: none;
  }

  .purchase-editor-test-page .admin-top-bar .cargo-header-actions {
    grid-column: 3;
    grid-row: 1;
    position: static;
    display: flex;
    width: auto;
    min-width: 0;
    transform: none;
    gap: 4px;
    justify-content: flex-end;
  }

  .purchase-editor-test-page .admin-top-bar .top-title-center h1 {
    font-size: 19px;
    line-height: 1.1;
  }

  .purchase-editor-test-page .admin-top-bar .top-title-center p {
    font-size: 11px;
    line-height: 1.2;
  }

  .purchase-editor-test-page .admin-top-bar .cargo-header-actions .secondary-button {
    min-height: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .purchase-editor-test-page .purchase-summary-row {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 7px;
    margin: 6px 0;
    padding: 8px;
    border-radius: 12px;
    overflow: visible;
  }

  .purchase-editor-test-page .purchase-movement-summary {
    order: 1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    flex: 1 0 100%;
    gap: 4px;
  }

  .purchase-editor-test-page .purchase-movement-summary .purchase-summary-main-box,
  .purchase-editor-test-page .purchase-movement-summary .purchase-summary-extra-box {
    display: none;
  }

  .purchase-editor-test-page .purchase-movement-summary div {
    grid-column: auto;
    min-width: 0;
    width: auto;
    max-width: none;
    padding: 4px 2px;
    border-radius: 7px;
    overflow: visible;
  }

  .purchase-editor-test-page .purchase-movement-summary .purchase-summary-expected-payment,
  .purchase-editor-test-page .purchase-movement-summary .purchase-summary-actual-payment {
    grid-column: auto;
  }

  .purchase-editor-test-page .purchase-movement-summary span {
    font-size: 7px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .purchase-editor-test-page .purchase-movement-summary strong {
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .purchase-editor-test-page .purchase-movement-summary .purchase-summary-issues span {
    font-size: 0;
  }

  .purchase-editor-test-page .purchase-movement-summary .purchase-summary-issues span::after {
    content: "校验";
    font-size: 7px;
  }

  .purchase-editor-test-page .purchase-summary-search {
    order: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    width: 100%;
    flex: 1 0 100%;
    min-width: 0;
    margin: 0;
    gap: 6px;
  }

  .purchase-editor-test-page .purchase-search-field input {
    height: 34px;
    font-size: 13px;
  }

  .purchase-editor-test-page .purchase-search-submit {
    min-height: 34px;
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
  }

  .purchase-editor-test-page .purchase-summary-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    flex: 1 0 100%;
    gap: 6px;
    margin-left: 0;
    min-width: 0;
  }

  .purchase-editor-test-page .purchase-summary-actions-fold {
    order: 3;
    display: block;
    width: 100%;
  }

  .purchase-editor-test-page .purchase-summary-actions-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    background: #f8fafc;
    color: #1f2937;
    font-size: 12px;
    font-weight: 800;
    list-style: none;
  }

  .purchase-editor-test-page .purchase-summary-actions-toggle::-webkit-details-marker {
    display: none;
  }

  .purchase-editor-test-page .purchase-summary-actions-toggle strong::after {
    content: "展开";
    color: #2563eb;
  }

  .purchase-editor-test-page .purchase-summary-actions-fold[open] .purchase-summary-actions-toggle strong::after {
    content: "收起";
  }

  .purchase-editor-test-page .purchase-summary-actions-fold:not([open]) .purchase-summary-actions {
    display: none;
  }

  .purchase-editor-test-page .purchase-summary-actions-fold[open] .purchase-summary-actions {
    margin-top: 6px;
  }

  .purchase-editor-test-page .purchase-summary-actions .secondary-button,
  .purchase-editor-test-page .purchase-submit-all-button,
  .purchase-editor-test-page .purchase-action-menu summary {
    min-height: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .purchase-editor-test-page .purchase-submit-all-button {
    min-width: 0;
    font-size: 0;
  }

  .purchase-editor-test-page .purchase-submit-all-button::after {
    content: "全部修改";
    font-size: 12px;
  }

  .purchase-editor-test-page .purchase-summary-actions .secondary-button {
    width: 100%;
    min-width: 0;
  }

  .purchase-editor-test-page .purchase-action-menu {
    min-width: 0;
  }

  .purchase-editor-test-page .purchase-action-menu summary {
    display: inline-grid;
    align-items: center;
    width: 100%;
  }

  .purchase-editor-test-page #purchase-full-preview {
    position: static;
    top: auto;
    z-index: auto;
  }

  .purchase-editor-test-page .purchase-sticky-header {
    position: sticky;
    top: var(--purchase-header-sticky-top, 0px);
    z-index: 20;
    display: block;
    width: 100%;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid #dbe3ea;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  }

  .purchase-editor-test-page .purchase-sticky-header[hidden] {
    display: none;
  }

  .cargo-flow-grid,
  .cargo-flow-meta-grid {
    grid-template-columns: 1fr;
  }

  .cargo-flow-list {
    max-height: 180px;
  }

  .purchase-editor-top-link {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .purchase-table-wrap {
    max-height: none;
  }

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

  .cargo-code-generator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cargo-code-generator-grid-barcode {
    grid-template-columns: 1fr;
  }

  .cargo-code-generator-item {
    min-width: 0;
  }

  .cargo-code-generator-button,
  .cargo-code-generator-history-button {
    min-width: 0;
  }

  .cargo-code-generator-history-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .cargo-code-generator-adjust-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body {
    font-size: 12.8px;
  }

  .admin-home-page {
    font-size: 12.8px;
  }

  .admin-home-page .exchange-rate-strip {
    display: none;
  }

  .admin-home-page .admin-home-top-bar .header-report-menu summary,
  .admin-home-page .admin-home-top-bar .review-entry-button,
  .admin-home-page .admin-home-top-bar .inventory-review-entry-button,
  .admin-home-page .admin-home-top-bar .account-chip,
  .admin-home-page .admin-home-top-bar .mobile-entry-toggle,
  .admin-home-page .admin-home-top-bar .cargo-entry-button,
  .admin-home-page .admin-home-top-bar .mobile-message-history-button {
    font-size: 9.6px;
  }

  .admin-home-page .admin-home-top-bar .inventory-review-entry-button span,
  .admin-home-page .admin-home-top-bar .inventory-review-entry-button strong,
  .admin-home-page .admin-home-top-bar .account-chip span,
  .admin-home-page .admin-home-top-bar .account-chip strong,
  .admin-home-page .admin-home-top-bar .review-entry-button span,
  .admin-home-page .admin-home-top-bar .review-entry-button strong,
  .admin-home-page .admin-home-top-bar .header-report-menu summary {
    font-size: 9.6px;
  }

  .admin-home-page .admin-inventory-lookup-form span,
  .admin-home-page .admin-form-wide label span,
  .admin-home-page .customer-receivable-search-form > label > span,
  .admin-home-page .customer-receivable-detail-form span,
  .admin-home-page .user-message-form span,
  .admin-home-page .order-search-field span {
    font-size: 9.6px;
  }

  .admin-home-page .admin-inventory-lookup-form input,
  .admin-home-page .admin-inventory-lookup-form button,
  .admin-home-page .admin-form-wide input,
  .admin-home-page .admin-form-wide select,
  .admin-home-page .admin-form-wide button,
  .admin-home-page .customer-receivable-search-form input,
  .admin-home-page .customer-receivable-search-form button,
  .admin-home-page .customer-receivable-detail-form input,
  .admin-home-page .customer-receivable-detail-form button,
  .admin-home-page .user-message-form input,
  .admin-home-page .user-message-form button,
  .admin-home-page .order-search-field input,
  .admin-home-page .order-search-field small {
    font-size: 10.4px;
  }

  .admin-home-page .pending-title-row,
  .admin-home-page .compact-strip-head h2 {
    font-size: 18.4px;
  }

  .admin-home-page .lane-count-badge {
    font-size: 17.6px;
  }

  .admin-home-page .pending-amount-total,
  .admin-home-page .status-chip,
  .admin-home-page .pending-pickup-filter-button,
  .admin-home-page .ready-pickup-filter-button {
    font-size: 10.4px;
  }

  .admin-home-page .admin-inventory-result-row .result-name {
    font-size: 11.2px;
  }

  .admin-home-page .admin-inventory-result-row .result-barcode,
  .admin-home-page .admin-inventory-result-row .result-sku {
    font-size: 9.6px;
  }

  .admin-home-page .admin-inventory-result-row .result-stock {
    font-size: 14.4px;
  }

  .admin-home-page .admin-inventory-result-row .result-pending-ordered,
  .admin-home-page .admin-inventory-result-row .result-spec,
  .admin-home-page .admin-inventory-result-row .result-vip3 {
    font-size: 10.4px;
  }

  .admin-home-page .admin-inventory-result-row .result-pending-ordered::before,
  .admin-home-page .admin-inventory-result-row .result-stock::before,
  .admin-home-page .admin-inventory-result-row .result-spec::before,
  .admin-home-page .admin-inventory-result-row .result-vip3::before {
    font-size: 8px;
  }

  .admin-home-page .picking-pill-main {
    font-size: 9.6px;
  }

  .admin-home-page .picking-pill-main strong {
    font-size: 11.2px;
  }

  .admin-home-page .picking-pill-order-number,
  .admin-home-page .delivery-count-row,
  .admin-home-page .quick-count-text,
  .admin-home-page .picking-pill-main span,
  .admin-home-page .picking-pill-state,
  .admin-home-page .quick-pickup-time,
  .admin-home-page .order-subtitle,
  .admin-home-page .admin-card .order-subtitle {
    font-size: 8.8px;
  }

  .admin-home-page .picking-pill-watermark {
    font-size: 14.4px;
  }

  .admin-home-page .quick-action-button,
  .admin-home-page .picking-pill-actions select {
    font-size: 8px;
  }
}

@media (max-width: 900px) {
  .admin-inventory-result-row,
  .admin-home-page .admin-inventory-result-row {
    grid-template-columns: 64px repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "thumb name name name sku"
      "thumb barcode barcode barcode yiwu"
      "retail pending stock spec vip3";
    min-height: 112px;
    column-gap: 7px;
  }

  .admin-inventory-result-row.without-pending-orders-column,
  .admin-home-page .admin-inventory-result-row.without-pending-orders-column {
    grid-template-columns: 64px repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "thumb name name name sku"
      "thumb barcode barcode barcode yiwu"
      "retail stock stock spec vip3";
  }

  .admin-inventory-result-row:has(.inventory-result-thumb.is-empty),
  .admin-home-page .admin-inventory-result-row:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-areas:
      "name name name name sku"
      "barcode barcode barcode barcode yiwu"
      "retail pending stock spec vip3";
  }

  .admin-inventory-result-row.without-pending-orders-column:has(.inventory-result-thumb.is-empty),
  .admin-home-page .admin-inventory-result-row.without-pending-orders-column:has(.inventory-result-thumb.is-empty) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-areas:
      "name name name name sku"
      "barcode barcode barcode barcode yiwu"
      "retail stock stock spec vip3";
  }

  .admin-inventory-result-row .result-yiwu-price,
  .admin-home-page .admin-inventory-result-row .result-yiwu-price {
    display: flex;
    grid-area: yiwu;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    align-self: start;
    justify-content: flex-end;
    min-width: 0;
    padding: 2px 4px;
    color: #b45309;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
    text-align: right;
    white-space: nowrap;
  }

  .admin-inventory-result-row .result-retail-stock {
    display: flex;
    grid-area: retail;
    color: #1d4ed8;
    text-align: center;
  }

  .admin-inventory-result-row .result-retail-stock,
  .admin-home-page .admin-inventory-result-row .result-retail-stock {
    align-self: stretch;
    min-height: 40px;
    flex-direction: column;
    justify-content: center;
    padding: 4px 4px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .admin-inventory-result-row .result-retail-stock::before,
  .admin-home-page .admin-inventory-result-row .result-retail-stock::before {
    content: "\96F6\552E";
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
  }

  .admin-home-page .admin-inventory-result-row .result-retail-stock,
  .admin-home-page .admin-inventory-result-row .result-pending-ordered,
  .admin-home-page .admin-inventory-result-row .result-spec,
  .admin-home-page .admin-inventory-result-row .result-vip3 {
    font-size: 10.4px;
  }

  .admin-home-page .admin-inventory-result-row .result-retail-stock::before,
  .admin-home-page .admin-inventory-result-row .result-pending-ordered::before,
  .admin-home-page .admin-inventory-result-row .result-stock::before,
  .admin-home-page .admin-inventory-result-row .result-spec::before,
  .admin-home-page .admin-inventory-result-row .result-vip3::before {
    font-size: 8px;
  }
}

@media (min-width: 901px) {
  .admin-home-page .admin-home-top-bar {
    --admin-top-action-height: 34px;
  }

  .admin-home-page .admin-home-top-bar .header-report-menu summary,
  .admin-home-page .admin-home-top-bar .purchase-assistant-entry-button,
  .admin-home-page .admin-home-top-bar .review-entry-button,
  .admin-home-page .admin-home-top-bar .mobile-entry-toggle,
  .admin-home-page .admin-home-top-bar .cargo-reservation-command-form button,
  .admin-home-page .admin-home-top-bar .top-picked-entry > button,
  .admin-home-page .admin-home-top-bar .top-picked-entry > a {
    height: var(--admin-top-action-height);
    min-height: var(--admin-top-action-height);
  }
}

@media (max-width: 900px) {
  #settings-user-dialog {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .settings-user-dialog-card {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 24px);
    overflow: hidden;
    border-radius: 14px;
  }

  .settings-user-dialog-card .admin-dialog-head {
    padding: 10px 12px 8px;
  }

  .settings-user-dialog-card .admin-dialog-head h3 {
    min-width: 0;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-user-dialog-card .dialog-hint {
    padding: 0 12px 8px;
    font-size: 11px;
    line-height: 1.35;
  }

  #settings-user-dialog-form,
  .settings-permission-manager,
  .settings-permission-layout,
  .settings-permission-page-panel {
    min-width: 0;
    overflow-x: hidden;
  }

  .settings-dialog-account-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 8px 12px;
  }

  .settings-account-details {
    border-bottom: 1px solid var(--line);
    background: #fafafa;
  }

  .settings-account-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 9px 12px;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
  }

  .settings-account-summary strong {
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 12px;
  }

  .settings-account-summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-account-details .settings-dialog-account-grid {
    padding-top: 4px;
    border-bottom: 0;
  }

  .settings-dialog-account-grid label {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
  }

  .settings-dialog-account-grid input,
  .settings-dialog-account-grid select {
    height: 31px;
  }

  .settings-permission-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    padding: 8px 12px;
  }

  .settings-permission-search-field,
  .settings-user-dialog-card .settings-permission-toolbar .settings-permission-page-select-wrap {
    display: grid;
    min-width: 0;
  }

  .settings-permission-toolbar > .settings-permission-change-count {
    display: none;
  }

  .settings-permission-layout {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    margin: 8px 12px 0;
    overflow: hidden;
  }

  .settings-permission-page-nav {
    display: none;
  }

  .settings-permission-page-panel {
    height: 100%;
    padding: 11px;
    overflow-y: auto;
  }

  .settings-permission-panel-head {
    display: grid;
    gap: 8px;
    margin-bottom: 9px;
  }

  .settings-permission-panel-head h4 {
    font-size: 15px;
  }

  .settings-permission-page-actions {
    justify-content: flex-end;
  }

  .settings-permission-page-actions button {
    height: 31px;
    padding: 0 9px;
    font-size: 11px;
  }

  .settings-permission-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .settings-user-dialog-card .settings-permission-option {
    min-height: 34px;
    padding: 7px 8px;
  }

  .settings-dialog-footer {
    bottom: 0;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: hidden;
  }

  .settings-dialog-footer-actions {
    min-width: 0;
  }

  .settings-dialog-footer button {
    min-width: 0;
    height: 32px;
    padding: 0 10px;
  }
}

/* admin home settings-style refresh */
@media (min-width: 901px) {
  body.admin-home-page {
    background: #f5f6f8;
  }

  .admin-home-page.session-loading::before {
    background: #f5f6f8;
  }

  .admin-home-page .top-title-bar,
  .admin-home-page .panel {
    background: #fff;
    backdrop-filter: none;
    border: 1px solid #e2e6ea;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(31, 42, 31, 0.06);
  }

  .admin-home-page .entry-panel,
  .admin-home-page .summary-panel {
    background: #fff;
    border: 1px solid #e2e6ea;
    box-shadow: 0 2px 8px rgba(31, 42, 31, 0.045);
  }

  .admin-home-page .admin-home-top-bar .cargo-entry-button.secondary-button,
  .admin-home-page .admin-home-top-bar .refresh-orders-button.secondary-button,
  .admin-home-page .admin-home-top-bar .delivery-notice-button.secondary-button,
  .admin-home-page .admin-home-top-bar .header-report-menu summary,
  .admin-home-page .admin-home-top-bar .inventory-review-entry-button,
  .admin-home-page .admin-home-top-bar .review-entry-button {
    border-color: #dde2e7;
    background: #fff;
    box-shadow: none;
  }

  .admin-home-page .admin-inventory-lookup-form input,
  .admin-home-page .customer-receivable-search-form input,
  .admin-home-page .entry-panel input,
  .admin-home-page .entry-panel select {
    border-color: #dfe3e8;
    background: #fff;
    box-shadow: none;
  }

  .admin-home-page .picking-pill {
    background: #fff;
    border-color: #e2e6ea;
    border-radius: 8px;
    box-shadow: none;
  }

  .admin-home-page .picking-pill.is-new-order {
    background: #fffdf1;
    border-color: rgba(217, 108, 31, 0.28);
    box-shadow: none;
  }

  .admin-home-page .picking-pill.is-addon-order {
    background: #fff5f8;
    border-color: rgba(219, 39, 119, 0.3);
    box-shadow: none;
  }

  .admin-home-page #ready-summary .picking-pill.is-ready-reviewed-recently {
    box-shadow: inset 0 -3px 0 rgba(22, 163, 74, 0.16);
  }

  .admin-home-page .pending-pickup-filter-button,
  .admin-home-page .ready-pickup-filter-button,
  .admin-home-page .secondary-button {
    box-shadow: none;
  }
}

/* internal settings surfaces start */
@media (min-width: 901px) {
  body[data-ui-theme="settings-surfaces"] {
    background: #f5f6f8;
  }

  body[data-ui-theme="settings-surfaces"]::before {
    background-color: #f5f6f8;
  }

  body[data-ui-theme="settings-surfaces"] :is(
    .top-title-bar,
    .panel,
    .cargo-panel,
    .review-page-panel,
    .pickup-report-panel,
    .branch-pos-tab-panel,
    .cargo-code-generator-section,
    .report-summary-strip,
    .branch-pos-summary,
    .estimate-summary-grid
  ) {
    background-color: #fff;
    border-color: #e2e6ea;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px #e2e6ea, 0 3px 12px rgba(31, 42, 31, 0.06);
    backdrop-filter: none;
  }

  body[data-ui-theme="settings-surfaces"] :is(
    .table-wrap,
    .cargo-table-wrap,
    .report-pagination,
    .empty-state,
    .compact-empty,
    table
  ) {
    background-color: #fff;
    border-color: #e2e6ea;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px #e2e6ea;
  }

  body[data-ui-theme="settings-surfaces"] :is(thead th, tfoot td) {
    background-color: #f8f9fa;
    border-color: #e2e6ea;
  }

  body[data-ui-theme="settings-surfaces"] :is(th, td) {
    border-color: #e7eaed;
  }

  body[data-ui-theme="settings-surfaces"] :is(
    .admin-dialog-card,
    .cargo-dialog-card,
    .cargo-delete-confirm-card,
    .cargo-payment-confirm-card,
    .cargo-column-filter-card,
    .purchase-import-map-card,
    .image-preview-card,
    .cargo-image-preview-card
  ) {
    background-color: #fff;
    border-color: #e2e6ea;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px #e2e6ea, 0 8px 24px rgba(31, 42, 31, 0.08);
  }

  body[data-ui-theme="settings-surfaces"] .secondary-button:not(.is-active):not([aria-pressed="true"]),
  body[data-ui-theme="settings-surfaces"] .top-title-bar .metric:not(.is-active),
  body[data-ui-theme="settings-surfaces"] .top-title-bar .report-entry:not(.is-active),
  body[data-ui-theme="settings-surfaces"] :where(input:not([type="checkbox"]):not([type="radio"]):not([disabled]):not([readonly])),
  body[data-ui-theme="settings-surfaces"] select:not([disabled]),
  body[data-ui-theme="settings-surfaces"] textarea:not([disabled]):not([readonly]) {
    background-color: #fff;
    border-color: #dfe3e8;
    box-shadow: none;
  }

  body[data-ui-theme="settings-surfaces"] .purchase-editor-table .purchase-input-error {
    border-color: #b00020;
    box-shadow: inset 0 0 0 1px #b00020;
  }

  body[data-ui-theme="settings-surfaces"] .purchase-editor-table .purchase-input-multibarcode {
    background: #fff7cc;
    border-color: #f2c94c;
  }

  body[data-ui-theme="settings-surfaces"] .purchase-editor-table tr.is-selected-purchase-row input {
    background: #eff6ff;
  }

  body[data-ui-theme="settings-surfaces"] .cargo-delete-confirm-card {
    border-color: #fecaca;
  }

  body[data-ui-theme="settings-surfaces"] .cargo-payment-confirm-card {
    border-color: #bfdbfe;
  }
}
/* internal settings surfaces end */

/* ui readability unification start */
.admin-home-page .admin-home-top-bar :is(
  .header-report-menu summary,
  .inventory-review-entry-button:not(.has-review-pending),
  .review-entry-button:not(.has-review-pending),
  .picked-drawer-toggle,
  .refresh-orders-button,
  .cargo-entry-button,
  .delivery-notice-button,
  .mobile-menu-action,
  .menu-account-chip,
  .secondary-button
) {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #111827;
  box-shadow: none;
}

.admin-home-page .compact-strip-head {
  justify-content: space-between;
}

.admin-home-page .lane-amount-total {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.admin-home-page .picked-drawer {
  background: #fff;
  border-color: #e2e6ea;
  color: #111827;
}

.admin-home-page .picked-drawer :is(
  .panel-head h2,
  .order-subtitle,
  .order-mini,
  .summary-toggle,
  .empty-state,
  .metric span,
  .packing-image-count,
  .admin-card-head h3,
  .admin-card strong
) {
  color: #111827;
}

.admin-home-page .picked-drawer .name-time {
  color: #111827;
  text-shadow: none;
}

.admin-home-page .picked-drawer .admin-card {
  background: #fff;
  border-color: #dfe3e8;
  box-shadow: inset 0 0 0 1px #dfe3e8;
}

.admin-home-page .picked-drawer .done-card {
  opacity: 1;
}

.admin-home-page .picked-drawer-total-amount,
.admin-home-page .picked-card-amount {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.admin-home-page .picked-drawer .secondary-button {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #111827;
}

@media (max-width: 900px) {
  body[data-ui-theme="settings-surfaces"] .page-tab-strip {
    display: none !important;
  }
}

@media (min-width: 901px) {
  body[data-ui-theme="settings-surfaces"] .top-title-bar {
    height: 74px;
    min-height: 74px;
    padding-top: 5px;
    padding-bottom: 5px;
    background: #fff;
  }

  body[data-ui-theme="settings-surfaces"] .top-title-center {
    background: #fff;
  }

  body[data-ui-theme="settings-surfaces"] .top-title-bar .internal-home-link {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #111827;
    box-shadow: none;
  }

  body[data-ui-theme="settings-surfaces"] .top-title-bar .internal-home-link :is(span, strong) {
    color: inherit;
  }

  body[data-ui-theme="settings-surfaces"] .purchase-assistant-top-bar .purchase-assistant-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  body[data-ui-theme="settings-surfaces"] .top-title-center .page-tab-strip {
    position: absolute;
    left: 50%;
    top: -42px;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    min-height: 22px;
    max-height: 22px;
    justify-content: safe center;
    gap: 3px;
    overflow-x: auto;
    transform: translateX(-50%);
  }

  body[data-ui-theme="settings-surfaces"] .page-tab-pill {
    max-height: 22px;
    gap: 3px;
  }

  body[data-ui-theme="settings-surfaces"] .page-tab-pill a {
    height: 22px;
    padding: 0 9px;
    border-radius: 7px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    line-height: 1;
  }

  body[data-ui-theme="settings-surfaces"] .page-tab-pill button {
    width: 22px;
    min-width: 22px;
    height: 22px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1;
  }

  body[data-ui-theme="settings-surfaces"] table thead th {
    background: #fff;
    border-color: #e2e6ea;
    color: #374151;
  }

  body[data-ui-theme="settings-surfaces"] table :is(th, td) {
    border-color: #e2e6ea;
    box-shadow: inset -1px 0 0 #e2e6ea, inset 0 -1px 0 #e2e6ea;
  }

  body[data-ui-theme="settings-surfaces"] :is(
    .table-wrap,
    .cargo-table-wrap,
    .report-pagination,
    .report-summary-strip,
    .branch-pos-summary,
    .estimate-summary-grid,
    .empty-state,
    .compact-empty
  ) {
    border-color: #e2e6ea;
    box-shadow: inset 0 0 0 1px #e2e6ea;
  }

  body[data-ui-theme="settings-surfaces"] .employee-list-head {
    background: #fff;
    border-color: #e2e6ea;
  }

  body[data-ui-theme="settings-surfaces"] .employee-list-row {
    border-color: #e2e6ea;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e2e6ea;
  }

  body[data-ui-theme="settings-surfaces"] .employee-list-row.employee-status-inactive {
    background: #f8f3f0;
    color: #7c4a3e;
  }
}
/* ui readability unification end */
/* desktop density and highlight restoration start */
@media (min-width: 901px) {
  body[data-ui-theme="settings-surfaces"] .top-title-bar {
    height: 74px;
    min-height: 74px;
  }

  body[data-ui-theme="settings-surfaces"] .top-title-center {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    pointer-events: none;
  }

  body[data-ui-theme="settings-surfaces"] .top-title-center h1 {
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #111827;
    cursor: default;
    font-size: 30px;
    line-height: 1.1;
    pointer-events: none;
  }

  body[data-ui-theme="settings-surfaces"].purchase-editor-test-page .top-title-center h1 {
    font-size: 30px;
  }

  body[data-ui-theme="settings-surfaces"] .top-title-center .page-tab-strip {
    pointer-events: auto;
  }

  body[data-ui-theme="settings-surfaces"] .top-title-bar :is(
    .internal-home-link,
    a.report-entry,
    .cargo-header-action,
    .quick-primary-button,
    .secondary-button
  ) {
    box-sizing: border-box;
    height: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
  }

  body[data-ui-theme="settings-surfaces"] .top-title-bar :is(
    .internal-home-link,
    a.report-entry,
    .cargo-header-action,
    .quick-primary-button,
    .secondary-button
  ) :is(span, strong) {
    font-size: 13px;
    line-height: 1;
  }

  body[data-ui-theme="settings-surfaces"] .top-title-bar > a.report-entry:not(.internal-home-link):not([href="./cargo-sheet.html"]) {
    display: none;
  }

  body[data-ui-theme="settings-surfaces"] .purchase-assistant-home-link {
    display: inline-flex;
    height: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
  }

  body[data-ui-theme="settings-surfaces"] :is(
    .report-toolbar,
    .employee-create-form,
    .employee-list-toolbar,
    .review-filter-bar,
    .review-drawer-actions,
    .cargo-settings-toolbar,
    .cargo-locator-row,
    .purchase-summary-search
  ) :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    button
  ) {
    box-sizing: border-box;
    height: 34px;
    min-height: 34px;
    font-size: 13px;
    line-height: 1;
  }

  body[data-ui-theme="settings-surfaces"] .purchase-assistant-more-trigger {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
  }

  body[data-ui-theme="settings-surfaces"] > .page-shell > .panel {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  body[data-ui-theme="settings-surfaces"] > .page-shell > .panel > .panel-head {
    margin-bottom: 14px;
  }

  body[data-ui-theme="settings-surfaces"] .report-toolbar {
    row-gap: 10px;
    margin-bottom: 10px;
  }

  body[data-ui-theme="settings-surfaces"] .employee-list-panel {
    row-gap: 12px;
  }

  body[data-ui-theme="settings-surfaces"] .purchase-assistant-toolbar {
    row-gap: 8px;
  }

  .admin-home-page .picking-pill.is-new-order {
    background: linear-gradient(180deg, #fff7cc 0%, #fff0ad 100%);
    border-color: rgba(217, 108, 31, 0.32);
    box-shadow: 0 10px 26px rgba(217, 108, 31, 0.16);
  }

  .admin-home-page .picking-pill.is-addon-order {
    background: linear-gradient(180deg, #fff0f6 0%, #ffd9e8 100%);
    border-color: rgba(219, 39, 119, 0.34);
    box-shadow: 0 10px 26px rgba(219, 39, 119, 0.16);
  }

  .admin-home-page .picking-pill.is-search-match {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.28), 0 10px 26px rgba(17, 24, 39, 0.2);
  }

  .admin-home-page #ready-summary .picking-pill.is-search-match {
    border-color: #111827;
    box-shadow: inset 0 -3px 0 rgba(22, 163, 74, 0.16), 0 0 0 3px rgba(17, 24, 39, 0.28), 0 10px 26px rgba(17, 24, 39, 0.2);
  }
}
/* desktop density and highlight restoration end */

@media (min-width: 901px) {
  /* desktop internal header button unification start */
  body:not(.admin-home-page) .admin-top-bar :is(
    a.report-entry,
    a.secondary-button,
    button.secondary-button,
    summary.secondary-button,
    a.quick-primary-button,
    button.quick-primary-button,
    summary.quick-primary-button
  ):not(.danger-button):not(.has-review-pending) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #111827;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
  }

  body:not(.admin-home-page) .admin-top-bar :is(
    a.report-entry,
    a.secondary-button,
    button.secondary-button,
    summary.secondary-button,
    a.quick-primary-button,
    button.quick-primary-button,
    summary.quick-primary-button
  ):not(.danger-button):not(.has-review-pending) :is(span, strong) {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
  }

  body[data-ui-theme="settings-surfaces"]:not(.admin-home-page)
    .admin-top-bar > a.report-entry:not(.internal-home-link):not([href="./cargo-sheet.html"]) {
    display: none;
  }
  /* desktop internal header button unification end */
}

@media (max-width: 900px) {
  .purchase-editor-test-page .purchase-editor-table input {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
  }

  .purchase-editor-test-page .purchase-editor-table input:disabled {
    opacity: 1 !important;
  }
}

.admin-home-page .picking-pill .card-print-button {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}
.admin-home-page .picking-pill .card-print-button:hover { background: #dbeafe; }
#ready-summary .ready-flow-with-print {
  grid-template-columns: auto;
  column-gap: 4px;
}
#ready-summary .ready-flow-with-print .card-print-button { grid-column: 1; grid-row: 1; }
#ready-summary .ready-flow-with-print [data-role="show-mark-picked-confirm"] { grid-column: 1; grid-row: 2; }
