/* DoggoVPN — account shell v2: Mini App design language on the website ЛК.
   Mobile (<768px)  = 1:1 Mini App (header + BottomNav + block design).
   Laptop (768–1279) / Desktop (≥1280) = same blocks, adapted sizes, top tabs.
   Tokens: app-tokens.css (both themes). Loaded after account.css — overrides
   the legacy shell while blocks are migrated section by section. */

/* ── Page base ── */
body.app-account {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
/* Gradient mesh behind glass (mirrors Mini App body::before) */
body.app-account::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, var(--mesh-1), transparent),
    radial-gradient(ellipse 50% 60% at 80% 30%, var(--mesh-2), transparent),
    radial-gradient(ellipse 40% 40% at 50% 80%, var(--mesh-3), transparent),
    var(--bg-page);
  pointer-events: none;
}

/* ── Header ── */
.app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px 8px;
}
.app-header .app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.app-header .app-brand img {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}
.app-header .app-brand span {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.app-header .app-controls {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--bg-card);
  color: var(--text-muted);
  transition: background-color .15s, color .15s;
  padding: 0;
  font-family: inherit;
}
.app-icon-btn:hover { background-color: var(--bg-card-hover); }
.app-icon-btn.theme { color: var(--cta); }
.app-icon-btn.active { color: var(--cta); }
.app-icon-btn svg { width: 20px; height: 20px; display: block; }

/* ── Desktop top tabs (hidden on mobile) ── */
.app-tabs {
  display: none;
  align-items: center;
  gap: 8px;
}
.app-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.app-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.app-tab.active { background: var(--bg-card); color: var(--cta); }
.app-tab svg { width: 18px; height: 18px; }

/* ── Bottom nav (mobile, 1:1 Mini App) ── */
.app-bottomnav {
  position: fixed;
  top: auto;          /* legacy account.css sets nav{top:0} — neutralize */
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--nav-height);
  border-radius: var(--radius-md);
  background-color: var(--nav-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--nav-shadow);
}
.app-bottomnav button {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-muted);
  transition: color .15s;
  padding: 0;
}
.app-bottomnav button.active { color: var(--cta); }
.app-bottomnav button svg { width: 22px; height: 22px; }
.app-bottomnav button span {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.app-bottomnav button .nav-underline {
  position: absolute;
  bottom: 8px;
  width: 20px;
  height: 2px;
  border-radius: var(--radius-pill);
  background-color: var(--cta);
  display: none;
}
.app-bottomnav button.active .nav-underline { display: block; }

/* ── Main / sections ── */
body.app-account main.account {
  flex: 1;
  padding: 4px 0 110px;            /* room for BottomNav on mobile */
}
body.app-account main.account > .container {
  max-width: none;
  padding: 0 12px;                  /* Mini App px-3 */
}

/* #519 — «Привяжите Telegram» banner now lives INSIDE .container, so it fills
   the same block width as the cards on every breakpoint (was max-width:1140px
   + margin:auto from the old wide layout). Icon tile + gap + left padding are
   matched to the action buttons so its icon/text land on the same grid;
   margin-bottom gives a clear gap before the first card. */
body.app-account .tg-link-banner {
  max-width: none;
  margin: 0 0 12px;          /* == card margin-bottom — equal gaps between all blocks */
  gap: 14px;                 /* == card icon→text gap */
  padding: 14px 20px;        /* left == .renew-cta / .key-btn (icon aligns) */
}
/* dark theme: deeper, calmer Telegram blue so the banner doesn't glare on the
   #0A0A0A surface (light theme keeps the brighter account.css gradient). The
   gold trial CTA stays bright #D4A820 on both themes by design. */
:root[data-theme="dark"] body.app-account .tg-link-banner {
  background: linear-gradient(135deg, #15628C 0%, #1E7CB0 55%, #2E92C8 100%);
  box-shadow: 0 8px 24px rgba(16, 82, 120, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
body.app-account .tg-link-icon {
  width: 40px; height: 40px; /* == .renew-cta-icon / .key-btn-icon */
  border-radius: var(--radius-sm);
  font-size: 0;
}
/* title weight 700 + tight line-height so the title→sub gap matches the buttons.
   font-sizes pinned so the ≤600 mobile rule doesn't shrink the banner text
   (title 16→14 / sub 13→12) — it should stay the same size at every width. */
body.app-account .tg-link-title { font-weight: 700; line-height: 1.2; font-size: 16px; }
body.app-account .tg-link-text { font-size: 13px; }
body.app-account .tg-link-cta::after { content: none; }   /* drop text-glyph arrow */
.tg-link-cta-arrow { width: 16px; height: 16px; flex-shrink: 0; transition: transform .15s ease; }
body.app-account .tg-link-cta:hover .tg-link-cta-arrow { transform: translateX(2px); }
@media (min-width: 768px) {
  /* taller banner — the 2-line text doesn't fit a 70px row; left == .renew-cta */
  body.app-account .tg-link-banner { padding: 16px 22px; }
}
/* «Открыть» — narrower padding + shifted so its arrow edge aligns with the card
   arrows. banner_pad == card_pad at every breakpoint, so the same offset
   (margin == padding − 1) works everywhere the banner is an inline row, i.e.
   601px and up (≤600px wraps the button full-width). */
@media (min-width: 601px) {
  body.app-account .tg-link-cta { margin-right: -11px; padding: 11px 12px; }
}

/* ── Card base (Mini App Card: rounded-2xl p-5 glass) ── */
body.app-account .acc-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;              /* Mini App gap-3 rhythm */
  position: relative;
}
/* .gradient-border on an .acc-card must beat the .acc-card base border above
   (0,2,1) — the plain .gradient-border (0,1,0) loses. Gives the gold outline
   like the Mini App support card. */
body.app-account .acc-card.gradient-border { border-color: var(--border-active); }
body.app-account .acc-card h3 {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.app-account .acc-card h3 .icon { font-size: 18px; }

/* ── Buttons (Mini App Button) ── */
body.app-account .btn-acc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform .15s, background-color .15s, color .15s;
}
body.app-account .btn-acc:active { transform: scale(0.97); }
body.app-account .btn-acc-primary {
  background: var(--gold-gradient);
  color: var(--cta-text);
}
body.app-account .btn-acc-primary:hover { box-shadow: 0 6px 16px var(--cta-glow); transform: translateY(-1px); }
body.app-account .btn-acc-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}
body.app-account .btn-acc-secondary:hover { border-color: var(--border-active); color: var(--cta); background: var(--bg-hover); }
body.app-account .btn-acc.copied { background: rgba(20, 184, 166, 0.15); color: var(--status-success); border-color: transparent; }

/* ── Old shell elements: hide/neutralize (replaced by app shell) ── */
body.app-account nav.legacy-nav { display: none; }

/* ── Subscription status (1:1 Mini App Dashboard block) ── */
body.app-account .sub-status {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(20, 184, 166, 0.06);
  border: 1.5px solid rgba(20, 184, 166, 0.25);
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  margin-bottom: 12px;
}
body.app-account .sub-status .status-row { display: flex; align-items: center; gap: 12px; }
body.app-account .sub-status .shield {
  width: 40px; height: 40px; border-radius: 8px;
  background: rgba(20, 184, 166, 0.12);
  border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
body.app-account .sub-status .shield svg { width: 20px; height: 20px; color: var(--status-success); }
body.app-account .sub-status .status-text { flex: 1; min-width: 0; }
body.app-account .sub-status .status-title {
  font-family: inherit;
  font-weight: 700; font-size: 14px;
  color: var(--status-success);
  margin-bottom: 0;
}
body.app-account .sub-status .live-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--status-success);
  flex-shrink: 0;
  box-shadow: none;
  animation: pulse-gold 2s ease-in-out infinite;
}
body.app-account .sub-status .progress-bar {
  width: 100%; height: 6px; margin-top: 12px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
body.app-account .sub-status .progress-bar .fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: var(--radius-pill);
  transition: width .5s ease-out;
}
body.app-account .sub-status .progress-bar .fill.low { background: var(--status-error); }
body.app-account .sub-status.inactive {
  background: rgba(225, 29, 72, 0.06);
  border-color: rgba(225, 29, 72, 0.25);
  box-shadow: none;
}
body.app-account .sub-status.inactive .shield { background: rgba(225, 29, 72, 0.12); }
body.app-account .sub-status.inactive .shield svg { color: var(--status-error); }
body.app-account .sub-status.inactive .status-title { color: var(--status-error); }
/* "Активна до …" date: long form by default ("9 июня 2027 г."), compact
   numeric form ("09.06.2027") on narrow screens — see the narrow-screen
   block at the bottom. Both forms are rendered; CSS picks one so the title
   never wraps to two lines regardless of how long the date string is. */
body.app-account .sub-status .sub-date-short { display: none; }

/* Mini App parity (mobile only): the legacy `.status-row { margin-bottom: 18px }`
   (account.css) ballooned the status card to ~88px on mobile. The gap to the
   progress bar is already provided by the bar's own `margin-top: 12px`, so the
   row margin is redundant → drop it on mobile so the block matches the Mini App
   Dashboard height (expired ≈70px / active ≈88px). Desktop keeps its spacing. */
@media (max-width: 600px) {
  body.app-account .sub-status .status-row { margin-bottom: 0; }
}

/* ── Главная: renew CTA (Mini App "Продлить подписку") ── */
.renew-cta {
  min-height: var(--block-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--renew-gap);
  padding: 0 20px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid rgba(212, 168, 32, 0.30);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  /* soft gold halo — gentle accent vs the neutral key-action buttons */
  box-shadow: var(--glass-shadow), 0 6px 22px rgba(212, 168, 32, 0.18);
  cursor: pointer;
  transition: transform .15s;
}
.renew-cta:active { transform: scale(0.98); }
.renew-cta-label {
  font-size: 14px;      /* consolidated home button size (matches «Как подключиться» / Помощь) */
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.renew-cta-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cta);
  white-space: nowrap;
}
.renew-cta-price svg { width: 16px; height: 16px; }

/* ── Главная: key action buttons (Mini App pair) ── */
.key-btn {
  width: 100%;
  min-height: var(--block-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  transition: transform .15s;
}
.key-btn:active { transform: scale(0.97); }
.key-btn-primary {
  background-color: var(--cta);
  color: var(--cta-text);
}
.key-btn-secondary {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  box-shadow: var(--glass-shadow);
}
.key-btn-secondary.copied { color: var(--status-success); }
.key-btn svg { flex-shrink: 0; }

/* howto details lives inside #key-card as a glass card.
   Padding/height handled in the "Row-button height standard" block below
   (needs the .x.acc-card double-class to beat the .acc-card base padding). */
body.app-account .key-howto { overflow: hidden; }
body.app-account .key-howto > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
body.app-account .key-howto > summary::-webkit-details-marker { display: none; }
body.app-account .key-howto .key-howto-arrow {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .2s;
}
body.app-account .key-howto[open] .key-howto-arrow { transform: rotate(180deg); color: var(--cta); }
body.app-account .key-howto .key-howto-steps {
  padding: 0 20px 16px 36px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.app-account .key-howto .key-howto-steps li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
body.app-account .key-howto .key-howto-steps b { color: var(--text-primary); }
body.app-account .key-howto a { color: var(--cta); }
/* Authoritative span layout — overrides the legacy account.css rule
   `.key-howto-steps li span { display:block }` (SPEC-054) so the OS labels
   stay inline with their store links instead of dropping to their own line. */
body.app-account .key-howto .key-howto-steps li > span { display: block; margin-top: 2px; }
body.app-account .key-howto .key-howto-platforms {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
body.app-account .key-howto .key-howto-os { display: block; margin-top: 0; }
body.app-account .key-howto .key-howto-os-label {
  display: inline;
  margin-top: 0;
  font-weight: 600;
  color: var(--text-primary);
}

/* «Как подключиться» summary-row — leading icon, title, hint, gap.
   Moved to Помощь (was on Главная); un-scoped so it renders wherever the
   .key-howto card sits. Hint hidden on narrow phones, shown ≥768. */
body.app-account .key-howto > summary { gap: 12px; }
body.app-account .key-howto-lead { width: 20px; height: 20px; flex-shrink: 0; color: var(--cta); }
body.app-account .key-howto-summary-title { flex: 1; }
body.app-account .key-howto-hint { display: none; font-size: 12px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
@media (min-width: 768px) {
  body.app-account .key-howto > summary { gap: 14px; }
  body.app-account .key-howto-hint { display: revert; }
}

/* ── Главная: trial CTA — primary accent button (#519).
   Gold-gradient FILL so it's the clear hero among the glass cards; sits at the
   standard --block-h row height with the leading-icon grid + fonts shared with
   the other action buttons. Text/icon fixed dark (gold is bright in both
   themes, so --cta-text's white-on-light would under-contrast). */
body.app-account .trial-cta-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--block-h);
  padding: 0 20px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.28);   /* edge highlight + box-model parity with .renew-cta's border */
  background: #D4A820;                             /* clean bright gold (dark-theme tone) on both themes */
  color: #fff;
  cursor: pointer;
  box-shadow: var(--glass-shadow), 0 8px 24px rgba(212, 168, 32, 0.30);
  transition: transform .15s, box-shadow .15s;
}
body.app-account .trial-cta-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow), 0 12px 30px rgba(212, 168, 32, 0.38);
}
.trial-cta-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.trial-cta-icon svg { width: 22px; height: 22px; }
.trial-cta-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trial-cta-title { font-size: 15px; font-weight: 700; line-height: 1.2; color: #fff; }
.trial-cta-sub { font-size: 12px; font-weight: 500; line-height: 1.3; color: rgba(255, 255, 255, 0.85); margin: 0; }
.trial-cta-arrow { width: 16px; height: 16px; flex-shrink: 0; color: #fff; }   /* == .renew-cta-price svg */
@media (min-width: 768px) {
  body.app-account .trial-cta-card { padding: 0 22px; }   /* icon aligns with .renew-cta ≥768 */
}

/* ── Главная: devices (Mini App DevicesBlock) ── */
.dev-block { margin-bottom: 16px; }
.dev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 4px;
  /* now a clickable accordion header (was a static div) */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.dev-head.dev-head--static { cursor: default; }   /* no devices → not collapsible */
.dev-head-meta { display: flex; align-items: center; gap: 8px; }
body.app-account .dev-caret {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .2s, color .2s;
}
body.app-account .dev-head[aria-expanded="true"] .dev-caret { transform: rotate(180deg); color: var(--cta); }
.dev-head--static .dev-caret { display: none; }
.dev-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
body.app-account .dev-counter {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
}
body.app-account .dev-counter.ok { color: var(--status-success); }
body.app-account .dev-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 6px;
}
.dev-card { padding: 16px 20px; }
body.app-account .dev-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border: none;
  background: none;
}
body.app-account .dev-item + .dev-item { border-top: 1px solid var(--border-card); }
body.app-account .dev-item .dev-icon,
body.app-account .dev-item > svg:first-child {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 8px;
  /* SPEC-063 polish: nudge the icon off the card's left edge (flex `dev-info`
     absorbs it, so the row width + action buttons are untouched). */
  margin-left: 10px;
}
body.app-account .dev-info { flex: 1; min-width: 0; }
body.app-account .dev-name-row { display: flex; align-items: center; gap: 6px; }
body.app-account .dev-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.app-account .dev-current-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: rgba(212, 168, 32, 0.15);
  color: var(--cta);
  flex-shrink: 0;
}
body.app-account .dev-last { font-size: 12px; color: var(--text-muted); }
body.app-account .dev-disconnect,
body.app-account .dev-recover,
body.app-account .dev-rename {
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background-color .15s, color .15s;
}
body.app-account .dev-disconnect svg { width: 16px; height: 16px; }
body.app-account .dev-disconnect:hover {
  background-color: rgba(225, 29, 72, 0.12);
  color: var(--status-error);
}
body.app-account .dev-recover { color: var(--cta); }
body.app-account .dev-recover svg { width: 14px; height: 14px; }
body.app-account .dev-recover:hover { background-color: rgba(212, 168, 32, 0.12); }
/* SPEC-063 rename (✏️) — same bare treatment as disconnect (no circle), same
   36px hit-area, gold hover like recover. */
body.app-account .dev-rename { width: 36px; height: 36px; }
body.app-account .dev-rename svg { width: 16px; height: 16px; }
body.app-account .dev-rename:hover { background-color: rgba(212, 168, 32, 0.12); color: var(--cta); }
/* SPEC-063 polish: nudge the trailing action button off the dev-list right
   edge — mirror of the .dev-icon left nudge. disconnect is rightmost on active
   rows, recover on disabled rows; the flex .dev-info absorbs it so the rest of
   the row stays put. */
body.app-account .dev-disconnect,
body.app-account .dev-recover { margin-right: 10px; }
body.app-account .dev-empty { font-size: 13px; color: var(--text-muted); padding: 4px 0; }
body.app-account .dev-disabled-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 4px;
  font-family: inherit;
}
.dev-disabled-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}
body.app-account .dev-disabled-caret {
  width: 16px; height: 16px;
  color: var(--text-muted);
  transition: transform .2s;
}
body.app-account .dev-disabled-head[aria-expanded="true"] .dev-disabled-caret { transform: rotate(180deg); }
body.app-account .dev-list-collapsed { display: none; }
/* Collapsed accordion → hide the whole card (connected + disabled lists), not
   just the inner list, so no empty padded card lingers. Mirrors the Mini App. */
body.app-account .dev-card:has(.dev-list-collapsed) { display: none; }
body.app-account .dev-item-disabled { opacity: 0.6; }

/* ── Друзья (Mini App Friends) ── */
body.app-account .friends-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
body.app-account .stat-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md);
  padding: 20px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
body.app-account .stat-card .stat-icon {
  width: auto; height: auto;
  background: none; border: none;
  color: var(--cta);
  margin-bottom: 6px;
}
body.app-account .stat-card .stat-icon svg { width: 18px; height: 18px; }
body.app-account .stat-card .stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--cta);
}
body.app-account .stat-card .stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}
.commission-card { margin-bottom: 16px; }
.commission-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cta);
  margin-bottom: 4px;
}
.commission-sub { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.share-promo-btn { margin-bottom: 16px; }
/* "Отправить промокод" CTA — adopt the Mini App Button (gold-gradient fill, ~56px,
   16px font) instead of the flat-gold 70px key-btn (owner: the Mini App version is
   better). Overrides .key-btn min-height + .key-btn-primary flat background. */
body.app-account .share-promo-btn {
  min-height: 56px;
  background: var(--gold-gradient);
  font-size: 16px;
}
body.app-account .promo-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-active);
  background: rgba(212, 168, 32, 0.04);
  cursor: pointer;
  transition: transform .15s;
}
body.app-account .promo-code-box:active { transform: scale(0.98); }
body.app-account .promo-code-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--cta);
  margin-bottom: 6px;
}
body.app-account .promo-code-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}
.promo-copy-icon { width: 22px; height: 22px; color: var(--cta); flex-shrink: 0; }
.promo-activate { margin-bottom: 16px; }
.promo-activate-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--cta);
  margin-bottom: 8px;
}
.promo-activate-row { display: flex; gap: 8px; }
.promo-activate-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.promo-activate-input:focus { border-color: var(--border-active); }
.promo-activate-input::placeholder { color: var(--text-muted); font-family: 'Inter', sans-serif; }
.promo-activate-btn { padding: 12px 20px; border-radius: var(--radius-sm); }
.promo-activate-msg {
  font-size: 12px;
  text-align: center;
  margin-top: 8px;
  color: var(--status-success);
}
.promo-activate-msg.error { color: var(--status-error); }
.withdraw-card { margin-bottom: 16px; }
.withdraw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.withdraw-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.withdraw-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.withdraw-soon {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
}
.withdraw-sub { font-size: 12px; color: var(--text-secondary); }
.withdraw-arrow { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.how-block { margin-top: 8px; }
.how-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
body.app-account .howstep {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 8px;
}
body.app-account .howstep .num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--cta-text);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
body.app-account .howstep .text { font-size: 14px; color: var(--text-secondary); }

/* ── Help section (mirrors Mini App Help) ── */
.help-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0 12px;
}
.faq-card { overflow: hidden; }  /* padding/height in "Row-button height standard" below */
.faq-card > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;            /* leading icon · text · caret — same rhythm as .doc-link */
  /* min-height in "Row-button height standard" (calc keeps the outer card == --block-h) */
  padding: 14px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.faq-card > summary::-webkit-details-marker { display: none; }
/* Leading icon — mirrors .doc-link svg:first-child (18px gold, stroke) */
.faq-card > summary .faq-lead { width: 18px; height: 18px; flex-shrink: 0; color: var(--cta); }
.faq-card > summary > span { flex: 1; min-width: 0; }   /* push the caret to the right edge */
.faq-card .faq-caret {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .2s, color .2s;
}
.faq-card[open] { border-left: 3px solid var(--cta); }
.faq-card[open] > summary .faq-caret { transform: rotate(180deg); color: var(--cta); }
.faq-card .faq-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin: 0 0;
}
.faq-card .faq-body p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.faq-card .faq-intro { margin-bottom: 12px; }
.faq-sub {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-sub > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--block-h-sm);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.faq-sub > summary::-webkit-details-marker { display: none; }
.faq-sub .faq-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cta);
  flex-shrink: 0;
}
.faq-sub .faq-sub-body { padding: 0 12px 12px; }
.faq-sub .faq-sub-body p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.faq-sub .faq-sub-body p:last-child { margin-bottom: 0; }
.faq-img {
  display: block;
  margin: 0 auto 10px;
  width: 100%;
  max-width: 200px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* #1081: карточка стала <button> (открывает выбор канала). Кнопка не наследует
   типографику и раскладку от родителя, поэтому дефолты браузера снимаются явно —
   иначе текст уезжает в центр и падает на системный шрифт. */
.support-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-top: 16px;
  cursor: pointer;
  transition: transform .15s;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.support-card:active { transform: scale(0.98); }
/* Leading icon — same treatment as .doc-link svg:first-child / .faq-lead
   (18px gold stroke, no tinted box) so all help-page rows share one style. */
.support-card .support-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--cta); }
.support-card .support-text { flex: 1; }
.support-card .support-title {
  font-size: 14px;        /* match the FAQ summary "Как подключить DoggoVPN" */
  font-weight: 600;
  color: var(--text-primary);
}
.support-card .support-sub {
  font-size: 12px;
  color: var(--text-secondary);
}
.support-card .support-arrow { width: 18px; height: 18px; color: var(--cta); flex-shrink: 0; }

/* ── Выбор канала поддержки (#1081) ──
   Строки повторяют раскладку самой карточки — иконка, текст, стрелка, — чтобы
   модалка читалась продолжением нажатой кнопки, а не отдельным экраном. */
.support-modal { display: flex; flex-direction: column; }
/* Крестик прижат к правому краю строки заголовка — раскладка `.trial-modal-head`. */
.support-modal .support-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.support-modal .support-modal-head .doggo-modal-title { margin: 0; }
.support-modal .support-modal-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 16px;
}
.support-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: transform .15s, border-color .15s;
}
.support-choice + .support-choice { margin-top: 10px; }
.support-choice:hover { border-color: var(--border-active); }
.support-choice:active { transform: scale(0.98); }
.support-choice-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--cta); }
.support-choice-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.support-choice-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
/* Адрес — не подпись-украшение, а то, что человек переписывает в телефон, когда
   переход по ссылке не сработал. Моноширинный, чтобы цифры не слипались. */
.support-choice-addr {
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}
.support-choice-arrow { width: 18px; height: 18px; flex-shrink: 0; color: var(--cta); }

.docs-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 16px 0 8px;
  padding: 0 4px;
}
.doc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: var(--block-h);
  padding: 14px 20px;
  margin-bottom: 8px;
}
.doc-link svg:first-child { width: 18px; height: 18px; color: var(--cta); flex-shrink: 0; }
.doc-link span {
  flex: 1;
  font-size: 14px;
  font-weight: 600;        /* match the FAQ summary "Как подключить DoggoVPN" */
  color: var(--text-primary);
}
.doc-link .doc-arrow { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

/* ── Settings section (mirrors Mini App Settings) ── */
.settings-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0 20px;
}
.settings-avatar-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  padding: 2px;
  background: var(--gold-gradient);
}
.settings-avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-page);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--cta);
}
.settings-avatar-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.settings-row-card { padding: 16px 20px; }
.settings-row { display: flex; align-items: center; gap: 12px; }
.settings-icon-box {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
}
.settings-icon-box svg { width: 18px; height: 18px; }
.settings-row-text { flex: 1; min-width: 0; }
.settings-row-label { font-size: 12px; color: var(--text-secondary); }
.settings-row-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-row-action {
  background: none; border: none; cursor: pointer;
  color: var(--cta);
  padding: 6px;
  flex-shrink: 0;
}
.settings-row-action svg { width: 16px; height: 16px; display: block; }
.settings-tg-linked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--status-success);
  flex-shrink: 0;
}
.settings-tg-linked svg { width: 14px; height: 14px; }
.settings-row-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--cta);
  text-decoration: none;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 0;
}
.settings-logout {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  color: var(--status-error);
}

/* Theme switch (Mini App Settings toggle: 56×32, knob 24) */
.theme-switch {
  position: relative;
  width: 56px; height: 32px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  background-color: var(--border-card);
  transition: background-color .3s;
  flex-shrink: 0;
  padding: 0;
}
.theme-switch.on { background-color: var(--cta); }
.theme-switch .theme-switch-knob {
  position: absolute;
  top: 4px; left: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transform: translateX(4px);
  transition: transform .3s, background-color .3s;
}
.theme-switch.on .theme-switch-knob {
  transform: translateX(28px);
  background: var(--cta-text);
}

/* ── Modals (legacy flows: payment / password / email) — themed surface ── */
body.app-account .doggo-modal-overlay {
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
body.app-account .doggo-modal-card {
  background: var(--bg-page);
  border: 1px solid var(--border-card);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
}
body.app-account .doggo-modal-title { font-family: inherit; color: var(--text-primary); }

/* ── Row-button height standard (главная + помощь) ─────────────────────
   .key-howto / .faq-card / .doc-link / .support-card render on the .acc-card
   surface but are clickable ROWS — they must sit at --block-h, not carry the
   .acc-card content padding (20px, and 24px at ≥1280). The override needs the
   `.x.acc-card` double-class (specificity 0,3,1) to beat
   `body.app-account .acc-card` (0,2,1) at EVERY width — a plain class (0,1,0)
   loses the cascade and the card balloons (70px row → 112/120px card). Retune
   in one place: --block-h. */
body.app-account .key-howto.acc-card,
body.app-account .faq-card.acc-card     { padding: 0; }
/* Disclosure cards: the height-bearing row (summary) sits INSIDE the card's
   1px top+bottom border, so subtract 2px → the outer card == --block-h, exactly
   matching the single-element buttons (whose border is inside their min-height). */
body.app-account .key-howto > summary,
body.app-account .faq-card > summary    { min-height: calc(var(--block-h) - 2px); }
body.app-account .doc-link.acc-card     { padding: 14px 20px; }   /* min-height on .doc-link */
/* 12px (vs 14 on single-line rows) — the support card carries 2 lines of text,
   so it needs slightly less padding to land on --block-h exactly. */
body.app-account .support-card.acc-card { min-height: var(--block-h); padding: 12px 20px; }

/* ── Home enrichment — ALL layouts ─────────────────────────────────────
   The home action rows carry richer content (leading icons, descriptions) so
   the wide buttons aren't empty. Applied on every layout; only the bits that
   don't fit a narrow status row — the days badge — is gated to ≥768 (see the
   matching min-width block below). The `.dt` class in the markup is now an
   inert marker (kept to document desktop-origin). */
#sec-home .sub-days { display: none; }        /* shown ≥768 */
#sec-home .sub-status .status-row { gap: 12px; }

/* Renew CTA — icon + label + description | price */
#sec-home .renew-cta {
  justify-content: space-between;
  gap: 14px;
  min-height: var(--block-h);
  padding: 0 20px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
#sec-home .renew-cta-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
#sec-home .renew-cta-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;   /* == .key-btn-icon, for icon alignment */
  border-radius: var(--radius-sm);
  background: rgba(212, 168, 32, 0.12);
  color: var(--cta);
}
#sec-home .renew-cta-icon svg { width: 22px; height: 22px; }
#sec-home .renew-cta-textblock { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
#sec-home .renew-cta-label { font-size: 15px; font-weight: 700; line-height: 1.2; }   /* == .key-btn-label */
#sec-home .renew-cta-desc { font-size: 12px; font-weight: 500; color: var(--text-muted); white-space: normal; line-height: 1.3; }   /* color == .key-btn-sub */
#sec-home .renew-cta-price { flex-shrink: 0; }
#sec-home .renew-cta:hover { transform: translateY(-2px); border-color: var(--border-active); box-shadow: var(--glass-shadow), 0 10px 28px rgba(212, 168, 32, 0.16); }

/* Key actions — rich buttons, stacked (2-up from ≥768) */
#sec-home .key-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
#sec-home .key-btn {
  min-height: var(--block-h);
  justify-content: flex-start;
  gap: 14px;
  padding: 0 20px;
  margin-bottom: 0;
  text-align: left;
  transition: transform .15s, box-shadow .15s;
}
#sec-home .key-btn:hover { transform: translateY(-2px); }
#sec-home .key-btn-icon { width: 40px; height: 40px; flex-shrink: 0; padding: 9px; border-radius: var(--radius-sm); box-sizing: border-box; }
#sec-home .key-btn-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
#sec-home .key-btn-label { font-size: 15px; font-weight: 700; line-height: 1.2; }
#sec-home .key-btn-sub { font-size: 12px; font-weight: 500; line-height: 1.3; }
#sec-home .key-btn-primary .key-btn-icon { background: rgba(10, 10, 10, 0.14); color: var(--cta-text); }
#sec-home .key-btn-primary .key-btn-sub { color: rgba(10, 10, 10, 0.62); }
#sec-home .key-btn-secondary .key-btn-icon { background: rgba(212, 168, 32, 0.12); color: var(--cta); }
#sec-home .key-btn-secondary .key-btn-sub { color: var(--text-muted); }

/* ══════════════════════════════════════════
   LAPTOP ≥768px — top tabs, wider container,
   header becomes a row (logo left / tabs center / controls right)
   ══════════════════════════════════════════ */
@media (min-width: 768px) {
  .app-header {
    justify-content: space-between;
    padding: 16px 24px 10px;
  }
  .app-header .app-controls { position: static; }
  .app-tabs { display: flex; }
  .app-bottomnav { display: none; }
  body.app-account main.account { padding: 12px 0 60px; }
  body.app-account main.account > .container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
  }
}

/* ══════════════════════════════════════════
   DESKTOP ≥1280px — wider container, roomier cards
   ══════════════════════════════════════════ */
@media (min-width: 1280px) {
  .app-header {
    max-width: 1140px;
    margin: 0 auto;
    width: 100%;
    padding: 20px 32px 12px;
  }
  body.app-account main.account > .container {
    max-width: 860px;
    padding: 0 32px;
  }
  body.app-account .acc-card { padding: 24px; margin-bottom: 16px; }
}

/* ══════════════════════════════════════════
   HOME enrichment — LAPTOP + DESKTOP (≥768): action buttons go 2-up, the
   days badge + howto hint appear (the status / summary rows have room here),
   and the renew / key cards get a touch roomier. Phones keep them stacked
   with the same rich content.
   ══════════════════════════════════════════ */
@media (min-width: 768px) {
  #sec-home .sub-days.is-on {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: rgba(20, 184, 166, 0.10);
    color: var(--status-success);
    white-space: nowrap;
    flex-shrink: 0;
  }
  #sec-home .sub-status.inactive .sub-days.is-on { background: rgba(225, 29, 72, 0.10); color: var(--status-error); }
  #sec-home .sub-status .status-row { gap: 14px; }

  #sec-home .renew-cta { min-height: var(--block-h); padding: 0 22px; }   /* == .key-btn padding, for icon alignment */
  #sec-home .renew-cta-main { gap: 14px; }   /* == .key-btn gap (icon→text) */
  #sec-home .renew-cta-textblock { gap: 3px; }
  #sec-home .renew-cta-label { font-size: 16px; }
  #sec-home .renew-cta-desc { font-size: 12.5px; }
  #sec-home .renew-cta-price { font-size: 17px; }

  #sec-home .key-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  #sec-home .key-btn { min-height: var(--block-h); padding: 0 22px; }
  #sec-home .key-btn-text { gap: 3px; }
  #sec-home .key-btn-label { font-size: 16px; }
  #sec-home .key-btn-sub { font-size: 12.5px; }
}

/* ══════════════════════════════════════════
   NARROW PHONES — fixes for very small viewports. Mobile-first base styles
   above are overridden here. Breakpoints are intentionally a touch wider
   than the exact failure widths so dates/labels of varying length stay safe.
   ══════════════════════════════════════════ */

/* <420px — the centered brand collides with the absolute control buttons
   (theme / settings / logout). Left-align the brand (it keeps --header-pad-x
   as its left offset); controls stay pinned right, so they no longer overlap. */
@media (max-width: 420px) {
  .app-header { justify-content: flex-start; }
}

/* ≤360px — "small phone" tier, two fixes:
   1. "Продлить подписку" + price stop fitting with the wide gap → shrink the
      gap (font, text and edge padding untouched); with nowrap on the label /
      price the button can no longer break to two lines.
   2. The long Russian date wraps the status title. The worst case
      ("30 сентября 2027 г.") needs ~360px, so swap to the compact numeric
      form ("09.06.2027") at this width — safe for any date, not just short
      ones like "9 июня". Common phones (375/390/414) keep the long form. */
@media (max-width: 360px) {
  :root { --renew-gap: 16px; }
  body.app-account .sub-status .sub-date-long  { display: none; }
  body.app-account .sub-status .sub-date-short { display: inline; }
}

/* ── SPEC-079 — metered traffic wallet card ────────────────────────────
   Mirrors the Mini App's WalletStatusBar: a teal-tinted panel that turns
   burgundy when the SERVER says the balance is low (never a client-derived
   threshold — the bar and the "докупите" push must not disagree). The card is
   `display:none` in the shell and only unhidden when the status payload carries
   a wallet, so a non-metered user — ~all of prod — never sees it. */
body.app-account .wallet-card {
  padding: 14px 16px;
  background: rgba(20, 184, 166, 0.06);
  border: 1.5px solid rgba(20, 184, 166, 0.25);
}
body.app-account .wallet-card[data-low="true"] {
  background: rgba(225, 29, 72, 0.06);
  border-color: rgba(225, 29, 72, 0.25);
}

body.app-account .wallet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
body.app-account .wallet-titles { min-width: 0; }
body.app-account .wallet-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--status-success);
  line-height: 1.2;
}
body.app-account .wallet-card[data-low="true"] .wallet-title { color: var(--status-error); }
/* Always present, healthy state included: it explains what the balance BUYS,
   so it is product copy, not a warning. */
body.app-account .wallet-subtitle {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-muted);
}
body.app-account .wallet-amount {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

body.app-account .wallet-card .wallet-progress {
  width: 100%; height: 6px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
body.app-account .wallet-card .wallet-progress .fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: var(--radius-pill);
  transition: width .5s ease-out;
}
body.app-account .wallet-card[data-low="true"] .wallet-progress .fill { background: var(--status-error); }

body.app-account .wallet-buckets {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.app-account .wallet-bucket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
body.app-account .wallet-bucket-label { color: var(--text-muted); }
body.app-account .wallet-bucket-timer { color: var(--text-secondary); }

body.app-account .wallet-note:empty { display: none; }
body.app-account .wallet-note-text {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--status-error);
}
body.app-account .wallet-actions:empty { display: none; }
body.app-account .wallet-actions { margin-top: 12px; }
body.app-account .wallet-buy-btn {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-border);
  background: var(--gold-light);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
body.app-account .wallet-buy-btn:hover {
  background: rgba(212, 168, 32, 0.18);
  border-color: var(--border-active);
}

/* ── buy-traffic modal ───────────────────────────────────────────────── */
.buy-traffic-modal .pay-tariff-btn.is-selected {
  border-color: var(--border-active);
  background: var(--gold-light);
}
.buy-traffic-modal .wallet-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  cursor: pointer;
}
.buy-traffic-modal .wallet-consent-box {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 1px;
  accent-color: var(--cta);
  cursor: pointer;
}
.buy-traffic-modal .wallet-consent-view { margin-top: 4px; }
.buy-traffic-modal .wallet-agreement {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.buy-traffic-modal .wallet-finalprint { margin-top: 10px; font-size: 11px; }
.buy-traffic-modal .wallet-pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
/* A disabled pay button is the CONSENT GATE made visible — it must read as
   unavailable, not merely unstyled. */
.buy-traffic-modal .pay-method-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
