﻿:root {
  --bg: #0b0709;
  --bg-elev: #161014;
  --bg-card: #1a1216;
  --border: rgba(255, 210, 220, 0.08);
  --text: #f8f1f3;
  --muted: #a8989e;
  --accent: #d16b7a;
  --accent-2: #a63d50;
  --accent-dim: rgba(209, 107, 122, 0.14);
  --ok: #3dd68c;
  --warn: #f0b429;
  --err: #ff6b6b;
  --radius: 16px;
  --radius-sm: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Manrope", "Segoe UI Variable", "SF Pro Text", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --tap-scale: 0.98;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(160, 48, 72, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(209, 107, 122, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

input, textarea, select {
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}

.hidden { display: none !important; }

.boot {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
}
.boot__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.boot__text { color: var(--muted); font-size: 0.95rem; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.landing, .blocked {
  min-height: 100dvh;
  padding: 32px 24px calc(24px + var(--safe-b));
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  text-align: center;
  gap: 12px;
}
.landing__title, .blocked__title { font-size: 1.35rem; margin: 0; font-weight: 600; }
.landing__text, .blocked__text { color: var(--muted); line-height: 1.55; margin: 0 0 8px; }
.landing--auth { justify-content: flex-start; padding-top: max(36px, 7vh); }
.auth-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 18px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(209, 107, 122, 0.16), transparent 55%),
    var(--bg-card);
  text-align: center;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-top: 4px;
}
.auth-form .field { margin: 0; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.tg-login-slot {
  min-height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.auth-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.ab-ios-install-prompt {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px calc(16px + var(--safe-b));
  background: rgba(8, 4, 6, 0.55);
  backdrop-filter: blur(4px);
}
.ab-ios-install-prompt.hidden { display: none !important; }
.ab-ios-install-prompt__enter {
  width: min(100%, 380px);
  animation: toastIn 0.35s var(--ease-out);
}
.ab-ios-install-prompt__card {
  border-radius: 22px;
  border: 1px solid rgba(209, 107, 122, 0.28);
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(209, 107, 122, 0.2), transparent 60%),
    var(--bg-card);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.ab-ios-install-prompt__inner { padding: 18px 16px 14px; }
.ab-ios-install-prompt__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.ab-ios-install-prompt__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ab-ios-install-prompt__icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--accent-dim);
  border: 1px solid rgba(209, 107, 122, 0.25);
  flex-shrink: 0;
}
.ab-ios-install-prompt__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ab-ios-install-prompt__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ab-ios-install-prompt__sub {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.ab-ios-install-prompt__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.ab-ios-install-prompt__close svg { width: 18px; height: 18px; }
.ab-ios-install-prompt__steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ab-ios-install-prompt__step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(11, 7, 9, 0.45);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  line-height: 1.35;
  text-align: left;
}
.ab-ios-install-prompt__step-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-dim);
  flex-shrink: 0;
}
.ab-ios-install-prompt__step-icon svg { width: 18px; height: 18px; }
.ab-ios-install-prompt__footer {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.ab-ios-install-prompt__notch {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  margin: 10px auto 0;
}

.app {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(72px + var(--safe-b));
  overflow-x: hidden;
}
.app__ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  max-width: 480px;
  margin: 0 auto;
  z-index: 0;
  background: radial-gradient(circle at 70% 0%, rgba(160, 48, 72, 0.16), transparent 45%);
  opacity: 1;
}
.app__ambient::after { display: none; }
.hdr, .main, .tabbar { position: relative; z-index: 1; }

.hdr {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
  padding: 12px 16px 8px;
  padding-top: max(12px, env(safe-area-inset-top));
}
.hdr__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hdr__center {
  flex: 1;
  min-width: 0;
}
.hdr__back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hdr__back::before {
  content: "";
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(2px, -2px);
}
.hdr__title { font-weight: 600; font-size: 1.05rem; display: block; }
.hdr__sub { font-size: 0.75rem; color: var(--muted); display: block; }
.hdr__refresh {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--muted);
  cursor: pointer;
  display: none;
  place-items: center;
  padding: 0;
  margin-left: auto;
}
.hdr__refresh:not(.hidden) { display: grid; }
.hdr__refresh-ico {
  display: flex;
  width: 18px;
  height: 18px;
}
.hdr__refresh-ico svg { width: 18px; height: 18px; }
.hdr__refresh.is-spin .hdr__refresh-ico { animation: spin 0.85s linear infinite; }

.network-banner {
  margin: 0 14px 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.network-banner__text { margin: 0; flex: 1; font-size: 0.85rem; color: var(--text); }

.main { flex: 1; padding: 0 16px 24px; }
.main.is-ptr { transition: transform 0.15s var(--ease-out); }
.home-stack { display: flex; flex-direction: column; gap: 12px; }
.btn--sm { padding: 8px 14px; font-size: 0.82rem; }
.btn--flex { flex: 1; min-width: 0; }
.btn--danger-quiet {
  background: rgba(255, 107, 107, 0.1);
  color: #ff8a8a;
  border: 1px solid rgba(255, 107, 107, 0.28);
  font-weight: 600;
}
.btn--danger-quiet:disabled { opacity: 0.4; }
.btn--danger {
  background: rgba(255, 107, 107, 0.12);
  color: #ff8a8a;
  border: 1px solid rgba(255, 107, 107, 0.32);
  font-weight: 700;
  box-shadow: none;
}
.btn--danger:not(:disabled):active {
  background: rgba(255, 107, 107, 0.2);
}
.btn--danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn--danger .btn__ico { color: #ff8a8a; }
.device-page__actions .btn,
.device-page .btn--danger {
  gap: 10px;
}

.home-onboard {
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  border: 1px solid rgba(209, 107, 122, 0.22);
}
.home-onboard__title { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.home-onboard__lead { margin: 0 0 14px; font-size: 0.86rem; color: var(--muted); line-height: 1.4; }

.home-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.home-banner--warn { border-color: rgba(240, 180, 41, 0.3); background: rgba(240, 180, 41, 0.07); }
.home-banner--accent { border-color: rgba(209, 107, 122, 0.25); background: var(--accent-dim); }
.home-banner__text, .home-banner__txt { flex: 1; margin: 0; font-size: 0.84rem; font-weight: 600; line-height: 1.3; }

.welcome-promo {
  position: relative;
  overflow: hidden;
  padding: 18px 16px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(209, 107, 122, 0.32);
  background:
    radial-gradient(ellipse 80% 70% at 100% 0%, rgba(209, 107, 122, 0.22), transparent 55%),
    linear-gradient(160deg, rgba(166, 61, 80, 0.18), var(--bg-card) 55%);
}
.welcome-promo__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.welcome-promo__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff8f9;
  background: linear-gradient(145deg, #d97a88, #8e2f42);
}
.welcome-promo__ico {
  display: flex;
  color: var(--accent);
}
.welcome-promo__ico svg { width: 22px; height: 22px; }
.welcome-promo__title {
  margin: 0 0 8px;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.welcome-promo__code {
  margin: 0 0 8px;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: rgba(11, 7, 9, 0.45);
  border: 1px dashed rgba(209, 107, 122, 0.4);
}
.welcome-promo__lead {
  margin: 0 0 14px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

.home-dash {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-card);
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s var(--ease-out), border-color 0.15s;
}
.home-dash:active { transform: scale(var(--tap-scale)); }
.home-dash:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-dash__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.home-dash__lbl {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.home-dash__val {
  margin: 4px 0 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.home-dash__val.pop { animation: balancePop 0.45s var(--ease-out); }
.home-dash__hint {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.35;
}
.home-topup-cta { margin-top: 0; }

.promo-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.promo-card:focus-within {
  border-color: rgba(209, 107, 122, 0.4);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.promo-card__ico {
  display: flex;
  color: var(--accent);
  flex-shrink: 0;
}
.promo-card__ico svg { width: 18px; height: 18px; }
.promo-card__input {
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  outline: none;
  padding: 6px 0;
  text-transform: uppercase;
}
.promo-card__input::placeholder {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.promo-card__btn {
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s var(--ease-out), background 0.15s;
}
.promo-card__btn:active { transform: scale(var(--tap-scale)); }
.promo-card__btn:disabled { opacity: 0.5; cursor: not-allowed; }

.devices-block {
  margin-top: 4px;
}
.devices-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.devices-block__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.devices-block__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-elev);
  border-radius: 999px;
  padding: 2px 8px;
}
.devices-block__hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}
.devices-block__hint:empty,
.devices-block__hint[hidden] { display: none; }

.devices-empty {
  padding: 20px 12px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}
.devices-empty__title { margin: 0 0 4px; font-weight: 700; font-size: 0.95rem; }
.devices-empty__text { margin: 0 0 14px; font-size: 0.82rem; color: var(--muted); }

.home-faq { margin-top: 0; background: transparent; padding: 8px 0; }
.home-faq summary { font-weight: 600; color: var(--muted); font-size: 0.82rem; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-elev) 25%, rgba(255,255,255,0.06) 50%, var(--bg-elev) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s ease-in-out infinite;
  border-radius: 8px;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}
@keyframes skeleton { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.topup-pending {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(166, 61, 80, 0.35);
  background: rgba(166, 61, 80, 0.08);
}
.topup-pending__title { margin: 0 0 6px; font-weight: 600; font-size: 0.92rem; }
.topup-pending__text { margin: 0 0 10px; font-size: 0.8rem; color: var(--muted); }

.promo-inline--topup { margin-bottom: 12px; }

.field--compact { margin: 0; }
.field__row { display: flex; gap: 8px; align-items: center; }
.field__row .field__input { flex: 1; min-width: 0; }

.preset__bonus {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--ok);
  margin-top: 2px;
}
.home-support {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  margin-top: 2px;
  transition: transform 0.16s var(--ease-out), border-color 0.15s, background 0.15s;
}
.home-support:active {
  transform: scale(var(--tap-scale));
  border-color: rgba(209, 107, 122, 0.3);
}
.home-support__ico {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-dim);
}
.home-support__ico svg { width: 20px; height: 20px; }
.home-support__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-support__body strong { font-size: 0.94rem; font-weight: 700; letter-spacing: -0.01em; }
.home-support__body span { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
.home-support__chev {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 2px solid var(--muted);
  border-top: 2px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.55;
}
.promo-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.promo-inline__ico { display: flex; color: var(--accent); }
.promo-inline__ico svg { width: 18px; height: 18px; }
.promo-inline__input {
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  padding: 8px 0;
  outline: none;
}
.promo-inline__input::placeholder { color: var(--muted); }
.promo-inline__btn {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--accent);
  background: rgba(166, 61, 80, 0.15);
}
.card--tight { padding: 12px; margin-bottom: 0; }
.card__head--tight { margin-bottom: 6px; }
.device-list--compact li { padding: 8px 0; }
.wz-lead--sm { font-size: 0.88rem; margin-bottom: 12px; }
.hint--min { min-height: 0; margin-top: 8px; }
.hint--min:empty,
.hint--min[hidden] { display: none !important; margin: 0; padding: 0; }

.view { animation: fadeIn 0.32s var(--ease-out); }
.view.view--mount { animation: fadeIn 0.38s var(--ease-out); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes ambientDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.5; }
  to { transform: translate3d(2%, 2%, 0) scale(1.05); opacity: 0.85; }
}
@keyframes staggerIn {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes heroGlow {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.04); }
}
@keyframes balancePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes pillPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 214, 140, 0); }
  50% { box-shadow: 0 0 0 4px rgba(61, 214, 140, 0.12); }
}
@keyframes tabPop {
  from { transform: scale(0.92); opacity: 0.7; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes badgePop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.stagger > * {
  animation: staggerIn 0.42s var(--ease-out) backwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.04s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.16s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }
.stagger > *:nth-child(6) { animation-delay: 0.24s; }
.stagger > *:nth-child(7) { animation-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .app__ambient::after { display: none; }
  .stagger > * { animation: none; }
}

.pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--muted);
  white-space: nowrap;
}
.pill--ok {
  background: rgba(61, 214, 140, 0.15);
  color: var(--ok);
  animation: pillPulse 3s ease-in-out infinite;
}
.pill--warn { background: rgba(255, 176, 32, 0.15); color: var(--warn); }
.pill--sm { font-size: 0.68rem; }

.hero {
  position: relative;
  background: linear-gradient(155deg, rgba(166, 61, 80, 0.1), var(--bg-card) 48%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.hero--live { border-color: rgba(166, 61, 80, 0.22); }
.hero__glow {
  position: absolute;
  top: -40%;
  right: -25%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(166, 61, 80, 0.25), transparent 68%);
  animation: heroGlow 5s ease-in-out infinite;
  pointer-events: none;
}
.hero__mark {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  color: rgba(166, 61, 80, 0.55);
  opacity: 0.9;
}
.hero__mark svg { width: 22px; height: 22px; }
.hero__value.pop { animation: balancePop 0.45s var(--ease-out); }
.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.hero__label { margin: 0; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.hero__value { margin: 4px 0 8px; font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.hero__hint { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}
.card--accent {
  border-color: rgba(166, 61, 80, 0.35);
  background: linear-gradient(145deg, rgba(166, 61, 80, 0.12), var(--bg-card));
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.card__title { margin: 0 0 8px; font-size: 1.1rem; }
.card__title--sm { font-size: 0.95rem; margin: 0; }
.card__text { margin: 0 0 12px; color: var(--muted); line-height: 1.5; font-size: 0.9rem; }
.card__text--tight { margin-bottom: 8px; }
.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(166, 61, 80, 0.2), rgba(140, 40, 58, 0.08));
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.card__icon svg { width: 24px; height: 24px; }
.card__title--ico {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.inline-ico {
  display: inline-flex;
  color: var(--accent);
  flex-shrink: 0;
}
.inline-ico svg { width: 18px; height: 18px; }

.actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.action {
  display: grid;
  grid-template-columns: 44px 1fr 20px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
  transition: transform 0.18s var(--ease-out), border-color 0.18s, background 0.18s;
}
.action:active:not(:disabled) { transform: scale(var(--tap-scale)); }
.action--primary {
  border-color: rgba(166, 61, 80, 0.4);
  background: var(--accent-dim);
}
.action__body strong { display: block; font-size: 0.95rem; }
.action__body small { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.action__ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(166, 61, 80, 0.12), var(--bg-elev));
  display: grid;
  place-items: center;
  color: var(--accent);
  transition: transform 0.2s var(--ease-out);
}
.action:active .action__ico { transform: scale(1.06); }
.action__ico svg { width: 22px; height: 22px; }
.action__chev {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-top: 2px solid var(--muted);
  transform: rotate(45deg);
  justify-self: end;
}

.device-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.device-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), border-color 0.15s, background 0.15s;
}
.device-list li:active { transform: scale(var(--tap-scale)); border-color: rgba(209, 107, 122, 0.35); }
.device-list__ico {
  color: var(--accent);
  display: flex;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-dim);
  align-items: center;
  justify-content: center;
}
.device-list__ico svg { width: 18px; height: 18px; }
.card__head-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
  transition: transform 0.16s var(--ease-out), background 0.15s;
}
.icon-btn:active { transform: scale(0.96); }
.icon-btn--add {
  padding-bottom: 2px;
  background: var(--accent-dim);
  border-color: rgba(209, 107, 122, 0.3);
  color: var(--accent);
}
.icon-btn.hidden { display: none; }
.device-row { justify-content: space-between; flex-wrap: nowrap; gap: 8px; }
.device-list li.device-row { align-items: center; }
.device-row__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.device-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.device-row__name {
  font-weight: 650;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-row__meta {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}
.device-row__actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.btn-connect-sm {
  padding: 7px 11px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: #fff8f9;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn-connect-sm:active { transform: scale(var(--tap-scale)); }
.btn-icon-quiet {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.btn-icon-quiet svg { width: 16px; height: 16px; }
.device-presence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}
.device-presence__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}
.device-presence--online .device-presence__dot {
  background: #3dd68c;
  box-shadow: 0 0 8px rgba(61, 214, 140, 0.45);
}
.device-presence--online { color: #8ce8b8; }
.device-presence--offline .device-presence__dot { background: rgba(255, 255, 255, 0.22); }
.device-presence--pending .device-presence__dot { background: #f0b429; }
.device-presence--pending { color: #f5d078; }

.dlg--sheet {
  max-width: min(100vw, 480px);
  width: 100%;
  margin: auto auto 0;
  border-radius: 20px 20px 0 0;
  background: var(--bg-elev);
}
.dlg--sheet::backdrop { background: rgba(0, 0, 0, 0.55); }
.dlg--sheet .dlg__inner { touch-action: pan-y; }

.device-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}
.device-page__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.device-page__ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-dim);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.device-page__ico svg { width: 24px; height: 24px; }
.device-page__title-wrap { flex: 1; min-width: 0; }
.device-page__name {
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  margin-left: -10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  outline: none;
}
.device-page__name:focus {
  border-color: rgba(209, 107, 122, 0.35);
  background: rgba(0, 0, 0, 0.2);
}
.device-page__save-hint {
  margin: 2px 0 0;
  min-height: 1em;
  font-size: 0.72rem;
  color: var(--ok);
  font-weight: 600;
}
.device-page__save-hint:empty { display: none; }
.device-page__save-hint.is-err { color: var(--err); }
.device-page__note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  text-align: center;
}
.device-page__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.meta-chip {
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.meta-chip__lbl {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.meta-chip__val {
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-page__actions { display: flex; flex-direction: column; gap: 8px; }
.device-page__faq { margin: 0; background: transparent; padding: 0; }
.device-page__faq summary { font-size: 0.82rem; color: var(--muted); }

.detail-stat { display: none; }
.icon-btn--gear {
  font-size: 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--border);
}
.icon-btn--gear svg { width: 18px; height: 18px; }
.detail-stat__ico {
  color: var(--accent);
  display: flex;
  margin-bottom: 2px;
}
.detail-stat__ico svg { width: 18px; height: 18px; }
.detail-stat__lbl { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-stat__val { font-size: 0.88rem; font-weight: 600; line-height: 1.35; }
.device-detail__hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
.btn--danger-text { color: #ff8a8a !important; border-color: rgba(255, 107, 107, 0.25) !important; }
.btn--danger-text:disabled { opacity: 0.5; }
.card__text--hidden { display: none; }
.dlg {
  border: none;
  padding: 0;
  max-width: min(92vw, 380px);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.dlg::backdrop { background: rgba(0, 0, 0, 0.65); }
.dlg--channel {
  max-width: min(90vw, 340px);
  margin: auto;
  border: 1px solid rgba(209, 107, 122, 0.28);
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(209, 107, 122, 0.2), transparent 60%),
    var(--bg-card);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
}
.dlg--channel::backdrop {
  background: rgba(8, 4, 6, 0.72);
  backdrop-filter: blur(4px);
}
.dlg-channel {
  position: relative;
  padding: 28px 22px 22px;
  text-align: center;
}
.dlg-channel__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.dlg-channel__close:active { transform: scale(var(--tap-scale)); }
.dlg-channel__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: linear-gradient(145deg, var(--accent-dim), rgba(140, 40, 58, 0.12));
  border: 1px solid rgba(209, 107, 122, 0.25);
}
.dlg-channel__icon svg { width: 26px; height: 26px; }
.dlg-channel__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.dlg-channel__text {
  margin: 0 0 18px;
  font-size: 0.86rem;
  line-height: 1.45;
}
.dlg-channel .btn + .btn { margin-top: 8px; }
.dlg__inner { padding: 20px; margin: 0; }
.dlg__title { margin: 0 0 8px; font-size: 1.05rem; }
.dlg__text { margin: 0 0 14px; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.dlg__label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.dlg__input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 16px;
}
.dlg__actions { display: flex; gap: 10px; justify-content: flex-end; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s var(--ease-out), filter 0.15s, opacity 0.15s, box-shadow 0.2s;
}
a.btn { text-decoration: none; }
.btn__ico { display: inline-flex; }
.btn__ico svg { width: 18px; height: 18px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(145deg, #d97a88 0%, #b84558 48%, #8e2f42 100%);
  color: #fff8f9;
  box-shadow: 0 6px 20px rgba(160, 48, 72, 0.35);
}
.btn:not(:disabled):active { transform: scale(var(--tap-scale)); filter: brightness(0.96); }
.btn--ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn--soft { background: var(--bg-elev); color: var(--text); }
.btn--block { width: 100%; }
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
}
.steps__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 2px solid var(--border);
}
.steps__dot {
  transition: transform 0.25s var(--ease-out), background 0.25s, box-shadow 0.25s;
}
.steps__dot.is-on {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
  transform: scale(1.15);
}
.steps__line {
  width: 36px;
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.steps__dot.is-on + .steps__line,
.steps__line:has(+ .steps__dot.is-on) {
  background: linear-gradient(90deg, var(--accent), var(--border));
}

.wz-title { margin: 0 0 8px; font-size: 1.25rem; }
.wz-lead { margin: 0 0 16px; color: var(--muted); line-height: 1.5; font-size: 0.92rem; }
.wz-panel { margin-bottom: 8px; }

.pick-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: transform 0.16s var(--ease-out), border-color 0.2s, background 0.2s;
}
.pick-row:active { transform: scale(var(--tap-scale)); }
.pick-row.is-on {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.pick-row__left { display: flex; align-items: center; gap: 12px; }
.pick-row__ico { color: var(--accent); display: flex; }
.pick-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  display: grid;
  place-items: center;
}
.pick-row.is-on .pick-dot { border-color: var(--accent); }
.pick-row.is-on .pick-dot i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}

.app-pick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.app-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}
.app-card.is-on { border-color: var(--accent); background: var(--accent-dim); }
.app-card strong { display: block; font-size: 1rem; }
.app-card em { font-style: normal; font-size: 0.78rem; color: var(--muted); }
.app-card__badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.wz-download { margin-bottom: 16px; }
.wz-download .btn { margin-top: 0; }

.dlg-audience .btn + .btn { margin-top: 8px; }

.sub-url {
  margin: 12px 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--muted);
  max-height: 72px;
  overflow: auto;
}

.help-fold {
  margin: 16px 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  font-size: 0.85rem;
  color: var(--muted);
}
.help-fold summary { cursor: pointer; color: var(--text); font-weight: 600; }
.help-fold__list { margin: 8px 0 0; padding-left: 18px; line-height: 1.5; }

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.preset-grid--pay {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 6px;
  overflow: visible;
}
.preset {
  position: relative;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.16s var(--ease-out), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.preset:active { transform: scale(var(--tap-scale)); }
.preset.is-on { box-shadow: 0 4px 16px rgba(166, 61, 80, 0.15); }
.preset-grid--pay .preset {
  min-height: 52px;
  font-size: 1.05rem;
}
.preset.is-on { border-color: var(--accent); background: var(--accent-dim); }

.topup-continue { margin-top: 22px; }
.topup-custom-btn {
  width: 100%;
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.16s var(--ease-out);
}
.topup-custom-btn:active { transform: scale(var(--tap-scale)); }
.topup-custom-btn.is-on {
  color: var(--accent);
  border-color: rgba(166, 61, 80, 0.45);
  border-style: solid;
  background: var(--accent-dim);
}
.topup-custom {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin: 0;
  transition: max-height 0.28s var(--ease-out), opacity 0.22s, margin 0.28s;
}
.topup-custom.is-open {
  max-height: 64px;
  opacity: 1;
  margin: 8px 0 4px;
}
.topup-custom__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(166, 61, 80, 0.35);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  letter-spacing: 0.02em;
}
.topup-custom__input::placeholder {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.topup-custom__input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.preset__badge {
  position: absolute;
  top: -8px;
  right: -4px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d16b7a, #a63d50);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(166, 61, 80, 0.35);
  pointer-events: none;
  animation: badgePop 0.35s var(--ease-out);
}
.hint.is-warn { color: var(--warn); }

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.method {
  display: grid;
  grid-template-columns: 44px 1fr 20px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: transform 0.16s var(--ease-out), border-color 0.2s, background 0.2s;
}
.method:active { transform: scale(var(--tap-scale)); }
.method.is-on {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 4px 18px rgba(166, 61, 80, 0.12);
}
.method__ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), var(--bg-elev));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--accent);
}
.method__ico img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.method__ico--logo {
  background: rgba(255, 255, 255, 0.96);
  padding: 5px;
}
.method__ico--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.method__ico--fill {
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.method__ico--fill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.method__ico svg { width: 24px; height: 24px; }
.method__letter {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
}
.method__txt strong { display: block; font-size: 0.95rem; }
.method__txt em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}
.topup-note { margin-top: 8px; text-align: center; line-height: 1.45; }

.field { display: block; margin-bottom: 12px; }
.field__label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.field__input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.hint { font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; min-height: 1.2em; }

.home-admin-entry {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid rgba(209, 107, 122, 0.22);
  background: linear-gradient(145deg, rgba(166, 61, 80, 0.1), var(--bg-card));
}

.admin-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}
.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.admin-stat {
  padding: 12px 8px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.admin-stat__val {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.admin-stat__lbl {
  display: block;
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.admin-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.admin-seg__btn {
  border: none;
  border-radius: 10px;
  padding: 10px 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.admin-seg__btn.is-on {
  color: #fff8f9;
  background: linear-gradient(145deg, #d97a88, #8e2f42);
}
.admin-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.admin-row--ready {
  border-color: rgba(61, 214, 140, 0.35);
  background: linear-gradient(145deg, rgba(61, 214, 140, 0.08), var(--bg-card));
}
.admin-row__rank {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
}
.admin-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-row__name {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-row__meta {
  font-size: 0.72rem;
  color: var(--muted);
}
.admin-row__right {
  text-align: right;
  flex-shrink: 0;
}
.admin-row__val {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.admin-row__unit {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
}
.admin-empty {
  margin: 8px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.view--ref { padding-top: 4px; }
.ref-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ref-page-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ref-lead {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.ref-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ref-stat {
  padding: 10px 6px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.ref-stat--hi {
  border-color: rgba(166, 61, 80, 0.32);
  background: rgba(166, 61, 80, 0.08);
}
.ref-stat__val {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.ref-stat__lbl {
  display: block;
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.ref-link-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.ref-link-card .ref-link { margin-bottom: 10px; }
.ref-link {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--text);
  line-height: 1.4;
  max-height: 72px;
  overflow: auto;
}
.ref-hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}
.ref-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn--sm-block {
  padding: 11px 10px;
  font-size: 0.82rem;
  width: 100%;
}
.btn--compact {
  padding: 12px 14px;
  font-size: 0.88rem;
}
.ref-payout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
}
@media (max-width: 360px) {
  .ref-payout { grid-template-columns: 1fr; }
}
.ref-list-card .ref-hint { margin: 0 0 6px; }
.ref-list--compact li { padding: 9px 0; font-size: 0.82rem; }
.ref-list__name { font-size: 0.84rem; }
.ref-list__avatar { width: 28px; height: 28px; font-size: 0.7rem; border-radius: 8px; }
.ref-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ref-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  animation: staggerIn 0.35s var(--ease-out) backwards;
}
.ref-list li:nth-child(1) { animation-delay: 0.02s; }
.ref-list li:nth-child(2) { animation-delay: 0.05s; }
.ref-list li:nth-child(3) { animation-delay: 0.08s; }
.ref-list li:nth-child(4) { animation-delay: 0.11s; }
.ref-list li:nth-child(5) { animation-delay: 0.14s; }
.ref-list__avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
}
.ref-list__body { flex: 1; min-width: 0; }
.ref-list li:first-child { border-top: none; padding-top: 0; }
.ref-list__name { font-weight: 600; display: block; }
.ref-list__meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.ref-list__date { font-size: 0.72rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 10px 12px calc(10px + var(--safe-b));
  background: rgba(11, 7, 9, 0.9);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 30;
}
.tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.62rem;
  cursor: pointer;
  font-family: inherit;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s, transform 0.16s var(--ease-out);
}
.tab:active { transform: scale(0.94); }
.tab.is-on {
  color: var(--accent);
  background: var(--accent-dim);
}
.tab.is-on .tab__ico { animation: tabPop 0.28s var(--ease-out); }
.tab__ico { display: flex; transition: transform 0.2s var(--ease-out); }
.tab__ico svg { width: 22px; height: 22px; }

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(80px + var(--safe-b));
  max-width: 448px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(11, 7, 9, 0.96);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.4;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s var(--ease-out);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  backdrop-filter: blur(10px);
}
.toast__ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.toast__ico svg { width: 20px; height: 20px; }
.toast__text { flex: 1; min-width: 0; padding-top: 8px; font-weight: 500; }
.toast.toast--show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  animation: toastIn 0.32s var(--ease-out);
}
.toast--ok {
  border-color: rgba(61, 214, 140, 0.45);
  background: linear-gradient(135deg, rgba(61, 214, 140, 0.12), rgba(11, 7, 9, 0.96));
}
.toast--ok .toast__ico {
  color: #6ee7a8;
  background: rgba(61, 214, 140, 0.15);
}
.toast--err {
  border-color: rgba(255, 107, 107, 0.45);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(11, 7, 9, 0.96));
}
.toast--err .toast__ico {
  color: #ff9a9a;
  background: rgba(255, 107, 107, 0.12);
}
.toast--info .toast__ico {
  color: var(--accent);
  background: rgba(166, 61, 80, 0.12);
}

.landing__icon,
.blocked__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--accent-dim), rgba(140, 40, 58, 0.08));
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  color: var(--accent);
  animation: badgePop 0.5s var(--ease-out);
}
.landing__icon svg,
.blocked__icon svg { width: 28px; height: 28px; }
.blocked__icon--warn { color: var(--warn); background: rgba(255, 176, 32, 0.12); }
.device-list li {
  animation: staggerIn 0.3s var(--ease-out) backwards;
}
.device-list li:nth-child(1) { animation-delay: 0.03s; }
.device-list li:nth-child(2) { animation-delay: 0.06s; }
.device-list li:nth-child(3) { animation-delay: 0.09s; }

/* История пополнений (раздел Баланс) */
.pay-history {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.pay-history__title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pay-history__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pay-history__empty,
.pay-history__loading,
.pay-history__err {
  margin: 0;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: rgba(0, 0, 0, 0.12);
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
  line-height: 1.4;
}
.pay-history__err { color: var(--err); border-style: solid; }
.pay-history__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.pay-history__amt {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pay-history__meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
}
.pay-history__status {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pay-history__status--ok { color: var(--ok); }
.pay-history__status--wait { color: var(--warn); }
.pay-history__status--fail { color: var(--err); }
.pay-history__credit {
  color: var(--ok);
  font-weight: 600;
}
