:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-muted: #f0f2f4;
  --text: #16181d;
  --muted: #69717d;
  --line: #dfe3e8;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --success: #16794c;
  --success-soft: #dff7ea;
  --warning: #9a5b13;
  --warning-soft: #fff2d5;
  --danger: #b42318;
  --danger-soft: #ffe4df;
  --shadow: 0 10px 28px rgba(20, 24, 31, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #14181f;
  color: #ffffff;
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-button,
.button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
}

.nav-button {
  width: 100%;
  padding: 0 12px;
  text-align: left;
}

.nav-button:hover,
.nav-button.is-active {
  background: var(--surface-muted);
}

.nav-button.is-active {
  color: #0f172a;
  font-weight: 650;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.topbar h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.api-form {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.api-key {
  display: grid;
  gap: 5px;
  min-width: 220px;
}

.api-key span {
  color: var(--muted);
  font-size: 12px;
}

.api-key input {
  height: 38px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.api-key input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.button {
  padding: 0 12px;
  white-space: nowrap;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
}

.button.ghost {
  border-color: var(--line);
  background: var(--surface);
}

.button:hover {
  filter: brightness(0.98);
}

.connection-status,
.tag,
.pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.connection-status {
  background: var(--surface-muted);
  color: var(--muted);
}

.connection-status.ok {
  background: var(--success-soft);
  color: var(--success);
}

.connection-status.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.content-section {
  display: none;
}

.content-section.is-active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 118px;
  padding: 16px;
  display: grid;
  align-content: space-between;
}

.metric-label,
.metric-meta,
.muted {
  color: var(--muted);
}

.metric-label {
  margin: 0;
  font-size: 13px;
}

.metric-value {
  margin: 12px 0 4px;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.metric-meta {
  margin: 0;
  font-size: 12px;
}

.split-grid,
.workspace-grid {
  display: grid;
  gap: 12px;
}

.split-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
}

.workspace-grid {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: start;
}

.panel-caption {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-panel {
  max-width: 760px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-heading {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-heading h3 {
  margin: 0;
  font-size: 16px;
}

.tag {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-list,
.rating-preview,
.employee-list,
.analysis-list {
  display: grid;
  gap: 8px;
}

.status-row,
.rating-row,
.employee-button,
.analysis-row {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.status-row,
.rating-row,
.analysis-row {
  padding: 12px;
}

.status-row,
.rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-name,
.person-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.status-count,
.score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.employee-button {
  width: 100%;
  padding: 12px;
  text-align: left;
}

.employee-button:hover,
.employee-button.is-active {
  border-color: #b7c2d0;
  background: #f9fafb;
}

.employee-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.employee-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.employee-title h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

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

.detail-item {
  min-height: 78px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.detail-label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

.detail-value {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.summary-text {
  margin: 12px 0 0;
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  height: 46px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.pill {
  border: 1px solid transparent;
}

.pill.ok {
  background: var(--success-soft);
  color: var(--success);
}

.pill.warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.pill.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.pill.neutral {
  background: var(--surface-muted);
  color: var(--muted);
}

.analysis-row h4 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.analysis-row p {
  margin: 0;
  color: var(--muted);
}

.analysis-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.analysis-date,
.technical-id {
  color: var(--muted);
  font-size: 12px;
}

.technical-id {
  opacity: 0.78;
}

.analysis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.score-badge {
  min-width: 126px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  border-radius: 10px;
  padding: 12px 14px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.score-badge strong {
  font-size: 27px;
  line-height: 1;
}

.score-badge span {
  font-size: 13px;
}

.score-badge.ok { background: var(--success); }
.score-badge.warn { background: var(--warning); }
.score-badge.danger { background: var(--danger); }
.score-badge.neutral { background: var(--muted); }

.audit-note {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
  color: var(--warning);
  padding: 8px 10px;
  font-size: 12px;
}

.audit-note span {
  flex-basis: 100%;
}

.analysis-detail {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.executive-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.summary-card {
  min-height: 106px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: var(--surface);
}

.summary-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-card p {
  margin-top: 7px;
  color: var(--text);
}

.score-summary {
  grid-row: span 2;
  display: grid;
  align-content: center;
  background: #151a22;
  color: #ffffff;
}

.score-summary > span { color: #bfc6d1; }
.score-summary strong { margin-top: 8px; font-size: 28px; }
.summary-positive { border-top-color: var(--success); }
.summary-warning { border-top-color: var(--warning); }
.summary-danger { border-top-color: var(--danger); }

.comparison-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 12px;
  align-items: start;
}

.expanded-report {
  margin-top: 12px;
}

.expanded-report summary,
.na-checklist summary {
  cursor: pointer;
  font-weight: 700;
}

.expanded-report-content {
  margin-top: 10px;
}

.analysis-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.checklist-view,
.analysis-editor {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.checklist-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checklist-table {
  min-width: 680px;
  font-size: 13px;
}

.checklist-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}

.checklist-table th:not(:first-child),
.checklist-table td:not(:first-child) {
  text-align: center;
}

.checklist-row.status-missed {
  background: #fff9f8;
}

.checklist-row.is-manually-edited {
  box-shadow: inset 4px 0 0 var(--warning);
}

.criterion-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.manual-label {
  display: inline-block;
  margin-top: 5px;
  border-radius: 5px;
  background: var(--warning-soft);
  color: var(--warning);
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
}

.points {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.points.loss {
  color: var(--danger);
  font-weight: 700;
}

.na-checklist {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.na-checklist ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.checklist-view summary,
.analysis-editor summary {
  cursor: pointer;
  font-weight: 700;
}

.checklist-list,
.criterion-editor-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.checklist-item {
  border-left: 3px solid var(--line);
  padding: 8px 10px;
  background: var(--surface-muted);
}

.checklist-item.status-passed {
  border-left-color: var(--success);
}

.checklist-item.status-missed {
  border-left-color: var(--danger);
}

.checklist-item.status-uncertain {
  border-left-color: var(--warning);
}

.checklist-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.checklist-item p {
  margin: 6px 0;
}

.evidence-links {
  display: flex;
  gap: 6px;
}

.evidence-links a {
  color: var(--accent);
  font-weight: 700;
}

.analysis-editor form {
  margin-top: 14px;
}

.editor-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editor-field {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}

.editor-field input,
.editor-field select,
.editor-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}

.criterion-edit {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(260px, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  padding: 10px;
  margin: 0;
}

.criterion-edit legend {
  padding: 0 5px;
  font-size: 13px;
  font-weight: 700;
}

.editor-wide {
  grid-column: 2;
}

.analysis-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.report-block h5 {
  margin: 0 0 8px;
  font-size: 14px;
}

.report-section,
.quote-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.report-section {
  margin-bottom: 8px;
  padding: 10px;
}

.report-section p {
  margin-top: 5px;
}

.report-title {
  font-weight: 700;
}

.severity-positive {
  border-color: #b7ebca;
}

.severity-warning {
  border-color: #f2d391;
}

.severity-danger {
  border-color: #f3b6ae;
}

.quote-inline {
  color: #174ea6;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.35);
  text-underline-offset: 3px;
}

.quote-inline:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.transcript-list {
  max-height: 520px;
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.quote-row {
  padding: 10px;
  scroll-margin-top: 12px;
}

.quote-row:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.quote-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.quote-role {
  font-size: 12px;
  font-weight: 700;
}

.quote-time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.quote-text {
  overflow-wrap: anywhere;
}

.role-employee .quote-role {
  color: var(--success);
}

.role-client .quote-role {
  color: var(--accent);
}

.role-unknown .quote-role {
  color: var(--muted);
}

.empty-inline {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px dashed #c5ccd6;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 10px;
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed #c5ccd6;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .split-grid,
  .analytics-layout,
  .comparison-grid,
  .analysis-detail-grid,
  .editor-summary-grid,
  .criterion-edit,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .editor-wide {
    grid-column: 1;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    gap: 16px;
  }

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

  .nav-button {
    text-align: center;
    padding: 0 8px;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .api-form {
    justify-content: flex-start;
  }

  .api-key {
    min-width: 100%;
  }
}

@media (max-width: 560px) {
  .metric-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .executive-summary {
    grid-template-columns: 1fr;
  }

  .score-summary {
    grid-row: auto;
  }

  .analysis-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .score-badge {
    align-self: flex-start;
  }

  .button {
    flex: 1 1 120px;
  }

  .connection-status {
    width: 100%;
    justify-content: center;
  }
}

/* Competitor snapshot analytics */
.competitor-intro { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:20px; }
.competitor-intro h3 { font-size:28px; margin:6px 0; }
.competitor-intro p { color:var(--muted); }
.competitor-notice { padding:14px 18px; background:#edf3fd; border:1px solid #d4e2f9; border-radius:12px; color:#354d71; margin-bottom:18px; line-height:1.6; }
.competitor-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:20px; }
.competitor-filters label, .competitor-table-actions label { display:flex; flex-direction:column; gap:6px; color:var(--muted); font-size:13px; min-width:0; }
.competitor-filters input, .competitor-filters select, .competitor-table-actions select { width:100%; min-width:0; padding:10px 12px; background:white; border:1px solid var(--line); border-radius:8px; color:var(--text); font:inherit; }
.competitor-filters .competitor-search { grid-column:1 / -1; }
.competitor-filters button { align-self:end; }
.competitor-body { display:grid; gap:20px; min-width:0; }
.competitor-body > *, .competitor-chart-grid > * { min-width:0; }
.competitor-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.competitor-metric { display:flex; flex-direction:column; gap:9px; padding:22px; background:white; border:1px solid var(--line); border-radius:14px; }
.competitor-metric > span { color:var(--muted); font-size:14px; }
.competitor-metric strong { font-size:30px; letter-spacing:-1px; }
.competitor-metric small { color:var(--muted); line-height:1.5; }
.competitor-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.competitor-chart h3, .competitor-body .panel > h3 { margin-top:0; }
.competitor-chart > p { font-size:13px; min-height:36px; line-height:1.5; }
.competitor-bars { display:grid; gap:15px; padding:12px 0; }
.competitor-bar-row { display:grid; grid-template-columns:minmax(80px, 1.1fr) minmax(50px, 1.4fr) minmax(45px,auto); gap:10px; align-items:center; font-size:13px; }
.competitor-bar-row > span { overflow-wrap:anywhere; }
.competitor-bar-row strong { text-align:right; font-size:13px; white-space:nowrap; }
.competitor-track { height:15px; background:#eef1f6; border-radius:4px; overflow:hidden; }
.competitor-track > div { height:100%; border-radius:4px; }
.competitor-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:8px; }
.competitor-low { background:#eef8f2; color:#16794c; font-weight:600; }
.competitor-table-actions { display:flex; gap:12px; align-items:end; flex-wrap:wrap; }
.competitor-products { min-width:850px; }
.competitor-products td { vertical-align:top; }
.competitor-products small, .competitor-products del { display:block; color:var(--muted); margin-top:6px; }
.competitor-products summary { cursor:pointer; max-width:370px; line-height:1.5; }
.competitor-products summary strong { font-weight:600; }
.competitor-product-detail { max-width:430px; line-height:1.6; font-size:13px; overflow-wrap:anywhere; }
.competitor-product-detail img { width:100px; height:110px; object-fit:contain; float:right; margin:10px; }
.competitor-product-detail dl { clear:both; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.competitor-product-detail dt { color:var(--muted); }
.competitor-product-detail dd { margin:0; }
.competitor-discount { display:inline-block; padding:3px 7px; border-radius:5px; background:#e8f4ee; color:#16794c; white-space:nowrap; }
.competitor-pagination { display:flex; justify-content:flex-end; align-items:center; gap:12px; margin-top:16px; }
.competitor-pagination span { margin-right:auto; color:var(--muted); }
.competitor-status:not(:empty) { padding:20px 0; }
#competitorsSection .muted { line-height:1.6; font-size:13px; }
#competitorsSection button:disabled { opacity:.45; cursor:default; }
@media (max-width:1100px) { .competitor-filters { grid-template-columns:repeat(3,minmax(0,1fr)); } .competitor-chart-grid { grid-template-columns:1fr; } }
@media (max-width:650px) { .competitor-filters, .competitor-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .competitor-metric { padding:14px; } .competitor-metric strong { font-size:23px; } .competitor-intro { align-items:flex-start; flex-direction:column; } .competitor-bar-row { font-size:12px; } }
.competitor-matrix { max-height:480px; overflow:auto; }
#competitorTable > .table-wrap { max-height:680px; overflow:auto; }
.competitor-matrix th, #competitorTable th { position:sticky; top:0; z-index:1; background:var(--surface-muted); }
.competitor-own-badge { display:inline-block; padding:3px 7px; border-radius:5px; background:#dbeafe; color:#1d4ed8; font-size:12px; white-space:nowrap; }
.competitor-own-row { background:#eff6ff; }
.competitor-matrix th.competitor-own-heading { background:#dbeafe; color:#1d4ed8; }
.competitor-chart-toolbar { display:flex; justify-content:space-between; gap:20px; align-items:center; }
.competitor-chart-toolbar select { padding:10px; margin-top:8px; width:100%; border:1px solid var(--line); border-radius:8px; background:white; }
.competitor-chart-toolbar label { min-width:230px; }
.competitor-legend { display:flex; gap:12px; flex-wrap:wrap; font-size:12px; margin:12px 0; }
.competitor-legend i { display:inline-block; width:9px; height:9px; border-radius:3px; margin-right:5px; }
.competitor-grouped { max-height:540px; overflow:auto; padding-right:8px; }
.competitor-group { border-top:1px solid var(--line); padding:14px 0; }
.competitor-group > strong { display:block; font-size:14px; margin-bottom:10px; }
.competitor-series { display:grid; grid-template-columns:minmax(95px,1fr) minmax(60px,1.2fr) 48px; gap:8px; margin:7px 0; align-items:center; font-size:11px; }
.competitor-series b { text-align:right; }
.competitor-series .competitor-track { height:10px; }
.competitor-promo-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.competitor-promo-store { border:1px solid var(--line); padding:16px; border-radius:12px; min-width:0; overflow-wrap:anywhere; }
.competitor-promo-list { padding-left:18px; font-size:13px; }
.competitor-promo-list li { margin-bottom:14px; }
.competitor-promo-list small { display:block; color:var(--muted); margin:5px 0; }
@media(max-width:650px) { .competitor-chart-toolbar { display:block; } .competitor-promo-grid { grid-template-columns:1fr; } }

.marketplace-coverage { display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:20px 0; }
.marketplace-coverage > div { display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid #dce3ed;border-radius:12px; }
.marketplace-coverage progress { width:100%;height:14px;accent-color:#2563eb; }
.marketplace-filters { display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:16px 0; }
.marketplace-filters label { display:flex;flex-direction:column;gap:6px; }
#marketplacesPanel { margin-top:24px; }
#marketplacesPanel .table-wrapper { overflow:auto; }
#marketplacesPanel table { width:100%;min-width:900px; }
#marketplacesPanel td { vertical-align:top;padding:12px; }
#marketplacesPanel pre { max-width:380px;max-height:300px;overflow:auto;white-space:pre-wrap; }
.marketplace-filters select, .marketplace-filters input { min-height:40px;padding:8px 12px;border:1px solid #dce3ed;border-radius:8px;background:#fff;color:#172435;font:inherit;max-width:100%; }
.marketplace-filters button { min-height:40px;padding:8px 14px;border:1px solid #dce3ed;border-radius:8px;background:#f5f7fa;color:#172435;font:inherit;cursor:pointer; }
.marketplace-filters button:disabled { opacity:.45;cursor:default; }
#marketplacesPanel td a { color:#2563eb;text-decoration:none; }
#marketplacesPanel td a:hover { text-decoration:underline; }
