/* ═══════════════════════════════════════════════════════════════════════
   Golden Card — Личный кабинет (app.css)
   Переиспуем дизайн-токены и шрифты из styles.css (подключается первым).
   ═══════════════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body.app-body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────── Верхняя панель ─────────────── */
.app-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.app-logo-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #2C1F04, var(--gold));
  display: flex; align-items: center; justify-content: center;
}
.app-logo-text { font-weight: 800; font-size: 17px; letter-spacing: -0.3px; }
.app-logo-text span { color: var(--gold); }
.app-topbar-right { font-size: 13px; color: var(--muted); margin-left: auto; }

/* ─────────────── Верхние вкладки кабинета (Виртуальные карты / Оплата сервисов) ─────────────── */
.topnav { display: flex; align-items: center; gap: 4px; margin-left: 26px; }
.topnav-tab {
  border: none; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--muted);
  padding: 8px 14px; border-radius: 99px;
  transition: color .15s ease, background .15s ease;
  white-space: nowrap;
}
.topnav-tab:hover { color: var(--text); }
.topnav-tab.active { color: var(--gold); background: rgba(124, 58, 237, .09); }
/* телефон: вкладки второй строкой на всю ширину, по центру */
@media (max-width: 700px) {
  .app-topbar { flex-wrap: wrap; height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 10px; row-gap: 4px; }
  .topnav { order: 3; width: 100%; margin-left: 0; justify-content: center; }
  .topnav-tab { font-size: 13px; padding: 7px 12px; }
}
/* широкий десктоп: меню по центру шапки (шапка sticky = positioned, absolute считается от неё) */
@media (min-width: 860px) {
  .topnav { position: absolute; left: 50%; transform: translateX(-50%); margin-left: 0; }
}
.app-logout { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.app-logout:hover { color: var(--text); }

/* ─────────────── Контейнер контента ─────────────── */
.app-wrap { max-width: 480px; margin: 0 auto; padding: 24px 16px calc(100px + env(safe-area-inset-bottom, 0px)); }

/* ─────────────── Экран входа / регистрации ─────────────── */
.auth-shell { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 28px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}
.auth-title { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.auth-sub { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 24px; }
/* Тихая подсказка про папку «Спам» — под полем почты, ненавязчивая */
.auth-note {
  display: flex; align-items: center; gap: 6px;
  color: var(--muted);
  font-size: 13px; font-weight: 500; line-height: 1.4;
  margin: 10px 2px 18px;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.field input[type="email"],
.field input[type="text"],
.field input[type="number"] {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit; font-size: 15px;
  background: #fff; color: var(--text);
  transition: border-color .15s;
}
.field input:focus { outline: none; border-color: var(--gold); }

.consent { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 22px; }
.consent input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--gold); flex-shrink: 0; }
.consent label { font-size: 12.5px; color: var(--muted); line-height: 1.5; cursor: pointer; }
.consent a { color: var(--gold); text-decoration: none; }
.consent a:hover { text-decoration: underline; }

/* Кнопка (переиспользуем .btn .btn-gold из styles.css, добавляем full + disabled) */
.btn-full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ─────────────── Модалка кода ─────────────── */
.app-modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(13,13,13,0.5);
  z-index: 100;
  align-items: center; justify-content: center;
  padding: 20px;
}
.app-modal-backdrop.open { display: flex; }
.app-modal {
  background: var(--card);
  border-radius: var(--r);
  padding: 30px 26px;
  width: 100%; max-width: 400px;
  text-align: center;
  position: relative;
}
.app-modal h2 { font-size: 21px; font-weight: 800; margin-bottom: 8px; }
.app-modal p { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 22px; }
.app-modal p b { color: var(--text); }

.otp { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.otp input {
  width: 44px; height: 54px;
  text-align: center;
  font-size: 22px; font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff; color: var(--text);
}
.otp input:focus { outline: none; border-color: var(--gold); }

.link-btn { background: none; border: none; color: var(--gold); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.hint { font-size: 12px; color: var(--muted); margin-top: 14px; }
.error-text { color: #C0392B; font-size: 13px; margin-top: 10px; min-height: 16px; }

.modal-x {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: var(--bg); color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal-x:hover { color: var(--text); }

/* ─────────────── Вкладки (нижняя навигация) ─────────────── */
.app-tabs {
  position: fixed; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  width: calc(100% - 28px); max-width: 460px;
  height: 62px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;                                  /* плавающая «таблетка» (овальная рамка) */
  box-shadow: 0 8px 28px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .05);
  display: flex;
  z-index: 40;
  padding: 0 6px;
}
.app-tab {
  flex: 1;
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font: inherit; font-size: 10px; font-weight: 600;
  border-radius: 999px;
  text-decoration: none; text-align: center; line-height: 1.15;
}
.app-tab svg { width: 22px; height: 22px; }
.app-tab.active { color: var(--gold); }

/* ─────────────── Экран выбора карты ─────────────── */
.screen-title { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 6px; }
.screen-sub { font-size: 14px; color: var(--muted); margin-bottom: 22px; line-height: 1.5; }

/* ─────────────── Оплата сервисов (вторая верхняя вкладка): витрина ─────────────── */
.svc-loading { text-align: center; color: var(--muted); font-size: 14px; padding: 26px 10px; }
.svc-note { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
/* герой «Пополнение Steam» */
.svc-hero {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 20px 18px; margin-bottom: 26px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .05);
}
.svc-hero__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.svc-hero__img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.svc-hero__head h3 { font-size: 18px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 3px; }
.svc-hero__head p { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
/* блоки категорий: топ-4 товара */
.svc-cat { margin-bottom: 24px; }
.svc-cat__head h3 { font-size: 16px; font-weight: 800; letter-spacing: -.2px; margin-bottom: 10px; }
.svc-prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.svc-prod {
  text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s ease, transform .1s ease;
}
.svc-prod:hover { border-color: var(--gold); transform: translateY(-2px); }
.svc-prod img { width: 100%; aspect-ratio: 1.9/1; object-fit: cover; border-radius: 10px; background: var(--bg); }
.svc-prod__noimg { width: 100%; aspect-ratio: 1.9/1; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.svc-prod h4 { font-size: 13px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svc-prod p { font-size: 12px; color: var(--gold); font-weight: 700; margin-top: auto; }
/* экран товара */
.svc-detail { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 20px 18px; }
.svc-detail__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.svc-detail__head img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.svc-detail__head h2 { font-size: 18px; font-weight: 800; letter-spacing: -.3px; line-height: 1.25; }
.svc-detail__head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
/* выбор номинала */
.svc-sku-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.svc-sku {
  font: inherit; cursor: pointer; text-align: left;
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px;
  transition: border-color .15s ease;
}
.svc-sku span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.svc-sku b { font-size: 13.5px; }
.svc-sku--on, .svc-sku:hover { border-color: var(--gold); }
.svc-sku--on { background: rgba(124, 58, 237, .06); }
/* «Все сервисы»: пагинация */
.svc-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.svc-page-btn {
  width: 38px; height: 38px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.svc-page-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.svc-page-btn:disabled { opacity: .35; cursor: default; }
.svc-page-info { font-size: 13px; color: var(--muted); font-weight: 600; }
/* оплата и выдача */
.svc-pay { text-align: center; }
.svc-pay h2 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.svc-paystatus { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.svc-code {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  background: var(--bg); border: 1px dashed var(--gold); border-radius: 12px;
  padding: 12px 16px; font-size: 16px; font-weight: 800; letter-spacing: .5px;
  word-break: break-all;
}

.card-choice-list { display: flex; flex-direction: column; gap: 16px; }
.card-choice {
  text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--card); padding: 16px;
  display: flex; gap: 14px; align-items: center;
  transition: border-color .15s, transform .1s;
}
.card-choice:hover { border-color: var(--gold); transform: translateY(-2px); }
.card-choice-mini {
  width: 64px; height: 42px; border-radius: 8px; flex-shrink: 0;
}
.card-choice-mini.travel { background: linear-gradient(140deg, #1C1408, #6B520F); }
.card-choice-mini.sub    { background: linear-gradient(140deg, #111, #333); }
.card-choice-mini.ads    { background: linear-gradient(140deg, #0C1520, #1E3040); }
.card-choice-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.card-choice-info p { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.card-choice-arrow { margin-left: auto; color: var(--muted); }

/* ─────────────── Кнопка «назад» ─────────────── */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
  margin-bottom: 16px; padding: 0;
}
.back-btn:hover { color: var(--text); }

/* плашка-заглушка для будущих экранов */
.soon {
  margin-top: 24px; padding: 16px; border-radius: 14px;
  background: var(--gold-light); border: 1px dashed var(--gold);
  font-size: 13px; color: #8a6a12; line-height: 1.5;
}

/* ─────────────── Описание карты ─────────────── */
.card-feature { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.card-feature:last-of-type { border-bottom: none; }
.card-feature-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--gold-light); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-feature-txt h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.card-feature-txt p { font-size: 13px; color: var(--muted); line-height: 1.4; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.price-row .label { font-size: 14px; color: var(--muted); }
.price-row .val { font-size: 22px; font-weight: 800; }

/* ─────────────── Карта в кабинете (с переворотом) ─────────────── */
.lkcard-wrap { perspective: 1200px; margin-bottom: 14px; }
/* Карта-«призрак» на экране выпуска: те же размеры и скругление, но только контур пунктиром */
.lkcard-ghost {
  width: 100%; aspect-ratio: 1.6 / 1; border-radius: 18px;
  border: 2px dashed var(--gold); background: transparent;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--gold); font-weight: 700; font-size: 16px; padding: 24px;
  margin: 6px 0 18px;
}
/* Ряд мини-переключателей карт (только при 2+ картах); меньше размер, кольцо не режется */
.lkthumbs { display: flex; gap: 8px; overflow-x: auto; padding: 6px 8px 8px; margin-bottom: 10px; scrollbar-width: none; }
.lkthumbs::-webkit-scrollbar { display: none; }
.lkthumb { flex: 0 0 auto; width: 74px; height: 46px; border-radius: 10px; border: none; padding: 7px; cursor: pointer; position: relative; opacity: .72; transition: opacity .15s; }
.lkthumb:hover { opacity: 1; }
.lkthumb--on { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.lkthumb__num { position: absolute; left: 8px; bottom: 6px; color: #fff; font-size: 10px; font-family: ui-monospace, monospace; letter-spacing: .5px; }
.lkthumb.travel { background: linear-gradient(140deg, #1C1408 0%, #6B520F 100%); }
.lkthumb.sub    { background: linear-gradient(140deg, #111 0%, #333 100%); }
.lkthumb.ads    { background: linear-gradient(140deg, #0C1520 0%, #1E3040 100%); }
.lkthumb--add { background: #fff; border: 2px dashed var(--border); color: var(--gold); display: flex; align-items: center; justify-content: center; opacity: 1; }
.lkthumb--add span { font-size: 30px; font-weight: 300; line-height: 1; }
.lkthumb--add:hover { border-color: var(--gold); }
body.app-body .lkthumb.travel { background: linear-gradient(140deg, #4C1D95 0%, #9F7AEA 100%); }

/* ─── Карусель карт: адаптивный ряд (десктоп — во всю ширину, телефон — свайп пальцем) ─── */
.lkcarousel {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 24px 0;   /* вертикальный запас: при 3D-перевороте ближняя грань «раздувается» выше рамки, иначе overflow-y её режет */
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.lkcarousel::-webkit-scrollbar { display: none; }
.lkcard-item {
  flex: 0 0 min(440px, 78vw); scroll-snap-align: start;
  aspect-ratio: 1.6/1; border-radius: 18px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  opacity: .8; transition: opacity .2s ease; perspective: 2000px;   /* мягче 3D — ближняя грань меньше выходит за рамку при перевороте */
}
.lkcard-item.lkcard--active { opacity: 1; }
/* внутренняя обёртка переворачивается по клику на выбранную карту */
.lkci-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s; }
.lkcard-item.flipped .lkci-inner { transform: rotateY(180deg); }
.lkci-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 18px; padding: 20px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  background: #6D28D9 url('assets/card-face.jpg') center / cover no-repeat;   /* картинка карты (обрезана впритык, JPEG) */
}
.lkci-back { transform: rotateY(180deg); }
/* плитка «+» — теперь полноценная карта: пунктир, крупный плюс и подпись */
.lkadd-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px;
  background: transparent; border: 2px dashed #C9C4DE; color: var(--gold);
  transition: border-color .15s ease, opacity .2s ease;
}
.lkadd-item:hover, .lkadd-item.lkcard--active { border-color: var(--gold); }
.lkadd-plus { font-size: 46px; font-weight: 300; line-height: 1; }
.lkadd-cap { font-size: 15px; font-weight: 700; text-align: center; letter-spacing: -.2px; }
/* когда карт ещё нет — единственная плитка «+» занимает всю ширину (без запаса под соседнюю карту) */
.lkcarousel--solo .lkcard-item { flex-basis: 100%; }

/* ─── Качающийся подарок (бонусы за первое пополнение) ─── */
.bonus-gift {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));   /* правый нижний угол */
  z-index: 45; border: none; background: none; cursor: pointer; padding: 4px;
  font-size: 36px; line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(124, 58, 237, .35));
  animation: gift-sway 2.4s ease-in-out infinite;
  transform-origin: 50% 0;
  -webkit-tap-highlight-color: transparent;
}
@keyframes gift-sway {
  0%, 100% { transform: rotate(-9deg); }
  50% { transform: rotate(9deg); }
}
/* узкий телефон: подарок в самом углу, поверх правого края плавающего меню */
@media (max-width: 560px) {
  .bonus-gift { right: 6px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
/* десктоп: подарок крупнее в 2 раза */
@media (min-width: 561px) {
  .bonus-gift { font-size: 72px; }
}
/* ─── Модалка с баннером: поднимается снизу к центру экрана ─── */
.bonus-modal {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(13, 13, 13, .55);
  align-items: center; justify-content: center;
  padding: 24px 16px;
}
.bonus-modal.open { display: flex; }
.bonus-sheet { position: relative; animation: bonus-up .45s cubic-bezier(.22, .9, .3, 1); }
@keyframes bonus-up {
  from { transform: translateY(100vh); }
  to { transform: translateY(0); }
}
.bonus-sheet img {
  display: block; max-width: min(504px, 100%); max-height: min(94vh, 912px);   /* +20% к исходному размеру */
  width: auto; border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}
.bonus-x {
  position: absolute; top: 0; right: -48px;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.bonus-x:hover { background: rgba(255, 255, 255, .3); }
/* узкий экран: баннер компактнее десктопного, крестик над баннером справа (сбоку не помещается) */
@media (max-width: 560px) {
  .bonus-sheet img { max-width: 99%; max-height: 76vh; margin: 0 auto; }
  .bonus-x { top: -46px; right: 0; }
}
/* условия выпуска под плиткой «+» (инлайн) */
.issue-inline__title { font-size: 18px; font-weight: 800; margin: 4px 0 4px; }
.issue-inline__sub { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
/* плашка-точки под каруселью: сколько карт (страниц) + выбранная фиолетовым */
.lkdots { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 2px 0 14px; }
.lkdot {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px;
  background: #CBC5DC; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: width .2s ease, background .2s ease;
}
.lkdot--on { width: 22px; background: var(--gold); }
/* компьютер: карусель во всю ширину, соседние карты выступают по бокам (размер карт не меняем) */
@media (min-width: 900px) {
  .lkcarousel {
    width: 100vw; margin-left: 50%; transform: translateX(-50%);
    padding-left: max(16px, calc(50vw - 220px)); padding-right: max(16px, calc(50vw - 220px));
    scroll-padding-inline: max(16px, calc(50vw - 220px));
  }
  .lkcard-item { scroll-snap-align: center; }
}

.lkcard {
  position: relative; width: 100%; aspect-ratio: 1.6 / 1;
  transform-style: preserve-3d; transition: transform .5s; cursor: pointer;
}
.lkcard.flipped { transform: rotateY(180deg); }
.lkcard__face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 18px; padding: 20px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 14px 40px rgba(0,0,0,0.22);
}
.lkcard__face.travel { background: linear-gradient(140deg, #1C1408 0%, #3A2A06 50%, #6B520F 100%); }
.lkcard__face.sub    { background: linear-gradient(140deg, #111 0%, #222 50%, #333 100%); }
.lkcard__face.ads    { background: linear-gradient(140deg, #0C1520 0%, #162030 50%, #1E3040 100%); }
.lkcard__back { transform: rotateY(180deg); }
.lkcard__top { display: flex; justify-content: space-between; align-items: flex-start; }
.lkcard__brand { font-weight: 800; font-size: 13px; line-height: 1.1; letter-spacing: .5px; }
.lkcard__brand span { color: #E8C97A; }
.lkcard__bal-label { font-size: 11px; opacity: .7; }
.lkcard__bal { font-size: 26px; font-weight: 800; margin-top: 2px; }
.lkcard__num { font-size: 17px; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.lkcard__bottom { display: flex; justify-content: space-between; align-items: flex-end; font-size: 12px; }
.lkcard__visa { font-style: italic; font-weight: 800; font-size: 20px; }
.lkcard__row { display: flex; justify-content: space-between; font-size: 12px; }
.lkcard__row .k { opacity: .65; }

.card-details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 4px 16px; margin-bottom: 16px; }
.card-details .d-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.card-details .d-row:last-child { border-bottom: none; }
.card-details .d-row .k { color: var(--muted); flex-shrink: 0; }
.card-details .d-row .v { font-weight: 600; text-align: right; }

.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-row .btn { flex: 1; }
.btn-ghost { background: var(--card); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ─────────────── Блок истории на главной ─────────────── */
.hist-block { margin-top: 22px; }
.hist-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hist-head h3 { font-size: 16px; font-weight: 800; }
.op {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.op:last-child { border-bottom: none; }
.op-ico { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.op-ico.in  { background: #E6F4EA; color: #1E8E3E; }
.op-ico.out { background: #FCE8E6; color: #C5221F; }
.op-ico.neutral { background: var(--bg); color: var(--muted); }
.op-main { flex: 1; min-width: 0; }
.op-title { font-size: 14px; font-weight: 600; }
.op-sub { font-size: 12px; color: var(--muted); }
.op-amt { font-weight: 700; font-size: 14px; white-space: nowrap; }
.op-amt.in { color: #1E8E3E; }
.op-status { font-size: 11px; color: var(--muted); }

/* ─────────────── Фильтры истории ─────────────── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-chip {
  border: 1px solid var(--border); background: var(--card);
  border-radius: 20px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text);
}
.filter-chip.active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ─────────────── Группировка истории по картам ─────────────── */
.hist-group { margin-bottom: 10px; }
.hist-group + .hist-group { border-top: 1px solid var(--border); padding-top: 4px; }
.hist-group-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .3px; margin: 16px 0 4px; }
.hist-dot { width: 24px; height: 16px; border-radius: 4px; flex-shrink: 0; }

/* ─────────────── Пополнение ─────────────── */
.rate-note { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.4; }
.select-card-mini { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.select-card-mini button {
  border: 1px solid var(--border); background: var(--card); border-radius: 12px;
  padding: 10px 12px; cursor: pointer; font: inherit; font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.select-card-mini button.active { border-color: var(--gold); }
.select-card-mini .dot { width: 28px; height: 18px; border-radius: 5px; }

/* ─────────────── QR оплата ─────────────── */
.qr-box { width: 200px; height: 200px; margin: 0 auto 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.qr-box svg { width: 100%; height: 100%; }
.qr-sum { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.qr-timer { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.qr-timer b { color: var(--gold); }
.qr-warn { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 10px; margin: 12px 0; line-height: 1.4; }
.qr-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* ─────────────── Экраны статусов / ожидания / успеха ─────────────── */
.status-screen { text-align: center; padding: 40px 0; }
.status-emoji { font-size: 48px; margin-bottom: 14px; }
.status-screen h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.status-screen p { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.big-timer { font-size: 34px; font-weight: 800; color: var(--gold); margin: 10px 0 20px; font-variant-numeric: tabular-nums; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--border); border-top-color: var(--gold); border-radius: 50%; margin: 0 auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.demo-tag {
  display: inline-block; margin-top: 14px; font-size: 11px; color: var(--muted);
  background: var(--bg); border-radius: 8px; padding: 6px 10px;
}

/* ══════════════ ВРЕМЕННЫЙ ребрендинг Aifory Pro (ТОЛЬКО кабинет+регистрация): золото → фиолетовый.
   Откат: удалить весь этот блок + вернуть «Aifory Pro»→«Golden Card» в app.html/app.js. См. память temp-aifory-rebrand. ══════════════ */
body.app-body { --gold: #7C3AED; --gold-hover: #6D28D9; --gold-light: #F1EBFF; --bg: #F1F1F4; --border: #E4E4EA; }
body.app-body .app-logo-icon { background: linear-gradient(135deg, #4C1D95, #7C3AED); }
body.app-body .lkcard__face.travel { background: linear-gradient(140deg, #4C1D95 0%, #6D28D9 50%, #9F7AEA 100%); }
body.app-body .card-choice-mini.travel { background: linear-gradient(140deg, #4C1D95, #7C3AED); }
body.app-body .lkcard__brand span { color: #C4B5FD; }   /* «PRO» на карте — светло-фиолетовый вместо золота */

/* ══════════════ РЕСТАЙЛ КАБИНЕТА под референс: системный шрифт, витрина выпуска ══════════════ */
/* Системный шрифт (как в нативных приложениях) — только кабинет, лендинг не трогаем */
body.app-body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.1px;
}
body.app-body .btn { border-radius: 16px; padding: 15px 24px; font-size: 15.5px; }

/* ── Витрина выпуска: герой-баннер ── */
.hero {
  border-radius: 22px; overflow: hidden; position: relative;
  padding: 26px 20px 22px; margin-bottom: 12px;
  color: #fff; text-align: center;
  background: linear-gradient(165deg, #4C1D95 0%, #6D28D9 55%, #8B5CF6 100%);
}
.hero h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.4px; margin: 0 0 6px; }
.hero p { font-size: 13.5px; opacity: .85; margin: 0; line-height: 1.4; }
.hero-cardvisual {
  width: 200px; height: 122px; margin: 4px auto 20px; position: relative; text-align: left;
  border-radius: 15px; padding: 13px 15px;
  background: linear-gradient(140deg, rgba(255,255,255,.22), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.4);
  transform: rotate(-6deg);
  box-shadow: 0 20px 44px rgba(0,0,0,.35);
}
.hero-cardvisual .hv-brand { font-weight: 800; font-size: 12px; letter-spacing: .4px; line-height: 1.25; }
.hero-cardvisual .hv-brand span { opacity: .7; }
.hero-cardvisual .hv-num { position: absolute; left: 15px; bottom: 12px; font-size: 12px; letter-spacing: 2.5px; opacity: .9; }
.hero-cardvisual .hv-visa { position: absolute; right: 13px; bottom: 10px; font-style: italic; font-weight: 800; font-size: 14px; }

/* ── Строка курса ── */
.rate-row2 {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 15px 16px; font-size: 14.5px; margin-bottom: 12px;
}
.rate-row2 b { color: var(--gold); font-size: 15px; }

/* ── Промо-баннер «Обмен крипты» на экране карты (под кнопками, над историей) ── */
.cx-banner { position: relative; display: block; width: 100%; margin: 16px 0; border-radius: 18px; overflow: hidden; line-height: 0; box-shadow: 0 4px 16px rgba(124, 58, 237, .14); }
.cx-banner img { width: 100%; height: auto; display: block; }
.cx-banner__btn {
  position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 12px;
  background: #fff; color: var(--gold); font-size: 13.5px; font-weight: 700; line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .24), 0 2px 6px rgba(0, 0, 0, .14);
  transition: background .16s ease, color .16s ease;
}
.cx-banner:hover .cx-banner__btn { background: var(--gold-light); }
.cx-banner:active .cx-banner__btn { background: #E6DCFA; }

/* ── Баннер-оверлей «свяжитесь с поддержкой» (превью; позже — по флажку клиента) ── */
.notice-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(20,17,11,.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.notice-pop { position: relative; width: 100%; max-width: 420px; background: linear-gradient(135deg, #6D28D9 0%, #7C3AED 100%); border-radius: 22px; padding: 32px 26px 26px; color: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.35); text-align: center; }
.notice-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
.notice-x:hover { background: rgba(255,255,255,.28); }
.notice-ico { width: 60px; height: 60px; margin: 2px auto 16px; border-radius: 16px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; }
.notice-title { font-size: 19px; font-weight: 800; line-height: 1.34; margin: 0 0 8px; color: #fff; }
.notice-sub { font-size: 14px; color: rgba(255,255,255,.78); margin: 0 0 20px; }
.notice-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 12px; background: #fff; color: var(--gold); font-weight: 700; font-size: 15px; text-decoration: none; }

/* ── Сетка карточек-фич (2 колонки) ── */
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.feat {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 14px 10px; min-height: 122px;
  display: flex; flex-direction: column;
}
.feat h4 { font-size: 14px; font-weight: 700; letter-spacing: -0.2px; margin: 0 0 4px; line-height: 1.25; }
.feat p { font-size: 12px; color: var(--muted); line-height: 1.35; margin: 0; }
.feat .feat-emoji { margin-top: auto; align-self: flex-end; font-size: 34px; line-height: 1.1; }

/* ── Аккордеоны («Условия», FAQ) ── */
.acc { background: var(--card); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 10px; }
.acc summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 16px; font-size: 15px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ''; width: 9px; height: 9px; flex-shrink: 0; margin-left: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); transition: transform .15s;
}
.acc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.acc-body { padding: 0 16px 14px; }
.acc-row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; font-size: 14px; border-top: 1px solid var(--border); }
.acc-row:first-child { border-top: none; }
.acc-row .k { color: var(--muted); }
.acc-row b { font-weight: 700; text-align: right; }
.acc-text { font-size: 13.5px; line-height: 1.55; padding-top: 2px; }
.acc-text p { margin: 0 0 8px; }
.acc-text p:last-child { margin-bottom: 0; }

/* ── Прилипшая кнопка выпуска (над нижним меню) ── */
.cta-sticky {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 32px); max-width: 448px; height: 54px;
  border: none; border-radius: 999px;
  background: var(--gold); color: #fff;
  font: inherit; font-size: 16px; font-weight: 800; letter-spacing: -0.2px;
  cursor: pointer; z-index: 39;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.cta-sticky:hover { background: var(--gold-hover); }
/* значок СБП в белом бейдже на фиолетовых кнопках */
.sbp-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 26px; height: 26px; padding: 3px; border-radius: 7px; background: #fff;
}
.sbp-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* значок СБП вместо эмодзи в плитке возможностей */
.feat-emoji img { width: 42px; height: 42px; object-fit: contain; display: block; }
/* два логотипа Apple Pay + Google Pay рядом вместо эмодзи */
.feat-emoji .feat-pay { width: 33px; height: 33px; display: inline-block; vertical-align: middle; }
.feat-emoji .feat-pay + .feat-pay { margin-left: 5px; }

/* ─── Экран карты: ряд круглых кнопок-действий (Пополнить / Данные / Код 3DS) ─── */
.lkactions { display: flex; gap: 10px; margin: 16px 0 4px; }
.lkact {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.lkact:hover { border-color: #D6D2EA; box-shadow: 0 4px 14px rgba(124, 58, 237, .07); }
.lkact:active { transform: scale(.97); }
.lkact__ico {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-light); color: var(--gold);
  transition: background .12s ease, color .12s ease;
}
.lkact__ico svg { width: 22px; height: 22px; }
.lkact__lbl { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.15; text-align: center; }
.lkact--primary .lkact__ico,
.lkact--on .lkact__ico { background: var(--gold); color: #fff; }

/* низ карточного экрана: «выпустить новую» + тихая ссылка «закрыть карту» */
.lkfoot-new { display: flex; align-items: center; justify-content: center; gap: 7px; }
.lkclose-link {
  display: block; width: 100%; margin: 14px 0 6px; padding: 10px;
  background: none; border: 0; color: #DC2626; font-size: 14px; font-weight: 600;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.lkclose-link:hover { color: #B91C1C; text-decoration: underline; }

/* ═══════════ История транзакций ═══════════ */
.hist-title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin: 2px 0 16px; }
.hchips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; position: relative; }
.hchip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .12s, color .12s, border-color .12s;
}
.hchip--on { background: var(--gold); border-color: var(--gold); color: #fff; }
.hchip-chev { margin: 0 -3px 0 1px; opacity: .8; }
.hmenu {
  position: absolute; z-index: 30; min-width: 172px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .14); padding: 6px;
}
.hmenu-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; border-radius: 9px; background: none;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
}
.hmenu-item:hover { background: var(--bg); }
.hmenu-item.on { color: var(--gold); }
.hgroup-date { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 0 4px; }
.hrow { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.hrow-ico {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  background: var(--card); color: #4B5563;
  display: flex; align-items: center; justify-content: center;
}
.hrow-ico svg { width: 20px; height: 20px; }
.hrow-main { flex: 1; min-width: 0; }
.hrow-title { font-size: 15px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow-sub { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.hdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.hdot.green { background: #22C55E; }
.hdot.red { background: #EF4444; }
.hdot.amber { background: #F59E0B; }
.hrow-amt { font-size: 15px; font-weight: 700; white-space: nowrap; }
.hrow-amt.green { color: #16A34A; }
.hrow-amt.red { color: #DC2626; }
.hrow-amt.gray { color: var(--muted); }
.hrow-amt.dark { color: var(--text); }
.hlist { padding-bottom: 10px; }
