/* «Здоровье финальных цен» (prefix ph-), ported 1:1 from docs/mockups/price-health/mockup.css. Builds on b2b-health.css
   (hx-*) and b2b-links.css (bl-*); rows are 3 columns: product | money «сейчас → станет» | decision. */
.hx-next { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; color: var(--ink-2); background: var(--tint); border: 1px dashed var(--field); border-radius: var(--radius); }
.hx-next > svg.lucide { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--muted); }
.hx-next > div { flex: 1; }
.hx-next strong { display: block; color: var(--ink); font-size: 15px; }
.hx-next p { margin-top: 2px; font-size: 13.5px; }
.hx-dlg-list { display: grid; gap: 4px; margin: 10px 0; padding-left: 18px; list-style: disc; }

.ph-page .ph-row-head, .ph-page .hx-list > .ph-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) 232px; }
.ph-row .hx-col { gap: 6px; }
.ph-mid { gap: 6px; }
.ph-k { margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 650; }
.ph-move { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-variant-numeric: tabular-nums; }
.ph-move > svg.lucide { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ph-move.is-off { opacity: .55; }
.ph-was { color: var(--ink-2); }
.ph-now { font-size: 15px; font-weight: 700; color: var(--ink); }
.ph-src { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.ph-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ph-prices > div { min-width: 0; padding: 6px 8px; background: var(--canvas); border: 1px solid var(--line-2); border-radius: var(--radius); }
.ph-prices dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.ph-prices dd { font-weight: 650; font-variant-numeric: tabular-nums; }
.ph-row .bl-why { margin-top: 2px; }
.ph-row .bl-why svg.lucide { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--blue); }
.ph-claude { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.ph-claude svg.lucide { width: 13px; height: 13px; color: var(--blue); }
.ph-ch svg.lucide { width: 14px; height: 14px; }
.ph-names { display: grid; gap: 2px; padding-left: 16px; color: var(--ink-2); font-size: 13px; list-style: disc; }
.ph-in { margin-top: 4px; max-width: 260px; }
.ph-in input { width: 100%; }
.ph-set { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-set li { display: inline-flex; gap: 6px; padding: 3px 8px; background: var(--canvas); border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 12.5px; }
.ph-set li span { color: var(--muted); }
.ph-set li b { font-variant-numeric: tabular-nums; }
.ph-editor { min-width: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); }
.ph-editor legend { padding: 0 4px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.ph-editor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.ph-f label { font-size: 12px; }
.ph-f input { width: 100%; min-height: 36px; }
.ph-calc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ph-row .hx-pick { min-height: 28px; justify-self: start; }

/* filter chips with real CRM counts, bulk bar, pager */
.ph-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.ph-chip { min-height: 36px; padding: 0 12px; }
.ph-chip b { font-variant-numeric: tabular-nums; }
.ph-chip small { color: var(--muted); font-weight: 500; }
.ph-chip[aria-pressed="true"] { color: var(--paper); background: var(--graphite); border-color: var(--graphite); }
.ph-chip[aria-pressed="true"] small { color: var(--line-2); }
.ph-toolbar:empty { display: none; }
.ph-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ph-select { min-height: 36px; max-width: 280px; padding: 0 8px; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: var(--radius); font: inherit; font-size: 13px; }
.ph-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 12px; font-size: 13px; }
.ph-pages { display: flex; flex-wrap: wrap; gap: 4px; }
.ph-pages .btn { min-width: 36px; justify-content: center; }
.ph-pages .btn.is-on { color: var(--paper); background: var(--graphite); border-color: var(--graphite); }
.ph-topnote { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; color: var(--ink-2); background: var(--blue-soft); border: 1px solid var(--blue-line); border-radius: var(--radius); font-size: 13.5px; line-height: 1.45; }
.ph-topnote svg.lucide { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--blue); }
.ph-topnote.is-warn { background: var(--amber-soft); border-color: var(--amber-line); }
.ph-topnote.is-warn svg.lucide { color: var(--amber); }
.ph-sum { font-size: 13px; }
.ph-roles { display: inline-flex; flex-wrap: wrap; gap: 2px 12px; color: var(--line-2); font-size: 12.5px; }
.ph-roles b { color: var(--paper); }
.ph-page .bl-send { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 14px; }
.ph-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; font-size: 13px; }
@media (min-width: 1100px) and (max-width: 1499px) { .ph-counts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .ph-counts { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

/* send dialog: wide, preview table per action group, bounds and acknowledgements */
.dlg.ph-dlg-wide { width: min(980px, calc(100vw - 32px)); }
.ph-dlg-h { font-size: 15px; font-weight: 650; }
.ph-group summary { flex-wrap: wrap; row-gap: 4px; padding-block: 6px; }
.ph-group-t { flex: 1 1 auto; }
.ph-group summary b { margin-right: 4px; }
.ph-group .hx-tbl-wrap { margin: 0 12px 12px; }
.ph-prev { font-size: 13px; }
.ph-prev td, .ph-prev th { vertical-align: top; font-variant-numeric: tabular-nums; }
.ph-prev td svg.lucide { width: 13px; height: 13px; vertical-align: -2px; color: var(--muted); }
.ph-prev tr.is-block td, .ph-prev tr.is-block th { background: var(--red-soft); }
.ph-bound { display: grid; gap: 4px; justify-items: start; }
.ph-prev td.ph-bound { display: table-cell; }
.ph-prev td.ph-bound .mark + .mark { margin-top: 4px; }
.ph-acks { display: grid; gap: 8px; padding: 10px 12px 12px; background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: var(--radius); }
.ph-acks legend { padding: 0 4px; font-weight: 650; font-size: 13px; }
.ph-ack { display: flex; align-items: flex-start; gap: 10px; min-height: 36px; font-size: 14px; cursor: pointer; }
.ph-ack input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--graphite); }
.ph-funnel-t td, .ph-funnel-t th { font-variant-numeric: tabular-nums; }
.ph-funnel-t td svg.lucide { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }

@media (max-width: 1099px) {
  .ph-page .ph-row-head { display: none; }
  .ph-page .hx-list > .ph-row { grid-template-columns: minmax(0, 1fr); }
  .ph-row .hx-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ph-prices { grid-template-columns: minmax(0, 1fr); }
  .ph-prices > div { display: flex; justify-content: space-between; gap: 8px; }
  .ph-row .hx-seg { grid-template-columns: minmax(0, 1fr); }
  .ph-pager { flex-direction: column; align-items: flex-start; }
  .ph-roles { display: none; }
  .dlg.ph-dlg-wide { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .ph-group .hx-tbl-wrap { margin: 0 8px 8px; }
  /* preview rows become cards */
  .ph-prev thead { display: none; }
  .ph-prev, .ph-prev tbody, .ph-prev tr, .ph-prev th, .ph-prev td { display: block; width: 100%; }
  .ph-prev tr { padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
  .ph-prev th[rowspan] { padding: 0 0 2px; border: 0; }
  .ph-prev td { padding: 2px 0; border: 0; }
  .ph-prev td:nth-of-type(2)::before { content: "Себестоимость: "; color: var(--muted); }
  .ph-prev td:nth-of-type(3)::before { content: "Цена: "; color: var(--muted); }
  .ph-prev td:nth-of-type(4)::before { content: "Прибыль: "; color: var(--muted); }
  .ph-prev td.ph-bound { display: block; }
}
.ph-prev .hx-tname, .ph-prev .bl-sku { display: block; }
.ph-funnel-t th .bl-sku, .hx-check th .bl-sku { display: block; }
.ph-est { color: var(--muted); font-size: 12px; font-weight: 500; }
