:root {
  --bg: #050b0a;
  --panel: rgba(12, 24, 22, .78);
  --panel-2: rgba(18, 34, 31, .96);
  --line: rgba(110, 231, 183, .14);
  --line-2: rgba(110, 231, 183, .3);
  --text: #e8f3ef;
  --muted: #8ea8a0;
  --dim: #5d766f;
  --accent: #5ee38f;
  --accent-2: #2dd4bf;
  --warn: #f5c451;
  --bad: #ff6b6b;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg); min-height: 100vh;
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(45, 212, 191, .16), transparent 60%),
    radial-gradient(700px 480px at -10% 20%, rgba(94, 227, 143, .12), transparent 60%),
    linear-gradient(180deg, #06100e 0%, #040807 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
select option { background: #0c1a17; }
a { color: var(--accent-2); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 18px 60px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, rgba(94, 227, 143, .25), rgba(45, 212, 191, .08));
  border: 1px solid var(--line-2); box-shadow: 0 0 24px rgba(94, 227, 143, .25) inset;
}
.logo svg { width: 24px; height: 24px; color: var(--accent); }
.brand h1 { font-size: 21px; letter-spacing: .2px; }
.brand h1 span { color: var(--accent); }
.brand p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ghost-link { color: var(--muted); font-size: 13px; text-decoration: none; border: 1px solid var(--line); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.ghost-link:hover { color: var(--text); border-color: var(--line-2); }

/* panels */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { padding: 16px 18px; }
.stat b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat.live b { color: var(--accent); }

.create { padding: 20px; margin-bottom: 22px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  background: linear-gradient(120deg, rgba(94, 227, 143, .12), rgba(12, 24, 22, .8) 55%); border-color: var(--line-2); }
.create h2 { font-size: 17px; margin-bottom: 4px; }
.create p { color: var(--muted); font-size: 13.5px; }
.create > * { min-width: 0; }
.create form { display: flex; gap: 10px; }
.create .input { flex: 1; width: 0; min-width: 0; }
.input {
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 12px 14px; min-width: 0; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 227, 143, .18); }
.btn {
  border: 1px solid var(--line-2); background: rgba(94, 227, 143, .08); border-radius: var(--radius-s);
  padding: 11px 16px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .08s, border-color .15s;
}
.btn:hover { background: rgba(94, 227, 143, .16); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .tab:focus-visible, .x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04110c; border: 0; box-shadow: 0 8px 24px rgba(94, 227, 143, .3); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .07); color: #ffb3b3; }
.btn.danger:hover { background: rgba(255, 107, 107, .16); border-color: var(--bad); }
.btn.small { padding: 8px 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* keys */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 12px; }
.section-head h2 { font-size: 16px; }
.section-head span { color: var(--muted); font-size: 13px; }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.key { min-width: 0; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 12px; transition: border-color .2s; }
.key:hover { border-color: var(--line-2); }
.key.online { border-color: rgba(94, 227, 143, .35); }
.key-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 700;
  background: rgba(45, 212, 191, .1); border: 1px solid var(--line); color: var(--accent-2); }
.key-title { min-width: 0; flex: 1; }
.key-title b { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-title small { color: var(--dim); font-family: var(--mono); font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.pill.on { color: var(--accent); border-color: rgba(94, 227, 143, .4); background: rgba(94, 227, 143, .08); }
.pill.on i { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .04); border-radius: 10px; padding: 9px 10px; min-width: 0; }
.metric b { display: block; font-size: 14.5px; white-space: nowrap; }
.metric span { color: var(--dim); font-size: 11.5px; }
.speed { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12.5px; font-family: var(--mono); min-height: 16px; }
.speed .down { color: var(--accent); }
.speed .up { color: var(--accent-2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { flex: 1 1 auto; }
.note { font-size: 12px; color: var(--dim); }
.note.share-on { color: var(--warn); }
.empty { color: var(--muted); padding: 30px; text-align: center; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; background: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow); animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-head h3 { font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet p.lead { color: var(--muted); font-size: 13.5px; margin: -6px 0 14px; line-height: 1.45; }
.x { background: none; border: 1px solid var(--line); border-radius: 10px; width: 36px; height: 36px; flex: none; cursor: pointer; color: var(--muted); font-size: 18px; }
.x:hover { color: var(--text); border-color: var(--line-2); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: rgba(0, 0, 0, .3); border-radius: 14px; margin-bottom: 14px; }
.tab { border: 0; background: none; padding: 10px 6px; border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.tab.active { background: rgba(94, 227, 143, .14); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.qr { background: #fff; border-radius: 18px; padding: 12px; width: min(320px, 100%); margin: 0 auto 10px; aspect-ratio: 1; }
.qr svg { width: 100%; height: 100%; display: block; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin-bottom: 14px; line-height: 1.45; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row .btn { flex: 1 1 140px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.share h4 { font-size: 14.5px; margin-bottom: 4px; }
.share > p { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; line-height: 1.45; }
.share-form { display: flex; gap: 8px; }
.share-form select { flex: 1; }
.links { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.link { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.link div { flex: 1; min-width: 0; }
.link code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.link small { color: var(--dim); font-size: 11.5px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #0f2a22; border: 1px solid var(--line-2);
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 80; font-size: 14px; animation: fade .2s; max-width: calc(100% - 32px); }
.toast.bad { background: #2a1010; border-color: rgba(255, 107, 107, .5); }

/* share page */
.share-page { max-width: 520px; margin: 0 auto; padding: 26px 16px 50px; }
.hero { text-align: center; margin: 8px 0 20px; }
.hero .logo { margin: 0 auto 14px; width: 56px; height: 56px; border-radius: 18px; }
.hero .logo svg { width: 30px; height: 30px; }
.hero h1 { font-size: 24px; letter-spacing: -.3px; }
.hero p { color: var(--muted); margin-top: 6px; font-size: 14.5px; line-height: 1.45; }
.card { padding: 20px; margin-bottom: 14px; }
.card > h2 { font-size: 16px; margin-bottom: 14px; }
.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 16px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; counter-increment: s; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 700;
  background: rgba(94, 227, 143, .12); color: var(--accent); border: 1px solid var(--line-2); }
.steps b { display: block; margin-bottom: 3px; font-size: 15px; }
.steps span { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.stores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.foot { text-align: center; color: var(--dim); font-size: 12px; margin-top: 18px; line-height: 1.5; }
.gone { text-align: center; padding: 40px 20px; }
.gone h2 { margin-bottom: 8px; }
.gone p { color: var(--muted); line-height: 1.5; }

@media (max-width: 760px) {
  .wrap { padding: 16px 12px 50px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat b { font-size: 22px; }
  .create { grid-template-columns: 1fr; padding: 16px; }
  .keys { grid-template-columns: 1fr; }
  .brand p { display: none; }
  .modal { align-items: end; padding: 0; }
  .modal .sheet { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; padding: 18px 16px 24px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* статистика */
.chart-panel { padding: 16px 18px 14px; margin-bottom: 22px; }
.chart-panel .section-head { margin: 0 0 12px; }
.chart { overflow: hidden; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.bar-col { width: 100%; max-width: 34px; height: 120px; display: flex; flex-direction: column; justify-content: flex-end;
  background: rgba(255, 255, 255, .03); border-radius: 8px; overflow: hidden; }
.bar-col i { display: block; width: 100%; }
.bar-col i.down { background: linear-gradient(180deg, var(--accent), rgba(94, 227, 143, .55)); }
.bar-col i.up { background: rgba(45, 212, 191, .75); }
.bar b { font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.bar span { font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.bar.today span { color: var(--accent); }
.chart.small .bar-col { height: 90px; }
.chart.small .bar b { display: none; }
.chart.small .bar span { font-size: 9px; }
.legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.down { background: var(--accent); }
.legend i.up { background: var(--accent-2); }
button.key-head { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; width: 100%; color: inherit; }
button.key-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.info { background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .04); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.info span { display: block; color: var(--dim); font-size: 11.5px; margin-bottom: 3px; }
.info b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
h4.sub { font-size: 14px; margin: 4px 0 10px; }
.fine { color: var(--dim); font-size: 12px; margin-top: 12px; line-height: 1.45; }
@media (max-width: 760px) {
  .bars { gap: 3px; }
  .chart-panel .bar b { display: none; }
  .chart-panel .bar:nth-child(odd) span { visibility: hidden; }
}
.create form { width: min(440px, 42vw); }
.actions .btn.icon { flex: 0 0 44px; padding-left: 0; padding-right: 0; }
.chart.small .bar span { visibility: hidden; }
.chart.small .bar:nth-child(7n+2) span, .chart.small .bar:last-child span { visibility: visible; }
@media (max-width: 760px) { .create form { width: 100%; } }
.actions { flex-wrap: nowrap; }
.actions .btn:not(.icon) { flex: 1 1 0; min-width: 0; }
@media (max-width: 760px) {
  .actions { gap: 6px; }
  .actions .btn.small { padding: 9px 6px; font-size: 12.5px; gap: 6px; }
  .actions .btn.icon { flex: 0 0 40px; }
}

/* покупка */
.center { text-align: center; }
.center .btn, .center .row { margin-top: 10px; justify-content: center; }
.tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tariff { background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; text-align: left; transition: border-color .15s, background .15s; }
.tariff b { font-size: 14px; color: var(--muted); font-weight: 600; }
.tariff strong { font-size: 22px; letter-spacing: -.3px; }
.tariff span { font-size: 12px; color: var(--dim); }
.tariff:hover { border-color: var(--line-2); }
.tariff.active { border-color: var(--accent); background: rgba(94, 227, 143, .1); box-shadow: 0 0 0 3px rgba(94, 227, 143, .12); }
.tariff.active b { color: var(--accent); }
.tariff:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pay-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-btns .btn { padding: 14px 12px; }
.fine.center { margin-top: 12px; }
.spinner { width: 42px; height: 42px; margin: 6px auto 14px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 420px) { .pay-btns { grid-template-columns: 1fr; } }

/* оплата в админке */
.pay-panel { margin-bottom: 22px; padding: 0; }
.pay-panel summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; font-weight: 700; }
.pay-panel summary::-webkit-details-marker { display: none; }
.pay-panel summary::after { content: '▾'; color: var(--muted); margin-left: 10px; transition: transform .2s; }
.pay-panel[open] summary::after { transform: rotate(180deg); }
.pay-panel summary .pill { margin-left: auto; }
#pay-body { padding: 0 18px 18px; display: grid; gap: 18px; }
.pay-form { display: grid; gap: 12px; }
.pay-form label { display: grid; gap: 6px; }
.pay-form label > span, .label { color: var(--muted); font-size: 12.5px; display: block; margin-bottom: 6px; }
.pay-form code { font-family: var(--mono); color: var(--text); overflow-wrap: anywhere; }
.pay-form .check { display: flex; gap: 10px; align-items: center; }
.pay-form .check span { margin: 0; color: var(--text); font-size: 14px; }
.pay-form .check input { width: 20px; height: 20px; accent-color: var(--accent); }
.tariff-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.tariff-row { display: grid; grid-template-columns: 1fr auto 1fr auto 44px; gap: 8px; align-items: center; }
.tariff-row span { color: var(--muted); font-size: 13px; }
.fine.ok { color: var(--accent); }
.fine.bad, .note.bad { color: var(--bad); }
.orders { display: grid; gap: 6px; }
.order { display: grid; grid-template-columns: 80px 1fr auto auto; gap: 4px 10px; align-items: center; padding: 9px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, .22); border: 1px solid var(--line); font-size: 13px; }
.order span { color: var(--muted); }
.order code { grid-column: 1 / -1; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.order code:empty { display: none; }
.order .st { color: var(--muted); }
.order.paid .st { color: var(--accent); }
.order.error .st, .order.underpaid .st { color: var(--bad); }
.extend { align-items: center; margin-bottom: 16px; }
.extend .label { flex: 1 1 100%; margin: 0; }
.extend .btn { flex: 0 1 auto; }
@media (max-width: 760px) { .order { grid-template-columns: 70px 1fr auto; } .order span:nth-child(3) { display: none; } }

/* личный кабинет */
.cabinet .card > h2 { margin-bottom: 12px; }
.speed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.speed-grid .info b { font-size: 17px; }
.btn.big { width: 100%; padding: 15px; font-size: 15px; }
.verdict { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-top: 12px; }
.verdict .ok, .history .ok { color: var(--accent); }
.verdict .warn { color: var(--warn); }
.history { margin-top: 14px; display: grid; gap: 6px; }
.history .label { margin: 0; }
.hrow { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; font-size: 12px; color: var(--muted); padding: 7px 10px;
  background: rgba(0, 0, 0, .22); border-radius: 10px; }
.hrow .dim { color: var(--dim); }
.status .status-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.status .term { color: var(--text); font-weight: 600; font-size: 14px; }
.status .btn { margin-top: 12px; width: 100%; }
.status.on { border-color: rgba(94, 227, 143, .4); }
.status.off { border-color: rgba(255, 107, 107, .4); }
.tips { padding-left: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.45; margin-bottom: 14px; }
@media (max-width: 420px) { .hrow { grid-template-columns: 1fr auto; } .hrow span:first-child { grid-column: 1 / -1; } }

/* ── личный кабинет в виде приложения ── */
.app-body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.app { max-width: 760px; margin: 0 auto; padding: 18px 14px 20px; }
.app-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.app-top h1 { font-size: 24px; letter-spacing: .3px; }
.app-top h1 span { color: var(--accent); }
.app-top p { color: var(--muted); font-size: 13px; }
.app-top .logo { width: 48px; height: 48px; border-radius: 16px; }
#root { display: grid; gap: 14px; }
.app-card { padding: 16px; }
.app-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.app-head h2 { font-size: 17px; flex: 1; }
.app-head .btn { flex: none; }
.hico { color: var(--accent); display: grid; }
.hico svg { width: 22px; height: 22px; }
h2.plain { font-size: 17px; margin-bottom: 12px; }
.small-select { padding: 7px 10px; font-size: 12.5px; }

/* главная карточка */
.hero-card { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center;
  background: radial-gradient(420px 220px at 50% 40%, rgba(94, 227, 143, .14), transparent 70%), var(--panel); }
.hero-card.on { border-color: rgba(94, 227, 143, .45); }
.hero-card.off { border-color: rgba(255, 107, 107, .4); }
.hero-left { display: grid; gap: 14px; min-width: 0; }
.st { display: flex; gap: 10px; align-items: flex-start; }
.st b { display: block; font-size: 16px; }
.st span { color: var(--muted); font-size: 12.5px; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--dim); }
.hero-card.on .dot { background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 1.8s infinite; }
.hero-card.on .st b { color: var(--accent); }
.hero-card.other .dot { background: var(--accent-2); }
.hero-card.off .dot { background: var(--bad); }
.server { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); min-width: 0; }
.server .flag { font-size: 26px; line-height: 1; }
.server b { display: block; font-size: 14px; }
.server span { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.hero-mid { display: grid; justify-items: center; gap: 8px; text-align: center; }
.power { width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--muted);
  background: radial-gradient(circle at 50% 40%, #0f2a22, #06120f 70%); border: 5px solid rgba(110, 231, 183, .25);
  box-shadow: 0 0 0 8px rgba(94, 227, 143, .05), inset 0 0 22px rgba(0, 0, 0, .6); transition: transform .12s, box-shadow .3s; }
.power svg { width: 46px; height: 46px; }
.power:active { transform: scale(.96); }
.power:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.power.on, .power.idle { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 28px rgba(94, 227, 143, .55), 0 0 0 10px rgba(94, 227, 143, .08), inset 0 0 22px rgba(94, 227, 143, .25); }
.power.idle { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 44px rgba(94, 227, 143, .75), 0 0 0 14px rgba(94, 227, 143, .1), inset 0 0 22px rgba(94, 227, 143, .3); } }
.power.off { color: var(--bad); border-color: var(--bad); }
.hint { color: var(--muted); font-size: 12.5px; display: grid; }
.hint b { color: var(--accent); font-size: 14px; }
.hero-right { display: grid; gap: 8px; justify-items: end; text-align: right; }
.kv { display: grid; }
.kv span { color: var(--muted); font-size: 12px; }
.kv b { font-size: 18px; }
.kv.sp { display: flex; gap: 6px; align-items: baseline; }
.kv .down { color: var(--accent); font-weight: 800; }
.kv .up { color: var(--accent-2); font-weight: 800; }
.mono { font-family: var(--mono); letter-spacing: .5px; }
.hero-right > span { color: var(--muted); font-size: 12.5px; }

/* подписка */
.sub-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.sub-info { flex: 1; min-width: 0; }
.sub-info .app-head { margin-bottom: 10px; }
.sub-info .hico { color: var(--warn); }
.sub-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.tag { padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; border: 1px solid; }
.tag.ok { color: var(--accent); border-color: rgba(94, 227, 143, .5); background: rgba(94, 227, 143, .1); }
.tag.warn { color: var(--warn); border-color: rgba(245, 196, 81, .5); background: rgba(245, 196, 81, .1); }
.tag.bad { color: var(--bad); border-color: rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .1); }
b.gold { color: var(--warn); }
b.ok { color: var(--accent); }
.bar-line { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 4px; }
.bar-line i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 10px rgba(94, 227, 143, .6); }
.sub-top > .btn { align-self: center; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); min-width: 0; }
.tile > div { min-width: 0; display: grid; gap: 2px; }
.tile span { color: var(--muted); font-size: 12px; }
.tile b { font-size: 16px; }
.tile small { color: var(--dim); font-size: 11.5px; line-height: 1.35; }
.tico { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--accent);
  background: rgba(94, 227, 143, .1); border: 1px solid var(--line); }
.tico svg { width: 20px; height: 20px; }

/* скорость */
.mtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.metric-tile { padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); min-width: 0; display: grid; gap: 4px; align-content: start; }
.metric-tile > span { color: var(--muted); font-size: 12px; }
.metric-tile > div { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.metric-tile b { font-size: 24px; letter-spacing: -.5px; }
.metric-tile em { font-style: normal; color: var(--muted); font-size: 12px; }
.metric-tile.down b { color: var(--accent); }
.metric-tile.up b { color: var(--accent-2); }
.metric-tile.ping b { color: #b49bff; }
.metric-tile.ip b { font-size: 15px; font-family: var(--mono); overflow-wrap: anywhere; }
.metric-tile small { color: var(--muted); font-size: 12px; }

/* трафик */
.traffic-body { display: grid; grid-template-columns: 1fr 150px; gap: 14px; align-items: end; }
.traffic-sum { display: grid; gap: 10px; }
.traffic-sum span { display: block; color: var(--muted); font-size: 12px; }
.traffic-sum b { font-size: 18px; }

/* ключ */
.keyfield { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); margin-bottom: 12px; }
.keyfield > div { flex: 1; min-width: 0; }
.keyfield span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.keyfield code { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keyfield code.open { white-space: normal; overflow-wrap: anywhere; max-height: 90px; overflow: auto; }
.keyfield .x svg { width: 18px; height: 18px; }
.key-btns { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 8px; }
.key-btns .btn { padding: 11px 8px; font-size: 13px; }

/* полезное */
.use-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.use-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; cursor: pointer; text-align: left; font-size: 14px; }
.use-item:hover { border-color: var(--line-2); }
.use-item > span:nth-child(2) { flex: 1; }
.use-item i { font-style: normal; color: var(--muted); font-size: 20px; }
.faq { display: grid; gap: 8px; }
.faq details { padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); font-size: 13.5px; margin-top: 8px; line-height: 1.5; }

/* нижнее меню */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(6, 14, 12, .92); border-top: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tab-i { display: grid; justify-items: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 11.5px; padding: 4px 0; }
.tab-i svg { width: 24px; height: 24px; }
.tab-i.active { color: var(--accent); }
.tab-i.active svg { filter: drop-shadow(0 0 8px rgba(94, 227, 143, .6)); }

@media (max-width: 560px) {
  .hero-card { grid-template-columns: 1fr auto; grid-template-areas: 'l m' 'r r'; }
  .hero-left { grid-area: l; } .hero-mid { grid-area: m; }
  .hero-right { grid-area: r; grid-template-columns: repeat(3, 1fr); justify-items: start; text-align: left; align-items: end; }
  .hero-right > span { grid-column: 1 / -1; }
  .power { width: 104px; height: 104px; }
  .tiles { grid-template-columns: 1fr; }
  .mtiles { grid-template-columns: 1fr 1fr; }
  .traffic-body { grid-template-columns: 1fr; }
  .traffic-sum { grid-template-columns: repeat(3, 1fr); }
  .traffic-sum b { font-size: 15px; }
  .key-btns { grid-template-columns: 1fr 1fr; }
  .use-grid { grid-template-columns: 1fr; }
}
.test-banner { padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; font-size: 13px; color: var(--warn);
  background: rgba(245, 196, 81, .08); border: 1px solid rgba(245, 196, 81, .4); }
.pay-btns.one { grid-template-columns: 1fr; }
