/* GreenLeaf — структура партнёрской сети. Дополняет cabinet.css. */

/* ---------- Полноэкранная раскладка ---------- */
.net-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.net-toolbar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid var(--border, #e6e8ec);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  z-index: 5;
}
.net-seg {
  display: inline-flex; border: 1px solid var(--border, #d9dde3); border-radius: 10px; overflow: hidden;
}
.net-seg button {
  appearance: none; border: 0; background: #fff; color: #4a4f57;
  padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.net-seg button + button { border-left: 1px solid var(--border, #e6e8ec); }
.net-seg button.is-active { background: #547d1c; color: #fff; }
.net-tools-sp { flex: 1 1 auto; }
.net-iconbtn {
  appearance: none; width: 34px; height: 34px; border: 1px solid var(--border, #d9dde3);
  background: #fff; border-radius: 9px; cursor: pointer; color: #3a3f47;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700;
}
.net-iconbtn:hover { background: #f4f6f8; }
.net-iconbtn:disabled { opacity: .4; cursor: default; }
.net-slotsToggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #5b616b; user-select: none; }

/* Направления: ▲ вверх, ◀ ▼ ▶ во втором ряду (фокус — отдельная кнопка в тулбаре). */
.net-pad { display: inline-grid; grid-template-columns: repeat(3, 30px); grid-template-rows: repeat(2, 24px); gap: 2px; }
.net-pad button { appearance: none; border: 1px solid var(--border,#d9dde3); background:#fff; border-radius:6px; cursor:pointer; color:#3a3f47; display:flex;align-items:center;justify-content:center; font-size:13px; }
.net-pad button:hover { background:#f4f6f8; }
.net-pad button:disabled { opacity:.35; cursor:default; }
.net-pad .pad-up { grid-column: 2; grid-row: 1; }
.net-pad .pad-left { grid-column: 1; grid-row: 2; }
.net-pad .pad-down { grid-column: 2; grid-row: 2; }
.net-pad .pad-right { grid-column: 3; grid-row: 2; }

/* ---------- Поиск в тулбаре ---------- */
.net-search { position: relative; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border, #d9dde3); border-radius: 10px; padding: 0 8px; height: 34px; color: #6b7178; }
.net-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; width: 170px; color: #2b2f36; }
.net-search-results {
  position: absolute; top: 40px; left: 0; min-width: 240px; max-width: 320px; max-height: 260px; overflow: auto;
  background: #fff; border: 1px solid #e2e6ea; border-radius: 10px; box-shadow: 0 10px 28px rgba(20,34,24,.16); z-index: 40; padding: 5px;
}
.sr-item { display: block; width: 100%; text-align: left; appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; color: #2b2f36; padding: 7px 9px; border-radius: 7px; }
.sr-item:hover { background: #f2f7ec; }
.sr-ext { color: #99a0a8; font-size: 11.5px; }
.sr-empty { padding: 9px; color: #99a0a8; font-size: 13px; }

/* ---------- Мини-карта ---------- */
.net-mm { position: absolute; right: 14px; bottom: 14px; width: 210px; height: 140px; z-index: 20;
  background: rgba(255,255,255,.92); border: 1px solid #d9dde3; border-radius: 10px; box-shadow: 0 4px 14px rgba(20,34,24,.12); overflow: hidden; }
.net-mm.is-min { width: 40px; height: 34px; }
.net-mm.is-min .net-mm-canvas, .net-mm.is-min .net-mm-vp { display: none; }
.net-mm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.net-mm-vp { position: absolute; border: 1.5px solid #2f7d1e; background: rgba(47,125,30,.10); pointer-events: none; border-radius: 2px; }
.net-mm-toggle { position: absolute; top: 3px; right: 3px; z-index: 2; width: 24px; height: 22px; border: 0; border-radius: 6px;
  background: rgba(255,255,255,.85); cursor: pointer; font-size: 13px; line-height: 1; }
.net-mm-toggle:hover { background: #fff; }
@media (max-width: 640px) { .net-mm { width: 140px; height: 96px; right: 8px; bottom: 8px; } }

/* ---------- Ручка сворачивания ветки ---------- */
.net-collapse {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%); z-index: 3;
  min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; cursor: pointer;
  border: 2px solid #f0a020; background: #fff; color: #7a5a12; font-size: 11px; font-weight: 800; line-height: 1;
}
.net-node.st-self .net-collapse { border-color: #e6539b; }
.net-collapse:hover { background: #fff6e6; }
.net-node.is-collapsed .net-card { border-style: dashed; }

/* Подсветка найденного узла */
.net-node.net-hit .net-card { box-shadow: 0 0 0 3px #f0a020, 0 6px 18px rgba(240,160,32,.35); }

/* ---------- Холст ---------- */
.net-stage {
  position: relative; flex: 1 1 auto; overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(84,125,28,.10) 1px, transparent 0) 0 0 / 26px 26px,
    #f5f7f4;
  touch-action: none; cursor: grab;
}
.net-stage.is-panning { cursor: grabbing; }
/* NB: без will-change/translateZ — иначе composited-слой холста перекрывает fixed-модалки (z-index не спасает). */
.net-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.net-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.net-edges path { fill: none; stroke: #b9c4a8; stroke-width: 2; }

/* ---------- Узел ---------- */
.net-node {
  position: absolute; width: 180px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center;
}
.net-ring {
  width: 58px; height: 58px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: #4c9a2a; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .5px;
  border: 4px solid #f0a020; box-shadow: 0 2px 6px rgba(0,0,0,.18); cursor: pointer; z-index: 2;
}
.net-node.st-self  .net-ring { border-color: #e6539b; }
.net-node.st-active .net-ring { border-color: #f0a020; }
.net-node.st-inactive .net-ring { background: #8a9099; border-color: #b6bcc4; }
.net-node.st-prospect .net-ring { background: #3f7fd0; border-color: #78a6e0; }
.net-card {
  margin-top: -12px; padding: 16px 10px 9px; width: 100%; box-sizing: border-box;
  background: #fff; border: 1px solid #e2e6ea; border-radius: 12px; text-align: center;
  box-shadow: 0 2px 8px rgba(30,40,20,.07); cursor: pointer;
}
.net-card:hover { border-color: #cdd6c2; box-shadow: 0 4px 14px rgba(30,40,20,.12); }
.net-ext { font-size: 11px; color: #8b9096; font-variant-numeric: tabular-nums; }
.net-name { font-size: 13.5px; font-weight: 700; color: #2b2f36; line-height: 1.2; margin: 2px 0; word-break: break-word; }
.net-lvl { font-size: 11px; color: #6b7178; }
.net-tariff { font-size: 11px; color: #547d1c; font-weight: 600; margin-top: 1px; }
.net-extsp { font-size: 10.5px; color: #8e5bd0; font-weight: 600; margin-top: 1px; }
/* вышестоящий (мой спонсор) */
.net-upbadge { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 3;
  background: #3f7fd0; color: #fff; font-size: 9.5px; font-weight: 800; padding: 1px 7px; border-radius: 8px; letter-spacing: .3px; }
.net-node.is-upline .net-ring { border-style: dashed; }

/* строка спонсора / внешний спонсор / цвет — в карточке */
.net-sponsor-row { display: flex; gap: 8px; align-items: stretch; }
.net-sponsor-row .select { flex: 1 1 auto; }
.net-sponsor-row .btn { flex: 0 0 auto; white-space: nowrap; }
.net-extsp-fields { margin-top: 8px; padding: 8px; border: 1px dashed #d9dde3; border-radius: 8px; }
.net-color-row { display: flex; align-items: center; gap: 10px; }
.net-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.net-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d9dde3; cursor: pointer; padding: 0; }
.net-swatch.is-active { box-shadow: 0 0 0 2px #2b2f36; }
.net-swatch-status { width: auto; border-radius: 8px; padding: 0 8px; height: 24px; font-size: 11px; font-weight: 700; color: #5b616b; background: #f1f3f5; }
.net-color-row input[type=color] { width: 40px; height: 30px; padding: 0; border: 1px solid #d9dde3; border-radius: 8px; background: none; cursor: pointer; }
.net-legs {
  margin-top: 6px; display: flex; align-items: stretch; justify-content: center;
  font-size: 12px; font-weight: 700; color: #547d1c; font-variant-numeric: tabular-nums;
}
.net-legs span { padding: 0 9px; }
.net-legs span + span { border-left: 1px solid #e2e6ea; }
.net-add-mini {
  margin-top: 7px; appearance: none; border: 1px dashed #b7c2a6; background: #f4f8ef; color: #547d1c;
  border-radius: 8px; font-size: 11.5px; padding: 3px 8px; cursor: pointer;
}
.net-add-mini:hover { background: #eaf2df; }

/* ---------- Пустой слот ---------- */
.net-slot {
  position: absolute; width: 58px; height: 58px; border-radius: 50%;
  transform: translateX(61px); /* center under 180px node's leg column start */
  display: flex; align-items: center; justify-content: center;
  background: #eceff2; border: 3px dashed #c4cad1; color: #9aa1a9; font-size: 22px; font-weight: 700;
  cursor: pointer; z-index: 1;
}
.net-slot:hover { background: #e7f1da; border-color: #9fbb76; color: #6f8a44; }

/* ---------- Модалки: сетка полей ---------- */
.net-form .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.net-form .field { margin-bottom: 10px; }
.net-legchoice { display: flex; gap: 10px; }
.net-legchoice label { flex: 1; display: flex; align-items: center; gap: 6px; border: 1px solid var(--border,#d9dde3); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; }
.net-legchoice input { accent-color: #547d1c; }
.net-modal-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.net-modal-actions .sp { flex: 1 1 auto; }
.net-danger { color: #c0392b; }
.net-slot-note { font-size: 12px; color: #6b7178; margin: 0 0 10px; }

/* ---------- Компактные формы в модалках (карточка/добавление/вышестоящий) ---------- */
.modal-card .net-form label { font-size: 12px; margin-bottom: 3px; font-weight: 600; }
.modal-card .net-form .field { margin-bottom: 8px; }
.modal-card .net-form input,
.modal-card .net-form select,
.modal-card .net-form textarea { padding: 6px 9px; font-size: 13px; border-radius: 8px; }
.modal-card .net-form textarea { min-height: 44px; }
.modal-card .net-form .grid-2 { gap: 6px 12px; }
.modal-card .net-form .hint { font-size: 11px; margin-top: 2px; }
.modal-card .net-form fieldset.socials { padding: 8px 10px; margin: 4px 0 8px; }
.modal-card .net-form fieldset.socials legend { font-size: 12px; }
.modal-card .modal-body { padding-top: 10px; padding-bottom: 10px; }
.modal-card #cardBalance { margin-bottom: 8px !important; padding: 6px 10px !important; font-size: 12px; }
.net-swatch { width: 20px; height: 20px; }
.net-swatch-status { width: auto; height: 20px; font-size: 10.5px; padding: 0 7px; }
.net-color-row input[type=color] { width: 34px; height: 26px; }
.net-modal-actions { flex-wrap: wrap; gap: 6px; }

/* ---------- Контекст-меню (правый клик) ---------- */
.net-ctx {
  position: fixed; z-index: 300; min-width: 210px; padding: 6px;
  background: #fff; border: 1px solid #e2e6ea; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20, 34, 24, .18); user-select: none;
}
.ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13.5px; color: #2b2f36; text-align: left;
  padding: 8px 10px; border-radius: 8px;
}
.ctx-item:hover { background: #f2f7ec; }
.ctx-item .ctx-ic { width: 18px; text-align: center; flex: 0 0 auto; font-size: 14px; }
.ctx-item.ctx-danger { color: #c0392b; }
.ctx-item.ctx-danger:hover { background: #fdecea; }
.ctx-sep { height: 1px; background: #eef0f2; margin: 5px 4px; }

/* ---------- Панель доходности ---------- */
.inc-block { border: 1px solid var(--border, #e6e8ec); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.inc-block-h { font-weight: 700; font-size: 13.5px; color: #2b2f36; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.inc-res { margin-top: 6px; border-top: 1px solid #eef0f2; }
.inc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f1f3f5; }
.inc-k { color: #4a4f57; font-size: 13px; }
.inc-k small { display: block; color: #99a0a8; font-size: 11px; font-weight: 400; }
.inc-v { font-variant-numeric: tabular-nums; font-weight: 700; color: #2b2f36; white-space: nowrap; }
.inc-total { border-bottom: 0; margin-top: 2px; }
.inc-total .inc-k { font-weight: 800; color: #1f2329; font-size: 14px; }
.inc-total .inc-v { color: #2f7d1e; font-size: 18px; }
.inc-formula { margin: 8px 0 0; font-size: 11px; color: #8b9096; font-family: ui-monospace, monospace; word-break: break-word; }
.inc-ev { margin-bottom: 6px; }
.inc-evrow { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f1f3f5; font-size: 13px; }
.inc-evwho { color: #2b2f36; font-weight: 600; }
.inc-evwho em { color: #2f7d1e; font-style: normal; font-weight: 700; }
.inc-evsum { color: #4a4f57; font-variant-numeric: tabular-nums; text-align: right; }
.inc-evrow.is-zero { opacity: .55; }
.inc-evrow.is-zero .inc-evsum { color: #8b9096; }

/* маркер-точка бонуса (цвета = слои на дереве) */
.inc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.inc-k small { margin-left: 15px; }

/* доли бонусов одной полосой */
.inc-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #f1f3f5; margin: 12px 0 2px; }
.inc-bar > span { display: block; height: 100%; transition: width .18s ease; }

/* «?» — справка в шапке и подсказки у полей */
.inc-help-btn, .inc-i {
  appearance: none; border: 1px solid #d7dbe0; background: #fff; color: #6b7280;
  width: 17px; height: 17px; border-radius: 50%; padding: 0; cursor: pointer;
  font: 700 11px/15px system-ui, sans-serif; text-align: center; flex: 0 0 auto;
}
.inc-help-btn { margin-left: 7px; vertical-align: 2px; }
.inc-i { margin-left: 5px; vertical-align: 1px; }
.inc-help-btn:hover, .inc-i:hover, .inc-help-btn[aria-expanded="true"] { background: #2f7d1e; border-color: #2f7d1e; color: #fff; }
.inc-help {
  background: #f6f9f2; border: 1px solid #dfe9d4; border-radius: 12px;
  padding: 10px 12px; margin-bottom: 12px; font-size: 12.5px; line-height: 1.5; color: #444a52;
}
.inc-help p { margin: 0 0 7px; }
.inc-help p:last-child { margin-bottom: 0; }
.inc-help-warn { color: #7a5b12; background: #fdf6e3; border-radius: 8px; padding: 6px 8px; }

/* всплывающая подсказка у «?» рядом с полем */
.inc-tip {
  position: fixed; z-index: 400; max-width: 260px; padding: 8px 10px;
  background: #232a31; color: #fff; border-radius: 9px; font-size: 12px; line-height: 1.45;
  box-shadow: 0 8px 24px rgba(20, 34, 24, .28); pointer-events: none;
}

/* поля сценария: выравненная сетка + «по структуре: N · вернуть» */
.inc-grid { align-items: start; }
.inc-grid .field { margin-bottom: 4px; }
.inc-grid label { display: flex; align-items: center; }
.inc-fact { display: block; margin-top: 3px; font-size: 11px; color: #99a0a8; }
.inc-fact b { color: #6b7280; font-weight: 600; }
.inc-fact button {
  appearance: none; border: 0; background: none; padding: 0 0 0 6px; cursor: pointer;
  font: inherit; color: #2f7d1e; font-weight: 600; text-decoration: underline;
}
.inc-lb-sub { font-weight: 400; color: #99a0a8; font-size: 11px; margin-left: 6px; }

/* формула — под раскрывашкой */
.inc-fx { margin-top: 8px; }
.inc-fx summary { cursor: pointer; font-size: 11.5px; color: #8b9096; list-style: none; }
.inc-fx summary::-webkit-details-marker { display: none; }
.inc-fx summary::before { content: '▸ '; }
.inc-fx[open] summary::before { content: '▾ '; }

/* блок «Событие»: пакет + куда встанет новичок */
.inc-ev-top { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.inc-ev-top .field { margin-bottom: 0; min-width: 200px; }
.inc-slot { margin: 0 0 4px; font-size: 12px; color: #6b7280; }
.inc-slot b { color: #2b2f36; }

@media (max-width: 640px) {
  .net-form .grid-2 { grid-template-columns: 1fr; }
  .net-toolbar { gap: 6px; padding: 7px 9px; }
  .net-seg button { padding: 6px 11px; }
}

/* ========== Режим «Бонусы»: слои, потоки, разбор ========== */
.net-iconbtn#btnBonus.is-active { background: #547d1c; color: #fff; border-color: #547d1c; }

/* Чипы-слои в тулбаре */
.net-layers { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bns-chip {
  appearance: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--border, #d9dde3); background: #fff; color: #6b7178;
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
}
.bns-chip .bns-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); opacity: .45; }
.bns-chip.is-on { color: #2b2f36; border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.bns-chip.is-on .bns-dot { opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }

/* Агрегатный бейдж «+₽» на карточке */
.net-recv {
  position: absolute; top: -10px; right: -6px; z-index: 4;
  background: #547d1c; color: #fff; font-size: 10.5px; font-weight: 800;
  font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(30,40,20,.2); white-space: nowrap;
}

/* Потоки бонусов */
.net-flows { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.net-flows .net-flow { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 7 9; opacity: .9; }
.net-flows .net-pairline { fill: none; stroke: #7c3aed; stroke-width: 3; stroke-linecap: round; opacity: .95; }
@media (prefers-reduced-motion: no-preference) {
  .net-flows .net-flow { animation: bnsMarch 1s linear infinite; }
}
@keyframes bnsMarch { to { stroke-dashoffset: -32; } }

/* Денежный чип у получателя */
.net-pay {
  position: absolute; z-index: 5; transform: translate(-50%, -100%);
  background: #fff; border: 1.5px solid var(--pc, #547d1c); color: var(--pc, #547d1c);
  font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 2px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(30,40,20,.14); white-space: nowrap; pointer-events: none;
}
.net-pay .pl { font-size: 8.5px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; opacity: .8; }
.net-pay .pe { color: #8b9096; font-weight: 700; }

/* Подсветка фокуса / пары / приглушение */
.net-node.bns-dim { opacity: .34; filter: saturate(.6); }
.net-node.bns-focus .net-card { border-color: #547d1c; box-shadow: 0 0 0 2px #547d1c, 0 6px 18px rgba(84,125,28,.28); }
.net-node.bns-self .net-ring { box-shadow: 0 0 0 3px rgba(84,125,28,.5), 0 2px 6px rgba(0,0,0,.18); }
.net-node.bns-self .net-card { border-color: #2f7d1e; box-shadow: 0 0 0 2px #2f7d1e, 0 6px 18px rgba(47,125,30,.30); }
.net-node.bns-pair .net-card { border-color: #7c3aed; box-shadow: 0 0 0 2px #7c3aed, 0 6px 18px rgba(124,58,237,.25); }

/* Раскладка «холст + панель»: панель — flex-сосед, сужает холст (а не перекрывает) */
.net-body { display: flex; flex: 1 1 auto; min-height: 0; }
.net-bpanel {
  flex: 0 0 340px; width: 340px; align-self: stretch;
  background: #fff; border-left: 1px solid #e2e6ea; box-shadow: -6px 0 20px rgba(20,34,24,.06);
  overflow-y: auto; padding: 16px 16px 24px; box-sizing: border-box;
}
.net-bpanel[hidden] { display: none; }
.bp-empty { font-size: 13px; color: #6b7178; line-height: 1.55; }
.bp-head { display: flex; align-items: center; gap: 11px; padding-bottom: 12px; border-bottom: 1px solid #eef0f2; margin-bottom: 14px; }
.bp-htx { flex: 1 1 auto; min-width: 0; }
.bp-close { flex: 0 0 auto; width: 28px; height: 28px; border: 1px solid var(--border, #e2e6ea); background: #fff; border-radius: 8px; cursor: pointer; color: #6b7178; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.bp-close:hover { background: #f4f6f8; color: #2b2f36; }
.bp-ring { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: #4c9a2a; color: #fff; font-weight: 800; font-size: 13px; }
.bp-name { font-size: 14.5px; font-weight: 700; color: #2b2f36; line-height: 1.15; }
.bp-sub { font-size: 11px; color: #8b9096; margin-top: 2px; }
.bp-sec { margin-bottom: 18px; }
.bp-sec h5 { margin: 0 0 9px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #99a0a8; display: flex; align-items: center; gap: 7px; }
.bp-sec h5::after { content: ""; flex: 1; height: 1px; background: #eef0f2; }
.bp-li { font-size: 12.5px; color: #4a4f57; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 4px 0; }
.bp-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.bp-li .bp-l { color: #6b7178; }
.bp-li b { color: #2b2f36; font-variant-numeric: tabular-nums; }
.bp-li .bp-w { width: 100%; padding-left: 13px; font-size: 11.5px; color: #99a0a8; }
.bp-lrow { flex-direction: column; align-items: stretch; gap: 4px; }
.bp-lvtag { display: inline-block; font-size: 10px; font-weight: 800; color: #4a4f57; background: #f1f3f5; border: 1px solid #e6e8ec; padding: 1px 7px; border-radius: 6px; margin-right: 6px; }
.bp-amts { display: flex; flex-wrap: wrap; gap: 8px 14px; padding-left: 2px; }
.bp-amt { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #4a4f57; }
.bp-amt b { color: #2b2f36; font-variant-numeric: tabular-nums; }
.bp-sum { margin-top: 9px; font-size: 12.5px; font-weight: 700; color: #2b2f36; border-top: 1px dashed #e6e8ec; padding-top: 7px; font-variant-numeric: tabular-nums; }
.bp-none { font-size: 12px; color: #99a0a8; font-style: italic; }
.bp-bytype { margin-top: 12px; border-top: 2px solid #eef0f2; padding-top: 11px; }
.bp-bt { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #4a4f57; margin-bottom: 6px; }
.bp-bt span { flex: 1 1 auto; }
.bp-bt b { font-variant-numeric: tabular-nums; color: #2b2f36; }
.bp-total { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 800; color: #1f2329; border-top: 1px dashed #e6e8ec; padding-top: 9px; margin-top: 4px; }
.bp-total span { flex: 1 1 auto; }
.bp-total b { color: #2f7d1e; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .net-body { flex-direction: column; }
  .net-bpanel { flex: 0 0 auto; width: auto; max-height: 46vh; border-left: 0; border-top: 1px solid #e2e6ea; box-shadow: 0 -6px 20px rgba(20,34,24,.06); }
}

/* ---------- Вкладки-сценарии (браузерный стиль) ---------- */
.net-scenbar {
  flex: 0 0 auto;
  display: flex; align-items: stretch; gap: 6px;
  padding: 5px 12px 0;
  background: #f2f4f6;
  border-bottom: 1px solid var(--border, #e6e8ec);
  overflow: hidden;
  z-index: 4;
}
.net-scentabs {
  display: flex; align-items: flex-end; gap: 4px;
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
}
.net-scentabs::-webkit-scrollbar { height: 5px; }
.net-scentabs::-webkit-scrollbar-thumb { background: #cdd3d9; border-radius: 3px; }
.net-scentab {
  appearance: none; border: 1px solid var(--border, #d9dde3); border-bottom: 0;
  background: #e4e8ec; color: #5b616b;
  border-radius: 10px 10px 0 0; padding: 7px 10px 8px 12px;
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  max-width: 220px; position: relative; top: 1px;
  transition: background .12s, color .12s;
}
.net-scentab:hover { background: #eef1f3; color: #3a3f47; }
.net-scentab.is-active {
  background: #fff; color: #1f2329;
  box-shadow: 0 -2px 4px rgba(20,34,24,.05);
  top: 1px; border-color: var(--border, #e6e8ec);
}
.net-scentab-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px;
}
.net-scentab-star { color: #4c9a2a; font-size: 12px; line-height: 1; flex: 0 0 auto; }
.net-scentab.is-active .net-scentab-star { color: #3f8b1f; }
.net-scentab-count {
  font-size: 10.5px; font-weight: 700; color: #99a0a8;
  background: rgba(0,0,0,.05); border-radius: 6px; padding: 1px 5px; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.net-scentab.is-active .net-scentab-count { color: #6b7178; background: rgba(0,0,0,.06); }
.net-scentab-x {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; color: #99a0a8; margin-left: 1px;
}
.net-scentab-x:hover { background: rgba(0,0,0,.09); color: #e05a4d; }
.net-scenbar-actions { display: flex; align-items: flex-end; gap: 4px; padding-bottom: 2px; flex: 0 0 auto; }
.net-scenbtn {
  appearance: none; width: 30px; height: 30px; border: 1px solid var(--border, #d9dde3);
  background: #fff; border-radius: 8px; cursor: pointer; color: #3a3f47;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
}
.net-scenbtn:hover { background: #f4f6f8; }
.net-scenbtn:disabled { opacity: .4; cursor: default; }
@media (max-width: 720px) {
  .net-scenbar { padding: 4px 8px 0; }
  .net-scentab { max-width: 160px; padding: 6px 8px 7px 10px; }
  .net-scentab-name { max-width: 110px; }
}

/* Подсказка-предупреждение в генераторе демо-структуры (замена всей вкладки) */
.net-danger-hint { color: #b3261e; }

/* ---------- Карточка партнёра: сворачиваемые секции ---------- */
.net-fold { border: 1px solid var(--border, #e6e8ec); border-radius: 12px; margin-bottom: 12px; }
.net-fold > summary {
  cursor: pointer; list-style: none; padding: 10px 12px;
  font-size: 13.5px; font-weight: 700; color: #2b2f36;
  display: flex; align-items: center; gap: 8px;
}
.net-fold > summary::-webkit-details-marker { display: none; }
.net-fold > summary::before { content: '▸'; color: #99a0a8; font-weight: 400; }
.net-fold[open] > summary::before { content: '▾'; }
.net-fold[open] > summary { border-bottom: 1px solid #eef0f2; margin-bottom: 10px; }
.net-fold > summary:hover { background: #f7f9f5; border-radius: 12px 12px 0 0; }
.net-fold-sub { font-weight: 400; font-size: 11.5px; color: #99a0a8; margin-left: auto; text-align: right; }
.net-fold > *:not(summary) { padding-left: 12px; padding-right: 12px; }
.net-fold > *:last-child { margin-bottom: 10px; }

/* ---------- Карточка партнёра: «Заработал» ---------- */
.earn { border: 1px solid #ecdfc0; background: #fdfaf2; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.earn-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.earn-head span { font-size: 13.5px; font-weight: 700; color: #7a5a12; }
.earn-head small { display: block; font-size: 11px; font-weight: 400; color: #a08a5c; }
.earn-head b { font-size: 18px; color: #2f7d1e; font-variant-numeric: tabular-nums; }
.earn .inc-bar { margin: 9px 0 4px; background: #efe6d2; }
.earn-item + .earn-item { border-top: 1px solid #f0e7d5; }
.earn-row {
  appearance: none; border: 0; background: none; width: 100%; cursor: pointer; font: inherit;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 7px 0; text-align: left; border-radius: 6px;
}
.earn-row:hover { background: #f7f1e3; }
.earn-k { font-size: 13px; color: #4a4f57; }
.earn-k small { display: block; margin-left: 15px; font-size: 11px; color: #a08a5c; }
.earn-v { font-weight: 700; color: #2b2f36; font-variant-numeric: tabular-nums; white-space: nowrap; }
.earn-row[aria-expanded="true"] { background: #f7f1e3; }
.earn-det { padding: 4px 0 10px 15px; }
.earn-t { width: 100%; border-collapse: collapse; font-size: 12px; }
.earn-t td { padding: 3px 0; border-bottom: 1px solid #f0e7d5; color: #4a4f57; }
.earn-t tr:last-child td { border-bottom: 0; }
.earn-t-m { color: #a08a5c; padding-left: 8px !important; }
.earn-t-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.earn-note { margin: 6px 0 0; font-size: 11.5px; color: #8b8069; line-height: 1.45; }

/* ---------- Доходность: раскрывающиеся строки бонусов ---------- */
.inc-item + .inc-item .inc-rowbtn { border-top: 0; }
.inc-rowbtn {
  appearance: none; background: none; border: 0; border-bottom: 1px solid #f1f3f5;
  width: 100%; cursor: pointer; font: inherit; text-align: left; border-radius: 6px;
}
.inc-rowbtn:hover { background: #f7f9f5; }
.inc-rowbtn[aria-expanded="true"] { background: #f7f9f5; }
.inc-rowbtn .inc-k { flex: 1 1 auto; }
.inc-rowbtn::after { content: '▸'; color: #c3c8ce; margin-left: 8px; font-size: 11px; flex: 0 0 auto; }
.inc-rowbtn[aria-expanded="true"]::after { content: '▾'; }
.inc-det { padding: 2px 0 10px 15px; border-bottom: 1px solid #f1f3f5; }
.inc-res > .inc-total { padding-right: 15px; }   /* выровнять «Итого» с суммами (у строк есть шеврон) */
.inc-steps { margin: 0; padding-left: 18px; font-size: 12px; color: #4a4f57; line-height: 1.6; }
.inc-steps li::marker { color: #b6bcc4; }
.inc-det-note { margin: 6px 0 0; font-size: 11.5px; color: #8b9096; line-height: 1.45; }
.inc-hint-click { margin: 7px 0 0; font-size: 11.5px; color: #a4abb3; }
