:root {
  --bg: #0c0c0f;
  --bg-elev: #14141a;
  --border: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.52);
  --accent: #6ee7b7;
  --accent-dim: #34d399;
  --danger: #fb7185;
  --radius: 14px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 440px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  padding-bottom: calc(1.5rem + var(--safe-bottom));
}

.bg-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  background: rgba(12, 12, 15, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent);
}

.top-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem;
}

body.page-auth .shell {
  min-height: calc(100dvh - 3.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 0.75rem;
  padding-bottom: calc(2rem + var(--safe-bottom));
}

body.page-auth {
  background:
    radial-gradient(ellipse 120% 70% at 50% -25%, rgba(110, 231, 183, 0.16), transparent 52%),
    radial-gradient(ellipse 55% 45% at 100% 20%, rgba(52, 211, 153, 0.09), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(110, 231, 183, 0.06), transparent 48%),
    var(--bg);
}

body.page-auth .top {
  background: rgba(10, 10, 14, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ——— Экран входа / регистрации ——— */
.auth-screen {
  position: relative;
  width: 100%;
  max-width: 26.5rem;
  margin: 0 auto;
}

.auth-aurora {
  position: absolute;
  inset: -4rem -2rem -2rem;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.auth-aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  animation: auth-blob 14s ease-in-out infinite;
}

.auth-aurora__blob--1 {
  width: 14rem;
  height: 14rem;
  top: -2rem;
  right: -3rem;
  background: radial-gradient(circle, rgba(110, 231, 183, 0.45) 0%, transparent 70%);
  animation-delay: 0s;
}

.auth-aurora__blob--2 {
  width: 12rem;
  height: 12rem;
  bottom: 20%;
  left: -4rem;
  background: radial-gradient(circle, rgba(61, 214, 140, 0.35) 0%, transparent 72%);
  animation-delay: -7s;
}

.auth-aurora__mesh {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(105deg, rgba(110, 231, 183, 0.03) 0%, transparent 42%, rgba(255, 255, 255, 0.02) 100%);
  background-size: 20px 20px, 100% 100%;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, black, transparent);
}

@keyframes auth-blob {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(6%, -4%) scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-aurora__blob {
    animation: none;
  }

  .auth-panel {
    animation: none;
  }

  .btn--auth-cta::after {
    display: none;
  }
}

.auth-card {
  position: relative;
  z-index: 1;
  padding: 1.65rem 1.45rem 1.75rem;
  border-radius: 24px;
  background: linear-gradient(
    165deg,
    rgba(30, 30, 38, 0.92) 0%,
    rgba(18, 18, 24, 0.96) 45%,
    rgba(12, 12, 16, 0.98) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 32px 64px -24px rgba(0, 0, 0, 0.75),
    0 0 80px -30px rgba(110, 231, 183, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  border-radius: 24px 24px 0 0;
  pointer-events: none;
}

.auth-card__head {
  margin-bottom: 1.35rem;
  text-align: center;
}

.auth-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-dim);
  opacity: 0.95;
}

.auth-heading {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.82) 50%, rgba(200, 255, 230, 0.75) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-lead {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.48);
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.auth-lead strong {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.35rem;
  padding: 0.35rem;
  background: rgba(0, 0, 0, 0.38);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.auth-tab {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.62rem 1rem;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  flex: 1;
  min-width: 0;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.auth-tab:hover {
  color: rgba(255, 255, 255, 0.88);
}

.auth-tab.is-active {
  color: #06130d;
  background: linear-gradient(145deg, #8ef5d0 0%, var(--accent) 38%, var(--accent-dim) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 28px -6px rgba(110, 231, 183, 0.55),
    0 2px 12px rgba(52, 211, 153, 0.25);
  transform: scale(1.02);
}

.auth-panel {
  animation: auth-panel-in 0.35s ease both;
}

@keyframes auth-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field--auth {
  margin-bottom: 1rem;
}

.field__label {
  display: block;
  margin-bottom: 0.42rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.field__input-row {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.field__input-row:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.48);
}

.field__input-row:focus-within {
  border-color: rgba(110, 231, 183, 0.55);
  box-shadow:
    0 0 0 3px rgba(110, 231, 183, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.field__input-row::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  opacity: 0.48;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.field--icon-user .field__input-row::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a8a8b8' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z'/%3E%3C/svg%3E");
}

.field--icon-lock .field__input-row::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a8a8b8' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z'/%3E%3C/svg%3E");
}

.field--icon-at .field__input-row::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a8a8b8' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16.5 12a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0zm0 0c0 1.657-1.343 3-3 3h-1.5M16.5 12H18m-13.5 0H6'/%3E%3C/svg%3E");
}

.field__input {
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 14px;
  padding: 0.82rem 0.95rem 0.82rem 2.85rem;
  width: 100%;
  outline: none;
}

.field__input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.field__input:focus {
  border-color: transparent;
}

.btn--auth-cta {
  margin-top: 0.25rem;
  padding: 0.85rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 10px 32px -8px rgba(52, 211, 153, 0.55);
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    filter 0.2s ease;
}

.btn--auth-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.btn--auth-cta:hover {
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 14px 40px -10px rgba(110, 231, 183, 0.6);
}

.btn--auth-cta:hover::after {
  transform: translateX(120%);
}

.view.hidden {
  display: none !important;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  margin-bottom: 0.9rem;
}

.card h1 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.5rem 0 1.05rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.auth-divider span {
  white-space: nowrap;
  padding: 0 0.5rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12) 20%, rgba(110, 231, 183, 0.2) 50%, rgba(255, 255, 255, 0.12) 80%, transparent);
}

/* OAuth: стеклянная панель + кнопки с брендовым свечением */
.oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.15rem;
  padding: 1.2rem 1.05rem 1.3rem;
  border-radius: 22px;
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 0.075) 0%,
    rgba(255, 255, 255, 0.02) 45%,
    rgba(0, 0, 0, 0.28) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 24px 56px -28px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.oauth-btn {
  --oauth-brand: #8b8b9a;
  --oauth-glow: rgba(140, 140, 160, 0.25);
  position: relative;
  display: block;
  width: 100%;
  text-decoration: none;
  text-align: left;
  font: inherit;
  color: rgba(255, 255, 255, 0.97);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(155deg, rgba(32, 32, 42, 0.98) 0%, rgba(16, 16, 22, 0.99) 55%, rgba(12, 12, 18, 1) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.11) inset,
    0 0 0 1px rgba(0, 0, 0, 0.4) inset,
    0 6px 24px -8px rgba(0, 0, 0, 0.55),
    0 16px 48px -20px var(--oauth-glow);
  cursor: pointer;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.45, 0.64, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    filter 0.3s ease,
    opacity 0.25s ease;
  overflow: hidden;
}

button.oauth-btn {
  appearance: none;
  -webkit-appearance: none;
}

.oauth-btn--disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: saturate(0.65);
}

.oauth-btn--disabled:hover,
.oauth-btn--disabled:active {
  transform: none;
  filter: saturate(0.65);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 4px 18px -10px rgba(0, 0, 0, 0.55);
}

.oauth-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
  opacity: 0.85;
}

.oauth-btn:hover:not(.oauth-btn--disabled) {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 12px 36px -10px rgba(0, 0, 0, 0.5),
    0 24px 56px -16px var(--oauth-glow),
    0 0 64px -8px var(--oauth-glow);
  filter: brightness(1.06) saturate(1.05);
}

.oauth-btn:active:not(.oauth-btn--disabled) {
  transform: translateY(-1px) scale(1.008);
  transition-duration: 0.12s;
}

.oauth-btn:focus-visible {
  outline: 2px solid var(--oauth-brand);
  outline-offset: 4px;
}

.oauth-btn__inner {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.65rem 1rem 0.65rem 0.65rem;
  min-height: 3.5rem;
  position: relative;
  z-index: 1;
}

.oauth-btn__glyph {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.oauth-btn__glyph svg {
  display: block;
  width: 26px;
  height: 26px;
}

.oauth-btn__title {
  flex: 1;
  min-width: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: left;
}

/* Google */
.oauth-btn--google {
  --oauth-brand: #4285f4;
  --oauth-glow: rgba(66, 133, 244, 0.55);
  border-color: rgba(66, 133, 244, 0.28);
}

.oauth-btn--google .oauth-btn__glyph {
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f4 100%);
  box-shadow:
    0 8px 28px rgba(66, 133, 244, 0.45),
    inset 0 1px 0 #fff;
}

/* Яндекс */
.oauth-btn--yandex {
  --oauth-brand: #fc3f1d;
  --oauth-glow: rgba(252, 63, 29, 0.52);
  border-color: rgba(252, 63, 29, 0.32);
}

.oauth-btn--yandex .oauth-btn__glyph {
  background: linear-gradient(155deg, #ff7a66 0%, #fc3f1d 45%, #c92810 100%);
  color: #fff;
  box-shadow:
    0 8px 28px rgba(252, 63, 29, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* VK */
.oauth-btn--vk {
  --oauth-brand: #0077ff;
  --oauth-glow: rgba(0, 119, 255, 0.5);
  border-color: rgba(0, 119, 255, 0.3);
}

.oauth-btn--vk .oauth-btn__glyph {
  background: linear-gradient(160deg, #5aa7ff 0%, #0077ff 50%, #005bcc 100%);
  color: #fff;
  box-shadow:
    0 8px 28px rgba(0, 119, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Mail.ru */
.oauth-btn--mailru {
  --oauth-brand: #168de2;
  --oauth-glow: rgba(22, 141, 226, 0.48);
  border-color: rgba(40, 170, 255, 0.28);
}

.oauth-btn--mailru .oauth-btn__glyph {
  background: linear-gradient(165deg, #5ec0ff 0%, #168de2 50%, #0d6cb3 100%);
  color: #fff;
  box-shadow:
    0 8px 28px rgba(22, 141, 226, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.card h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.field.inline {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.field span {
  font-size: 0.8rem;
  color: var(--muted);
}

input,
textarea,
select {
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  width: 100%;
  outline: none;
}

select {
  cursor: pointer;
  /* appearance:none ломает выпадающий список в Chrome/Android и некоторых WebView */
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  min-height: 2.75rem;
}

input:focus,
textarea:focus {
  border-color: rgba(110, 231, 183, 0.45);
}

textarea {
  resize: vertical;
  min-height: 72px;
}

code {
  font-size: 0.85em;
  color: var(--accent-dim);
}

.btn {
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn.btn--auth-cta:active {
  transform: scale(0.985);
}

.btn.primary {
  background: linear-gradient(145deg, var(--accent), #3dd68c);
  color: #042016;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  padding: 0.45rem 0.65rem;
}

.btn.block {
  width: 100%;
}

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

#btn-provision-vless:not([hidden]) {
  margin-bottom: 0.75rem;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 3px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
}

.tab {
  flex: 1;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 9px;
  padding: 0.55rem;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
}

.tab.active {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.tab-panel.hidden {
  display: none;
}

.grid {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 400px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.stat-value.small {
  font-size: 1.05rem;
  font-weight: 600;
}

.dash-email {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-all;
}

.traffic-block > p {
  margin: 0.35rem 0;
}

.traffic-capsule {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.traffic-capsule__track {
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  border: 1px solid var(--border);
}

.traffic-capsule__fill {
  height: 100%;
  min-width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.85), var(--accent));
  box-shadow: 0 0 20px rgba(110, 231, 183, 0.25);
  transition: width 0.45s ease;
}

.traffic-capsule--warn .traffic-capsule__fill {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
  box-shadow: 0 0 16px rgba(251, 146, 60, 0.3);
}

.traffic-capsule--depleted .traffic-capsule__track {
  border-color: rgba(251, 113, 133, 0.35);
}

.traffic-capsule--depleted .traffic-capsule__fill {
  background: linear-gradient(90deg, #fb7185, #e11d48);
  box-shadow: 0 0 18px rgba(251, 113, 133, 0.45);
}

.traffic-capsule--depleted .traffic-capsule__meta .traffic-capsule__line:first-child {
  color: #fda4af;
}

.traffic-capsule__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.traffic-capsule__line {
  line-height: 1.35;
}

.traffic-capsule__badges {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.vless-howto {
  margin: 0.65rem 0 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.vless-howto__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  list-style-position: outside;
}

.vless-howto__summary::-webkit-details-marker {
  color: var(--muted);
}

.vless-howto__body {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  line-height: 1.45;
}

.vless-howto__body p {
  margin: 0 0 0.55rem;
}

.vless-howto__body p:last-child {
  margin-bottom: 0;
}

.vless-howto__lead {
  margin-top: 0.85rem !important;
}

.vless-howto__steps {
  margin: 0.35rem 0 0.65rem;
  padding-left: 1.35rem;
  line-height: 1.5;
}

.vless-howto__steps li {
  margin-bottom: 0.45rem;
}

.vless-howto__steps li:last-child {
  margin-bottom: 0;
}

.vless-howto__body code {
  font-size: 0.82em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.vless-qr-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.vless-qr-block__label {
  margin: 0 0 0.65rem;
}

.vless-qr-holder {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 5rem;
}

.vless-qr-canvas {
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.ok {
  background: rgba(110, 231, 183, 0.15);
  color: var(--accent);
}

.badge.warn {
  background: rgba(251, 113, 133, 0.14);
  color: var(--danger);
}

.badge.traffic-out {
  background: rgba(244, 63, 94, 0.22);
  color: #fda4af;
  border: 1px solid rgba(251, 113, 133, 0.35);
}

.stat--balance .balance-pay-row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.copy-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.secondary-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.2rem + var(--safe-bottom));
  transform: translateX(-50%);
  max-width: min(90vw, 360px);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  z-index: 10;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

.toast.error {
  border-color: rgba(251, 113, 133, 0.4);
}

.subscription-panel-card h2 {
  margin-bottom: 0.35rem;
}

.subscription-panel-body {
  margin-top: 0.5rem;
}

.subscription-panel__dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
}

.subscription-panel__dl dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.subscription-panel__dl dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.subscription-panel__client-label {
  margin: 0.85rem 0 0.25rem;
}

.subscription-panel__client {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
  line-height: 1.4;
}
