* { margin: 0; padding: 0; box-sizing: border-box; }

/* App footer with version + stage */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px;
  background: rgba(0,0,0,0.03);
  border-top: 1px solid var(--border, #e6e6e6);
  font-size: 11px;
  color: var(--muted, #777);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
}
.app-footer b { color: var(--text, #1a1a1a); font-weight: 600; }
.cm-stage-badge {
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cm-stage-badge.alpha-internal { background: #FEF3C7; color: #92400E; }
.cm-stage-badge.closed-beta    { background: #DBEAFE; color: #1E40AF; }
.cm-stage-badge.public-beta    { background: #DCFCE7; color: #166534; }
.cm-stage-badge.production     { background: #ECFDF5; color: #047857; }
.cm-stage-badge.unknown        { background: #F1F5F9; color: #64748B; }
.screen { padding-bottom: 50px; }

:root {
  /* Фирменная палитра CartMind (из мокапа) */
  --navy: #0F1B2D;
  --primary: #0F1B2D;        /* кнопки/активные состояния */
  --accent: #14B8A6;
  --accent-deep: #0F766E;
  --accent-soft: #CCFBF1;
  --accent-bright: #06B6D4;
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;
  --text: #0F172A;
  --muted: #475569;
  --faint: #94A3B8;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --green: #10B981;
  --green-soft: #D1FAE5;
  --red: #EF4444;
  --red-soft: #FEE2E2;
  --orange: #F59E0B;
  --orange-soft: #FEF3C7;
  --blue: #06B6D4;
  --shadow-sm: 0 1px 3px rgba(15,27,45,.06);
  --shadow-md: 0 4px 12px rgba(15,27,45,.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1220;
    --surface: #0F172A;
    --surface-alt: #1E293B;
    --text: #F1F5F9;
    --muted: #CBD5E1;
    --faint: #64748B;
    --border: #1E293B;
    --border-strong: #334155;
  }
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Inter', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 22px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); }
.brand .brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #fff; font-weight: 800; font-size: 13px; letter-spacing: -.5px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(20,184,166,.3);
}
.nav { display: flex; gap: 4px; flex: 1; margin-left: 12px; }
.nav a {
  color: var(--muted); font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; border-bottom: none;
}
.nav a:hover { background: var(--surface-alt); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary); color: #fff; }
.user-block { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; }

.screen { max-width: 1100px; margin: 24px auto; padding: 0 20px; }
.loader { text-align: center; padding: 40px; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.card-img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; background: var(--bg); flex-shrink: 0; display: block; }
.card-body { flex: 1; min-width: 0; }
.card-title { font-weight: 600; font-size: 14px; line-height: 1.4; margin-bottom: 6px; }
.card-title a { color: var(--text); }
.card-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.card-stats { display: flex; gap: 14px; font-size: 13px; margin-top: 4px; }
.card-stats .label { color: var(--muted); font-size: 11px; }
.card-stats .min { color: var(--green); font-weight: 600; }
.card-stats .avg { color: var(--blue); font-weight: 600; }
.card-stats .now { color: var(--red); font-weight: 600; }

.btn { padding: 7px 14px; border: none; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; background: var(--primary); color: #fff; }
.btn:hover:not(:disabled) { opacity: .85; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sec { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn.sec:hover:not(:disabled) { background: var(--bg); }
.btn.danger { background: var(--red); }
.btn.success { background: var(--green); }
.btn.warn { background: var(--orange); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.badge.green      { background: #e8f5e9; color: var(--green); }
.badge.red        { background: #ffebee; color: var(--red); }
.badge.gray       { background: var(--bg); color: var(--muted); }
.badge.blue-badge { background: rgba(6,182,212,.12); color: var(--accent-deep); }

/* Comparisons */
.cmp-group-card  { margin-bottom: 10px; }
.cmp-member-card { margin-bottom: 10px; }
.cmp-group-link  {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 6px; text-decoration: none; color: var(--text);
  background: var(--surface); font-size: 13px; transition: background .1s;
}
.cmp-group-link:hover { background: var(--bg); }
.cmp-group-name  { font-weight: 600; flex: 1; }
.cmp-create-btn  { display: block; width: 100%; margin-top: 10px; }
.back-link       { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 14px; text-decoration: none; }
.back-link:hover { color: var(--text); }

.h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.muted { color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 40px; color: var(--muted); }

.input, .select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--text); width: 100%; max-width: 320px; }
.input + .input, .input + .select { margin-top: 8px; }

.form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--green);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.toast.err { background: var(--red); }

.login-card {
  max-width: 400px;
  margin: 80px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}
.login-card h1 { font-size: 22px; margin-bottom: 18px; }
.tab-switch { display: flex; gap: 0; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tab-switch a { padding: 8px 16px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 14px; }
.tab-switch a.active { color: var(--primary); border-bottom-color: var(--primary); }

.code-display {
  display: inline-block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 6px;
  padding: 12px 20px;
  background: var(--bg);
  border-radius: 10px;
  margin: 12px 0;
  color: var(--primary);
}

.settings-section { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.settings-section:last-child { border-bottom: none; }
.settings-section h3 { font-size: 15px; margin-bottom: 8px; }
.settings-section .help { font-size: 13px; color: var(--muted); margin-bottom: 10px; }

.checkbox { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; cursor: pointer; }

/* ── Sprint 3.4: дашборд, карточка товара, метрики ────────── */
.h3 { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.back-link { display: inline-block; font-size: 13px; margin-bottom: 12px; color: var(--muted); }

/* Плитки сводки */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; text-align: center; color: var(--text);
}
a.tile:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-1px); transition: all .15s; }
.tile-num { font-size: 26px; font-weight: 800; line-height: 1; }
.tile-lab { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Список «строк» (недавно смотрел) */
.row-list { display: flex; flex-direction: column; gap: 8px; }
.row-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; color: var(--text);
}
.row-item:hover { text-decoration: none; border-color: var(--primary); }
.row-img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--bg); flex-shrink: 0; }
.row-body { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.row-arrow { color: var(--muted); font-size: 18px; }

/* Карточка вклада */
.contrib-card .contrib-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.contrib-role { font-size: 17px; font-weight: 800; color: var(--primary); }
.contrib-role.flagged { color: var(--orange); }
.trust-gauge { width: 120px; flex-shrink: 0; }
.trust-num { font-size: 22px; font-weight: 800; text-align: center; }
.trust-num span { font-size: 13px; font-weight: 600; color: var(--muted); }
.trust-bar { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: 4px 0; border: 1px solid var(--border); }
.trust-fill { height: 100%; background: linear-gradient(90deg, #14B8A6, var(--primary)); }
.contrib-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.metric { background: var(--bg); border-radius: 10px; padding: 12px 8px; text-align: center; }
.metric-num { font-size: 20px; font-weight: 800; }
.metric-lab { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Карточка товара */
.product-head-row { display: flex; gap: 16px; align-items: flex-start; }
.product-img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; background: var(--bg); flex-shrink: 0; }
.product-title { font-size: 17px; font-weight: 700; line-height: 1.35; }

.verdict {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 16px; padding: 14px 16px; border-radius: 10px; font-weight: 700;
}
.verdict-icon { font-size: 18px; }
.verdict-label { font-size: 16px; }
.verdict-reason { flex-basis: 100%; font-size: 13px; font-weight: 400; color: var(--muted); }
.verdict-good    { background: rgba(46,125,50,.12);  color: var(--green); }
.verdict-caution { background: rgba(239,108,0,.12);  color: var(--orange); }
.verdict-avoid   { background: rgba(198,40,40,.12);  color: var(--red); }
.verdict-unknown { background: var(--bg); color: var(--muted); }

/* Цена + бейджи вердикта цены */
.price-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.price-now { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.price-stats { display: flex; flex-direction: column; gap: 2px; font-size: 13px; text-align: right; }
.badge-good    { background: rgba(46,125,50,.14);  color: var(--green); }
.badge-fair    { background: rgba(21,101,192,.14); color: var(--blue); }
.badge-avoid   { background: rgba(198,40,40,.14);  color: var(--red); }
.badge-unknown { background: var(--bg); color: var(--muted); }

/* SVG-график цены */
.price-chart { width: 100%; height: auto; display: block; margin-top: 6px; }
.pc-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; }
.pc-ylab { fill: var(--muted); font-size: 10px; text-anchor: end; }
.pc-xlab { fill: var(--muted); font-size: 10px; }
.pc-area { fill: rgba(20,184,166,.12); stroke: none; }
.pc-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pc-dot  { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }

/* AI-блок */
.ai-list { margin: 8px 0; }
.ai-list ul { margin: 4px 0 0 18px; }
.ai-list li { font-size: 13px; line-height: 1.5; }
.ai-list.pros b { color: var(--green); }
.ai-list.cons b { color: var(--orange); }
.ai-list.risk b { color: var(--red); }

@media (max-width: 720px) {
  .tiles, .contrib-grid { grid-template-columns: repeat(2, 1fr); }
}

/* OAuth-кнопки на экране входа */
.oauth-divider {
  text-align: center; color: var(--muted); font-size: 12px;
  margin: 18px 0 12px; position: relative;
}
.oauth-divider::before, .oauth-divider::after {
  content: ""; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--border);
}
.oauth-divider::before { left: 0; }
.oauth-divider::after { right: 0; }
.btn-oauth {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 14px; margin-top: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.btn-oauth:hover { background: var(--bg); }
.btn-oauth .oico {
  width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.btn-oauth .oico.g { background: #fff; color: #4285F4; border: 1px solid #E2E8F0; }
.btn-oauth .oico.y { background: #FC3F1D; color: #fff; }

/* ============================================================
   Sprint 3.4b: редизайн дашборда под мокап
   ============================================================ */

/* Круговой gauge (как в overlay) */
.gauge-block { display: flex; flex-direction: column; align-items: center; }
.gauge { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: var(--border); stroke-width: 8; }
.gauge-fill { fill: none; stroke: url(#cm-gauge-grad); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease-out; }
.gauge.tone-warning .gauge-fill { stroke: var(--orange); }
.gauge.tone-danger .gauge-fill { stroke: var(--red); }
.gauge-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-value { font-size: 20px; font-weight: 800; line-height: 1; }
.gauge-sub { font-size: 9px; color: var(--faint); margin-top: 1px; }
.gauge-cap { font-size: 11px; color: var(--muted); text-align: center; margin-top: 6px; }

/* Greeting */
.greeting { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.greeting h1 { font-size: 24px; font-weight: 700; letter-spacing: -.5px; margin-bottom: 4px; }
.greeting p { color: var(--muted); font-size: 14px; }

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.kpi-card::before { content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px; border-radius: 50%; opacity: .08; transform: translate(20px,-20px); }
.kpi-card.k-tracked::before { background: #6366F1; }
.kpi-card.k-contrib::before { background: var(--orange); }
.kpi-card.k-analyses::before { background: var(--green); }
.kpi-card.k-trust::before { background: var(--accent); }
.kpi-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kpi-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.kpi-card.k-tracked .kpi-icon { background: #E0E7FF; color: #4338CA; }
.kpi-card.k-contrib .kpi-icon { background: var(--orange-soft); color: #B45309; }
.kpi-card.k-analyses .kpi-icon { background: var(--green-soft); color: #047857; }
.kpi-card.k-trust .kpi-icon { background: var(--accent-soft); color: var(--accent-deep); }
.kpi-trend { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--surface-alt); color: var(--muted); }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.kpi-value .small { font-size: 16px; color: var(--faint); font-weight: 600; }
.kpi-subtext { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* Two-column dashboard */
.dash-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; margin-bottom: 22px; }
.right-col { display: flex; flex-direction: column; gap: 16px; }

/* Section card */
.section-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.section-head { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.section-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-count { background: var(--surface-alt); border-radius: 6px; padding: 1px 8px; font-size: 12px; color: var(--muted); font-weight: 500; }

/* Product groups */
.cat-group { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cat-group:last-child { border-bottom: none; }
.cat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.mp-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.mp-dot.ozon { background: #005BFF; }
.mp-dot.wb { background: #CB11AB; }
.mp-dot.amazon { background: #FF9900; }
.prod-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.prod-card { display: flex; gap: 10px; padding: 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; transition: all .15s; color: var(--text); }
.prod-card:hover { background: var(--surface); border-color: var(--border-strong); box-shadow: var(--shadow-sm); text-decoration: none; }
.prod-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: linear-gradient(135deg,#F1F5F9,#E2E8F0); flex-shrink: 0; }
.prod-body { flex: 1; min-width: 0; }
.prod-name { font-size: 13px; font-weight: 500; line-height: 1.35; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.prod-meta .price { font-weight: 700; color: var(--text); }
.status-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.status-ready { background: var(--green-soft); color: #047857; }
.status-collecting { background: #DBEAFE; color: #1D4ED8; }

/* ── Toolbar watchlist + выбор глубины ── */
.wl-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.wl-depth-ctrl { display: flex; align-items: center; gap: 6px; }
.wl-depth-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.wl-depth-btn {
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--surface); color: var(--muted);
  font-size: 12px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.wl-depth-btn:hover { background: var(--bg); color: var(--text); }
.wl-depth-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Хлебные крошки в заголовке группы */
.wl-cat-title-block { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wl-cat-breadcrumb { font-size: 10px; color: var(--faint); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Категория на карточке товара */
.product-cat-path { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 12px; color: var(--muted); }
.product-cat-path span:last-of-type { color: var(--accent-deep); font-weight: 500; }
.cat-sep { color: var(--faint); }

/* ── Отслеживаемые: группы по категории ── */
.wl-cat-group { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }

.wl-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; cursor: pointer;
  background: var(--surface); user-select: none;
  transition: background .15s;
}
.wl-cat-head:hover { background: var(--surface-alt); }
.wl-cat-head.is-collapsed { border-bottom: none; }
.wl-cat-head:not(.is-collapsed) { border-bottom: 1px solid var(--border); }

.wl-cat-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }

.wl-cat-arrow {
  font-size: 14px; color: var(--muted); flex-shrink: 0;
  transition: transform .2s ease;
  display: inline-block;
}
.wl-cat-head.is-collapsed .wl-cat-arrow { transform: rotate(-90deg); }

.wl-cat-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.wl-cat-count { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-size: 12px; color: var(--muted); font-weight: 600; flex-shrink: 0; }

.wl-mp-chip { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; flex-shrink: 0; }
.wl-mp-wb     { background: #F3E5FF; color: #7B1FA2; }
.wl-mp-ozon   { background: #E3EEFF; color: #1565C0; }
.wl-mp-amazon { background: #FFF3E0; color: #E65100; }

.wl-cat-stats { display: flex; gap: 14px; flex-shrink: 0; }
.wl-stat { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; }
.wl-stat b { font-size: 13px; font-weight: 700; color: var(--text); }
.wl-stat-lab { font-size: 10px; color: var(--faint); font-weight: 500; }

/* Тело группы — анимированный collapse через grid */
.wl-cat-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .25s ease;
}
.wl-cat-body.is-collapsed { grid-template-rows: 0fr; }
.wl-cat-inner { overflow: hidden; padding: 8px 0; }
.wl-cat-inner .card { margin: 0 12px 8px; border-radius: 10px; }
.wl-cat-inner .card:last-child { margin-bottom: 4px; }

@media (max-width: 600px) {
  .wl-cat-stats { display: none; }
  .wl-cat-name { max-width: 160px; }
}

/* Кнопки сортировки событий */
.sort-btn {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.sort-btn:hover { background: var(--bg); color: var(--text); }
.sort-btn.sort-btn-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Activity feed */
.activity-list { padding: 6px 0; }
.activity-item { padding: 11px 18px; display: flex; gap: 12px; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; background: var(--surface-alt); }
.activity-icon.view { background: #FCE7F3; color: #BE185D; }
.activity-icon.price { background: var(--green-soft); color: #047857; }
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; line-height: 1.4; }
.activity-text strong { font-weight: 600; }
.activity-time { font-size: 11px; color: var(--faint); margin-top: 2px; }

/* Community contribution card */
.contrib-banner { background: linear-gradient(135deg, var(--navy) 0%, var(--accent-deep) 100%); border-radius: 16px; padding: 24px; color: #fff; margin-bottom: 22px; position: relative; overflow: hidden; }
.contrib-banner::before { content: '🤝'; position: absolute; top: -16px; right: -8px; font-size: 130px; opacity: .10; }
.contrib-banner h2 { font-size: 19px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.contrib-banner p { font-size: 13px; color: rgba(255,255,255,.82); margin-bottom: 18px; max-width: 600px; }
.cb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; position: relative; }
.cb-stat { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 16px; backdrop-filter: blur(8px); }
.cb-num { font-size: 26px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.cb-lab { font-size: 12px; color: rgba(255,255,255,.8); line-height: 1.4; }
.cb-role { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 999px; }

/* Placeholder «скоро» */
.soon-card { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 14px; padding: 18px; }
.soon-badge { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-deep); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; margin-left: 8px; }

@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-list { grid-template-columns: 1fr; }
  .cb-stats { grid-template-columns: 1fr; }
}

/* ===== Карточка товара (по мокапу overlay) ===== */
.cm-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

.gauge.big { width: 104px; height: 104px; }
.gauge.big .gauge-value { font-size: 30px; }
.gauge.big .gauge-sub { font-size: 11px; }

.quality-section { display: flex; align-items: center; gap: 20px; padding-bottom: 18px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.score-meta { flex: 1; }
.score-meta-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.score-verdict { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.score-verdict.tone-good { color: var(--green); }
.score-verdict.tone-warning { color: var(--orange); }
.score-verdict.tone-danger { color: var(--red); }
.score-details { font-size: 12px; color: var(--muted); line-height: 1.5; }

.list-section { margin-bottom: 14px; }
.list-item { display: flex; gap: 10px; padding: 8px 0; font-size: 13px; line-height: 1.5; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.list-icon { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; margin-top: 1px; }
.list-icon.pro { background: var(--green); }
.list-icon.con { background: var(--orange); }
.list-icon.risk { background: var(--red); }
.list-text { flex: 1; color: var(--text); }
.list-metric { font-size: 12px; opacity: 0.7; margin-left: 6px; white-space: nowrap; }

.price-cm { background: linear-gradient(135deg, var(--accent-soft), #E0F2FE) !important; border-color: var(--accent) !important; }
@media (prefers-color-scheme: dark) {
  .price-cm { background: var(--surface-alt) !important; border-color: var(--accent-deep) !important; }
}
