/* 0) БАЗА + ПЕРЕМЕННЫЕ */
:root{
  --bg:#0b1020;
  --bg2:#0e1530;

  --card: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.14);

  --text:#eaf0ff;
  --muted: rgba(234,240,255,.68);

  --brand:#7c5cff;
  --brand2:#25d6ff;
  --good:#2ee59d;

  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --r: 22px;
  --r2: 16px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}

*{ box-sizing:border-box; }

/* Важно: фон и анти-белые зоны при "перетягивании" */
html, body{
  height:100%;
  margin:0;
  background:#070b17;          /* fallback, чтобы не вылезал белый фон */
  overscroll-behavior:none;     /* убирает bounce в Chromium/Firefox */
}

body{
  min-height:100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(124,92,255,.35), transparent 55%),
    radial-gradient(1100px 900px at 85% 15%, rgba(37,214,255,.22), transparent 55%),
    radial-gradient(900px 700px at 60% 90%, rgba(46,229,157,.18), transparent 55%),
    linear-gradient(180deg, var(--bg), #070b17 65%);
  overflow-x:hidden;
}

.noise::before{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode:overlay;
  opacity:.22;
}

a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; border:0; background:transparent; cursor:pointer; }

/* Обёртка страницы — держит высоту, чтобы снизу не появлялась "пустота" */
.page{
  min-height: calc(100vh - 0px);
  padding-bottom: 24px;
}

/* Общий контейнер (совпадает с HTML: class="container") */
/* Сайт шире + меньше отступы от краёв */
.container{
  width: min(1400px, calc(100vw - 32px)); /* по 16px с каждой стороны */
  margin: 0 auto;
}

/* 1) СТЕКЛЯННАЯ ПАНЕЛЬ (class="panel") */
.panel{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border:1px solid var(--stroke);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  position:relative;
  overflow:hidden;
}

.panel::before{
  content:"";
  position:absolute; inset:-2px;
  background: linear-gradient(90deg, rgba(124,92,255,.25), rgba(37,214,255,.18), rgba(46,229,157,.12));
  opacity:.22;
  filter: blur(18px);
  pointer-events:none;
}

.panel > *{ position:relative; }

/* 2) ВЕРХНЯЯ ПОЛОСА (header.topbar) */
.topbar{
  padding: 12px 0 8px; /* меньше воздуха */
}

.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

/* Лого: <a class="logo"> ... */
.logo{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo__mark{
  width:46px; height:46px;
  border-radius:14px;
  background:
    radial-gradient(18px 18px at 28% 35%, rgba(255,255,255,.6), transparent 55%),
    conic-gradient(from 210deg, var(--brand), var(--brand2), var(--good), var(--brand));
  box-shadow: 0 14px 40px rgba(124,92,255,.30);
  border:1px solid rgba(255,255,255,.18);
  position:relative;
}

.logo__mark::after{
  content:"</>";
  position:absolute; inset:0;
  display:grid; place-items:center;
  font-family: var(--mono);
  font-weight:900;
  font-size:13px;
  color: rgba(9,12,25,.92);
}

.logo__text b{
  display:block;
  font-size:15px;
  letter-spacing:.2px;
}

.logo__text small{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:12px;
}

/* Поиск: <div class="search"> ... */
.search{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius: 999px;
  background: var(--card);
  border:1px solid var(--stroke);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  min-width: 420px;
}

.search__icon{ opacity:.75; }

.search__input{
  flex:1;
  background:transparent;
  border:0;
  outline:0;
  color: var(--text);
  font-size:13px;
}

.search__kbd{
  font-family: var(--mono);
  font-size:11px;
  padding:4px 7px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(234,240,255,.78);
}

/* Блок кнопок справа: <div class="topbar__actions"> */
.topbar__actions{
  display:flex;
  align-items:center;
  gap:10px;
}

/* 3) КНОПКИ (class="btn") */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.16);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
  transition: transform .12s ease, border-color .12s ease;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.24);
}

/* В твоём HTML: class="btn btn--primary" */
.btn--primary{
  border-color: rgba(124,92,255,.55);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(255,255,255,.22), transparent 58%),
    linear-gradient(135deg, rgba(124,92,255,.70), rgba(37,214,255,.28));
}

/* Точка внутри primary-кнопки: <span class="btn__dot"> */
.btn__dot{
  width:10px;height:10px;border-radius:999px;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(46,229,157,.14);
}

/* В твоём HTML: class="btn btn--ghost" */
.btn--ghost{
  border-color: rgba(124,92,255,.45);
  background: linear-gradient(135deg, rgba(124,92,255,.28), rgba(37,214,255,.10));
}

/* 4) ОСНОВНАЯ СЕТКА: <div class="container layout"> */
.layout{
  margin: 6px auto 24px; /* меньше отступы => ближе к краям */
  display:grid;
  grid-template-columns: 300px 1fr;
  gap:12px; /* меньше расстояние между колонками */
}

/* 5) ЛЕВАЯ ПАНЕЛЬ: <aside class="sidebar panel"> */
.sidebar{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height: 660px;
}

.sidebar__nav{
  padding:12px;
  border-radius: var(--r2);
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.12);
  display:flex;
  flex-direction:column;
  gap:8px;
}

.sidebar__link{
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(234,240,255,.86);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.sidebar__link:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
}

/* Активный пункт: class="sidebar__link is-active" */
.sidebar__link.is-active{
  border-color: rgba(124,92,255,.55);
  background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(37,214,255,.12));
}

.sidebar__card{
  padding:12px;
  border-radius: var(--r2);
  background: rgba(0,0,0,.20);
  border:1px solid rgba(255,255,255,.12);
}

.sidebar__cardTitle{
  font-weight:900;
  font-size:13px;
  margin-bottom:10px;
}

/* Прогресс: .progress__row .progress__bar .progress__fill */
.progress__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color: rgba(234,240,255,.78);
  font-size:12px;
}

.progress__row b{
  font-family: var(--mono);
  font-weight:900;
  color: rgba(234,240,255,.92);
}

.progress__bar{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  overflow:hidden;
  margin-top:10px;
}

.progress__fill{
  height:100%;
  border-radius:999px;
  width:0%;
  background: linear-gradient(90deg, var(--brand), var(--brand2), var(--good));
  box-shadow: 0 10px 30px rgba(124,92,255,.25);
}

.progress__hint{
  margin-top:10px;
  color: var(--muted);
  font-size:12px;
  line-height:1.35;
}

/* Нижний совет: .sidebar__tip */
.sidebar__tip{
  margin-top:auto;
  padding:12px;
  border-radius: var(--r2);
  background: rgba(0,0,0,.20);
  border:1px solid rgba(255,255,255,.12);
  display:flex;
  gap:10px;
  align-items:flex-start;
}

.sidebar__tipBadge{
  width:34px;height:34px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  display:grid; place-items:center;
  font-family: var(--mono);
  font-weight:900;
}

.sidebar__tip p{
  margin:0;
  color: var(--muted);
  font-size:12px;
  line-height:1.35;
}

.sidebar__tip b{ color: rgba(234,240,255,.92); }

/* 6) ПРАВЫЙ КОНТЕНТ: <main class="content panel"> */
.content{
  padding:14px;
  min-height: 660px;
}

/* Hero: <section class="hero"> */
.hero{
  padding:16px;
  border-radius: var(--r);
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(124,92,255,.25), transparent 58%),
    radial-gradient(90% 140% at 100% 0%, rgba(37,214,255,.18), transparent 58%),
    rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.12);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.hero__title{
  margin:0;
  font-size:18px;
  letter-spacing:.2px;
}

.hero__desc{
  margin:8px 0 0;
  color: var(--muted);
  font-size:12px;
  line-height:1.45;
  max-width: 70ch;
}

.hero__right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Badge: <span class="badge"> <span class="badge__lamp"> */
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  font-size:12px;
  color: rgba(234,240,255,.86);
}

.badge__lamp{
  width:9px;height:9px;
  border-radius:999px;
  background: #ffcc66;
  box-shadow: 0 0 0 4px rgba(255,204,102,.14);
}

/* 7) КАРТОЧКИ: <section class="cards"> <article class="card"> */
.cards{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}

.card{
  padding:14px;
  border-radius: var(--r);
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.12);
  overflow:hidden;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.22);
  background: rgba(0,0,0,.26);
}

.card__top{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

.chip{
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(234,240,255,.82);
}

.chip--soft{
  border-color: rgba(124,92,255,.35);
  background: rgba(124,92,255,.10);
}

.card__title{
  margin:10px 0 6px;
  font-size:14px;
}

.card__text{
  margin:0;
  color: var(--muted);
  font-size:12px;
  line-height:1.45;
}

.card__bottom{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.meta{
  color: rgba(234,240,255,.72);
  font-size:12px;
}

/* 8) АДАПТИВ */
@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ min-height:auto; }
  .search{ min-width: 0; width: 100%; }
  .topbar__inner{ flex-wrap:wrap; }
  .cards{ grid-template-columns: 1fr; }
}

@media (max-width: 760px){
  .container{
    width: min(1400px, calc(100vw - 24px));
  }

  .layout{
    margin: 4px auto 18px;
    gap: 10px;
  }

  .content{
    order: 1;
    min-height: auto;
    padding: 12px;
  }

  .sidebar{
    order: 2;
    min-height: auto;
    padding: 12px;
    gap: 10px;
  }

  .sidebar__nav{
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sidebar__link{
    min-height: 48px;
    padding: 10px 8px;
    justify-content: center;
    text-align: center;
  }

  .sidebar__card,
  .sidebar__tip{
    padding: 10px;
  }

  .hero{
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .hero__desc{
    max-width: none;
  }

  .hero__right{
    width: 100%;
    justify-content: flex-start;
  }

  .card{
    padding: 12px;
  }

  .card__bottom{
    align-items: flex-start;
    flex-direction: column;
  }

  .result-head{
    padding-right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .result-chip{
    position: static;
    align-self: flex-start;
  }

  .result-grid{
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-grid--head{
    display: none;
  }

  .status-col{
    justify-content: flex-start;
  }
}

@media (max-width: 560px){
  .container{
    width: min(1400px, calc(100vw - 20px));
  }

  .topbar{
    padding: 10px 0 6px;
  }

  .topbar__inner{
    gap: 10px;
    align-items: flex-start;
  }

  .logo{
    gap: 10px;
    align-items: flex-start;
  }

  .logo__mark{
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .logo__text b{
    font-size: 14px;
  }

  .logo__text small{
    font-size: 11px;
  }

  .hero__title{
    font-size: 17px;
  }

  .sidebar__nav{
    grid-template-columns: 1fr 1fr;
  }

  .sidebar__cardTitle,
  .result-title{
    font-size: 24px;
  }

  .result-subtitle{
    font-size: 16px;
  }
}

.result-card{
  margin-top: 16px;
  border-radius: 18px;
  padding: 18px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.10);
}

.result-head{
  position: relative;
  padding-right: 160px;
}

.result-title{
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
}

.result-subtitle{
  margin-top: 6px;
  font-size: 18px;
  opacity: .85;
}

.result-chip{
  position: absolute;
  right: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 700;
}

.result-chip .dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f4c84f;
  box-shadow: 0 0 0 4px rgba(244,200,79,0.15);
}

.result-grid{
  display: grid;
  grid-template-columns: 90px 1fr 1fr 160px;
  gap: 14px;
  align-items: center;
}

.result-grid--head{
  margin-top: 18px;
  padding: 10px 12px;
  font-size: 26px;
  font-weight: 800;
}

.result-row{
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.status-col{
  display: flex;
  justify-content: flex-end;
}

.pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  font-weight: 800;
}

.pill--ok{
  border-color: rgba(120,255,120,0.22);
}

.pill--bad{
  border-color: rgba(160,120,255,0.25);
}

.mono{
  font-variant-numeric: tabular-nums;
}

/* Общая плашка */
.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

/* Верно — зеленая неоновая */
.pill--ok {
  color: #7CFFB2;
  border: 1px solid rgba(0, 255, 150, 0.6);
  background: rgba(0, 255, 150, 0.08);
  box-shadow:
    0 0 8px rgba(0, 255, 150, 0.4),
    0 0 18px rgba(0, 255, 150, 0.25),
    inset 0 0 8px rgba(0, 255, 150, 0.15);
}

/* Ошибка — красная неоновая */
.pill--bad {
  color: #FF8A8A;
  border: 1px solid rgba(255, 80, 80, 0.7);
  background: rgba(255, 80, 80, 0.08);
  box-shadow:
    0 0 8px rgba(255, 80, 80, 0.4),
    0 0 18px rgba(255, 80, 80, 0.25),
    inset 0 0 8px rgba(255, 80, 80, 0.15);
}