/* ==========================================================================
   WaperDLC — общие стили макетов
   Стиль взят с реальных сайтов клиентов: тёмный фон, одна акцентная краска,
   плавающая пилюля-навигации с размытием, карточки с волосяной рамкой.
   ========================================================================== */

/* --- Переменные ---------------------------------------------------------- */

:root {
  /* поверхности */
  --bg: #0b0b0e;
  --bg-2: #0f0f13;
  --panel: #131318;
  --panel-2: #17171d;
  --raised: #1c1c23;

  /* обводки */
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-3: rgba(255, 255, 255, 0.22);

  /* текст */
  --text: #ededf0;
  --text-2: #a8a8b3;
  --text-3: #6e6e7a;

  /* акцент */
  --primary: #7c5cff;
  --primary-2: #a288ff;
  --primary-dim: rgba(124, 92, 255, 0.14);
  --primary-line: rgba(124, 92, 255, 0.34);

  /* статусы */
  --ok: #4ade80;
  --warn: #ffb020;
  --danger: #ff5c5c;
  --info: #36d7ff;

  /* форма */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.35);

  --font: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --nav-h: 64px;
  --wrap: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Фоновая сетка и пятно света — как на реальных сайтах */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(760px 420px at 50% -140px, rgba(124, 92, 255, 0.20), transparent 70%),
    radial-gradient(600px 380px at 88% 6%, rgba(54, 215, 255, 0.09), transparent 70%),
    linear-gradient(transparent 0 39px, rgba(255, 255, 255, 0.022) 39px 40px),
    linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, 0.022) 39px 40px);
  background-size: auto, auto, 40px 40px, 40px 40px;
}

body > * { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

h1 { font-size: clamp(34px, 5.2vw, 60px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 20px; }

p { margin: 0; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.muted { color: var(--text-2); }
.dim { color: var(--text-3); }

.gradient {
  background: linear-gradient(96deg, var(--primary-2), var(--info) 55%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-2);
}

/* --- Раскладка ----------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1480px; }

.section { padding: 84px 0; }
.section-tight { padding: 52px 0; }

.section-head { max-width: 660px; margin-bottom: 40px; }
.section-head h2 { margin: 12px 0 14px; }
.section-head p { color: var(--text-2); font-size: 16px; }

.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.wrapx { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; margin-inline: auto; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --- Навигация ----------------------------------------------------------- */

.nav-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 20px 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 12px 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(11, 11, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.brand svg { width: 26px; height: 26px; }
.brand .dot { color: var(--primary); }

.nav-links { display: flex; gap: 2px; margin-left: auto; }

.nav-links a {
  padding: 8px 13px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav-links a.on { color: var(--text); background: rgba(255, 255, 255, .08); }

.nav-side { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.nav-links + .nav-side { margin-left: 0; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 22px rgba(124, 92, 255, .32); }
.btn-primary:hover { background: #8b6dff; }

.btn-ghost { background: rgba(255, 255, 255, .05); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); border-color: var(--line-3); }

.btn-quiet { background: transparent; color: var(--text-2); }
.btn-quiet:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

.btn-danger { background: rgba(255, 92, 92, .12); border-color: rgba(255, 92, 92, .3); color: #ff8b8b; }
.btn-danger:hover { background: rgba(255, 92, 92, .2); }

.btn-ok { background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .3); color: var(--ok); }
.btn-ok:hover { background: rgba(74, 222, 128, .2); }

.btn-lg { height: 50px; padding: 0 28px; font-size: 15px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 11px; font-size: 12px; }
.btn-block { width: 100%; }

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: var(--r-sm);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, .05);
}
.btn-icon svg { width: 17px; height: 17px; }

/* --- Плашки и бейджи ----------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .05);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.chip-primary { border-color: var(--primary-line); background: var(--primary-dim); color: var(--primary-2); }
.chip-ok { border-color: rgba(74, 222, 128, .3); background: rgba(74, 222, 128, .12); color: var(--ok); }
.chip-warn { border-color: rgba(255, 176, 32, .3); background: rgba(255, 176, 32, .12); color: var(--warn); }
.chip-danger { border-color: rgba(255, 92, 92, .3); background: rgba(255, 92, 92, .12); color: var(--danger); }
.chip-info { border-color: rgba(54, 215, 255, .3); background: rgba(54, 215, 255, .1); color: var(--info); }

.chip-sm { height: 23px; padding: 0 9px; font-size: 11.5px; }

.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.code {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(0, 0, 0, .35);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--primary-2);
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}
.card-pad { padding: 22px; }
.card-hd {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card-hd h3 { font-size: 15px; }
.card-bd { padding: 20px; }
.card-ft {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .16);
  border-radius: 0 0 var(--r) var(--r);
}
.card-hover { transition: border-color .16s, transform .16s, background .16s; }
.card-hover:hover { border-color: var(--line-3); background: var(--panel-2); transform: translateY(-2px); }

.tile { padding: 20px; }
.tile-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  margin-bottom: 14px;
  border: 1px solid var(--primary-line);
  border-radius: 11px;
  background: var(--primary-dim);
  color: var(--primary-2);
}
.tile-icon svg { width: 19px; height: 19px; }
.tile h3 { font-size: 16px; margin-bottom: 7px; }
.tile p { font-size: 14px; color: var(--text-2); line-height: 1.55; }

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

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.field .hint { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }

.input, .select, .textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .32);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 11px 14px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary-line);
  box-shadow: 0 0 0 3px var(--primary-dim);
}
.select { appearance: none; padding-right: 34px; cursor: pointer; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 40px; }
.input-wrap .lead {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  cursor: pointer;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  background: none; border: 0;
}

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--text-2); }
.check input { margin: 3px 0 0; accent-color: var(--primary); width: 16px; height: 16px; flex: none; }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .06);
  transition: background .18s, border-color .18s;
}
.switch .track::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform .18s, background .18s;
}
.switch input:checked + .track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }

/* --- Таблицы ------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .022); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .right { text-align: right; }

/* --- Аватарки ------------------------------------------------------------ */

.ava {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: linear-gradient(150deg, #2a2a34, #17171d);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}
.ava-lg { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; }
.ava-xl { width: 76px; height: 76px; border-radius: 20px; font-size: 26px; }

.who { display: flex; align-items: center; gap: 11px; }
.who-name { font-weight: 600; line-height: 1.3; }
.who-sub { font-size: 12.5px; color: var(--text-3); line-height: 1.3; }

.ring { position: relative; flex: none; }
.ring .dot-live {
  position: absolute;
  right: -2px; bottom: -2px;
  border: 2px solid var(--panel);
  width: 11px; height: 11px;
}

/* --- Метрики ------------------------------------------------------------- */

.stat { padding: 18px 20px; }
.stat .k { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.stat .v {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat .d { margin-top: 4px; font-size: 12.5px; color: var(--text-3); }
.stat .up { color: var(--ok); }
.stat .down { color: var(--danger); }

/* --- График (чистый CSS) ------------------------------------------------- */

.chart { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding-top: 10px; }
.chart i {
  flex: 1;
  min-height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--primary), rgba(124, 92, 255, .22));
}
.chart i.alt { background: linear-gradient(180deg, var(--info), rgba(54, 215, 255, .2)); }
.chart-ax { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }

.meter { height: 7px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--primary); }
.meter i.ok { background: var(--ok); }
.meter i.warn { background: var(--warn); }
.meter i.danger { background: var(--danger); }

/* --- Вкладки ------------------------------------------------------------- */

.tabs { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); background: rgba(0, 0, 0, .28); width: fit-content; }
.tabs button {
  padding: 8px 17px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--raised); color: var(--text); box-shadow: var(--shadow-sm); }

/* --- Хлебные крошки / заголовок страницы --------------------------------- */

.page-head { padding: 34px 0 22px; }
.page-head h1 { font-size: 30px; }
.page-head p { margin-top: 7px; color: var(--text-2); }

.crumbs { display: flex; gap: 7px; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: 13px; }
.crumbs a:hover { color: var(--text-2); }

/* --- Подвал -------------------------------------------------------------- */

.footer { margin-top: 70px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .22); }
.footer-in { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding: 52px 0 34px; }
.footer h4 { font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer li a { font-size: 14px; color: var(--text-2); transition: color .15s; }
.footer li a:hover { color: var(--text); }
.footer-bot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0 30px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }

/* --- Подсветка кода ------------------------------------------------------ */

.kbd {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  font-family: var(--mono);
  font-size: 12px;
}

/* --- Пустое состояние ---------------------------------------------------- */

.empty { padding: 54px 20px; text-align: center; }
.empty .em-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  margin: 0 auto 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
  color: var(--text-3);
}
.empty p { color: var(--text-3); font-size: 14px; }

/* --- Модальное окно (макет) ---------------------------------------------- */

.modal-bg {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(6px);
}
.modal {
  width: 100%; max-width: 460px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-hd { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-bd { padding: 22px; }
.modal-ft { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .18); }

/* --- Адаптив ------------------------------------------------------------- */

@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-in { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .g4 { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr; }
}