/* ============================================================
   Robdan Parser — панель сбора аудитории Telegram
   ============================================================ */

:root{
  --bg:            #04060e;
  --ink:           #e9f1fb;
  --ink-2:         #a9bbd4;
  --ink-3:         #7c8ea9;
  --ink-4:         #5c6c84;
  --accent:        #38bdf8;
  --accent-2:      #2563eb;
  --accent-soft:   #7dd3fc;
  --line:          rgba(125,175,235,.14);
  --line-2:        rgba(125,175,235,.08);
  --glass:         rgba(11,19,38,.52);
  --glass-2:       rgba(9,16,33,.66);
  --glass-3:       rgba(7,13,28,.82);
  --shadow:        0 34px 90px -34px rgba(0,0,0,.85);
  --r-lg:          24px;
  --r-md:          16px;
  --r-sm:          11px;
  --ease:          cubic-bezier(.22,.68,.24,1);

  /* поверхность графиков — от неё считались контрасты палитры */
  --viz-surface:   #0a1224;
  --series-1:      #3987e5;
  --series-2:      #d95926;
  --series-3:      #199e70;
  --st-online:     #199e70;
  --st-offline:    #3987e5;
  --st-hidden:     #c98500;
  --st-unknown:    #8896ab;
  --seq-1:         #184f95;
  --seq-2:         #256abf;
  --seq-3:         #3987e5;
  --seq-4:         #5598e7;
  --seq-5:         #86b6ef;
  --seq-6:         #b7d3f6;

  --ok:            #199e70;
  --warn:          #c98500;
  --danger:        #e66767;
}

*,*::before,*::after{ box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  min-height:100vh;
  background:var(--bg);
  color:var(--ink);
  font-family:Manrope,"Segoe UI",system-ui,-apple-system,Helvetica,Arial,sans-serif;
  font-size:15px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

img,svg{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4,p,ul,ol,figure{ margin:0; }
ul,ol{ padding:0; list-style:none; }
button,input,select,textarea{ font:inherit; color:inherit; }
::selection{ background:rgba(56,189,248,.28); color:#fff; }

.muted{ color:var(--ink-3); }
.dim{ color:var(--ink-4); }
[hidden]{ display:none !important; }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{
  background:rgba(125,175,235,.16);
  border-radius:20px;
  border:3px solid transparent;
  background-clip:padding-box;
}
::-webkit-scrollbar-thumb:hover{ background:rgba(125,175,235,.3); background-clip:padding-box; }

/* ============================================================
   Фон
   ============================================================ */
.scene{ position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }

.scene__base{
  position:absolute; inset:0;
  background:
    radial-gradient(min(1200px,86vw) min(800px,64vh) at 78% -8%, rgba(37,99,235,.30), transparent 62%),
    radial-gradient(min(1000px,78vw) min(720px,58vh) at 6% 104%, rgba(14,116,199,.22), transparent 64%),
    linear-gradient(172deg,#060b1c 0%,#050916 44%,#03050d 100%);
}
.scene__img{
  position:absolute;
  background-repeat:no-repeat;
  background-size:cover;
  mix-blend-mode:screen;
}
.scene__img--spheres{
  top:-8vh; left:-6vw;
  width:min(42vw,640px); height:min(54vh,560px);
  background-image:url(../img/spheres.jpg);
  background-position:52% 42%;
  opacity:.34;
  filter:saturate(1.2);
  -webkit-mask-image:radial-gradient(54% 56% at 46% 46%,#000 6%,transparent 72%);
          mask-image:radial-gradient(54% 56% at 46% 46%,#000 6%,transparent 72%);
}
.scene__img--glass{
  bottom:-16vh; right:-8vw;
  width:min(46vw,700px); height:min(56vh,620px);
  background-image:url(../img/glass.jpg);
  background-position:30% 50%;
  opacity:.16;
  filter:saturate(1.1) blur(3px);
  -webkit-mask-image:radial-gradient(50% 52% at 48% 50%,#000 4%,transparent 72%);
          mask-image:radial-gradient(50% 52% at 48% 50%,#000 4%,transparent 72%);
}
.blob{ position:absolute; border-radius:50%; }
.blob--1{
  top:10%; left:22%;
  width:clamp(140px,18vw,300px); aspect-ratio:1;
  background:radial-gradient(circle at 34% 30%,rgba(186,230,253,.30),rgba(37,99,235,.14) 46%,transparent 72%);
  filter:blur(6px);
  animation:driftA 26s var(--ease) infinite;
}
.blob--2{
  bottom:10%; left:-4%;
  width:clamp(220px,30vw,500px); aspect-ratio:1;
  background:radial-gradient(circle at 58% 42%,rgba(59,130,246,.22),rgba(8,47,73,.12) 48%,transparent 74%);
  filter:blur(18px);
  animation:driftB 34s var(--ease) infinite;
}
.ring--1{
  position:absolute; top:4%; right:10%;
  width:clamp(260px,34vw,560px); aspect-ratio:1;
  border:1px solid rgba(125,211,252,.09);
  border-radius:50%;
  box-shadow:inset 0 0 90px rgba(56,189,248,.05);
  animation:spin 90s linear infinite;
}
.scene__grain{
  position:absolute; inset:0; opacity:.045;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.scene__vignette{
  position:absolute; inset:0;
  background:radial-gradient(120% 88% at 50% 40%,transparent 42%,rgba(2,4,10,.6) 100%);
}

@keyframes driftA{ 0%,100%{transform:translate3d(0,0,0) scale(1)} 50%{transform:translate3d(0,-30px,0) scale(1.04)} }
@keyframes driftB{ 0%,100%{transform:translate3d(0,0,0)} 50%{transform:translate3d(24px,26px,0)} }
@keyframes spin{ from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes blink{ 0%,100%{opacity:1} 50%{opacity:.4} }
@keyframes rise{ from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:none} }
@keyframes shimmer{ 0%{background-position:-460px 0} 100%{background-position:460px 0} }

@media (prefers-reduced-motion:reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

/* ============================================================
   Карточки
   ============================================================ */
.card{
  position:relative;
  overflow:hidden;
  border-radius:var(--r-lg);
  border:1px solid var(--line);
  background:
    linear-gradient(168deg,rgba(255,255,255,.05),rgba(255,255,255,.012) 42%,rgba(255,255,255,0) 100%),
    var(--glass);
  -webkit-backdrop-filter:blur(22px) saturate(140%);
          backdrop-filter:blur(22px) saturate(140%);
  box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
}
.card::before{
  content:"";
  position:absolute; top:0; left:12%; right:12%;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(160,220,255,.42),transparent);
}
.card__sheen{
  position:absolute; inset:-1px;
  border-radius:inherit;
  pointer-events:none;
  opacity:0;
  transition:opacity .45s var(--ease);
  background:radial-gradient(420px 320px at var(--mx,50%) var(--my,0%),rgba(120,200,255,.12),transparent 68%);
}
.card:hover > .card__sheen{ opacity:1; }

.card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 22px 14px;
  border-bottom:1px solid var(--line-2);
}
.card__head h2,.card__head h3{
  font-size:15.5px;
  font-weight:700;
  letter-spacing:-.01em;
}
.card__head p{ font-size:12.5px; color:var(--ink-3); margin-top:2px; }
.card__body{ padding:20px 22px; }
.card__body--flush{ padding:0; }

/* ============================================================
   Вход
   ============================================================ */
.gate{
  position:relative; z-index:2;
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
}
.gate__card{
  width:min(400px,100%);
  padding:34px 32px 30px;
  text-align:center;
  animation:rise .5s var(--ease) both;
}
.gate__logo{
  width:52px; height:52px;
  margin:0 auto 16px;
  display:grid; place-items:center;
  border-radius:16px;
  color:var(--accent-soft);
  background:linear-gradient(160deg,rgba(56,189,248,.22),rgba(37,99,235,.1));
  border:1px solid rgba(125,211,252,.22);
  box-shadow:0 14px 30px -16px rgba(56,189,248,.8), inset 0 1px 0 rgba(255,255,255,.14);
}
.gate__logo svg{ width:26px; height:26px; }
.gate__card h1{ font-size:24px; font-weight:800; letter-spacing:-.02em; }
.gate__card > p{ font-size:13px; margin-top:4px; }
.gate__card .field{ margin:22px 0 16px; text-align:left; }
.gate__error{
  margin-top:14px;
  font-size:13px;
  color:#fca5a5;
}

/* ============================================================
   Каркас
   ============================================================ */
.shell{
  position:relative; z-index:1;
  display:grid;
  grid-template-columns:246px minmax(0,1fr);
  min-height:100vh;
}

.sidebar{
  position:sticky; top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:22px 16px 18px;
  border-right:1px solid var(--line);
  background:linear-gradient(180deg,rgba(9,16,33,.72),rgba(5,10,22,.86));
  -webkit-backdrop-filter:blur(20px);
          backdrop-filter:blur(20px);
}

.brand{ display:flex; align-items:center; gap:11px; padding:4px 8px 6px; }
.brand__mark{
  width:36px; height:36px;
  flex:none;
  display:grid; place-items:center;
  border-radius:12px;
  color:var(--accent-soft);
  background:linear-gradient(160deg,rgba(56,189,248,.24),rgba(37,99,235,.1));
  border:1px solid rgba(125,211,252,.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14);
}
.brand__mark svg{ width:19px; height:19px; }
.brand__txt{ font-size:15.5px; font-weight:700; letter-spacing:-.02em; }
.brand__txt b{ color:var(--accent-soft); font-weight:800; }

.nav{ display:flex; flex-direction:column; gap:3px; flex:1; }
.nav__item{
  position:relative;
  display:flex;
  align-items:center;
  gap:11px;
  padding:9px 12px;
  border-radius:12px;
  color:var(--ink-2);
  font-size:14px;
  font-weight:600;
  transition:color .25s var(--ease), background .25s var(--ease);
}
.nav__item svg{ width:18px; height:18px; flex:none; opacity:.8; }
.nav__item:hover{ color:var(--ink); background:rgba(125,175,235,.06); }
.nav__item.is-active{
  color:#fff;
  background:linear-gradient(120deg,rgba(56,189,248,.18),rgba(37,99,235,.09));
  border:1px solid rgba(125,211,252,.2);
  padding:8px 11px;
  box-shadow:0 12px 26px -18px rgba(56,189,248,.9), inset 0 1px 0 rgba(255,255,255,.1);
}
.nav__item.is-active svg{ opacity:1; color:var(--accent-soft); }
.nav__badge{
  margin-left:auto;
  min-width:20px;
  padding:1px 6px;
  border-radius:20px;
  background:rgba(56,189,248,.18);
  border:1px solid rgba(125,211,252,.25);
  color:#cfe8ff;
  font-size:11px;
  font-weight:700;
  text-align:center;
}
.nav__badge--live{ background:rgba(25,158,112,.2); border-color:rgba(25,158,112,.4); color:#8ff0cb; }

.side-foot{ display:flex; flex-direction:column; gap:10px; }
.acc-pulse{
  display:flex; align-items:center; gap:8px;
  padding:9px 11px;
  border-radius:12px;
  border:1px solid var(--line-2);
  background:rgba(125,175,235,.04);
  font-size:11.5px;
  color:var(--ink-3);
}
.acc-pulse__dot{
  width:7px; height:7px; flex:none;
  border-radius:50%;
  background:var(--ink-4);
  box-shadow:0 0 0 3px rgba(125,211,252,.1);
}
.acc-pulse.is-ok .acc-pulse__dot{ background:var(--ok); box-shadow:0 0 0 3px rgba(25,158,112,.18),0 0 10px rgba(25,158,112,.8); animation:blink 2.8s ease-in-out infinite; }
.acc-pulse.is-bad .acc-pulse__dot{ background:var(--danger); box-shadow:0 0 0 3px rgba(230,103,103,.18); }

/* ============================================================
   Основная область
   ============================================================ */
.main{ min-width:0; padding:24px clamp(16px,2.4vw,34px) 44px; }

.topbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  padding-bottom:18px;
  margin-bottom:20px;
  border-bottom:1px solid var(--line-2);
}
.topbar__title{ font-size:clamp(21px,2.4vw,27px); font-weight:800; letter-spacing:-.024em; }
.topbar__sub{ font-size:13px; margin-top:3px; }
.topbar__actions{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; }

.views > section{ animation:rise .4s var(--ease) both; }

.grid{ display:grid; gap:16px; }
.grid--2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid--3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid--4{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.grid--sidebar{ grid-template-columns:minmax(0,1.55fr) minmax(0,1fr); align-items:start; }
.grid--wide-left{ grid-template-columns:minmax(0,2fr) minmax(0,1fr); align-items:start; }
.stack{ display:flex; flex-direction:column; gap:16px; }
.row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.row--tight{ gap:6px; }
.row--between{ justify-content:space-between; }
.spacer{ flex:1; }

/* ============================================================
   Кнопки
   ============================================================ */
.btn{
  position:relative;
  overflow:hidden;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 17px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(125,175,235,.06);
  color:var(--ink);
  font-size:13.5px;
  font-weight:650;
  cursor:pointer;
  white-space:nowrap;
  transition:transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), filter .3s var(--ease);
}
.btn svg{ width:16px; height:16px; flex:none; }
.btn:hover{ background:rgba(125,175,235,.11); border-color:rgba(125,175,235,.24); }
.btn:active{ transform:translateY(1px); }
.btn:disabled{ opacity:.45; cursor:not-allowed; transform:none; }

.btn--primary{
  border-color:transparent;
  background:linear-gradient(180deg,#45baf4 0%,#2b8fe8 52%,#1c6cdd 100%);
  color:#fff;
  box-shadow:0 16px 34px -18px rgba(56,189,248,.9), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn--primary:hover{ filter:brightness(1.08); background:linear-gradient(180deg,#45baf4 0%,#2b8fe8 52%,#1c6cdd 100%); }
.btn--ghost{ background:transparent; }
.btn--danger{ color:#fca5a5; border-color:rgba(230,103,103,.3); background:rgba(230,103,103,.08); }
.btn--danger:hover{ background:rgba(230,103,103,.15); }
.btn--ok{ color:#8ff0cb; border-color:rgba(25,158,112,.34); background:rgba(25,158,112,.1); }
.btn--sm{ padding:7px 12px; font-size:12.5px; border-radius:10px; }
.btn--xs{ padding:4px 9px; font-size:11.5px; border-radius:8px; gap:5px; }
.btn--xs svg{ width:13px; height:13px; }
.btn--wide{ width:100%; }
.btn--icon{ padding:8px; width:34px; height:34px; }
.btn--icon.btn--sm{ width:30px; height:30px; padding:6px; }

.btn-group{ display:inline-flex; border-radius:12px; overflow:hidden; border:1px solid var(--line); }
.btn-group .btn{ border:0; border-radius:0; }
.btn-group .btn + .btn{ border-left:1px solid var(--line); }

/* ============================================================
   Поля
   ============================================================ */
.field{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.field > span{ font-size:12px; font-weight:600; color:var(--ink-3); letter-spacing:.01em; }
.field small{ font-size:11.5px; color:var(--ink-4); line-height:1.45; }

input[type=text],input[type=password],input[type=number],input[type=search],select,textarea{
  width:100%;
  padding:10px 13px;
  border-radius:11px;
  border:1px solid var(--line);
  background:rgba(4,8,18,.6);
  color:var(--ink);
  font-size:13.5px;
  transition:border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
textarea{ resize:vertical; min-height:96px; line-height:1.55; font-family:ui-monospace,"Cascadia Mono",Consolas,monospace; font-size:12.5px; }
input::placeholder,textarea::placeholder{ color:var(--ink-4); }
input:focus,select:focus,textarea:focus{
  outline:none;
  border-color:rgba(125,211,252,.42);
  box-shadow:0 0 0 3px rgba(56,189,248,.12);
  background:rgba(4,8,18,.8);
}
select{
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8ea9' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:16px;
  padding-right:32px;
}
select option{ background:#0a1224; color:var(--ink); }

.check{
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:8px 11px;
  border-radius:11px;
  border:1px solid var(--line-2);
  background:rgba(125,175,235,.03);
  cursor:pointer;
  font-size:13px;
  transition:border-color .25s var(--ease), background .25s var(--ease);
}
.check:hover{ border-color:var(--line); background:rgba(125,175,235,.06); }
.check input{ display:none; }
.check__box{
  width:17px; height:17px; flex:none;
  margin-top:1px;
  border-radius:6px;
  border:1.5px solid rgba(125,175,235,.3);
  display:grid; place-items:center;
  transition:all .25s var(--ease);
}
.check__box::after{
  content:"";
  width:8px; height:5px;
  border-left:2px solid #051022;
  border-bottom:2px solid #051022;
  transform:rotate(-45deg) scale(.4);
  opacity:0;
  transition:all .2s var(--ease);
}
.check input:checked + .check__box{ background:var(--accent); border-color:var(--accent); }
.check input:checked + .check__box::after{ opacity:1; transform:rotate(-45deg) scale(1); }
.check__txt b{ display:block; font-weight:650; }
.check__txt small{ color:var(--ink-4); font-size:11.5px; }

.seg{
  display:inline-flex;
  padding:3px;
  gap:2px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(4,8,18,.5);
}
.seg button{
  padding:7px 14px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--ink-3);
  font-size:12.5px;
  font-weight:650;
  cursor:pointer;
  transition:all .25s var(--ease);
  white-space:nowrap;
}
.seg button:hover{ color:var(--ink); }
.seg button.is-active{
  color:#fff;
  background:linear-gradient(120deg,rgba(56,189,248,.24),rgba(37,99,235,.14));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}

/* ============================================================
   Плитки-показатели
   ============================================================ */
.tile{
  position:relative;
  overflow:hidden;
  padding:16px 18px 17px;
  border-radius:var(--r-md);
  border:1px solid var(--line);
  background:linear-gradient(165deg,rgba(255,255,255,.045),rgba(255,255,255,.008) 52%,transparent),var(--glass-2);
  transition:border-color .35s var(--ease), transform .35s var(--ease);
}
.tile:hover{ border-color:rgba(125,175,235,.24); transform:translateY(-2px); }
.tile__top{ display:flex; align-items:center; gap:8px; }
.tile__ico{
  width:30px; height:30px; flex:none;
  display:grid; place-items:center;
  border-radius:9px;
  color:var(--accent-soft);
  background:linear-gradient(160deg,rgba(56,189,248,.2),rgba(37,99,235,.08));
  border:1px solid rgba(125,211,252,.18);
}
.tile__ico svg{ width:15px; height:15px; }
.tile__label{ font-size:12px; font-weight:600; color:var(--ink-3); }
.tile__value{
  margin-top:10px;
  font-size:clamp(24px,2.6vw,31px);
  font-weight:800;
  letter-spacing:-.03em;
  line-height:1.05;
  font-variant-numeric:tabular-nums;
}
.tile__foot{ margin-top:6px; font-size:11.5px; color:var(--ink-4); }
.tile--accent .tile__value{
  background:linear-gradient(100deg,#9ad8ff,#4fa9f5 52%,#8fd0ff);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.tile--live{ border-color:rgba(25,158,112,.3); }
.tile--live .tile__ico{ color:#8ff0cb; background:linear-gradient(160deg,rgba(25,158,112,.24),rgba(25,158,112,.08)); border-color:rgba(25,158,112,.28); }
.tile--live .tile__value{ color:#8ff0cb; }

/* ============================================================
   Бейджи / статусы
   ============================================================ */
.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 10px;
  border-radius:20px;
  border:1px solid var(--line);
  background:rgba(125,175,235,.07);
  font-size:11.5px;
  font-weight:650;
  color:var(--ink-2);
  white-space:nowrap;
}
.pill__dot{ width:6px; height:6px; border-radius:50%; background:currentColor; flex:none; }
.pill--online{ color:#8ff0cb; border-color:rgba(25,158,112,.34); background:rgba(25,158,112,.12); }
.pill--online .pill__dot{ box-shadow:0 0 8px currentColor; animation:blink 2.4s ease-in-out infinite; }
.pill--offline{ color:#9dc7f5; border-color:rgba(57,135,229,.3); background:rgba(57,135,229,.1); }
.pill--hidden{ color:#e8c37a; border-color:rgba(201,133,0,.32); background:rgba(201,133,0,.1); }
.pill--unknown{ color:#a8b6c9; }
.pill--premium{ color:#c3b5f7; border-color:rgba(144,133,233,.32); background:rgba(144,133,233,.1); }
.pill--danger{ color:#fca5a5; border-color:rgba(230,103,103,.32); background:rgba(230,103,103,.1); }
.pill--ok{ color:#8ff0cb; border-color:rgba(25,158,112,.34); background:rgba(25,158,112,.12); }
.pill--warn{ color:#e8c37a; border-color:rgba(201,133,0,.32); background:rgba(201,133,0,.1); }

/* ============================================================
   Таблицы
   ============================================================ */
.table-wrap{ overflow-x:auto; }
table{ width:100%; border-collapse:collapse; font-size:13px; }
thead th{
  position:sticky; top:0; z-index:1;
  padding:11px 14px;
  text-align:left;
  font-size:11.5px;
  font-weight:650;
  color:var(--ink-4);
  text-transform:uppercase;
  letter-spacing:.05em;
  white-space:nowrap;
  background:rgba(7,13,28,.94);
  -webkit-backdrop-filter:blur(8px);
          backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
tbody td{
  padding:10px 14px;
  border-bottom:1px solid var(--line-2);
  vertical-align:middle;
}
tbody tr{ transition:background .2s var(--ease); }
tbody tr:hover{ background:rgba(125,175,235,.045); }
tbody tr:last-child td{ border-bottom:0; }
td.num,th.num{ text-align:right; font-variant-numeric:tabular-nums; }
.cell-user{ display:flex; align-items:center; gap:10px; min-width:0; }
.avatar{
  width:32px; height:32px; flex:none;
  border-radius:10px;
  display:grid; place-items:center;
  font-size:12.5px; font-weight:700;
  color:#cfe8ff;
  background:linear-gradient(160deg,rgba(56,189,248,.2),rgba(37,99,235,.1));
  border:1px solid rgba(125,211,252,.16);
}
.cell-user__txt{ min-width:0; }
.cell-user__name{ font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cell-user__sub{ font-size:11.5px; color:var(--ink-4); font-variant-numeric:tabular-nums; }
.tg-link{ color:var(--accent-soft); font-weight:600; }
.tg-link:hover{ text-decoration:underline; }

.pager{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap;
  padding:14px 20px;
  border-top:1px solid var(--line-2);
  font-size:12.5px;
  color:var(--ink-3);
}

/* ============================================================
   Задачи
   ============================================================ */
.job{
  padding:16px 18px;
  border-radius:var(--r-md);
  border:1px solid var(--line);
  background:var(--glass-2);
  transition:border-color .3s var(--ease);
}
.job.is-running{ border-color:rgba(125,211,252,.28); }
.job.is-failed{ border-color:rgba(230,103,103,.3); }
.job__head{ display:flex; align-items:flex-start; gap:12px; }
.job__title{ font-weight:700; font-size:14px; letter-spacing:-.01em; }
.job__stage{ font-size:12.5px; color:var(--ink-3); margin-top:3px; }
.job__meta{ margin-left:auto; display:flex; align-items:center; gap:8px; }

.bar{
  position:relative;
  height:6px;
  margin-top:12px;
  border-radius:20px;
  background:rgba(125,175,235,.1);
  overflow:hidden;
}
.bar__fill{
  position:absolute; inset:0 auto 0 0;
  border-radius:20px;
  background:linear-gradient(90deg,#2b8fe8,#7dd3fc);
  transition:width .4s var(--ease);
}
.bar--indet .bar__fill{
  width:34% !important;
  animation:slide 1.4s var(--ease) infinite;
}
@keyframes slide{ 0%{left:-34%} 100%{left:100%} }

.job__nums{ display:flex; gap:16px; margin-top:10px; font-size:12px; color:var(--ink-3); }
.job__nums b{ color:var(--ink); font-variant-numeric:tabular-nums; }

.log{
  margin-top:12px;
  max-height:170px;
  overflow:auto;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--line-2);
  background:rgba(3,6,14,.6);
  font-family:ui-monospace,"Cascadia Mono",Consolas,monospace;
  font-size:11.5px;
  line-height:1.65;
  color:var(--ink-2);
}
.log__t{ color:var(--ink-4); margin-right:8px; }

/* ============================================================
   Графики
   ============================================================ */
.viz{ position:relative; }
.viz svg{ width:100%; height:auto; overflow:visible; display:block; }
.viz__grid line{ stroke:rgba(125,175,235,.1); stroke-width:1; }
.viz__axis{ fill:var(--ink-4); font-size:10.5px; font-weight:600; }
.viz__label{ fill:var(--ink-2); font-size:11.5px; font-weight:600; }
.viz__value{ fill:var(--ink); font-size:11.5px; font-weight:700; font-variant-numeric:tabular-nums; }
.viz__hit{ fill:transparent; cursor:crosshair; }
.viz__crosshair{ stroke:rgba(125,211,252,.4); stroke-width:1; stroke-dasharray:3 3; }
.viz__dot{ stroke:var(--viz-surface); stroke-width:2; }

.legend{ display:flex; flex-wrap:wrap; gap:14px; margin-top:12px; font-size:12px; color:var(--ink-2); }
.legend__item{ display:inline-flex; align-items:center; gap:7px; }
.legend__swatch{ width:10px; height:10px; border-radius:3px; flex:none; }

.tip{
  position:absolute;
  z-index:20;
  pointer-events:none;
  padding:9px 12px;
  border-radius:11px;
  border:1px solid rgba(125,175,235,.24);
  background:rgba(6,12,26,.96);
  -webkit-backdrop-filter:blur(10px);
          backdrop-filter:blur(10px);
  box-shadow:0 20px 44px -22px rgba(0,0,0,.95);
  font-size:12px;
  white-space:nowrap;
  opacity:0;
  transition:opacity .15s var(--ease);
}
.tip.is-on{ opacity:1; }
.tip__title{ font-weight:700; margin-bottom:5px; font-size:12.5px; }
.tip__row{ display:flex; align-items:center; gap:7px; color:var(--ink-2); }
.tip__row b{ margin-left:auto; color:var(--ink); font-variant-numeric:tabular-nums; }
.tip__sw{ width:8px; height:8px; border-radius:2px; flex:none; }

/* тепловая карта */
.heat{ display:grid; grid-template-columns:auto repeat(24,minmax(0,1fr)); gap:2px; align-items:center; }
.heat__h{ font-size:9.5px; color:var(--ink-4); text-align:center; font-weight:600; }
.heat__d{ font-size:10.5px; color:var(--ink-3); padding-right:7px; font-weight:600; text-align:right; }
.heat__c{
  aspect-ratio:1;
  border-radius:3px;
  background:rgba(125,175,235,.05);
  transition:transform .18s var(--ease);
  cursor:default;
}
.heat__c:hover{ transform:scale(1.35); z-index:2; position:relative; }

/* мини-полоски качества */
.meter{ display:flex; flex-direction:column; gap:5px; }
.meter__top{ display:flex; justify-content:space-between; font-size:12px; }
.meter__top b{ font-variant-numeric:tabular-nums; }
.meter__track{ height:6px; border-radius:20px; background:rgba(125,175,235,.1); overflow:hidden; }
.meter__fill{ height:100%; border-radius:20px; background:var(--series-1); transition:width .5s var(--ease); }

/* ============================================================
   Служебное
   ============================================================ */
.empty{
  padding:46px 24px;
  text-align:center;
  color:var(--ink-3);
}
.empty svg{ width:38px; height:38px; margin:0 auto 12px; opacity:.4; }
.empty h3{ font-size:15px; font-weight:700; color:var(--ink-2); }
.empty p{ font-size:13px; margin-top:5px; }

.skeleton{
  border-radius:10px;
  background:linear-gradient(90deg,rgba(125,175,235,.06) 25%,rgba(125,175,235,.13) 37%,rgba(125,175,235,.06) 63%);
  background-size:460px 100%;
  animation:shimmer 1.3s linear infinite;
}

.note{
  padding:11px 14px;
  border-radius:11px;
  border:1px solid rgba(125,211,252,.2);
  background:rgba(56,189,248,.07);
  font-size:12.5px;
  color:#cfe8ff;
  line-height:1.55;
}
.note--warn{ border-color:rgba(201,133,0,.28); background:rgba(201,133,0,.08); color:#e8c37a; }
.note--danger{ border-color:rgba(230,103,103,.28); background:rgba(230,103,103,.08); color:#fca5a5; }

.toasts{
  position:fixed;
  right:18px; bottom:18px;
  z-index:120;
  display:flex;
  flex-direction:column;
  gap:9px;
  max-width:min(370px,90vw);
}
.toast{
  padding:12px 15px;
  border-radius:13px;
  border:1px solid var(--line);
  background:rgba(8,14,30,.95);
  -webkit-backdrop-filter:blur(14px);
          backdrop-filter:blur(14px);
  box-shadow:0 24px 50px -24px rgba(0,0,0,.95);
  font-size:13px;
  animation:rise .35s var(--ease) both;
}
.toast--ok{ border-color:rgba(25,158,112,.34); }
.toast--err{ border-color:rgba(230,103,103,.34); }
.toast b{ display:block; margin-bottom:2px; font-size:13.5px; }
.toast span{ color:var(--ink-3); font-size:12.5px; }

.modal{ position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:20px; }
.modal__backdrop{ position:absolute; inset:0; background:rgba(2,5,12,.72); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
.modal__card{
  position:relative;
  width:min(560px,100%);
  max-height:88vh;
  overflow:auto;
  padding:24px 26px;
  animation:rise .35s var(--ease) both;
}
.modal__card h2{ font-size:18px; font-weight:750; letter-spacing:-.02em; }
.modal__card > p{ font-size:13px; color:var(--ink-3); margin-top:4px; }
.modal__foot{ display:flex; gap:9px; justify-content:flex-end; margin-top:22px; }

.drop{
  padding:26px;
  border-radius:var(--r-md);
  border:1.5px dashed rgba(125,175,235,.22);
  background:rgba(125,175,235,.03);
  text-align:center;
  cursor:pointer;
  transition:all .3s var(--ease);
}
.drop:hover,.drop.is-over{ border-color:rgba(125,211,252,.5); background:rgba(56,189,248,.07); }
.drop svg{ width:28px; height:28px; margin:0 auto 9px; opacity:.6; }
.drop b{ font-size:13.5px; }
.drop small{ display:block; margin-top:4px; color:var(--ink-4); font-size:12px; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width:1180px){
  .grid--4{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid--sidebar,.grid--wide-left{ grid-template-columns:minmax(0,1fr); }
}
@media (max-width:980px){
  .shell{ grid-template-columns:1fr; }
  .sidebar{
    position:sticky; top:0; z-index:30;
    height:auto;
    flex-direction:row;
    align-items:center;
    gap:12px;
    padding:10px 14px;
    overflow-x:auto;
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .brand__txt{ display:none; }
  .nav{ flex-direction:row; flex:1; gap:4px; }
  .nav__item span{ display:none; }
  .nav__item{ padding:9px 11px; }
  .nav__item.is-active{ padding:8px 10px; }
  .side-foot{ flex-direction:row; align-items:center; }
  .acc-pulse{ display:none; }
  .main{ padding:18px 14px 40px; }
}
@media (max-width:720px){
  .grid--2,.grid--3,.grid--4{ grid-template-columns:minmax(0,1fr); }
  .heat{ grid-template-columns:auto repeat(24,minmax(0,1fr)); gap:1px; }
  .heat__h{ font-size:7.5px; }
}

/* ============================================================
   v2: фишки фильтров, воронка, выезжающая карточка, списки выбора
   ============================================================ */
.chips{ display:flex; flex-wrap:wrap; gap:6px; }
.chip{
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 11px;
  border-radius:20px;
  border:1px solid var(--line);
  background:rgba(125,175,235,.05);
  color:var(--ink-2);
  font-size:12px; font-weight:650;
  cursor:pointer; user-select:none;
  transition:all .22s var(--ease);
}
.chip:hover{ border-color:rgba(125,175,235,.3); color:var(--ink); }
.chip.is-on{
  color:#fff;
  border-color:rgba(125,211,252,.45);
  background:linear-gradient(120deg,rgba(56,189,248,.26),rgba(37,99,235,.14));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}
.chip--exact.is-on{ border-color:rgba(25,158,112,.5); background:rgba(25,158,112,.18); color:#8ff0cb; }
.chip--hidden.is-on{ border-color:rgba(201,133,0,.5); background:rgba(201,133,0,.16); color:#e8c37a; }
.chip__n{ font-size:10.5px; color:var(--ink-4); font-variant-numeric:tabular-nums; }
.chip.is-on .chip__n{ color:rgba(255,255,255,.7); }
.chips__label{ font-size:11.5px; color:var(--ink-4); font-weight:600; margin-right:4px; align-self:center; }

.funnel{ display:grid; gap:8px; }
.funnel__row{ display:grid; grid-template-columns:150px 1fr 74px; gap:12px; align-items:center; font-size:12.5px; }
.funnel__name{ color:var(--ink-2); font-weight:650; }
.funnel__bar{ height:14px; border-radius:6px; background:rgba(125,175,235,.08); overflow:hidden; }
.funnel__fill{ height:100%; border-radius:6px; background:var(--series-1); transition:width .5s var(--ease); }
.funnel__val{ text-align:right; font-variant-numeric:tabular-nums; font-weight:700; }
.funnel__val small{ display:block; font-weight:600; color:var(--ink-4); font-size:10.5px; }

.picklist{
  max-height:220px; overflow:auto;
  border:1px solid var(--line); border-radius:12px;
  background:rgba(4,8,18,.5);
}
.picklist label{
  display:flex; align-items:center; gap:10px;
  padding:8px 12px;
  border-bottom:1px solid var(--line-2);
  cursor:pointer; font-size:13px;
}
.picklist label:last-child{ border-bottom:0; }
.picklist label:hover{ background:rgba(125,175,235,.05); }
.picklist input{ accent-color:var(--accent); width:15px; height:15px; }
.picklist__meta{ margin-left:auto; color:var(--ink-4); font-size:11.5px; white-space:nowrap; }
.picklist__head{ display:flex; gap:8px; align-items:center; padding:8px 10px; border-bottom:1px solid var(--line); background:rgba(7,13,28,.8); position:sticky; top:0; }
.picklist__head input{ padding:6px 10px; font-size:12.5px; }

.drawer{ position:fixed; inset:0; z-index:90; }
.drawer__backdrop{ position:absolute; inset:0; background:rgba(2,5,12,.6); }
.drawer__card{
  position:absolute; top:12px; right:12px; bottom:12px;
  width:min(520px,calc(100% - 24px));
  overflow:auto;
  padding:22px 24px;
  border-radius:var(--r-lg);
  animation:slideIn .35s var(--ease) both;
}
@keyframes slideIn{ from{opacity:0; transform:translateX(24px)} to{opacity:1; transform:none} }
.drawer__close{ position:absolute; top:14px; right:14px; }
.kv{ display:grid; grid-template-columns:140px 1fr; gap:6px 12px; font-size:12.5px; }
.kv dt{ color:var(--ink-4); }
.kv dd{ margin:0; color:var(--ink); word-break:break-word; }

.tag{ display:inline-flex; padding:2px 8px; border-radius:8px; background:rgba(144,133,233,.14); border:1px solid rgba(144,133,233,.3); color:#c3b5f7; font-size:11px; font-weight:650; margin:0 3px 3px 0; }
.job.is-paused{ border-color:rgba(201,133,0,.35); }
.job.is-interrupted{ border-color:rgba(201,133,0,.25); border-style:dashed; }
.stat-mini{ display:flex; flex-wrap:wrap; gap:6px 14px; font-size:11.5px; color:var(--ink-3); margin-top:8px; }
.stat-mini b{ color:var(--ink-2); font-variant-numeric:tabular-nums; }
.sel-bar{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:9px 14px;
  border-bottom:1px solid var(--line-2);
  background:rgba(56,189,248,.06);
  font-size:12.5px;
}
tbody tr.is-selected{ background:rgba(56,189,248,.08); }
td.chk,th.chk{ width:34px; padding-right:0; }
td.chk input,th.chk input{ accent-color:var(--accent); width:15px; height:15px; }
.lead-select{ padding:4px 26px 4px 8px; font-size:12px; border-radius:8px; width:auto; }
.mono{ font-family:ui-monospace,"Cascadia Mono",Consolas,monospace; font-size:12px; }
.grid--5{ grid-template-columns:repeat(5,minmax(0,1fr)); }
@media (max-width:1180px){ .grid--5{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:720px){ .grid--5{ grid-template-columns:repeat(2,minmax(0,1fr)); } .funnel__row{ grid-template-columns:100px 1fr 60px; } }
