/* =====================================================================
   A-Consalting — калькулятор юнит-экономики. Общие стили.
   ===================================================================== */

:root {
  --bg:            #eef2f8;
  --card:          #ffffff;
  --ink:          #101a33;
  --ink-2:        #3d4a68;
  --muted:        #8b97b0;
  --line:         #e2e8f2;
  --line-2:       #eff3f9;

  --brand:        #1a5fe0;
  --brand-dark:   #0f3fa8;
  --brand-soft:   #e8f0ff;

  --green:        #12a45c;
  --green-soft:   #e6f7ee;
  --red:          #d93a3a;
  --amber:        #e8a020;
  --violet:       #6b5ce7;

  --radius:       14px;
  --radius-sm:    9px;
  --shadow:       0 1px 2px rgba(16,26,51,.05), 0 4px 16px rgba(16,26,51,.05);
  --shadow-lg:    0 8px 32px rgba(16,26,51,.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --------------------------- Шапка и вкладки ----------------------- */

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px 10px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  text-align: center;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: var(--brand);
  margin-bottom: 12px;
}
.brand span { color: var(--ink); }

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tab {
  display: block;
  text-align: center;
  text-decoration: none;
}
.tab:hover { text-decoration: none; }

.tab-pill {
  display: block;
  padding: 8px 22px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: 13.5px;
  transition: .15s;
  white-space: nowrap;
}
.tab:hover .tab-pill { border-color: var(--brand); color: var(--brand); }

.tab.active .tab-pill {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tab-note {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* ------------------------------ Каркас ----------------------------- */

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 20px 120px;
}

.page-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.8px;
  margin: 6px 0 10px;
}

.badges { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid #cfe0ff;
}
.badge.warn { background: #fff4e0; color: #8a5a05; border-color: #ffdfa8; }
.badge.ok   { background: var(--green-soft); color: #0a6d3d; border-color: #bfe9d3; }

/* Переключатель FBO/FBS */
.segmented {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin: 0 auto 20px;
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 8px 34px;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: .15s;
}
.segmented button.active { background: var(--brand-soft); color: var(--brand-dark); }

.center { display: flex; justify-content: center; }

/* Двухколоночная сетка */
.layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .page-title { font-size: 24px; }
}

.col { display: flex; flex-direction: column; gap: 16px; }
.col-left { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 4px; }
@media (max-width: 1000px) { .col-left { position: static; max-height: none; overflow: visible; } }

/* ------------------------------ Карточки --------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card.tint { background: linear-gradient(180deg, #f2f6ff, #eaf1ff); border-color: #d7e4ff; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.2px;
}
.card-title .ico {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
}

.section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 12px;
}

/* ------------------------------- Формы ----------------------------- */

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }

.field label,
.field > .lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 5px;
}

.field .hint {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}

input[type="text"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  transition: .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,95,224,.12);
}
input:disabled, input[readonly] { background: var(--line-2); color: var(--ink-2); }

input[type="number"] { -moz-appearance: textfield; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238b97b0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
}

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.row-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }

/* ------------------------------- Кнопки ---------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: .14s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { filter: brightness(.93); color: #fff; }
.btn.amber { background: var(--amber); border-color: var(--amber); color: #fff; }
.btn.amber:hover { filter: brightness(.93); color: #fff; }
.btn.violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.violet:hover { filter: brightness(.93); color: #fff; }
.btn.pink { background: #e8368f; border-color: #e8368f; color: #fff; }
.btn.pink:hover { filter: brightness(.93); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 11.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ------------------------------- KPI ------------------------------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 13px 15px;
}
.kpi .v { font-size: 22px; font-weight: 800; letter-spacing: -.6px; color: var(--green); }
.kpi .v.neg { color: var(--red); }
.kpi .v.neutral { color: var(--brand); }
.kpi .v.muted { color: var(--muted); }
.kpi .k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

/* ------------------------------- P&L ------------------------------- */

.pnl { width: 100%; border-collapse: collapse; }
.pnl th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.pnl th:nth-child(2), .pnl th:nth-child(3) { text-align: right; }
.pnl td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}
.pnl td:nth-child(2), .pnl td:nth-child(3) { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pnl td:nth-child(3) { color: var(--muted); font-weight: 600; width: 78px; }
.pnl tr:last-child td { border-bottom: 0; }

.pnl tr.sub td { color: var(--ink-2); }
.pnl tr.sub td:first-child { padding-left: 8px; }
.pnl tr.subtotal { background: #eef3ff; }
.pnl tr.subtotal td { font-weight: 800; }
.pnl tr.subtotal td:first-child::before { content: "▸ "; color: var(--brand); }
.pnl tr.total td { font-weight: 800; border-top: 1px solid var(--line); }
.pnl tr.result td { font-weight: 800; font-size: 14.5px; color: var(--green); }
.pnl .pos { color: var(--green); }
.pnl .neg { color: var(--ink); }

/* --------------------------- Структура расходов -------------------- */

.struct { display: flex; flex-direction: column; gap: 6px; }
.struct-row { display: grid; grid-template-columns: 108px 1fr; gap: 10px; align-items: center; }
.struct-row .name { font-size: 11.5px; font-weight: 700; color: var(--ink-2); text-align: right; }
.struct-bar {
  position: relative;
  height: 17px;
  background: var(--line-2);
  border-radius: 4px;
  overflow: hidden;
}
.struct-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--brand);
  min-width: 2px;
  transition: width .25s;
}
.struct-bar b {
  position: absolute;
  left: 6px; top: 0;
  line-height: 17px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 3px rgba(0,0,0,.35);
}
.struct-bar b.outside { color: var(--ink-2); text-shadow: none; }

/* --------------------------- Соинвест и налоги --------------------- */

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.kv + .kv { border-top: 1px solid rgba(26,95,224,.08); }
.kv .k { color: var(--ink-2); }
.kv .v { font-weight: 800; font-variant-numeric: tabular-nums; }
.kv.accent .v { color: var(--green); }
.kv.sep { margin-top: 8px; border-top: 1px solid rgba(26,95,224,.2); padding-top: 10px; }

/* ------------------------------ Кластеры --------------------------- */

.cluster-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

.cluster-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.cluster-row {
  display: grid;
  grid-template-columns: 22px 1fr 62px 58px;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
}
.cluster-row:last-child { border-bottom: 0; }
.cluster-row:hover { background: #f7faff; }
.cluster-row .cname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cluster-row input[type="number"] { padding: 4px 6px; font-size: 12px; text-align: right; }
.cluster-row .ctariff {
  text-align: right;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.cluster-row.off { opacity: .45; }

.cluster-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}
.cluster-summary div { display: flex; gap: 5px; align-items: baseline; }
.cluster-summary .k { color: var(--muted); }
.cluster-summary .v { font-weight: 800; }

/* ---------------------------- Нижняя панель ------------------------ */

.actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 30;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 26px;
  line-height: 1.6;
}

/* ------------------------------ Прочее ----------------------------- */

.toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: .22s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.autocomplete { position: relative; }
.ac-list {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.ac-list.open { display: block; }
.ac-item { padding: 8px 11px; cursor: pointer; font-size: 12.5px; border-bottom: 1px solid var(--line-2); }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.sel { background: var(--brand-soft); }
.ac-item .r { float: right; font-weight: 800; color: var(--brand); }
.ac-empty { padding: 10px 11px; color: var(--muted); font-size: 12px; }

.checkbox { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12.5px; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

.stub {
  text-align: center;
  padding: 90px 20px;
}
.stub h2 { font-size: 26px; margin: 0 0 8px; }
.stub p { color: var(--muted); max-width: 460px; margin: 0 auto; }
.stub .big { font-size: 54px; margin-bottom: 14px; }

.scroll-x { overflow-x: auto; }

/* ======================= Мульти-артикул ============================ */

.globals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.multi-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: auto;
  max-height: 70vh;
}

table.multi {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  white-space: nowrap;
}

table.multi thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f6f8fc;
  border-bottom: 1px solid var(--line);
  padding: 8px 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--ink-2);
}
table.multi thead th.num { text-align: right; }

table.multi tbody td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
table.multi tbody tr.art { cursor: pointer; }
table.multi tbody tr.art:hover { background: #f7faff; }
table.multi tbody tr.art.open { background: var(--brand-soft); }
table.multi tbody tr.art.open td { font-weight: 700; }

table.multi td input,
table.multi td select {
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  min-width: 62px;
}
table.multi td input[type="number"] { text-align: right; }
table.multi td.name input { min-width: 150px; font-weight: 700; }
table.multi td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
table.multi td.pos { color: var(--green); }
table.multi td.neg { color: var(--red); }
table.multi td.idx { color: var(--muted); text-align: center; width: 34px; font-weight: 700; }

table.multi tfoot td {
  position: sticky;
  bottom: 0;
  background: #f6f8fc;
  border-top: 1px solid var(--line);
  padding: 9px 6px;
  font-weight: 800;
}

.rowdetail td { background: #fbfcff; padding: 0 !important; }
.rowdetail .inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 2px solid var(--brand-soft);
  white-space: normal;
}
@media (max-width: 900px) { .rowdetail .inner { grid-template-columns: 1fr; } }

.rowdetail .kpis { grid-column: 1 / -1; }
.rowdetail .kpi { box-shadow: none; }

.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  margin-right: 5px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }

.dropzone {
  border: 2px dashed #c3d4f0;
  border-radius: var(--radius);
  background: #f7faff;
  padding: 22px;
  text-align: center;
  margin-bottom: 16px;
  transition: .15s;
}
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

/* ====================== Вход и пользователь ======================== */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #eef2f8, #dfe8f6);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px;
}
.auth-card .brand { font-size: 22px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 12.5px; margin: 0 0 22px; }
.auth-note { color: var(--muted); font-size: 11.5px; line-height: 1.5; margin: 18px 0 0; text-align: center; }

.auth-error {
  background: #fdeaea;
  border: 1px solid #f5c2c2;
  color: #a32020;
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}
.auth-ok {
  background: var(--green-soft);
  border: 1px solid #bfe9d3;
  color: #0a6d3d;
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Полоса пользователя в шапке */
.userbar {
  position: absolute;
  top: 12px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
@media (max-width: 900px) {
  .userbar { position: static; justify-content: center; margin-top: 10px; }
}
.userbar .who { text-align: right; line-height: 1.25; }
.userbar .who b { display: block; font-size: 12.5px; }
.userbar .who span { color: var(--muted); font-size: 11px; }

.save-state {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 96px;
  text-align: right;
}
.save-state.ok { color: var(--green); }
.save-state.err { color: var(--red); }

/* ============================ Админка ============================== */

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }

table.plain { width: 100%; border-collapse: collapse; font-size: 13px; }
table.plain th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
}
table.plain td { padding: 8px; border-bottom: 1px solid var(--line-2); }
table.plain tr:last-child td { border-bottom: 0; }
table.plain tr.sel { background: var(--brand-soft); }
table.plain tr.clickable { cursor: pointer; }
table.plain tr.clickable:hover { background: #f7faff; }
table.plain td.actions { text-align: right; white-space: nowrap; }

.role-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: var(--line-2);
  color: var(--ink-2);
}
.role-chip.admin { background: #efe9ff; color: #4b34c9; }
.role-chip.owner { background: var(--brand-soft); color: var(--brand-dark); }
.role-chip.off { background: #fdeaea; color: #a32020; }

/* ======================= Схемы отгрузок ============================ */

.scheme-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.scheme-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: .14s;
}
.scheme-tab:hover { border-color: var(--brand); color: var(--brand); }
.scheme-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.scheme-tab .x {
  display: grid;
  place-items: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .1);
  font-size: 10px;
  line-height: 1;
}
.scheme-tab.active .x { background: rgba(255, 255, 255, .28); }
.scheme-tab .x:hover { background: var(--red); color: #fff; }
.scheme-tab.add { border-style: dashed; color: var(--brand); }

.pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #f7faff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.pick-row input[type="number"] { width: 66px; padding: 5px 8px; text-align: center; }

.cluster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  max-height: 340px;
  overflow-y: auto;
}

.cluster-cell {
  display: grid;
  grid-template-columns: 17px 1fr 64px;
  gap: 7px;
  align-items: center;
  font-size: 12.5px;
}
.cluster-cell input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.cluster-cell .cn {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.cluster-cell input[type="number"] { padding: 3px 6px; font-size: 12px; text-align: right; }
.cluster-cell.off .cn { color: var(--muted); }
.cluster-cell.off input[type="number"] { background: var(--line-2); color: var(--muted); }
