/* Конструктор конвейеров импорта.
   Оформление намеренно сдержанное: графит, тонкие линии, никаких иконок-картинок.
   Цветом кодируются только состояние блока и уровень замечаний — там, где цвет
   несёт смысл. Всё остальное различается формой и типографикой. */

:root {
  --node-w: 236px;
  --pipe-ink: #0f172a;
  --pipe-line: #dbe2ea;
  --pipe-line-strong: #94a3b8;
  --pipe-bg: #eef1f5;
  --pipe-panel: #ffffff;
  --pipe-muted: #64748b;
  --pipe-accent: #1e40af;
  --pipe-cached: #0f766e;
  --pipe-running: #1d4ed8;
  --fam-source: #1e40af;
  --fam-transform: #0f766e;
  --fam-db: #7c3aed;
}

body.pipe-body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--pipe-bg);
  color: var(--pipe-ink);
  font-size: 13px;
}
body.pipe-body .btn {
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 6px;
  border: 1px solid var(--pipe-line);
  background: #fff;
  color: var(--pipe-ink);
}
body.pipe-body .btn:hover:not(:disabled) { background: #f1f5f9; border-color: var(--pipe-line-strong); }
body.pipe-body .btn-primary {
  background: var(--pipe-accent); border-color: var(--pipe-accent); color: #fff;
}
body.pipe-body .btn-primary:hover { background: #1b3a9c; }
body.pipe-body .btn-danger {
  background: #fff; border-color: #e2b8b8; color: #b91c1c;
}
body.pipe-body .btn-danger:hover { background: #fef2f2; border-color: #dc2626; }
body.pipe-body .btn-block { display: block; width: 100%; text-align: center; }

/* Главные действия крупнее второстепенных: запуск и остановка видны сразу */
body.pipe-body .btn-lg {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
}
.run-split { display: inline-flex; }
.run-split > .btn:first-child { border-radius: 6px 0 0 6px; }
.run-split > .run-more {
  border-radius: 0 6px 6px 0;
  border-left: 1px solid rgba(255, 255, 255, .35);
  padding: 8px 10px;
  margin-left: 0;
}
.menu-wrap, .run-split { position: relative; }
.menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 250px;
  background: #fff;
  border: 1px solid var(--pipe-line);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .16);
  z-index: 40;
  padding: 4px;
}
.run-split .menu { left: 0; right: auto; }
/* меню живёт в body, чтобы его не обрезал overflow верхней панели */
.menu.menu-float { position: fixed; top: 0; left: 0; right: auto; z-index: 90; }
.menu-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--pipe-ink);
  text-decoration: none;
  white-space: nowrap;
}
.menu-row:hover { background: #f1f5f9; }
.menu-row.danger { color: #b91c1c; }

/* Кнопки, стоящие вместе, срастаются в один блок — меньше визуального шума */
.btn-group { display: inline-flex; }
.btn-group > .btn { border-radius: 0; margin-left: -1px; }
.btn-group > .btn:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.btn-group > .btn:last-child { border-radius: 0 6px 6px 0; }
.btn-group > .btn:only-child { border-radius: 6px; }

/* ── Верхняя панель ─────────────────────────────────────────────────── */
.pipe-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: #fff;
  border-bottom: 1px solid var(--pipe-line);
  flex: 0 0 auto;
  /* Панель не переносится: перенос съедал бы высоту холста, а во встроенном
     виджете её и так немного. Не влезло — прокручивается. */
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.pipe-top .btn, .pipe-top select, .pipe-top .pipe-status { white-space: nowrap; }
.pipe-top::-webkit-scrollbar { height: 4px; }
.pipe-top::-webkit-scrollbar-thumb { background: var(--pipe-line-strong); border-radius: 2px; }
.pipe-top h1 {
  font-size: 13px;
  margin: 0;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--pipe-muted);
  white-space: nowrap;
}
.pipe-top .spacer { flex: 1; }
.pipe-top select {
  flex: 0 1 210px;
  min-width: 130px;
  font-size: 12.5px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--pipe-line);
}
.pipe-top .muted { color: var(--pipe-muted); font-size: 12px; }
.pipe-top .muted a { color: var(--pipe-accent); }

.pipe-status {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--pipe-line);
  color: var(--pipe-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pipe-status.run { border-color: var(--pipe-running); color: var(--pipe-running); }
.pipe-status.done { border-color: #15803d; color: #15803d; }
.pipe-status.err { border-color: #b91c1c; color: #b91c1c; }

/* ── Раскладка ──────────────────────────────────────────────────────── */
.pipe-shell {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr) 340px;
  min-height: 0;
}
/* Во встроенном виджете места меньше, чем на отдельной странице: боковые
   панели ужимаем, заголовок и подсказку убираем — холст важнее. */
@media (max-width: 1180px) {
  .pipe-shell { grid-template-columns: 180px minmax(0, 1fr) 290px; }
  .pipe-top h1 { display: none; }
  .canvas-hint { display: none; }
  /* во встроенном виджете панель не должна прокручиваться: убираем то, что
     дублируется в других местах — имя пользователя и выбор конвейера сужаем */
  .pipe-top .muted { display: none; }
  .pipe-top select { flex: 0 1 160px; }
}
.pipe-left, .pipe-right {
  background: var(--pipe-panel);
  border-right: 1px solid var(--pipe-line);
  overflow-y: auto;
  padding: 12px;
}
.pipe-right { border-right: none; border-left: 1px solid var(--pipe-line); }
.pipe-sec { margin-bottom: 18px; }
.pipe-sec > h3 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--pipe-muted);
  font-weight: 600;
}

/* ── Палитра ────────────────────────────────────────────────────────── */
.pal-group { margin-bottom: 12px; }
.pal-group > div.pal-title {
  font-size: 10.5px;
  color: var(--pipe-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 8px 0 4px;
}
.pal-item {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border: 1px solid var(--pipe-line);
  border-left: 2px solid var(--pipe-line-strong);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  margin-bottom: 4px;
  font-size: 12.5px;
  color: var(--pipe-ink);
}
.pal-item:hover { background: #f8fafc; border-left-color: var(--pipe-accent); }
.pal-item.fam-source { border-left-color: var(--fam-source); }
.pal-item.fam-transform { border-left-color: var(--fam-transform); }
.pal-item.fam-db { border-left-color: var(--fam-db); }
.step-mark {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 3px;
  background: #f1f5f9;
  color: var(--pipe-muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}

/* ── Холст ──────────────────────────────────────────────────────────── */
.pipe-canvas {
  position: relative;
  overflow: auto;
  background:
    linear-gradient(to right, #e3e8ef 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(to bottom, #e3e8ef 1px, transparent 1px) 0 0 / 24px 24px,
    var(--pipe-bg);
  cursor: grab;
}
.pipe-canvas.panning { cursor: grabbing; }
.pipe-plane {
  position: relative;
  width: 4200px;
  height: 2200px;
  transform-origin: 0 0;
}
.pipe-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pipe-edges path.link { fill: none; stroke: var(--pipe-line-strong); stroke-width: 1.6; }
.pipe-edges path.hit { stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; fill: none; }
.pipe-edges path.link.flow { stroke: #15803d; }
.pipe-edges path.link.live { stroke: var(--pipe-accent); stroke-dasharray: 5 4; }
.pipe-edges marker path { fill: var(--pipe-line-strong); }
.pipe-edges #arrow-flow path { fill: #15803d; }
.pipe-edges #arrow-live path { fill: var(--pipe-accent); }

.zoom-box {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
  z-index: 5;
}
.zoom-box .btn { border-radius: 0; margin-left: -1px; min-width: 36px; }
.zoom-box .btn:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.zoom-box .btn:last-child { border-radius: 0 6px 6px 0; }
.canvas-hint {
  position: absolute;
  left: 14px;
  bottom: 16px;
  font-size: 11.5px;
  color: var(--pipe-muted);
  background: rgba(255, 255, 255, .8);
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
}

.node {
  position: absolute;
  width: var(--node-w);
  background: #fff;
  border: 1px solid var(--pipe-line);
  border-left: 3px solid var(--pipe-line-strong);
  border-radius: 5px;
  font-size: 12.5px;
  user-select: none;
}
.node.fam-source { border-left-color: var(--fam-source); }
.node.fam-transform { border-left-color: var(--fam-transform); }
.node.fam-db { border-left-color: var(--fam-db); }
.node.selected { border-color: var(--pipe-accent); box-shadow: 0 0 0 2px rgba(30, 64, 175, .18); }
.node.st-error { border-color: #dc2626; }

.node-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  cursor: grab;
  border-bottom: 1px solid var(--pipe-line);
}
.node-head:active { cursor: grabbing; }
.node-title {
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.node-state {
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--pipe-muted);
  white-space: nowrap;
}
.st-running .node-state { color: var(--pipe-running); }
.st-done .node-state { color: #15803d; }
.st-cached .node-state { color: var(--pipe-cached); }
.st-error .node-state { color: #b91c1c; }

.node-body { padding: 6px 9px 8px; color: var(--pipe-muted); font-size: 11.5px; }
.node-msg { color: var(--pipe-ink); line-height: 1.35; }
.node.st-error .node-msg { color: #b91c1c; }
.io-row { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.io-label {
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--pipe-muted);
  min-width: 34px;
}
.io-name { font-weight: 600; font-size: 12px; }
.pipe-right .io-row { align-items: center; }
.pipe-right .io-row .grp { margin-left: auto; }
.io-btn { padding: 2px 8px; font-size: 11.5px; }
.node-chip {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 3px;
  background: #f1f5f9;
  border: 1px solid var(--pipe-line);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.node-chip:hover { border-color: var(--pipe-accent); color: var(--pipe-accent); }
.node-chip.active { background: var(--pipe-accent); color: #fff; border-color: var(--pipe-accent); }
.node-chip.empty { opacity: .55; cursor: default; }
.node-chip.empty:hover { border-color: var(--pipe-line); color: inherit; }
.node-bar { height: 2px; background: #e2e8f0; margin-top: 6px; overflow: hidden; }
.node-bar > i { display: block; height: 100%; background: var(--pipe-running); }
.node-beat {
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--pipe-running);
  font-variant-numeric: tabular-nums;
}
.node-beat::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  animation: pipe-pulse 1.4s infinite;
}
/* давно не было отклика — цвет меняется, но паника не поднимается:
   источник мог просто медленно отвечать */
.node-beat.stale { color: #92400e; }
.node-beat.stale::before { animation: none; }
@keyframes pipe-pulse { 50% { opacity: .2; } }

.port {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 2px;
  background: #fff;
  border: 1.5px solid var(--pipe-line-strong);
  cursor: crosshair;
}
.port:hover, .port.armed { border-color: var(--pipe-accent); background: #dbeafe; }
.port.in { left: -6px; }
.port.out { right: -6px; }
.port-label {
  position: absolute;
  font-size: 9.5px;
  color: var(--pipe-muted);
  white-space: nowrap;
  pointer-events: none;
}
.port-label.in { left: 8px; }
.port-label.out { right: 8px; }

/* ── Инспектор ──────────────────────────────────────────────────────── */
.insp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.insp-head h2 { margin: 0; font-size: 14px; }
.insp-help {
  font-size: 11.5px;
  color: var(--pipe-muted);
  background: #f8fafc;
  border-left: 2px solid var(--pipe-line-strong);
  padding: 7px 9px;
  margin: 8px 0 14px;
  line-height: 1.45;
}
.fld { margin-bottom: 11px; }
.fld > label { display: block; font-size: 11.5px; font-weight: 600; margin-bottom: 3px; }
.fld input[type="text"], .fld input[type="number"], .fld select, .fld textarea {
  width: 100%;
  font-size: 12.5px;
  padding: 5px 7px;
  border-radius: 4px;
  border: 1px solid var(--pipe-line);
}
.fld textarea { font-family: Consolas, "Courier New", monospace; font-size: 11.5px; }
.fld .hint { font-size: 11px; color: var(--pipe-muted); margin-top: 3px; line-height: 1.35; }
.fld.inline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fld.inline > label { margin: 0; font-weight: 400; }
.fld.inline > input[type="checkbox"] { margin: 0; }
/* подсказка у флажка уходит на свою строку, иначе она жмёт подпись */
.fld.inline > .hint { flex-basis: 100%; margin-top: 0; }
.rows { display: flex; flex-direction: column; gap: 5px; }
.rows .row-item { display: flex; gap: 4px; align-items: center; }
.rows .row-item input, .rows .row-item select {
  flex: 1; min-width: 0; font-size: 11.5px; padding: 4px 6px;
  border-radius: 4px; border: 1px solid var(--pipe-line);
}
.checks { max-height: 190px; overflow: auto; border: 1px solid var(--pipe-line); border-radius: 4px; padding: 6px; }
.checks label { display: flex; gap: 6px; align-items: center; font-size: 11.5px; padding: 2px 0; }
.insp-empty { color: var(--pipe-muted); font-size: 12.5px; padding: 18px 4px; line-height: 1.5; }

/* ── Нижняя панель просмотра ────────────────────────────────────────── */
.pipe-bottom {
  flex: 0 0 auto;
  height: 340px;
  border-top: 1px solid var(--pipe-line);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.pipe-bottom.collapsed { height: 39px; }
.pipe-bottom.collapsed .pipe-bottom-body { display: none; }
.pipe-bottom-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--pipe-line);
  flex: 0 0 auto;
}
.pipe-bottom-head .spacer { flex: 1; }
.pipe-bottom-head input[type="text"] {
  width: 240px; font-size: 12.5px; padding: 4px 8px;
  border-radius: 4px; border: 1px solid var(--pipe-line);
}
.level-tabs { display: inline-flex; border: 1px solid var(--pipe-line); border-radius: 6px; overflow: hidden; }
.level-tabs button {
  border: none;
  background: #fff;
  padding: 5px 14px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--pipe-muted);
}
.level-tabs button.active { background: var(--pipe-ink); color: #fff; }
.pipe-bottom-body { flex: 1 1 auto; overflow: auto; min-height: 0; }
.bottom-title { font-size: 12.5px; font-weight: 600; }
.bottom-sub { font-size: 11.5px; color: var(--pipe-muted); font-variant-numeric: tabular-nums; }

table.arr { width: 100%; border-collapse: collapse; font-size: 12px; }
table.arr th, table.arr td {
  border-bottom: 1px solid var(--pipe-line);
  padding: 4px 8px;
  text-align: left;
  vertical-align: middle;
}
table.arr th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--pipe-muted);
  font-weight: 600;
}
table.arr tbody tr:hover { background: #f8fafc; cursor: pointer; }
table.arr tbody tr.picked { background: #eef2ff; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag-bad { border: 1px solid #e2b8b8; color: #b91c1c; border-radius: 3px; padding: 0 5px; }
.tag-ok { border: 1px solid #bbdcc4; color: #15803d; border-radius: 3px; padding: 0 5px; }
.grp { font-size: 11px; color: var(--pipe-muted); }
.grp-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.grp-chip {
  font-size: 10.5px;
  border: 1px solid var(--pipe-line);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}
.grp-chip i {
  font-style: normal;
  color: var(--pipe-muted);
  margin-right: 4px;
}
.grp-chip.auto { opacity: .6; }
.grp-chip.known { border-color: #bbdcc4; color: #15803d; }

/* Панель разметки в блоке «Насадка на БД» */
.map-panel {
  border: 1px solid var(--pipe-line);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 14px;
  background: #fcfdfe;
}
.map-nums { display: flex; gap: 8px; margin-bottom: 6px; }
.map-num {
  flex: 1;
  border: 1px solid var(--pipe-line);
  border-radius: 5px;
  padding: 7px 9px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.map-num b { font-size: 17px; font-variant-numeric: tabular-nums; }
.map-num span { font-size: 11px; color: var(--pipe-muted); }
.map-num.ok b { color: #15803d; }
.map-num.bad b { color: #b91c1c; }
.map-src { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.map-src-item {
  font-size: 10.5px;
  border: 1px solid var(--pipe-line);
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;
}
.map-src-item.on { border-color: #bbdcc4; color: #15803d; }
.map-src-item.off { border-color: #e5cf9a; color: #92400e; }
.spark { display: block; }

/* ── Путь ряда ──────────────────────────────────────────────────────── */
.path-wrap { padding: 12px 14px; }
.path-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.path-head h3 { margin: 0; font-size: 14px; }
.path-steps { display: flex; gap: 14px; align-items: stretch; overflow-x: auto; padding-bottom: 6px; }
.path-step {
  flex: 0 0 250px;
  border: 1px solid var(--pipe-line);
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
  position: relative;
}
.path-step + .path-step::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 16px;
  width: 10px;
  height: 1px;
  background: var(--pipe-line-strong);
}
.path-step + .path-step::after {
  content: "";
  position: absolute;
  left: -5px;
  top: 13px;
  border: 3px solid transparent;
  border-left-color: var(--pipe-line-strong);
}
.path-step h4 { margin: 0 0 4px; font-size: 12px; display: flex; gap: 6px; align-items: center; }
.op {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid var(--pipe-line);
  color: var(--pipe-muted);
}
.op-create { border-color: #b9c9ee; color: #1e40af; }
.op-modify { border-color: #e5cf9a; color: #92400e; }
.op-drop { border-color: #e2b8b8; color: #b91c1c; }
.op-merge { border-color: #cdc0ee; color: #5b21b6; }
.op-split { border-color: #a9ddd4; color: #115e59; }
.path-note { font-size: 11px; color: var(--pipe-muted); margin-bottom: 6px; line-height: 1.4; }
.path-changes { font-size: 11px; margin-top: 5px; }
.path-changes div { margin-bottom: 2px; }
.path-changes .was { color: #b91c1c; text-decoration: line-through; }
.path-changes .now { color: #15803d; }
.path-stats { font-size: 10.5px; color: var(--pipe-muted); margin-top: 5px; font-variant-numeric: tabular-nums; }

/* ── Контроль правильности ──────────────────────────────────────────── */
.chk {
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
  border: 1px solid transparent;
}
.chk-ok { border-color: #bbdcc4; color: #15803d; }
.chk-warn { border-color: #e5cf9a; color: #92400e; }
.chk-error { border-color: #e2b8b8; color: #b91c1c; }
.chk-off { border-color: var(--pipe-line); color: var(--pipe-muted); }
table.arr .chk { margin-right: 5px; }

.chk-row {
  border-left: 2px solid transparent;
  padding: 6px 8px;
  margin-bottom: 5px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 11.5px;
}
.chk-row:hover { background: #f1f5f9; }
.chk-row.chk-warn { border-left-color: #d97706; }
.chk-row.chk-error { border-left-color: #dc2626; }
.chk-row.chk-ok { border-left-color: #16a34a; cursor: default; }
.chk-title { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.chk-mark { flex: 0 0 auto; font-weight: 700; }
.chk-count {
  margin-left: auto;
  border: 1px solid var(--pipe-line);
  background: #fff;
  border-radius: 3px;
  padding: 0 6px;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.chk-msg { color: var(--pipe-ink); margin-top: 2px; }
.chk-hint { color: var(--pipe-muted); margin-top: 2px; font-size: 10.5px; line-height: 1.4; }

.check-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border-bottom: 1px solid var(--pipe-line);
  background: #fcfdfe;
  position: sticky;
  top: 0;
  z-index: 2;
}
.check-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--pipe-line);
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.check-chip.flat { cursor: default; opacity: .8; }
.check-chip.active { background: var(--pipe-ink); color: #fff; border-color: var(--pipe-ink); }

table.arr tr.flag-warn td:first-child { box-shadow: inset 2px 0 0 #d97706; }
table.arr tr.flag-error td:first-child { box-shadow: inset 2px 0 0 #dc2626; }

.path-check {
  margin-top: 6px;
  padding: 5px 7px;
  border-left: 2px solid transparent;
  background: #f8fafc;
  font-size: 11px;
}
.path-check.chk-warn { border-left-color: #d97706; }
.path-check.chk-error { border-left-color: #dc2626; }

/* ── Секции настроек ────────────────────────────────────────────────── */
.insp-group {
  border: 1px solid var(--pipe-line);
  border-radius: 4px;
  padding: 6px 10px;
  margin-bottom: 11px;
  background: #fcfdfe;
}
.insp-group > summary {
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: baseline;
  list-style: none;
}
.insp-group > summary::-webkit-details-marker { display: none; }
.insp-group > summary::before { content: "+"; color: var(--pipe-muted); font-weight: 700; }
.insp-group[open] > summary::before { content: "–"; }
.insp-group[open] > summary { margin-bottom: 8px; }
.insp-group-hint { color: var(--pipe-muted); font-weight: 400; font-size: 10.5px; }

/* ── Выбор парсера для переноса ─────────────────────────────────────── */
.parser-list {
  max-height: 46vh;
  overflow-y: auto;
  border: 1px solid var(--pipe-line);
  border-radius: 4px;
  margin: 10px 0;
}
.parser-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: none;
  border-bottom: 1px solid var(--pipe-line);
  background: #fff;
  cursor: pointer;
  font-size: 12.5px;
}
.parser-row:last-child { border-bottom: none; }
.parser-row:hover { background: #f1f5f9; }
.parser-row[hidden] { display: none; }
.parser-name { flex: 1; min-width: 0; }
.parser-name > div:first-child { font-weight: 600; }
.modal-card.modal-wide { width: min(720px, 94vw); }
.modal-card.modal-wide input[type="text"] {
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--pipe-line);
  font-size: 13px;
}

/* ── Мелочи ─────────────────────────────────────────────────────────── */
.file-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 4px 0;
  border-bottom: 1px solid var(--pipe-line);
}
.file-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .btn { padding: 2px 7px; }
.run-row {
  font-size: 11.5px;
  padding: 4px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--pipe-line);
  font-variant-numeric: tabular-nums;
}
.run-row:hover { color: var(--pipe-accent); }
.problems { font-size: 11.5px; color: #b91c1c; }
.problems div { margin-bottom: 3px; }
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: var(--pipe-ink);
  color: #fff;
  padding: 9px 13px;
  border-radius: 4px;
  font-size: 12.5px;
  z-index: 60;
  max-width: 460px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .25);
}
.toast.err { background: #b91c1c; }

/* Полноэкранный режим: виджет живёт в iframe шелла, поэтому фон задаём явно */
.pipe-body:fullscreen { background: var(--pipe-bg); }

/* Справка об объекте в паспорте точки: всё, что о нём известно, читается
   сразу, без разворачивания поля «Примечание». */
.obj-card {
  border: 1px solid var(--pipe-line);
  border-radius: 5px;
  padding: 9px 10px;
  margin-bottom: 14px;
  background: rgba(127, 127, 127, .05);
}
.obj-card-head { margin-bottom: 7px; }
.obj-card-head b { font-size: 13.5px; }
.obj-line { font-size: 12px; line-height: 1.5; margin-top: 3px; }
.obj-grid {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 3px 10px;
  font-size: 12px;
  line-height: 1.45;
}
.obj-key { color: var(--pipe-muted); }
.obj-val { overflow-wrap: anywhere; }
.obj-foot { margin-top: 7px; color: var(--pipe-muted); font-size: 11.5px; }
.obj-alert { color: #b3261e; }
.obj-src {
  margin-top: 9px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--pipe-muted);
  opacity: .75;
  overflow-wrap: anywhere;
}
.obj-src-mark {
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 9px;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0 3px;
  margin-right: 4px;
}
.pbar { height: 7px; border-radius: 4px; background: rgba(127,127,127,.18); margin: 4px 0 9px; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 4px; }
.prow { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
.prow > span:first-child { flex: 1; }
.srcfilters { display: flex; gap: 5px; margin: 7px 0; flex-wrap: wrap; }
.srcfilters input { flex: 1; min-width: 120px; }
.srcitem { border-top: 1px solid var(--pipe-line); padding: 8px 0; }
.srchead { display: flex; gap: 6px; align-items: baseline; }
.dotc { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: center; }
.srcpath { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.srcpath code { font-size: 10.5px; color: var(--pipe-muted); overflow-wrap: anywhere; flex: 1; }
