:root {
  /* 统一高级商用设计系统 —— 冷调中性 + 沉稳蓝主色 + 分层柔和阴影(admin/client 一致) */
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-hover: #f1f5f9;
  --line: #e8edf3;
  --line-strong: #d6deea;
  --text: #0f172a;
  --muted: #64748b;
  --weak: #94a3b8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eef4ff;
  --primary-ring: rgba(37, 99, 235, .18);
  --accent: #f59e0b;
  --accent-soft: #fff7e8;
  --success: #10b981;
  --success-soft: #e8f8f1;
  --success-text: #0e7c5a;
  --warning: #f59e0b;
  --warning-soft: #fff5e4;
  --warning-text: #b45309;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --danger-text: #dc2626;
  --sidebar: #ffffff;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow: 0 6px 20px rgba(15, 23, 42, .08), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, .14);
  --ring: 0 0 0 3px var(--primary-ring);
  --font-cn: "Alibaba-PuHuiTi-Regular", "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-cn-medium: "Alibaba-PuHuiTi-Medium", "Alibaba-PuHuiTi-Regular", "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-cn-bold: "Alibaba-PuHuiTi-Medium", "Alibaba-PuHuiTi-Regular", "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-cn);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
strong {
  font-family: var(--font-cn-medium);
  font-weight: 500;
}
.hidden { display: none !important; }

.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 66% 46%, rgba(0, 122, 255, .08), transparent 28%),
    var(--bg);
}
.login-layout {
  width: min(1380px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: minmax(640px, 800px) minmax(360px, 420px);
  align-items: center;
  gap: 70px;
}
.login-logo-panel {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.login-logo-panel img {
  width: min(520px, 100%);
  max-height: 168px;
  object-fit: contain;
  display: block;
}
.login-logo-panel img.login-hero {
  width: min(580px, 100%);
  max-height: 360px;
  filter: drop-shadow(0 18px 36px rgba(37, 99, 235, .10));
}
.login-panel {
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(0, 122, 255, .12);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .12);
  padding: 34px 36px 32px;
}
.login-panel h1 {
  margin: 0 0 28px;
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-size: 25px;
  line-height: 1.2;
}
.login-panel p { margin: 0 0 22px; color: var(--muted); line-height: 1.7; }
.login-panel label {
  gap: 8px;
  color: #30343b;
  font-size: 13px;
}
.login-panel label + label { margin-top: 16px; }
.login-panel input {
  min-height: 44px;
  border-color: #d8dee8;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcff;
}
.login-panel input:focus {
  background: #fff;
}
.login-panel .primary {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  border-radius: 8px;
  font-family: var(--font-cn-medium);
  font-size: 15px;
}
label {
  display: grid;
  gap: 7px;
  color: #3a3a3c;
  font-family: var(--font-cn-medium);
  font-weight: 500;
}
label + label { margin-top: 14px; }
input, select, textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
textarea { min-height: 74px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a1a1aa; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
}
.form-error { min-height: 20px; color: var(--danger); margin-top: 10px; }

.app-shell {
  min-height: 100vh;
  display: grid;
  /* 侧边栏 232→184:菜单最长 5 个字 + 图标,232 全是留白;操作区寸土寸金 */
  grid-template-columns: 184px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}
.side-brand {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}
.side-brand-logo {
  width: 88px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}
.side-brand-role {
  flex: 0 0 auto;
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-size: 14px;
  white-space: nowrap;
}
.side-brand strong {
  display: block;
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-size: 16px;
}
.side-brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.menu {
  flex: 1;
  min-height: 0;
  padding: 10px 8px;
  overflow-y: auto;
}
.menu-group {
  margin: 15px 0 6px;
  padding: 0 10px;
  color: var(--weak);
  font-size: 12px;
  font-family: var(--font-cn-medium);
}
.menu button {
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #3a3a3c;
  text-align: left;
  padding: 8px 10px;
  font-family: var(--font-cn-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.menu button:hover { background: var(--surface-hover); }
.menu button.active {
  background: var(--primary-soft);
  border-color: #cfe7ff;
  color: var(--primary-dark);
  font-family: var(--font-cn-medium);
}
.menu-reminder {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  font-family: var(--font-cn-medium);
}

.workspace {
  min-width: 0;
  padding: 20px 22px 40px;
}
.topbar {
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}
.topbar h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-size: 25px;
  line-height: 1.24;
}
.topbar p { margin: 6px 0 0; color: var(--muted); }
.userbar { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.sidebar-userbar {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f7faff);
  gap: 8px;
}
.sidebar-userbar #userBadge {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  display: flex;
  padding: 7px 9px;
  border: 1px solid #dbeafe;
  background: #fff;
  border-radius: 8px;
  color: inherit;
  font-family: inherit;
}
.sidebar-user-card {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid #dbeafe;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .04);
}
.sidebar-user-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--primary-weak);
  color: var(--primary);
  font-family: var(--font-cn-bold);
  font-size: 13px;
}
.sidebar-user-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}
.sidebar-user-copy strong,
.sidebar-user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-copy strong {
  color: var(--text);
  font-family: var(--font-cn-bold);
  font-size: 13px;
}
.sidebar-user-copy small {
  color: var(--muted);
  font-size: 11px;
}
.sidebar-userbar #logoutBtn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 8px;
  background: #fff;
}
#userBadge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  color: #3a3a3c;
  font-family: var(--font-cn-medium);
}

.stats-grid {
  display: none !important;
  height: 0;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  margin: 0;
  overflow: hidden;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.stat span {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-cn-medium);
}
.stat strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-size: 23px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.finance-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.finance-stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.finance-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-cn-medium);
}
.finance-stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.15;
  font-family: var(--font-cn-medium);
  font-variant-numeric: tabular-nums;
}
.finance-stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}
.finance-stat-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.panel-head {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  background: #fff;
}
.panel-title {
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-weight: 500;
}
.panel-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }
.panel-body { padding: 12px; }
.toolbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}
.toolbar .wide { grid-column: span 2; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.statement-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.statement-stat {
  min-width: 0;
  min-height: 112px;
  padding: 18px 22px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.statement-stat span,
.statement-stat strong,
.statement-stat em { display: block; }
.statement-stat span { color: var(--muted); font-size: 14px; }
.statement-stat strong { margin-top: 6px; color: var(--text); font-size: 30px; line-height: 1.1; }
.statement-stat em { margin-top: 6px; color: var(--muted); font-size: 12px; font-style: normal; }
.statement-stat:hover { border-color: var(--primary); }
.statement-stat.active { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 16%, transparent); }
.statement-stat.warning strong { color: var(--danger-text); }
.statement-product-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 54px;
  max-width: 174px;
}
.statement-product-image { position: relative; }
.statement-product-index {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 1;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(17, 24, 39, .78);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.statement-product-thumb-button,
.statement-product-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
}
.statement-product-thumb-button {
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  overflow: hidden;
  cursor: zoom-in;
}
.statement-product-thumb {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  object-fit: contain;
}
.statement-product-thumb-button .statement-product-thumb { border: 0; }
.statement-product-thumb-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 58%, white);
  outline-offset: 2px;
}
.statement-product-names {
  min-width: 190px;
  max-width: 320px;
}
.statement-product-name + .statement-product-name {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.statement-product-name .strong {
  line-height: 1.45;
  white-space: normal;
}
.compact-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.compact-filter select {
  min-width: 160px;
  min-height: 34px;
  padding: 6px 8px;
}
.status-sync-indicator {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  font-size: 12px;
  white-space: nowrap;
}
.status-sync-indicator.syncing {
  color: var(--primary-dark);
  border-color: #bfdbfe;
  background: var(--primary-soft);
}
.status-sync-indicator.error {
  color: var(--danger);
  border-color: #fecaca;
  background: #fef2f2;
}

button {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #1d1d1f;
  padding: 7px 11px;
  font-family: var(--font-cn-medium);
  font-weight: 500;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
button:hover { border-color: #b8b8bf; background: var(--surface-soft); }
button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
button.ghost { background: #fff; }
button.danger { color: var(--danger); border-color: #ffd1cd; background: var(--danger-soft); }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, .file-button span:focus-visible { outline: none; box-shadow: var(--ring); }

.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
  font-variant-numeric: tabular-nums;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 11px;
  text-align: left;
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-cn-medium);
  z-index: 1;
}
tr:hover td { background: var(--surface-soft); }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.danger-text { color: var(--danger); }
.strong { color: var(--text); font-family: var(--font-cn); font-weight: 400; }
.subline { color: var(--muted); font-size: 12px; margin-top: 4px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef0f4;
  color: #52525b;
  font-size: 12px;
  font-family: var(--font-cn-medium);
  font-weight: 500;
  white-space: nowrap;
}
.badge.blue { background: var(--primary-soft); color: var(--primary-dark); }
.badge.green { background: var(--success-soft); color: #1f8f45; }
.badge.amber { background: var(--warning-soft); color: #a65f00; }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.gray { background: #eef0f4; color: #52525b; }

.team-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}
.member-command-panel .panel-head {
  min-height: 62px;
}
.team-permission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
.team-permission-head strong {
  display: block;
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-weight: 500;
}
.team-permission-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.team-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.team-permission-item {
  min-height: 50px;
  display: grid;
  grid-template-columns: 18px 54px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #fff;
}
.team-permission-item span {
  color: var(--muted);
  font-size: 12px;
}
.team-permission-item strong {
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-weight: 500;
}

.product-cell { display: grid; grid-template-columns: 46px minmax(150px, 1fr); gap: 9px; align-items: start; }
.product-thumb {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}
.product-thumb-button {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  overflow: hidden;
  cursor: zoom-in;
}
.product-thumb-button .product-thumb { display: block; }
.product-thumb-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 58%, white);
  outline-offset: 2px;
}
.stock-num {
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-size: 18px;
  line-height: 1.1;
}
.stock-aging-panel .aging-buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.aging-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border, #e6e9ef); border-radius: 10px; background: var(--surface, #fff); }
.aging-card-warn { border-color: #f0b4b4; background: #fff7f7; }
.aging-card .aging-label { color: var(--text-soft, #64748b); font-size: 12px; }
.aging-card strong { font-size: 16px; color: var(--text, #1f2937); }
.aging-card em { font-style: normal; font-size: 12px; }
.aging-overdue { color: #d64545; font-weight: 600; }
.aging-ok { color: #16a34a; }
.aging-wh-table table { width: 100%; }
.page-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 72px 20px; color: var(--muted, #64748b); font-size: 14px; }
.page-loading-dot { width: 16px; height: 16px; border: 2px solid var(--border, #e6e9ef); border-top-color: var(--primary, #2563eb); border-radius: 50%; animation: page-loading-spin 0.7s linear infinite; }
@keyframes page-loading-spin { to { transform: rotate(360deg); } }
.stock-confirmed {
  margin-top: 4px;
  color: #008c76;
  font-family: var(--font-cn-medium);
  font-size: 12px;
}
/* 超卖:库存为负要一眼看见(以前被 GREATEST(...,0) 压成 0,超卖是藏着的) */
.stock-num.is-negative { color: #d64545; }
.stock-num.is-negative em {
  font-style: normal;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fdecec;
  font-size: 12px;
  vertical-align: middle;
}
/* 同一批货挂多个 Ozon SKU:标出来,否则两行相同的数字会被当成两批货 */
.stock-shared {
  margin-top: 4px;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
}
/* 占用不再作为独立数字出现:它和主数字是同一笔预报,摆两个数会被心算成相减 */
.stock-locked-note {
  margin-left: 6px;
  color: var(--muted, #94a3b8);
  font-style: normal;
  font-size: 12px;
}
/* 在途:已提交入库单、仓库还没点收 */
.stock-transit {
  margin-top: 4px;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff7e6;
  color: #b45309;
  font-size: 12px;
}
/* 主系统真实库存 vs 物流本地账的差额 */
.stock-drift {
  margin-top: 4px;
  color: var(--muted, #94a3b8);
  font-size: 12px;
}
.stock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.stock-actions button {
  min-height: 30px;
  padding: 5px 8px;
  white-space: nowrap;
}
.stock-actions .warning-action {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #b45309;
}

.scan-layout { display: grid; grid-template-columns: minmax(320px, 1fr); gap: 12px; }
.scanner-hint {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
  border: 1px solid #b9ddff;
  border-radius: var(--radius-sm);
  background: #f0f8ff;
  color: #24547c;
}
.scanner-hint strong {
  color: var(--primary-dark);
  white-space: nowrap;
}
.scanner-hint span {
  color: #647282;
  font-size: 12px;
}
.scan-input {
  min-height: 56px;
  border-width: 2px;
  border-color: var(--primary);
  background: #fff;
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
}
.scan-result {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 12px;
}
.scan-missing-notice { width: 100%; color: var(--text); }
.scan-missing-notice__title, .scan-missing-notice__actions,
.scan-missing-notice__recipients, .scan-missing-notice__manage-form,
.scan-missing-notice__recipient-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.scan-missing-notice__title strong { font-size: 17px; }
.scan-missing-notice__code { margin-top: 8px; font-size: 15px; }
.scan-missing-notice p { margin: 8px 0 12px; }
.scan-missing-notice__actions { margin-bottom: 10px; }
.scan-missing-notice__recipients { align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.scan-missing-notice__recipients label { padding-top: 8px; }
.scan-missing-notice__recipients select { min-width: 240px; max-width: 100%; }
.scan-missing-notice__manage, .scan-missing-notice__hint, #scanMissingSendStatus { flex-basis: 100%; }
.scan-missing-notice__manage-form { margin: 8px 0; }
.scan-missing-notice__recipient-row { justify-content: space-between; border-top: 1px solid var(--line); padding: 6px 0; }
.scan-missing-notice__hint { color: var(--muted); font-size: 12px; }
.scan-missing-notice__step { display: flex; align-items: center; gap: 8px; width: 100%; font-weight: 650; }
.scan-missing-notice__step span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #fff; background: #2563eb; font-size: 12px; }
.scan-missing-notice__recipients { display: block; width: 100%; padding: 14px; }
.scan-missing-notice__layout { display: grid; grid-template-columns: minmax(380px, 430px) minmax(0, 1fr); gap: 22px; width: 100%; }
.scan-missing-notice__selected { display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.scan-missing-notice__selected-card { min-height: 70px; }
.scan-missing-notice__selected-card .scan-customer-card { width: 100%; min-height: 70px; }
.scan-missing-notice__selected-empty { display: grid; align-items: center; min-height: 70px; padding: 12px 16px; border: 1px dashed #cdd9e7; border-radius: 10px; color: #77869a; background: #f9fbfd; font-size: 13px; }
.scan-missing-notice__choices { min-width: 0; padding: 0 0 0 20px; border-left: 1px solid #e3eaf2; }
.scan-missing-notice__choices-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.scan-missing-notice__choices-head strong { display: block; color: #21364e; font-size: 14px; }
.scan-missing-notice__choices-head small { display: block; margin-top: 3px; color: #7d8b9d; font-size: 11px; }
.scan-missing-notice__recipients select { width: 100%; max-width: none; }
.scan-missing-notice__preview, .scan-missing-notice__send-row { width: 100%; }
.scan-missing-notice__preview { margin-top: 6px; border: 1px solid #dbe5f0; border-radius: 8px; background: #f8fbff; }
.scan-missing-notice__preview summary { cursor: pointer; padding: 10px 12px; font-weight: 600; }
.scan-missing-notice__preview pre { margin: 0; padding: 12px; border-top: 1px solid #dbe5f0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.6; }
.scan-missing-notice__send-row { display: flex; flex-wrap: wrap; gap: 8px; }
.scan-missing-notice__step .scan-customer-pick { margin-left: auto; font-size: 12px; }
.scan-customer-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 9px; max-height: 320px; overflow: auto; align-content: start; }
.scan-customer-quick__empty { grid-column: 1 / -1; padding: 14px; border: 1px dashed #cbd5e1; border-radius: 10px; color: #64748b; font-size: 12px; background: #f8fafc; }
.scan-customer-card { --mark-color: #94a3b8; position: relative; min-width: 0; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; text-align: left; padding: 16px 18px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; color: #172b45; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.scan-customer-card:hover { border-color: #a8bfd9; box-shadow: 0 8px 22px #17345c12; }
.scan-customer-card:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.scan-customer-card.is-selected { border-color: #4d88d2; box-shadow: 0 0 0 3px #e7f0fc; }
.scan-customer-card strong { max-width: calc(100% - 18px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.scan-customer-card small { color: #718096; font-size: 11px; }
.scan-customer-card.is-compact { min-height: 68px; gap: 4px; padding: 12px 13px; border-radius: 10px; }
.scan-customer-card.is-compact strong { font-size: 13px; }
.scan-customer-card.is-compact small { font-size: 10px; }
.scan-customer-card__mark { position: absolute; top: 14px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--mark-color); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mark-color) 16%, white); animation: scan-customer-breathe 2.6s ease-in-out infinite; }
@keyframes scan-customer-breathe { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--mark-color) 7%, white); } }
@media(prefers-reduced-motion: reduce) { .scan-customer-card__mark { animation: none; } }
.scan-customer-card.mark-red, .scan-customer-mark-menu .mark-red { --mark-color: #e75b64; --mark-bg: #fff5f5; }
.scan-customer-card.mark-orange, .scan-customer-mark-menu .mark-orange { --mark-color: #ee963e; --mark-bg: #fff8ef; }
.scan-customer-card.mark-green, .scan-customer-mark-menu .mark-green { --mark-color: #35ad75; --mark-bg: #f1fbf5; }
.scan-customer-card.mark-blue, .scan-customer-mark-menu .mark-blue { --mark-color: #4b85df; --mark-bg: #f2f7ff; }
.scan-customer-card.mark-purple, .scan-customer-mark-menu .mark-purple { --mark-color: #9a70d4; --mark-bg: #f8f4ff; }
.scan-customer-modal { z-index: 3250; }
.scan-customer-modal__card { width: min(870px, calc(100vw - 24px)); max-width: 870px; }
.scan-customer-modal__card .erp-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.scan-customer-modal__card .erp-dialog-head p { margin: 4px 0 0; color: #66778b; font-size: 12px; }
.scan-customer-modal__card .erp-dialog-body { max-height: min(74vh, 760px); overflow: auto; }
#scanCustomerSearch { width: 100%; min-height: 43px; padding: 10px 14px; border: 1px solid #cbd7e6; border-radius: 10px; font-size: 14px; }
.scan-customer-modal__count { padding: 12px 2px; color: #697a8d; font-size: 12px; }
.scan-customer-modal__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scan-customer-modal__empty { grid-column: 1 / -1; padding: 28px; text-align: center; color: #66778b; }
.scan-customer-mark-menu { position: fixed; z-index: 3300; width: 178px; padding: 8px; border: 1px solid #dbe3ef; border-radius: 12px; background: #fff; box-shadow: 0 12px 36px #172b4540; }
.scan-customer-mark-menu strong { display: block; padding: 5px 8px 8px; font-size: 12px; color: #53647b; }
.scan-customer-mark-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px; border: 0; border-radius: 8px; text-align: left; background: transparent; cursor: pointer; }
.scan-customer-mark-menu button:hover, .scan-customer-mark-menu button.is-current { background: var(--mark-bg, #f1f5f9); }
.scan-customer-mark-menu button i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--mark-color, #d5deea); }
@media(max-width: 900px) { .scan-missing-notice__layout { grid-template-columns: 1fr; } .scan-missing-notice__choices { padding: 14px 0 0; border-left: 0; border-top: 1px solid #e3eaf2; } }
@media(max-width: 720px) { .scan-customer-modal__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media(max-width: 480px) { .scan-customer-quick, .scan-customer-modal__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .scan-missing-notice__choices-head { align-items: flex-start; } }
#scanMissingSendButton { min-height: 52px; min-width: 270px; padding: 12px 24px; border-radius: 11px; background: #2367c9; color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 6px 16px #2367c928; transition: transform .15s, box-shadow .15s, background .15s; }
#scanMissingSendButton:not(:disabled):hover { background: #1855b0; box-shadow: 0 10px 22px #2367c938; transform: translateY(-1px); }
#scanMissingSendButton.is-sending { cursor: progress; }
#scanMissingSendButton:disabled:not(.is-sending) { box-shadow: none; }
.scan-missing-delivery__headline { display: block; margin-bottom: 7px; color: #1d5b91; font-size: 14px; }
#scanMissingSendStatus:not(:empty) { padding: 9px 12px; border-radius: 7px; background: #eef5ff; color: #1e4d8f; }
#scanMissingSendStatus { font-weight: 600; }
.reminder-mark-switch { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 5px 9px; border: 1px solid #d9e2ec; border-radius: 8px; background: #fff; color: #667085; font-size: 12px; font-weight: 650; cursor: pointer; }
.reminder-mark-switch i { position: relative; flex: 0 0 32px; width: 32px; height: 18px; border-radius: 10px; background: #c5ced9; transition: background .18s; }
.reminder-mark-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #172b4530; transition: transform .18s; }
.reminder-mark-switch.is-on { border-color: #b7d8c8; background: #f3faf6; color: #20724c; }
.reminder-mark-switch.is-on i { background: #34a66b; }
.reminder-mark-switch.is-on i::after { transform: translateX(14px); }
.reminder-mark-switch:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.sku-picker .reminder-mark-switch { grid-column: 1 / -1; width: 100%; }
.rf-stock-card__reminder-mark { padding: 0 0 8px; }
.rf-stock-card__reminder-mark .reminder-mark-switch { width: 100%; }
.scan-inline-status {
  min-height: 34px;
  display: flex;
  align-items: center;
  /* 允许换行:扫描次数提示要独占一行(flex:0 0 100%),
     nowrap 时它会被压成一条窄柱,文字一个字一行竖着排。
     原有的「匹配到 N 单」和订单卡宽度够时仍然并排,不受影响。 */
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 10px;
  font-size: 13px;
}
.scan-inline-status strong {
  color: var(--primary);
  font-family: var(--font-cn-medium);
}
.scan-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
}
.scan-result-head strong {
  color: var(--text);
}
.scan-order-card {
  display: grid;
  grid-template-columns: 1fr 172px;
  gap: 12px;
  padding: 12px;
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.scan-order-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.scan-order-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
}
.scan-order-grid div {
  min-width: 0;
  color: var(--text);
}
.scan-order-grid span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
}
.scan-note {
  margin-top: 10px;
  padding: 8px 10px;
  color: #991B1B;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
}
.scan-order-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-content: start;
}
.scan-order-actions button,
.scan-order-actions .file-button span {
  width: 100%;
}
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span4 { grid-column: 1 / -1; }
.service-page {
  display: grid;
  gap: 10px;
}
.service-page .panel {
  margin-bottom: 0;
}
.service-page .compact-head {
  min-height: 40px;
  padding: 7px 10px;
}
.service-editor-panel .panel-body {
  padding: 10px;
}
.service-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr .75fr .9fr .75fr .75fr .65fr .75fr minmax(220px, 1.4fr);
  gap: 8px;
  align-items: end;
}
.service-editor-grid label {
  gap: 4px;
  margin-top: 0;
  font-size: 12px;
}
.service-editor-grid input,
.service-editor-grid select {
  min-height: 32px;
  padding: 6px 8px;
}
.service-desc-field {
  min-width: 220px;
}
.service-table {
  min-width: 980px;
}
.service-table th,
.service-table td {
  padding: 7px 10px;
}
.service-table .badge {
  min-height: 20px;
  padding: 1px 7px;
}
.service-table button {
  min-height: 30px;
  padding: 5px 9px;
}
.service-desc-cell {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.45;
}
.finance-filter-panel { margin-bottom: 10px; }
.finance-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px 18px;
  align-items: end;
}
.finance-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.inline-error {
  color: var(--danger);
  font-family: var(--font-cn-medium);
}
.file-button input { display: none; }
.file-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font-family: var(--font-cn-medium);
  font-weight: 500;
  cursor: pointer;
  background: #fff;
}
.photo-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.photo-strip img { width: 48px; height: 48px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: zoom-in; }
.check-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.check-list-panel {
  min-width: 0;
}
.check-list-panel .table-wrap {
  max-height: calc(100vh - 250px);
}
.check-table {
  min-width: 860px;
}
.check-table th,
.check-table td {
  padding: 8px 9px;
}
.check-table .photo-strip img {
  width: 42px;
  height: 42px;
}
.center-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2000;
  min-width: 180px;
  max-width: min(520px, calc(100vw - 48px));
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(15, 23, 42, .94);
  color: #fff;
  text-align: center;
  font-family: var(--font-cn-medium);
  font-size: 16px;
  line-height: 1.45;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.96);
  transition: opacity .16s ease, transform .16s ease;
}
.center-toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.center-toast.success { background: #0f9f7a; }
.center-toast.error { background: #dc2626; }
.center-toast.loading { background: rgba(17, 24, 39, .94); }
.image-preview-mask {
  z-index: 120;
  background: rgba(15, 23, 42, .78);
}
.image-preview-card {
  position: relative;
  max-width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
}
.image-preview-card img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.image-preview-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.camera-modal {
  width: min(760px, calc(100vw - 32px));
}
.camera-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.camera-body video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #111827;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
#cameraCaptureStatus {
  min-height: 22px;
  line-height: 1.45;
}
.content-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.content-list-grid > .panel {
  min-width: 0;
}
.content-list-grid .table-wrap {
  overflow: hidden;
}
.content-list-grid table {
  min-width: 0;
  table-layout: fixed;
}
.content-list-grid th,
.content-list-grid td {
  padding: 11px 12px;
  vertical-align: middle;
}
.content-list-grid th:first-child,
.content-list-grid td:first-child {
  width: auto;
}
.content-list-grid th:not(:first-child),
.content-list-grid td:not(:first-child) {
  width: 70px;
  text-align: center;
}
.content-list-grid th:nth-last-child(2),
.content-list-grid td:nth-last-child(2) {
  width: 138px;
  text-align: left;
}
.content-list-grid th:last-child,
.content-list-grid td:last-child {
  width: 104px;
}
.content-list-grid .row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.content-list-grid .row-actions button {
  min-height: 32px;
  padding: 6px 10px;
  white-space: nowrap;
}
.content-list-grid .strong,
.content-list-grid .subline {
  overflow-wrap: anywhere;
}
.panel-head.compact {
  padding-top: 12px;
  padding-bottom: 12px;
}
.panel-head .compact-btn {
  min-height: 32px;
  padding: 6px 12px;
  white-space: nowrap;
}
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .42);
}
.modal-card {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stock-create-modal {
  width: min(900px, 100%);
}
.warehouse-modal {
  width: min(980px, 100%);
}
.member-modal {
  width: min(920px, 100%);
}
.content-editor-modal {
  width: min(1080px, 100%);
}
.stock-create-modal .form-grid {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}
.warehouse-modal .form-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.member-modal .form-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.content-editor-modal .form-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.stock-create-modal .span2 {
  grid-column: span 2;
}
.warehouse-modal .span2 {
  grid-column: span 2;
}
.member-modal .span2 {
  grid-column: span 2;
}
.content-editor-modal .span2 {
  grid-column: span 2;
}
.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.announcement-editor-form {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(130px, 1fr));
  gap: 14px;
}
.announcement-title-field {
  grid-column: span 2;
}
.announcement-md-editor,
.announcement-editor-actions {
  grid-column: 1 / -1;
}
.md-editor {
  display: grid;
  gap: 8px;
}
.md-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.md-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.md-tools button {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.md-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.md-edit-pane,
.md-preview-pane {
  min-width: 0;
}
.md-edit-pane textarea {
  min-height: 260px;
  resize: vertical;
}
.md-preview-pane {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  overflow: hidden;
}
.md-preview-title {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.markdown-preview {
  min-height: 260px;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  color: var(--text);
  line-height: 1.7;
}
.markdown-preview.empty {
  color: var(--muted);
}
.markdown-preview p {
  margin: 0;
  margin-bottom: 10px;
}
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4 {
  margin: 4px 0 10px;
  font-family: var(--font-cn-medium);
}
.markdown-preview ul {
  margin: 0 0 10px 18px;
  padding: 0;
}
.markdown-preview img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  margin: 8px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.markdown-preview code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #eef2ff;
}
.modal-head h3 {
  margin: 0 0 4px;
  font-family: var(--font-cn-medium);
  font-size: 18px;
}
.modal-head p {
  margin: 0;
  color: var(--muted);
}
.modal-head button {
  width: 32px;
  min-height: 32px;
  padding: 0;
  color: var(--muted);
  background: #fff;
}
.modal-actions {
  justify-content: flex-end;
  padding: 0 20px 18px;
}
.stock-operation-modal .file-button span {
  width: 100%;
  border-color: #cfe7ff;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.order-command { margin-bottom: 10px; }
.order-tabs, .finance-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow-x: auto;
}
.order-tabs button, .finance-tabs button {
  background: #fff;
  border-color: transparent;
  color: #3a3a3c;
  min-height: 32px;
  padding: 6px 12px;
  box-shadow: none;
}
.order-tabs button.active, .finance-tabs button.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.order-tabs button:hover, .finance-tabs button:hover {
  border-color: #cfe7ff;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.order-tabs button.active:hover, .finance-tabs button.active:hover {
  color: #fff;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.order-tabs span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}
.order-tabs button.active span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-family: var(--font-cn-medium);
  font-weight: 600;
}
.batch-bar {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}
.batch-bar strong {
  margin-left: auto;
  color: var(--text);
  font-family: var(--font-cn-medium);
  font-size: 24px;
}
.checkline { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-cn-medium); font-weight: 500; }
.checkline input { width: 16px; min-height: 16px; accent-color: var(--primary); }
.order-list { display: grid; gap: 10px; }
.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.order-card:hover {
  border-color: #c7dfff;
  box-shadow: var(--shadow);
}
.order-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.order-head-main {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  min-width: 0;
}
.order-head-main span { color: #3a3a3c; }
.order-head-break { display: none; }
.order-head-merge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  color: #667085;
  font-size: 11px;
}
.order-head-merge strong { color: #344054; font-size: 12px; font-weight: 700; }
.order-head-download {
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 6px;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--primary);
  font-size: 13px;
  line-height: 1;
  box-shadow: none;
}
.order-head-download:hover {
  border-color: var(--primary);
  background: #dbeafe;
  color: var(--primary-dark);
}
.source-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.source-dot.rootflow { background: #30b0a0; }
.source-dot.client { background: var(--primary); }
.text-warn { color: var(--accent) !important; font-family: var(--font-cn-medium); font-weight: 500; }
.text-ok { color: var(--success-text) !important; font-family: var(--font-cn-medium); font-weight: 500; }
.order-card-grid {
  display: grid;
  /* 第一列(快递单号/Ozon订单号)从 132 提到 156:Ozon 合单号是「10位-4位-1位」
     共 17 字符,13px 字号下 nowrap 需要约 118px 净宽 + 左右 padding 24px,
     132 放不下就被切成「0193834851-0177-」。宽度从第二列(主图)让出来 —— 
     主图是定宽方图,少 24px 不影响它。 */
  grid-template-columns: minmax(156px, .72fr) minmax(126px, .82fr) minmax(178px, .92fr) minmax(250px, 1.18fr) minmax(300px, 1.28fr) minmax(260px, .95fr);
  min-height: 190px;
}
.order-card-grid > div {
  border-right: 1px solid var(--line);
  padding: 12px;
}
.order-card-grid > div:last-child { border-right: none; }
.sign-cell {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
  background: var(--surface-soft);
}
.sign-cell a, .platform-cell a, .meta-cell a {
  color: var(--primary);
  font-family: var(--font-cn-medium);
  font-weight: 500;
  text-decoration: none;
}
.order-product-img {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: zoom-in;
}
.order-product-img.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-soft);
}
.tracking-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 4px;
  background: #EAF3FF;
  color: #1D4ED8;
  font-size: 12px;
  font-family: var(--font-cn-medium);
}
.domestic-tracking-number {
  display: block;
  color: var(--primary);
  font-family: var(--font-cn-medium);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.sku-shipment-tracking-list {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}
.sku-shipment-tracking-row {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}
.sku-shipment-tracking-row > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sku-shipment-tracking-row.is-received > span { color: #047857; }
.stock-shipment-line {
  display: flex;
  align-items: center;
  max-width: 180px;
  margin-top: 5px;
  color: #047857;
  font-size: 12px;
  line-height: 1.35;
}
.stock-shipment-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-cn-medium);
}
.stock-shipment-line button {
  flex: none;
  min-height: 24px;
  margin-left: 6px;
  padding: 2px 8px;
  border-color: #a7d7c5;
  background: #fff;
  color: #047857;
  font-size: 12px;
}
.ozon-order-label {
  margin-top: 2px;
  background: #F1F5F9;
  color: #475569;
}
.ozon-order-number {
  display: block;
  color: #475569;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 0;
  /* 不再 nowrap:单号被裁掉半截比换行糟得多 —— 仓库要照着它核对包裹,
     看到「0193834851-0177-」根本不知道尾号是几。宁可折行也要完整。 */
  white-space: normal;
  word-break: break-all;
  max-width: 100%;
}
.copyable-number {
  cursor: pointer;
}
.copyable-number:hover {
  text-decoration: underline;
}
.sku-cell, .platform-cell, .meta-cell { line-height: 1.78; }
.rootflow-product-details {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed #D7E2F0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}
.rootflow-product-details div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}
.rootflow-product-details span {
  color: #64748B;
}
.rootflow-product-details strong {
  min-width: 0;
  color: #334155;
  font-family: var(--font-cn-medium);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.rootflow-forecast-info {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #D7E2F0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}
.rootflow-forecast-info > div:not(.forecast-status-line) {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
}
.rootflow-forecast-info span {
  color: #64748B;
}
.rootflow-forecast-info strong {
  min-width: 0;
  color: #334155;
  font-family: var(--font-cn-medium);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.forecast-status-line {
  margin-bottom: 2px;
}
.platform-cell, .meta-cell { background: #fff; }
.admin-order-detail {
  display: grid;
  align-content: center;
  gap: 9px;
  color: #2f333a;
  font-size: 20px;
  line-height: 1.25;
}
.admin-order-detail div {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.admin-order-detail span {
  color: #2f333a;
}
.admin-order-detail .admin-accent-value {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.scan-accent-value {
  color: var(--primary);
  font-family: var(--font-cn-medium);
  font-weight: 500;
}
.admin-order-detail .order-merge-no {
  color: var(--accent);
  text-decoration: none;
}
.order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
  align-content: center;
}
.order-actions button, .order-actions .file-button span {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  border-color: #3b8ce2;
  border-radius: 6px;
  background: #3b8ce2;
  color: #fff;
  font-size: 20px;
  line-height: 1.1;
}
.order-actions button:hover, .order-actions .file-button span:hover {
  border-color: var(--primary-dark);
  color: #fff;
  background: var(--primary-dark);
}
.order-actions button:nth-child(1),
.order-actions button:nth-child(2) {
  background: #3b8ce2;
  border-color: #3b8ce2;
  color: #fff;
}
.order-actions button.warn {
  background: #e86d00;
  border-color: #e86d00;
  color: #fff;
}
.order-actions button.scale-action,
.scan-order-actions button.scale-action {
  background: #0f9f7a;
  border-color: #0f9f7a;
  color: #fff;
}
.order-actions button:disabled,
.scan-order-actions button:disabled {
  cursor: wait;
  opacity: .7;
}
.icon-btn {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 12px;
  box-shadow: none;
}

.print-area { display: none; }
@media print {
  /* Rotate finished pages without changing layout, text size or pagination. */
  @page { page-orientation: rotate-right; }
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; padding: 8mm; color: #000; }
}

@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .finance-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-stat-split { grid-template-columns: 1fr; }
  .team-layout { grid-template-columns: 1fr; }
  .service-editor-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
  .service-desc-field { grid-column: 1 / -1; }
  .check-split-layout { grid-template-columns: 1fr; }
  .order-card-grid { grid-template-columns: 130px 180px 1fr 1fr; }
  .order-card-grid > div:nth-child(4) { border-right: none; }
  .order-card-grid > div:nth-child(n + 5) { border-top: 1px solid var(--line); }
}
@media (max-width: 1080px) {
  .login-layout {
    width: min(420px, calc(100vw - 48px));
    grid-template-columns: 1fr;
    gap: 18px;
    transform: none;
  }
  .login-logo-panel {
    min-height: auto;
  }
  .login-logo-panel img {
    width: min(300px, 100%);
    max-height: 96px;
  }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 5; height: auto; display: block; }
  .side-brand { height: 58px; }
  .menu { display: flex; gap: 8px; overflow-x: auto; }
  .menu-group { display: none; }
  .menu button { width: auto; white-space: nowrap; }
  .sidebar-userbar { display: none; }
  .toolbar, .form-grid, .scan-layout, .finance-filter-grid { grid-template-columns: 1fr; }
  .scan-order-card,
  .scan-order-grid { grid-template-columns: 1fr; }
  .content-list-grid { grid-template-columns: 1fr; }
  .toolbar .wide, .form-grid .span2, .form-grid .span4 { grid-column: auto; }
  .team-permission-grid { grid-template-columns: 1fr; }
  .stock-create-modal .form-grid { grid-template-columns: 1fr; }
  .stock-create-modal .span2 { grid-column: auto; }
  .warehouse-modal .form-grid { grid-template-columns: 1fr; }
  .warehouse-modal .span2 { grid-column: auto; }
  .announcement-editor-form,
  .md-editor-grid { grid-template-columns: 1fr; }
  .announcement-title-field,
  .announcement-md-editor,
  .announcement-editor-actions { grid-column: auto; }
  .service-editor-grid { grid-template-columns: 1fr; }
  .service-desc-field { grid-column: auto; }
  .topbar { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-stat-grid { grid-template-columns: 1fr; }
  .order-card-grid { grid-template-columns: 1fr; }
  .order-card-grid > div { border-right: none; border-bottom: 1px solid var(--line); }
  .order-card-grid > div:last-child { border-bottom: none; }
  .batch-bar strong { margin-left: 0; font-size: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 13px; }
  .workspace { padding: 12px; }
  .order-actions { grid-template-columns: 1fr; }
  .login-panel { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* Inventory workbench v289: one full-width surface, clearer owner lookup and layered stock cards. */
#appView .workspace[data-view="products"] {
  padding: 0;
  background: #fff;
}

#appView .workspace[data-view="products"] > .topbar,
#appView .workspace[data-view="products"] > .stats-bar,
#appView .workspace[data-view="products"] > #content {
  width: 100%;
  max-width: none;
  margin: 0;
}

#appView .workspace[data-view="products"] > .topbar {
  min-height: 72px;
  margin: 0;
  padding: 14px 18px 12px;
  background: #fff;
}

#appView .workspace[data-view="products"] > #content {
  min-height: calc(100dvh - 72px);
  background: #fff;
}

#appView .stock-workbench-page {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  background: #fff;
}

#appView .stock-workbench-page > .stock-tabs-panel,
#appView .stock-ledger-page > .stock-tabs-panel {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid #e4e7ec;
  border-radius: 0;
  box-shadow: none;
}

#appView .stock-workbench-page > .stock-tabs-panel .stock-tabs,
#appView .stock-ledger-page > .stock-tabs-panel .stock-tabs {
  margin: 0;
  padding-inline: 0;
  border: 0;
}

#appView .stock-workbench-page > .panel,
#appView .stock-ledger-page > .panel,
#appView .stock-ledger-layout {
  margin: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

#appView .stock-workbench-page > .inbound-review-source-warning {
  margin: 0;
  border-radius: 0;
}

#appView .workspace[data-view="products"] .page-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

#appView .stock-workspace-header-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 4px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fff;
}

#appView .stock-workspace-header-stats .stock-ledger-header-stat {
  display: grid;
  min-width: 82px;
  min-height: 38px;
  grid-template-columns: auto auto;
  align-content: center;
  align-items: baseline;
  justify-content: center;
  gap: 1px 6px;
  padding: 4px 10px;
  border: 0;
  border-right: 1px solid #e4e7ec;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

#appView .stock-workspace-header-stats .stock-ledger-header-stat:last-child { border-right: 0; }
#appView .stock-workspace-header-stats .stock-ledger-header-stat:hover { background: #f8fafc; }
#appView .stock-workspace-header-stats .stock-ledger-header-stat em { color: #667085; font-size: 10px; }
#appView .stock-workspace-header-stats .stock-ledger-header-stat strong { color: #101828; font-size: 16px; }
#appView .stock-workspace-header-stats .stock-ledger-header-stat.warning strong { color: #b54708; }
#appView .stock-workspace-header-stats .stock-ledger-header-stat.info strong { color: #175cd3; }

#appView .stock-owner-workspace {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  background: #fff;
}

#appView .stock-owner-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #e4e7ec;
}

#appView .stock-owner-search {
  display: grid;
  min-width: min(760px, 62vw);
  grid-template-columns: minmax(240px, 1fr) auto auto auto auto;
  gap: 8px;
}

#appView .stock-owner-search input { width: 100%; min-width: 0; }

#appView .stock-owner-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  border-bottom: 1px solid #e4e7ec;
  background: #f8fafc;
}

#appView .stock-owner-kpi {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 12px 16px;
  border-right: 1px solid #e4e7ec;
}

#appView .stock-owner-kpi:last-child { border-right: 0; }
#appView .stock-owner-kpi span { align-self: end; color: #667085; font-size: 11px; }
#appView .stock-owner-kpi strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: #101828; font-size: 22px; font-variant-numeric: tabular-nums; }
#appView .stock-owner-kpi small { color: #98a2b3; font-size: 10px; }
#appView .stock-owner-kpi.warning strong { color: #b54708; }

#appView .stock-aging-details {
  border-bottom: 1px solid #e4e7ec;
  background: #fff;
}

#appView .stock-aging-details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 16px;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

#appView .stock-aging-details > summary small { color: #667085; font-size: 11px; font-weight: 400; }
#appView .stock-aging-details__body { display: grid; grid-template-columns: minmax(520px, 1.25fr) minmax(360px, .75fr); gap: 14px; padding: 0 16px 14px; }
#appView .stock-aging-details__body .aging-buckets { margin: 0; }
#appView .stock-owner-table { flex: 1 1 auto; overflow: auto; }
#appView .stock-owner-table table { min-width: 880px; }
#appView .stock-owner-table th:first-child { width: 28%; }
#appView .stock-owner-table th:nth-child(2) { width: 12%; }
#appView .stock-owner-table th:nth-child(3) { width: 25%; }
#appView .stock-owner-table th:nth-child(4) { width: 19%; }
#appView .stock-owner-table th:last-child { width: 16%; }
#appView .stock-owner-table .stock-customer-row > td { padding-top: 13px; padding-bottom: 13px; }

#appView .stock-ledger-page { gap: 0; }
#appView .stock-ledger-layout { border-top: 0; }
#appView .stock-ledger-sticky-head { box-shadow: 0 1px 0 #e4e7ec; }
#appView .stock-ledger-warehouse-tabs { padding-inline: 16px; }
#appView .stock-ledger-toolbar { padding: 10px 16px; }
#appView .rf-stock-grid { gap: 12px; padding: 14px 16px; background: #fff; }

#appView .rf-stock-card,
#appView .rf-stock-card.warning,
#appView .rf-stock-card.danger {
  min-height: 356px;
  padding: 10px;
  border: 1px solid #e3e7ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .055), 0 8px 18px rgba(16, 24, 40, .035);
}

#appView .rf-stock-card:hover {
  border-color: #c8d0dc;
  box-shadow: 0 3px 8px rgba(16, 24, 40, .075), 0 12px 24px rgba(16, 24, 40, .05);
}

#appView .rf-stock-card__body { gap: 7px; }
#appView .rf-stock-card__name { color: #1d2939; font-size: 14px; font-weight: 700; }
#appView .rf-stock-card__locator { padding: 6px 8px; border: 1px solid #edf0f4; background: #f8fafc; }
#appView .rf-stock-card__locator em { color: #98a2b3; }
#appView .rf-stock-card__locator strong { color: #1d2939; font-weight: 650; }
#appView .rf-stock-card__metrics { min-height: 56px; background: #fff; }
#appView .rf-stock-card__metrics span { color: #667085; }
#appView .rf-stock-card__metrics strong { color: #101828; font-size: 21px; font-weight: 700; }
#appView .rf-stock-card__auto { min-height: 38px; border: 1px solid #eaecf0; background: #f8fafc; }
#appView .rf-stock-card__auto.is-enabled { border-color: #c7d7fe; background: #f5f8ff; }
#appView .rf-stock-card__activity { background: #fff; }
#appView .rf-stock-card__activity strong { color: #1d2939; font-weight: 650; }
#appView .rf-stock-card__footer { padding-top: 7px; }
#appView .rf-stock-card__footer button { min-height: 32px; }

#appView .stock-ledger-log-panel { flex: 1 1 auto; }
#appView .stock-ledger-log-toolbar { align-items: stretch; flex-direction: column; padding: 14px 16px; }
#appView .stock-ledger-log-filters {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(150px, .75fr) minmax(170px, .9fr) minmax(230px, 1.25fr) 150px 140px auto auto;
  align-items: end;
  gap: 8px;
}

#appView .stock-ledger-log-filters > label { display: grid; min-width: 0; gap: 5px; margin: 0; color: #667085; font-size: 10px; }
#appView .stock-ledger-log-filters input,
#appView .stock-ledger-log-filters select { width: 100%; min-width: 0; }
#appView .stock-ledger-log-mine { display: flex !important; min-height: 38px; flex-direction: row; align-items: center; gap: 7px !important; padding: 0 10px; border: 1px solid #d0d5dd; border-radius: 5px; background: #fff; color: #344054 !important; font-size: 12px !important; white-space: nowrap; }
#appView .stock-ledger-log-mine input { width: 16px !important; height: 16px; min-height: 0; margin: 0; accent-color: var(--primary); }
#appView .stock-ledger-log-actions { display: flex; gap: 6px; }

#appView .stock-workbench-page > .inbound-review-summary {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid #e4e7ec;
  background: #f8fafc;
}

@media (max-width: 1400px) {
  #appView .stock-owner-toolbar { align-items: stretch; flex-direction: column; }
  #appView .stock-owner-search { min-width: 0; width: 100%; }
  #appView .stock-ledger-log-filters { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
  #appView .stock-ledger-log-actions { align-self: end; }
}

@media (max-width: 1000px) {
  #appView .stock-owner-kpis { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  #appView .stock-owner-kpi:nth-child(3) { border-right: 0; }
  #appView .stock-owner-kpi:nth-child(-n + 3) { border-bottom: 1px solid #e4e7ec; }
  #appView .stock-aging-details__body { grid-template-columns: 1fr; }
  #appView .stock-owner-search { grid-template-columns: minmax(220px, 1fr) auto auto; }
  #appView .stock-owner-search button:nth-last-child(-n + 2) { grid-row: 2; }
}

@media (max-width: 720px) {
  #appView .workspace[data-view="products"] > .topbar { min-height: auto; padding: 12px; }
  #appView .workspace[data-view="products"] > #content { min-height: calc(100dvh - 64px); }
  #appView .stock-workspace-header-stats { width: 100%; margin: 0; overflow-x: auto; }
  #appView .stock-workspace-header-stats .stock-ledger-header-stat { flex: 1 0 82px; }
  #appView .stock-owner-search { grid-template-columns: 1fr 1fr; }
  #appView .stock-owner-search input { grid-column: 1 / -1; }
  #appView .stock-owner-search button { width: 100%; }
  #appView .stock-owner-kpis { grid-template-columns: 1fr 1fr; }
  #appView .stock-owner-kpi { border-bottom: 1px solid #e4e7ec; }
  #appView .stock-owner-kpi:nth-child(odd) { border-right: 1px solid #e4e7ec; }
  #appView .stock-owner-kpi:nth-child(even) { border-right: 0; }
  #appView .stock-ledger-log-filters { grid-template-columns: 1fr; }
  #appView .stock-ledger-log-actions button { flex: 1 1 0; }
}

.finance-ledger-title,
.announcement-list-title,
.help-list-title {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Product design polish pass: shared admin workbench surface. */
:root {
  --bg: #f4f7fb;
  --surface-soft: #f8fafc;
  --surface-hover: #eef4fb;
  --line: #e1e7ef;
  --line-strong: #cdd7e3;
  --text: #1f2933;
  --muted: #647282;
  --weak: #8c99a8;
  --primary: #0b7cff;
  --primary-dark: #065fca;
  --primary-soft: #e8f2ff;
  --accent: #f59e0b;
  --accent-soft: #fff7e8;
  --success: #0f9f7a;
  --success-soft: #e7f7f2;
  --danger: #ef4444;
  --danger-soft: #fff1f1;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

body {
  background:
    linear-gradient(180deg, #f8fafc 0, #f4f7fb 260px, #f4f7fb 100%);
}

.login-view {
  background:
    radial-gradient(circle at 68% 48%, rgba(11, 124, 255, .08), transparent 30%),
    linear-gradient(180deg, #f8fafc, #f3f6fb);
}
.login-layout {
  width: min(1400px, calc(100vw - 56px));
  grid-template-columns: minmax(620px, 800px) minmax(390px, 430px);
  gap: 82px;
}
.login-logo-panel img {
  width: min(800px, 100%);
  max-height: 270px;
}
.login-panel {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 14px;
  box-shadow: 0 22px 58px rgba(15, 23, 42, .13);
  padding: 36px 38px 34px;
}
.login-panel h1 {
  margin-bottom: 26px;
  font-size: 26px;
  letter-spacing: 0;
}

.app-shell {
  grid-template-columns: 238px minmax(0, 1fr);
}
/* 修复:视觉升级层无条件重设两列会覆盖 1080px 断点的单列,导致平板/窄屏侧栏留大片空白+导航截断。
   在此重申响应式单列(侧栏改顶部横向滚动菜单);并给 grid item 加 min-width:0——否则侧栏(含横向菜单)
   与主区默认 min-width:auto 不收缩,被内容撑破视口造成整页横向溢出/滚动。 */
@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-shell > * { min-width: 0; }
}
.sidebar {
  background: linear-gradient(180deg, #fff 0, #fbfcfe 100%);
  box-shadow: 1px 0 0 rgba(15, 23, 42, .04);
}
.side-brand {
  height: 66px;
  padding: 0 14px;
}
.side-brand-logo {
  width: 112px;
}
.side-brand-role {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #334155;
  font-size: 12px;
}
.menu {
  padding: 10px;
}
.menu-group {
  margin: 16px 0 7px;
  letter-spacing: 0;
}
.menu button {
  position: relative;
  min-height: 38px;
  border-radius: 7px;
  padding: 8px 10px 8px 12px;
  color: #354052;
}
.menu button.active {
  background: #eaf4ff;
  border-color: #c7ddff;
  color: #075fca;
}
.sidebar-userbar {
  gap: 8px;
  padding: 10px;
}
.sidebar-user-card {
  border-radius: 8px;
  background: #f8fafc;
}

.workspace {
  padding: 18px 20px 38px;
}
.topbar {
  min-height: 54px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(225, 231, 239, .9);
  margin-bottom: 12px;
}
.topbar h1 {
  font-size: 22px;
}
.topbar p {
  margin-top: 4px;
  color: #697789;
}

button {
  border-color: var(--line-strong);
  border-radius: 7px;
  color: #253244;
  box-shadow: none;
}
button:hover {
  border-color: #aac5e6;
  background: #f6faff;
}
button.primary,
.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
button.primary:hover,
.primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}
button.danger,
.danger-link {
  color: var(--danger);
}

input,
select,
textarea,
.client-date-range-trigger {
  border-color: var(--line-strong);
  border-radius: 7px;
  background: #fff;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 124, 255, .14);
}

.panel {
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.panel:hover {
  border-color: #d5dfeb;
}
.panel-head {
  min-height: 50px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}
.panel-title {
  font-size: 15px;
}
.panel-desc {
  color: #718096;
}
.panel-body {
  padding: 14px;
}
.toolbar,
.form-grid,
.finance-filter-grid,
.service-editor-grid {
  gap: 10px 12px;
}
label {
  color: #344054;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
table {
  border-collapse: separate;
  border-spacing: 0;
}
th,
td {
  border-bottom-color: #e8edf3;
  padding: 9px 11px;
}
th {
  background: #f8fafc;
  color: #526173;
  font-family: var(--font-cn-medium);
}
tr:hover td {
  background: #fbfdff;
}
.empty {
  color: #7b8795;
}

.order-tabs,
.finance-tabs {
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.order-tabs button,
.finance-tabs button {
  min-height: 34px;
  border-radius: 7px;
}
.order-tabs button.active,
.finance-tabs button.active {
  box-shadow: 0 6px 14px rgba(11, 124, 255, .18);
}
.batch-bar {
  min-height: 48px;
  border-radius: 10px;
  margin: 10px 0;
  padding: 8px 10px;
}
.batch-bar strong {
  font-size: 20px;
}

.order-list {
  gap: 8px;
}
.order-card {
  border-radius: 10px;
}
.order-card:hover {
  border-color: #b8d3ff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}
.order-card.scanned-order-card {
  border-color: #1A7DFF;
  background: #F7FBFF;
  box-shadow: 0 0 0 2px rgba(26, 125, 255, .12), 0 12px 28px rgba(15, 23, 42, .08);
}
.order-card.packed-order-card {
  border-color: #d7dde6;
  background: #f3f4f6;
  box-shadow: none;
}
.order-card.packed-order-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}
.order-card.packed-order-card .order-head,
.order-card.packed-order-card .sign-cell,
.order-card.packed-order-card .platform-cell,
.order-card.packed-order-card .meta-cell,
.order-card.packed-order-card .sku-cell,
.order-card.packed-order-card .order-card-grid > div {
  background: #f3f4f6;
}
.order-card.packed-order-card .order-product-img {
  opacity: .72;
  filter: grayscale(.35);
}
.order-card.packed-order-card:not(.scanned-order-card) {
  opacity: .86;
}
.order-head {
  min-height: 38px;
  padding: 7px 11px;
  background: #fbfdff;
}
.order-head-main {
  gap: 6px 12px;
}
.order-head-main span {
  color: #465568;
}
.order-card-grid {
  grid-template-columns: minmax(122px, .62fr) minmax(150px, .78fr) minmax(174px, .86fr) minmax(238px, 1.04fr) minmax(290px, 1.2fr) minmax(250px, .86fr);
  min-height: 162px;
}
.order-card-grid > div {
  padding: 10px 11px;
}
.sign-cell {
  gap: 9px;
}
.order-product-img {
  max-width: 178px;
}
.sku-cell,
.platform-cell,
.meta-cell {
  line-height: 1.62;
}
.admin-order-detail {
  gap: 7px;
  font-size: 15px;
  line-height: 1.45;
}
.admin-order-detail .order-merge-no {
  color: #f97316;
  font-family: var(--font-cn-medium);
}
.order-actions {
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 7px;
  align-content: center;
}
.order-actions button,
.order-actions button:not(.order-action-primary),
.order-actions .file-button span {
  min-height: 38px;
  border-radius: 7px;
  border-color: #2d86ee;
  background: #2d86ee;
  font-size: 15px;
}
.order-actions button.warn {
  background: #f97316;
  border-color: #f97316;
}

.badge {
  border-radius: 999px;
  font-size: 12px;
}
.badge.green {
  color: #08785d;
  background: #e7f7f2;
}
.badge.red {
  color: #c02626;
  background: #fff1f1;
}
.badge.blue {
  color: #075fca;
  background: #e8f2ff;
}

.modal-mask {
  backdrop-filter: blur(2px);
}
.modal-card {
  border-radius: 12px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .22);
}
.modal-head {
  padding: 17px 20px;
}
.modal-actions {
  padding: 0 20px 18px;
}

@media (max-width: 1420px) {
  .login-layout {
    width: min(1180px, calc(100vw - 48px));
    grid-template-columns: minmax(520px, 680px) minmax(360px, 420px);
    gap: 54px;
  }
  .login-logo-panel img {
    width: min(680px, 100%);
  }
}

@media (max-width: 1080px) {
  .login-layout {
    width: min(430px, calc(100vw - 48px));
    grid-template-columns: 1fr;
    gap: 20px;
    transform: none;
  }
  .login-logo-panel img {
    width: min(320px, 100%);
    max-height: 110px;
  }
  .workspace {
    padding: 14px;
  }
}

/* =====================================================   高级商用视觉升级(统一层)—— 精修核心组件质感
   放在文件末尾,借助层叠覆盖前面的基础样式,不改结构。
   ============================================================ */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* 卡片:柔和描边 + 分层阴影 + 大圆角 */
.panel {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.panel:hover { box-shadow: var(--shadow); }
.panel-head {
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
  border-bottom-color: var(--line);
}
.panel-title { font-weight: 600; letter-spacing: .1px; }

/* 按钮:统一质感;主按钮微渐变 + 品牌阴影 + 悬浮微升 */
button {
  min-height: 36px;
  border-radius: var(--radius-sm);
  border-color: var(--line-strong);
  font-weight: 500;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease,
    box-shadow .16s ease, transform .06s ease;
}
button:hover { border-color: #c2ccd9; background: var(--surface-soft); }
button:active { transform: translateY(.5px); }
button.primary {
  background-image: linear-gradient(180deg, #3b82f6, var(--primary));
  border-color: var(--primary-dark);
  box-shadow: 0 1px 2px rgba(37, 99, 235, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
}
button.primary:hover {
  background-image: linear-gradient(180deg, var(--primary), var(--primary-dark));
  box-shadow: 0 3px 10px rgba(37, 99, 235, .32), inset 0 1px 0 rgba(255, 255, 255, .18);
}
button.danger {
  color: var(--danger-text);
  border-color: #f7c4c4;
  background: var(--danger-soft);
}
button.danger:hover { background: #fde8e8; border-color: #f0a8a8; }
button.ghost { background: #fff; border-color: var(--line-strong); }

/* 侧栏导航:active 左侧强调条 + 柔和底色 */
.menu button {
  position: relative;
  border-radius: var(--radius);
  color: #475569;
}
.menu button:hover { background: var(--surface-hover); color: var(--text); }
.menu button.active {
  background: var(--primary-soft);
  border-color: transparent;
  color: var(--primary-dark);
  font-weight: 600;
}
.menu-group { letter-spacing: .3px; text-transform: none; }

/* 表格:表头更精致,行悬浮更克制 */
th {
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .2px;
  border-bottom-color: var(--line-strong);
}
tr:hover td { background: var(--primary-soft); }
td { color: #334155; }

/* 徽章:精修 pill,更明确的状态色对 */
.badge {
  min-height: 22px;
  padding: 2px 9px;
  font-weight: 600;
  letter-spacing: .2px;
}
.badge.blue { background: var(--primary-soft); color: var(--primary-dark); }
.badge.green { background: var(--success-soft); color: var(--success-text); }
.badge.amber { background: var(--warning-soft); color: var(--warning-text); }
.badge.red { background: var(--danger-soft); color: var(--danger-text); }
.badge.gray { background: #eef1f6; color: #475569; }

/* 输入:统一描边与聚焦环 */
input, select, textarea { border-radius: var(--radius-sm); border-color: var(--line-strong); }
input:hover, select:hover, textarea:hover { border-color: #c2ccd9; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
  outline: none;
}

/* 顶部标题层级更清晰 */
.topbar h1 { font-weight: 600; letter-spacing: -.2px; }

/* 侧栏用户卡与品牌区细节 */
.sidebar-userbar { background: linear-gradient(180deg, #ffffff, var(--surface-soft)); }
.sidebar-user-card, .sidebar-userbar #userBadge { border-color: var(--line); border-radius: var(--radius); }

/* 状态同步指示器与模态更精致 */
.modal-card, .modal-content { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* 导航图标:统一线性图标位 */
.menu button .nav-ic {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-right: 2px;
  color: currentColor;
  opacity: .9;
}
.menu button.active .nav-ic { opacity: 1; }
.menu button > span.nav-label { flex: 1; text-align: left; }

@media (max-width: 1080px) { .login-hero { display: none; } }

.order-load-more { display: flex; justify-content: center; padding: 14px 0 6px; }
.order-load-more button { min-width: 220px; }

/* =====================================================   RootFlow ERP surface v1 · 2026-07-12
   连续业务工作面：冷白画布、克制蓝色、层级阴影，弱化框套框与硬分割线。
   ============================================================ */
:root {
  --bg: #f2f5f9;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-hover: #f2f6fb;
  --line: #e7ecf2;
  --line-strong: #d6dfe9;
  --text: #111827;
  --muted: #66758a;
  --weak: #96a2b2;
  --primary: #146ef5;
  --primary-dark: #0d56c8;
  --primary-soft: #edf4ff;
  --primary-ring: rgba(20, 110, 245, .16);
  --radius-lg: 10px;
  --radius: 7px;
  --radius-sm: 6px;
  --shadow-sm: 0 3px 12px rgba(15, 23, 42, .045), 0 1px 2px rgba(15, 23, 42, .035);
  --shadow: 0 12px 30px rgba(15, 23, 42, .075), 0 2px 6px rgba(15, 23, 42, .04);
  --shadow-lg: 0 28px 72px rgba(15, 23, 42, .2), 0 4px 12px rgba(15, 23, 42, .06);
}

body {
  background:
    linear-gradient(180deg, #f8faff 0, #f3f6fa 200px, #f2f5f9 100%);
}

.app-shell {
  grid-template-columns: 230px minmax(0, 1fr);
}

.sidebar {
  border-right: 0;
  background: linear-gradient(180deg, #fff 0, #fbfcff 62%, #f7f9fc 100%);
  box-shadow: 7px 0 28px rgba(15, 23, 42, .055);
  z-index: 30;
}

.side-brand {
  height: 64px;
  border-bottom: 0;
  padding: 0 15px;
  box-shadow: 0 10px 24px -24px rgba(15, 23, 42, .7);
}

.side-brand-logo { width: 110px; }

.side-brand-role {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #596579;
  font-size: 12px;
}

.menu { padding: 10px 9px 14px; }
.menu-group {
  margin: 15px 9px 5px;
  padding: 0;
  color: #98a3b3;
  font-size: 11px;
  letter-spacing: .04em;
}

.menu button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px 8px 12px;
  color: #475569;
}

.menu button:hover {
  background: #f3f6fb;
  color: #172033;
}

.menu button.active {
  border: 0;
  background: linear-gradient(90deg, #e8f2ff, #f1f6ff);
  color: #0d5fcc;
  box-shadow: 0 5px 14px rgba(20, 110, 245, .08);
}


.sidebar-userbar {
  border-top: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.72), #f7f9fc);
  box-shadow: 0 -12px 24px -26px rgba(15, 23, 42, .75);
}

.sidebar-user-card,
.sidebar-userbar #userBadge {
  border: 0;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.workspace {
  padding: 16px 18px 40px;
  background: transparent;
}

.topbar {
  min-height: 58px;
  align-items: center;
  margin: -16px -18px 14px;
  padding: 13px 18px 12px;
  border-bottom: 0;
  background: linear-gradient(112deg, #fbfdff 0, #f4f8ff 60%, #fffaf5 118%);
  box-shadow: 0 12px 30px -28px rgba(15, 23, 42, .8);
}

.topbar h1 {
  color: #101827;
  font-size: 22px;
  font-weight: 600;
}

.topbar p {
  margin-top: 3px;
  color: #6e7b8e;
}

#content { min-width: 0; }

.panel {
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}

.panel:hover {
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  min-height: 48px;
  border-bottom: 0;
  padding: 11px 14px;
  background: linear-gradient(180deg, #fff, #fcfdff);
  box-shadow: 0 10px 20px -24px rgba(15, 23, 42, .9);
}

.panel-title {
  color: #172033;
  font-size: 15px;
  font-weight: 600;
}

.panel-body { padding: 14px; }

/* 内层区域回归连续工作面，避免设置页式的层层卡片。 */
.panel-body > .panel,
.panel-body > .panel:hover {
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

button {
  border-color: #d5dee9;
  border-radius: 7px;
  background: #fff;
  color: #273449;
  box-shadow: none;
}

button:hover {
  border-color: #a9c4e7;
  background: #f7faff;
  color: #153969;
}

button.primary,
.primary {
  border-color: #146ef5;
  background: #146ef5;
  background-image: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 110, 245, .16);
}

button.primary:hover,
.primary:hover {
  border-color: #0d56c8;
  background: #0d56c8;
  background-image: none;
  box-shadow: 0 7px 18px rgba(20, 110, 245, .22);
}

button:active { transform: translateY(0); }

input,
select,
textarea {
  border-color: #d6dfe9;
  background: #fff;
}

.table-wrap {
  border: 0;
  border-radius: 6px;
  padding: 0 7px 8px;
  background: linear-gradient(180deg, #f8fafc 0, #f4f7fa 100%);
  box-shadow: none;
}

table {
  border-collapse: separate;
  border-spacing: 0 6px;
  background: transparent;
}

thead th {
  border: 0;
  padding: 9px 11px;
  background: linear-gradient(180deg, #f9fbfd, #f3f6fa);
  color: #647286;
}

thead th:first-child { border-radius: 6px 0 0 6px; }
thead th:last-child { border-radius: 0 6px 6px 0; }

tbody tr {
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .055);
  transition: box-shadow .16s ease, transform .16s ease;
}

tbody tr:hover {
  box-shadow: 0 7px 18px rgba(15, 23, 42, .085);
}

tbody td {
  border-bottom: 0;
  padding: 10px 11px;
  background: #fff;
}

tbody tr:hover td { background: #fbfdff; }
tbody td:first-child { border-radius: 6px 0 0 6px; }
tbody td:last-child { border-radius: 0 6px 6px 0; }
tbody td:only-child { border-radius: 6px; }

.badge {
  min-height: 21px;
  border-radius: 5px;
  padding: 2px 7px;
  letter-spacing: 0;
  font-weight: 500;
}

.order-tabs,
.finance-tabs {
  gap: 18px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.order-tabs button,
.finance-tabs button {
  min-height: 38px;
  padding: 5px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #596579;
}

.order-tabs button:hover,
.finance-tabs button:hover {
  border: 0;
  background: transparent;
  color: #146ef5;
}

.order-tabs button.active,
.finance-tabs button.active,
.order-tabs button.active:hover,
.finance-tabs button.active:hover {
  border: 0;
  background: transparent;
  color: #146ef5;
  box-shadow: inset 0 -2px #146ef5;
}

.order-tabs button.active span {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #146ef5;
}

.batch-bar {
  border: 0;
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.order-list { gap: 10px; }

.order-card {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .06);
}

.order-card:hover {
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .1);
}

.order-head {
  border-bottom: 0;
  background: linear-gradient(180deg, #fff, #fbfcff);
  box-shadow: 0 9px 18px -23px rgba(15, 23, 42, .9);
}

.order-card-grid > div {
  border-right: 0;
  background: #fff;
}

.order-card-grid > div:nth-child(even) { background: #fbfcfe; }
.order-card-grid > div:last-child { border-right: 0; }
.sign-cell,
.platform-cell,
.meta-cell { background: #fbfcfe; }

.order-product-img {
  border: 0;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}

.order-actions button,
.order-actions .file-button span {
  border-color: #146ef5;
  background: #146ef5;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(20, 110, 245, .13);
}

.modal-mask {
  background: rgba(15, 23, 42, .44);
  backdrop-filter: none;
}

.modal-card,
.modal-content {
  border: 0;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  border-bottom: 0;
  background: linear-gradient(112deg, #fff, #f5f8ff);
  box-shadow: 0 12px 24px -28px rgba(15, 23, 42, .95);
}

.modal-head .modal-close {
  min-width: 0;
  min-height: 32px;
  padding: 4px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #66758a;
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
}

.modal-head .modal-close:hover {
  border: 0;
  background: transparent;
  color: #0d56c8;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.modal-actions {
  border-top: 0;
  background: #fff;
  box-shadow: 0 -12px 24px -28px rgba(15, 23, 42, .95);
}

/* 真实品牌资产驱动的等待态；不再使用通用转圈。 */
.page-loading {
  min-height: min(480px, calc(100vh - 170px));
  display: grid;
  place-items: center;
  padding: 56px 20px;
  color: var(--muted);
}

.page-loading-brand {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 26px 34px;
  text-align: center;
}

.page-loading-brand img {
  width: 118px;
  height: auto;
  display: block;
  margin-bottom: 5px;
  filter: drop-shadow(0 8px 18px rgba(20, 110, 245, .16));
  transform-origin: center;
  animation: logistics-brand-breathe 1.45s ease-in-out infinite;
}

.page-loading-brand strong {
  color: #243149;
  font-family: var(--font-cn-medium);
  font-size: 14px;
  font-weight: 500;
}

.page-loading-brand span {
  color: var(--muted);
  font-size: 12px;
}

.page-loading-dot { display: none; }

@keyframes logistics-brand-breathe {
  0%, 100% { opacity: .62; transform: translateY(2px) scale(.97); }
  50% { opacity: 1; transform: translateY(-2px) scale(1.015); }
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { box-shadow: 0 7px 24px rgba(15, 23, 42, .06); }
  .topbar { margin: -14px -14px 12px; padding-inline: 14px; }
  .table-wrap { padding-inline: 5px; }
  .order-card-grid > div { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .page-loading-brand img { animation: none; opacity: 1; transform: none; }
  tbody tr { transition: none; }
}

/* A single outline preserves keyboard focus without stacking legacy shadow rings. */
button:focus-visible,
a:focus-visible,
.file-button span:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* =====================================================   RootFlow ERP interaction closure · 2026-07-12
   Receipt dialogs, unified media viewer and continuous work surface.
   ============================================================ */
.workspace {
  padding: 0 0 40px;
  background: #fff;
  box-shadow: inset 12px 0 28px -34px rgba(15, 23, 42, .72);
}

.topbar {
  min-height: 64px;
  margin: 0 0 12px;
  padding: 13px 18px 12px;
}

#content {
  padding: 0 14px 40px;
  background: #fff;
}

.aging-card,
.scan-order-card {
  border: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .055);
}

.rootflow-product-details,
.rootflow-forecast-info {
  border-top: 0;
  box-shadow: inset 0 10px 18px -24px rgba(15, 23, 42, .9);
}

.empty {
  border: 0 !important;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff, #f8faff);
  box-shadow: 0 5px 16px rgba(15, 23, 42, .05);
}

.center-toast,
.client-toast {
  left: auto;
  top: auto;
  right: 24px;
  bottom: 24px;
  min-width: 220px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 15px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  color: #26344a;
  text-align: left;
  font-family: var(--font-cn);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16), 0 1px 3px rgba(15, 23, 42, .06);
  transform: translateY(12px) scale(.985);
}

.center-toast.visible,
.client-toast.show {
  transform: translateY(0) scale(1);
}

.center-toast.success,
.client-toast.success {
  background: linear-gradient(135deg, #fff, #f1fbf6);
  color: #176b49;
}

.center-toast.error,
.client-toast.error {
  background: linear-gradient(135deg, #fff, #fff3f2);
  color: #b42318;
}

.center-toast.loading,
.client-toast.loading {
  background: linear-gradient(135deg, #fff, #edf4ff);
  color: #0d56c8;
}

.erp-dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, .46);
}

.erp-dialog-card {
  width: min(460px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 30px 82px rgba(15, 23, 42, .26), 0 5px 16px rgba(15, 23, 42, .08);
}

.erp-dialog-head {
  padding: 21px 22px 14px;
  background: linear-gradient(112deg, #fff 0, #f4f8ff 72%, #fffaf5 120%);
  box-shadow: 0 12px 24px -28px rgba(15, 23, 42, .95);
}

.erp-dialog-kicker {
  display: block;
  margin-bottom: 6px;
  color: #146ef5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}

.erp-dialog-card h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.erp-dialog-body { padding: 5px 22px 20px; }

.erp-dialog-copy {
  margin: 0;
  color: #526176;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.erp-dialog-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: #3f4d61;
  font-size: 12px;
  font-weight: 500;
}

.erp-dialog-input {
  min-height: 42px;
  border-color: #d5deea;
  border-radius: 7px;
  background: #fbfcff;
  font-size: 14px;
}

.erp-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px 18px;
  background: #fbfcfe;
  box-shadow: 0 -12px 24px -30px rgba(15, 23, 42, .9);
}

.erp-dialog-button {
  min-width: 84px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  font-weight: 500;
}

.erp-dialog-button--ghost { background: #eef2f6; color: #4b5b70; }
.erp-dialog-button--primary { background: #146ef5; color: #fff; box-shadow: 0 6px 16px rgba(20, 110, 245, .18); }
.erp-dialog-button--danger { background: #d83a32; color: #fff; box-shadow: 0 6px 16px rgba(216, 58, 50, .16); }
.erp-dialog-mask.tone-danger .erp-dialog-kicker,
.erp-dialog-mask.tone-error .erp-dialog-kicker { color: #c4322a; }
.erp-dialog-mask.tone-warning .erp-dialog-kicker { color: #c06a12; }

html.erp-overlay-locked,
body.erp-overlay-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

.erp-media-viewer-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 13, 23, .9);
}

.erp-media-viewer {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  outline: none;
}

.erp-media-viewer__stage {
  position: relative;
  width: min(calc(100dvw - 176px), 1040px);
  height: min(calc(100dvh - 112px), 820px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(35, 105, 220, .16), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
}

.erp-media-viewer__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(calc(100dvw - 176px), 1040px);
  max-height: min(calc(100dvh - 112px), 820px);
  object-fit: contain;
  border-radius: 6px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 26px 70px rgba(0,0,0,.34);
  transform-origin: center;
  opacity: 0;
  transition: transform .14s ease, opacity .16s ease;
}

.erp-media-viewer__stage[data-media-state="ready"] {
  width: fit-content;
  height: fit-content;
  background: transparent;
}

.erp-media-viewer__stage[data-media-state="ready"] .erp-media-viewer__image { opacity: 1; }

.erp-media-viewer__status {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(340px, calc(100% - 40px));
  padding: 19px 22px;
  border-radius: 8px;
  background: rgba(9, 16, 28, .84);
  color: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
  text-align: center;
  transform: translate(-50%, -50%);
  transition: opacity .16s ease, visibility .16s ease;
}

.erp-media-viewer__status::before {
  content: "";
  width: 122px;
  height: 38px;
  border-radius: 8px;
  background: #fff url("/static/ryvoflow-logo.svg") center / 104px auto no-repeat;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .24), 0 0 0 1px rgba(255, 255, 255, .12);
  transform-origin: center;
  animation: logistics-brand-breathe 1.45s ease-in-out infinite;
}

.erp-media-viewer__status strong { font-size: 15px; font-weight: 600; }
.erp-media-viewer__status span { color: #b9c5d6; font-size: 12px; line-height: 1.55; }
.erp-media-viewer__status button {
  display: none;
  min-width: 92px;
  min-height: 36px;
  margin-top: 4px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #0d56c8;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.erp-media-viewer__stage[data-media-state="ready"] .erp-media-viewer__status {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.erp-media-viewer__stage[data-media-state="error"] .erp-media-viewer__status::before {
  width: 122px;
  background: #fff url("/static/ryvoflow-logo.svg") center / 104px auto no-repeat;
  filter: grayscale(.18);
  opacity: .72;
  animation: none;
}

.erp-media-viewer__stage[data-media-state="error"] .erp-media-viewer__status button { display: inline-flex; align-items: center; justify-content: center; }

.erp-media-viewer__close,
.erp-media-viewer__nav,
.erp-media-viewer__meta {
  position: absolute;
  z-index: 2;
  border: 0;
  border-radius: 6px;
  background: rgba(10, 15, 24, .82);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.erp-media-viewer__close {
  top: 20px;
  right: 22px;
  min-width: 66px;
  min-height: 36px;
  opacity: .62;
}

.erp-media-viewer:hover .erp-media-viewer__close,
.erp-media-viewer__close:focus-visible { opacity: 1; }

.erp-media-viewer__nav {
  top: 50%;
  min-width: 72px;
  min-height: 40px;
  transform: translateY(-50%);
}

.erp-media-viewer__nav--prev { left: 22px; }
.erp-media-viewer__nav--next { right: 22px; }

.erp-media-viewer__meta {
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 10px;
  padding: 8px 11px;
  color: #d8e0eb;
  font-size: 12px;
  transform: translateX(-50%);
}

[role="button"][tabindex="0"]:focus-visible,
.stock-image-uploader:focus-visible,
.recharge-drop-zone:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(20, 110, 245, .78) !important;
}

.copyable-number {
  width: auto;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.copyable-number:hover {
  border: 0;
  background: transparent;
  color: #0d56c8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.platform-mark,
.order-merge-no {
  color: #146ef5;
  font-family: var(--font-cn-medium);
  font-weight: 500;
}

.product-title-clamp {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.45;
}

@media (max-width: 1280px) {
  .order-card-grid > div:nth-child(n + 5) { border-top: 0; }
}

@media (max-width: 1080px) {
  .workspace { padding: 0 0 32px; }
  .topbar { margin: 0 0 10px; padding-inline: 14px; }
  #content { padding-inline: 10px; }
  .menu { scrollbar-width: none; -ms-overflow-style: none; }
  .menu::-webkit-scrollbar { display: none; }
}

@media (max-width: 860px) {
  #appView .batch-workflow {
    flex-wrap: wrap;
    overflow: visible;
  }
  #appView .batch-flow-step {
    flex: 1 1 calc(50% - 4px);
    min-width: 150px;
  }
  #appView .batch-step-arrow { display: none; }
  #appView .batch-work-area { align-items: stretch; }
  #appView .batch-work-area .batch-aux-action { width: 100%; }
}

@media (max-width: 640px) {
  .erp-dialog-mask { padding: 12px; }
  .erp-dialog-head { padding: 18px 17px 12px; }
  .erp-dialog-body { padding: 4px 17px 16px; }
  .erp-dialog-actions { padding: 12px 17px 16px; }
  .erp-media-viewer__stage { width: min(calc(100dvw - 24px), 1040px); height: min(calc(100dvh - 128px), 820px); }
  .erp-media-viewer__image { max-width: min(calc(100dvw - 24px), 1040px); max-height: min(calc(100dvh - 128px), 820px); }
  .erp-media-viewer__nav { top: auto; bottom: 18px; transform: none; }
  .erp-media-viewer__nav--prev { left: 14px; }
  .erp-media-viewer__nav--next { right: 14px; }
  .erp-media-viewer__meta { bottom: 66px; }
  .center-toast,
  .client-toast { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .erp-media-viewer__image { transition: none; }
  .erp-media-viewer__status::before { animation: none; }
}

/* =====================================================   RootFlow ERP P2 closure · density, action hierarchy and touch.
   ============================================================ */
.menu-reminder {
  border-radius: 5px;
  box-shadow: 0 2px 7px rgba(216, 58, 50, .16);
}

table { border-spacing: 0 4px; }

tbody tr,
tbody tr:hover,
.order-card,
.order-card:hover,
.scan-order-card,
.scan-order-card:hover,
.aging-card,
.aging-card:hover {
  transform: none;
}

tbody tr {
  box-shadow: 0 2px 9px rgba(15, 23, 42, .045), 0 1px 2px rgba(15, 23, 42, .025);
}

tbody tr:hover {
  box-shadow: 0 4px 13px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .03);
}

td.empty {
  padding-block: 28px;
  color: #7d899a;
  background: linear-gradient(135deg, #fff, #f8faff);
  box-shadow: none;
}

.panel.empty {
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 24px;
}

.order-actions button,
.order-actions .file-button span {
  border-color: transparent;
  background: #f2f5f8;
  color: #435168;
  box-shadow: none;
}

.order-actions button:hover,
.order-actions button:not(.order-action-primary):hover,
.order-actions .file-button span:hover {
  border-color: transparent;
  background: #e8eef5;
  color: #16243a;
  box-shadow: none;
}

.order-actions .order-action-primary,
.order-actions .order-action-primary:hover {
  border-color: #146ef5;
  background: #146ef5;
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 110, 245, .16);
}

.order-actions .order-action-primary:hover {
  border-color: #0d56c8;
  background: #0d56c8;
}

.order-actions .order-action-danger,
.order-actions .order-action-danger:hover {
  border-color: transparent;
  background: #fff1f0;
  color: #c4322a;
  box-shadow: none;
}

.order-actions button.warn,
.order-actions button.warn:hover {
  border-color: transparent;
  background: #fff4e8;
  color: #b45d09;
  box-shadow: none;
}

.order-actions button.scale-action,
.order-actions button.scale-action:hover,
.scan-order-actions button.scale-action,
.scan-order-actions button.scale-action:hover {
  border-color: transparent;
  background: #eaf8f3;
  color: #08785d;
  box-shadow: none;
}

.erp-dialog-actions { flex-wrap: wrap; }

.erp-media-viewer-mask {
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}

.erp-media-viewer__stage {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.erp-media-viewer__meta {
  max-width: calc(100vw - 32px);
  white-space: nowrap;
}

@media (pointer: coarse) {
  .erp-media-viewer__close,
  .erp-media-viewer__nav {
    min-height: 44px;
  }
  .erp-media-viewer__close { min-width: 72px; opacity: 1; }
  .erp-media-viewer__nav { min-width: 88px; }
}

@media (max-width: 640px) {
  .erp-dialog-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  .erp-dialog-actions .erp-dialog-button { width: 100%; min-height: 42px; }
  .erp-media-viewer__meta { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.inbound-review-guidance,
.inbound-review-source-warning {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.55;
}

.inbound-review-guidance {
  border: 1px solid #b8d5ff;
  background: #eff6ff;
  color: #175cd3;
}

.inbound-review-source-warning {
  border: 1px solid #fedf89;
  background: #fffaeb;
  color: #93370d;
}

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

.inbound-review-stat {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.inbound-review-stat.is-filter {
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}

.inbound-review-stat.is-filter:hover {
  border-color: #84adff;
  background: #f8fbff;
  box-shadow: 0 4px 12px rgba(16, 24, 40, .08);
  transform: translateY(-1px);
}

.inbound-review-stat.is-filter:focus-visible {
  outline: 3px solid rgba(0, 91, 255, .22);
  outline-offset: 2px;
}

.inbound-review-stat.is-filter.active {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: inset 0 -2px 0 var(--primary), 0 4px 12px rgba(0, 91, 255, .10);
}

.inbound-review-stat span {
  color: var(--muted);
  font-size: 13px;
}

.inbound-review-stat strong {
  margin-left: auto;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.inbound-review-stat small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.inbound-review-stat.amber strong { color: #b54708; }
.inbound-review-stat.green strong { color: #067647; }
.inbound-review-stat.red strong { color: #b42318; }

.inbound-review-toolbar input:not([type="checkbox"]) {
  width: min(360px, 42vw);
}

.inbound-review-tracking {
  color: #175cd3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.inbound-review-note {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbound-review-product-meta {
  margin-top: 2px;
}

.inbound-review-result {
  display: grid;
  gap: 3px;
  max-width: 220px;
}

.inbound-review-result span {
  overflow-wrap: anywhere;
}

.inbound-review-result small {
  color: var(--muted);
  line-height: 1.45;
}

.inbound-review-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .inbound-review-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inbound-review-stat {
    min-height: 68px;
  }

  .inbound-review-toolbar input:not([type="checkbox"]) {
    width: 260px;
  }
}

/* Final responsive audit: keep the desktop split login truly centered and
   prevent dense editor tables or dialogs from being clipped on narrow screens. */
.login-layout { transform: none; }

.modal-card {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-head .modal-close {
  width: auto;
  min-width: 44px;
  min-height: 36px;
  padding-inline: 8px;
  white-space: nowrap;
}

@media (pointer: coarse) {
  .modal-head .modal-close { min-height: 44px; }
}

@media (max-width: 640px) {
  .modal-mask { padding: 12px; }
  .modal-card {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .content-list-grid .table-wrap {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
  .content-list-grid table { min-width: 620px; }
}

/* Final surface pass v7: content-height rows and viewport-safe dialog chrome. */
.order-card-grid {
  min-height: 0;
}

.modal-card,
.erp-dialog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card > .modal-head,
.modal-card > .modal-actions,
.erp-dialog-card > .erp-dialog-head,
.erp-dialog-card > .erp-dialog-actions {
  flex: 0 0 auto;
}

.modal-card > .panel-body,
.modal-card > .camera-body,
.erp-dialog-card > .erp-dialog-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-head > div,
.erp-dialog-head > div {
  min-width: 0;
}

.modal-head h3,
.erp-dialog-head h2 {
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  .order-card-grid {
    gap: 2px;
    background: #f2f5f8;
  }

  .order-card-grid > div {
    border: 0;
    background: #fff;
  }
}

@media (pointer: coarse) {
  .menu button,
  .order-tabs button,
  .finance-tabs button,
  .row-actions button,
  .actions button,
  .file-button span {
    min-height: 44px;
  }
}

/* =====================================================   RootFlow logistics final closure v9 · continuous work surface.
   Keep dense ERP information readable while removing the last hard seams.
   ============================================================ */
.panel-head,
.topbar,
.actions,
.row-actions {
  min-width: 0;
}

.panel-head > *,
.topbar > * {
  min-width: 0;
}

.panel-head {
  gap: 10px 14px;
  flex-wrap: wrap;
}

.panel-head .actions,
.row-actions,
.actions {
  align-items: center;
}

.panel-desc,
.topbar p,
.empty,
.inline-error,
.form-error {
  overflow-wrap: anywhere;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 40px;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.table-wrap:focus-within {
  box-shadow: inset 0 0 0 1px rgba(20, 110, 245, .11);
}

tbody tr,
.order-card,
.scan-order-card,
.aging-card {
  isolation: isolate;
}

.panel > .empty,
.panel-body > .empty,
.inline-error:not(:empty),
.form-error:not(:empty) {
  border: 0;
  border-radius: 7px;
}

.inline-error:not(:empty),
.form-error:not(:empty) {
  padding: 9px 11px;
  background: linear-gradient(135deg, #fff8f7, #fff2f1);
  color: #b8322a;
  box-shadow: inset 3px 0 #df5148, 0 3px 10px rgba(180, 45, 36, .055);
}

@media (max-width: 1080px) {
  .login-logo-panel img.login-hero {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar .userbar,
  .panel-head .actions {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .topbar .userbar::-webkit-scrollbar,
  .panel-head .actions::-webkit-scrollbar {
    display: none;
  }

  .panel-head {
    padding-inline: 12px;
  }

  .panel-body {
    padding-inline: 12px;
  }

  .table-wrap {
    padding-inline: 5px;
    scrollbar-gutter: auto;
  }

  .modal-actions,
  .erp-dialog-actions {
    gap: 8px;
  }
}

@media (pointer: coarse) {
  button,
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  .file-button span,
  .modal-head .modal-close {
    min-height: 44px;
  }
}

/* ── 库存管理:子 Tab(库存审核 / 库存商品)与按用户两级展示 ── */
.stock-tabs-panel {
  padding: 4px 18px 0;
}

.stock-tabs {
  display: flex;
  gap: 18px;
  padding: 0 2px;
}

.stock-tabs .stock-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 5px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #596579;
  font-weight: 600;
  cursor: pointer;
}

.stock-tabs .stock-tab:hover {
  color: #146ef5;
}

.stock-tabs .stock-tab.active {
  color: #146ef5;
  box-shadow: inset 0 -2px #146ef5;
}

.stock-tab-badge {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f5a524;
  color: #fff;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

/* 一级:用户汇总行,整行可点开 */
.stock-customer-row {
  cursor: pointer;
}

.stock-customer-row:hover {
  background: #f6f9ff;
}

.stock-customer-row.open {
  background: #f2f7ff;
}

.stock-caret {
  display: inline-block;
  width: 16px;
  color: #8a94a6;
}

/* 二级:展开后的该用户库存明细 */
.stock-detail-wrap > td {
  padding: 0 0 12px;
  background: #fafbfd;
}

.stock-detail-table {
  width: 100%;
}

.stock-detail-table th {
  font-size: 12px;
  color: #6b7280;
}

/* 触屏基线:.stock-tab 的 min-height:38px 特异度高于末尾 @media(pointer:coarse) 的 button 规则,
   不在这里重申会把 Tab 的可点区压到 38px,破坏项目统一的 44px 触控标准 */
@media (pointer: coarse) {
  .stock-tabs .stock-tab {
    min-height: 44px;
  }
}

/* 库存设置 Tab 的设置项网格 */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px 18px 20px;
}

.settings-item {
  padding: 14px 16px;
  border: 1px solid #e8ecf3;
  border-radius: 10px;
  background: #fbfcfe;
  min-width: 0;
}

.settings-label {
  font-size: 13px;
  color: #6b7280;
}

.settings-value {
  margin: 4px 0 6px;
  font-size: 22px;
  font-weight: 600;
  color: #146ef5;
}

/* =====================================================   订单卡片重构(2026-08-04)
   问题:6 列硬网格 + 13 个等大按钮(各 48px 高)+ 无条件渲染空占位,
   卡片高 300px+,1600px 宽屏一屏只能看 2 单。仓库每天几百单,翻页翻到手酸。
   目标:一屏 4~5 单,一眼看清"这单该干什么"。
   ============================================================ */

/* 网格改自适应:窄屏自动堆叠,不再被 6 个 minmax 撑爆 */
.order-card-grid {
  grid-template-columns: minmax(150px, .8fr) 92px minmax(190px, 1.1fr) minmax(180px, 1fr) minmax(210px, 1.15fr) minmax(232px, 1fr);
  min-height: 0;
}

.order-card-grid > div {
  padding: 10px 12px;
}

/* 商品图要大:仓库靠图核对"是不是这个货",太小根本看不清 */
.order-card-grid .product-thumb,
.order-card-grid .product-thumb-button {
  width: 150px;
  height: 200px;
}

.order-card-grid .empty-thumb {
  width: 150px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: #b6bfcc;
  font-size: 12px;
}

/* 商品参数行压紧 */
.rootflow-product-details {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.rootflow-product-details > div {
  display: flex;
  gap: 6px;
}

.rootflow-product-details span {
  color: #8a94a6;
  min-width: 30px;
}

/* ---- 操作区:主次分明 ---- */
.order-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-content: start;
  justify-content: center;
}

.oa-primary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 6px;
}

/* 主操作:蓝色实心,一眼看到"下一步做什么" */
.order-actions .oa-primary-row button {
  min-height: 40px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #2f7fe0;
  background: linear-gradient(180deg, #4a97e8, #2f7fe0);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.order-actions .oa-primary-row button:hover {
  filter: brightness(1.06);
}

.order-actions .oa-primary-row .oa-scale {
  border-color: #1d9d74;
  background: linear-gradient(180deg, #2fb98c, #1d9d74);
}

/* 次操作:描边淡色,不抢视线 */
.oa-secondary-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.order-actions .oa-secondary-row button {
  min-height: 32px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: #46536b;
  font-size: 12px;
  cursor: pointer;
}

.order-actions .oa-secondary-row button:hover {
  border-color: #9dbdf0;
  color: #1f6fd0;
  background: #f4f9ff;
}

/* 低频操作折叠,默认不占版面 */
.oa-more > summary {
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  color: #7b8598;
  text-align: center;
  padding: 4px;
  border-radius: 6px;
  user-select: none;
}

.oa-more > summary::-webkit-details-marker { display: none; }
.oa-more > summary::after { content: " ▾"; }
.oa-more[open] > summary::after { content: " ▴"; }
.oa-more > summary:hover { background: #f2f5f9; color: #46536b; }

.oa-more-grid,
.oa-auxiliary-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.order-actions .oa-more-grid button,
.order-actions .oa-auxiliary-row button {
  min-height: 32px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: #46536b;
  font-size: 12px;
  cursor: pointer;
}

.order-actions .oa-more-grid button.warn,
.order-actions .oa-auxiliary-row button.warn {
  border-color: #f0c36d;
  color: #a9741b;
}

.order-actions .oa-more-grid button.danger,
.order-actions .oa-auxiliary-row button.danger {
  border-color: #f0a9a9;
  color: #c0392b;
}

/* 签收区压缩:原来 align-content:center + gap 12px 把卡片撑高 */
.order-card-grid .sign-cell {
  gap: 6px;
  align-content: start;
  padding-top: 12px;
}

.order-card-grid .sign-cell button.primary {
  min-height: 34px;
  padding: 0 14px;
}

/* 触屏仍保 44px 可点区 */
@media (pointer: coarse) {
  .order-actions .oa-primary-row button { min-height: 44px; }
  .order-actions .oa-secondary-row button,
  .order-actions .oa-more-grid button { min-height: 40px; }
}

/* 窄屏(笔记本/平板)自动堆叠,不再横向溢出 */
@media (max-width: 1400px) {
  .order-card-grid {
    grid-template-columns: minmax(140px, .9fr) 72px minmax(180px, 1.1fr) minmax(180px, 1fr) minmax(200px, 1.1fr);
  }
  .order-card-grid .order-actions {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }
  .oa-secondary-row, .oa-more-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 商品图放大到 150px:仓库拣货/核对全靠这张图,小图看不清。
   (之前无图是因为同步时 skipProductEnrichment=True 关掉了图片补齐,已在 app.py 修复) */
.order-card-grid .order-product-img {
  width: 150px;
  max-width: 150px;
  height: 200px;          /* 3:4 竖版 —— Ozon 原图多为 1024x1536,横版会把商品压扁 */
  object-fit: contain;
  background: #fafbfd;
  cursor: zoom-in;
}

.order-card-grid .order-product-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #b6bfcc;
  border-style: dashed;
  background: #fafbfd;
}

.order-card-grid .order-product-image-repair {
  appearance: none;
  flex-direction: column;
  gap: 5px;
  border: 1px dashed #98a2b3;
  color: #344054;
  cursor: pointer;
  line-height: 1.3;
  padding: 10px;
}
.order-card-grid .order-product-image-repair:hover,
.order-card-grid .order-product-image-repair:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  background: #f5f9ff;
}
.order-card-grid .order-product-image-repair small {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 400;
}
.order-card-grid .order-product-image-unverified {
  flex-direction: column;
  gap: 5px;
  border: 1px dashed #98a2b3;
  color: #667085;
  line-height: 1.3;
  padding: 10px;
  text-align: center;
}

/* 订单页扫码台作为高频作业入口，保持直接展开。 */
.inline-scan-desk {
  margin: 0 0 12px;
}

.inline-scan-desk > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #46536b;
  font-size: 13px;
  user-select: none;
}

.inline-scan-desk > summary::-webkit-details-marker { display: none; }
.inline-scan-desk > summary::before { content: "⌨ "; }
.inline-scan-desk > summary::after { content: " ▾"; color: #8a94a6; }
.inline-scan-desk[open] > summary::after { content: " ▴"; }
.inline-scan-desk > summary:hover { border-color: #9dbdf0; color: #1f6fd0; }
.inline-scan-desk[open] > summary { margin-bottom: 8px; }

/* 单号是仓库最常读/最常复制的信息,给足视觉权重 */
.order-card-grid .sign-cell .copyable-number {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
}

.order-card-grid .tracking-label {
  font-size: 11px;
  color: #8a94a6;
}

/* 需要人处理的事标红提示,而不是显示一个"未选服务"的静默占位 */
.need-action {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4e5;
  border: 1px solid #f0c36d;
  color: #a9741b;
  font-size: 11px;
}

/* 预报信息块压紧行距 */
.rootflow-forecast-info {
  display: grid;
  gap: 3px;
  font-size: 12px;
}

.rootflow-forecast-info > div {
  display: flex;
  gap: 6px;
}

.rootflow-forecast-info span {
  color: #8a94a6;
  min-width: 52px;
}

.rootflow-forecast-info .forecast-status-line {
  margin-bottom: 2px;
}

/* 卡片高度收口:实测各列内容只有 120px 左右,却被操作区的按钮总高拉到 218px。
   仓库一天翻几百单,每单省 60px = 少滚一半的屏。 */
.order-actions {
  gap: 6px;
  justify-content: start;
  padding-top: 12px;
}

.order-actions .oa-primary-row button { min-height: 34px; font-size: 12.5px; }
.order-actions .oa-secondary-row button,
.order-actions .oa-more-grid button { min-height: 28px; font-size: 11.5px; }
.oa-more > summary { padding: 2px; font-size: 11.5px; }

/* 商品名两行截断即可,不要为长俄文标题留一大片空 */
.sku-cell .product-title-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

/* 各列顶部对齐,不再垂直居中留白 */
.order-card-grid > div {
  align-content: start;
}

@media (pointer: coarse) {
  .order-actions .oa-primary-row button { min-height: 42px; }
  .order-actions .oa-secondary-row button,
  .order-actions .oa-more-grid button { min-height: 38px; }
}

/* .rootflow-forecast-info > div 是 flex,会把 need-action 拉成通栏,改为自适应宽度 */
.rootflow-forecast-info .need-action {
  align-self: start;
  width: fit-content;
}

/* 抽检单左右分栏原来固定 1:1。实际常态是"未处理很少、已处理很多"(线上 0 vs 573),
   空栏白占半屏,而真正要看的 573 条被挤在右边一半宽度里。改成按有无数据自适应。 */
.check-split-layout.no-pending {
  grid-template-columns: minmax(240px, .32fr) minmax(0, 1fr);
}

.check-split-layout.no-handled {
  grid-template-columns: minmax(0, 1fr) minmax(240px, .32fr);
}

/* 空栏给正向反馈而不是冷冰冰的"暂无":仓库看到"暂无"会怀疑是没加载出来 */
.check-list-panel .empty {
  color: #7b8598;
}

.check-list-panel.pending .empty {
  color: #1d9d74;
  font-weight: 600;
}

/* 退货操作:主操作(下一步)突出,其余收进「其它」 */
.return-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.return-actions .ra-more > summary {
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  color: #7b8598;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  user-select: none;
  white-space: nowrap;
}

.return-actions .ra-more > summary::-webkit-details-marker { display: none; }
.return-actions .ra-more > summary::after { content: " ▾"; }
.return-actions .ra-more[open] > summary::after { content: " ▴"; }
.return-actions .ra-more > div {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* 批量结果弹窗要能完整列出失败单(可能十几条),保留换行并允许滚动/选中复制 */
.erp-dialog-copy {
  white-space: pre-wrap;
  text-align: left;
  max-height: 46vh;
  overflow-y: auto;
  user-select: text;
}

/* 图片列留够宽度容纳 150px 大图 */
.order-card-grid {
  grid-template-columns: minmax(150px, .8fr) 162px minmax(190px, 1.1fr) minmax(180px, 1fr) minmax(210px, 1.15fr) minmax(232px, 1fr);
}

@media (max-width: 1400px) {
  .order-card-grid {
    grid-template-columns: minmax(140px, .9fr) 150px minmax(180px, 1.1fr) minmax(180px, 1fr) minmax(200px, 1.1fr);
  }
}

/* 商品名:中文在上、大而清晰(仓库靠它认货),俄文原名小字在下备查 */
.product-name-cn {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2a3d;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-name-ru {
  color: #98a1b0;
  font-size: 11.5px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 面单打印状态:批量打 100 张遇到卡纸时,靠这个区分哪些已经打过、避免重复贴单 */
.label-printed { color: #1d9d74; font-weight: 600; }
.label-unprinted { color: #a9741b; }

/* 需抽检标记:仓库封箱前必须一眼看到,否则开箱拍照的单会被直接封走 */
.check-order-flag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fdecea;
  border: 1px solid #f0a9a9;
  color: #c0392b;
  font-size: 11px;
  font-weight: 600;
}

/* 拍照:与签收/打印/称重同级的高频操作,用紫色区分(出库凭证、异常留痕都靠它) */
.order-actions .oa-primary-row .oa-camera {
  border-color: #7c5cd6;
  background: linear-gradient(180deg, #9273e4, #7c5cd6);
}

/* 快捷键设置输入框:点一下再按键即可捕获 */
.hotkey-input {
  width: 130px;
  text-align: center;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  background: #f7f9fc;
}

.hotkey-input:focus {
  background: #fff;
  border-color: #2f7fe0;
  box-shadow: 0 0 0 3px rgba(47, 127, 224, .15);
}

/* 抽检单:未处理/已处理改 Tab(左右分栏太占地方) */
.check-tabs-bar { display: flex; gap: 8px; margin: 12px 0 0; }
.check-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border: 1px solid var(--border, #d9dbe0); border-bottom: none;
  border-radius: 8px 8px 0 0; background: var(--panel-muted, #f5f6f8);
  color: var(--text-muted, #666); font-size: 14px; cursor: pointer;
}
.check-tab span {
  min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: rgba(0,0,0,.08); font-size: 12px; line-height: 18px; text-align: center;
}
.check-tab.active {
  background: var(--panel, #fff); color: var(--text, #1f2329);
  font-weight: 600; box-shadow: 0 -2px 0 var(--primary, #2f6fed) inset;
}
.check-tab.active span { background: var(--primary, #2f6fed); color: #fff; }
.check-list-panel { border-radius: 0 8px 8px 8px; margin-top: 0; }
.check-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 12px; border-top: 1px solid var(--border, #eceef1);
  font-size: 13px; color: var(--text-muted, #666);
}
.check-pager button { padding: 5px 14px; }
.check-pager button[disabled] { opacity: .45; cursor: not-allowed; }

/* 今日工作量条(顶部) */
.stats-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.stats-bar:empty { display: none; }
.stats-bar .stat {
  flex: 1 1 120px; min-width: 110px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border: 1px solid var(--border, #e6e8eb); border-radius: 10px;
  background: var(--panel, #fff);
}
.stats-bar .stat span { font-size: 12px; color: var(--text-muted, #82868f); }
.stats-bar .stat strong { font-size: 20px; font-weight: 650; color: var(--text, #1f2329); line-height: 1.2; }
.stats-bar .stat.hot strong { color: var(--danger, #e14d4d); }

/* 表单弹窗(一次问完,替掉连环 prompt) */
.erp-dialog-card--form { max-width: 460px; }
.erp-dialog-form { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.erp-dialog-form .erp-dialog-field { display: flex; flex-direction: column; gap: 5px; }
.erp-dialog-form .erp-dialog-field > span { font-size: 13px; color: var(--text-muted, #6b7078); }
.erp-dialog-form input, .erp-dialog-form select, .erp-dialog-form textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border, #d9dbe0);
  border-radius: 7px; font-size: 14px; background: var(--panel, #fff); color: inherit;
}
.erp-dialog-form textarea { resize: vertical; font-family: inherit; }
.erp-dialog-required { color: var(--danger, #e14d4d); font-style: normal; }
.erp-dialog-formerror { margin: 10px 0 0; font-size: 13px; color: var(--danger, #e14d4d); }
.stats-bar .stat-hint { display: block; font-size: 11px; font-style: normal; color: var(--text-muted, #9aa0a8); line-height: 1.3; margin-top: 1px; }
.settings-field { display: flex; flex-direction: column; gap: 6px; max-width: 420px; font-size: 13px; color: var(--text-muted, #6b7078); }
.settings-field select { padding: 8px 11px; border: 1px solid var(--border, #d9dbe0); border-radius: 7px; font-size: 14px; background: var(--panel, #fff); color: var(--text, #1f2329); }
.port-list { margin: 4px 0 6px; padding-left: 18px; font-size: 12px; color: var(--text-muted, #6b7078); }
.port-list code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 4px; }

/* 扫码/签收的视觉反馈:仓库看一眼就知道成没成 */
@keyframes cardFlashScan {
  0%   { box-shadow: 0 0 0 0 rgba(47,111,237,.55); background: rgba(47,111,237,.10); }
  60%  { box-shadow: 0 0 0 10px rgba(47,111,237,0); background: rgba(47,111,237,.05); }
  100% { box-shadow: 0 0 0 0 rgba(47,111,237,0); background: transparent; }
}
@keyframes cardFlashOk {
  0%   { box-shadow: 0 0 0 0 rgba(32,168,96,.6); background: rgba(32,168,96,.16); }
  60%  { box-shadow: 0 0 0 12px rgba(32,168,96,0); background: rgba(32,168,96,.06); }
  100% { box-shadow: 0 0 0 0 rgba(32,168,96,0); background: transparent; }
}
@keyframes cardFlashErr {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-7px); } 30% { transform: translateX(7px); }
  45% { transform: translateX(-5px); } 60% { transform: translateX(5px); }
  75% { transform: translateX(-2px); }
}
.order-card.card-flash-scan { animation: cardFlashScan 1.4s ease-out; }
.order-card.card-flash-ok   { animation: cardFlashOk 1.4s ease-out; }
.order-card.card-flash-err  { animation: cardFlashErr .5s ease-in-out; border-color: var(--danger, #e14d4d) !important; }

/* 扫码命中的那一单要一眼找到。
   原来只有个小角标,还用负 top 溢出到卡片外 —— 列表第一单的角标被上面那排
   批量操作按钮整个挡住了(仓库实拍)。改成:角标放卡片内部 + 整张卡强化。 */
.order-card.scanned-order-card {
  position: relative;
  border: 2px solid #1A7DFF !important;
  background: #F2F8FF !important;
  box-shadow: 0 0 0 5px rgba(26, 125, 255, .14), 0 14px 32px rgba(15, 23, 42, .12) !important;
  margin-top: 6px;
}
/* 左侧粗色条:滚动时余光就能扫到 */
.order-card.scanned-order-card::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: #1A7DFF; border-radius: 8px 0 0 8px; pointer-events: none;
}
/* 角标在卡片"里面"的右上角,不溢出、不会被任何工具栏盖住 */
.order-card.scanned-order-card::before {
  content: "⬤ 刚扫到这单";
  position: absolute; top: 8px; right: 10px; z-index: 4;
  padding: 3px 11px; border-radius: 999px;
  background: #1A7DFF; color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
  box-shadow: 0 2px 8px rgba(26, 125, 255, .4);
  animation: scanBadgePulse 1.5s ease-in-out 3;
  pointer-events: none;
}
@keyframes scanBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}
.scan-result .scan-state { display: block; margin-top: 4px; font-size: 13px; color: var(--text-muted, #6b7078); }
.scan-result .scan-state b { color: var(--text, #1f2329); font-weight: 650; }

/* Translucent movable scale: only the toolbar receives clicks, the reading passes through. */
.live-scale {
  position: fixed; left: 12px; top: 12px; z-index: 900;
  width: 276px; max-width: calc(100vw - 24px); box-sizing: border-box;
  padding: 8px 14px 14px; border: 1px solid rgba(255,255,255,.24); border-radius: 14px;
  background: rgba(29,42,58,.64); color: #fff; pointer-events: none;
  box-shadow: 0 8px 28px rgba(16,24,40,.14); backdrop-filter: blur(8px);
  font-variant-numeric: tabular-nums; user-select: none;
  transition: background .18s ease, box-shadow .18s ease;
}
.live-scale .ls-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.live-scale .ls-drag, .live-scale .ls-reset {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 0; min-height: 28px; height: 28px; margin: 0; padding: 0 4px;
  border: 0; border-radius: 5px; background: transparent; color: inherit;
  box-shadow: none; font: inherit; font-size: 12px; font-weight: 500;
  pointer-events: auto;
}
.live-scale .ls-drag { flex: 1; justify-content: flex-start; cursor: grab; touch-action: none; }
.live-scale .ls-drag > span:first-child { font-size: 20px; opacity: .75; }
.live-scale .ls-drag-hint { margin-left: auto; font-size: 10px; opacity: .8; }
.live-scale .ls-reset { width: 28px; cursor: pointer; font-size: 19px; }
.live-scale .ls-drag:hover, .live-scale .ls-reset:hover { background: rgba(255,255,255,.12); }
.live-scale .ls-drag:focus-visible, .live-scale .ls-reset:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.live-scale.is-dragging .ls-drag { cursor: grabbing; }
.live-scale.is-dragging { box-shadow: 0 12px 32px rgba(16,24,40,.23); }
.live-scale .ls-reading { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.live-scale b { font-size: 52px; font-weight: 750; line-height: 1; letter-spacing: -1.5px; }
.live-scale .ls-unit { font-size: 13px; opacity: .85; }
.live-scale .ls-state { font-size: 11px; font-weight: 600; white-space: nowrap; }
.live-scale.stable { background: rgba(13,82,57,.64); }
.live-scale.moving { background: rgba(117,73,12,.68); }
.live-scale.stale { background: rgba(52,65,81,.62); }
.live-scale.stale b { opacity: .7; }
@media (max-width: 720px) {
  .live-scale { width: 246px; padding: 6px 12px 12px; }
  .live-scale b { font-size: 46px; }
}

/* 扫码处理台的结果区:直接复用订单中心的卡片,别再自成一套 */
.scan-order-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.scan-order-cards .order-card { margin: 0; }
.scan-workflow-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: -8px;
  padding: 9px 12px;
  border: 1px solid #b9d2ff;
  border-radius: 6px 6px 0 0;
  background: #f2f7ff;
  color: #344054;
  font-size: 12px;
}
.scan-workflow-notice strong { color: #175cd3; }
.scan-transition-text { color: #175cd3; }
.scan-result-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.scan-result-head strong { font-size: 15px; }

/* 扫码区的「已置顶 + 当前状态」摘要:仓库要靠它确认签没签上,不能像行小字 */
.scan-result.scan-inline-status:not(.muted) {
  border-left: 4px solid #1A7DFF;
  background: #F2F8FF;
  padding: 10px 14px;
  border-radius: 6px;
}
.scan-result .scan-state b { font-size: 14px; }

/* 订单日志弹窗 */
.orderlog-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.orderlog-row { display: grid; grid-template-columns: 148px 88px 1fr; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--border, #eef0f3); font-size: 12.5px; }
.orderlog-time { color: #64748b; white-space: nowrap; font-variant-numeric: tabular-nums; }
.orderlog-actor { color: #475569; font-family: var(--font-cn-medium); }
.orderlog-msg { word-break: break-all; }
.orderlog-empty { padding: 22px; text-align: center; color: #94a3b8; }
/* =====================================================   RootFlow 商用物流后台视觉规范 / 2026-08-08
   对齐主系统：连续工作台、低圆角、Ozon 蓝、平面层级、紧凑信息密度。
   ============================================================ */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-hover: #f5f7fa;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --text: #111318;
  --muted: #667085;
  --weak: #98a2b3;
  --primary: #005bff;
  --primary-dark: #004de6;
  --primary-soft: #eef4ff;
  --primary-ring: rgba(0, 91, 255, .14);
  --success: #079455;
  --success-soft: #ecfdf3;
  --success-text: #067647;
  --warning: #dc6803;
  --warning-soft: #fffaeb;
  --warning-text: #b54708;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --danger-text: #b42318;
  --sidebar: #ffffff;
  --radius-lg: 6px;
  --radius: 5px;
  --radius-sm: 5px;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .16), 0 2px 8px rgba(16, 24, 40, .08);
  --ring: 0 0 0 3px var(--primary-ring);
  --font-cn: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-cn-medium: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-cn-bold: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body {
  color: var(--text);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.45;
}
strong { font-weight: 600; }

/* 全局控件：只让业务主动作使用品牌蓝，语义操作保留红/橙/绿。 */
button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: #344054;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  transition: border-color .14s ease, background-color .14s ease, color .14s ease;
}
button:hover {
  border-color: #98a2b3;
  background: #f9fafb;
  color: #101828;
  transform: none;
  filter: none;
}
button.primary,
.erp-dialog-button--primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}
button.primary:hover,
.erp-dialog-button--primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: #fff;
}
button.danger,
.erp-dialog-button--danger {
  border-color: #fecdca;
  background: #fff;
  color: var(--danger-text);
  box-shadow: none;
}
button.danger:hover,
.erp-dialog-button--danger:hover { background: var(--danger-soft); border-color: #fda29b; }
button:active { transform: none; }

input,
select,
textarea {
  min-height: 36px;
  padding: 7px 10px;
  border-color: var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: #101828;
  font-size: 13px;
}
textarea { min-height: 80px; }
input::placeholder,
textarea::placeholder { color: #98a2b3; }
label { gap: 5px; color: #475467; font-weight: 500; }
label + label { margin-top: 0; }

/* 框架和导航 */
.app-shell { grid-template-columns: 206px minmax(0, 1fr); }
.sidebar { border-color: var(--line); }
.side-brand {
  height: 58px;
  gap: 8px;
  padding: 0 14px;
  border-color: var(--line);
}
.side-brand-logo { width: 94px; }
.side-brand-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
}
.side-brand-role,
.side-brand span {
  margin: 0;
  color: #667085;
  font-size: 11px;
  font-weight: 500;
}
.realtime-status {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0 !important;
  color: #667085 !important;
  font-size: 9px !important;
  line-height: 1.2;
  white-space: nowrap;
}
.realtime-status > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.realtime-status > i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #98a2b3;
  box-shadow: 0 0 0 2px rgba(152, 162, 179, .14);
}
.realtime-status.online > i { background: #12b76a; box-shadow: 0 0 0 2px rgba(18, 183, 106, .14); }
.realtime-status.retrying > i,
.realtime-status.connecting > i { background: #f79009; box-shadow: 0 0 0 2px rgba(247, 144, 9, .14); }
.realtime-status.offline > i { background: #f04438; box-shadow: 0 0 0 2px rgba(240, 68, 56, .14); }
.menu { padding: 9px 8px 12px; }
.menu-section + .menu-section { margin-top: 8px; }
.menu-group {
  margin: 0 0 3px;
  padding: 7px 10px 4px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: .08em;
}
.menu button {
  position: relative;
  min-height: 34px;
  margin: 1px 0;
  padding: 6px 9px;
  border: 0;
  border-radius: 4px;
  color: #475467;
  font-size: 12px;
  font-weight: 500;
}
.menu button:hover { background: #f5f7fa; color: #101828; }
.menu button.active {
  border: 0;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.nav-ic { width: 16px; height: 16px; }
.menu-reminder { min-width: 18px; height: 18px; padding: 0 5px; font-size: 10px; }
.sidebar-userbar {
  padding: 9px 8px;
  border-color: var(--line);
  background: #fff;
}
.sidebar-userbar #userBadge,
.sidebar-user-card {
  min-height: 38px;
  padding: 5px 7px;
  border-color: var(--line);
  border-radius: 5px;
  box-shadow: none;
}
.sidebar-user-avatar { width: 26px; height: 26px; flex-basis: 26px; border-radius: 4px; }
.sidebar-userbar #logoutBtn { min-height: 32px; padding: 5px 8px; border-radius: 5px; }

.workspace { padding: 14px 16px 32px; }
.topbar {
  min-height: 52px;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 20px; line-height: 1.25; font-weight: 650; }
.topbar p { margin: 3px 0 0; color: #667085; font-size: 12px; }

/* KPI 只在订单与扫码页面出现，并连接成一条工作量带。 */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(8, minmax(96px, 1fr));
  gap: 0;
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
}
.stats-bar.hidden { display: none !important; }
.stats-bar .stat {
  min-width: 0;
  padding: 9px 11px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.stats-bar .stat:last-child { border-right: 0; }
.stats-bar .stat span { color: #667085; font-size: 11px; }
.stats-bar .stat strong { margin-top: 3px; color: #101828; font-size: 18px; font-weight: 650; }
.stats-bar .stat.hot strong { color: var(--danger-text); }
.stats-bar .stat-hint { font-size: 10px; color: #98a2b3; }

/* 连续工作台：白色面板靠边框分层，不使用悬浮卡片阴影。 */
.panel,
.order-card,
.scan-order-card,
.aging-card,
.finance-stat-card,
.settings-item {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  box-shadow: none;
}
.panel { margin-bottom: 10px; }
.panel:hover,
.order-card:hover,
.aging-card:hover { border-color: var(--line); box-shadow: none; transform: none; }
.panel-head {
  min-height: 44px;
  padding: 9px 12px;
  border-color: var(--line);
  background: #fff;
}
.panel-title { color: #101828; font-size: 14px; font-weight: 600; }
.panel-desc { margin-top: 2px; color: #667085; font-size: 11px; }
.panel-body { padding: 12px; }
.toolbar { gap: 8px; }

.table-wrap { border-radius: 0; }
table { border-collapse: collapse; border-spacing: 0; }
thead th,
th {
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0 !important;
  background: #f9fafb;
  color: #475467;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}
td {
  padding: 10px;
  border: 0;
  border-bottom: 1px solid #eaecf0;
  background: #fff;
  color: #344054;
  font-size: 12px;
}
tbody tr { border: 0; box-shadow: none; }
tbody tr:hover td { background: #f9fafb; }
.subline { color: #667085; font-size: 11px; }
.badge,
.need-action,
.check-order-flag,
.stock-tab-badge {
  border-radius: 4px;
  box-shadow: none;
}
.badge { padding: 2px 7px; font-size: 11px; font-weight: 600; }

/* Tab 使用主系统的下划线层级。 */
.finance-tabs,
.stock-tabs,
.check-tabs-bar {
  gap: 18px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.finance-tabs button,
.stock-tabs .stock-tab,
.check-tab {
  min-height: 40px;
  padding: 8px 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #667085;
  box-shadow: none;
}
.finance-tabs button:hover,
.stock-tabs .stock-tab:hover,
.check-tab:hover { border: 0; background: transparent; color: #101828; }
.finance-tabs button.active,
.stock-tabs .stock-tab.active,
.check-tab.active {
  border: 0;
  background: transparent;
  color: var(--primary);
  box-shadow: inset 0 -2px var(--primary);
  font-weight: 600;
}
.check-list-panel { border-radius: 0 0 2px 2px; }

/* 订单中心：筛选器横向组织，订单本体压缩但保留识货大图。 */
.order-filter-panel { margin-bottom: 8px; }
.order-filter-summary {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 11px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  background: #fff;
}
.order-filter-summary::-webkit-details-marker { display: none; }
.order-filter-summary:hover { background: #f9fafb; }
.order-filter-summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.order-filter-state {
  flex: 0 0 auto;
  min-width: 72px;
  padding-right: 16px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  position: relative;
}
.order-filter-state::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
}
.order-filter-panel[open] .order-filter-state::after { transform: translateY(-25%) rotate(225deg); }
.order-filter-state .when-open { display: none; }
.order-filter-panel[open] .order-filter-state .when-closed { display: none; }
.order-filter-panel[open] .order-filter-state .when-open { display: inline; }
.order-filter-content { border-top: 1px solid var(--line); }
.order-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 9px 11px 0;
}
.order-command .panel-body .toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(130px, .65fr) minmax(160px, .8fr) auto;
  align-items: end;
}
.order-command .panel-body .toolbar .actions { justify-content: flex-end; flex-wrap: nowrap; }
.inline-scan-desk > summary {
  padding: 8px 11px;
  border-color: var(--line);
  border-radius: 2px;
  color: #475467;
}
.inline-scan-desk > summary:hover { border-color: #b2ccff; background: var(--primary-soft); color: var(--primary); }
.order-list,
.scan-order-cards { gap: 8px; }
.order-card { overflow: hidden; }
.order-head {
  min-height: 39px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
}
.order-head-main { gap: 8px; }
.order-head-main span { color: #475467; font-size: 11px; }
.order-card-grid {
  grid-template-columns: 176px 154px minmax(190px, 1.18fr) minmax(155px, .8fr) minmax(190px, 1fr) minmax(208px, .94fr);
  background: #fff;
}
.order-card-grid > div { padding: 9px 10px; border-color: var(--line); background: #fff !important; }
.order-card-grid .product-image-cell {
  display: flex;
  min-height: 0;
  align-items: stretch;
  justify-content: center;
  padding: 0 6px;
  background: #f9fafb !important;
}
.order-card-grid .product-thumb,
.order-card-grid .product-thumb-button,
.order-card-grid .order-product-img,
.order-card-grid .empty-thumb {
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  background: #f9fafb;
}
.order-card-grid .order-product-img { object-fit: contain; }
.persistent-scan-desk > .scan-desk-panel { margin-bottom: 0; }
.product-name-cn { color: #101828; font-size: 13px; font-weight: 600; }
.product-name-ru { color: #98a2b3; font-size: 11px; }
.order-actions { gap: 6px; padding-top: 9px; }
.oa-primary-row { grid-template-columns: repeat(2, minmax(78px, 1fr)); gap: 5px; }
.order-actions .oa-primary-row button,
.order-actions .oa-secondary-row button,
.order-actions .oa-more-grid button {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: #344054;
  box-shadow: none;
  font-size: 11.5px;
  font-weight: 500;
}
.order-actions .oa-primary-row button:hover,
.order-actions .oa-secondary-row button:hover,
.order-actions .oa-more-grid button:hover {
  border-color: #84adff;
  background: var(--primary-soft);
  color: var(--primary);
  filter: none;
}
.order-actions .oa-primary-row .oa-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.order-actions .oa-primary-row .oa-primary:hover { border-color: var(--primary-dark); background: var(--primary-dark); color: #fff; }
.order-actions .oa-primary-row .oa-scale,
.order-actions .oa-primary-row .oa-camera {
  border-color: var(--line-strong);
  background: #fff;
  color: #344054;
}
.oa-secondary-row,
.oa-more-grid { gap: 5px; }
.oa-more > summary { border-radius: 4px; color: #667085; }
.oa-more > summary:hover { background: #f9fafb; color: #344054; }
.order-card.scanned-order-card {
  border: 1px solid var(--primary) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(0, 91, 255, .10) !important;
}
.order-card.scanned-order-card::after { width: 3px; border-radius: 0; background: var(--primary); }
.order-card.scanned-order-card::before { border-radius: 4px; background: var(--primary); box-shadow: none; }
.scan-result.scan-inline-status:not(.muted) { border-left: 3px solid var(--primary); border-radius: 2px; background: var(--primary-soft); }

.scan-inbound-list { display: grid; gap: 10px; margin-top: 10px; text-align: left; }
.scan-inbound-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.scan-inbound-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.scan-inbound-card__head > div { display: grid; gap: 2px; }
.scan-inbound-card__head span, .scan-inbound-card__head small { color: var(--muted); font-size: 12px; }
.scan-inbound-card__head strong { font-size: 16px; }
.scan-inbound-card__product { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.scan-inbound-card__qty { white-space: nowrap; }
.scan-inbound-card__facts { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 12px; }
.scan-inbound-card__facts strong { color: var(--text); }
.scan-inbound-card__done { padding: 8px; border-radius: 6px; background: var(--success-soft); color: var(--success); }

/* 财务、库存账龄、设置采用连接式汇总区。 */
.finance-stat-grid,
.aging-buckets,
.settings-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
}
.finance-stat-card,
.aging-card,
.settings-item {
  margin: 0;
  border-width: 0 1px 0 0;
  border-radius: 0;
  background: #fff;
}
.finance-stat-card:last-child,
.aging-card:last-child,
.settings-item:last-child { border-right: 0; }
.finance-stat-card { padding: 11px 12px; }
.finance-stat-card span,
.settings-label { color: #667085; font-size: 11px; }
.finance-stat-card strong { margin-top: 4px; color: #101828; font-size: 18px; font-weight: 650; }
.finance-stat-card small { margin-top: 4px; color: #98a2b3; font-size: 10px; }
.finance-stat-split { gap: 10px; }
.aging-card { padding: 10px 12px; }
.aging-card-warn { background: var(--danger-soft); }
.settings-grid { padding: 0; }
.settings-item { padding: 12px; }
.settings-value { margin: 4px 0; color: #101828; font-size: 18px; font-weight: 650; }
.finance-filter-grid,
.service-editor-grid { gap: 8px; }
.finance-filter-actions { gap: 6px; align-items: end; }
.service-editor-panel .panel-body { padding: 12px; }

/* 所有弹窗统一：6px 容器、固定头尾、可滚动正文、无表单横向溢出。 */
.modal-mask,
.erp-dialog-mask {
  padding: 24px;
  background: rgba(16, 24, 40, .48);
  backdrop-filter: none;
}
.modal-card,
.erp-dialog-card {
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.stock-create-modal { width: min(820px, 100%); }
.warehouse-modal,
.member-modal { width: min(900px, 100%); }
.content-editor-modal { width: min(1040px, 100%); }
.modal-head,
.erp-dialog-head {
  min-height: 54px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.modal-head h2,
.erp-dialog-card h2 { color: #101828; font-size: 17px; font-weight: 650; line-height: 1.3; }
.erp-dialog-kicker { color: #667085; font-size: 10px; letter-spacing: .08em; }
.modal-card > .panel-body,
.modal-card > .camera-body,
.erp-dialog-card > .erp-dialog-body {
  max-height: calc(88vh - 118px);
  overflow: auto;
  padding: 16px;
}
.modal-actions,
.erp-dialog-actions {
  min-height: 58px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: #f9fafb;
}
.erp-dialog-card { max-width: 520px; }
.erp-dialog-card--form { max-width: 560px; }
.erp-dialog-body { padding: 16px; }
.erp-dialog-copy { color: #475467; font-size: 13px; line-height: 1.6; }
.erp-dialog-form { gap: 10px; }
.erp-dialog-form input,
.erp-dialog-form select,
.erp-dialog-form textarea { border-radius: 5px; font-size: 13px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.form-grid > * { min-width: 0; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span4 { grid-column: 1 / -1; }
.stock-create-modal .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.warehouse-modal .form-grid,
.member-modal .form-grid,
.content-editor-modal .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.member-modal .form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 2px -16px -16px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: #f9fafb;
}
.member-modal .form-actions .inline-error { margin-right: auto; }
.content-editor-modal .form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 2px -16px -16px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: #f9fafb;
}

.page-loading { min-height: 260px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }

@media (max-width: 1400px) {
  .order-card-grid { grid-template-columns: 164px 150px minmax(180px, 1.1fr) minmax(150px, .8fr) minmax(185px, 1fr); }
  .order-card-grid .order-actions { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .oa-primary-row { grid-template-columns: repeat(5, minmax(96px, 1fr)); }
  .oa-secondary-row,
  .oa-more-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-bar { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
  .stats-bar .stat:nth-child(4n) { border-right: 0; }
  .stats-bar .stat:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .workspace { padding: 12px; }
  .order-command .panel-body .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-command .panel-body .toolbar .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .order-filter-actions { align-items: flex-start; flex-direction: column; }
  .warehouse-modal .form-grid,
  .member-modal .form-grid,
  .content-editor-modal .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-brand { height: 52px; padding-right: 72px; }
  .menu { display: flex; gap: 10px; padding: 6px 8px 9px; overflow-x: auto; }
  .menu-section { flex: 0 0 auto; display: flex; gap: 2px; }
  .menu-group { display: none; }
  .menu button { width: auto; white-space: nowrap; }
  /* Narrow-screen account continuity: keep the only logout action reachable. */
  .sidebar-userbar {
    position: absolute;
    top: 9px;
    right: 8px;
    display: flex;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .sidebar-userbar #userBadge { display: none; }
  .sidebar-userbar #logoutBtn { min-width: 50px; min-height: 34px; background: #fff; }
  .topbar { min-height: 48px; }
  .topbar h1 { font-size: 18px; }
  .stats-bar { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
  .stats-bar .stat:nth-child(2n) { border-right: 0; }
  .stats-bar .stat:not(:nth-last-child(-n+2)) { border-bottom: 1px solid var(--line); }
  .order-card-grid { grid-template-columns: 156px 146px minmax(180px, 1fr); }
  .order-card-grid > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .order-card-grid .platform-cell { grid-column: 1; }
  .order-card-grid .meta-cell { grid-column: 2 / -1; }
  .order-card-grid .order-actions { grid-column: 1 / -1; }
  .order-card-grid .sign-cell .copyable-number {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
  }
  .finance-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-stat-card:nth-child(2n) { border-right: 0; }
  .finance-stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .workspace { padding: 10px; }
  .topbar p { display: none; }
  .order-command .panel-body .toolbar,
  .finance-filter-grid,
  .service-editor-grid { grid-template-columns: 1fr; }
  .order-card-grid { display: block; }
  .order-card-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .order-card-grid .product-image-cell {
    min-height: 176px;
    padding-block: 0;
    border-bottom: 1px solid var(--line);
  }
  .order-card-grid .product-thumb,
  .order-card-grid .product-thumb-button,
  .order-card-grid .order-product-img,
  .order-card-grid .empty-thumb { width: auto; max-width: 132px; height: 176px; aspect-ratio: 3 / 4; }
  .oa-primary-row,
  .oa-secondary-row,
  .oa-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-mask,
  .erp-dialog-mask { align-items: end; padding: 0; }
  .modal-card,
  .erp-dialog-card { width: 100%; max-width: none; max-height: 94vh; border-radius: 6px 6px 0 0; }
  .modal-card > .panel-body,
  .modal-card > .camera-body,
  .erp-dialog-card > .erp-dialog-body { max-height: calc(94vh - 112px); }
  .form-grid,
  .stock-create-modal .form-grid,
  .warehouse-modal .form-grid,
  .member-modal .form-grid,
  .content-editor-modal .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2,
  .form-grid .span4,
  .stock-create-modal .span2,
  .warehouse-modal .span2,
  .member-modal .span2,
  .content-editor-modal .span2 { grid-column: auto; }
}

/* 登录入口沿用同一商用表面，避免进入系统前后视觉跳变。 */
.login-view { background: var(--bg); }
.login-layout { gap: 56px; }
.login-panel {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 18px 48px rgba(16, 24, 40, .12);
}
.login-panel h1 { color: #101828; font-size: 24px; }
.login-panel input,
.login-panel .primary { border-radius: 5px; }
.login-logo-panel img.login-hero { filter: none; }

/* 店铺授权：大规模店铺仍保持紧凑、可搜索、可分页。 */
.shop-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.shop-overview-item { min-width: 0; padding: 12px 14px; border-right: 1px solid var(--line); }
.shop-overview-item:last-child { border-right: 0; }
.shop-overview-item span { display: block; color: var(--muted); font-size: 12px; }
.shop-overview-item strong { display: block; margin-top: 4px; font-size: 20px; line-height: 1.2; }
.shop-overview-alert strong { color: var(--danger); }
.shop-config-disclosure { overflow: hidden; }
.shop-config-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
}
.shop-config-disclosure > summary::-webkit-details-marker { display: none; }
.shop-config-disclosure > summary span:first-child { display: grid; gap: 2px; }
.shop-config-disclosure > summary small,
.shop-config-disclosure > summary span:last-child { color: var(--muted); font-size: 12px; }
.shop-config-disclosure[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.shop-group-create { border-bottom: 1px solid var(--line); }
.shop-list-head { align-items: center; }
.shop-list-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 220px);
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.shop-list-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.shop-sync-message { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-row-actions { min-width: 220px; }
.shop-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.finance-truth-notice {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #b8d4ff;
  background: #f5f9ff;
  color: #344054;
  font-size: 12px;
}
.finance-truth-notice strong { color: var(--primary); white-space: nowrap; }

@media (max-width: 860px) {
  .shop-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-overview-item:nth-child(2n) { border-right: 0; }
  .shop-overview-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .shop-list-toolbar { grid-template-columns: 1fr; }
  .shop-pager { justify-content: space-between; }
}

@media (max-width: 640px) {
  .shop-overview-grid { grid-template-columns: 1fr; }
  .shop-overview-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .shop-overview-item:last-child { border-bottom: 0; }
  .finance-truth-notice { display: grid; }
}

/* Pointer ergonomics must win over compact desktop control heights. */
@media (pointer: coarse) {
  button,
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  .file-button span,
  .modal-close {
    min-height: 44px !important;
  }
}

/* ── 面单纸张预览 ────────────────────────────────────────────────
   设置页原来只有一个下拉框列尺寸数字,仓库选了 100×100、打出来上下各空 15mm,
   反馈是「打印的尺寸不对」—— 而代码是对的,是纸和面单比例天生不匹配。
   数字看不出这件事,画出来就一目了然。 */
.label-paper-grid {
  display: grid;
  grid-template-columns: minmax(240px, 380px) minmax(190px, 250px);
  justify-content: start;
  gap: 28px;
  align-items: start;
}
.label-paper-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.label-paper-preview .paper-sheet {
  width: 100%;
  max-width: 190px;
  max-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #eef1f6 0 6px, #e5e9f0 6px 12px);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.label-paper-preview .paper-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--primary);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}
.label-paper-preview .paper-fill span {
  font-size: 11px;
  color: var(--primary);
  letter-spacing: .08em;
}
.label-paper-preview .paper-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.label-paper-preview .paper-note strong { color: var(--text); }

@media (max-width: 900px) {
  .label-paper-grid { grid-template-columns: minmax(0, 1fr); }
  .label-paper-preview { max-width: 320px; }
}

/* 打印通道那格要通栏 —— 里面是「弹不弹框」的诊断和修法步骤,挤在 220px 一列读不了。
   .span2 原来只在 .form-grid 下生效,settings-grid 里得单独给一条。 */
.settings-grid .span2 { grid-column: 1 / -1; }
.settings-grid .span2 code {
  padding: 1px 5px;
  background: var(--surface-hover);
  border-radius: 4px;
  font-size: 12px;
}

/* 一键完成:放在次操作行里(仓库指的就是「备注」旁边那格),
   但它是把四步合成一次的高价值动作,不能长得跟「改单号」一样淡 —— 给琥珀色实心。 */
.order-actions .oa-secondary-row .oa-oneclick {
  border-color: #d68910;
  background: linear-gradient(180deg, #f5a623, #dd8b0c);
  color: #fff;
  font-weight: 600;
}
.order-actions .oa-secondary-row .oa-oneclick:hover {
  border-color: #b8760a;
  background: linear-gradient(180deg, #f7b23f, #c97d09);
  color: #fff;
}
.order-actions .oa-secondary-row .oa-oneclick:disabled {
  background: #f0d9ae;
  border-color: #e0c48f;
  color: #fff;
  cursor: progress;
}

/* 仓库方改不了的字段:置灰 + 当场说明是谁维护的。
   原来这些字段照常可填,点保存才被 403 打回来 —— 填的东西全白填。 */
.field-locked {
  position: relative;
  opacity: .72;
}
.field-locked input,
.field-locked select {
  background: var(--surface-hover);
  cursor: not-allowed;
}
.field-lock-note {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-hover);
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

/* 成员绑定仓库:一个账号可以负责多个仓。
   写法照抄同一弹框里的 .team-permission-item —— 用 grid 固定首列宽度,
   而不是 flex 去跟全局 `input{min-height:36px}` 打架(那样每项会被撑到 60px 高)。 */
.member-warehouse-field {
  /* 必须通栏。注意 .form-grid .span2 的特异性比单类名高,所以这里也要带
     .form-grid 前缀,否则只占半宽:一列都排不开,还把同行的「状态」拉高。 */
  align-self: start;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.form-grid .member-warehouse-field { grid-column: 1 / -1; }
.member-warehouse-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.member-warehouse-head .req { color: var(--danger); margin-left: 2px; }
.member-warehouse-head .subline { font-weight: 400; flex: 1 1 240px; }
.member-warehouse-head button.tiny {
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
}
.member-warehouse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px;
  max-height: 176px;
  overflow-y: auto;
  padding: 2px;
}
.member-warehouse-item {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}
/* 复选框自身要显式压回:全局给 input 设了 min-height:36px,
   只写 width/height 是压不住的(min-height 胜出),每项会被撑到 56px 高。 */
.member-warehouse-item > input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.member-warehouse-item > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-warehouse-item:hover { border-color: #9dbdf0; background: #f4f9ff; }
.member-warehouse-item:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.member-warehouse-field .member-warehouse-foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* 列表截断提示:从「请用搜索缩小范围」改成能直接点的加载按钮 */
.truncate-note { margin-left: 8px; }
.order-command .truncate-note + button,
.batch-bar .truncate-note + button {
  min-height: 28px;
  margin-left: 8px;
  padding: 0 12px;
  font-size: 12px;
}

/* 批量条上的 SKU 工具:和批量动作之间给一道分隔,免得看成同一组 */
.batch-sep {
  width: 1px;
  height: 20px;
  margin: 0 2px;
  background: var(--line-strong);
}

/* 选 SKU 面板 —— 仓库备货按 SKU 走,同款要一次全勾上。
   做成图片卡片(和主系统订单管理一致):仓库的人认图比认 10 位数字快得多。 */
.sku-picker { width: min(1120px, calc(100vw - 24px)); }
.sku-picker-tabs {
  display: flex;
  gap: 24px;
  margin: -4px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.sku-picker-tabs button {
  position: relative;
  min-height: 40px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.sku-picker-tabs button:hover { color: var(--primary); background: transparent; }
.sku-picker-tabs button.is-active { color: var(--primary); }
.sku-picker-tabs button.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
  content: "";
}
.sku-picker-warehouse-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px 12px;
  padding: 7px 9px;
  border: 1px solid #eaecf0;
  border-radius: 6px;
  background: #f8fafc;
}
.sku-picker-warehouse-row > strong {
  flex: 0 0 auto;
  color: #667085;
  font-size: 11px;
  font-weight: 650;
}
.sku-picker-warehouse-options {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.sku-picker-warehouse-options::-webkit-scrollbar { display: none; }
.sku-picker-warehouse-options button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #475467;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.sku-picker-warehouse-options button:hover { border-color: #c9dcff; background: #fff; color: var(--primary); }
.sku-picker-warehouse-options button.is-active {
  border-color: #9dbdf0;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
.sku-picker-warehouse-options small {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 600;
}
.sku-picker-warehouse-options button.is-active small { color: var(--primary); }
.sku-picker-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 12px;
}
.sku-picker-tools input { flex: 1; min-width: 0; }
.sku-picker-tools .subline { white-space: nowrap; }
.sku-picker-tools button.tiny {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.sku-color-quick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 5px 2px 7px;
  border-bottom: 1px solid #eaecf0;
}
.sku-color-quick-row[hidden] { display: none; }
.sku-color-quick-heading {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  line-height: 1.15;
}
.sku-color-quick-heading strong { color: #344054; font-size: 11px; }
.sku-color-quick-heading span { color: #98a2b3; font-size: 10px; }
.sku-color-quick-items {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.sku-color-quick-items::-webkit-scrollbar { display: none; }
.sku-color-quick-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  color: #344054;
  font-size: 11px;
}
.sku-color-quick-chip:hover { border-color: #98a2b3; background: #f9fafb; }
.sku-color-quick-chip.is-active { border-color: #344054; box-shadow: 0 0 0 1px #344054 inset; }
.sku-color-quick-chip i,
.sku-color-menu-options i,
.sku-color-name-list i {
  display: inline-block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.sku-color-quick-chip em { color: #667085; font-style: normal; font-variant-numeric: tabular-nums; }
.sku-color-menu {
  position: fixed;
  z-index: 2200;
  width: 196px;
  padding: 9px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
}
.sku-color-menu > strong { display: block; margin-bottom: 7px; color: #667085; font-size: 11px; }
.sku-color-menu-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.sku-color-menu-options button,
.sku-color-menu-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid #e4e7ec;
  border-radius: 4px;
  background: #fff;
  color: #344054;
  font-size: 11px;
}
.sku-color-menu-options button.is-current { border-color: #344054; box-shadow: 0 0 0 1px #344054 inset; }
.sku-color-menu-options button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sku-color-menu-clear { justify-content: center; width: 100%; margin-top: 6px; }
.sku-color-menu-clear:disabled { color: #98a2b3; cursor: not-allowed; }
.sku-color-name-dialog { width: min(480px, 92vw); }
.sku-color-name-list { display: flex; flex-direction: column; gap: 9px; padding: 4px 0; }
.sku-color-name-list label {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.sku-color-name-list label > span { display: inline-flex; align-items: center; gap: 8px; color: #344054; }
.sku-color-name-list label strong { font-size: 12px; font-weight: 600; }
.sku-picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 12px 8px;
  max-height: min(64dvh, 650px);
  overflow-y: auto;
  padding: 4px 18px 16px;
}
.sku-picker-list.is-inventory-mode {
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
}
.sku-picker-coverage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 18px 10px;
  padding: 9px 11px;
  border: 1px solid #abefc6;
  border-radius: 6px;
  background: #ecfdf3;
  color: #067647;
  font-size: 12px;
}
.sku-picker-coverage[hidden] { display: none; }
.sku-picker-coverage.has-warning {
  border-color: #fedf89;
  background: #fffaeb;
  color: #93370d;
}
.sku-picker-coverage strong { white-space: nowrap; }
.sku-picker-coverage button {
  min-height: 28px;
  padding: 0 9px;
  border-color: currentColor;
  background: #fff;
  color: inherit;
  font-size: 11px;
  white-space: nowrap;
}
.sku-picker-loading {
  grid-column: 1 / -1;
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}
.sku-picker-loading.is-error { color: var(--danger); }
.inventory-card-picker-card {
  position: relative;
  display: flex;
  align-self: start;
  min-width: 0;
  height: max-content;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.inventory-card-picker-card:hover {
  border-color: #9dbdf0;
  background: #f8fbff;
}
.inventory-card-picker-card.is-selected {
  border-color: var(--primary);
  background: #f5f9ff;
  box-shadow: 0 0 0 2px var(--primary-ring);
}
.inventory-card-picker-card.has-risk:not(.is-selected) { border-color: #fecdca; }
.inventory-card-picker-media {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  place-items: center;
  border-radius: 5px;
  background: var(--surface-soft);
}
.inventory-card-picker-media img { width: 100%; height: 100%; object-fit: contain; }
.inventory-card-picker-media i {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  opacity: 0;
  transform: scale(.72);
  transition: opacity .12s, transform .12s;
}
.inventory-card-picker-card.is-selected .inventory-card-picker-media i { opacity: 1; transform: scale(1); }
.inventory-card-picker-empty { color: var(--weak); font-size: 12px; }
.inventory-card-picker-name {
  display: -webkit-box;
  overflow: hidden;
  min-height: 36px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.inventory-card-picker-tags { display: flex; min-width: 0; gap: 4px; }
.inventory-card-picker-tags em {
  overflow: hidden;
  min-width: 0;
  padding: 2px 5px;
  border-radius: 3px;
  background: #f2f4f7;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-card-picker-tags em:first-child { flex: 1 1 auto; }
.inventory-card-picker-skus {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-card-picker-orders { color: var(--muted); font-size: 11px; }
.inventory-card-picker-orders strong { color: var(--primary); font-size: 15px; }
.inventory-card-picker-orders em { color: #b54708; font-size: 10px; font-style: normal; font-weight: 650; }
.inventory-card-picker-stock {
  padding-top: 5px;
  border-top: 1px solid var(--line);
  color: #067647;
  font-size: 11px;
  font-weight: 650;
}
.inventory-card-picker-stock.is-short { color: var(--danger); }
.sku-picker-list article.sku-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 5px 5px 7px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.sku-card-color-mark {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .3), 0 2px 5px rgba(16, 24, 40, .3);
}
.sku-picker-list article.sku-card:hover {
  border-color: #d0d5dd;
  background: #f9fafb;
  box-shadow: none;
}
.sku-picker-list article.sku-card.is-selected {
  border-color: var(--primary);
  background: #f5f9ff;
  box-shadow: 0 0 0 2px var(--primary-ring);
}
.sku-card-media {
  position: relative;
  width: min(100%, 112px);
  aspect-ratio: 3 / 4;
}
.sku-card-select-zone {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  width: 50%;
  height: 50%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.sku-card-select-zone:hover { background: linear-gradient(225deg, rgba(20, 110, 245, .18), transparent 58%); }
.sku-card-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .12s, transform .12s;
}
.sku-card.is-selected .sku-card-check { opacity: 1; transform: scale(1); }
.sku-card-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--surface-soft);
  border-radius: 4px;
}
.sku-card-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--weak);
  font-size: 12px;
}
.sku-card-name {
  display: -webkit-box;
  width: 100%;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  line-height: 1.3;
  color: var(--text);
  font-size: 11px;
  text-align: left;
}
.sku-card-sku {
  display: block;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sku-card-meta { color: var(--muted); font-size: 11px; }
.sku-card-meta strong { color: var(--primary); font-size: 14px; font-weight: 700; }
.sku-card-meta-row { display: flex; width: 100%; align-items: center; justify-content: center; gap: 6px; }
.sku-card-multiplier { padding: 1px 3px; border: 0; background: transparent; color: #b54708; font-size: 10px; font-weight: 650; }
.sku-card-multiplier:hover { color: var(--primary); text-decoration: underline; }
.sku-card-warehouse {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sku-card-mapping {
  max-width: 100%;
  overflow: hidden;
  padding: 1px 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sku-card-mapping:hover { color: var(--primary); text-decoration: underline; }

.sku-picker-mask { z-index: 2300; }
.sku-picker-submask { z-index: 2500; }
.sku-color-menu { z-index: 2600; }

.sku-card-preview { width: min(760px, calc(100vw - 24px)); }
.sku-card-preview-body { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 24px; padding: 0 20px 22px; }
.sku-card-preview-media { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; background: var(--surface-soft); }
.sku-card-preview-media img { width: 100%; height: 100%; object-fit: contain; }
.sku-card-preview-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--weak); }
.sku-card-preview-info { display: flex; min-width: 0; flex-direction: column; gap: 14px; }
.sku-card-preview-sku { color: var(--text); font-size: 24px; line-height: 1.2; }
.sku-card-preview-info p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.sku-card-preview-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sku-card-preview-facts span { padding: 10px; background: #f8fafc; color: var(--muted); font-size: 12px; }
.sku-card-preview-facts strong { display: block; color: var(--primary); font-size: 22px; }
.sku-card-preview-mappings { display: flex; flex-direction: column; gap: 7px; }
.sku-card-preview-mappings button { display: grid; gap: 3px; padding: 9px 11px; border: 1px solid #c9dcff; background: #f5f9ff; text-align: left; }
.sku-card-preview-mappings button span { color: var(--muted); font-size: 11px; }
.sku-card-preview-mappings button strong { color: var(--primary); font-size: 13px; }

.sku-mapping-owner-dialog { width: min(520px, calc(100vw - 24px)); }
.sku-mapping-owner-list { display: grid; gap: 8px; padding: 0 20px 22px; }
.sku-mapping-owner-list button { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; text-align: left; }
.sku-mapping-owner-list button:hover { border-color: var(--primary); background: #f5f9ff; }
.sku-mapping-owner-list span { color: var(--muted); font-size: 11px; }
.sku-mapping-dialog { width: min(900px, calc(100vw - 24px)); }
.sku-mapping-rate { padding: 0 20px 12px; }
.sku-mapping-rate label { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.sku-mapping-rate input { width: 140px; }
.sku-mapping-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: min(56dvh, 500px); overflow-y: auto; padding: 0 20px 18px; }
.sku-mapping-card { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 9px; padding: 7px; border: 1px solid var(--line); background: #fff; text-align: left; }
.sku-mapping-card:hover { border-color: #9dbdf0; }
.sku-mapping-card.is-active { border-color: var(--primary); background: #f5f9ff; box-shadow: 0 0 0 1px var(--primary-ring); }
.sku-mapping-card img, .sku-mapping-card-empty { width: 58px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; background: var(--surface-soft); }
.sku-mapping-card-empty { display: grid; place-items: center; color: var(--weak); font-size: 11px; }
.sku-mapping-card > span { min-width: 0; }
.sku-mapping-card strong, .sku-mapping-card em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sku-mapping-card strong { color: var(--text); font-size: 12px; }
.sku-mapping-card em { margin-top: 5px; color: var(--muted); font-size: 10px; font-style: normal; }

.sku-color-add-row { display: flex; align-items: center; gap: 10px; padding: 4px 20px 14px; }
.sku-color-add-row input[type="color"] { width: 44px; height: 32px; padding: 2px; border: 1px solid #d0d5dd; border-radius: 5px; background: #fff; }

@media (max-width: 680px) {
  .sku-picker-tabs { gap: 16px; }
  .sku-picker-warehouse-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .sku-picker-tools { flex-wrap: wrap; }
  .sku-picker-tools input { flex-basis: 100%; }
  .sku-picker-coverage { grid-template-columns: 1fr; }
  .sku-picker-coverage button { justify-self: start; }
  .sku-picker-list.is-inventory-mode { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); }
  .sku-card-preview-body { grid-template-columns: 1fr; }
  .sku-card-preview-media { width: min(72vw, 280px); margin: 0 auto; }
}

/* 出单件数:仓库拣货最容易出错的就是件数,要能一眼看到。
   基准字号 13px,这里给 32px + 蓝色加粗 —— 直接按字号 4 倍(52px)会把
   整张订单卡撑高一截,一屏能看的单数直接减半,反而更难找货。 */
.rootflow-product-details .qty-row {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  margin-top: 2px;
}
/* 三个数字的层级(用户定的):发货最小单位件数 最大 > 数量 = 倍率 稍小。
   仓库真正照着拿货的是「最小单位件数」——那才是要从货架上数出来的个数,
   数量和倍率是它的两个因数,看一眼确认就行。 */
.rootflow-product-details .qty-value {
  color: var(--primary);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* 订单卡序号:滑长列表时得知道自己看到第几个了。
   显示成「12/60」—— 只给序号的话,滑到中间批量条那行「共 N 个」早滚没了。 */
.order-seq {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  flex: 0 0 auto;
  min-width: 30px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.order-seq i {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  color: var(--weak);
}
.scanned-order-card .order-seq {
  background: var(--primary-soft);
  color: var(--primary);
}

/* 按件数筛选:仓库拣货按件数分批走,一次只处理「每单 2 件」的不容易数错 */
.qty-filter-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  gap: 5px;
  min-width: 0;
}
.qty-filter-inline > button { flex: 0 0 auto; }
.qty-quick-row {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: min(440px, 42vw);
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.qty-quick-button {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #344054;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.selection-limit-inline {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  padding-left: 9px;
  border-left: 1px solid #d0d5dd;
}
.selection-limit-inline label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #475467;
  font-size: 11px;
  white-space: nowrap;
}
.selection-limit-inline input {
  width: 74px;
  min-height: 34px;
  padding: 4px 7px;
  color: #175cd3;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}
.qty-quick-button small { margin-left: 2px; color: var(--muted); font-size: 10px; font-weight: 500; }
.qty-quick-button:hover { border-color: #84adff; color: var(--primary); }
.qty-quick-button.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.batch-workflow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 42px 6px 6px;
  border: 1px solid #e4e9f0;
  background: #f8fafc;
  border-radius: 8px;
  overflow: visible;
}
.batch-hotkey-gear {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #7b8798;
  box-shadow: none;
  cursor: pointer;
}
.batch-hotkey-gear:hover {
  border-color: #cbd8ea;
  background: #fff;
  color: var(--primary);
}
.batch-hotkey-gear:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.batch-hotkey-gear .nav-icon,
.batch-hotkey-gear svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}
.batch-hotkey-dialog { width: min(620px, 100%); }
.batch-hotkey-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  min-height: 0;
  padding: 18px 20px;
  overflow: auto;
}
.batch-hotkey-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 112px;
  align-items: center;
  gap: 5px 10px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  background: #fbfcfe;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}
.batch-hotkey-row input {
  width: 112px;
  min-height: 34px;
  padding: 5px 8px;
  border-color: #cfd8e6;
  background: #fff;
  color: #175cd3;
  font-weight: 750;
  text-align: center;
  cursor: pointer;
}
.batch-hotkey-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 110, 245, .12);
}
.batch-hotkey-row small {
  grid-column: 1 / -1;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 500;
}
.batch-hotkey-dialog .inline-error { margin: 0 20px 14px; }
.batch-hotkey-dialog .modal-actions { padding-top: 2px; }
.batch-flow-step {
  display: grid;
  flex: 1 1 132px;
  min-width: 0;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 54px;
  padding: 6px 8px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
  cursor: pointer;
}
.batch-flow-step:hover { border-color:#b9c9df; background:#fbfdff; }
.batch-flow-step:has(button:focus-visible) { outline:2px solid var(--primary); outline-offset:2px; }
.batch-flow-index {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eaf2ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}
.batch-flow-content { display:grid; min-width:0; gap:2px; }
.batch-flow-step .batch-step {
  min-height: 24px;
  padding: 1px 2px;
  border: 0;
  background: transparent;
  color: #24324a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  box-shadow: none;
}
.batch-flow-step .batch-step:hover { border:0; background:transparent; color:var(--primary); }
.batch-flow-meta { min-height:24px; color:#667085; font-size:10px; line-height:24px; white-space:nowrap; }
.batch-step-sub {
  min-height:24px; padding:0 2px; border:0; background:transparent;
  color:#667085; font-size:10px; line-height:24px; text-align:left; box-shadow:none;
}
.batch-step-sub:hover { border:0; background:transparent; color:var(--primary); text-decoration:underline; }
.batch-action-button { transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease; }
.batch-action-button:active { transform:translateY(1px) scale(.98); }
.batch-action-button.is-running { opacity:.78; cursor:wait; }
.batch-flow-step.is-complete { border-color:#dce9e2; background:#f7fbf8; }
.batch-flow-step.is-complete:hover { border-color:#bdd8c7; background:#f4faf6; }
.batch-flow-step.is-complete .batch-flow-index { background:#e8f6ed; color:#18864b; }
.batch-flow-step .batch-step.is-complete { color:#667085; }
.batch-flow-step .batch-step.is-complete:hover { color:#344054; }
.batch-step-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 16px;
  color: #b1bac8;
}
.batch-step-arrow .nav-ic { width: 14px; height: 14px; }
@media (max-width: 1100px) and (min-width: 861px) {
  #appView .batch-workflow { flex-wrap: wrap; }
  #appView .batch-flow-step {
    flex: 1 1 calc(50% - 4px);
    min-width: 150px;
  }
  #appView .batch-step-arrow { display: none; }
}
.batch-selection-card {
  display:grid;
  gap:4px;
  min-width:132px;
  padding:8px 10px;
  border:1px solid #e4e9f0;
  border-radius:8px;
  background:#f8fafc;
}
.batch-selection-card .checkline { color:#344054; font-weight:650; }
.batch-selection-count { padding-left:23px; color:#667085; font-size:10px; }
.batch-aux-action { border-color:#dfe4eb; background:#fff; color:#667085; }
.batch-aux-action:hover { border-color:#b9c3d0; background:#f8fafc; color:#344054; }
.qty-picker { width: min(560px, 94vw); }
.qty-picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  max-height: min(50vh, 400px);
  overflow-y: auto;
  padding: 2px 18px 14px;
}
.qty-picker-list label.qty-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-weight: 400;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.qty-picker-list label.qty-card:hover { border-color: #9dbdf0; }
.qty-picker-list label.qty-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-ring);
  background: var(--primary-soft);
}
.qty-picker-list label.qty-card > input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0; min-height: 0; margin: 0; padding: 0;
}
.qty-card-check {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .12s, transform .12s;
}
.qty-card.is-selected .qty-card-check { opacity: 1; transform: scale(1); }
.qty-card-num {
  color: var(--primary);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.qty-card-meta { color: var(--text); font-size: 13px; font-weight: 600; }
.qty-card-sub { color: var(--muted); font-size: 11px; }

/* 扫描次数:同一个包裹贴了两张面单时,第二次扫到要立刻能看出来 */
.scan-tally {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  /* #scanResult 是 flex-direction:row / nowrap,不这么写会被挤成 137px 的窄条、
     文字一个字一行竖着排。占满整行、并且不许被压缩。 */
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
}
.scan-tally-num {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.scan-tally-note { flex: 1 1 220px; font-size: 12px; line-height: 1.5; }
.scan-tally button.tiny { min-height: 28px; padding: 0 12px; font-size: 12px; }
.scan-tally--first {
  border-color: #cfe3d4;
  background: var(--success-soft);
}
.scan-tally--first .scan-tally-num { color: var(--success-text); }
.scan-tally--first .scan-tally-note { color: var(--success-text); }
/* 第 2 次起换成警示色:这时候八成是重复贴单,不能和正常扫描长得一样 */
.scan-tally--repeat {
  border-color: #f3c9c9;
  background: var(--danger-soft);
}
.scan-tally--repeat .scan-tally-num { color: var(--danger-text); }
.scan-tally--repeat .scan-tally-note { color: var(--danger-text); font-weight: 600; }

/* ── 主库存台账:商品 × 仓库 卡片(仓库方按实盘改数量) ── */
#appView .workspace[data-view="products"].stock-ledger-workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  padding-bottom: 12px;
  overflow: hidden;
}

#appView .workspace[data-view="products"].stock-ledger-workspace > #content {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.stock-ledger-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.stock-ledger-page > .stock-tabs-panel,
.stock-ledger-page > .inbound-review-source-warning {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.stock-ledger-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.stock-ledger-sticky-head {
  min-width: 0;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  box-shadow: 0 1px 0 #e4e7ec;
}

.stock-ledger-warehouse-tabs {
  padding: 2px 14px 0;
  overflow-x: auto;
  border-bottom: 1px solid #e4e7ec;
  background: #fff;
  scrollbar-width: thin;
}

.stock-ledger-warehouse-tabs .stock-tabs {
  width: max-content;
  min-width: 100%;
}

.stock-ledger-card-scroll {
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
  scrollbar-gutter: stable;
}

.stock-ledger-pagination {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 12px;
  border-top: 1px solid #d0d5dd;
  background: rgba(255, 255, 255, .98);
  color: #667085;
  box-shadow: 0 -5px 16px rgba(16, 24, 40, .08);
  backdrop-filter: blur(8px);
}

.stock-ledger-pagination-summary { font-size: 12px; font-variant-numeric: tabular-nums; }
.stock-ledger-pagination-pages { display: flex; align-items: center; justify-content: center; gap: 5px; }
.stock-ledger-pagination-pages button { min-width: 32px; min-height: 32px; padding: 4px 8px; font-size: 12px; }
.stock-ledger-pagination-pages button.is-active { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 700; }
.stock-ledger-page-ellipsis { min-width: 18px; color: #98a2b3; text-align: center; }
.stock-ledger-page-size { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: #667085; font-size: 12px; white-space: nowrap; }
.stock-ledger-page-size select { width: 92px; min-height: 32px; padding-block: 4px; }

.rf-stock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  padding: 10px;
}

@media (min-width: 1600px) {
  .rf-stock-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1200px) and (min-width: 901px) {
  .rf-stock-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.rf-stock-card {
  display: block;
  align-self: start;
  height: max-content;
  min-height: 360px;
  padding: 8px;
  overflow: visible;
  border: 0;
  border-radius: 10px;
  background: var(--card, #fff);
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.07);
}

.rf-stock-card.warning {
  background: var(--card, #fff);
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.07);
}
.rf-stock-card.danger {
  background: var(--card, #fff);
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.07);
}
.rf-stock-card.is-updating { box-shadow: 0 0 0 2px #84adff, 0 8px 20px rgba(16, 24, 40, .08); }

.stock-ledger-toolbar {
  flex-wrap: nowrap;
  align-items: center;
}

.stock-ledger-controls {
  display: grid;
  grid-template-columns: auto minmax(210px, 250px) minmax(460px, 1fr);
  align-items: center;
  gap: 10px 12px;
  min-width: 0;
}

.stock-ledger-field {
  display: grid;
  grid-template-columns: auto 150px;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.stock-ledger-field select {
  min-width: 150px;
  min-height: 38px;
}

.stock-ledger-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.stock-ledger-toggle input {
  width: 16px !important;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--primary);
}

.stock-ledger-owner-filter {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 30px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.stock-ledger-owner-filter input { width: 100% !important; min-width: 0; padding-right: 8px; }
.stock-ledger-owner-filter button { min-width: 30px; min-height: 36px; padding: 0; color: #667085; font-size: 17px; line-height: 1; }

.stock-ledger-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(138px, .55fr) auto auto auto;
  gap: 8px;
  min-width: 0;
}

.stock-ledger-search input {
  width: 100% !important;
  min-width: 0;
}

/* 商品图按 3:4 显示 —— 竖版商品图裁成正方形会把上下切掉 */
.rf-stock-card__media {
  display: block;
  flex: 0 0 60px;
  width: 60px;
}

.rf-stock-card__media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  object-fit: cover;
  cursor: zoom-in;
}

.rf-stock-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  background: var(--bg-muted, #f3f4f6);
  color: var(--muted, #9ca3af);
  font-size: 12px;
}

.rf-stock-card__history { width: 100%; min-height: 32px; border-color: #b8ccf5; background: #fff; color: var(--primary); font-family: var(--font-cn-medium); }
.rf-stock-card__print { width: 100%; min-height: 32px; border-color: var(--primary); background: var(--primary); color: #fff; font-family: var(--font-cn-medium); }
.rf-stock-card__print:hover { border-color: var(--primary-dark); background: var(--primary-dark); color: #fff; }
.inventory-history-dialog { width: min(960px, 100%); max-width: 960px; }
.inventory-history-body { display: grid; gap: 14px; }
.inventory-history-product { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid #dbe4f0; border-radius: 8px; background: #f8fafc; }
.inventory-history-product__image img, .inventory-history-product__empty { width: 112px; aspect-ratio: 3 / 4; border-radius: 7px; object-fit: cover; }
.inventory-history-product__empty { display: grid; place-items: center; background: #eef2f6; color: #98a2b3; font-size: 12px; }
.inventory-history-product__body h3 { margin: 0 0 8px; font-size: 17px; }
.inventory-history-product__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.inventory-history-product__tags span { padding: 3px 8px; border-radius: 999px; background: #eaf2ff; color: #2459a9; font-size: 12px; }
.inventory-history-product__metrics { display: flex; gap: 24px; margin-top: 18px; }
.inventory-history-product__metrics div { display: grid; grid-template-columns: auto auto auto; align-items: end; gap: 5px; }
.inventory-history-product__metrics span { color: #667085; font-size: 12px; }
.inventory-history-product__metrics strong { font-size: 24px; line-height: 1; }
.inventory-history-product__metrics em { color: #667085; font-style: normal; font-size: 12px; }
.inventory-history-section-head { display: flex; align-items: center; justify-content: space-between; }
.inventory-history-section-head span { color: #98a2b3; font-size: 12px; }
.inventory-history-record { padding: 12px; border: 1px solid #e4e7ec; border-radius: 8px; background: #fff; }
.inventory-history-record > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inventory-history-record > header > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.inventory-history-record__actions { justify-content: flex-end; }
.stock-card-transit-approve { min-height: 30px; padding: 4px 10px; white-space: nowrap; }
.inventory-history-record > header strong { overflow-wrap: anywhere; }
.inventory-history-track { min-height: 28px; padding: 3px 9px; color: var(--primary); }
.inventory-history-record dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0 0; }
.inventory-history-record dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
.inventory-history-record dl > div.wide { grid-column: 1 / -1; }
.inventory-history-record dt { color: #98a2b3; font-size: 12px; }
.inventory-history-record dd { margin: 0; color: #344054; overflow-wrap: anywhere; }
.inventory-history-images { display: flex; gap: 7px; margin-top: 10px; }
.inventory-history-images img { width: 52px; aspect-ratio: 3 / 4; border-radius: 5px; object-fit: cover; cursor: zoom-in; }
@media (max-width: 720px) {
  .inventory-history-product { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
  .inventory-history-product__image img, .inventory-history-product__empty { width: 84px; }
  .inventory-history-product__metrics { flex-wrap: wrap; gap: 12px; margin-top: 12px; }
  .inventory-history-record dl { grid-template-columns: 1fr; }
  .inventory-history-record dl > div.wide { grid-column: auto; }
}

.rf-stock-card__body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 5px;
  min-width: 0;
}

.rf-stock-card__head {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 68px;
}

.rf-stock-card__overview { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.rf-stock-card__head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.rf-stock-card__head-actions > button {
  position: static;
  flex: 0 0 auto;
  min-height: 27px;
  padding: 3px 8px;
  font-size: 11px;
}
.rf-stock-card__head-actions > .stock-card-merge-check {
  flex: 0 0 16px;
}
.rf-stock-card__settings,
.rf-stock-card__remark {
  min-height: 27px;
  padding: 3px 8px;
  border-color: #d0d5dd;
  background: #fff;
  color: #475467;
  font-size: 11px;
}
.rf-stock-card__remark { position: relative; }
.rf-stock-card__remark.has-value::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  content: "";
}

.rf-stock-card__name {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  line-height: 1.4;
  min-height: 2.8em;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.rf-stock-card__name:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

.rf-stock-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.rf-stock-tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 10px;
}

.rf-stock-tag.owner {
  background: var(--bg-muted, #f3f4f6);
  color: var(--muted, #6b7280);
}
.rf-stock-tag.packaging {
  background: #eef9f2;
  color: #187044;
  white-space: normal;
}
.order-inventory-card__packaging {
  color: #187044;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.rf-stock-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  align-items: stretch;
  min-height: 50px;
  gap: 0;
  padding: 0;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #f9fafb;
}

.rf-stock-card__metrics > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 4px 7px;
  border-right: 1px solid #e4e7ec;
}

.rf-stock-card__metrics > div:last-child { border-right: 0; }
.rf-stock-card__metrics > div:nth-child(2) { border-right: 0; }
.rf-stock-card__metrics > div:nth-child(-n + 2) { border-bottom: 1px solid #e4e7ec; }

.rf-stock-card__metric-button {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.rf-stock-card__metric-button:hover strong { color: var(--primary); }

.rf-stock-card__metrics span {
  color: var(--muted, #6b7280);
  font-size: 11px;
  white-space: nowrap;
}

.rf-stock-card__metrics strong {
  font-size: 18px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.rf-stock-card__metrics small {
  color: var(--muted, #9ca3af);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rf-stock-card__daily {
  display: grid;
  grid-template-columns: repeat(6, minmax(52px, 1fr)) minmax(72px, 1.2fr);
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fff;
}
.rf-stock-daily { display: grid; grid-template-columns: 1fr auto; align-items: baseline; min-width: 0; padding: 6px 5px; border-right: 1px solid #eef0f3; text-align: center; }
.rf-stock-daily:last-child { border-right: 0; }
.rf-stock-daily span { grid-column: 1 / -1; overflow: hidden; color: #667085; font-size: 10px; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }
.rf-stock-daily strong { justify-self: end; color: #101828; font-size: 15px; line-height: 20px; font-variant-numeric: tabular-nums; }
.rf-stock-daily small { color: #98a2b3; font-size: 9px; }
.rf-stock-daily.today { background: #eff8ff; }
.rf-stock-daily.today span, .rf-stock-daily.today strong { color: #175cd3; }
.rf-stock-daily.total { background: #f4f7ff; box-shadow: inset 2px 0 #84adff; }
.rf-stock-daily.total span, .rf-stock-daily.total strong { color: #2459a9; font-weight: 700; }

.rf-stock-card__restock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  gap: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-muted, #f8fafc);
  color: var(--muted, #6b7280);
  font-size: 12px;
}

.rf-stock-card__restock.warning { background: #fffaeb; color: #b45309; }
.rf-stock-card__restock.danger { background: #fef2f2; color: #b91c1c; }

.rf-stock-card__restock span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  line-height: 1.4;
}

.rf-stock-card__restock strong {
  flex: 0 0 auto;
  max-width: 92px;
  text-align: right;
}

.rf-stock-card__skus {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  min-height: 22px;
  gap: 6px;
}

.rf-stock-card__footer {
  display: flex;
  justify-content: stretch;
  gap: 5px;
  margin-top: auto;
  padding-top: 5px;
  border-top: 1px solid #eef2f6;
}

.rf-stock-card__adjust {
  min-width: 0;
  min-height: 29px;
  white-space: nowrap;
}

.rf-stock-card__footer button { flex: 1 1 0; min-width: 0; min-height: 29px; padding: 3px 5px; font-size: 11px; }
.rf-stock-card__locator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, .8fr);
  gap: 6px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #f8fafc;
}
.rf-stock-card__locator span { display: grid; min-width: 0; gap: 1px; }
.rf-stock-card__locator em { color: #98a2b3; font-style: normal; font-size: 9px; }
.rf-stock-card__locator strong { overflow: hidden; color: #344054; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.rf-stock-card__locator-value { display: block; min-width: 0; padding: 0; overflow: hidden; border: 0; background: transparent; text-align: left; cursor: pointer; }
.rf-stock-card__locator-value:hover strong { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.rf-stock-card__locator-value:disabled { cursor: default; }
.rf-stock-card__locator-value:disabled strong { text-decoration: none; }
.rf-stock-card__auto { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 4px 7px; border-radius: 5px; background: #f2f4f7; }
.rf-stock-card__auto.is-enabled { background: #eff8ff; }
.rf-stock-card__auto > span { display: grid; gap: 1px; min-width: 0; }
.rf-stock-card__auto strong { color: #344054; font-size: 11px; }
.rf-stock-card__auto em { overflow: hidden; color: #667085; font-style: normal; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.rf-stock-switch { position: relative; flex: 0 0 34px; width: 34px; min-height: 20px; padding: 0; border: 0; border-radius: 10px; background: #98a2b3; }
.rf-stock-switch i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.rf-stock-switch.is-on { background: var(--primary); }
.rf-stock-switch.is-on i { transform: translateX(14px); }
.rf-stock-card__activity { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid #eaecf0; border-radius: 5px; }
.rf-stock-card__activity > span { display: grid; gap: 0; padding: 3px 5px; border-right: 1px solid #eaecf0; text-align: center; }
.rf-stock-card__activity > span:last-child { border-right: 0; }
.rf-stock-card__activity em { color: #98a2b3; font-style: normal; font-size: 9px; }
.rf-stock-card__activity strong { color: #344054; font-size: 13px; }
.rf-stock-sku.more { border-style: dashed; color: #667085; }
.stock-card-settings-dialog { width: min(620px, calc(100vw - 28px)); }
.stock-card-code-readonly { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 3px 12px; padding: 10px 12px; border-radius: 6px; background: #f2f4f7; }
.stock-card-code-readonly span { color: #667085; font-size: 11px; }
.stock-card-code-readonly strong { color: #101828; font-size: 16px; font-variant-numeric: tabular-nums; }
.stock-card-shelf-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stock-card-shelf-fields select { width: 100%; min-height: 38px; }
.stock-card-shelf-status { padding: 7px 10px; border-radius: 5px; background: #f8fafc; color: #475467; font-size: 11px; }
.stock-card-auto-setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 6px; background: #f8fafc; }
.stock-card-auto-setting label { display: flex; align-items: center; gap: 7px; color: #667085; font-size: 12px; }
.stock-card-auto-setting strong { color: #344054; font-size: 13px; }
.stock-card-auto-setting input[type="checkbox"] { flex: 0 0 auto; width: 18px !important; height: 18px; min-height: 0; accent-color: var(--primary); }
.stock-card-auto-setting input[type="number"] { width: 90px; min-height: 34px; }
.stock-card-remark-dialog { width: min(560px, calc(100vw - 28px)); }
.stock-card-remark-dialog textarea { width: 100%; min-height: 116px; resize: vertical; }
.stock-card-remark-hint { color: #667085; font-size: 11px; line-height: 1.6; }
.stock-card-field-dialog { width: min(620px, calc(100vw - 28px)); }
.stock-card-field-hint { padding: 8px 10px; border-radius: 5px; background: #f8fafc; color: #667085; font-size: 11px; line-height: 1.6; }
.stock-card-transit-dialog { width: min(960px, calc(100vw - 28px)); }
.stock-card-history-more { display: flex; justify-content: center; margin: 12px 0 4px; }
.stock-card-history-more button { min-width: 140px; }
@media (max-width: 620px) { .stock-card-shelf-fields { grid-template-columns: 1fr; } }

.stock-adjust-dialog { max-width: 580px; }

.stock-adjust-current {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
}

.stock-adjust-current strong {
  color: #101828;
  font-size: 20px;
  font-weight: 650;
}

.stock-adjust-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.stock-adjust-mode {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 68px;
  padding: 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  text-align: left;
}

.stock-adjust-mode:hover { border-color: #84adf7; background: #f8fbff; }
.stock-adjust-mode.active { border-color: #146ef5; background: #eff6ff; box-shadow: inset 0 0 0 1px #146ef5; }
.stock-adjust-mode strong { font-size: 13px; font-weight: 650; line-height: 1.35; }
.stock-adjust-mode small { color: #667085; font-size: 11px; font-weight: 400; line-height: 1.35; }

.stock-adjust-form { margin-top: 4px; }

.stock-adjust-result {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 5px;
  background: #f2f4f7;
  color: #667085;
  font-size: 12px;
}

.stock-adjust-result[data-tone="increase"] { background: #ecfdf3; color: #067647; }
.stock-adjust-result[data-tone="decrease"] { background: #fef3f2; color: #b42318; }

.stock-adjust-hint {
  margin: 12px 0 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.55;
}

.rf-stock-sku {
  padding: 1px 8px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 999px;
  font-size: 12px;
}

.rf-stock-sku em {
  color: #1d4ed8;
  font-style: normal;
  font-weight: 600;
}

.rf-stock-sku.warn {
  border-color: #f0b429;
  color: #b45309;
}

.stock-tab-badge.danger {
  background: #fef2f2;
  color: #b91c1c;
}

.stock-ledger-header-stats { display: flex; align-items: center; gap: 4px; margin-right: 4px; padding: 3px 5px; border-radius: 6px; background: #f7f9fc; }
.stock-ledger-header-stat { display: inline-flex; align-items: baseline; gap: 5px; min-height: 28px; padding: 3px 9px; border-right: 1px solid #e4e7ec; white-space: nowrap; }
.stock-ledger-header-stat:last-child { border-right: 0; }
.stock-ledger-header-stat em { color: #667085; font-size: 11px; font-style: normal; }
.stock-ledger-header-stat strong { color: #101828; font-size: 15px; font-variant-numeric: tabular-nums; }
.stock-ledger-header-stat.danger strong { color: #b42318; }
.stock-ledger-header-stat.warning strong { color: #b54708; }
.stock-ledger-header-stat.info strong { color: #175cd3; }
.stock-ledger-log-toolbar { align-items: center; gap: 12px; }
.stock-ledger-log-filters { display: grid; grid-template-columns: minmax(260px, 1fr) 160px 140px auto; gap: 8px; min-width: min(760px, 100%); }
.stock-ledger-log-filters input, .stock-ledger-log-filters select { width: 100%; min-width: 0; }
.stock-ledger-log-table { min-width: 1320px; }
.stock-ledger-log-table th:nth-child(1) { width: 170px; }
.stock-ledger-log-table th:nth-child(2), .stock-ledger-log-table th:nth-child(3) { width: 150px; }
.stock-ledger-log-table th:nth-child(4) { width: 130px; }
.stock-ledger-log-table th:nth-child(5) { width: 220px; }
.stock-ledger-log-summary, .stock-ledger-log-detail { max-width: 360px; line-height: 1.55; overflow-wrap: anywhere; }
.stock-ledger-log-time { color: #475467; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 1280px) {
  .stock-ledger-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .stock-ledger-controls {
    width: 100%;
    grid-template-columns: auto minmax(210px, .45fr) minmax(0, 1fr);
  }

  .stock-ledger-search { min-width: 420px; }
}

@media (max-width: 1100px) {
  .stock-ledger-header-stats { order: 2; width: 100%; margin: 4px 0 0; overflow-x: auto; }
  .stock-ledger-log-toolbar { align-items: stretch; flex-direction: column; }
  .stock-ledger-log-filters { min-width: 0; width: 100%; grid-template-columns: minmax(220px, 1fr) 150px 140px auto; }
}

@media (max-width: 900px) {
  .stock-ledger-controls { grid-template-columns: auto minmax(0, 1fr); }
  .stock-ledger-search { grid-column: 1 / -1; min-width: 0; }
  .stock-ledger-pagination { grid-template-columns: 1fr auto; }
  .stock-ledger-pagination-pages { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; }
  .rf-stock-grid { grid-template-columns: 1fr; }
  .rf-stock-card__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rf-stock-card__metrics > div:nth-child(2) { border-right: 0; }
  .rf-stock-card__daily { grid-template-columns: repeat(4, minmax(62px, 1fr)); }
  .rf-stock-daily:nth-child(4) { border-right: 0; }
  .rf-stock-daily:nth-child(-n + 4) { border-bottom: 1px solid #eef0f3; }
  .rf-stock-daily.total { grid-column: span 2; }
}

@media (max-width: 860px) {
  #appView .workspace[data-view="products"].stock-ledger-workspace {
    height: calc(100dvh - 112px);
  }
}

@media (max-width: 720px) {
  .stock-ledger-controls { grid-template-columns: 1fr; }
  .stock-ledger-field { grid-template-columns: 1fr; }
  .stock-ledger-search {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .stock-ledger-toggle { justify-content: flex-start; }
  .stock-ledger-pagination { grid-template-columns: 1fr; }
  .stock-ledger-pagination-summary,
  .stock-ledger-page-size { justify-self: center; }
  .stock-ledger-pagination-pages { grid-column: auto; grid-row: auto; max-width: 100%; }
  .stock-ledger-log-filters { grid-template-columns: 1fr 1fr; }
  .stock-ledger-log-filters input { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .stock-adjust-mask { padding: 8px; }
  .stock-adjust-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }
  .stock-adjust-modes { grid-template-columns: 1fr; }
  .stock-adjust-mode { min-height: 0; }
  .rf-stock-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 0;
  }
  .rf-stock-card__media { width: 96px; }
}

/* 发货倍率 + 发货最小单位件数。仓库按「个」拿货,只看件数会少拿 ——
   一单 2 件、每件 5 个,要拿 10 个出来。字号和上面的件数一样大(用户要求),
   换个色跟件数区分开:件数是蓝的,这两行用琥珀色。
   倍率单独占一行:仓库要能看出「为什么是 10 个」,只给结果不给依据,
   配错了没人能当场发现。 */
/* 卡头的预报仓库标签:一屏几十单、仓库方可能绑多个仓,不标出来得点进去看 */
.order-head-main .order-wh {
  padding: 1px 8px;
  border-radius: 4px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  white-space: nowrap;
}
.order-head-main .order-wh--none {
  background: #fff7e6;
  color: #b45309;
}

/* 数量与倍率在第一行；仓库真正照着拣货的发货个数独占第二行。 */
.rootflow-product-details .qty-summary-block {
  display: block;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #eaecf0;
}
.rootflow-product-details .qty-summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.rootflow-product-details .qty-summary-item {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 0 9px;
  border-right: 1px solid #eaecf0;
}
.rootflow-product-details .qty-summary-item:first-child { padding-left: 0; }
.rootflow-product-details .qty-summary-item:last-child { padding-right: 0; border-right: 0; }
.rootflow-product-details .qty-summary-item > span { color: #667085; font-size: 10px; white-space: nowrap; }
.rootflow-product-details .qty-value { font-size: 23px; }
.rootflow-product-details .qty-value--rate { color: #667085; font-size: 23px; font-weight: 750; }
.rootflow-product-details .qty-row--rate.is-multi .qty-value--rate { color: #b54708; font-weight: 800; }
.rootflow-product-details .qty-pieces-row {
  display: grid;
  grid-template-columns: 72px auto minmax(0, 1fr);
  align-items: end;
  gap: 9px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #eaecf0;
}
.rootflow-product-details .qty-pieces-row > span { color: #667085; font-size: 11px; white-space: nowrap; }
.rootflow-product-details .qty-value--pieces {
  color: #b54708;
  font-size: 52px;
  font-weight: 850;
  line-height: .92;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.rootflow-product-details .qty-mult {
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

/* =====================================================   多商品订单的商品区(2026-08-23)
   一单发好几件货时,卡片原来只画第一件 + 一句「另 N 个商品」——
   仓库照着卡片拣货必漏。改成一件货一行,每行有自己的图/SKU/数量/倍率。
   布局:合并原来的「商品图」和「SKU」两格(span 2),行内左图右信息。
   ============================================================ */
.order-card-grid .order-products-cell {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.order-products-head {
  font-size: 12px;
  color: #8a94a6;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.order-product-line {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.order-product-line:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.order-product-line-img {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.order-product-line-img > img { display: block; flex-shrink: 0; }
.order-product-line-img:has(> img.order-product-img:not([data-image-loaded="1"]))::after {
  content: "主图加载中";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  pointer-events: none;
}
.order-product-image-note {
  display: block;
  flex-shrink: 0;
  width: fit-content;
  max-width: 100%;
  margin: 4px auto 0;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 247, 237, .94);
  color: #9a3412;
  font-size: 10px;
  line-height: 1.4;
  pointer-events: none;
}
.order-product-line-body { min-width: 0; }

/* 行内小图:比单商品的大图小一圈,但仍要看得清货长什么样。
   必须带 .order-card-grid 前缀 —— 上面那轮的 `.order-card-grid .order-product-img`
   特异性比裸类名高,不加前缀这几行会被它整条吃掉(试过,图会撑成 3:4 的大格)。
   比例仍用 3/4:Ozon 原图多是 1024×1536,横版会把商品压扁。 */
.order-card-grid .order-product-img--multi {
  width: 100%;
  max-width: 104px;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  background: #f9fafb;
}

/* 行首序号:仓库逐件点着核对,「第几件」要一眼可数 */
.order-product-idx {
  position: absolute;
  top: -4px;
  left: -4px;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #146ef5;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(20, 110, 245, .28);
}

/* 多商品时每行都有一个「发货个数」大数字,原尺寸(38px)会把卡片撑到翻倍高 */
.order-product-line .rootflow-product-details .qty-value { font-size: 20px; }
.order-product-line .rootflow-product-details .qty-value--rate { font-size: 18px; }
.order-product-line .rootflow-product-details .qty-value.qty-value--pieces { font-size: 32px; }

/* 窄屏(≤1400 走 5 列、≤860 走 3 列)不另设规则:商品区照样占两格,
   下面的平台/明细列才留得住位置。试过让它独占整行 —— 平台列被挤到
   140px,「预报时间」一个日期能折成三行,反而更难看。
   ≤640px 整张卡是 display:block,grid-column 自动失效,不用管。 */

/* 库存页标题右侧的通用快递查询，以及审核表里的单号级查询入口。 */
.page-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-header-actions[hidden] { display: none; }
.page-header-actions button { min-height: 34px; padding-inline: 14px; }
.page-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.page-refresh-button svg { width: 16px; height: 16px; }
.page-refresh-button.is-loading svg { animation: page-refresh-spin .8s linear infinite; }
@keyframes page-refresh-spin { to { transform: rotate(360deg); } }

.inbound-review-tracking-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.domestic-tracking-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.domestic-tracking-line .domestic-tracking-number {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.express-track-button {
  min-height: 28px;
  padding: 3px 8px;
  border-color: #b8d5ff;
  color: #175cd3;
  background: #eff6ff;
  font-size: 12px;
  white-space: nowrap;
}
.express-track-button:hover { border-color: #84adff; background: #e7f0ff; }
.order-card-express-track {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 2px 7px;
  font-size: 11px;
}

.express-track-inline-result {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.express-track-inline-result.is-transit { background: #eff8ff; color: #175cd3; }
.express-track-inline-result.is-signed { background: #ecfdf3; color: #067647; }

@media (max-width: 760px) {
  .page-header-actions { width: 100%; margin-left: 0; }
  .page-header-actions button { width: 100%; }
}


/* 账户追溯、订单官方时间与订单直建库存卡。 */
.order-product-ozon-link { color: inherit; text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.order-product-ozon-link:hover { color: var(--primary); text-decoration: underline; }
.order-product-ozon-link:focus-visible { border-radius: 3px; outline: 2px solid rgba(20, 110, 245, .34); outline-offset: 2px; }
.product-title-row { min-width: 0; margin-top: 3px; }
.product-title-row .order-product-ozon-link { display: block; min-width: 0; }
.order-transaction-price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #067647;
  font-variant-numeric: tabular-nums;
}
.order-transaction-price span { color: #067647; font-size: 11px; }
.order-transaction-price strong { color: #047857; font-size: 15px; font-weight: 800; }
.delivery-weight-range { margin-top:6px; color:#667085; font-size:11px; font-weight:650; line-height:1.4; }
.weight-guard-alert {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  padding: 7px;
  border: 1px solid #f04438;
  border-radius: 7px;
  background: #fff3f2;
  color: #b42318;
}
.weight-guard-mark,
.weight-warning-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d92d20;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.weight-guard-alert strong,
.weight-guard-alert span { display: block; }
.weight-guard-alert span:not(.weight-guard-mark) { margin-top: 2px; font-size: 10px; line-height: 1.45; }
.weight-guard-alert button {
  grid-column: 1 / -1;
  min-height: 26px;
  border: 0;
  background: transparent;
  color: #b42318;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}
.weight-guard-alert em {
  grid-column: 1 / -1;
  color: #b42318;
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}
.weight-warning-icon { width: 17px; height: 17px; margin-left: 6px; font-size: 12px; vertical-align: middle; }
.rootflow-product-details .product-weight-alert-row strong { color: #d92d20; }
.create-inventory-card-link {
  display:block; margin-top:3px; padding:2px 0; border:0; background:transparent;
  color:var(--primary); font-size:12px; font-weight:700; text-align:left; box-shadow:none;
}
.create-inventory-card-link:hover { background:transparent; color:#0958d9; text-decoration:underline; }
.ozon-official-times { display:grid; gap:3px; margin:3px 0; padding:6px 8px; border-left:2px solid #9fc2ff; background:#f7faff; }
.ozon-official-times > div { display:grid; grid-template-columns:76px minmax(0,1fr); gap:4px; font-size:12px; }
.ozon-official-times span { color:var(--muted); }
.ozon-official-times strong { color:#344054; font-weight:650; }
.ozon-official-time-empty { color:var(--muted); font-size:12px; }
.order-inventory-card-modal { width:min(720px,calc(100vw - 32px)); }
.inventory-card-form { display:grid; gap:16px; }
.inventory-card-product-preview {
  display:grid; grid-template-columns:76px minmax(0,1fr); gap:14px; align-items:center;
  padding:12px; border:1px solid var(--line); background:var(--surface-soft);
}
.inventory-card-product-preview img { width:76px; aspect-ratio:3/4; object-fit:cover; border-radius:4px; background:#eef1f5; }
.inventory-card-product-preview > div { display:grid; gap:5px; min-width:0; }
.inventory-card-product-preview span { color:var(--muted); font-size:12px; }
.inventory-mapping-replace { align-items:flex-start; padding:10px 12px; border:1px solid #ffd8a8; background:#fff9f0; color:#7c4a03; }
.account-summary-grid { display:grid; gap:10px; margin-bottom:10px; }
.account-identity-lines { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; padding:0; }
.account-identity-lines > div { display:grid; gap:4px; min-width:0; padding:13px 14px; border-right:1px solid var(--line); }
.account-identity-lines > div:last-child { border-right:0; }
.account-identity-lines span { color:var(--muted); font-size:12px; }
.account-identity-lines strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-log-toolbar { align-items:end; }
.operation-detail { max-width:520px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-subaccount-modal { width:min(620px,calc(100vw - 32px)); }
@media (max-width:900px) {
  .account-identity-lines { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .account-identity-lines > div:nth-child(2) { border-right:0; }
  .account-identity-lines > div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
}
@media (max-width:640px) {
  .account-identity-lines { grid-template-columns:1fr; }
  .account-identity-lines > div { border-right:0; border-bottom:1px solid var(--line); }
  .account-identity-lines > div:last-child { border-bottom:0; }
  .inventory-card-product-preview { grid-template-columns:58px minmax(0,1fr); }
  .inventory-card-product-preview img { width:58px; }
.ozon-official-times > div { grid-template-columns:70px minmax(0,1fr); }
}


/* =====================================================   RootFlow logistics UI coherence v232 / 2026-08-27
   Admin workspace layer: consistent hierarchy, spacing,
   task grouping, responsive reflow, and keyboard visibility.
   ============================================================ */
#appView {
  --ui-page-max: 1760px;
  --ui-canvas: #f4f6f8;
  --ui-surface: #ffffff;
  --ui-surface-subtle: #f8fafc;
  --ui-border: #dfe3e8;
  --ui-border-strong: #c8ced8;
  --ui-text: #1d1d1f;
  --ui-text-secondary: #344054;
  --ui-text-muted: #667085;
  background: var(--ui-canvas);
  color: var(--ui-text);
}

#appView .workspace[data-view] {
  min-width: 0;
  padding: 18px 20px 40px;
  background: var(--ui-canvas);
}

#appView .workspace[data-view] > .topbar,
#appView .workspace[data-view] > .stats-bar,
#appView .workspace[data-view] > #content {
  width: 100%;
  max-width: var(--ui-page-max);
  margin-right: auto;
  margin-left: auto;
}

#appView .workspace[data-view="orders"] > .topbar,
#appView .workspace[data-view="orders"] > .stats-bar,
#appView .workspace[data-view="orders"] > #content,
#appView .workspace[data-view="scanDesk"] > .topbar,
#appView .workspace[data-view="scanDesk"] > .stats-bar,
#appView .workspace[data-view="scanDesk"] > #content {
  max-width: none;
}

#appView .topbar {
  min-height: 58px;
  margin-bottom: 12px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--ui-border);
  background: transparent;
}

#appView .topbar h1 {
  color: var(--ui-text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.01em;
}

#appView .topbar p {
  max-width: 920px;
  margin-top: 4px;
  color: var(--ui-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

#appView .page-header-actions {
  align-items: center;
  gap: 8px;
}

#appView .panel,
#appView .order-card,
#appView .scan-order-card {
  border-color: var(--ui-border);
  border-radius: 2px;
  background: var(--ui-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
}

#appView .panel {
  margin-bottom: 12px;
}

#appView .panel:hover,
#appView .order-card:hover,
#appView .scan-order-card:hover {
  border-color: var(--ui-border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
  transform: none;
}

#appView .panel-head {
  min-height: 52px;
  padding: 11px 14px;
  gap: 10px 18px;
  border-bottom-color: var(--ui-border);
  background: var(--ui-surface);
}

#appView .panel-head > div:first-child {
  min-width: 0;
}

#appView .panel-title {
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

#appView .panel-desc {
  max-width: 980px;
  margin-top: 3px;
  color: var(--ui-text-muted);
  font-size: 11px;
  line-height: 1.55;
}

#appView .panel-body {
  padding: 14px;
}

:where(#appView) :where(button) {
  min-height: 34px;
  padding: 7px 12px;
  border-color: var(--ui-border-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ui-text-secondary);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
}

:where(#appView) :where(button):hover {
  border-color: #98a2b3;
  background: var(--ui-surface-subtle);
  color: var(--ui-text);
}

:where(#appView) button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

:where(#appView) button.primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: #fff;
}

:where(#appView) button.ghost {
  border-color: transparent;
  background: #f2f4f7;
  color: #475467;
}

:where(#appView) button.ghost:hover {
  border-color: #d0d5dd;
  background: #eaecf0;
  color: #1d2939;
}

:where(#appView) button.danger {
  border-color: #fda29b;
  background: #fff;
  color: var(--danger-text);
}

:where(#appView) button.danger:hover {
  border-color: #f97066;
  background: var(--danger-soft);
  color: var(--danger-text);
}

:where(#appView) button.warning-action,
:where(#appView) button.warn {
  border-color: #fedf89;
  background: #fff;
  color: var(--warning-text);
}

:where(#appView) button.warning-action:hover,
:where(#appView) button.warn:hover {
  border-color: #fdb022;
  background: var(--warning-soft);
  color: var(--warning-text);
}

#appView :where(button, input, select, textarea, summary, a):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: none;
}

#appView input:not([type="checkbox"]):not([type="radio"]),
#appView select,
#appView textarea {
  min-height: 38px;
  border-color: var(--ui-border-strong);
  border-radius: 5px;
  color: var(--ui-text);
  font-size: 13px;
}

#appView input::placeholder,
#appView textarea::placeholder {
  color: #98a2b3;
}

#appView .table-wrap {
  border-radius: 0;
  background: #fff;
}

#appView table {
  color: var(--ui-text-secondary);
  font-variant-numeric: tabular-nums;
}

#appView thead th,
#appView th {
  min-height: 40px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ui-border);
  background: #f7f8fa;
  color: #475467;
  font-size: 11px;
  font-weight: 650;
}

#appView td {
  padding: 10px 12px;
  border-bottom: 1px solid #eaecf0;
  color: var(--ui-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

#appView tbody tr {
  box-shadow: inset 0 -1px rgba(16, 24, 40, .018);
}

#appView tbody tr:hover td {
  background: #f8fafc;
}

#appView .row-actions {
  gap: 5px;
}

#appView .row-actions button,
#appView .stock-actions button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11.5px;
}

#appView .order-tabs,
#appView .finance-tabs,
#appView .stock-tabs,
#appView .check-tabs-bar {
  gap: 20px;
  padding-inline: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--ui-border);
  background: #fff;
}

#appView .order-tabs button,
#appView .finance-tabs button,
#appView .stock-tabs .stock-tab,
#appView .check-tab {
  min-height: 42px;
  color: #667085;
  font-size: 12px;
}

#appView .order-tabs button.active,
#appView .finance-tabs button.active,
#appView .stock-tabs .stock-tab.active,
#appView .check-tab.active {
  color: var(--primary);
  box-shadow: inset 0 -2px var(--primary);
}

/* Orders: separate selection, warehouse work, filters, and totals. */
#appView .batch-bar {
  display: grid;
  grid-template-columns: 190px minmax(680px, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  min-height: 0;
  margin: 10px 0 12px;
  padding: 8px 10px 0;
  border: 1px solid var(--ui-border);
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
}

#appView .batch-selection,
#appView .batch-work-area,
#appView .batch-filter-area,
#appView .batch-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

#appView .batch-selection {
  display: grid;
  align-self: stretch;
  align-content: center;
  white-space: nowrap;
}

#appView .batch-work-area {
  flex-wrap: nowrap;
}

#appView .batch-work-area .batch-workflow {
  flex: 1 1 auto;
}

#appView .batch-work-area .batch-aux-action { flex:0 0 auto; align-self:center; }

#appView .batch-summary {
  justify-content: flex-end;
  white-space: nowrap;
}

#appView .batch-summary strong {
  margin: 0;
  color: var(--ui-text);
  font-size: 18px;
  font-weight: 650;
}

#appView .batch-summary .truncate-note {
  font-size: 11px;
  white-space: normal;
}

#appView .batch-filter-area {
  grid-column: 1 / -1;
  padding: 8px 0 10px;
  border-top: 1px solid #eaecf0;
  overflow: hidden;
}

#appView .batch-filter-area > button {
  flex: 0 0 auto;
}

#appView .confirm-stock-batch-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

#appView .confirm-stock-batch-tools > button {
  min-height: 34px;
  white-space: nowrap;
}

#appView .confirm-stock-batch-tools > button > span {
  display: inline-flex;
  min-width: 20px;
  justify-content: center;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(23, 92, 211, .10);
  color: inherit;
  font-size: 11px;
}

#appView .batch-filter-area .qty-filter-inline {
  flex: 1 1 auto;
}

#appView .batch-filter-area .qty-quick-row {
  max-width: none;
}

#appView .order-head {
  min-height: 40px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--ui-border);
  background: #f8fafc;
  box-shadow: none;
}

#appView .order-card-grid > div {
  border-color: var(--ui-border);
}

#appView .order-actions .oa-primary-row button,
#appView .order-actions .oa-secondary-row button,
#appView .order-actions .oa-more-grid button {
  min-height: 32px;
}

/* Inventory: keep the page action in the header and use wide space purposefully. */
#appView .workspace[data-view="products"] .page-header-actions button {
  min-width: 88px;
}

#appView .workspace[data-view="products"] .stock-aging-panel .panel-body {
  display: grid;
  grid-template-columns: minmax(620px, 1.35fr) minmax(380px, .65fr);
  align-items: start;
  gap: 14px;
}

#appView .workspace[data-view="products"] .aging-wh-table {
  margin-top: 0;
}

#appView .workspace[data-view="products"] .panel-head > .actions {
  flex: 1 1 520px;
  justify-content: flex-end;
}

#appView .workspace[data-view="products"] .panel-head > .actions input {
  width: min(340px, 40vw);
}

/* Settings: use paired configuration panels and collapse reference copy. */
#appView .settings-core-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

#appView .settings-core-grid .settings-config-panel {
  height: calc(100% - 12px);
}

#appView .settings-config-panel .settings-field {
  max-width: 560px;
}

#appView .label-paper-grid {
  width: 100%;
  grid-template-columns: minmax(420px, .9fr) minmax(300px, 1.1fr);
  gap: 26px;
}

#appView .label-paper-grid > div:first-child {
  width: 100%;
  max-width: 560px;
}

#appView .label-paper-grid .label-paper-preview {
  justify-self: center;
}

#appView .settings-inline-note {
  margin-top: 10px;
  line-height: 1.7;
}

#appView .settings-inline-note button {
  margin-top: 8px;
}

#appView .settings-help {
  max-width: 860px;
  margin-top: 14px;
  border-top: 1px solid #eaecf0;
}

#appView .settings-help summary {
  width: fit-content;
  padding: 10px 0 2px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

#appView .settings-help-copy {
  max-width: 760px;
  padding: 6px 0 2px;
  color: var(--ui-text-muted);
  font-size: 12px;
  line-height: 1.7;
}

#appView .settings-help-copy p {
  margin: 0 0 6px;
}

#appView .workspace[data-view="settings"] .settings-grid {
  border-color: var(--ui-border);
}

#appView .workspace[data-view="settings"] .settings-item {
  min-width: 0;
  padding: 14px;
}

#appView .workspace[data-view="settings"] .settings-label {
  margin-bottom: 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 650;
}

/* Account and finance: stronger identity and quieter repeated rows. */
#appView .account-identity-lines > div {
  padding: 14px 16px;
  border-color: var(--ui-border);
  background: #fff;
}

#appView .account-identity-lines span {
  color: var(--ui-text-muted);
  font-size: 11px;
}

#appView .account-identity-lines strong {
  color: var(--ui-text);
  font-size: 13px;
}

#appView .workspace[data-view="finance"] td,
#appView .workspace[data-view="warehouseFinance"] td,
#appView .workspace[data-view="account"] td {
  padding-top: 9px;
  padding-bottom: 9px;
}

#appView .operation-detail {
  color: #667085;
}

@media (max-width: 1500px) {
  #appView .batch-bar {
    grid-template-columns: auto minmax(0, 1fr);
  }
  #appView .batch-summary {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 2px;
  }
}

@media (max-width: 1280px) {
  #appView .workspace[data-view="products"] .stock-aging-panel .panel-body {
    grid-template-columns: 1fr;
  }
  #appView .workspace[data-view="products"] .aging-wh-table {
    margin-top: 0;
  }
}

@media (max-width: 1080px) {
  #appView .workspace[data-view] {
    padding: 14px 12px 32px;
  }
  #appView .settings-core-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  #appView .label-paper-grid {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
}

@media (max-width: 860px) {
  #appView .workspace[data-view] {
    padding: 12px 10px 28px;
  }
  #appView .topbar {
    min-height: 52px;
  }
  #appView .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  #appView .panel-head > .actions,
  #appView .workspace[data-view="products"] .panel-head > .actions {
    flex: 0 1 auto;
    width: 100%;
    justify-content: flex-start;
  }
  #appView .batch-bar {
    grid-template-columns: 1fr;
    padding-top: 10px;
  }
  #appView .batch-selection,
  #appView .batch-work-area,
  #appView .batch-summary,
  #appView .batch-filter-area {
    grid-column: 1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  #appView .batch-summary {
    order: 3;
    padding: 8px 0;
    border-top: 1px solid #eaecf0;
  }
  #appView .batch-filter-area {
    order: 4;
  }
  #appView .label-paper-grid {
    grid-template-columns: 1fr;
  }
  #appView .label-paper-preview {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  #appView .page-header-actions,
  #appView .page-header-actions button,
  #appView .workspace[data-view="products"] .panel-head > .actions input {
    width: 100%;
  }
  #appView .batch-work-area > button,
  #appView .batch-work-area .batch-workflow,
  #appView .batch-filter-area .qty-filter-inline {
    width: 100%;
  }
  #appView .batch-filter-area {
    overflow: visible;
  }
  #appView .batch-filter-area .qty-quick-row {
    max-width: 100%;
  }
  .batch-hotkey-list {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .batch-hotkey-dialog .inline-error { margin-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #appView *,
  #appView *::before,
  #appView *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* =====================================================   Order center workbench v244 · dense final hierarchy, neutral palette, visible actions.
   ============================================================ */
#appView .workspace[data-view="orders"] .topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-bottom: 10px;
  padding-bottom: 8px;
}
#appView .workspace[data-view="orders"] .page-header-actions {
  min-width: 0;
  margin-left: auto;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
#appView .workspace[data-view="orders"] .page-header-actions::-webkit-scrollbar { display: none; }
#appView .workspace[data-view="orders"] .order-list-tabs {
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  margin: 0;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  background: #fff;
  overflow-x: auto;
  scrollbar-width: none;
}
#appView .workspace[data-view="orders"] .order-list-tabs::-webkit-scrollbar { display: none; }
#appView .workspace[data-view="orders"] .order-list-tabs button {
  min-height: 42px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  font-size: 13px;
  white-space: nowrap;
}
#appView .workspace[data-view="orders"] .order-list-tabs button span {
  margin-left: 4px;
  padding: 1px 4px;
  border-radius: 8px;
  background: #f2f4f7;
  color: #667085;
  font-size: 11px;
}
#appView .workspace[data-view="orders"] .order-list-tabs button.active span {
  background: #eaf2ff;
  color: var(--primary);
}
#appView .workspace[data-view="orders"] .stats-bar { margin-bottom: 10px; }
#appView .workspace[data-view="orders"] .stats-bar .stat { min-height: 62px; padding: 9px 12px; }

#appView .workspace[data-view="orders"] .order-command { margin: 0 0 10px; }
#appView .workspace[data-view="orders"] .order-filter-panel--always {
  overflow: hidden;
  padding: 0;
  border-radius: 6px;
}
.order-filter-primary {
  display: grid;
  grid-template-columns: minmax(260px, 340px) repeat(4, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 9px;
  padding: 11px 12px;
}
.order-filter-primary label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: #667085;
  font-size: 11px;
  font-weight: 600;
}
.order-filter-primary input,
.order-filter-primary select { width: 100%; }
.order-filter-primary .order-filter-submit { min-width: 64px; }
.order-filter-secondary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 7px 12px;
  border-top: 1px solid #eaecf0;
  background: #f8fafc;
}
.order-filter-secondary .actions { justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.order-filter-secondary button { min-height: 34px; padding: 5px 9px; font-size: 11.5px; }

#appView .workspace[data-view="orders"] .batch-bar {
  margin: 0 0 10px;
  border-radius: 6px;
  box-shadow: none;
}
#appView .workspace[data-view="orders"] .batch-selection-card,
#appView .workspace[data-view="orders"] .batch-flow-step,
#appView .workspace[data-view="orders"] .batch-work-area > button {
  min-height: 48px;
}
#appView .workspace[data-view="orders"] .batch-selection-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: 3px;
  min-width: 190px;
  padding: 6px 10px;
}
#appView .workspace[data-view="orders"] .batch-selection-card .checkline {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}
#appView .workspace[data-view="orders"] .batch-selection-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
#appView .workspace[data-view="orders"] .batch-selection-label {
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}
#appView .workspace[data-view="orders"] .batch-selection-copy small {
  color: #667085;
  font-size: 11px;
  font-weight: 500;
}
#appView .workspace[data-view="orders"] .batch-selection-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 26px;
  padding-left: 0;
  color: #475467;
  font-size: 11px;
  font-weight: 650;
}
#appView .workspace[data-view="orders"] .batch-selection-count strong {
  color: #175cd3;
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
#appView .workspace[data-view="orders"] .batch-workflow { padding-block: 4px; }
#appView .workspace[data-view="orders"] .batch-flow-step { padding-block: 4px; }
#appView .workspace[data-view="orders"] .batch-filter-area button { min-height: 34px; }
.batch-print-scope {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.batch-print-scope.is-ready { background: #eaf7ef; color: #137a44; }
.batch-print-scope.is-warning { background: #fff4e5; color: #a15c07; }
.order-shop-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #344054 !important;
  font-weight: 650;
}
.order-shop-number em {
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}
.order-ogl-pack-code {
  padding: 2px 7px;
  border: 1px solid #b2ccff;
  border-radius: 999px;
  background: #eff4ff;
  color: #175cd3 !important;
  font-weight: 750;
  letter-spacing: .4px;
}
.ogl-loaded-seal-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 7px 12px 0;
  border-top: 1px solid #eef1f5;
  background: #f8fafc;
}
.ogl-loaded-seal-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 2px 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #667085;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}
.ogl-loaded-seal-tabs button:hover { background: transparent; color: #344054; }
.ogl-loaded-seal-tabs button.active {
  border-bottom-color: #175cd3;
  background: transparent;
  color: #175cd3;
}
.ogl-loaded-seal-tabs button b {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eaecf0;
  color: #475467;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.ogl-loaded-seal-tabs button.active b { background: #eaf2ff; color: #175cd3; }
.ogl-sealed-view-hint {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 38px;
  color: #667085;
  font-size: 12px;
}
.ogl-sealed-view-hint strong { color: #175cd3; font-size: 13px; }
.ogl-batch-create-tools {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
#appView .ogl-batch-toolbar {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 7px;
  padding: 8px 0 2px;
  border-top: 1px solid #eaecf0;
  overflow: visible;
}
.ogl-batch-create-tools > button { flex: 0 0 auto; min-height: 38px !important; }
.ogl-batch-container-count {
  display: grid;
  grid-template-columns: auto 74px auto;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 3px 8px;
  border: 1px solid #b2ccff;
  border-radius: 6px;
  background: #eff4ff;
  color: #175cd3;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ogl-batch-container-count input {
  width: 74px;
  min-height: 30px;
  padding: 3px 6px;
  border: 1px solid #84adff;
  border-radius: 5px;
  background: #fff;
  color: #101828;
  font-size: 15px;
  font-weight: 750;
  text-align: center;
}
.ogl-batch-container-count small { color: #175cd3; font-size: 11px; }
.ogl-batch-container-count small.is-error { color: #d92d20; }
.ogl-batch-create-button:disabled { cursor: not-allowed; opacity: .48; }
.ogl-batch-groups {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f8fafc;
}
.ogl-batch-groups-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ogl-batch-groups-head > div:first-child { display: grid; gap: 2px; }
.ogl-batch-groups-head strong { color: #101828; font-size: 15px; }
.ogl-batch-groups-head span { color: #667085; font-size: 11px; }
.ogl-batch-group-search { display: flex; align-items: center; gap: 6px; }
.ogl-batch-group-search input { width: min(300px, 40vw); min-height: 32px; padding: 5px 9px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; }
.ogl-batch-group-search button { min-height: 32px; white-space: nowrap; }
.ogl-batch-group-list { display: grid; gap: 7px; }
.ogl-batch-group-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(280px, .9fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding: 9px 10px;
  border: 1px solid #d0d5dd;
  border-left: 4px solid #98a2b3;
  border-radius: 7px;
  background: #fff;
}
.ogl-batch-group-card.tone-success { border-left-color: #12b76a; }
.ogl-batch-group-card.tone-info { border-left-color: #2e90fa; }
.ogl-batch-group-card.tone-warning { border-left-color: #f79009; }
.ogl-batch-group-card.tone-danger { border-left-color: #f04438; }
.ogl-batch-group-main { display: grid; min-width: 0; gap: 2px; }
.ogl-batch-group-main > div { display: flex; align-items: center; gap: 8px; }
.ogl-batch-group-main strong { color: #101828; font-size: 18px; letter-spacing: .5px; }
.ogl-batch-group-main small { overflow: hidden; color: #667085; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ogl-batch-group-main .ogl-batch-feedback {
  overflow: visible;
  color: #344054;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}
.ogl-batch-charge-meta {
  overflow: visible !important;
  color: #667085;
  line-height: 1.35;
  text-overflow: clip !important;
  white-space: normal !important;
}
.ogl-batch-charge-meta b { color: #344054; }
.ogl-batch-charge-meta.is-complete { color: #087443; }
.ogl-batch-charge-meta.is-complete b { color: #087443; }
.ogl-batch-charge-meta.is-error { color: #b42318; }
.ogl-batch-charge-meta.is-error b { color: #b42318; }
.ogl-batch-feedback b { margin-right: 3px; color: #175cd3; }
.ogl-batch-status {
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 10px;
  font-weight: 700;
}
.ogl-batch-progress { display: grid; grid-template-columns: repeat(4, minmax(52px, 1fr)); gap: 5px; }
.ogl-batch-progress span { padding: 5px 6px; border-radius: 5px; background: #f2f4f7; color: #667085; font-size: 10px; text-align: center; }
.ogl-batch-progress b { display: block; color: #175cd3; font-size: 14px; font-variant-numeric: tabular-nums; }
.ogl-batch-group-actions { display: flex; justify-content: flex-end; gap: 6px; }
.ogl-batch-group-actions button { min-height: 32px; white-space: nowrap; }
.ogl-batch-group-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; color: #667085; font-size: 11px; }
.ogl-batch-group-pager > div { display: flex; gap: 6px; }
.ogl-batch-group-pager button { min-height: 30px; }
.ogl-batch-empty { padding: 12px; color: #667085; font-size: 12px; text-align: center; }
.ogl-batch-workspace { margin: 16px 0; padding: 12px; background: #f8fafc; border: 1px solid #e4e7ec; border-radius: 8px; }
.ogl-batch-workspace-tabs, .ogl-batch-sub-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid #e4e7ec; }
.ogl-batch-workspace-tabs button, .ogl-batch-sub-tabs button { min-height: 34px; padding: 7px 13px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #667085; font-weight: 600; }
.ogl-batch-workspace-tabs button.active, .ogl-batch-sub-tabs button.active { border-bottom-color: #175cd3; color: #175cd3; background: #eef4ff; }
.ogl-batch-sub-tabs { margin-top: 10px; }
.ogl-batch-tab-panel { min-width: 0; }
.ogl-batch-declaration-panel { padding-top: 2px; }
.ogl-charge-panel { display: grid; gap: 10px; padding-top: 12px; }
.ogl-charge-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ogl-charge-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ogl-charge-scope { display: inline-flex; align-items: center; gap: 6px; color: #475467; font-size: 12px; }
.ogl-charge-scope select { min-height: 30px; max-width: 280px; padding: 4px 8px; border: 1px solid #d0d5dd; border-radius: 5px; background: #fff; }
.ogl-charge-summary-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 10px 12px; border: 1px solid #dbe7ff; border-radius: 6px; background: #f5f8ff; color: #475467; font-size: 12px; }
.ogl-charge-summary-strip strong { color: #175cd3; font-size: 15px; }
.ogl-charge-summary-strip button { margin-left: auto; min-height: 30px; }
.ogl-charge-status { display: inline-flex; padding: 2px 6px; border-radius: 4px; background: #f2f4f7; color: #667085; font-size: 11px; }
.ogl-charge-status.is-completed { background: #ecfdf3; color: #087443; }
.ogl-charge-status.is-processing { background: #eff8ff; color: #175cd3; }
.ogl-charge-status.is-failed { background: #fef3f2; color: #b42318; }
.ogl-charge-status + small { display: block; margin-top: 3px; }
.ogl-charge-total-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ogl-charge-total-grid > div { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #e4e7ec; border-radius: 6px; background: #fff; }
.ogl-charge-total-grid span { color: #667085; font-size: 11px; }
.ogl-charge-total-grid strong { color: #101828; font-size: 18px; font-variant-numeric: tabular-nums; }
.ogl-charge-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #667085; font-size: 11px; }
.ogl-charge-pager > div { display: flex; gap: 6px; }
.ogl-charge-pager button { min-height: 30px; }
.ogl-charge-note { color: #667085; font-size: 11px; }
@media (max-width: 1080px) {
  #appView .ogl-batch-toolbar { flex-wrap: wrap; }
  .ogl-batch-create-tools { flex-wrap: wrap; }
  .ogl-batch-group-card { grid-template-columns: 1fr; align-items: stretch; }
  .ogl-batch-group-actions { justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .ogl-loaded-seal-tabs { gap: 12px; overflow-x: auto; }
  .ogl-batch-create-tools { align-items: stretch; flex-direction: column; }
  .ogl-batch-create-tools > button { width: 100%; }
  .ogl-batch-container-count { grid-template-columns: 1fr 86px auto; width: 100%; }
  .ogl-batch-groups-head { align-items: flex-start; flex-direction: column; gap: 2px; }
  .ogl-batch-group-search { width: 100%; }
  .ogl-batch-group-search input { width: 100%; }
  .ogl-batch-progress { grid-template-columns: repeat(2, 1fr); }
}

#appView .workspace[data-view="orders"] .order-list { gap: 8px; }
.order-virtual-spacer { width: 100%; min-height: 0; pointer-events: none; }
#appView .workspace[data-view="orders"] .order-card {
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
  content-visibility: auto;
  contain-intrinsic-size: auto 330px;
}
#appView .workspace[data-view="orders"] .order-card--packed-cancelled,
#appView .workspace[data-view="scanDesk"] .order-card--packed-cancelled {
  border-color: #f79009;
  box-shadow: inset 4px 0 #f79009, 0 2px 8px rgba(181, 71, 8, .12);
}
#appView .packed-cancelled-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 16px;
  border-bottom: 1px solid #fedf89;
  background: #fffaeb;
  color: #7a2e0e;
}
#appView .packed-cancelled-alert > div { display: grid; min-width: 0; gap: 2px; }
#appView .packed-cancelled-alert strong { color: #b54708; font-size: 13px; }
#appView .packed-cancelled-alert span { font-size: 11px; line-height: 1.45; }
#appView .packed-cancelled-alert .packed-cancelled-archive {
  flex: 0 0 auto;
  min-height: 34px;
  border-color: #f79009;
  background: #fff;
  color: #b54708;
  font-weight: 700;
}
#appView .packed-cancelled-alert .packed-cancelled-archive:hover {
  border-color: #b54708;
  background: #fff4e5;
  color: #93370d;
}
#appView .workspace[data-view="orders"] .order-head {
  min-height: 38px;
  padding: 6px 10px;
  background: #f8fafc;
}
#appView .workspace[data-view="orders"] .order-head-main { gap: 6px 9px; }
#appView .workspace[data-view="orders"] .order-head-main strong { color: #1d2939; font-size: 12px; }
#appView .workspace[data-view="orders"] .order-head-service,
#appView .workspace[data-view="scanDesk"] .order-head-service {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  color: #344054;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
#appView .order-head-service.is-missing { border-color: #fedf89; background: #fffaeb; color: #b54708; }
#appView .workspace[data-view="orders"] .order-card-grid {
  display: grid;
  grid-template-columns: minmax(210px, 225px) minmax(520px, 1fr) minmax(290px, 325px) minmax(175px, 195px) minmax(260px, 285px);
  min-height: 0;
  background: #fff;
}
#appView .workspace[data-view="scanDesk"] .order-card-grid {
  display: grid;
  grid-template-columns: minmax(200px, 220px) minmax(500px, 1fr) minmax(290px, 330px) minmax(190px, 220px) minmax(300px, 320px);
  min-height: 0;
  background: #fff;
}
#appView .workspace[data-view="scanDesk"] .order-card-grid > div { min-width: 0; }
#appView .workspace[data-view="orders"] .order-card-grid > div {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid #eaecf0;
  background: #fff !important;
}
#appView .workspace[data-view="orders"] .order-card-grid > div:last-child { border-right: 0; }
#appView .workspace[data-view="orders"] .sign-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  text-align: left;
  background: #fbfcfe !important;
}
#appView .workspace[data-view="orders"] .sign-cell .domestic-tracking-line { width: 100%; }
#appView .workspace[data-view="orders"] .sign-cell .copyable-number { max-width: 100%; text-align: left; }
#appView .workspace[data-view="orders"] .sign-cell .tracking-label {
  padding-inline: 0;
  background: transparent;
  color: #98a2b3;
  font-size: 10px;
}
#appView .workspace[data-view="orders"] .order-products-cell {
  grid-column: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#appView .workspace[data-view="scanDesk"] .order-products-cell {
  grid-column: auto;
}
#appView .workspace[data-view="orders"] .order-products-head {
  padding-bottom: 5px;
  color: #667085;
  font-size: 11px;
}
#appView .workspace[data-view="orders"] .order-product-line {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 0 0 8px;
  border-bottom: 1px solid #f0f2f5;
}
#appView .workspace[data-view="orders"] .order-product-line:last-child { padding-bottom: 0; border-bottom: 0; }
#appView .workspace[data-view="orders"] .order-product-line--single {
  flex: 1 1 auto;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: stretch;
  min-height: 286px;
  padding-bottom: 0;
}
#appView .workspace[data-view="orders"] .order-product-img--multi {
  width: 100%;
  max-width: 112px;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}
#appView .workspace[data-view="orders"] .order-products-cell--single {
  padding-block: 0 !important;
  padding-left: 0 !important;
}
#appView .workspace[data-view="orders"] .order-product-line--single .order-product-line-img {
  display: flex;
  align-self: stretch;
  min-height: 286px;
  background: #f8fafc;
}
#appView .workspace[data-view="orders"] .order-products-cell--single .order-product-img--multi,
#appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-repair,
#appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-unverified {
  width: 100%;
  max-width: 210px;
  height: 100%;
  min-height: 286px;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
}
#appView .workspace[data-view="orders"] .order-product-line--single .order-product-line-body { padding: 5px 0; }
#appView .workspace[data-view="orders"] .order-product-line-body {
  min-width: 0;
}
#appView .workspace[data-view="orders"] .order-product-main { min-width: 0; }
#appView .workspace[data-view="orders"] .order-product-line .product-title-clamp {
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
#appView .workspace[data-view="orders"] .shipment-recipient,
#appView .workspace[data-view="scanDesk"] .shipment-recipient {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: 100%;
}
#appView .shipment-recipient > span { color: #98a2b3; font-size: 10px; }
#appView .shipment-recipient > button {
  min-width: 0;
  padding: 1px 0;
  border: 0;
  background: transparent;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
#appView .shipment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  color: #667085;
  font-size: 10px;
}
#appView .sku-shipment-tracking-row { width: 100%; }
#appView .workspace[data-view="orders"] .order-product-line .product-name-ru {
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
#appView .workspace[data-view="orders"] .order-context-cell,
#appView .workspace[data-view="scanDesk"] .order-context-cell {
  display: grid;
  align-content: start;
  gap: 7px;
  background: #fbfcfe !important;
}
#appView .workspace[data-view="orders"] .order-inventory-card-column {
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e4e7ec;
  background: transparent !important;
}
#appView .workspace[data-view="orders"] .order-inventory-card-column__title {
  color: #475467;
  font-size: 11px;
}
#appView .workspace[data-view="orders"] .order-inventory-card-column__row {
  min-width: 0;
}
#appView .workspace[data-view="orders"] .order-inventory-card-column__row + .order-inventory-card-column__row {
  padding-top: 8px;
  border-top: 1px solid #e4e7ec;
}
#appView .workspace[data-view="orders"] .order-inventory-card-column__row > b {
  display: block;
  margin-bottom: 5px;
  color: #667085;
  font-size: 10px;
}
#appView .workspace[data-view="orders"] .order-inventory-card-column__empty {
  color: #98a2b3;
  font-size: 12px;
}
#appView .workspace[data-view="orders"] .order-inventory-card {
  min-width: 0;
  padding: 7px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}
#appView .workspace[data-view="orders"] .order-inventory-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
#appView .workspace[data-view="orders"] .order-inventory-card > header > strong,
#appView .workspace[data-view="orders"] .order-inventory-card.is-pending > strong,
#appView .workspace[data-view="orders"] .order-inventory-card.is-unmapped > strong {
  color: #344054;
  font-size: 11px;
}
#appView .workspace[data-view="orders"] .order-inventory-card > header > span {
  color: #b54708;
  font-size: 10px;
}
#appView .workspace[data-view="orders"] .order-inventory-card__item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}
#appView .workspace[data-view="orders"] .order-inventory-card__item + .order-inventory-card__item {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e4e7ec;
}
#appView .workspace[data-view="orders"] .order-inventory-card__media button,
#appView .workspace[data-view="orders"] .order-inventory-card__media img,
#appView .workspace[data-view="orders"] .order-inventory-card__empty {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
}
#appView .workspace[data-view="orders"] .order-inventory-card__media button { cursor: zoom-in; }
#appView .workspace[data-view="orders"] .order-inventory-card__media img { object-fit: contain; }
#appView .workspace[data-view="orders"] .order-inventory-card__media {
  display: grid;
  align-content: start;
  gap: 5px;
}
#appView .workspace[data-view="orders"] .order-inventory-card__empty {
  padding: 8px;
  color: #98a2b3;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}
#appView .workspace[data-view="orders"] .order-inventory-card__body {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}
#appView .workspace[data-view="orders"] .order-inventory-card__name {
  overflow: visible;
  color: #101828;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}
#appView .workspace[data-view="orders"] .order-inventory-card__body > div {
  display: block;
}
#appView .workspace[data-view="orders"] .order-inventory-card__body span {
  display: block;
  margin-bottom: 1px;
  color: #667085;
  font-size: 10px;
}
#appView .workspace[data-view="orders"] .order-inventory-card__body b {
  display: block;
  overflow-wrap: anywhere;
  color: #1d2939;
  font-size: 12px;
}
#appView .workspace[data-view="orders"] .order-inventory-card__body > div:first-of-type b {
  font-size: 11px;
  white-space: nowrap;
}
#appView .workspace[data-view="orders"] .order-inventory-card__stock {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
#appView .workspace[data-view="orders"] .order-inventory-card__stock span { margin: 0; color: #667085; font-size: 9px; }
#appView .workspace[data-view="orders"] .order-inventory-card__stock b { color: #175cd3; font-size: 16px; line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; }
#appView .workspace[data-view="orders"] .order-inventory-card__stock b.danger-text { color: #b42318; }
#appView .workspace[data-view="orders"] .order-inventory-card__stock em {
  color: #667085;
  font-size: 9px;
  font-style: normal;
}
#appView .workspace[data-view="orders"] .order-inventory-card__query {
  min-height: 28px;
  padding: 3px 8px;
  border-color: #b8d5ff;
  background: #fff;
  color: #175cd3;
  font-size: 11px;
  font-weight: 700;
}
#appView .workspace[data-view="orders"] .order-inventory-card__query:hover { background: #eff6ff; }
#appView .workspace[data-view="orders"] .order-inventory-card.is-pending,
#appView .workspace[data-view="orders"] .order-inventory-card.is-unmapped {
  display: grid;
  gap: 4px;
  align-content: start;
  color: #667085;
  font-size: 11px;
}
#appView .workspace[data-view="orders"] .order-inventory-card.is-unmapped {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}
#appView .workspace[data-view="orders"] .product-title-row { align-items: flex-start; }
#appView .order-ozon-context { display: grid; gap: 7px; min-width: 0; }
#appView .order-ozon-context > header { display: grid; gap: 3px; }
#appView .order-ozon-context > header span { color: #667085; font-size: 10px; }
#appView .order-ozon-context > header strong { color: #1d2939; font-size: 14px; font-weight: 750; }
#appView .order-ozon-context .ozon-official-times { margin: 0; }
#appView .order-head-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}
#appView .order-head-brand img {
  display: block;
  width: 76px;
  height: auto;
  max-height: 20px;
}
#appView .order-proof-cell {
  display: flex;
  flex-direction: column;
  align-content: start;
  background: #fbfcfe !important;
}
#appView .order-proof-title {
  padding-bottom: 6px;
  border-bottom: 1px solid #eaecf0;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}
#appView .order-proof-item {
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f5;
}
#appView .order-proof-item:last-child { border-bottom: 0; }
#appView .order-proof-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#appView .order-proof-label { color: #667085; font-size: 11px; }
#appView .order-proof-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
#appView .order-proof-item.is-complete .order-proof-value { color: #344054; }
#appView .order-proof-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 2px #e9f8ef;
}
#appView .order-proof-time {
  margin-top: 3px;
  color: #98a2b3;
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}
#appView .order-proof-photos { margin-top: 6px; }
#appView .order-proof-photos .photo-strip { gap: 4px; }
#appView .order-proof-photos .photo-strip img {
  width: 42px;
  height: 42px;
  border-radius: 4px;
}
#appView .order-proof-stage-list {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}
#appView .order-proof-stage {
  display: grid;
  grid-template-columns: minmax(42px, 1fr) auto 30px;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 3px 5px;
  border: 1px solid #edf0f4;
  border-radius: 4px;
  background: #fff;
  color: #667085;
  font-size: 10px;
}
#appView .order-proof-stage em { color: #98a2b3; font-style: normal; }
#appView .order-proof-stage.is-complete em { color: #168a52; font-weight: 700; }
#appView .order-proof-stage .photo-strip { justify-content: flex-end; gap: 0; }
#appView .order-proof-stage .photo-strip img {
  width: 28px;
  height: 28px;
  border-radius: 3px;
}
#appView .order-proof-legacy {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #98a2b3;
  font-size: 9px;
  text-align: right;
  text-decoration: underline;
  cursor: pointer;
}
#appView .order-proof-legacy:hover,
#appView .order-proof-legacy:focus-visible,
#appView .order-proof-value[role="button"]:hover,
#appView .order-proof-value[role="button"]:focus-visible { color: var(--primary); cursor: pointer; }
#appView .workspace[data-view="orders"] .order-actions {
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 6px;
  background: #fbfcfe !important;
}
#appView .workspace[data-view="orders"] .order-actions :where(button) {
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row,
#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row,
#appView .workspace[data-view="orders"] .oa-more-grid,
#appView .workspace[data-view="orders"] .oa-auxiliary-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
#appView .workspace[data-view="orders"] .oa-more > summary,
#appView .workspace[data-view="scanDesk"] .oa-more > summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  color: #667085;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
#appView .workspace[data-view="orders"] .oa-more[open] > summary,
#appView .workspace[data-view="scanDesk"] .oa-more[open] > summary { background: #f8fafc; color: #344054; }
#appView .workspace[data-view="orders"] .oa-more-grid,
#appView .workspace[data-view="scanDesk"] .oa-more-grid { margin-top: 5px; }
#appView .workspace[data-view="orders"] .oa-auxiliary-row,
#appView .workspace[data-view="scanDesk"] .oa-auxiliary-row { margin-top: 0; }
#appView .workspace[data-view="orders"] .order-card :where(.platform-mark, .order-merge-no, .admin-accent-value) { color: #344054; }
#appView .workspace[data-view="orders"] .order-head-main :where(.text-ok, .text-warn) { color: #667085; }
#appView .workspace[data-view="orders"] .order-head-main .order-wh { border-color: #d0d5dd; background: #f2f4f7; color: #475467; }
#appView .workspace[data-view="orders"] .forecast-sort-button { white-space: nowrap; }

.order-inventory-card-modal { width: min(820px, calc(100vw - 32px)); }
.order-inventory-card-modal .modal-head { padding: 14px 18px; background: #fff; }
.order-inventory-card-modal .modal-head .modal-close { width: 32px; min-height: 32px; padding: 0; font-size: 22px; line-height: 1; }
.order-inventory-card-modal #inventoryCardShelfHint { display: block; margin: 6px 0 10px; color: #667085; font-size: 12px; }
.order-inventory-card-modal > .panel-body { padding: 14px 18px; }
.order-inventory-card-modal .modal-actions { padding: 10px 18px 14px; border-top: 1px solid #eaecf0; }
.order-inventory-card-modal .modal-actions button { min-height: 34px; }

@media (max-width: 1750px) and (min-width: 1490px) {
  #appView .workspace[data-view="orders"] .topbar { align-items: flex-start; }
  #appView .workspace[data-view="orders"] .order-filter-primary {
    grid-template-columns: minmax(260px, 320px) repeat(4, minmax(125px, 1fr)) auto;
  }
  #appView .workspace[data-view="orders"] .order-card-grid {
    grid-template-columns: minmax(190px, 210px) minmax(460px, 1fr) minmax(270px, 300px) minmax(170px, 190px);
  }
  #appView .workspace[data-view="scanDesk"] .order-card-grid {
    grid-template-columns: minmax(180px, 200px) minmax(420px, 1fr) minmax(260px, 290px) minmax(170px, 190px) minmax(230px, 250px);
  }
  #appView .workspace[data-view="orders"] .order-actions { grid-column: 1 / -1; border-top: 1px solid #eaecf0; }
  #appView .workspace[data-view="scanDesk"] .order-actions { grid-column: auto; border-top: 0; }
  #appView .order-proof-cell {
    grid-column: auto;
    display: flex;
    border-top: 0;
  }
  #appView .order-proof-title { align-self: auto; border-bottom: 1px solid #eaecf0; padding: 0 0 6px; }
  #appView .order-proof-item { border-bottom: 1px solid #f0f2f5; }
  #appView .order-proof-item:last-child { border-bottom: 0; }
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row,
  #appView .workspace[data-view="orders"] .order-actions .oa-secondary-row,
  #appView .workspace[data-view="orders"] .oa-more-grid,
  #appView .workspace[data-view="orders"] .oa-auxiliary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1489px) and (min-width: 1176px) {
  #appView .workspace[data-view="orders"] .topbar { align-items: flex-start; }
  #appView .workspace[data-view="orders"] .order-card-grid {
    grid-template-columns: minmax(155px, 175px) minmax(360px, 1fr) minmax(225px, 245px) minmax(155px, 175px);
  }
  #appView .workspace[data-view="orders"] .order-product-line--single { grid-template-columns: 170px minmax(0, 1fr); min-height: 250px; }
  #appView .workspace[data-view="orders"] .order-product-line--single .order-product-line-img,
  #appView .workspace[data-view="orders"] .order-products-cell--single .order-product-img--multi,
  #appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-repair,
  #appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-unverified { max-width: 170px; min-height: 250px; }
  #appView .workspace[data-view="scanDesk"] .order-card-grid {
    grid-template-columns: minmax(160px, 180px) minmax(370px, 1fr) minmax(240px, 270px) minmax(160px, 180px);
  }
  #appView .workspace[data-view="orders"] .order-actions,
  #appView .workspace[data-view="scanDesk"] .order-actions {
    grid-column: 1 / -1;
    border-top: 1px solid #eaecf0;
  }
  #appView .workspace[data-view="orders"] .order-proof-cell { grid-column: 1 / -1; }
  #appView .workspace[data-view="scanDesk"] .order-proof-cell {
    grid-column: auto;
    display: flex;
    border-top: 0;
  }
  #appView .order-proof-title { align-self: auto; border-bottom: 1px solid #eaecf0; padding: 0 0 6px; }
  #appView .order-proof-item { border-bottom: 1px solid #f0f2f5; }
  #appView .order-proof-item:last-child { border-bottom: 0; }
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row { grid-template-columns: repeat(5, minmax(96px, 1fr)); }
  #appView .workspace[data-view="orders"] .order-actions .oa-secondary-row,
  #appView .workspace[data-view="orders"] .oa-more-grid,
  #appView .workspace[data-view="orders"] .oa-auxiliary-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1175px) {
  #appView .workspace[data-view="orders"] .order-filter-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #appView .workspace[data-view="orders"] .order-filter-search { grid-column: 1 / -1; }
  #appView .workspace[data-view="orders"] .order-filter-secondary { align-items: flex-start; flex-direction: column; }
  #appView .workspace[data-view="orders"] .order-filter-secondary .actions { justify-content: flex-start; }
  #appView .workspace[data-view="orders"] .order-card-grid,
  #appView .workspace[data-view="scanDesk"] .order-card-grid {
    grid-template-columns: minmax(150px, 170px) minmax(0, 1fr) minmax(180px, 210px);
  }
  #appView .workspace[data-view="orders"] .order-products-cell,
  #appView .workspace[data-view="scanDesk"] .order-products-cell { grid-column: 2 / -1; }
  #appView .workspace[data-view="orders"] .order-product-line--single { grid-template-columns: 180px minmax(0, 1fr); min-height: 250px; }
  #appView .workspace[data-view="orders"] .order-product-line--single .order-product-line-img,
  #appView .workspace[data-view="orders"] .order-products-cell--single .order-product-img--multi,
  #appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-repair,
  #appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-unverified { max-width: 180px; min-height: 250px; }
  #appView .workspace[data-view="orders"] .order-context-cell {
    grid-column: 1 / -1;
    border-top: 1px solid #eaecf0;
  }
  #appView .workspace[data-view="scanDesk"] .order-context-cell {
    grid-column: 1 / 3;
    border-top: 1px solid #eaecf0;
  }
  #appView .order-proof-cell {
    grid-column: 3;
    display: flex;
    gap: 0;
    border-top: 1px solid #eaecf0;
  }
  #appView .order-proof-title { border-bottom: 1px solid #eaecf0; }
  #appView .workspace[data-view="orders"] .order-actions,
  #appView .workspace[data-view="scanDesk"] .order-actions {
    grid-column: 1 / -1;
    border-top: 1px solid #eaecf0;
  }
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row { grid-template-columns: repeat(5, minmax(90px, 1fr)); }
  #appView .workspace[data-view="orders"] .order-actions .oa-secondary-row,
  #appView .workspace[data-view="orders"] .oa-more-grid,
  #appView .workspace[data-view="orders"] .oa-auxiliary-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  #appView .order-head { flex-wrap: wrap; }
  #appView .order-head-break { display: block; flex-basis: 100%; height: 0; }
  #appView .order-head-merge { margin-left: auto; }
  #appView .workspace[data-view="orders"] .order-filter-primary { grid-template-columns: 1fr; }
  #appView .workspace[data-view="orders"] .order-filter-search { grid-column: auto; }
  #appView .workspace[data-view="orders"] .order-filter-submit { width: 100%; }
  #appView .workspace[data-view="orders"] .order-filter-secondary .actions { width: 100%; }
  #appView .workspace[data-view="orders"] .order-filter-secondary .actions button { flex: 1 1 calc(50% - 4px); }
  #appView .workspace[data-view="orders"] .order-card-grid { display: block; }
  #appView .workspace[data-view="scanDesk"] .order-card-grid { display: block; }
  #appView .workspace[data-view="orders"] .order-card-grid > div { border-right: 0; border-bottom: 1px solid #eaecf0; }
  #appView .workspace[data-view="orders"] .order-product-line--single {
    grid-template-columns: 148px minmax(0, 1fr);
    min-height: 220px;
  }
  #appView .workspace[data-view="orders"] .order-product-line--single .order-product-line-img,
  #appView .workspace[data-view="orders"] .order-products-cell--single .order-product-img--multi,
  #appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-repair,
  #appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-unverified { max-width: 148px; min-height: 220px; }
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row,
  #appView .workspace[data-view="orders"] .order-actions .oa-secondary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #appView .packed-cancelled-alert { align-items: stretch; flex-direction: column; }
  #appView .packed-cancelled-alert .packed-cancelled-archive { width: 100%; }
}

/* 订单中心单商品主图固定 3:4。商品信息再高也不能把图片纵向拉伸；
   各断点只改变列宽，图片高度始终由列宽按 3:4 自动计算。 */
#appView .workspace[data-view="orders"] .order-product-line--single {
  align-items: start;
  min-height: 0;
}
#appView .workspace[data-view="orders"] .order-product-line--single .order-product-line-img {
  align-self: start;
  min-height: 0;
  aspect-ratio: auto;
}
#appView .workspace[data-view="orders"] .order-products-cell--single .order-product-img--multi,
#appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-repair,
#appView .workspace[data-view="orders"] .order-product-line--single .order-product-image-unverified {
  height: auto;
  min-height: 0;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}

/* Order list performance guard · 2026-08-31.
   Off-screen cards keep their scroll geometry but skip layout/paint until near the viewport. */
#appView .workspace[data-view="orders"] .order-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 310px;
}

/* Returns workbench: scanner-first selection and compact state-specific batch actions. */
.return-workbench-bar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(560px, 1.35fr);
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid #eaecf0;
  border-bottom: 1px solid #eaecf0;
  background: #f8fafc;
}
.return-scan-panel,
.return-batch-panel {
  display: flex;
  align-items: end;
  gap: 8px;
  min-width: 0;
}
.return-scan-panel label { flex: 1 1 auto; min-width: 0; color: #475467; font-size: 11px; }
.return-scan-panel input { width: 100%; margin-top: 4px; min-height: 34px; }
.return-scan-panel > button { min-height: 34px; }
.return-scan-panel > span { flex: 0 1 180px; color: #667085; font-size: 11px; }
.return-batch-panel { justify-content: flex-end; align-items: center; }
.return-batch-panel > span { color: #667085; font-size: 11px; white-space: nowrap; }
.return-batch-actions { display: flex; flex: 1 1 auto; justify-content: flex-end; gap: 6px; }
.return-batch-actions button { min-height: 34px; padding: 4px 10px; white-space: nowrap; }
.return-select-col { width: 46px; text-align: center; }
.return-row-checkbox { width: 16px; min-height: 16px; accent-color: var(--primary); }
tr.is-selected > td { background: #f0f6ff; }
.order-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #eaecf0;
  border-top: 0;
  background: #fff;
  color: #667085;
  font-size: 12px;
}
.order-pagination button { min-height: 34px; padding: 4px 12px; }
@media (max-width: 900px) {
  .return-workbench-bar { grid-template-columns: 1fr; }
  .return-batch-panel { justify-content: flex-start; flex-wrap: wrap; }
  .return-batch-actions { justify-content: flex-start; flex-wrap: wrap; }
  .order-pagination { flex-wrap: wrap; }
}

/* Order center pagination + frozen work controls · 2026-08-31. */
#appView .workspace[data-view="orders"] {
  padding-bottom: 88px;
}
#appView .workspace[data-view="orders"] .topbar > :first-child {
  flex: 0 0 auto;
}
#appView .workspace[data-view="orders"] .stats-bar--header {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 4px 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
  scrollbar-width: none;
}
#appView .workspace[data-view="orders"] .stats-bar--header::-webkit-scrollbar { display: none; }
#appView .workspace[data-view="orders"] .stats-bar--header .stat {
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 42px;
  padding: 3px 10px;
  border: 0;
  border-left: 1px solid #eaecf0;
  border-radius: 0;
  background: transparent;
}
#appView .workspace[data-view="orders"] .stats-bar--header .stat span { font-size: 10px; }
#appView .workspace[data-view="orders"] .stats-bar--header .stat strong { margin-top: 1px; font-size: 16px; }
#appView .workspace[data-view="orders"] .stats-bar--header .stat-hint { display: none; }

/* 扫码台把四个作业数字放到标题右侧，腾出下面的连续扫码/订单操作空间。 */
#appView .workspace[data-view="scanDesk"] .topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-bottom: 10px;
  padding-bottom: 8px;
}
#appView .workspace[data-view="scanDesk"] .topbar > :first-child { flex: 0 0 auto; }
#appView .workspace[data-view="scanDesk"] .stats-bar--header {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 4px 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
  scrollbar-width: none;
}
#appView .workspace[data-view="scanDesk"] .stats-bar--header::-webkit-scrollbar { display: none; }
#appView .workspace[data-view="scanDesk"] .stats-bar--header .stat {
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 42px;
  padding: 3px 10px;
  border: 0;
  border-left: 1px solid #eaecf0;
  border-radius: 0;
  background: transparent;
}
#appView .workspace[data-view="scanDesk"] .stats-bar--header .stat span { font-size: 10px; }
#appView .workspace[data-view="scanDesk"] .stats-bar--header .stat strong { margin-top: 1px; font-size: 16px; }
#appView .workspace[data-view="scanDesk"] .stats-bar--header .stat-hint { display: none; }

.order-filter-buttons {
  display: flex;
  align-items: end;
  gap: 6px;
}
.order-filter-buttons button { min-width: 64px; }

.order-sticky-tools {
  position: sticky;
  top: 0;
  z-index: 35;
  margin: 0 0 10px;
  padding: 2px 0 1px;
  background: var(--ui-canvas, #f4f6f8);
  box-shadow: 0 8px 14px -14px rgba(16, 24, 40, .45);
}
#appView .workspace[data-view="orders"] .order-sticky-tools .order-list-tabs,
#appView .workspace[data-view="orders"] .order-sticky-tools .batch-bar { margin-bottom: 8px; }

#appView .workspace[data-view="orders"] .ogl-freight-summary {
  display: grid;
  grid-template-columns: minmax(92px, .62fr) minmax(92px, .62fr) minmax(210px, 1.5fr) minmax(94px, auto);
  align-items: stretch;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #b2ccff;
  border-radius: 8px;
  background: #b2ccff;
  box-shadow: 0 2px 7px rgba(23, 92, 211, .08);
}
#appView .workspace[data-view="orders"] .batch-work-area .ogl-freight-summary {
  flex: 1 1 560px;
  align-self: stretch;
  min-width: 480px;
  margin-left: auto;
}
#appView .workspace[data-view="orders"] .ogl-freight-summary.is-weight-only {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#appView .workspace[data-view="orders"] .ogl-freight-metric,
#appView .workspace[data-view="orders"] .ogl-freight-cost {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 48px;
  padding: 4px 8px;
  background: #fff;
}
#appView .workspace[data-view="orders"] .ogl-freight-metric.is-selected { background: #eff8ff; }
#appView .workspace[data-view="orders"] .ogl-freight-metric span,
#appView .workspace[data-view="orders"] .ogl-freight-cost span {
  color: #475467;
  font-size: 9px;
  font-weight: 650;
}
#appView .workspace[data-view="orders"] .ogl-freight-metric strong {
  margin: 1px 0;
  color: #175cd3;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
#appView .workspace[data-view="orders"] .ogl-freight-metric.is-selected strong { color: #026aa2; }
#appView .workspace[data-view="orders"] .ogl-freight-cost strong {
  margin: 1px 0;
  color: #101828;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
#appView .workspace[data-view="orders"] .ogl-freight-metric small,
#appView .workspace[data-view="orders"] .ogl-freight-cost small {
  overflow: hidden;
  color: #667085;
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#appView .workspace[data-view="orders"] .ogl-freight-settings {
  min-width: 94px;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: #175cd3;
  color: #fff;
  font-weight: 750;
}
#appView .workspace[data-view="orders"] .ogl-freight-settings:hover {
  background: #1849a9;
  color: #fff;
}

.order-pagination {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 206px;
  z-index: 60;
  min-height: 58px;
  justify-content: space-between;
  padding: 9px 20px;
  border: 0;
  border-top: 1px solid #d0d5dd;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 24px rgba(16, 24, 40, .11);
  backdrop-filter: blur(10px);
}
.order-pagination-summary { min-width: 170px; color: #475467; }
.order-pagination-pages { display: flex; align-items: center; justify-content: center; gap: 6px; }
.order-pagination-pages strong { min-width: 104px; color: #101828; text-align: center; }
.order-page-size { display: flex; align-items: center; gap: 7px; color: #475467; white-space: nowrap; }
.order-page-size select { width: auto; min-width: 112px; min-height: 34px; }
.statement-order-link {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  text-align: left;
}
.statement-order-link strong { font-weight: 650; }
.statement-order-link span { color: #667085; font-size: 11px; }
.statement-order-link:hover strong { text-decoration: underline; }

@media (max-width: 1080px) {
  .order-pagination { left: 190px; }
  #appView .workspace[data-view="orders"] .stats-bar--header { margin-left: 8px; }
}
@media (max-width: 860px) {
  .order-sticky-tools { position: static; }
  .order-pagination { left: 0; }
}
@media (max-width: 700px) {
  .order-filter-buttons { grid-column: 1 / -1; }
  .order-filter-buttons button { flex: 1 1 50%; }
  .order-pagination { gap: 6px; padding: 8px 10px; }
  .order-pagination-summary { display: none; }
  .order-pagination-pages { flex: 1 1 100%; order: 2; overflow-x: auto; }
  .order-page-size { flex: 1 1 100%; justify-content: flex-end; }
}

/* =====================================================   全站操作反馈与感知性能层 · 2026-09-01
   页面切换、按钮请求、同步控件、弹层都使用同一套短动效；
   动效只解释状态，不延长真实业务请求。
   ============================================================ */
.route-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 184px;
  z-index: 3200;
  height: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.route-progress > i {
  position: absolute;
  inset: 0;
  display: block;
  background: linear-gradient(90deg, #146ef5, #4f9cff 68%, #77b8ff);
  box-shadow: 0 1px 8px rgba(20, 110, 245, .32);
  transform: scaleX(0);
  transform-origin: left center;
}
.route-progress > span {
  position: absolute;
  top: 8px;
  right: 18px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(16, 24, 40, .88);
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .14s ease, transform .14s ease;
}
.route-progress:is(.is-running, .is-done, .is-error) { opacity: 1; }
.route-progress:is(.is-running, .is-error) > span { opacity: 1; transform: none; }
.route-progress.is-running > i { animation: route-progress-running 1.8s cubic-bezier(.2, .8, .2, 1) forwards; }
.route-progress.is-done > i { background: #12a06a; transform: scaleX(1); transition: transform .12s ease-out; }
.route-progress.is-error > i { background: #d92d20; transform: scaleX(1); }
@keyframes route-progress-running {
  0% { transform: scaleX(.06); }
  38% { transform: scaleX(.46); }
  72% { transform: scaleX(.72); }
  100% { transform: scaleX(.9); }
}

.workspace.is-showing-stale #content {
  opacity: .7;
  filter: saturate(.82);
  pointer-events: none;
  transition: opacity .12s ease, filter .12s ease;
}
.menu button.is-navigating {
  color: var(--primary);
  background: #eef5ff;
  box-shadow: none;
}

.page-loading {
  min-height: 238px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 28px;
  border: 0;
  background: #fff;
}
.page-loading-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #344054;
}
.page-loading-copy > div { display: grid; gap: 2px; }
.page-loading-copy strong { font-size: 14px; font-weight: 700; }
.page-loading-copy span:not(.page-loading-pulse) { color: #667085; font-size: 12px; }
.page-loading-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #146ef5;
  box-shadow: 0 0 0 0 rgba(20, 110, 245, .28);
  animation: page-loading-pulse 1.05s ease-out infinite;
}
.page-loading-skeleton {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.page-loading-skeleton i {
  position: relative;
  min-height: 62px;
  overflow: hidden;
  border-radius: 3px;
  background: #f2f4f7;
}
.page-loading-skeleton i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 16%, rgba(255,255,255,.82) 43%, transparent 70%);
  transform: translateX(-100%);
  animation: page-skeleton-sweep 1.15s ease-in-out infinite;
}
@keyframes page-loading-pulse { 70%, 100% { box-shadow: 0 0 0 8px rgba(20, 110, 245, 0); } }
@keyframes page-skeleton-sweep { to { transform: translateX(100%); } }

#content.view-entering > * { animation: view-content-enter .2s cubic-bezier(.2, .75, .2, 1) both; }
#content.view-entering > :nth-child(2) { animation-delay: 18ms; }
#content.view-entering > :nth-child(3) { animation-delay: 34ms; }
@keyframes view-content-enter {
  from { opacity: .72; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

:where(#appView, #loginView) :where(button, summary, [role="button"]) {
  position: relative;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease,
    box-shadow .14s ease, opacity .14s ease, transform .1s ease;
}
:where(#appView, #loginView) :where(button, summary, [role="button"]).is-feedback-pressed {
  animation: ui-control-press .24s ease-out;
}
:where(#appView, #loginView) :where(button, summary, [role="button"]).is-requesting {
  box-shadow: 0 0 0 2px rgba(20, 110, 245, .16), inset 0 -2px 0 rgba(20, 110, 245, .28);
}
:where(#appView, #loginView) :where(button, summary, [role="button"]).is-requesting::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(20, 110, 245, .22);
  border-top-color: #146ef5;
  border-radius: 50%;
  background: transparent;
  animation: ui-request-spin .62s linear infinite;
}
:where(#appView, #loginView) :where(button, summary, [role="button"]).is-feedback-success {
  animation: ui-control-success .58s ease-out;
}
:where(#appView, #loginView) :where(button, summary, [role="button"]).is-feedback-error {
  animation: ui-control-error .72s ease-out;
}
:where(#appView, #loginView) :where(input, select, textarea).is-change-confirmed,
:where(#appView, #loginView) .is-change-confirmed :where(input, select, textarea),
:where(#appView, #loginView) :where(label, .checkline, .rf-stock-switch).is-change-confirmed {
  animation: ui-change-confirmed .48s ease-out;
}
@keyframes ui-control-press { 45% { transform: translateY(1px) scale(.985); filter: brightness(.97); } }
@keyframes ui-request-spin { to { transform: rotate(360deg); } }
@keyframes ui-control-success {
  35% { border-color: #12a06a; box-shadow: 0 0 0 3px rgba(18, 160, 106, .14); }
}
@keyframes ui-control-error {
  18%, 58% { transform: translateX(-2px); border-color: #d92d20; }
  38%, 78% { transform: translateX(2px); }
}
@keyframes ui-change-confirmed { 42% { box-shadow: 0 0 0 3px rgba(20, 110, 245, .13); } }

.modal-mask:not(.hidden),
.image-preview-mask:not(.hidden),
.erp-dialog-overlay {
  animation: ui-overlay-enter .14s ease-out both;
}
.modal-mask:not(.hidden) :is(.modal-card, .camera-card),
.image-preview-mask:not(.hidden) .image-preview-card,
.erp-dialog-overlay .erp-dialog-card {
  animation: ui-modal-enter .18s cubic-bezier(.2, .8, .2, 1) both;
}
details[open] > :not(summary) { animation: ui-disclosure-enter .14s ease-out both; }
@keyframes ui-overlay-enter { from { opacity: 0; } }
@keyframes ui-modal-enter { from { opacity: .65; transform: translateY(8px) scale(.985); } }
@keyframes ui-disclosure-enter { from { opacity: .45; transform: translateY(-3px); } }

.center-toast.loading::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid rgba(255,255,255,.34);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: ui-request-spin .62s linear infinite;
}

@media (max-width: 860px) {
  .route-progress { left: 0; }
  .page-loading-skeleton { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .route-progress,
  .route-progress *,
  #content.view-entering > *,
  :where(#appView, #loginView) :where(.is-feedback-pressed, .is-requesting, .is-feedback-success, .is-feedback-error, .is-change-confirmed),
  .modal-mask:not(.hidden),
  .modal-mask:not(.hidden) :is(.modal-card, .camera-card),
  .image-preview-mask:not(.hidden),
  .image-preview-mask:not(.hidden) .image-preview-card,
  .erp-dialog-overlay,
  .erp-dialog-overlay .erp-dialog-card,
  details[open] > :not(summary),
  .center-toast.loading::before,
  .page-loading-pulse,
  .page-loading-skeleton i::after {
    animation: none !important;
    transition: none !important;
  }
  .route-progress.is-running > i { transform: scaleX(.9); }
  #content.view-entering > * { opacity: 1; transform: none; }
}

/* Inventory canvas final override: global responsive padding must not recreate page gutters. */
#appView .workspace[data-view="products"] {
  padding: 0;
  background: #fff;
}

#appView .workspace[data-view="products"] > .topbar,
#appView .workspace[data-view="products"] > .stats-bar,
#appView .workspace[data-view="products"] > #content {
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

#appView .workspace[data-view="products"] > #content {
  padding: 0;
}

#appView .workspace[data-view="products"].stock-ledger-workspace {
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
}

@media (max-width: 1900px) {
  #appView .workspace[data-view="orders"] .order-product-line-body {
    grid-template-columns: minmax(0, 1fr);
  }
  #appView .workspace[data-view="orders"] .order-inventory-card__item {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  #appView .workspace[data-view="orders"] .order-inventory-card__media button,
  #appView .workspace[data-view="orders"] .order-inventory-card__media img,
  #appView .workspace[data-view="orders"] .order-inventory-card__empty {
    width: 72px;
    height: 72px;
  }
}

/* =====================================================   Order center hierarchy pass v336 · 2026-09-04
   One visual instruction per level: semantic KPIs, one next action,
   progressive batch steps, and a continuous order information surface.
   ============================================================ */
#appView .workspace[data-view="orders"] .stats-bar--header .stat strong {
  color: #344054;
}
#appView .workspace[data-view="orders"] .stats-bar--header .stat.tone-primary strong { color: #175cd3; }
#appView .workspace[data-view="orders"] .stats-bar--header .stat.tone-warning strong { color: #b54708; }
#appView .workspace[data-view="orders"] .stats-bar--header .stat.tone-danger strong { color: #b42318; }
#appView .workspace[data-view="orders"] .stats-bar--header .stat.tone-success strong { color: #067647; }

#appView .workspace[data-view="orders"] .order-list-tabs button.active {
  color: #175cd3;
  font-weight: 700;
}

#appView .workspace[data-view="orders"] .order-filter-secondary .actions button,
#appView .workspace[data-view="orders"] .batch-filter-area > button {
  color: #475467;
  font-weight: 600;
}

#appView .workspace[data-view="orders"] .order-filter-secondary .actions button:hover,
#appView .workspace[data-view="orders"] .batch-filter-area > button:hover {
  background: #e9eef5;
  color: #1d2939;
}

#appView .workspace[data-view="orders"] .batch-workflow {
  align-items: stretch;
  gap: 0;
  min-height: 48px;
  padding: 0 36px 0 0;
  border-radius: 8px;
  background: #f7f9fc;
}

#appView .workspace[data-view="orders"] .batch-workflow-title {
  display: grid;
  flex: 0 0 104px;
  align-content: center;
  gap: 2px;
  padding: 6px 10px;
}
#appView .workspace[data-view="orders"] .batch-workflow-title strong { color: #1d2939; font-size: 11px; }
#appView .workspace[data-view="orders"] .batch-workflow-title span { color: #98a2b3; font-size: 9px; line-height: 1.3; }

#appView .workspace[data-view="orders"] .batch-flow-step,
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete {
  min-height: 48px;
  padding: 4px 8px;
  border-radius: 7px;
}
#appView .workspace[data-view="orders"] .batch-flow-step.is-current {
  background: #eaf2ff;
}
#appView .workspace[data-view="orders"] .batch-flow-step.is-current .batch-flow-index {
  background: #175cd3;
  color: #fff;
}
#appView .workspace[data-view="orders"] .batch-flow-step.is-current .batch-step { color: #175cd3; }
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete {
  background: #edf9f2;
}
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete .batch-flow-index {
  background: #dff3e7;
  color: #067647;
}
#appView .workspace[data-view="orders"] .batch-step-arrow { color: #c3cad5; }

#appView .workspace[data-view="orders"] .batch-filter-area .qty-quick-button {
  background: #fff;
  color: #475467;
}
#appView .workspace[data-view="orders"] .batch-filter-area .qty-quick-button.is-active {
  background: #eaf2ff;
  color: #175cd3;
}

#appView .workspace[data-view="orders"] .order-head {
  min-height: 42px;
  padding: 7px 12px;
  background: #f8fafc;
  box-shadow: none;
}
#appView .workspace[data-view="orders"] .order-head-main { gap: 5px 10px; }
#appView .workspace[data-view="orders"] .order-head-main > strong {
  color: #101828;
  font-size: 13px;
  font-weight: 750;
}
#appView .workspace[data-view="orders"] .order-head-main > span:not(.text-ok):not(.text-warn):not(.order-customer-balance) {
  color: #7b8798;
  font-size: 10.5px;
}
#appView .workspace[data-view="orders"] .order-head-main .order-wh {
  background: #eef4ff;
  color: #175cd3;
}
#appView .workspace[data-view="orders"] .order-head-service {
  background: #eef2f6;
  color: #475467;
}
#appView .workspace[data-view="orders"] .order-head-service.is-missing {
  background: #fff4e5;
  color: #b54708;
}

#appView .workspace[data-view="orders"] .order-card-grid > div {
  padding: 11px 12px;
}
#appView .workspace[data-view="orders"] .order-card-grid > .sign-cell { background: #f7f9fc !important; }
#appView .workspace[data-view="orders"] .order-card-grid > .order-products-cell { background: #fff !important; }
#appView .workspace[data-view="orders"] .order-card-grid > .order-context-cell { background: #f5f8fc !important; }
#appView .workspace[data-view="orders"] .order-card-grid > .order-proof-cell { background: #fbfcfe !important; }
#appView .workspace[data-view="orders"] .order-card-grid > .order-actions { background: #f3f6f9 !important; }

#appView .workspace[data-view="orders"] .order-inventory-card {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
}
#appView .workspace[data-view="orders"] .order-inventory-card-column__title,
#appView .workspace[data-view="orders"] .order-proof-title {
  color: #344054;
  font-size: 11px;
  font-weight: 750;
}

#appView .workspace[data-view="orders"] .order-proof-item {
  padding: 7px 0;
}
#appView .workspace[data-view="orders"] .order-proof-main {
  min-height: 22px;
}
#appView .workspace[data-view="orders"] .order-proof-stage-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
#appView .workspace[data-view="orders"] .order-proof-stage {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 1px;
  min-height: 44px;
  padding: 5px 3px;
  border-radius: 6px;
  text-align: center;
}
#appView .workspace[data-view="orders"] .order-proof-stage.is-complete {
  background: #e9f7ef;
  color: #067647;
}

#appView .workspace[data-view="orders"] .order-actions {
  gap: 7px;
  padding-top: 10px;
}
#appView .workspace[data-view="orders"] .order-action-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}
#appView .workspace[data-view="orders"] .order-action-heading span {
  color: #667085;
  font-size: 10px;
  font-weight: 700;
}
#appView .workspace[data-view="orders"] .order-action-heading strong {
  color: #175cd3;
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}
#appView .workspace[data-view="orders"] .order-action-heading.is-readonly strong { color: #667085; }

#appView .workspace[data-view="orders"] .order-actions .oa-primary-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-confirm-stock {
  grid-column: 1 / -1;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: #146ef5;
  color: #fff;
  font-weight: 700;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-confirm-stock:hover {
  background: #0d56c8;
  color: #fff;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-confirm-stock:disabled,
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-confirm-stock.is-complete {
  border: 1px solid #d0d5dd;
  background: #f2f4f7;
  color: #98a2b3;
  cursor: not-allowed;
  opacity: 1;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  box-shadow: none;
  font-weight: 650;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action.is-next {
  grid-column: 1 / -1;
  min-height: 40px;
  background: #146ef5;
  color: #fff;
  box-shadow: 0 5px 13px rgba(20, 110, 245, .2);
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action.is-next:hover {
  background: #0d56c8;
  color: #fff;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action.is-done {
  background: #e9f7ef;
  color: #067647;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action.is-pending:hover,
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action.is-done:hover {
  background: #e5ebf2;
  color: #1d2939;
}

#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row button,
#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row button {
  min-height: 28px;
  background: transparent;
  color: #667085;
  font-size: 10px;
  font-weight: 550;
}
#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row .oa-loading-print {
  grid-column: span 2;
}
#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row button:hover,
#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row button:hover {
  background: #fff;
  color: #344054;
}
#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row button.warn {
  background: #fff4e5;
  color: #a15c07;
}
#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row {
  margin-top: auto;
}
#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row button.danger {
  background: #fff0ee;
  color: #b42318;
}

@media (max-width: 1750px) and (min-width: 701px) {
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action.is-next {
    grid-column: span 2;
  }
  #appView .workspace[data-view="orders"] .order-actions .oa-secondary-row,
  #appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1175px) {
  #appView .workspace[data-view="orders"] .batch-workflow-title {
    flex-basis: 100%;
  }
  #appView .workspace[data-view="orders"] .batch-workflow {
    flex-wrap: wrap;
    padding-left: 6px;
  }
}

@media (max-width: 700px) {
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row,
  #appView .workspace[data-view="orders"] .order-actions .oa-secondary-row,
  #appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action.is-next {
    grid-column: 1 / -1;
  }
}

/* 人员工作统计：优先呈现可核算数字和可追溯明细，不做装饰性仪表盘。 */
#appView .workspace[data-view="workPerformance"] { background: #f7f8fa; }
.work-performance-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 0 14px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  overflow-x: auto;
}
.work-performance-tabs button {
  min-width: 96px;
  padding: 14px 12px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #667085;
  font-weight: 600;
  white-space: nowrap;
}
.work-performance-tabs button.active {
  border-bottom-color: var(--primary, #146ef5);
  color: var(--primary, #146ef5);
  box-shadow: none;
}
.work-performance-tab-panel { min-height: 320px; }
.work-performance-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 150px) minmax(150px, 190px) minmax(150px, 190px) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: #fff;
}
.work-performance-toolbar label { min-width: 0; }
.work-performance-toolbar input,
.work-performance-toolbar select { width: 100%; }
.work-performance-privacy {
  align-self: center;
  color: var(--text-muted, #667085);
  font-size: 12px;
  line-height: 1.5;
}
.work-performance-grid { display: grid; gap: 12px; margin-bottom: 12px; }
.work-performance-grid--today { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.work-performance-grid--history { grid-template-columns: minmax(390px, .82fr) minmax(620px, 1.5fr); align-items: start; }
.work-summary-panel { overflow: hidden; }
.work-summary-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--line, #eaecf0);
}
.work-summary-head > div { display: grid; grid-template-columns: auto auto; align-items: end; gap: 3px 10px; }
.work-summary-head span { grid-column: 1 / -1; color: #475467; font-size: 12px; font-weight: 650; }
.work-summary-head strong { color: #101828; font-size: 32px; line-height: 1; letter-spacing: -.04em; }
.work-summary-head em { color: #667085; font-size: 11px; font-style: normal; }
.work-summary-head p { margin: 0; color: #667085; font-size: 11px; text-align: right; }
.work-summary-head em { white-space: nowrap; }
.work-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-metric-cell { padding: 12px 14px; border-right: 1px solid var(--line, #eaecf0); }
.work-metric-cell:last-child { border-right: 0; }
.work-metric-cell span { display: block; color: #667085; font-size: 10px; }
.work-metric-cell strong { display: block; margin-top: 3px; color: #101828; font-size: 18px; }
.work-metric-cell em { display: block; margin-top: 2px; color: #667085; font-size: 10px; font-style: normal; }
.work-record-toolbar { display: grid; grid-template-columns: minmax(130px, 170px) minmax(220px, 1fr) auto; gap: 10px; align-items: end; }
.work-record-toolbar label { min-width: 0; }
.work-order-link { padding: 0; border: 0; color: var(--primary, #146ef5); background: transparent; font-weight: 650; }
.work-order-link:hover { text-decoration: underline; box-shadow: none; transform: none; }
.work-performance-tab-panel .table-wrap tfoot th,
.work-performance-tab-panel .table-wrap tfoot td {
  border-top: 2px solid var(--line, #d0d5dd);
  background: #f8fafc;
  color: #101828;
  font-weight: 700;
}
.work-summary-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid #dbe5f5;
  border-radius: 8px;
  background: #f7faff;
  color: #475467;
  font-size: 12px;
}
.work-summary-strip strong { color: #123b79; font-size: 13px; }
.work-summary-strip span + span { padding-left: 16px; border-left: 1px solid #dbe5f5; }
.work-period-explanation {
  margin: -2px 0 12px;
  padding: 9px 12px;
  border-left: 3px solid var(--primary, #146ef5);
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
}
.work-period-explanation strong { color: #344054; }

@media (max-width: 1280px) {
  .work-performance-grid--today { grid-template-columns: 1fr; }
  .work-performance-grid--history { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .work-performance-tabs { padding-inline: 8px; }
  .work-performance-tabs button { min-width: 84px; }
  .work-performance-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .work-performance-toolbar .actions { justify-content: stretch; }
  .work-performance-toolbar .actions button { flex: 1; }
  .work-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-metric-cell:nth-child(2) { border-right: 0; }
  .work-metric-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line, #eaecf0); }
  .work-record-toolbar { grid-template-columns: 1fr; }
  .work-summary-strip { align-items: flex-start; gap: 6px 12px; }
  .work-summary-strip span + span { padding-left: 12px; }
}

/* Compact sidebar + order workspace responsive closure · 2026-09-02. */
@media (min-width: 1081px) {
  .app-shell { grid-template-columns: 188px minmax(0, 1fr); }
  .order-pagination { left: 188px; }
}

@media (min-width: 861px) and (max-width: 1080px) {
  .app-shell { grid-template-columns: 176px minmax(0, 1fr); }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .menu {
    display: block;
    padding: 9px 8px 12px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .menu-section { display: block; }
  .menu-group { display: block; }
  .menu button { width: 100%; white-space: nowrap; }
  .sidebar-userbar { display: flex; }
  .order-pagination { left: 176px; }
  #appView .workspace[data-view="orders"] .topbar {
    align-items: stretch;
  }
  #appView .workspace[data-view="orders"] .stats-bar--header {
    width: 100%;
    margin: 4px 0 0;
  }
  #appView .workspace[data-view="orders"] .page-header-actions {
    align-self: flex-end;
  }
}

@media (max-width: 1750px) and (min-width: 1490px) {
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row {
    grid-template-columns: repeat(5, minmax(96px, 1fr));
  }
  #appView .workspace[data-view="orders"] .order-actions .oa-secondary-row,
  #appView .workspace[data-view="orders"] .oa-more-grid,
  #appView .workspace[data-view="orders"] .oa-auxiliary-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1489px) and (min-width: 1176px) {
  #appView .workspace[data-view="orders"] .order-proof-cell {
    grid-column: auto;
    display: flex;
    border-top: 0;
  }
}

@media (max-width: 1489px) and (min-width: 1081px) {
  #appView .workspace[data-view="orders"] .stats-bar--header {
    align-self: center;
    height: 42px;
    max-height: 42px;
  }
}

@media (max-width: 1175px) {
  #appView .workspace[data-view="orders"] .ogl-freight-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #appView .workspace[data-view="orders"] .batch-work-area .ogl-freight-summary {
    flex: 1 1 100%;
    min-width: 0;
    margin-left: 0;
  }
  #appView .workspace[data-view="orders"] .ogl-freight-cost { grid-column: 1 / 2; }
  #appView .workspace[data-view="orders"] .ogl-freight-settings { grid-column: 2; }
  #appView .workspace[data-view="orders"] .batch-bar {
    grid-template-columns: minmax(0, 1fr);
  }
  #appView .workspace[data-view="orders"] .batch-selection,
  #appView .workspace[data-view="orders"] .batch-work-area,
  #appView .workspace[data-view="orders"] .batch-summary,
  #appView .workspace[data-view="orders"] .batch-filter-area {
    grid-column: 1;
    width: 100%;
  }
  #appView .workspace[data-view="orders"] .batch-work-area,
  #appView .workspace[data-view="orders"] .batch-filter-area {
    flex-wrap: wrap;
  }
  #appView .workspace[data-view="orders"] .batch-work-area .batch-workflow {
    width: 100%;
  }
  #appView .workspace[data-view="orders"] .batch-summary {
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px solid #eaecf0;
  }
  #appView .workspace[data-view="orders"] .batch-filter-area {
    overflow: visible;
  }
  #appView .workspace[data-view="orders"] .confirm-stock-batch-tools {
    flex-wrap: wrap;
  }
  #appView .workspace[data-view="orders"] .order-context-cell {
    grid-column: 1 / 3;
  }
}

@media (max-width: 640px) {
  #appView .workspace[data-view="orders"] .ogl-freight-summary { grid-template-columns: minmax(0, 1fr); }
  #appView .workspace[data-view="orders"] .ogl-freight-cost,
  #appView .workspace[data-view="orders"] .ogl-freight-settings { grid-column: 1; }
  #appView .workspace[data-view="orders"] .ogl-freight-metric,
  #appView .workspace[data-view="orders"] .ogl-freight-cost { min-height: 56px; }
  #appView .workspace[data-view="orders"] .ogl-freight-settings { min-height: 42px; }
}

/* =====================================================   Order center surface relief v335 · 2026-09-04
   Reduce the "boxes and ruled lines" effect: elevation separates major
   work areas, while whitespace and quiet fills separate content inside them.
   Inputs and operational warning states keep their necessary boundaries.
   ============================================================ */
#appView .workspace[data-view="orders"] {
  --order-surface-shadow: 0 4px 14px rgba(16, 24, 40, .06);
  --order-module-shadow: 0 1px 4px rgba(16, 24, 40, .045);
}

#appView:has(.workspace[data-view="orders"]) .sidebar {
  border-right: 0;
  box-shadow: 5px 0 18px rgba(16, 24, 40, .055);
}

#appView .workspace[data-view="orders"] .topbar {
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--order-surface-shadow);
}

#appView .workspace[data-view="orders"] .stats-bar--header {
  gap: 2px;
}

#appView .workspace[data-view="orders"] .stats-bar--header .stat {
  border: 0;
  background: transparent;
}

#appView .workspace[data-view="orders"] .order-filter-panel--always,
#appView .workspace[data-view="orders"] .order-list-tabs,
#appView .workspace[data-view="orders"] .batch-bar,
#appView .workspace[data-view="orders"] .ogl-batch-groups {
  border: 0;
  border-radius: 10px;
  box-shadow: var(--order-surface-shadow);
}

#appView .workspace[data-view="orders"] .order-filter-panel--always:hover {
  border: 0;
  box-shadow: var(--order-surface-shadow);
}

#appView .workspace[data-view="orders"] .order-filter-secondary {
  border-top: 0;
  background: #f7f9fc;
  box-shadow: inset 0 14px 24px -28px rgba(16, 24, 40, .55);
}

#appView .workspace[data-view="orders"] .order-filter-primary input,
#appView .workspace[data-view="orders"] .order-filter-primary select {
  border-color: #dfe5ec;
}

#appView .workspace[data-view="orders"] .order-sticky-tools {
  box-shadow: none;
}

#appView .workspace[data-view="orders"] .batch-bar {
  overflow: hidden;
}

#appView .workspace[data-view="orders"] .batch-selection-card {
  border: 0;
  background: #f5f7fa;
  box-shadow: none;
}

#appView .workspace[data-view="orders"] .batch-workflow {
  padding-block: 0;
  border: 0;
  background: transparent;
}

#appView .workspace[data-view="orders"] .batch-flow-step,
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete {
  border: 0;
  background: transparent;
  box-shadow: none;
}

#appView .workspace[data-view="orders"] .batch-flow-step:hover,
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete:hover {
  border: 0;
  background: #f2f6fb;
  box-shadow: none;
}

#appView .workspace[data-view="orders"] .batch-filter-area,
#appView .workspace[data-view="orders"] .ogl-batch-toolbar {
  border-top: 0;
  background: #f7f9fc;
}

#appView .workspace[data-view="orders"] .batch-filter-area {
  margin-inline: -10px;
  padding-inline: 10px;
}

#appView .workspace[data-view="orders"] :where(.order-filter-secondary, .batch-work-area, .batch-filter-area) button:not(.primary):not(.ogl-freight-settings) {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

#appView .workspace[data-view="orders"] :where(.order-filter-secondary, .batch-work-area, .batch-filter-area) button:not(.primary):not(.ogl-freight-settings):hover {
  border-color: transparent;
  background: #e5ebf2;
  color: #1d2939;
}

#appView .workspace[data-view="orders"] .ogl-freight-summary {
  gap: 4px;
  padding: 4px;
  border: 0;
  background: #edf4ff;
  box-shadow: 0 4px 14px rgba(23, 92, 211, .11);
}

#appView .workspace[data-view="orders"] .ogl-freight-metric,
#appView .workspace[data-view="orders"] .ogl-freight-cost {
  border-radius: 6px;
  background: transparent;
}

#appView .workspace[data-view="orders"] .ogl-freight-metric.is-selected {
  background: #dfeeff;
}

#appView .workspace[data-view="orders"] .ogl-freight-settings {
  border-radius: 6px;
}

#appView .workspace[data-view="orders"] .ogl-batch-container-count {
  border: 0;
  box-shadow: var(--order-module-shadow);
}

#appView .workspace[data-view="orders"] .ogl-batch-group-card {
  border: 0;
  box-shadow: inset 4px 0 #98a2b3, var(--order-module-shadow);
}

#appView .workspace[data-view="orders"] .ogl-batch-group-card.tone-success { box-shadow: inset 4px 0 #12b76a, var(--order-module-shadow); }
#appView .workspace[data-view="orders"] .ogl-batch-group-card.tone-info { box-shadow: inset 4px 0 #2e90fa, var(--order-module-shadow); }
#appView .workspace[data-view="orders"] .ogl-batch-group-card.tone-warning { box-shadow: inset 4px 0 #f79009, var(--order-module-shadow); }
#appView .workspace[data-view="orders"] .ogl-batch-group-card.tone-danger { box-shadow: inset 4px 0 #f04438, var(--order-module-shadow); }

#appView .workspace[data-view="orders"] .order-list {
  gap: 10px;
}

#appView .workspace[data-view="orders"] .order-card {
  border: 0;
  border-radius: 10px;
  box-shadow: var(--order-surface-shadow);
}

#appView .workspace[data-view="orders"] .order-card--packed-cancelled {
  border: 0;
  box-shadow: inset 4px 0 #f79009, var(--order-surface-shadow);
}

#appView .workspace[data-view="orders"] .order-head {
  border-bottom: 0;
  background: #fbfcfe;
  box-shadow: 0 12px 22px -25px rgba(16, 24, 40, .8);
}

#appView .workspace[data-view="orders"] .order-head-service,
#appView .workspace[data-view="orders"] .order-head-main .order-wh,
#appView .workspace[data-view="orders"] .order-ogl-pack-code {
  border: 0;
}

#appView .workspace[data-view="orders"] .order-card-grid {
  gap: 0;
  padding: 0;
  background: #fff;
}

#appView .workspace[data-view="orders"] .order-card-grid > div {
  border: 0;
  border-radius: 0;
  background: #fff !important;
  box-shadow: none;
}

#appView .workspace[data-view="orders"] .order-card-grid > :where(.sign-cell, .order-context-cell, .order-proof-cell, .order-actions) {
  background: #f7f9fc !important;
}

#appView .workspace[data-view="orders"] .order-products-cell {
  overflow: hidden;
}

#appView .workspace[data-view="orders"] .order-product-line,
#appView .workspace[data-view="orders"] .order-inventory-card-column,
#appView .workspace[data-view="orders"] .order-inventory-card-column__row + .order-inventory-card-column__row,
#appView .workspace[data-view="orders"] .order-inventory-card__item + .order-inventory-card__item,
#appView .workspace[data-view="orders"] .order-proof-title,
#appView .workspace[data-view="orders"] .order-proof-item {
  border: 0;
}

#appView .workspace[data-view="orders"] .order-inventory-card {
  border: 0;
  background: #fff;
  box-shadow: none;
}

#appView .workspace[data-view="orders"] .order-inventory-card.is-unmapped {
  border: 0;
  background: #fff8eb;
}

#appView .workspace[data-view="orders"] .order-inventory-card__query {
  border: 0;
  background: #eaf2ff;
}

#appView .workspace[data-view="orders"] .order-proof-stage {
  border: 0;
  background: #f0f3f7;
}

#appView .workspace[data-view="orders"] .order-actions :where(button),
#appView .workspace[data-view="orders"] .oa-more > summary {
  border-color: transparent;
  background: transparent;
}

#appView .workspace[data-view="orders"] .order-actions :where(button):hover,
#appView .workspace[data-view="orders"] .oa-more > summary:hover {
  border-color: transparent;
  background: #e3e9f0;
  color: #1d2939;
}

#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-primary,
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-primary:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

#appView .workspace[data-view="orders"] .order-actions .oa-more-grid button.warn,
#appView .workspace[data-view="orders"] .order-actions .oa-more-grid button.danger {
  border-color: transparent;
}

#appView .workspace[data-view="orders"] .order-pagination {
  border-top: 0;
}

@media (max-width: 860px) {
  #appView:has(.workspace[data-view="orders"]) .sidebar {
    box-shadow: 0 4px 14px rgba(16, 24, 40, .055);
  }
  #appView .workspace[data-view="orders"] .topbar {
    padding: 8px 10px;
  }
}

@media (max-width: 700px) {
  #appView .workspace[data-view="orders"] .order-card-grid {
    display: block;
    padding: 7px;
  }
  #appView .workspace[data-view="orders"] .order-card-grid > div {
    border: 0;
  }
  #appView .workspace[data-view="orders"] .order-card-grid > div + div {
    margin-top: 7px;
  }
}

/* =====================================================   Order center unified workspace v337 · 2026-09-04
   The page is one continuous white workbench. Hierarchy now comes from
   quiet inner fills, spacing and the order cards, not a gray outer ring
   plus several unrelated floating panels.
   ============================================================ */
#appView .workspace[data-view="orders"] {
  padding: 0 0 88px;
  background: #fff;
}

#appView .workspace[data-view="orders"] > .topbar,
#appView .workspace[data-view="orders"] > .stats-bar,
#appView .workspace[data-view="orders"] > #content {
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

#appView .workspace[data-view="orders"] .topbar {
  margin: 0;
  padding: 14px 18px 12px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

#appView .workspace[data-view="orders"] > #content {
  min-height: calc(100dvh - 68px);
  padding: 0 18px 18px;
  background: #fff;
}

#appView .workspace[data-view="orders"] .order-filter-panel--always,
#appView .workspace[data-view="orders"] .order-list-tabs,
#appView .workspace[data-view="orders"] .batch-bar,
#appView .workspace[data-view="orders"] .ogl-batch-groups {
  box-shadow: none;
}

#appView .workspace[data-view="orders"] .order-filter-panel--always {
  background: #f8fafc;
}

#appView .workspace[data-view="orders"] .order-filter-primary {
  background: #f8fafc;
}

#appView .workspace[data-view="orders"] .order-filter-secondary,
#appView .workspace[data-view="orders"] .batch-bar {
  background: #f2f5f8;
}

#appView .workspace[data-view="orders"] .order-list-tabs {
  background: #f8fafc;
}

#appView .workspace[data-view="orders"] .batch-filter-area .filter-active {
  border-color: #bfd4f7 !important;
  background: #eaf2ff !important;
  color: #175cd3 !important;
  box-shadow: inset 0 0 0 1px rgba(23, 92, 211, .04);
  font-weight: 700;
}

#appView .workspace[data-view="orders"] .batch-filter-area .filter-active:hover {
  border-color: #9dbdee !important;
  background: #deebff !important;
  color: #0d56c8 !important;
}

@media (max-width: 860px) {
  #appView .workspace[data-view="orders"] .topbar {
    padding: 12px 10px 10px;
  }
  #appView .workspace[data-view="orders"] > #content {
    padding: 0 10px 14px;
  }
}
/* =====================================================   Batch workflow state clarity v346 · 2026-09-04
   Completed, current and pending steps stay distinct while completed
   actions remain available for an intentional retry.
   ============================================================ */
#appView .workspace[data-view="orders"] .batch-flow-step {
  border: 0;
  background: #f6f8fb;
  box-shadow: inset 0 0 0 1px #e1e6ed;
}

#appView .workspace[data-view="orders"] .batch-flow-content {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "action state" "meta meta";
  column-gap: 6px;
}

#appView .workspace[data-view="orders"] .batch-flow-step .batch-step { grid-area: action; }
#appView .workspace[data-view="orders"] .batch-flow-meta { grid-area: meta; }
#appView .workspace[data-view="orders"] .batch-flow-state {
  grid-area: state;
  align-self: center;
  min-width: 42px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e9edf3;
  color: #667085;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
}

#appView .workspace[data-view="orders"] .batch-flow-step.is-current {
  background: #eaf2ff;
  box-shadow: inset 0 0 0 1px #b2ccff, 0 3px 9px rgba(23, 92, 211, .1);
}
#appView .workspace[data-view="orders"] .batch-flow-step.is-current:hover { background: #eaf2ff; }
#appView .workspace[data-view="orders"] .batch-flow-step.is-current .batch-flow-state {
  background: #175cd3;
  color: #fff;
}

#appView .workspace[data-view="orders"] .batch-flow-step.is-complete {
  background: #e7f6ec;
  box-shadow: inset 0 0 0 1px #a6d8b8;
}
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete:hover { background: #e1f2e7; }
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete .batch-flow-index,
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete .batch-flow-state {
  background: #067647;
  color: #fff;
}
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete .batch-step,
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete .batch-flow-meta {
  color: #05603a;
}
#appView .workspace[data-view="orders"] .batch-flow-step.is-complete + .batch-step-arrow { color: #3b9b68; }

/* =====================================================   Order action clarity v346 · 2026-09-04
   One blue next action, green completed actions, shaped secondary
   controls and explicit amber/red safety actions.
   ============================================================ */
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action.is-pending {
  background: #fff;
  color: #344054;
  box-shadow: inset 0 0 0 1px #d0d5dd;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-workflow-action.is-done {
  background: #e7f6ec;
  color: #067647;
  box-shadow: inset 0 0 0 1px #a6d8b8;
}
#appView .workspace[data-view="orders"] .order-actions .oa-primary-row .oa-confirm-stock.is-complete {
  border-color: transparent;
  background: #e7f6ec;
  color: #067647;
  box-shadow: inset 0 0 0 1px #a6d8b8;
}

#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row button {
  min-height: 30px;
  background: #e9eef4;
  color: #344054;
  box-shadow: inset 0 0 0 1px #d8e0e9;
  font-size: 11px;
  font-weight: 650;
}
#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row button:hover {
  background: #dde5ee;
  color: #1d2939;
}
#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row button.warn {
  background: #fff4e5;
  color: #a15c07;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row button {
  min-height: 28px;
  background: #f7f8fa;
  color: #475467;
  box-shadow: inset 0 0 0 1px #e4e7ec;
  font-size: 10.5px;
  font-weight: 600;
}
#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row button:hover {
  background: #eef2f6;
  color: #1d2939;
}
#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row button.danger {
  background: #fff0ee;
  color: #b42318;
  box-shadow: inset 0 0 0 1px #f7c4c4;
}

/* Order workspace hierarchy · 2026-09-06
   Scoped to the order center; workflow state colors and all operations remain intact. */
#appView .workspace[data-view="orders"] .order-filter-panel--always {
  margin-bottom: 14px;
  border-radius: 6px;
  background: #f8fafc;
}
#appView .workspace[data-view="orders"] .order-filter-primary {
  grid-template-columns: minmax(280px, 2.2fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: 10px;
  padding: 12px;
}
#appView .workspace[data-view="orders"] .order-filter-primary label {
  gap: 6px;
  color: #475467;
  font-size: 12px;
}
#appView .workspace[data-view="orders"] .order-filter-secondary {
  padding: 6px 12px 10px;
  background: #f8fafc;
  gap: 12px;
}
#appView .workspace[data-view="orders"] .order-global-actions { gap: 4px; flex-wrap: wrap; }
#appView .workspace[data-view="orders"] .order-global-actions button {
  min-height: 32px;
  font-size: 12px;
}
#appView .workspace[data-view="orders"] .order-global-actions .order-create-action {
  background: #fff;
  box-shadow: inset 0 0 0 1px #d0d5dd;
  color: #1d2939;
}
#appView .workspace[data-view="orders"] .order-global-actions .order-export-action {
  margin-left: 10px;
}
#appView .workspace[data-view="orders"] .order-list-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px 16px;
  padding: 0 10px 8px;
  margin-bottom: 0;
  overflow: visible;
  background: #fff;
  border-bottom: 1px solid #e4e7ec;
}
#appView .workspace[data-view="orders"] .order-status-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
  min-width: 0;
  position: relative;
  padding-top: 20px;
}
#appView .workspace[data-view="orders"] .order-status-group-label {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  margin: 0;
  padding: 0 10px;
  color: #667085;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}
#appView .workspace[data-view="orders"] .order-list-tabs button {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: #475467;
}
#appView .workspace[data-view="orders"] .order-list-tabs button.active {
  color: #175cd3;
  background: #edf4ff;
  font-weight: 700;
}
#appView .workspace[data-view="orders"] .order-list-tabs button span {
  min-width: 16px;
  margin-left: 5px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#appView .workspace[data-view="orders"] .batch-bar {
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 0 12px 12px;
  overflow: visible;
  background: #f8fafc;
}
#appView .workspace[data-view="orders"] .batch-filter-area {
  grid-column: 1 / -1;
  grid-row: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 0;
  border-top: 0;
  border-bottom: 1px solid #e4e7ec;
  background: transparent;
  overflow: visible;
}
#appView .workspace[data-view="orders"] .order-section-label {
  flex: 0 0 auto;
  margin-right: 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 600;
}
#appView .workspace[data-view="orders"] .batch-selection-card {
  min-width: 0;
  width: auto;
  align-self: center;
  padding: 8px 10px 8px 0;
  background: transparent;
  box-shadow: none;
}
#appView .workspace[data-view="orders"] .batch-selection-count strong { font-size: 22px; }
#appView .workspace[data-view="orders"] .batch-work-area {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}
#appView .workspace[data-view="orders"] .batch-work-area .batch-workflow {
  flex: 1 1 720px;
  min-width: 0;
}
#appView .workspace[data-view="orders"] .batch-flow-step { padding: 8px; }
#appView .workspace[data-view="orders"] .batch-flow-meta {
  color: #667085;
  font-size: 11px;
  white-space: normal;
}
#appView .workspace[data-view="orders"] .batch-flow-state {
  border-radius: 3px;
  font-size: 10px;
}
#appView .workspace[data-view="orders"] .batch-summary {
  min-width: 100px;
  align-self: center;
  gap: 4px;
}
#appView .workspace[data-view="orders"] .batch-summary strong { font-size: 14px; }
#appView .workspace[data-view="orders"] .order-list { gap: 14px; margin-top: 14px; }
#appView .workspace[data-view="orders"] .order-card {
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(16,24,40,.025);
}
#appView .workspace[data-view="orders"] .order-head {
  min-height: 42px;
  padding: 9px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #edf0f3;
}
#appView .workspace[data-view="orders"] .order-head-main { row-gap: 6px; }
#appView .workspace[data-view="orders"] .order-head-main span { color: #667085; }
#appView .workspace[data-view="orders"] .order-head-main > strong { font-size: 13px; }
#appView .workspace[data-view="orders"] .order-card-grid > :is(.sign-cell, .order-context-cell, .order-proof-cell) {
  background: #fff !important;
}
#appView .workspace[data-view="orders"] .order-card-grid > .order-actions {
  padding: 12px;
  gap: 0;
  background: #f8fafc !important;
}
#appView .workspace[data-view="orders"] .product-name-ru { color: #667085; }
#appView .workspace[data-view="orders"] .order-action-heading { margin-bottom: 6px; }
#appView .workspace[data-view="orders"] .order-action-section-label {
  display: block;
  margin: 8px 0 5px;
  color: #667085;
  font-size: 11px;
  font-weight: 500;
}
#appView .workspace[data-view="orders"] .order-action-section { min-width: 0; }
#appView .workspace[data-view="orders"] .order-action-section > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin: 2px 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
#appView .workspace[data-view="orders"] .order-action-section > summary::-webkit-details-marker { display: none; }
#appView .workspace[data-view="orders"] .order-action-section > summary:focus-visible {
  outline: 2px solid #005bff;
  outline-offset: 2px;
}
#appView .workspace[data-view="orders"] .order-action-section-icon::before {
  content: "+";
  color: #475467;
  font-size: 16px;
  line-height: 1;
}
#appView .workspace[data-view="orders"] .order-action-section[open] > summary .order-action-section-icon::before { content: "−"; }
#appView .workspace[data-view="orders"] .order-actions :is(.oa-secondary-row, .oa-auxiliary-row) {
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 5px;
  margin-top: 0;
  padding-top: 0;
  border: 0;
}
#appView .workspace[data-view="orders"] .order-actions :is(.oa-secondary-row, .oa-auxiliary-row) button {
  min-height: 32px;
  padding: 5px 6px;
  background: #fff;
  color: #475467;
  box-shadow: inset 0 0 0 1px #e4e7ec;
  font-size: 12px;
  font-weight: 500;
  white-space: normal;
}
#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row button.warn {
  color: #a15c07;
  background: #fff8ed;
  box-shadow: inset 0 0 0 1px #f1d5ab;
}
#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row button.danger {
  color: #b42318;
  background: #fff5f4;
  box-shadow: inset 0 0 0 1px #f2c6c2;
}
#appView .workspace[data-view="orders"] .order-actions .oa-secondary-row .oa-loading-print {
  grid-column: auto;
}
@media (max-width: 1650px) {
  #appView .workspace[data-view="orders"] .batch-work-area .batch-workflow {
    flex: 1 0 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    position: relative;
    order: 2;
  }
  #appView .workspace[data-view="orders"] .batch-workflow-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 34px 2px 0;
    text-align: left;
  }
  #appView .workspace[data-view="orders"] .batch-workflow-title strong { margin-left: 0; }
  #appView .workspace[data-view="orders"] .batch-workflow-title span { color: #667085; font-size: 11px; }
  #appView .workspace[data-view="orders"] .batch-workflow .batch-step-arrow { display: none; }
  #appView .workspace[data-view="orders"] .batch-workflow .batch-hotkey-gear {
    position: absolute;
    inset: -4px 0 auto auto;
    transform: none;
    margin: 0;
  }
  #appView .workspace[data-view="orders"] .batch-work-area > button { min-height: 34px; }
  #appView .workspace[data-view="orders"] .batch-flow-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "action" "meta" "state";
    row-gap: 4px;
  }
  #appView .workspace[data-view="orders"] .batch-flow-state { justify-self: start; }

  #appView .workspace[data-view="orders"] .order-filter-primary {
    grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(100px, 1fr)) auto;
  }
  #appView .workspace[data-view="orders"] .batch-bar { grid-template-columns: 150px minmax(0, 1fr); }
  #appView .workspace[data-view="orders"] .batch-summary { grid-column: 1; grid-row: 3; padding: 0; border: 0; }
  #appView .workspace[data-view="orders"] .batch-work-area { grid-column: 2; grid-row: 2 / 4; }
}
@media (max-width: 1175px) {
  #appView .workspace[data-view="orders"] .order-filter-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #appView .workspace[data-view="orders"] .order-filter-search { grid-column: 1 / -1; }
  #appView .workspace[data-view="orders"] .order-filter-buttons { grid-column: 1 / -1; justify-content: flex-end; }
  #appView .workspace[data-view="orders"] .batch-bar { grid-template-columns: minmax(0, 1fr) auto; }
  #appView .workspace[data-view="orders"] .batch-selection-card { grid-column: 1; grid-row: 2; width: auto; }
  #appView .workspace[data-view="orders"] .batch-summary { grid-column: 2; grid-row: 2; width: auto; }
  #appView .workspace[data-view="orders"] .batch-work-area { grid-column: 1 / -1; grid-row: 3; }
  #appView .workspace[data-view="orders"] .order-sticky-tools { position: static; }
}
@media (max-width: 700px) {
  #appView .workspace[data-view="orders"] .batch-work-area .batch-workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  #appView .workspace[data-view="orders"] .order-list-tabs { gap: 8px; padding: 0 0 8px; }
  #appView .workspace[data-view="orders"] .order-status-group { width: 100%; }
  #appView .workspace[data-view="orders"] .order-list-tabs button { min-height: 40px; padding: 7px 9px; }
  #appView .workspace[data-view="orders"] .order-filter-secondary { align-items: flex-start; flex-direction: column; }
  #appView .workspace[data-view="orders"] .order-global-actions { justify-content: flex-start; }
  #appView .workspace[data-view="orders"] .order-global-actions .order-export-action { margin-left: 0; }
  #appView .workspace[data-view="orders"] .batch-work-area .batch-workflow { flex-basis: 100%; }
  #appView .workspace[data-view="orders"] .order-actions :is(.oa-secondary-row, .oa-auxiliary-row) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stock-card-print-presets { display: flex; gap: 10px; }
.stock-card-print-presets button { flex: 1; min-width: 0; border: 1px solid #d7deea; background: #fff; }
.stock-card-print-presets button[aria-pressed="true"] { color: #005bff; border-color: #005bff; background: #eef4ff; }

.rf-stock-card__delete { position: absolute; top: 32px; right: 0; color: #b42318; font-size: 11px; padding: 3px 8px; border: 1px solid #e5bdb8; border-radius: 6px; background: #fff; }

.stock-ledger-keyword { position: relative; min-width: 0; }
.stock-ledger-keyword input { padding-right: 30px; }
.stock-ledger-keyword button { position: absolute; right: 3px; top: 3px; bottom: 3px; padding: 0 7px; min-height: 0; border: 0; background: transparent; }
.stock-ledger-keyword button[hidden] { display: none; }
.stock-ledger-controls { grid-template-columns: auto auto minmax(210px, 1fr); }
.stock-ledger-search { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .stock-ledger-controls { grid-template-columns: 1fr; }
  .stock-ledger-search { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stock-ledger-keyword { grid-column: 1 / -1; }
  .stock-ledger-search > select { grid-column: 1 / -1; }
}

/* Keep the ledger filters on one line; narrow screens scroll this toolbar. */
.panel-head.stock-ledger-toolbar { flex-wrap: nowrap; align-items: center; gap: 16px; }
.stock-ledger-toolbar > :first-child { flex: 0 0 auto; }
.stock-ledger-toolbar .stock-ledger-controls {
  display: flex; flex: 1 1 auto; flex-wrap: nowrap; align-items: center;
  width: auto; min-width: 0; gap: 8px; overflow-x: auto; padding: 2px 0;
}
.stock-ledger-controls > select { flex: 0 0 auto; width: 86px; min-width: 86px; }
.stock-ledger-controls > button { flex: 0 0 auto; white-space: nowrap; }
.stock-ledger-controls > #stockLedgerShelfStatus { width: 126px; }
.stock-ledger-controls > .stock-ledger-toggle { flex: 0 0 auto; padding: 0 8px; }
.stock-ledger-controls > .stock-ledger-owner-filter { flex: 0 0 205px; }
.stock-ledger-controls > .stock-ledger-search {
  display: flex; flex: 1 0 420px; min-width: 420px; align-items: center; gap: 8px;
}
.stock-ledger-search > .stock-ledger-keyword { flex: 1 1 180px; min-width: 150px; }
.stock-ledger-search > select { flex: 0 0 130px; width: 130px; min-width: 0; }
.stock-ledger-search > button { flex: 0 0 auto; white-space: nowrap; }

/* Statement workbench: restrained status hierarchy and bounded detail rendering. */
.statement-panel table { font-size: 13px; }
.statement-panel th { font-size: 12px; font-weight: 500; color: #667085; white-space: nowrap; }
.statement-panel td { vertical-align: top; padding-top: 14px; padding-bottom: 14px; }
.statement-panel button { font: inherit; border-radius: 5px; }
.statement-order-link { font-family: inherit; line-height: 1.55; text-align: left; }
.statement-order-link strong { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.statement-panel .statement-product-names { min-width: 180px; max-width: 320px; }
.statement-panel .statement-product-name .strong { font-size: 13px; font-weight: 500; }
.statement-panel .statement-product-name .subline { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.statement-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: 500 12px/1.6 system-ui, sans-serif; color: #475467; }
.statement-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #98a2b3; flex: none; }
.statement-status.green::before { background: #2f9e5a; }
.statement-status.amber::before { background: #d58a1a; }
.statement-status.red::before { background: #e5484d; }
.statement-status.blue::before { background: #2f7de1; }
.statement-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 16px; border-top: 1px solid #eaecf0; font-size: 12px; color: #667085; }
.stock-actions button[aria-busy="true"] { min-width: 80px; color: #475467; background: #f2f4f7; border-color: #eaecf0; }

.barcode-input-receipt { margin-top: 6px; font: 500 12px/1.5 system-ui,sans-serif; color: #344054; overflow-wrap: anywhere; white-space: normal; }
#appView .order-inventory-card__body .order-card-edit {
  display: block; min-height: 26px; padding: 2px 0; border: 0; background: transparent;
  box-shadow: none; color: #175cd3; text-align: left; font-size: 12px; font-weight: 600;
}
#appView .order-inventory-card__body .order-card-edit:hover { text-decoration: underline; }

/* Inventory picking guide: shelf directly follows product title. */
.inventory-card-picker-shelf { display:block; color:#074bfe; font-size:12px; font-weight:650; min-height:18px; overflow-wrap:anywhere; }
.picking-guide-mask { z-index:13000; }
.picking-guide-dialog { width:min(900px,94vw); max-height:92vh; display:flex; flex-direction:column; }
.picking-guide-hint,.picking-guide-warning { margin:0; padding:10px 20px; font-size:13px; }
.picking-guide-warning { color:#b42318; background:#fff3e8; }
.picking-guide-preview { overflow:auto; min-height:0; padding:16px; background:#e9eef5; }
.picking-guide-preview img { display:block; width:100%; height:auto; }
.picking-guide-dialog .modal-head,.picking-guide-dialog .modal-actions { flex-shrink:0; }
#skuPickerGuideButton[hidden] { display:none; }

.sku-picker-tabbar { display:flex; align-items:center; gap:24px; flex-wrap:wrap; margin:-4px 18px 12px; border-bottom:1px solid var(--line); }
.sku-picker-head-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.sku-picker .modal-head .sku-picker-head-actions > button { width:auto; min-height:34px; padding:6px 10px; white-space:nowrap; font-size:12px; }
.sku-picker .modal-head .sku-picker-head-actions > button.primary { background:var(--primary); border-color:var(--primary); color:#fff; }
.sku-picker .modal-head .sku-picker-head-actions > button:disabled { opacity:.5; cursor:not-allowed; }
@media (max-width:640px) {
  .sku-picker .modal-head { flex-wrap:wrap; }
  .sku-picker-head-actions { width:100%; justify-content:flex-start; }
}
.sku-picker-tabbar .sku-picker-tabs { margin:0; border-bottom:0; }
.sku-picker-shelf-filter { display:flex; gap:6px; padding:6px 0; flex-wrap:wrap; }
.sku-picker-shelf-filter[hidden] { display:none; }
.sku-picker-shelf-filter button { min-height:28px; padding:4px 10px; font-size:12px; border:1px solid #d0d5dd; border-radius:5px; background:#fff; color:#475467; }
.sku-picker-shelf-filter button.is-active { color:#074bfe; background:#eef4ff; border-color:#9bbaff; }

.inventory-card-picker-card > button.inventory-card-picker-media { width:100%; padding:0; border:0; background:#f8fafc; border-radius:4px; }
.inventory-card-picker-card > button.inventory-card-picker-name,
.inventory-card-picker-card > button.inventory-card-picker-shelf { width:100%; padding:0; border:0; background:none; text-align:left; border-radius:0; }
.inventory-card-picker-card > button.inventory-card-picker-name { min-height:0; }
.inventory-card-picker-card > button.inventory-card-picker-name:hover,
.inventory-card-picker-card > button.inventory-card-picker-shelf:hover { text-decoration:underline; color:#074bfe; }
.stock-card-settings-mask { z-index:2700; }
.stock-card-print-mask { z-index:2800; }

/* Hover follows the current order without changing its border or geometry. */
@media (hover: hover) and (pointer: fine) {
  #appView .workspace[data-view="orders"] .order-card:hover > .order-head,
  #appView .workspace[data-view="orders"] .order-card:hover > .order-card-grid > div {
    background: #f3f7fc !important;
  }
}

.rf-stock-card__relocate { position: absolute; top: 32px; right: 44px; min-height: 27px; padding: 3px 8px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; color: #475467; font-size: 11px; }

/* 批量打印的连续作业开关，避免继承表单输入框的整行宽度。 */
.batch-print-auto-prepare { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 32px; font-size: 12px; }
.batch-print-auto-prepare input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; padding: 0; margin: 0; flex: 0 0 16px; cursor: pointer; box-shadow: none; }
/* Keep the title clear action inside the input without covering its text. */
.stock-card-title-control { position: relative; }
.stock-card-title-control input { width: 100%; padding-right: 42px; }
.stock-card-title-clear { position: absolute; right: 6px; top: calc(50% - 14px); transform: none; display: grid; place-items: center; width: 28px; height: 28px; min-height: 28px; transition: color .14s ease, background-color .14s ease; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #8590a0; font-size: 21px; line-height: 1; cursor: pointer; }
.stock-card-title-clear:hover { color: #465569; background: #eef2f6; }
.stock-card-title-clear:focus-visible { outline: 2px solid #005cff; outline-offset: 1px; }
.stock-card-title-clear[hidden] { display: none; }

#appView .order-inventory-card__body .order-card-edit.order-inventory-card__shelf {
  color: #e87508; font-size: 18px; font-weight: 800; line-height: 1.4;
  white-space: normal; overflow-wrap: anywhere;
}


/* Keep a single parcel on the same work surface through all stages. */
.open-order-processing-link {display:block; margin-top:8px; color:var(--primary);}
.order-processing-dialog {width:min(1480px,96vw); max-width:96vw; height:min(850px,92dvh); display:flex; flex-direction:column;}
.order-processing-body {flex:1; min-height:0; overflow:auto; padding:16px;}
.order-processing-body .order-card {min-width:0;}
.order-processing-body .order-row-checkbox, .order-processing-body .open-order-processing-link {display:none;}
.order-processing-body .order-card {cursor:default;}
.statement-order-link {text-decoration:none; color:var(--primary); display:flex; flex-direction:column; align-items:flex-start;}
@media (max-width:720px) {.order-processing-dialog {width:96vw; height:94dvh;} .order-processing-body {padding:8px;}}

.sku-picker-shelf-group { display:inline-flex; align-items:center; gap:6px; margin-left:12px; white-space:nowrap; font-size:12px; }
.sku-picker-shelf-group select { width:auto; min-width:110px; min-height:30px; padding:4px 26px 4px 8px; }

.ogl-dispatches { margin:16px 0; padding:12px; background:#f8fafc; border-radius:8px; }
.ogl-dispatch-heading, .ogl-dispatch header { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:10px; }
.ogl-dispatch-heading span, .ogl-dispatch header span { color:#667085; font-size:12px; margin-left:12px; }
.ogl-dispatch { background:white; border:1px solid #e4e7ec; border-radius:6px; margin-top:12px; padding:12px; }
.ogl-dispatch td small { display:block; margin-top:4px; }
.ogl-dispatch-dialog { width:min(860px,94vw); }
.ogl-dispatch-body { overflow:auto; padding:12px 18px; }
.ogl-dispatch-choice { display:flex; align-items:center; gap:12px; padding:14px 4px; border-bottom:1px solid #eef0f3; }
.ogl-dispatch-choice input { width:18px; min-height:18px; flex:0 0 18px; }
.ogl-dispatch-choice small { display:block; color:#667085; margin-top:5px; }

.ogl-cargo-numbers {display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px;}
.ogl-cargo-numbers button {font-size:13px; font-variant-numeric:tabular-nums; padding:4px 8px; min-height:28px; color:#175cd3;}
.ogl-cargo-numbers small {color:#b54708;}

/* Order-center audit: compact controls, legible picking cards, stable dialog actions. */
#appView .workspace[data-view="orders"] .batch-bar { grid-template-columns: auto minmax(0,1fr) auto; gap:8px 14px; padding-bottom:8px; }
#appView .workspace[data-view="orders"] .batch-selection-card { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; padding:4px 0; }
#appView .workspace[data-view="orders"] .batch-selection-count { display:inline-flex; align-items:baseline; gap:4px; }
#appView .workspace[data-view="orders"] .batch-selection-count strong {font-size:18px;}
#appView .workspace[data-view="orders"] #orderClearSelection {min-height:30px; white-space:nowrap;}
#appView .workspace[data-view="orders"] #orderClearSelection[hidden] {display:none;}
#appView .workspace[data-view="orders"] [data-requires-order-selection]:disabled {background:#f2f4f7; color:#667085; border-color:#d0d5dd; box-shadow:none; cursor:not-allowed; opacity:1;}
#appView .workspace[data-view="orders"] .batch-filter-area {padding:6px 0;}
#appView .workspace[data-view="orders"] .order-filter-secondary {padding-top:4px; padding-bottom:4px;}
#appView .workspace[data-view="orders"] .order-action-section-label {display:flex; align-items:center; gap:6px; min-height:32px; margin:2px 0; font-size:12px; cursor:pointer;}
#appView .workspace[data-view="orders"] .order-actions .oa-auxiliary-row button {overflow-wrap:normal; word-break:keep-all;}
/* Keep confirmed primary warehouse action stronger than the separate ERP preparation action. */
#appView .workspace[data-view="orders"] .oa-primary-row > button:not(.oa-workflow-action):not(:disabled) {background:#fff; color:#175cd3; border:1px solid #b2ccff; box-shadow:none;}
.sku-picker {display:flex; flex-direction:column; max-height:calc(100dvh - 32px);}
.sku-picker > :not(.sku-picker-list) {flex-shrink:0;}
.sku-picker .sku-picker-list {min-height:0; flex:1 1 auto; overscroll-behavior:contain; scrollbar-gutter:stable;}
.sku-picker .sku-picker-tools {flex-wrap:wrap; gap:8px;}
.sku-picker .sku-picker-tools input {min-width:180px; flex:1 1 280px;}
.sku-picker-footer {display:flex; flex-wrap:wrap; align-items:center; gap:8px;}
.sku-picker-selection-summary {flex:1 1 250px; margin-right:auto; color:#344054; font-size:13px; line-height:1.5;}
.sku-picker-footer > button {min-height:36px; white-space:nowrap;}
/* Six inventory cards per row balance image size and pack-size progress. */
.sku-picker .sku-picker-list.is-inventory-mode {grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px;}
.sku-picker .inventory-card-picker-card {display:flex; flex-direction:column; gap:7px; padding:8px;}
.sku-picker .inventory-card-picker-media {width:100%; height:auto; aspect-ratio:3 / 4;}
.sku-picker .inventory-card-picker-card > :not(.inventory-card-picker-media) {min-width:0;}
.sku-picker .inventory-card-picker-name {display:-webkit-box; -webkit-line-clamp:2; overflow:hidden; min-height:40px; white-space:normal; font-size:14px; line-height:20px; text-align:left;}
.sku-picker .inventory-card-picker-shelf {color:#a44a0b; font-size:12px; line-height:1.4; min-height:34px; text-align:left; white-space:normal;}
.sku-picker .inventory-card-picker-orders {font-size:11px;}
.sku-picker .inventory-card-picker-orders strong {font-size:15px;}
.sku-picker .inventory-card-picker-stock {font-size:11px; line-height:1.5; overflow-wrap:anywhere;}
@media (max-width:1100px) {
  .sku-picker .sku-picker-list.is-inventory-mode {grid-template-columns:repeat(6,minmax(0,1fr));}
}
@media (max-width:850px) {
  .sku-picker .sku-picker-list.is-inventory-mode {grid-template-columns:repeat(4,minmax(0,1fr));}
}
.order-processing-dialog .modal-head {flex-shrink:0;}
.order-processing-dialog .modal-actions {flex-shrink:0;}
.order-processing-body {overscroll-behavior:contain; scrollbar-gutter:stable;}
@media (max-width:1175px) {
  #appView .workspace[data-view="orders"] .batch-bar {grid-template-columns:minmax(0,1fr) auto;}
  #appView .workspace[data-view="orders"] .batch-selection-card {grid-column:1; grid-row:2;}
  #appView .workspace[data-view="orders"] .batch-summary {grid-column:2; grid-row:2;}
  #appView .workspace[data-view="orders"] .batch-work-area {grid-column:1 / -1; grid-row:3;}
}
@media (max-width:700px) {
  .sku-picker {max-height:calc(100dvh - 32px); width:calc(100vw - 16px);}
  .sku-picker .sku-picker-list.is-inventory-mode {grid-template-columns:repeat(2,minmax(0,1fr));}
  .sku-picker .sku-picker-tabbar {flex-wrap:wrap; gap:6px; margin:0 12px 6px; padding:0;}
  .sku-picker .sku-picker-warehouse-row {margin:4px 12px;}
  .sku-picker .sku-picker-coverage {grid-template-columns:1fr auto; margin:4px 12px; gap:4px;}
  .sku-picker .sku-picker-coverage span {grid-column:1 / -1; grid-row:2;}
  .sku-picker .sku-picker-tools {padding:6px 12px; margin:0;}
  .sku-picker .sku-picker-tools input {flex-basis:100%;}
  .sku-picker .sku-picker-list {padding:6px 12px;}
  .sku-picker .modal-head {padding:12px;}
  .sku-picker .modal-head p {font-size:12px;}
  .sku-picker-footer {padding:8px 12px;}
  .sku-picker-selection-summary {flex-basis:100%;}
  #appView .workspace[data-view="orders"] .batch-summary {font-size:12px; min-width:0;}
}
@media (prefers-reduced-motion:reduce) {
  .sku-picker *, .order-processing-dialog *, #appView .workspace[data-view="orders"] .order-card {scroll-behavior:auto!important; animation:none!important; transition:none!important;}
}
@media (min-width:1176px) {
  #appView .workspace[data-view="orders"] .batch-selection-card {grid-column:1; grid-row:2;}
  #appView .workspace[data-view="orders"] .batch-work-area {grid-column:2; grid-row:2;}
  #appView .workspace[data-view="orders"] .batch-summary {grid-column:3; grid-row:2;}
}
@media (min-width:1200px) and (max-width:1500px) {
  #appView .workspace[data-view="orders"] .order-card-grid {grid-template-columns:150px minmax(280px,1fr) 240px 140px 160px;}
  #appView .workspace[data-view="orders"] .order-card-grid > .order-actions {grid-column:auto; grid-row:auto; display:flex; flex-direction:column;}
  #appView .workspace[data-view="orders"] .order-actions .oa-primary-row {display:grid; grid-template-columns:1fr;}
  #appView .workspace[data-view="orders"] .order-actions :is(.oa-secondary-row,.oa-auxiliary-row) {grid-template-columns:1fr 1fr;}
  #appView .workspace[data-view="orders"] .order-context-cell .order-inventory-card {min-width:0;}
}

.sku-picker .inventory-card-picker-print {width:100%; min-height:28px; padding:4px 2px; border:1px solid #b2ccff; border-radius:4px; background:#f5f9ff; color:#175cd3; font-size:11px; white-space:nowrap; box-shadow:none;}
.sku-picker .inventory-card-picker-print:hover {background:#eaf2ff; transform:none;}

.sku-picker .inventory-card-picker-label-status {display:flex; flex-direction:column; gap:3px; padding-top:5px; border-top:1px solid var(--line); font-size:11px; line-height:1.45;}
.sku-picker .inventory-card-picker-label-title {color:var(--muted); font-size:10px;}
.sku-picker .inventory-card-picker-label-status > span:not(:first-child) {padding:3px 4px; border-radius:3px; overflow-wrap:anywhere;}
.sku-picker .inventory-card-picker-label-status .is-printed {color:#067647; background:#ecfdf3;}
.sku-picker .inventory-card-picker-label-status .is-partial {color:#b54708; background:#fffaeb;}
.sku-picker .inventory-card-picker-label-status .is-pending {color:#667085; background:#f2f4f7;}

.stock-transit-review-fields {display:grid; grid-template-columns:140px minmax(0,1fr); gap:8px 14px; margin-top:14px; padding-top:12px; border-top:1px solid var(--line);}
.stock-transit-review-fields label {display:flex; flex-direction:column; gap:5px; font-size:12px; color:#475467;}
.stock-transit-review-fields input, .stock-transit-review-fields textarea {width:100%; min-width:0; box-sizing:border-box; padding:8px 10px;}
.stock-transit-review-hint, .stock-transit-review-error {grid-column:1 / -1; margin:0; font-size:12px; line-height:1.5;}
.stock-transit-review-hint {color:#667085;}
.stock-transit-review-error {color:#b42318;}
.stock-card-transit-reject {min-height:30px; padding:4px 10px; white-space:nowrap;}
.stock-card-transit-dialog .stock-card-transit-approve,
.stock-card-transit-dialog .stock-card-transit-reject,
.stock-card-transit-dialog [data-transit-check-id] {min-height:38px; padding:8px 14px; font-weight:600;}
.stock-transit-feedback, .stock-transit-result {padding:10px 14px; border-radius:6px; background:#eff6ff; color:#1849a9; font-size:14px; font-weight:600; line-height:1.6; overflow-wrap:anywhere;}
.stock-transit-feedback {margin:12px 0;}
.stock-transit-result {flex-shrink:0; margin:0 20px 12px; max-height:25vh; overflow:auto;}
.stock-transit-feedback[hidden], .stock-transit-result[hidden],
.stock-card-transit-dialog button[hidden] {display:none !important;}
.stock-transit-feedback[data-phase="failed"], .stock-transit-result[data-phase="failed"] {background:#fef3f2; color:#b42318; border-left:4px solid #d92d20;}
.stock-transit-feedback[data-phase="unknown"], .stock-transit-result[data-phase="unknown"] {background:#fffaeb; color:#93370d; border-left:4px solid #dc6803;}
.stock-transit-result[data-phase="done"] {background:#ecfdf3; color:#067647; border-left:4px solid #079455;}
.stock-card-transit-dialog button[aria-busy="true"] {opacity:1; cursor:wait;}
@media(max-width:600px) {
  .stock-card-transit-dialog .inventory-history-record > header {align-items:flex-start; flex-wrap:wrap;}
  .stock-transit-review-fields {grid-template-columns:minmax(0,1fr);}
}

.sku-picker .inventory-card-picker-label-status {font-size:12px; gap:5px;}
.sku-picker .inventory-card-picker-label-row {display:flex; align-items:center; gap:8px;}
.sku-picker .inventory-card-picker-label-row > span {flex:1; min-width:0;}
.sku-picker .inventory-card-picker-group-print {flex-shrink:0; min-height:28px; padding:3px 9px; border:1px solid #b2ccff; border-radius:4px; color:#175cd3; background:#fff; font-size:12px; white-space:nowrap; box-shadow:none;}
.sku-picker .inventory-card-picker-group-print:hover {background:#eaf2ff; transform:none;}

/* Warehouse counts show physical on-hand stock separately from incoming stock. */
.sku-picker .inventory-card-picker-stock {display:flex; flex-wrap:wrap; gap:3px 12px; color:#344054; font-size:12px;}
.sku-picker .inventory-card-picker-stock > span {white-space:nowrap;}
.sku-picker .inventory-card-picker-stock strong {font-size:14px; color:#175cd3;}
.rf-stock-card__metrics > div:nth-child(-n + 2) {border-bottom:0;}

.statement-processing-button {display:block; margin-top:8px; padding:5px 10px; min-height:30px; color:#175cd3; background:#fff; border:1px solid #b2ccff; border-radius:4px;}

.inventory-card-stock-adjust {border:0; background:transparent; padding:0; min-height:24px; font:inherit; color:inherit; box-shadow:none; white-space:nowrap;}
.inventory-card-stock-adjust:hover strong {text-decoration:underline;}
.stock-card-merge-check {width:16px!important; height:16px!important; min-height:16px!important; padding:0!important; margin:4px; accent-color:#175cd3;}
.stock-ledger-merge-bar {display:flex; align-items:center; gap:10px; padding:8px 12px; background:#eff6ff; border-bottom:1px solid #b2ccff;}
.stock-ledger-merge-bar[hidden] {display:none;}

/* Stock counts can be edited from inside the higher-layer inventory picker. */
.erp-dialog-mask.stock-adjust-mask { z-index: 2700; }

.sku-picker .inventory-picker-sort {display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:0 18px 10px; color:#667085; font-size:12px;}
.sku-picker .inventory-picker-sort[hidden] {display:none;}
.sku-picker .inventory-picker-sort button {min-height:28px; padding:4px 10px; font-size:12px; box-shadow:none;}
.sku-picker .inventory-picker-sort button.is-active {color:#175cd3; border-color:#b2ccff; background:#eff6ff;}

/* Stock actions stay above their parent settings dialog and preserve its form. */
.stock-card-settings-quantities { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.stock-card-settings-quantities button { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; padding:12px 14px; text-align:left; background:#f3f6fa; border:1px solid #e5eaf1; border-radius:6px; }
.stock-card-settings-quantities span { color:#475467; font-size:13px; }
.stock-card-settings-quantities strong { color:#074bfe; font-size:23px; }
.stock-card-settings-quantities small { flex-basis:100%; color:#667085; font-size:12px; }
.stock-card-settings-mask ~ .erp-dialog-mask.stock-adjust-mask,
.stock-card-settings-mask ~ .erp-dialog-mask.stock-card-transit-mask { z-index:2800; }

/* Completed warehouse orders are muted as a whole, including text and actions. */
#appView .workspace[data-view="orders"] .order-card.packed-order-card {
  filter: grayscale(1);
  background: #e9ebee !important;
}
#appView .workspace[data-view="orders"] .order-card.packed-order-card > .order-head,
#appView .workspace[data-view="orders"] .order-card.packed-order-card > .order-card-grid > div {
  background: #e9ebee !important;
}
#appView .workspace[data-view="orders"] .order-card.packed-order-card .order-product-img {
  opacity: 1;
  filter: none;
}

/* Inbound review opens above the inventory picker and preserves its selection. */
.erp-dialog-mask.stock-card-transit-mask { z-index: 2800; }

/* Fit the processing station to its parcel contents, without an outer white frame. */
#appView .workspace[data-view="orders"] .order-actions .open-order-processing-link {
  width:100%; grid-column:1 / -1; min-height:40px; margin-top:0;
}
#orderProcessingModal .order-processing-dialog {
  position:relative; height:auto; max-height:92dvh; padding:0; border:0;
  background:transparent; box-shadow:none; overflow:visible;
}
#orderProcessingModal .order-processing-body {
  flex:0 1 auto; padding:0; max-height:92dvh; overflow:auto; scrollbar-gutter:auto;
  border-radius:6px;
}
#orderProcessingModal .order-processing-title {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
#orderProcessingModal .order-processing-close {
  position:absolute; top:5px; right:8px; z-index:2; min-height:28px;
  padding:3px 8px; border:0; background:transparent; box-shadow:none; color:#475467;
}
#orderProcessingModal .scan-workflow-notice {margin:0; padding-right:64px; min-height:38px;}
#orderProcessingModal .order-card {margin:0;}
/* Standalone sorting-card workbench. */
.print-card-templates { border:0; padding:0; margin:24px auto 0; max-width:1160px; min-width:0; }
.print-card-templates > legend { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.print-card-template-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.print-card-template-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; }
.print-card-template { display:flex; align-items:stretch; min-width:0; background:white; border-radius:8px; box-shadow:0 2px 8px #21324c0b; }
.print-card-template.selected { background:#edf3ff; box-shadow:0 0 0 1px #abc4ff; }
.print-card-template-use { flex:1; min-width:0; padding:14px; border:0; background:transparent; text-align:left; color:#182238; border-radius:8px; }
.print-card-template-use strong, .print-card-template-use span, .print-card-template-use small { display:block; overflow-wrap:anywhere; }
.print-card-template-use strong { font-size:14px; margin-bottom:6px; }
.print-card-template-use span { color:#65738b; font-size:12px; line-height:1.6; }
.print-card-template-use small { color:#7b879b; font-size:11px; margin-top:8px; }
.print-card-template-print { align-self:center; min-height:40px; padding:8px 12px; margin-right:10px; border:0; border-radius:6px; background:#edf3ff; color:#074bfe; white-space:nowrap; }
.print-card-template-controls { display:flex; flex-direction:column; align-items:center; align-self:center; gap:2px; margin-right:10px; }
.print-card-template-controls .print-card-template-print { margin-right:0; }
.print-card-template-delete { min-height:32px; padding:4px 12px; font-size:12px; color:#65738b; }
.print-card-template-head [hidden] { display:none; }
.print-card-template-use:hover, .print-card-template-print:hover { background:#e7efff; }
.print-card-template-use:focus-visible, .print-card-template-print:focus-visible { outline:2px solid #074bfe; outline-offset:2px; }
.print-card-template-status { min-height:20px; margin-top:12px; color:#65738b; font-size:12px; line-height:1.6; }
.print-card-template-status.error { color:#be3737; }
.print-card-save-template { margin:0 0 26px; }
.print-card-save-template label { display:block; margin-bottom:8px; font-size:13px; color:#65738b; }
.print-card-save-template input { width:100%; min-width:0; height:40px; }
.print-card-template-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.print-card-template-actions button { min-height:36px; font-size:12px; }
.print-card-template-actions [hidden] { display:none; }
.print-card-workbench { display:grid; grid-template-columns:minmax(280px,360px) minmax(0,1fr); gap:32px; max-width:1160px; margin:24px auto; align-items:start; }
.print-card-editor > legend { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.print-card-editor { border:0; padding:0; margin:0; min-width:0; }
.print-card-section-title { font-size:14px; font-weight:650; margin:0 0 12px; }
.print-card-options { display:flex; gap:8px; }
.print-card-options button { flex:1; min-height:40px; border:1px solid #dae1ed; border-radius:6px; background:#fff; color:#46536c; }
.print-card-options button.selected { color:#074bfe; border-color:#074bfe; background:#edf3ff; }
.print-card-fields { display:grid; gap:10px; margin-top:24px; }
.print-card-line { display:grid; grid-template-columns:50px minmax(0,1fr); gap:10px; align-items:center; font-size:13px; color:#65738b; }
.print-card-line input { width:100%; min-width:0; height:46px; font-size:17px; color:#182238; }
.print-card-help { font-size:12px; line-height:1.7; color:#7b879b; margin:12px 0 28px; }
.print-card-custom { display:flex; align-items:center; gap:10px; margin:14px 0 22px; font-size:13px; color:#65738b; }
.print-card-custom input { width:100px; height:40px; }
.print-card-custom span { font-size:12px; color:#98a2b3; }
.print-card-confirm, .print-card-clear { width:100%; min-height:46px; }
.print-card-clear { margin-top:10px; }
.print-card-preview { min-width:0; text-align:center; }
.print-card-preview-head { display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left; padding:0 0 16px; font-size:14px; }
.print-card-preview-head span { color:#7b879b; font-size:12px; }
.print-card-paper-stage { min-height:420px; padding:28px; background:#eef1f6; border-radius:8px; display:flex; align-items:center; justify-content:center; }
.print-card-paper-stage img { display:block; max-width:100%; max-height:510px; width:auto; height:auto; box-shadow:0 3px 16px #21324c18; background:white; }
.print-card-paper-stage [hidden] { display:none; }
#printCardBlank { color:#8994a7; padding:80px 20px; }
.print-card-status { min-height:22px; font-size:13px; color:#65738b; margin-top:14px; }
.print-card-status.error { color:#be3737; }
@media(max-width:800px) { .print-card-workbench { grid-template-columns:1fr; margin:16px 0; gap:24px; } .print-card-paper-stage { min-height:250px; padding:20px; } .print-card-preview-head { flex-wrap:wrap; } }

.statement-cargo { min-width: 190px; max-width: 280px; }
.statement-cargo-number { font-family: monospace; white-space: nowrap; user-select: text; line-height: 1.5; }
.statement-cargo button { margin-top: 6px; }

/* Order mapping: image-based inventory card selection. */
.existing-card-trigger,.existing-card-option {display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:12px;border:1px solid #dce2ea;border-radius:8px;background:#fff;color:#253347;cursor:pointer;min-width:0;}
.existing-card-trigger {justify-content:space-between;}
.existing-card-trigger:hover,.existing-card-option:hover,.existing-card-option[aria-pressed="true"] {border-color:#1765ef;background:#f5f8ff;}
.existing-card-trigger:focus-visible,.existing-card-option:focus-visible {outline:2px solid #1765ef;outline-offset:2px;}
.existing-card-image {display:flex;align-items:center;justify-content:center;flex:0 0 80px;width:80px;height:80px;background:#f5f6f8;border-radius:5px;font-size:12px;color:#737d8c;}
.existing-card-image img {width:100%;height:100%;object-fit:contain;}
.existing-card-info {display:flex;flex:1;flex-direction:column;gap:6px;min-width:0;font-size:12px;color:#68758a;overflow-wrap:anywhere;}
.existing-card-info strong {font-size:14px;color:#253347;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.existing-card-picker.erp-dialog-card {width:min(1000px,calc(100vw - 32px));max-width:1000px;}
.existing-card-filters {display:grid;grid-template-columns:2fr 1fr 2fr;gap:16px;}
.existing-card-filters label {display:flex;flex-direction:column;gap:6px;min-width:0;}
.existing-card-filters input,.existing-card-filters select {width:100%;min-width:0;}
.existing-card-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.existing-card-selected {font-size:12px;color:#1765ef;}
@media(max-width:640px) {.existing-card-grid,.existing-card-filters {grid-template-columns:1fr;}.existing-card-picker .erp-dialog-actions {flex-wrap:wrap;}.existing-card-image {flex-basis:64px;width:64px;height:64px;}}

/* Keep shelf groups one click away directly below the warehouse row. */
.sku-picker-shelf-group-row[hidden] { display:none; }
.sku-picker .sku-picker-shelf-group-row { flex-direction:row; align-items:center; }
.sku-picker-shelf-group-row .sku-picker-warehouse-options { flex-wrap:nowrap; }

/* Inventory image changes stay in a draft until the user saves. */
.stock-card-image-dropzone { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 14px; text-align: center; background: #f8fafc; }
.stock-card-image-dropzone.is-dragover, .stock-card-image-dropzone:focus-visible { border-color: #175cd3; outline: 2px solid #dbeafe; background: #eff6ff; }
.stock-card-image-previews { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.stock-card-image-preview { position: relative; max-width: 100%; }
.stock-card-image-preview img { display: block; max-width: 100%; max-height: 300px; object-fit: contain; border-radius: 6px; }
.stock-card-image-preview .stock-card-image-remove { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; min-height: 28px; padding: 0; border-radius: 50%; background: #fff; border: 1px solid #d0d5dd; color: #b42318; font-size: 22px; line-height: 1; box-shadow: 0 1px 4px #0002; }
.stock-card-image-picker { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.stock-card-image-picker input { max-width: 100%; }

/* Inbound evidence remains visible while the related package is processed. */
.scan-inbound-workspace { display:grid; grid-template-columns:minmax(260px, 340px) minmax(0, 1fr); gap:16px; width:100%; align-items:start; text-align:left; }
.scan-inbound-workspace > *, .scan-inbound-workspace__desk { min-width:0; }
.scan-inbound-workspace .scan-inbound-list { display:grid; grid-template-columns:minmax(0,1fr); }
.scan-inbound-workspace .scan-inbound-card { min-width:0; overflow-wrap:anywhere; }
.scan-inbound-order-picker { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.scan-inbound-order-picker button { white-space:normal; text-align:left; overflow-wrap:anywhere; }
.scan-inbound-order-picker button[aria-pressed="true"] { border-color:var(--primary); color:var(--primary); }
@media (max-width:1000px) { .scan-inbound-workspace { grid-template-columns:minmax(0,1fr); } }
/* Scan desk: incoming parcel, product verification, then warehouse actions. */
#appView .workspace[data-view="scanDesk"] .scan-result:not(.muted) { background:#f5f7fa; border:1px solid #e4e7ec; border-radius:10px; padding:16px; }
.scan-inbound-workspace { grid-template-columns:300px minmax(0,1fr); gap:20px; }
.scan-inbound-workspace__desk > .scan-result-head { margin:0 0 12px; }
.scan-inbound-order-picker { margin:0 0 12px; }
.scan-inbound-list > p { margin:0 0 6px; font-size:13px; line-height:1.6; color:#475467; }
.inbound-review-shelf { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin-top:10px; padding:10px 12px; background:#eef4ff; border-radius:6px; }
.inbound-review-shelf > span { color:#475467; font-size:12px; }
.inbound-review-shelf > strong { color:#1849a9; font-size:20px; line-height:1.3; overflow-wrap:anywhere; }
.inbound-review-shelf > small { flex-basis:100%; color:#475467; }
.scan-inbound-card__product { display:flex; flex-wrap:wrap; }
.scan-inbound-card__product > .product-cell { width:100%; }
.scan-inbound-card__qty { margin-left:auto; }
#appView .scan-desk-order { border:1px solid #dce3ec; border-radius:10px; overflow:hidden; min-width:0; margin:0; box-shadow:none; cursor:default; background:#fff; }
.scan-desk-order__header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:18px 20px; border-bottom:1px solid #e4e7ec; background:#fff; }
.scan-desk-eyebrow { display:block; color:#667085; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.scan-desk-order__header h3 { margin:3px 0 6px; color:#101828; font-size:20px; line-height:1.4; overflow-wrap:anywhere; }
.scan-desk-order__header p { margin:0; color:#475467; font-size:13px; line-height:1.6; }
.scan-desk-order__layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; }
.scan-desk-order__products { min-width:0; padding:18px 20px; }
.scan-desk-section-title { display:flex; gap:12px; justify-content:space-between; align-items:center; margin-bottom:4px; }
.scan-desk-section-title h3 { margin:0; font-size:15px; }
.scan-desk-section-title > span { font-size:12px; color:#667085; }
.scan-desk-product { display:grid; grid-template-columns:88px minmax(140px,1fr) minmax(190px,.85fr); gap:16px; padding:20px 0; border-bottom:1px solid #eaecf0; align-items:start; }
.scan-desk-product__image button { padding:0; border:0; background:transparent; width:88px; }
#appView .scan-desk-product__image img { width:88px; height:112px; object-fit:contain; border-radius:6px; }
.scan-desk-product__info, .scan-desk-product__card { min-width:0; }
.scan-desk-product__info h4 { margin:5px 0 14px; color:#101828; font-size:14px; line-height:1.6; font-weight:600; overflow-wrap:anywhere; }
.scan-desk-quantity { display:flex; flex-wrap:wrap; gap:8px 16px; font-size:12px; color:#667085; }
.scan-desk-quantity b { color:#344054; font-size:14px; }
.scan-desk-quantity > strong { flex-basis:100%; font-size:17px; color:#1849a9; }
#appView .scan-desk-product__card .order-inventory-card { margin:6px 0 0; padding:10px; border:1px solid #dbe5f5; border-radius:8px; background:#f8faff; min-width:0; width:100%; box-sizing:border-box; }
#appView .scan-desk-product__card .order-inventory-card__item { display:grid; grid-template-columns:56px minmax(0,1fr); gap:10px; padding:0; }
#appView .scan-desk-product__card .order-inventory-card__media { width:56px; min-width:0; }
#appView .scan-desk-product__card .order-inventory-card__media img { width:56px; height:64px; object-fit:contain; }
#appView .scan-desk-product__card .order-inventory-card__body { min-width:0; }
#appView .scan-desk-product__card .order-inventory-card__name { font-size:12px; line-height:1.5; white-space:normal; text-align:left; overflow-wrap:anywhere; }
#appView .scan-desk-product__card .order-inventory-card__shelf { margin:5px 0; font-size:22px; font-weight:700; color:#1849a9; white-space:normal; height:auto; overflow-wrap:anywhere; }
#appView .scan-desk-product__card .order-inventory-card__stock { font-size:10px; line-height:1.5; }
.scan-desk-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.scan-desk-order__operations { padding:18px 16px; background:#fafbfc; border-left:1px solid #e4e7ec; min-width:0; }
#appView .scan-desk-order .order-actions { display:block; padding:0; border:0; background:transparent; }
#appView .scan-desk-order .order-action-heading { display:flex; flex-direction:column; align-items:flex-start; gap:5px; margin-bottom:12px; }
#appView .scan-desk-order .order-actions .oa-primary-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#appView .scan-desk-order .order-actions button { min-width:0; width:100%; height:auto; min-height:44px; padding:8px; white-space:normal; line-height:1.4; }
#appView .scan-desk-order .order-actions .oa-primary { grid-column:1 / -1; }
#appView .scan-desk-order .order-action-section { margin-top:12px; border-top:1px solid #e4e7ec; padding-top:10px; }
#appView .scan-desk-order .order-action-section summary, .scan-desk-order__details summary { cursor:pointer; color:#475467; font-size:13px; padding:4px 0; }
#appView .scan-desk-order .order-actions :is(.oa-secondary-row,.oa-auxiliary-row) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:8px; }
#appView .scan-desk-order .order-proof-cell { display:flex; flex-direction:column; gap:8px; padding:14px 0; margin-top:16px; border:0; border-top:1px solid #e4e7ec; background:transparent; }
#appView .scan-desk-order .order-context-cell { padding:10px 0; border:0; }
#appView .scan-desk-order .open-order-processing-link { display:none; }
#appView .scan-desk-order .order-inventory-card-column { display:none; }
@media (max-width:1500px) {
 .scan-desk-order__layout { grid-template-columns:minmax(0,1fr) 225px; }
 .scan-desk-product { grid-template-columns:72px minmax(0,1fr); gap:12px; }
 .scan-desk-product__card { grid-column:2; }
}
@media (max-width:1100px) {
 .scan-inbound-workspace { grid-template-columns:minmax(0,1fr); }
 .scan-desk-order__layout { grid-template-columns:minmax(0,1fr) 240px; }
}
@media (max-width:720px) {
 .scan-desk-order__layout { display:flex; flex-direction:column; }
 .scan-desk-order__operations { border-left:0; border-top:1px solid #e4e7ec; }
 .scan-desk-order__header, .scan-desk-order__products { padding:14px; }
 .scan-desk-product__card { grid-column:1 / -1; }
}

#appView .scan-desk-product__card .order-inventory-card__media { display:contents; }
#appView .scan-desk-product__card .order-inventory-card__media > button,
#appView .scan-desk-product__card .order-inventory-card__empty { grid-column:1; grid-row:1; width:56px; min-width:0; }
#appView .scan-desk-product__card .order-inventory-card__body { grid-column:2; grid-row:1; }
#appView .scan-desk-product__card .order-inventory-card__stock { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; font-size:12px; }
#appView .scan-desk-product__card .order-inventory-card__stock em { font-size:11px; }
#appView .workspace[data-view="scanDesk"] #scanResult > .scan-result-head,
#appView .workspace[data-view="scanDesk"] #scanResult > .scan-order-cards { flex:0 0 100%; width:100%; max-width:none; min-width:0; }
#appView .scan-desk-order { width:100%; box-sizing:border-box; }
#appView .scan-desk-product__card .order-inventory-card__media > button { height:64px; min-height:0; align-self:start; padding:0; }

.inbound-review-shelf__edit { padding:0; border:0; background:transparent; color:#1849a9; font-size:20px; font-weight:700; line-height:1.4; text-align:left; white-space:normal; overflow-wrap:anywhere; cursor:pointer; }
.inbound-review-shelf__edit:hover { text-decoration:underline; }
.scan-card-tools { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.inbound-review-shelf > .scan-card-tools { flex-basis:100%; }
#appView .scan-card-tools button { padding:6px 9px; min-height:32px; font-size:12px; white-space:normal; }

/* Scan results share order-center rows; adapt to the actual content width. */
#appView .workspace[data-view="scanDesk"] #scanResult { display:block; min-width:0; text-align:left; }
#appView .workspace[data-view="scanDesk"] .scan-inbound-workspace { display:flex; flex-direction:column; gap:16px; }
#scanInboundRequests, .scan-inbound-workspace__desk, #scanInboundOrders { width:100%; min-width:0; }
#scanInboundRequests .scan-inbound-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); }
#appView .workspace[data-view="scanDesk"] .scan-order-cards { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; width:100%; container-type:inline-size; container-name:scan-orders; }
#appView .workspace[data-view="scanDesk"] .order-card { width:100%; min-width:0; box-sizing:border-box; }
.scan-batch-toolbar { display:grid; gap:10px; padding:14px; margin-bottom:12px; background:#fff; border:1px solid #e4e7ec; border-radius:8px; }
.scan-batch-selection, .scan-batch-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; min-width:0; }
.scan-batch-toolbar small { color:#667085; }
.scan-batch-toolbar button { white-space:normal; height:auto; min-height:36px; }
#appView .workspace[data-view="scanDesk"] .order-card-grid { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.8fr) minmax(0,1.1fr) minmax(0,.8fr) minmax(0,1fr); }
#appView .workspace[data-view="scanDesk"] .order-card-grid > div { grid-column:auto; min-width:0; padding:12px; border-right:1px solid #eaecf0; overflow-wrap:anywhere; }
#appView .workspace[data-view="scanDesk"] .order-head { flex-wrap:wrap; gap:8px; }
#appView .workspace[data-view="scanDesk"] .order-head-main { min-width:0; flex-wrap:wrap; overflow-wrap:anywhere; }
#appView .workspace[data-view="scanDesk"] .order-head-merge { min-width:0; overflow-wrap:anywhere; }
#appView .workspace[data-view="scanDesk"] .order-product-line { display:grid; grid-template-columns:100px minmax(0,1fr); min-width:0; }
#appView .workspace[data-view="scanDesk"] .order-product-line-body { min-width:0; }
#appView .workspace[data-view="scanDesk"] .order-product-line-img { width:100%; min-width:0; }
#appView .workspace[data-view="scanDesk"] .order-product-img--multi { width:100%; max-width:100px; height:134px; object-fit:contain; }
#appView .workspace[data-view="scanDesk"] .order-actions :is(.oa-primary-row,.oa-secondary-row,.oa-auxiliary-row) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
#appView .workspace[data-view="scanDesk"] .order-actions button { min-width:0; height:auto; min-height:36px; white-space:normal; }
#appView .workspace[data-view="scanDesk"] .order-proof-cell { display:flex; flex-direction:column; }
#appView .workspace[data-view="scanDesk"] .open-order-processing-link { display:none; }
@container scan-orders (max-width:1400px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-columns:minmax(0,.8fr) minmax(0,1.8fr) minmax(0,1.2fr); }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-proof-cell { grid-column:1; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-actions { grid-column:2 / -1; border-top:1px solid #eaecf0; }
 #appView .workspace[data-view="scanDesk"] .order-actions .oa-primary-row { grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); }
}
@container scan-orders (max-width:850px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-products-cell { grid-column:1 / -1; grid-row:1; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-proof-cell { grid-column:1; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-actions { grid-column:2; }
 #appView .workspace[data-view="scanDesk"] .order-actions .oa-primary-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container scan-orders (max-width:520px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { display:flex; flex-direction:column; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > div { border-right:0; border-bottom:1px solid #eaecf0; }
 #appView .workspace[data-view="scanDesk"] .order-product-line { grid-template-columns:80px minmax(0,1fr); }
}

/* In-dialog print feedback stays on the clicked button for the whole request. */
.sku-picker .picker-print-action.is-running { display:inline-flex; align-items:center; gap:6px; opacity:1; cursor:wait; color:#175cd3; background:#eff6ff; }
.sku-picker .picker-print-action.is-running::before { content:""; width:12px; height:12px; border:2px solid #b2ccff; border-top-color:#175cd3; border-radius:50%; animation:picker-print-spin .75s linear infinite; }
.sku-picker .sku-card .inventory-card-picker-label-row { display:flex; flex-wrap:wrap; gap:6px; }
.sku-picker .sku-card .inventory-card-picker-label-row > span { flex:1 1 110px; min-width:0; overflow-wrap:anywhere; }
@keyframes picker-print-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .sku-picker .picker-print-action.is-running::before { animation:none; } }

/* Scan desk: readable hierarchy and a stable action area for repeated parcels. */
#appView .workspace[data-view="scanDesk"] .scan-desk-panel > .panel-head { padding:12px 16px; }
#appView .workspace[data-view="scanDesk"] .scan-layout { padding:14px 16px; }
#appView .workspace[data-view="scanDesk"] .scanner-hint { padding:8px 12px; margin-bottom:8px; }
#appView .workspace[data-view="scanDesk"] .scan-input { height:48px; font-size:22px; font-weight:600; letter-spacing:.6px; font-variant-numeric:tabular-nums; }
.scan-query-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:8px 0 12px; }
#appView .workspace[data-view="scanDesk"] .scan-tally { padding:6px 10px; margin-bottom:8px; font-size:12px; }
#appView .workspace[data-view="scanDesk"] .scan-tally strong { font-size:14px; }
#appView .workspace[data-view="scanDesk"] .scan-batch-actions { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
#appView .workspace[data-view="scanDesk"] .scan-batch-actions button { display:grid; grid-template-columns:24px minmax(0,1fr); gap:3px 8px; align-items:center; text-align:left; min-height:60px; padding:10px; color:#344054; background:#fff; border:1px solid #d0d5dd; box-shadow:none; }
.scan-step-number { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:#f2f4f7; color:#475467; grid-row:1 / 3; }
#scanBatchNext { margin-left:auto; font-size:12px; color:#667085; }
#appView .workspace[data-view="scanDesk"] .scan-batch-actions button.is-next { background:#175cd3; border-color:#175cd3; color:#fff; }
#appView .workspace[data-view="scanDesk"] .scan-batch-actions button.is-next small { color:#eff8ff; }
#appView .workspace[data-view="scanDesk"] .scan-batch-actions button.is-done { background:#ecfdf3; border-color:#abefc6; color:#067647; }
#appView .workspace[data-view="scanDesk"] .order-actions { background:#fafbfc; }
#appView .workspace[data-view="scanDesk"] .order-action-heading { display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding-bottom:10px; }
#appView .workspace[data-view="scanDesk"] .order-actions .oa-primary-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#appView .workspace[data-view="scanDesk"] .order-actions button { min-height:42px; padding:8px 10px; line-height:1.4; border-radius:7px; }
#appView .workspace[data-view="scanDesk"] .order-actions .oa-workflow-action.is-next { grid-column:1 / -1; background:#175cd3; border-color:#175cd3; color:#fff; min-height:48px; font-weight:700; box-shadow:none; }
#appView .workspace[data-view="scanDesk"] .order-actions .oa-workflow-action.is-done { background:#ecfdf3; border-color:#abefc6; color:#067647; }
#appView .workspace[data-view="scanDesk"] .order-actions .oa-workflow-action.is-pending { background:white; border-color:#d0d5dd; color:#344054; }
#appView .workspace[data-view="scanDesk"] .order-action-section { border-top:1px solid #eaecf0; margin-top:12px; padding-top:8px; }
#appView .workspace[data-view="scanDesk"] .order-actions button:focus-visible { outline:3px solid #84adff; outline-offset:2px; }
@media(max-width:1100px) { #appView .workspace[data-view="scanDesk"] .scan-batch-actions { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) { #appView .workspace[data-view="scanDesk"] .scan-batch-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } #scanBatchNext { margin-left:0; } }
@container scan-orders (min-width:851px) and (max-width:1400px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-columns:minmax(160px,.8fr) minmax(0,1.9fr) minmax(220px,1fr); }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .sign-cell { grid-column:1; grid-row:1; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-products-cell { grid-column:2; grid-row:1; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-context-cell { grid-column:1; grid-row:2; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-proof-cell { grid-column:2; grid-row:2; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-actions { grid-column:3; grid-row:1 / 3; border-top:0; }
}

/* Compact scan desk: reserve vertical space for parcel operations. */
#appView .workspace[data-view="scanDesk"] .page-desc:empty { display:none; }
#appView .workspace[data-view="scanDesk"] .scan-batch-toolbar { padding:10px; gap:8px; margin-bottom:8px; }
#appView .workspace[data-view="scanDesk"] .scan-batch-actions button { min-height:42px; gap:8px; padding:8px 10px; }
#appView .workspace[data-view="scanDesk"] .scan-step-number { grid-row:auto; }
#appView .workspace[data-view="scanDesk"] .order-card.scanned-order-card::before,
#appView .workspace[data-view="scanDesk"] .order-card.scanned-order-card::after { display:none; }

/* Scan desk stock card: image left, shelf/code and quantities right. */
#appView .workspace[data-view="scanDesk"] .scan-stock-card { display:grid; grid-template-columns:minmax(0, 42%) minmax(0, 1fr); gap:8px 10px; padding:6px 0; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__media { min-width:0; grid-column:1; grid-row:1; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__media > button { display:block; width:100%; height:160px; min-height:0; padding:4px; background:#fff; border:1px solid #d0d5dd; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__media img { display:block; width:100%; height:100%; object-fit:contain; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__facts { display:flex; flex-direction:column; align-items:stretch; gap:10px; min-width:0; overflow-wrap:anywhere; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__shelf { padding:0; min-height:0; height:auto; border:0; background:transparent; color:#e87508; font-size:17px; font-weight:700; line-height:1.4; text-align:left; white-space:normal; overflow-wrap:anywhere; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__quantity { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 6px; font-size:13px; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__quantity > span { color:#667085; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__name { grid-column:1 / -1; min-width:0; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__name > button { display:block; width:100%; height:auto; padding:0; border:0; background:transparent; color:var(--primary); text-align:left; white-space:normal; overflow-wrap:anywhere; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__actions { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__actions > button { min-width:0; min-height:32px; height:auto; padding:6px 2px; font-size:12px; white-space:nowrap; }

/* Keep inbound requests beside the processing list, never beside their summary. */
#appView .workspace[data-view="scanDesk"] .scan-inbound-workspace { display:grid; grid-template-columns:280px minmax(0,1fr); gap:12px; align-items:start; }
#appView .workspace[data-view="scanDesk"] #scanInboundRequests .scan-inbound-list { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; margin-top:0; }
#appView .workspace[data-view="scanDesk"] #scanInboundRequests .scan-inbound-list:empty { display:none; }
#appView .workspace[data-view="scanDesk"] #scanInboundRequests .scan-inbound-list > p { grid-column:1 / -1; margin:0; font-size:12px; line-height:1.5; }
#appView .workspace[data-view="scanDesk"] #scanInboundRequests .scan-inbound-card { padding:10px; gap:8px; }
#appView .workspace[data-view="scanDesk"] #scanInboundRequests .scan-inbound-card__product { gap:8px; }
#appView .workspace[data-view="scanDesk"] #scanInboundRequests .inbound-review-shelf { padding:8px; gap:4px 6px; margin-top:6px; }
#appView .workspace[data-view="scanDesk"] #scanInboundRequests .scan-inbound-card__head { gap:6px; }
#appView .workspace[data-view="scanDesk"] #scanInboundRequests .scan-inbound-card__head small { overflow-wrap:anywhere; }
#appView .workspace[data-view="scanDesk"] .scan-inbound-workspace__desk > .scan-result-head { margin:0 0 8px; }
@media (max-width:1100px) {
 #appView .workspace[data-view="scanDesk"] .scan-inbound-workspace { grid-template-columns:240px minmax(0,1fr); }
}
@media (max-width:800px) {
 #appView .workspace[data-view="scanDesk"] .scan-inbound-workspace { grid-template-columns:minmax(0,1fr); }
}

/* Compact order-center controls and a consistent left identity column. */
#appView .workspace[data-view="orders"] #pageDesc:empty { display:none; }
#appView .workspace[data-view="orders"] .page-header-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-left:auto; overflow:visible; }
#appView .workspace[data-view="orders"] .page-header-actions .order-global-actions { display:flex; flex-wrap:wrap; gap:6px; margin:0; }
#appView .workspace[data-view="orders"] .page-header-actions button { width:auto; min-height:32px; padding:6px 9px; font-size:12px; white-space:nowrap; }
#appView .workspace[data-view="orders"] .order-filter-primary > label { font-size:0; gap:0; }
#appView .workspace[data-view="orders"] .order-filter-primary :is(input,select) { font-size:13px; margin-top:0; }
#appView .workspace[data-view="orders"] .order-filter-panel { padding:8px 12px; margin-bottom:8px; }
#appView .workspace[data-view="orders"] .order-status-group-label { display:none; }
#appView .workspace[data-view="orders"] .order-status-group { padding-top:0; gap:0; }
#appView .workspace[data-view="orders"] .order-list-tabs { padding-top:4px; padding-bottom:4px; }
#appView .workspace[data-view="orders"] .sign-cell { display:flex; flex-direction:column; align-items:stretch; gap:10px; padding:14px 12px; text-align:left; }
#appView .workspace[data-view="orders"] .sign-cell .tracking-label,
#appView .workspace[data-view="orders"] .sign-cell .shipment-recipient > span,
#appView .workspace[data-view="orders"] .sign-cell .shipment-meta { display:none; }
#appView .workspace[data-view="orders"] .sign-cell .domestic-tracking-line { display:flex; align-items:center; justify-content:space-between; gap:6px; margin:0; }
#appView .workspace[data-view="orders"] .sign-cell .domestic-tracking-number { min-width:0; padding:0; text-align:left; font-size:14px; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#appView .workspace[data-view="orders"] .sign-cell .shipment-recipient { margin:6px 0 0; justify-content:flex-start; }
#appView .workspace[data-view="orders"] .sign-cell .shipment-recipient button { padding:0; text-align:left; font-size:12px; font-weight:500; color:#667085; font-variant-numeric:tabular-nums; }
#appView .workspace[data-view="orders"] .sign-cell .ozon-order-number { width:100%; padding:9px 0 0; border-top:1px solid #eaecf0; border-radius:0; text-align:left; font-size:14px; font-weight:600; color:#344054; font-variant-numeric:tabular-nums; }
#appView .workspace[data-view="orders"] .sign-cell > .subline { margin:0; font-size:12px; color:#667085; line-height:1.5; }
#appView .workspace[data-view="orders"] .sign-cell .delivery-weight-range { margin:0; font-size:12px; font-weight:500; color:#667085; }
#appView .workspace[data-view="orders"] .sign-cell .create-inventory-card-link { display:block; width:100%; min-height:32px; margin:0; padding:6px 8px; border:1px solid #d0d5dd; border-radius:6px; background:#fff; color:#344054; text-align:center; font-size:12px; font-weight:500; text-decoration:none; }
#appView .workspace[data-view="orders"] .sign-cell .create-inventory-card-link:hover { background:#eff6ff; border-color:#84adff; color:#175cd3; }

#appView .workspace[data-view="orders"] .sign-cell .stock-shipment-line > strong { display:none; }

#appView .workspace[data-view="orders"] .topbar { flex-wrap:wrap; }
#appView .workspace[data-view="orders"] .order-filter-primary { padding:4px 0; }
#appView .workspace[data-view="orders"] .sign-cell .shipment-recipient { display:flex; }
#appView .workspace[data-view="orders"] .sign-cell .shipment-recipient button { width:100%; white-space:normal; }
#appView .workspace[data-view="orders"] .sign-cell .domestic-tracking-number { white-space:normal; word-break:break-all; }
#appView .workspace[data-view="orders"] .sign-cell .order-card-express-track { position:static; flex:0 0 auto; width:auto; }

/* Refresh stays with the sticky order status controls. */
#appView .workspace[data-view="orders"] .order-status-refresh-row { display:flex; align-items:center; gap:8px; background:#fff; min-width:0; }
#appView .workspace[data-view="orders"] .order-status-refresh-row > .order-list-tabs { flex:1; min-width:0; }
#appView .workspace[data-view="orders"] .order-status-refresh-row > .page-refresh-button { flex:0 0 auto; margin:4px 8px 4px 0; min-height:32px; padding:6px 10px; white-space:nowrap; }

#appView .shipment-rate-edit { border:0; border-bottom:1px dashed #84adff; border-radius:0; background:transparent; padding:0 3px; min-height:0; height:auto; cursor:pointer; color:#175cd3; line-height:1.3; }
#appView .shipment-rate-edit:hover { background:#eff6ff; }

/* Compact inventory quantities: reservation is a separate, aligned metric. */
#appView .scan-stock-card__reserved b, #appView .inventory-reserved-value, .inventory-reserved-metric strong { color:#b54708; font-variant-numeric:tabular-nums; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__facts { gap:7px; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__quantity { display:grid; grid-template-columns:64px minmax(0,1fr); gap:6px; }
#appView .rf-stock-card__metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
#appView .rf-stock-card__metrics > div { border-bottom:0; border-right:1px solid #e4e7ec; }
#appView .rf-stock-card__metrics > div:last-child { border-right:0; }
.inventory-reserved-metric { display:flex; flex-direction:column; justify-content:center; gap:4px; }
.stock-card-settings-quantities { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.stock-card-settings-quantities > .inventory-reserved-metric { padding:12px 14px; border:1px solid #f2e0c5; border-radius:6px; background:#fffaeb; }
#appView .inventory-history-product__metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
#appView .order-inventory-card__stock em { display:block; font-style:normal; }

#appView .rootflow-product-details .shipment-rate-edit { width:auto; min-width:28px; display:inline-flex; flex:0 0 auto; justify-content:center; }

#appView .rf-stock-card__metrics > .inventory-reserved-metric strong, #appView .scan-stock-card__reserved b { color:#b54708; }

.inbound-kind-tabs { display:flex; gap:8px; padding:8px 0; border-bottom:1px solid #eaecf0; }
.inbound-kind-tabs button { padding:7px 14px; border:0; background:transparent; color:#475467; }
.inbound-kind-tabs button.active { background:#eff6ff; color:#175cd3; }
#appView .inbound-review-status-row { display:flex; flex-wrap:nowrap; gap:8px; overflow-x:auto; margin:10px 0; padding:0; }
#appView .inbound-review-status-row .inbound-review-stat { display:flex; flex:0 0 auto; align-items:center; gap:8px; min-height:36px; padding:7px 12px; border-radius:6px; }
#appView .inbound-review-status-row .inbound-review-stat strong { font-size:15px; margin:0; }
#appView .inbound-review-status-row .inbound-review-stat span { margin:0; white-space:nowrap; }
/* 入库审核：申请、仓库、商品、库存卡各自独立，数量随商品展示。 */
#appView .inbound-review-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.inbound-review-table { width:100%; table-layout:fixed; min-width:1080px; }
.inbound-review-table th:nth-child(1) { width:24%; }
.inbound-review-table th:nth-child(2) { width:15%; }
.inbound-review-table th:nth-child(3) { width:26%; }
.inbound-review-table th:nth-child(4) { width:19%; }
.inbound-review-table th:nth-child(5) { width:6%; }
.inbound-review-table th:nth-child(6) { width:10%; }
.inbound-review-table td { vertical-align:top; padding:16px 12px; overflow-wrap:anywhere; }
.inbound-review-table .product-cell > div { min-width:0; }
.inbound-review-table .inbound-review-shelf { margin:0; padding:0; background:transparent; }
.inbound-review-table .inbound-review-shelf__edit { font-size:16px; }
.inbound-review-table .stock-actions { flex-direction:column; align-items:flex-start; gap:8px; }
.inbound-review-quantities { display:flex; flex-wrap:wrap; gap:6px 18px; margin-top:10px; color:#475467; }
.inbound-review-quantities strong { color:#101828; }
.inbound-review-toolbar .compact-filter { white-space:nowrap; }
@media(max-width:900px) { #appView .inbound-review-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Order center: one shared, responsive work surface for list and processing dialogs. */
.visually-hidden { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise {
  container: enterprise-order / inline-size;
  border:1px solid #e4e7ec; border-radius:5px; background:#fff; box-shadow:none; min-width:0;
}
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-head {
  display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; padding:6px 12px;
  min-height:36px; background:#fafbfc; border-bottom:1px solid #e9ecf0;
}
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-head-main { flex:1; min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-head-main > strong { font-size:13px; font-weight:650; color:#1d2939; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-head-main > span { color:#667085; font-size:12px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-head-break { display:none; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-head-service,
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-wh { min-height:0; padding:2px 6px; border:0; border-radius:3px; background:#f0f2f5; color:#475467; font-size:11px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-head-service.is-missing { color:#b54708; background:#fffaeb; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-head-download { min-height:26px; padding:2px 6px; border:0; background:transparent; color:#175cd3; font-size:12px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-customer-balance { display:inline-flex; gap:5px; align-items:baseline; padding-left:10px; border-left:1px solid #d0d5dd; white-space:nowrap; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-customer-balance > span { font-size:12px; color:#667085; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-customer-balance > strong { font-size:13px; font-weight:650; color:#1d2939; font-variant-numeric:tabular-nums; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-customer-balance.is-negative > strong { color:#b42318; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid {
  display:grid; grid-template-columns:156px minmax(280px,1.65fr) minmax(210px,1fr) 130px 190px; min-width:0; align-items:stretch;
}
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid > div {
  grid-column:auto; grid-row:auto; min-width:0; padding:10px 12px; border-top:0; border-right:1px solid #edf0f3; border-bottom:0; background:#fff !important;
}
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid > div:last-child { border-right:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .sign-cell { display:flex; flex-direction:column; align-items:stretch; gap:7px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .sign-cell .subline { font-size:12px; line-height:1.5; margin:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .sign-cell .copyable-number { font-size:13px; font-weight:600; line-height:1.5; white-space:normal; overflow-wrap:anywhere; padding:0; min-height:0; text-align:left; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .sign-cell :is(.create-inventory-card-link,.open-order-processing-link) { min-height:30px; padding:4px 7px; font-size:12px; margin:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .tracking-label { color:#667085; font-size:11px; margin:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-products-cell { min-width:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-product-line {
  display:grid; grid-template-columns:112px minmax(0,1fr); gap:14px; align-items:start; padding:0; min-height:0;
}
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-product-line + .order-product-line { border-top:1px solid #edf0f3; margin-top:14px; padding-top:14px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-product-line-img { width:112px; min-width:0; padding:0; align-self:start; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-product-img { width:112px; max-width:100%; height:150px; min-height:0; object-fit:contain; border:0; border-radius:3px; background:#fff; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-product-line-body { min-width:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-product-main { padding:0; color:#475467; font-size:12px; line-height:1.55; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .product-title-row { margin-top:4px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .product-title-clamp { color:#1d2939; font-size:13px; font-weight:600; line-height:1.6; -webkit-line-clamp:2; }
.order-product-original { display:inline-block; margin-top:2px; font-size:11px; color:#667085; }
.order-product-original > summary { cursor:pointer; width:max-content; }
.order-product-original[open] { display:block; }
.order-product-original .product-name-ru { font-size:12px; line-height:1.5; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-transaction-price { display:flex; align-items:baseline; gap:8px; margin:5px 0; font-size:12px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-transaction-price strong { font-size:14px; font-weight:650; color:#1d2939; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .rootflow-product-details { display:grid; gap:3px; margin:8px 0 0; padding:0; border:0; background:transparent; font-size:12px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .rootflow-product-details > div:not(.order-quantity-summary) { display:grid; grid-template-columns:28px minmax(0,1fr); gap:8px; padding:0; min-height:0; border:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .rootflow-product-details > div:not(.order-quantity-summary) strong { font-size:12px; font-weight:400; overflow-wrap:anywhere; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px 12px; margin-top:6px; padding:8px 0 0; border-top:1px solid #edf0f3; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary .qty-pieces-row { display:flex; flex-wrap:wrap; align-items:baseline; gap:5px; padding:0; margin:0; border:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary .qty-value--pieces { font-size:22px; line-height:1.15; color:#1d2939; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary .qty-summary-item { display:flex; align-items:center; gap:5px; padding:0; border:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary .qty-row--ordered { white-space:nowrap; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary .qty-row--ordered > span { font-size:11px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary .qty-value--ordered { color:#344054; font-size:14px; font-weight:650; font-variant-numeric:tabular-nums; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary .qty-value--rate { display:inline-flex; width:auto; min-width:28px; min-height:28px; padding:2px 4px; font-size:13px; font-weight:600; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary .qty-mult { margin-left:4px; font-size:11px; color:#667085; }
@media (max-width:720px) {
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary { justify-content:flex-start; gap:4px 10px; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-quantity-summary :is(.qty-pieces-row, .qty-row--ordered, .qty-row--rate) { flex:0 0 100%; }
}
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-context-cell { display:flex; flex-direction:column; gap:8px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card { padding:0; margin:0; border:0; border-radius:0; background:transparent; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__item:not(.scan-stock-card) { display:grid; grid-template-columns:56px minmax(0,1fr); gap:10px; padding:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__media { width:56px; min-width:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__media img { width:56px; height:72px; object-fit:contain; border-radius:2px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__body { min-width:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__name { font-size:12px; line-height:1.5; font-weight:600; color:#344054; white-space:normal; overflow-wrap:anywhere; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__shelf { font-size:16px; font-weight:650; line-height:1.45; color:#b54708; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__query { min-height:24px; padding:2px 0; margin-top:0; border:0; background:transparent; font-size:12px; color:#175cd3; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__stock { margin-top:6px; font-size:11px; line-height:1.5; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__stock b { font-size:16px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-ozon-context { margin-top:0; gap:3px; padding:6px 0 0; border-top:1px solid #edf0f3; background:transparent; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-ozon-context header { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; margin-bottom:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .ozon-official-times { padding:0; border:0; background:transparent; gap:2px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .ozon-official-times > div { font-size:11px; line-height:1.5; grid-template-columns:60px minmax(0,1fr); }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-ozon-context header strong { font-size:12px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-proof-cell { display:flex; flex-direction:column; gap:7px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-proof-title { font-size:12px; font-weight:600; color:#475467; margin:0 0 2px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-proof-item { padding:0; border:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-proof-main { font-size:12px; min-height:22px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-proof-stage-list { display:flex; flex-direction:column; gap:4px; margin-top:7px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-proof-stage { display:flex; align-items:center; justify-content:space-between; min-height:24px; padding:3px 5px; border-radius:3px; text-align:left; background:#f5f6f8; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-proof-stage.is-complete { color:#067647; background:#ecfdf3; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-actions { display:flex; flex-direction:column; gap:5px; background:#fcfcfd !important; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-action-heading { min-height:18px; margin:0 0 6px; padding:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-action-heading span { color:#475467; font-size:12px; font-weight:600; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-actions .oa-primary-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-actions .oa-primary-row button { grid-column:auto; min-height:32px; width:auto; padding:5px 6px; font-size:12px; line-height:1.4; border-radius:4px; box-shadow:none; white-space:normal; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-actions .oa-primary-row :is(.oa-primary,.oa-confirm-stock) { grid-column:1 / -1; min-height:34px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-action-section { margin:2px 0 0; padding:0; border:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-action-section > summary { min-height:28px; margin:0; padding:3px 0; font-size:12px; color:#667085; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-actions :is(.oa-secondary-row,.oa-auxiliary-row) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; margin:4px 0 0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-actions :is(.oa-secondary-row,.oa-auxiliary-row) button { min-height:30px; padding:4px; font-size:12px; }
@container enterprise-order (max-width:1080px) {
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid { grid-template-columns:150px minmax(240px,1fr) minmax(205px,.85fr); }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid > .order-context-cell { border-right:0; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid > .order-proof-cell { grid-column:1; border-top:1px solid #edf0f3; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid > .order-actions { grid-column:2 / -1; border-top:1px solid #edf0f3; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-actions .oa-primary-row { grid-template-columns:repeat(4,minmax(0,1fr)); }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-actions .oa-primary-row :is(.oa-primary,.oa-confirm-stock) { grid-column:auto; }
}
@container enterprise-order (max-width:700px) {
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid { grid-template-columns:150px minmax(0,1fr); }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid > .order-products-cell { border-right:0; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid > .order-context-cell { grid-column:1 / -1; border-top:1px solid #edf0f3; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid > .order-actions { grid-column:2; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-actions .oa-primary-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-product-line { grid-template-columns:80px minmax(0,1fr); gap:10px; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-product-line-img { width:80px; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-product-img { width:80px; height:107px; }
}
@container enterprise-order (max-width:460px) {
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid { display:flex; flex-direction:column; }
  :is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-card-grid > div { border-right:0; border-bottom:1px solid #edf0f3; }
}

/* Batch operations stay compact; button labels carry the action. */
#appView .workspace[data-view="orders"] .batch-bar.order-batch-enterprise { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 16px; padding:0 12px 10px; background:#fff; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-filter-area { grid-column:1 / -1; grid-row:1; gap:4px 8px; padding:8px 0; border-bottom:1px solid #edf0f3; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-selection-card { grid-column:1; grid-row:2; gap:6px 10px; padding:4px 0; max-width:185px; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-selection-count strong { font-size:16px; color:#1d2939; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-work-area { grid-column:2; grid-row:2; display:flex; flex-wrap:wrap; gap:4px 10px; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-workflow { flex:1 1 620px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) 28px; align-items:stretch; gap:6px; padding:0; min-height:0; border:0; border-radius:0; background:transparent; order:0; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-workflow.is-outbound-flow { flex-basis:820px; grid-template-columns:repeat(5,minmax(0,1fr)) 28px; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-step { display:flex; align-items:center; gap:8px; min-width:0; min-height:50px; padding:7px 8px; border:1px solid #e4e7ec; border-radius:4px; background:#fafbfc; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-step.is-current { border-color:#a4bcfd; background:#f5f8ff; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-step.is-complete { border-color:#d1e9d9; background:#f6fcf8; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-index { flex:0 0 20px; width:20px; height:20px; min-width:20px; font-size:11px; background:#e9edf3; color:#475467; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-content { display:flex; flex-direction:column; min-width:0; gap:2px; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-content > button { font-size:12px; min-height:22px; padding:0; text-align:left; background:transparent; border:0; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-meta { margin:0; font-size:11px; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-meta :is(button,label) { min-height:22px; padding:0; font-size:11px; line-height:1.45; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-print-auto-prepare { white-space:normal; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-hotkey-gear { position:static; align-self:center; margin:0; transform:none; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-work-area > button { min-height:28px; padding:3px 7px; font-size:12px; }
#appView .workspace[data-view="orders"] .order-list { margin-top:12px; gap:12px; }
@media(max-width:1100px) {
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-selection-card { grid-column:1 / -1; grid-row:2; max-width:none; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-work-area { grid-column:1 / -1; grid-row:3; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-workflow.is-outbound-flow { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:640px) {
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-workflow { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-workflow.is-outbound-flow { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* All operational dialogs share fixed header/footer and one scrolling content area. */
.modal-card, .erp-dialog-card { max-height:calc(100dvh - 48px); border-radius:6px; border-color:#e4e7ec; box-shadow:0 16px 48px rgba(16,24,40,.16); }
.modal-card > .modal-head, .erp-dialog-card > .erp-dialog-head { flex-shrink:0; padding:16px 20px; min-height:56px; gap:16px; }
.modal-head :is(h2,h3), .erp-dialog-head h2 { margin:0; font-size:17px; line-height:1.4; font-weight:650; color:#1d2939; }
.modal-head p { margin:4px 0 0; font-size:12px; line-height:1.5; color:#667085; }
.modal-head .modal-close { min-height:30px; padding:3px 9px; border:0; background:#f4f5f7; color:#475467; font-size:12px; }
.modal-card > .modal-actions, .erp-dialog-card > .erp-dialog-actions { flex-shrink:0; min-height:62px; padding:12px 20px; gap:8px; background:#fff; border-top:1px solid #e9ecf0; }
.modal-card > :is(.panel-body,.camera-body), .erp-dialog-card > .erp-dialog-body { padding:20px; max-height:calc(100dvh - 184px); min-height:0; overflow:auto; overscroll-behavior:contain; }
.erp-dialog-card--form { width:min(620px,100%); max-width:620px; }
.erp-dialog-form { gap:16px; }
.erp-dialog-form .erp-dialog-field > span { color:#475467; font-size:12px; }
.erp-dialog-form :is(input,select,textarea), .modal-card .form-grid :is(input,select,textarea) { font-size:13px; border-color:#d0d5dd; border-radius:4px; }
.erp-dialog-form :is(input,select), .modal-card .form-grid :is(input,select) { min-height:36px; }
.order-processing-dialog { width:min(1480px,calc(100vw - 48px)); height:min(850px,calc(100dvh - 48px)); }
.order-processing-body { padding:16px; background:#f7f8fa; }
.sku-picker.sku-picker--enterprise { width:min(1440px,calc(100vw - 48px)); max-width:none; height:min(960px,calc(100dvh - 48px)); max-height:calc(100dvh - 48px); }
.sku-picker--enterprise .modal-head > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px 16px; }
.sku-picker--enterprise .sku-picker-context { margin:0; }
.sku-picker.sku-picker--enterprise .sku-picker-tabbar { display:flex; gap:12px; margin:0 20px; min-height:42px; align-items:center; border-bottom:1px solid #e9ecf0; }
.sku-picker--enterprise .sku-picker-tabbar .sku-picker-tabs { min-height:42px; }
.sku-picker--enterprise .sku-picker-tabs button { min-height:38px; padding:8px 12px; font-size:13px; }
.sku-picker--enterprise .sku-picker-shelf-filter { align-items:center; margin:0; padding:0; min-width:0; gap:4px; }
.sku-picker--enterprise .sku-picker-shelf-filter button { min-height:28px; padding:3px 8px; border-color:transparent; border-radius:4px; background:#f5f6f8; font-size:12px; }
.sku-picker--enterprise .sku-picker-controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:6px 18px; padding:10px 20px; border-bottom:1px solid #edf0f3; }
.sku-picker.sku-picker--enterprise .sku-picker-warehouse-row { display:flex; align-items:center; gap:10px; margin:0; padding:0; min-width:0; min-height:30px; }
.sku-picker--enterprise #skuPickerWarehouseRow { grid-column:1; grid-row:1; }
.sku-picker--enterprise #skuPickerShelfGroupRow { grid-column:2; grid-row:1; }
.sku-picker--enterprise #skuPickerPrintFilter { grid-column:1; grid-row:2; }
.sku-picker--enterprise #skuPickerInventorySort { grid-column:2; grid-row:2; }
.sku-picker--enterprise .sku-picker-warehouse-options { gap:4px; min-width:0; overflow-x:auto; }
.sku-picker--enterprise .sku-picker-warehouse-row strong { flex:0 0 auto; font-size:12px; font-weight:500; color:#667085; }
.sku-picker--enterprise .sku-picker-warehouse-options button { min-height:28px; padding:3px 8px; font-size:12px; border-radius:4px; }
.sku-picker.sku-picker--enterprise .inventory-picker-sort { display:flex; flex-wrap:wrap; gap:4px; margin:0; padding:0; font-size:12px; }
.sku-picker.sku-picker--enterprise [hidden] { display:none; }
.sku-picker.sku-picker--enterprise .sku-picker-tools { grid-column:1 / -1; grid-row:3; display:flex; align-items:center; gap:8px; margin:2px 0 0; padding:0; }
.sku-picker.sku-picker--enterprise .sku-picker-tools input { flex:1; min-width:120px; min-height:36px; }
.sku-picker--enterprise .sku-picker-tools > .subline { font-size:12px; }
.sku-picker.sku-picker--enterprise .sku-picker-coverage { display:flex; align-items:center; gap:12px; justify-content:space-between; margin:8px 20px 0; padding:6px 10px; border-radius:4px; font-size:12px; }
.sku-picker--enterprise .sku-picker-coverage button { min-height:26px; padding:2px 6px; font-size:12px; }
.sku-picker.sku-picker--enterprise .sku-picker-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:14px 20px; align-content:start; background:#fafbfc; }
.sku-picker.sku-picker--enterprise :is(.inventory-card-picker-card,.sku-card) { display:grid; grid-template-columns:72px minmax(0,1fr); align-content:start; align-items:start; gap:6px 10px; padding:12px; min-width:0; border:1px solid #e4e7ec; border-radius:5px; background:#fff; box-shadow:none; }
.sku-picker.sku-picker--enterprise :is(.inventory-card-picker-card,.sku-card).is-selected { border-color:#175cd3; box-shadow:inset 0 0 0 1px #175cd3; background:#fff; }
.sku-picker.sku-picker--enterprise :is(.inventory-card-picker-card,.sku-card) > * { min-width:0; }
.sku-picker.sku-picker--enterprise :is(.inventory-card-picker-media,.sku-card-media) { grid-column:1; grid-row:1 / 5; width:72px; height:96px; aspect-ratio:3 / 4; padding:0; margin:0; border-radius:3px; }
.sku-picker.sku-picker--enterprise :is(.inventory-card-picker-media img,.sku-card-img) { width:72px; height:96px; aspect-ratio:3 / 4; object-fit:contain; }
.sku-picker.sku-picker--enterprise :is(.inventory-card-picker-name,.sku-card-name) { grid-column:2; grid-row:1; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; height:auto; min-height:0; margin:0; overflow:hidden; font-size:13px; font-weight:600; line-height:1.5; text-align:left; white-space:normal; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-shelf { grid-column:2; grid-row:2; min-height:0; font-size:12px; line-height:1.4; color:#b54708; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-tags { grid-column:2; grid-row:3; display:flex; flex-wrap:wrap; gap:3px 8px; font-size:11px; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-tags em { padding:0; background:transparent; border:0; color:#667085; }
.sku-picker.sku-picker--enterprise :is(.inventory-card-picker-skus,.sku-card-sku) { grid-column:2; grid-row:4; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sku-picker.sku-picker--enterprise :is(.inventory-card-picker-orders,.inventory-card-picker-stock,.inventory-card-picker-label-status,.inventory-card-picker-print) { grid-column:1 / -1; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-orders { margin-top:3px; padding-top:8px; border-top:1px solid #edf0f3; font-size:12px; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-orders strong { font-size:15px; color:#1d2939; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-stock { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; font-size:11px; line-height:1.5; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-stock button { min-height:22px; padding:0; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-stock strong { font-size:13px; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-label-status { padding-top:8px; margin:2px 0 0; gap:5px; font-size:12px; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-label-scope { color:#667085; font-size:11px; line-height:1.4; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-label-status.is-warning { color:#b54708; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-label-row { display:flex; flex-wrap:wrap; gap:4px; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-label-row > span { flex:1 1 100px; }
.sku-picker.sku-picker--enterprise .inventory-card-picker-print { min-height:30px; margin-top:2px; font-size:12px; background:#fff; border-color:#d0d5dd; }
.sku-picker.sku-picker--enterprise .wecom-picker-remind { grid-column:1 / -1; display:flex; align-items:center; justify-content:center; width:100%; min-height:34px; margin-top:2px; border:1px solid #b8d2f5; border-radius:5px; background:#f2f7ff; color:#1754a3; font-size:12px; font-weight:650; cursor:pointer; }
.sku-picker.sku-picker--enterprise .wecom-picker-remind:hover { background:#e6f0ff; border-color:#7db1f0; }
.inbound-forecast-reminder { z-index: 3200; }
.inbound-forecast-reminder__card { width: min(650px, calc(100vw - 24px)); max-width: 650px; }
.inbound-forecast-reminder__card .erp-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.inbound-forecast-reminder__card .erp-dialog-head p { margin:5px 0 0; color:#667085; font-size:12px; }
.inbound-forecast-reminder__card .scan-missing-notice__recipients { max-width:none; }
.scan-inbound-card__actions { display:flex; flex-wrap:wrap; gap:8px; }
.scan-inbound-card__actions button { flex:1 1 160px; }
.wecom-setup .wecom-setup-warning { margin-top:8px; color:#b54708; font-weight:600; }
.sku-picker.sku-picker--enterprise .sku-card-meta-row { grid-column:2; grid-row:2; flex-wrap:wrap; }
.sku-picker.sku-picker--enterprise .sku-card-mapping { grid-column:2; grid-row:3; text-align:left; padding:0; min-height:22px; }
.sku-picker.sku-picker--enterprise .sku-picker-footer { margin-top:auto; }
.sku-picker--loading { min-height:140px; }
@media(max-width:1250px) { .sku-picker.sku-picker--enterprise .sku-picker-list { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:900px) {
  .sku-picker.sku-picker--enterprise .sku-picker-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sku-picker--enterprise .sku-picker-controls { display:flex; flex-wrap:wrap; gap:8px 16px; }
  .sku-picker.sku-picker--enterprise .sku-picker-tools { width:100%; }
}
@media(max-width:600px) {
  .modal-mask, .erp-dialog-mask { padding:12px; }
  .modal-card, .erp-dialog-card { max-height:calc(100dvh - 24px); }
  .sku-picker.sku-picker--enterprise { width:calc(100vw - 24px); height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); }
  .sku-picker.sku-picker--enterprise .sku-picker-list { grid-template-columns:minmax(0,1fr); padding:12px; }
  .sku-picker--enterprise .sku-picker-controls { padding:8px 12px; }
  .sku-picker.sku-picker--enterprise .sku-picker-tabbar { margin:0 12px; }
}
@media(prefers-reduced-motion:reduce) { .order-card--enterprise *, .sku-picker--enterprise * { transition:none !important; animation:none !important; } }

:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-customer-balance { color:#1d2939; font-weight:600; font-variant-numeric:tabular-nums; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-customer-balance.danger-text { color:#b42318; }
#orderTable[aria-busy="true"] .order-status-refresh-row { position:relative; }
#orderTable[aria-busy="true"] .order-status-refresh-row::after { content:""; position:absolute; bottom:0; left:0; width:32%; height:2px; background:#175cd3; animation:order-tab-progress 1s ease-in-out infinite alternate; }
@keyframes order-tab-progress { to { left:68%; } }
@media(prefers-reduced-motion:reduce) { #orderTable[aria-busy="true"] .order-status-refresh-row::after { animation:none; width:100%; } }
.existing-card-picker.erp-dialog-card { width:min(1100px,calc(100vw - 48px)); max-width:1100px; }
.existing-card-picker .existing-card-option { border-radius:4px; padding:12px; }
.existing-card-picker .existing-card-image { flex-basis:64px; width:64px; height:80px; }
.existing-card-picker .existing-card-info strong { font-size:13px; line-height:1.5; }
.existing-card-picker .existing-card-filters { gap:12px; }
.existing-card-picker [data-card-count] { font-size:12px; color:#667085; }

/* Keep stock facts with their image and keep secondary tools compact. */
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__item:not(.scan-stock-card) { grid-template-columns:64px minmax(0,1fr); align-items:start; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__media { display:contents; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__media > :is(button,.order-inventory-card__empty) { grid-column:1; grid-row:1; width:64px; height:80px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__media img { width:64px; height:80px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__body { grid-column:2; grid-row:1; display:grid; align-content:start; gap:3px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__stock { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; margin-top:0; font-size:11px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__stock :is(span,b,em) { display:inline; margin:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-ozon-context { margin-top:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-stock-tools { margin:0; min-width:0; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-stock-tools > summary { min-height:26px; padding:4px 0; color:#475467; cursor:pointer; font-size:12px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-stock-tools[open] > button { margin-top:6px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-head-main > .order-customer-balance { font-size:14px; color:#1d2939; }
#appView .workspace[data-view="orders"] .order-batch-enterprise .batch-workflow { flex:0 1 744px; max-width:744px; grid-template-columns:repeat(4,minmax(0,1fr)) 28px; }
.sku-picker.sku-picker--enterprise .sku-picker-coverage[hidden] { display:none; }

:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__footer { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 12px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__footer .order-inventory-card__stock { flex:1 1 170px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__footer .order-inventory-card__query { width:auto; flex:0 0 auto; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__body .order-inventory-card__identity { display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 8px; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-inventory-card__identity span { margin:0; font-size:11px; }

#appView .workspace .order-card.order-card--enterprise .order-head-main > .order-customer-balance { font-size:14px; font-weight:650; color:#1d2939; }
#appView .workspace .order-card.order-card--enterprise .order-head-main > .order-customer-balance.danger-text { color:#b42318; }

/* Small desktop: reserve the first screen for orders, with scroll confined to tool rows. */
@media (min-width:721px) and (max-width:1175px) {
  #appView .workspace[data-view="orders"] .topbar { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:4px 12px; padding:8px 12px; }
  #appView .workspace[data-view="orders"] .topbar > :first-child { grid-column:1; grid-row:1; min-width:0; }
  #appView .workspace[data-view="orders"] .topbar h1 { margin:0; font-size:17px; white-space:nowrap; }
  #appView .workspace[data-view="orders"] .page-header-actions { grid-column:2; grid-row:1; display:flex; justify-content:flex-end; min-width:0; width:auto; margin:0; align-self:center; overflow-x:auto; }
  #appView .workspace[data-view="orders"] .page-header-actions .order-global-actions { display:flex; flex-wrap:nowrap; gap:4px; }
  #appView .workspace[data-view="orders"] .page-header-actions button { flex:0 0 auto; min-height:30px; padding:4px 7px; font-size:11px; }
  #appView .workspace[data-view="orders"] .order-global-actions .order-export-action { margin-left:0; }
  #appView .workspace[data-view="orders"] .stats-bar--header { grid-column:1 / -1; grid-row:2; display:flex; flex-wrap:nowrap; align-items:center; gap:4px; width:auto; height:36px; max-height:36px; margin:0; padding:0; overflow-x:auto; }
  #appView .workspace[data-view="orders"] .stats-bar--header .stat { flex:0 0 auto; min-width:90px; min-height:34px; padding:1px 8px; }
  #appView .workspace[data-view="orders"] .stats-bar--header .stat strong { margin:0; font-size:15px; line-height:1.4; }
  #appView .workspace[data-view="orders"] > #content { padding:0 12px 16px; }

  #appView .workspace[data-view="orders"] .order-filter-panel { margin-bottom:6px; padding:6px 10px; }
  #appView .workspace[data-view="orders"] .order-filter-primary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; gap:6px 8px; padding:0; }
  #appView .workspace[data-view="orders"] .order-filter-primary > .order-filter-search { grid-column:1 / 4; grid-row:1; }
  #appView .workspace[data-view="orders"] .order-filter-primary > label:not(.order-filter-search) { grid-column:auto; grid-row:2; min-width:0; }
  #appView .workspace[data-view="orders"] .order-filter-primary > .order-filter-buttons { grid-column:4; grid-row:1; display:flex; flex-wrap:nowrap; align-items:center; justify-content:flex-end; gap:6px; width:auto; }
  #appView .workspace[data-view="orders"] .order-filter-primary :is(input,select) { width:100%; min-width:0; min-height:34px; height:34px; padding-block:5px; font-size:12px; }
  #appView .workspace[data-view="orders"] .order-filter-buttons button { width:auto; min-width:0; min-height:34px; padding:5px 12px; }

  #appView .workspace[data-view="orders"] .order-status-refresh-row { min-width:0; gap:6px; }
  #appView .workspace[data-view="orders"] .order-status-refresh-row > .order-list-tabs { display:flex; flex:1 1 0%; flex-wrap:nowrap; align-items:center; gap:12px; min-width:0; width:0; padding:2px 0; overflow-x:auto; overflow-y:hidden; white-space:nowrap; }
  #appView .workspace[data-view="orders"] .order-list-tabs .order-status-group { display:flex; flex:0 0 auto; flex-wrap:nowrap; width:auto; min-width:max-content; padding:0; gap:0; }
  #appView .workspace[data-view="orders"] .order-list-tabs button { flex:0 0 auto; min-height:34px; padding:6px 8px; font-size:12px; white-space:nowrap; }
  #appView .workspace[data-view="orders"] .order-status-refresh-row > .page-refresh-button { min-height:30px; margin:2px 0; padding:4px 8px; }

  #appView .workspace[data-view="orders"] .batch-bar.order-batch-enterprise { grid-template-columns:150px minmax(0,1fr); gap:6px 12px; padding:0 8px 6px; margin:0 0 6px; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-filter-area { grid-column:1 / -1; grid-row:1; display:flex; flex-wrap:nowrap; gap:4px 8px; width:auto; min-width:0; margin:0; padding:5px 0; overflow-x:auto; overflow-y:hidden; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-filter-area > * { flex:0 0 auto; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-filter-area :is(.qty-filter-inline,.confirm-stock-batch-tools) { flex-wrap:nowrap; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-filter-area button { min-height:28px; padding:3px 6px; font-size:12px; white-space:nowrap; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-selection-card { grid-column:1; grid-row:2; display:flex; flex-wrap:wrap; align-content:center; align-self:stretch; gap:4px 8px; min-width:0; width:auto; max-width:none; min-height:0; padding:0; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-selection-card .checkline { flex:0 0 100%; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-selection-label { font-size:12px; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-selection-count { min-height:22px; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-work-area { grid-column:2; grid-row:2; display:flex; flex-wrap:wrap; align-items:center; align-content:start; gap:4px 6px; width:auto; min-width:0; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-work-area .batch-workflow { flex:1 1 100%; width:100%; max-width:none; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) 24px; gap:4px; padding:0; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-step { gap:5px; min-height:48px; padding:5px 6px; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-index { flex-basis:16px; width:16px; min-width:16px; height:16px; font-size:10px; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-content > button { min-height:20px; font-size:11px; line-height:1.4; white-space:normal; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-flow-meta :is(button,label) { font-size:10px; min-height:20px; line-height:1.4; }
  #appView .workspace[data-view="orders"] .order-batch-enterprise .batch-work-area > button { flex:0 0 auto; width:auto; min-height:26px; padding:3px 6px; font-size:11px; }
  #appView .workspace[data-view="orders"] .order-list { margin-top:8px; }
}

.sku-picker--enterprise #skuColorQuickRow { display:flex; align-items:center; gap:10px; padding:8px 20px; min-height:0; }
.sku-picker--enterprise #skuColorQuickRow[hidden] { display:none; }
.sku-picker--enterprise #skuColorQuickRow .sku-color-quick-heading { display:block; flex:0 0 auto; width:auto; }
.sku-picker--enterprise #skuColorQuickRow .sku-color-quick-items { flex:1; min-width:0; display:flex; flex-wrap:wrap; gap:6px; }

:is(#appView, .order-processing-body) .order-card.order-card--enterprise .ozon-official-times > div,
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .order-time-details > div > div { display:grid; grid-template-columns:78px minmax(0,1fr); gap:6px; font-size:11px; line-height:1.5; }
:is(#appView, .order-processing-body) .order-card.order-card--enterprise .ozon-official-times span { white-space:nowrap; }
.order-time-details { margin-top:2px; color:#667085; font-size:11px; }
.order-time-details > summary { cursor:pointer; width:max-content; }
.order-time-details > div { display:grid; gap:2px; margin-top:4px; }
@media (max-width: 680px) {
  .ogl-batch-workspace { margin-inline: 0; padding: 8px; }
  .ogl-batch-workspace-tabs, .ogl-batch-sub-tabs { overflow-x: auto; white-space: nowrap; }
  .ogl-batch-workspace-tabs button, .ogl-batch-sub-tabs button { flex: 0 0 auto; }
  .ogl-charge-total-grid { grid-template-columns: 1fr; }
  .ogl-charge-summary-strip { align-items: flex-start; gap: 8px 12px; }
  .ogl-charge-summary-strip button { margin-left: 0; }
  .ogl-charge-pager { align-items: flex-start; flex-direction: column; }
}
.wecom-config { display: grid; gap: 16px; }
.wecom-setup, .wecom-section-head, .wecom-customer-row, .wecom-recipient-list > div, .wecom-discovered-group { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wecom-setup h2, .wecom-section-head h2 { margin: 0 0 8px; }
.wecom-setup p { margin: 0; color: var(--text-muted, #64748b); }
.wecom-setup-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
@media (max-width: 760px) { .wecom-setup { align-items: stretch; flex-direction: column; } .wecom-setup-actions { justify-content: flex-start; } }
.wecom-section-head { margin-bottom: 16px; }
.wecom-section-head input { max-width: 300px; }
.wecom-recipient-list > div, .wecom-discovered-group, .wecom-customer-row { border-top: 1px solid #e5eaf0; padding: 12px 0; }
.wecom-recipient-list small, .wecom-discovered-group small, .wecom-customer-name small { display: block; color: #64748b; font-size: 12px; margin-top: 2px; }
.wecom-customer-list { max-height: 650px; overflow: auto; }
.wecom-customer-row[hidden] { display: none; }
.wecom-customer-name { min-width: 180px; }
.wecom-bound-list { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.wecom-bound-chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 16px; padding: 4px 8px; background: #e9f2ff; color: #20569d; font-size: 12px; }
.wecom-bound-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; }
.wecom-bind-controls { display: flex; gap: 6px; }
.wecom-bind-controls select { max-width: 220px; }
.wecom-restock-card { width: min(840px, calc(100vw - 32px)); max-width: 840px; max-height: min(90vh, 960px); }
.wecom-restock-card .erp-dialog-body { overflow-y: auto; padding: 20px 24px; }
.wecom-restock-card .erp-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; }
.wecom-restock-card .erp-dialog-head h2 { margin: 0; }
.wecom-restock-card .erp-dialog-head p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.wecom-dialog-close { border: 0; background: transparent; color: #475569; font-size: 26px; line-height: 1; cursor: pointer; }
.wecom-preview-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.wecom-preview-summary > div { padding: 12px 14px; background: #f4f7fc; border: 1px solid #e3eaf4; border-radius: 10px; }
.wecom-preview-summary span, .wecom-preview-summary strong { display: block; }
.wecom-preview-summary span { color: #53647b; font-size: 12px; }
.wecom-preview-summary strong { margin-top: 4px; color: #15253d; font-size: 22px; line-height: 1.2; }
.wecom-preview-summary small { font-size: 12px; font-weight: 500; }
.wecom-preview-group { border: 1px solid #dce5f1; border-radius: 12px; padding: 18px; margin: 14px 0; background: #fff; }
.wecom-preview-group-head, .wecom-preview-recipient-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wecom-preview-eyebrow { color: #64748b; font-size: 12px; }
.wecom-preview-group h3 { margin: 3px 0 0; font-size: 18px; }
.wecom-card-sample { margin: 16px 0 6px; max-width: 510px; overflow: hidden; border: 1px solid #d8e3f0; border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(26, 53, 87, .08); }
.wecom-card-sample-title { padding: 17px 18px 13px; }
.wecom-card-sample-title span { color: #2463ae; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.wecom-card-sample-title h4 { margin: 7px 0 0; color: #15253d; font-size: 18px; line-height: 1.45; }
.wecom-card-sample-content { display:grid; grid-template-columns:minmax(0, 175px) minmax(0, 1fr); align-items:stretch; border-top:1px solid #e8eef5; }
.wecom-card-sample-content:not(:has(.wecom-card-sample-media)) { grid-template-columns:1fr; }
.wecom-card-sample-media { display:flex; align-items:center; justify-content:center; padding:12px; background:#f5f8fc; }
.wecom-card-sample-image { display:block; width:100%; aspect-ratio:3 / 4; object-fit:contain; border-radius:7px; background:#fff; }
.wecom-card-sample-rows { padding:10px 18px; }
.wecom-card-sample-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #edf1f6; font-size: 13px; }
.wecom-card-sample-rows > div:last-child { border-bottom: 0; }
.wecom-card-sample-rows span { flex: 0 0 auto; color: #64748b; }
.wecom-card-sample-rows strong { min-width: 0; color: #172842; font-weight: 650; overflow-wrap: anywhere; text-align: right; }
.wecom-card-sample > p { margin: 0; padding: 12px 18px; border-top: 1px solid #e8eef5; background: #f8fbff; color: #4b607d; font-size: 12px; }
@media (max-width:560px) { .wecom-card-sample-content { grid-template-columns:minmax(0, 130px) minmax(0, 1fr); } .wecom-card-sample-media { padding:8px; } .wecom-card-sample-rows { padding:8px 10px; } .wecom-card-sample-rows > div { gap:6px; font-size:11px; } }
.wecom-preview-count { padding: 5px 9px; color: #1d4f91; background: #eaf3ff; border-radius: 999px; white-space: nowrap; font-size: 12px; }
.wecom-preview-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.wecom-preview-facts span { padding: 8px 10px; background: #f7f9fc; border-radius: 7px; color: #52617a; font-size: 13px; }
.wecom-preview-facts b { color: #172842; }
.wecom-preview-group h4 { margin: 16px 0 8px; font-size: 13px; }
.wecom-preview-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wecom-preview-skus { margin: 12px 0 0; border: 1px solid #e4eaf2; border-radius: 9px; padding: 10px 12px; }
.wecom-preview-skus summary { color: #2457a4; font-size: 13px; font-weight: 700; cursor: pointer; }
.wecom-preview-skus .wecom-preview-products { margin-top: 12px; }
.wecom-preview-product { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px; border: 1px solid #e8edf4; border-radius: 9px; }
.wecom-preview-products img, .wecom-preview-image-empty { flex: 0 0 50px; width: 50px; height: 50px; border-radius: 6px; object-fit: cover; }
.wecom-preview-image-empty { display: grid; place-items: center; background: #f1f4f8; color: #7a8798; font-size: 11px; }
.wecom-preview-product > span:nth-child(2) { min-width: 0; flex: 1; }
.wecom-preview-products strong, .wecom-preview-products small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wecom-preview-products small { color: #64748b; font-size: 12px; margin-top: 3px; }
.wecom-preview-product > b { color: #334155; white-space: nowrap; }
.wecom-shortage-detail__card { width: min(720px, calc(100vw - 24px)); }
.wecom-shortage-detail__hero { display: flex; gap: 18px; align-items: stretch; padding: 16px; border: 1px solid #e4eaf3; border-radius: 12px; background: #f8fbff; }
.wecom-shortage-detail__hero > img { width: min(30%, 170px); aspect-ratio: 3 / 4; object-fit: contain; background: #fff; border-radius: 8px; }
.wecom-shortage-detail__stats { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wecom-shortage-detail__stats > div { padding: 12px; border-radius: 8px; background: #fff; }
.wecom-shortage-detail__stats span, .wecom-shortage-detail__stats strong { display: block; }
.wecom-shortage-detail__stats span { color: #64748b; font-size: 12px; }
.wecom-shortage-detail__stats strong { margin-top: 5px; color: #172842; font-size: 16px; }
.wecom-shortage-detail__first-sku { margin-top: 14px; color: #64748b; font-size: 13px; }
.wecom-shortage-detail__first-sku strong { margin-left: 8px; color: #172842; }
.wecom-shortage-detail__form { display: grid; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #e4eaf3; }
.wecom-shortage-detail__form h3, .wecom-shortage-detail__form p { margin: 0; }
.wecom-shortage-detail__form > p, .wecom-shortage-detail__option-stock { color: #64748b; font-size: 13px; }
.wecom-shortage-detail__form label { display: grid; gap: 6px; color: #334155; font-weight: 650; font-size: 13px; }
.wecom-shortage-detail__form input, .wecom-shortage-detail__form select { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #cdd8e5; border-radius: 8px; color: #172842; background: #fff; font: inherit; }
.wecom-shortage-detail__form button { justify-self: start; }
.wecom-shortage-detail__unavailable, .wecom-shortage-detail__status { color: #a3421d; font-size: 13px; }
@media (max-width:560px) { .wecom-shortage-detail__hero { flex-direction: column; } .wecom-shortage-detail__hero > img { width: 150px; align-self: center; } }
.wecom-preview-recipient-head span { color: #64748b; font-size: 12px; }
.wecom-preview-recipients { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wecom-preview-recipients label { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #dce5f1; background: #f8fbff; border-radius: 8px; cursor: pointer; }
.wecom-preview-recipients label:has(input:checked) { border-color: #2563eb; background: #edf4ff; color: #174c99; }
.wecom-preview-recipients input { width: 16px; height: 16px; accent-color: #2563eb; }
.wecom-preview-empty { width: 100%; padding: 12px; color: #6b4c13; background: #fff8e8; border-radius: 8px; font-size: 13px; }
.wecom-message-preview { margin-top: 15px; border-top: 1px solid #e7edf5; padding-top: 12px; }
.wecom-message-preview summary { color: #20569d; cursor: pointer; font-size: 13px; font-weight: 600; }
.wecom-message-preview pre { margin: 10px 0 0; padding: 12px; color: #334155; background: #f7f9fc; border-radius: 7px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 12px; line-height: 1.6; }
.wecom-send-status { min-height: 20px; color: #20569d; }
.wecom-send-status:not(:empty) { padding: 10px 12px; background: #eef5ff; border-radius: 8px; }
.wecom-selection-count { margin-right: auto; color: #53647b; font-size: 13px; }
.wecom-restock-card [data-send]:disabled { opacity: .5; cursor: not-allowed; }
.scan-missing-notice__recipient-list { display:flex; flex-wrap:wrap; gap:7px; margin:8px 0 15px; }
.scan-missing-notice__recipient-list span { padding:5px 9px; border:1px solid #cbdcf6; border-radius:999px; background:#f2f7ff; color:#21477a; font-size:12px; }
.scan-missing-delivery { display:grid; gap:6px; margin-top:10px; }
.scan-missing-delivery > div { display:flex; justify-content:space-between; gap:12px; padding:7px 9px; border-radius:8px; background:#f7f9fc; font-size:12px; }
.scan-missing-delivery strong { color:#172b4d; }
.scan-missing-delivery span { color:#4b5b73; text-align:right; }
.oa-notify-row { margin-top: 8px; }
#appView .order-actions .oa-notify-row .oa-wecom-alert,
.order-processing-body .order-actions .oa-notify-row .oa-wecom-alert { display:block; width:100%; min-height:34px; border:1px solid #9bc6e7; border-radius:8px; background:linear-gradient(90deg,#eef8ff,#f8fbff); color:#145182; font-weight:700; cursor:pointer; }
#appView .order-actions .oa-notify-row .oa-wecom-alert:hover,
.order-processing-body .order-actions .oa-notify-row .oa-wecom-alert:hover { background:#e4f3ff; border-color:#5da7dc; }
.wecom-order-issue-card { width:min(820px,calc(100vw - 24px)); }
.wecom-order-issue-summary { display:flex; flex-wrap:wrap; gap:9px; margin-bottom:16px; }
.wecom-order-issue-summary > span { padding:8px 11px; border-radius:8px; background:#eef4fb; color:#607086; font-size:12px; }
.wecom-order-issue-summary strong { margin-left:5px; color:#172b4d; font-size:13px; }
.wecom-order-issue-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(240px,.85fr); gap:18px; align-items:start; }
.wecom-order-issue-layout .wecom-card-sample { margin:0; }
.wecom-order-issue-fields { display:grid; gap:13px; }
.wecom-order-issue-fields label { display:grid; gap:7px; color:#34445a; font-size:13px; font-weight:700; }
.wecom-order-issue-fields select,.wecom-order-issue-fields textarea { width:100%; box-sizing:border-box; padding:10px 11px; border:1px solid #cad7e7; border-radius:9px; color:#172842; background:#fff; font:inherit; }
.wecom-order-issue-fields textarea { resize:vertical; min-height:118px; line-height:1.55; }
.wecom-order-issue-fields p { margin:0; color:#68788e; font-size:12px; line-height:1.5; }
.wecom-history { display:grid; gap:6px; margin-top:12px; }
.wecom-history-row { display:grid; grid-template-columns:90px minmax(0,1fr) minmax(100px,180px) 145px; gap:12px; align-items:center; padding:11px 12px; border:1px solid #e5ebf4; border-radius:8px; background:#fff; font-size:12px; }
.wecom-history-kind { color:#1e5aa6; font-weight:700; }
.wecom-history-row strong,.wecom-history-row small { display:block; }
.wecom-history-row strong { color:#172842; }
.wecom-history-row small,.wecom-history-row time { margin-top:3px; color:#708096; }
.wecom-history-state { color:#265e9f; font-weight:700; }
.wecom-history-state.sent { color:#168056; }
.wecom-history-state.failed,.wecom-history-state.uncertain { color:#aa4b2b; }
.wecom-history-state.pending_staff { color:#a66a17; }
@media (max-width:740px) { .wecom-history-row { grid-template-columns:1fr 1fr; } .wecom-history-row time { text-align:right; } }
@media (max-width:740px) { .wecom-order-issue-layout { grid-template-columns:1fr; } }
@media (max-width: 740px) { .wecom-customer-row { align-items: stretch; flex-direction: column; } .wecom-bind-controls select { max-width: none; flex: 1; } .wecom-preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wecom-preview-products { grid-template-columns: 1fr; } .wecom-restock-card .erp-dialog-body { padding: 14px; } .wecom-restock-card .erp-dialog-actions { flex-wrap: wrap; } .wecom-selection-count { flex-basis: 100%; } }
.wecom-qr-modal .erp-dialog-card { max-width: 480px; }
.wecom-qr-modal .erp-dialog-body { text-align: center; }
.wecom-join-qr-image { display: block; width: min(280px, 75vw); height: auto; margin: 16px auto; border: 1px solid #e5eaf1; border-radius: 12px; }

/* Scan workstation: keep the input, verdict and the current action easy to find. */
#appView .workspace[data-view="scanDesk"] .scan-input-bar { display:flex; align-items:center; gap:16px; padding-bottom:12px; border-bottom:1px solid #eaecf0; }
#appView .workspace[data-view="scanDesk"] .scan-input-field { flex:1; min-width:0; }
.scan-input-label { display:block; margin-bottom:6px; color:#475467; font-size:12px; font-weight:600; }
#appView .workspace[data-view="scanDesk"] .scan-query-actions { flex-shrink:0; margin:20px 0 0; gap:8px; }
#appView .workspace[data-view="scanDesk"] .scan-query-actions button { min-height:42px; }
#appView .workspace[data-view="scanDesk"] #scanResult { margin-top:12px; padding:0; background:transparent; border:0; border-radius:0; }
.scan-lookup-feedback { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px; border-left:3px solid #175cd3; background:#f5f8ff; }
.scan-lookup-feedback > div { display:grid; gap:6px; }
.scan-lookup-feedback strong { font-size:17px; color:#1849a9; }
.scan-lookup-feedback span, .scan-result-time { font-size:12px; color:#667085; }
.scan-lookup-feedback code { overflow-wrap:anywhere; color:#344054; }
.scan-lookup-feedback.is-matched { border-color:#079455; background:#f0fdf4; }
.scan-lookup-feedback.is-matched strong { color:#067647; }
.scan-lookup-feedback.is-error { border-color:#d92d20; background:#fff5f4; }
.scan-lookup-feedback.is-error strong { color:#b42318; }
#appView .workspace[data-view="scanDesk"] .scan-result-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 0 12px; }
#appView .workspace[data-view="scanDesk"] .scan-batch-toolbar { background:#f8faff; border:0; border-radius:6px; }
#appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-columns:160px minmax(280px,1.4fr) minmax(260px,1fr) 220px; grid-template-rows:auto auto; }
#appView .workspace[data-view="scanDesk"] .order-card-grid > .sign-cell { grid-column:1; grid-row:1; }
#appView .workspace[data-view="scanDesk"] .order-card-grid > .order-products-cell { grid-column:2; grid-row:1; }
#appView .workspace[data-view="scanDesk"] .order-card-grid > .order-context-cell { grid-column:3; grid-row:1; }
#appView .workspace[data-view="scanDesk"] .order-card-grid > .order-actions { grid-column:4; grid-row:1; border:0; }
#appView .workspace[data-view="scanDesk"] .order-card-grid > .order-proof-cell { grid-column:1 / -1; grid-row:2; border:0; border-top:1px solid #eaecf0; background:#fafbfc; display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:12px 24px; }
#appView .workspace[data-view="scanDesk"] .order-actions .oa-primary-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
#appView .workspace[data-view="scanDesk"] .order-card.scanned-order-card { box-shadow:0 1px 4px #1018280d; border-color:#d0d5dd; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__media > button { height:140px; }
#appView .workspace[data-view="scanDesk"] .order-proof-item { min-width:140px; }
#appView .workspace[data-view="scanDesk"] .scan-workflow-notice { margin:0 0 12px; padding:10px 12px; background:#f8faff; border:0; }
.scan-context-progress { padding:16px; margin:0; background:#f5f8ff; color:#1849a9; }
@container scan-orders (max-width:1200px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-columns:150px minmax(0,1fr) 220px; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .sign-cell { grid-column:1; grid-row:1; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-products-cell { grid-column:2; grid-row:1; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-context-cell { grid-column:1 / 3; grid-row:2; border-top:1px solid #eaecf0; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-actions { grid-column:3; grid-row:1; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-proof-cell { grid-column:1 / -1; grid-row:3; }
 #appView .workspace[data-view="scanDesk"] .scan-stock-card { grid-template-columns:140px minmax(0,1fr); }
 #appView .workspace[data-view="scanDesk"] .scan-stock-card__name { grid-column:2; }
 #appView .workspace[data-view="scanDesk"] .scan-stock-card__media { grid-row:1; }
}
@container scan-orders (max-width:800px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-columns:minmax(120px,.7fr) minmax(0,1.3fr); }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-context-cell { grid-column:1 / -1; grid-row:2; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-actions { grid-column:1 / -1; grid-row:3; }
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-proof-cell { grid-column:1 / -1; grid-row:4; }
 #appView .workspace[data-view="scanDesk"] .order-product-line { grid-template-columns:72px minmax(0,1fr); }
}
@container scan-orders (max-width:520px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { display:flex; flex-direction:column; }
}
@media(max-width:900px) {
 #appView .workspace[data-view="scanDesk"] .scan-input-bar { display:block; }
 #appView .workspace[data-view="scanDesk"] .scan-query-actions { margin:8px 0 0; }
 .scan-lookup-feedback { align-items:flex-start; flex-direction:column; }
}
/* Enterprise WeCom workspace: one task surface per tab. */
#appView .workspace[data-view="wecomNotifications"] #pageDesc:empty { display:none; }
#appView .workspace[data-view="wecomNotifications"] .page-header { margin-bottom:10px; }
.wecom-workspace { color:#1d1d1f; }
.wecom-tabs { display:flex; align-items:stretch; gap:22px; min-height:42px; margin-bottom:12px; border-bottom:1px solid #dfe4ea; }
.wecom-tabs button { display:inline-flex; align-items:center; gap:7px; border:0; border-bottom:2px solid transparent; border-radius:0; padding:0 2px; background:transparent; color:#667085; font-size:13px; font-weight:600; white-space:nowrap; cursor:pointer; }
.wecom-tabs button:hover { color:#344054; }
.wecom-tabs button.is-active { border-bottom-color:#1768c2; color:#15253d; }
.wecom-tabs button span { color:#98a2b3; font-size:11px; font-variant-numeric:tabular-nums; }
.wecom-tabs .wecom-refresh { margin-left:auto; color:#475467; }
.wecom-recipients-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(310px,1fr); gap:12px; align-items:start; }
.wecom-surface { min-width:0; border:1px solid #e1e6ed; background:#fff; }
.wecom-section-head { min-height:54px; margin:0; padding:0 16px; border-bottom:1px solid #e8ecf1; }
.wecom-section-head h2 { margin:0; color:#202b3a; font-size:14px; font-weight:650; white-space:nowrap; }
.wecom-section-head h2 span { margin-left:5px; color:#98a2b3; font-size:12px; font-weight:500; font-variant-numeric:tabular-nums; }
.wecom-head-actions, .wecom-row-actions { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.wecom-head-actions button, .wecom-row-actions button, .wecom-channel-row button { min-height:30px; padding:4px 9px; border:1px solid #d8e0e9; border-radius:4px; background:#fff; color:#344054; font-size:12px; font-weight:600; cursor:pointer; }
.wecom-head-actions button:hover, .wecom-row-actions button:hover, .wecom-channel-row button:hover { border-color:#a7bdd7; color:#175ba6; }
.wecom-head-actions button:disabled, .wecom-channel-row button:disabled { cursor:not-allowed; opacity:.45; }
.wecom-search { width:min(230px,42%); }
.wecom-search .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.wecom-search input, .wecom-head-actions select { width:100%; min-height:30px; padding:5px 9px; border:1px solid #d8e0e9; border-radius:4px; background:#fff; color:#344054; font-size:12px; }
.wecom-customer-list { max-height:calc(100vh - 260px); min-height:200px; overflow:auto; }
.wecom-customer-row { display:grid; grid-template-columns:minmax(90px,150px) minmax(0,1fr) minmax(155px,210px); gap:10px; align-items:center; min-height:57px; padding:9px 14px; border-top:1px solid #edf0f3; }
.wecom-customer-row:first-child, .wecom-recipient-list > div:first-child { border-top:0; }
.wecom-customer-row[hidden], .wecom-history-row[hidden] { display:none; }
.wecom-customer-name { min-width:0; }
.wecom-customer-name strong, .wecom-recipient-list strong { display:block; overflow:hidden; color:#253041; font-size:13px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.wecom-customer-name small, .wecom-recipient-list small { display:block; margin-top:2px; overflow:hidden; color:#667085; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.wecom-bound-list { display:flex; flex-wrap:wrap; align-items:center; gap:4px; min-width:0; }
.wecom-bound-chip { display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:3px 5px 3px 7px; border:1px solid #e2e9f2; border-radius:4px; background:#f6f9fc; color:#344054; font-size:12px; }
.wecom-bound-chip button { padding:0 2px; color:#667085; }
.wecom-bind-controls { display:flex; gap:5px; min-width:0; }
.wecom-bind-controls select { flex:1; min-width:0; max-width:none; min-height:30px; border:1px solid #d8e0e9; border-radius:4px; color:#475467; background:#fff; font-size:12px; }
.wecom-bind-controls button { min-height:30px; padding:4px 9px; border:1px solid #c8d9ed; border-radius:4px; background:#f3f8fe; color:#175ba6; font-size:12px; font-weight:600; cursor:pointer; }
.wecom-recipient-list { max-height:calc(100vh - 330px); overflow:auto; }
.wecom-recipient-list > div, .wecom-discovered-group { min-height:56px; padding:9px 14px; border-top:1px solid #edf0f3; }
.wecom-recipient-list > div > span:first-child, .wecom-discovered-group > span { min-width:0; }
.wecom-discovered { border-top:1px solid #e8ecf1; }
.wecom-discovered h3 { margin:0; padding:11px 14px 5px; color:#475467; font-size:12px; font-weight:650; }
.wecom-discovered-group { min-height:48px; }
.wecom-discovered-group button { min-height:28px; border:1px solid #d8e0e9; border-radius:4px; background:#fff; color:#175ba6; cursor:pointer; }
.wecom-empty, .wecom-loading { padding:28px 16px; color:#667085; font-size:13px; text-align:center; }
.wecom-history { display:block; margin:0; }
.wecom-history-row { display:grid; grid-template-columns:100px minmax(0,1fr) minmax(120px,175px) 150px; gap:12px; align-items:center; min-height:57px; padding:10px 16px; border:0; border-top:1px solid #edf0f3; border-radius:0; font-size:12px; }
.wecom-history-row:first-child { border-top:0; }
.wecom-history-kind { color:#475467; font-weight:600; }
.wecom-history-row strong { color:#253041; font-size:13px; }
.wecom-history-row small, .wecom-history-row time { color:#667085; font-size:11px; }
.wecom-history-state { color:#475467; font-weight:600; }
.wecom-history-state.sent { color:#167548; }
.wecom-history-state.failed, .wecom-history-state.uncertain { color:#b44235; }
.wecom-history-state.pending_staff { color:#9a6215; }
.wecom-channel-row { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:66px; padding:12px 16px; border-top:1px solid #edf0f3; }
.wecom-channel-row:first-child { border-top:0; }
.wecom-channel-row h2 { display:inline; margin:0 12px 0 0; font-size:13px; font-weight:650; }
.wecom-channel-state { color:#a14d22; font-size:12px; }
.wecom-channel-state.is-ready { color:#168052; }
@media (max-width:1050px) { .wecom-recipients-layout { grid-template-columns:1fr; } .wecom-customer-list, .wecom-recipient-list { max-height:none; } }
@media (max-width:620px) { .wecom-tabs { gap:13px; } .wecom-section-head { padding:8px 12px; flex-wrap:wrap; } .wecom-customer-row { grid-template-columns:minmax(0,1fr); gap:6px; } .wecom-bind-controls { width:100%; } .wecom-history-row { grid-template-columns:1fr auto; gap:3px 8px; } .wecom-history-row time { text-align:right; } .wecom-channel-row { align-items:flex-start; flex-direction:column; } }

/* Keep the stock confirmation count on one row within the inventory card. */
.sku-picker.sku-picker--enterprise .inventory-card-picker-confirm-stock {
  display:block;
  white-space:nowrap;
  overflow-x:auto;
}

/* A pending tab must never display actionable rows from the previous tab. */
#orderList[data-order-loading] { position:relative; min-height:160px; height:160px; overflow:hidden; }
#orderList[data-order-loading] > * { display:none; }
#orderList[data-order-loading]::before { content:attr(data-order-loading); position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#667085; font-size:14px; }

.sku-picker-pager { display:flex; gap:10px; align-items:center; justify-content:flex-end; padding:8px 16px; border-top:1px solid #e5e9f1; flex-shrink:0; }
.sku-picker-pager[hidden] { display:none; }
.sku-picker-pager span { color:#64748b; margin-right:auto; font-size:12px; }
.sku-picker-pager button { padding:5px 12px; }

/* Scan workstation: stable input, a clear receipt and aligned action groups. */
#appView .workspace[data-view="scanDesk"] .scan-input-bar { position:sticky; top:0; z-index:5; background:#fff; gap:20px; padding:4px 0 16px; }
#appView .workspace[data-view="scanDesk"] .scan-input-field { flex:1; min-width:0; }
#appView .workspace[data-view="scanDesk"] .scan-input { height:52px; font-size:22px; font-weight:600; letter-spacing:.025em; border:1px solid #c5ccd7; border-radius:6px; box-shadow:none; }
#appView .workspace[data-view="scanDesk"] .scan-input:focus { outline:0; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
#appView .workspace[data-view="scanDesk"] .scan-query-actions { flex-shrink:0; align-self:end; gap:8px; }
#appView .workspace[data-view="scanDesk"] .scan-query-actions button { min-height:40px; padding:0 16px; }
.scan-match-receipt { display:flex; align-items:center; gap:9px; width:100%; padding:12px 0; min-width:0; }
.scan-match-receipt strong { font-size:16px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.scan-match-receipt > span:last-child { color:#067647; font-size:12px; margin-left:auto; white-space:nowrap; }
.scan-match-indicator { width:7px; height:7px; border-radius:50%; background:#079455; flex:none; }
.scan-candidate-list { display:grid; gap:8px; width:100%; }
.scan-candidate-heading { display:flex; align-items:center; gap:12px; padding:12px 0; }
.scan-candidate-heading span { color:#667085; font-size:12px; }
.scan-candidate-list > button { display:grid; grid-template-columns:minmax(170px,1fr) minmax(0,2fr) auto; align-items:center; gap:16px; padding:14px 16px; background:white; text-align:left; border:1px solid #e4e7ec; border-radius:6px; }
.scan-candidate-list > button:hover { background:#f5f8ff; border-color:#b2ccff; }
.scan-candidate-list > button strong { font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.scan-candidate-list > button small { color:#667085; }
#appView .workspace[data-view="scanDesk"] .order-card.order-card--enterprise .order-actions .oa-primary-row button { min-height:36px; }
#appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-columns:190px minmax(280px,1.3fr) minmax(260px,1fr) 236px; }
.scan-match-receipt strong { color:#344054; }
#appView .workspace[data-view="scanDesk"] .scan-inbound-workspace__desk .scan-match-receipt { display:none; }
@container scan-orders (max-width:1200px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-columns:180px minmax(0,1fr) 220px; }
}
@container scan-orders (max-width:800px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-columns:minmax(140px,.7fr) minmax(0,1.3fr); }
}
@media(max-width:900px) {
 #appView .workspace[data-view="scanDesk"] .scan-input-bar { position:relative; display:block; }
 #appView .workspace[data-view="scanDesk"] .scan-query-actions { margin-top:10px; }
 .scan-candidate-list > button { grid-template-columns:minmax(0,1fr); gap:6px; }
}
#appView .workspace[data-view="scanDesk"] .order-card .domestic-tracking-line { flex-wrap:wrap; row-gap:4px; }
#appView .workspace[data-view="scanDesk"] .order-card .domestic-tracking-number { flex-shrink:0; max-width:100%; white-space:nowrap; overflow-x:auto; overflow-wrap:normal; word-break:normal; text-align:left; }
/* 2026-10-02: direct carrier scope, visible issue queues, compact statement rows. */
.logistics-carrier-switch { display:flex; flex-wrap:nowrap; align-items:center; gap:2px; padding:3px; border:1px solid #e4e7ec; border-radius:5px; background:#f8fafc; width:max-content; max-width:100%; }
.logistics-carrier-switch button { min-height:28px; padding:4px 12px; border:0; border-radius:3px; box-shadow:none; white-space:nowrap; background:transparent; color:#475467; font-size:12px; }
.logistics-carrier-switch button.active { background:#e9efff; color:#2454c7; font-weight:650; }
.logistics-carrier-switch button:focus-visible, .statement-count-button:focus-visible { outline:2px solid #315bef; outline-offset:2px; }
#appView .workspace[data-view="orders"] .order-filter-primary { grid-template-columns:minmax(230px,2fr) auto repeat(3,minmax(100px,1fr)) auto; }
#appView .workspace[data-view="orders"] .order-filter-carrier { min-width:0; align-self:center; }
#appView .workspace[data-view="orders"] .order-filter-carrier select[hidden] { display:none; }
#appView .workspace[data-view="orders"] .order-status-refresh-row { align-items:flex-start; }
#appView .workspace[data-view="orders"] .order-status-refresh-row > .order-list-tabs { display:flex; flex-wrap:wrap; width:auto; gap:2px 10px; overflow:visible; white-space:normal; align-items:center; }
#appView .workspace[data-view="orders"] .order-list-tabs .order-status-group { display:flex; flex:0 1 auto; width:auto; min-width:0; align-items:center; flex-wrap:wrap; padding:0; gap:0; }
#appView .workspace[data-view="orders"] .order-status-group-label { display:block; font-size:10px; color:#667085; padding:0 5px; margin:0; }
#appView .workspace[data-view="orders"] .order-list-tabs button { padding:5px 7px; min-height:32px; font-size:12px; }
#appView .workspace[data-view="orders"] .order-list-tabs [data-status="exception"] span,
#appView .workspace[data-view="orders"] .order-list-tabs [data-status="outbound_legacy"] span,
#appView .workspace[data-view="orders"] .order-list-tabs [data-status="stale_forecast"] span { color:#b54708; }
.logistics-carrier-badge { display:inline-flex; align-items:center; gap:4px; color:#344054; background:#f2f4f7; border:1px solid #e4e7ec; padding:2px 7px; border-radius:3px; white-space:nowrap; font-size:11px; font-weight:600; }
.logistics-carrier-guoo { color:#1d4b99; background:#eef4ff; border-color:#d9e5ff; }
.logistics-carrier-ogl { color:#166534; background:#f0f9f3; border-color:#dcf0e1; }
.scan-carrier-summary { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0 0 8px; }
.scan-carrier-summary small { font-weight:400; }
.order-issue-summary { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; padding:6px 8px; margin:4px 0 8px; background:#fffaeb; color:#93370d; border-radius:3px; }
.order-issue-summary span { font-size:11px; flex:none; }
.order-issue-summary strong { font-size:12px; font-weight:500; overflow-wrap:anywhere; }
.statement-carrier-summaries { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.statement-carrier-summary { display:grid; grid-template-columns:1fr auto; align-items:baseline; gap:5px 12px; padding:12px 16px; text-align:left; background:#fff; border:1px solid #e4e7ec; border-radius:5px; box-shadow:none; min-width:0; }
.statement-carrier-summary.active { border-color:#315bef; background:#f8faff; }
.statement-carrier-summary > span { font-size:13px; font-weight:600; }
.statement-carrier-summary > strong { font-size:24px; line-height:1.2; font-variant-numeric:tabular-nums; }
.statement-carrier-summary small { font-size:11px; font-weight:400; margin-left:5px; color:#667085; }
.statement-carrier-summary em { grid-column:1 / -1; font-size:12px; font-style:normal; color:#667085; }
.statement-carrier-summary em b { color:#b54708; font-weight:600; }
.statement-list-panel .panel-head { padding:12px 16px; }
.statement-list-panel .panel-title .muted { margin-left:6px; font-size:12px; font-weight:400; }
.statement-list-panel table { min-width:900px; width:100%; font-variant-numeric:tabular-nums; }
.statement-list-panel th, .statement-list-panel td { text-align:center; }
.statement-list-panel th:first-child, .statement-list-panel td:first-child { text-align:left; }
.statement-list-panel td { padding:7px 10px; vertical-align:middle; }
.statement-list-panel thead tr:first-child th { border-bottom:0; padding-block:8px 4px; }
.statement-list-panel thead tr:last-child th { padding-block:4px 8px; }
.statement-carrier-heading { color:#344054 !important; font-weight:650 !important; }
.statement-panel .statement-count-button { border:0; background:transparent; min-height:28px; padding:3px 8px; color:#344054; font-size:13px; font-variant-numeric:tabular-nums; }
.statement-panel .statement-count-button:hover { background:#eef4ff; color:#2454c7; text-decoration:underline; }
.statement-panel .statement-count-button.warning { color:#b54708; background:#fffaeb; font-weight:600; }
.statement-panel .statement-date-button { background:transparent; border:0; min-height:28px; color:#2454c7; padding:3px 0; }
.statement-detail-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-bottom:12px; }
.statement-detail-toolbar > .actions { margin-left:auto; }
.statement-detail-date { font-size:14px; font-variant-numeric:tabular-nums; }
.statement-detail-toolbar select[hidden] { display:none; }
.statement-cargo { max-width:260px; display:flex; flex-direction:column; gap:6px; }
.statement-cargo-details summary { cursor:pointer; color:#2454c7; font-size:12px; padding:4px 0; }
.statement-cargo-details[open] { max-height:220px; overflow:auto; }
.statement-cargo-number { font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.statement-cargo button { align-self:flex-start; min-height:28px; font-size:12px; }
.statement-stats { gap:10px; margin-bottom:12px; }
.statement-stats .statement-stat { padding:12px 16px; min-height:94px; }
.statement-stats .statement-stat strong { font-size:26px; }
.statement-stats .statement-stat em { overflow-wrap:anywhere; }
@media(max-width:1500px) {
  #appView .workspace[data-view="orders"] .order-filter-primary { grid-template-columns:minmax(180px,2fr) auto repeat(3,minmax(90px,1fr)) auto; }
  .logistics-carrier-switch button { padding-inline:8px; }
}
@media(max-width:1100px) {
  #appView .workspace[data-view="orders"] .order-filter-primary { display:flex; flex-wrap:wrap; gap:6px; }
  #appView .workspace[data-view="orders"] .order-filter-primary > .order-filter-search { flex:1 1 240px; }
  #appView .workspace[data-view="orders"] .order-filter-primary > label:not(.order-filter-search) { flex:1 1 100px; }
  #appView .workspace[data-view="orders"] .order-filter-buttons { flex:0 0 auto; }
  .statement-carrier-summary { padding:10px; }
  .statement-carrier-summary > strong { font-size:21px; }
}
@media(max-width:640px) {
  #appView .workspace[data-view="orders"] .order-filter-carrier { flex:1 1 100%; }
  .logistics-carrier-switch { width:100%; }
  .logistics-carrier-switch button { flex:1; padding-inline:4px; }
  #appView .workspace[data-view="orders"] .order-list-tabs .order-status-group { flex:1 1 100%; }
  #appView .workspace[data-view="orders"] .order-status-group-label { min-width:66px; }
  .statement-carrier-summaries { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .statement-detail-toolbar > .actions { margin-left:0; }
  .statement-detail-toolbar > .logistics-carrier-switch { order:3; }
}

#appView .order-stat-shortcut { text-align:left; cursor:pointer; }
#appView .order-stat-shortcut:hover, #appView .order-stat-shortcut.active { background:#f0f6ff; }
#appView .order-stat-shortcut.active strong { color:#175cd3; }
#appView .workspace[data-view="orders"] .order-status-group-label { position:static; flex:none; line-height:1.4; }
#appView .workspace[data-view="orders"] .order-list-tabs .order-status-group + .order-status-group { border-left:1px solid #e4e7ec; padding-left:6px; }
.order-processing-body { container-type:inline-size; }
@container (min-width:900px) {
  #orderProcessingModal .order-card.order-card--enterprise .order-card-grid { grid-template-columns:150px minmax(280px,1.4fr) minmax(220px,1fr) 180px; }
  #orderProcessingModal .order-card.order-card--enterprise .order-card-grid > .order-actions { grid-column:4; grid-row:1; }
  #orderProcessingModal .order-card.order-card--enterprise .order-card-grid > .order-proof-cell { grid-column:1 / -1; grid-row:2; border-top:1px solid #e4e7ec; display:flex; flex-direction:row; flex-wrap:wrap; gap:12px 24px; align-items:center; }
  #orderProcessingModal .order-proof-item { min-width:140px; }
}

.statement-date-filters { display:flex; flex-wrap:wrap; align-items:center; gap:7px; font-size:12px; color:#667085; }
.statement-date-filters label { display:flex; align-items:center; gap:6px; }
.statement-date-filters input[type="date"] { min-height:30px; width:140px; padding:3px 6px; }
.statement-date-filters button { min-height:30px; padding:4px 8px; }
.statement-list-panel .panel-head { flex-wrap:wrap; gap:10px; }
@media (max-width:640px) { .statement-date-filters { width:100%; } .statement-date-filters .checkline { width:100%; } }
#appView .return-pagination { position:static; inset:auto; width:100%; transform:none; margin:0; box-shadow:none; }
#appView .workspace:is([data-view="checks"],[data-view="returns"]) .panel-head { gap:12px; flex-wrap:wrap; }
#appView .workspace:is([data-view="checks"],[data-view="returns"]) .panel-head .actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; width:auto; }
#appView .workspace:is([data-view="checks"],[data-view="returns"]) .panel-head .actions input { width:240px; min-width:180px; }
#appView .workspace:is([data-view="checks"],[data-view="returns"]) .panel-head .actions select { width:140px; }
#appView .workspace[data-view="checks"] .check-table input[type="checkbox"] { width:16px; height:16px; min-height:16px; }
@media (max-width:640px) {
 #appView .workspace:is([data-view="checks"],[data-view="returns"]) .panel-head .actions { width:100%; }
 #appView .workspace:is([data-view="checks"],[data-view="returns"]) .panel-head .actions input { width:100%; }
}

.compact-create-panel > summary { padding:12px 16px; font-size:13px; font-weight:600; color:#175cd3; cursor:pointer; }
.compact-create-panel[open] > summary { border-bottom:1px solid #e4e7ec; }
#customerFilterCount { margin-left:8px; font-size:12px; font-weight:400; }
#appView .workspace[data-view="customers"] .panel-head > input { width:min(380px,100%); }

.settings-section-nav { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; padding:8px 0; position:sticky; top:68px; z-index:20; background:#f7f8fa; }
.settings-section-nav button { min-height:32px; padding:5px 12px; }
.settings-anchor-panel { scroll-margin-top:130px; }
#appView .account-log-pagination { position:static; inset:auto; width:100%; transform:none; margin:0; box-shadow:none; }
#appView .work-performance-toolbar { display:flex; flex-wrap:wrap; align-items:end; border-radius:4px; }
#appView .work-performance-toolbar > label { flex:0 1 170px; }
#appView .work-performance-privacy { flex:1 1 260px; }
#appView .work-performance-toolbar > .actions { flex:none; margin-left:auto; }
@media (max-width:640px) { #appView .work-performance-toolbar > label, #appView .work-performance-toolbar > .actions { flex:1 1 100%; } }

/* Statement detail: bounded reading, clear search and contained narrow tables. */
.statement-panel .panel-head { flex-wrap:wrap; gap:10px; }
.statement-order-search { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.statement-order-search input { width:280px; max-width:100%; min-height:34px; }
.statement-loading { padding:10px 16px; background:#eff4ff; color:#2454c7; font-size:13px; border-bottom:1px solid #dce6fb; }
.statement-panel .is-statement-loading { opacity:.45; pointer-events:none; }
.statement-pagination { flex-wrap:wrap; }
.statement-list-single table { min-width:620px; }
.statement-panel .statement-product-name .subline { display:block; overflow:visible; -webkit-line-clamp:unset; }
@media(max-width:600px) {
  .statement-order-search { width:100%; }
  .statement-order-search input { width:100%; }
  .statement-pagination { justify-content:center; gap:6px; padding:10px; }
  .statement-pagination > span { width:100%; text-align:center; }
}
.order-applied-scope { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:6px 12px; background:#fafbfc; border-bottom:1px solid #e9edf3; font-size:12px; }
.order-applied-scope > span { color:#667085; }
.order-scope-chip { display:inline-flex; align-items:center; gap:8px; min-height:26px; padding:3px 8px; border:1px solid #dce3ee; background:#fff; color:#475467; font-size:12px; max-width:100%; }
.order-scope-chip > span { overflow-wrap:anywhere; text-align:left; }
.order-scope-chip > b { color:#7b879b; font-weight:400; }
.order-scope-chip:hover { background:#eff4ff; color:#2454c7; border-color:#adc2ee; }

@media(max-width:600px) {
  .statement-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .statement-stats .statement-stat { min-height:94px; padding:10px 12px; }
  .statement-stat span { font-size:12px; }
}
.statement-panel:not(.statement-list-panel) table { min-width:1280px; table-layout:auto; }
.statement-panel:not(.statement-list-panel) th:first-child,
.statement-panel:not(.statement-list-panel) td:first-child { min-width:150px; }
.statement-panel .statement-processing-button { white-space:nowrap; }

/* Keep check search and bulk actions readable on narrow warehouse screens. */
.check-workspace .check-table .empty { text-align:left; padding-left:16px; }
.check-query-actions { flex-wrap:wrap; }
.check-query-actions input { width:260px; max-width:100%; }
.check-export-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 14px; border-top:1px solid var(--line); }
.check-export-actions > span { color:var(--muted); font-size:12px; }
.check-export-actions #checkReadStatus { color:var(--primary); }
.check-workspace[aria-busy="true"] .check-list-panel { opacity:.65; }
@media(max-width:700px) {
  .check-query-actions { width:100%; }
  .check-query-actions input { flex:1 1 200px; min-width:0; }
  .check-query-actions select { flex:1 1 130px; min-width:0; }
  .check-workspace .check-table { min-width:1100px; }
}

/* Scan depth: stable task controls and a readable selected parcel scope. */
#appView .workspace[data-view="scanDesk"] { --scan-input-height:100px; }
#appView .workspace[data-view="scanDesk"] .scan-desk-panel { overflow:visible; }
#appView .workspace[data-view="scanDesk"] .shipment-recipient { grid-template-columns:minmax(0,1fr); margin-top:4px; }
#appView .workspace[data-view="scanDesk"] .shipment-recipient > button { text-align:left; }
#appView .workspace[data-view="scanDesk"] .sign-cell > .ozon-order-number { margin-top:8px; }
#appView .workspace[data-view="scanDesk"] .scan-input-bar { min-height:92px; box-sizing:border-box; z-index:12; background:#fff; }
#appView .workspace[data-view="scanDesk"] .scan-query-actions button { min-height:44px; }
#appView .workspace[data-view="scanDesk"] .scan-batch-toolbar { position:sticky; top:var(--scan-input-height); z-index:10; padding:12px; background:#f8faff; border:1px solid #dce5f4; box-shadow:0 2px 6px #1018280a; }
#appView .workspace[data-view="scanDesk"] .scan-batch-selection { gap:12px; min-height:32px; flex-wrap:wrap; }
.scan-batch-scope { color:#344054; font-size:12px; line-height:1.6; min-height:20px; font-variant-numeric:tabular-nums; }
#appView .workspace[data-view="scanDesk"] .scan-batch-actions button { min-height:44px; }
#appView .workspace[data-view="scanDesk"] .scan-batch-actions .is-next { background:#175cd3; border-color:#175cd3; color:#fff; }
#appView .workspace[data-view="scanDesk"] .scan-batch-actions button:focus-visible { outline:3px solid #84adff; outline-offset:2px; }
#appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-rows:auto auto !important; }
#appView .workspace[data-view="scanDesk"] .order-card-grid > .order-actions { grid-row:1 !important; align-self:stretch; }
@container scan-orders (max-width:1200px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid { grid-template-rows:auto auto auto !important; }
}
@container scan-orders (max-width:800px) {
 #appView .workspace[data-view="scanDesk"] .order-card-grid > .order-actions { grid-row:3 !important; }
}
@media (max-width:900px), (max-height:700px) {
 #appView .workspace[data-view="scanDesk"] .scan-input-bar, #appView .workspace[data-view="scanDesk"] .scan-batch-toolbar { position:static; min-height:0; }
 #appView .workspace[data-view="scanDesk"] .scan-batch-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 #appView .workspace[data-view="scanDesk"] .scan-query-actions { flex-wrap:wrap; }
}

/* 扫码卡片：客户、状态、履约信息固定分组，正文各区共用间距。 */
#appView .workspace[data-view="scanDesk"] .order-card .scan-card-head {
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 20px; padding:12px 14px; background:#fafbfc;
}
#appView .workspace[data-view="scanDesk"] .scan-card-identity { display:flex; align-items:center; gap:10px; min-width:0; }
#appView .workspace[data-view="scanDesk"] .scan-card-head .order-head-main { gap:6px 10px; }
#appView .workspace[data-view="scanDesk"] .scan-card-status { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:8px; max-width:480px; min-width:0; margin:0; }
#appView .workspace[data-view="scanDesk"] .scan-card-status > :is(.badge,.check-order-flag,.scan-card-ozon-status) { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border-radius:4px; font-size:12px; line-height:18px; white-space:normal; }
#appView .workspace[data-view="scanDesk"] .scan-card-ozon-status { color:#475467; background:#eef0f3; }
#appView .workspace[data-view="scanDesk"] .scan-card-routing { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding-left:0; min-width:0; color:#667085; font-size:12px; }
#appView .workspace[data-view="scanDesk"] .scan-card-routing > :is(.order-wh,.order-head-service,.logistics-carrier-badge) { border:0; background:transparent; padding:0; min-height:0; color:#475467; font-size:12px; line-height:18px; font-weight:500; white-space:normal; overflow-wrap:anywhere; }
#appView .workspace[data-view="scanDesk"] .scan-card-routing > :is(.order-wh,.order-head-service) { padding-left:10px; border-left:1px solid #d0d5dd; border-radius:0; }
#appView .workspace[data-view="scanDesk"] .scan-card-routing > .order-head-service.is-missing { color:#b54708; }
#appView .workspace[data-view="scanDesk"] .scan-card-routing .order-forecast-time { color:#98a2b3; font-size:11px; }
#appView .workspace[data-view="scanDesk"] .scan-card-settlement { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px 12px; max-width:480px; font-size:12px; color:#667085; }
#appView .workspace[data-view="scanDesk"] .order-card .order-card-grid > div { padding:14px; }
#appView .workspace[data-view="scanDesk"] .order-card .sign-cell { gap:10px; }
#appView .workspace[data-view="scanDesk"] .order-card .order-context-cell { gap:10px; }
#appView .workspace[data-view="scanDesk"] .scan-card-stock-tools { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; }
#appView .workspace[data-view="scanDesk"] .scan-card-stock-tools:empty { display:none; }
#appView .workspace[data-view="scanDesk"] .scan-card-stock-tools .delivery-weight-range { margin:0; font-weight:500; text-align:left; font-size:12px; }
#appView .workspace[data-view="scanDesk"] .scan-card-stock-tools .weight-guard-alert { flex-basis:100%; margin:0; }
#appView .workspace[data-view="scanDesk"] .scan-card-stock-tools .order-stock-tools[open] { flex-basis:100%; }
#appView .workspace[data-view="scanDesk"] .scan-card-stock-tools button { min-height:30px; padding:4px 8px; font-size:12px; }
#appView .workspace[data-view="scanDesk"] .scan-card-stock-tools > .open-order-processing-link { display:none; }
#appView .workspace[data-view="scanDesk"] .order-card .order-proof-cell { padding:10px 14px; }
#appView .workspace[data-view="scanDesk"] .order-card .order-actions { gap:6px; }
@container scan-orders (max-width:1000px) {
  #appView .workspace[data-view="scanDesk"] .order-card .scan-card-head { grid-template-columns:minmax(0,1fr); gap:8px; }
  #appView .workspace[data-view="scanDesk"] .scan-card-status { grid-row:2; justify-content:flex-start; max-width:none; }
  #appView .workspace[data-view="scanDesk"] .scan-card-settlement { justify-content:flex-start; max-width:none; }
}
#appView .workspace[data-view="scanDesk"] .order-card .sign-cell > .subline { text-align:left; }
#appView .workspace[data-view="scanDesk"] .order-context-cell .scan-stock-card { grid-template-columns:100px minmax(0,1fr); gap:10px 12px; }
#appView .workspace[data-view="scanDesk"] .order-context-cell .scan-stock-card__media > button { height:128px; }
#appView .workspace[data-view="scanDesk"] .order-context-cell .scan-stock-card__name { grid-column:2; grid-row:auto; }
#appView .workspace[data-view="scanDesk"] .order-context-cell .scan-stock-card__actions > button { white-space:normal; }
#appView .workspace[data-view="scanDesk"] .scan-card-status > .text-danger { color:#b42318; font-size:12px; font-weight:600; }
@container scan-orders (max-width:800px) {
  #appView .workspace[data-view="scanDesk"] .order-card .order-card-grid { grid-template-columns:180px minmax(0,1fr); }
  #appView .workspace[data-view="scanDesk"] .order-card .order-product-line { grid-template-columns:72px minmax(0,1fr); gap:12px; }
  #appView .workspace[data-view="scanDesk"] .order-card .order-product-line-img { width:72px; }
  #appView .workspace[data-view="scanDesk"] .order-card .order-product-img { width:72px; height:96px; }
}

/* 物流组别、重量与库存工具沿单号集中在左侧；平台状态为查面单的首要信息。 */
#appView .workspace[data-view="scanDesk"] .scan-card-head-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; color:#667085; font-size:12px; }
#appView .workspace[data-view="scanDesk"] .scan-card-head-meta .order-forecast-time { color:#667085; font-size:11px; }
#appView .workspace[data-view="scanDesk"] .sign-cell .scan-card-routing { display:flex; flex-direction:column; align-items:flex-start; gap:5px; padding-top:10px; border-top:1px solid #edf0f3; }
#appView .workspace[data-view="scanDesk"] .sign-cell .scan-card-routing > :is(.order-wh,.order-head-service) { padding:0; border:0; }
#appView .workspace[data-view="scanDesk"] .sign-cell .scan-card-stock-tools { display:flex; flex-direction:column; align-items:stretch; gap:5px; padding-top:10px; border-top:1px solid #edf0f3; }
#appView .workspace[data-view="scanDesk"] .sign-cell .scan-card-stock-tools .order-stock-tools[open] > button { display:block; width:100%; margin-top:6px; border:1px solid #d0d5dd; background:#fff; text-align:left; }
#appView .workspace[data-view="scanDesk"] .scan-card-status > .scan-card-ozon-status { gap:8px; min-height:34px; padding:5px 10px; border:1px solid #d0d5dd; background:#f2f4f7; color:#475467; }
#appView .workspace[data-view="scanDesk"] .scan-card-ozon-status > span { font-size:12px; font-weight:600; }
#appView .workspace[data-view="scanDesk"] .scan-card-ozon-status > strong { font-size:18px; font-weight:700; line-height:24px; }
#appView .workspace[data-view="scanDesk"] .scan-card-status > .scan-card-ozon-status.is-waiting { background:#fffaeb; border-color:#fedf89; color:#854a0e; }
#appView .workspace[data-view="scanDesk"] .scan-card-status > .scan-card-ozon-status.is-transit { background:#eff6ff; border-color:#b2ccff; color:#1849a9; }
#appView .workspace[data-view="scanDesk"] .scan-card-status > .scan-card-ozon-status.is-done { background:#ecfdf3; border-color:#abefc6; color:#067647; }
#appView .workspace[data-view="scanDesk"] .scan-card-status > .scan-card-ozon-status.is-alert { background:#fef3f2; border-color:#fecdca; color:#b42318; }
#appView .workspace[data-view="scanDesk"] .scan-card-warehouse-status { display:flex; align-items:center; }
/* 输入框与按钮同高同顶；预留扫码回执行，出现单号后也不挤动按钮。 */
#appView .workspace[data-view="scanDesk"] { --scan-input-height:120px; }
#appView .workspace[data-view="scanDesk"] .scan-input-bar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:20px; }
#appView .workspace[data-view="scanDesk"] .scan-input-field { display:grid; grid-template-rows:18px 52px minmax(18px,auto); gap:6px; }
#appView .workspace[data-view="scanDesk"] .scan-input-label { margin:0; line-height:18px; }
#appView .workspace[data-view="scanDesk"] .scan-input { width:100%; margin:0; box-sizing:border-box; }
#appView .workspace[data-view="scanDesk"] .barcode-input-receipt { margin:0; line-height:18px; overflow-wrap:anywhere; }
#appView .workspace[data-view="scanDesk"] .scan-query-actions { display:grid; grid-template-columns:70px 116px 100px; gap:8px; align-self:start; margin:24px 0 0; }
#appView .workspace[data-view="scanDesk"] .scan-query-actions > button { height:52px; min-height:52px; width:100%; padding:0 10px; margin:0; box-sizing:border-box; white-space:nowrap; }
@media(max-width:900px) {
  #appView .workspace[data-view="scanDesk"] .scan-input-bar { grid-template-columns:minmax(0,1fr); gap:8px; }
  #appView .workspace[data-view="scanDesk"] .scan-query-actions { grid-template-columns:minmax(0,.7fr) minmax(0,1.15fr) minmax(0,1fr); margin:0; }
}
#appView .workspace[data-view="scanDesk"] .sign-cell .scan-card-stock-tools { flex-wrap:nowrap; }
#appView .workspace[data-view="scanDesk"] .sign-cell .scan-card-stock-tools .order-stock-tools { flex:0 0 auto; width:100%; min-width:0; }
#appView .workspace[data-view="scanDesk"] .order-card.order-card--enterprise .scan-card-status > .scan-card-ozon-status > strong { color:inherit; }
#appView .workspace[data-view="scanDesk"] .order-card.order-card--enterprise .sign-cell .order-stock-tools > summary { text-align:left; }

/* SKU identity, multiplier and explicit unlink remain separate click targets. */
.rf-stock-sku-binding {display:inline-flex;align-items:center;gap:2px;max-width:100%;}
.rf-stock-sku-remove {border:0;background:transparent;color:#8793a5;cursor:pointer;font-size:16px;line-height:24px;min-width:24px;padding:0 3px;border-radius:4px;}
.rf-stock-sku-remove:hover,.rf-stock-sku-remove:focus-visible {color:#c43e3e;background:#f3f5f8;}
.rf-stock-sku-remove:disabled {cursor:wait;opacity:.5;}

/* OGL size-first allocation: keep dense rows and native checkbox sizing. */
.ogl-dispatch-dialog .ogl-customer-check{display:flex;align-items:center;gap:8px;margin:0 0 8px;}
.ogl-dispatch-dialog input[type="checkbox"],#oglOversizePanel input[type="checkbox"]{width:18px;height:18px;min-height:18px;margin:0;flex:0 0 auto;}
#oglOversizePanel .actions{display:flex;flex-wrap:wrap;gap:8px;}
#oglOversizePanel td{padding:10px 12px;}

/* 接收对象同时展示已绑定的平台用户。 */
.wecom-recipient-bindings { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.wecom-recipient-bindings > small { flex-basis:100%; white-space:normal; }
.wecom-recipient-bindings .wecom-bound-chip { white-space:normal; overflow-wrap:anywhere; }
.wecom-discovery-status { padding:12px 14px; color:#667085; font-size:12px; line-height:1.6; }
.wecom-discovery-status button { margin-left:8px; }
.wecom-section-head .wecom-head-actions { flex-wrap:wrap; }

/* OGL warehouse workflow: stable controls, explicit stages, compact pending work. */
.ogl-workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:4px 4px 12px;}
.ogl-workspace-heading strong{font-size:17px;color:#101828;}
.ogl-workspace-heading span{display:inline;margin-left:12px;color:#667085;font-size:12px;}
.ogl-operation-status{padding:9px 12px;margin-bottom:12px;border-radius:6px;background:#eef4ff;color:#344054;font-size:12px;overflow-wrap:anywhere;}
.ogl-operation-status[data-tone="idle"]{display:none;}
.ogl-operation-status[data-tone="working"]{color:#175cd3;border-left:3px solid #2e90fa;}
.ogl-operation-status[data-tone="error"]{color:#b42318;background:#fff1f0;}
.ogl-operation-status[data-tone="success"]{color:#067647;background:#ecfdf3;}
.ogl-oversize-worklist{padding:10px 4px 4px;}
.ogl-oversize-worklist>button{display:none;} /* The workspace header provides the same reconciliation action. */
.ogl-workspace-hint{font-size:12px;color:#667085;line-height:1.6;margin:0 0 12px;}
.ogl-workspace-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:8px 0 12px;}
.ogl-workspace-metrics>div{border:1px solid #e4e7ec;border-radius:8px;padding:8px 14px;background:#fff;}
.ogl-workspace-metrics span{display:block;font-size:12px;color:#667085;}
.ogl-workspace-metrics strong{display:block;font-size:22px;line-height:1.3;color:#101828;font-variant-numeric:tabular-nums;}
.ogl-workspace-metrics small{font-size:12px;font-weight:400;color:#667085;}
.ogl-workspace-metrics>div:first-child strong{color:#175cd3;}
.ogl-worklist-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px;}
.ogl-oversize-worklist .table-wrap{margin-top:12px;border:1px solid #e4e7ec;border-radius:8px;background:white;}
.ogl-oversize-worklist tr:has(input:checked){background:#eef4ff;}
.ogl-oversize-worklist th{white-space:nowrap;}
.ogl-oversize-worklist td{vertical-align:middle;}
.ogl-dispatch-dialog{max-height:88vh;display:flex;flex-direction:column;}
.ogl-dispatch-body{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.ogl-customer-plan{padding:16px;border:1px solid #e4e7ec;border-radius:8px;background:#f8fafc;min-width:0;}
.ogl-customer-plan p{font-size:12px;line-height:1.6;}
.ogl-customer-plan input[type="number"]{width:100px;margin-left:8px;}
.ogl-customer-plan details{font-size:12px;line-height:1.7;overflow-wrap:anywhere;}
.ogl-dispatch-dialog .modal-actions{flex-shrink:0;flex-wrap:wrap;border-top:1px solid #e4e7ec;background:white;}
.ogl-dispatch-dialog{overflow-y:auto;overscroll-behavior:contain;}
.ogl-shipping-checks{border:1px solid #dbe3ef;border-radius:10px;margin:0 0 16px;background:#fff;}
.ogl-shipping-check-head,.ogl-shipping-check-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;}
.ogl-shipping-check-head{background:#f4f7fc;border-radius:10px 10px 0 0;}
.ogl-shipping-check-row{border-top:1px solid #edf0f5;min-width:0;}
.ogl-shipping-check-row>span{min-width:0;overflow-wrap:anywhere;}
.ogl-shipping-check-row>div{display:grid;gap:5px;text-align:right;max-width:65%;}
.ogl-shipping-check-row small{font-size:12px;color:#667085;overflow-wrap:anywhere;}
.ogl-shipping-badge{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;padding:5px 10px;border-radius:6px;font-size:12px;line-height:1.5;background:#fff5df;color:#795300;vertical-align:middle;}
.ogl-shipping-badge b{font-weight:650;}
.ogl-shipping-badge>span{border-left:1px solid currentColor;padding-left:8px;}
.ogl-shipping-badge.is-dropoff{background:#edf3ff;color:#2459b8;}
.ogl-shipping-badge.is-pickup{background:#e8f7f1;color:#0f7153;}
.ogl-dispatch td>small{display:block;margin-top:5px;}
.ogl-shipping-check-head button{min-height:36px;white-space:nowrap;}
@media(max-width:560px){
 .ogl-shipping-check-head,.ogl-shipping-check-row{padding:10px;gap:8px;}
 .ogl-shipping-check-row{align-items:flex-start;flex-direction:column;}
 .ogl-shipping-check-row>div{max-width:100%;text-align:left;}
 .ogl-dispatch-dialog .modal-actions{position:sticky;bottom:0;z-index:1;padding:12px;}
 .ogl-dispatch-dialog .modal-actions>button{width:100%;min-height:44px;}
 .ogl-dispatch-dialog .modal-head h3{font-size:18px;}
}
.ogl-dispatches{padding:0;background:transparent;}
.ogl-dispatch-heading{margin-top:12px;}
.ogl-dispatch header>div{display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
.ogl-dispatch header span{margin-left:0;}
.ogl-dispatch table{font-size:12px;}
.ogl-dispatch .table-wrap{overflow-x:auto;}
@media(max-width:900px){
 .ogl-workspace-heading span{display:block;margin:5px 0 0;}
 .ogl-workspace-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
 .ogl-dispatch-body{grid-template-columns:1fr;}
 .ogl-workspace-heading,.ogl-dispatch-heading,.ogl-dispatch header{align-items:flex-start;flex-direction:column;}
 .ogl-batch-group-actions{flex-wrap:wrap;}
}

/* Scan photo controls and persistent delivery feedback. */
.scan-label-adjustments {display:grid; gap:8px; padding:10px 0;}
.scan-label-adjustments label {display:flex; align-items:center; gap:12px;}
.scan-label-adjustments input[type=range] {flex:1; min-width:60px; padding:0;}
.scan-label-adjustments output {width:48px; font-variant-numeric:tabular-nums;}
#scanLabelExposure {font-size:12px; color:#64748b;}
.scan-label-crop {width:min(900px,96vw); max-height:94dvh; overflow:auto;}
.scan-label-crop__viewport {display:flex; justify-content:center; min-height:0; padding:12px; background:#eef1f5;}
.scan-label-crop__surface {position:relative; display:inline-flex; touch-action:none; user-select:none; cursor:crosshair; overflow:hidden;}
.scan-label-crop__surface img {display:block; width:auto; height:auto; max-width:100%; max-height:60dvh; object-fit:contain; pointer-events:none;}
#scanLabelCropSelection {display:none; position:absolute; outline:2px solid #fff; box-shadow:0 0 0 9999px #10182880; background:#ffffff15; pointer-events:none;}
#scanLabelCropStatus {padding:10px 0; font-variant-numeric:tabular-nums;}
#scanMissingSendStatus[data-delivery] {padding:12px; border-radius:10px; background:#eef2f6; box-shadow:0 2px 10px #172b4d0a;}
#scanMissingSendStatus[data-delivery=sent] {background:#eaf5ee;}
#scanMissingSendStatus[data-delivery=sent] .scan-missing-delivery__headline {color:#236442; font-size:18px;}
#scanMissingSendStatus[data-delivery=attention] .scan-missing-delivery__headline {color:#8b4a25;}

#scanLabelCameraModal video {max-height:40dvh; object-fit:contain;}
/* Additional courier receipts are advisory and remain accessible at later stages. */
.shipment-receipt-warning { display: block; white-space: normal; line-height: 1.5; max-width: 100%; }
.shipment-receive-action { justify-self: start; margin-top: 3px; }

/* Keep purchase and cancelled-order transit independently readable. */
#appView .rf-stock-card__metrics, .stock-card-settings-quantities { grid-template-columns:repeat(2,minmax(0,1fr)); }
#appView .inventory-history-product__metrics { flex-wrap:wrap; gap:12px 20px; }
#appView .workspace[data-view="scanDesk"] .scan-stock-card__quantity { grid-template-columns:88px minmax(0,1fr); }

/* Order inventory quantity opens the existing stock adjustment dialog. */
:is(#appView, .order-processing-body) .order-inventory-card button.order-inventory-card__stock-adjust {
  display:inline-flex; align-items:baseline; min-height:24px; padding:2px 3px;
  border:0; border-radius:4px; background:transparent; box-shadow:none;
  color:inherit; font:inherit; vertical-align:baseline; cursor:pointer;
}
:is(#appView, .order-processing-body) .order-inventory-card button.order-inventory-card__stock-adjust:hover {
  background:rgba(23,92,211,.08);
}
:is(#appView, .order-processing-body) .order-inventory-card button.order-inventory-card__stock-adjust:focus-visible {
  outline:2px solid #175cd3; outline-offset:2px;
}

/* One media viewer for order proofs and customer conversations. */
.erp-media-viewer__stage[data-media-state="ready"]{width:calc(100dvw - 32px);height:calc(100dvh - 144px);overflow:hidden}
.erp-media-viewer__image{cursor:grab;touch-action:none;transition:opacity .16s ease;max-height:min(calc(100dvh - 160px),820px)}
.erp-media-viewer__image:active{cursor:grabbing}
.erp-media-viewer__meta{align-items:center;gap:4px;padding:6px 8px;bottom:20px}
.erp-media-viewer__meta button{border:0;box-shadow:none;min-height:36px;border-radius:5px;background:transparent;color:#fff;padding:6px 10px;font-size:12px;white-space:nowrap}
.erp-media-viewer__meta button:hover{background:#ffffff1a}.erp-media-viewer__meta button:focus-visible{outline:2px solid #93c5fd;outline-offset:1px}
.erp-media-viewer__count{padding:0 8px;color:#aab8cb}.erp-media-viewer__close{opacity:1}
@media(max-width:640px){.erp-media-viewer__meta{bottom:70px;padding:5px;gap:0}.erp-media-viewer__meta button{min-height:40px;padding:5px 8px}.erp-media-viewer__count{padding:0 5px}.erp-media-viewer__stage[data-media-state="ready"]{height:calc(100dvh - 200px)}.erp-media-viewer__image{max-height:calc(100dvh - 212px)}}
/* Fulfilment warnings must remain prominent above the quiet order metadata. */
body :is(#appView .workspace[data-view], .order-processing-body) .order-card.order-card--enterprise .order-head .order-critical-alert {
  display:inline-flex; align-items:center; gap:6px; flex:0 0 auto;
  padding:3px 9px 3px 6px; border:0; border-radius:6px;
  background:#fff0f0; color:#b42318; font-size:12px; line-height:20px;
  font-weight:700; white-space:nowrap; vertical-align:middle;
}
body :is(#appView .workspace[data-view], .order-processing-body) .order-card.order-card--enterprise .order-head .order-critical-alert strong {
  color:inherit; font-size:inherit; line-height:inherit; font-weight:700;
}
body :is(#appView .workspace[data-view], .order-processing-body) .order-card.order-card--enterprise .order-head .order-critical-alert-icon {
  display:block; flex:0 0 18px; width:18px; height:18px; color:#d92d20;
}

/* Receipt text occupies the flexible column beside its thumbnail. */

.statement-order-copy-row { display:flex; align-items:flex-start; gap:4px; }
.statement-order-copy-row .statement-order-copy { flex:0 0 24px; width:24px; height:24px; min-height:24px; padding:0; display:grid; place-items:center; border:0; border-radius:4px; background:transparent; color:#7b8799; }
.statement-order-copy-row .statement-order-copy:hover { background:#edf3ff; color:#2563eb; }
.scan-inbound-card__product > .product-cell { min-width:0; }
.product-cell > .inbound-review-product-details { min-width:0; overflow-wrap:anywhere; }

.existing-card-shelf-filters {display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:8px;min-width:0;}


.ogl-shipping-choice{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}.ogl-shipping-choice button{min-height:38px;white-space:nowrap;font-size:12px;}.ogl-shipping-choice button[aria-checked="true"]{color:#1856c9;background:#eef4ff;border-color:#1856c9;box-shadow:inset 0 0 0 1px #1856c9;}.ogl-shipping-type-tabs{flex-wrap:wrap;}@media(max-width:560px){.ogl-shipping-choice{justify-content:flex-start;}.ogl-shipping-choice button{min-height:44px;}}

/* OGL operator workspace: one user, one decision area. */
#oglDispatchDialog .ogl-dispatch-dialog{width:min(960px,calc(100vw - 40px));max-height:90dvh;padding:0;overflow:hidden;border-radius:18px;box-shadow:0 24px 80px #10182833;background:#f7f9fc;}
#oglDispatchDialog .modal-head{padding:22px 28px;margin:0;background:#fff;border-bottom:1px solid #e5e9f0;align-items:center;flex-shrink:0;}
#oglDispatchDialog .modal-head h3{margin:4px 0 0;font-size:22px;line-height:1.4;letter-spacing:-.4px;}
.ogl-dialog-eyebrow{font-size:12px;color:#667085;font-weight:600;}
.ogl-dialog-toolbar{display:flex;align-items:center;justify-content:space-between;padding:14px 28px;color:#667085;font-size:13px;flex-shrink:0;gap:12px;}
.ogl-dialog-toolbar button{background:transparent;border:0;color:#245bc7;font-size:13px;}
#oglDispatchDialog .ogl-dispatch-body{display:flex;flex-direction:column;gap:16px;padding:0 28px 22px;overflow:auto;min-height:0;overscroll-behavior:contain;}
#oglDispatchDialog .ogl-customer-plan{padding:0;background:#fff;border:1px solid #dfe5ed;border-radius:12px;flex-shrink:0;overflow:hidden;}
.ogl-customer-plan-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;background:#fff;border-bottom:1px solid #edf0f5;}
#oglDispatchDialog .ogl-customer-check{margin:0;gap:10px;font-size:16px;}
.ogl-customer-meta{display:block;margin:5px 0 0 28px;font-size:12px;color:#667085;}
.ogl-user-bag-count{display:flex;align-items:center;gap:12px;color:#475467;font-size:13px;white-space:nowrap;}
#oglDispatchDialog .ogl-user-bag-count input{width:76px;height:40px;margin:0;border-radius:8px;text-align:center;font-size:16px;font-weight:600;}
.ogl-user-shop{display:grid;grid-template-columns:minmax(130px,1fr) minmax(300px,1.4fr);align-items:center;gap:20px;padding:16px 20px;border-bottom:1px solid #f0f2f6;}
.ogl-user-shop-name{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap;font-size:14px;}
.ogl-user-shop-name strong{overflow-wrap:anywhere;}.ogl-user-shop-name span{font-size:12px;color:#667085;}
#oglDispatchDialog .ogl-shipping-choice{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
#oglDispatchDialog .ogl-shipping-choice button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border-radius:8px;border:1px solid #d8e0eb;background:white;color:#475467;font-size:13px;box-shadow:none;}
#oglDispatchDialog .ogl-shipping-choice small{font-size:11px;color:inherit;opacity:.8;}
#oglDispatchDialog .ogl-shipping-choice button[aria-checked="true"]{border-color:#2563eb;background:#eff5ff;color:#175cd3;}
#oglDispatchDialog .ogl-shipping-choice button:disabled{opacity:.55;cursor:default;}
.ogl-shipping-result{min-height:18px;margin-top:5px;font-size:12px;color:#667085;text-align:right;overflow-wrap:anywhere;}
.ogl-shipping-result.is-ready{color:#16815d;}.ogl-shipping-result.is-error{color:#b42318;}
.ogl-user-total{padding:10px 20px;background:#f9fafc;text-align:right;font-size:12px;color:#475467;font-variant-numeric:tabular-nums;}
.ogl-customer-plan.is-excluded .ogl-user-shops,.ogl-customer-plan.is-excluded .ogl-user-bag-count{opacity:.45;}
.ogl-oversize-detail{padding:10px 20px;}
#oglDispatchDialog .modal-actions{position:static;margin:0;padding:18px 28px;background:white;display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #dfe5ed;flex-shrink:0;}
#oglDispatchDialog #oglPlanSummary{font-size:13px;line-height:1.6;color:#475467;flex:1;min-width:180px;}
#oglDispatchDialog #oglSavePlan{min-height:44px;padding:0 28px;border-radius:9px;font-weight:600;}
.ogl-operation-status:empty,.ogl-workspace-hint:empty{display:none;}
.ogl-batch-create-tools{gap:10px;align-items:center;}.ogl-batch-create-tools .ogl-batch-create-button{min-width:128px;}
.ogl-batch-workspace-tabs{gap:6px;border-bottom:1px solid #e4e7ec;padding-bottom:8px;}
.ogl-batch-workspace-tabs button{border-radius:8px;min-height:40px;padding:8px 18px;}
.ogl-batch-workspace .ogl-workspace-heading{padding:0 0 14px;}
.ogl-batch-group-card{border-radius:12px;}.ogl-batch-group-actions{gap:8px;}
#oglDispatchDialog button:focus-visible,#oglDispatchDialog input:focus-visible{outline:2px solid #2563eb;outline-offset:3px;}
@media(max-width:640px){
 #oglDispatchDialog .ogl-dispatch-dialog{width:calc(100vw - 20px);max-height:94dvh;border-radius:14px;}
 #oglDispatchDialog .modal-head{padding:18px 16px;}#oglDispatchDialog .modal-head h3{font-size:20px;}
 .ogl-dialog-toolbar{padding:12px 16px;}#oglDispatchDialog .ogl-dispatch-body{padding:0 12px 16px;gap:12px;}
 .ogl-customer-plan-head{padding:14px 12px;gap:10px;}.ogl-user-bag-count{gap:7px;font-size:12px;}
 .ogl-user-shop{grid-template-columns:1fr;gap:10px;padding:14px 12px;}.ogl-shipping-result{text-align:left;}
 .ogl-user-total{padding:10px 12px;}#oglDispatchDialog .modal-actions{padding:14px 16px;gap:10px;}
 #oglDispatchDialog #oglSavePlan{width:100%;}.ogl-customer-check strong{overflow-wrap:anywhere;}
 .ogl-workspace-heading{flex-direction:row;align-items:center;}.ogl-batch-workspace-tabs button{padding:8px 12px;}
}

.ogl-batch-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.ogl-batch-sub-tabs{display:flex;justify-content:flex-end;border:0;margin:10px 0;padding:0;}
.ogl-batch-sub-tabs label{display:flex;align-items:center;gap:10px;color:#667085;font-size:12px;margin:0;}
.ogl-batch-sub-tabs select{width:132px;min-height:36px;font-size:13px;border-radius:8px;background:white;}

/* Important shipment requirements stay visible across order stages. */
.important-shipment-notice { margin: 6px 0 10px; padding: 10px; border-left: 3px solid #d92d20; border-radius: 4px; background: #fff4ed; color: #912018; }
.important-shipment-notice strong { display:block; font-size:13px; margin-bottom:6px; }
.important-shipment-notice div { white-space:pre-wrap; overflow-wrap:anywhere; max-height:180px; overflow:auto; }
.important-shipment-notice button { margin-top:6px; color:#b42318; }
.erp-dialog-copy { white-space:pre-wrap; overflow-wrap:anywhere; max-height:55vh; overflow:auto; }
