:root {
  --bg: #060910;
  --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);
  --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);
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-padding-top: 88px;
  scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 130% 90% at 0% -15%, rgba(110, 200, 255, 0.14), transparent 52%),
    radial-gradient(ellipse 90% 70% at 100% -5%, rgba(167, 139, 250, 0.09), transparent 48%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(56, 189, 248, 0.04), transparent 55%),
    linear-gradient(168deg, #0b101c 0%, #070b12 48%, #04060c 100%);
  background-attachment: fixed;
}

/* Мягкий «туман» за контентом — визуально размывает фон */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 100% 80% at 50% 20%, rgba(30, 60, 100, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 60% at 80% 60%, rgba(80, 50, 120, 0.08), transparent 50%);
  filter: blur(80px);
  opacity: 0.9;
}

.app::before {
  content: none;
}

.app {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 18px calc(112px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  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);
  transform: scale(1.04) translateY(-1px);
}

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

.view {
  display: block;
}

.view:not(.hidden) {
  animation: viewDramaticIn 0.7s 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::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: 2px 12px 10px;
  text-align: center;
  font-size: 10px;
  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);
}

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

.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;
}

.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);
}

.card-item.selected {
  background: rgba(110, 200, 255, 0.07);
  border-radius: 12px;
}

.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: 13px;
  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;
}

.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: 12px;
}

.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 2px;
}

.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;
  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 .cred-fetch-error {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(255, 200, 200, 0.95);
  background: rgba(220, 60, 80, 0.12);
  border: 1px solid rgba(255, 120, 140, 0.22);
}

.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, 220, 190, 0.96);
  background: rgba(255, 150, 60, 0.1);
  border: 1px solid rgba(255, 170, 90, 0.22);
}

.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%;
}

.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;
}

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

.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 {
  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;
}

.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);
}

.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: 15px;
  font-weight: 700;
  color: #f2f6ff;
  letter-spacing: 0.02em;
}

.subtle {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.25px;
}

.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);
  transform: scale(1.05) translateY(-2px);
}

.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);
}

@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 linear 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;
}

.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(72vh, 560px);
  padding: 24px 16px 48px;
  position: relative;
}

.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;
}

.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 {
    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: 4px;
  right: 10%;
  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: stroke-dashoffset 400ms linear;
}

.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;
}

.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%);
  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;
}

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

.feedback-body {
  margin: 0 0 16px !important;
  text-align: left;
}

.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%;
}

.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: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  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 -12px 40px rgba(0, 0, 0, 0.55), 0 -1px 0 rgba(110, 200, 255, 0.06);
  backdrop-filter: var(--blur-bar);
  -webkit-backdrop-filter: var(--blur-bar);
}

.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: 12px;
  padding: 8px 4px;
  min-height: 48px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  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(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.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(32px) scale(0.94);
    filter: blur(14px);
  }
  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 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: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.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(110, 200, 255, 0.28), rgba(110, 200, 255, 0.1));
  color: #ffffff;
  box-shadow: 0 0 20px rgba(110, 200, 255, 0.12);
}

.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;
}

.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-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
}

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

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

.plan-picker-summary__title {
  font-size: 12px;
  font-weight: 700;
  color: #e8eeff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-picker-summary__chev {
  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__meta {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(180, 205, 240, 0.85);
}

.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%;
}

.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: column;
  gap: 4px;
}

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

.plan-option-row__price {
  font-size: 12px;
}

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

.plan-option-bullets {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.45;
}

.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-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;
}

.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);
  transform: translateY(-6px) scale(1.02);
}

.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;
}

.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;
  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);
}

.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;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(122, 165, 255, 0.08);
}

.bulk-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.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;
}

.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;
}

.bulk-check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.card-item.bulk-on .card-head {
  cursor: default;
}

.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: width 0.8s linear;
}

.code-peek-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.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-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

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

.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.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-generic {
  background: rgba(60, 70, 95, 0.9);
  color: #dfe7ff;
}

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

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

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

.tx-amount {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

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

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

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

.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-5 {
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.bottom-nav-5 .bottom-nav-btn {
  font-size: 9px;
  padding: 8px 4px;
}

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

.bottom-nav-6 .bottom-nav-btn {
  font-size: 9px;
  padding: 8px 4px;
}

.empty-illu {
  text-align: center;
  padding: 28px 16px;
}

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

.empty-illu h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.empty-illu p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.context-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + 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 calc(112px + env(safe-area-inset-bottom, 0px));
  }

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

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

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

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

  .bottom-nav-btn {
    font-size: 10px;
    padding: 6px 2px;
    min-height: 46px;
  }

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

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

@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,
  .card-item,
  .code-item,
  .chevron {
    transition: none !important;
  }

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

/* 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 .ghost-btn,
html.perf-mode .primary-btn,
html.perf-mode .mini-btn {
  background: rgba(14, 20, 34, 0.92) !important;
}

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

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

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

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

.kv-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 1.25;
}

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

.kv-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(154, 174, 208, 0.35);
  transform: translateY(-2px);
}

.kv-val {
  font-size: 13px;
  white-space: nowrap;
}

.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: 13px;
}

.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;
}

.cards-controls-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cards-ctrl {
  display: grid;
  gap: 6px;
}

.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: flex-start;
}

@media (min-width: 480px) {
  .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;
}

.confirm-pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  font-family: inherit;
}

@media (max-width: 520px) {
  .cards-controls-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;
  transition: color 0.15s var(--ease-out-expo), border-color 0.15s var(--ease-out-expo),
    background 0.15s var(--ease-out-expo);
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--line-glow);
}

.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;
}

/* 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 / Name) */
.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: wrap;
  justify-content: flex-start;
  min-width: 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-drop-name {
  font-weight: 600;
}

.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: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 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 .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;
}
