/* Шрифты Industry-подбор для кириллицы: Oswald (заголовки) + Inter (тело). Офлайн, self-hosted. */
@font-face{font-family:'Oswald';font-style:normal;font-weight:500;font-display:swap;src:url("fonts/oswald-latin-500-normal.8af401f8e32b.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Oswald';font-style:normal;font-weight:500;font-display:swap;src:url("fonts/oswald-cyrillic-500-normal.aedf5a35158e.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Oswald';font-style:normal;font-weight:600;font-display:swap;src:url("fonts/oswald-latin-600-normal.3ab06adc1658.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Oswald';font-style:normal;font-weight:600;font-display:swap;src:url("fonts/oswald-cyrillic-600-normal.4aff022b9a32.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Oswald';font-style:normal;font-weight:700;font-display:swap;src:url("fonts/oswald-latin-700-normal.665f37b2d0e8.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Oswald';font-style:normal;font-weight:700;font-display:swap;src:url("fonts/oswald-cyrillic-700-normal.ae7f9fac7ae7.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url("fonts/inter-latin-400-normal.da03732a27e1.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url("fonts/inter-cyrillic-400-normal.74a70a8b71d0.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url("fonts/inter-latin-500-normal.51205681a1ba.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url("fonts/inter-cyrillic-500-normal.0f5211cce140.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url("fonts/inter-latin-600-normal.2ede57db1a3a.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url("fonts/inter-cyrillic-600-normal.40727edfba55.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url("fonts/inter-latin-700-normal.8ca0a5155296.woff2") format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url("fonts/inter-cyrillic-700-normal.fc4bfa8e4204.woff2") format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

/* ============================================================
   MPH Analytics — единая тема (в стиле HubSpot).
   Все цвета/отступы/скругления — здесь. Меняем стиль в одном месте.
   ============================================================ */
:root{
  /* Акценты — Industry (сталь-синий, моно) */
  --brand:#5980a6;        /* основное действие */
  --brand-d:#416180;      /* нажатый */
  --accent:#5980a6;       /* ссылки/акцент */
  --accent-d:#416180;

  /* Навигация / текст */
  --nav:#2b2b2d;          /* графитовый сайдбар */
  --nav-hover:#3a3a3d;
  --ink:#1d1f20;
  --ink-strong:#1d1f20;
  --muted:#6b6d70;

  /* Поверхности */
  --bg:#f2f2f3;
  --card:#ffffff;
  --line:#d7d7da;
  --line-2:#bdbdc0;

  /* Статусы (приглушённые под палитру) */
  --ok:#3f7d68; --ok-bg:#e7f2ee;
  --bad:#a35050; --bad-bg:#f4e6e6;
  --warn:#8a6d2f; --warn-bg:#f4eede;

  --radius:4px;
  --radius-lg:7px;
  --shadow:0 1px 2px rgba(43,43,45,.10), 0 1px 3px rgba(43,43,45,.06);
  --sidebar-w:212px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --font-heading:"Oswald","Inter",-apple-system,sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:var(--font);background:var(--bg);color:var(--ink);font-size:14.5px;line-height:1.5}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-d);text-decoration:underline}

/* ---------- Каркас: сайдбар + основная область ---------- */
.app{display:flex;min-height:100vh}
.sidebar{width:var(--sidebar-w);background:var(--nav);color:#cdd7e2;display:flex;flex-direction:column;flex-shrink:0}
.sidebar .logo{display:flex;align-items:center;gap:10px;padding:18px 20px;color:#fff;font-family:var(--font-heading);font-weight:600;font-size:20px;letter-spacing:.4px}
.sidebar .logo .dot{width:22px;height:22px;border-radius:6px;background:var(--brand);display:inline-block}
.sidebar nav{display:flex;flex-direction:column;padding:8px 10px;gap:2px}
.sidebar nav a{color:#cdd7e2;padding:9px 12px;border-radius:7px;font-size:14px;font-weight:600;display:flex;align-items:center;gap:9px}
.sidebar nav a:hover{background:var(--nav-hover);color:#fff;text-decoration:none}
.sidebar nav a.active{background:var(--brand);color:#fff}
.sidebar nav a .nav-ic{width:17px;height:17px;flex-shrink:0;opacity:.88}
.sidebar nav a:hover .nav-ic,.sidebar nav a.active .nav-ic{opacity:1}
.sidebar .foot{margin-top:auto;padding:14px 20px;font-size:12px;color:#7f93a8;border-top:1px solid rgba(255,255,255,.08)}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{height:56px;background:var(--card);border-bottom:1px solid var(--line);
        display:flex;align-items:center;justify-content:flex-end;padding:0 24px;gap:16px}
.topbar .user-chip{color:var(--muted);font-size:13.5px}
.topbar .user-chip b{color:var(--ink-strong)}
.topbar .logout-form{display:inline;margin-left:14px}
.topbar button.logout{background:none;border:none;padding:0;margin:0;cursor:pointer;
  color:var(--accent);font-family:inherit;font-size:inherit;font-weight:600}
.topbar button.logout:hover{color:var(--accent-d);text-decoration:underline}
.content{padding:26px 32px;max-width:1320px;width:100%}

/* ---------- Карточки ---------- */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-lg);
      padding:22px 24px;margin-bottom:18px;box-shadow:var(--shadow)}
h1{font-family:var(--font-heading);font-size:26px;margin:0 0 4px;color:var(--ink-strong);font-weight:600;letter-spacing:.005em}
h2{font-family:var(--font-heading);font-size:18px;margin:0 0 14px;color:var(--ink-strong);font-weight:600;letter-spacing:.005em}
.muted{color:var(--muted)}

/* ---------- Кнопки ---------- */
.btn{display:inline-block;background:var(--brand);color:#fff;border:1px solid var(--brand);
     border-radius:var(--radius);padding:9px 17px;font-size:14px;cursor:pointer;font-weight:700;
     font-family:inherit;transition:background .12s,border-color .12s}
.btn:hover{background:var(--brand-d);border-color:var(--brand-d);color:#fff;text-decoration:none}
.btn.ghost{background:#fff;color:var(--brand);border:1px solid var(--brand)}
.btn.ghost:hover{background:#eef4fa;color:var(--brand-d);border-color:var(--brand-d)}
.btn.neutral{background:#fff;color:var(--ink);border:1px solid var(--line-2)}
.btn.neutral:hover{background:#f4f7fa;color:var(--ink)}
.btn.sm{padding:5px 11px;font-size:13px;font-weight:600}

/* ---------- Таблицы ---------- */
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{text-align:left;padding:11px 12px;border-bottom:1px solid var(--line)}
thead th{color:var(--muted);font-weight:700;font-size:11.5px;text-transform:uppercase;letter-spacing:.5px;
         border-bottom:1px solid var(--line-2)}
tbody tr:hover td{background:#f7fafc}
td a{font-weight:600}

/* ---------- Бейджи и метки ---------- */
.badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:700}
.badge.on{background:var(--ok-bg);color:var(--ok)}
.badge.off{background:var(--bad-bg);color:var(--bad)}
.role{display:inline-block;padding:3px 10px;border-radius:6px;background:#eef6ff;color:var(--accent-d);
      font-size:12px;font-weight:700}

/* ---------- Формы ---------- */
form.stack label{display:block;font-weight:700;font-size:13px;margin:15px 0 5px;color:var(--ink-strong)}
form.stack input[type=text],form.stack input[type=password],form.stack select,form.stack textarea{
  width:100%;padding:10px 12px;border:1px solid var(--line-2);border-radius:var(--radius);
  font-size:14px;font-family:inherit;color:var(--ink);background:#fff;transition:border-color .12s,box-shadow .12s}
form.stack input:focus,form.stack select:focus,form.stack textarea:focus{
  outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(89,128,166,.15)}
form.stack .help{color:var(--muted);font-size:12px;margin-top:4px}
.errorlist{color:var(--bad);font-size:13px;margin:6px 0 0;padding-left:18px}
ul.errorlist{list-style:disc}

/* ---------- Сообщения ---------- */
.msg{padding:11px 15px;border-radius:var(--radius);margin-bottom:14px;font-size:14px;border:1px solid transparent}
.msg.success{background:var(--ok-bg);color:#0a6b5c;border-color:#bfe9e1}
.msg.error{background:var(--bad-bg);color:#a5333a;border-color:#f6c9cc}

/* ---------- Тулбар и фильтры ---------- */
.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:16px;flex-wrap:wrap}
.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.filters select,.filters input{padding:8px 11px;border:1px solid var(--line-2);border-radius:var(--radius);font-size:14px;font-family:inherit}
.filters input:focus,.filters select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(89,128,166,.15)}

/* ---------- Вход ---------- */
.login-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--bg)}
.login-box{width:380px;max-width:92vw}
.login-box .brand-row{display:flex;align-items:center;gap:11px;margin-bottom:6px}
.login-box .brand-row .dot{width:26px;height:26px;border-radius:7px;background:var(--brand)}
.login-box .brand-row .name{font-size:20px;font-weight:800;color:var(--ink-strong)}
.accent-bar{height:4px;background:var(--brand);border-radius:4px 4px 0 0}
.sidebar nav a .bell{margin-left:auto;background:var(--brand);color:#fff;font-size:11px;font-weight:800;
  min-width:20px;height:20px;border-radius:20px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px}
.sidebar nav a.active .bell{background:#fff;color:var(--brand)}
/* карантин / данные */
.kpi-row{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:6px}
.kpi{background:#f7fafc;border:1px solid var(--line);border-radius:10px;padding:12px 16px;min-width:150px}
.kpi .v{font-size:20px;font-weight:800;color:var(--ink-strong)}
.kpi .l{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}
.check{font-size:13.5px;padding:3px 0}
.check .ok{color:var(--ok);font-weight:700}
.check .fail{color:var(--bad);font-weight:700}
.carantine{border:1px solid #f6c9cc;background:#fff8f8;border-radius:10px;padding:16px 18px;margin-bottom:18px}
.carantine h2{color:var(--bad)}
.src{color:var(--muted);font-size:13px}
.upload-box{border:2px dashed var(--line-2);border-radius:10px;padding:20px;text-align:center;background:#fbfcfe}
.inline-form{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.inline-form select,.inline-form input[type=text]{padding:6px 9px;border:1px solid var(--line-2);border-radius:7px;font-size:13px;font-family:inherit}
.badge.arch{background:#eef1f5;color:#64748b}
/* раскрывающиеся карточки товара */
details.prod{border:1px solid var(--line);border-radius:9px;margin-bottom:8px;background:#fff}
details.prod[open]{box-shadow:var(--shadow)}
.prod summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:14px;padding:12px 16px;flex-wrap:wrap}
.prod summary::-webkit-details-marker{display:none}
.prod summary:hover{background:#f7fafc}
.prod summary .code{color:var(--muted);font-size:13px;min-width:52px;flex-shrink:0}
.prod summary .nm{font-weight:700;color:var(--ink-strong);flex:1 1 300px;min-width:200px}
.prod summary .chips{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.prod summary .edit{margin-left:auto;flex-shrink:0}
.prod summary .caret::before{content:"▸";color:var(--muted);margin-left:6px}
.prod[open] summary .caret::before{content:"▾"}
.prod.no-uid summary{background:#fafbfc}
.prod.no-uid summary .nm{color:#9aa7b6;font-weight:600}
.prod.no-uid summary .nm .tag-nouid{color:var(--warn);background:var(--warn-bg);font-size:11px;font-weight:700;padding:1px 7px;border-radius:12px;margin-left:6px}
.prod-uids{padding:2px 16px 16px 52px}
.prod-uids table{font-size:13px}
.prod-uids th,.prod-uids td{padding:7px 10px}
.uid-code{font-weight:700;color:var(--accent-d)}
/* карантин — ровные ряды действий */
.q-item{border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin:12px 0;background:#fff}
.q-item .q-title{font-weight:700;color:var(--ink-strong)}
.q-item .q-meta{color:var(--muted);font-size:13px;margin-top:2px}
.q-actions{margin-top:12px}
.q-row{display:grid;grid-template-columns:170px 1fr;gap:12px;align-items:center;padding:10px 0;border-top:1px solid var(--line)}
.q-label{color:var(--muted);font-size:13px;font-weight:600}
.q-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.q-controls .qname{flex:1 1 240px;min-width:180px}
.q-controls select{max-width:100%}
/* адаптив: планшет / узкий экран */
@media (max-width:960px){
  .app{flex-direction:column}
  .sidebar{width:100%;flex-direction:row;align-items:center;overflow-x:auto}
  .sidebar .logo{padding:12px 16px;font-size:16px}
  .sidebar nav{flex-direction:row;padding:6px 8px;gap:6px}
  .sidebar nav a{padding:8px 12px;white-space:nowrap}
  .sidebar .foot{display:none}
  .content{padding:16px}
  .q-row{grid-template-columns:1fr;gap:8px;align-items:start}
  .prod summary .edit{margin-left:0}
}
/* Статусы загрузок. Селектор СУЖЕН до span намеренно: класс .st в системе носят
   ещё и восемь таблиц («Продажи», «Ведомость», «Мониторинг рынка»), и общее
   правило накрывало их — таблица получала display:inline-block и переставала
   быть таблицей: width:100% в её собственных стилях не работал, колонки
   ужимались по содержимому, а справа оставалась пустота. Плашки статусов — это
   всегда <span>, так что сужение ничего у них не отнимает. */
span.st{display:inline-block;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:700}
span.st.ok{background:var(--ok-bg);color:var(--ok)}
span.st.warning{background:var(--warn-bg);color:var(--warn)}
span.st.error{background:var(--bad-bg);color:var(--bad)}
.file-link{cursor:pointer;font-weight:700;color:var(--accent)}
.file-link:hover{text-decoration:underline}
/* выдвижная панель справа */
.drawer-overlay{position:fixed;inset:0;background:rgba(43,43,45,.35);display:none;z-index:40}
.drawer-overlay.open{display:block}
.drawer{position:fixed;top:0;right:0;height:100vh;width:min(560px,94vw);background:#fff;z-index:41;
  transform:translateX(100%);transition:transform .18s ease;box-shadow:-4px 0 24px rgba(0,0,0,.14);
  display:flex;flex-direction:column}
.drawer.open{transform:translateX(0)}
.drawer .dh{padding:16px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}
.drawer .dh h2{margin:0}
.drawer .db{padding:18px 20px;overflow:auto;flex:1}
.drawer .close{cursor:pointer;font-size:24px;line-height:1;color:var(--muted);background:none;border:none}
.log-pre{white-space:pre-wrap;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;
  background:#f7fafc;border:1px solid var(--line);border-radius:8px;padding:12px 14px;color:var(--ink);margin-top:12px}
.dl-meta{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:13.5px;color:var(--muted)}
.dl-meta b{color:var(--ink-strong)}

/* ============================================================
   Справочник товаров — двухзонный экран (наш справочник ↔ Intellix)
   ============================================================ */
.howto{background:#eef8fb;border:1px solid #bfe6ee;border-radius:10px;padding:12px 16px;margin-bottom:14px;font-size:13.5px;color:#0a5566}
.howto b{color:var(--accent-d)}
.status-bar{display:flex;gap:22px;flex-wrap:wrap;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:10px 16px;margin-bottom:14px;font-size:13.5px}
.status-bar .lbl{color:var(--muted)}
.status-bar .val{font-weight:700;color:var(--ink-strong)}
.status-bar .val.empty{color:var(--muted);font-weight:400}

.tri{display:grid;grid-template-columns:minmax(0,1.55fr) 88px minmax(0,1fr);gap:14px;align-items:start}
.zone{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow);display:flex;flex-direction:column;max-height:74vh;min-width:0}
.zone-head{padding:13px 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.zone-head h2{margin:0}
.zone-head .cnt{color:var(--muted);font-size:13px;font-weight:600}
.zone .filters{padding:10px 16px;border-bottom:1px solid var(--line);margin:0}
.zone .filters input[type=text]{flex:1 1 130px}
.zone-body{overflow:auto;padding:10px 12px;flex:1}

/* левая карточка товара */
.pcard{border:1px solid var(--line);border-radius:9px;margin-bottom:8px;background:#fff;transition:border-color .1s,box-shadow .1s}
.pcard.sel{border-color:var(--brand);box-shadow:0 0 0 2px rgba(89,128,166,.18)}
.pcard-head{display:flex;align-items:center;gap:10px;padding:11px 12px;cursor:pointer;flex-wrap:nowrap;min-height:46px}
.pcard-head:hover{background:#f7fafc;border-radius:9px}
.pick{width:16px;height:16px;border:2px solid var(--line-2);border-radius:50%;flex-shrink:0}
.pcard.sel>.pcard-head .pick,.qcard.sel .pick{border-color:var(--brand);background:var(--brand);box-shadow:inset 0 0 0 3px #fff}
.pcard-head .code{color:var(--muted);font-size:12.5px;min-width:44px;flex-shrink:0}
.pcard-head .nm{font-weight:600;color:var(--ink-strong);flex:1 1 auto;min-width:0;font-size:13px;line-height:1.25;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
.pcard-head .chips{display:flex;gap:6px;align-items:center;flex-wrap:nowrap;flex-shrink:0}
.pcard-head .editbtn{flex-shrink:0}
.pcard-head .caret{color:var(--muted);user-select:none;flex-shrink:0;width:14px;text-align:center}
.pcard.no-uid .pcard-head .nm{color:#9aa7b6;font-weight:600}
.pcard .tag-nouid{color:var(--warn);background:var(--warn-bg);font-size:11px;font-weight:700;padding:1px 7px;border-radius:12px;margin-left:6px;white-space:nowrap}
.pcard-uids{display:none;padding:2px 12px 12px 42px}
.pcard.open .pcard-uids{display:block}
.uidline{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:7px;cursor:pointer;font-size:13px;flex-wrap:nowrap}
.uidline:hover{background:#f2f7fa}
.uidline.sel{background:#eef4fa;box-shadow:inset 0 0 0 1px var(--brand)}
.uidline .u{font-weight:700;color:var(--accent-d);min-width:64px;flex-shrink:0}
.uidline .d{color:var(--ink);flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.uidline .f{color:var(--muted);font-size:12px}
.uidline .cma{color:var(--muted)}

/* форма новой карточки */
.newform{display:none;border:1px dashed var(--accent);border-radius:9px;padding:12px;margin-bottom:10px;background:#f4fcfe}
.newform.show{display:block}
.newform .row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px;align-items:center}
.newform input[type=text],.newform select{padding:7px 10px;border:1px solid var(--line-2);border-radius:var(--radius);font-size:13px;font-family:inherit}
.newform input.nm{flex:1 1 100%}
.seg{display:inline-flex;border:1px solid var(--line-2);border-radius:8px;overflow:hidden}
.seg input{display:none}
.seg span{display:inline-block;padding:7px 13px;font-size:13px;color:var(--muted);font-weight:600;cursor:pointer}
.seg input:checked+span{background:var(--accent);color:#fff}

/* центральные стрелки */
.arrows{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding-top:150px}
.abtn{width:60px;height:46px;border-radius:10px;border:1px solid var(--brand);background:var(--brand);color:#fff;font-size:22px;font-weight:800;cursor:pointer;display:flex;align-items:center;justify-content:center}
.abtn.ghost{background:#fff;color:var(--brand)}
.abtn:disabled{opacity:.35;cursor:not-allowed}
.arrows .cap{font-size:11px;color:var(--muted);text-align:center;margin-bottom:10px}

/* правая карточка кода Intellix */
.qcard{border:1px solid var(--line);border-radius:9px;margin-bottom:8px;background:#fff;padding:10px 12px;cursor:pointer}
.qcard:hover{background:#f7fafc}
.qcard.sel{border-color:var(--brand);box-shadow:0 0 0 2px rgba(89,128,166,.18);background:#eef4fa}
.qcard .top{display:flex;align-items:center;gap:10px}
.qcard .top .nm{font-weight:700;color:var(--ink-strong);flex:1}
.qcard .top .f{color:var(--muted);font-size:12px}
.qcard .meta{color:var(--muted);font-size:12.5px;margin:4px 0 0 26px}
.qcard .sug{color:var(--accent-d);font-size:12.5px;margin:3px 0 0 26px}
.qcard .qact{margin:8px 0 0 26px}
.link-ignore{color:var(--muted);font-size:12.5px;border:1px solid var(--line-2);background:#fff;border-radius:6px;padding:3px 9px;cursor:pointer;font-weight:600;font-family:inherit}
.link-ignore:hover{color:var(--bad);border-color:var(--bad)}
.empty-note{color:var(--muted);text-align:center;padding:26px 10px;font-size:13.5px}

/* модалка подтверждения */
.modal-backdrop{position:fixed;inset:0;background:rgba(43,43,45,.35);display:none;align-items:center;justify-content:center;z-index:60;padding:16px}
.modal-backdrop.show{display:flex}
.modal{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:0 12px 32px rgba(43,43,45,.25);width:min(460px,100%);padding:22px 24px}
.modal h2{margin:0 0 10px}
.modal p{margin:0 0 4px;font-size:14px;line-height:1.5}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}

/* «Архив кодов» — страница */
.arch-item{display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-radius:9px;padding:10px 14px;margin-bottom:8px;background:#fff}
.arch-item .u{font-weight:700;color:var(--accent-d);min-width:70px}
.arch-item .nm{flex:1;min-width:0}
.arch-item .nm .d{font-weight:600;color:var(--ink-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.arch-item .nm .m{color:var(--muted);font-size:12.5px}
.arch-item .act{flex-shrink:0}

/* адаптив: планшет / узкий экран — зоны в столбик, стрелки горизонтально */
@media (max-width:960px){
  .tri{grid-template-columns:1fr;gap:10px}
  .zone{max-height:none}
  .arrows{flex-direction:row;justify-content:center;padding:6px 0;gap:16px}
  .arrows .cap{margin:0}
  .pcard-head{flex-wrap:wrap}
  .pcard-head .nm{-webkit-line-clamp:initial;display:block;overflow:visible;flex:1 1 180px}
  .pcard-head .chips{flex-wrap:wrap}
}
