/* ===================== VARIABLES ===================== */
@font-face {
  font-family: 'Twemoji Country Flags';
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0067, U+E007F;
  src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@2.0.0/dist/TwemojiCountryFlags.woff2') format('woff2');
}

:root {
  --bg: #111111;
  --bg2: #181818;
  --card: #1d1d1d;
  --card2: #252525;
  --card3: #2c2c2c;
  --border: #282828;
  --border2: #333333;

  --accent: #276af4;
  --accent-dim: rgba(39, 106, 244, 0.15);
  --accent-sel: #182d66;

  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --amber: #f59e0b;
  --red: #ef4444;

  --text: #ffffff;
  --text2: #888888;
  --text3: #555555;

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  --banner-from: #1a3ec5;
  --banner-to: #2755e8;

  --nav-h: 64px;
  --sticky-h: 72px;
}

/* ===================== RESET & BASE ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  overflow: hidden;
}

input,
button {
  font-family: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
  background: none;
  color: inherit;
}

input {
  background: none;
  color: var(--text);
}

input::placeholder {
  color: var(--text3);
}

/* ===================== PAGES ===================== */
.page {
  display: none;
  flex-direction: column;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* animation: pageIn 0.22s ease forwards; */
}

.page.active {
  display: flex;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pageInLeft {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.page-content::-webkit-scrollbar {
  display: none;
}

.page-content.padded {
  padding: 16px 16px 0;
}

#page-shop .page-content,
#page-account .page-content,
#page-help .page-content {
  padding-bottom: 110px;
}

.page-content.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===================== SHOP HEADER ===================== */
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 16px;
}

.shop-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
}

.balance-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full);
  padding: 7px 14px 7px 10px;
  font-size: 14px;
  font-weight: 700;
  transition: opacity 0.15s;
}

.balance-btn:active {
  opacity: 0.8;
}

.balance-btn .svg-icon {
  width: 16px;
  height: 16px;
  color: #fff;
}

/* ===================== SEARCH BAR ===================== */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--card2);
  border-radius: var(--r-md);
  padding: 11px 14px;
  gap: 10px;
  margin-bottom: 14px;
}

.search-icon {
  flex-shrink: 0;
  color: var(--text3);
  width: 18px;
  height: 18px;
}

.search-input {
  flex: 1;
  font-size: 15px;
  color: var(--text);
  background: none;
}

/* ===================== TABS ===================== */
.tabs-row {
  display: flex;
  gap: 4px;
  background: var(--card2);
  border-radius: var(--r-full);
  padding: 3px;
  margin-bottom: 14px;
}

.tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab.active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===================== BANNER ===================== */
.banner {
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow: hidden;
}

.banner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.banner-body {
  flex: 1;
}

.banner-text {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 10px;
}

.banner-action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background 0.2s;
}

.banner-action-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

.banner-close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: rgba(255, 255, 255, 0.7);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-close .svg-icon {
  width: 16px;
  height: 16px;
}

.banner-icon-wrap {
  flex-shrink: 0;
}

.banner-icon-wrap .icon-img-placeholder {
  border-radius: 50%;
  display: block;
}

/* ===================== REFERRAL BANNER ===================== */
.referral-banner {
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  margin-top: 10px;
}

.referral-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -20px;
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.referral-banner-body {
  flex: 1;
}

.referral-banner-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 10px;
}

.referral-banner-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--r-full);
  cursor: pointer;
}

.referral-banner-icon {
  flex-shrink: 0;
}

.ref-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--r-full);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

/* ===================== SECTION LABEL ===================== */
.section-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  padding: 0 4px;
  opacity: 0.8;
}

/* ===================== LIST ===================== */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  margin-top: 0;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  background: var(--card2);
  border-radius: var(--r-lg);
  transition: background 0.15s, transform 0.1s;
  position: relative;
}

.list-item:active {
  background: var(--card3);
  transform: scale(0.98);
}

.card-item {
  background: var(--card);
  border-radius: var(--r-lg);
}

.list .list-item {
  border-radius: var(--r-lg);
}

.list .list-item:first-child {
  border-radius: var(--r-lg);
}

.list .list-item:last-child {
  border-radius: var(--r-lg);
}

.list .list-item:only-child {
  border-radius: var(--r-lg);
}

.list-divider {
  display: none;
}

.list-item-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flag-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.flag-emoji {
  font-size: 28px;
  line-height: 1;
  font-family: 'Twemoji Country Flags', 'Courier New', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-sub {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 1px;
}

.list-item-notice {
  font-size: 11px;
  color: var(--amber);
  margin-top: 3px;
}

.chevron {
  width: 18px;
  height: 18px;
  color: var(--text3);
  flex-shrink: 0;
}

.check-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ===================== SVG ICON ===================== */
.svg-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.svg-icon.sm {
  width: 18px;
  height: 18px;
}

.svg-icon.nav-icon {
  width: 22px;
  height: 22px;
}

.svg-icon.white {
  color: #fff;
}

/* ===================== IMAGE PLACEHOLDERS ===================== */
.icon-img-placeholder {
  display: block;
  border-radius: 50%;
}

.icon-img-placeholder.sm {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-img-placeholder.lg {
  width: 68px;
  height: 68px;
}

/* ===================== BOTTOM NAV ===================== */
/* ===================== BOTTOM NAV ===================== */
.bottom-nav {
  position: fixed;
  bottom: 18px;
  left: 45px;
  right: 45px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 72px;
  background: rgba(28, 28, 30, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 36px;
  padding: 0 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.bottom-nav.hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

@keyframes navSlideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-item {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #8e8e93;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1;
}

.nav-item.active {
  color: #ffffff;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  inset: 6px 8px;
  background: #2c2c2e;
  border-radius: 32px;
  z-index: -1;
  animation: navTabPop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes navTabPop {
  0% {
    transform: scale(0.75);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.nav-item:active .svg-icon {
  transform: scale(0.9);
}

.nav-item .svg-icon {
  width: 24px;
  height: 24px;
  color: inherit;
  margin-bottom: 2px;
  transition: transform 0.25s;
}

.nav-item.active .svg-icon {
  transform: translateY(-2px);
}

/* ===================== BACK HEADER ===================== */
.back-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 16px;
}

.back-btn {
  width: 36px;
  height: 36px;
  background: var(--card2);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  flex-shrink: 0;
  transition: background 0.15s;
}

.back-btn .svg-icon {
  width: 18px;
  height: 18px;
}

.back-btn:active {
  background: var(--card3);
}

/* В Telegram Mini App нативная BackButton заменяет кнопку в хедере */
.tma-mode .back-btn {
  display: none;
}

.back-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.page-heading {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  padding: 14px 0 18px;
}

/* ===================== COUNTRY HERO ===================== */
.country-hero {
  text-align: center;
  padding: 10px 0 20px;
}

.country-hero-flag {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 10px;
  font-family: 'Twemoji Country Flags', sans-serif;
}

.country-hero-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.country-hero-sub {
  font-size: 14px;
  color: var(--text2);
}

/* ===================== TARIFF CARD ===================== */
.tariff-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  cursor: pointer;
  background: var(--card2);
  border-radius: var(--r-lg);
  transition: background 0.15s, transform 0.1s;
}

.tariff-card:active {
  background: var(--card3);
  transform: scale(0.98);
}

.tariff-card.selected {
  background: var(--accent-sel) !important;
  border: 1.5px solid var(--accent);
}

.tariff-card.selected .tariff-gb,
.tariff-card.selected .tariff-price {
  color: var(--text);
}

.tariff-info {
  flex: 1;
  min-width: 0;
}

.tariff-gb {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.tariff-days {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.tariff-price-info {
  text-align: right;
  margin-right: 6px;
}

.tariff-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.tariff-per-gb {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.discount-badge {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  flex-shrink: 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio.checked {
  border-color: var(--accent);
  background: var(--accent);
}

.radio.checked::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* ===================== STICKY BAR ===================== */
.sticky-bar {
  position: sticky;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(transparent, var(--bg) 30%);
}

/* ===================== ORDER CARD ===================== */
.order-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.order-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.order-card-meta {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 10px;
}

.order-card-total-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.order-card-total-label {
  font-size: 15px;
  color: var(--text2);
}

.order-card-total-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.order-card-flag {
  width: 64px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg2);
}

/* ===================== SETTINGS CARD ===================== */
.settings-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}

.settings-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.settings-card-sub {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}

/* ===================== TOGGLE ===================== */
.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--card3);
  border-radius: 28px;
  transition: .2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle input:checked+.toggle-slider {
  background: var(--accent);
}

.toggle input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

/* ===================== INPUT CARD ===================== */
.input-card {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 6px 6px 6px 14px;
  gap: 8px;
}

.card-input {
  flex: 1;
  font-size: 15px;
  color: var(--text);
  padding: 8px 0;
}

.card-input-btn {
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: var(--r-md);
  transition: opacity 0.15s;
}

.card-input-btn:active {
  opacity: 0.8;
}

.card-input-currency {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  padding-right: 10px;
}

/* ===================== ACTION BUTTONS ===================== */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-pay-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #22c55e;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 12px;
  border-radius: var(--r-lg);
  transition: opacity 0.15s;
}

.btn-pay-link:active {
  opacity: 0.85;
}

.btn-pay-amazon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f0bf00;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 12px;
  border-radius: var(--r-lg);
  transition: opacity 0.15s;
}

.btn-pay-amazon:active {
  opacity: 0.85;
}

/* ===================== BUTTONS ===================== */
.btn-primary {
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: var(--r-lg);
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:active {
  opacity: 0.85;
}

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

.btn-primary.full {
  width: 100%;
}

.btn-ghost {
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  padding: 12px;
  border-radius: var(--r-lg);
  text-align: center;
}

.btn-ghost:active {
  color: var(--text);
}

.btn-small {
  background: var(--card3);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-md);
  flex-shrink: 0;
}

/* ===================== MODAL ===================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-sheet {
  background: var(--bg2);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%;
  max-width: 430px;
  max-height: 88vh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0.5;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 12px auto 6px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 14px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  background: var(--card2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
}

.modal-close .svg-icon {
  width: 16px;
  height: 16px;
}

.modal-order-card {
  margin: 0 16px 4px;
  border-radius: var(--r-md);
}

/* ===================== PAYMENT METHODS LIST ===================== */
.payment-methods-list {
  padding: 0 16px;
}

.payment-method-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.payment-method-item:last-child {
  border-bottom: none;
}

.payment-method-item:active {
  opacity: 0.7;
}

.payment-method-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.payment-method-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ===================== ESIM CARD ===================== */
.esim-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 10px;
}

.esim-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.esim-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.esim-card-info {
  flex: 1;
}

.esim-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.esim-card-iccid {
  font-size: 12px;
  color: var(--text2);
  font-family: monospace;
}

.esim-card-go {
  width: 28px;
  height: 28px;
  background: var(--card2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
}

.esim-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.esim-card-traffic {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.esim-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
}

.esim-status.inactive {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
}

.esim-status.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.esim-status.delayed {
  background: rgba(65, 120, 245, 0.15);
  color: var(--accent);
}

.esim-install-btn {
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--r-md);
  transition: opacity 0.15s;
}

.esim-install-btn:active {
  opacity: 0.8;
}

/* ===================== ORDERS ===================== */
.order-item {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 8px;
}

.order-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.order-item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.order-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.order-item-meta {
  font-size: 12px;
  color: var(--text2);
}

.order-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.order-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--r-full);
}

.order-status.paid {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.order-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
}

.order-status.failed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.order-status.cancelled {
  background: var(--card2);
  color: var(--text2);
}

/* ===================== STATS ===================== */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text2);
}

/* ===================== REFERRAL HISTORY ===================== */
.referral-history-item {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.referral-friend {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.referral-date {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.referral-amount {
  font-size: 17px;
  font-weight: 800;
  color: var(--green);
}

/* ===================== FAQ ===================== */
.faq-item {
  flex-direction: column;
  align-items: stretch;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  margin-bottom: 8px;
  border-radius: var(--r-lg);
}

.faq-item:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.05);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  gap: 14px;
  padding: 16px;
}

.faq-question-text {
  flex: 1;
  letter-spacing: -0.01em;
}

.faq-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  opacity: 0.8;
  filter: drop-shadow(0 0 8px var(--accent-dim));
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  padding: 0 16px;
}

.faq-item.open {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.faq-item.open .faq-answer {
  max-height: 200px;
  opacity: 1;
  padding-bottom: 16px;
  margin-top: 4px;
}

.faq-item.open .chevron {
  transform: rotate(90deg);
  color: var(--accent);
}

/* ===================== SUPPORT CARD V2 (MESH) ===================== */
.support-card {
  background:
    radial-gradient(at 0% 0%, #1e3a8a 0px, transparent 50%),
    radial-gradient(at 100% 0%, #2563eb 0px, transparent 50%),
    radial-gradient(at 100% 100%, #3b82f6 0px, transparent 50%),
    radial-gradient(at 0% 100%, #1d4ed8 0px, transparent 50%),
    #111111;
  background-size: 200% 200%;
  animation: meshGradient 8s ease infinite;

  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 24px !important;
  border-radius: var(--r-xl) !important;
}

@keyframes meshGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.support-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.support-card-body {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.support-card-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.support-card-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  max-width: 280px;
  margin-bottom: 8px;
}

.support-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px !important;
  border-radius: var(--r-full) !important;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
  width: 100%;
}

.support-btn:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.2) !important;
}

.support-btn-icon {
  width: 20px;
  height: 20px;
  fill: #fff;
}

/* ===================== ESIM DETAIL ===================== */
.esim-detail-hero {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: center;
  margin-top: 8px;
}

.esim-detail-flag {
  font-size: 52px;
  margin-bottom: 10px;
}

.esim-detail-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.esim-detail-iccid {
  font-size: 12px;
  color: var(--text2);
  font-family: monospace;
}

.progress-row {
  display: flex;
  justify-content: space-between;
}

.progress-label {
  font-size: 13px;
  color: var(--text2);
}

.progress-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.progress-bar-bg {
  height: 6px;
  background: var(--card2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #22d3ee);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.qr-placeholder {
  display: flex;
  justify-content: center;
}

.qr-img {
  width: 160px;
  height: 160px;
  border-radius: var(--r-md);
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.monospace {
  font-size: 12px;
  font-family: monospace;
  color: var(--text2);
  word-break: break-all;
  margin-top: 3px;
}

/* ===================== PAYMENT WAITING ===================== */
.wait-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
  padding: 40px 20px;
}

.wait-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--card2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}

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

.wait-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.wait-sub {
  font-size: 14px;
  color: var(--text2);
  text-align: center;
  line-height: 1.5;
}

/* ===================== ACTIVE ITEM ===================== */
.active-item .check-icon {
  display: block;
}

.list-item:not(.active-item) .check-icon {
  display: none;
}

/* ===================== TOAST ===================== */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(40, 40, 40, 0.95);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--r-full);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 200;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border2);
}

.toast.show {
  opacity: 1;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  text-align: center;
  gap: 16px;
  animation: fadeIn 0.4s ease forwards;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  color: var(--text3);
  opacity: 0.4;
  margin-bottom: 12px;
}

.empty-state-icon svg {
  width: 100%;
  height: 100%;
}

.empty-state-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 8px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}