:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --line: #d8dee4;
  --ink: #17202a;
  --muted: #687385;
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --green: #16794c;
  --red: #b42318;
  --amber: #a15c00;
  --shadow: 0 10px 30px rgba(20, 30, 43, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* ── Global topnav (replaces product-line-bar + sidebar layout) ── */
.topnav {
  background: #0f1f1a;
  position: sticky;
  top: 0;
  z-index: 900;
}
.topnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.topnav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  padding: 6px 14px 6px 0;
  margin-right: 8px;
  flex-shrink: 0;
}
.topnav-brand-l {
  font-size: 14px;
  font-weight: 750;
  color: #fff;
}
.topnav-brand-s {
  font-size: 10px;
  color: rgba(120, 200, 170, 0.65);
}
.topnav nav {
  display: flex;
  gap: 2px;
  flex: 1;
}
.topnav nav a {
  padding: 0 11px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.topnav nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.topnav nav a.active {
  background: rgba(120, 200, 170, 0.18);
  color: #fff;
}
.topnav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.topnav-right a, .topnav-right span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}
.topnav-right a:hover {
  color: rgba(255, 255, 255, 0.8);
}
/* ── Shell content wrapper ── */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}
/* Keep .product-line-bar as alias for legacy templates */
.product-line-bar {
  display: none;
}
.app {
  min-height: calc(100vh - 52px);
}
.app.full-width {
  min-height: calc(100vh - 52px);
}
/* sidebar is hidden in the new layout; keep rule so old HTML doesn't break layout */
.sidebar {
  display: none;
}
.brand {
  font-size: 20px;
  font-weight: 750;
}
.statusline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pill {
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}
.pill.ok { background: #e7f6ee; color: var(--green); }
.pill.warn { background: #fff4db; color: var(--amber); }
.muted { color: var(--muted); }
.side-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.target-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 280px;
  overflow-y: auto;
  margin: 4px -4px 0;
  padding: 0 4px;
}
.target-list::-webkit-scrollbar { width: 6px; }
.target-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.target-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 8px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
}
.target-link:hover {
  background: var(--panel);
}
.target-link.active {
  background: #edf4ff;
  border-left-color: var(--blue);
}
.target-name {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.target-meta {
  color: var(--muted);
  font-size: 11px;
  margin-left: auto;
  flex-shrink: 0;
}
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
h1, h2, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 16px; }
button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: 7px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button:hover { border-color: #aab6c4; }
button.primary {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}
button.primary:hover { background: var(--blue-strong); }
label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}
textarea {
  min-height: 74px;
  resize: vertical;
}
.side-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.form-heading {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.form-heading .button-link {
  flex: 0 0 auto;
  font-size: 12px;
  min-height: 28px;
  padding: 4px 8px;
}
.form-state-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.form-state-strip span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  padding: 4px 8px;
}
.strategy-field {
  border: 0;
  color: #334155;
  display: grid;
  font-size: 12px;
  font-weight: 750;
  gap: 6px;
  margin: 0;
  min-width: 0;
  padding: 0;
}
.strategy-field > legend {
  margin: 0;
  padding: 0;
}
.strategy-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.strategy-segment {
  cursor: pointer;
  display: block;
  font-size: 12px;
  font-weight: 800;
  position: relative;
}
.strategy-segment input {
  cursor: pointer;
  height: 100%;
  inset: 0;
  margin: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}
.strategy-segment > span {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #334155;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 54px;
  padding: 8px 10px;
  pointer-events: none;
  position: relative;
  text-align: left;
}
.strategy-segment input:checked + span {
  background: #eef2ff;
  border-color: var(--blue);
  color: var(--blue-strong);
}
.strategy-segment input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 1px;
}
.strategy-segment strong {
  font-size: 12px;
  line-height: 1.2;
}
.strategy-segment small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2px;
}
.strategy-segment input:checked + span small {
  color: var(--blue-strong);
  opacity: 0.82;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.notice, .error {
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-weight: 650;
}
.notice { background: #e7f6ee; color: var(--green); }
.notice.muted { background: var(--panel); color: var(--muted); font-weight: 400; border: 1px solid var(--line); font-size: 12px; }
.error { background: #fff1f0; color: var(--red); }
.followup-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.notice-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.notice-copy strong {
  color: var(--ink);
}
.notice-copy span {
  color: var(--green);
}
.notice-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.notice-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #b7dcc9;
  border-radius: 7px;
  background: #fff;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.notice-actions a:hover {
  border-color: var(--green);
  background: #f4fbf7;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.queue-metrics {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
}
.work-area {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.edit-form, .table-wrap, .runs {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.queue-actions {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.queue-actions h2 {
  margin: 0 0 4px;
}
.queue-actions p {
  margin: 0;
}
.queue-action-group {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.queue-action-form {
  flex: 0 0 auto;
}
.queue-row-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.flywheel-progress-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  padding: 14px;
}
.flywheel-progress-card.done { border-left-color: var(--green); }
.flywheel-progress-card.failed { border-left-color: var(--red); }
.flywheel-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.flywheel-progress-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.flywheel-progress-bar {
  background: #edf2f7;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.flywheel-progress-bar span {
  background: var(--blue);
  display: block;
  height: 100%;
}
.flywheel-progress-card.done .flywheel-progress-bar span { background: var(--green); }
.flywheel-progress-card.failed .flywheel-progress-bar span { background: var(--red); }
.flywheel-progress-meta,
.flywheel-progress-detail {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 10px;
}
.flywheel-progress-counters {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.flywheel-progress-counters div {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
}
.flywheel-progress-counters span {
  color: var(--muted);
  display: block;
  font-size: 11px;
}
.flywheel-progress-counters strong {
  display: block;
  font-size: 16px;
  margin-top: 2px;
}
.flywheel-progress-errors {
  color: var(--red);
  font-size: 12px;
  margin: 0;
  padding-left: 18px;
}
.delete-form {
  margin-top: -8px;
}
.delete-form button {
  color: var(--red);
}
/* 搜索条件折叠面板 */
.edit-form-details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.edit-form-details > summary {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  user-select: none;
}
.edit-form-details > summary::-webkit-details-marker { display: none; }
.edit-form-details > summary::before {
  content: '▶';
  font-size: 10px;
  color: var(--muted);
  transition: transform .15s;
  flex-shrink: 0;
}
.edit-form-details[open] > summary::before { transform: rotate(90deg); }
.edit-form-title { font-weight: 600; }
.edit-form-hint { font-size: 12px; }
.edit-form-details .edit-form,
.edit-form-details .delete-form {
  border: none;
  box-shadow: none;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  padding: 14px;
}
/* 候选详情折叠面板 */
.sourcing-detail-details {
  margin-bottom: 12px;
}
.sourcing-detail-details > summary {
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sourcing-detail-details > summary::-webkit-details-marker { display: none; }
.sourcing-detail-details > summary::before {
  content: '▶';
  font-size: 10px;
  color: var(--muted);
  transition: transform .15s;
}
.sourcing-detail-details[open] > summary {
  border-radius: 8px 8px 0 0;
  border-bottom: none;
}
.sourcing-detail-details[open] > summary::before { transform: rotate(90deg); }
.sourcing-detail-details .sourcing-detail-grid {
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 12px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.param-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.param-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.param-chip {
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.param-chip small {
  color: var(--muted);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.id-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}
.title-cell {
  min-width: 200px;
  max-width: 340px;
}
.title-cell .title-text {
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}
.title-cell .title-sub {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}
.title-cell div {
  font-weight: 750;
}
.title-cell .zh {
  margin-top: 4px;
  color: #0f766e;
}
.title-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  max-height: 3.1em;
  overflow: hidden;
}
.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.down { color: var(--green); font-weight: 800; }
.up { color: var(--red); font-weight: 800; }
.flat { color: var(--muted); font-weight: 700; }
.bad-text { color: var(--red); font-weight: 700; }
.runs {
  align-self: start;
}
.run {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.run:last-child { border-bottom: 0; }
.run span {
  color: var(--muted);
}
.run.bad span {
  color: var(--red);
}
.empty-side, .empty-table {
  color: var(--muted);
}
.empty-table {
  text-align: center;
  padding: 28px;
}
a { color: var(--blue); }
.raw-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}
.help-anchor-list {
  display: grid;
  gap: 6px;
}
.help-anchor-list a {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
  padding: 8px 10px;
  text-decoration: none;
}
.help-anchor-list a:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.help-main {
  display: grid;
  gap: 18px;
  max-width: 1180px;
}
.help-hero,
.help-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.help-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
.help-hero h1,
.help-section h2 {
  margin-top: 0;
}
.help-hero p,
.help-section p {
  color: var(--muted);
  margin-bottom: 0;
}
.help-hero-metrics,
.help-steps,
.help-grid {
  display: grid;
  gap: 10px;
}
.help-hero-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.help-hero-metrics span,
.help-steps div,
.help-grid div,
.help-callout {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.help-hero-metrics b {
  color: var(--blue);
  display: block;
  font-size: 22px;
}
.help-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.help-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.help-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.help-grid h3 {
  margin: 0 0 6px;
}
.help-table {
  min-width: auto;
}
.help-table th {
  color: var(--ink);
  width: 150px;
}
.help-callout {
  border-left: 4px solid var(--amber);
  color: #334155;
  margin-top: 14px;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #101827;
  color: #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}
.risk-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  margin-right: 4px;
}
.risk-tag {
  display: inline-block;
  border: 1px solid var(--red);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.value-tag {
  display: inline-block;
  border: 1px solid var(--blue);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.origin-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}
.origin-badge.danger {
  background: #fff1f0;
  color: var(--red);
  border: 1px solid var(--red);
}
.score-cell {
  white-space: nowrap;
  vertical-align: middle;
  min-width: 80px;
}
tr.dup {
  opacity: 0.55;
  background: #fef9e7;
}
tr.dup td {
  text-decoration: line-through;
  text-decoration-color: #ccc;
}
.strategy-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.strategy-tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--panel);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.strategy-tab:hover { border-color: var(--blue); }
.strategy-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.strategy-tab .count { font-weight: 400; opacity: 0.7; }

/* Discovery dashboard */
.mode-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.mode-tab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
}
.mode-tab.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.category-card {
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-category {
  font-weight: 700;
  font-size: 15px;
}
.priority-badge {
  border-radius: 999px;
  padding: 2px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.card-stat {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
}
.stat-value {
  font-weight: 700;
  font-size: 14px;
}
.stat-value.small {
  font-size: 12px;
}
.warn-tag {
  display: inline-block;
  border: 1px solid var(--amber);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
  margin-top: 8px;
}
.cat-tag {
  display: inline-block;
  background: #eef2ff;
  border-radius: 4px;
  padding: 2px 6px;
  color: #4338ca;
  font-size: 11px;
  font-weight: 700;
}
.run-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.run-item {
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.run-item:last-child { border-bottom: 0; }
.run-status { font-weight: 700; }

@media (max-width: 980px) {
  .product-line-bar {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 8px 14px;
  }
  .product-line-bar span {
    width: 100%;
  }
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .layout, .metrics, .form-grid, .param-tools {
    grid-template-columns: 1fr;
  }
  .help-hero,
  .help-steps,
  .help-grid,
  .help-grid.two {
    grid-template-columns: 1fr;
  }
  .help-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flywheel-progress-head {
    align-items: stretch;
    flex-direction: column;
  }
  .flywheel-progress-counters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .queue-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .queue-action-group {
    flex-direction: column;
    justify-content: stretch;
  }
  .queue-action-form button {
    width: 100%;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .top-actions {
    justify-content: flex-start;
  }
}
/* ── Arbitrage Dashboard ── */
.arbitrage-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.summary-card {
  background: var(--panel);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.summary-card.highlight {
  border: 2px solid var(--blue);
  background: #eef2ff;
}
.summary-card.profit {
  border: 2px solid #16794c;
  background: #edf7f0;
}
.summary-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.summary-label {
  font-size: 11px;
  color: #687385;
  margin-top: 4px;
}
.arbitrage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.arbitrage-card {
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-left: 4px solid #e0e0e0;
}
.arbitrage-card.priority-immediate { border-left-color: #16794c; }
.arbitrage-card.priority-short { border-left-color: #2563eb; }
.arbitrage-card.priority-watch { border-left-color: #a15c00; }
.arb-card-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.arb-priority {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.priority-immediate .arb-priority { background: #d4edda; color: #16794c; }
.priority-short .arb-priority { background: #dbeafe; color: #1e40af; }
.priority-watch .arb-priority { background: #fef3c7; color: #92400e; }
.arb-platform {
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
}
.arb-risk {
  margin-left: auto;
  font-size: 12px;
}
.arb-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.4;
}
.arb-card-prices {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}
.arb-price-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.arb-label {
  font-size: 10px;
  color: #687385;
  text-transform: uppercase;
}
.arb-value {
  font-size: 14px;
  font-weight: 600;
}
.arb-value.profit { color: #16794c; }
.arb-card-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #687385;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}
.arb-listing-preview {
  margin-top: 10px;
}
.arb-listing-preview summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--blue);
  font-weight: 500;
}
.arb-listing-preview .listing-content {
  margin-top: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px;
  font-size: 12px;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
  font-family: monospace;
  line-height: 1.5;
}
.profit-positive { color: #16794c; font-weight: 600; }

/* ── Compare tab: gross-margin + collapsed detail ── */
.profit-pos { color: var(--green); font-weight: 600; }
.profit-neg { color: var(--red); font-weight: 600; }
.compare-detail summary { cursor: pointer; font-size: 12px; }
.compare-detail-body { display: grid; gap: 4px; margin-top: 6px; font-size: 12px; }
.compare-detail-body .dt-label {
  display: inline-block; min-width: 64px; color: var(--muted); margin-right: 6px;
}

/* ── Shop Dashboard ── */
.kpi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.kpi-card.accent { border-color: var(--blue); background: #eef2ff; }
.kpi-card.warn { border-color: var(--amber); background: #fffbf0; }
.kpi-link {
  color: inherit;
  display: block;
  position: relative;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.kpi-link:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}
.kpi-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}
.kpi-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.kpi-label { font-size: 11px; color: var(--muted); margin-top: 4px; }
.kpi-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--line);
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.filter-bar-details {
  margin-bottom: 12px;
}
.filter-bar-details > summary {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
}
.filter-bar-details > summary::-webkit-details-marker { display: none; }
.filter-bar-details > summary::before {
  content: '▶';
  font-size: 9px;
  color: var(--muted);
  transition: transform .15s;
}
.filter-bar-details[open] > summary::before { transform: rotate(90deg); }
.filter-bar-details .filter-bar {
  margin-top: 4px;
}
/* 新增监控对象折叠 */
.side-form-details {
  margin-top: 8px;
}
.side-form-details > summary {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  list-style: none;
  user-select: none;
}
.side-form-details > summary::-webkit-details-marker { display: none; }
.side-form-details .side-form {
  margin-top: 4px;
}
/* 保存为监控折叠 */
.save-target-details {
  margin-bottom: 12px;
}
.save-target-details > summary {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.save-target-details > summary::-webkit-details-marker { display: none; }
.save-target-details > summary::before {
  content: '▶';
  font-size: 9px;
  transition: transform .15s;
}
.save-target-details[open] > summary::before { transform: rotate(90deg); }
.save-target-details .save-as-target-form {
  margin-top: 6px;
}
/* 选货扫描表单折叠 */
.scan-form-details {
  margin-bottom: 8px;
}
.scan-form-details > summary {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.scan-form-details > summary::-webkit-details-marker { display: none; }
.scan-form-details > summary::before {
  content: '▶';
  font-size: 9px;
  color: var(--muted);
  transition: transform .15s;
}
.scan-form-details[open] > summary::before { transform: rotate(90deg); }
.scan-form-details .side-form {
  margin-top: 4px;
}
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.filter-bar input {
  flex: 1;
  max-width: 360px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}
.filter-bar select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  background: #fff;
}
.telegram-workbench {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.telegram-workbench h1 {
  font-size: 24px;
}
.compare-filter {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.compare-filter input[type="search"] {
  max-width: none;
  min-width: 240px;
}
.compare-workbench-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.compare-queue-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.compare-group-note {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 10px;
}
.compare-bucket {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}
.compare-bucket > summary.compare-bucket-head {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 10px 14px;
  background: var(--bg);
  border-left: 4px solid var(--blue);
}
.compare-bucket > summary.compare-bucket-head::-webkit-details-marker { display: none; }
.compare-bucket-head strong { font-size: 14px; color: var(--ink); }
.compare-bucket-stats { font-size: 12px; color: var(--muted); }
.compare-bucket .comparison-wrap { margin: 0; }
.compare-bucket > .muted { display: block; padding: 6px 14px 10px; font-size: 12px; }
.compare-queue-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.compare-queue-chip:hover,
.compare-queue-chip.active {
  border-color: var(--blue);
  background: #eef2ff;
}
.compare-queue-chip.ok { border-left: 3px solid var(--green); }
.compare-queue-chip.warn { border-left: 3px solid var(--amber); }
.compare-queue-chip.bad { border-left: 3px solid var(--red); }
.compare-queue-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.compare-queue-chip strong {
  font-size: 18px;
}
.compare-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.compare-summary-meta span {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.compare-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.compare-summary-signal {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.compare-summary-signal > span {
  color: var(--muted);
  font-size: 11px;
}
.compare-summary-signal strong,
.compare-summary-signal small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-summary-signal strong {
  font-size: 13px;
}
.compare-summary-signal small {
  color: var(--muted);
}
.compare-priority-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.compare-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.compare-priority-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.compare-priority-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 24px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.compare-priority-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.compare-priority-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.compare-priority-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.compare-priority-card small,
.compare-priority-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.compare-priority-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-priority-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.compare-priority-metrics span {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-priority-metrics b {
  display: block;
  color: var(--ink);
  font-size: 13px;
}
.compare-priority-risk {
  color: var(--amber) !important;
}
.compare-priority-card form {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin: 0;
}
.compare-priority-card button {
  min-height: 30px;
  padding: 6px 12px;
}
.tracking-priority-card {
  border-left-color: var(--green);
}
.tracking-priority-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}
.tracking-priority-actions form {
  margin: 0;
}
.tracking-priority-actions .button-link {
  min-height: 30px;
  padding: 6px 12px;
  font-size: 12px;
}
.filter-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.filter-control select {
  min-width: 104px;
}
.comparison-wrap table {
  min-width: 1860px;
}
.comparison-table .strong-price {
  color: var(--green);
  font-weight: 800;
}
.compare-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 142px;
}
.compare-row-actions form {
  margin: 0;
}
.compare-row-actions button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.compare-row-actions button:hover {
  border-color: var(--blue);
  background: #eef2ff;
}
.compare-row-actions .compare-followup-primary {
  flex-basis: 100%;
}
.compare-row-actions button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.compare-row-actions button.primary:hover {
  background: var(--blue-strong);
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.button-link.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.compare-followup-status {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  min-width: 190px;
  font-size: 11px;
}
.compare-followup-status.empty {
  color: var(--muted);
  line-height: 1.35;
}
.compare-followup-status.empty span {
  color: var(--ink);
  font-weight: 800;
}
.compare-followup-status.empty small {
  color: var(--muted);
}
.compare-followup-card {
  display: grid;
  gap: 3px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-left: 3px solid #94a3b8;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}
.compare-followup-card:hover {
  border-color: var(--blue);
  background: #f8fbff;
}
.compare-followup-card.done {
  border-left-color: var(--green);
}
.compare-followup-card.running {
  border-left-color: var(--blue);
}
.compare-followup-card.failed {
  border-left-color: var(--red);
}
.compare-followup-card.created {
  border-left-color: var(--amber);
}
.compare-followup-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.compare-followup-head b {
  font-weight: 800;
}
.compare-followup-head em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}
.compare-followup-metrics {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compare-followup-next {
  color: var(--blue);
  font-weight: 800;
}
.source-link {
  font-weight: 700;
  text-decoration: none;
}
.source-link:hover {
  text-decoration: underline;
}
.compare-signal {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.compare-signal.hot {
  background: #fff1f0;
  color: var(--red);
}
.compare-signal.watch {
  background: #fff4db;
  color: var(--amber);
}
.compare-signal.stable {
  background: #e7f6ee;
  color: var(--green);
}

/* Deep tracking */
.tracking-workbench {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) minmax(180px, 240px);
  gap: 14px;
  align-items: start;
}
.tracking-config,
.tracking-results,
.tracking-history {
  min-width: 0;
}
.tracking-form {
  display: grid;
  gap: 10px;
}
.tracking-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}
.tracking-target-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.tracking-target-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.tracking-target-link {
  display: grid;
  gap: 2px;
  min-width: 150px;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}
.tracking-target-link.active {
  border-color: #9bbaf7;
  background: #edf4ff;
}
.tracking-target-link span,
.tracking-target-link small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tracking-target-link span {
  font-weight: 800;
}
.tracking-target-link small {
  color: var(--muted);
  font-size: 11px;
}
.tracking-run-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.tracking-runline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}
.tracking-runline span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 3px 8px;
}
.tracking-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tracking-table {
  min-width: 1580px;
}
.domain-table {
  min-width: 1220px;
}
.domain-shop-cell small + small {
  color: #334155;
}
.domain-form textarea {
  min-height: 96px;
}
.domain-suggestion-list {
  grid-column: span 2;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.domain-suggestion-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.domain-suggestion-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.domain-suggestion-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.domain-suggestion-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.domain-suggestion-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.domain-suggestion-meta span {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}
.domain-suggestion-meta strong {
  color: var(--ink);
}
.domain-suggestion-products,
.domain-suggestion-seeds {
  color: #334155;
  font-size: 12px;
  line-height: 1.4;
}
.domain-suggestion-seeds {
  color: var(--muted);
}
.tracking-table .strong-price {
  color: var(--green);
  font-weight: 800;
}
.score-badge {
  display: inline-block;
  min-width: 42px;
  color: var(--ink);
  font-weight: 800;
}
.score-bar {
  width: 68px;
  height: 5px;
  margin-top: 4px;
  margin-left: auto;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
.breakdown-cell {
  max-width: 200px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  max-height: 3.4em;
  line-height: 1.4;
}
.ev-line {
  display: block;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.score-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  cursor: help;
}
.compact-cell {
  white-space: nowrap;
  font-size: 12px;
}
.score-details {
  font-size: 12px;
  text-align: left;
}
.score-details > summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 600;
  white-space: nowrap;
}
.score-details-body {
  margin-top: 6px;
  display: grid;
  gap: 4px;
}
.score-details-body .score-subgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
}
.ai-provenance {
  font-size: 11px;
}
.ai-provenance.muted {
  color: var(--muted);
}
.evidence-cell {
  min-width: 260px;
  max-width: 340px;
  color: var(--muted);
  font-size: 12px;
}
.evidence-chain {
  display: grid;
  gap: 4px;
}
.evidence-audit {
  display: block;
  min-width: 280px;
}
.evidence-head {
  color: var(--ink);
  font-weight: 800;
}
.evidence-audit summary {
  cursor: pointer;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.evidence-audit[open] summary {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.evidence-audit-body {
  display: grid;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: #f8fafc;
}
.evidence-line {
  line-height: 1.35;
}
.evidence-line b {
  color: #334155;
  font-weight: 800;
}
.evidence-line a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}
.evidence-line a:hover {
  text-decoration: underline;
}
.evidence-next b {
  color: var(--green);
}
.tracking-history {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.error-text {
  color: var(--red) !important;
}

/* Shop card grid */
.shop-grid {
  display: grid;
  gap: 12px;
}
.shop-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.15s;
}
.shop-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.shop-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}
.shop-card-header:hover { background: #fafbfc; }
.shop-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.shop-info { flex: 1; min-width: 0; }
.shop-name {
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-name a { color: var(--ink); text-decoration: none; }
.shop-name a:hover { color: var(--blue); }
.shop-meta {
  display: flex;
  gap: 12px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}
.shop-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.shop-badge.channel { background: #eef2ff; color: #4338ca; }
.shop-badge.group { background: #fef3c7; color: #92400e; }
.shop-badge.bot { background: #e7f6ee; color: #16794c; }
.source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}
.source-badge.lzt { background: #e7f6ee; color: var(--green); }
.source-badge.plati { background: #eef2ff; color: #4338ca; }
.scan-option-groups {
  display: grid;
  gap: 8px;
}
.scan-option-group,
.scan-field-group {
  display: grid;
  gap: 6px;
}
.scan-option-group,
.scan-field-group {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}
.scan-option-group > legend,
.scan-option-group > span,
.scan-field-group > legend,
.scan-field-group > span {
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}
.scan-option-group > legend,
.scan-field-group > legend {
  padding: 0;
}
.source-toggles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.source-toggles-inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.source-toggles label {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
  font-size: 13px;
  font-weight: 750;
}
.source-toggles input {
  width: auto;
}
.sourcing-scan-context {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}
.sourcing-presets {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 0 16px;
  padding: 14px;
}
.section-head.compact {
  margin-bottom: 10px;
}
.sourcing-preset-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sourcing-preset-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 9px;
  padding: 12px;
}
.preset-card-head {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.preset-card-head h3 {
  font-size: 14px;
  margin: 0;
}
.preset-query {
  color: var(--ink);
  font-weight: 850;
}
.preset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}
.preset-meta span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
}
.action-board-details {
  margin: 0 0 16px;
}
.action-board-details > summary {
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.action-board-details > summary::-webkit-details-marker { display: none; }
.action-board-details > summary::before {
  content: '▶';
  font-size: 10px;
  color: var(--muted);
  transition: transform .15s;
}
.action-board-details[open] > summary {
  border-radius: 8px 8px 0 0;
  border-bottom: none;
}
.action-board-details[open] > summary::before { transform: rotate(90deg); }
.action-board-details .sourcing-action-board {
  border-radius: 0 0 8px 8px;
  border-top: none;
  margin-bottom: 0;
}
.sourcing-action-board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 0 16px;
  padding: 14px;
}
.sourcing-action-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.action-board-exports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.sourcing-action-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  text-decoration: none;
}
.sourcing-action-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 20px rgba(15,23,42,0.08);
}
.sourcing-action-card.ok { border-left-color: var(--green); }
.sourcing-action-card.warn { border-left-color: var(--amber); }
.sourcing-action-card.bad { border-left-color: var(--red); }
.sourcing-action-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.sourcing-action-head span {
  font-size: 13px;
  font-weight: 850;
}
.sourcing-action-head strong {
  font-size: 22px;
}
.sourcing-action-card small {
  color: var(--muted);
  line-height: 1.35;
}
.sourcing-action-card p {
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}
.sourcing-workflow-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 10px;
}
.sourcing-workflow-strip a {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
  padding: 7px 8px;
  text-decoration: none;
}
.sourcing-workflow-strip a:hover {
  border-color: #bfdbfe;
}
.sourcing-workflow-strip span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sourcing-bulk-form {
  margin: 0;
}
.bulk-bar-details {
  margin-bottom: 8px;
}
.bulk-bar-details > summary {
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bulk-bar-details > summary::-webkit-details-marker { display: none; }
.bulk-bar-details > summary::before {
  content: '▶';
  font-size: 9px;
  transition: transform .15s;
}
.bulk-bar-details[open] > summary::before { transform: rotate(90deg); }
.bulk-bar-details .sourcing-bulk-bar {
  border-radius: 8px;
}
.sourcing-bulk-bar {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 10px 12px;
}
.sourcing-bulk-bar > div {
  display: grid;
  gap: 2px;
  margin-right: auto;
}
.sourcing-bulk-bar small {
  color: var(--muted);
}
.sourcing-bulk-bar label {
  align-items: center;
  display: flex;
  gap: 6px;
  margin: 0;
}
.sourcing-bulk-bar input,
.sourcing-bulk-bar select {
  min-width: 130px;
}
.select-cell {
  text-align: center;
  width: 42px;
}
.select-cell input {
  width: auto;
}
.advisor-details {
  margin: 0 0 16px;
}
.advisor-details > summary {
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.advisor-details > summary::-webkit-details-marker { display: none; }
.advisor-details > summary::before {
  content: '▶';
  font-size: 10px;
  color: var(--muted);
  transition: transform .15s;
}
.advisor-details[open] > summary {
  border-radius: 8px 8px 0 0;
  border-bottom: none;
}
.advisor-details[open] > summary::before { transform: rotate(90deg); }
.advisor-details .sourcing-advisor {
  border-radius: 0 0 8px 8px;
  border-top: none;
  margin: 0;
}
.sourcing-advisor {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 0 16px;
  padding: 16px;
}
.sourcing-advisor-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sourcing-advisor h2 {
  font-size: 17px;
  margin: 0;
}
.sourcing-advisor h3 {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 8px;
}
.sourcing-advisor p {
  line-height: 1.55;
  margin: 5px 0 0;
}
.sourcing-advisor-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}
.sourcing-advisor-panel {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.sourcing-advisor-panel.priority {
  background: #eef2ff;
  border-color: #c7d2fe;
}
.advisor-list,
.advisor-candidates {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}
.advisor-candidates {
  list-style: none;
  padding-left: 0;
}
.advisor-candidates li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
}
.advisor-candidates strong,
.advisor-candidates small {
  display: block;
}
.advisor-candidates small {
  color: var(--muted);
  margin-top: 4px;
}
.advisor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 360px;
}
.advisor-actions a,
.advisor-links a {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
  text-decoration: none;
}
.advisor-links {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
}
.block {
  display: block;
}
.link-button {
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 12px;
}
.workflow-form textarea {
  min-height: 120px;
  resize: vertical;
}
.sourcing-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 16px;
  margin: 16px 0;
}
.sourcing-detail-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.sourcing-detail-panel h2 {
  margin: 0 0 12px;
  font-size: 17px;
}
.sourcing-detail-panel h3 {
  margin: 14px 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.detail-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.detail-metrics span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #f8fafc;
  font-size: 12px;
}
.detail-links {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.sourcing-summary {
  color: var(--ink);
  line-height: 1.6;
}
.detail-text {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  max-height: 360px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.5;
}
.evidence-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.evidence-chip {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}
.evidence-chips.compact {
  gap: 5px;
  margin-bottom: 6px;
}
.evidence-chips.compact .evidence-chip {
  font-size: 11px;
  padding: 3px 6px;
}
.evidence-chip.ok {
  background: #e7f6ee;
  border-color: #bbf7d0;
  color: var(--green);
}
.evidence-chip.warn {
  background: #fff4db;
  border-color: #fde68a;
  color: var(--amber);
}
.sourcing-detail-panel details {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}
.sourcing-detail-panel summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}
.evidence-checklist-panel {
  margin-bottom: 16px;
}
.evidence-checklist {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.evidence-check-item {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
}
.evidence-check-item.ok { border-left-color: var(--green); }
.evidence-check-item.warn { border-left-color: var(--amber); }
.evidence-check-item.bad { border-left-color: var(--red); }
.evidence-check-item span {
  color: var(--muted);
  font-size: 12px;
}
.evidence-check-item strong {
  color: var(--ink);
}
.evidence-check-item small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-table {
  width: 100%;
  border-collapse: collapse;
}
.compact-table th,
.compact-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 5px;
  vertical-align: top;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .sourcing-detail-grid {
    grid-template-columns: 1fr;
  }
  .sourcing-advisor-grid {
    grid-template-columns: 1fr;
  }
  .sourcing-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sourcing-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sourcing-workflow-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .evidence-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.shop-stats {
  display: flex;
  gap: 14px;
  text-align: right;
}
.shop-stat {
  display: flex;
  flex-direction: column;
}
.shop-stat-val { font-weight: 700; font-size: 13px; }
.shop-stat-lbl { font-size: 10px; color: var(--muted); }
.shop-expand-icon {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s;
  width: 20px;
  text-align: center;
}
.shop-card.expanded .shop-expand-icon { transform: rotate(180deg); }
.shop-card-body { display: none; }
.shop-card.expanded .shop-card-body { display: block; }
.shop-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.shop-products-table th {
  background: #f8fafc;
  border-top: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.shop-products-table td {
  padding: 7px 12px;
  border-top: 1px solid #f0f0f0;
}
.shop-products-table .price-up { color: var(--red); }
.shop-products-table .price-down { color: var(--green); font-weight: 700; }
.shop-products-table .price-flat { color: var(--muted); }
.shop-products-table .stock-ok { color: var(--green); }
.shop-products-table .stock-low { color: var(--amber); }
.shop-card-footer {
  padding: 10px 16px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}
.shop-card-footer a {
  color: var(--blue);
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
}
.shop-card-footer a:hover { text-decoration: underline; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
}
.pagination button {
  padding: 6px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.pagination button:disabled { opacity: 0.4; cursor: default; }
.pagination .page-info { color: var(--muted); }

.empty-cta {
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: #fafbfc;
}
.empty-cta h3 { font-size: 15px; margin: 0 0 8px; color: var(--ink); }
.empty-cta p { color: var(--muted); margin: 0 0 16px; font-size: 13px; }
.empty-cta button { margin: 0 4px; }

/* ── Intel page card grid (shared) ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.card h3 {
  font-size: 13px;
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.stat { font-size: 28px; font-weight: 700; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.card table { min-width: auto; }
.card th, .card td { font-size: 12px; }
.break-text { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.pill.bad { background: #fff1f0; color: #b42318; }

/* ── Scan status panel (telegram queue tab) ── */
.scan-status {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.scan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px 24px;
  margin-top: 10px;
}
.scan-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f5;
}
.scan-stat-l {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
}
.scan-stat-v { font-size: 13px; color: var(--ink); }
.scan-stat-v code {
  font-size: 12px;
  background: #f1f3f5;
  padding: 1px 6px;
  border-radius: 4px;
}
.pill.warn { background: #fff4db; color: #a15c00; }

/* ── Channel tracking detail ── */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.track-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.track-card .scan-stat-l { margin-bottom: 8px; display: block; }

.job {
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.job.running { background: #eef2ff; color: #1e40af; }
.job.done { background: #e7f6ee; color: #16794c; }
.job.failed { background: #fff1f0; color: #b42318; }

@media (max-width: 980px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .shop-stats { display: none; }
  .kpi-cards { grid-template-columns: repeat(2, 1fr); }
  .compare-queue-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compare-signal-grid {
    grid-template-columns: 1fr;
  }
  .compare-priority-grid {
    grid-template-columns: 1fr;
  }
  .compare-priority-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sourcing-preset-grid {
    grid-template-columns: 1fr;
  }
  .sourcing-action-grid,
  .sourcing-workflow-strip {
    grid-template-columns: 1fr;
  }
  .evidence-checklist {
    grid-template-columns: 1fr;
  }
  .followup-notice {
    align-items: stretch;
    flex-direction: column;
  }
  .notice-actions {
    justify-content: flex-start;
  }
  .notice-actions a {
    flex: 1 1 150px;
  }
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .compare-filter input[type="search"] {
    min-width: 0;
    width: 100%;
  }
  .tracking-workbench {
    grid-template-columns: 1fr;
  }
  .tracking-target-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .tracking-run-actions {
    justify-content: flex-start;
  }
  .tracking-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .domain-suggestion-list {
    grid-column: auto;
  }
  .domain-suggestion-head {
    flex-direction: column;
  }
}

/* ── Intel page full-width layout ── */
.app.full-width {
  display: block;
}
.intel-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
}
.intel-header h1 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}
.intel-header nav {
  display: flex;
  gap: 4px;
}
.intel-header nav a {
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
.intel-header nav a.active {
  background: #dbeafe;
  color: var(--blue);
}
.intel-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* ── Dashboard sections (shared) ── */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dash-section h2 {
  margin-bottom: 8px;
}

/* ── Job status banner ── */
.job {
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.job.running { background: #eef2ff; color: #1e40af; }
.job.done { background: #e7f6ee; color: #16794c; }
.job.failed { background: #fff1f0; color: #b42318; }
.job strong { margin-right: 8px; }

/* ── Plati reference banner (main page) ── */
.plati-ref-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  margin-bottom: 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}
.plati-label {
  font-weight: 600;
  color: #0369a1;
  margin-right: 4px;
}
.plati-items { gap: 8px; display: flex; flex-wrap: wrap; }
.plati-item {
  background: #e0f2fe;
  border-radius: 4px;
  padding: 1px 6px;
  color: #0c4a6e;
  font-size: 12px;
}

/* ── Category card actions ── */
.card-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.card-action-link {
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.card-action-link:hover { text-decoration: underline; }
