:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #091118;
  color: #f5f7f9;
  font-synthesis: none;
  --surface: #111a22;
  --surface-2: #17212b;
  --line: #283540;
  --muted: #8e9aa5;
  --green: #38e693;
  --cyan: #42c9df;
  --blue: #4b9fff;
  --amber: #f2bd45;
  --coral: #ee7883;
  --purple: #aa8df5;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #091118; letter-spacing: 0; }
button, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.app-shell { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom)); overflow: hidden; }
.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: #03130d; background: var(--green); border-radius: 8px; font-weight: 900; font-size: 20px; box-shadow: 0 0 22px rgb(56 230 147 / .25); }
.brand-lockup div { min-width: 0; }
.brand-lockup strong, .brand-lockup span { display: block; }
.brand-lockup strong { font-size: 15px; white-space: nowrap; }
.brand-lockup div span { margin-top: 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.top-actions { display: flex; gap: 8px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; color: #f6f8fa; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.icon-button.telegram { color: var(--cyan); }
.icon-button svg, .action svg, .select-wrap svg { width: 19px; height: 19px; flex: 0 0 auto; }
.hero { min-height: 190px; margin: 18px -16px 8px; padding: 26px 24px; display: flex; align-items: flex-end; background-image: linear-gradient(90deg, rgb(5 14 18 / .96) 0%, rgb(5 14 18 / .62) 58%, rgb(5 14 18 / .15)), url('/assets/vnezemnoy-banner.png'); background-size: cover; background-position: center 29%; border-bottom: 1px solid var(--line); }
.hero-copy { max-width: 390px; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--green); font-size: 11px; line-height: 1.2; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { max-width: 13ch; font-size: 42px; line-height: 1.02; }
.hero p { margin-top: 11px; color: #c0c9d0; font-size: 14px; line-height: 1.5; }
.hidden { display: none !important; }
.loading { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1s ease-in-out infinite; }
.loading span:nth-child(2) { animation-delay: .14s; }.loading span:nth-child(3) { animation-delay: .28s; }
@keyframes pulse { 0%, 100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
.notice { margin: 24px 0; padding: 18px; display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--coral); border-radius: 8px; }
.notice svg { width: 24px; flex: 0 0 auto; color: var(--coral); }.notice p { margin-top: 4px; color: var(--muted); line-height: 1.5; }
.status-panel { padding: 24px 0 28px; border-bottom: 1px solid var(--line); }
.status-heading { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.status-icon, .step-icon { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; }
.status-icon { width: 48px; height: 48px; color: var(--green); background: rgb(56 230 147 / .1); border: 1px solid rgb(56 230 147 / .42); }
.status-icon.inactive { color: var(--coral); background: rgb(238 120 131 / .1); border-color: rgb(238 120 131 / .42); }
.status-heading h2 { overflow-wrap: anywhere; font-size: 23px; }.status-heading p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.badge { padding: 7px 9px; color: var(--green); border: 1px solid rgb(56 230 147 / .32); border-radius: 6px; background: rgb(56 230 147 / .08); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge.inactive { color: var(--coral); border-color: rgb(238 120 131 / .32); background: rgb(238 120 131 / .08); }
.metrics { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.metric { min-height: 94px; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; }
.metric span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; min-width: 0; }.metric span svg { width: 15px; height: 15px; }.metric strong { overflow-wrap: anywhere; font-size: 17px; line-height: 1.15; }
.metric.blue { border-color: rgb(75 159 255 / .35); }.metric.blue span svg { color: var(--blue); }
.metric.green { border-color: rgb(56 230 147 / .35); }.metric.green span svg { color: var(--green); }
.metric.coral { border-color: rgb(238 120 131 / .35); }.metric.coral span svg { color: var(--coral); }
.metric.amber { border-color: rgb(242 189 69 / .35); }.metric.amber span svg { color: var(--amber); }
.section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.section-heading { margin-bottom: 17px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-heading h2 { font-size: 27px; }
.select-wrap { width: 165px; height: 45px; padding: 0 10px; display: flex; align-items: center; gap: 7px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.select-wrap select { min-width: 0; width: 100%; appearance: none; color: #e8edf1; border: 0; outline: 0; background: transparent; }
.select-wrap svg:last-child { width: 14px; }
.server-select { width: min(230px, 52vw); }
.server-status { min-height: 66px; padding: 13px 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.server-status p, .empty-copy { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.server-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); }
.server-status.online .server-dot { background: var(--green); box-shadow: 0 0 12px rgb(56 230 147 / .65); }
.server-status.offline .server-dot { background: var(--coral); }
.device-list { border-top: 1px solid var(--line); }
.device-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.device-row > div { min-width: 0; }
.device-row strong, .device-row span { display: block; overflow-wrap: anywhere; }
.device-row span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.device-remove { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; color: var(--coral); border: 0; border-radius: 8px; background: transparent; }
.device-remove:hover, .device-remove:focus-visible { background: rgb(238 120 131 / .1); outline: 0; }
.device-remove:disabled { opacity: .45; cursor: wait; }
.device-remove svg { width: 19px; height: 19px; }
.empty-copy { padding: 18px 0; }
.client-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.client-tab { min-height: 58px; padding: 13px; display: flex; align-items: center; gap: 9px; color: #e7ebee; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: left; }
.client-tab.active { color: var(--cyan); border-color: rgb(66 201 223 / .55); background: rgb(66 201 223 / .09); box-shadow: inset 4px 0 0 var(--cyan); }
.client-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px rgb(242 189 69 / .7); }
.steps { margin: 20px 0 0; padding: 0; list-style: none; }
.step { padding: 20px 0; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; border-top: 1px solid var(--line); }
.step-icon { width: 44px; height: 44px; }.step-icon svg { width: 23px; height: 23px; }
.step-icon.purple { color: var(--purple); background: rgb(170 141 245 / .12); border: 1px solid rgb(170 141 245 / .35); }
.step-icon.cyan { color: var(--cyan); background: rgb(66 201 223 / .1); border: 1px solid rgb(66 201 223 / .35); }
.step-icon.green { color: var(--green); background: rgb(56 230 147 / .1); border: 1px solid rgb(56 230 147 / .35); }
.step-icon.amber { color: var(--amber); background: rgb(242 189 69 / .1); border: 1px solid rgb(242 189 69 / .35); }
.step h3 { font-size: 18px; }.step p { margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.action { min-height: 44px; margin-top: 14px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 8px; font-weight: 800; }
.action.primary { color: #032026; border: 1px solid var(--cyan); background: var(--cyan); }.action.primary:disabled { color: var(--muted); border-color: var(--line); background: var(--surface-2); cursor: not-allowed; }
.action.secondary { color: var(--cyan); border: 1px solid rgb(66 201 223 / .42); background: rgb(66 201 223 / .09); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.plan { min-height: 122px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.plan span { color: var(--muted); font-size: 12px; }.plan strong { display: block; margin-top: 4px; font-size: 24px; }.plan button { width: 100%; margin-top: 14px; }
.referral-band { padding: 28px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.referral-copy { display: flex; align-items: center; gap: 13px; min-width: 0; }.referral-copy h2 { font-size: 21px; }.referral-copy p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.referral-band > .action { flex: 0 0 auto; margin-top: 0; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 20; max-width: calc(100vw - 32px); padding: 11px 15px; color: #06130e; background: #f5f7f9; border-radius: 8px; box-shadow: 0 12px 40px rgb(0 0 0 / .35); font-size: 13px; font-weight: 750; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 430px) {
  .app-shell { padding-left: 12px; padding-right: 12px; }
  .hero { margin-left: -12px; margin-right: -12px; padding-left: 18px; min-height: 176px; }
  h1 { font-size: 36px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 88px; padding: 12px; }.metric strong { font-size: 15px; }
  .section-heading { align-items: center; }.select-wrap { width: 142px; }.server-select { width: min(210px, 58vw); }
  .referral-band { align-items: flex-start; flex-direction: column; }.referral-band > .action { width: 100%; }
}
@media (max-width: 350px) {
  .brand-lockup strong { font-size: 13px; }.top-actions { gap: 5px; }.icon-button { width: 38px; height: 38px; }
  h1 { font-size: 32px; }
  .status-heading { grid-template-columns: 42px minmax(0, 1fr); }.status-heading .badge { grid-column: 2; justify-self: start; }.status-icon { width: 42px; height: 42px; }
  .metrics, .plans { grid-template-columns: 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; }.select-wrap { width: 100%; }
}
