:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #17253d;
  --muted: #718198;
  --line: #e5ebf3;
  --primary: #1167d8;
  --primary-dark: #0b51b0;
  --danger: #bd3543;
  --radius-sm: 8px;
  --shadow: 0 10px 28px rgba(20, 38, 62, .06);
}

/* Main sourcing runtime: one operational view for all three collection modes. */
.product-operations-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: -4px 0 14px;
  padding: 0 2px;
  border-bottom: 1px solid var(--border);
}

.product-operations-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 13px;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.product-operations-tabs a:hover,
.product-operations-tabs a.active {
  color: var(--primary);
}

.product-operations-tabs a.active {
  border-bottom-color: var(--primary);
}

.runtime-dispatch-gate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-left: 3px solid #b7791f;
  background: #fff8e8;
}

.runtime-dispatch-gate > i {
  color: #8a5a05;
  font-size: 18px;
}

.runtime-dispatch-gate strong,
.runtime-dispatch-gate small {
  display: block;
}

.runtime-dispatch-gate strong {
  font-size: 12px;
}

.runtime-dispatch-gate small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.runtime-capacity-band {
  margin-bottom: 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.runtime-capacity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.runtime-capacity-heading h2 {
  margin: 0;
  font-size: 15px;
}

.runtime-capacity-heading small,
.runtime-capacity-heading > span {
  color: var(--text-secondary);
  font-size: 11px;
}

.runtime-capacity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.runtime-capacity-item {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.runtime-capacity-item:last-child {
  border-right: 0;
}

.runtime-capacity-title,
.runtime-capacity-counts {
  display: flex;
  align-items: center;
}

.runtime-capacity-title {
  justify-content: space-between;
  gap: 10px;
}

.runtime-capacity-title strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-capacity-counts {
  gap: 16px;
  margin: 10px 0 6px;
  color: var(--text-secondary);
  font-size: 11px;
}

.runtime-capacity-counts span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.runtime-capacity-counts b {
  color: var(--text-main);
  font-size: 18px;
}

.runtime-capacity-item > small {
  display: block;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-capacity-item > .runtime-capacity-meta {
  margin-top: 3px;
}

.runtime-capacity-item > .runtime-capacity-wait {
  margin-top: 3px;
  color: #8a5a05;
}

.runtime-task-manager {
  overflow: hidden;
}

.runtime-task-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.7fr) repeat(3, minmax(140px, 1fr)) auto auto;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.runtime-task-filters > * {
  min-width: 0;
}

.runtime-task-table {
  min-width: 1180px;
  table-layout: fixed;
}

.runtime-task-table th:nth-child(1) { width: 230px; }
.runtime-task-table th:nth-child(2) { width: 150px; }
.runtime-task-table th:nth-child(3) { width: 165px; }
.runtime-task-table th:nth-child(4) { width: 185px; }
.runtime-task-table th:nth-child(5) { width: 155px; }
.runtime-task-table th:nth-child(6) { width: 220px; }
.runtime-task-table th:nth-child(7) { width: 105px; }

.runtime-task-table td {
  height: 72px;
  vertical-align: top;
}

.runtime-task-table td > strong,
.runtime-task-table td > a,
.runtime-task-table td > span,
.runtime-task-table td > small {
  display: block;
  min-width: 0;
}

.runtime-task-table td > a,
.runtime-task-table td > span,
.runtime-task-table td > strong {
  overflow: hidden;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-task-table td > a {
  color: var(--primary);
}

.runtime-task-table td > small {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.runtime-task-status {
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 4px;
  background: #eef3f9;
}

.runtime-state-queued .runtime-task-status { color: #8a5a05; background: #fff1c9; }
.runtime-state-running .runtime-task-status { color: #0758d1; background: #e9f2ff; }
.runtime-state-awaiting_human .runtime-task-status { color: #9a4d00; background: #ffe8ce; }
.runtime-state-blocked .runtime-task-status { color: #a11b1b; background: #ffe2e2; }
.runtime-state-settled .runtime-task-status { color: #0a6f3c; background: #e0f6ea; }

.runtime-task-table .row-action-buttons {
  align-items: flex-start;
}

.runtime-task-table .mini-button {
  min-height: 30px;
  padding: 0 9px;
}

.runtime-task-empty td {
  height: 110px;
  color: var(--text-secondary);
  text-align: center;
  vertical-align: middle;
}

.runtime-task-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 1100px) {
  .runtime-task-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .runtime-task-filters > :first-child {
    grid-column: span 2;
  }
}

@media (min-width: 761px) and (max-width: 1450px) {
  .runtime-task-table-scroll {
    overflow-x: hidden;
  }
  .runtime-task-table,
  .runtime-task-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .runtime-task-table thead {
    display: none;
  }
  .runtime-task-table tr {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    background: #fff;
  }
  .runtime-task-table td {
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 6px 8px;
    border: 0;
  }
  .runtime-task-table td::before {
    display: block;
    margin-bottom: 3px;
    color: #7a8799;
    content: attr(data-label);
    font-size: 9px;
    font-weight: 750;
  }
  .runtime-task-table td:nth-child(1) {
    grid-column: span 2;
  }
  .runtime-task-table td:nth-child(6) {
    grid-column: span 3;
  }
  .runtime-task-table .row-action-buttons {
    justify-content: flex-start;
  }
  .runtime-task-empty {
    display: block !important;
  }
  .runtime-task-empty td {
    padding: 28px 12px;
  }
}

@media (max-width: 760px) {
  .product-operations-tabs {
    overflow-x: auto;
  }
  .product-operations-tabs a {
    flex: 0 0 auto;
  }
  .runtime-dispatch-gate {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .runtime-dispatch-gate > a {
    grid-column: 2;
    width: max-content;
  }
  .runtime-capacity-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .runtime-capacity-grid {
    grid-template-columns: 1fr;
  }
  .runtime-capacity-item,
  .runtime-capacity-item:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .runtime-capacity-item:last-child {
    border-bottom: 0;
  }
  .runtime-task-filters,
  .runtime-task-filters > :first-child {
    grid-template-columns: 1fr 1fr;
    grid-column: auto;
  }
  .runtime-task-filters > input {
    grid-column: 1 / -1;
  }
  .runtime-task-table-scroll {
    overflow-x: hidden;
  }
  .runtime-task-table,
  .runtime-task-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .runtime-task-table thead {
    display: none;
  }
  .runtime-task-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: #fff;
  }
  .runtime-task-table td {
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 7px 8px;
    border: 0;
  }
  .runtime-task-table td::before {
    display: block;
    margin-bottom: 3px;
    color: #7a8799;
    content: attr(data-label);
    font-size: 9px;
    font-weight: 750;
  }
  .runtime-task-table td:nth-child(1),
  .runtime-task-table td:nth-child(4),
  .runtime-task-table td:nth-child(5),
  .runtime-task-table td:nth-child(6),
  .runtime-task-table td:nth-child(7) {
    grid-column: 1 / -1;
  }
  .runtime-task-table .row-action-buttons {
    justify-content: flex-start;
  }
  .runtime-task-empty {
    display: block !important;
  }
  .runtime-task-empty td {
    padding: 28px 12px;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.25; margin-top: 3px; }
h2 { font-size: 18px; }
small, .muted { color: var(--muted); }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand strong { display: block; font-size: 16px; }
.brand small { display: block; font-size: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  color: white; font-size: 22px; font-weight: 700;
  background: linear-gradient(145deg, #1167d8, #43b7db);
}
.link-button {
  border: 0; background: transparent; color: var(--primary);
  padding: 0; cursor: pointer; font: inherit;
}
.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 18px 12px; background: #10245a; color: #dce7ff;
  box-shadow: 12px 0 30px rgba(16, 36, 90, .13); z-index: 20;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 11px; padding: 5px 8px 18px;
  margin-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.sidebar-brand strong { display: block; color: #fff; font-size: 15px; }
.sidebar-brand small { display: block; color: rgba(220, 231, 255, .7); font-size: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 10px; flex: 1; overflow-y: auto; padding: 4px 0; }
.nav-group { display: grid; gap: 5px; }
.nav-group-label {
  display: block; padding: 8px 10px 2px; color: rgba(220, 231, 255, .48);
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
}
.side-nav a {
  display: flex; align-items: center; gap: 10px; min-height: 42px;
  padding: 9px 10px; border-radius: 8px; color: rgba(229, 238, 255, .82);
  font-weight: 600; transition: background .16s, color .16s;
}
.side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-nav a.active {
  background: #1d63ff; color: #fff; box-shadow: 0 8px 18px rgba(29, 99, 255, .28);
}
.nav-icon {
  display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px;
  border-radius: 7px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 700;
}
.side-nav a.active .nav-icon { background: rgba(255, 255, 255, .18); }
.sidebar-account {
  display: grid; gap: 8px; margin-top: 12px; padding: 12px;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px;
  background: rgba(6, 16, 43, .22); color: rgba(229, 238, 255, .78);
}
.sidebar-account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account .link-button { justify-self: start; color: #fff; font-weight: 700; }
.container { width: min(1200px, calc(100% - 44px)); margin: 34px auto 60px; }
.container.app-main { width: min(1280px, calc(100% - 44px)); margin-top: 28px; }
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; gap: 20px;
}
.page-head > div { min-width: 0; }
.page-head small {
  display: block;
  max-width: 720px;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}
.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.eyebrow {
  font-size: 12px; color: var(--primary); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.button {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--primary); border-radius: 8px; padding: 9px 16px;
  background: var(--primary); color: white; font: inherit; font-weight: 700; cursor: pointer;
  min-height: 42px; white-space: nowrap;
  transition: background .16s, border-color .16s, box-shadow .16s, transform .16s;
}
.button:hover { background: var(--primary-dark); box-shadow: 0 6px 16px rgba(17, 103, 216, .16); }
.button:active { transform: translateY(1px); }
.button:disabled,
.mini-button:disabled {
  cursor: wait; opacity: .68; pointer-events: none;
}
.button.secondary { color: var(--primary); background: white; }
.button.secondary:hover { background: #f4f8ff; }
.button.danger { background: var(--danger); border-color: var(--danger); }
.button.is-disabled {
  cursor: not-allowed;
  pointer-events: none;
  color: #71819a;
  border-color: #d6e0ec;
  background: #eef3f8;
  box-shadow: none;
}
.button.is-disabled:hover {
  color: #71819a;
  border-color: #d6e0ec;
  background: #eef3f8;
  box-shadow: none;
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; box-shadow: var(--shadow);
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px;
  padding: 18px 20px; box-shadow: var(--shadow);
}
.stat span, .stat small { display: block; }
.stat strong { display: block; font-size: 32px; margin: 5px 0 1px; }
.dashboard-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; margin-bottom: 18px; }
.workflow-panel { margin-bottom: 18px; }
.workflow-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 12px;
}
.workflow-step {
  min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #f8fbff; color: var(--ink);
}
.workflow-step span, .workflow-step small { display: block; color: var(--muted); }
.workflow-step strong {
  display: block; margin: 5px 0 2px; font-size: 22px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-title {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px;
}
.follow-row {
  display: flex; justify-content: space-between; align-items: center; color: var(--ink);
  padding: 13px 0; border-top: 1px solid var(--line);
}
.follow-row div small { display: block; }
.follow-row time { color: var(--muted); }
.follow-row.overdue time { color: var(--danger); font-weight: 600; }
.stage-row { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); }
.lead-grid { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.lead-flow-bridge {
  margin: 0 0 16px; padding: 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: var(--shadow);
}
.lead-flow-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.lead-flow-head h2 { margin: 2px 0 4px; font-size: 18px; }
.lead-flow-head small { color: var(--muted); line-height: 1.45; }
.lead-flow-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.lead-flow-card {
  display: block; min-width: 0; padding: 11px 12px;
  border: 1px solid #dfe7f2; border-radius: 8px;
  background: #f8fafc; color: var(--ink);
}
a.lead-flow-card:hover,
.lead-flow-card.active {
  border-color: #b8cbe5; box-shadow: 0 8px 20px rgba(15, 36, 66, .08);
}
.lead-flow-card strong,
.lead-flow-card span,
.lead-flow-card small {
  display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lead-flow-card strong { font-size: 22px; line-height: 1.1; }
.lead-flow-card span { margin-top: 5px; font-size: 13px; font-weight: 800; color: #30415a; }
.lead-flow-card small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.lead-flow-start { border-color: #efd9ad; background: #fffaf0; }
.lead-flow-task { border-color: #c9dbff; background: #f4f8ff; }
.lead-flow-review { border-color: #f0c8cd; background: #fff6f7; }
.lead-flow-done { border-color: #bfe3ec; background: #f1fbfd; }
.lead-grid > *,
.lead-create form > *,
.lead-create .lead-form-row > *,
.source-card {
  min-width: 0;
}
.lead-create .field { margin-bottom: 15px; }
.lead-note { margin: -8px 0 19px; }
.lead-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.lead-checkbox { min-height: 45px; align-items: center; margin-bottom: 15px; }
.lead-sources { display: block; }
.source-checkboxes {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 8px;
}
.source-checkboxes:has(.lead-source-group) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.lead-source-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d9e4f1;
  border-radius: 12px;
  background: #f7fbff;
}
.lead-source-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e1eaf5;
}
.lead-source-group-head strong {
  font-size: 14px;
  line-height: 1.25;
}
.lead-source-group-head small {
  color: #65758c;
  font-size: 12px;
  white-space: nowrap;
}
.lead-source-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.source-card {
  display: grid; grid-template-columns: 22px 32px minmax(0, 1fr) auto; gap: 10px;
  align-items: center; min-height: 54px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: #f8fbff;
  color: var(--ink); cursor: pointer; transition: border-color .16s, background .16s;
}
.source-card:hover { border-color: #bdd1ec; background: #fff; }
.source-card input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.source-check-placeholder { width: 16px; height: 16px; border: 1px solid #c9d4e4; border-radius: 3px; background: #fff; }
.source-icon {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 8px; background: #eef5ff; font-size: 18px;
}
.source-body { min-width: 0; }
.source-body strong {
  display: block; line-height: 1.25; overflow: hidden; text-overflow: ellipsis;
}
.source-body small { display: block; margin-top: 3px; line-height: 1.25; }
.source-body em {
  display: block; margin-top: 5px; color: #53657e; font-size: 12px;
  font-style: normal; line-height: 1.3; overflow: hidden; text-overflow: ellipsis;
}
.source-card.disabled {
  opacity: .55; cursor: not-allowed; background: #f4f6f9;
}
.source-card-preview {
  cursor: default;
}
.source-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 4px 7px;
  border: 1px solid #cad6e6;
  border-radius: 999px;
  color: #60728a;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.source-card-bind { cursor: default; }
.source-card-bind:hover { border-color: var(--line); background: #f8fbff; }
.mini-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 72px; padding: 7px 10px; border: 1px solid var(--primary);
  border-radius: 8px; background: #fff; color: var(--primary);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.inline-delete-form,
.inline-post-form { display: inline-flex; margin: 0; }
.mini-button.warn-mini,
.button.warn-action {
  border-color: #e9c472; color: #7a4e00; background: #fff8e7;
}
.mini-button.warn-mini:hover,
.button.warn-action:hover {
  border-color: #d79b1f; background: #fff2cc;
}
.mini-button.danger-mini { border-color: #fecaca; color: var(--danger); background: #fff7f7; }
.mini-button.danger-mini:hover { border-color: var(--danger); background: #fff1f1; }
.location-picker {
  border: 1px solid var(--line); border-radius: 10px; background: #f8fbff;
  padding: 12px;
}
.location-picker-compact {
  padding: 10px;
}
.location-picker-compact .field {
  margin-bottom: 0;
}
.location-scope-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.location-scope-tab {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d5dfed;
  border-radius: 10px;
  background: #fff;
  color: #26435f;
  text-align: left;
  cursor: pointer;
}
.location-scope-tab strong,
.location-scope-tab small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-scope-tab strong {
  color: #102647;
  font-size: 13px;
  line-height: 1.25;
}
.location-scope-tab small {
  margin-top: 2px;
  color: #60748f;
  font-size: 11px;
  line-height: 1.25;
}
.location-scope-tab.is-active {
  border-color: #2563eb;
  background: #eaf2ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}
.location-picker.is-global-scope .location-grid,
.location-picker.is-region-scope .location-grid {
  opacity: .92;
}
.location-picker.is-global-scope .location-country-toggle,
.location-picker.is-region-scope .location-country-toggle {
  background: #f2f6fb;
  color: #52647b;
  cursor: not-allowed;
}
.location-select-grid,
.location-grid,
.location-unified-grid { display: grid; grid-template-columns: minmax(150px, 0.78fr) minmax(220px, 1fr); gap: 10px; }
.location-inline-field { margin-bottom: 0; }
.location-region-bar {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: end;
  margin-bottom: 10px;
}
.location-region-field { margin-bottom: 0; }
.location-region-field select { min-height: 38px; }
.location-city-chip {
  border: 1px solid #d5dfed; border-radius: 8px; background: #fff; color: #27415f;
  cursor: pointer; font-size: 12px; font-weight: 700;
}
.location-city-chip.is-selected {
  border-color: #2563eb; background: #eaf2ff; color: #174ea6;
}
.location-inline-field select[multiple] {
  min-height: 124px;
  padding: 8px;
}
.location-country-dropdown {
  position: relative;
}
.location-country-toggle {
  width: 100%;
  min-height: 40px;
  padding: 9px 36px 9px 12px;
  border: 1px solid #d5dfed;
  border-radius: 10px;
  background: #fff;
  color: #17314f;
  text-align: left;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.location-country-toggle::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 10px;
  color: #546780;
}
.location-country-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #cfdbee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(17, 37, 64, .18);
}
.location-country-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  color: #17314f;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.location-country-option:hover {
  background: #eef5ff;
}
.location-country-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--primary);
}
.location-inline-field select,
.location-region-field select,
.location-inline-field > input:not([type="checkbox"]) {
  width: 100%;
  max-width: 100%;
}
.location-custom-country {
  margin-top: 8px;
  color: #52647b;
  font-size: 13px;
}
.location-custom-country summary {
  width: max-content;
  cursor: pointer;
  font-weight: 800;
  color: #355170;
}
.location-custom-country input {
  width: min(100%, 360px);
  margin-top: 8px;
}
.location-city-panel {
  margin-top: 10px; padding: 10px; border: 1px solid #dde7f3; border-radius: 10px; background: #fff;
}
.location-city-head {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px;
}
.location-city-head strong { font-size: 13px; }
.location-city-head small { color: var(--muted); font-size: 12px; }
.location-city-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.location-city-chip { padding: 7px 9px; }
.location-city-other { border-style: dashed; color: #5f7085; }
.location-city-custom {
  margin-top: 10px;
  border-top: 1px solid #edf2f8;
  padding-top: 8px;
}
.location-city-custom summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  color: #355170;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}
.location-city-custom summary::-webkit-details-marker {
  display: none;
}
.location-city-custom summary::after {
  content: "展开";
  padding: 2px 7px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  color: #48617d;
  background: #fff;
  font-size: 11px;
}
.location-city-custom[open] summary::after {
  content: "收起";
}
.location-city-custom summary small {
  color: #65758c;
  font-weight: 700;
}
.location-city-custom input {
  width: 100%;
  margin-top: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d5dfed;
  border-radius: 8px;
}
.location-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.location-actions .button { padding: 9px 12px; }
.location-helper { margin-top: 8px; color: var(--muted); font-size: 13px; }
.location-selected { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.location-tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px;
  border-radius: 8px; background: #eaf2ff; color: var(--ink); font-size: 13px;
}
.location-tag button {
  padding: 0 4px; border: 0; background: transparent; font-weight: 700;
  color: var(--ink); cursor: pointer;
}
.lead-jobs { padding: 20px; }
.lead-jobs table { font-size: 13px; }
.lead-jobs td { padding: 12px 8px; }
.lead-location { display: block; margin-top: 4px; color: var(--muted); }
.lead-job-sample-decision {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 6px 8px;
  line-height: 1.45;
}
.lead-filter { align-items: center; }
.lead-filter strong { flex: 1; font-size: 18px; }
.lead-period-panel {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 15px 18px; margin-bottom: 16px;
}
.lead-period-panel strong { display: block; font-size: 16px; }
.lead-period-panel small { display: block; margin-top: 2px; }
.period-tabs {
  display: inline-flex; flex: 0 0 auto; gap: 8px; align-items: center;
  width: auto; overflow: visible;
}
.period-tab {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; padding: 8px 13px; border: 1px solid var(--line);
  border-radius: 8px; color: #53657e; background: #fff; font-weight: 600;
}
.period-tab.active {
  color: #fff; background: var(--primary); border-color: var(--primary);
}
.lead-score {
  display: inline-flex; min-width: 45px; justify-content: center; border-radius: 100px;
  padding: 4px 10px; font-weight: 700;
}
.score-high { color: #087443; background: #def7e8; }
.score-mid { color: #a05a00; background: #fff0d5; }
.score-low { color: #53657e; background: #eef3f9; }
.lead-row-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 8px; min-width: 198px; }
.lead-row-actions form { margin: 0; }
.lead-row-actions .mini-button { min-width: 40px; padding: 6px 8px; }
.lead-ai-background { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lead-ai-background-button {
  min-height: 30px; height: 30px; padding: 0 11px; margin: 0; border-radius: 7px; font-size: 12px;
}
.ai-usage-hint {
  display: inline-flex; align-items: center; max-width: 210px; min-height: 24px; padding: 0 8px;
  border: 1px solid #d8e4f2; border-radius: 999px; background: #f8fbff; color: #53657e;
  font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-usage-hint.ok { color: #0d6a4a; background: #e9f8ef; border-color: #bfe8cf; }
.ai-usage-hint.warn { color: #8a5a05; background: #fff5d8; border-color: #f1d28a; }
.ai-usage-hint.off { color: #6b7788; background: #f2f5f9; border-color: #d8e0ea; }
.ai-usage-hint.compact { max-width: 180px; }
.lead-ai-background-status { display: inline-block; color: var(--muted); font-size: 12px; white-space: nowrap; }
.lead-ai-background-status.error { color: var(--danger); }
.lead-ai-detail-row.is-empty { display: none; }
.lead-ai-detail-row td {
  padding-top: 0;
  border-top: 0;
  background: #f8fbff;
  position: sticky;
  left: 0;
  z-index: 2;
}
.lead-ai-detail-panel {
  margin: 0 0 12px 54px;
  width: min(980px, calc(100vw - 340px));
  min-width: 640px;
  max-width: none;
}
.lead-ai-background-result {
  margin-top: 0; padding: 12px 14px; border: 1px solid #d6e3f2; border-radius: 8px; background: #fff;
  box-shadow: 0 8px 24px rgba(32, 64, 110, 0.06);
}
.lead-ai-background-head { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
.lead-ai-score {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px;
  border-radius: 7px; color: #0f5fca; background: #eaf2ff; font-size: 12px; font-weight: 800;
}
.lead-ai-background-head strong { color: #26354d; font-size: 13px; white-space: nowrap; }
.lead-ai-background-head small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ai-evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #d8e4f2;
  border-radius: 999px;
  background: #f8fbff;
  color: #53657e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.ai-evidence-badge b { font-weight: 900; }
.ai-evidence-badge em {
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: normal;
  font-weight: 700;
  color: inherit;
  opacity: .82;
}
.ai-evidence-ok { background: #e9f8ef; border-color: #bfe8cf; color: #0d6a4a; }
.ai-evidence-limited { background: #fff5d8; border-color: #f1d28a; color: #8a5a05; }
.ai-evidence-review { background: #f3f6fb; border-color: #d8e0ea; color: #53657e; }
.ai-evidence-danger { background: #fce9ea; border-color: #f1b9bf; color: #a62c38; }
.lead-ai-background-result p { margin: 8px 0 0; color: #25354d; font-size: 13px; line-height: 1.55; }
.lead-ai-background-result ul {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 18px; margin: 10px 0 0; padding-left: 18px; color: #4e617c; font-size: 12px; line-height: 1.5;
}
.lead-ai-recommendation { display: block; margin-top: 10px; color: #0d6a4a; font-size: 13px; line-height: 1.5; }
.customer-ai-background { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.customer-ai-background .card-title { margin-bottom: 12px; }
.customer-ai-background-empty {
  padding: 12px 14px; border: 1px dashed #d6e0ec; border-radius: 8px; color: var(--muted); background: #fbfcfe;
  font-size: 13px;
}
.customer-ai-background-result {
  padding: 13px 14px; border: 1px solid #d6e3f2; border-radius: 8px; background: #fff;
  box-shadow: 0 8px 24px rgba(32, 64, 110, 0.06);
}
.customer-ai-background-result > p { margin: 9px 0 0; color: #25354d; font-size: 13px; line-height: 1.58; }
.customer-ai-background-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px 13px; margin-top: 12px;
}
.customer-ai-background-grid div {
  padding: 10px 11px; border: 1px solid #e3ebf5; border-radius: 8px; background: #f8fbff;
}
.customer-ai-background-grid small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.customer-ai-background-grid p { margin: 0; color: #26354d; font-size: 12px; line-height: 1.5; }
.customer-ai-list { margin-top: 12px; }
.customer-ai-list strong { color: #26354d; font-size: 13px; }
.customer-ai-list ul {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 18px; margin: 7px 0 0; padding-left: 18px; color: #4e617c; font-size: 12px; line-height: 1.5;
}
.customer-ai-list.risk ul { color: #8a5a05; }

.ai-model-usage-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px;
}
.ai-model-usage-strip div {
  padding: 12px 13px; border: 1px solid #dbe6f4; border-radius: 10px; background: #f8fbff;
}
.ai-model-usage-strip small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.ai-model-usage-strip strong { display: block; color: #17233a; font-size: 14px; line-height: 1.35; }
.email-check {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 58px; border-radius: 999px; padding: 5px 10px;
  font-weight: 700; font-size: 13px; white-space: nowrap;
}
.email-check-valid { color: #087443; background: #def7e8; }
.email-check-risk { color: #a05a00; background: #fff0d5; }
.email-check-invalid { color: #bd3543; background: #ffe4e8; }
.email-check-unknown { color: #53657e; background: #eef3f9; }
.email-check-none { color: #718198; background: #f2f5f9; }
.lead-convert { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.lead-results-table {
  min-width: 1240px;
  table-layout: fixed;
}
.lead-results-table .lead-col-company { width: 22%; }
.lead-results-table .lead-col-website { width: 18%; }
.lead-results-table .lead-col-contact { width: 17%; }
.lead-results-table .lead-col-score { width: 180px; }
.lead-results-table .lead-col-email-check { width: 190px; }
.lead-results-table .lead-col-status { width: 190px; }
.lead-results-table .lead-col-action { width: 160px; }
.lead-results-table td { vertical-align: middle; }
.lead-results-table td:nth-child(1),
.lead-results-table td:nth-child(2),
.lead-results-table td:nth-child(3) {
  overflow-wrap: anywhere;
}
.score-parts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 7px;
}
.score-parts span {
  display: flex; align-items: center; justify-content: space-between;
  gap: 5px; padding: 4px 6px; border-radius: 6px;
  background: #f2f6fb; color: #53657e; font-size: 12px;
}
.score-parts b { color: var(--ink); font-size: 12px; }
.lead-filter input[name="min_score"] { max-width: 96px; }
.container.app-main:has(.product-match-layout) {
  width: min(1520px, calc(100% - 44px));
}
.container.app-main:has(.product-match-plugin-page) {
  width: min(1240px, calc(100% - 44px));
}
.product-match-layout {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px;
}
.product-match-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.product-plugin-panel {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 18px; box-shadow: var(--shadow);
}
.product-flow-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  margin: -2px 0 14px;
}
.product-flow-strip span {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 9px 10px; border: 1px solid #dfe9f6; border-radius: 8px;
  background: #f8fbff; color: #53657e; font-size: 12px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-flow-strip b {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 7px;
  background: #eaf2ff; color: var(--primary); font-size: 12px;
}
.product-plugin-decision {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: -4px 0 14px;
}
.product-plugin-decision span {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dce7f3;
  border-radius: 8px;
  background: #fff;
}
.product-plugin-decision strong {
  display: block;
  color: #183b65;
  font-size: 12px;
}
.product-plugin-decision small {
  display: block;
  margin-top: 3px;
  color: #5f7088;
  font-size: 12px;
  line-height: 1.35;
}
.product-plugin-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.product-plugin-entry {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 104px; padding: 16px; border: 1px solid var(--line); border-radius: 10px;
  background: #f8fbff; color: var(--ink); text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.product-plugin-entry:hover {
  border-color: #9ec0ef; box-shadow: 0 10px 24px rgba(15, 36, 66, .08); transform: translateY(-1px);
}
.product-plugin-entry.primary {
  background: #f3f8ff; border-color: #bdd4f5;
}
.product-plugin-entry .source-icon {
  width: 42px; height: 42px; border-radius: 10px;
}
.product-plugin-entry strong,
.product-plugin-entry small,
.product-plugin-entry em {
  display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.product-plugin-entry strong { font-size: 15px; }
.product-plugin-entry small { margin-top: 3px; color: var(--muted); }
.product-plugin-entry em {
  margin-top: 7px; color: #315d9a; font-size: 12px; font-style: normal; white-space: nowrap;
}
.product-plugin-entry b {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 50px; height: 32px; border-radius: 8px;
  background: #fff; color: var(--primary); font-size: 13px;
}
.product-match-plugin-page {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
}
.miaoshou-plain-platform-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
}
.miaoshou-plain-platform-list li {
  min-width: 0;
  padding: 6px 8px;
  border: 1px dashed #d5e2f0;
  border-radius: 8px;
  background: #fbfdff;
  color: #37516d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.miaoshou-plain-platform-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}
.product-match-plugin-form-card .card-title { margin-bottom: 14px; }
.product-match-create h2 { margin-bottom: 8px; }
.product-match-note { margin-bottom: 18px; }
.product-match-run-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: start;
}
.product-match-target-fields {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.product-match-target-fields .field { min-width: 0; }
.product-match-run-form > input[type="hidden"] { display: none; }
.form-hint {
  margin: -2px 0 14px; color: var(--muted); font-size: 13px;
}
.form-hint.is-loading {
  color: var(--primary); font-weight: 700;
}
.is-submitting {
  opacity: .82;
}
.product-match-create .field { margin-bottom: 15px; }
.product-match-run-form .field { margin-bottom: 0; }
.product-match-run-form .lead-sources,
.product-match-run-form .form-hint,
.product-match-run-form .form-actions,
.product-match-run-form .button {
  grid-column: 1 / -1;
}
.product-match-run-form .form-hint { margin: 0; }
.product-match-run-form .button { justify-self: start; }
.product-match-run-form .form-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
.product-match-create textarea { min-height: 92px; resize: vertical; }
.product-collect-mode-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 10px;
}
.product-channel-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 16px;
}
.miaoshou-source-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px;
}
.miaoshou-source-group-title {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-top: 2px;
  padding: 4px 2px 0;
  color: #183b65;
}
.miaoshou-source-group-title strong {
  font-size: 13px;
}
.miaoshou-source-group-title small {
  color: #64748b;
  line-height: 1.4;
  text-align: right;
}
.miaoshou-platform-note {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 14px; border: 1px solid #cfe0f5; border-radius: 8px;
  background: #f4f9ff;
}
.miaoshou-platform-note strong,
.miaoshou-platform-note small {
  display: block;
}
.miaoshou-platform-note strong { font-size: 14px; color: #183b65; }
.miaoshou-platform-note small { margin-top: 3px; color: #52657c; line-height: 1.45; }
.miaoshou-platform-tags {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; justify-content: flex-end;
}
.miaoshou-platform-tags span {
  display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px;
  border: 1px solid #bfd7f2; border-radius: 999px; background: #fff; color: #205f9f;
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.miaoshou-target-details {
  grid-column: 1 / -1;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.miaoshou-target-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 13px;
  cursor: pointer;
  list-style: none;
  color: #183b65;
  font-weight: 800;
}
.miaoshou-target-details summary::-webkit-details-marker { display: none; }
.miaoshou-target-details summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eef6ff;
  color: #205f9f;
  font-size: 16px;
  line-height: 1;
}
.miaoshou-target-details[open] summary::after { content: "-"; }
.miaoshou-target-details summary small {
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.miaoshou-target-details .field {
  margin: 0;
  padding: 0 13px 13px;
}
.miaoshou-target-helper {
  margin: 0 13px 13px;
  padding: 10px 12px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fbff;
}
.miaoshou-target-helper strong {
  display: block;
  margin-bottom: 6px;
  color: #183b65;
  font-size: 13px;
}
.miaoshou-target-helper .miaoshou-platform-tags {
  justify-content: flex-start;
}
.product-collect-mode-card,
.product-channel-card {
  min-height: 76px; padding: 10px 12px;
}
.product-collect-mode-card {
  grid-template-columns: 22px 36px minmax(0, 1fr) auto;
}
.product-channel-card {
  grid-template-columns: 22px 34px minmax(0, 1fr);
}
.miaoshou-platform-card {
  grid-template-columns: 22px 34px minmax(0, 1fr) auto;
  background: #fff; border-color: #d6e3f2; opacity: 1;
  min-height: 88px;
}
.miaoshou-platform-card:not(.disabled):hover {
  border-color: #8eb9f5; background: #f8fbff;
}
.miaoshou-platform-card.is-ready {
  border-color: #bdd7f2; background: #fbfdff; color: var(--ink);
}
.miaoshou-platform-card.is-default,
.miaoshou-platform-card:has(input:checked) {
  border-color: #3478d8; background: #edf6ff; box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .14), 0 8px 20px rgba(15, 73, 145, .08);
}
.miaoshou-platform-card.is-amazon-source {
  border-color: #256fd5; background: #f2f8ff; opacity: 1;
}
.miaoshou-platform-card.disabled {
  opacity: .56; background: #f4f6f9; color: #8796a8;
}
.product-collect-mode-card:has(input:checked),
.product-channel-card:has(input:checked) {
  border-color: #4b8ce8; background: #edf6ff; box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .12), 0 8px 20px rgba(15, 73, 145, .08);
}
.miaoshou-platform-card.is-default .source-icon,
.miaoshou-platform-card:has(input:checked) .source-icon {
  background: #dbeafe; color: #174a8b;
}
.miaoshou-platform-card.is-amazon-source .source-icon {
  background: #d7ecff; color: #124b83;
}
.product-collect-mode-card .source-icon,
.product-channel-card .source-icon,
.miaoshou-platform-card .source-icon {
  font-size: 13px; font-weight: 800;
}
.product-collect-mode-card .source-icon { width: 36px; }
.product-collect-mode-card .source-status-pill,
.miaoshou-platform-card .source-status-pill {
  min-width: 46px; border-color: #bfd3ee; color: #2360a5; background: #eef6ff;
}
.miaoshou-platform-card.is-ready .source-status-pill {
  border-color: #b7dccd; color: #176145; background: #ecfdf5;
}
.miaoshou-platform-card.is-default .source-status-pill,
.miaoshou-platform-card:has(input:checked) .source-status-pill {
  border-color: #8eb9f5; color: #0f4f8f; background: #dbeafe;
}
.miaoshou-platform-card.is-amazon-source .source-status-pill {
  border-color: #88b9ef; color: #0f4f8f; background: #e4f1ff;
}
.miaoshou-platform-card.disabled .source-status-pill {
  border-color: #d2d9e4; color: #7f8fa3; background: #fff;
}
.product-collect-mode-card .source-body small,
.product-channel-card .source-body small,
.miaoshou-platform-card .source-body small {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-collect-mode-card .source-body em,
.product-channel-card .source-body em,
.miaoshou-platform-card .source-body em {
  white-space: nowrap;
}
.source-overview-panel { margin-bottom: 18px; }
.source-overview-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.source-overview-card {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 16px; box-shadow: var(--shadow);
}
.source-overview-head {
  display: flex; gap: 10px; align-items: center; min-width: 0; margin-bottom: 12px;
}
.source-overview-head strong,
.source-overview-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-overview-card p {
  margin-bottom: 5px; color: var(--ink); font-size: 20px; font-weight: 800;
}
.source-overview-card > small { display: block; overflow-wrap: anywhere; }
.product-job-focus {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px; margin-bottom: 18px;
}
.product-job-image {
  display: grid; place-items: center; min-height: 190px;
  border: 1px solid var(--line); border-radius: 12px; background: #f4f7fb;
  color: var(--muted); overflow: hidden;
}
.product-job-image img {
  width: 100%; height: 100%; max-height: 230px; object-fit: contain; display: block;
}
.product-job-detail dl {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0 0 14px;
}
.product-job-detail dl div {
  min-width: 0; border-top: 1px solid var(--line); padding-top: 8px;
}
.product-job-detail dt { color: var(--muted); }
.product-job-detail dd {
  margin: 2px 0 0; color: var(--ink); overflow-wrap: anywhere;
}
.product-job-log {
  margin: 0; padding: 12px 14px 12px 28px; border-radius: 10px;
  background: #f8fbff; color: #53657e;
}
.product-job-log li + li { margin-top: 4px; }
.local-browser-task-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border-color: #cbd7e5;
  background: #fbfcfe;
}
.local-browser-task-overview { display: grid; gap: 12px; }
.local-browser-task-overview dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
  margin: 0;
}
.local-browser-task-overview dl div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dce3ec;
  border-radius: 6px;
  background: #fff;
}
.local-browser-task-overview dt { color: var(--muted); font-size: 11px; }
.local-browser-task-overview dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 750;
  overflow-wrap: anywhere;
}
.local-browser-task-overview > p { margin: 0; color: #52627a; line-height: 1.5; }
.local-browser-stage-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.local-browser-stage-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #dce3ec;
  border-radius: 6px;
  background: #fff;
}
.local-browser-stage-list li > i { flex: 0 0 auto; color: #718198; font-size: 17px; }
.local-browser-stage-list li > span { display: grid; min-width: 0; gap: 2px; }
.local-browser-stage-list strong,
.local-browser-stage-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-browser-stage-list small { color: var(--muted); font-size: 11px; }
.local-browser-stage-list li.completed { border-color: #bddbc7; background: #f3f9f5; }
.local-browser-stage-list li.completed > i { color: #2f7a4f; }
.local-browser-stage-list li.active { border-color: #8eb9f5; background: #f2f7ff; }
.local-browser-stage-list li.active > i { color: #1167d8; }
.local-browser-recovery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e7cf96;
  border-radius: 6px;
  background: #fff9eb;
}
.local-browser-recovery > div { display: grid; gap: 5px; min-width: 0; }
.local-browser-recovery strong { display: flex; align-items: center; gap: 6px; color: #77500f; }
.local-browser-recovery span { color: #6f6247; font-size: 12px; line-height: 1.5; }
.local-browser-recovery .button { white-space: nowrap; }
.local-browser-error { display: block; color: #a11b1b; }
.job-progress {
  display: grid; gap: 6px; min-width: 150px;
}
.job-progress-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--muted); font-size: 12px;
}
.job-progress-status {
  display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px;
  border-radius: 999px; color: var(--primary); background: #eaf2ff; font-weight: 800;
}
.job-progress-head strong { color: var(--ink); font-size: 12px; }
.job-progress-track {
  width: 100%; height: 8px; border-radius: 999px; overflow: hidden;
  background: #eaf0f8;
}
.job-progress-fill {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #1167d8, #28a4db);
  transition: width .25s ease;
}
.job-progress-latest {
  display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.job-progress-meta {
  color: var(--muted);
  display: block;
  font-size: 12px;
}
.product-job-table-scroll table { min-width: 980px; }
.product-job-table-main,
.product-job-table-source,
.product-job-table-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.product-job-table-main { min-width: 100px; max-width: 132px; }
.product-job-table-main strong {
  color: var(--muted);
  font-size: 11px;
}
.product-job-table-main a,
.product-job-table-source strong {
  color: var(--ink);
  font-weight: 750;
}
.product-job-table-source { min-width: 128px; }
.product-job-table-source small,
.product-job-table-stack span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.product-job-stage-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(60px, 1fr));
  gap: 4px;
  min-width: 210px;
}
.product-job-stage-summary.is-local { grid-template-columns: minmax(90px, 120px); min-width: 120px; }
.product-job-stage-summary span {
  display: grid;
  align-content: center;
  min-height: 56px;
  padding: 6px 8px;
  border: 1px solid #dce3ec;
  border-radius: 6px;
  background: #f8fafc;
}
.product-job-stage-summary span.is-done {
  border-color: #b9d8c5;
  background: #f2f8f4;
}
.product-job-stage-summary span.is-waiting {
  border-color: #e7cf96;
  background: #fff9eb;
}
.product-job-stage-summary small,
.product-job-stage-summary em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.25;
}
.product-job-stage-summary strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
}
.product-job-stage-summary > b {
  grid-column: 1 / -1;
  color: #9a6412;
  font-size: 11px;
  font-weight: 750;
}
.product-job-stage-summary > b.is-complete { color: #2f7a4f; }
.product-job-stage-summary > b.is-empty { color: var(--muted); }
.product-match-results { margin-top: 18px; }
.product-match-results-primary { margin-top: 0; }
.product-result-title {
  gap: 14px; align-items: flex-start;
}
.product-result-title > div { min-width: 0; }
.product-match-empty-state,
.product-empty-state,
.order-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 18px;
}
.product-match-empty-state strong,
.product-empty-state strong,
.order-empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}
.product-match-empty-state span,
.product-empty-state span,
.order-empty-state span {
  display: block;
  max-width: 560px;
  line-height: 1.5;
}
.product-match-empty-actions,
.product-empty-actions,
.order-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}
.order-empty-cell {
  background: #fff;
}
.product-review-queue {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 14px;
}
.product-review-queue-item {
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 9px 10px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fbff;
  color: #1f3857;
}
.product-review-queue-item:hover {
  border-color: #9fc2ee;
  background: #f1f7ff;
}
.product-review-queue-item.active {
  border-color: #3478d8;
  background: #edf6ff;
  box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .12);
}
.product-review-queue-item b,
.product-review-queue-item span,
.product-review-queue-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-review-queue-item b {
  color: #0f4f8f;
  font-size: 20px;
  line-height: 1.05;
}
.product-review-queue-item span {
  font-size: 13px;
  font-weight: 850;
}
.product-review-queue-item small {
  color: #65758c;
  font-size: 12px;
}
.product-match-group-nav {
  display: flex;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 2px 0 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.product-match-group-tab {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  flex: 0 0 228px;
  min-width: 0;
  min-height: 58px;
  padding: 7px 9px;
  border: 1px solid #d7e1ec;
  border-radius: 8px;
  background: #fff;
  color: #203a58;
  text-decoration: none;
}
.product-match-group-tab:hover { border-color: #91aac4; background: #f8fafc; }
.product-match-group-tab.active {
  border-color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
}
.product-match-group-thumb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 6px;
  background: #edf2f7;
  color: #45627f;
  font-size: 17px;
  font-weight: 800;
}
.product-match-group-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-match-group-tab > span:last-child,
.product-match-group-tab strong,
.product-match-group-tab small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-match-group-tab strong { font-size: 13px; }
.product-match-group-tab small { margin-top: 4px; color: #66788d; font-size: 11px; }
.product-match-ops-details {
  margin-top: 18px;
}
.product-selected-job-details {
  margin: 12px 0 14px;
}
.product-selected-job-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid #d9e5f2;
  border-radius: 8px;
  background: #f8fbff;
  color: #183b65;
  cursor: pointer;
  list-style: none;
}
.product-selected-job-details > summary::-webkit-details-marker { display: none; }
.product-selected-job-details > summary span,
.product-selected-job-details > summary strong,
.product-selected-job-details > summary small { display: block; min-width: 0; }
.product-selected-job-details > summary span { overflow: hidden; }
.product-selected-job-details > summary strong,
.product-selected-job-details > summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-selected-job-details > summary strong { font-size: 14px; }
.product-selected-job-details > summary small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.product-selected-job-details > summary b {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 12px;
}
.product-selected-job-details > summary .product-selected-job-summary-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  overflow: visible;
}
.product-selected-job-summary-state i {
  font-size: 16px;
  transition: transform .16s ease;
}
.product-selected-job-details[open] .product-selected-job-summary-state i { transform: rotate(180deg); }
.product-selected-job-body { display: grid; gap: 12px; padding-top: 12px; }
.product-match-ops-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #d9e5f2;
  border-radius: 8px;
  background: #f8fbff;
  color: #183b65;
  cursor: pointer;
  list-style: none;
  font-weight: 850;
}
.product-match-ops-details summary::-webkit-details-marker { display: none; }
.product-match-ops-details summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--primary);
  font-size: 16px;
  line-height: 1;
}
.product-match-ops-details[open] summary::after { content: "-"; }
.product-match-ops-details summary span,
.product-match-ops-details summary small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-match-ops-details summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.product-match-ops-body {
  display: grid;
  gap: 18px;
  padding-top: 14px;
}
.product-match-ops-layout {
  margin-bottom: 0;
}
.product-match-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.product-match-card {
  display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  transition: border-color .16s, box-shadow .16s;
}
.product-match-card:hover {
  border-color: #b9cce3; box-shadow: 0 8px 20px rgba(15, 36, 66, .07);
}
.product-match-card-summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 11px 0;
}
.product-match-card-heading {
  min-width: 0;
}
.product-match-image {
  position: relative; display: grid; place-items: center;
  width: 88px; height: 88px; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 6px;
  background: #f8fafc; color: var(--muted); cursor: zoom-in;
}
.product-match-image img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center;
}
.product-match-image-conflict { border-color: #d97706; }
.product-match-image-unverified { border-color: #cbd5e1; background: #f1f5f9; }
.product-match-image-unverified img { opacity: .58; }
.product-match-image .product-match-image-warning {
  position: absolute; right: 4px; bottom: 4px; z-index: 1;
  padding: 2px 5px; border-radius: 4px;
  background: rgba(146, 64, 14, .92); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1.3;
}
.product-match-image-disabled { cursor: default; }
.product-match-image-disabled span { padding: 8px; font-size: 12px; text-align: center; }
.product-match-body {
  position: relative; z-index: 1; display: flex; flex: 1; flex-direction: column;
  padding: 9px 11px 11px; background: #fff;
}
.match-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 7px; max-height: 46px; overflow: hidden; }
.match-badges span {
  display: inline-flex; padding: 3px 6px; border-radius: 999px;
  background: #eaf2ff; color: var(--primary); font-size: 11px; font-weight: 700;
}
.product-match-card-heading h3 {
  min-height: 42px; margin: 0; font-size: 14px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-match-body dl {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  margin: 0 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.product-match-body dl div {
  display: grid; gap: 2px; min-width: 0; padding: 7px;
  border-right: 1px solid var(--line);
}
.product-match-body dl div:first-child { padding-left: 0; }
.product-match-body dl div:last-child { padding-right: 0; border-right: 0; }
.product-match-body dt { color: var(--muted); font-size: 11px; }
.product-match-body dd {
  margin: 0; min-width: 0; overflow: hidden; color: var(--ink); font-size: 12px;
  text-overflow: ellipsis; white-space: nowrap;
}
.product-match-body > small {
  display: -webkit-box; overflow: hidden; color: var(--muted); line-height: 1.7;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.product-match-body > small:empty { display: none; }
.same-product-evidence {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.same-product-evidence summary {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  color: #334155;
  cursor: pointer;
  list-style: none;
}
.same-product-evidence summary::-webkit-details-marker { display: none; }
.same-product-evidence summary > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}
.same-product-evidence summary > b {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef3f8;
  color: #52647a;
  font-size: 10px;
  font-weight: 800;
}
.same-product-evidence summary > b.is-ready { background: #e5f7ec; color: #087443; }
.same-product-evidence summary > b.is-conflict { background: #fde7ea; color: #b42338; }
.same-product-evidence summary > b.is-pending { background: #fff0cb; color: #8b5a00; }
.same-product-evidence-chevron {
  flex: 0 0 auto;
  color: #65758c;
  transition: transform .16s ease;
}
.same-product-evidence[open] .same-product-evidence-chevron { transform: rotate(180deg); }
.same-product-evidence-body {
  display: grid;
  gap: 8px;
  padding: 2px 0 9px;
}
.same-product-evidence-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.same-product-evidence-thumb {
  position: relative;
  display: grid;
  width: 100%;
  height: 70px;
  min-width: 0;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  color: var(--muted);
  cursor: zoom-in;
}
.same-product-evidence-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.same-product-evidence-thumb > span {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 1;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(15, 36, 66, .82);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.same-product-evidence-thumb.is-empty {
  cursor: default;
}
.same-product-evidence-thumb.is-empty > span {
  position: static;
  background: transparent;
  color: #52647a;
}
.same-product-evidence-thumb.is-empty > small {
  color: var(--muted);
  font-size: 10px;
}
.same-product-evidence-signals {
  display: grid;
  gap: 5px;
}
.same-product-signal-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}
.same-product-signal-row > strong {
  padding-top: 3px;
  color: #52647a;
  font-size: 10px;
}
.same-product-signal-row > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
}
.same-product-signal-row span {
  display: inline-flex;
  max-width: 100%;
  padding: 2px 5px;
  border-radius: 3px;
  background: #eef3f8;
  color: #40536d;
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.same-product-signal-row span.is-match { background: #e5f7ec; color: #087443; }
.same-product-signal-row span.is-missing { background: #fff0cb; color: #8b5a00; }
.same-product-signal-row span.is-conflict { background: #fde7ea; color: #b42338; }
.same-product-signal-row span.is-empty { color: var(--muted); }
.same-product-evidence-body > small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.product-match-next {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center;
  gap: 3px 7px; margin: 8px 0; padding: 7px 8px;
  border: 1px solid #dfe8f4;
  border-radius: 6px;
  background: #f8fbff;
}
.product-match-next span,
.product-match-next strong,
.product-match-next small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-match-next span {
  grid-row: 1 / span 2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.product-match-next strong {
  color: #243956;
  font-size: 12px;
}
.product-match-next small {
  color: #65758c;
  font-size: 11px;
}
.product-match-next-confirmed_candidate_not_in_library {
  border-color: #f0c8cd;
  background: #fff6f7;
}
.product-match-next-review_ready,
.product-match-next-review_or_enrich {
  border-color: #efd9ad;
  background: #fffaf0;
}
.product-match-next-weak_candidate {
  border-color: #d9e2ef;
  background: #f8fafc;
}
.product-match-filter { flex-wrap: wrap; margin: 0 0 16px; padding: 0; box-shadow: none; border: 0; }
.product-match-filter select { min-width: 150px; }
.product-match-card-footer {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 7px;
}
.product-match-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.product-match-card-actions .button,
.match-open-link,
.match-library-link {
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 8px 10px;
}
.product-match-card-actions .button {
  justify-content: center;
  text-align: center;
}
.match-evidence-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.match-evidence-actions .mini-button {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 32px;
}
.match-evidence-refresh-form { margin: 0; }
.match-conflict-resolution {
  width: 100%;
  border-top: 1px solid #dce4ee;
  padding-top: 8px;
}
.match-conflict-resolution > summary {
  width: max-content;
  list-style: none;
  cursor: pointer;
}
.match-conflict-resolution > summary::-webkit-details-marker { display: none; }
.match-conflict-resolution > div {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.match-conflict-resolution form {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(200px, 1.1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px 0 0;
  border-top: 1px dashed #dce4ee;
}
.match-conflict-resolution label { margin: 0; }
.match-conflict-resolution label span {
  display: block;
  margin-bottom: 4px;
  color: #65758c;
  font-size: 11px;
  font-weight: 700;
}
.match-conflict-resolution select,
.match-conflict-resolution input {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 12px;
}
.match-refresh-receipt {
  max-width: 100%;
}
.match-refresh-receipt > summary {
  list-style: none;
  cursor: pointer;
}
.match-refresh-receipt > summary::-webkit-details-marker { display: none; }
.match-refresh-history {
  width: min(520px, 100%);
  margin: 7px 0 0;
  padding: 0;
  border-left: 3px solid #9eb3cc;
  background: #f6f8fb;
  list-style: none;
}
.match-refresh-history li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid #e1e7ef;
}
.match-refresh-history li:last-child { border-bottom: 0; }
.match-refresh-history li > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 7px;
  min-width: 0;
}
.match-refresh-history strong,
.match-refresh-history span {
  font-size: 12px;
}
.match-refresh-history small {
  grid-column: 1 / -1;
  color: #526279;
  font-size: 11px;
  line-height: 1.5;
}
.match-refresh-history form { margin: 0; }
.match-refresh-history .row-action-buttons { flex: 0 0 auto; }
.match-library-link.is-disabled {
  color: #8a98aa;
  border-color: #d9e1ec;
  background: #f5f7fa;
}
.miaoshou-card-action {
  margin-top: 0;
}
.miaoshou-create-form.compact {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.miaoshou-create-form.compact .field {
  margin: 0;
}
.miaoshou-create-form.compact .field span {
  font-size: 11px;
}
.miaoshou-create-form.compact select,
.miaoshou-create-form.compact .button {
  min-height: 36px;
  padding: 7px 10px;
}
.miaoshou-create-form.compact small {
  grid-column: 1 / -1;
  display: block;
  line-height: 1.4;
}
.product-match-hover-preview {
  position: fixed;
  z-index: 80;
  width: min(420px, calc(100vw - 32px));
  height: min(420px, calc(100vh - 32px));
  padding: 8px;
  border: 1px solid #c9d7e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 31, 51, .28);
  pointer-events: none;
}
.product-match-hover-preview[hidden] { display: none; }
.product-match-hover-preview img {
  display: block; width: 100%; height: 100%; object-fit: contain;
}
.product-match-lightbox img {
  display: block; max-width: min(94vw, 1500px); max-height: 91vh;
  object-fit: contain; background: #fff;
}
.match-review-form {
  display: grid; grid-template-columns: minmax(108px, 1fr) auto; gap: 8px; margin-top: 0;
}
.match-review-form select { padding: 8px 10px; }
.match-review-form .button { padding: 8px 12px; }
.inline-status-form {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 166px;
}
.inline-status-form select { padding: 8px 10px; }
.inline-status-form .button { padding: 8px 11px; white-space: nowrap; }
.filters { display: flex; gap: 12px; margin-bottom: 18px; padding: 16px; }
.filters .button { white-space: nowrap; }
input, select, textarea {
  width: 100%; border: 1px solid #d8e0eb; border-radius: 8px;
  padding: 10px 12px; background: white; color: var(--ink); font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(17, 103, 216, .17); border-color: var(--primary);
}
.filters input { flex: 1; }
.filters select { width: 180px; }
.email-locked .locked-filter input,
.email-locked .locked-filter select {
  width: 100%;
}
.table-card { padding: 20px 22px; }
.table-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.table-actions .order-sync-form {
  display: inline-flex;
  margin: 0;
}
.table-actions .order-sync-form .button {
  min-height: 36px;
  padding: 0 12px;
}
.row-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; min-width: 136px; }
.row-action-buttons form { margin: 0; }
.email-job-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 228px; }
.email-job-row-actions form { margin: 0; }
.email-job-row-actions .mini-button,
.email-job-row-actions .button { min-width: 40px; padding: 6px 8px; }
.danger-mini { border-color: #f0c5cb; color: var(--danger); }
.bulk-email-button { padding: 8px 14px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; }
td { padding: 14px 12px; border-top: 1px solid var(--line); }
.select-cell { width: 56px; text-align: center; }
.select-cell input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.customer-name { display: block; font-weight: 600; color: var(--ink); }
.customer-name + small { display: block; }
.customer-tags { max-width: 180px; word-break: break-word; color: #4e617c; }
.customer-follow-bridge {
  margin: 0 0 16px; padding: 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: var(--shadow);
}
.customer-bridge-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.customer-bridge-head h2 { margin: 2px 0 4px; font-size: 18px; }
.customer-bridge-head small { color: var(--muted); line-height: 1.45; }
.customer-stage-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.customer-stage-card {
  display: block; min-width: 0; padding: 11px 12px;
  border: 1px solid #dfe7f2; border-radius: 8px;
  background: #f8fafc; color: var(--ink);
}
a.customer-stage-card:hover,
.customer-stage-card.active {
  border-color: #b8cbe5; box-shadow: 0 8px 20px rgba(15, 36, 66, .08);
}
.customer-stage-card strong,
.customer-stage-card span,
.customer-stage-card small {
  display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.customer-stage-card strong { font-size: 22px; line-height: 1.1; }
.customer-stage-card span { margin-top: 5px; font-size: 13px; font-weight: 800; color: #30415a; }
.customer-stage-card small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.customer-stage-profile { border-color: #efd9ad; background: #fffaf0; }
.customer-stage-due { border-color: #f0c8cd; background: #fff6f7; }
.customer-stage-order { border-color: #c9dbff; background: #f4f8ff; }
.customer-stage-intent { border-color: #bfe3ec; background: #f1fbfd; }
.customer-list-table {
  min-width: 1760px;
  table-layout: fixed;
}
.customer-list-table td {
  vertical-align: middle;
  padding-top: 12px;
  padding-bottom: 12px;
}
.customer-list-table th,
.customer-list-table td {
  overflow: hidden;
}
.customer-col-select { width: 56px; }
.customer-col-name { width: 260px; }
.customer-col-contact { width: 220px; }
.customer-col-country { width: 84px; }
.customer-col-stage { width: 92px; }
.customer-col-tags { width: 340px; }
.customer-col-last { width: 220px; }
.customer-col-next { width: 108px; }
.customer-col-email { width: 128px; }
.customer-col-owner { width: 140px; }
.customer-col-action { width: 260px; }
.customer-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 198px;
}
.customer-row-actions form {
  margin: 0;
}
.customer-row-actions .mini-button {
  min-width: 40px;
  padding: 6px 8px;
}
.customer-row-actions .mini-button.follow-due {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}
.customer-row-actions .mini-button.follow-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 800;
}
.customer-row-actions .mini-button.follow-snooze {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
.customer-latest-activity {
  min-width: 0;
}
.customer-latest-activity strong,
.customer-latest-activity small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-latest-activity strong {
  color: var(--ink);
  font-size: 13px;
}
.customer-latest-activity small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.customer-latest-activity.is-empty strong {
  color: var(--muted);
}
.customer-list-table .customer-name,
.customer-list-table .customer-name + small,
.customer-list-table td:not(.customer-tag-cell) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.customer-list-table .customer-name,
.customer-list-table .customer-name + small {
  white-space: nowrap;
}
.customer-tag-cell {
  max-width: 340px;
  word-break: normal;
}
.customer-tag-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  align-items: flex-start;
}
.customer-compact-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.customer-tag-chip,
.customer-tag-more {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 104px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1e5bb8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.customer-tag-more {
  flex: 0 0 auto;
  max-width: none;
  background: #f3f6fb;
  color: #5f6e86;
}
.products-title { margin: 7px 0 16px; }
.product-library-bridge {
  margin: 0 0 16px; padding: 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: var(--shadow);
}
.library-bridge-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.library-bridge-head h2 { margin: 2px 0 4px; font-size: 18px; }
.library-bridge-head small { color: var(--muted); }
.library-flow-strip { margin: 0 0 12px; }
.library-readiness-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
}
.library-readiness-card {
  display: block; min-width: 0; padding: 11px 12px; border: 1px solid #dfe7f2;
  border-radius: 8px; background: #f8fafc; color: inherit; text-decoration: none;
}
a.library-readiness-card:hover,
.library-readiness-card.active {
  border-color: #9dbbea;
  box-shadow: 0 8px 20px rgba(15, 36, 66, .08);
}
.library-readiness-card.active {
  outline: 2px solid rgba(52, 120, 216, .14);
}
.library-readiness-card strong,
.library-readiness-card span,
.library-readiness-card small {
  display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.library-readiness-card strong { font-size: 22px; line-height: 1.1; color: var(--ink); }
.library-readiness-card span { margin-top: 5px; font-size: 13px; font-weight: 800; color: #30415a; }
.library-readiness-card small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.library-readiness-ready { border-color: #bce8d0; background: #f1fbf5; }
.library-readiness-draft { border-color: #d6dce7; background: #f7f8fa; }
.library-readiness-quote { border-color: #c9dbff; background: #f4f8ff; }
.library-readiness-blocked { border-color: #f0c8cd; background: #fff6f7; }
.library-readiness-pending { border-color: #efd9ad; background: #fffaf0; }
.product-list-actions {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px;
}
.product-select-all {
  display: inline-flex; align-items: center; gap: 6px; color: #4e617c; font-size: 13px; font-weight: 700;
}
.product-select-all input,
.product-row-select input {
  width: 17px; height: 17px; margin: 0; accent-color: var(--primary); cursor: pointer;
}
.product-list-actions .mini-button:disabled {
  cursor: not-allowed; opacity: .48;
}
.product-list {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px;
}
.product-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; padding: 8px 10px;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; transition: border-color .18s, box-shadow .18s;
}
.product-row:hover {
  border-color: #c1d2e8; box-shadow: 0 8px 24px rgba(15, 36, 66, .08);
}
.product-row-select {
  display: grid; place-items: center; align-self: stretch; min-height: 82px;
}
.product-row-link {
  display: grid; grid-template-columns: 82px minmax(220px, 1.7fr) minmax(120px, 1fr) minmax(132px, 1.05fr) minmax(82px, .6fr) 66px;
  align-items: center; gap: 14px; min-width: 0; color: var(--ink);
}
.product-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(68px, 1fr));
  align-items: stretch;
  gap: 7px;
  min-width: 156px;
}
.product-row-actions .mini-button,
.product-row-delete {
  align-self: stretch;
  min-width: 0;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  white-space: nowrap;
}
.product-row-primary-action {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}
.product-row-assets-action {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 800;
}
.product-row-detail-action {
  border-color: #d8e4f2;
  color: #425675;
  background: #fff;
}
.product-row-image {
  display: grid; place-items: center; width: 82px; height: 82px;
  color: var(--muted); background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.product-row-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-row-main { min-width: 0; }
.product-model { color: var(--muted); margin-bottom: 5px; }
.product-row h3 { font-size: 15px; line-height: 1.3; margin: 3px 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-category { color: var(--muted); font-size: 13px; }
.product-row-readiness {
  display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%;
  margin-top: 7px;
}
.product-row-readiness small {
  min-width: 0; color: #5f7088; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-readiness-chip {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; min-width: 0; max-width: 112px; height: 24px;
  padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-readiness-ready { color: #087443; background: #def7e8; }
.product-readiness-draft { color: #48586d; background: #e9edf3; }
.product-readiness-asset { color: #7049c8; background: #f3eaff; }
.product-readiness-logistics { color: #a26900; background: #fff2d9; }
.product-readiness-blocked { color: #a62c38; background: #fce9ea; }
.product-readiness-neutral { color: #53657e; background: #eef3f9; }
.product-detail-readiness {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 14px; padding: 12px 14px; border: 1px solid #dbe6f3;
  border-radius: 8px; background: #f8fbff;
}
.product-detail-readiness div { min-width: 0; }
.product-detail-readiness span,
.product-detail-readiness strong,
.product-detail-readiness small { display: block; min-width: 0; }
.product-detail-readiness span {
  color: var(--muted); font-size: 12px; font-weight: 800;
}
.product-detail-readiness strong {
  margin-top: 3px; color: var(--ink); font-size: 16px; line-height: 1.25;
}
.product-detail-readiness small {
  margin-top: 3px; color: #53657e; line-height: 1.35;
}
.product-detail-readiness-ready { border-color: #bce8d0; background: #f1fbf5; }
.product-detail-readiness-asset { border-color: #dac7f5; background: #fbf8ff; }
.product-detail-readiness-logistics { border-color: #efd9ad; background: #fffaf0; }
.product-detail-readiness-blocked { border-color: #f0c8cd; background: #fff6f7; }
.product-row-field { min-width: 0; }
.product-row-field small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.product-row-field strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-row-field.price span {
  display: block; margin-top: 4px; color: #47617f; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-row-field.attachments strong { color: var(--primary); }
.product-row-field.attachments span { display: block; margin-top: 4px; color: #64748b; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-row-field.attachments .product-row-warning { color: var(--danger); font-weight: 800; }
.product-empty { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.product-bulk-confirm ul {
  display: grid; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none;
}
.product-bulk-confirm li {
  display: grid; gap: 3px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc;
}
.product-bulk-confirm li span {
  color: var(--muted); font-size: 13px;
}
.badge {
  display: inline-flex; align-items: center; border-radius: 100px;
  padding: 4px 10px; font-size: 12px; font-weight: 600; margin-top: 8px;
}
.status-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; white-space: nowrap;
  color: #43536a; background: #eef3f9;
}
.status-pill-0 { color: #53657e; background: #eef3f9; }
.status-pill-1 { color: #135ec2; background: #e9f1ff; }
.status-pill-2 { color: #0780a8; background: #e9f7ff; }
.status-pill-3 { color: #a26900; background: #fff2d9; }
.status-pill-4 { color: #7049c8; background: #f3eaff; }
.status-pill-5 { color: #09713a; background: #e2f7eb; }
.status-pill-6 { color: #0d6a4a; background: #dbf6ef; }
.status-pill-7 { color: #a62c38; background: #fce9ea; }
.table-progress {
  display: flex; align-items: center; gap: 8px; margin-top: 7px;
}
.progress-mini {
  display: block; width: 92px; height: 7px; border-radius: 999px;
  overflow: hidden; background: #eaf0f8;
}
.progress-mini span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #1167d8, #19a66a);
}
.table-progress small { color: var(--muted); font-size: 11px; }
.stage-0 { background: #e9f1ff; color: #135ec2; }
.stage-1 { background: #e9f7ff; color: #0780a8; }
.stage-2 { background: #fff2d9; color: #a26900; }
.stage-3 { background: #f3eaff; color: #7049c8; }
.stage-4 { background: #e2f7eb; color: #09713a; }
.stage-5 { background: #fce9ea; color: #a62c38; }
.level-badge { display: inline-flex; white-space: nowrap; border-radius: 100px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.level-0 { background: #fde7ea; color: #b42338; }
.level-1 { background: #fff0d5; color: #a05a00; }
.level-2 { background: #def7e8; color: #087443; }
.level-3 { background: #e6f2ff; color: #1167d8; }
.level-4 { background: #f1f4f8; color: #66758b; }
.form-card { padding: 25px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 17px; }
.form-grid.compact { grid-template-columns: repeat(3, 1fr); }
.field { display: block; }
.field span { display: block; margin-bottom: 6px; color: #4e617c; font-weight: 500; }
.field.full { margin: 4px 0 20px; }
.product-profile-tabs {
  position: relative;
  margin: 5px 0 20px;
}
.product-profile-tab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.product-profile-tab-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7fb;
}
.product-profile-tab-list label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #4e617c;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  cursor: pointer;
}
.product-profile-tab-list label:hover {
  color: #135ec2;
  background: #fff;
}
#product-profile-tab-packaging:checked ~ .product-profile-tab-list label[for="product-profile-tab-packaging"],
#product-profile-tab-specification:checked ~ .product-profile-tab-list label[for="product-profile-tab-specification"],
#product-profile-tab-parameters:checked ~ .product-profile-tab-list label[for="product-profile-tab-parameters"],
#product-profile-tab-notes:checked ~ .product-profile-tab-list label[for="product-profile-tab-notes"] {
  border-color: #b8d0f2;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 7px rgba(15, 36, 66, .08);
}
.product-profile-tab-input:focus-visible ~ .product-profile-tab-list {
  outline: 2px solid rgba(17, 103, 216, .35);
  outline-offset: 2px;
}
.product-profile-tab-panel {
  display: none;
  margin: 0;
}
#product-profile-tab-packaging:checked ~ .product-profile-tab-panels .product-profile-tab-panel-packaging,
#product-profile-tab-specification:checked ~ .product-profile-tab-panels .product-profile-tab-panel-specification,
#product-profile-tab-parameters:checked ~ .product-profile-tab-panels .product-profile-tab-panel-parameters,
#product-profile-tab-notes:checked ~ .product-profile-tab-panels .product-profile-tab-panel-notes {
  display: block;
}
.product-profile-tab-panel textarea {
  min-height: 250px;
  resize: vertical;
}
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-head .actions { justify-content: flex-end; }
.customer-top-actions .button { min-width: 82px; }
.order-top-actions .button { min-width: 72px; }
.product-top-actions .button { min-width: 72px; }
.order-fulfillment-bridge {
  margin: 0 0 16px; padding: 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: var(--shadow);
}
.order-bridge-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.order-bridge-head h2 { margin: 2px 0 4px; font-size: 18px; }
.order-bridge-head small { color: var(--muted); }
.order-flow-strip { margin: 0 0 12px; }
.order-stage-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
}
.order-stage-card {
  display: block; min-width: 0; padding: 11px 12px;
  border: 1px solid #dfe7f2; border-radius: 8px;
  background: #f8fafc; color: var(--ink);
}
a.order-stage-card:hover {
  border-color: #b8cbe5; box-shadow: 0 8px 20px rgba(15, 36, 66, .08);
}
.order-stage-card strong,
.order-stage-card span,
.order-stage-card small {
  display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-stage-card strong { font-size: 22px; line-height: 1.1; }
.order-stage-card span { margin-top: 5px; font-size: 13px; font-weight: 800; color: #30415a; }
.order-stage-card small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.order-stage-blocked { border-color: #f0c8cd; background: #fff6f7; }
.order-stage-quote { border-color: #c9dbff; background: #f4f8ff; }
.order-stage-logistics { border-color: #bfe3ec; background: #f1fbfd; }
.order-stage-risk { border-color: #efd9ad; background: #fffaf0; }
.order-stage-follow { border-color: #d6e3f2; background: #f8fafc; }
.fulfillment-bridge {
  margin: 0 0 16px; padding: 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: var(--shadow);
}
.fulfillment-bridge-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.fulfillment-bridge-head h2 { margin: 2px 0 4px; font-size: 18px; }
.fulfillment-bridge-head small { color: var(--muted); line-height: 1.45; }
.fulfillment-flow-strip { margin: 0 0 12px; }
.fulfillment-stage-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
}
.fulfillment-stage-card {
  display: block; min-width: 0; padding: 11px 12px;
  border: 1px solid #dfe7f2; border-radius: 8px;
  background: #f8fafc; color: var(--ink);
}
a.fulfillment-stage-card:hover {
  border-color: #b8cbe5; box-shadow: 0 8px 20px rgba(15, 36, 66, .08);
}
.fulfillment-stage-card strong,
.fulfillment-stage-card span,
.fulfillment-stage-card small {
  display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fulfillment-stage-card strong { font-size: 22px; line-height: 1.1; }
.fulfillment-stage-card span { margin-top: 5px; font-size: 13px; font-weight: 800; color: #30415a; }
.fulfillment-stage-card small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.fulfillment-stage-blocked { border-color: #f0c8cd; background: #fff6f7; }
.fulfillment-stage-quote { border-color: #c9dbff; background: #f4f8ff; }
.fulfillment-stage-logistics { border-color: #bfe3ec; background: #f1fbfd; }
.fulfillment-stage-risk { border-color: #efd9ad; background: #fffaf0; }
.fulfillment-stage-danger { border-color: #f0b9c1; background: #fff3f4; }
.fulfillment-stage-done { border-color: #bce8d0; background: #f1fbf5; }
.order-next-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, auto);
  gap: 14px;
  align-items: center;
  margin: -6px 0 18px;
  padding: 14px 16px;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  background: #f7fbff;
}
.order-next-copy {
  min-width: 0;
}
.order-next-copy span {
  display: block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.order-next-copy strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  line-height: 1.45;
}
.order-next-actions {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.order-next-action.button {
  min-width: 116px;
  padding: 8px 12px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
.order-next-action.button span,
.order-next-action.button small {
  display: block;
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-next-action.button span {
  color: inherit;
  font-weight: 800;
}
.order-next-action.button small {
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  line-height: 1.2;
}
.order-next-action.button.secondary small {
  color: var(--muted);
}
.order-next-action .inline-post-form,
.order-next-actions .inline-post-form {
  height: 100%;
}
.order-next-action .button,
.order-next-actions .inline-post-form .button {
  height: 100%;
}
.customer-whatsapp-action {
  color: #0b7a42;
  border-color: #9edbb9;
  background: #f5fff9;
}
.customer-whatsapp-action:hover {
  color: #075f34;
  border-color: #71c899;
  background: #eafff2;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px; margin-bottom: 18px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; }
.info-grid strong { display: block; margin-top: 4px; word-break: break-word; }
.purchase-price .usd-label { display: block; margin-top: 13px; color: var(--muted); }
.purchase-price .usd-value { color: var(--primary); font-size: 18px; }
.purchase-price .usd-note {
  display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45;
}
.notes { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; white-space: pre-wrap; }
.order-logistics-preview { margin: -4px 0 20px; }
.order-product-hint {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #f8fbff;
}
.order-product-hint.is-empty {
  background: #fff;
  color: var(--muted);
}
.order-product-hint-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.order-product-hint-head strong,
.order-product-hint > strong {
  color: var(--ink);
  font-size: 14px;
}
.order-product-hint-head span,
.order-product-hint > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.order-product-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.order-product-status {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #fff;
  color: #17233b;
  text-decoration: none;
}
.order-product-status:hover {
  border-color: #9fc0ee;
  background: #f8fbff;
}
.order-product-status span,
.order-product-status strong,
.order-product-status small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-product-status span {
  color: #63738b;
  font-size: 11px;
  font-weight: 850;
}
.order-product-status strong {
  color: #17233b;
  font-size: 13px;
}
.order-product-status small {
  color: #63738b;
  font-size: 12px;
}
.order-product-status-ready {
  border-color: #bce8d0;
  background: #f2fbf6;
}
.order-product-status-warn {
  border-color: #efd9ad;
  background: #fffaf0;
}
.order-product-status-blocked {
  border-color: #f0c8cd;
  background: #fff6f7;
}
.order-product-hint-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.order-product-hint-grid div {
  min-width: 0;
}
.order-product-hint-grid small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.order-product-hint-grid strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}
.shipment-rate-preview { margin: 2px 0 16px; }
.order-logistics-preview-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: start;
  padding: 14px 16px; border: 1px solid #dbe5f1; border-radius: 8px; background: #f8fbff;
}
.order-logistics-preview-card small {
  display: block; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 6px;
}
.order-logistics-preview-card strong {
  display: block; color: var(--ink); font-size: 20px; line-height: 1.2; margin-bottom: 6px;
}
.order-logistics-preview-card span,
.order-logistics-preview-card p {
  color: #51627a; font-size: 13px; line-height: 1.55;
}
.order-logistics-preview-card p { grid-column: 1 / -1; margin: 0; }
.order-logistics-preview-card em {
  display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 10px;
  border-radius: 999px; background: #e9f1ff; color: #1f5bd8; font-size: 12px; font-style: normal; font-weight: 800;
  white-space: nowrap;
}
.order-quote-suggestions {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #fff;
}
.order-quote-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}
.order-quote-head strong {
  color: var(--ink);
  font-size: 14px;
}
.order-quote-head span,
.order-quote-suggestions small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.quote-suggestion-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.quote-fill-button {
  display: grid;
  gap: 2px;
  min-width: 148px;
  padding: 7px 10px;
  text-align: left;
}
.quote-fill-button strong {
  color: #1d4ed8;
  font-size: 12px;
}
.quote-fill-button span {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}
.logistics-rate-card { margin-bottom: 18px; }
.order-save-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 9px;
}
.order-save-actions .button {
  min-height: 38px;
}
.logistics-reference-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.logistics-apply-form { margin: 0; }
.logistics-rate-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.logistics-metrics .info-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 12px; }
.logistics-metrics .info-grid div {
  padding: 10px 12px; border: 1px solid #dbe5f1; border-radius: 8px; background: #f8fbff;
}
.logistics-metrics .info-grid small { color: var(--muted); }
.logistics-rate-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.logistics-rate-actions form { margin: 0; }
.logistics-quote-table { margin-top: 16px; }
.logistics-quote-table small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.logistics-quote-form {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
}
.shipment-context,
.finance-context {
  margin: -4px 0 16px; padding: 12px 14px; border: 1px solid #dbe5f1; border-radius: 8px; background: #f8fbff;
}
.shipment-context-block { display: grid; gap: 12px; }
.shipment-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.shipment-context-head strong {
  color: var(--ink);
  font-size: 14px;
}
.shipment-context-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.finance-type-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}
.finance-type-actions .mini-button {
  min-width: 86px;
}
.finance-type-actions .mini-button.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}
.inline-note {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.inline-note a {
  color: var(--primary);
  font-weight: 800;
}
.finance-context-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.shipment-context-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px;
}
.shipment-context-metrics {
  padding-top: 10px;
  border-top: 1px solid #dbe5f1;
}
.shipment-context-warning {
  padding: 9px 11px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.shipment-context-grid small,
.finance-context-grid small {
  display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 700;
}
.shipment-context-grid strong,
.finance-context-grid strong {
  display: block; color: var(--ink); font-size: 13px; line-height: 1.45; word-break: break-word;
}
.shipment-forwarder-brief,
.finance-payment-brief {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #fbfdff;
}
.shipment-forwarder-head,
.finance-payment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.shipment-forwarder-head strong,
.finance-payment-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}
.shipment-forwarder-head small,
.finance-payment-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.shipment-forwarder-brief textarea,
.finance-payment-brief textarea {
  width: 100%;
  min-height: 236px;
  resize: vertical;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #fff;
  color: #10213c;
  font-size: 12px;
  line-height: 1.55;
}
.activity-form h2 { margin-bottom: 18px; }
.activity-form .button { margin-top: 8px; }
.contact-tools { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 22px; }
.contact-tools .card-title { margin-bottom: 8px; }
.contact-identity { font-size: 12px; margin-bottom: 15px; }
.contact-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: 17px;
}
.contact-buttons .button {
  min-width: 120px; min-height: 38px; height: 38px; margin-top: 0; padding: 0 16px;
  align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.contact-email, .contact-whatsapp { min-width: 120px; height: 38px; font-size: 14px; }
.contact-whatsapp { background: #14a85a; border-color: #14a85a; }
.contact-whatsapp:hover { background: #0b8745; border-color: #0b8745; }
.contact-buttons .contact-disabled {
  display: inline-flex; min-width: 120px; min-height: 38px; height: 38px; padding: 0 15px;
  align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
  cursor: not-allowed; color: #71819a; background: #eef3f8; border: 1px solid #d6e0ec;
}
.contact-tip { margin-top: 13px; font-size: 12px; }
.email-order-tools {
  display: grid;
  gap: 12px;
  margin: 12px 0 15px;
}
.email-order-select {
  margin: 0;
  max-width: 520px;
}
.email-order-context {
  padding: 12px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #fbfcfe;
}
.email-order-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.email-order-context-head strong { color: var(--ink); font-size: 14px; }
.email-order-context-head a { color: var(--primary); font-size: 13px; font-weight: 700; white-space: nowrap; }
.email-order-context-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.email-order-context-grid div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e3ebf5;
  border-radius: 7px;
  background: #fff;
}
.email-order-context-grid small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.email-order-context-grid strong {
  display: block;
  color: #26354d;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}
.order-email-card {
  scroll-margin-top: 18px;
}
.order-email-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin: 10px 0 12px;
}
.order-email-head-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 170px;
}
.order-email-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
.order-email-modes .mini-button {
  min-width: 82px;
}
.order-email-modes .mini-button.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}
.order-email-context {
  margin: 0 0 12px;
}
.order-direct-email-form {
  margin-bottom: 0;
}
.order-activity-card {
  scroll-margin-top: 18px;
}
.order-activity-card .card-title {
  margin-bottom: 8px;
}
.order-activity-suggestion {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #f8fbff;
}
.order-activity-card textarea {
  min-height: 164px;
}
.whatsapp-chat-import {
  display: grid; grid-template-columns: max-content 230px max-content;
  align-items: center; gap: 10px; width: max-content; max-width: 100%; min-height: 38px;
  padding: 4px 5px 4px 12px; border: 1px solid #d6e0ec; border-radius: 9px; background: #f7f9fc;
}
.whatsapp-chat-import label { display: contents; margin: 0; color: #4e617c; font-size: 14px; }
.whatsapp-chat-import label span { font-weight: 700; white-space: nowrap; }
.whatsapp-chat-import input {
  width: 100%; min-width: 0; height: 30px; min-height: 30px; padding: 3px 8px; border-radius: 7px; background: white;
  font-size: 14px;
}
.whatsapp-chat-import .button { min-width: 62px; min-height: 30px; height: 30px; padding: 0 14px; border-radius: 7px; }
.whatsapp-chat-open { white-space: nowrap; }
.whatsapp-chat-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.whatsapp-chat-list h2 { margin-bottom: 12px; }
.whatsapp-chat-item {
  display: block; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px;
  color: var(--text); background: #fbfcfe;
}
.whatsapp-chat-item strong, .whatsapp-chat-item small { display: block; }
.whatsapp-chat-item small { color: var(--muted); margin-top: 4px; }
.whatsapp-chat-item.active { border-color: var(--primary); background: #eef5ff; }
.whatsapp-chat-viewer .card-title span { color: var(--muted); font-size: 13px; }
.whatsapp-chat-viewer pre {
  max-height: 72vh; overflow: auto; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px;
  white-space: pre-wrap; word-break: break-word; background: #fbfcfe; color: #172033;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.direct-email-form { margin: 15px 0 19px; padding: 17px; border-radius: 10px; background: #f7f9fc; }
.direct-email-form .field { margin-bottom: 13px; }
.direct-email-form .field.full { margin: 0 0 13px; }
.email-auto-quote { margin: 2px 0 5px; }
.email-auto-pi { margin-top: 8px; }
.email-auto-contract { margin-top: 8px; }
.email-auto-assets { margin-top: 8px; }
.email-auto-quote-note { display: block; margin: 0 0 13px; color: var(--muted); line-height: 1.45; }
.ai-email-tools {
  display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px;
  margin: 0 0 13px; padding: 10px 12px; border: 1px solid #d6e0ec; border-radius: 9px; background: #fff;
}
.ai-email-tools strong { color: #26354d; font-size: 14px; line-height: 32px; white-space: nowrap; }
.ai-email-language {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; margin: 0;
  color: #4e617c; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.ai-email-language select {
  width: 128px; min-height: 32px; height: 32px; padding: 4px 28px 4px 9px;
  border-radius: 7px; border: 1px solid #d6e0ec; background-color: #fff; font-size: 13px;
}
.ai-email-tools .button {
  min-width: 78px; min-height: 32px; height: 32px; margin: 0; padding: 0 13px;
  border-radius: 7px; font-size: 13px; font-weight: 700;
}
.ai-email-status { color: var(--muted); font-size: 12px; line-height: 1.45; }
.ai-email-status.success { color: #16834d; }
.ai-email-status.error { color: var(--danger); }
.bulk-email-layout { display: grid; grid-template-columns: minmax(430px, 1fr) 390px; gap: 18px; align-items: start; }
.bulk-compose h2 { margin-bottom: 6px; }
.bulk-tip { margin-bottom: 19px; }
.bulk-safety-panel { display: grid; gap: 6px; margin: 12px 0 16px; padding: 12px 14px; border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 8px; color: #1e3a8a; }
.bulk-safety-panel strong { font-size: 14px; }
.bulk-safety-panel span { font-weight: 700; color: #172554; }
.bulk-safety-panel small { color: #315a9b; line-height: 1.55; }
.bulk-segment-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.bulk-segment-chip { display: inline-flex; gap: 4px; align-items: center; padding: 4px 8px; border: 1px solid #bfdbfe; border-radius: 999px; background: #fff; color: #1e3a8a; font-size: 12px; }
.bulk-segment-chip strong { font-size: 12px; }
.bulk-domain-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bulk-domain-summary b { margin-right: 2px; font-size: 12px; color: #315a9b; }
.bulk-domain-chip { display: inline-flex; gap: 5px; align-items: center; max-width: 180px; padding: 4px 8px; border-radius: 999px; background: #fff; color: #315a9b; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-domain-chip strong { color: #172554; }
.bulk-domain-chip.danger { background: #fff1f2; color: #9f1239; }
.bulk-domain-chip.danger strong { color: #be123c; }
.bulk-email-submit-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.bulk-subject-chip { display: inline-flex; max-width: 100%; margin: 2px 5px 2px 0; padding: 4px 8px; border-radius: 8px; background: #eef6ff; color: #1e3a8a; font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-content-review { display: grid; gap: 8px; margin: 10px 0 16px; padding: 12px 14px; border: 1px solid #dbe6f3; border-radius: 8px; background: #f8fbff; color: #17253d; }
.bulk-content-review > div:first-child { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; justify-content: space-between; }
.bulk-content-review > div:first-child strong { color: #0f1f3d; }
.bulk-content-review > div:first-child span { color: #64748b; font-size: 12px; font-weight: 800; }
.bulk-content-review.is-ok { border-color: #bfe8d1; background: #f0fdf5; }
.bulk-content-review.is-info { border-color: #bfdbfe; background: #eff6ff; }
.bulk-content-review.is-warn { border-color: #f7d58a; background: #fffbeb; }
.bulk-content-review.is-high { border-color: #fecaca; background: #fff1f2; }
.bulk-content-finding { display: grid; gap: 3px; padding: 8px 10px; border-radius: 8px; background: #fff; }
.bulk-content-finding strong { font-size: 13px; }
.bulk-content-finding span { color: #64748b; font-size: 12px; line-height: 1.5; }
.bulk-content-finding.is-high strong { color: #b42318; }
.bulk-content-finding.is-warn strong { color: #9a6500; }
.bulk-content-finding.is-info strong { color: #1167d8; }
.bulk-content-ack { align-items: flex-start; margin: 10px 0 4px; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 8px; background: #fff1f2; color: #9f1239; font-weight: 800; line-height: 1.45; }
.bulk-content-ack input { margin-top: 2px; }
.email-variant-panel { display: grid; gap: 8px; margin-top: 14px; padding: 12px; border: 1px solid #dbe6f3; border-radius: 10px; background: #f8fbff; }
.email-variant-panel > strong { color: #172554; }
.email-variant-panel ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.email-variant-panel li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 8px; border-radius: 8px; background: #fff; }
.email-variant-panel li strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-variant-panel li span { grid-column: 1; color: #64748b; font-size: 12px; }
.email-variant-panel li em { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: #0b7a45; font-style: normal; font-weight: 900; }
.email-job-progress small { display: block; margin-top: 3px; color: #64748b; font-size: 12px; font-weight: 700; line-height: 1.35; }
.email-failure-panel { display: grid; gap: 8px; margin-top: 14px; padding: 12px; border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; }
.email-failure-panel > strong { color: #7c2d12; }
.email-failure-panel ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.email-failure-panel li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding: 8px; border-radius: 8px; background: #fff; }
.email-failure-panel li strong { color: #9a3412; }
.email-failure-panel li span { justify-self: end; color: #b45309; font-weight: 900; }
.email-failure-panel li em { grid-column: 1 / -1; color: #334155; font-size: 12px; font-style: normal; line-height: 1.45; }
.email-failure-panel li small { grid-column: 1 / -1; color: #64748b; line-height: 1.45; }
.bulk-compose .field { margin-bottom: 17px; }
.recipient-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(130px, 1.1fr) auto; gap: 7px 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.recipient-row span { word-break: break-word; }
.recipient-row small { grid-column: 2 / 4; color: var(--danger); line-height: 1.45; }
.recipient-row.invalid { color: var(--muted); }
.recipient-row:not(.invalid) small { color: var(--success); }
.recipient-row strong a { color: inherit; }
.recipient-evidence { grid-column: 2 / 4; min-width: 0; }
.recipient-actions { grid-column: 3; grid-row: 1; display: flex; justify-content: flex-end; }
.recipient-actions .mini-button { white-space: nowrap; padding: 6px 9px; }
.timeline-panel { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.timeline-panel .card-title { margin-bottom: 15px; }
.customer-order-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 238px;
}
.order-row-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 238px;
}
.order-list-next {
  display: grid;
  gap: 5px;
  min-width: 128px;
}
.order-list-next .primary-mini {
  justify-self: start;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}
.order-list-next small {
  display: block;
  max-width: 190px;
  color: var(--muted);
  line-height: 1.35;
}
.logistics-row-actions,
.finance-row-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 186px;
}
.order-row-actions .mini-button,
.logistics-row-actions .mini-button,
.finance-row-actions .mini-button,
.customer-order-actions .mini-button {
  min-width: 54px;
  padding: 6px 9px;
}
.logistics-row-actions .shipment-status-form .mini-button {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}
.finance-row-actions .finance-quick-form .mini-button {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 800;
}
#order-shipments,
#order-finance,
#order-shipment-form,
#order-finance-form,
#order-commercial-docs,
#product-assets,
#customer-orders {
  scroll-margin-top: 18px;
}
#customer-orders table th:last-child,
#customer-orders table td:last-child {
  width: 132px;
}
.order-product-bridge {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(0, 1.8fr);
  gap: 12px;
  align-items: stretch;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #f8fbff;
}
.order-product-bridge-head {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e0e9f4;
  border-radius: 8px;
  background: #fff;
}
.order-product-bridge-head span {
  color: #63738b;
  font-size: 12px;
  font-weight: 850;
}
.order-product-bridge-head strong {
  color: #17233b;
  font-size: 14px;
  line-height: 1.35;
}
.order-product-bridge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.order-product-bridge-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #fff;
  color: #17233b;
  text-decoration: none;
}
.order-product-bridge-item:hover {
  border-color: #9fc0ee;
  background: #fff;
}
.order-product-bridge-item span,
.order-product-bridge-item strong,
.order-product-bridge-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-product-bridge-item span,
.order-product-bridge-item strong {
  white-space: nowrap;
}
.order-product-bridge-item span {
  color: #63738b;
  font-size: 11px;
  font-weight: 850;
}
.order-product-bridge-item strong {
  color: #17233b;
  font-size: 13px;
}
.order-product-bridge-item small {
  color: #63738b;
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.order-product-bridge-ready {
  border-color: #bce8d0;
  background: #f3fbf6;
}
.order-product-bridge-warn {
  border-color: #efd9ad;
  background: #fffaf0;
}
.order-product-bridge-blocked {
  border-color: #f0c8cd;
  background: #fff6f7;
}
.order-commercial-card { margin-bottom: 18px; }
.order-commercial-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.order-summary-box {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #fff;
}
.order-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.order-summary-head small {
  color: var(--muted);
  font-weight: 800;
}
.order-summary-box textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid #dbe5f1;
  background: #f8fbff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.order-attachment-pack {
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #fbfdff;
}
.order-attachment-pack .order-summary-head {
  margin-bottom: 9px;
}
.order-attachment-pack .order-summary-head div {
  min-width: 0;
}
.order-attachment-pack .order-summary-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  word-break: break-word;
}
.order-attachment-pack textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}
.order-commercial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 14px;
}
.order-commercial-block {
  padding: 13px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #f8fbff;
}
.order-commercial-block small {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-weight: 800;
}
.order-commercial-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.order-commercial-actions .button,
.order-commercial-actions .mini-button {
  min-height: 34px;
  padding: 7px 11px;
}
.timeline-item { display: grid; grid-template-columns: 16px 1fr; column-gap: 14px; padding: 2px 0 19px; }
.dot { background: var(--primary); width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.timeline-head { display: flex; gap: 18px; align-items: center; margin-bottom: 5px; }
.timeline-head time { color: var(--muted); font-size: 13px; }
.timeline-item p { white-space: pre-wrap; }
.next { display: inline-flex; margin-top: 7px; background: #edf4ff; padding: 3px 8px; border-radius: 6px; }
.danger-zone { text-align: right; }
.danger-zone:has(> .alert) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.danger-zone:has(> .alert) > .alert {
  flex: 1 1 100%;
  margin: 0;
  text-align: center;
}
.danger-zone:has(> .alert) > ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.danger-zone:has(> .alert) > ul li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--panel);
  font-size: 12px;
}
.danger-zone:has(> .alert) > ul strong { color: var(--text); }
.danger-link { border: 0; background: transparent; color: var(--danger); cursor: pointer; }
.confirm-card { max-width: 560px; margin: 82px auto; }
.confirm-card p { margin: 15px 0 25px; }
.empty, .empty-row { text-align: center; padding: 46px; color: var(--muted); }
.import-card { max-width: 850px; }
.import-card p { margin-bottom: 16px; }
.import-card textarea { margin-bottom: 16px; }
.export-intro { margin-bottom: 18px; }
.export-intro h2 { margin-bottom: 6px; }
.export-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
.export-card { display: flex; flex-direction: column; gap: 16px; min-height: 260px; }
.export-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.export-card-head strong {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 54px; height: 38px; padding: 0 12px; border-radius: 10px;
  color: var(--primary); background: #eaf2ff; font-size: 22px;
}
.export-card p { color: #53657e; }
.export-meta {
  display: grid; gap: 10px; margin: auto 0 0; padding-top: 2px;
}
.export-meta div {
  display: flex; justify-content: space-between; gap: 14px;
  padding-top: 9px; border-top: 1px solid var(--line);
}
.export-meta dt { color: var(--muted); }
.export-meta dd { margin: 0; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.settings-layout { display: grid; grid-template-columns: repeat(2, minmax(360px, 520px)); gap: 18px; align-items: start; }
.settings-layout-organized { grid-template-columns: minmax(420px, 1.08fr) minmax(360px, .92fr); max-width: 1120px; }
.settings-card { max-width: 520px; }
.settings-layout-organized .settings-card { max-width: none; }
.settings-pager {
  max-width: 1120px;
}
.settings-page-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: -4px 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #eef4fb;
}
.settings-page-tabs a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #53657e;
  text-decoration: none;
}
.settings-page-tabs a strong {
  display: block;
  color: #17233b;
  font-size: 14px;
  font-weight: 850;
  margin-bottom: 5px;
}
.settings-page-tabs a small {
  display: block;
  color: #6c7f99;
  font-size: 11px;
  line-height: 1.35;
}
.settings-page-tabs a:hover {
  color: var(--primary);
  background: #f8fbff;
}
.settings-page-tabs a.active {
  color: var(--primary);
  border-color: #c9dbef;
  background: #fff;
  box-shadow: 0 10px 24px rgba(42, 92, 143, .10);
}
.settings-page-tabs a.active strong { color: var(--primary); }
.settings-current-note {
  margin: -6px 0 16px;
  padding: 10px 12px;
  border: 1px solid #dce6f2;
  border-radius: 12px;
  background: #f8fbff;
  color: #53657e;
  font-size: 13px;
}
.settings-current-note strong { color: #17233b; }
.settings-page-panels {
  display: block;
}
.settings-page-panel {
  display: none;
  width: 100%;
  gap: 14px;
}
.settings-page-panel.is-active {
  display: grid;
}
.settings-page-panel[hidden],
.settings-page-panel:not(.is-active) {
  display: none !important;
}
.settings-jumpbar {
  display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px;
}
.settings-jumpbar a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: #52657f; font-size: 13px; font-weight: 700; text-decoration: none;
}
.settings-jumpbar a:hover { border-color: #b8cee9; color: var(--primary); background: #f7fbff; }
.settings-group {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 14px;
  border: 1px solid #dce6f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #f9fbff 0%, #f3f7fc 100%);
}
.settings-group-head {
  padding: 4px 2px 0;
}
.settings-group-head .eyebrow { margin-bottom: 5px; }
.settings-group-head h2 { margin: 0 0 6px; font-size: 19px; }
.settings-group-head p { margin: 0; }
.settings-group-contact { grid-row: span 2; }
.settings-group-collector { grid-column: 1 / -1; }
.settings-group-collector .settings-card,
.settings-group-collector #search-providers,
.settings-group-collector #product-match-1688-session {
  max-width: none;
  grid-column: auto;
}
.settings-card h2 { margin-bottom: 18px; }
.settings-card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.settings-card-title h2 { margin-bottom: 0; }
.settings-card .field { margin-bottom: 17px; }
.settings-intro { margin: -8px 0 18px; }
.miaoshou-plugin-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.miaoshou-plugin-setting strong,
.miaoshou-plugin-setting small { display: block; }
.miaoshou-plugin-setting small { margin-top: 3px; color: var(--muted); line-height: 1.45; }
.miaoshou-plugin-setting-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: none;
}
.miaoshou-plugin-setting-actions .mini-button { gap: 5px; }
.settings-subtitle { margin: 25px 0 15px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; }
.smtp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.password-status { margin: -8px 0 13px; font-size: 12px; }
.cookie-help {
  margin: -7px 0 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fbff;
  color: #53657e;
  font-size: 12px;
}
.cookie-help strong { display: block; color: var(--ink); margin-bottom: 6px; }
.cookie-help ol { margin: 0; padding-left: 18px; }
.cookie-help li + li { margin-top: 4px; }
.checkbox-field { display: flex; align-items: center; gap: 8px; margin: 0 0 19px; color: #4e617c; }
.checkbox-field input { width: auto; margin: 0; }
.account-status {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.account-status.ok { color: #0a6f3c; background: #e0f6ea; }
.account-status.warn { color: #8a5a05; background: #fff1c9; }
.account-status.danger { color: #a11b1b; background: #ffe2e2; }
.account-status.preview { color: #0758d1; background: #e9f2ff; }
.settings-capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.settings-capability-grid a {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 15px;
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 35, 65, .04);
}
.settings-capability-grid a:hover {
  border-color: #a9c7f4;
  box-shadow: 0 14px 28px rgba(22, 111, 229, .09);
}
.settings-capability-grid a > span:first-child {
  color: #1e6ff2;
  font-size: 12px;
  font-weight: 800;
}
.settings-capability-grid strong {
  color: #13233f;
  font-size: 15px;
  line-height: 1.36;
}
.settings-capability-grid small {
  color: #63738b;
  font-size: 12px;
  line-height: 1.5;
}
.settings-capability-grid .account-status {
  justify-self: start;
  margin-top: auto;
}
.collector-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.collector-mode-tab {
  min-width: 0;
  display: grid;
  gap: 7px;
  min-height: 126px;
  padding: 16px;
  border: 1px solid #d8e4f2;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 35, 65, .04);
}
.collector-mode-tab:hover {
  border-color: #a9c7f4;
  box-shadow: 0 14px 28px rgba(22, 111, 229, .08);
}
.collector-mode-tab.active {
  border-color: #8eb9f5;
  background: #f5f9ff;
  box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .08), 0 14px 28px rgba(22, 111, 229, .08);
}
.collector-mode-tab > span:first-child {
  color: #1e6ff2;
  font-size: 12px;
  font-weight: 850;
}
.collector-mode-tab strong {
  color: #13233f;
  font-size: 17px;
  line-height: 1.3;
}
.collector-mode-tab small {
  color: #63738b;
  font-size: 12px;
  line-height: 1.5;
}
.collector-mode-tab .account-status {
  justify-self: start;
  margin-top: auto;
}
.collector-mode-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.collector-mode-summary-item {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid #d8e4f2;
  border-radius: 12px;
  background: #fff;
  color: #16233a;
  text-decoration: none;
}
.collector-mode-summary-item:hover {
  border-color: #a9c7f4;
  background: #f8fbff;
}
.collector-mode-summary-item.active {
  border-color: #8eb9f5;
  background: #f3f8ff;
  box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .08);
}
.collector-mode-summary-item span {
  color: #1e6ff2;
  font-size: 11px;
  font-weight: 850;
}
.collector-mode-summary-item strong,
.collector-mode-summary-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collector-mode-summary-item strong {
  font-size: 14px;
}
.collector-mode-summary-item small {
  color: #63738b;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}
.collector-mode-brief {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #dbe6f3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 36, 66, .045);
}
.collector-mode-brief h2 {
  margin: 0 0 5px;
  font-size: 21px;
}
.collector-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 8px;
  min-width: min(100%, 520px);
}
.collector-flow-steps span {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  background: #f5f9ff;
  color: #21476f;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.collector-route-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.collector-route-map a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px 10px;
  align-items: center;
  min-width: 0;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid #d8e4f2;
  border-radius: 12px;
  background: #fff;
  color: #16233a;
  text-decoration: none;
}
.collector-route-map a:hover {
  border-color: #9fc0ee;
  background: #f8fbff;
}
.collector-route-map span {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef5ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 850;
}
.collector-route-map strong,
.collector-route-map small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.collector-route-map strong {
  font-size: 14px;
}
.collector-route-map small {
  color: #63738b;
  font-size: 12px;
}
.collector-mode-primary-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(300px, .7fr);
  gap: 14px;
  align-items: start;
}
.collector-mode-primary-grid .settings-card {
  max-width: none;
}
.collector-mode-next {
  display: grid;
  gap: 10px;
}
.collector-local-stack {
  display: grid;
  gap: 16px;
}
.collector-local-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.collector-local-map a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8e4f2;
  border-radius: 12px;
  background: #fff;
  color: #16233a;
  text-decoration: none;
}
.collector-local-map a:hover {
  border-color: #9fc0ee;
  background: #f8fbff;
}
.collector-local-map span {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef5ff;
  color: #1D4ED8;
  font-size: 12px;
  font-weight: 850;
}
.collector-local-map strong,
.collector-local-map small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.collector-local-map strong {
  font-size: 14px;
}
.collector-local-map small {
  color: #63738b;
  font-size: 12px;
}
.collector-local-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 16px;
  align-items: start;
}
.collector-local-grid .settings-card {
  max-width: none;
}
.miaoshou-task-card,
.miaoshou-product-card {
  display: grid;
  gap: 14px;
}
.miaoshou-plugin-task-panel {
  border-color: #bdd4c5;
  background: #fbfdfb;
}
.miaoshou-plugin-task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.miaoshou-collection-scope {
  display: grid;
  gap: 3px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border-left: 3px solid #2f7a4f;
  background: #eef7f1;
}
.miaoshou-collection-scope strong {
  color: #173f2a;
  font-size: 13px;
  line-height: 1.45;
}
.miaoshou-collection-scope span {
  color: #52685b;
  font-size: 12px;
  line-height: 1.45;
}
.miaoshou-plugin-task-copy dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
.miaoshou-plugin-task-copy dl div {
  padding: 9px 10px;
  border: 1px solid #d7e4da;
  border-radius: 6px;
  background: #fff;
}
.miaoshou-plugin-task-copy dt { color: var(--muted); font-size: 11px; }
.miaoshou-plugin-task-copy dd { margin: 3px 0 0; font-weight: 700; }
.miaoshou-plugin-term-list { display: flex; flex-wrap: wrap; gap: 6px; }
.miaoshou-plugin-term-list span {
  padding: 4px 7px;
  border: 1px solid #c8d9cc;
  border-radius: 4px;
  background: #fff;
  color: #24533a;
  font-size: 12px;
}
.miaoshou-plugin-task-copy p { margin: 10px 0 0; color: var(--muted); }
.miaoshou-plugin-actions {
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(280px, 1.35fr);
  gap: 10px;
  min-width: 0;
  align-items: start;
}
.miaoshou-plugin-sync-form,
.miaoshou-plugin-retry-form { min-width: 220px; }
.miaoshou-plugin-sync-form .button,
.miaoshou-plugin-retry-form .button { width: 100%; justify-content: center; }
.miaoshou-plugin-sync-form small,
.miaoshou-plugin-retry-form small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.4; }
.miaoshou-native-blocker {
  display: grid;
  gap: 7px;
  min-width: 280px;
  padding: 11px;
  border: 1px solid #e7cf96;
  border-radius: 6px;
  background: #fff9eb;
}
.miaoshou-native-blocker > strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #77500f;
}
.miaoshou-native-blocker > span {
  color: #6f6247;
  font-size: 12px;
  line-height: 1.45;
}
.miaoshou-native-blocker > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}
.miaoshou-native-blocker .button { width: 100%; justify-content: center; }
.miaoshou-task-list {
  display: grid;
  gap: 10px;
}
.miaoshou-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.miaoshou-task-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.miaoshou-task-main strong {
  overflow-wrap: anywhere;
}
.miaoshou-task-main small,
.miaoshou-task-main span {
  color: var(--muted);
  font-size: 12px;
}
.miaoshou-task-main em {
  color: var(--danger);
  font-style: normal;
  font-size: 12px;
  line-height: 1.5;
}
.miaoshou-task-action {
  min-width: 0;
}
.miaoshou-publish-form {
  display: grid;
  gap: 8px;
}
.miaoshou-publish-form .field {
  margin: 0;
}
.miaoshou-publish-form .checkbox-field {
  margin: 0;
  font-size: 12px;
}
.miaoshou-task-panel {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.miaoshou-task-panel h3 {
  margin: 0;
  font-size: 15px;
}
.miaoshou-empty {
  margin: 0;
}
.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#search-providers { grid-column: 1 / -1; max-width: 1058px; }
.settings-layout-organized #search-providers { grid-column: auto; max-width: none; }
.search-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.search-provider-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fbfcfe; }
.search-provider-card .settings-card-title { margin-bottom: 10px; }
.search-provider-card h3 { margin: 0; font-size: 15px; }
.search-provider-card p { margin-bottom: 14px; }
.search-provider-card .field { margin-bottom: 12px; }
.search-provider-card .checkbox-field { margin-bottom: 12px; }

/* Settings are task pages: keep one configuration surface visible at a time. */
.settings-pager { max-width: none; }
.settings-page-tabs {
  gap: 5px;
  margin: 0 0 12px;
  padding: 4px;
  border-radius: 8px;
  background: #f1f5fa;
}
.settings-page-tabs a {
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: center;
}
.settings-page-tabs a strong { margin: 0; font-size: 13px; }
.settings-page-tabs a.active { box-shadow: 0 2px 8px rgba(42, 92, 143, .10); }
.settings-group {
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f9fc;
}
.settings-group-contact .settings-card,
.settings-group-api .settings-card,
.settings-group-collector .settings-card,
.settings-group-website .settings-card { max-width: none; }
.settings-group-security .settings-card { max-width: 620px; }
.settings-subpager,
.settings-subpanels,
.settings-subpanel { min-width: 0; }
.settings-subpanel[hidden],
.settings-subpanel:not(.is-active) { display: none !important; }
.settings-subpanel.is-active { display: block; }
.settings-subtabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 5px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f5fa;
}
.settings-subtabs button {
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #52657f;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.settings-subtabs button:hover { color: var(--primary); background: #fff; }
.settings-subtabs button.active {
  border-color: #bfd3ed;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 7px rgba(15, 36, 66, .08);
}
.settings-subtabs button span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 10px;
  background: #eaf2ff;
  font-size: 11px;
}
.settings-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.settings-contact-signature { grid-column: 1 / -1; }
.settings-contact-signature textarea { min-height: 180px; }
.settings-smtp-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.contact-settings-subpager { margin-bottom: 16px; }
.outbound-safety-options { max-width: 850px; }
.settings-api-subpager .settings-card { max-width: none; }
.settings-api-subpager .api-token-create-form {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr);
  gap: 14px;
  align-items: end;
  max-width: 900px;
}
.settings-api-subpager .api-token-create-form .button { justify-self: start; }
.api-token-table table { width: 100%; table-layout: fixed; }
.api-token-table th:nth-child(1) { width: 23%; }
.api-token-table th:nth-child(2) { width: 18%; }
.api-token-table th:nth-child(4) { width: 10%; }
.api-token-table th:nth-child(5) { width: 11%; }
.api-token-table td { vertical-align: top; overflow-wrap: anywhere; }
.api-token-table td small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.collector-mode-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f5fa;
}
.collector-mode-tab {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 6px;
  box-shadow: none;
}
.collector-mode-tab strong { font-size: 14px; }
.collector-mode-tab .account-status { margin: 0; }
.collector-mode-primary-grid {
  grid-template-columns: minmax(0, 760px);
  justify-content: start;
}
.collector-worker-runtime {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border-block: 1px solid var(--line);
  background: #f8fafc;
}
.collector-worker-runtime > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.collector-worker-runtime > div > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.collector-worker-runtime strong { color: var(--ink); font-size: 13px; }
.collector-worker-runtime small,
.collector-worker-queue { color: var(--muted); font-size: 12px; }
.collector-worker-queue { flex: none; }
.collector-preflight {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 12px 18px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-block: 1px solid var(--line);
  background: #f8fafc;
}
.collector-preflight-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.collector-preflight-main > span:last-child { display: grid; gap: 2px; min-width: 0; }
.collector-preflight-main strong { color: var(--ink); font-size: 13px; }
.collector-preflight-main small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.collector-preflight-evidence {
  display: flex !important;
  flex-wrap: wrap;
  gap: 4px 12px !important;
  margin-top: 2px;
  font-size: 11px !important;
}
.collector-preflight-evidence span { display: inline-flex; gap: 5px; }
.collector-preflight-evidence b { color: #38506f; font-size: 10px; }
.collector-preflight-evidence .is-missing,
.collector-preflight-evidence .is-missing b { color: #8a5a11; }
.collector-preflight dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.collector-preflight dl div { min-width: 0; }
.collector-preflight dt { color: var(--muted); font-size: 10px; }
.collector-preflight dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.collector-preflight-action {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: #52627a;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}
.collector-browser-local-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.collector-browser-local-card { max-width: none; }
.collector-runtime-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.collector-runtime-facts > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f9fc;
}
.collector-runtime-facts dt {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
}
.collector-runtime-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}
.collector-runtime-facts.compact { margin-bottom: 0; }
.collector-platform-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}
.collector-platform-strip span {
  padding: 6px 9px;
  border: 1px solid #cdddf0;
  border-radius: 6px;
  background: #f5f8fc;
  color: #244669;
  font-size: 12px;
  font-weight: 800;
}
.browser-local-channel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.collector-local-subpager > .settings-subtabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.search-api-center { max-width: none; }
.search-center-subpager > .settings-subtabs { max-width: 520px; }
.search-provider-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}
.search-provider-nav {
  display: grid;
  gap: 5px;
  max-height: 650px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}
.search-provider-nav-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #263a55;
  text-align: left;
  cursor: pointer;
}
.search-provider-nav-item:hover { background: #fff; border-color: #d5e1ef; }
.search-provider-nav-item.active { background: #fff; border-color: #a9c7ee; }
.search-provider-nav-item > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #eaf2ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
}
.search-provider-nav-item strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-provider-nav-item em { font-size: 10px; white-space: nowrap; }
.search-provider-panels { min-width: 0; }
.search-provider-card[data-search-provider-panel] { display: none; }
.search-provider-card[data-search-provider-panel].is-active { display: block; }
.search-provider-card[data-search-provider-panel][hidden] { display: none !important; }
.search-provider-card[data-search-provider-panel] .provider-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.search-provider-card[data-search-provider-panel] .provider-fields .field { margin-bottom: 0; }
.search-dispatch-panel { margin-bottom: 16px; }
.content-tabs,
.content-tab-panels,
.content-tab-panel { min-width: 0; }
.content-tab-panel[hidden],
.content-tab-panel:not(.is-active) { display: none !important; }
.content-tab-panel.is-active { display: block; }
.content-tab-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f5fa;
}
.content-tab-list button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #52657f;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.content-tab-list button:hover { color: var(--primary); background: #fff; }
.content-tab-list button.active {
  border-color: #bfd3ed;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 7px rgba(15, 36, 66, .08);
}
.content-tab-list button span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 10px;
  background: #eaf2ff;
  font-size: 11px;
}
.template-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.template-editor-tabs {
  display: grid;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}
.template-editor-tabs button {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #263a55;
  text-align: left;
  cursor: pointer;
}
.template-editor-tabs button:hover { border-color: #d5e1ef; background: #fff; }
.template-editor-tabs button.active { border-color: #a9c7ee; background: #fff; }
.template-editor-tabs strong,
.template-editor-tabs small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-editor-tabs strong { font-size: 13px; }
.template-editor-tabs small { color: var(--muted); font-size: 11px; }
.template-editor-panels > .card { margin: 0; }
.product-detail-tabs,
.customer-detail-tabs { margin-bottom: 18px; }
.product-detail-tab-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.customer-detail-tab-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-detail-overview-panel > .product-summary,
.product-detail-suppliers-panel > :first-child,
.product-detail-website-panel > :first-child,
.product-detail-orders-panel > :first-child,
.customer-detail-overview-panel > .customer-overview,
.customer-detail-contact-panel > .activity-form,
.customer-detail-history-panel > .customer-history-card { margin-top: 0; }
.product-detail-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}
.product-detail-tools-grid > .card { height: 100%; margin: 0; }
.product-detail-assets-panel > .product-asset-bridge { margin-top: 0; }
.customer-history-card .customer-history-timeline {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.customer-detail-contact-panel .contact-tools { margin-top: 26px; }
.order-detail-tabs {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 18px;
}
.order-detail-tabs > .content-tab-panels,
.order-detail-inner-tabs > .content-tab-panels {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.order-detail-tab-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.order-detail-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 14px;
  align-items: start;
}
.order-detail-overview-grid > .card,
.order-detail-tabs .content-tab-panel > .card,
.order-detail-inner-tabs .content-tab-panel > .card { margin: 0; }
.order-detail-inner-tabs { min-width: 0; }
.order-detail-inner-tab-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
}
.order-detail-tabs .content-tab-panel,
.order-detail-tabs .table-card,
.order-detail-tabs .table-scroll {
  min-width: 0;
  max-width: 100%;
}
.order-detail-tabs .table-scroll {
  display: block;
  width: 100%;
  overflow-x: auto;
}
.order-detail-logistics-panel table { min-width: 760px; }
.order-detail-finance-panel table { min-width: 720px; }
.order-detail-tabs .order-product-bridge { margin-top: 0; }
.template-new { margin-bottom: 18px; }
.template-new h2 { margin-bottom: 17px; }
.template-new-grid { display: grid; grid-template-columns: 180px 1fr 1.2fr; gap: 14px; margin-bottom: 17px; }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(370px, 1fr)); gap: 18px; }
.template-card .card-title { margin-bottom: 17px; }
.template-kind { border-radius: 100px; padding: 4px 10px; background: #eaf2ff; color: var(--primary); font-size: 12px; font-weight: 600; }
.template-card .field { margin-bottom: 14px; }
.template-builtin, .template-delete-form { margin-top: 14px; }
.email-template-field select { border-color: #b8cee9; background: #f7fbff; }
.email-attachment small { display: block; margin-top: 6px; color: var(--muted); }
.template-section-head { margin: 28px 0 15px; }
.template-section-head h2 { margin-bottom: 5px; }
.document-template-grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); gap: 18px; }
.document-file { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 18px; padding: 12px; background: #f7f9fc; border-radius: 8px; }
.document-actions { margin-bottom: 21px; }
.document-replace-form { border-top: 1px solid var(--line); padding-top: 17px; }
.document-replace-form .field { margin-bottom: 13px; }
.catalog-view {
  margin-bottom: 18px;
}
.catalog-info {
  display: grid; grid-template-columns: minmax(530px, 1fr) 350px;
  align-items: start; gap: 18px;
}
.product-summary-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 22px; align-items: start;
}
.product-summary-grid .info-grid { grid-template-columns: 1fr 1fr; }
.appearance-card small { display: block; color: var(--muted); margin-bottom: 7px; }
.appearance-image {
  display: block; width: 210px; height: 210px; padding: 0; border-radius: 9px;
  overflow: hidden; cursor: zoom-in; border: 1px solid var(--line); background: #f8fafc;
}
.appearance-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.appearance-empty {
  display: grid; place-items: center; width: 210px; height: 210px;
  border: 1px dashed #d4deec; border-radius: 9px; color: var(--muted); background: #fafbfd;
}
.upload-card h2 { margin-bottom: 9px; }
.upload-card p { margin-bottom: 19px; }
.upload-card .field { margin-bottom: 16px; }
.product-link-import-form {
  display: grid; gap: 7px; margin: 12px 0 14px; padding: 10px;
  border: 1px solid #d6e2f0; border-radius: 8px; background: #f8fbff;
}
.product-link-import-form .button {
  justify-self: start;
}
.product-link-import-form small {
  color: var(--muted); line-height: 1.45;
}
.asset-library { margin-bottom: 18px; }
.product-asset-bridge {
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  background: #f8fbff;
}
.product-asset-bridge-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.product-asset-bridge-head h2 {
  margin: 2px 0 4px;
  font-size: 18px;
}
.product-asset-bridge-head small {
  color: var(--muted);
  line-height: 1.45;
}
.product-asset-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.product-asset-status-card {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #dce7f3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.product-asset-status-card:hover {
  border-color: #a9c7f4;
  box-shadow: 0 8px 20px rgba(15, 36, 66, .07);
}
.product-asset-status-card span,
.product-asset-status-card strong,
.product-asset-status-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-asset-status-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.product-asset-status-card strong {
  margin-top: 5px;
  color: #223653;
  font-size: 15px;
}
.product-asset-status-card small {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}
.product-asset-status-assets { border-color: #d6e3f2; }
.product-asset-status-miaoshou { border-color: #c9dbff; background: #f7faff; }
.product-asset-status-ready { border-color: #bce8d0; background: #f1fbf5; }
.product-asset-status-asset { border-color: #dac7f5; background: #fbf8ff; }
.product-asset-status-logistics { border-color: #efd9ad; background: #fffaf0; }
.product-asset-status-blocked { border-color: #f0c8cd; background: #fff6f7; }
.product-supplier-section {
  margin: 0 0 18px; padding: 18px;
  border: 1px solid #dce5ef; border-radius: 8px; background: #fff;
  box-shadow: var(--shadow);
}
.product-supplier-section-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
}
.product-supplier-section-head h2 { margin: 2px 0 4px; font-size: 20px; }
.product-supplier-section-head small { color: var(--muted); line-height: 1.45; }
.product-supplier-add { position: relative; }
.product-supplier-add > summary { list-style: none; cursor: pointer; white-space: nowrap; }
.product-supplier-add > summary::-webkit-details-marker { display: none; }
.product-supplier-add[open] {
  width: min(980px, calc(100vw - 72px)); margin-top: 8px; padding: 14px;
  border: 1px solid #cbd9ea; border-radius: 8px; background: #f8fbff;
}
.product-supplier-add[open] > summary { margin-bottom: 14px; }
.product-supplier-section-head:has(.product-supplier-add[open]) { align-items: stretch; flex-direction: column; }
.product-supplier-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0;
}
.product-supplier-summary span {
  padding: 10px 12px; border: 1px solid #e0e7ef; border-radius: 7px; background: #f8fafc;
}
.product-supplier-summary strong, .product-supplier-summary small { display: block; }
.product-supplier-summary strong { color: #1e3451; font-size: 20px; }
.product-supplier-summary small { margin-top: 3px; color: var(--muted); }
.product-supplier-list { display: grid; gap: 10px; }
.product-supplier-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 210px auto; gap: 14px; align-items: center;
  padding: 13px; border: 1px solid #dfe7f0; border-radius: 8px; background: #fff;
}
.product-supplier-row-preferred { border-color: #9fd9bb; background: #f4fcf7; }
.product-supplier-row-backup { border-color: #c9dbef; background: #f8fbff; }
.product-supplier-row-rejected { opacity: .68; background: #f8f8f8; }
.product-supplier-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.product-supplier-title h3 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.supplier-status { padding: 3px 7px; border-radius: 6px; background: #eef2f7; color: #53657b; font-size: 12px; font-weight: 800; }
.supplier-status-preferred { background: #dff6e9; color: #087443; }
.supplier-status-backup { background: #e8f2ff; color: #1f62ac; }
.supplier-status-rejected { background: #f1f1f1; color: #777; }
.product-supplier-facts {
  display: grid; grid-template-columns: repeat(6, minmax(86px, 1fr)); gap: 8px; margin-top: 10px;
}
.product-supplier-facts span { min-width: 0; }
.product-supplier-facts small, .product-supplier-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-supplier-facts small { color: var(--muted); font-size: 11px; }
.product-supplier-facts strong { margin-top: 3px; color: #344861; font-size: 13px; }
.product-supplier-facts .expired strong { color: var(--danger); }
.product-supplier-note { margin: 9px 0 0; color: #607087; font-size: 13px; line-height: 1.45; }
.supplier-profit { padding: 10px 11px; border: 1px solid #dce5ef; border-radius: 7px; background: #f8fafc; }
.supplier-profit span, .supplier-profit strong, .supplier-profit small { display: block; }
.supplier-profit span { color: var(--muted); font-size: 11px; font-weight: 800; }
.supplier-profit strong { margin-top: 4px; color: #233a57; font-size: 15px; }
.supplier-profit small { margin-top: 3px; color: #64748b; font-size: 11px; }
.supplier-profit-positive { border-color: #b9e5cd; background: #f2fbf6; }
.supplier-profit-thin { border-color: #ead8ad; background: #fffaf0; }
.supplier-profit-loss { border-color: #efc4ca; background: #fff5f6; }
.supplier-profit-indicative { border-color: #cbd8e6; background: #f4f7fa; }
.product-supplier-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.product-supplier-actions details { position: relative; }
.product-supplier-actions summary { color: var(--primary); cursor: pointer; font-size: 13px; font-weight: 800; }
.product-supplier-actions details[open] {
  grid-column: 1 / -1; width: min(980px, calc(100vw - 84px)); padding: 14px;
  border: 1px solid #cbd9ea; border-radius: 8px; background: #f8fbff;
}
.product-supplier-row:has(.product-supplier-actions details[open]) { grid-template-columns: 1fr; align-items: stretch; }
.product-supplier-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.product-supplier-form .field.full { margin-bottom: 12px; }
.product-supplier-evidence-editor {
  margin: 13px 0; padding: 12px; border-top: 1px solid #d9e4ef; border-bottom: 1px solid #d9e4ef;
}
.product-supplier-evidence-editor > strong { display: block; margin-bottom: 10px; color: #29435f; }
.product-supplier-evidence-editor > small { display: block; margin-top: 9px; color: #687a90; line-height: 1.45; }
.product-supplier-evidence {
  display: grid; grid-template-columns: repeat(6, minmax(80px, 1fr)); gap: 8px;
  margin-top: 10px; padding: 9px 10px; border-left: 3px solid #e2b85b; background: #fffaf0;
}
.product-supplier-evidence.is-ready { border-left-color: #34a66f; background: #f2fbf6; }
.product-supplier-evidence span { min-width: 0; }
.product-supplier-evidence small, .product-supplier-evidence strong { display: block; }
.product-supplier-evidence small { color: #6b7c91; font-size: 10px; }
.product-supplier-evidence strong { margin-top: 3px; overflow: hidden; color: #344861; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-supplier-evidence p { grid-column: 1 / -1; margin: 3px 0 0; color: #735b25; font-size: 11px; }
.product-supplier-evidence.is-ready p { color: #27704c; }
.product-website-listing-section {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  background: #fff;
}
.website-listing-syncbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #bfd6c9;
  border-radius: 8px;
  background: #f4faf6;
}
.website-listing-syncbar-warn { border-color: #e3cf9b; background: #fffaf0; }
.website-listing-syncbar strong,
.website-listing-syncbar small { display: block; }
.website-listing-syncbar small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.website-listing-sync-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.website-listing-sync-actions form { margin: 0; }
.website-listing-syncbar > div:first-child { min-width: 0; flex: 1 1 420px; }
.website-operation-history {
  display: grid;
  gap: 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  max-width: 680px;
}
.website-operation-history li { padding: 6px 0; border-top: 1px solid #dce7e0; }
.website-operation-history li > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.website-operation-history li strong { font-size: 12px; font-weight: 700; }
.website-operation-history time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.website-operation-history li small { margin-top: 2px; }
.website-operation-history-empty { margin-top: 7px !important; }
.website-drift-resolution,
.website-rebind-resolution { width: min(360px, 100%); }
.website-drift-resolution > summary,
.website-rebind-resolution > summary { width: 100%; list-style: none; cursor: pointer; }
.website-drift-resolution > summary::-webkit-details-marker,
.website-rebind-resolution > summary::-webkit-details-marker { display: none; }
.website-drift-resolution form {
  display: grid;
  gap: 9px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #e4c98d;
  border-radius: 7px;
  background: #fffaf0;
}
.website-drift-resolution .check-row,
.website-rebind-resolution .check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
}
.website-drift-resolution .check-row input[type="checkbox"],
.website-rebind-resolution .check-row input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
}
.website-rebind-body {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #cbd9e8;
  border-radius: 7px;
  background: #f8fbff;
}
.website-rebind-body form { display: grid; gap: 8px; margin: 0; }
.website-rebind-body .field { margin: 0; }
.website-rebind-receipt { padding-top: 9px; border-top: 1px solid #dbe5ef; }
.website-rebind-receipt strong,
.website-rebind-receipt small { display: block; }
.website-rebind-receipt small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.website-rebind-reinspect > summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.website-rebind-reinspect[open] > summary { margin-bottom: 8px; }
.website-history-compact { min-width: 0; }
.website-history-compact + .website-history-compact,
.website-history-none + .website-history-none { margin-top: 5px; }
.website-history-compact > summary { cursor: pointer; list-style: none; }
.website-history-compact > summary::-webkit-details-marker { display: none; }
.website-history-compact > summary strong,
.website-history-compact > summary small,
.website-history-none { display: block; }
.website-history-compact > summary small { margin-top: 2px; color: var(--muted); }
.website-history-compact ol { margin: 5px 0 0; padding: 5px 0 0; border-top: 1px solid #dce5ef; list-style: none; }
.website-history-compact li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 11px; }
.website-history-compact time { color: var(--muted); white-space: nowrap; }
.website-publish-settings { max-width: 760px; }
.website-publish-boundary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.website-publish-boundary span { min-width: 0; padding: 11px 12px; background: #fff; }
.website-publish-boundary strong,
.website-publish-boundary small { display: block; }
.website-publish-boundary small { margin-top: 3px; color: var(--muted); line-height: 1.35; }
.website-connection-meta { margin: 0 0 16px; }
.website-connection-meta div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.website-connection-meta dt { color: var(--muted); }
.website-connection-meta dd { margin: 0; overflow-wrap: anywhere; }
.website-connect-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.website-connect-form .field { margin: 0; }
.website-reconnect { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.website-reconnect summary { width: fit-content; color: var(--primary); cursor: pointer; font-size: 13px; font-weight: 800; }
.website-reconnect > p { max-width: 680px; margin: 9px 0; line-height: 1.5; }
.website-publish-settings-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 12px; }
.website-publish-settings-actions form { margin: 0; }
.website-publish-settings-actions form:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.product-website-listing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.product-website-listing-head h2 { margin: 2px 0 4px; font-size: 20px; }
.product-website-listing-head small { color: var(--muted); line-height: 1.45; }
.website-listing-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #cbd7e5;
  border-radius: 6px;
  background: #f4f7fa;
  color: #45566d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.website-listing-status-ready { border-color: #afd9c2; background: #eef9f3; color: #087443; }
.website-listing-readiness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid #dfe6ef;
  border-radius: 7px;
  background: #f8fafc;
}
.website-listing-readiness strong,
.website-listing-readiness small { display: block; }
.website-listing-readiness small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.website-listing-readiness-ready { border-color: #b9e2cb; background: #f3fbf6; }
.website-listing-readiness-draft { border-color: #bfd4ed; background: #f4f8fd; }
.website-listing-gaps { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.website-listing-gaps span {
  padding: 3px 6px;
  border-radius: 5px;
  background: #fff0e1;
  color: #8c5810;
  font-size: 11px;
  font-weight: 700;
}
.website-listing-gaps .is-blocking { background: #fff0e1; color: #8c5810; }
.website-listing-gaps .is-warning { background: #eef4fb; color: #365a81; }
.product-website-listing-grid {
  display: grid;
  grid-template-columns: minmax(240px, .7fr) minmax(0, 1.6fr);
  gap: 16px;
  align-items: start;
}
.website-listing-preview {
  min-width: 0;
  padding: 13px;
  border: 1px solid #dfe6ef;
  border-radius: 7px;
  background: #fafbfd;
}
.website-listing-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
}
.website-listing-image img { width: 100%; height: 100%; object-fit: contain; }
.website-listing-preview > span,
.website-listing-preview > small { display: block; margin-top: 9px; color: var(--muted); overflow-wrap: anywhere; }
.website-listing-preview h3 { margin: 8px 0 5px; font-size: 17px; line-height: 1.35; }
.website-listing-preview p { margin: 0; color: #52657c; line-height: 1.55; }
.website-listing-form { min-width: 0; }
.website-listing-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.website-listing-form > .field.full { margin-top: 11px; }
.match-draft-create-form,
.report-draft-form { display: inline-flex; margin: 0; }
.report-market-action { margin-top: 9px; }
.report-refresh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.report-refresh-form { display: inline-flex; margin: 0; }
.report-refresh-receipt { max-width: 320px; }
.report-refresh-receipt > summary {
  cursor: pointer;
  color: #50657e;
  font-size: 11px;
  font-weight: 700;
}
.report-refresh-receipt > ol { display: grid; gap: 5px; margin: 6px 0 0; padding: 0; list-style: none; }
.report-refresh-receipt li { display: grid; grid-template-columns: 1fr auto; gap: 2px 7px; align-items: center; }
.report-refresh-receipt li small { grid-column: 1 / -1; color: var(--muted); line-height: 1.4; }
.report-refresh-receipt li form { grid-column: 2; grid-row: 1; margin: 0; }
.product-supplier-empty, .product-report-empty {
  display: grid; gap: 5px; padding: 22px; border: 1px dashed #d5dfeb; border-radius: 8px;
  color: var(--muted); text-align: center; background: #fafbfd;
}
.product-supplier-empty strong, .product-report-empty strong { color: #344861; }
.product-report-summary {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px;
}
.product-report-summary div {
  padding: 13px; border: 1px solid #dce5ef; border-radius: 8px; background: #fff;
}
.product-report-summary strong, .product-report-summary span { display: block; }
.product-report-summary strong { font-size: 23px; color: #203957; }
.product-report-summary span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.product-report-handoff {
  margin: 0 0 14px; padding: 14px 0;
  border-top: 1px solid #dce5ef; border-bottom: 1px solid #dce5ef;
}
.product-report-handoff .card-title { align-items: flex-end; margin-bottom: 11px; }
.product-report-handoff .card-title h2 { margin: 2px 0 0; }
.product-report-handoff .card-title form { margin: 0; }
.product-handoff-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.product-handoff-metrics {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-bottom: 10px; overflow: hidden;
  border: 1px solid #dce5ef; border-radius: 6px; background: #f8fafc;
}
.product-handoff-metrics div { min-width: 0; padding: 9px 11px; }
.product-handoff-metrics div + div { border-left: 1px solid #dce5ef; }
.product-handoff-metrics strong,
.product-handoff-metrics span { display: block; }
.product-handoff-metrics strong { color: #203957; font-size: 19px; font-variant-numeric: tabular-nums; }
.product-handoff-metrics span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.product-handoff-table table { min-width: 1200px; table-layout: fixed; }
.product-handoff-table th:nth-child(1) { width: 14%; }
.product-handoff-table th:nth-child(2) { width: 16%; }
.product-handoff-table th:nth-child(3) { width: 8%; }
.product-handoff-table th:nth-child(4) { width: 15%; }
.product-handoff-table th:nth-child(5) { width: 11%; }
.product-handoff-table th:nth-child(6) { width: 15%; }
.product-handoff-table th:nth-child(7) { width: 14%; }
.product-handoff-table th:nth-child(8) { width: 7%; }
.product-handoff-table td { vertical-align: top; overflow-wrap: anywhere; }
.product-handoff-table td > strong,
.product-handoff-table td > small { display: block; }
.product-handoff-table td > small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.product-handoff-table .mini-button { white-space: nowrap; }
.product-report-context {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px;
  padding: 13px 15px; border: 1px solid #dfe7f0; border-radius: 8px; background: #f8fafc;
}
.product-report-context span { color: #52657c; min-width: 0; }
.product-report-context strong { margin-right: 8px; color: #263f5e; }
.product-report-context .execution-path { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid #dfe7f0; }
.product-report-reconciliation {
  margin: 0 0 14px; overflow: hidden; border: 1px solid #dce5ef; border-radius: 6px; background: #fff;
}
.product-report-reconciliation > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 48px; padding: 10px 14px; color: #233e5c; cursor: pointer; list-style: none;
}
.product-report-reconciliation > summary::-webkit-details-marker { display: none; }
.product-report-reconciliation > summary span { display: inline-flex; align-items: center; gap: 7px; font-weight: 850; }
.product-report-reconciliation > summary small { color: var(--muted); text-align: right; }
.product-report-reconciliation > summary::after { content: "+"; color: var(--primary); font-size: 18px; font-weight: 700; }
.product-report-reconciliation[open] > summary { border-bottom: 1px solid #e1e8f0; }
.product-report-reconciliation[open] > summary::after { content: "-"; }
.report-reconciliation-body > p {
  margin: 0; padding: 11px 14px; color: #52657c; background: #f8fafc; line-height: 1.55;
}
.report-reconciliation-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #e6ebf1; border-bottom: 1px solid #e6ebf1;
}
.report-reconciliation-metrics span { padding: 10px 14px; color: var(--muted); font-size: 12px; }
.report-reconciliation-metrics span + span { border-left: 1px solid #e6ebf1; }
.report-reconciliation-metrics strong { display: block; margin-bottom: 2px; color: #203957; font-size: 18px; }
.report-reconciliation-box {
  display: flex; flex-wrap: wrap; gap: 7px 18px; padding: 9px 14px; color: #61748a; background: #fbfcfe; font-size: 12px;
}
.report-reconciliation-box strong { color: #304862; font-variant-numeric: tabular-nums; }
.report-reconciliation-list { max-height: 520px; overflow-y: auto; border-top: 1px solid #e6ebf1; }
.report-reconciliation-row {
  display: grid; grid-template-columns: minmax(260px, 1.5fr) minmax(190px, .85fr) minmax(190px, 1fr);
  gap: 14px; align-items: center; min-height: 72px; padding: 10px 14px;
}
.report-reconciliation-row + .report-reconciliation-row { border-top: 1px solid #edf1f5; }
.report-reconciliation-product,
.report-reconciliation-state,
.report-reconciliation-next { min-width: 0; }
.report-reconciliation-product span,
.report-reconciliation-product strong,
.report-reconciliation-product small,
.report-reconciliation-state small,
.report-reconciliation-next strong,
.report-reconciliation-next span { display: block; }
.report-reconciliation-product span {
  overflow: hidden; color: #66798e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap;
}
.report-reconciliation-product strong { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-reconciliation-product small,
.report-reconciliation-state small { margin-top: 4px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.report-reconciliation-badge {
  display: inline-flex; padding: 3px 7px; border-radius: 4px; color: #275174; background: #e7f1f8; font-size: 11px; font-weight: 850;
}
.report-reconciliation-badge.ready { color: #087443; background: #e2f6ea; }
.report-reconciliation-badge.native-running,
.report-reconciliation-badge.native-submitted { color: #185d87; background: #e4f1f8; }
.report-reconciliation-badge.native-unverified { color: #8b5a00; background: #fff0cb; }
.report-reconciliation-badge.native-failed { color: #b42338; background: #fde7ea; }
.report-reconciliation-badge.box-pending,
.report-reconciliation-badge.paused { color: #8b5a00; background: #fff0cb; }
.report-reconciliation-badge.failed { color: #b42338; background: #fde7ea; }
.report-reconciliation-next strong { color: #66798e; font-size: 11px; }
.report-reconciliation-next span { margin-top: 4px; color: #263f5e; line-height: 1.4; }
.product-report-groups {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px;
  width: 100%; min-width: 0; max-width: 100%;
}
.product-report-group {
  min-width: 0; max-width: 100%; padding: 17px; overflow: hidden;
  border: 1px solid #dce5ef; border-radius: 5px; background: #fff;
}
.product-report-group.is-unassigned { border-color: #e7d8b6; background: #fffdf8; }
.product-report-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.product-report-group-head span { color: var(--muted); font-size: 11px; font-weight: 800; }
.product-report-group-head h2 { margin: 3px 0 0; font-size: 19px; }
.product-report-group-head small { color: var(--muted); }
.product-report-group-status { min-width: 220px; text-align: right; }
.product-report-group-status strong,
.product-report-group-status small { display: block; }
.product-report-group-status strong { color: #203957; font-size: 13px; }
.product-report-group-status small { margin-top: 4px; }
.report-group-collection { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 7px; border: 1px solid #d7e0eb; border-radius: 6px; background: #f7f9fc; color: #53657a; font-size: 12px; font-weight: 800; }
.report-group-collection.complete { border-color: #bde3ce; background: #eef9f2; color: #17643a; }
.report-group-collection.partial { border-color: #f0d49e; background: #fff9ec; color: #805715; }
.report-group-collection.awaiting_details { border-color: #d9e1ea; background: #f7f9fc; color: #64748b; }
.product-report-market,
.product-report-suppliers { min-width: 0; max-width: 100%; overflow: hidden; }
.product-report-market { margin-bottom: 14px; }
.product-report-market h3, .product-report-suppliers h3 { margin: 0 0 8px; font-size: 14px; color: #314966; }
.product-report-market > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.report-market-reference {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 10px; border: 1px solid #dce6f0; border-radius: 5px; background: #f7fbff;
}
.report-market-thumb {
  position: relative; display: grid; place-items: center; width: 58px; height: 58px; overflow: hidden;
  border: 1px solid #dce5ef; border-radius: 4px; background: #fff; color: var(--muted); font-size: 11px;
}
.report-market-thumb img { width: 100%; height: 100%; object-fit: contain; }
.report-market-thumb img.is-unverified { opacity: .55; }
.report-market-thumb em {
  position: absolute; right: 3px; bottom: 3px; padding: 2px 4px;
  border-radius: 3px; background: rgba(71, 85, 105, .9); color: #fff;
  font-size: 9px; font-style: normal; font-weight: 700;
}
.report-market-copy { min-width: 0; }
.report-market-copy span, .report-market-copy strong, .report-market-copy small { display: block; }
.report-market-reference span { color: #5e7188; font-size: 11px; font-weight: 800; }
.report-market-reference strong { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-market-reference small { margin-top: 5px; color: var(--muted); }
.report-group-empty { padding: 12px; color: var(--muted); border: 1px dashed #d7e0eb; border-radius: 7px; background: #fafbfd; }
.report-profit { display: inline-block; padding: 4px 7px; border-radius: 6px; font-size: 12px; font-weight: 800; }
.report-profit-positive { color: #087443; background: #def7e8; }
.report-profit-thin { color: #8b5a00; background: #fff0d5; }
.report-profit-loss { color: #b42338; background: #fde7ea; }
.report-profit-indicative { color: #36556f; background: #e9f0f6; }
.report-profit-cell > small,
.report-inquiry-plan > small,
.report-supplier-table td > small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }
.report-inquiry-plan { margin-top: 8px; border-top: 1px solid #dce5ef; padding-top: 7px; }
.report-inquiry-plan summary { color: #315875; font-size: 12px; font-weight: 800; cursor: pointer; }
.report-inquiry-plan p { margin: 7px 0 5px; color: #475569; font-size: 11px; line-height: 1.5; }
.report-inquiry-plan ol { margin: 0; padding-left: 18px; }
.report-inquiry-plan li { margin: 0 0 6px; color: #475569; font-size: 11px; line-height: 1.45; }
.report-inquiry-plan li strong,
.report-inquiry-plan li span { display: block; }
.report-supplier-table { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
.report-supplier-table table { min-width: 1320px; }
.report-supplier-table td { vertical-align: top; }
.report-supplier-table td:first-child { min-width: 190px; }
.report-supplier-table td:nth-child(3) { min-width: 210px; }
.report-supplier-table td:nth-child(6) { min-width: 210px; }
.report-sku-options { max-width: 360px; overflow-wrap: anywhere; color: #334155 !important; }
.report-sku-options b { display: inline-block; margin-right: 5px; color: #245b82; font-size: 10px; }
.report-sku-options.is-missing { color: #9a6400 !important; }
.collection-next-action { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #c9d7e5; border-left: 3px solid #2e6f9e; border-radius: 6px; background: #f7fafc; }
.collection-next-action > span { color: #2e6f9e; font-size: 11px; font-weight: 700; }
.collection-next-action div { display: grid; gap: 2px; min-width: 0; }
.collection-next-action strong { color: #172b3a; font-size: 13px; }
.collection-next-action small { color: #586d7c; line-height: 1.45; }
.collection-next-action em { max-width: 340px; color: #3f6176; font-size: 11px; font-style: normal; text-align: right; }
@media (max-width: 760px) { .collection-next-action { grid-template-columns: auto minmax(0, 1fr); } .collection-next-action em { grid-column: 1 / -1; max-width: none; text-align: left; } }
.supplier-price-basis {
  display: inline-flex; margin: 5px 0 0; padding: 2px 5px; border-radius: 4px;
  color: #8b5a00; background: #fff0cb; font-size: 10px; font-weight: 800;
}
.supplier-price-basis.is-comparable { color: #087443; background: #e5f7ec; }
.report-evidence-ready { color: #087443 !important; }
.report-evidence-missing { color: #9a6400 !important; }
.report-best-badge {
  display: inline-flex; margin-left: 6px; padding: 2px 5px; border-radius: 4px;
  color: #087443; background: #e5f7ec; font-size: 10px; font-weight: 800;
}
.report-best-badge.provisional { color: #8b5a00; background: #fff0cb; }
.report-same-product {
  display: inline-flex; margin-top: 6px; padding: 2px 5px; border-radius: 4px;
  font-size: 10px; font-weight: 800;
}
.report-same-product.confirmed { color: #087443; background: #e5f7ec; }
.report-same-product.pending { color: #8b5a00; background: #fff0cb; }
.report-same-product.rejected { color: #b42338; background: #fde7ea; }
.report-estimate-editor { margin: 0 0 14px; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.report-estimate-editor > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 8px 2px; color: #24405f; cursor: pointer; list-style: none;
}
.report-estimate-editor > summary::-webkit-details-marker { display: none; }
.report-estimate-editor > summary span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 850; }
.report-estimate-editor > summary small { color: var(--muted); }
.report-estimate-editor > summary::after { content: "+"; color: var(--primary); font-size: 18px; font-weight: 700; }
.report-estimate-editor[open] > summary::after { content: "-"; }
.report-estimate-form {
  display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto; gap: 9px; align-items: end;
  padding: 11px 0 12px;
}
.report-estimate-form .field { margin: 0; }
.report-estimate-form .button { min-height: 40px; white-space: nowrap; }
.report-estimate-editor > p { margin: -2px 0 12px; color: var(--muted); font-size: 12px; }
.match-estimate-badge { font-variant-numeric: tabular-nums; }
.match-estimate-positive { color: #087443 !important; background: #e3f6eb !important; }
.match-estimate-thin { color: #8b5a00 !important; background: #fff0d5 !important; }
.match-estimate-loss { color: #b42338 !important; background: #fde7ea !important; }
.match-estimate-indicative { color: #36556f !important; background: #e9f0f6 !important; }
.asset-title-actions { display: flex; align-items: center; gap: 18px; }
.asset-download-selected { padding: 7px 13px; font-size: 13px; }
.asset-download-selected:disabled { opacity: .48; cursor: not-allowed; }
.asset-filters { display: flex; flex-wrap: wrap; gap: 9px; margin: 17px 0; }
.asset-filter {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 20px; padding: 7px 12px; background: white; color: #4e617c; cursor: pointer;
}
.asset-filter span {
  min-width: 18px; padding: 1px 6px; border-radius: 12px; background: #eef3f9; font-size: 12px;
}
.asset-filter.active { color: white; background: var(--primary); border-color: var(--primary); }
.asset-filter.active span { color: var(--primary); background: white; }
.asset-layout { display: grid; grid-template-columns: minmax(430px, 1fr) 300px; gap: 18px; align-items: start; }
.asset-file-preview {
  padding: 0; border: 0; color: var(--primary); background: transparent;
  font: inherit; text-align: left; cursor: zoom-in;
}
.asset-actions { display: flex; align-items: center; gap: 16px; }
.asset-actions form { margin: 0; }
.download-link { color: var(--primary); font-size: 14px; }
.download-link.disabled { color: var(--muted); cursor: not-allowed; }
.asset-row-missing td { background: #fff7f7; }
.asset-missing-file { color: var(--danger); font-size: 13px; font-weight: 800; }
.asset-select-cell { width: 40px; padding-left: 4px; padding-right: 4px; }
.asset-select-cell input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.asset-select-cell input:disabled { cursor: not-allowed; opacity: .45; }
.asset-preview-panel {
  min-height: 300px; display: grid; place-items: center; border: 1px dashed #d4deec;
  border-radius: 9px; background: #fafbfd; overflow: hidden;
}
.asset-preview-empty { color: var(--muted); font-size: 13px; padding: 20px; text-align: center; }
.asset-preview-image {
  position: relative; display: block; width: 100%; padding: 0;
  border: 0; background: white; cursor: zoom-in;
}
.asset-preview-image[hidden] { display: none; }
.asset-preview-image img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.asset-preview-image span {
  position: absolute; right: 10px; bottom: 10px; padding: 5px 10px;
  border-radius: 20px; color: white; font-size: 12px; background: rgba(16, 27, 44, .58);
}
.media-card { position: sticky; top: 18px; }
.asset-table { margin-bottom: 18px; }
.product-gallery { max-width: 620px; }
.gallery-main {
  position: relative; display: block; width: min(100%, 560px); padding: 0;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: white; cursor: zoom-in;
}
.gallery-main img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.gallery-main span {
  position: absolute; right: 12px; bottom: 12px; padding: 6px 11px;
  border-radius: 20px; color: white; font-size: 12px; background: rgba(16, 27, 44, .58);
}
.gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; padding-top: 12px; }
.gallery-thumb {
  flex: 0 0 72px; width: 72px; height: 72px; padding: 3px; background: white;
  border: 1px solid var(--line); border-radius: 7px; cursor: pointer;
}
.gallery-thumb.selected { border: 2px solid var(--primary); padding: 2px; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-lightbox {
  position: fixed; z-index: 50; inset: 0; display: grid; place-items: center;
  padding: 36px; background: rgba(5, 12, 24, .8);
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox img {
  display: block; max-width: min(94vw, 1500px); max-height: 91vh;
  object-fit: contain; background: white;
}
.gallery-close {
  position: fixed; right: 26px; top: 18px; z-index: 51; border: 0;
  color: white; background: transparent; font-size: 44px; line-height: 1; cursor: pointer;
}
.gallery-open { overflow: hidden; }
.product-video {
  display: block; width: min(100%, 520px); max-height: 360px; margin-top: 18px;
  border-radius: 9px; background: #111;
}
code { background: #f1f4f8; border-radius: 5px; padding: 2px 5px; }
.alert {
  border-radius: 8px; background: #fce9ea; color: var(--danger);
  padding: 10px 12px; margin: 16px 0;
}
.alert.success { background: #e2f7eb; color: #09713a; }
.login-wrap { min-height: calc(100vh - 90px); display: grid; place-items: center; }
.login-panel {
  width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 36px; box-shadow: 0 20px 55px rgba(20, 38, 62, .1);
}
.login-brand { margin-bottom: 28px; }
.login-form .field { margin-bottom: 17px; }
.full-button { width: 100%; margin-top: 8px; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    height: auto; min-height: 66px; flex-direction: row; align-items: center;
    overflow-x: auto; padding: 11px 14px;
  }
  .sidebar-brand {
    flex: 0 0 auto; margin: 0; padding: 0 12px 0 0;
    border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, .12);
  }
  .side-nav { flex: 1 0 auto; flex-direction: row; overflow-x: auto; padding: 0; }
  .nav-group { display: flex; flex-direction: row; align-items: center; gap: 5px; }
  .nav-group-label { display: none; }
  .nav-group-collapsible {
    flex: 0 0 auto;
    padding: 0;
  }
  .nav-group-collapsible summary {
    min-height: 38px;
    padding: 7px 9px;
    background: rgba(255, 255, 255, .06);
  }
  .nav-group-collapsible summary .nav-group-label {
    display: inline;
    color: rgba(241, 245, 249, .88);
    white-space: nowrap;
  }
  .nav-group-collapsible.nav-group-active {
    padding: 0;
    border: 0;
    background: transparent;
  }
  .nav-group-collapsible[open] .nav-group-links {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin: 0 0 0 5px;
  }
  .side-nav a { flex: 0 0 auto; min-height: 38px; white-space: nowrap; }
  .sidebar-account {
    flex: 0 0 auto; display: flex; align-items: center; margin: 0; padding: 8px 10px;
  }
  .container { width: min(100% - 28px, 1200px); margin-top: 22px; }
  .container.app-main { width: min(100% - 28px, 1200px); }
  .container.app-main:has(.product-match-layout),
  .container.app-main:has(.product-match-plugin-page) { width: min(100% - 28px, 1200px); }
  .stats, .dashboard-grid, .detail-grid, .form-grid { grid-template-columns: 1fr 1fr; }
  .workflow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-layout, .template-grid, .document-template-grid { grid-template-columns: 1fr; }
  .settings-page-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collector-preflight { grid-template-columns: 1fr; align-items: stretch; }
  .collector-preflight-action { text-align: left; }
  .collector-browser-local-grid { grid-template-columns: 1fr; }
  .collector-mode-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collector-mode-primary-grid,
  .collector-local-grid { grid-template-columns: 1fr; }
  .collector-mode-brief { align-items: stretch; flex-direction: column; }
  .collector-route-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collector-local-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-provider-grid { grid-template-columns: 1fr; }
  .search-provider-workspace { grid-template-columns: 1fr; }
  .search-provider-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; }
  .export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-new-grid { grid-template-columns: 1fr; }
  .template-workspace { grid-template-columns: 1fr; }
  .template-editor-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-detail-tools-grid { grid-template-columns: 1fr; }
  .order-detail-overview-grid { grid-template-columns: 1fr; }
  .order-detail-tab-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .smtp-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-buttons { margin-left: 0; align-items: stretch; }
  .contact-buttons .button, .contact-buttons .contact-disabled { width: 100%; }
  .catalog-info, .asset-layout, .bulk-email-layout, .whatsapp-chat-layout, .lead-grid, .product-match-layout, .product-job-focus { grid-template-columns: 1fr; }
  .product-match-run-form,
  .product-plugin-grid { grid-template-columns: 1fr; }
  .product-flow-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .miaoshou-platform-note { align-items: stretch; flex-direction: column; }
  .miaoshou-platform-tags { justify-content: flex-start; }
  .customer-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-readiness-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-stage-grid,
  .fulfillment-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-collect-mode-grid,
  .product-channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-plugin-decision { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .miaoshou-source-grid { grid-template-columns: 1fr; }
  .source-overview-grid { grid-template-columns: 1fr 1fr; }
  .product-review-queue { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-match-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .local-browser-task-overview dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .miaoshou-task-row { grid-template-columns: 1fr; }
  .miaoshou-plugin-task-layout { grid-template-columns: 1fr; }
  .miaoshou-plugin-task-copy dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .miaoshou-plugin-actions,
  .miaoshou-plugin-sync-form,
  .miaoshou-plugin-retry-form { min-width: 0; }
  .miaoshou-plugin-actions { grid-template-columns: 1fr; }
  .miaoshou-native-blocker { min-width: 0; }
  .miaoshou-native-blocker > div { grid-template-columns: 1fr; }
  .product-result-title { align-items: stretch; flex-direction: column; }
  .product-result-title .button { align-self: flex-start; }
  .lead-period-panel { align-items: stretch; flex-direction: column; }
  .period-tabs { flex-wrap: wrap; }
  .asset-title, .asset-title-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .asset-preview-panel { min-height: 240px; max-width: 360px; }
  .media-card { position: static; }
  .product-summary-grid { grid-template-columns: minmax(0, 1fr) 210px; }
  .product-supplier-row { grid-template-columns: 1fr 190px; }
  .product-supplier-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .product-supplier-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-supplier-facts, .product-supplier-evidence { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-website-listing-grid { grid-template-columns: 1fr; }
  .product-report-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-handoff-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-handoff-metrics div:nth-child(5) { border-left: 0; }
  .product-handoff-metrics div:nth-child(n+5) { border-top: 1px solid #dce5ef; }
  .report-reconciliation-row { grid-template-columns: minmax(240px, 1.35fr) minmax(170px, .8fr) minmax(170px, 1fr); }
  .report-estimate-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-estimate-form .button { width: 100%; }
  .product-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 9px; padding: 8px 9px; }
  .product-row-link { grid-template-columns: 78px minmax(190px, 1fr) repeat(3, minmax(86px, .75fr)); gap: 11px; }
  .product-row-image { width: 78px; height: 78px; }
  .product-row-field.supplier { display: none; }
}
@media (max-width: 620px) {
  h1 { font-size: 23px; }
  .sidebar { align-items: flex-start; flex-wrap: wrap; }
  .sidebar-brand { width: 100%; border-right: 0; padding: 0 0 8px; }
  .sidebar-account { width: 100%; justify-content: space-between; }
  .page-head, .filters { flex-direction: column; align-items: stretch; }
  .page-actions { justify-content: flex-start; }
  .page-actions .button,
  .product-match-empty-actions .button,
  .product-empty-actions .button,
  .order-empty-actions .button { width: 100%; }
  .lead-form-row { grid-template-columns: 1fr; }
  .location-select-grid, .location-unified-grid { grid-template-columns: 1fr; }
  .stats, .dashboard-grid, .detail-grid, .form-grid, .form-grid.compact { grid-template-columns: 1fr; }
  .product-profile-tab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collector-preflight dl { grid-template-columns: 1fr; }
  .product-detail-tab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-detail-tab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-profile-tab-panel textarea { min-height: 220px; }
  .product-supplier-section-head { flex-direction: column; }
  .product-supplier-add, .product-supplier-add[open] { width: 100%; }
  .product-supplier-add > summary { width: 100%; }
  .product-supplier-summary, .product-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-report-handoff .card-title { align-items: stretch; flex-direction: column; }
  .product-handoff-actions { justify-content: stretch; }
  .product-report-handoff .card-title form,
  .product-report-handoff .card-title .button { width: 100%; }
  .product-handoff-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-handoff-metrics div:nth-child(odd) { border-left: 0; }
  .product-handoff-metrics div:nth-child(n+3) { border-top: 1px solid #dce5ef; }
  .product-report-context, .product-supplier-form-grid, .product-supplier-facts, .product-supplier-evidence,
  .product-report-market > div { grid-template-columns: 1fr; }
  .product-report-reconciliation > summary { align-items: flex-start; }
  .product-report-reconciliation > summary small { display: none; }
  .report-reconciliation-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-reconciliation-metrics span:nth-child(3) { border-left: 0; border-top: 1px solid #e6ebf1; }
  .report-reconciliation-metrics span:nth-child(4) { border-top: 1px solid #e6ebf1; }
  .report-reconciliation-row { grid-template-columns: 1fr; gap: 8px; align-items: start; }
  .report-reconciliation-product span,
  .report-reconciliation-product strong { white-space: normal; }
  .website-listing-form-grid { grid-template-columns: 1fr; }
  .product-website-listing-head,
  .website-listing-readiness { align-items: stretch; flex-direction: column; }
  .website-listing-gaps { justify-content: flex-start; }
  .website-listing-syncbar { align-items: stretch; flex-direction: column; }
  .website-listing-sync-actions { justify-content: stretch; }
  .website-listing-sync-actions form,
  .website-listing-sync-actions .button,
  .website-listing-syncbar > .button { width: 100%; }
  .website-drift-resolution,
  .website-rebind-resolution { width: 100%; }
  .website-drift-resolution form .button,
  .website-rebind-resolution form .button { width: 100%; }
  .website-publish-boundary { grid-template-columns: 1fr; }
  .website-connect-form { grid-template-columns: 1fr; }
  .website-connect-form .button { width: 100%; }
  .website-publish-settings-actions,
  .website-publish-settings-actions form,
  .website-publish-settings-actions form:first-child,
  .website-publish-settings-actions .button { width: 100%; }
  .website-connection-meta div { grid-template-columns: 1fr; gap: 3px; }
  .product-supplier-row { grid-template-columns: 1fr; }
  .product-supplier-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-supplier-actions details[open] { width: 100%; }
  .product-report-group-head { flex-direction: column; }
  .product-report-group-status { min-width: 0; text-align: left; }
  .report-estimate-editor > summary { align-items: flex-start; }
  .report-estimate-editor > summary small { display: none; }
  .report-estimate-form { grid-template-columns: 1fr; }
  .order-next-panel { grid-template-columns: 1fr; }
  .order-next-actions { justify-content: stretch; }
  .order-next-action.button,
  .order-next-action .button,
  .order-next-actions .inline-post-form,
  .order-next-actions .inline-post-form .button { width: 100%; }
  .order-next-action.button span,
  .order-next-action.button small { max-width: 100%; }
  .order-product-bridge {
    grid-template-columns: 1fr;
  }
  .order-product-bridge-grid {
    grid-template-columns: 1fr;
  }
  .logistics-reference-actions,
  .logistics-reference-actions .inline-post-form,
  .logistics-reference-actions .button { width: 100%; }
  .order-commercial-summary-grid, .order-commercial-grid { grid-template-columns: 1fr; }
  .whatsapp-chat-import { grid-template-columns: 1fr; }
  .whatsapp-chat-import, .whatsapp-chat-import label, .whatsapp-chat-import input { width: 100%; }
  .workflow-grid { grid-template-columns: 1fr; }
  .product-collect-mode-grid,
  .product-channel-grid { grid-template-columns: 1fr; }
  .product-plugin-decision { grid-template-columns: 1fr; }
  .miaoshou-source-grid { grid-template-columns: 1fr; }
  .product-plugin-entry { grid-template-columns: 40px minmax(0, 1fr); }
  .product-plugin-entry b { grid-column: 2; width: fit-content; }
  .product-flow-strip { grid-template-columns: 1fr; }
  .miaoshou-platform-note { padding: 12px; }
  .miaoshou-source-group-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .miaoshou-source-group-title small { text-align: left; }
  .miaoshou-platform-tags span { flex: 1 1 auto; justify-content: center; }
  .miaoshou-plugin-setting { align-items: flex-start; flex-direction: column; }
  .miaoshou-plugin-setting-actions { width: 100%; justify-content: space-between; }
  .miaoshou-plugin-task-copy dl { grid-template-columns: 1fr; }
  .local-browser-task-overview dl,
  .local-browser-stage-list,
  .local-browser-recovery { grid-template-columns: 1fr; }
  .local-browser-recovery .button { width: 100%; justify-content: center; }
  .lead-flow-head { align-items: stretch; flex-direction: column; }
  .lead-flow-head .mini-button { align-self: flex-start; }
  .lead-flow-grid { grid-template-columns: 1fr; }
  .product-match-ops-details summary {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
    padding-right: 46px;
  }
  .product-match-ops-details summary small {
    margin-left: 0;
    white-space: normal;
  }
  .product-match-ops-details summary::after {
    position: absolute;
    right: 14px;
    top: 12px;
  }
  .product-review-queue { grid-template-columns: 1fr; }
  .fulfillment-bridge-head { align-items: stretch; flex-direction: column; }
  .fulfillment-stage-grid { grid-template-columns: 1fr; }
  .customer-bridge-head { align-items: stretch; flex-direction: column; }
  .customer-bridge-head .mini-button { align-self: flex-start; }
  .customer-stage-grid { grid-template-columns: 1fr; }
  .library-readiness-grid { grid-template-columns: 1fr; }
  .product-detail-readiness {
    align-items: flex-start;
    flex-direction: column;
  }
  .product-detail-readiness .mini-button { width: 100%; }
  .product-asset-bridge-head {
    align-items: stretch;
    flex-direction: column;
  }
  .product-asset-status-grid { grid-template-columns: 1fr; }
  .order-stage-grid { grid-template-columns: 1fr; }
  .product-match-run-form .button,
  .product-match-run-form .form-actions .button { width: 100%; }
  .product-match-stats, .source-overview-grid, .product-match-result-grid, .product-job-detail dl { grid-template-columns: 1fr; }
  .product-match-card-summary { grid-template-columns: 76px minmax(0, 1fr); }
  .product-match-image { width: 76px; height: 76px; }
  .export-grid { grid-template-columns: 1fr; }
  .settings-page-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-capability-grid { grid-template-columns: 1fr; }
  .collector-mode-summary,
  .collector-flow-steps,
  .collector-route-map,
  .collector-local-map { grid-template-columns: 1fr; }
  .collector-mode-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collector-runtime-facts,
  .browser-local-channel-grid { grid-template-columns: 1fr; }
  .collector-local-subpager > .settings-subtabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-contact-grid,
  .settings-api-subpager .api-token-create-form,
  .search-provider-card[data-search-provider-panel] .provider-fields { grid-template-columns: 1fr; }
  .search-provider-nav {
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .search-provider-nav-item { flex: 0 0 158px; }
  .api-token-table table { min-width: 760px; }
  .template-editor-tabs { display: flex; overflow-x: auto; }
  .template-editor-tabs button { flex: 0 0 170px; }
  .collector-mode-summary-item small { white-space: normal; }
  .product-result-title .button { width: 100%; }
  .job-progress-latest { max-width: 100%; white-space: normal; }
  .product-summary-grid { grid-template-columns: 1fr; }
  .appearance-image, .appearance-empty { width: min(100%, 260px); height: auto; aspect-ratio: 1 / 1; }
  .product-list-actions { align-items: flex-start; justify-content: flex-start; }
  .product-row { grid-template-columns: 26px minmax(0, 1fr); gap: 9px; padding: 8px; }
  .product-row-link { grid-template-columns: 72px 1fr; gap: 10px; }
  .product-row-image { width: 72px; height: 72px; }
  .product-row-main { grid-column: 2; }
  .product-row-field { grid-column: span 1; padding-top: 8px; border-top: 1px solid var(--line); }
  .product-row-field.supplier { display: block; grid-column: 1 / -1; }
  .product-row-field.price { grid-column: 1 / -1; }
  .product-row-readiness { align-items: flex-start; flex-direction: column; gap: 5px; }
  .product-row-readiness small { max-width: 100%; }
  .product-row-select { min-height: 72px; }
  .product-row-actions {
    grid-column: 2;
    justify-content: flex-start;
    min-width: 0;
  }
  .product-row-delete { justify-self: start; }
  .filters select { width: 100%; }
  .filters .button { width: 100%; }
  .table-actions { align-items: flex-end; flex-direction: column; }
  .card { padding: 18px; }
}
.readonly a[href="/customers/new"],
.readonly a[href="/products/new"],
.readonly a[href^="/orders/new"],
.readonly a[href$="/edit"],
.readonly .danger-zone,
.readonly .lead-create,
.readonly .product-match-create,
.readonly .product-plugin-panel,
.readonly .bulk-email-button,
.readonly .select-cell,
.readonly .asset-select-cell,
.readonly .product-list-actions,
.readonly .product-row-select,
.readonly .product-row-actions,
.readonly .product-row-delete,
.readonly form[action="/collector/convert"],
.readonly form[action="/collector/leads/bulk"],
.readonly form[action="/orders/save"],
.readonly form[action="/orders/delete"],
.readonly form[action="/shipments/save"],
.readonly form[action="/finance/save"],
.readonly form[action="/product-matches/result/status"],
.readonly form[action="/product-matches/job/retry"],
.readonly form[action="/product-matches/job/delete"],
.readonly form[action="/miaoshou/tasks/create"],
.readonly form[action="/miaoshou/tasks/publish"],
.readonly form[action$="/activity"],
.readonly form[action$="/send-email"],
.readonly form[action$="/whatsapp-chat/import"],
.readonly form[action$="/file/delete"],
.readonly form[action$="/upload"],
.readonly .upload-card,
.readonly #asset-download-form {
  display: none !important;
}

/* Collector page: operator console layout. */
.collector-head {
  min-height: 118px;
  margin-bottom: 18px;
  padding: 24px 26px;
  border: 1px solid #183968;
  border-radius: 18px;
  color: #f7fbff;
  background:
    linear-gradient(135deg, rgba(16, 36, 90, .96), rgba(13, 84, 120, .94)),
    #10245a;
  box-shadow: 0 18px 42px rgba(16, 36, 90, .18);
}
.collector-head .eyebrow {
  color: #8bd6ff;
}
.collector-head h1 {
  color: #fff;
  font-size: 34px;
}
.collector-head .button.secondary {
  border-color: rgba(255, 255, 255, .38);
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
.collector-head .button.secondary:hover {
  border-color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .17);
}
.collector-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.collector-stats .stat {
  min-height: 98px;
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: none;
}
.collector-stats .stat strong {
  font-size: 25px;
  margin: 2px 0 0;
}
.collector-stats .stat span {
  color: #445873;
  font-weight: 800;
}
.collector-command-card,
.collector-jobs-card,
.collector-filter {
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(20, 38, 62, .07);
}
.collector-command-card {
  border-color: #cbd9ea;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.collector-command-card .card-title {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.collector-command-card .card-title h2,
.collector-jobs-card .card-title h2 {
  font-size: 21px;
}
.collector-command-card .lead-note {
  max-width: 880px;
  margin: 0 0 20px;
}
.collector-command-card textarea,
.collector-command-card input,
.collector-command-card select {
  border-radius: 10px;
  background: #fbfdff;
}
.collector-command-card textarea:focus,
.collector-command-card input:focus,
.collector-command-card select:focus {
  background: #fff;
}
.collector-command-card .button[type="submit"] {
  min-width: 138px;
  min-height: 46px;
  border-color: #0f5fca;
  background: #0f5fca;
  box-shadow: 0 10px 20px rgba(17, 103, 216, .16);
}
.collector-command-card .location-picker {
  border-color: #d6e2f0;
  background: #f4f8fd;
}
.collector-command-card .source-card {
  min-height: 58px;
  border-color: #d8e3f0;
  background: #f8fbff;
}
.collector-command-card .lead-source-group {
  border-color: #d3e0ef;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
}
.collector-command-card .lead-source-group-grid .source-card {
  min-height: 54px;
}
.collector-command-card .source-card:hover {
  border-color: #95b7e2;
  background: #fff;
}
.collector-command-card .source-card:has(input:checked) {
  border-color: #2d75d9;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .18);
}
.collector-command-card .source-card.disabled {
  opacity: .48;
}
.collector-jobs-card {
  padding: 22px;
}
.collector-jobs-card .card-title {
  margin-bottom: 12px;
}
.collector-jobs-card th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faff;
}
.collector-filter {
  border-color: #d8e4f2;
  background: #fff;
}
.collector-auto-dashboard {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-color: #d4e1ef;
  border-radius: 8px;
  background: #f7fafd;
  box-shadow: 0 1px 3px rgba(20, 38, 62, .035);
}
.collector-auto-head,
.collector-api-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.collector-auto-head {
  padding-bottom: 10px;
  border-bottom: 1px solid #dce6f1;
}
.collector-auto-head strong,
.collector-api-title strong {
  display: block;
  color: #26384f;
}
.collector-auto-head small,
.collector-api-title small {
  display: block;
  margin-top: 2px;
  color: #6a7a90;
}
.collector-auto-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f4f95;
  background: #eaf4ff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.collector-auto-summary {
  display: grid;
  grid-template-columns: minmax(250px, .95fr) minmax(230px, .75fr) minmax(420px, 1.5fr);
  gap: 8px;
  margin-bottom: 10px;
}
.collector-auto-summary-block {
  min-width: 0;
  min-height: 0;
  padding: 9px 10px;
  border: 1px solid #dce7f3;
  border-radius: 7px;
  background: #fff;
}
.collector-auto-primary {
  border-color: #b9d2ef;
  background: #f6fbff;
}
.collector-auto-queue-block {
  background: #fff;
}
.collector-auto-latest-block {
  background: #fff;
}
.collector-auto-summary-title,
.collector-auto-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.collector-auto-summary-title strong,
.collector-auto-summary-line b {
  min-width: 0;
  color: #24384f;
  font-size: 13px;
  line-height: 1.3;
}
.collector-auto-summary-title small,
.collector-auto-summary-line span,
.collector-auto-summary-block > small {
  color: #6a7a90;
  font-size: 11px;
  line-height: 1.35;
}
.collector-auto-summary-line {
  margin-top: 7px;
}
.collector-auto-summary-line b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.collector-auto-summary-line span {
  flex: 0 0 auto;
  min-width: 44px;
  color: #152840;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.collector-auto-summary-block p {
  display: -webkit-box;
  margin: 5px 0 0;
  max-height: 32px;
  overflow: hidden;
  color: #516176;
  font-size: 12px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.collector-auto-summary-block > small {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.collector-auto-layout {
  display: block;
}
.collector-auto-main,
.collector-auto-side {
  display: grid;
  min-width: 0;
  gap: 8px;
}
.collector-auto-signal-grid {
  display: grid;
  grid-template-columns: minmax(430px, 1.45fr) minmax(260px, .8fr) minmax(380px, 1.15fr);
  gap: 8px;
  align-items: start;
}
.collector-api-panel,
.collector-source-panel {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dce7f3;
  border-radius: 7px;
  background: #fff;
}
.collector-auto-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.collector-auto-stat {
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f9fbfe;
}
.collector-auto-stat span {
  display: block;
  color: #66758b;
  font-size: 11px;
}
.collector-auto-stat strong {
  display: block;
  margin-top: 2px;
  color: #1e3552;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.collector-api-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.collector-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.collector-source-rotation-panel .collector-source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.collector-lane-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.collector-lane-grid .collector-source-item {
  min-height: 0;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
}
.collector-lane-grid .collector-source-item span {
  text-align: right;
}
.collector-lane-grid .collector-source-item > small {
  display: -webkit-box;
  max-height: 15px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.collector-api-item,
.collector-source-item {
  min-width: 0;
  min-height: 0;
  padding: 6px 7px;
  border: 1px solid #dce7f3;
  border-radius: 7px;
  background: #fff;
}
.collector-api-item {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 1px 6px;
  min-height: 52px;
}
.collector-source-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1px 7px;
}
.collector-api-item strong,
.collector-api-item small,
.collector-api-item span,
.collector-source-item strong,
.collector-source-item small,
.collector-source-item span {
  display: block;
}
.collector-api-item > div,
.collector-source-item > div {
  min-width: 0;
}
.collector-api-item strong,
.collector-source-item strong {
  color: #24384f;
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: normal;
}
.collector-api-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}
.collector-api-item span,
.collector-source-item span {
  margin: 0;
  color: #152840;
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.collector-api-item span {
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.1;
  text-align: left;
}
.collector-api-item small,
.collector-source-item small {
  color: #6a7a90;
  font-size: 11px;
  line-height: 1.3;
}
.collector-api-item > small {
  grid-column: 1 / -1;
  text-align: left;
  display: -webkit-box;
  max-height: 15px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.collector-source-item > small {
  grid-column: 1 / -1;
  display: -webkit-box;
  max-height: 28px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.collector-auto-dashboard .collector-api-item,
.collector-auto-dashboard .collector-source-item {
  min-height: 46px;
  padding: 5px 7px;
}
.collector-auto-dashboard .collector-api-item > small,
.collector-auto-dashboard .collector-source-item > small,
.collector-auto-dashboard .collector-source-item div small {
  display: -webkit-box;
  max-height: 15px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.collector-auto-dashboard .collector-api-title {
  margin-bottom: 5px;
}
.collector-auto-dashboard .collector-api-item strong,
.collector-auto-dashboard .collector-source-item strong {
  font-size: 11px;
}
.collector-auto-dashboard .collector-api-item span,
.collector-auto-dashboard .collector-source-item span {
  font-size: 12px;
}
.collector-auto-dashboard .collector-api-item span {
  font-size: 16px;
}
.collector-api-ready {
  border-color: #b9ddc8;
  background: #f6fff8;
}
.collector-api-budget {
  border-color: #f0c58b;
  background: #fff8ec;
}
.collector-api-soft_budget,
.collector-source-soft_budget {
  border-color: #c9d18f;
  background: #fbfde9;
}
.collector-api-cooldown {
  border-color: #efb6b6;
  background: #fff4f4;
}
.collector-api-missing {
  border-color: #d8e0ea;
  background: #f7f9fc;
}
.collector-source-budget {
  border-color: #f0c58b;
  background: #fff8ec;
}
/* Collector auto monitor v243: operator status strip */
.collector-auto-dashboard {
  padding: 9px 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.collector-auto-head {
  align-items: center;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom-color: #e7edf5;
}
.collector-auto-head strong {
  font-size: 14px;
}
.collector-auto-head small,
.collector-api-title small {
  font-size: 11px;
}
.collector-auto-head > span {
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #d7e6f6;
  background: #f4f9ff;
}
.collector-auto-summary {
  grid-template-columns: minmax(230px, .92fr) minmax(188px, .56fr) minmax(360px, 1.28fr);
  gap: 0;
  margin-bottom: 6px;
  border: 1px solid #e1e9f3;
  border-radius: 8px;
  background: #fcfdff;
}
.collector-auto-summary-block {
  min-height: 0;
  padding: 6px 10px;
  border: 0;
  border-right: 1px solid #e1e9f3;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.collector-auto-summary-block:last-child {
  border-right: 0;
}
.collector-auto-primary {
  background: #f8fbff;
}
.collector-auto-summary-block p {
  max-height: 16px;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
}
.collector-auto-summary-block > small {
  margin-top: 2px;
  max-height: 15px;
  -webkit-line-clamp: 1;
}
.collector-auto-summary-line {
  margin-top: 3px;
}
.collector-auto-signal-grid {
  grid-template-columns: minmax(390px, 1.1fr) minmax(240px, .72fr) minmax(330px, .95fr);
  gap: 0;
  align-items: stretch;
  padding-top: 0;
  border: 1px solid #e2eaf4;
  border-radius: 8px;
  background: #fcfdff;
  overflow: hidden;
}
.collector-api-panel,
.collector-source-panel {
  min-width: 0;
  padding: 7px 9px;
  border: 0;
  border-right: 1px solid #e2eaf4;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.collector-auto-signal-grid > :last-child {
  border-right: 0;
}
.collector-api-title {
  min-height: 18px;
  margin-bottom: 5px;
}
.collector-api-title strong {
  font-size: 12px;
}
.collector-api-grid {
  grid-template-columns: repeat(5, minmax(62px, 1fr));
  gap: 4px;
}
.collector-source-grid,
.collector-source-rotation-panel .collector-source-grid,
.collector-lane-grid {
  grid-template-columns: repeat(auto-fit, minmax(98px, 1fr));
  gap: 4px;
}
.collector-api-item,
.collector-source-item {
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 6px;
  border-color: #dde7f2;
  background: #fbfdff;
}
.collector-api-item {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1px;
}
.collector-api-item > div {
  min-width: 0;
}
.collector-api-item strong,
.collector-source-item strong {
  max-width: 100%;
  font-size: 11px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.collector-api-item span {
  grid-column: 1;
  grid-row: auto;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1;
  text-align: left;
}
.collector-api-item > small,
.collector-source-item > small,
.collector-source-item div small {
  grid-column: 1 / -1;
  max-height: 14px;
  overflow: hidden;
  color: #6a7a90;
  font-size: 10px;
  line-height: 1.25;
  -webkit-line-clamp: 1;
}
.collector-auto-dashboard .collector-api-item > small,
.collector-auto-dashboard .collector-source-item > small {
  display: none;
}
.collector-source-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px 6px;
}
.collector-source-item span {
  font-size: 12px;
  line-height: 1;
}
.collector-lane-grid .collector-source-item {
  min-height: 30px;
}
/* Collector auto monitor v249: single-row status rail */
.collector-auto-statusrail {
  padding: 8px 10px 9px;
  border-color: #dbe5f0;
  background: #fff;
}
.collector-auto-statusrail .collector-auto-head {
  min-height: 24px;
  padding-bottom: 6px;
  margin-bottom: 7px;
}
.collector-auto-statusrail .collector-auto-head strong {
  font-size: 13px;
  line-height: 1.2;
}
.collector-auto-statusrail .collector-auto-head small {
  margin-top: 1px;
  font-size: 11px;
}
.collector-auto-statusrail .collector-auto-head > span {
  min-height: 22px;
  padding: 2px 8px;
  border-color: #d9e7f5;
  background: #f7fbff;
  font-size: 11px;
}
.collector-auto-statusrail .collector-auto-summary {
  grid-template-columns: minmax(250px, 1.1fr) minmax(150px, .48fr) minmax(300px, 1.15fr);
  gap: 0;
  margin-bottom: 6px;
  border: 1px solid #e2eaf4;
  border-radius: 7px;
  background: #fcfdff;
  overflow: hidden;
}
.collector-auto-statusrail .collector-auto-summary-block {
  min-height: 54px;
  padding: 6px 9px;
  border: 0;
  border-right: 1px solid #e2eaf4;
  border-radius: 0;
  background: transparent;
}
.collector-auto-statusrail .collector-auto-summary-block:last-child {
  border-right: 0;
}
.collector-auto-statusrail .collector-auto-primary {
  background: #f8fbff;
}
.collector-auto-statusrail .collector-auto-summary-title strong,
.collector-auto-statusrail .collector-auto-summary-line b {
  font-size: 12px;
  line-height: 1.2;
}
.collector-auto-statusrail .collector-auto-summary-title small,
.collector-auto-statusrail .collector-auto-summary-line span,
.collector-auto-statusrail .collector-auto-summary-block > small {
  font-size: 10.5px;
}
.collector-auto-statusrail .collector-auto-summary-line {
  margin-top: 3px;
}
.collector-auto-statusrail .collector-auto-summary-block p {
  max-height: 15px;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
}
.collector-auto-statusrail .collector-auto-summary-block > small {
  margin-top: 2px;
  max-height: 14px;
  -webkit-line-clamp: 1;
}
.collector-auto-statusrail .collector-auto-stats {
  gap: 4px;
}
.collector-auto-statusrail .collector-auto-stat {
  min-height: 30px;
  padding: 4px 6px;
  border-color: #e0e8f2;
  border-radius: 6px;
  background: #fff;
}
.collector-auto-statusrail .collector-auto-stat span {
  font-size: 10.5px;
  line-height: 1.15;
}
.collector-auto-statusrail .collector-auto-stat strong {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1;
}
.collector-auto-statusrail .collector-auto-details {
  margin-top: 6px;
  border: 1px solid #e2eaf4;
  border-radius: 7px;
  background: #fcfdff;
  overflow: hidden;
}
.collector-auto-statusrail .collector-auto-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 4px 8px;
  color: #26384f;
  cursor: pointer;
  user-select: none;
}
.collector-auto-details summary::-webkit-details-marker {
  display: none;
}
.collector-auto-details summary::before {
  content: "›";
  flex: 0 0 auto;
  color: #6a7a90;
  font-size: 15px;
  line-height: 1;
}
.collector-auto-details[open] summary::before {
  transform: rotate(90deg);
}
.collector-auto-statusrail .collector-auto-details summary strong {
  min-width: 0;
  margin-right: auto;
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.collector-auto-statusrail .collector-auto-details summary span {
  min-width: 0;
  color: #6a7a90;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.collector-auto-statusrail .collector-auto-details .collector-auto-signal-grid {
  border-width: 1px 0 0;
  border-radius: 0;
}
.lead-create,
.lead-jobs {
  max-width: none;
}
.lead-create form {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 16px 20px;
  align-items: start;
}
.lead-create form > input[type="hidden"] {
  display: none;
}
.lead-create form > .field,
.lead-create form > .lead-form-row,
.lead-create form > .lead-submit-row,
.lead-create form > button {
  margin: 0;
}
.lead-create form > .lead-sources,
.lead-create form > .lead-submit-row,
.lead-create form > button {
  grid-column: 1 / -1;
}
.lead-create form > button {
  width: max-content;
  align-self: end;
}
.lead-create .lead-form-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}
.lead-create .lead-sources {
  grid-template-columns: 1fr;
}
.lead-jobs .table-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}
.lead-jobs table {
  min-width: 1490px;
  table-layout: fixed;
}
.lead-jobs th,
.lead-jobs td {
  vertical-align: middle;
  word-break: normal;
  overflow-wrap: anywhere;
}
.lead-jobs th:nth-child(1),
.lead-jobs td:nth-child(1) { width: 48px; }
.lead-jobs th:nth-child(2),
.lead-jobs td:nth-child(2) { width: 170px; }
.lead-jobs th:nth-child(3),
.lead-jobs td:nth-child(3) { width: 72px; }
.lead-jobs th:nth-child(4),
.lead-jobs td:nth-child(4) { width: 112px; }
.lead-jobs th:nth-child(5),
.lead-jobs td:nth-child(5) { width: 118px; }
.lead-jobs th:nth-child(6),
.lead-jobs td:nth-child(6),
.lead-jobs th:nth-child(7),
.lead-jobs td:nth-child(7),
.lead-jobs th:nth-child(8),
.lead-jobs td:nth-child(8),
.lead-jobs th:nth-child(9),
.lead-jobs td:nth-child(9) { width: 112px; }
.lead-jobs th:nth-child(10),
.lead-jobs td:nth-child(10) { width: 78px; }
.lead-jobs th:nth-child(11),
.lead-jobs td:nth-child(11) { width: 360px; }
.lead-jobs th:nth-child(12),
.lead-jobs td:nth-child(12) { width: 84px; }
.lead-col-select { width: 54px; }
.collector-result-title {
  align-items: flex-start;
  gap: 14px;
}
.lead-bulk-form {
  display: contents;
}
.lead-bulk-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lead-bulk-actions select {
  min-width: 118px;
  width: auto;
}
.lead-select-all {
  margin: 0;
  min-height: 36px;
  white-space: nowrap;
}
@media (max-width: 980px) {
  .collector-auto-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .collector-auto-summary .collector-auto-latest-block {
    grid-column: 1 / -1;
  }
  .collector-auto-signal-grid {
    grid-template-columns: 1fr;
  }
  .collector-api-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .collector-source-grid,
  .collector-source-rotation-panel .collector-source-grid,
  .collector-lane-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .collector-head {
    align-items: stretch;
    min-height: auto;
    padding: 20px;
  }
  .collector-stats {
    grid-template-columns: 1fr 1fr;
  }
  .collector-api-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lead-create form,
  .lead-create .lead-form-row,
  .location-select-grid,
  .location-unified-grid,
  .location-region-bar,
  .location-grid {
    grid-template-columns: 1fr;
  }
  .source-checkboxes {
    grid-template-columns: 1fr;
  }
  .source-checkboxes:has(.lead-source-group) {
    grid-template-columns: 1fr;
  }
  .lead-source-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .collector-head h1 {
    font-size: 26px;
  }
  .collector-stats {
    grid-template-columns: 1fr;
  }
  .collector-auto-head,
  .collector-api-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .collector-lane-grid,
  .collector-source-grid,
  .collector-auto-summary,
  .collector-auto-layout,
  .collector-auto-side {
    grid-template-columns: 1fr;
  }
  .collector-auto-signal-grid {
    grid-template-columns: 1fr;
  }
  .collector-auto-summary-block p,
  .collector-auto-summary-block > small {
    max-height: 18px;
    -webkit-line-clamp: 1;
  }
  .collector-api-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .collector-auto-summary-title,
  .collector-auto-summary-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .collector-auto-dashboard .collector-auto-summary-title,
  .collector-auto-dashboard .collector-auto-summary-line {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }
  .collector-auto-dashboard .collector-auto-summary-block {
    padding: 7px 8px;
  }
  .collector-auto-dashboard .collector-api-title {
    min-height: 20px;
    margin-bottom: 3px;
  }
  .collector-auto-dashboard .collector-auto-stat {
    min-height: 30px;
    padding: 4px 6px;
  }
  .collector-auto-dashboard .collector-auto-stat strong {
    font-size: 16px;
  }
  .collector-auto-summary-line span,
  .collector-auto-summary-block > small {
    text-align: left;
    white-space: normal;
  }
  .collector-api-item,
  .collector-source-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .collector-api-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .collector-api-item {
    min-height: 34px;
  }
  .collector-source-item {
    min-height: 34px;
  }
  .collector-api-item span,
  .collector-api-item > small,
  .collector-source-item span {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .collector-auto-statusrail {
    padding: 8px;
  }
  .collector-auto-statusrail .collector-auto-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .collector-auto-statusrail .collector-auto-summary {
    grid-template-columns: 1fr;
  }
  .collector-auto-statusrail .collector-auto-summary-block {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #e2eaf4;
  }
  .collector-auto-statusrail .collector-auto-summary-block:last-child {
    border-bottom: 0;
  }
  .collector-auto-statusrail .collector-auto-summary-title,
  .collector-auto-statusrail .collector-auto-summary-line {
    align-items: center;
    flex-direction: row;
  }
  .collector-auto-statusrail .collector-auto-summary-line span {
    white-space: nowrap;
  }
  .collector-auto-statusrail .collector-auto-details summary {
    align-items: flex-start;
  }
  .collector-auto-statusrail .collector-auto-details summary span {
    max-width: 46%;
  }
}

/* Locked UI v3: 外贸经营 AI 工作台 */
:root {
  --bg-page: #F5F7FB;
  --bg-card: #FFFFFF;
  --nav-bg-1: #071A3D;
  --nav-bg-2: #0B2A63;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-soft: #EFF6FF;
  --text-main: #0F172A;
  --text-secondary: #64748B;
  --border: #E2E8F0;
  --success: #16A34A;
  --success-soft: #DCFCE7;
  --warning: #F59E0B;
  --warning-soft: #FEF3C7;
  --danger: #EF4444;
  --danger-soft: #FEE2E2;
  --purple: #7C3AED;
  --purple-soft: #F3E8FF;
  --radius-card: 16px;
  --shadow-card: 0 8px 24px rgba(15, 23, 42, .06);
}
body.has-sidebar {
  background: var(--bg-page);
  color: var(--text-main);
}
.app-shell {
  grid-template-columns: 244px minmax(0, 1fr);
  background: var(--bg-page);
}
.sidebar {
  padding: 18px 14px;
  background: linear-gradient(180deg, var(--nav-bg-2), var(--nav-bg-1));
  box-shadow: 14px 0 34px rgba(7, 26, 61, .18);
}
.sidebar-brand {
  padding: 4px 4px 22px;
  border-bottom-color: rgba(255,255,255,.14);
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #3B82F6, #1D4ED8);
}
.sidebar-brand strong {
  font-size: 16px;
}
.sidebar-brand small,
.nav-group-label {
  color: rgba(226, 232, 240, .68);
}
.side-nav {
  gap: 10px;
}
.nav-group {
  gap: 4px;
}
.nav-group-collapsible {
  padding: 3px 0;
}
.nav-group-collapsible summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 3px 4px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}
.nav-group-collapsible summary::-webkit-details-marker {
  display: none;
}
.nav-group-collapsible summary::after {
  content: ">";
  color: rgba(226, 232, 240, .56);
  font-size: 12px;
  transform: rotate(0deg);
}
.nav-group-collapsible[open] summary::after {
  transform: rotate(90deg);
}
.nav-group-collapsible summary:hover {
  background: rgba(255, 255, 255, .06);
}
.nav-group-collapsible summary b {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: rgba(241, 245, 249, .78);
  font-size: 11px;
}
.nav-group-collapsible.nav-group-active {
  padding: 6px 7px;
  border: 1px solid rgba(191, 219, 254, .18);
  border-radius: 13px;
  background: rgba(15, 40, 92, .28);
}
.nav-group-links {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}
.nav-group-product-flow {
  padding: 8px 7px;
  border: 1px solid rgba(191, 219, 254, .18);
  border-radius: 13px;
  background: rgba(15, 40, 92, .36);
}
.nav-group-product-flow .nav-group-label {
  padding: 1px 3px 5px;
  color: rgba(219, 234, 254, .82);
}
.side-nav .nav-group-product-flow a {
  min-height: 38px;
  padding: 8px 9px;
}
.side-nav a {
  min-height: 40px;
  border-radius: 9px;
  color: rgba(241, 245, 249, .88);
  font-weight: 700;
}
.side-nav a.active {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .34);
}
.nav-icon {
  background: rgba(255,255,255,.12);
}
.sidebar-account {
  border-radius: 14px;
  background: rgba(2, 6, 23, .25);
}
.container.app-main.locked-app-main {
  width: min(1600px, calc(100% - 44px));
  min-width: 0;
  margin: 24px auto 52px;
}
.locked-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.locked-workspace.locked-no-side {
  grid-template-columns: minmax(0, 1fr);
}
.locked-main {
  min-width: 0;
}
.locked-side {
  min-width: 0;
}
.floating-ai-dock {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: min(360px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  border: 1px solid rgba(148, 163, 184, .36);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .2);
  overflow: hidden;
}
.floating-ai-dock:not([open]) {
  width: auto;
  border-radius: 999px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.floating-ai-dock summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}
.floating-ai-dock summary::-webkit-details-marker {
  display: none;
}
.floating-ai-dock:not([open]) summary {
  min-width: 128px;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .3);
}
.floating-ai-dock summary span {
  white-space: nowrap;
}
.floating-ai-dock summary small {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.floating-ai-dock[open] summary small::before {
  content: "点击收起";
}
.floating-ai-dock[open] summary small {
  font-size: 0;
}
.floating-ai-dock[open] summary small::before {
  font-size: 12px;
}
.finance-locked + .floating-ai-dock,
.logistics-locked + .floating-ai-dock,
.activation-locked + .floating-ai-dock,
.email-locked + .floating-ai-dock {
  position: static;
  width: auto;
  max-height: none;
  margin: 12px 22px 0;
  border-radius: 14px;
}
.finance-locked + .floating-ai-dock:not([open]),
.logistics-locked + .floating-ai-dock:not([open]),
.activation-locked + .floating-ai-dock:not([open]),
.email-locked + .floating-ai-dock:not([open]) {
  width: auto;
  border-color: rgba(148, 163, 184, .36);
  background: #fff;
  box-shadow: var(--shadow-card);
}
.finance-locked + .floating-ai-dock:not([open]) summary,
.logistics-locked + .floating-ai-dock:not([open]) summary,
.activation-locked + .floating-ai-dock:not([open]) summary,
.email-locked + .floating-ai-dock:not([open]) summary {
  width: 100%;
  min-width: 0;
  justify-content: center;
  border-radius: 14px;
}
.locked-side-body {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 110px);
  padding: 14px;
  overflow: auto;
  background: #F8FAFC;
}
.locked-page-head {
  min-height: 58px;
  margin-bottom: 18px;
}
.locked-page-head h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
}
.locked-page-head small {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
}
.eyebrow {
  color: var(--primary);
  letter-spacing: 0;
  text-transform: none;
}
.button {
  min-height: 38px;
  height: 38px;
  border-radius: 10px;
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: none;
}
.button.secondary {
  border-color: var(--border);
  background: #fff;
  color: #1D4ED8;
}
.card {
  border-color: var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.locked-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.dashboard-locked .locked-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kpi-card {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.kpi-card span:not(.kpi-icon) {
  display: block;
  color: var(--text-secondary);
  font-weight: 700;
}
.kpi-card strong {
  display: block;
  margin-top: 3px;
  font-size: 29px;
  line-height: 1.1;
  color: #0B1736;
}
.kpi-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 999px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
}
.kpi-green .kpi-icon { color: var(--success); background: var(--success-soft); }
.kpi-red .kpi-icon { color: var(--danger); background: var(--danger-soft); }
.kpi-amber .kpi-icon { color: var(--warning); background: var(--warning-soft); }
.kpi-purple .kpi-icon { color: var(--purple); background: var(--purple-soft); }
.kpi-change {
  margin-top: 6px;
  font-size: 12px;
}
.kpi-change.up { color: var(--success); }
.kpi-change.down { color: var(--danger); }
.kpi-change.warn { color: var(--warning); }
.workflow-panel.locked-flow {
  margin-bottom: 16px;
}
.dashboard-locked .workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}
.workflow-step {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 14px 18px;
}
.workflow-step::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 0;
  bottom: 0;
  height: 5px;
  background: #DBEAFE;
}
.workflow-step:first-child::after {
  background: linear-gradient(90deg, var(--primary), #60A5FA);
}
.workflow-step strong {
  font-size: 24px;
}
.agent-flow-panel .card-title {
  align-items: flex-start;
  gap: 12px;
}
.dashboard-locked .agent-flow-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.agent-flow-step {
  display: grid;
  align-content: start;
  min-height: 116px;
  padding: 13px 14px 18px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #fff;
}
.agent-flow-step:hover {
  border-color: #9fc0ee;
  background: #f8fbff;
}
.agent-flow-step::after {
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 3px;
  border-radius: 999px;
  background: #dbeafe;
}
.agent-flow-step:first-child::after {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}
.agent-flow-collect::after { background: #c7d2fe; }
.agent-flow-review::after { background: #fde68a; }
.agent-flow-library::after { background: #bbf7d0; }
.agent-flow-order::after { background: #fecdd3; }
.agent-flow-step span,
.agent-flow-step strong,
.agent-flow-step small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-flow-step span,
.agent-flow-step strong {
  white-space: nowrap;
}
.agent-flow-step strong {
  font-size: 20px;
}
.agent-flow-step small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}
.locked-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.todo-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  color: var(--text-main);
  border-top: 1px solid var(--border);
}
.todo-row span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
}
.todo-row small,
.follow-row small {
  display: block;
  color: var(--text-secondary);
}
.todo-row b {
  min-width: 42px;
  text-align: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 4px 9px;
}
.locked-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(5, minmax(120px, 1fr)) auto auto;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.email-locked .locked-filter {
  grid-template-columns: minmax(180px, 1.5fr) repeat(5, minmax(104px, 1fr));
}
.locked-filter input,
.locked-filter select,
.filters input,
.filters select,
.field input,
.field select,
.field textarea {
  border-radius: 9px;
  border-color: var(--border);
  min-width: 0;
}
.locked-filter .button,
.locked-filter button {
  justify-self: start;
}
.locked-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  min-height: 48px;
  padding: 0 10px;
  margin-bottom: -1px;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}
.locked-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  color: #334155;
  font-weight: 700;
}
.locked-tabs a.active {
  color: var(--primary);
  background: var(--primary-soft);
}
.table-card {
  padding: 0;
  overflow: hidden;
}
.table-card .card-title {
  padding: 18px 20px 12px;
  margin: 0;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  height: 44px;
  color: #64748B;
  background: #F8FAFC;
  font-size: 12px;
}
td {
  height: 58px;
  border-top: 1px solid var(--border);
  color: #172554;
}
tbody tr:nth-child(2) {
  background: #EFF6FF;
}
.badge,
.level-badge,
.email-check,
.lead-score {
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 800;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}
.pagination-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.mini-button.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.ai-card,
.locked-side > .side-panel-title,
.locked-side > .detail-profile,
.locked-side > .side-dl,
.locked-side > .side-note,
.locked-side > .locked-empty {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.side-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}
.detail-profile {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 16px;
}
.avatar-ring {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--primary);
  border: 3px solid #C7D2FE;
  font-weight: 900;
}
.side-dl {
  display: grid;
  gap: 12px;
  padding: 16px;
  margin: 0;
}
.side-dl div {
  display: grid;
  gap: 4px;
}
.side-dl dt {
  color: var(--text-secondary);
  font-size: 12px;
}
.side-dl dd {
  margin: 0;
  font-weight: 700;
}
.side-note {
  padding: 16px;
}
.side-note p {
  margin-top: 8px;
  color: var(--text-secondary);
}
.ai-card {
  padding: 16px;
  background: linear-gradient(180deg, #F3F7FF, #FFFFFF 38%);
}
.ai-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.ai-card-head span {
  padding: 3px 7px;
  border-radius: 7px;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.ai-list {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.ai-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.78);
}
.ai-list li span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.ai-list li small {
  color: var(--text-secondary);
}
.side-actions {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.side-action {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 12px;
  color: #1D4ED8;
  background: var(--primary-soft);
  font-weight: 800;
}
.side-action span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #fff;
  background: var(--primary);
}
.trend-card {
  margin-top: 16px;
}
.trend-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  align-items: end;
  height: 150px;
  padding: 18px 20px 22px;
}
.trend-bars span {
  display: block;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #60A5FA, #2563EB);
}
.collector-locked .collector-head {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.collector-locked .collector-head h1,
.collector-locked .collector-head .eyebrow {
  color: var(--text-main);
}
.collector-locked .collector-head .eyebrow {
  color: var(--primary);
}
.collector-locked .collector-head .button.secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--border);
}
.collector-locked .lead-grid {
  grid-template-columns: minmax(420px, .95fr) minmax(0, 1.25fr);
}
.collector-locked .lead-create form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.collector-locked .lead-create .field:first-of-type,
.collector-locked .lead-create .lead-sources,
.collector-locked .lead-create form > button,
.collector-locked .lead-note {
  grid-column: 1 / -1;
}
.collector-locked .stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 14px;
}
.collector-locked .stat {
  min-height: 98px;
  border-radius: 16px;
}
.locked-empty {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.activation-head-actions,
.activation-command-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.activation-head-actions form,
.activation-command-actions form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.activation-command-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}
.activation-command-card strong,
.activation-command-card small {
  display: block;
}
.activation-command-card strong {
  font-size: 16px;
  color: #0B1736;
}
.activation-command-card input[type="number"] {
  width: 116px;
}
.activation-filter {
  grid-template-columns: minmax(260px, 1fr) auto auto;
}
.activation-table table {
  min-width: 1240px;
  table-layout: fixed;
}
.activation-table td {
  vertical-align: middle;
  padding-top: 12px;
  padding-bottom: 12px;
}
.activation-task-table th,
.activation-task-table td {
  overflow: hidden;
}
.activation-col-customer { width: 300px; }
.activation-col-email { width: 240px; }
.activation-col-status { width: 118px; }
.activation-col-score { width: 76px; }
.activation-col-check { width: 250px; }
.activation-col-tags { width: 220px; }
.activation-col-batch { width: 120px; }
.activation-col-action { width: 218px; }
.activation-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 198px;
}
.activation-row-actions .mini-button {
  min-width: 40px;
  padding: 6px 8px;
}
.activation-table .customer-name,
.activation-table .customer-name + small,
.activation-table .lead-location {
  max-width: 100%;
}
.activation-table .customer-name,
.activation-table .lead-location,
.activation-email-check .lead-location {
  overflow: hidden;
  text-overflow: ellipsis;
}
.activation-table .customer-name,
.activation-email-check .lead-location {
  white-space: nowrap;
}
.activation-email-check {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.activation-email-check .lead-location {
  display: block;
  color: #61718a;
}
.activation-source-cell {
  max-width: 220px;
}
.activation-source-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  align-items: flex-start;
}
.activation-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.activation-tag-chip,
.activation-tag-more {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 92px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1e5bb8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activation-tag-more {
  flex: 0 0 auto;
  max-width: none;
  background: #f3f6fb;
  color: #5f6e86;
}
.activation-side-card .ai-list li {
  grid-template-columns: minmax(0, 1fr) auto 40px;
}
@media (max-width: 1320px) {
  .locked-kpis,
  .collector-locked .stats {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
  .collector-locked .source-checkboxes:has(.lead-source-group) {
    grid-template-columns: 1fr;
  }
  .collector-locked .lead-source-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: static;
    height: auto;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .side-nav {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }
  .nav-group-collapsible {
    flex: 0 0 auto;
    padding: 0;
  }
  .nav-group-collapsible summary {
    min-height: 38px;
    padding: 7px 9px;
    background: rgba(255, 255, 255, .06);
  }
  .nav-group-collapsible summary .nav-group-label {
    display: inline;
    color: rgba(241, 245, 249, .88);
    white-space: nowrap;
  }
  .nav-group-collapsible.nav-group-active {
    padding: 0;
    border: 0;
    background: transparent;
  }
  .nav-group-collapsible[open] .nav-group-links {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin: 0 0 0 5px;
  }
  .locked-filter,
  .email-locked .locked-filter,
  .locked-two,
  .activation-filter,
  .activation-command-card,
  .collector-locked .lead-grid {
    grid-template-columns: 1fr;
  }
  .locked-tabs {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .locked-tabs a {
    flex: 0 0 auto;
  }
  .email-locked .table-scroll {
    max-width: 100%;
    overflow-x: auto;
  }
  .email-locked .table-card table {
    min-width: 720px;
  }
  .activation-command-card {
    align-items: stretch;
  }
  .activation-command-actions,
  .activation-command-actions form {
    justify-content: flex-start;
  }
  .collector-locked .lead-source-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .floating-ai-dock {
    right: 16px;
    bottom: 16px;
    width: min(340px, calc(100vw - 32px));
  }
  .locked-kpis,
  .collector-locked .stats {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-locked .locked-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-locked .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-locked .agent-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .locked-kpis,
  .collector-locked .stats {
    grid-template-columns: 1fr;
  }
  .dashboard-locked .locked-kpis {
    grid-template-columns: 1fr;
  }
  .collector-locked .lead-source-group-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-locked .workflow-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-locked .agent-flow-grid {
    grid-template-columns: 1fr;
  }
  .floating-ai-dock:not([open]) {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
  }
  .floating-ai-dock:not([open]) summary {
    min-width: 56px;
    min-height: 46px;
    padding: 0 14px;
  }
  .floating-ai-dock:not([open]) summary span {
    font-size: 0;
  }
  .floating-ai-dock:not([open]) summary span::before {
    content: "AI";
    font-size: 14px;
  }
  .activation-head-actions,
  .activation-command-actions,
  .activation-head-actions form,
  .activation-command-actions form {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .activation-command-card input[type="number"] {
    width: 100%;
  }
  .floating-ai-dock:not([open]) summary small {
    display: none;
  }
  .customers-locked + .floating-ai-dock,
  .product-match-plugin-locked + .floating-ai-dock,
  .activation-locked + .floating-ai-dock,
  .email-locked + .floating-ai-dock {
    position: static;
    width: auto;
    max-height: none;
    margin: 12px 22px 0;
    border-radius: 14px;
  }
  .customers-locked + .floating-ai-dock:not([open]),
  .product-match-plugin-locked + .floating-ai-dock:not([open]),
  .activation-locked + .floating-ai-dock:not([open]),
  .email-locked + .floating-ai-dock:not([open]) {
    width: auto;
    border-color: rgba(148, 163, 184, .36);
    background: #fff;
    box-shadow: var(--shadow-card);
  }
  .customers-locked + .floating-ai-dock:not([open]) summary,
  .product-match-plugin-locked + .floating-ai-dock:not([open]) summary,
  .activation-locked + .floating-ai-dock:not([open]) summary,
  .email-locked + .floating-ai-dock:not([open]) summary {
    width: 100%;
    min-width: 0;
    justify-content: center;
    border-radius: 14px;
  }
}
.location-country-custom-inline {
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid #edf2f8;
}
.location-country-custom-inline strong {
  display: block;
  margin-bottom: 6px;
  color: #355170;
  font-size: 12px;
}
.location-country-custom-inline input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #d5dfed;
  border-radius: 8px;
  font-size: 13px;
}

/* Collector layout v10: give the task builder full width, then split inputs inside it. */
.collector-locked .lead-grid {
  grid-template-columns: 1fr;
}
.collector-locked .lead-create form {
  grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr);
  gap: 18px 22px;
}
.collector-locked .lead-create .field:first-of-type {
  grid-column: auto;
}
.collector-locked .lead-create form > label.field:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1 / span 3;
}
.collector-locked .lead-create .lead-form-row {
  grid-template-columns: minmax(0, 1fr) minmax(190px, .78fr);
}
.collector-locked .lead-create .lead-sources,
.collector-locked .lead-create form > button,
.collector-locked .lead-note {
  grid-column: 1 / -1;
}
.collector-locked .source-checkboxes:has(.lead-source-group) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.collector-locked .lead-source-group-grid {
  grid-template-columns: 1fr;
}
.collector-locked .lead-source-group-head {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}
.collector-locked .lead-source-group-head small {
  white-space: normal;
}
.collector-locked .lead-jobs table {
  min-width: 1320px;
}
@media (max-width: 1320px) {
  .collector-locked .source-checkboxes:has(.lead-source-group) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .collector-locked .lead-create form {
    grid-template-columns: 1fr;
  }
  .collector-locked .lead-create form > label.field:nth-of-type(2) {
    grid-column: auto;
    grid-row: auto;
  }
  .collector-locked .lead-create .lead-form-row,
  .collector-locked .source-checkboxes:has(.lead-source-group) {
    grid-template-columns: 1fr;
  }
}


/* Collector intensity presets v11: presets write into existing max_results/deep_scan fields. */
.lead-intensity-row {
  align-items: stretch;
}
.lead-intensity-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.lead-intensity-presets button {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #d6e2f0;
  border-radius: 10px;
  background: #f8fbff;
  color: #17314f;
  text-align: left;
  cursor: pointer;
}
.lead-intensity-presets button strong,
.lead-intensity-presets button small {
  display: block;
}
.lead-intensity-presets button strong {
  font-size: 13px;
}
.lead-intensity-presets button small {
  margin-top: 4px;
  color: #65758c;
  font-size: 12px;
}
.lead-intensity-presets button.is-active {
  border-color: #2d75d9;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .18);
}
.lead-run-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}
.lead-run-options .field {
  margin-bottom: 0;
}
@media (max-width: 620px) {
  .lead-intensity-presets {
    grid-template-columns: 1fr;
  }
}

/* Collector intensity layout v26: keep advanced controls under intensity presets, not in a floating right column. */
.collector-locked .lead-create .lead-intensity-row {
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}
.collector-locked .lead-create .lead-intensity-row > .field,
.collector-locked .lead-create .lead-intensity-row > .lead-run-advanced {
  min-width: 0;
  width: 100%;
}
.collector-locked .lead-create .lead-intensity-row .lead-run-advanced {
  margin-top: 0;
}


/* Collector source presets v12: presets write into existing source checkboxes. */
/* Collector source presets v29: compact selector bar, not explainer cards. */
.lead-source-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 7px 0 8px;
}
.lead-source-presets button {
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid #d6e2f0;
  border-radius: 9px;
  background: #f8fbff;
  color: #17314f;
  text-align: left;
  cursor: pointer;
}
.lead-source-presets button strong,
.lead-source-presets button small {
  display: block;
}
.lead-source-presets button strong {
  font-size: 13px;
}
.lead-source-presets button small {
  margin-top: 2px;
  color: #65758c;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-source-presets button.is-active {
  border-color: #2d75d9;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .18);
}

/* Collector safe sample v280: guided low-cost validation presets. */
.lead-safe-sample-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  background: #f8fbff;
}
.lead-safe-sample-panel strong,
.lead-safe-sample-panel small {
  display: block;
}
.lead-safe-sample-panel > div:first-child strong {
  color: #17314f;
  font-size: 14px;
}
.lead-safe-sample-panel > div:first-child small,
.lead-safe-sample-panel p {
  margin: 4px 0 0;
  color: #60738e;
  font-size: 12px;
  line-height: 1.45;
}
.lead-safe-sample-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.lead-safe-sample-actions button {
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid #d6e2f0;
  border-radius: 10px;
  background: #fff;
  color: #17314f;
  text-align: left;
  cursor: pointer;
}
.lead-safe-sample-actions button strong,
.lead-safe-sample-actions button small {
  display: block;
}
.lead-safe-sample-actions button strong {
  font-size: 13px;
}
.lead-safe-sample-actions button small {
  margin-top: 3px;
  color: #65758c;
  font-size: 11px;
  line-height: 1.25;
}
.lead-safe-sample-actions button.is-active {
  border-color: #2d75d9;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .18);
}
.lead-sample-review-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d6e2f0;
  border-radius: 12px;
  background: #fff;
}
.lead-sample-review-panel.is-empty {
  background: #f8fbff;
}
.lead-sample-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.lead-sample-review-head strong,
.lead-sample-review-head small {
  display: block;
}
.lead-sample-review-head strong {
  color: #17314f;
  font-size: 14px;
}
.lead-sample-review-head small,
.lead-sample-review-panel p,
.lead-sample-review-next {
  margin: 4px 0 0;
  color: #60738e;
  font-size: 12px;
  line-height: 1.45;
}
.lead-sample-review-head span {
  flex: 0 0 auto;
  max-width: 180px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d5fa8;
  font-size: 11px;
  line-height: 1.3;
  text-align: right;
}
.lead-sample-review-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.lead-sample-review-metrics div,
.lead-sample-review-best {
  padding: 9px 10px;
  border: 1px solid #e0e8f2;
  border-radius: 10px;
  background: #f9fbfe;
}
.lead-sample-review-metrics small,
.lead-sample-review-best small,
.lead-sample-review-best span {
  display: block;
  color: #60738e;
  font-size: 11px;
  line-height: 1.3;
}
.lead-sample-review-metrics strong,
.lead-sample-review-best strong {
  display: block;
  margin-top: 3px;
  color: #17314f;
  font-size: 16px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.lead-sample-review-best strong {
  font-size: 13px;
}
.lead-sample-review-best span {
  margin-top: 3px;
}
.lead-sample-review-panel.is-good {
  border-color: #b8e6c8;
}
.lead-sample-review-panel.is-good p {
  color: #0b6b3a;
}
.lead-sample-review-panel.is-warn {
  border-color: #f2d58d;
}
.lead-sample-review-panel.is-warn p {
  color: #8a5a00;
}
.lead-source-safety-summary {
  display: grid;
  gap: 4px;
  margin-top: -4px;
  padding: 11px 13px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  background: #f8fbff;
}
.lead-source-safety-summary strong {
  color: #17314f;
  font-size: 13px;
}
.lead-source-safety-summary span {
  color: #60738e;
  font-size: 12px;
  line-height: 1.45;
}
.lead-source-safety-summary.is-safe {
  border-color: #b8e6c8;
  background: #f4fbf6;
}
.lead-source-safety-summary.is-safe strong,
.lead-source-safety-summary.is-safe span {
  color: #0b6b3a;
}
.lead-source-safety-summary.is-warn {
  border-color: #f2d58d;
  background: #fffaf0;
}
.lead-source-safety-summary.is-warn strong,
.lead-source-safety-summary.is-warn span {
  color: #8a5a00;
}
.lead-source-safety-summary.is-danger {
  border-color: #f0b8b8;
  background: #fff5f5;
}
.lead-source-safety-summary.is-danger strong,
.lead-source-safety-summary.is-danger span {
  color: #b42318;
}
@media (max-width: 900px) {
  .lead-source-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lead-safe-sample-actions {
    grid-template-columns: 1fr;
  }
  .lead-sample-review-head {
    display: grid;
  }
  .lead-sample-review-head span {
    max-width: none;
    text-align: left;
  }
  .lead-sample-review-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .lead-source-presets {
    grid-template-columns: 1fr;
  }
  .lead-sample-review-metrics {
    grid-template-columns: 1fr;
  }
}


/* Collector source manual tuning v13: keep real checkboxes, hide visual bulk by default. */
.lead-source-manual {
  margin: 8px 0 0;
  border: 1px solid #d8e3f0;
  border-radius: 12px;
  background: #f8fbff;
}
.lead-source-manual summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 12px;
  color: #17314f;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.lead-source-manual summary::-webkit-details-marker {
  display: none;
}
.lead-source-manual summary::after {
  content: "展开";
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  color: #48617d;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.lead-source-manual[open] summary::after {
  content: "收起";
}
.lead-source-manual summary small {
  margin-left: auto;
  color: #65758c;
  font-size: 12px;
  font-weight: 700;
}
.lead-source-manual .source-checkboxes {
  margin: 0;
  padding: 0 10px 10px;
}

/* Collector source manual compact v28: expanded state is a compact checklist, not explainer cards. */
.lead-source-manual .source-checkboxes:has(.lead-source-group) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.lead-source-manual .lead-source-group {
  padding: 9px;
  border-radius: 10px;
  background: #fbfdff;
}
.lead-source-manual .lead-source-group-head {
  margin-bottom: 7px;
  padding-bottom: 6px;
}
.lead-source-manual .lead-source-group-head strong {
  font-size: 13px;
}
.lead-source-manual .lead-source-group-head small,
.lead-source-manual .source-icon,
.lead-source-manual .source-body small,
.lead-source-manual .source-body em {
  display: none;
}
.lead-source-manual .lead-source-group-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}
.lead-source-manual .source-card {
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 7px;
  min-height: 38px;
  padding: 7px 8px;
  border-radius: 8px;
  overflow: hidden;
}
.lead-source-manual .source-card input,
.lead-source-manual .source-check-placeholder {
  width: 14px;
  height: 14px;
}
.lead-source-manual .source-body strong {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.lead-source-manual .mini-button {
  min-width: 0;
  max-width: 64px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-source-manual .source-status-pill {
  min-width: 0;
  max-width: 56px;
  padding: 3px 6px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1320px) {
  .lead-source-manual .source-checkboxes:has(.lead-source-group) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .lead-source-manual .source-checkboxes:has(.lead-source-group) {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .lead-source-manual summary {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 12px;
  }
  .lead-source-manual summary small {
    margin-left: 0;
  }
  .lead-source-manual summary::after {
    position: absolute;
    right: 12px;
  }
}


/* Collector keyword tools v15: product terms can generate selectable search keywords. */
.lead-keyword-field textarea {
  margin-bottom: 8px;
}
.lead-keyword-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lead-keyword-tool-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.lead-keyword-tools .mini-button {
  min-width: auto;
  padding: 6px 9px;
  border-color: #cbd9ea;
  color: #27415f;
  font-size: 12px;
}
.lead-keyword-tools small.is-warning {
  color: #b45309;
  font-weight: 800;
}
.lead-keyword-ai-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #d9e6f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.lead-keyword-ai-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.lead-keyword-ai-head strong {
  display: block;
  color: #123154;
  font-size: 13px;
}
.lead-keyword-ai-head small {
  display: block;
  margin-top: 3px;
  color: #6b7f99;
  font-size: 12px;
  line-height: 1.45;
}
.lead-keyword-ai-head span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #1d5fb8;
  font-size: 12px;
  font-weight: 800;
}
.lead-keyword-ai-result {
  display: grid;
  gap: 10px;
}
.lead-keyword-ai-result.is-empty {
  color: #718198;
  font-size: 12px;
}
.lead-keyword-ai-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  background: #f1f7ff;
  color: #17314f;
}
.lead-keyword-ai-category strong {
  font-size: 13px;
}
.lead-keyword-ai-category small {
  color: #517096;
  font-size: 12px;
}
.lead-keyword-ai-seeds,
.lead-keyword-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lead-keyword-ai-seeds span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef4fb;
  color: #405b7c;
  font-size: 12px;
  font-weight: 700;
}
.lead-keyword-ai-chip {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #d4e2f2;
  border-radius: 12px;
  background: #ffffff;
  color: #17253d;
  cursor: pointer;
}
.lead-keyword-ai-chip:hover {
  border-color: #8bbcff;
  background: #f6fbff;
}
.lead-keyword-ai-chip input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  accent-color: #1167d8;
}
.lead-keyword-ai-chip span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.lead-keyword-ai-chip strong {
  overflow-wrap: anywhere;
  color: #10294a;
  font-size: 12px;
  line-height: 1.35;
}
.lead-keyword-ai-chip small {
  color: #6a7e96;
  font-size: 11px;
  line-height: 1.35;
}
.lead-keyword-ai-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}
.lead-keyword-ai-actions small {
  color: #6b7f99;
  font-size: 12px;
}
.lead-keyword-ai-actions .mini-button {
  min-width: auto;
  padding: 7px 10px;
}
.lead-keyword-ai-actions .mini-button.primary-mini {
  border-color: #1167d8;
  background: #1167d8;
  color: #ffffff;
}


/* Collector run summary v15: pre-submit summary from real form inputs. */
.lead-run-summary {
  padding: 11px 13px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  background: #eef6ff;
  color: #17314f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}
.lead-run-summary.is-empty {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

/* Collector submit row v27: make task summary and start action one clear bottom bar. */
.lead-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-top: 2px;
}
.lead-submit-row .button[type="submit"] {
  min-width: 132px;
}
@media (max-width: 720px) {
  .lead-submit-row {
    grid-template-columns: 1fr;
  }
  .lead-submit-row .button[type="submit"] {
    width: 100%;
  }
}


/* Collector submit guard v16: disable start when required inputs are missing. */
.collector-command-card .button[type="submit"].is-disabled,
.collector-command-card .button[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
}


/* Collector advanced run options v17: keep real max/deep fields, collapse manual tuning. */
.lead-run-advanced {
  margin: 0;
  border: 1px solid #d8e3f0;
  border-radius: 12px;
  background: #f8fbff;
}
.lead-run-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  color: #17314f;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.lead-run-advanced summary::-webkit-details-marker {
  display: none;
}
.lead-run-advanced summary::after {
  content: "展开";
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  color: #48617d;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.lead-run-advanced[open] summary::after {
  content: "收起";
}
.lead-run-advanced summary small {
  margin-left: auto;
  color: #65758c;
  font-size: 12px;
  font-weight: 700;
}
.lead-run-advanced .field,
.lead-run-advanced .lead-checkbox {
  margin: 0 12px 10px;
}
.lead-run-advanced .field {
  padding-top: 4px;
}
@media (max-width: 620px) {
  .lead-run-advanced summary {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 12px;
  }
  .lead-run-advanced summary small {
    margin-left: 0;
  }
}


/* Collector customer intent presets v20: mixed is the default direction, other cards are bias presets. */
.sr-only {
  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;
}

.lead-intent-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.lead-intent-presets button {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #d6e2f0;
  border-radius: 10px;
  background: #f8fbff;
  color: #17314f;
  text-align: left;
  cursor: pointer;
}
.lead-intent-presets button:first-child {
  grid-column: 1 / -1;
}
.lead-intent-presets button strong,
.lead-intent-presets button small {
  display: block;
}
.lead-intent-presets button strong {
  font-size: 13px;
}
.lead-intent-presets button small {
  margin-top: 4px;
  color: #65758c;
  font-size: 12px;
  line-height: 1.25;
}
.lead-intent-presets button.is-active {
  border-color: #2d75d9;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .18);
}
.lead-query-preview {
  padding: 10px 12px;
  border: 1px solid #d6e2f0;
  border-radius: 10px;
  background: #f8fbff;
  color: #17314f;
  font-size: 12px;
}
.lead-query-preview.is-empty {
  color: #65758c;
}
.lead-query-preview.is-loading {
  opacity: .72;
}
.lead-query-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.lead-query-preview-head strong {
  font-size: 13px;
}
.lead-query-preview-head small {
  color: #65758c;
}
.lead-query-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.lead-query-sample-plan {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid #c8dcf4;
  border-radius: 8px;
  background: #fff;
}
.lead-query-sample-plan strong,
.lead-query-sample-plan span,
.lead-query-sample-plan small {
  display: block;
  line-height: 1.35;
}
.lead-query-sample-plan strong {
  color: #17314f;
}
.lead-query-sample-plan span,
.lead-query-sample-plan small {
  color: #65758c;
}
.lead-query-sample-plan.is-ok {
  border-color: #b9e4c8;
  background: #f2fbf5;
}
.lead-query-sample-plan.is-warn {
  border-color: #f1d59a;
  background: #fff9e8;
}
.lead-query-sample-plan.is-risk {
  border-color: #f0b8b8;
  background: #fff2f2;
}
.lead-query-expansion-plan {
  display: grid;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #ffffff;
}
.lead-query-expansion-plan strong,
.lead-query-expansion-plan span {
  display: block;
  line-height: 1.35;
}
.lead-query-expansion-plan > div > strong {
  color: #17314f;
}
.lead-query-expansion-plan > div > span {
  color: #65758c;
}
.lead-query-expansion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lead-query-expansion-chips button {
  min-width: 0;
  max-width: 260px;
  padding: 7px 8px;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #f8fbff;
  color: #17314f;
  text-align: left;
  cursor: pointer;
}
.lead-query-expansion-chips button:hover {
  border-color: #8bbcff;
  background: #eef6ff;
}
.lead-query-expansion-chips strong,
.lead-query-expansion-chips small {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.lead-query-expansion-chips strong {
  font-size: 12px;
}
.lead-query-expansion-chips small {
  margin-top: 2px;
  color: #65758c;
  font-size: 11px;
}
.lead-query-preview-diagnostics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
.lead-query-preview-diagnostic {
  padding: 7px 8px;
  border: 1px solid #d7e6f7;
  border-radius: 8px;
  background: #fff;
}
.lead-query-preview-diagnostic strong,
.lead-query-preview-diagnostic span {
  display: block;
  line-height: 1.35;
}
.lead-query-preview-diagnostic strong {
  color: #17314f;
}
.lead-query-preview-diagnostic span {
  margin-top: 2px;
  color: #65758c;
}
.lead-query-preview-diagnostic.is-ok {
  border-color: #b9e4c8;
  background: #f2fbf5;
}
.lead-query-preview-diagnostic.is-warn {
  border-color: #f1d59a;
  background: #fff9e8;
}
.lead-query-preview-diagnostic.is-risk {
  border-color: #f0b8b8;
  background: #fff2f2;
}
.lead-query-preview section {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e3ebf5;
  border-radius: 8px;
  background: #fff;
}
.lead-query-preview section strong,
.lead-query-preview section span {
  display: block;
}
.lead-query-preview section span,
.lead-query-preview section small {
  color: #65758c;
  line-height: 1.35;
}
.lead-query-preview ol {
  margin: 6px 0 0;
  padding-left: 18px;
  max-height: 86px;
  overflow: auto;
}
.lead-query-preview li {
  margin: 3px 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.lead-query-preview-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.lead-query-preview-notes small {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eaf4ff;
  color: #24588f;
}
.crawl-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.crawl-mode-card {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  min-height: 58px;
  padding: 10px;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #f8fbff;
  color: #17314f;
  cursor: pointer;
}
.crawl-mode-card:has(input:checked) {
  border-color: #2d75d9;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(17, 103, 216, .18);
}
.crawl-mode-card input {
  margin-top: 2px;
}
.crawl-mode-card strong,
.crawl-mode-card small {
  display: block;
}
.crawl-mode-card strong {
  font-size: 13px;
}
.crawl-mode-card small {
  margin-top: 4px;
  color: #65758c;
  font-size: 12px;
  line-height: 1.3;
}
.lead-intent-manual {
  margin-top: 8px;
  border: 1px solid #d8e3f0;
  border-radius: 10px;
  background: #f8fbff;
}
.lead-intent-manual summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  color: #17314f;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.lead-intent-manual summary::-webkit-details-marker {
  display: none;
}
.lead-intent-manual summary::after {
  content: "展开";
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  color: #48617d;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.lead-intent-manual[open] summary::after {
  content: "收起";
}
.lead-intent-manual summary small {
  margin-left: auto;
  color: #65758c;
  font-size: 12px;
  font-weight: 700;
}
.lead-intent-manual select {
  margin: 0 10px 10px;
  width: calc(100% - 20px);
}

/* Collector location picker v22: keep multi-country selection compact and non-overflowing. */
.location-country-toggle {
  justify-content: flex-start;
  min-width: 0;
  overflow: hidden;
  padding-right: 34px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-country-status {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  background: #f5f9ff;
  color: #44607f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

/* Collector location input v30: country lives inside the selector; city selection is removed from the form. */
.location-picker-compact .location-grid,
.collector-locked .location-picker-compact .location-grid {
  grid-template-columns: minmax(120px, .42fr) minmax(240px, 1fr);
  gap: 9px;
  align-items: end;
}
.location-picker-compact .location-region-field select,
.location-picker-compact .location-country-toggle {
  min-height: 38px;
}
.location-picker-compact .location-country-menu {
  max-height: 310px;
}
.location-picker-compact .location-country-status {
  margin-bottom: 6px;
  padding: 6px 8px;
}
.location-picker-compact .location-city-panel,
.location-picker-compact .location-selected,
.location-picker-compact .location-helper {
  display: none;
}
@media (max-width: 720px) {
  .location-scope-tabs {
    grid-template-columns: 1fr;
  }
  .location-picker-compact .location-grid,
  .collector-locked .location-picker-compact .location-grid {
    grid-template-columns: 1fr;
  }
}
.collector-locked .location-picker .location-grid {
  grid-template-columns: minmax(150px, .42fr) minmax(260px, 1fr);
}
.collector-locked .location-picker-compact .location-grid {
  grid-template-columns: minmax(120px, .42fr) minmax(240px, 1fr);
}
@media (max-width: 620px) {
  .lead-intent-presets {
    grid-template-columns: 1fr;
  }
  .lead-query-preview-grid {
    grid-template-columns: 1fr;
  }
  .lead-query-preview-diagnostics {
    grid-template-columns: 1fr;
  }
  .collector-locked .location-picker .location-grid {
    grid-template-columns: 1fr;
  }
  .collector-locked .location-picker-compact .location-grid {
    grid-template-columns: 1fr;
  }
}

/* Collector input compact v31: fewer decisions, denser controls, explicit source checklist. */
.collector-command-card .lead-note {
  display: none;
}
.collector-command-card .card-title {
  margin-bottom: 10px;
  padding-bottom: 10px;
}
.collector-locked .lead-create form {
  gap: 12px 16px;
}
.lead-count-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}
.lead-count-row .field {
  margin-bottom: 0;
}
.lead-count-inline {
  display: grid;
  grid-template-columns: minmax(180px, 380px) minmax(220px, 1fr);
  gap: 12px;
  align-items: stretch;
  max-width: 690px;
}
.lead-count-inline input[type="number"] {
  width: 100%;
  min-height: 43px;
}
.lead-deep-scan {
  align-self: stretch;
  min-height: 43px;
  margin-bottom: 0;
  margin-top: 0;
  padding: 0 10px;
  border: 1px solid #d6e2f0;
  border-radius: 10px;
  background: #f8fbff;
}
@media (max-width: 720px) {
  .crawl-mode-options {
    grid-template-columns: 1fr;
  }
  .lead-count-inline {
    grid-template-columns: 1fr;
  }
}
.lead-source-list.source-checkboxes:has(.lead-source-group) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 7px;
}
.lead-source-list .lead-source-group {
  padding: 9px;
  border-radius: 10px;
  background: #fbfdff;
}
.lead-source-list .lead-source-group-head {
  margin-bottom: 7px;
  padding-bottom: 6px;
}
.lead-source-list .lead-source-group-head strong {
  font-size: 13px;
}
.lead-source-list .lead-source-group-head small,
.lead-source-list .source-icon,
.lead-source-list .source-body small,
.lead-source-list .source-body em {
  display: none;
}
.lead-source-list .lead-source-group-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}
.lead-source-list .source-card {
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 7px;
  min-height: 38px;
  padding: 7px 8px;
  border-radius: 8px;
  overflow: hidden;
}
.lead-source-list .source-card input,
.lead-source-list .source-check-placeholder {
  width: 14px;
  height: 14px;
}
.lead-source-list .source-body strong {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.lead-source-list .mini-button {
  min-width: 0;
  max-width: 64px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-source-list .source-status-pill {
  min-width: 0;
  max-width: 56px;
  padding: 3px 6px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-job-title-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.lead-job-title-actions form {
  margin: 0;
}
.lead-job-title-actions .danger-mini {
  border-color: #f1b8b8;
  color: #b42318;
}
@media (max-width: 1320px) {
  .lead-source-list.source-checkboxes:has(.lead-source-group) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .lead-count-row,
  .lead-source-list.source-checkboxes:has(.lead-source-group) {
    grid-template-columns: 1fr;
  }
}

/* Search API dispatch center */
.container:has(.search-api-center) {
  width: min(1520px, calc(100% - 44px));
}
.search-api-center {
  max-width: none;
  display: grid;
  gap: 18px;
}
#search-providers.search-api-center {
  max-width: none;
}
.search-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid #dbe6f3;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 16px 34px rgba(15, 36, 66, .06);
}
.search-center-head h2 {
  margin-bottom: 8px;
  font-size: 24px;
}
.search-center-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.search-overview-panel {
  padding: 22px;
  border: 1px solid #dbe6f3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 36, 66, .05);
}
.search-overview-card {
  min-height: 114px;
  padding: 18px;
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 36, 66, .05);
}
.search-overview-card small,
.search-overview-card span {
  display: block;
  color: #64748b;
}
.search-overview-card strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 28px;
  line-height: 1.1;
  color: #0f1f3d;
}
.search-status-ok strong { color: #0b7a45; }
.search-status-warn strong { color: #9a6500; }
.search-status-missing strong { color: #64748b; }
.search-status-preview strong { color: #1167d8; }
.search-plan-panel,
.search-dispatch-panel {
  padding: 22px;
  border: 1px solid #dbe6f3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 36, 66, .05);
}
.search-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.search-plan-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 17px;
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  background: #fbfdff;
}
.search-plan-head strong,
.search-plan-head small {
  display: block;
}
.search-plan-head strong {
  margin-bottom: 4px;
  color: #0f1f3d;
}
.search-plan-card p {
  color: #17253d;
  font-weight: 700;
  line-height: 1.8;
}
.search-provider-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.search-provider-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #1167d8;
  background: #eaf2ff;
  font-size: 12px;
  font-weight: 800;
}
.search-dispatch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.08fr;
  gap: 14px;
}
.dispatch-column {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  background: #fbfdff;
}
.dispatch-column h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.dispatch-column ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.search-priority-item {
  display: grid;
  grid-template-columns: 32px minmax(72px, 1fr) auto minmax(78px, .8fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #e1eaf5;
  border-radius: 10px;
  background: #fff;
}
.search-priority-item.fallback {
  grid-template-columns: 32px minmax(96px, 1fr) auto minmax(100px, .9fr);
  border-style: dashed;
  background: #f8fbff;
}
.search-rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #1167d8;
  background: #eaf2ff;
  font-weight: 900;
}
.search-priority-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-priority-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.priority-controls {
  display: inline-flex;
  gap: 4px;
}
.priority-controls button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #d4e1f0;
  border-radius: 7px;
  color: #1167d8;
  background: #fff;
}
.provider-state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.provider-state-configured { color: #0b7a45; background: #dcf7e8; }
.provider-state-missing { color: #64748b; background: #eef3f8; }
.provider-state-preview { color: #1167d8; background: #eaf2ff; }
.dispatch-policy {
  display: grid;
  gap: 12px;
}
.dispatch-policy-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  background: #fff;
}
.dispatch-policy-box b {
  justify-self: end;
  color: #0f1f3d;
}
.search-provider-section-title {
  margin: 4px 0 12px;
}
.search-api-center .search-provider-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.search-api-center .search-provider-card {
  display: grid;
  gap: 13px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dbe6f3;
  box-shadow: 0 12px 28px rgba(15, 36, 66, .045);
}
.search-provider-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}
.provider-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #1167d8, #43b7db);
  font-weight: 900;
}
.search-provider-card-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.search-provider-card-head p {
  color: #65758c;
  font-size: 13px;
}
.account-status.preview {
  color: #1167d8;
  background: #eaf2ff;
}
.search-provider-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #17253d;
  font-weight: 800;
}
.search-provider-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}
.provider-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.provider-fields .field {
  margin: 0;
}
.provider-fields .field:first-child:nth-last-child(1) {
  grid-column: 1 / -1;
}
.provider-quota-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: end;
}
.provider-quota-row .field {
  margin: 0;
}
.quota-used {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  background: #f8fbff;
}
.quota-used strong {
  color: #1167d8;
}
.search-provider-quota-note {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 12px;
}
.provider-verify {
  margin: -2px 0 0;
}
.provider-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.provider-clear-danger {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}
.provider-clear-danger input {
  width: 14px;
  height: 14px;
  accent-color: #b42318;
}
@media (max-width: 1280px) {
  .search-center-overview,
  .search-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-dispatch-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1023px) {
  .search-api-center .search-provider-grid,
  .provider-fields,
  .provider-quota-row {
    grid-template-columns: 1fr;
  }
  .search-center-head {
    display: grid;
  }
}
@media (max-width: 720px) {
  .search-center-overview,
  .search-plan-grid {
    grid-template-columns: 1fr;
  }
  .search-priority-item,
  .search-priority-item.fallback {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }
  .search-priority-item small,
  .priority-controls {
    grid-column: 2 / -1;
  }
  .provider-actions {
    align-items: stretch;
  }
  .provider-actions .mini-button,
  .provider-clear-danger {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

/* Collector form alignment v334: decision blocks share one grid rhythm. */
.collector-locked .lead-create form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: stretch;
}
.collector-locked .lead-create .lead-keyword-field {
  grid-column: 1;
}
.collector-locked .lead-create form > label.field:nth-of-type(2) {
  grid-column: 2;
  grid-row: auto;
}
.collector-locked .lead-create .lead-intent-field,
.collector-locked .lead-create .lead-crawl-mode-field,
.collector-locked .lead-create .lead-safe-sample-panel,
.collector-locked .lead-create .lead-sample-review-panel,
.collector-locked .lead-create .lead-count-row,
.collector-locked .lead-create .lead-sources,
.collector-locked .lead-create .lead-source-safety-summary,
.collector-locked .lead-create .lead-query-preview,
.collector-locked .lead-create .lead-submit-row {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}
.collector-locked .lead-create .lead-intent-presets {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.collector-locked .lead-create .lead-intent-presets button:first-child {
  grid-column: 1 / -1;
}
.collector-locked .lead-create .crawl-mode-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.collector-locked .lead-create .crawl-mode-card input[type="radio"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 2px 0 0;
  accent-color: #1167d8;
}
.collector-locked .lead-create .lead-safe-sample-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.collector-locked .lead-create .lead-sample-review-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.collector-locked .lead-create .lead-sample-review-panel,
.collector-locked .lead-create .lead-safe-sample-panel {
  align-self: stretch;
}
.collector-locked .lead-create .lead-count-inline {
  max-width: none;
}
@media (max-width: 1320px) {
  .collector-locked .lead-create .lead-intent-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .collector-locked .lead-create .lead-sample-review-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .collector-locked .lead-create form,
  .collector-locked .lead-create .crawl-mode-options,
  .collector-locked .lead-create .lead-safe-sample-actions,
  .collector-locked .lead-create .lead-count-inline {
    grid-template-columns: 1fr;
  }
  .collector-locked .lead-create .lead-keyword-field,
  .collector-locked .lead-create form > label.field:nth-of-type(2) {
    grid-column: 1 / -1;
  }
  .collector-locked .lead-create .lead-sample-review-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .collector-locked .lead-create .lead-intent-presets,
  .collector-locked .lead-create .lead-sample-review-metrics {
    grid-template-columns: 1fr;
  }
}

/* Bulk lead pool: local-worker controlled high-volume prospecting. */
.bulk-guard-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-color: #b9d7c7;
  background: #f4fbf6;
}
.bulk-guard-card strong { display: block; color: #145c37; margin-bottom: 5px; }
.bulk-guard-card p { margin: 0; color: #365746; line-height: 1.5; }
.bulk-guard-card code { white-space: nowrap; color: #24513a; background: #e8f5ed; }
.bulk-lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
  margin-bottom: 18px;
}
.bulk-lead-create form {
  display: grid;
  gap: 14px;
}
.bulk-source-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.bulk-source-card {
  grid-template-columns: 22px 32px minmax(0, 1fr);
}
.bulk-worker-token-created {
  margin-bottom: 14px;
}
.bulk-worker-endpoints {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #f8fbff;
}
.bulk-worker-endpoints strong {
  font-size: 13px;
  color: #26354d;
}
.bulk-worker-endpoints code {
  display: block;
  overflow-wrap: anywhere;
}
.bulk-jobs-card {
  margin-bottom: 18px;
}
.bulk-candidates-table td {
  vertical-align: middle;
}
.bulk-candidates-table .lead-row-actions {
  min-width: 220px;
}
@media (max-width: 1120px) {
  .bulk-lead-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .bulk-guard-card {
    display: block;
  }
  .bulk-guard-card code {
    display: block;
    margin-top: 10px;
    white-space: normal;
  }
  .bulk-source-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .logistics-rate-layout,
  .logistics-metrics .info-grid,
  .logistics-rate-actions {
    grid-template-columns: 1fr;
  }
  .logistics-rate-actions {
    justify-content: flex-start;
  }
  .order-logistics-preview-card {
    grid-template-columns: 1fr;
  }
  .order-logistics-preview-card em {
    justify-self: flex-start;
  }
  .order-product-hint-head {
    display: block;
  }
  .order-product-hint-head span {
    display: block;
    margin-top: 4px;
  }
  .order-product-status-grid {
    grid-template-columns: 1fr;
  }
  .order-product-bridge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .order-product-hint-grid {
    grid-template-columns: 1fr;
  }
  .shipment-context-grid,
  .finance-context-grid,
  .email-order-context-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .order-product-bridge-grid {
    grid-template-columns: 1fr;
  }
}

/* ERP workspace v4: restrained, task-first operational UI. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202f;
  --muted: #687386;
  --line: #e1e5eb;
  --primary: #1463df;
  --primary-dark: #0f52c2;
  --danger: #d83b43;
  --bg-page: #f6f7f9;
  --bg-card: #ffffff;
  --text-main: #17202f;
  --text-secondary: #687386;
  --border: #e1e5eb;
  --success: #16845b;
  --success-soft: #e9f7f0;
  --warning: #b56a11;
  --warning-soft: #fff5e7;
  --danger-soft: #fff0f0;
  --primary-soft: #edf4ff;
  --purple: #5d65c7;
  --purple-soft: #f0f1ff;
  --radius-card: 6px;
  --shadow-card: none;
  --rail-bg: #1d2734;
  --rail-active: #2d3b4d;
  --sidebar-width: 220px;
  --rail-width: 72px;
}

body.has-sidebar {
  min-width: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail-width) var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg-page);
}

.app-rail {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: var(--rail-width);
  height: 100vh;
  padding: 12px 8px;
  color: #d9e1eb;
  background: var(--rail-bg);
  border-right: 1px solid rgba(255, 255, 255, .07);
}

.app-rail-brand,
.app-rail-menu,
.app-rail-link {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #d9e1eb;
  background: transparent;
}

.app-rail-brand {
  height: 52px;
  margin-bottom: 18px;
}

.app-rail .brand-mark,
.sidebar .brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: #fff;
  background: var(--primary);
  box-shadow: none;
  font-size: 18px;
}

.app-rail-menu {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 22px;
}

.app-rail nav {
  display: grid;
  gap: 7px;
}

.app-rail-link {
  min-height: 58px;
  flex-direction: column;
  gap: 3px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.app-rail-link i {
  font-size: 21px;
}

.app-rail-link:hover,
.app-rail-link.active {
  color: #fff;
  background: var(--rail-active);
}

.app-rail-link.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  max-width: none;
  padding: 16px 12px 12px;
  color: var(--text-main);
  background: #fff;
  border-right: 1px solid var(--border);
  box-shadow: none;
  overflow: hidden;
}

.sidebar-brand {
  flex: 0 0 auto;
  min-height: 52px;
  margin: 0 0 10px;
  padding: 0 4px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand strong {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 800;
}

.sidebar-brand small {
  color: var(--text-secondary);
  font-size: 11px;
}

.nav-command {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  margin: 0 0 10px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-secondary);
  background: #fafbfc;
  cursor: pointer;
  text-align: left;
}

.nav-command:hover {
  color: var(--text-main);
  border-color: #b9c4d3;
  background: #fff;
}

.nav-command kbd,
.command-palette kbd {
  padding: 1px 5px;
  border: 1px solid #d9dee7;
  border-radius: 4px;
  color: #7a8494;
  background: #fff;
  font: 10px/1.5 inherit;
}

.side-nav {
  flex: 1 1 auto;
  display: block;
  min-width: 0;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.side-nav::-webkit-scrollbar {
  display: none;
}

.nav-group,
.nav-group-product-flow,
.nav-group-collapsible,
.nav-group-collapsible.nav-group-active {
  display: grid;
  gap: 2px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.nav-group-label,
.nav-group-product-flow .nav-group-label {
  display: block;
  padding: 4px 8px 5px;
  color: #8993a2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.side-nav a,
.side-nav .nav-group-product-flow a,
.app-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 5px;
  color: #3a4657;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 650;
}

.app-nav-link i {
  flex: 0 0 18px;
  width: 18px;
  color: #7a8697;
  font-size: 17px;
  text-align: center;
}

.side-nav a:hover {
  color: #17202f;
  background: #f1f4f8;
}

.side-nav a.active,
.side-nav .app-nav-link.active {
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 2px 0 0 var(--primary);
}

.side-nav a.active i {
  color: var(--primary);
}

.sidebar-account {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  margin: 10px 0 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-main);
  background: #fff;
}

.sidebar-account > span,
.sidebar-account .link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sidebar-account .link-button {
  color: var(--text-secondary);
  font-weight: 700;
}

.sidebar-account .link-button:hover {
  color: var(--danger);
}

.app-nav-backdrop {
  display: none;
}

.container.app-main.locked-app-main,
.container.app-main {
  grid-column: 3;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 22px 26px 44px;
}

.page-head,
.locked-page-head {
  min-height: 52px;
  margin: 0 0 14px;
  gap: 16px;
}

.page-head h1,
.locked-page-head h1 {
  margin: 1px 0 0;
  color: var(--text-main);
  font-size: 24px;
  font-weight: 780;
  line-height: 1.25;
  letter-spacing: 0;
}

.page-head small,
.locked-page-head small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
}

.eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.actions,
.page-actions {
  gap: 8px;
}

.button,
.mini-button {
  gap: 6px;
  border-radius: 5px;
  box-shadow: none;
}

.button {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 750;
}

.button:hover {
  box-shadow: none;
}

.button.secondary {
  color: #30415a;
  border-color: var(--border);
  background: #fff;
}

.button.secondary:hover {
  color: var(--primary);
  border-color: #b9cae3;
  background: #f8fbff;
}

.icon-button i,
.button i {
  font-size: 16px;
}

.card,
.lead-flow-bridge,
.workflow-panel,
.settings-card,
.customer-stage-panel,
.product-supplier-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: none;
}

.card {
  padding: 16px;
}

.card-title {
  gap: 12px;
  margin-bottom: 12px;
}

.card-title h2,
.context-card-head h2,
.dashboard-context-list h2 {
  color: var(--text-main);
  font-size: 16px;
  font-weight: 780;
}

.card-title small {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.locked-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 14px;
  align-items: start;
}

.locked-workspace.locked-no-side {
  grid-template-columns: minmax(0, 1fr);
}

.locked-main,
.locked-side {
  min-width: 0;
}

.workspace-context {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  overflow: hidden;
}

.workspace-context > summary {
  display: none;
}

.locked-side-body {
  display: grid;
  gap: 0;
  max-height: calc(100vh - 34px);
  padding: 0;
  overflow: auto;
  background: #fff;
}

.locked-side-body > * {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.locked-side-body > :last-child {
  border-bottom: 0;
}

.ai-card,
.locked-side > .side-panel-title,
.locked-side > .detail-profile,
.locked-side > .side-dl,
.locked-side > .side-note,
.locked-side > .locked-empty {
  border-radius: 0;
  box-shadow: none;
}

.ai-card {
  padding: 16px;
}

.ai-card-head {
  margin-bottom: 10px;
}

.ai-card-head span,
.context-card-head span {
  padding: 2px 6px;
  border-radius: 4px;
  color: #6c7788;
  background: #f0f2f5;
  font-size: 10px;
  font-weight: 750;
}

.ai-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-list li,
.activation-side-card .ai-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.context-step {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.ai-list li strong,
.ai-list li small {
  display: block;
}

.ai-list li small {
  margin-top: 3px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}

.side-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: #30415a;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.side-action:hover {
  color: var(--primary);
  border-color: #b9cae3;
}

.locked-kpis,
.dashboard-locked .locked-kpis,
.collector-locked .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0;
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  overflow: hidden;
}

.dashboard-page > .locked-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi-card,
.stat {
  min-height: 76px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.kpi-card {
  gap: 10px;
}

.kpi-card:last-child,
.stat:last-child {
  border-right: 0;
}

.kpi-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 5px;
  font-size: 17px;
}

.kpi-card span:not(.kpi-icon) {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.kpi-card strong,
.stat strong {
  margin: 2px 0 0;
  color: var(--text-main);
  font-size: 21px;
  font-weight: 760;
  line-height: 1.15;
}

.kpi-change {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
}

.lead-flow-bridge,
.workflow-panel.locked-flow {
  margin: 0 0 12px;
  padding: 12px 14px;
}

.lead-flow-head {
  margin-bottom: 8px;
}

.lead-flow-grid,
.workflow-grid,
.dashboard-locked .agent-flow-grid,
.dashboard-locked .workflow-grid {
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.lead-flow-card,
.workflow-step,
.agent-flow-step,
.lead-flow-start,
.lead-flow-task,
.lead-flow-review,
.lead-flow-done {
  min-height: 72px;
  padding: 10px 12px;
  border: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  color: var(--text-main);
  background: #fff !important;
  box-shadow: none !important;
}

.lead-flow-card:last-child,
.workflow-step:last-child,
.agent-flow-step:last-child {
  border-right: 0 !important;
}

.lead-flow-card strong,
.workflow-step strong,
.agent-flow-step strong {
  font-size: 18px;
}

.lead-flow-card small,
.workflow-step small,
.agent-flow-step small {
  color: var(--text-secondary);
}

.workflow-step::after,
.agent-flow-step::after {
  display: none;
}

.filters,
.locked-filter {
  gap: 8px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: none;
}

input,
select,
textarea,
.locked-filter input,
.locked-filter select,
.filters input,
.filters select,
.field input,
.field select,
.field textarea {
  border-color: #d7dde6;
  border-radius: 5px;
  color: var(--text-main);
  background: #fff;
}

input,
select,
.field input,
.field select {
  min-height: 36px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(20, 99, 223, .16);
  outline-offset: 1px;
  border-color: var(--primary);
}

.locked-tabs,
.content-tab-list {
  min-height: 42px;
  gap: 2px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: #fff;
  overflow-x: auto;
}

.locked-tabs a,
.content-tab-list button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 4px;
  color: #4b5768;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.locked-tabs a.active,
.content-tab-list button.active {
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: none;
}

.table-card {
  padding: 0;
  border-radius: var(--radius-card);
  box-shadow: none;
  overflow: hidden;
}

.table-card .card-title {
  min-height: 48px;
  padding: 11px 14px;
}

.table-scroll {
  max-width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  height: 38px;
  padding: 7px 10px;
  color: #697587;
  background: #f8f9fb;
  border-top: 1px solid var(--border);
  font-size: 11px;
  font-weight: 750;
  text-align: left;
}

td {
  height: 50px;
  padding: 8px 10px;
  color: #253044;
  border-top: 1px solid var(--border);
  font-size: 12px;
  vertical-align: middle;
}

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

tbody tr:hover {
  background: #f8fbff;
}

.badge,
.level-badge,
.email-check,
.lead-score,
.status-badge,
.supplier-status {
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
}

.table-footer {
  min-height: 42px;
  padding: 0 14px;
}

.dashboard-primary-stack {
  display: grid;
  gap: 12px;
}

.dashboard-task-card,
.dashboard-follow-card {
  padding: 0;
  overflow: hidden;
}

.dashboard-task-card .card-title,
.dashboard-follow-card .card-title {
  min-height: 52px;
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

.todo-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(74px, auto) 64px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px 14px;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

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

.todo-row > span {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--primary);
  background: var(--primary-soft);
}

.todo-row > span i {
  font-size: 16px;
}

.todo-row strong,
.todo-row small {
  display: block;
}

.todo-row strong {
  color: var(--text-main);
  font-size: 13px;
}

.todo-row small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.todo-row b {
  min-width: 0;
  padding: 0;
  color: var(--text-main);
  background: transparent;
  font-size: 12px;
  text-align: right;
}

.todo-row em {
  justify-self: end;
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.dashboard-follow-card .follow-row {
  min-height: 52px;
  padding: 9px 14px;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

.dashboard-follow-card .follow-row:last-child {
  border-bottom: 0;
}

.dashboard-secondary {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
}

.dashboard-secondary > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  color: #334155;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-secondary > summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dashboard-secondary > summary small {
  color: var(--text-secondary);
  font-weight: 600;
}

.dashboard-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}

.dashboard-secondary-grid > article {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.dashboard-secondary-grid > article:nth-child(even) {
  border-right: 0;
}

.dashboard-focus-card,
.dashboard-context-list {
  padding: 16px;
}

.context-card-head,
.focus-kind {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-focus-card .context-card-head {
  margin-bottom: 18px;
}

.focus-kind span {
  color: #435067;
  font-size: 12px;
  font-weight: 750;
}

.focus-kind b {
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 10px;
}

.dashboard-focus-card h3 {
  margin: 14px 0 4px;
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.4;
}

.dashboard-focus-card p {
  color: var(--text-secondary);
  font-size: 12px;
}

.dashboard-focus-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.dashboard-focus-card dl div {
  padding: 10px 0;
}

.dashboard-focus-card dt {
  color: var(--text-secondary);
  font-size: 10px;
}

.dashboard-focus-card dd {
  margin: 3px 0 0;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-context-list h2 {
  margin-bottom: 8px;
}

.dashboard-context-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  color: #435067;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.dashboard-context-list a strong {
  color: var(--text-main);
}

.command-palette {
  width: min(620px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 80px));
  padding: 0;
  border: 1px solid #cfd6e0;
  border-radius: 8px;
  color: var(--text-main);
  background: #fff;
  box-shadow: 0 24px 70px rgba(23, 32, 47, .2);
}

.command-palette::backdrop {
  background: rgba(23, 32, 47, .42);
}

.command-palette-head {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
}

.command-palette-head input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.command-palette-head button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
}

.command-palette-list {
  display: grid;
  gap: 3px;
  max-height: 520px;
  padding: 8px;
  overflow: auto;
}

.command-palette-list a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 5px;
  color: var(--text-main);
}

.command-palette-list a:hover {
  background: var(--primary-soft);
}

.command-palette-list small {
  color: var(--text-secondary);
}

.command-palette footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  font-size: 10px;
}

.settings-layout,
.settings-card,
.settings-card .card,
.content-tab-panel > .card {
  box-shadow: none;
}

.settings-card .card,
.content-tab-panel > .card {
  border-radius: 5px;
}

.source-card,
.collector-mode-card,
.collector-route-card,
.search-provider-card,
.product-match-card,
.product-card {
  border-radius: 5px;
  box-shadow: none;
}

.customer-follow-bridge,
.product-library-bridge,
.order-fulfillment-bridge,
.fulfillment-bridge {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 5px;
  box-shadow: none;
}

.customer-stage-grid,
.library-readiness-grid,
.order-stage-grid,
.fulfillment-stage-grid {
  gap: 6px;
}

.customer-stage-card,
.library-readiness-card,
.order-stage-card,
.fulfillment-stage-card {
  --stage-accent: #a8b4c4;
  border-color: var(--border) !important;
  border-radius: 4px;
  background: #fff !important;
  box-shadow: inset 3px 0 0 var(--stage-accent) !important;
}

a.customer-stage-card:hover,
.customer-stage-card.active,
a.library-readiness-card:hover,
.library-readiness-card.active,
a.order-stage-card:hover,
a.fulfillment-stage-card:hover {
  border-color: #b8cae3 !important;
  box-shadow: inset 3px 0 0 var(--stage-accent) !important;
}

.customer-stage-profile,
.library-readiness-pending,
.order-stage-risk,
.fulfillment-stage-risk {
  --stage-accent: #d59b2b;
}

.library-readiness-draft {
  --stage-accent: #7d8999;
}

.customer-stage-due,
.library-readiness-blocked,
.order-stage-blocked,
.fulfillment-stage-blocked,
.fulfillment-stage-danger {
  --stage-accent: #d04b5b;
}

.customer-stage-order,
.library-readiness-quote,
.order-stage-quote {
  --stage-accent: #3478d8;
}

.customer-stage-intent,
.library-readiness-ready,
.order-stage-logistics,
.fulfillment-stage-logistics {
  --stage-accent: #15967d;
}

.fulfillment-stage-done {
  --stage-accent: #2d9b66;
}

.customer-stage-card strong,
.library-readiness-card strong,
.order-stage-card strong,
.fulfillment-stage-card strong {
  font-size: 19px;
}

.orders-locked .stats,
.logistics-locked .stats,
.finance-locked .stats {
  gap: 1px;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--border);
  overflow: hidden;
}

.orders-locked .stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.logistics-locked .stats,
.finance-locked .stats {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.orders-locked .stats .stat,
.logistics-locked .stats .stat,
.finance-locked .stats .stat {
  min-height: 72px;
  padding: 10px 12px;
  border: 0;
  background: #fff;
}

.logistics-locked .stats .stat,
.finance-locked .stats .stat {
  grid-column: span 3;
}

.logistics-locked .stats .stat:nth-last-child(-n + 3),
.finance-locked .stats .stat:nth-last-child(-n + 3) {
  grid-column: span 4;
}

.orders-locked .stats .stat strong,
.logistics-locked .stats .stat strong,
.finance-locked .stats .stat strong {
  font-size: 19px;
}

.product-match-locked {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 280px);
}

.product-match-stats {
  gap: 1px;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--border);
  overflow: hidden;
}

.product-match-stats .stat {
  min-height: 72px;
  padding: 10px 12px;
  border: 0;
  background: #fff;
}

.product-match-locked .product-match-result-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

@media (max-width: 1260px) {
  :root {
    --sidebar-width: 204px;
  }
  .container.app-main.locked-app-main,
  .container.app-main {
    padding-right: 18px;
    padding-left: 18px;
  }
  .locked-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
  }
  .locked-kpis,
  .dashboard-locked .locked-kpis,
  .collector-locked .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  :root {
    --sidebar-width: 188px;
    --rail-width: 64px;
  }
  .locked-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .workspace-context {
    position: static;
    max-height: none;
  }
  .workspace-context > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 12px;
    color: #3f4a5d;
    cursor: pointer;
    list-style: none;
    font-size: 12px;
    font-weight: 700;
  }
  .workspace-context > summary span {
    margin-right: auto;
    margin-left: 7px;
  }
  .workspace-context > summary small {
    color: var(--text-secondary);
    font-size: 10px;
  }
  .locked-side-body {
    max-height: none;
  }
}

@media (max-width: 900px) {
  body.has-sidebar {
    padding-top: 56px;
  }
  .app-shell {
    display: block;
    min-height: calc(100vh - 56px);
  }
  .app-rail {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 70;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 56px;
    padding: 0 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .app-rail-brand {
    height: 44px;
    margin: 0 auto 0 0;
  }
  .app-rail-menu {
    display: inline-flex;
    order: 2;
  }
  .app-rail nav {
    display: none;
  }
  .sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: min(308px, calc(100vw - 42px));
    height: calc(100vh - 56px);
    max-width: none;
    padding: 14px 12px;
    flex-wrap: nowrap;
    align-items: stretch;
    transform: translateX(-102%);
    transition: transform .18s ease;
  }
  .sidebar .side-nav {
    width: 100%;
    min-height: 0;
    max-width: none;
  }
  .sidebar .sidebar-account {
    width: 100%;
  }
  body.app-nav-open {
    overflow: hidden;
  }
  body.app-nav-open .sidebar {
    transform: translateX(0);
  }
  .app-nav-backdrop {
    position: fixed;
    inset: 56px 0 0;
    z-index: 75;
    display: block;
    border: 0;
    background: rgba(23, 32, 47, .4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }
  body.app-nav-open .app-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .container.app-main.locked-app-main,
  .container.app-main {
    width: 100%;
    margin: 0;
    padding: 14px 14px 34px;
  }
  .page-head,
  .locked-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-head .actions,
  .locked-page-head .actions,
  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .locked-kpis,
  .dashboard-page > .locked-kpis,
  .dashboard-locked .locked-kpis,
  .collector-locked .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .orders-locked .stats,
  .logistics-locked .stats,
  .finance-locked .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-match-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .orders-locked .stats .stat,
  .logistics-locked .stats .stat,
  .finance-locked .stats .stat,
  .logistics-locked .stats .stat:nth-last-child(-n + 3),
  .finance-locked .stats .stat:nth-last-child(-n + 3) {
    grid-column: auto;
  }
  .orders-locked .stats .stat:last-child,
  .product-match-stats .stat:last-child {
    grid-column: 1 / -1;
  }
  .kpi-card,
  .stat {
    min-height: 68px;
    border-bottom: 1px solid var(--border);
  }
  .lead-flow-grid,
  .workflow-grid,
  .dashboard-locked .agent-flow-grid,
  .dashboard-locked .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-secondary-grid > article,
  .dashboard-secondary-grid > article:nth-child(even) {
    border-right: 0;
  }
  .locked-filter,
  .email-locked .locked-filter,
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .locked-filter > :first-child,
  .filters > :first-child {
    grid-column: 1 / -1;
  }
  .workspace-context:not([open]) .locked-side-body {
    display: none;
  }
}

@media (max-width: 620px) {
  .container.app-main.locked-app-main,
  .container.app-main {
    padding: 12px 10px 28px;
  }
  .page-head h1,
  .locked-page-head h1 {
    font-size: 21px;
  }
  .page-head .actions .button,
  .locked-page-head .actions .button {
    flex: 1 1 auto;
  }
  .locked-kpis,
  .dashboard-locked .locked-kpis,
  .collector-locked .stats {
    grid-template-columns: 1fr 1fr;
  }
  .kpi-card {
    padding: 10px;
  }
  .kpi-card strong,
  .stat strong {
    font-size: 18px;
  }
  .kpi-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .todo-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    padding: 9px 10px;
  }
  .todo-row b {
    grid-column: 3;
    grid-row: 1;
  }
  .todo-row em {
    display: none;
  }
  .lead-flow-grid,
  .workflow-grid,
  .dashboard-locked .agent-flow-grid,
  .dashboard-locked .workflow-grid {
    grid-template-columns: 1fr;
  }
  .product-match-locked .lead-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-match-locked .lead-flow-card:nth-child(odd) {
    border-right: 1px solid var(--border) !important;
  }
  .product-match-locked .page-head .page-actions,
  .product-match-locked .product-review-queue,
  .product-match-locked .product-match-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }
  .product-match-locked .page-head .page-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .product-match-locked .page-head .page-actions .button,
  .product-match-locked .product-match-filter > * {
    width: 100%;
    min-width: 0;
  }
  .product-match-locked .product-review-queue-item:last-child {
    grid-column: 1 / -1;
  }
  .lead-flow-card,
  .workflow-step,
  .agent-flow-step {
    min-height: 58px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .filters,
  .locked-filter,
  .email-locked .locked-filter {
    grid-template-columns: 1fr;
  }
  .locked-filter > *,
  .filters > * {
    grid-column: 1;
    width: 100%;
  }
  .command-palette {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 28px);
  }
}

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

@media (max-width: 760px) {
  .match-conflict-resolution form {
    grid-template-columns: 1fr;
  }
  .match-conflict-resolution form .mini-button {
    width: 100%;
    justify-content: center;
  }
}

/* Product-match refresh queue: compact cross-candidate operations view. */
.refresh-capacity-band {
  margin-bottom: 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.refresh-capacity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.refresh-capacity-heading h2 {
  margin: 0;
  font-size: 15px;
}

.refresh-capacity-heading small,
.refresh-capacity-heading > span {
  color: var(--text-secondary);
  font-size: 11px;
}

.refresh-capacity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.refresh-capacity-item {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.refresh-capacity-item:last-child {
  border-right: 0;
}

.refresh-capacity-title,
.refresh-capacity-counts {
  display: flex;
  align-items: center;
}

.refresh-capacity-title {
  justify-content: space-between;
  gap: 10px;
}

.refresh-capacity-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.refresh-capacity-counts {
  gap: 18px;
  margin: 10px 0 6px;
  color: var(--text-secondary);
  font-size: 11px;
}

.refresh-capacity-counts span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.refresh-capacity-counts b {
  color: var(--text-main);
  font-size: 18px;
}

.refresh-capacity-item > small {
  display: block;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refresh-capacity-item > .refresh-capacity-wait {
  margin-top: 3px;
  color: #8a5a05;
}

.refresh-operation-manager {
  overflow: hidden;
}

.refresh-operation-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(140px, 1fr)) auto auto;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.refresh-operation-filters > * {
  min-width: 0;
}

.refresh-operation-table {
  min-width: 1120px;
  table-layout: fixed;
}

.refresh-operation-table th:nth-child(1) { width: 110px; }
.refresh-operation-table th:nth-child(2) { width: 260px; }
.refresh-operation-table th:nth-child(3) { width: 135px; }
.refresh-operation-table th:nth-child(4) { width: 150px; }
.refresh-operation-table th:nth-child(5) { width: 190px; }
.refresh-operation-table th:nth-child(6) { width: 210px; }
.refresh-operation-table th:nth-child(7) { width: 90px; }

.refresh-operation-table td {
  height: 66px;
  vertical-align: top;
}

.refresh-operation-table td > strong,
.refresh-operation-table td > a,
.refresh-operation-table td > span,
.refresh-operation-table td > small {
  display: block;
}

.refresh-operation-table td > a,
.refresh-operation-table td > span,
.refresh-operation-table td > strong {
  overflow: hidden;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refresh-operation-table td > a {
  color: var(--primary);
}

.refresh-operation-table td > small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.refresh-operation-status {
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 4px;
  background: #eef3f9;
}

.refresh-status-queued .refresh-operation-status { color: #8a5a05; background: #fff1c9; }
.refresh-status-running .refresh-operation-status { color: #0758d1; background: #e9f2ff; }
.refresh-status-completed .refresh-operation-status { color: #0a6f3c; background: #e0f6ea; }
.refresh-status-blocked .refresh-operation-status,
.refresh-status-failed .refresh-operation-status { color: #a11b1b; background: #ffe2e2; }
.refresh-status-no_result .refresh-operation-status,
.refresh-status-cancelled .refresh-operation-status { color: #53657e; background: #eef3f9; }

.refresh-operation-table .row-action-buttons {
  align-items: flex-start;
}

.refresh-operation-table .mini-button {
  min-height: 30px;
  padding: 0 9px;
}

.refresh-operation-empty td {
  height: 110px;
  color: var(--text-secondary);
  text-align: center;
  vertical-align: middle;
}

.refresh-operation-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 1100px) {
  .refresh-operation-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .refresh-operation-filters > :first-child {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .refresh-capacity-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .refresh-capacity-grid {
    grid-template-columns: 1fr;
  }
  .refresh-capacity-item,
  .refresh-capacity-item:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .refresh-capacity-item:last-child {
    border-bottom: 0;
  }
  .refresh-operation-filters,
  .refresh-operation-filters > :first-child {
    grid-template-columns: 1fr 1fr;
    grid-column: auto;
  }
  .refresh-operation-filters > input {
    grid-column: 1 / -1;
  }
  .refresh-operation-table-scroll {
    overflow-x: hidden;
  }
  .refresh-operation-table,
  .refresh-operation-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .refresh-operation-table thead {
    display: none;
  }
  .refresh-operation-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: #fff;
  }
  .refresh-operation-table td {
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 7px 8px;
    border: 0;
  }
  .refresh-operation-table td::before {
    display: block;
    margin-bottom: 3px;
    color: #7a8799;
    content: attr(data-label);
    font-size: 9px;
    font-weight: 750;
  }
  .refresh-operation-table td:nth-child(2),
  .refresh-operation-table td:nth-child(5),
  .refresh-operation-table td:nth-child(6),
  .refresh-operation-table td:nth-child(7) {
    grid-column: 1 / -1;
  }
  .refresh-operation-table .row-action-buttons {
    justify-content: flex-start;
  }
  .refresh-operation-empty {
    display: block !important;
  }
  .refresh-operation-empty td {
    padding: 28px 12px;
  }
}

@media (min-width: 761px) and (max-width: 1450px) {
  .runtime-task-manager .runtime-task-table-scroll {
    overflow-x: hidden;
  }
  .runtime-task-manager .runtime-task-table,
  .runtime-task-manager .runtime-task-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .runtime-task-manager .runtime-task-table thead {
    display: none;
  }
  .runtime-task-manager .runtime-task-table tr {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    background: #fff;
  }
  .runtime-task-manager .runtime-task-table td {
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 6px 8px;
    border: 0;
  }
  .runtime-task-manager .runtime-task-table td::before {
    display: block;
    margin-bottom: 3px;
    color: #7a8799;
    content: attr(data-label);
    font-size: 9px;
    font-weight: 750;
  }
  .runtime-task-manager .runtime-task-table td:nth-child(1) {
    grid-column: span 2;
  }
  .runtime-task-manager .runtime-task-table td:nth-child(6) {
    grid-column: span 3;
  }
  .runtime-task-manager .runtime-task-table .row-action-buttons {
    justify-content: flex-start;
  }
  .runtime-task-manager .runtime-task-empty {
    display: block !important;
  }
  .runtime-task-manager .runtime-task-empty td {
    padding: 28px 12px;
  }
}
