/* ============ Neurosel — Цены v2 ============
   Часть 1: компактная шапка, сводка с потенциалом, селектор
   склада, плотный список. Часть 2: панель экономики, 2 варианта.
   Подключается после prices_redesign.css (переиспользует pr-*).
================================================================ */

/* ---------- компактная шапка ---------- */
.p2-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.p2-title { font-size: 16px; font-weight: 500; letter-spacing: -0.015em; margin-right: 2px; }
.p2-count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pr-screen .pr-cats { white-space: nowrap; }
a.btn, .p2-cardbtn { text-decoration: none; }
.p2-test { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--amber-weak); border: 1px solid #F0DCB4; font-size: 11px; font-weight: 500; color: #92671A; white-space: nowrap; }
.p2-test i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* ---------- сводка: одна полоса из четырёх ячеек ---------- */
.p2-sum { display: grid; grid-template-columns: auto 0.8fr 1.1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-soft); margin-bottom: 14px; align-items: stretch; }
.p2-sum-cell { background: var(--surface); padding: 14px 18px; display: flex; align-items: center; gap: 14px; min-height: 80px; }
.p2-sum-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.p2-sum-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: nowrap; }
.p2-sum-val { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p2-sum-lbl { font-size: 11.5px; color: var(--text-2); margin-top: 4px; line-height: 1.35; }
.p2-sum-link { color: var(--accent-ink); cursor: pointer; }
.p2-sum-link:hover { text-decoration: underline; }
.p2-gauge { flex: none; }
.p2-pot-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--ai-soft); border: 1px solid var(--ai-border); display: grid; place-items: center; color: var(--ai-2); flex: none; }
.p2-est { font-size: 9.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: #F2F4F9; color: var(--text-3); }

/* ---------- селектор склада (дропдаун) ---------- */
.p2-wh { position: relative; }
.p2-wh-btn { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px 0 11px; border-radius: 11px; border: 1px solid var(--accent-weak-2); background: var(--accent-weak); box-shadow: var(--shadow-xs); font-size: 13px; font-weight: 500; color: var(--text); transition: border-color .14s, background .14s; white-space: nowrap; }
.p2-wh-btn:hover { border-color: #C7D3FA; background: #E9EEFD; }
.p2-wh-btn .lbl { color: var(--text-3); font-weight: 400; font-size: 12px; }
.p2-wh-prog { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; padding: 1.5px 6px; border-radius: 5px; background: #fff; border: 1px solid var(--accent-weak-2); color: var(--accent-ink); }
.p2-wh-stock { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.p2-wh-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 70; animation: pr-fade .14s ease; }
.p2-wh-item { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; font-size: 12.5px; color: var(--text); transition: background .12s; text-align: left; }
.p2-wh-item:hover { background: #F4F6FA; }
.p2-wh-item.on { background: var(--accent-weak); }
.p2-wh-item .nm { font-weight: 500; white-space: nowrap; }
.p2-wh-item .st { margin-left: auto; font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p2-wh-item .chk { color: var(--accent); flex: none; }
.p2-wh-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.p2-wh-cap { font-size: 11px; color: var(--text-3); padding: 4px 10px 6px; line-height: 1.45; }

/* ---------- селектор склада (чипы) ---------- */
.p2-whchips { display: flex; gap: 7px; flex-wrap: wrap; }
.p2-whchip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); font-size: 12.5px; font-weight: 500; color: var(--text-2); transition: all .14s; white-space: nowrap; }
.p2-whchip:hover { border-color: #C9D0DC; color: var(--text); }
.p2-whchip.on { border-color: var(--accent); background: var(--accent-weak); color: var(--accent-ink); }
.p2-whchip .p2-wh-prog { background: #F2F4F9; border-color: var(--border); color: var(--text-2); }
.p2-whchip.on .p2-wh-prog { background: #fff; border-color: var(--accent-weak-2); color: var(--accent-ink); }

/* ---------- панель инструментов над таблицей ---------- */
.p2-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

/* поле поиска по списку */
.p2-search { display: flex; align-items: center; gap: 8px; height: 36px; min-width: 200px; flex: 1 1 200px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-3); box-shadow: var(--shadow-xs); transition: border-color .14s, box-shadow .14s; }
.p2-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); color: var(--accent-ink); }
.p2-search input { border: none; outline: none; background: none; flex: 1; min-width: 0; font-size: 13px; color: var(--text); }
.p2-search input::placeholder { color: var(--text-3); }
.p2-search.active { border-color: var(--accent-weak-2); }
.p2-search .cnt { font-size: 11px; color: var(--text-3); white-space: nowrap; flex: none; }
.p2-search .clr { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; color: var(--text-3); flex: none; transition: background .12s, color .12s; }
.p2-search .clr:hover { background: #F0F2F8; color: var(--text-2); }
.p2-dens { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.p2-dens button { width: 32px; height: 31px; display: grid; place-items: center; color: var(--text-3); transition: background .12s, color .12s; }
.p2-dens button.on { background: var(--accent-weak); color: var(--accent-ink); }
.p2-dens button + button { border-left: 1px solid var(--border); }

/* ---------- числовые ячейки таблицы: UI-шрифт + tabular-nums (не моно) ---------- */
/* pr-money в контексте p2-tbl → UI-шрифт (SKU остаётся моно через .p2-sku) */
.p2-tbl .pr-money,
.p2-tbl .pr-rec,
.p2-tbl .p2-mar-pct,
.p2-tbl .p2-mar-rub { font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* ---------- таблица ---------- */
.p2-tblwrap { overflow-x: auto; border-radius: 16px; }
.p2-tbl { width: 100%; min-width: 1180px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.p2-tbl thead th { position: sticky; top: 0; z-index: 3; text-align: left; font-weight: 500; color: var(--text-3); font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: #FCFCFE; }
.p2-tbl tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; background: var(--surface); }
.p2-tbl tbody tr:last-child td { border-bottom: none; }
.p2-tbl tbody tr { cursor: pointer; }
.p2-tbl tbody tr:hover td { background: #F8FAFD; }
.p2-tbl tbody tr:hover .pr-pencil { opacity: 1; }
.p2-tbl th.ta-r, .p2-tbl td.ta-r { text-align: right; }

/* плотность */
.p2-tbl.cozy tbody td { padding-top: 14px; padding-bottom: 14px; }
.p2-tbl.compact tbody td { padding-top: 7px; padding-bottom: 7px; }
.p2-tbl.compact .p2-thumb { width: 30px; height: 30px; }

/* залипание первой колонки */
.p2-tbl th.stick, .p2-tbl td.stick { position: sticky; left: 0; z-index: 2; }
.p2-tbl thead th.stick { z-index: 4; }
.p2-tbl td.stick { box-shadow: 6px 0 8px -8px rgba(20,28,48,0.18); }

/* товарная ячейка */
.p2-prodcell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.p2-thumb { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 500; color: #fff; letter-spacing: 0.02em; user-select: none; }
.p2-nm { font-size: 12.5px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p2-sku { font-family: var(--mono); font-size: 10px; color: var(--text-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; }

/* бейдж-решение агента */
.p2-dbadge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.p2-dbadge.down { background: var(--amber-weak); color: #92671A; }
.p2-dbadge.up { background: var(--accent-weak); color: var(--accent-ink); }
.p2-dbadge.hold { background: var(--green-weak); color: var(--green); }
.p2-dbadge.noPromo { background: var(--rose-weak); color: var(--rose); }
.p2-dbadge.enterPromo { background: var(--violet-weak); color: #7C53EE; }
.p2-dbadge.none { background: #F2F4F9; color: var(--text-3); }

/* блокер «нет закупки» — проблема данных, не решение агента */
.p2-blocker { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px; border-radius: 8px; background: var(--rose-weak); border: 1px solid #F3D2D9; font-size: 11px; font-weight: 500; color: var(--rose); white-space: nowrap; }

/* маржа: % и ₽ рядом */
.p2-mar { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.p2-mar-top { display: flex; align-items: baseline; gap: 7px; }
.p2-mar-pct { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 500; }
.p2-mar-rub { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--text-3); }
.p2-mar-wh { font-size: 9.5px; color: var(--text-3); }
/* вторичная строка «реком. X%» под основной маржой */
.p2-mar-rec { display: inline-flex; align-items: baseline; gap: 4px; font-size: 11px; line-height: 1; padding: 3px 8px 3px 6px; border-radius: 7px; font-variant-numeric: tabular-nums; background: #F1F3F7; color: var(--text-3); }
.p2-mar-rec .ar { font-weight: 800; font-size: 11px; line-height: 1; }
.p2-mar-rec .lbl { font-size: 10px; letter-spacing: 0.01em; }
.p2-mar-rec b { font-weight: 700; }
.p2-mar-rec.better { background: var(--green-weak); color: #1E7A54; }
.p2-mar-rec.better b, .p2-mar-rec.better .ar { color: var(--green); }
.p2-mar-rec.worse { background: var(--rose-weak); color: #B23A52; }
.p2-mar-rec.worse b, .p2-mar-rec.worse .ar { color: var(--rose); }
.p2-mar-rec.flat { background: #F1F3F7; color: var(--text-2); }
.p2-mar-rec.flat b { color: var(--text-2); }
.p2-mar-rec.dash { background: transparent; color: var(--text-3); opacity: 0.65; padding-left: 0; }

/* остаток + тултип разбивки */
.p2-stockw { position: relative; display: inline-flex; }
.p2-tip { position: absolute; right: 0; bottom: calc(100% + 7px); background: #232838; color: #E7EAF2; border-radius: 10px; padding: 9px 11px; font-size: 11.5px; line-height: 1.5; white-space: nowrap; box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity .14s, transform .14s; z-index: 30; }
.p2-tip b { font-variant-numeric: tabular-nums; font-weight: 500; color: #fff; margin-left: 14px; float: right; }
.p2-tip div { display: flex; justify-content: space-between; gap: 16px; }
.p2-stockw:hover .p2-tip { opacity: 1; transform: translateY(0); }

/* сортируемые заголовки */
.p2-th { display: inline-flex; align-items: center; gap: 4px; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; white-space: nowrap; }
.p2-th:hover { color: var(--text-2); }
.p2-th.on { color: var(--accent-ink); }
.p2-sort-arr { display: inline-block; flex: none; margin-left: 2px; }
/* числовые заголовки — внутренний span прижат к правому краю, display th не меняем */
.p2-tbl th.ta-r .p2-th { width: 100%; justify-content: flex-end; }

/* спарклайн маржи 7д */
.p2-spark { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; cursor: default; }
.p2-spark-cap { font-size: 8.5px; color: var(--text-3); letter-spacing: 0.02em; white-space: nowrap; }
.p2-spark .p2-tip div { gap: 20px; }
/* колонка спарклайна — фиксированная ширина чтобы не налезать на «Остаток» */
.p2-tbl th:has(.p2-th[data-col="trend"]), .p2-spark-col { min-width: 110px; width: 110px; }
/* тултип спарклайна: clamped, не вылезает за правый край */
.p2-spark .p2-tip { right: 0; max-width: min(240px, 90vw); left: auto; white-space: nowrap; }

/* тултип-пояснение «?» у терминов */
.p2-q { position: relative; display: inline-grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: #EBEEF3; color: var(--text-3); font-size: 9px; font-weight: 600; cursor: default; vertical-align: 1px; margin-left: 4px; flex: none; }
.p2-q:hover { background: var(--accent-weak); color: var(--accent-ink); }
.p2-qq { position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%) translateY(3px); width: 218px; background: #232838; color: #E7EAF2; border-radius: 10px; padding: 8px 11px; font-size: 11px; line-height: 1.5; font-weight: 400; text-transform: none; letter-spacing: 0; white-space: normal; text-align: left; box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transition: opacity .14s, transform .14s; z-index: 80; }
.p2-q:hover .p2-qq { opacity: 1; transform: translateX(-50%) translateY(0); }
.p2-q.qleft .p2-qq { left: auto; right: -8px; transform: translateY(3px); }
.p2-q.qleft:hover .p2-qq { transform: translateY(0); }

/* источник-бейдж */
.p2-srcb { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 5px; background: #F2F4F9; border: 1px solid var(--border); font-size: 9.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.p2-srcb.warn { background: var(--amber-weak); border-color: #F0DCB4; color: #92671A; }

/* стек-бар состава расходов */
.p2-expbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #F2F4F9; margin: 9px 0 3px; }
.p2-expbar i { display: block; height: 100%; }
.p2-expbar i + i { margin-left: 1px; }

/* маржа ×3: валовая · чистая · после рекламы */
.p2-m3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; }
.p2-m3 .cell { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 9px; background: var(--surface); min-width: 0; }
.p2-m3 .cell.g { background: #F7F8FB; }
.p2-m3 .cell.n { background: #F0F4FE; border-color: #DCE5FB; }
.p2-m3 .cell.n .pct { color: var(--accent-ink); }
.p2-m3 .cell.ok { background: var(--green-weak); border-color: #C4E8D6; }
.p2-m3 .cell.ok .pct { color: var(--green); }
.p2-m3 .cell.warn { background: var(--amber-weak); border-color: #F0DCB4; }
.p2-m3 .cell.warn .pct { color: #C98A1E; }
.p2-m3 .cell.bad { background: var(--rose-weak); border-color: #F3D2D9; }
.p2-m3 .cell.bad .pct { color: var(--rose); }
.p2-m3 .cell .h { font-size: 10.5px; color: var(--text-2); display: flex; align-items: center; white-space: nowrap; }
.p2-m3 .cell .pct { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; margin-top: 5px; }
.p2-m3 .cell .rub { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: 1px; }

/* ДРР / ДРРП */
.p2-drrs { display: flex; gap: 9px; }
.p2-drr { flex: 1; display: flex; align-items: baseline; gap: 7px; border: 1px solid var(--border); border-radius: 11px; padding: 9px 12px; background: var(--surface); min-width: 0; }
.p2-drr .v { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.p2-drr .k { font-size: 10.5px; color: var(--text-2); display: inline-flex; align-items: center; white-space: nowrap; }

/* поток цены (альт-компоновка панели): закупка → цена → расходы → прибыль */
.p2-flow { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.p2-fl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 14px; background: var(--surface); position: relative; }
.p2-fl + .p2-fl { border-top: 1px solid var(--border); }
.p2-fl .k { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 8px; white-space: nowrap; min-width: 0; }
.p2-fl .v { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.p2-fl.lg { padding: 12px 14px; }
.p2-fl.lg .k { font-size: 12.5px; color: var(--text); font-weight: 500; }
.p2-fl.lg .v { font-size: 19px; letter-spacing: -0.02em; }
.p2-fl .bar { position: absolute; left: 0; top: 0; bottom: 0; opacity: 0.07; }
.p2-fl .dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }

/* кнопка «в карточку» — всегда видна */
.p2-cardbtn { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); border: 1px solid var(--border); background: var(--surface); transition: background .12s, color .12s, border-color .12s; }
.p2-cardbtn:hover { background: var(--accent-weak); color: var(--accent-ink); border-color: var(--accent-weak-2); }
/* «Остаток» и «Дней запаса» — паддинг правее сокращён (не липнуть к краю) */
.p2-tbl td.ta-r:nth-last-child(3),
.p2-tbl th.ta-r:nth-last-child(3),
.p2-tbl td.ta-r:nth-last-child(2),
.p2-tbl th.ta-r:nth-last-child(2) { padding-right: 16px; }

/* ---------- панель v2 ---------- */
.p2-drawer { width: 524px; }
.p2-dwh { margin-top: 8px; }
.p2-dwh-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.p2-dwh .p2-wh-btn { height: 28px; border-radius: 8px; font-size: 11.5px; gap: 6px; padding: 0 9px; }
.p2-dwh-stock { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p2-dwh-cap { font-size: 10.5px; color: var(--text-3); line-height: 1.4; white-space: nowrap; }
/* шапка панели — формат p2-stockline (статус · кол-во · программа · склад) */
.p2-stockline { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.p2-sl-sep { color: var(--text-3); font-size: 11px; }
.p2-sl-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; }
.p2-sl-status i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.p2-sl-status.in i { background: var(--green); }
.p2-sl-status.in { color: var(--green); }
.p2-sl-status.low i { background: var(--amber); }
.p2-sl-status.low { color: var(--amber); }
.p2-sl-status.out i { background: var(--rose); }
.p2-sl-status.out { color: var(--rose); }
.p2-sl-v { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.p2-sl-prog { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-3); background: #ECEEF4; border-radius: 5px; padding: 1px 5px; }
.p2-sl-wh { position: relative; }
.p2-sl-whbtn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-2); border-radius: 7px; padding: 3px 6px; transition: background .12s; }
.p2-sl-whbtn:hover { background: #F0F2F7; }
.p2-sl-whbtn b { font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p2-dthumb { width: 44px; height: 44px; border-radius: 11px; flex: none; display: grid; place-items: center; font-size: 16px; font-weight: 500; color: #fff; }

/* лесенка цен */
.p2-ladder { border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.p2-lrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 11px 14px; background: var(--surface); }
.p2-lrow + .p2-lrow { border-top: 1px solid var(--border); }
.p2-lrow .k { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; }
.p2-lrow .v { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.p2-lrow .d { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 500; min-width: 64px; text-align: right; color: var(--text-3); white-space: nowrap; }
.p2-lrow.rec { background: var(--ai-tint); }
.p2-lrow.rec .v { color: #2C36B8; font-size: 18px; }
.p2-lrow.rec .k { color: var(--accent-ink); font-weight: 500; }
.p2-lrow.floor .v { color: var(--text-2); font-size: 14px; }
.p2-lnote { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

/* маржа: % и ₽ одного веса */
.p2-mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p2-mtile { border: 1px solid var(--border); border-radius: 13px; padding: 11px 13px; background: #FCFCFE; }
.p2-mtile .h { font-size: 11px; color: var(--text-2); }
.p2-mtile .vals { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.p2-mtile .pct, .p2-mtile .rub { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.p2-mtile .rub { color: var(--text-2); }
.p2-mtile .sub { font-size: 10.5px; color: var(--text-3); margin-top: 4px; }

/* расходы: сетка 4 колонки — статья / источник / ставка / сумма */
.p2-exp-grid { display: grid; grid-template-columns: minmax(0,1fr) auto 58px 84px; align-items: center; column-gap: 10px; }
.p2-exp-grid > * { padding: 6.5px 0; border-top: 1px solid var(--border); min-width: 0; }
.p2-exp-grid > .nt { border-top: none; }
.p2-exp-k { font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.p2-exp-src { font-size: 10px; color: var(--text-3); white-space: nowrap; text-align: left; }
.p2-exp-src.warn { color: #92671A; }
.p2-exp-pct, .p2-exp-rub { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 500; text-align: right; white-space: nowrap; }
.p2-exp-pct { color: var(--text-2); }

/* футер панели: 3 кнопки, не обрезаются */
.p2-dfoot { flex: none; border-top: 1px solid var(--border); padding: 11px 18px 9px; background: rgba(255,255,255,0.92); backdrop-filter: blur(6px); }
.p2-dfoot-row { display: flex; gap: 8px; }
.p2-dfoot .btn { height: 36px; padding: 0 10px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.p2-dfoot .btn.primary { flex: 1; justify-content: center; min-width: 0; flex-shrink: 1; }
.p2-dfoot-note { font-size: 10.5px; color: var(--text-3); margin-top: 7px; display: flex; align-items: center; gap: 6px; }
.p2-dfoot-note i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); flex: none; }
.p2-testchip { font-size: 9px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,0.22); color: #fff; }

/* вариант B: вердикт-герой */
.p2-verdict { position: relative; display: flex; align-items: stretch; gap: 14px; border-radius: 16px; padding: 15px 16px; overflow: hidden; background: radial-gradient(125% 145% at 0% 0%, #ECEFFE 0%, transparent 55%), radial-gradient(120% 150% at 100% 0%, #F1EBFE 0%, transparent 58%), linear-gradient(135deg, #F4F5FF 0%, #F6F1FE 100%); border: 1px solid #E3E2FA; box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 16px 38px -22px rgba(124,83,238,0.45); }
.p2-verdict-l { flex: 1; min-width: 0; }
.p2-verdict-tag { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-ink); }
.p2-verdict-main { font-size: 15px; font-weight: 500; margin-top: 9px; line-height: 1.35; color: var(--text); }
.p2-verdict-val { font-size: 26px; font-weight: 500; letter-spacing: -0.025em; color: #2C36B8; font-variant-numeric: tabular-nums; margin-top: 4px; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.p2-verdict-val .d { font-size: 11.5px; font-weight: 500; color: #585A86; letter-spacing: 0; }
.p2-verdict-val.hold { color: var(--text); }
/* прибыль-чип справа в вердикте */
.p2-verdict-r { flex: none; align-self: center; min-width: 124px; max-width: 150px; text-align: right; padding: 11px 13px; border-radius: 13px; background: rgba(255,255,255,0.72); border: 1px solid #DCDFF6; box-shadow: 0 2px 8px -4px rgba(43,54,184,0.18); }
.p2-verdict-r .lab { font-size: 10px; color: #585A86; line-height: 1.3; }
.p2-verdict-r .big { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--green); font-variant-numeric: tabular-nums; margin-top: 4px; }
.p2-verdict-r .sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.p2-verdict-r.neg { background: rgba(253,242,244,0.85); border-color: #F3D2D9; }
.p2-verdict-r.neg .big { color: #B23A52; }
.p2-cur-base-lbl { font-size: 10.5px; color: var(--text-3); margin: 10px 0 3px; padding: 0 2px; }
.p2-cur-base-lbl b { color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 500; }
.p2-vkv { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); }
.p2-vkv:last-child { border-bottom: none; }
.p2-vkv .k { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.p2-vkv .v { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 500; white-space: nowrap; }
.p2-drawer .pr-dec-v { white-space: nowrap; }
.p2-drawer .pr-dec-k { width: auto; min-width: 42px; }
.p2-mstrip { display: flex; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.p2-mstrip > div { flex: 1; padding: 10px 13px; background: #FCFCFE; }
.p2-mstrip > div + div { border-left: 1px solid var(--border); }

/* алерт «закупка устарела» */
.p2-costage { display: flex; align-items: flex-start; gap: 9px; padding: 10px 13px; border-radius: 11px; background: var(--amber-weak); border: 1px solid #F0DCB4; font-size: 12px; color: #92671A; line-height: 1.45; }
.p2-costage svg { flex: none; margin-top: 1px; }
.p2-costage b { font-variant-numeric: tabular-nums; }

/* пустое состояние */
.p2-empty { padding: 48px 20px 52px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-3); text-align: center; }


/* ================= итерация: панель — плотные акценты ================= */

/* решение агента — строки с тонировкой по типу */
.p2-decs { border: 1px solid var(--border); border-radius: 13px; padding: 10px; background: var(--surface); }
.p2-decs-h { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ai-2); margin: 1px 2px 8px; }
.p2-decs-rows { display: flex; flex-direction: column; gap: 6px; }
.p2-dr { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 10px; background: #F7F8FB; }
.p2-dr .ic { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; background: #fff; color: var(--text-2); flex: none; box-shadow: inset 0 0 0 1px rgba(20,28,48,0.07); }
.p2-dr .kk { font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); width: 44px; flex: none; }
.p2-dr .vv { font-size: 12.5px; font-weight: 500; color: var(--text); min-width: 0; }
.p2-dr.apply { background: var(--accent-weak); }
.p2-dr.apply .ic { color: var(--accent-ink); }
.p2-dr.apply .vv { color: var(--accent-ink); }
.p2-dr.hold { background: var(--green-weak); }
.p2-dr.hold .ic { color: var(--green); }
.p2-dr.hold .vv { color: #19694C; }
.p2-dr.warn { background: var(--amber-weak); }
.p2-dr.warn .ic { color: #C98A1E; }
.p2-dr.warn .vv { color: #92671A; }
.p2-dr.stop { background: var(--rose-weak); }
.p2-dr.stop .ic { color: var(--rose); }
.p2-dr.stop .vv { color: #B23A52; }
.p2-dr.none .vv { color: var(--text-3); font-weight: 400; }

/* цены: текущая · нижний порог — две плитки */
.p2-kv2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.p2-kv2 .t { border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; background: var(--surface); min-width: 0; }
.p2-kv2 .t .h { font-size: 10.5px; color: var(--text-2); display: flex; align-items: center; white-space: nowrap; }
.p2-kv2 .t .v { font-size: 18px; font-weight: 500; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; margin-top: 5px; }
.p2-kv2 .t .s { font-size: 10.5px; color: var(--text-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.p2-kv2 .t.warn { background: var(--amber-weak); border-color: #F0DCB4; }
.p2-kv2 .t.warn .v { color: #92671A; }
.p2-kv2 .t.warn .s { color: #92671A; }

/* шкала маржи: зоны + маркер */
.p2-scl { border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px 8px; background: var(--surface); }
.p2-scl .hrow { display: flex; justify-content: space-between; align-items: baseline; }
.p2-scl .h { font-size: 10.5px; color: var(--text-2); display: inline-flex; align-items: center; }
.p2-scl .now { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.p2-scl .bar { position: relative; height: 12px; border-radius: 6px; margin-top: 10px; }
.p2-scl .zone { position: absolute; top: 0; bottom: 0; }
.p2-scl .zone.amber { background: #F8EDD4; border-radius: 6px 0 0 6px; }
.p2-scl .zone.green { background: #D9F0E4; border-radius: 0 6px 6px 0; }
.p2-scl .fill { position: absolute; left: 0; top: 2.5px; bottom: 2.5px; border-radius: 4px; opacity: 0.9; }
.p2-scl .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #5A6275; border-radius: 1px; transform: translateX(-50%); }
.p2-scl .dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(20,28,48,0.3); transform: translate(-50%, -50%); }
.p2-scl .caps { position: relative; display: flex; justify-content: space-between; margin-top: 8px; font-size: 9.5px; color: var(--text-3); height: 13px; font-variant-numeric: tabular-nums; }
.p2-scl .caps .min { position: absolute; transform: translateX(-50%); font-weight: 600; color: var(--text-2); }

/* ДРР / ДРРП — плитки */
.p2-drr2 { flex: 1; border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; background: #F7F8FB; min-width: 0; }
.p2-drr2 .h { font-size: 10.5px; font-weight: 500; color: var(--text-2); display: flex; align-items: center; white-space: nowrap; }
.p2-drr2 .v { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -0.01em; }
.p2-drr2 .s { font-size: 10px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p2-drr2.ok { background: var(--green-weak); border-color: #C4E8D6; }
.p2-drr2.ok .v { color: var(--green); }
.p2-drr2.warn { background: var(--amber-weak); border-color: #F0DCB4; }
.p2-drr2.warn .v { color: #C98A1E; }

/* дети тела панели не сжимаются (вердикт с overflow:hidden схлопывался) */
.pr-dbody > * { flex: none; }
.p2-scl .caps .min { white-space: nowrap; }

/* ================= v3: новые стили ================= */

/* бейдж «нет рек.» */
.p2-norec { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* подсветка поиска */
.p2-hl { background: #FFF3C4; border-radius: 2px; font-weight: 500; }

/* спарклайн: состояние «копится» */
.p2-spark-pending { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.p2-spark-pending .dots { display: inline-flex; gap: 3px; }
.p2-spark-pending .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); display: block; }

/* crit-состояние ДРРП */
.p2-drr2.crit { background: var(--rose-weak); border-color: #F3D2D9; }
.p2-drr2.crit .v { color: var(--rose); }
.p2-drr2 .v.loss { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--rose); }
.p2-drr2 .v.loss svg { flex: none; }

/* «?»-поповер с фикс-позиционированием */
.p2-qpop { display: block; background: #232838; color: #E7EAF2; border-radius: 10px; padding: 9px 12px; font-size: 11.5px; line-height: 1.5; font-weight: 400; text-transform: none; letter-spacing: 0; text-align: left; box-shadow: var(--shadow-pop); z-index: 9999; pointer-events: none; white-space: normal; max-width: 232px; }

/* копируемые элементы в шапке панели */
.p2-copyable { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.p2-copyable .p2-copy-ic { opacity: 0; color: var(--text-3); transition: opacity .12s; flex: none; }
.p2-copyable:hover .p2-copy-ic { opacity: 1; }
.p2-copyable .p2-copy-ok { color: var(--green); flex: none; }

/* расходы: ссылка «скрыть/показать статьи» */
.pr-exp-toggle-lnk { font-size: 11px; color: var(--accent-ink); cursor: pointer; white-space: nowrap; margin-left: 8px; }
.pr-exp-toggle-lnk:hover { text-decoration: underline; }

/* диаграмма «Куда уходит цена» */
.p2-alloc { border: 1px solid var(--border); border-radius: 14px; padding: 13px 14px; background: var(--surface); }
.p2-alloc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.p2-alloc-head .t { font-size: 12px; color: var(--text-2); }
.p2-alloc-head .t b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.p2-alloc-pocket { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.p2-alloc-pocket b { font-size: 14px; font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; }
.p2-alloc-pocket .pc { color: var(--text-3); font-variant-numeric: tabular-nums; }
.p2-alloc-pocket.loss b { color: var(--rose); }
.p2-alloc-bar { display: flex; height: 18px; border-radius: 6px; overflow: hidden; margin: 11px 0 10px; background: #F2F4F9; box-shadow: inset 0 0 0 1px rgba(20,28,48,0.04); }
.p2-alloc-bar .seg { height: 100%; transition: width .3s ease; }
.p2-alloc-bar .seg + .seg { box-shadow: inset 1px 0 0 rgba(255,255,255,0.55); }
.p2-alloc-bar .seg.pf { box-shadow: inset 1px 0 0 rgba(255,255,255,0.7); }
.p2-alloc-legend { display: flex; flex-wrap: wrap; gap: 5px 13px; }
.p2-alloc-legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); white-space: nowrap; }
.p2-alloc-legend .lg i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.p2-alloc-legend .lg b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.p2-alloc-legend .lg.pf b { color: var(--green); }
.p2-alloc-legend .lg.pf.loss b { color: var(--rose); }
.p2-alloc-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--accent-ink); }
.p2-alloc-toggle .r { display: inline-flex; align-items: center; gap: 7px; color: var(--text-3); font-weight: 400; }
.p2-alloc-toggle:hover .r { color: var(--text-2); }

/* ---------- пейджер ---------- */
.p2-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.p2-pager-cnt { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p2-pager-nav { display: flex; align-items: center; gap: 3px; }
.p2-pager-sz { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.p2-pgbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; font-weight: 400; color: var(--text-2); cursor: pointer; transition: background .12s, border-color .12s, color .12s; font-variant-numeric: tabular-nums; }
.p2-pgbtn:hover:not(:disabled) { background: var(--accent-weak); border-color: var(--accent-weak-2); color: var(--accent-ink); }
.p2-pgbtn.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.p2-pgbtn:disabled { opacity: 0.35; cursor: default; }
.p2-pgdots { font-size: 12px; color: var(--text-3); padding: 0 4px; line-height: 30px; }

/* ---------- фото: квадратная плитка с contain ---------- */
.p2-thumb-img { background: #F5F7FA; border: 1px solid var(--border); cursor: zoom-in; overflow: hidden; }
.p2-thumb-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- лайтбокс фото ---------- */
.p2-zoom-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.72); display: flex; align-items: center; justify-content: center; animation: pr-fade .16s ease; }
.p2-zoom-img { max-width: min(86vw, 680px); max-height: 80vh; object-fit: contain; border-radius: 14px; box-shadow: 0 8px 48px rgba(0,0,0,0.38); }
.p2-zoom-close { position: fixed; top: 18px; right: 20px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.2); display: grid; place-items: center; transition: background .14s; }
.p2-zoom-close:hover { background: rgba(255,255,255,0.22); }

/* ---------- сводка: адаптивный шрифт крупных значений ---------- */
.p2-sum-val-fit { font-size: clamp(15px, 1.5vw, 22px); }
.p2-sum-val-green { color: var(--green); }


/* ============ финальная сборка панели: вердикт + решение (prices_v4 / TASK_148) ============ */
/* вердикт — цельный блок: шапка в строку + переход + порог */
.p2v { display: flex; flex-direction: column; gap: 11px; border: 1px solid #CBD6FB; border-radius: 15px; padding: 12px; background: linear-gradient(160deg, #FAFBFF, #F7F5FF 70%, #FBFAFF); }
.p2v-head { display: flex; align-items: center; gap: 7px; }
.p2v-head .sp { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #fff; background: linear-gradient(135deg, #7E8EF8, #9168F2); box-shadow: 0 3px 10px -3px rgba(124,83,238,0.55); flex: none; }
.p2v-head .tt { font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.p2v-head .dot { color: var(--text-3); }
.p2v-head .vb { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; color: var(--accent-ink); white-space: nowrap; }
.p2v-head .vdir { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; flex: none; }
.p2v-head .vdir.same { background: #E6E9F1; color: var(--text-3); }
.p2v-head .vdir.up { background: var(--green-weak); color: var(--green); }
.p2v-head .vdir.down { background: var(--amber-weak); color: var(--amber); }
.p2v-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: linear-gradient(102deg, #fff 0%, #fff 40%, #F5F3FF 72%, #EFEBFE 100%); }
.p2v-flow .side { display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; min-width: 0; }
.p2v-flow .side .cap { display: flex; align-items: center; gap: 5px; font-size: 8.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.p2v-flow .side.rec .cap { color: #6A3FCF; }
.p2v-flow .side .cap .sp { display: grid; place-items: center; width: 13px; height: 13px; border-radius: 4px; color: #fff; background: linear-gradient(135deg, #9C7BF6, #8B5CF6); flex: none; }
.p2v-flow .side .price { font-size: 21px; font-weight: 600; letter-spacing: -0.027em; line-height: 1.05; white-space: nowrap; }
.p2v-flow .side.rec .price { color: #3A2C9E; }
.p2v-flow .side .meta { display: flex; align-items: baseline; gap: 6px; font-size: 11px; white-space: nowrap; }
.p2v-flow .side .meta b { font-weight: 700; }
.p2v-flow .side .meta i { font-style: normal; color: var(--text-2); font-size: 10.5px; }
.p2v-flow .mid { display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.p2v-solo { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; background: #fff; }
.p2v-solo .cap { font-size: 8.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.p2v-solo .price { font-size: 21px; font-weight: 600; letter-spacing: -0.027em; }
.p2v-solo .meta { display: flex; gap: 6px; font-size: 11px; align-items: baseline; }
.p2v-solo .meta b { font-weight: 700; } .p2v-solo .meta i { font-style: normal; color: var(--text-2); }
/* дельта-пилюля: зелёная — лучше, красная — хуже */
.dpill { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; border-radius: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; border: 1px solid transparent; }
.dpill .dv { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; line-height: 1; }
.dpill .dl { font-size: 8px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: .8; }
.dpill.up { background: var(--green-weak); border-color: #BFE6D0; color: #157A53; }
.dpill.down { background: var(--rose-weak); border-color: #F3D2D9; color: #B23A52; }
.dpill.same { background: #EFF1F5; border-color: #E2E7EF; color: var(--text-3); }
/* строка-порог */
.p2v-floor { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,0.7); border: 1px solid var(--border); font-size: 10.5px; color: var(--text-2); }
.p2v-floor .fi { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; background: var(--amber-weak); color: var(--amber); flex: none; }
.p2v-floor b { font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.p2v-floor .gap { margin-left: auto; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p2v-floor.warn .gap { color: #92671A; font-weight: 600; }
.p2v-sub { font-size: 10px; color: var(--text-3); text-align: center; letter-spacing: 0.01em; padding: 0 4px; }

/* решение агента — строки по рычагу + риск-модификатор */
.p2lr { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 12px; }
.p2lr .ic { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; flex: none; background: #fff; }
.p2lr .kk { font-size: 9px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; flex: none; width: 38px; color: var(--text-3); }
.p2lr .vv { flex: 1; min-width: 0; font-size: 11px; font-weight: 400; line-height: 1.4; color: var(--text-2); }
.p2lr .vv b { font-weight: 600; }
.p2lr.lv-price { background: var(--green-weak); }
.p2lr.lv-price .ic { color: var(--green); box-shadow: inset 0 0 0 1px #BFE6D0; } .p2lr.lv-price .kk { color: #157A53; } .p2lr.lv-price .vv b { color: #157A53; }
.p2lr.lv-boost { background: var(--amber-weak); }
.p2lr.lv-boost .ic { color: var(--amber); box-shadow: inset 0 0 0 1px #F0DCB4; } .p2lr.lv-boost .kk { color: #92671A; } .p2lr.lv-boost .vv b { color: #92671A; }
.p2lr.lv-promo { background: var(--violet-weak); }
.p2lr.lv-promo .ic { color: var(--violet); box-shadow: inset 0 0 0 1px #E1D4FB; } .p2lr.lv-promo .kk { color: #6A3FCF; } .p2lr.lv-promo .vv b { color: #6A3FCF; }
.p2lr.none { background: #F4F6FA; }
.p2lr.none .ic { color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border); } .p2lr.none .vv { color: var(--text-3); }
.p2lr.risk { background: var(--rose-weak); box-shadow: inset 0 0 0 1px #F3D2D9; }
.p2lr.risk .ic { color: var(--rose); box-shadow: inset 0 0 0 1px #F3D2D9; } .p2lr.risk .kk { color: #B23A52; } .p2lr.risk .vv { color: #B23A52; } .p2lr.risk .vv b { color: #B23A52; font-weight: 600; }
.p2lr-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: #fff; box-shadow: var(--shadow-xs); font-size: 11px; font-weight: 600; color: var(--text-2); white-space: nowrap; cursor: not-allowed; font-family: inherit; }
.p2lr-btn .soon { font-size: 7.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 4px; border-radius: 4px; background: #EEF1F6; color: var(--text-3); }
.p2lr-btn.primary { border-color: transparent; background: var(--accent); color: #fff; box-shadow: 0 4px 11px -4px rgba(91,124,246,0.6); }
.p2lr-btn.primary .soon { background: rgba(255,255,255,0.26); color: #fff; }
.p2lr .chev { flex: none; color: currentColor; opacity: .5; transition: transform .2s; }
.p2lr.open .chev { transform: rotate(90deg); }
.p2lr.clk { cursor: pointer; }
/* акции списком */
.p2pl { border: 1px solid var(--border); border-radius: 11px; padding: 8px; display: flex; flex-direction: column; gap: 7px; background: #FBFCFE; margin-top: -2px; }
.p2pl-item { border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.p2pl-item.go { border-color: #BFE6D0; background: rgba(231,246,239,0.4); }
.p2pl-item.no { border-color: #F3D2D9; background: rgba(252,236,239,0.4); }
.p2pl-top { display: flex; align-items: center; gap: 8px; }
.p2pl-name { font-size: 11.5px; font-weight: 600; color: var(--text); }
.p2pl-vd { margin-left: auto; font-size: 8.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 20px; flex: none; }
.p2pl-vd.go { background: var(--green-weak); color: #157A53; }
.p2pl-vd.no { background: var(--rose-weak); color: #B23A52; }
.p2pl-row { display: flex; align-items: center; gap: 8px; }
.p2pl-stats { flex: 1; min-width: 0; font-size: 10.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.p2pl-stats b { font-weight: 600; color: var(--text); white-space: nowrap; }
.p2pl-row .p2lr-btn { height: 26px; padding: 0 9px; }
.p2pl-row .p2lr-btn.go { border-color: transparent; background: var(--green); color: #fff; box-shadow: 0 3px 9px -3px rgba(31,158,110,0.5); }
.p2pl-row .p2lr-btn.go .soon { background: rgba(255,255,255,0.26); color: #fff; }
/* Валовая мельче — вспомогательная в тройке маржи */
.p2-m3 .cell.g .pct { font-size: 15px; color: var(--text-2); }

/* тумблер базы разбора */
.p2-basetgl { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 1px; }
.p2-basetgl-seg { display: flex; width: 100%; }
.p2-basetgl-seg button { flex: 1; height: 33px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.p2-tgl-spark { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 5px; color: #fff; background: linear-gradient(135deg, #7E8EF8, #9168F2); flex: none; box-shadow: 0 1px 4px -1px rgba(124,83,238,0.6); }
.p2-basetgl-seg button.on .p2-tgl-spark { box-shadow: 0 2px 7px -2px rgba(124,83,238,0.7); }
.p2-basetgl-cap { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-2); padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border); background: #F7F8FB; flex-wrap: wrap; }
.p2-basetgl-cap .ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #fff; color: var(--text-3); flex: none; box-shadow: inset 0 0 0 1px rgba(20,28,48,0.07); }
.p2-basetgl-cap .tx { color: var(--text-2); }
.p2-basetgl-cap .chip { font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); padding: 2px 8px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px rgba(20,28,48,0.08); }
.p2-basetgl-cap .muted { color: var(--text-3); }
.p2-basetgl-cap.rec { border-color: var(--accent-weak-2); background: linear-gradient(110deg, #F4F5FF, #FBF8FF); }
.p2-basetgl-cap.rec .ic { color: var(--accent); background: #fff; box-shadow: inset 0 0 0 1px var(--accent-weak-2); }
.p2-basetgl-cap.rec .tx { color: var(--accent-ink); }
.p2-basetgl-cap .chip.rec { color: var(--accent-ink); background: #fff; box-shadow: inset 0 0 0 1px var(--accent-weak-2); }
.p2-basetgl-note { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-3); padding: 0 2px; }
.p2-basetgl-note svg { flex: none; color: var(--text-3); }

/* обновлённый .p2-decs (решение агента — блок-обёртка) */
.p2-decs { border: 1px solid var(--border); border-radius: 14px; padding: 11px; background: linear-gradient(150deg, #FAFAFF 0%, #FCFBFF 55%, var(--surface) 100%); }
.p2-decs-h { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); margin: 1px 2px 9px; }
.p2-decs-spark { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; color: #fff; background: linear-gradient(135deg, #7E8EF8, #9168F2); box-shadow: 0 2px 7px -2px rgba(124,83,238,0.55); }
.p2-decs-rows { display: flex; flex-direction: column; gap: 6px; }
