/* Веб-кабинет Hosting · Latency Lab. Токены - те же, что у latencylab.ru, парсера и мини-аппа. */
:root {
  --bg: #070b14;
  --bg-elevated: #0d1424;
  --bg-card: rgba(16, 24, 42, 0.72);
  --bg-card-solid: #0f1729;
  --bg-hover: rgba(120, 160, 220, 0.06);
  --line: rgba(120, 160, 220, 0.14);
  --line-strong: rgba(120, 160, 220, 0.28);
  --text: #e8eefc;
  --muted: #93a0bd;
  --faint: #5f6b86;
  --accent: #00e5a8;
  --accent-2: #4f8cff;
  --cyan: #19c4ff;
  --danger: #ff6b8a;
  --warn: #ffb454;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --side: 252px;
  --eco-h: 64px;
  --grad: linear-gradient(135deg, var(--accent), var(--cyan));
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
::selection { background: rgba(0, 229, 168, 0.28); }

/* ---- фон ---- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(rgba(79, 140, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 140, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(0, 229, 168, 0.13), transparent 70%),
    radial-gradient(700px 500px at 10% 0%, rgba(79, 140, 255, 0.12), transparent 70%);
}

/* ---- общие элементы ---- */
.eyebrow { font: 600 0.72rem/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.label { display: block; font: 500 0.7rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.86rem; }
.accent { color: var(--accent); }
.danger { color: var(--danger); }
.warn { color: var(--warn); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }

.logo {
  display: inline-block; width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: #0b1222 url("https://latencylab.ru/assets/logo-bot-512.png?v=owl") center/cover no-repeat;
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 24px rgba(0, 229, 168, 0.25);
}
.logo--xl { width: 72px; height: 72px; border-radius: 20px; }
.logo--btn { width: 22px; height: 22px; border-radius: 6px; box-shadow: none; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; transform: scale(0.96); } }
/* Только сдвиг, без прозрачности: если браузер придержит анимацию (фоновая вкладка), контент не останется бледным. */
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
  padding: 0.66rem 1.2rem; font-weight: 700; font-size: 0.92rem;
  color: #041018; background: var(--grad);
  box-shadow: 0 8px 26px rgba(0, 229, 168, 0.22);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(0, 229, 168, 0.32); }
.btn:active { transform: none; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn--ghost { color: var(--text); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--accent); }
.btn--danger { color: #fff; background: linear-gradient(135deg, #ff6b8a, #ff4f6d); box-shadow: 0 8px 26px rgba(255, 107, 138, 0.22); }
.btn--sm { padding: 0.45rem 0.9rem; font-size: 0.84rem; }
.btn--lg { padding: 0.9rem 1.5rem; font-size: 1rem; }
.btn--wide { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; font-size: 0.86rem; }
.linkbtn:hover { text-decoration: underline; }
.iconbtn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.iconbtn:hover { color: var(--text); background: var(--bg-hover); }
.iconbtn svg { width: 16px; height: 16px; }

.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 1.25rem 1.35rem;
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card__head h2 { display: flex; align-items: center; gap: 0.55rem; }

.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.62rem; border-radius: 999px; font: 600 0.72rem/1.4 var(--mono); letter-spacing: 0.03em; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { color: var(--accent); background: rgba(0, 229, 168, 0.1); }
.badge--warn { color: var(--warn); background: rgba(255, 180, 84, 0.1); }
.badge--bad { color: var(--danger); background: rgba(255, 107, 138, 0.1); }
.badge--muted { color: var(--muted); background: rgba(147, 160, 189, 0.1); }
.badge--waf { color: var(--cyan); background: rgba(25, 196, 255, 0.1); }
.badge--waf::before { display: none; }

.field {
  width: 100%; padding: 0.72rem 0.95rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: rgba(5, 9, 18, 0.6); color: var(--text);
  font-size: 0.95rem; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 229, 168, 0.15); }
.field--mono { font-family: var(--mono); font-size: 0.9rem; }
.hint { color: var(--muted); font-size: 0.82rem; margin-top: 0.45rem; }
.hint code { color: var(--text); background: rgba(255, 255, 255, 0.05); padding: 0.05rem 0.35rem; border-radius: 5px; }

.alert { padding: 0.75rem 0.95rem; border-radius: var(--radius-sm); font-size: 0.9rem; }
.alert--bad { background: rgba(255, 107, 138, 0.1); color: #ffc2cf; border: 1px solid rgba(255, 107, 138, 0.3); }
.alert--ok { background: rgba(0, 229, 168, 0.08); color: #b5ffe8; border: 1px solid rgba(0, 229, 168, 0.3); }
.alert--info { background: rgba(79, 140, 255, 0.08); color: #c9dbff; border: 1px solid rgba(79, 140, 255, 0.28); }

.ops { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.op { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.55rem 0.2rem 0.25rem; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); }
.op img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.op--off { opacity: 0.4; filter: grayscale(1); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 0.32rem 0.8rem; border-radius: 999px; cursor: pointer; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.is-on { color: #041018; background: var(--grad); }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 0.5rem; }
#tp-methods { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.choice {
  text-align: left; padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); transition: border-color 0.15s, background 0.15s;
}
.choice b { display: block; font-size: 0.95rem; }
.choice small { color: var(--muted); font-size: 0.76rem; font-family: var(--mono); }
.choice:hover { border-color: var(--line-strong); background: var(--bg-hover); }
.choice.is-on { border-color: var(--accent); background: rgba(0, 229, 168, 0.08); box-shadow: 0 0 0 1px var(--accent) inset; }

.toggle { position: relative; width: 42px; height: 24px; border-radius: 999px; border: 0; cursor: pointer; background: rgba(147, 160, 189, 0.25); transition: background 0.2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.toggle.is-on { background: var(--accent); }
.toggle.is-on::after { transform: translateX(18px); }

.kv { display: grid; gap: 0.1rem; }
.kv > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); font-size: 0.88rem; }
.kv span:last-child { text-align: right; font-weight: 600; }

.copy {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.55rem 0.55rem 0.85rem;
  border-radius: var(--radius-sm); background: rgba(5, 9, 18, 0.6); border: 1px solid var(--line-strong);
}
.copy code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 0.9rem; color: var(--accent); scrollbar-width: none; }

.skel { border-radius: var(--radius); background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); background-size: 200% 100%; animation: skel 1.3s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 2.6rem 1.4rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 0.35rem; }
.empty .btn { margin-top: 1rem; }

/* ---- вход и загрузка ---- */
.boot, .login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login__card {
  width: min(440px, 100%); text-align: center; padding: 2.4rem 2rem 2rem; border-radius: 26px;
  background: var(--bg-card); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: var(--shadow);
  display: grid; gap: 0.9rem; justify-items: center; animation: rise 0.4s ease-out;
}
.login__card h1 { font-size: 1.6rem; }
.login__card .btn { margin-top: 0.4rem; }
.login__card .alert { width: 100%; }
.login__hint { color: var(--faint); font-size: 0.82rem; }
.login__bot { color: var(--muted); font-size: 0.86rem; }
.login__bot:hover { color: var(--accent); }

/* ---- общая шапка экосистемы (как у парсера) ---- */
.eco { position: sticky; top: 0; z-index: 40; height: var(--eco-h); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: rgba(7, 11, 20, 0.82); border-bottom: 1px solid var(--line); }
.eco__inner { position: relative; height: 100%; display: flex; align-items: center; gap: 1.25rem; padding: 0 2rem; }
.eco__brand { display: flex; align-items: center; gap: 0.85rem; min-width: 0; flex-shrink: 0; }
.eco-logo { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 800; font-size: 1.05rem; }
.eco-logo__mark { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; background: #0b1222 url("https://latencylab.ru/assets/logo-bot-512.png?v=owl") center / cover no-repeat; box-shadow: 0 0 20px rgba(0, 229, 168, 0.4); }
.eco-logo__text span { color: var(--accent); }
.eco__title { display: flex; flex-direction: column; justify-content: center; gap: 0.08rem; min-width: 0; padding-left: 0.85rem; border-left: 1px solid var(--line); }
.eco__eyebrow { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); line-height: 1.2; }
.eco__tagline { font-size: 0.82rem; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.eco-nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.eco-nav a { color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color 0.2s ease; }
.eco-nav a:hover, .eco-nav a.active { color: var(--accent); }
.eco-nav a.active { font-weight: 600; }
.eco-burger { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.04); color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.eco-burger[aria-expanded="true"] { color: var(--accent); background: rgba(0, 229, 168, 0.1); }

/* ---- каркас ---- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--eco-h)); }
.side {
  position: sticky; top: var(--eco-h); height: calc(100vh - var(--eco-h)); display: flex; flex-direction: column; gap: 1.4rem;
  padding: 1.3rem 1rem 1rem; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 20, 36, 0.92), rgba(7, 11, 20, 0.92)); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.4rem; }
.brand__t { display: grid; line-height: 1.15; }
.brand__t strong { font-size: 1.1rem; }
.nav { display: grid; gap: 0.2rem; }
.nav a {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.62rem 0.8rem; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 600; font-size: 0.93rem; transition: color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--text); background: var(--bg-hover); }
.nav a.is-on { color: var(--text); background: rgba(0, 229, 168, 0.09); box-shadow: inset 2px 0 0 var(--accent); }
.nav a.is-on svg { color: var(--accent); }
.nav__count { margin-left: auto; font: 600 0.72rem var(--mono); color: var(--accent); background: rgba(0, 229, 168, 0.1); padding: 0.05rem 0.45rem; border-radius: 999px; }
.nav__count:empty { display: none; }
.side__foot { margin-top: auto; display: grid; gap: 0.8rem; }
.me { display: flex; align-items: center; gap: 0.65rem; padding: 0.65rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.me__ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #041018; background: var(--grad); flex: none; }
.me__t { display: grid; min-width: 0; line-height: 1.25; }
.me__t strong { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__t small { color: var(--faint); font: 0.72rem var(--mono); }
.me__out { margin-left: auto; color: var(--muted); padding: 0.3rem; border-radius: 8px; }
.me__out:hover { color: var(--danger); background: rgba(255, 107, 138, 0.08); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: var(--eco-h); z-index: 20; display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 2rem; border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.78); backdrop-filter: blur(14px);
}
.top__menu { display: none; border: 0; background: transparent; padding: 0.3rem; color: var(--text); cursor: pointer; }
.top__menu svg { width: 22px; height: 22px; }
.top__t h1 { font-size: 1.35rem; line-height: 1.25; }
.top__r { margin-left: auto; display: flex; align-items: center; gap: 0.8rem; }
.balance { display: grid; text-align: right; line-height: 1.15; }
.balance .label { margin: 0; }
.balance strong { font-size: 1.05rem; }
.view { padding: 1.7rem 2rem 3rem; width: 100%; max-width: 1240px; display: grid; gap: 1.3rem; animation: rise 0.3s ease-out; }

/* ---- просмотр админом кабинета клиента ---- */
.viewas {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin: 1.2rem 2rem 0; padding: 0.75rem 1rem;
  border-radius: var(--radius-sm); border: 1px solid rgba(255, 180, 84, 0.35); background: rgba(255, 180, 84, 0.07); font-size: 0.9rem;
}
.viewas .linkbtn { margin-left: auto; }
.is-viewing .d-act, .is-viewing #c-act, .is-viewing [data-ipreq], .is-viewing .top__r .btn, .is-viewing [data-topup] { display: none !important; }
@media (max-width: 900px) { .viewas { margin: 0.8rem 1rem 0; } }

/* ---- обзор ---- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat { position: relative; overflow: hidden; }
.stat .label { margin-bottom: 0.55rem; }
.stat__v { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat__v small { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-left: 0.25rem; }
.stat__s { margin-top: 0.4rem; color: var(--muted); font-size: 0.82rem; }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 229, 168, 0.12), transparent 70%); }
.stat--grad .stat__v { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.3rem; align-items: start; }
.legend { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; }

/* ---- график ---- */
.chart { position: relative; height: 260px; }
.chart--sm { height: 190px; }
.chart svg { width: 100%; height: 100%; display: block; stroke: none; fill: none; overflow: visible; }
.chart .gl { stroke: rgba(120, 160, 220, 0.1); stroke-width: 1; }
.chart .ax { fill: var(--faint); font: 10.5px var(--mono); stroke: none; }
.chart .lim { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.7; }
.chart .cross { stroke: var(--line-strong); stroke-width: 1; }
.chart__tip {
  position: absolute; pointer-events: none; padding: 0.5rem 0.7rem; border-radius: 10px; font-size: 0.8rem;
  background: rgba(13, 20, 36, 0.96); border: 1px solid var(--line-strong); box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, -110%);
}
.chart__tip b { font-family: var(--mono); }
.chart__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 0.9rem; text-align: center; padding: 1rem; }

/* ---- таблица аренд ---- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 500 0.7rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 0 0.9rem 0.7rem; }
.table td { padding: 0.85rem 0.9rem; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { cursor: pointer; transition: background 0.12s; }
.table tbody tr:hover { background: var(--bg-hover); }
.table .r-id { font: 600 0.82rem var(--mono); color: var(--muted); }
.table .r-main b { display: block; }
.table .r-main small { color: var(--muted); font-size: 0.8rem; }
.table .r-addr { font: 0.86rem var(--mono); color: var(--accent); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .r-speed b { font-size: 0.95rem; }
.table .r-speed small { display: block; color: var(--muted); font: 0.74rem var(--mono); }
.table .r-until small { display: block; color: var(--muted); font-size: 0.78rem; }
.table .r-go { text-align: right; color: var(--faint); }
.table tr.is-dead { opacity: 0.55; }
.bar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; margin-top: 0.35rem; width: 110px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.mini-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
.mini {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.6rem; border-radius: var(--radius-sm); cursor: pointer;
}
.mini:hover { background: var(--bg-hover); }
.mini__t { min-width: 0; flex: 1; }
.mini__t b { display: block; font-size: 0.92rem; }
.mini__t small { display: block; color: var(--muted); font: 0.78rem var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__r { text-align: right; font-size: 0.8rem; color: var(--muted); white-space: nowrap; flex: none; }

/* ---- тарифы и покупка ---- */
.buy { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.3rem; align-items: start; }
.tariffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.tariff { cursor: pointer; display: grid; gap: 0.75rem; transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.tariff:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tariff.is-on { border-color: var(--accent); background: rgba(0, 229, 168, 0.06); box-shadow: 0 0 0 1px var(--accent) inset, 0 18px 50px rgba(0, 229, 168, 0.08); }
.tariff__head { display: flex; justify-content: space-between; gap: 0.6rem; align-items: start; }
.tariff__price { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.tariff__price small { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.tariff__desc { color: var(--muted); font-size: 0.84rem; }
.tariff__cap { display: flex; justify-content: space-between; font: 0.76rem var(--mono); color: var(--faint); }
.config { position: sticky; top: calc(var(--eco-h) + 92px); display: grid; gap: 1.1rem; }
.config h2 { display: flex; gap: 0.5rem; align-items: center; }
.slider { width: 100%; accent-color: var(--accent); }
.speed-v { display: flex; align-items: baseline; justify-content: space-between; }
.speed-v strong { font-size: 1.6rem; font-weight: 800; }
.total { display: flex; align-items: baseline; justify-content: space-between; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.total strong { font-size: 1.5rem; font-weight: 800; }

/* ---- IP ---- */
.listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.listing { display: grid; gap: 0.7rem; align-content: start; }
.listing__ip { font: 0.86rem var(--mono); color: var(--muted); }
.listing__price { font-size: 1.35rem; font-weight: 800; }

/* ---- профиль ---- */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.3rem; align-items: start; }
.big-balance { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rich { color: var(--muted); font-size: 0.9rem; }
.rich b, .rich strong { color: var(--text); }
.rich a { color: var(--accent); }
.rich blockquote { margin: 0.6rem 0; padding: 0.5rem 0.9rem; border-left: 2px solid var(--accent); background: rgba(0, 229, 168, 0.04); border-radius: 0 8px 8px 0; }
.links { display: grid; gap: 0.6rem; }
.linkcard { display: flex; align-items: center; gap: 0.9rem; padding: 0.95rem 1.05rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); transition: border-color 0.15s, background 0.15s; }
.linkcard:hover { border-color: var(--accent); background: rgba(0, 229, 168, 0.04); }
.linkcard__i { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(0, 229, 168, 0.1); color: var(--accent); flex: none; }
.linkcard b { display: block; }
.linkcard small { color: var(--muted); }
.linkcard > svg:last-child { margin-left: auto; color: var(--faint); }

/* ---- панель аренды и модалка ---- */
.drawer, .modal { position: fixed; inset: 0; z-index: 50; }
.drawer__backdrop, .modal__backdrop { position: absolute; inset: 0; background: rgba(3, 6, 12, 0.6); backdrop-filter: blur(3px); animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); overflow-y: auto;
  background: linear-gradient(180deg, #0d1424, #080d18); border-left: 1px solid var(--line-strong); box-shadow: var(--shadow);
  padding: 1.6rem 1.6rem 2.4rem; animation: slide 0.25s ease-out;
}
@keyframes slide { from { transform: translateX(40px); } }
.drawer__x { position: absolute; top: 1rem; right: 1rem; border: 0; background: rgba(255, 255, 255, 0.04); color: var(--muted); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.drawer__x:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.d-head { display: grid; gap: 0.4rem; padding-right: 2.5rem; margin-bottom: 1.3rem; }
.d-head h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.d-sec { display: grid; gap: 0.75rem; padding: 1.15rem 0; border-top: 1px solid var(--line); }
.d-sec__h { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.d-sec__h h3 { font-size: 0.95rem; }
.d-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.d-row .field { flex: 1; min-width: 200px; }
.modal__panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto;
  background: linear-gradient(180deg, #0f1729, #0a101d); border: 1px solid var(--line-strong); border-radius: 22px; box-shadow: var(--shadow);
  padding: 1.7rem; display: grid; gap: 1rem; animation: pop 0.2s ease-out;
}
@keyframes pop { from { transform: translate(-50%, -47%); } }
.modal__panel h2 { font-size: 1.3rem; padding-right: 2.5rem; }
.steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; color: var(--muted); font-size: 0.9rem; }
.steps b, .steps code { color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: 1.6rem; transform: translateX(-50%); z-index: 80; max-width: calc(100% - 2rem);
  padding: 0.75rem 1.15rem; border-radius: 14px; font-weight: 600; font-size: 0.9rem;
  background: rgba(13, 20, 36, 0.97); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: rise 0.2s;
}
.toast--ok { border-color: rgba(0, 229, 168, 0.5); color: #b5ffe8; }
.toast--bad { border-color: rgba(255, 107, 138, 0.5); color: #ffc2cf; }

/* ---- адаптив ---- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .buy, .profile { grid-template-columns: minmax(0, 1fr); }
  .config { position: static; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 60; left: 0; top: 0; width: 270px; transform: translateX(-102%); transition: transform 0.25s; box-shadow: var(--shadow); }
  #app.side-open .side { transform: none; }
  #app.side-open::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(3, 6, 12, 0.6); }
  .side { top: 0; height: 100vh; }
  .eco__inner { padding: 0 1rem; gap: 0.8rem; }
  .eco__tagline { display: none; }
  .eco-burger { display: flex; margin-left: auto; }
  .eco-nav { position: absolute; top: var(--eco-h); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: rgba(7, 11, 20, 0.97); border-bottom: 1px solid var(--line); border-radius: 0 0 14px 14px; padding: 0.4rem 1rem 0.8rem; }
  .eco-nav.is-open { display: flex; }
  .eco-nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .eco-nav a:last-child { border-bottom: 0; }
  .top { padding: 0.85rem 1rem; }
  .top__menu { display: block; }
  .top__t h1 { font-size: 1.12rem; }
  .top__t .eyebrow { display: none; }
  .top__r .btn { display: none; }
  .view { padding: 1.1rem 1rem 2.5rem; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 0.9rem 0.4rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 0.8rem; }
  .table td { border: 0; padding: 0; }
  .table .r-id, .table .r-go { display: none; }
  .table .r-addr { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 520px) {
  .card__head { flex-wrap: wrap; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat__v { font-size: 1.5rem; }
  .drawer__panel { padding: 1.3rem 1.1rem 2rem; }
  .balance .label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
