:root {
  color-scheme: dark;
  --bg: #07090f;
  --surface: #0f131c;
  --surface-2: #151a25;
  --surface-3: #1c2230;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eef1f7;
  --text-2: #a0a8ba;
  --text-3: #6b7387;
  --accent: #4d7cff;
  --accent-2: #8a5cff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(77, 124, 255, .14);
  --grad: linear-gradient(135deg, #4d7cff 0%, #8a5cff 100%);
  --good: #2bd98f;
  --good-soft: rgba(43, 217, 143, .13);
  --warn: #ffb547;
  --warn-soft: rgba(255, 181, 71, .13);
  --bad: #ff5d6e;
  --bad-soft: rgba(255, 93, 110, .13);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 20px;
  --radius-sm: 14px;
  --nav-h: 68px;
  --safe-top: max(env(safe-area-inset-top), var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));

  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #9085e9;
  --grid: rgba(255, 255, 255, .06);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f4f9;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --surface-3: #eceff6;
  --line: rgba(15, 23, 42, .07);
  --line-2: rgba(15, 23, 42, .12);
  --text: #0e1422;
  --text-2: #586176;
  --text-3: #8a92a5;
  --accent: #3a66f0;
  --accent-2: #7a49f5;
  --accent-soft: rgba(58, 102, 240, .1);
  --good: #0fa968;
  --good-soft: rgba(15, 169, 104, .1);
  --warn: #d48806;
  --warn-soft: rgba(212, 136, 6, .12);
  --bad: #e5384b;
  --bad-soft: rgba(229, 56, 75, .1);
  --shadow: 0 8px 24px rgba(16, 24, 40, .08);
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #6250d6;
  --grid: rgba(15, 23, 42, .07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: -20% -20% auto -20%; height: 520px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(420px 260px at 20% 30%, rgba(77, 124, 255, .22), transparent 70%),
    radial-gradient(380px 240px at 85% 10%, rgba(138, 92, 255, .18), transparent 70%);
}
:root[data-theme="light"] body::before { opacity: .55; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.hidden { display: none !important; }

.app { max-width: 560px; margin: 0 auto; padding: calc(var(--safe-top) + 8px) 16px calc(var(--nav-h) + var(--safe-bottom) + 24px); }
.topbar { display: flex; align-items: center; gap: 10px; height: 52px; position: sticky; top: 0; z-index: 20;
  margin: 0 -16px; padding: 0 16px; background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; min-width: 0; }
.brand-logo { width: 32px; height: 32px; border-radius: 10px; background: var(--grad); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(77, 124, 255, .35); flex: none; }
.brand-logo svg { width: 18px; height: 18px; color: #fff; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.gold { color: #f5c04a; }

.lang { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px 0 8px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; font-size: 13px; }
.lang-btn svg.chev { width: 14px; height: 14px; color: var(--text-3); }
.flag { width: 22px; height: 16px; border-radius: 4px; overflow: hidden; display: inline-block; flex: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.flag svg { width: 100%; height: 100%; display: block; }
.lang-menu { position: absolute; right: 0; top: 46px; background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 14px; padding: 6px; min-width: 160px; box-shadow: var(--shadow); z-index: 50; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; background: none;
  border-radius: 10px; cursor: pointer; font-weight: 600; text-align: left; }
.lang-menu button:hover, .lang-menu button.on { background: var(--surface-3); }
.lang-menu button .check { margin-left: auto; color: var(--accent); width: 16px; height: 16px; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 12px calc(8px + var(--safe-bottom));
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line); }
.nav-inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 14px;
  color: var(--text-3); font-size: 11.5px; font-weight: 700; transition: color .2s; }
.nav a svg { width: 23px; height: 23px; transition: transform .2s; }
.nav a.on { color: var(--text); }
.nav a.on .nav-ico { background: var(--accent-soft); color: var(--accent); }
.nav-ico { width: 52px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s; }

.h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 4px; }
.h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.h3 { font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 22px 4px 10px; }
.sub { color: var(--text-2); margin: 0 0 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card, .card + .stack, .stack + .card { margin-top: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 18px;
  border-radius: 16px; border: 0; cursor: pointer; font-weight: 800; font-size: 15px; transition: transform .12s, opacity .2s;
  background: var(--surface-3); color: var(--text); white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn svg { width: 19px; height: 19px; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(77, 124, 255, .35); }
.btn.good { background: var(--good); color: #04130c; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { height: 38px; border-radius: 12px; font-size: 13.5px; padding: 0 14px; }
.btn.xs { height: 30px; border-radius: 10px; font-size: 12.5px; padding: 0 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .spin { width: 18px; height: 18px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px;
  font-weight: 800; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.grad { background: var(--grad); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; flex: none; }
.dot.good { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }

.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 38px; border: 0; background: transparent; border-radius: 10px; font-weight: 700; cursor: pointer;
  color: var(--text-2); font-size: 14px; white-space: nowrap; }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(77, 124, 255, .35); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 36px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 13.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; display: inline-flex;
  align-items: center; gap: 6px; flex: none; }
.chip svg { width: 16px; height: 16px; }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(77, 124, 255, .3); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--text-2); font-weight: 700; padding-left: 2px; }
.input, select.input, textarea.input { height: 48px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2);
  padding: 0 14px; outline: none; width: 100%; transition: border-color .2s; min-width: 0; }
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--accent); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

.switch { position: relative; display: inline-block; vertical-align: middle; width: 50px; height: 30px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line-2);
  transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 24px; height: 24px; left: 2px; top: 2px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--good); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(20px); }

.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 58px; cursor: pointer; color: var(--text);
  width: 100%; border: 0; background: none; text-align: left; }
.li + .li { border-top: 1px solid var(--line); }
.li-ico { width: 36px; height: 36px; border-radius: 11px; background: var(--surface-3); display: grid; place-items: center; flex: none; color: var(--text-2); }
.li-ico svg { width: 18px; height: 18px; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-end { color: var(--text-3); display: flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.li-end svg { width: 18px; height: 18px; }

.hero { text-align: center; padding: 26px 18px 20px; position: relative; overflow: hidden; }
.orb-wrap { position: relative; width: 210px; height: 210px; margin: 6px auto 18px; }
.orb-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.orb-ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.orb-ring .track { stroke: var(--surface-3); }
.orb-ring .bar { stroke: url(#orbGrad); transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.orb { position: absolute; inset: 22px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--surface-3), var(--surface-2)); border: 1px solid var(--line-2); }
.orb svg.shield { width: 64px; height: 64px; color: var(--text-3); transition: color .4s; }
.orb-wrap.on .orb { background: radial-gradient(circle at 35% 30%, #34e7a0, #0f9f66 70%); border-color: transparent;
  box-shadow: 0 20px 60px rgba(43, 217, 143, .35), inset 0 -10px 30px rgba(0, 0, 0, .15); }
.orb-wrap.on .orb svg.shield { color: #fff; }
.orb-wrap.off .orb { box-shadow: inset 0 0 0 1px var(--line); }
.orb-wrap.exp .orb svg.shield { color: var(--bad); }
.orb-wrap.on .pulse { position: absolute; inset: 22px; border-radius: 50%; border: 2px solid var(--good); opacity: 0;
  animation: pulse 2.8s ease-out infinite; }
.orb-wrap.on .pulse.p2 { animation-delay: 1.4s; }
@keyframes pulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.35); opacity: 0; } }
.hero-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.hero-sub { color: var(--text-2); margin: 4px 0 18px; }
.hero-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; min-width: 0; }
.stat-k { font-size: 12px; color: var(--text-3); font-weight: 700; display: flex; align-items: center; gap: 5px; }
.stat-k svg { width: 14px; height: 14px; }
.stat-v { font-weight: 800; font-size: 15.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linkbox { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px dashed var(--line-2);
  border-radius: 14px; padding: 6px 6px 6px 14px; margin-top: 10px; }
.linkbox .mono { flex: 1; min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.trial { background: linear-gradient(135deg, rgba(77, 124, 255, .16), rgba(138, 92, 255, .16)); border-color: rgba(138, 92, 255, .3); }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.steps li::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; flex: none; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; font-size: 13px; }

.srv { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.srv + .srv { border-top: 1px solid var(--line); }
.srv-flag { width: 40px; height: 30px; border-radius: 7px; overflow: hidden; flex: none;
  box-shadow: 0 0 0 1px var(--line-2); background-color: var(--surface-3); background-size: cover; background-position: center; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--text-3); }
.load { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 7px; width: 100%; }
.load i { display: block; height: 100%; border-radius: 3px; background: var(--good); }

.features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.features li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.features li svg { width: 18px; height: 18px; color: var(--good); flex: none; margin-top: 1px; }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tcard { position: relative; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px;
  padding: 16px 14px 14px; cursor: pointer; transition: border-color .2s, transform .12s; }
.tcard:active { transform: scale(.98); }
.tcard.best { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; }
.tcard .t-days { font-weight: 800; font-size: 16px; }
.tcard .t-price { font-weight: 800; font-size: 24px; letter-spacing: -.02em; margin-top: 8px; }
.tcard .t-pm { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.tcard .badge { position: absolute; top: -10px; right: 10px; }

.avatar { width: 56px; height: 56px; border-radius: 18px; background: var(--grad); display: grid; place-items: center;
  font-weight: 800; font-size: 22px; color: #fff; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.balance-card { background: var(--grad); color: #fff; border: 0; position: relative; overflow: hidden; }
.balance-card::after { content: ""; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); }
.balance-card .amount { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.balance-card .btn { background: rgba(255, 255, 255, .95); color: #1b2140; position: relative; z-index: 1; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.mini-stats div { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; }
.mini-stats b { display: block; font-size: 18px; }
.mini-stats span { font-size: 12px; color: var(--text-3); font-weight: 700; }

.backdrop { position: fixed; inset: 0; background: rgba(3, 5, 10, .6); z-index: 60; opacity: 0; transition: opacity .25s;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.backdrop.show { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 560px; margin: 0 auto; max-height: 90vh;
  overflow-y: auto; background: var(--surface); border-radius: 26px 26px 0 0; border: 1px solid var(--line-2); border-bottom: 0;
  padding: 10px 18px calc(20px + var(--safe-bottom)); transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.sheet.show { transform: none; }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--text-2); }
.kv span:last-child { font-weight: 800; text-align: right; }
.method { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 16px;
  cursor: pointer; background: var(--surface-2); width: 100%; text-align: left; }
.method { transition: border-color .2s, background .2s, box-shadow .2s; }
.method.on { border-color: transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box;
  box-shadow: 0 6px 20px rgba(77, 124, 255, .25); }
.method.on .li-title { color: var(--text); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; position: relative; transition: all .2s; }
.method.on .radio { border-color: transparent; background: var(--grad); }
.method.on .radio::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff;
  border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.pay-ico { width: 42px; height: 42px; border-radius: 13px; background: var(--surface); display: grid; place-items: center; flex: none;
  position: relative; overflow: hidden; box-shadow: 0 0 0 1px var(--line) inset; }
.pay-ico svg { width: 30px; height: 30px; }
.pay-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.method .li-ico { background: var(--surface); }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips button { flex: 1; min-width: 64px; height: 38px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2);
  font-weight: 700; cursor: pointer; transition: all .15s; }
.amount-chips button.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(77, 124, 255, .3); }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 600; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.note.info { background: var(--accent-soft); color: var(--accent); }
.qr { background: #fff; border-radius: 18px; padding: 14px; width: 240px; height: 240px; margin: 4px auto 12px; display: grid; place-items: center; }
.qr img, .qr svg { width: 100%; height: 100%; image-rendering: pixelated; }
.center { text-align: center; }
.big-ico { width: 72px; height: 72px; border-radius: 24px; margin: 6px auto 14px; display: grid; place-items: center; }
.big-ico svg { width: 36px; height: 36px; }
.big-ico.good { background: var(--good-soft); color: var(--good); }
.big-ico.accent { background: var(--accent-soft); color: var(--accent); }
.big-ico.bad { background: var(--bad-soft); color: var(--bad); }

.toast { position: fixed; left: 50%; top: calc(var(--safe-top) + 14px); transform: translate(-50%, -20px); z-index: 80; opacity: 0;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2); box-shadow: var(--shadow); border-radius: 14px;
  padding: 11px 16px; font-weight: 700; transition: all .25s; pointer-events: none; max-width: calc(100% - 32px); display: flex; gap: 8px; align-items: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { color: var(--bad); }
.toast.good { color: var(--good); }
.toast svg { width: 18px; height: 18px; flex: none; }

.skel { border-radius: 16px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: sk 1.3s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
.spin { animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 36px 16px; color: var(--text-2); }
.empty svg { width: 40px; height: 40px; color: var(--text-3); margin-bottom: 8px; }
.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; min-width: 0; }
.kpi-k { font-size: 12.5px; color: var(--text-2); font-weight: 700; }
.kpi-v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-d { font-size: 12px; font-weight: 800; margin-top: 2px; display: flex; align-items: center; gap: 3px; color: var(--text-3); }
.kpi-d.up { color: var(--good); }
.kpi-d.down { color: var(--bad); }
.kpi.hero-kpi { grid-column: span 2; background: linear-gradient(135deg, rgba(77, 124, 255, .14), rgba(138, 92, 255, .12)); }
.kpi.hero-kpi .kpi-v { font-size: 32px; }
.chart-card { padding: 16px 14px 12px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.chart-head .h2 { font-size: 15.5px; }
.chart-box { position: relative; height: 210px; }
.chart-box.short { height: 170px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--text-3); font-weight: 700; font-size: 12px; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; max-height: 320px; overflow-y: auto; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); font-weight: 700; margin-bottom: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.hbar { display: flex; flex-direction: column; gap: 10px; }
.hbar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 13.5px; }
.hbar-row .lbl { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-row .val { font-weight: 800; font-variant-numeric: tabular-nums; }
.hbar-row .val small { color: var(--text-3); font-weight: 700; margin-left: 4px; }
.hbar-row .track { grid-column: span 2; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.hbar-row .track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--c1); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid .full { grid-column: span 2; }
.admin-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #f5c04a; }
.pill-progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.pill-progress i { display: block; height: 100%; background: var(--accent); }
.sq-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 380px) {
  .tgrid, .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-row .stat:last-child { grid-column: span 2; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .hero-actions { grid-template-columns: 1fr; }
  .kpi-v { font-size: 19px; }
}
.srv .dot { box-shadow: none; }

.tcard.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tcard .t-old { font-size: 13px; color: var(--text-3); text-decoration: line-through; font-weight: 600; margin-top: -2px; }
.disc-banner { background: linear-gradient(135deg, #ff6b4a 0%, #ff3d8b 55%, #8a5cff 100%); border: 0; color: #fff; cursor: pointer; padding: 14px 16px; }
.disc-pct { font-size: 22px; font-weight: 800; background: rgba(255, 255, 255, .2); border-radius: 14px; padding: 8px 10px; flex: none; letter-spacing: -.02em; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); }
.switch-row .sw-text { font-weight: 700; }
.switch-row .sw-sub { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.switch-state { font-size: 12px; font-weight: 800; min-width: 34px; text-align: right; color: var(--text-3); }
.switch-row:has(input:checked) .switch-state { color: var(--good); }
.trow { display: grid; grid-template-columns: 1fr 1fr 50px 40px 40px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow .input { height: 42px; padding: 0 10px; }
.trow.off .input { opacity: .5; }
.trow-head { display: grid; grid-template-columns: 1fr 1fr 50px 40px 40px; gap: 8px; font-size: 12px; color: var(--text-3); font-weight: 700; }
.sub-box { background: var(--surface-2); border-radius: 16px; padding: 14px; margin-top: 12px; }
.sub-days { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.ext-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
@media (max-width: 360px) { .trow, .trow-head { grid-template-columns: 1fr 1fr 50px 40px 40px; gap: 6px; } }
.lang-menu button.on { background: var(--accent-soft); color: var(--accent); }
.grid2 > .btn, .grid3 > .btn, .ext-btns > .btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.2; }

.live-dot { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; padding: 2px 7px; border-radius: 6px; font-size: 10px;
  letter-spacing: .08em; background: var(--surface-3); color: var(--text-3); vertical-align: 1px; }
.live-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.live-dot.on { background: var(--good-soft); color: var(--good); }
.live-dot.on::before { background: var(--good); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

html, body { max-width: 100%; overflow-x: hidden; }
.sheet { overflow-x: hidden; }
.sheet * , .card *, .list * { min-width: 0; }
.btn { max-width: 100%; }
.btn > span, .btn { overflow: hidden; text-overflow: ellipsis; }
.app-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.app-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-weight: 800;
  font-size: 20px; flex: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.app-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.app-actions .btn { width: 100%; }
.btn svg, .li-end svg, .stat-k svg { flex: none; }
.switch-row > span:first-child { flex: 1; min-width: 0; }
.switch-row > span:last-child { flex: none; }
.mini-stats div { min-width: 0; }
.mini-stats span, .mini-stats b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) {
  .mini-stats span { font-size: 11px; }
  .seg button { font-size: 12.5px; padding: 0 2px; }
}
.mini-stats b { font-size: clamp(14px, 4.3vw, 18px); text-overflow: clip; }
.mini-stats div { padding: 10px; }
.ext-btns .btn { white-space: nowrap; padding: 0 6px; font-size: 13px; }
.tx-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx-row:last-child { border-bottom: 0; }
.tbl td .btn { white-space: normal; }

.app-ico.has-img { background: var(--surface); padding: 0; overflow: hidden; }
.app-ico.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icon-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.icon-row:last-child { border-bottom: 0; }
.icon-row .app-ico, .icon-row .pay-ico { width: 40px; height: 40px; font-size: 18px; }
.icon-row label.btn { cursor: pointer; flex: none; }
.app-ico svg { width: 24px; height: 24px; display: block; }
