:root {
  color-scheme: dark;
  --bg: #0b1018;
  --bg-2: #121a27;
  --surface: rgba(24, 31, 45, 0.9);
  --surface-2: rgba(31, 40, 57, 0.88);
  --surface-3: #1c2635;
  --border: rgba(143, 168, 206, 0.2);
  --border-strong: rgba(143, 168, 206, 0.36);
  --text: #f3f6fb;
  --muted: #a5afc3;
  --accent: #2f89ff;
  --accent-2: #55b2ff;
  --success: #79dea3;
  --danger: #ff7b7b;
  --radius: 16px;
  --shadow: 0 10px 35px rgba(4, 8, 15, 0.38);
  --tg-top-safe: 0px;
  --lg-bg-toolbar:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(17, 24, 36, 0.64);
  --lg-bg-interactive:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.08);
  --lg-border-subtle: rgba(255, 255, 255, 0.14);
  --lg-border-strong: rgba(255, 255, 255, 0.28);
  --lg-shadow-floating:
    0 18px 48px rgba(3, 8, 16, 0.28),
    0 4px 14px rgba(3, 8, 16, 0.16);
  --lg-shadow-pill:
    0 8px 22px rgba(7, 15, 30, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  --lg-blur-md: 20px;
  --lg-blur-lg: 30px;
  --lg-radius-xl: 24px;
  --lg-radius-pill: 16px;
  --lg-easing-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --lg-duration-fast: 180ms;
  --lg-duration-normal: 280ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 620px at -12% -20%, rgba(47, 137, 255, 0.19), transparent 65%),
    radial-gradient(880px 460px at 112% 6%, rgba(38, 190, 177, 0.14), transparent 62%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-2) 100%);
}

.btn,
code,
.chip,
.tab {
  font-family: "Fira Code", monospace;
}

.app {
  max-width: 880px;
  margin: 0 auto;
  padding: calc(28px + var(--tg-top-safe)) 14px 98px;
  animation: app-in 320ms ease;
}

body.non-fullscreen-launch .app {
  margin-top: -30px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(34, 44, 62, 0.94), rgba(21, 29, 42, 0.88));
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 4px 14px rgba(47, 137, 255, 0.28);
  animation: logo-pop 420ms ease;
}

.brand-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  font-family: "Product Sans", "Google Sans", "Roboto", sans-serif;
  letter-spacing: 0.01em;
}

.topbar p,
#statusText {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  padding: 6px 10px;
  border: 1px solid rgba(85, 178, 255, 0.35);
  border-radius: 999px;
  background: rgba(24, 137, 255, 0.18);
}

.page {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  animation: none;
}

.auth-gate {
  margin-top: 16px;
}

.auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-captcha-wrap {
  display: grid;
  gap: 8px;
}

.auth-captcha-box {
  display: flex;
  justify-content: center;
  min-height: 66px;
}

.auth-captcha-box:empty {
  min-height: 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 55%),
    var(--surface);
  padding: 14px;
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow);
  animation: card-in 280ms ease both;
}

.subscription-ok {
  border-color: rgba(121, 222, 163, 0.45);
  box-shadow: 0 12px 32px rgba(24, 120, 74, 0.2);
}

.subscription-danger {
  border-color: rgba(255, 123, 123, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 123, 123, 0.08), transparent 65%),
    var(--surface);
}

.profile-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.avatar,
.avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
}

.avatar {
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
}

.profile-meta h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  font-family: "Rubik", "Nunito Sans", sans-serif;
}

.profile-meta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

#profileIdInline {
  font-size: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  font-family: "Rubik", "Nunito Sans", sans-serif;
}

.text-muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  background: var(--surface-2);
}

.chip-success {
  border-color: rgba(121, 222, 163, 0.42);
  background: rgba(45, 120, 82, 0.32);
  color: #b9f6d3;
}

.chip-danger {
  border-color: rgba(255, 123, 123, 0.38);
  background: rgba(120, 42, 42, 0.32);
  color: #ffc0c0;
}

.kv {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 10px;
}

.kv span {
  color: var(--muted);
  font-size: 12px;
}

code,
.inline-code {
  display: block;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  padding: 10px;
  font-size: 11px;
  color: #d7e8ff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ref-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-stack {
  display: grid;
  gap: 8px;
}

.action-stack .btn {
  width: 100%;
  justify-content: center;
}

.checkout {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.referral-grid {
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 11px;
  color: var(--muted);
}

.field input,
.field select {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(17, 24, 35, 0.86);
  color: var(--text);
  padding: 0 10px;
  font-size: 14px;
  font-family: "Fira Code", monospace;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(85, 178, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(47, 137, 255, 0.16);
}

.traffic-autobuy-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.traffic-threshold-field {
  min-width: 0;
}

.range-output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
  align-items: center;
}

.range-output-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  accent-color: var(--accent-2);
}

.range-output-row input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(47, 137, 255, 0.22), rgba(85, 178, 255, 0.42));
  border: 1px solid var(--border);
}

.range-output-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 12px rgba(47, 137, 255, 0.35);
}

.range-output-row input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(47, 137, 255, 0.22), rgba(85, 178, 255, 0.42));
  border: 1px solid var(--border);
}

.range-output-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 12px rgba(47, 137, 255, 0.35);
}

.range-output-row input[type="text"] {
  width: 100%;
  text-align: center;
}

.plan-list {
  display: grid;
  gap: 8px;
}

.consent-box {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 13px;
  border: 1px solid var(--lg-border-subtle);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(20, 28, 42, 0.82);
  box-shadow: var(--lg-shadow-floating);
  backdrop-filter: blur(var(--lg-blur-md)) saturate(145%);
  -webkit-backdrop-filter: blur(var(--lg-blur-md)) saturate(145%);
  cursor: pointer;
}

.consent-checkbox {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent-2);
}

.consent-copy {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}

.consent-copy a {
  color: #8fc9ff;
  text-decoration: none;
}

.consent-copy a:hover {
  text-decoration: underline;
}

.traffic-progress-wrap {
  display: grid;
  gap: 8px;
}

.traffic-progress {
  width: 100%;
  height: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.traffic-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2f89ff, #5bc4ff);
  transition: width 220ms ease;
}

.traffic-progress-bar.warning {
  background: linear-gradient(90deg, #d98e2b, #f3b14e);
}

.traffic-progress-bar.danger {
  background: linear-gradient(90deg, #cf4a4a, #f67777);
}

.plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(22, 30, 44, 0.88);
}

.plan-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plan-title {
  font-size: 13px;
  font-weight: 700;
}

.plan-sub {
  font-size: 11px;
  color: var(--muted);
}

.plan-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.plan-note-promo {
  font-size: 10px;
  line-height: 1.25;
  opacity: 0.72;
}

.price-old {
  text-decoration: line-through;
  opacity: 0.75;
  margin-right: 6px;
}

.price-new {
  color: #73c2ff;
  font-weight: 700;
}

.btn {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 11px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}

.btn:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn-solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: rgba(80, 175, 255, 0.65);
  color: #f6faff;
  box-shadow: 0 6px 16px rgba(47, 137, 255, 0.34);
}

.btn-solid:hover {
  box-shadow: 0 8px 18px rgba(47, 137, 255, 0.4);
}

.btn-ghost {
  background: rgba(23, 31, 44, 0.82);
}

.btn-danger {
  border-color: rgba(255, 123, 123, 0.45);
  background: rgba(118, 40, 40, 0.34);
  color: #ffbfbf;
}

.btn-danger:hover {
  border-color: rgba(255, 123, 123, 0.62);
}

.referral-block {
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(125deg, rgba(36, 98, 190, 0.22), rgba(22, 31, 47, 0.95));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 150ms ease, transform 140ms ease;
  box-shadow: var(--shadow);
}

.promo-offer {
  --promo-bg-start: #f5bc62;
  --promo-bg-end: #233a6a;
  --promo-accent: #ffe2a8;
  --promo-text: #fff8eb;
  --promo-bg-start-soft: rgba(245, 188, 98, 0.16);
  --promo-bg-end-soft: rgba(35, 58, 106, 0.2);
  --promo-bg-start-overlay: rgba(245, 188, 98, 0.16);
  --promo-bg-end-overlay: rgba(16, 22, 31, 0.88);
  --promo-border: rgba(255, 226, 168, 0.26);
  --promo-border-hover: rgba(255, 226, 168, 0.4);
  --promo-glow: rgba(255, 226, 168, 0.42);
  --promo-highlight: rgba(255, 255, 255, 0.18);
  --promo-radial: rgba(255, 226, 168, 0.28);
  --promo-chip-border: rgba(255, 226, 168, 0.28);
  --promo-chip-bg: rgba(255, 248, 235, 0.1);
  --promo-text-soft: rgba(255, 248, 235, 0.84);
  --promo-code-border: rgba(255, 226, 168, 0.24);
  --promo-code-bg: rgba(255, 248, 235, 0.1);
  --promo-code-highlight: rgba(255, 248, 235, 0.14);
  --promo-shadow: 0 20px 44px rgba(6, 11, 21, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --promo-shadow-hover: 0 24px 54px rgba(6, 11, 21, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  position: relative;
  width: 100%;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--promo-border);
  border-radius: 22px;
  background:
    linear-gradient(145deg, var(--promo-bg-start-soft), rgba(255, 255, 255, 0.04) 38%, var(--promo-bg-end-soft)),
    linear-gradient(180deg, var(--promo-bg-start-overlay), var(--promo-bg-end-overlay));
  color: var(--promo-text);
  padding: 18px;
  display: grid;
  gap: 12px;
  min-height: 220px;
  align-content: space-between;
  text-align: left;
  cursor: pointer;
  margin: 0;
  font: inherit;
  box-shadow: var(--promo-shadow);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  transition:
    transform var(--lg-duration-normal) var(--lg-easing-spring),
    box-shadow var(--lg-duration-normal) var(--lg-easing-spring),
    border-color var(--lg-duration-fast) ease;
}

.promo-offers {
  display: grid;
  gap: 12px;
}

.promo-offer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--promo-highlight), transparent 34%),
    radial-gradient(circle at top right, var(--promo-radial), transparent 32%);
  pointer-events: none;
}

.promo-offer:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: var(--promo-border-hover);
  box-shadow: var(--promo-shadow-hover);
}

.promo-offer:active {
  transform: scale(0.985);
}

.promo-offer > * {
  position: relative;
  z-index: 1;
}

.promo-offer-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  top: -88px;
  right: -58px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--promo-glow), transparent 68%);
  pointer-events: none;
}

.promo-offer-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--promo-chip-border);
  border-radius: 999px;
  background: var(--promo-chip-bg);
  color: var(--promo-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.promo-offer-title {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.promo-offer-text {
  max-width: 34ch;
  color: var(--promo-text-soft);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 8px;
}

.promo-offer-text strong,
.promo-offer-code {
  font-family: "Fira Code", monospace;
}

.promo-offer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
}

.promo-offer-code {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--promo-code-border);
  border-radius: 14px;
  background: var(--promo-code-bg);
  color: var(--promo-text);
  font-size: 14px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 var(--promo-code-highlight);
}

.promo-offer-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--promo-text);
  font-size: 13px;
  font-weight: 700;
}

.promo-offer-cta .material-symbols-outlined {
  font-size: 18px;
}

.referral-block:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.device-list {
  display: grid;
  gap: 10px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pager code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 40px;
  padding: 0 10px;
}

.device-item {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(23, 31, 45, 0.9);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.device-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.device-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.device-title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty {
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  padding: 14px;
}

.error {
  margin-top: 12px;
  border: 1px solid rgba(255, 123, 123, 0.42);
  border-radius: 11px;
  background: rgba(83, 30, 30, 0.56);
  color: #ffb9b9;
  padding: 10px;
  font-size: 12px;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: min(calc(100% - 16px), 420px);
  overflow: clip;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--lg-radius-xl);
  background: var(--lg-bg-toolbar);
  box-shadow: var(--lg-shadow-floating);
  backdrop-filter: blur(var(--lg-blur-lg)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--lg-blur-lg)) saturate(180%);
  isolation: isolate;
  touch-action: none;
}

.tabbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 38%, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.tabbar-hairline {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.36), transparent);
  opacity: 0.75;
  pointer-events: none;
}

.tab-indicator {
  position: absolute;
  top: 8px;
  left: 0;
  height: 56px;
  width: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--lg-shadow-pill);
  transition:
    transform var(--lg-duration-normal) var(--lg-easing-spring),
    width var(--lg-duration-normal) var(--lg-easing-spring),
    opacity var(--lg-duration-fast) ease;
  opacity: 0;
}

.tabbar.is-dragging .tab-indicator {
  transition: none;
}

.tabbar.is-dragging .tab {
  transition:
    color 120ms ease,
    opacity 120ms ease;
}

.tab {
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: rgba(243, 246, 251, 0.68);
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 600;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition:
    color var(--lg-duration-fast) ease,
    transform var(--lg-duration-fast) ease,
    opacity var(--lg-duration-fast) ease;
}

.tab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  opacity: 0;
  transition: opacity var(--lg-duration-fast) ease;
}

.tab > * {
  position: relative;
  z-index: 1;
}

.tab-icon-wrap {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.tab-label {
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.01em;
}

.tab .material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.tab:hover {
  color: var(--text);
  transform: translateY(-0.5px);
}

.tab:hover::before,
.tab.active::before {
  opacity: 0.65;
}

.tab.active {
  color: var(--text);
  opacity: 1;
}

.tab.preview-active {
  color: rgba(243, 246, 251, 0.9);
}

.tab.active .tab-icon-wrap {
  transform: translateY(-0.5px);
}

.tab.active .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}

.hidden {
  display: none;
}

.page:not(.hidden) .card:nth-child(1) {
  animation-delay: 20ms;
}

.page:not(.hidden) .card:nth-child(2) {
  animation-delay: 60ms;
}

.page:not(.hidden) .card:nth-child(3) {
  animation-delay: 100ms;
}

.page:not(.hidden) .card:nth-child(4) {
  animation-delay: 140ms;
}

@keyframes app-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logo-pop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 540px) {
  .profile-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .avatar,
  .avatar-fallback {
    width: 48px;
    height: 48px;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .auth-captcha-box {
    justify-content: flex-start;
  }

  .ref-link-row {
    grid-template-columns: 1fr;
  }

  .device-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .device-actions {
    width: 100%;
  }

  .device-actions .btn {
    flex: 1 1 calc(50% - 4px);
  }

  .plan-row {
    grid-template-columns: 1fr;
  }

  .plan-row .btn {
    width: 100%;
    justify-content: center;
  }

  .promo-offer-title {
    font-size: 22px;
  }

  .promo-offer-text {
    max-width: none;
  }

  .promo-offer-footer {
    align-items: stretch;
  }

  .promo-offer-code,
  .promo-offer-cta {
    width: 100%;
    justify-content: center;
  }

  .app {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 110px;
  }

  .tabbar {
    width: calc(100% - 12px);
    bottom: 6px;
    gap: 6px;
    padding: 7px;
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
    border-radius: 22px;
  }

  .tab-indicator {
    top: 7px;
    height: 54px;
  }

  .tab {
    min-height: 54px;
    padding: 7px 4px;
    font-size: 9px;
  }

  .tab-icon-wrap {
    width: 18px;
    height: 18px;
  }

  .tab .material-symbols-outlined {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.payment-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.payment-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.payment-history-row:last-child {
  border-bottom: none;
}

.payment-history-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.payment-history-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-history-date {
  font-size: 12px;
}

.payment-history-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.payment-history-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
