/* «Алерты B2B» screen (port of docs/mockups/b2b-alerts/mockup.css, approved 2026-10-12). Base: app.css, b2b-links.css and
   b2b-health.css (hx-: phase track, row, arrow, waits, results). New classes use the ax- prefix and tokens only.
   Bold place: the phase track. Graphite = chosen decision and the send bar; green = primary button and passed path. */

.ax-page .page-head h1 { overflow-wrap: anywhere; }

/* ---- scenario page --------------------------------------------------------------------------------------------------- */
.ax-last { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--ink-2); font-size: 14px; }
.ax-last svg.lucide { flex: none; width: 16px; height: 16px; color: var(--muted); }
.ax-cta { grid-auto-flow: row; }
.ax-info { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.ax-info svg.lucide { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--blue); }
.ax-info b { font-variant-numeric: tabular-nums; }
.ax-info + .ax-info { margin-top: 4px; }
.ax-counts { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---- building -------------------------------------------------------------------------------------------------------- */
.ax-build { display: grid; gap: 12px; max-width: 640px; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.ax-bline { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.ax-bline > div { flex: 1; display: grid; gap: 8px; }
.ax-bline.is-done svg.lucide { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--green); }
.ax-bline .spin { margin-top: 3px; }
.ax-bline b { font-variant-numeric: tabular-nums; }

/* ---- deciding: type tiles, toolbar, pager ---------------------------------------------------------------------------- */
.ax-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ax-tile small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ax-tile[aria-pressed="true"] small { color: var(--line); }
.ax-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 16px 0 8px; }
.ax-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.ax-search svg.lucide { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.ax-search input { width: 100%; min-height: 36px; padding: 0 10px 0 34px; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: var(--radius); font: inherit; font-size: 14px; }
.ax-search input:focus-visible, .ax-rub input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ax-sort .bl-select-input { max-width: none; }
.ax-bulk { margin-left: auto; }
.ax-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ax-fchip { min-height: 32px; }
.ax-fchip b { font-variant-numeric: tabular-nums; }
.ax-fchip[aria-pressed="true"] { color: var(--paper); background: var(--graphite); border-color: var(--graphite); }
.ax-fchip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ax-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 10px; font-size: 14px; }
.ax-range { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-pager .muted { font-size: 13px; }
.ax-pg-btns { display: inline-flex; gap: 6px; margin-left: auto; }
.ax-list + .ax-pager { margin-top: 12px; }

/* ---- row: supplier LEFT | arrow | CRM RIGHT | decision ----------------------------------------------------------------- */
.ax-list-head, .ax-row { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.12fr) 250px; }
.hx-row.ax-row { border-color: var(--line); }
.ax-row.is-confirmed { box-shadow: inset 3px 0 0 var(--graphite); }
.ax-row.is-advice { box-shadow: inset 3px 0 0 var(--amber); }
.ax-row.is-deferred { background: var(--tint); }
.ax-type svg.lucide { width: 13px; height: 13px; margin-right: 4px; }

.ax-offers { display: grid; gap: 6px; margin-top: 4px; }
.ax-offer { display: grid; gap: 4px; padding: 8px 10px; background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.ax-offer.is-on { background: var(--paper); border-color: var(--graphite); box-shadow: inset 0 0 0 1px var(--graphite); }
.ax-offer.is-stale { background: var(--paper); border-style: dashed; }
.ax-offer.is-none { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.ax-offer.is-none svg.lucide { flex: none; width: 15px; height: 15px; color: var(--muted); }
.ax-of-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.ax-of-s { flex: 1 1 auto; min-width: 0; font-weight: 650; }
.ax-of-p { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-of-q { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-of-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; }
.ax-of-meta .muted { white-space: nowrap; }
.ax-of-meta .mark { min-height: 22px; font-size: 12px; }
.ax-spark { display: inline-flex; align-items: flex-end; gap: 2px; width: 44px; height: 18px; }
.ax-spark i { flex: 1; min-height: 3px; background: var(--muted); border-radius: 1px; opacity: .55; }
.ax-spark i:last-child { opacity: 1; background: var(--ink-2); }
.ax-spark.is-stale i, .ax-spark.is-stale i:last-child { background: var(--field); opacity: 1; }
.ax-take { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 32px; color: var(--ink-2); font-size: 13px; font-weight: 650; cursor: pointer; }
.ax-take input { width: 18px; height: 18px; margin: 0; accent-color: var(--graphite); }
.ax-take:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
.ax-take.is-on { color: var(--ink); }

.ax-row .hx-arrow { padding-top: 34px; }
.ax-row .hx-arrow::before { top: 51px; }

.ax-cost { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ax-cost > * { white-space: nowrap; }
.ax-cost-l { color: var(--ink-2); font-weight: 650; }
.ax-was { color: var(--muted); }
.ax-to b { font-size: 16px; }
.ax-same { color: var(--muted); }
.ax-cost .mark { white-space: normal; }
.ax-chans { overflow-x: auto; }
.ax-ch { width: 100%; max-width: 480px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ax-ch th, .ax-ch td { padding: 4px 8px 4px 0; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line-2); }
.ax-ch thead th { color: var(--muted); font-size: 12px; font-weight: 600; }
.ax-ch tbody th { font-weight: 500; color: var(--ink-2); }
.ax-ch td { white-space: nowrap; }
.ax-ch .mark { min-height: 22px; font-size: 12px; }
.ax-muted { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 12.5px; }
.ax-muted svg.lucide { flex: none; width: 13px; height: 13px; margin-top: 2px; }
.ax-note { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid; border-radius: var(--radius); font-size: 13px; line-height: 1.4; }
.ax-note svg.lucide { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.ax-note.is-blue { color: var(--ink); background: var(--blue-soft); border-color: var(--blue-line); }
.ax-note.is-blue svg.lucide { color: var(--blue); }
.ax-note.is-amber { color: var(--ink); background: var(--amber-soft); border-color: var(--amber-line); }
.ax-note.is-amber svg.lucide { color: var(--amber); }

/* decision column */
.ax-dec { min-width: 0; display: grid; gap: 8px; align-content: start; }
.ax-dec .hx-lbl { margin-bottom: -4px; }
.ax-claude { display: flex; }
.ax-cl-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 1px 8px; color: var(--ink); background: var(--line-2); border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-cl-chip svg.lucide { width: 13px; height: 13px; color: var(--ink-2); }
.ax-cl-chip.is-advice { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-line); }
.ax-cl-chip.is-advice svg.lucide { color: var(--amber); }
.ax-cl-chip.is-failed { color: var(--muted); background: var(--tint); border-style: dashed; }
.ax-cl-chip.is-failed svg.lucide { color: var(--muted); }
.ax-advice { display: flex; align-items: flex-start; gap: 6px; color: var(--amber); font-size: 13px; font-weight: 600; line-height: 1.4; }
.ax-advice svg.lucide { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.ax-failed { color: var(--muted); font-size: 13px; }
.ax-seg { margin-top: 0; }
.ax-seg .bl-segbtn { min-height: 36px; padding: 6px 10px; white-space: normal; text-align: left; line-height: 1.25; }
.ax-seg .bl-segbtn svg.lucide { flex: none; }
.ax-seg .bl-segbtn.is-claude { position: relative; z-index: 1; color: var(--ink); outline: 2px dashed var(--graphite); outline-offset: -3px; }
.ax-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.ax-st-w, .ax-st-ok { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; }
.ax-st-w { color: var(--ink-2); }
.ax-st-w svg.lucide, .ax-st-ok svg.lucide { width: 14px; height: 14px; }
.ax-st-ok { color: var(--ink); }
.ax-btn-ink { color: var(--graphite); background: var(--paper); border-color: var(--graphite); }
.ax-btn-ink:hover { background: var(--line-2); }

/* «Своя цена» */
.ax-custom { display: grid; gap: 6px; }
.ax-custom label { font-size: 13px; font-weight: 650; }
.ax-rub { position: relative; }
.ax-rub input { width: 100%; min-height: 38px; padding: 0 30px 0 10px; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: var(--radius); font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; }
.ax-rub input[aria-invalid="true"] { border-color: var(--red); }
.ax-rub span { position: absolute; right: 10px; top: 50%; color: var(--muted); transform: translateY(-50%); }
.ax-warn { display: grid; gap: 6px; }
.ax-warn .mark { white-space: normal; }
.ax-ok { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ax-ok input[type="checkbox"] { flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; accent-color: var(--graphite); }
.ax-custom-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---- send bar -------------------------------------------------------------------------------------------------------- */
.ax-sendbar .bl-sum { gap: 2px 18px; }
.ax-sendbar .bl-sum b { font-size: 16px; }
.ax-sendbar .bl-sum span { white-space: nowrap; }
.ax-sendbar .bl-send { display: grid; justify-items: end; gap: 2px; }
.ax-who { color: color-mix(in srgb, var(--paper) 72%, var(--graphite)); font-size: 12px; white-space: nowrap; }
.ax-page .ax-sendbar .bl-send-note { display: flex; }

/* ---- dialogs --------------------------------------------------------------------------------------------------------- */
.ax-stagebox { margin-bottom: 12px; }
.ax-stages { display: flex; align-items: center; gap: 0; margin-bottom: 6px; }
.ax-stages li { display: grid; place-items: center; min-width: 40px; height: 32px; padding: 0 10px; color: var(--ink-2); background: var(--paper); border: 2px solid var(--field); border-radius: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-stages li + li { margin-left: 28px; position: relative; }
.ax-stages li + li::before { content: ""; position: absolute; right: calc(100% + 2px); width: 24px; height: 2px; background: var(--field); }
.ax-stages li.is-now { color: var(--paper); background: var(--green-btn); border-color: var(--green-btn); }
.ax-stage-t { font-size: 14px; font-weight: 600; }
.ax-blk { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.ax-blk summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.ax-blk-n { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.ax-blk ul { display: grid; gap: 4px; padding: 0 12px 10px 28px; list-style: disc; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ax-blk.is-red { border-color: var(--red-line); background: var(--red-soft); }
.ax-blk-red { padding: 0 12px 6px; font-size: 13.5px; }
.dlg-body .ax-note { margin-top: 12px; }
.ax-nostage { margin-top: 12px; }
.ax-dlg-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: 13px; }
.ax-dlg-note svg.lucide { flex: none; width: 14px; height: 14px; margin-top: 2px; }

/* ---- check, journal -------------------------------------------------------------------------------------------------- */
.ax-page .hx-check td { font-variant-numeric: tabular-nums; }
.ax-page .hx-check .bl-sku { white-space: normal; }
.ax-jtbl { margin-top: 10px; }
.ax-jtbl .tbl { min-width: 420px; }
.ax-jtbl td { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- responsive ------------------------------------------------------------------------------------------------------ */
@media (max-width: 1499px) and (min-width: 1100px) { .ax-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1099px) {
  .ax-row { grid-template-columns: minmax(0, 1fr); }
  .ax-row .hx-arrow { padding-top: 0; }
  .ax-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ax-bulk { margin-left: 0; }
}
@media (max-width: 767px) {
  .ax-search { flex-basis: 100%; max-width: none; }
  .ax-search input, .ax-sort .bl-select-input { min-height: 44px; font-size: 16px; }
  .ax-sort, .ax-sort .bl-select-input { width: 100%; }
  .ax-sort { flex: 1 1 100%; }
  .ax-bulk { width: 100%; min-height: 44px; height: auto; white-space: normal; justify-content: flex-start; text-align: left; }
  .ax-fchip, .ax-pager .btn, .ax-take, .ax-ok, .ax-btn-ink, .ax-status .link-btn { min-height: 44px; }
  .ax-seg .bl-segbtn { min-height: 44px; }
  .ax-rub input { min-height: 44px; font-size: 16px; }
  .ax-sendbar .bl-send { justify-items: end; }
  .ax-who, .ax-page .ax-sendbar .bl-send-note { display: none; }
  .ax-cta { width: 100%; justify-items: stretch; }
  /* «Попробовать ещё раз» goes under the Claude line instead of squeezing it into a narrow column. */
  .ax-info { flex-wrap: wrap; }
  .ax-info > span { flex: 1 1 calc(100% - 24px); min-width: 0; }
  .ax-info > .btn { margin-left: 24px; min-height: 44px; }
}
@media (max-width: 600px) {
  .ax-tiles, .ax-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-tiles > .ax-tile:first-child { grid-column: 1 / -1; }
  .ax-seg { grid-template-columns: minmax(0, 1fr); }
  .ax-pg-btns { margin-left: 0; width: 100%; }
  .ax-pg-btns .btn { flex: 1; justify-content: center; }
  .ax-stages li + li { margin-left: 20px; }
  .ax-stages li + li::before { width: 16px; }
}
.ax-nowrap { white-space: nowrap; }
.ax-runs th:nth-child(n+4), .ax-runs td:nth-child(n+4) { text-align: right; font-variant-numeric: tabular-nums; }
.hx-dlg-list { display: grid; gap: 4px; margin: 10px 0; padding-left: 18px; list-style: disc; }
.ax-banner { margin-bottom: 14px; }
.ax-wait-claude { margin-bottom: 12px; }
