/* ==========================================================================
   PRICER — page-level styles
   ========================================================================== */

/* ---------------- Dashboard: groups table ---------------- */

.groups-tbl td { height: 46px; }
.groups-tbl .g-name { max-width: 230px; }
.groups-tbl .g-best { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.groups-tbl .g-range { width: 84px; }
.groups-tbl .g-range .range-legend { font-size: 9px; margin-top: 2px; letter-spacing: -.02em; }
.g-change {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: nowrap;
  min-width: 96px;
}
.g-change svg { flex: 0 0 auto; }

.alerts-feed { display: flex; flex-direction: column; }
.alert-row {
  display: grid;
  grid-template-columns: 2px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .1s;
}
.alert-row:hover { background: var(--surface-2); }
.alert-row:last-child { border-bottom: 0; }
.alert-row__bar { align-self: stretch; border-radius: 0 2px 2px 0; background: var(--green); opacity: .85; }
.alert-row--rise .alert-row__bar { background: var(--red); }
.alert-row--info .alert-row__bar { background: var(--primary); }
.alert-row__main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.alert-row__title { font-size: var(--fs); font-weight: 600; }
.alert-row__meta { font-size: var(--fs-micro); color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.alert-row__prices { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.alert-row__from { font-size: var(--fs-sm); color: var(--text-3); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.alert-row__to { font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums; }
.alert-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.alert-row__time { font-size: var(--fs-micro); color: var(--text-3); white-space: nowrap; }
.alert-row__chans { display: flex; gap: 3px; }
.alert-row.is-read { opacity: .62; }
.alert-row.is-read .alert-row__bar { background: var(--line-2); }

.chan {
  display: inline-grid;
  place-items: center;
  height: 13px;
  min-width: 15px;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .02em;
  background: var(--surface-3);
  color: var(--text-3);
}
.chan--tg { background: #e3f2fb; color: #1787c9; }
.chan--mail { background: var(--amber-soft); color: var(--amber-ink); }
[data-theme="dark"] .chan--tg { background: #10283a; color: #66c5f5; }

.opp-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.opp-row:hover { background: var(--surface-2); }
.opp-row:last-child { border-bottom: 0; }
.opp-row__main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.opp-row__title { font-size: var(--fs); font-weight: 600; }
.opp-row__meta { font-size: var(--fs-micro); color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.opp-row__delta { font-size: var(--fs-sm); font-weight: 800; color: var(--green-ink); font-variant-numeric: tabular-nums; text-align: right; }
.opp-row__price { font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* ---------------- Groups page ---------------- */

.groups-page-tbl td { height: 48px; }
.groups-page-tbl .col-brands { max-width: 210px; }
.brand-chips { display: flex; gap: 3px; flex-wrap: nowrap; overflow: hidden; }
.g-mini-chart { width: 64px; height: 20px; }

/* ---------------- Group detail ---------------- */

.group-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.group-head__stats {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
}
.stat-pill {
  display: flex;
  flex-direction: column;
  padding: 3px 9px 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  min-width: 92px;
}
.stat-pill__label { font-size: var(--fs-micro); color: var(--text-3); white-space: nowrap; }
.stat-pill__value { font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-pill--accent { border-color: color-mix(in srgb, var(--green) 30%, var(--line)); background: color-mix(in srgb, var(--green-soft) 45%, var(--surface)); }

.chart-panel { flex: 0 0 auto; }
.chart-panel .panel__head { min-height: 34px; padding: 6px 12px; }
.chart-wrap { padding: 6px 12px 8px; }
.chart-svg { width: 100%; height: 92px; display: block; overflow: visible; }
.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-micro);
  color: var(--text-3);
  padding-top: 2px;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 4px; }
.chart-legend i { width: 8px; height: 2px; border-radius: 2px; background: currentColor; }

.bf-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 5px;
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--fs);
}
.bf-row:hover { background: var(--surface-2); }
.bf-row input { appearance: none; width: 14px; height: 14px; margin: 0; border: 1.5px solid var(--line-2); border-radius: 4px; background: var(--surface); position: relative; flex: 0 0 auto; cursor: pointer; }
.bf-row input:checked { background: var(--primary); border-color: var(--primary); }
.bf-row input:checked::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: .5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(42deg);
}
.bf-row__name { flex: 1 1 auto; }
.bf-row__count { font-size: var(--fs-micro); color: var(--text-3); font-variant-numeric: tabular-nums; }
.bf-foot { display: flex; align-items: center; gap: 6px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line); }

/* cards table */
.cards-tbl .c-prod { min-width: 210px; }
.cards-tbl .c-prod .cell-title { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cards-tbl td { height: 48px; }
.cards-tbl .c-price { text-align: right; }
.cards-tbl .c-price .cell-right { gap: 0; }
.cards-tbl .c-delta { width: 78px; text-align: right; }
.cards-tbl .c-rating { width: 104px; }
.cards-tbl .c-platform { width: 132px; }
.cards-tbl .c-added { width: 84px; color: var(--text-3); font-size: var(--fs-sm); white-space: nowrap; }
.rating { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.rating svg { color: #f2b13d; flex: 0 0 auto; }
.rating span { color: var(--text-3); font-weight: 500; }

.match-bar { display: flex; align-items: center; gap: 6px; }
.match-bar__track { width: 42px; height: 4px; border-radius: 3px; background: var(--surface-4); overflow: hidden; }
.match-bar__fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--violet)); }
.match-bar__val { font-size: var(--fs-micro); font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }

.excl-row td { height: 46px; }
.excl-reason { color: var(--text-2); }

/* ---------------- Product page ---------------- */

.search-hero { flex: 0 0 auto; }
.search-hero__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}
.search-hero__form { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.search-hero__input { height: 36px; font-size: var(--fs-md); }
.search-hero__hints { display: flex; align-items: center; gap: 6px; padding: 0 12px 10px; font-size: var(--fs-sm); color: var(--text-3); flex-wrap: wrap; }
.search-hero__hints button { border: 0; background: none; color: var(--primary-ink); font-size: var(--fs-sm); font-weight: 600; padding: 1px 4px; border-radius: 4px; }
.search-hero__hints button:hover { background: var(--primary-soft); }

.prod-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.prod-card { display: flex; flex-direction: column; }
.prod-media {
  position: relative;
  height: 148px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.prod-media .thumb--xl { position: absolute; inset: 0; }
.prod-media__flags { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; z-index: 1; }
.prod-media__pf { position: absolute; right: 8px; top: 8px; z-index: 1; }
.prod-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.prod-title { font-size: 15px; font-weight: 700; line-height: 1.28; letter-spacing: -.01em; }
.prod-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-sm); color: var(--text-3); }
.prod-meta span { display: inline-flex; align-items: center; gap: 4px; }
.prod-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prod-price .price--lg { font-size: 26px; }
.prod-actions { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.prod-specs { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: var(--fs-sm); padding-top: 8px; border-top: 1px solid var(--line); }
.prod-specs dt { color: var(--text-3); white-space: nowrap; }
.prod-specs dd { margin: 0; color: var(--text-2); font-weight: 500; }

.type-panel { display: flex; flex-direction: column; gap: 10px; }
.type-hero { display: flex; align-items: flex-start; gap: 10px; }
.type-hero__icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-ink);
  flex: 0 0 auto;
}
.type-name { font-size: 15px; font-weight: 700; line-height: 1.25; }
.type-sub { font-size: var(--fs-sm); color: var(--text-3); }
.conf { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.conf__bar { width: 64px; height: 5px; border-radius: 3px; background: var(--surface-4); overflow: hidden; flex: 0 0 auto; }
.conf__fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--green), #34d399); }
.conf__val { font-size: var(--fs-sm); font-weight: 700; color: var(--green-ink); font-variant-numeric: tabular-nums; }
.type-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.type-attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.type-attr { display: flex; flex-direction: column; gap: 0; line-height: 1.25; }
.type-attr__k { font-size: var(--fs-micro); color: var(--text-3); }
.type-attr__v { font-size: var(--fs); font-weight: 600; }

.analog-tbl td { height: 46px; }
.analog-tbl .a-title { max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analog-panel__foot { justify-content: space-between; }

/* ---------------- Alerts page ---------------- */

.alerts-tbl td { height: 46px; }
.alerts-tbl .al-prod { min-width: 220px; }
.alerts-tbl .al-prod .cell-title { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alerts-tbl tr.is-read { opacity: .66; }
.alert-kind { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.alert-kind--drop { color: var(--green-ink); }
.alert-kind--rise { color: var(--red-ink); }
.unread-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); display: inline-block; flex: 0 0 auto; }

/* ---------------- Profile ---------------- */

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.pcard { display: flex; flex-direction: column; }
.pcard__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.pcard__title { font-size: var(--fs-md); font-weight: 700; }
.pcard__sub { font-size: var(--fs-micro); color: var(--text-3); }
.pcard__body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pcard__body--flush { padding: 0; }

.profile-hero { display: flex; align-items: center; gap: 12px; }
.profile-hero__meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-hero__name { font-size: 15px; font-weight: 700; }
.profile-hero__login { font-size: var(--fs-sm); color: var(--text-3); }

.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs); padding: 3px 0; }
.kv__k { color: var(--text-3); }
.kv__v { font-weight: 600; text-align: right; }

.session {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.session:last-child { border-bottom: 0; }
.session__icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2);
  flex: 0 0 auto;
}
.session__main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.3; }
.session__name { font-size: var(--fs); font-weight: 600; }
.session__meta { font-size: var(--fs-micro); color: var(--text-3); }

.msgr-row {
  display: grid;
  grid-template-columns: 32px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.msgr-row:last-child { border-bottom: 0; }
.msgr-row.is-off { opacity: .55; }
.msgr-ico {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 800; letter-spacing: .02em;
  color: #fff;
  flex: 0 0 auto;
}
.msgr-ico--tg { background: linear-gradient(140deg, #37aee2, #1e96c8); }
.msgr-ico--wa { background: linear-gradient(140deg, #40c351, #1faa3c); }
.msgr-ico--vk { background: linear-gradient(140deg, #4c75a3, #33557c); }
.msgr-ico--ds { background: linear-gradient(140deg, #5865f2, #3f49c9); }
.msgr-row__label { font-size: var(--fs); font-weight: 600; display: flex; flex-direction: column; line-height: 1.25; }
.msgr-row__label small { font-size: var(--fs-micro); font-weight: 500; color: var(--text-3); }
.msgr-row .input { height: 28px; }
.msgr-status { font-size: var(--fs-micro); display: inline-flex; align-items: center; gap: 4px; color: var(--green-ink); }

.rule-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.rule-row:last-child { border-bottom: 0; }
.rule-row__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rule-row__title { font-size: var(--fs); font-weight: 600; }
.rule-row__hint { font-size: var(--fs-micro); color: var(--text-3); }
.channel-checks { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------------- Login ---------------- */

.login-body { min-height: 100vh; background: var(--bg); }
.login {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: 100vh;
}
.login-hero {
  position: relative;
  overflow: hidden;
  padding: 40px 46px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  color: #fff;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(255, 255, 255, .22), transparent 60%),
    radial-gradient(900px 480px at 100% 105%, rgba(203, 17, 171, .55), transparent 62%),
    linear-gradient(150deg, #0033a8 0%, #005bff 42%, #5b2be0 78%, #8d0b78 100%);
}
.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(70% 60% at 40% 30%, #000 20%, transparent 100%);
  pointer-events: none;
}
.login-hero > * { position: relative; z-index: 1; }
.login-hero__brand { display: flex; align-items: center; gap: 10px; }
.login-hero__brand .brand__mark { background: rgba(255, 255, 255, .16); box-shadow: none; border: 1px solid rgba(255, 255, 255, .28); }
.login-hero__brand .brand__name { color: #fff; font-size: 15px; }
.login-hero__brand .brand__beta { color: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .3); }
.login-hero__title { font-size: 29px; line-height: 1.14; font-weight: 800; letter-spacing: -.025em; max-width: 470px; }
.login-hero__title em { font-style: normal; color: #ffd166; }
.login-hero__text { font-size: var(--fs-md); color: rgba(255, 255, 255, .78); max-width: 420px; line-height: 1.5; }
.login-feats { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.login-feat { display: flex; align-items: flex-start; gap: 9px; font-size: var(--fs); color: rgba(255, 255, 255, .92); }
.login-feat__ico {
  width: 24px; height: 24px; border-radius: 7px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .18);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.login-feat b { font-weight: 700; }
.login-feat small { display: block; color: rgba(255, 255, 255, .64); font-size: var(--fs-sm); }

.login-side {
  display: grid;
  place-items: center;
  padding: 30px;
}
.login-card {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-card__head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 2px; }
.login-card__title { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.login-card__sub { font-size: var(--fs); color: var(--text-3); }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form .input { height: 36px; }
.login-form .btn { height: 36px; font-size: var(--fs-md); }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.login-row a { font-size: var(--fs-sm); color: var(--primary-ink); font-weight: 600; }
.login-demo {
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  padding: 8px 10px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.login-demo b { color: var(--text); font-family: var(--font-mono); font-size: var(--fs-sm); }
.login-demo__btn { align-self: flex-start; border: 0; background: none; color: var(--primary-ink); font-size: var(--fs-sm); font-weight: 700; padding: 1px 0; }
.login-demo__btn:hover { text-decoration: underline; }
.login-foot { font-size: var(--fs-micro); color: var(--text-3); text-align: center; margin-top: 4px; line-height: 1.5; }
.field-error { font-size: var(--fs-sm); color: var(--red-ink); }
.input.is-error { border-color: var(--red); }

@media (max-width: 960px) {
  .prod-grid, .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-hero { display: none; }
  .msgr-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .msgr-row__label small { display: none; }
}

/* ---------------- final tweaks ---------------- */

.login-side { position: relative; }
.login-theme { position: absolute; top: 14px; right: 16px; }
.login-form .field-error { margin-top: -2px; }

.prod-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.groups-tbl .g-title {
  display: block;
  max-width: 196px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.groups-page-tbl { min-width: 940px; }
.groups-page-tbl .g-change { min-width: 108px; }
.alerts-tbl { min-width: 920px; }
.cards-tbl { min-width: 760px; }
.analog-tbl { min-width: 620px; }

.seg__btn .badge { margin-left: 1px; height: 15px; min-width: 15px; font-size: 9.5px; }

@media (max-width: 1480px) {
  .groups-tbl .g-range-col { display: none; }
}

@media (max-width: 1200px) {
  .groups-tbl .g-change svg:last-child { display: none; }
}

.search-hero__form .seg { flex: 0 0 auto; }
.filterbar .chip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 900px) {
  .toolbar__search { width: 100%; }
  .toolbar__right { margin-left: 0; }
  .msgr-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; }
  .msgr-row .input { grid-column: 1 / -1; }
}






/* ═══════════════════════════════════════════════════════════════════════════
   ГРУППЫ: статистика, фильтр брендов, диалоги
   ═══════════════════════════════════════════════════════════════════════════ */

/* строка плашек со статистикой группы */
.stat-row {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stat-row .stat-pill { min-width: 104px; }

/* сообщения об ошибках формы */
.form-errors {
  background: var(--red-soft);
  color: var(--red-ink);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  font-size: var(--fs);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* две колонки внутри диалога */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* --- нативный <dialog>: подложка и сброс рамок --- */
.dlg {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 520px;
  width: calc(100% - 32px);
  overflow: visible;
}
.dlg::backdrop {
  background: rgba(8, 14, 24, .48);
  backdrop-filter: blur(2px);
}
.dlg .modal {
  width: 100%;
  max-height: calc(100vh - 40px);
}
.dlg .modal__body { max-height: none; }

/* --- переключатель алертов: показываем только одну из двух иконок --- */
[data-watch] [data-ico-on] { display: none; }
[data-watch] [data-ico-off] { display: inline-flex; }
[data-watch].is-on [data-ico-on] { display: inline-flex; }
[data-watch].is-on [data-ico-off] { display: none; }

/* --- фильтр по брендам: раскрывающаяся панель на <details> --- */
.filter-pop { position: relative; }
.filter-pop > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.filter-pop > summary::-webkit-details-marker { display: none; }
.filter-pop[open] > summary { border-color: var(--text-3); }

.filter-pop__body {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: 288px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-3);
}
.filter-pop__title {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 4px 6px;
}
.filter-pop__list {
  max-height: 240px;
  overflow: auto;
  padding-right: 2px;
}
.filter-pop__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

/* в таблице товаров название не должно ломать строку в три этажа */
.cards-tbl .c-prod .cell-title {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.cards-tbl .c-prod .cell-title:hover { color: var(--primary-ink); }

/* сгенерированное фото чуть крупнее в списке товаров */
.cards-tbl .thumb--md { width: 40px; height: 40px; }
.cards-tbl td { height: 56px; }


/* ═══════════════════════════════════════════════════════════════════════════
   ФОРМЫ В ПАНЕЛИ: у .panel__body нет своих отступов (внутри обычно таблица),
   поэтому для форм и текста добавляем модификатор.
   ═══════════════════════════════════════════════════════════════════════════ */

.panel__body--pad {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

/* внутри такого блока отступ у .form-actions уже даёт gap */
.panel__body--pad .form-actions { margin-top: 0; }

/* маркированный список пояснений */
.note-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--fs);
  color: var(--text-2);
  line-height: 1.5;
}
.note-list li::marker { color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════════════════
   ПРОФИЛЬ: пункты выдачи, источники цен, доступ сборщиков
   ═══════════════════════════════════════════════════════════════════════════ */

.panel__sub {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-top: 2px;
  max-width: 74ch;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.form-actions--split { justify-content: space-between; flex-wrap: wrap; }

/* таблица источников: номер в порядке доверия */
.source-tbl { min-width: 520px; }

/* карточки источников на странице настроек */
.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.source-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.source-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.source-card__name {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
}
.input--num {
  max-width: 110px;
  font-variant-numeric: tabular-nums;
}

/* адрес пункта выдачи под полем */
.point-addr {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  font-size: var(--fs-sm);
  line-height: 1.4;
  color: var(--text-2);
}
.point-addr svg { flex: 0 0 auto; margin-top: 2px; color: var(--text-3); }

/* строка «какие настройки у выбранного пользователя» */
.override-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.src-rank {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 10.5px;
  font-weight: 700;
  flex: 0 0 auto;
}

/* токен и адрес приёма: поле + кнопка «копировать» */
.token-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.token-row .input { flex: 1 1 auto; }
.input--mono {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

/* пример запроса для сборщика */
.code-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  padding: 10px 12px;
  overflow: auto;
}
.code-box pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-2);
  white-space: pre;
}
.mono { font-family: var(--font-mono); font-size: .95em; }


/* ═══════════════════════════════════════════════════════════════════════════
   ГРУППА: компактная строка статистики, спарклайн цены, правило брендов
   ═══════════════════════════════════════════════════════════════════════════ */

/* Одна строка вместо крупных плашек: много цифр на минимуме места */
.statline {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  font-size: var(--fs);
  min-height: 32px;
}
.statline__item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  line-height: 1.5;
}
.statline__item:first-child { padding-left: 0; }
.statline__item:last-child { border-right: 0; }
.statline__k {
  font-size: var(--fs-micro);
  color: var(--text-3);
  text-transform: lowercase;
}
.statline__item b {
  font-size: var(--fs-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.statline__good { color: var(--green-ink); }
.statline .delta { height: 17px; align-self: center; }
.statline__item svg { align-self: center; color: var(--text-3); }
.statline__sep { width: 1px; }
.statline__action {
  margin-left: auto;
  padding-left: 12px;
  color: var(--primary-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.statline__action:hover { text-decoration: underline; }

/* --- спарклайн цены в таблице товаров --- */
.cards-tbl .c-spark { width: 132px; }
.spark-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  vertical-align: middle;
}
.spark {
  display: block;
  overflow: visible;
}
.spark--empty {
  color: var(--text-3);
  font-size: var(--fs-sm);
}
.spark-axis {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

/* --- список брендов внутри диалога настроек --- */
.rule-list {
  max-height: 228px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px;
  background: var(--surface-2);
}

/* --- радио-кнопки: правило брендов, три варианта --- */
.check input[type="radio"] {
  border-radius: 50%;
}
.check input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 5px;
  height: 5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ЦЕНА ЗА ЕДИНИЦУ: «₽/кг», поле количества, ожидание сбора
   ═══════════════════════════════════════════════════════════════════════════ */

/* подпись единицы рядом с ценой: 90 ₽/кг */
.per {
  font-size: .78em;
  font-weight: 600;
  color: var(--text-3);
  margin-left: 1px;
}

/* количество и единица в таблице группы — свойство товара */
.cards-tbl .c-pack { width: 132px; }
.pack {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pack.is-saving { opacity: .55; }
.input--qty {
  width: 52px;
  height: 26px;
  padding: 0 5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
}
.select--unit {
  width: 62px;
  height: 26px;
  padding: 0 4px 0 6px;
  font-size: var(--fs-sm);
  background-position: right 4px center;
}

/* подсказка «комплект? укажите количество» в настройках группы */
.unit-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.unit-note svg { flex: 0 0 auto; margin-top: 2px; color: var(--text-3); }

/* карточка, которую ещё не собрал парсер */
.chip--wait {
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  color: var(--text-3);
  gap: 4px;
}
.chip--wait svg { opacity: .8; }

/* блок «разное количество» больше не нужен: упаковка настраивается в строке товара */

/* чип «цена за кг» рядом с категорией в шапке группы */
.chip--unit {
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 30%, var(--line));
  color: var(--green-ink);
  gap: 3px;
}

/* --- название группы — ссылка в таблице дашборда --- */
a.cell-title {
  color: inherit;
  text-decoration: none;
}
a.cell-title:hover {
  color: var(--primary-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.groups-tbl tbody tr:hover .g-title { color: var(--primary-ink); }

