:root {
  --bg: #0e1524;
  --panel: rgba(14, 20, 34, 0.52);
  --panel-2: rgba(22, 30, 48, 0.48);
  --text: #f4f7ff;
  --muted: #9aaed0;
  --line: rgba(255, 255, 255, 0.045);
  --line-glow: rgba(160, 210, 255, 0.18);
  --accent: #7ad0ff;
  --accent-dim: #4a9fd9;
  --accent-soft: rgba(110, 200, 255, 0.14);
  --accent-glow: rgba(110, 200, 255, 0.4);
  --violet-glow: rgba(167, 139, 250, 0.12);
  /* Акцент активного пункту лівого rail (десктоп) */
  --rail-accent: #e84887;
  --radius: 18px;
  --tap-min: 44px;
  --space-section: 20px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-glass: 0 12px 48px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-lift: 0 24px 64px rgba(0, 0, 0, 0.38);
  --blur-bar: blur(36px) saturate(155%);
  --blur-panel: blur(44px) saturate(160%);
  --blur-heavy: blur(56px) saturate(165%);
  --blur-modal: blur(64px) saturate(170%);
  --ease-spring: cubic-bezier(0.22, 1.1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  /* Фикс. нижняя навигация + safe area (компактный футер) */
  --app-bottom-inset: calc(40px + env(safe-area-inset-bottom, 0px));
  /* Типографическая шкала */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 15px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --lh-tight: 1.25;
  --lh-body: 1.45;
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html {
  scroll-padding-top: 88px;
  scroll-padding-bottom: var(--app-bottom-inset);
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  /* Края без «висячих» пятен: центры градиентов чуть внутри вьюпорта, не 0%/100% */
  background-image: radial-gradient(ellipse 110% 85% at 14% -12%, rgba(110, 200, 255, 0.09), transparent 50%),
    radial-gradient(ellipse 95% 72% at 86% -4%, rgba(167, 139, 250, 0.06), transparent 46%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(56, 189, 248, 0.035), transparent 55%),
    linear-gradient(168deg, #141f33 0%, #101a2c 48%, #0c1422 100%);
  background-attachment: fixed;
}

/* Мягкий «туман» за контентом — визуально размывает фон */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(ellipse 100% 80% at 50% 18%, rgba(56, 110, 160, 0.14), transparent 56%),
    radial-gradient(ellipse 80% 55% at 72% 58%, rgba(90, 70, 140, 0.08), transparent 52%);
  filter: blur(80px);
  opacity: 0.9;
}

.app::before {
  content: none;
}

.app {
  --app-pad-x: 18px;
  max-width: min(100%, 960px);
  margin: 0 auto;
  padding: 16px var(--app-pad-x) var(--app-bottom-inset);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow-x: clip;
}

/* Лёгкое зерно поверх сцены (отключается в perf-mode и при reduced-motion — см. ui-theme-modes.css) */
.app-grain-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.042;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  background: linear-gradient(145deg, rgba(22, 32, 52, 0.45), rgba(14, 18, 32, 0.42));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 14px 16px;
  box-shadow: var(--shadow-glass), 0 0 48px rgba(110, 200, 255, 0.06);
  backdrop-filter: var(--blur-bar);
  -webkit-backdrop-filter: var(--blur-bar);
  position: sticky;
  top: 10px;
  z-index: 10;
  animation: topbarReveal 0.85s var(--ease-out-expo) both;
}

.title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, #ffffff 0%, #b8d4ff 40%, #8ebfff 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(110, 200, 255, 0.3));
  animation: titleShimmer 5s ease-in-out infinite;
}

@supports not (background-clip: text) {
  .title {
    color: var(--text);
    background: none;
    filter: none;
  }
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 16px;
  min-height: var(--tap-min);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s var(--ease-spring), border-color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}

.ghost-btn:hover {
  border-color: var(--line-glow);
  background: rgba(110, 200, 255, 0.12);
  box-shadow: 0 0 32px rgba(110, 200, 255, 0.18);
}

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

.view {
  display: block;
}

.view:not(.hidden) {
  animation: viewDramaticIn 0.38s var(--ease-out-expo) both;
}

.hidden {
  display: none !important;
}

.summary-card {
  background: linear-gradient(155deg, rgba(22, 30, 48, 0.42), rgba(12, 16, 28, 0.4));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 20px 20px 18px;
  margin-bottom: var(--space-section);
  box-shadow: var(--shadow-glass);
  backdrop-filter: var(--blur-panel);
  -webkit-backdrop-filter: var(--blur-panel);
  position: relative;
  overflow: hidden;
}

.summary-card:not(.dashboard-balance-card) {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.summary-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.06), transparent 42%, rgba(110, 200, 255, 0.03));
  pointer-events: none;
}

.dashboard-balance-card {
  border-color: rgba(110, 200, 255, 0.1);
  box-shadow: var(--shadow-lift), 0 0 80px rgba(110, 200, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: balanceCardFloat 7s ease-in-out infinite, balanceGlowPulse 3.5s ease-in-out infinite;
}

.dashboard-balance-card .label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.total-balance {
  margin: 8px 0 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 48px rgba(110, 200, 255, 0.28), 0 2px 24px rgba(0, 0, 0, 0.35);
}

.dashboard-balance-card .total-balance {
  animation: balanceDigitsPulse 2.8s ease-in-out infinite;
}

.total-balance .roll-digits {
  background: linear-gradient(180deg, #ffffff 0%, #c5e0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (background-clip: text) {
  .total-balance .roll-digits {
    color: var(--text);
    background: none;
  }
}

.limits-chain-hint {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  margin: 2px 0 12px;
  opacity: 0.88;
}

.dev-credit {
  margin: 0;
  padding: 0 10px 6px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.04em;
  opacity: 0.38;
}

.dev-credit a {
  color: var(--muted);
  text-decoration: none;
}

.dev-credit a:hover {
  opacity: 1;
}

.card-item.card-item--born {
  animation: cardBornPulse 0.92s var(--ease-spring) both;
  box-shadow: 0 0 0 1px rgba(110, 200, 255, 0.28), 0 8px 32px rgba(110, 200, 255, 0.08);
}

.card-item.card-item--closing {
  animation: cardCloseOut 0.48s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes cardBornPulse {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    filter: blur(4px);
  }
  40% {
    opacity: 1;
    transform: translateY(0) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes cardCloseOut {
  to {
    opacity: 0;
    transform: translateX(-14px) scale(0.94);
    filter: blur(3px);
  }
}

.card-item {
  border-top: 1px solid var(--line);
  padding: 6px 0;
  animation: itemSpringIn 0.55s var(--ease-spring) both;
  transition: background-color 0.35s ease, transform 0.4s var(--ease-spring);
}

.card-item:first-child {
  border-top: 0;
}

.card-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Avoid layout shift / scroll jitter on hover (translate was shifting the row). */

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--tap-min);
  padding: 8px 2px 8px 0;
  margin: 0 -4px;
  padding-left: 4px;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card-head-body {
  flex: 1;
  min-width: 0;
}

.card-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Узкий экран: тело карты + звезда в первой строке, PAN/CVV/EXP — отдельной строкой на всю ширину */
@media (max-width: 560px) {
  .card-head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 10px;
    row-gap: 10px;
  }

  .card-head-body {
    order: 2;
    flex: 1 1 0;
    min-width: 0;
  }

  .card-head-actions {
    order: 3;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
  }

  .card-head-tools {
    order: 10;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-content: flex-start;
    padding: 10px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    gap: 8px;
  }

  .card-main {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  #cardView > section.list:last-of-type {
    padding-bottom: 8px;
  }
}

.card-item.card-item--locked {
  border-color: rgba(255, 170, 90, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 160, 80, 0.06);
}

.fav-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  margin: -6px 0;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  font-size: 18px;
  color: var(--muted);
  border-radius: 12px;
  transition: color 0.2s ease, transform 0.25s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

.fav-toggle:active {
  transform: scale(0.92);
}

.card-main {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #eef3ff;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.card-main-sep {
  opacity: 0.4;
  user-select: none;
  font-weight: 500;
}

.card-brand-mark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 2.75rem;
  min-height: 22px;
  vertical-align: middle;
}

.card-brand-img {
  display: block;
  height: 22px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.card-brand-img--sm {
  height: 15px;
  max-width: 40px;
}

.card-brand-fallback {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  padding-left: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.card-meta-row {
  display: inline;
}

@media (min-width: 561px) {
  /* Одна строка: имя сжимается с «…», exp / лимиты не уезжают за экран. */
  .card-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0 4px;
    min-width: 0;
  }

  .card-meta-row {
    display: block;
    min-width: 0;
  }

  .card-meta-row--lead {
    flex: 0 1 auto;
    max-width: 220px;
    min-width: 0;
  }

  .card-meta-row--exp,
  .card-meta-row--limits {
    flex: 0 0 auto;
  }

  .card-meta-row--exp::before,
  .card-meta-row--limits::before {
    content: " · ";
    font-weight: 500;
    color: rgba(154, 174, 208, 0.55);
  }
}

@media (max-width: 560px) {
  .card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .card-meta-row {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .card-meta-row--limits {
    font-size: 10px;
    line-height: 1.4;
  }
}

/* Status pill + card name: flex gap so “Closed” never runs into the label. */
.card-meta-lead {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px 8px;
  min-width: 0;
  max-width: 100%;
  width: auto;
}

.card-meta-lead .card-status-pill {
  margin-right: 0;
  flex-shrink: 0;
}

.card-meta-lead .card-label-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta-lead .label-inline-input {
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
}

.card-rename-hit {
  cursor: pointer;
}

.card-meta-limits {
  font-variant-numeric: tabular-nums;
  white-space: normal;
}

.card-limit-total {
  color: rgba(244, 247, 255, 0.98);
  font-weight: 600;
}

.card-limit-spent {
  color: rgba(255, 120, 130, 0.96);
  font-weight: 600;
}

.card-limit-left {
  color: rgba(115, 220, 165, 0.96);
  font-weight: 600;
}

.card-limit-sep {
  color: rgba(154, 174, 208, 0.55);
  font-weight: 500;
  margin: 0;
}

.card-limit-cur {
  color: rgba(154, 174, 208, 0.8);
  font-weight: 500;
  font-size: 11px;
}

button.card-quick-copy {
  margin: 0;
  padding: 6px 11px;
  min-width: 64px;
  min-height: 32px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(200, 220, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(110, 200, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

button.card-quick-copy:hover {
  background: rgba(110, 200, 255, 0.1);
  border-color: rgba(110, 200, 255, 0.32);
}

button.card-quick-copy:active {
  transform: scale(0.96);
}

.chevron {
  color: var(--muted);
  font-size: 17px;
  display: inline-grid;
  place-items: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  margin: -8px -6px -8px 0;
  transition: transform 0.45s var(--ease-spring), color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.card-item.is-open .chevron {
  transform: rotate(90deg) scale(1.15);
  color: rgba(180, 230, 255, 0.95);
}

.dropdown {
  margin-top: 14px;
  border: 1px solid rgba(110, 200, 255, 0.08);
  border-radius: 16px;
  background: rgba(8, 12, 22, 0.35);
  padding: 16px;
  animation: dropdownBloom 0.5s var(--ease-spring) both;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.dropdown .row-inline {
  flex-wrap: wrap;
}

.dropdown .peek-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dropdown .peek-row.peek-row--tools {
  flex-wrap: nowrap;
}

.card-status-pill {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.card-status-pill--locked {
  color: rgba(255, 210, 160, 0.95);
  background: rgba(255, 160, 60, 0.14);
  border: 1px solid rgba(255, 180, 100, 0.28);
}

.card-status-pill--closed {
  color: rgba(200, 210, 230, 0.85);
  background: rgba(120, 130, 160, 0.16);
  border: 1px solid rgba(150, 160, 190, 0.22);
}

.card-status-pill--wait {
  color: rgba(180, 220, 255, 0.9);
  background: rgba(100, 180, 255, 0.12);
  border: 1px solid rgba(120, 200, 255, 0.22);
}

.card-blocked-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(255, 235, 210, 0.98);
  background: rgba(40, 22, 8, 0.55);
  border: 1px solid rgba(255, 190, 120, 0.35);
}

.card-blocked-banner strong {
  color: #fff;
  font-weight: 700;
}

.card-blocked-banner--closed {
  color: rgba(255, 248, 240, 0.98);
  background: rgba(55, 32, 14, 0.58);
  border-color: rgba(255, 200, 130, 0.4);
}

.dropdown .hide-card-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.dropdown-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.dropdown-footer .primary-btn,
.dropdown-footer .mini-btn {
  width: 100%;
}

.dropdown-footer + .card-tx-block {
  margin-top: 16px;
}

.row-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  min-height: var(--tap-min);
  border-top: 1px solid var(--line);
}

.row-inline .subtle {
  margin: 0;
}

.row-inline:first-child {
  border-top: 0;
}

/* Home Overview: те же шрифт и вес, что у остального текста приложения (не .mono). */
.overview-stat-val {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 40px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease, background-color 0.2s ease;
}

.mini-btn:hover {
  border-color: var(--line-glow);
  background: rgba(110, 200, 255, 0.1);
}

.mini-btn:active {
  transform: scale(0.97);
}

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

.limit-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.limit-input {
  background: rgba(29, 35, 48, 0.55);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 40px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.limit-input:focus {
  outline: none;
  border-color: rgba(110, 200, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(110, 200, 255, 0.12);
}

.ghost-btn:focus-visible,
.mini-btn:focus-visible,
.primary-btn:focus-visible,
.bottom-nav-btn:focus-visible,
.qa-tile:focus-visible,
.fav-toggle:focus-visible,
.sc-option:focus-visible,
.currency-pill:focus-visible,
.peek-btn:focus-visible,
.filter-pill:focus-visible,
.theme-segment-btn:focus-visible,
.empty-illu__cta:focus-visible {
  outline: 2px solid rgba(122, 208, 255, 0.95);
  outline-offset: 2px;
}

.list {
  background: linear-gradient(165deg, rgba(18, 26, 42, 0.4), rgba(10, 14, 24, 0.38));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 20px;
  margin-bottom: var(--space-section);
  box-shadow: var(--shadow-glass);
  backdrop-filter: var(--blur-panel);
  -webkit-backdrop-filter: var(--blur-panel);
  position: relative;
  animation: listSoftIn 0.75s var(--ease-out-expo) both;
}

.list::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 225, 255, 0.22), transparent);
  opacity: 0.55;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.list-head .subtle {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.tx-list-head-start {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.tx-list-head-start h2 {
  margin: 0;
  min-width: 0;
}

.tx-head-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tx-kind-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tx-kind-switch .filter-pill {
  min-height: 34px;
  padding: 6px 10px;
}

.tx-back-to-card {
  flex-shrink: 1;
  max-width: min(200px, 46vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .list-head.tx-list-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px 8px;
  }

  .tx-list-head-start {
    flex: 1 1 100%;
    min-width: 0;
    align-items: center;
  }

  .tx-list-head-start h2 {
    font-size: 22px;
    line-height: 1.1;
  }

  .tx-back-to-card {
    max-width: min(52vw, 190px);
    font-size: 13px;
  }

  .tx-head-controls {
    flex: 1 1 100%;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .tx-kind-switch {
    min-width: 0;
    flex-wrap: nowrap;
  }
}

.tx-card-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(110, 200, 255, 0.08);
  border: 1px solid rgba(110, 200, 255, 0.16);
}

.tx-spend-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.tx-spend-stats--reveal {
  animation: txSpendStatsReveal 0.28s var(--ease-out-expo);
}

@keyframes txSpendStatsReveal {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tx-spend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-glow, rgba(160, 210, 255, 0.18));
  background: var(--panel-2, rgba(22, 30, 48, 0.48));
}

.tx-spend-chip .subtle {
  color: var(--muted, #9aaed0);
  font-size: 12px;
  white-space: nowrap;
}

.tx-spend-chip strong {
  color: var(--text, #f4f7ff);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tx-card-filter-bar__text {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  min-width: 0;
  flex: 1;
}

.tx-card-filter-bar__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.pagination .ghost-btn {
  flex: 1;
  max-width: 160px;
  justify-content: center;
}

.pagination .subtle {
  margin: 0;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(200, 215, 245, 0.85);
}

#txPagination {
  margin-top: 0;
}

#txView #txList {
  /* Воздух под шапкой (чипы Cards/Project) и контентом — и на ПК, и на телефоне */
  margin-top: clamp(12px, 2.8vw, 22px);
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow-x: clip) {
  #txView #txList {
    overflow-x: clip;
  }
}

#txView .tx-activity-list {
  margin-bottom: 0;
}

#txView .tx-activity-item:last-child .tx-row {
  padding-bottom: 0;
}

#txView .list {
  margin-bottom: 0;
  padding-bottom: 10px;
}

#txView .pagination {
  margin-bottom: 8px;
}

#cardView .pagination {
  margin-bottom: 8px;
}

#cardView > section.list:last-of-type {
  margin-bottom: 0;
  padding-bottom: 10px;
}

.inline-link {
  color: #9ecfff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 2px;
  margin: -6px -2px;
  border-radius: 8px;
  border-bottom: 1px dashed transparent;
  transition: border-color 180ms ease, color 180ms ease, background-color 0.2s ease;
}

.inline-link:hover {
  color: #d4ebff;
  border-bottom-color: rgba(110, 200, 255, 0.45);
  background: rgba(110, 200, 255, 0.08);
}

.list h2 {
  margin: 0 0 14px;
  font-size: var(--fs-md);
  font-weight: 700;
  color: #f2f6ff;
  letter-spacing: 0.03em;
  line-height: var(--lh-tight);
}

.subtle {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: var(--fs-sm);
  letter-spacing: 0.25px;
  line-height: var(--lh-body);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(110, 200, 255, 0.28);
  background: linear-gradient(165deg, rgba(70, 140, 210, 0.45), rgba(40, 90, 160, 0.5));
  color: var(--text);
  border-radius: 14px;
  padding: 12px 20px;
  min-height: 48px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.4s var(--ease-spring), border-color 0.35s ease, filter 0.35s ease, box-shadow 0.4s ease;
}

.primary-btn:hover {
  border-color: rgba(180, 230, 255, 0.55);
  filter: brightness(1.12);
  box-shadow: 0 12px 40px rgba(110, 200, 255, 0.28), 0 0 32px rgba(110, 200, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.primary-btn:active {
  transform: scale(0.97);
}

.code-item {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  animation: itemSpringIn 0.55s var(--ease-spring) both;
  transition: transform 0.35s var(--ease-spring);
}

.code-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.code-item.code-item--blocked {
  border-top-color: rgba(248, 113, 113, 0.32);
}

@media (hover: hover) and (pointer: fine) {
  .code-item:hover {
    transform: translateX(3px);
  }
}

.code-item:first-child {
  border-top: 0;
}

.code-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.merchant {
  margin: 0;
  font-weight: 600;
}

.amount {
  margin: 0;
}

.meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.code-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.state-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.state-card.error {
  border-color: #573030;
}

.state-card h2 {
  margin: 0 0 8px;
}

.state-card p {
  margin: 0;
  color: var(--muted);
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, #212736 20%, #2a3245 38%, #212736 56%);
  background-size: 220% 100%;
  animation: shimmer 1.15s ease-in-out infinite;
  margin-bottom: 10px;
}

.skeleton.row {
  height: 52px;
}

.skeleton-stack {
  margin-bottom: 14px;
}

.skeleton-summary {
  height: 88px;
  margin-bottom: 14px;
}

.skeleton-list .skeleton-row {
  height: 48px;
  margin-bottom: 8px;
}

.tab-skeleton {
  pointer-events: none;
}

.peek-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* Ряд з кнопкою Show/Copy: не переносити кнопку (PAN довгий на вузькому екрані) */
.peek-row.peek-row--tools {
  flex-wrap: nowrap;
}

.peek-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(29, 35, 48, 0.55);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 140ms ease, background-color 140ms ease, transform 120ms ease;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.peek-btn:hover {
  border-color: rgba(173, 196, 245, 0.35);
}

.peek-btn:active {
  transform: scale(0.96);
}

.peek-btn .eye-icon {
  font-size: 15px;
  line-height: 1;
  opacity: 0.9;
}

.sensitive-fade {
  animation: sensitiveReveal 240ms ease both;
}

@keyframes sensitiveReveal {
  from {
    opacity: 0.35;
    filter: blur(2px);
  }
  to {
    opacity: 1;
    filter: none;
  }
}

.decrypt-loader {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  color: var(--muted);
  font-size: 13px;
}

.decrypt-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(173, 196, 245, 0.25);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ——— Синхронизация (поверх контента) ——— */
.sync-progress-host {
  position: relative;
  z-index: 50;
  height: 3px;
  margin: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  transition: opacity 0.35s ease;
}

.sync-progress-host.hidden {
  display: none;
}

.sync-progress-indeterminate {
  height: 100%;
  width: 45%;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(110, 200, 255, 0.35),
    var(--accent),
    rgba(110, 200, 255, 0.35),
    transparent
  );
  background-size: 200% 100%;
  animation: syncBarSlide 1.1s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(110, 200, 255, 0.45);
}

@keyframes syncBarSlide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(320%);
  }
}

html.app-is-syncing .topbar {
  box-shadow: 0 0 0 1px rgba(110, 200, 255, 0.12);
}

/* Первый запуск */
.app-boot-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(78vh, 620px);
  padding: 28px 16px 56px;
  position: relative;
}

#loadingView[data-boot-phase="session"] .app-boot-loader__rows,
#loadingView[data-boot-phase="session"] .app-boot-loader__mini {
  display: none;
}

#loadingView[data-boot-phase="session"] .app-boot-loader__glow {
  animation-duration: 3.6s;
  opacity: 0.85;
}

#loadingView[data-boot-phase="session"] .app-boot-loader__orbit {
  animation-duration: 3.2s;
}

.app-boot-loader__glow {
  position: absolute;
  inset: 10% 15% auto;
  height: 180px;
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(110, 200, 255, 0.22), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  animation: bootGlowPulse 2.8s ease-in-out infinite;
}

@keyframes bootGlowPulse {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.app-boot-loader__inner {
  position: relative;
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding: 28px 24px 32px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-glass);
  border: 1px solid var(--line);
  backdrop-filter: var(--blur-panel);
  -webkit-backdrop-filter: var(--blur-panel);
}

.app-boot-loader__orbit {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  animation: bootOrbitSpin 2.4s linear infinite;
}

@keyframes bootOrbitSpin {
  to {
    transform: rotate(360deg);
  }
}

.app-boot-loader__orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(110, 200, 255, 0.7);
  opacity: 0.95;
}

.app-boot-loader__orbit-dot:nth-child(1) {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  animation: bootDotPulse 1.2s ease-in-out infinite;
}

.app-boot-loader__orbit-dot:nth-child(2) {
  bottom: 4px;
  left: 4px;
  animation: bootDotPulse 1.2s ease-in-out 0.2s infinite;
}

.app-boot-loader__orbit-dot:nth-child(3) {
  bottom: 4px;
  right: 4px;
  animation: bootDotPulse 1.2s ease-in-out 0.4s infinite;
}

@keyframes bootDotPulse {
  0%,
  100% {
    opacity: 0.55;
    filter: brightness(0.95);
  }
  50% {
    opacity: 1;
    filter: brightness(1.2);
  }
}

.app-boot-loader__brand {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, #e8f4ff, var(--accent), #c8e8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-boot-loader__status {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: rgba(180, 200, 230, 0.92);
  min-height: 1.35em;
  transition: opacity 0.2s ease;
}

.app-boot-loader__track {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 16px;
}

.app-boot-loader__bar {
  height: 100%;
  width: 35%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  animation: bootBarMarquee 1.4s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(110, 200, 255, 0.4);
}

@keyframes bootBarMarquee {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(320%);
  }
}

.card-loading-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(154, 174, 208, 0.75);
}

.card-loading-hint__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: hintDot 1.1s ease-in-out infinite;
}

.card-loading-hint__dot:nth-child(2) {
  animation-delay: 0.15s;
}

.card-loading-hint__dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes hintDot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.tab-loading-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: rgba(190, 210, 240, 0.88);
}

.tab-loading-hint__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(110, 200, 255, 0.45);
  animation: tabPulse 1.1s ease-out infinite;
}

@keyframes tabPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(110, 200, 255, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(110, 200, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(110, 200, 255, 0);
  }
}

.dropdown--loading {
  min-height: 120px;
}

.decrypt-loader--rich {
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 14px;
  border-radius: 12px;
  background: rgba(110, 200, 255, 0.06);
  border: 1px solid rgba(110, 200, 255, 0.12);
}

.decrypt-loader__visual {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.decrypt-spinner--lg {
  width: 28px;
  height: 28px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -14px 0 0 -14px;
  border-width: 3px;
}

.decrypt-loader__rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.decrypt-loader__ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(110, 200, 255, 0.2);
  border-radius: 50%;
  animation: decryptRing 1.6s ease-out infinite;
}

.decrypt-loader__ring:nth-child(2) {
  animation-delay: 0.35s;
  border-color: rgba(110, 200, 255, 0.08);
}

@keyframes decryptRing {
  0% {
    transform: scale(0.65);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.decrypt-loader__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  min-width: 0;
}

.decrypt-loader__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.decrypt-loader__sub {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.decrypt-loader__ellipsis {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
  animation: ellipsisBlink 1.1s ease-in-out infinite;
}

@keyframes ellipsisBlink {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-boot-loader__orbit,
  .app-boot-loader__bar,
  .app-boot-loader__glow,
  .sync-progress-indeterminate,
  .decrypt-loader__ring,
  .decrypt-loader__ellipsis,
  .tab-loading-hint__pulse,
  .card-loading-hint__dot,
  .decrypt-spinner,
  .app-boot-loader__orbit-dot,
  .plan-picker-skeleton__text,
  .plan-picker-skeleton__row {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.nav-with-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-label {
  pointer-events: none;
}

.nav-badge {
  position: absolute;
  top: 1px;
  right: 8%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 0 2px rgba(17, 23, 35, 0.9);
  animation: badgePop 280ms ease both;
}

.nav-badge.hidden {
  display: none;
}

@keyframes badgePop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.code-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.code-ttl {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  position: relative;
}

.code-ttl svg {
  width: 40px;
  height: 40px;
  transform: rotate(-90deg);
}

.code-ttl .ttl-track {
  fill: none;
  stroke: rgba(173, 196, 245, 0.12);
  stroke-width: 3;
}

.code-ttl .ttl-bar {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  transition: none;
}

.ttl-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}

.wizard-card {
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: hidden;
  min-width: 0;
}

/* Confirm step: long card names must wrap (global .kv-val is nowrap + shrink 0) */
.wizard-card .kv-row {
  align-items: flex-start;
}
.wizard-card .kv-key {
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(200px, 46%);
  font-size: 12px;
}
.wizard-card .kv-dots {
  flex: 1 1 0;
  min-width: 10px;
}
.wizard-card .kv-val {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: right;
}

.wizard-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.wizard-dot {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(173, 196, 245, 0.15);
  transition: background 200ms ease;
}

.wizard-dot.active {
  background: linear-gradient(90deg, var(--accent), #a5d8ff);
  box-shadow: 0 0 12px rgba(110, 200, 255, 0.35);
}

.wizard-pane.hidden {
  display: none !important;
}

.wizard-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.currency-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.currency-option {
  cursor: pointer;
}

.currency-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.currency-card {
  display: block;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(29, 35, 48, 0.45);
  font-weight: 600;
  transition: border-color 160ms ease, background 160ms ease;
}

.currency-option input:checked + .currency-card {
  border-color: rgba(110, 200, 255, 0.45);
  background: rgba(110, 200, 255, 0.12);
  box-shadow: 0 0 24px rgba(110, 200, 255, 0.08);
}

.currency-card small {
  display: block;
  margin-top: 6px;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.limit-slider {
  width: 100%;
  margin-top: 6px;
  accent-color: var(--accent);
}

.slider-meta {
  margin-top: 4px;
  font-size: 13px;
}

.wiz-summary {
  line-height: 1.5;
  font-size: 13px;
  color: var(--text);
}

.fee-line {
  margin: 0;
}

.wizard-hint {
  margin-bottom: 8px !important;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: stretch;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.wizard-actions .mini-btn,
.wizard-actions .primary-btn {
  flex: 1 1 auto;
  min-width: min(100%, 140px);
}

.wizard-close {
  align-self: center;
  margin-top: 4px;
  font-size: 12px;
}

.batch-card textarea.batch-textarea {
  width: 100%;
  margin-top: 8px;
  background: rgba(29, 35, 48, 0.55);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  resize: vertical;
  min-height: 120px;
}

.batch-validation.ok {
  color: #8fd18f;
}

.batch-validation.err {
  color: #e88a8a;
}

.inline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #c8d6ff;
}

.feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(6, 9, 14, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
}

.feedback-overlay.hidden {
  display: none !important;
}

.confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.feedback-card {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: linear-gradient(165deg, rgba(22, 30, 48, 0.98), rgba(10, 14, 24, 0.96));
  border: 1px solid rgba(110, 200, 255, 0.14);
  border-radius: calc(var(--radius) + 2px);
  padding: 22px;
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  text-align: center;
  overflow-x: hidden;
}

.feedback-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.feedback-body {
  margin: 0 0 16px !important;
  text-align: left;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.feedback-card.error .feedback-title {
  color: #ffb3b3;
}

.predictor-block .row-inline {
  border-color: rgba(173, 196, 245, 0.12);
}

.access-denied-card h2 {
  color: #ffb3b3;
}

.issue-actions {
  margin-bottom: 10px;
}

.issue-actions .primary-btn {
  width: 100%;
}

/* Balance card: make Top up look like a polished secondary CTA */
#clientTopupCtaBtn {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(122, 208, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 250, 255, 0.66)) padding-box,
    linear-gradient(145deg, rgba(122, 208, 255, 0.42), rgba(113, 135, 255, 0.28)) border-box;
  color: #2a3b56;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 20px rgba(69, 109, 162, 0.16);
  transition:
    transform 0.3s var(--ease-spring),
    border-color 0.25s ease,
    box-shadow 0.28s ease,
    color 0.2s ease;
}

#clientTopupCtaBtn:hover {
  color: #1e2f49;
  border-color: rgba(122, 208, 255, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 28px rgba(69, 109, 162, 0.22),
    0 0 22px rgba(122, 208, 255, 0.2);
  transform: translateY(-1px);
}

#clientTopupCtaBtn:active {
  transform: scale(0.985);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: rgba(12, 18, 32, 0.92);
  border: 1px solid rgba(110, 200, 255, 0.2);
  color: #eef4ff;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  z-index: 30;
  max-width: min(420px, calc(100% - 28px));
  text-align: center;
  animation: toastIn 200ms ease both;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 2px 6px calc(2px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(10, 14, 24, 0.55) 0%, rgba(6, 8, 14, 0.72) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 20;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45), 0 -1px 0 rgba(110, 200, 255, 0.05);
  backdrop-filter: var(--blur-bar);
  -webkit-backdrop-filter: var(--blur-bar);
}

/* Левый rail (≥900px): шапка (email), низ (лого слева, выход справа) — на мобилке скрыто */
.bottom-nav-rail-top,
.bottom-nav-rail-bottom {
  display: none;
}

.rail-brand {
  display: none;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 10px;
}

.rail-brand--rail-bottom {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 4px;
  border-radius: 12px;
  opacity: 0.95;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.rail-brand--rail-bottom:hover {
  background: rgba(255, 255, 255, 0.07);
  opacity: 1;
}

.rail-brand-logo--rail-bottom {
  display: block;
  width: 40px;
  height: 40px;
  max-width: 100%;
  object-fit: contain;
}

.rail-brand-logo {
  display: block;
  width: 36px;
  height: 36px;
  max-width: 100%;
  object-fit: contain;
  border: none;
  outline: none;
  box-shadow: none;
}

.rail-brand:focus-visible {
  outline: 2px solid rgba(122, 208, 255, 0.95);
  outline-offset: 3px;
}

.rail-signout:focus-visible {
  outline: 2px solid rgba(122, 208, 255, 0.95);
  outline-offset: 2px;
}

.rail-user-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  width: 100%;
  text-align: left;
}

.rail-user-caption {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rail-user-email {
  margin: 0;
  padding: 0 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  word-break: break-all;
}

.rail-signout {
  display: none;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background 0.2s ease;
}

.rail-signout--rail-bottom {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: min(132px, 52%);
  margin: 0;
  padding: 8px 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: normal;
}

.rail-signout:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.admin-jump {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.slim-input {
  width: 72px;
}

.slim-select {
  width: 86px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-actions .mini-btn,
.admin-actions .primary-btn {
  flex: 1 1 auto;
  min-width: min(100%, 140px);
}

.admin-block {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

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

.user-select {
  width: 180px;
}

.admin-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.admin-card-row:first-child {
  border-top: 0;
}

.admin-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.admin-transfer-select {
  width: 120px;
}

.bottom-nav-btn {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 3px 2px;
  min-height: 32px;
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.4s var(--ease-spring), border-color 0.35s ease, background-color 0.35s ease, color 0.35s ease,
    box-shadow 0.45s ease;
}

.bottom-nav-btn:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.bottom-nav-btn:active {
  transform: scale(0.94);
}

.bottom-nav-btn.active {
  border-color: rgba(110, 200, 255, 0.45);
  color: #ffffff;
  background: linear-gradient(165deg, rgba(110, 200, 255, 0.26), rgba(110, 200, 255, 0.08));
  box-shadow: 0 0 32px rgba(110, 200, 255, 0.22), 0 0 48px rgba(110, 200, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: navTabGlow 2.2s ease-in-out infinite;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.62);
  backdrop-filter: var(--blur-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 16px;
  animation: modalBackdropIn 0.45s var(--ease-out-expo) both;
}

.modal-card {
  width: min(420px, 100%);
  background: linear-gradient(165deg, rgba(20, 28, 44, 0.72), rgba(10, 14, 24, 0.68));
  border: 1px solid rgba(110, 200, 255, 0.1);
  border-radius: calc(var(--radius) + 2px);
  padding: 18px;
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: var(--blur-modal);
  -webkit-backdrop-filter: var(--blur-modal);
  animation: modalCardPop 0.55s var(--ease-spring) both;
}

.modal-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes itemIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  to {
    background-position-x: -220%;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes topbarReveal {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.98);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes titleShimmer {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

@keyframes viewDramaticIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes itemSpringIn {
  from {
    opacity: 0;
    transform: translateX(-18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

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

@keyframes qaTileIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes planRowIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes balanceCardFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes balanceGlowPulse {
  0%,
  100% {
    box-shadow: var(--shadow-lift), 0 0 80px rgba(110, 200, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  50% {
    box-shadow: var(--shadow-lift), 0 0 110px rgba(110, 200, 255, 0.32), 0 0 72px rgba(167, 139, 250, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.09);
  }
}

@keyframes balanceDigitsPulse {
  0%,
  100% {
    filter: brightness(1);
    text-shadow: 0 0 48px rgba(110, 200, 255, 0.28), 0 2px 24px rgba(0, 0, 0, 0.35);
  }
  50% {
    filter: brightness(1.18);
    text-shadow: 0 0 72px rgba(110, 200, 255, 0.48), 0 2px 24px rgba(0, 0, 0, 0.35);
  }
}

@keyframes dropdownBloom {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    filter: blur(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes listSoftIn {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes navTabGlow {
  0%,
  100% {
    box-shadow: 0 0 32px rgba(110, 200, 255, 0.22), 0 0 48px rgba(110, 200, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  50% {
    box-shadow: 0 0 44px rgba(110, 200, 255, 0.38), 0 0 64px rgba(110, 200, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
}

@keyframes modalBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalCardPop {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(24px);
    filter: blur(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.read-only-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(250, 204, 120, 0.22);
  background: linear-gradient(135deg, rgba(55, 42, 22, 0.42), rgba(30, 24, 14, 0.48));
  color: #f5e6c8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.dashboard-balance-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.dashboard-balance-head .currency-switch {
  margin-left: auto;
  flex-shrink: 0;
}

.dashboard-balance-head .label {
  margin: 0;
}

.currency-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  gap: 2px;
}

.currency-pill {
  padding: 10px 18px;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.currency-pill.active {
  background: linear-gradient(145deg, rgba(62, 176, 255, 0.72), rgba(30, 140, 235, 0.55));
  color: #ffffff;
  box-shadow: 0 0 22px rgba(62, 176, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.roll-balance .roll-digits {
  display: inline-block;
  transition: transform 200ms ease, opacity 200ms ease;
}

.dashboard-h2 {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  color: #e8eeff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-quick {
  margin-bottom: 0;
}

/* Main dashboard: одна визуальная колонка — баланс, план, quick actions */
#mainView {
  --dash-inline: 20px;
}

#mainView > .summary-card.dashboard-balance-card,
#mainView > section#planPickerSection.list.dashboard-plans,
#mainView > section.list.dashboard-quick {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#mainView > .summary-card.dashboard-balance-card {
  padding-left: var(--dash-inline);
  padding-right: var(--dash-inline);
}

#mainView > section#planPickerSection.list.dashboard-plans,
#mainView > section.list.dashboard-quick {
  padding-left: var(--dash-inline);
  padding-right: var(--dash-inline);
}

#mainView .dashboard-balance-card.summary-card {
  padding-top: 10px;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

#mainView .dashboard-balance-card .total-balance.dashboard-balance-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 0;
  width: 100%;
  min-width: 0;
}

#mainView .dashboard-balance-card .total-balance.dashboard-balance-inline .roll-digits {
  flex: 1 1 auto;
  min-width: 0;
}

#mainView .dashboard-balance-card .total-balance {
  font-size: clamp(1.85rem, 3.6vw, 2.45rem);
  line-height: 1.12;
}

.total-balance.balance-is-private {
  animation: none !important;
}

.total-balance.balance-is-private .roll-digits {
  animation: none !important;
}

/* Скрытый баланс: валюта + довгі тире, без «цифрової» маски */
.total-balance .roll-digits.balance-obfuscated {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  color: rgba(200, 215, 245, 0.38);
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-shadow: none;
  filter: none;
  user-select: none;
}

.balance-privacy-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: auto;
  height: auto;
  min-width: 28px;
  min-height: 28px;
  margin: 0 0 0 2px;
  padding: 2px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  opacity: 0.38;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.balance-privacy-toggle:hover {
  opacity: 0.72;
  background: rgba(255, 255, 255, 0.06);
}

.balance-privacy-toggle[aria-pressed="true"] {
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.05);
}

.balance-privacy-toggle:focus-visible {
  outline: 2px solid rgba(122, 208, 255, 0.55);
  outline-offset: 2px;
}

.balance-privacy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.balance-privacy-icon svg {
  display: block;
}

#mainView .dashboard-plans--compact {
  margin-bottom: 2px;
}

#mainView .dashboard-plans--compact .plan-section-heading {
  margin-bottom: 8px;
}

#mainView .dashboard-plans--compact .plan-picker-details {
  border-radius: 12px;
}

#mainView .dashboard-quick .dashboard-h2 {
  margin-bottom: 10px;
}

.dashboard-banners {
  padding: 0;
  overflow: hidden;
  margin-bottom: var(--space-section);
}

#mainView .dashboard-banners {
  margin-bottom: 10px;
}

/* Banner strip: no card shell, only image + dots */
.list.dashboard-banners.banner-strip {
  padding: 0;
  overflow: hidden;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#mainView .list.dashboard-banners.banner-strip {
  margin-bottom: 10px;
}

/* Один баннер под topbar для всех вкладок (вне #mainView) */
.banner-strip.banner-strip--global {
  margin-top: 4px;
  margin-bottom: 12px;
}

.list.dashboard-banners.banner-strip::before {
  display: none;
}

.list.dashboard-banners.banner-strip .banner-carousel-stack {
  padding: 0;
  gap: 0;
}

.banner-carousel-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: 100%;
}

.banner-carousel-frame {
  position: relative;
  width: 100%;
  align-self: stretch;
}

/* Точки под баннером (без подложки/фона) */
.banner-carousel-dots {
  position: static;
  z-index: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 0 2px;
  margin-top: 6px;
  margin: 0;
  box-sizing: border-box;
  pointer-events: none;
  background: transparent;
  border: none;
}

.banner-carousel-dots[hidden] {
  display: none !important;
}

/* Global dots row must stay fully transparent in all themes */
#bannerCarouselDotsGlobal {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.banner-carousel-dot {
  position: relative;
  /* Компактная строка: визуально узкая полоса под картинкой; зона нажатия ~36×36 за счёт padding */
  width: 36px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
}

.banner-carousel-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(74, 168, 255, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 1px 4px rgba(0, 0, 0, 0.35);
  opacity: 0.95;
  transition: width 0.22s var(--ease-spring), height 0.22s var(--ease-spring), transform 0.22s var(--ease-spring), background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.banner-carousel-dot[data-banner-dist="1"]::after {
  width: 7px;
  height: 7px;
  background: rgba(74, 168, 255, 0.42);
  opacity: 0.65;
}

.banner-carousel-dot[data-banner-dist="2"]::after {
  width: 6px;
  height: 6px;
  background: rgba(90, 180, 255, 0.3);
  opacity: 0.45;
}

.banner-carousel-dot[data-banner-dist="3"]::after {
  width: 5px;
  height: 5px;
  background: rgba(100, 190, 255, 0.22);
  opacity: 0.32;
}

.banner-carousel-dot[data-banner-dist="4"]::after {
  width: 4px;
  height: 4px;
  background: rgba(110, 200, 255, 0.16);
  opacity: 0.22;
}

.banner-carousel-dot:hover::after {
  opacity: 1;
  background: rgba(100, 190, 255, 0.55);
}

.banner-carousel-dot:focus-visible {
  outline: 2px solid rgba(122, 208, 255, 0.95);
  outline-offset: 2px;
}

.banner-carousel-dot.is-active::after {
  width: 11px;
  height: 11px;
  background: #3eb8ff;
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 0 16px rgba(62, 184, 255, 0.85),
    0 2px 8px rgba(0, 0, 0, 0.35);
  transform: scale(1);
}

.banner-carousel-host {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  border-radius: 0;
}

.banner-carousel-host::-webkit-scrollbar { display: none; }

.banner-carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  scroll-snap-align: start;
  snap-stop: always;
  align-self: flex-start;
  position: relative;
  isolation: isolate;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  --banner-glow-left-rgb: 110, 200, 255;
  --banner-glow-right-rgb: 122, 139, 255;
  --banner-stroke-rgb: 128, 190, 255;
}

.banner-carousel__slide > a {
  display: block;
  width: 100%;
  height: auto;
  line-height: 0;
  position: relative;
  z-index: 2;
}

.banner-carousel__img {
  width: 100%;
  height: auto;
  vertical-align: top;
  object-fit: unset;
  object-position: center;
  display: block;
  border-radius: inherit;
  position: relative;
  z-index: 2;
}

.banner-carousel__slide--toned::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  box-shadow:
    inset 0 0 0 1.5px rgba(var(--banner-stroke-rgb), 0.65),
    inset 0 0 26px rgba(var(--banner-stroke-rgb), 0.26),
    0 0 0 1px rgba(var(--banner-stroke-rgb), 0.18);
}

.banner-carousel__slide--toned::after {
  content: "";
  position: absolute;
  inset: -10px -8px;
  border-radius: 16px;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(var(--banner-glow-left-rgb), 0.42) 0%,
    rgba(var(--banner-stroke-rgb), 0.22) 45%,
    rgba(var(--banner-glow-right-rgb), 0.42) 100%
  );
  filter: blur(16px) saturate(130%);
  opacity: 0.95;
}

.banner-carousel__slide--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 5;
  min-height: 88px;
  border-radius: 0;
  border: 1px dashed var(--line);
  background: linear-gradient(165deg, rgba(20, 28, 48, 0.35), rgba(12, 16, 28, 0.22));
}

.banner-placeholder-inner {
  text-align: center;
  padding: 12px 16px;
  opacity: 0.72;
}

.dashboard-plans--compact {
  margin-bottom: 4px;
}

.dashboard-plans--compact .list-head {
  margin-bottom: 0;
}

.plan-picker-details {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(20, 28, 48, 0.35), rgba(12, 16, 28, 0.28));
  overflow: hidden;
}

.plan-picker-loading-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 2px;
}

.plan-picker-skeleton {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(20, 28, 48, 0.35), rgba(12, 16, 28, 0.28));
  overflow: hidden;
}

.plan-picker-skeleton--summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.plan-picker-skeleton__text {
  flex: 1;
  height: 14px;
  max-width: 72%;
  border-radius: 6px;
  background: linear-gradient(100deg, rgba(30, 40, 62, 0.9) 20%, rgba(45, 58, 88, 0.95) 38%, rgba(30, 40, 62, 0.9) 56%);
  background-size: 220% 100%;
  animation: shimmer 1.15s linear infinite;
}

.plan-picker-skeleton__chev {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 2px solid rgba(180, 210, 255, 0.28);
  border-bottom: 2px solid rgba(180, 210, 255, 0.28);
  transform: rotate(45deg);
  opacity: 0.5;
}

.plan-picker-skeleton--panel {
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-picker-skeleton__row {
  height: 12px;
  border-radius: 6px;
  width: 100%;
  background: linear-gradient(100deg, rgba(28, 38, 58, 0.85) 20%, rgba(42, 54, 78, 0.92) 38%, rgba(28, 38, 58, 0.85) 56%);
  background-size: 220% 100%;
  animation: shimmer 1.15s linear infinite;
}

.plan-picker-skeleton__row--short {
  width: 55%;
}

.plan-picker-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 6px 10px;
  align-items: center;
}

.plan-picker-summary::-webkit-details-marker {
  display: none;
}

.plan-picker-summary::marker {
  content: "";
}

.plan-picker-summary__chev {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(180, 210, 255, 0.55);
  border-bottom: 2px solid rgba(180, 210, 255, 0.55);
  transform: rotate(45deg);
  translate: 0 -2px;
  transition: transform 0.2s var(--ease-out-expo, ease);
}

.plan-picker-details[open] .plan-picker-summary__chev {
  transform: rotate(225deg);
  translate: 0 2px;
}

.plan-picker-summary__primary {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(180, 205, 240, 0.85);
}

.plan-picker-summary__meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(180, 205, 240, 0.85);
}

.plan-picker-summary__cards {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.4;
}

.plan-picker-body {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-current-panel {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(22, 30, 48, 0.55), rgba(12, 16, 28, 0.4));
  padding: 12px 12px 10px;
}

.plan-kv {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-kv-row {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 8px 12px;
  align-items: baseline;
  font-size: 13px;
}

.plan-kv-row dt {
  margin: 0;
  color: rgba(180, 205, 240, 0.75);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.plan-kv-row dd {
  margin: 0;
  color: var(--text);
  text-align: right;
}

.plan-picker-toolbar {
  display: flex;
  justify-content: flex-start;
}

.plan-change-btn {
  min-height: var(--tap-min, 44px);
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(110, 200, 255, 0.35);
  background: rgba(110, 200, 255, 0.12);
  color: #dff3ff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

/* Список тарифов под «Change plan»: вертикальный стек с явным зазором */
.plan-carousel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px 0 10px;
  max-height: min(62vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.plan-carousel .plan-option-row {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  .plan-carousel .plan-option-row {
    animation: planRowIn 0.45s var(--ease-out-expo) both;
  }
}

.plan-dropdown-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(62vh, 520px);
  overflow-y: auto;
  padding: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
}

.plan-dropdown-panel.hidden {
  display: none !important;
}

.plan-option-row {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px;
  background: linear-gradient(165deg, rgba(24, 32, 52, 0.5), rgba(10, 14, 24, 0.42));
}

.plan-option-row--current {
  border-color: rgba(110, 200, 255, 0.38);
}

.plan-option-row__head {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
}

.plan-option-row__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.plan-option-row__id {
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}

.plan-option-row__price {
  font-size: 12px;
  font-weight: 600;
  color: rgba(200, 220, 255, 0.92);
  white-space: nowrap;
}

.plan-option-row__tagline {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

.plan-option-bullets {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-option-bullets li {
  display: flex;
  align-items: first baseline;
  gap: 0.45em;
  padding: 0;
  margin: 0;
}

.plan-option-bullets li::before {
  content: "\2022";
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
  transform: translateY(0.04em);
}

@supports not (align-items: first baseline) {
  .plan-option-bullets li {
    align-items: baseline;
  }
}

.plan-option-row__actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.plan-current-badge {
  font-size: 12px;
  font-weight: 600;
  color: rgba(140, 220, 255, 0.95);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-switch-card {
  max-width: 420px;
}

.plan-switch-modal-text {
  margin-top: 8px;
  line-height: 1.45;
  font-size: 14px;
}

.plan-switch-modal-text > p:first-child {
  margin: 0 0 4px;
}

.plan-switch-charge {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 18, 32, 0.45);
  font-size: 14px;
  text-align: left;
}

.plan-switch-charge--free {
  opacity: 0.88;
  font-size: 13px;
}

.plan-switch-charge__row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: 100%;
}

.plan-switch-charge__label {
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

.plan-switch-charge__row strong {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.plan-switch-charge__note {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.65;
  color: var(--muted);
}

.plan-switch-terms-head {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(180, 210, 255, 0.72);
  text-align: left;
}

.plan-switch-terms {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}

.plan-switch-terms > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.plan-switch-terms > div:last-child {
  border-bottom: none;
}

.plan-switch-terms dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.plan-switch-terms dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  justify-self: end;
}

.plan-switch-actions {
  margin-top: 16px;
}

.plan-cards-host {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0;
  padding: 0 12px 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.plan-cards-host::-webkit-scrollbar {
  height: 4px;
}

.plan-cards-host::-webkit-scrollbar-thumb {
  background: rgba(120, 170, 230, 0.35);
  border-radius: 4px;
}

.plan-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: min(148px, 78vw);
  max-width: 160px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 10px 8px;
  background: linear-gradient(160deg, rgba(28, 38, 58, 0.4), rgba(14, 18, 30, 0.36));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-chip--current {
  border-color: rgba(110, 200, 255, 0.42);
  box-shadow: 0 0 0 1px rgba(110, 200, 255, 0.15), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.plan-chip__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.plan-chip__price {
  font-size: 11px;
  font-weight: 600;
}

.plan-chip__btn {
  margin-top: 6px;
  align-self: stretch;
  font-size: 11px;
  padding: 8px 10px;
  min-height: 0;
}

.plan-chip__btn.plan-select-btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Quick actions: ті самі .mini-btn, що #clientTopupCtaBtn — рамка, фон і hover з глобального .mini-btn */
#mainView .quick-actions-panel {
  margin-top: 2px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

#mainView .quick-actions-panel .quick-actions--stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

#mainView .quick-actions-panel .qa-panel-action {
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  box-sizing: border-box;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#mainView .quick-actions-panel .qa-tile.qa-panel-action,
#mainView .quick-actions-panel .qa-secondary.qa-panel-action {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
}

#mainView .quick-actions-panel .qa-topup-cta.qa-panel-action {
  filter: none;
}

#mainView .quick-actions-panel .qa-panel-action .qa-icon {
  font-size: 17px;
  line-height: 1;
  filter: none;
}

#mainView .quick-actions-panel .qa-panel-action .qa-label {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  letter-spacing: 0.01em;
  text-transform: none;
}

#mainView .quick-actions-panel .qa-secondary.qa-panel-action::before {
  display: none;
}

/* Перебиваємо .qa-tile:hover / .qa-secondary:hover (нижче в файлі) — лишається вигляд .mini-btn */
#mainView .quick-actions-panel .mini-btn.qa-tile.qa-panel-action:hover,
#mainView .quick-actions-panel .mini-btn.qa-secondary.qa-panel-action:hover {
  border-color: var(--line-glow);
  background: rgba(110, 200, 255, 0.1);
  box-shadow: none;
  color: var(--text);
  transform: none;
}

#mainView .quick-actions-panel .mini-btn.qa-panel-action:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: no-preference) {
  #mainView .quick-actions-panel .qa-panel-action:nth-child(1) {
    animation: qaTileIn 0.42s var(--ease-out-expo) both;
    animation-delay: 0ms;
  }

  #mainView .quick-actions-panel .qa-panel-action:nth-child(2) {
    animation: qaTileIn 0.42s var(--ease-out-expo) both;
    animation-delay: 55ms;
  }

  #mainView .quick-actions-panel .qa-panel-action:nth-child(3) {
    animation: qaTileIn 0.42s var(--ease-out-expo) both;
    animation-delay: 110ms;
  }
}

.qa-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  min-height: 92px;
  padding: 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(28, 38, 58, 0.45), rgba(14, 18, 30, 0.42));
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.45s var(--ease-spring), box-shadow 0.45s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.qa-tile:hover {
  border-color: rgba(110, 200, 255, 0.28);
  background: linear-gradient(160deg, rgba(36, 50, 78, 0.55), rgba(18, 24, 40, 0.5));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32), 0 0 36px rgba(110, 200, 255, 0.14);
}

.qa-tile:active {
  transform: translateY(-1px) scale(0.97);
}

.qa-icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.qa-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(200, 215, 245, 0.92);
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-transform: none;
}

.qa-sublabel {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 2px;
}

.qa-secondary-wrap {
  margin: 12px 0 0;
  display: block;
  width: 100%;
}

.qa-secondary {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 15px 18px;
  min-height: var(--tap-min);
  border: 1px solid rgba(129, 199, 255, 0.34);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)) padding-box,
    linear-gradient(140deg, rgba(22, 31, 50, 0.94), rgba(12, 18, 32, 0.96)) border-box;
  color: #d9ecff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 28px rgba(3, 10, 20, 0.42),
    0 0 0 1px rgba(122, 208, 255, 0.05);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    border-color 0.28s ease,
    background 0.28s ease,
    transform 0.32s var(--ease-spring),
    box-shadow 0.32s ease,
    color 0.2s ease;
}

.qa-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 160% at 50% -30%, rgba(122, 208, 255, 0.25), rgba(122, 208, 255, 0) 62%);
  pointer-events: none;
}

.qa-secondary:hover {
  color: #f3f9ff;
  border-color: rgba(132, 211, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)) padding-box,
    linear-gradient(140deg, rgba(30, 43, 68, 0.96), rgba(16, 24, 42, 0.98)) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 16px 36px rgba(4, 12, 26, 0.5),
    0 0 28px rgba(122, 208, 255, 0.2);
  transform: translateY(-1px);
}

.qa-secondary:active {
  transform: translateY(0) scale(0.985);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 20px rgba(4, 12, 26, 0.44),
    0 0 16px rgba(122, 208, 255, 0.14);
}

.qa-secondary:focus-visible {
  outline: 2px solid rgba(138, 216, 255, 0.95);
  outline-offset: 3px;
}

.dashboard-status {
  margin-bottom: 12px;
}

.status-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-pill.online {
  background: rgba(72, 180, 120, 0.22);
  color: #8fe0b8;
  border: 1px solid rgba(72, 180, 120, 0.35);
}

.status-pill.offline {
  background: rgba(200, 90, 90, 0.2);
  color: #ffb1b1;
  border: 1px solid rgba(200, 90, 90, 0.35);
}

.pool-health-cell {
  flex-wrap: wrap;
}

.health-track {
  flex: 1;
  min-width: 100px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--line);
}

.health-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff9a6b, #7aa5ff);
  transition: width 400ms ease;
}

.health-label {
  font-size: 11px;
  color: var(--muted);
}

.fav-strip-wrap {
  margin-bottom: 12px;
}

.fav-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.fav-strip::-webkit-scrollbar {
  height: 4px;
}

.fav-card {
  flex: 0 0 78%;
  max-width: 280px;
  min-width: 0;
  scroll-snap-align: start;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(40, 52, 78, 0.85), rgba(22, 29, 43, 0.9));
  padding: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
}

.fav-card-pan {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 8px 0 4px;
}

.fav-card-meta {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.fav-star {
  margin-left: auto;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.85;
}

.cards-toolbar {
  align-items: flex-start;
}

.cards-toolbar-btns {
  display: flex;
  gap: 6px;
}

.smart-copy-popover {
  position: fixed;
  z-index: 35;
  min-width: 180px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(22, 28, 40, 0.95);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.sc-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  min-height: var(--tap-min);
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sc-option:hover {
  background: rgba(122, 165, 255, 0.12);
}

.card-pan-hit {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

/* Маска PAN: звёздочки и цифры в разных span — один baseline, без «пляски» от * vs 0–9 */
.card-pan-hit.mono,
.fav-card-pan.mono {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  /* Явный зазор: пробел в конце span съедался у flex-элементов */
  column-gap: 0.5ch;
  row-gap: 0;
}

.pan-mask-prefix {
  opacity: 0.62;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.pan-mask-suffix {
  letter-spacing: 0.2px;
}

.mono.js-pan-val {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 0.5ch;
  row-gap: 0;
}

.card-pan-hit:active {
  opacity: 0.85;
}

.label-edit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.label-inline-input {
  max-width: 140px;
  font-size: 12px;
}

.ttl-linear-wrap {
  margin-top: 6px;
}

.ttl-linear {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ttl-linear > .ttl-linear-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(122, 165, 255, 0.3), var(--accent));
  transition: none;
}

.code-card-line {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 4px;
  line-height: 1.35;
}

.code-limit-warning {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #fca5a5;
}

.code-value-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.code-value-row .code-hold-area {
  min-width: min(100%, 200px);
}

.code-value-row .mini-btn {
  flex: 1 1 auto;
  min-width: 140px;
}

.code-hold-area {
  flex: 1;
  padding: 14px 14px;
  min-height: 48px;
  border-radius: 12px;
  border: 1px dashed rgba(173, 196, 245, 0.35);
  background: rgba(0, 0, 0, 0.12);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.tx-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tx-activity-item {
  margin: 0;
  padding: 0;
}

.tx-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
  max-width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  button.tx-row {
    animation: txRowIn 0.48s var(--ease-spring) both;
  }
}

button.tx-row {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  border: none;
  border-top: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tx-activity-item:first-child .tx-row {
  border-top: 0;
}

/* Activity tab — “Processing” queue (in-flight) vs posted History (English labels). */
.tx-activity-dual {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.tx-processing-section {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  /* No outer box-shadow — it drew a dirty smear under the block on light/split backgrounds */
  overflow: hidden;
  box-shadow: none;
  min-width: 0;
  max-width: 100%;
}

.tx-processing-section-toggle {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 16px 18px;
  min-height: max(52px, var(--tap-min, 44px));
  border: none;
  background: var(--panel-2);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  /* Same radius as section inner curve — calc(-1px) left a ring of --panel = “second outline” */
  border-radius: var(--radius) var(--radius) 0 0;
}

.tx-processing-section-toggle:hover {
  background: rgba(28, 38, 58, 0.58);
}

.tx-processing-section-toggle:active {
  background: rgba(32, 44, 68, 0.66);
}

.tx-processing-section--collapsed .tx-processing-section-toggle {
  border-radius: var(--radius);
  /* Flush with section fill — avoids a second “inner frame” vs --panel-2 under the outer border */
  background: var(--panel);
}

.tx-processing-section-toggle__row1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tx-processing-section-toggle__main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.tx-processing-section-toggle__title {
  font-weight: 700;
  font-size: var(--fs-md);
}

.tx-processing-section-toggle__badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tx-processing-section-toggle__hint {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.35;
}

.tx-processing-section-toggle__chev {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out-expo, ease);
  flex-shrink: 0;
}

.tx-processing-section-toggle[aria-expanded="false"] .tx-processing-section-toggle__chev {
  transform: rotate(-135deg);
}

/* Плавное раскрытие Processing (0fr → 1fr) + stagger групп карт */
.tx-processing-section-body {
  display: grid;
  grid-template-rows: 1fr;
  border-top: 1px solid var(--line);
  background: var(--panel);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  transition: grid-template-rows 0.46s var(--ease-out-expo, ease),
    border-color 0.28s ease;
}

.tx-processing-section--collapsed .tx-processing-section-body {
  grid-template-rows: 0fr;
  /* transparent border-top still took 1px → ghost line / “second contour” under the toggle */
  border-top: none;
  min-height: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.tx-processing-section--collapsed .tx-processing-section-body__rack {
  padding: 0;
  visibility: hidden;
  pointer-events: none;
}

.tx-processing-section--collapsed .tx-processing-card-group {
  border-color: transparent;
  box-shadow: none;
}

.tx-processing-section--collapsed .tx-processing-card-toggle {
  border-bottom-color: transparent;
}

.tx-processing-section-body__rack {
  min-height: 0;
  overflow: hidden;
  padding: 0 14px 14px;
}

.tx-processing-card-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-processing-section:not(.tx-processing-section--collapsed) .tx-processing-card-groups .tx-processing-card-group {
  animation: txProcessingCardGroupIn 0.42s var(--ease-out-expo, ease) both;
}

.tx-processing-section:not(.tx-processing-section--collapsed)
  .tx-processing-card-groups
  .tx-processing-card-group:nth-child(1) {
  animation-delay: 0.04s;
}
.tx-processing-section:not(.tx-processing-section--collapsed)
  .tx-processing-card-groups
  .tx-processing-card-group:nth-child(2) {
  animation-delay: 0.09s;
}
.tx-processing-section:not(.tx-processing-section--collapsed)
  .tx-processing-card-groups
  .tx-processing-card-group:nth-child(3) {
  animation-delay: 0.14s;
}
.tx-processing-section:not(.tx-processing-section--collapsed)
  .tx-processing-card-groups
  .tx-processing-card-group:nth-child(4) {
  animation-delay: 0.19s;
}
.tx-processing-section:not(.tx-processing-section--collapsed)
  .tx-processing-card-groups
  .tx-processing-card-group:nth-child(5) {
  animation-delay: 0.24s;
}
.tx-processing-section:not(.tx-processing-section--collapsed)
  .tx-processing-card-groups
  .tx-processing-card-group:nth-child(6) {
  animation-delay: 0.29s;
}
.tx-processing-section:not(.tx-processing-section--collapsed)
  .tx-processing-card-groups
  .tx-processing-card-group:nth-child(7) {
  animation-delay: 0.34s;
}
.tx-processing-section:not(.tx-processing-section--collapsed)
  .tx-processing-card-groups
  .tx-processing-card-group:nth-child(8) {
  animation-delay: 0.39s;
}

@keyframes txProcessingCardGroupIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tx-processing-lede {
  margin: 10px 4px 6px;
  font-size: var(--fs-xs);
}

.tx-processing-card-group {
  margin-bottom: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--panel-2);
  min-width: 0;
  max-width: 100%;
  position: relative;
  isolation: isolate;
}

.tx-activity-list--processing {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  max-height: 3200px;
  opacity: 1;
  visibility: visible;
  position: relative;
  z-index: 0;
  transition: max-height 0.42s var(--ease-out-expo, ease), opacity 0.28s ease, visibility 0s;
}

.tx-activity-list--processing-collapsed {
  max-height: 0;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: max-height 0.42s var(--ease-out-expo, ease), opacity 0.24s ease,
    visibility 0s linear 0.28s;
}

@media (prefers-reduced-motion: reduce) {
  .tx-processing-section-body {
    transition-duration: 0.01ms;
  }

  .tx-processing-section:not(.tx-processing-section--collapsed) .tx-processing-card-groups .tx-processing-card-group {
    animation: none;
  }

  .tx-activity-list--processing,
  .tx-activity-list--processing-collapsed {
    transition-duration: 0.01ms;
  }
}

.tx-processing-card-group button.tx-row {
  padding: 16px 16px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.tx-processing-card-group .tx-merchant {
  margin-bottom: 6px;
}

.tx-processing-card-group .tx-meta {
  margin-bottom: 2px;
}

.tx-processing-card-group .tx-status-block {
  margin-top: 8px;
}

.tx-processing-card-group .tx-status-hint {
  margin-bottom: 4px;
}

.tx-processing-card-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--line);
  /* Opaque: expanded row/timeline sits below in DOM; transparent let hints bleed through when list height ~0 */
  background: var(--panel-2);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
}

.tx-processing-card-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tx-processing-card-toggle:active {
  background: rgba(255, 255, 255, 0.07);
}

.tx-processing-card-toggle__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-processing-card-toggle__count {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 600;
}

.tx-processing-card-toggle__chev {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out-expo, ease);
  flex-shrink: 0;
}

.tx-processing-card-toggle[aria-expanded="false"] .tx-processing-card-toggle__chev {
  transform: rotate(-135deg);
}

.tx-activity-list--processing .tx-activity-item:first-child .tx-row {
  border-top: 0;
}

.tx-history-section .tx-activity-list {
  margin-top: 4px;
}

.tx-section-heading {
  margin: 4px 2px 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.tx-section-hint {
  margin: 6px 2px 10px;
  font-size: var(--fs-xs);
}

.tx-row:focus-visible {
  outline: 2px solid rgba(110, 200, 255, 0.7);
  outline-offset: 2px;
  border-radius: 12px;
}

.tx-merchant-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(22, 30, 48, 0.92);
  border: 1px solid var(--line);
  overflow: hidden;
}

.tx-merchant-icon--sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.tx-merchant-icon__img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.tx-merchant-icon--sm .tx-merchant-icon__img {
  width: 18px;
  height: 18px;
}

.merchant-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.merchant-logo.merchant-logo--sm {
  width: 28px;
  height: 28px;
  font-size: 10px;
  border-radius: 8px;
}

.merchant-logo.logo-amazon {
  background: linear-gradient(145deg, #ff9900, #232f3e);
}

.merchant-logo.logo-booking {
  background: linear-gradient(145deg, #003580, #009fe3);
}

.merchant-logo.logo-steam {
  background: linear-gradient(145deg, #1b2838, #2a475e);
}

.merchant-logo.logo-google {
  background: linear-gradient(145deg, #4285f4, #34a853);
}

.merchant-logo.logo-facebook {
  background: linear-gradient(145deg, #0668e1, #1877f2);
}

.merchant-logo.logo-tiktok {
  background: linear-gradient(145deg, #00f2ea, #ff0050);
}

.merchant-logo.logo-bing {
  background: linear-gradient(145deg, #008373, #00a4ef);
}

.merchant-logo.logo-snapchat {
  background: linear-gradient(145deg, #fffc00, #ffac00);
  color: #16171d;
}

.merchant-logo.logo-generic {
  background: rgba(60, 70, 95, 0.9);
  color: #dfe7ff;
}

.tx-body {
  flex: 1 1 0%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tx-merchant {
  font-weight: 600;
  font-size: 12px;
  line-height: 1.25;
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-meta {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tx-ledger-detail {
  margin: 0 0 4px;
  line-height: 1.35;
}

.tx-amount {
  font-weight: 600;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  align-self: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 36%;
  margin-top: 1px;
  padding-left: 6px;
}

.tx-amount--credit {
  color: #8fe0b8;
}

.tx-fees {
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  margin: 6px 0 0;
  letter-spacing: 0.02em;
}

.tx-status {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
}

.tx-status.approved {
  color: #8fe0b8;
}

.tx-status.declined {
  color: #ff9a9a;
}

.tx-status.pending {
  color: #c8b8ff;
}

/* Card purchase rows — English status + optional timeline */
.tx-row-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.tx-status-block {
  margin-top: 6px;
  min-width: 0;
}

.tx-status-block__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tx-status-badge {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.tx-status-badge__svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tx-status-badge--processing {
  color: #5ecf8a;
}

.tx-status-badge--authorized {
  color: #7eb6ff;
}

.tx-status-badge--success {
  color: #4ecf8a;
}

.tx-status-badge--declined {
  color: #ff8a8a;
}

.tx-status-label {
  margin: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.2;
  display: flex;
  align-items: center;
  min-height: 20px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.tx-status-label--processing {
  color: #7ee0b0;
}

.tx-status-label--authorized {
  color: #9ec8ff;
}

.tx-status-label--success {
  color: #8fe0b8;
}

.tx-status-label--declined {
  color: #ff9a9a;
}

.tx-status-hint {
  margin: 4px 0 0 0;
  padding-left: 28px;
  box-sizing: border-box;
  font-size: 10px;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

button.tx-row--expandable {
  position: relative;
}

button.tx-row--expandable::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-left: 4px;
  margin-top: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.75;
  align-self: flex-start;
}

.tx-activity-item--open button.tx-row--expandable::after {
  transform: rotate(-135deg);
  margin-top: 10px;
}

@media (max-width: 400px) {
  .tx-amount {
    max-width: 30%;
    font-size: 11px;
    padding-left: 4px;
  }

  button.tx-row--expandable::after {
    margin-left: 2px;
  }

  .tx-status-hint {
    padding-left: 24px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  button.tx-row--expandable::after {
    transition: transform 0.22s var(--ease-spring), margin-top 0.22s var(--ease-spring);
  }
}

.tx-row-timeline {
  padding: 10px 14px 14px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  min-width: 0;
}

.tx-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-timeline-step {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  line-height: 1.35;
}

.tx-timeline-step__title {
  font-weight: 700;
  color: var(--fg);
}

.tx-timeline-step__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  color: var(--muted);
}

.tx-timeline-step__state--done {
  color: #8fe0b8;
  font-weight: 700;
}

.tx-timeline-step__state--prog {
  color: #c8b8ff;
  font-weight: 700;
}

.tx-timeline-step__state--bad {
  color: #ff9a9a;
  font-weight: 700;
}

.tx-timeline-step__ico {
  font-size: 12px;
  line-height: 1;
}

.tx-timeline-step__detail {
  display: block;
  width: 100%;
  margin-top: 2px;
  font-size: 10px;
}

.tx-timeline-note,
.tx-timeline-fineprint {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.4;
  max-width: 48ch;
}

.tx-timeline-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.tx-timeline-actions__gap {
  display: inline-block;
  width: 6px;
}

.tx-ledger-pdf-row {
  padding: 4px 0 2px 44px;
  margin: 0;
  border-top: none;
}

.tx-timeline-link {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tx-timeline-link:hover {
  filter: brightness(1.08);
}

.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
}

.bottom-sheet:not(.hidden) {
  pointer-events: auto;
}

.bottom-sheet .sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 14, 0.5);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 85vh;
  overflow-y: auto;
  padding: 16px 18px calc(24px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: rgba(22, 28, 40, 0.96);
  border: 1px solid var(--line);
  border-bottom: none;
  animation: sheetUp 260ms ease both;
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-handle {
  width: 48px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 12px;
}

.sheet-title {
  margin: 0 0 14px;
  font-size: 16px;
}

.sheet-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.sheet-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: stretch;
  gap: 10px;
  margin-top: 16px;
}

.sheet-actions .mini-btn,
.sheet-actions .primary-btn {
  flex: 1 1 auto;
  min-width: min(100%, 140px);
}

.bottom-nav-main-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
}

.bottom-nav-5 {
  gap: 0;
}

.bottom-nav-5 .bottom-nav-main-row {
  gap: 2px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bottom-nav-5 .bottom-nav-btn {
  font-size: 9px;
  padding: 3px 2px;
}

.bottom-nav-6 {
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.bottom-nav-6 .bottom-nav-btn {
  font-size: 9px;
  padding: 3px 2px;
}

.theme-segment {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}

.theme-segment-lead {
  margin: 0 0 8px !important;
}

.empty-illu {
  text-align: center;
  padding: 28px 16px 24px;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(18, 26, 42, 0.28), rgba(10, 14, 24, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.empty-illu-svg {
  width: 120px;
  height: 90px;
  margin: 0 auto 14px;
  opacity: 0.85;
}

.empty-illu h3 {
  margin: 0 0 8px;
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.empty-illu p {
  margin: 0 auto 16px;
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  max-width: 28rem;
}

.empty-illu__cta {
  margin-top: 4px;
  width: 100%;
  max-width: 280px;
}

/* 3DS tab — calmer empty state */
.empty-illu--codes {
  position: relative;
  padding: 32px 20px 28px;
  overflow: hidden;
}

.empty-illu--codes .empty-illu__glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(110, 200, 255, 0.16), transparent 72%);
  pointer-events: none;
}

.empty-illu-svg--codes {
  width: 132px;
  height: 114px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.22));
}

.empty-illu-kicker {
  margin: 0 0 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dim);
  position: relative;
  z-index: 1;
}

.empty-illu--codes h3 {
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .empty-illu {
    animation: qaTileIn 0.5s var(--ease-out-expo) both;
  }
}

.expired-bot-btn {
  margin-top: 16px;
  width: 100%;
}

.context-toast {
  position: fixed;
  left: 50%;
  bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(360px, calc(100% - 24px));
  z-index: 32;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(110, 200, 255, 0.18);
  background: linear-gradient(165deg, rgba(18, 26, 42, 0.97), rgba(8, 12, 22, 0.96));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(110, 200, 255, 0.06);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  animation: toastIn 200ms ease both;
}

.context-toast-text {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}

.context-toast-actions {
  display: flex;
  justify-content: stretch;
}

.context-3ds-copy-btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 460px) {
  .app {
    padding: 14px 14px var(--app-bottom-inset);
  }

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

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

  .bottom-nav.bottom-nav-5 {
    gap: 0;
    padding-left: 4px;
    padding-right: 4px;
  }

  .bottom-nav.bottom-nav-5 .bottom-nav-main-row {
    gap: 1px;
  }

  .bottom-nav.bottom-nav-6 {
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    padding-left: 4px;
    padding-right: 4px;
  }

  .bottom-nav-btn {
    font-size: 8px;
    padding: 2px 1px;
    min-height: 30px;
  }

  .quick-actions:not(.quick-actions--stack) {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .qa-tile {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
}

/* Desktop / large tablet: primary navigation as a fixed left rail (mobile keeps bottom bar). */
@media (min-width: 900px) {
  :root {
    --app-rail-width: min(272px, 26vw);
    --app-bottom-inset: 32px;
    --app-content-max: 1120px;
  }

  html {
    scroll-padding-bottom: 28px;
  }

  /* Контент по центру полосы справа от рейки: от кнопок до правого края окна */
  body:has(#bottomNav:not(.hidden)) .app {
    margin-left: var(--app-rail-width);
    margin-right: 0;
    width: calc(100vw - var(--app-rail-width));
    max-width: none;
    box-sizing: border-box;
    padding-top: 20px;
    padding-bottom: var(--app-bottom-inset);
    padding-left: max(24px, calc((100vw - var(--app-rail-width) - var(--app-content-max)) / 2));
    padding-right: max(24px, calc((100vw - var(--app-rail-width) - var(--app-content-max)) / 2));
  }

  body:has(#bottomNav:not(.hidden)) .dev-credit {
    margin-left: var(--app-rail-width);
    margin-right: 0;
    width: calc(100vw - var(--app-rail-width));
    max-width: none;
    box-sizing: border-box;
    padding-left: max(24px, calc((100vw - var(--app-rail-width) - var(--app-content-max)) / 2));
    padding-right: max(24px, calc((100vw - var(--app-rail-width) - var(--app-content-max)) / 2));
    padding-bottom: 18px;
  }

  /* Дублирующий topbar убираем: почта вверху rail, лого + выход — внизу */
  body:has(#bottomNav:not(.hidden)) .topbar {
    display: none !important;
  }

  .bottom-nav:not(.hidden) {
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--app-rail-width);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 20px 14px calc(24px + env(safe-area-inset-bottom, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    box-shadow: 12px 0 56px rgba(0, 0, 0, 0.42);
  }

  .bottom-nav:not(.hidden) .bottom-nav-rail-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    flex-shrink: 0;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 4px;
  }

  .bottom-nav:not(.hidden) .bottom-nav-rail-bottom {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    flex-shrink: 0;
    min-height: 48px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .bottom-nav:not(.hidden) .rail-brand {
    display: inline-flex;
  }

  .bottom-nav:not(.hidden) .rail-signout.rail-signout--rail-bottom {
    display: inline-flex;
  }

  .bottom-nav:not(.hidden) .bottom-nav-main-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: unset;
    padding-top: 10px;
  }

  .bottom-nav:not(.hidden).bottom-nav-5 .bottom-nav-main-row {
    grid-template-columns: unset;
    gap: 8px;
  }

  .bottom-nav:not(.hidden) .bottom-nav-btn {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px 10px 16px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 0;
    text-align: left;
    justify-content: flex-start;
    align-items: center;
    border: none;
    background: transparent;
    color: rgba(200, 210, 230, 0.72);
    box-shadow: none;
    animation: none !important;
  }

  .bottom-nav:not(.hidden) .bottom-nav-btn .nav-btn-icon {
    display: none;
  }

  .bottom-nav:not(.hidden) .bottom-nav-btn:hover {
    transform: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border-color: transparent;
    box-shadow: none;
  }

  .bottom-nav:not(.hidden) .bottom-nav-btn.active {
    color: #ffffff;
    font-weight: 700;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: none !important;
  }

  .bottom-nav:not(.hidden) .bottom-nav-btn.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    border-radius: 0 3px 3px 0;
    background: var(--rail-accent, #e84887);
  }

  .bottom-nav:not(.hidden) .nav-with-badge {
    justify-content: flex-start;
    gap: 8px;
  }

  .bottom-nav:not(.hidden) .nav-badge {
    position: absolute;
    top: 10px;
    right: 14px;
    left: auto;
    transform: none;
  }

  .toast {
    bottom: 36px;
  }

  .context-toast {
    bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .view:not(.hidden),
  .topbar,
  .title,
  .list,
  .card-item,
  .dropdown,
  .code-item,
  .skeleton,
  .toast,
  .nav-badge,
  .sensitive-fade,
  .dashboard-balance-card,
  .dashboard-balance-card .total-balance,
  .modal,
  .modal-card,
  .bottom-nav-btn.active {
    animation: none !important;
  }

  .decrypt-spinner {
    animation: none !important;
    border-top-color: rgba(110, 200, 255, 0.45);
  }

  .ghost-btn,
  .mini-btn,
  .primary-btn,
  .bottom-nav-btn,
  .qa-tile,
  .qa-secondary,
  .card-item,
  .code-item,
  .chevron,
  .filter-pill {
    transition: none !important;
  }

  .qa-tile:hover,
  .qa-secondary:hover,
  .card-item:hover,
  .code-item:hover,
  .card-item.is-open .chevron {
    transform: none;
  }

  .filter-pill:active {
    transform: none;
  }

  button.tx-row,
  .plan-carousel .plan-option-row,
  #mainView .quick-actions-panel .qa-panel-action,
  .empty-illu {
    animation: none !important;
  }
}

/* Performance mode (forced for Telegram WebView by app.js).
   Disable expensive animations/transitions and blur filters. */
html.perf-mode {
  scroll-behavior: auto;
}

html.perf-mode *,
html.perf-mode *::before,
html.perf-mode *::after {
  animation: none !important;
  transition: none !important;
}

html.perf-mode .topbar,
html.perf-mode .summary-card,
html.perf-mode .list,
html.perf-mode .bottom-nav,
html.perf-mode .modal-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.perf-mode body {
  background-attachment: scroll !important;
}

html.perf-mode html,
html.perf-mode body {
  background-image: none !important;
}

html.perf-mode body::before {
  content: none !important;
  filter: none !important;
  opacity: 0 !important;
}

html.perf-mode .topbar {
  position: static !important;
  box-shadow: none !important;
}

html.perf-mode .summary-card,
html.perf-mode .list,
html.perf-mode .bottom-nav,
html.perf-mode .modal-card,
html.perf-mode .card-item,
html.perf-mode .code-item {
  box-shadow: none !important;
}

html.perf-mode .topbar,
html.perf-mode .summary-card,
html.perf-mode .list,
html.perf-mode .bottom-nav,
html.perf-mode .modal-card,
html.perf-mode .qa-tile,
html.perf-mode .qa-secondary,
html.perf-mode .ghost-btn,
html.perf-mode .primary-btn,
html.perf-mode .mini-btn {
  background: rgba(14, 20, 34, 0.92) !important;
}

html.perf-mode #clientTopupCtaBtn {
  background: rgba(228, 237, 251, 0.95) !important;
  color: #2a3b56 !important;
  border-color: rgba(122, 208, 255, 0.34) !important;
}

html.perf-mode #mainView .quick-actions-panel {
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Як #clientTopupCtaBtn: світла міні-кнопка поверх perf-mode .mini-btn */
html.perf-mode #mainView .quick-actions-panel .mini-btn.qa-panel-action {
  background: rgba(228, 237, 251, 0.95) !important;
  color: #2a3b56 !important;
  border-color: rgba(122, 208, 255, 0.34) !important;
  box-shadow: none !important;
}

html.perf-mode .title {
  background: none !important;
  color: var(--text) !important;
  filter: none !important;
  animation: none !important;
}

html.perf-mode .app-grain-layer {
  display: none !important;
}

/* Client admin section (lightweight dotted leaders) */
.admin-subhead {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Профіль: вторинний bug report (перенесено з головної Quick actions) */
.profile-qa-bug {
  display: inline-flex;
  width: 100%;
  margin-top: 4px;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  min-height: 44px;
}

.profile-qa-bug .qa-label {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
}

.profile-qa-bug .qa-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.kv-sep {
  height: 1px;
  background: var(--line);
  margin: 12px 0;
}

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

.kv-list .kv-row {
  position: relative;
  padding-bottom: 2px;
}

.kv-list .kv-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(154, 174, 208, 0.22), transparent);
  pointer-events: none;
}

.kv-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 1.25;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.kv-key {
  color: var(--muted);
  font-size: 12px;
  min-width: 180px;
}

.kv-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(154, 174, 208, 0.35);
  align-self: end;
  margin-bottom: 4px;
}

.kv-val {
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Вкладка Cards: шапка баланса — чуть больше воздуха до строк KV */
#cardView > section.summary-card:first-of-type .dashboard-balance-head {
  margin-bottom: 14px;
}

/* Вкладка Cards: баланс — без глобального min-width 180px у ключей (иначе «висячий» правый край) */
#cardView > section.summary-card:first-of-type .kv-key {
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(100%, 220px);
}

#cardView > section.summary-card:first-of-type .kv-list {
  width: 100%;
}

.kv-note {
  margin-left: 10px;
  font-size: 12px;
  white-space: nowrap;
}

.client-head {
  padding: 10px 0 6px;
}

.client-title {
  font-weight: 700;
}

.client-meta {
  margin-top: 4px;
}

.admin-list-placeholder {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  overflow: auto;
}

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

.admin-mini-row:first-child {
  border-top: 0;
}

.admin-segment {
  gap: 10px;
  flex-wrap: wrap;
}

.admin-segment .mini-btn.active {
  border-color: rgba(110, 200, 255, 0.28);
  background: rgba(110, 200, 255, 0.12);
}

.client-inline-select,
.client-inline-input {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.cards-controls {
  display: grid;
  gap: 10px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.quick-msgs {
  display: grid;
  gap: 10px;
}

.quick-msgs .qa-tile {
  text-align: left;
  justify-content: flex-start;
  padding: 12px 14px;
  gap: 8px;
}

.quick-msgs .qa-label {
  font-weight: 700;
}

/* ── Support tab (profileView) ── */
.support-page__hero {
  margin-bottom: 4px;
}

.support-page__hero h2 {
  margin: 0 0 6px;
}

.support-page__lede {
  margin: 0 0 4px;
  font-size: var(--fs-sm);
  line-height: 1.45;
  max-width: 36rem;
}

.support-page__block-title {
  margin: 22px 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-dim);
}

.support-page__block-title:first-of-type {
  margin-top: 14px;
}

.support-page__hint {
  margin: -4px 0 12px;
  font-size: var(--fs-xs);
}

.support-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(168deg, rgba(22, 32, 52, 0.42), rgba(12, 18, 30, 0.36));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 36px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.support-card--contact {
  margin-bottom: 2px;
}

.kv-list--support {
  gap: 0;
  padding: 0;
}

.kv-list--support .kv-row {
  padding: 14px 16px;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.kv-list--support .kv-row:last-child {
  border-bottom: none;
}

.kv-list--support .kv-dots {
  display: none;
}

.kv-list--support .kv-key {
  min-width: 0;
  flex: 0 1 44%;
  font-weight: 600;
  color: var(--muted);
}

.kv-list--support .kv-val {
  flex: 1 1 52%;
  text-align: right;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.support-bug-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(110, 200, 255, 0.22);
  background: linear-gradient(162deg, rgba(28, 40, 62, 0.55), rgba(14, 20, 36, 0.48));
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.28s ease, background 0.28s ease, transform 0.2s var(--ease-spring), box-shadow 0.3s ease;
}

.support-bug-btn:hover {
  border-color: rgba(110, 200, 255, 0.38);
  background: linear-gradient(162deg, rgba(34, 48, 74, 0.62), rgba(16, 24, 42, 0.52));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28), 0 0 40px rgba(110, 200, 255, 0.1);
}

.support-bug-btn:active {
  transform: scale(0.99);
}

.support-bug-btn:focus-visible {
  outline: 2px solid rgba(110, 200, 255, 0.55);
  outline-offset: 2px;
}

.support-bug-btn__icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(110, 200, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(110, 200, 255, 0.2);
}

.support-bug-btn__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.support-bug-btn__label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.support-bug-btn__hint {
  font-size: var(--fs-xs);
  line-height: 1.35;
  margin: 0;
}

.support-bug-btn__chev {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  opacity: 0.75;
}

.support-page .quick-msgs {
  gap: 12px;
}

.support-page .quick-msgs .qa-tile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 6px;
  align-items: start;
  min-height: 0;
  padding: 16px 16px 18px;
  border-radius: 18px;
}

.support-page .quick-msgs .qa-tile-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-radius: 13px;
  box-sizing: border-box;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(110, 200, 255, 0.18), rgba(167, 139, 250, 0.1));
  border: 1px solid rgba(110, 200, 255, 0.22);
}

.support-page .quick-msgs .qa-tile:nth-child(2) .qa-tile-icon {
  background: linear-gradient(145deg, rgba(110, 200, 255, 0.22), rgba(56, 189, 248, 0.12));
  border-color: rgba(56, 189, 248, 0.28);
  color: #5ec8ff;
}

.support-page .quick-msgs .qa-tile:nth-child(3) .qa-tile-icon {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.16), rgba(110, 200, 255, 0.1));
  border-color: rgba(52, 211, 153, 0.28);
  color: #6ee7b7;
}

.support-page .quick-msgs .qa-tile:nth-child(4) .qa-tile-icon {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.2), rgba(244, 114, 182, 0.1));
  border-color: rgba(167, 139, 250, 0.3);
  color: #c4b5fd;
}

.support-page .quick-msgs .qa-tile-icon svg {
  display: block;
}

.support-page .quick-msgs .qa-tile > .qa-label {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-h, var(--text));
}

.support-page .quick-msgs .qa-tile > .subtle {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: var(--fs-xs);
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  max-width: none;
}

.cards-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.cards-ctrl {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1 1 180px;
}

.cards-ctrl--created {
  flex: 2 1 380px;
}

.cards-ctrl--perpage {
  flex: 0 0 150px;
}

.date-range-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.date-range-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.date-range-field input[type="date"] {
  font-size: 13px;
  padding: 6px 8px;
}

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

.dropdown .detail-row {
  padding: 7px 0;
}

.detail-row + .detail-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dropdown .detail-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.detail-row--tools {
  align-items: center;
}

.detail-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.detail-value {
  font-size: 13px;
  color: var(--text);
  min-width: 0;
}

.detail-value-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Открытая карта: один шрифт и кегль для ника, PAN, срока, CVV */
.dropdown .detail-row .cred-field-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.dropdown .detail-row .cred-field-value.subtle {
  color: var(--muted);
}

.dropdown .detail-row .cred-field-value .pan-mask-prefix,
.dropdown .detail-row .cred-field-value .pan-mask-suffix {
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.dropdown .detail-row .cred-field-value .pan-mask-prefix {
  opacity: 0.62;
}

.confirm-pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  font-family: inherit;
}

@media (max-width: 520px) {
  .cards-controls-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .cards-ctrl,
  .cards-ctrl--created,
  .cards-ctrl--perpage {
    flex: initial;
  }
  .date-range-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .kv-row {
    flex-wrap: wrap;
  }
  .kv-key {
    min-width: 0;
    width: 100%;
  }
  .kv-dots {
    display: none;
  }
  .kv-val,
  .kv-note {
    white-space: normal;
  }
}

/* —— Filter pills (cards / sheets / admin SLA) —— */
.filter-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s var(--ease-out-expo), border-color 0.15s var(--ease-out-expo),
    background 0.15s var(--ease-out-expo), transform 0.12s var(--ease-spring);
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--line-glow);
}

.filter-pill:active {
  transform: scale(0.98);
}

.filter-pill.active {
  color: var(--text);
  border-color: var(--accent-dim);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(122, 208, 255, 0.2);
}

.sheet-pill-row {
  margin-top: 6px;
}

/* Top-up amount input: hide number spinners */
input[type="number"].topup-amount-input {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"].topup-amount-input::-webkit-outer-spin-button,
input[type="number"].topup-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* KPI drill (admin dashboard) */
button.kpi-drill {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

button.kpi-drill:hover {
  color: var(--text);
  background: var(--accent-soft);
  text-decoration: none;
}

/* Admin inventory modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-bottom));
  background: rgba(4, 8, 14, 0.62);
  backdrop-filter: var(--blur-modal);
  -webkit-backdrop-filter: var(--blur-modal);
}

.modal-overlay.hidden {
  display: none;
}

.inventory-modal-panel {
  width: min(720px, 100%);
  max-height: min(88vh, 920px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 16px 18px 18px;
}

.modal-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-modal-body {
  margin-top: 12px;
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

.inventory-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.inventory-row:hover {
  border-color: var(--line-glow);
}

.inventory-row .inv-meta {
  font-size: 12px;
  color: var(--muted);
}

.inv-detail-block {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.inv-tx-line {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Card row: quick copy (PAN / CVV / EXP) */
.card-head-tools {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-shrink: 0;
  margin-left: auto;
  padding-right: 2px;
}

.card-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(110, 200, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card-tool-lbl {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(154, 174, 208, 0.95);
  line-height: 1;
  user-select: none;
}

.peek-ios {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.peek-ios input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.peek-ios-slider {
  position: relative;
  display: block;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  transition: background 0.2s var(--ease-spring), border-color 0.2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.peek-ios-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.22s var(--ease-spring), background 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.peek-ios input:checked + .peek-ios-slider {
  background: var(--accent-soft);
  border-color: var(--accent-dim);
}

.peek-ios input:checked + .peek-ios-slider::after {
  transform: translateX(18px);
  background: var(--accent);
}

.peek-ios--sm .peek-ios-slider {
  width: 36px;
  height: 20px;
}

.peek-ios--sm .peek-ios-slider::after {
  width: 14px;
  height: 14px;
}

.peek-ios--sm input:checked + .peek-ios-slider::after {
  transform: translateX(16px);
}

.peek-row--tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
}

.peek-row--tools > .detail-value,
.peek-row--tools > .cred-field-value {
  flex: 1 1 auto;
  min-width: 0;
}

.peek-row--tools .mini-btn {
  flex-shrink: 0;
}

.detail-row--tools .peek-row--tools {
  justify-content: flex-end;
}

@media (max-width: 420px) {
  .detail-row--tools .peek-row--tools {
    justify-content: flex-start;
  }
}

.card-tx-see-all-wrap {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-tx-see-all {
  width: 100%;
  justify-content: center;
}

.card-tx-block {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
}

.card-tx-mini {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-tx-mini:last-child {
  border-bottom: none;
}

.card-tx-mini__main {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
}

.card-tx-mini .subtle,
.card-tx-mini__main .subtle {
  grid-column: 1 / -1;
  font-size: 12px;
}

.sel-card-tx-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.sel-card-tx-mini .sel-tx-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--line);
}

.pagination.hidden {
  display: none;
}

/* Web-only email sign-in (browser, not Telegram Mini App) */
.web-auth-view {
  position: relative;
  z-index: 5;
  min-height: min(70vh, 560px);
  padding: 24px 18px 32px;
  box-sizing: border-box;
  overflow-x: clip;
  isolation: isolate;
}

.web-auth-welcome {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.web-auth-welcome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.web-auth-welcome-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.web-auth-top-btn {
  min-height: 42px;
  padding: 9px 14px;
}

.web-auth-welcome-hero {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 88%, transparent), color-mix(in srgb, var(--panel-2) 84%, transparent));
  box-shadow: var(--shadow-glass);
  padding: clamp(18px, 3.2vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.web-auth-welcome-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.web-auth-welcome-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-h);
  max-width: 18ch;
}

.web-auth-welcome-lead {
  margin: 0;
  max-width: 60ch;
}

.web-auth-welcome-points {
  margin: 2px 0 4px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.web-auth-welcome-points li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
}

.web-auth-welcome-points li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 72%, white 28%);
}

.web-auth-welcome-start {
  width: fit-content;
  min-width: 190px;
}

/* Слабее свечение у основной кнопки — без размаза к краям экрана */
.web-auth-view .primary-btn:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), 0 0 20px rgba(110, 200, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.web-auth-panel {
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}

.web-auth-brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--text-h);
}

.web-auth-lead {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  opacity: 0.92;
}

.web-auth-status {
  margin: 0 0 12px;
}

.web-auth-forms {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.web-auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.web-auth-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.web-auth-tab.active {
  border-color: rgba(110, 200, 255, 0.45);
  background: rgba(110, 200, 255, 0.12);
  color: var(--text-h);
}

.web-auth-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.web-auth-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.web-auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-h);
  font: inherit;
}

.web-auth-submit {
  margin-top: 4px;
}

.web-auth-auth-back-wrap {
  margin: 0 0 2px;
  text-align: right;
}

.web-auth-back {
  margin-top: 4px;
}

.web-auth-err {
  margin: 0;
  font-size: 13px;
  color: #f87171;
  min-height: 1.2em;
}

.web-auth-err.ui-error-block:not(:empty) {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.38);
  background: rgba(248, 113, 113, 0.1);
  min-height: 0;
}

.web-auth-err--ok {
  color: #6ee7b7;
}

.web-auth-err--ok.ui-error-block:not(:empty) {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
}

.dropdown .cred-fetch-error.ui-error-block:not(:empty) {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(255, 200, 200, 0.95);
  background: rgba(220, 60, 80, 0.14);
  border: 1px solid rgba(255, 120, 140, 0.32);
}

.web-auth-dev-hint {
  font-family: var(--mono);
  font-size: 12px;
}

.web-auth-delivery-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.web-auth-resend-wrap {
  margin: 10px 0 4px;
}

#webAuthOtpPane .web-auth-resend-wrap {
  margin: 0;
}

#webAuthOtpPane .web-auth-delivery-note {
  margin: 0;
}

#webAuthOtpPane .web-auth-err {
  min-height: 0;
}

#webAuthOtpPane .web-auth-err:empty {
  display: none;
}

.web-auth-resend-timer {
  margin: 6px 0 0;
  font-size: 12px;
  min-height: 1.25em;
  color: var(--muted);
}

.web-auth-forgot-wrap {
  margin: 4px 0 0;
  text-align: right;
}

.web-auth-linkish {
  font-size: 13px;
  padding: 6px 10px;
  min-height: auto;
}

.web-auth-post {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(110, 200, 255, 0.08);
}

@media (max-width: 900px) {
  .web-auth-welcome-title {
    max-width: 22ch;
  }
}

@media (max-width: 640px) {
  .web-auth-view {
    min-height: min(76vh, 620px);
    padding: 18px 14px 24px;
  }

  .web-auth-welcome {
    gap: 18px;
  }

  .web-auth-welcome-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .web-auth-welcome-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .web-auth-top-btn {
    width: 100%;
    min-height: 46px;
  }

  .web-auth-welcome-title {
    font-size: clamp(24px, 8.4vw, 34px);
    max-width: none;
  }

  .web-auth-welcome-start {
    width: 100%;
  }
}
