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

      @media (prefers-reduced-motion: reduce) {
        .segment-control * {
          transition: none !important;
        }
      }

      :root {
        --bg-base: #05060a;
        --bg-surface: #181a21;
        --bg-surface-alt: #1e2027;
        --text-primary: #ffffff;
        --text-secondary: #9fa3b2;
        --text-tertiary: #6c6f7a;
        --accent-blue: #2f6bff;
        --accent-purple: #b26bff;
        --stroke-hair: #26272b;
        --discount-badge: #1f2023;
        --danger: #ef4444;
        --success: #27ae60;
        --green-icon: #27ae60;
        --orange-icon: #ff8a00;
        --drag-handle: #2a2b2f;
        --disabled-bg: #1e293b;
        --safe-area-top: env(safe-area-inset-top, 0px);
        --safe-area-bottom: env(safe-area-inset-bottom, 0px);
        --bottom-button-height: 80px;
        --tabbar-h: 72px;
      }

      body[data-app-theme="light"] {
        --bg-base: #f3f4f8;
        --bg-surface: #ffffff;
        --bg-surface-alt: #f9fafb;
        --text-primary: #111827;
        --text-secondary: #6b7280;
        --text-tertiary: #9ca3af;
        --stroke-hair: #e5e7eb;
        --discount-badge: #f3f4f6;
        --drag-handle: #e5e7eb;
        --disabled-bg: #e5e7eb;
      }

      body[data-app-theme="light"] .tab-bar {
        background: #ffffff;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
        border-top: 1px solid #e5e7eb;
      }

      body[data-app-theme="light"] .tab-icon,
      body[data-app-theme="light"] .tab-label {
        color: var(--text-tertiary);
      }

      body[data-app-theme="light"] .tab.active .tab-icon,
      body[data-app-theme="light"] .tab.active .tab-label {
        color: var(--accent-blue);
      }

      body[data-app-theme="light"] .menu-card,
      body[data-app-theme="light"] .card,
      body[data-app-theme="light"] .history-item,
      body[data-app-theme="light"] .country-card,
      body[data-app-theme="light"] .tariff-card,
      body[data-app-theme="light"] .promo-card,
      body[data-app-theme="light"] .switch-row,
      body[data-app-theme="light"] .help-list-card {
        background: var(--bg-surface);
        border-color: var(--stroke-hair);
      }

      body[data-app-theme="light"] .selection-card {
        background: var(--bg-surface);
      }

      body[data-app-theme="light"] .selection-card.selected {
        background: var(--bg-surface);
        border: 1px solid var(--accent-blue);
        box-shadow: 0 0 0 1px rgba(47, 107, 255, 0.24);
      }

      body[data-app-theme="light"] .search-input {
        background-color: #ffffff;
      }

      body[data-app-theme="light"] .search-input input {
        background-color: #ffffff;
        color: var(--text-primary);
      }

      body[data-app-theme="light"] .search-input input::placeholder {
        color: var(--text-tertiary);
      }

      body[data-app-theme="light"] .segment-control {
        background-color: #ffffff;
        border: 1px solid #d4d4d4;
      }

      body[data-app-theme="light"] .segment-button {
        color: var(--text-secondary);
      }

      body[data-app-theme="light"] .segment-button.active {
        background-color: var(--accent-blue);
        color: #ffffff;
      }

      body[data-app-theme="light"] .search-input {
        background-color: #ffffff;
        border: 1px solid #d4d4d4;
        color: var(--text-primary);
      }

      body[data-app-theme="light"] .search-input::placeholder {
        color: #8a8a8a;
      }

      body[data-app-theme="light"] .segment-control {
        background: #ffffff;
      }

      body[data-app-theme="light"] .country-card {
        background: #ffffff;
      }

      body[data-app-theme="light"] .country-flag {
        background: transparent;
        border-radius: 0;
        padding: 0;
        font-size: 32px;
      }

      body[data-app-theme="light"] .chevron-right {
        color: #c0c0c0;
      }

      body[data-app-theme="light"] .tariff-card.selected {
        border-color: var(--accent-blue);
        background: #f3f6ff;
      }

      body[data-app-theme="light"] .tariff-volume,
      body[data-app-theme="light"] .tariff-price {
        color: var(--text-primary);
      }

      body[data-app-theme="light"] .tariff-duration,
      body[data-app-theme="light"] .tariff-unit {
        color: var(--text-secondary);
      }

      body[data-app-theme="light"] .data-only-info {
        background: #ffffff;
      }

      body[data-app-theme="light"] .speed-limit-banner {
        background: #ffffff;
      }

      body[data-app-theme="light"] .region-availability {
        background: #ffffff;
      }

      body[data-app-theme="light"] .region-availability-text {
        color: #1f2937;
      }

      body[data-app-theme="light"] .speed-limit-icon {
        background: rgba(0, 0, 0, 0.06);
      }

      body[data-app-theme="light"] .data-only-icon {
        color: #c2c2c6;
      }

      body[data-app-theme="light"] .data-only-title {
        color: #111111;
      }

      body[data-app-theme="light"] .data-only-description {
        color: #7a7a7a;
      }

      body[data-app-theme="light"] h1,
      body[data-app-theme="light"] h2,
      body[data-app-theme="light"] .title,
      body[data-app-theme="light"] .country-name,
      body[data-app-theme="light"] .tariff-main-text,
      body[data-app-theme="light"] .checkout-country,
      body[data-app-theme="light"] .menu-text,
      body[data-app-theme="light"] .selection-text {
        color: var(--text-primary);
      }

      body[data-app-theme="light"] .section-title,
      body[data-app-theme="light"] .subtitle,
      body[data-app-theme="light"] .tariff-subtext,
      body[data-app-theme="light"] .checkout-tariff,
      body[data-app-theme="light"] .label-secondary {
        color: var(--text-secondary);
      }

      body[data-app-theme="light"] .bottom-button {
        background: var(--bg-surface);
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
        border-top: 1px solid #e5e7eb;
      }

      body[data-app-theme="light"] .help-item:active {
        background: rgba(47, 107, 255, 0.1);
      }

      body[data-app-theme="light"] .country-card:active,
      body[data-app-theme="light"] .tariff-card:active {
        background: rgba(47, 107, 255, 0.05);
      }

      body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          sans-serif;
        background: var(--bg-base);
        color: var(--text-primary);
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(var(--tabbar-h) + var(--safe-area-bottom));
      }

      body.tab-hidden {
        padding-bottom: var(--safe-area-bottom);
      }

      .container {
        padding: 0 18px;
        padding-top: calc(18px + var(--safe-area-top));
        max-width: 800px;
        margin: 0 auto;
        min-height: 100vh;
      }

      .header {
        margin-bottom: 20px;
      }

      .header-with-balance {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
      }

      .header-balance-amount {
        font-size: 22px;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.2;
      }

      h1 {
        font-size: 27px;
        font-weight: 600;
        margin-bottom: 18px;
        margin-top: 0;
      }

      .header-with-balance h1 {
        margin-bottom: 0;
      }

      .section-title {
        font-size: 11px;
        font-weight: 600;
        color: var(--text-tertiary);
        margin: 20px 0 12px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
      }

      .content-wrapper-with-back {
        padding-top: calc(56px + var(--safe-area-top));
      }

      #page-policy-detail .container,
      #page-help-detail .container,
      #page-privacy-policy .container,
      #page-user-agreement .container {
        padding-top: var(--safe-area-top);
      }

      #page-esim-detail .container {
        padding-top: calc(8px + var(--safe-area-top));
      }

      #page-my-esims .container,
      #page-orders .container,
      #page-language .container,
      #page-theme .container,
      #page-referral .container {
        padding-top: calc(8px + var(--safe-area-top));
        min-height: 100%;
      }

      #page-my-esims,
      #page-orders {
        min-height: calc(100vh - var(--tabbar-h) - var(--safe-area-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      body.tab-hidden #page-my-esims,
      body.tab-hidden #page-orders {
        min-height: calc(100vh - var(--safe-area-bottom));
      }

      #page-language,
      #page-theme {
        height: calc(100vh - var(--tabbar-h) - var(--safe-area-bottom));
        overflow: hidden;
      }

      body.tab-hidden #page-language,
      body.tab-hidden #page-theme {
        height: calc(100vh - var(--safe-area-bottom));
      }

      #page-referral {
        height: calc(100vh - var(--tabbar-h) - var(--safe-area-bottom));
        overflow: hidden;
      }

      body.tab-hidden #page-referral {
        height: calc(100vh - var(--safe-area-bottom));
      }

      body[data-lang="en"] #page-referral {
        height: calc(100vh - var(--tabbar-h) - var(--safe-area-bottom));
        overflow: hidden;
      }

      body[data-lang="en"].tab-hidden #page-referral {
        height: calc(100vh - var(--safe-area-bottom));
      }

      #page-my-esims .container,
      #page-orders .container,
      #page-language .container,
      #page-theme .container {
        padding-top: var(--safe-area-top);
        min-height: 100%;
      }

      #page-balance {
        height: calc(100vh - var(--tabbar-h) - var(--safe-area-bottom));
        overflow: hidden;
      }

      body.tab-hidden #page-balance {
        height: calc(100vh - var(--safe-area-bottom));
      }

      #page-balance .container {
        padding-top: var(--safe-area-top);
        min-height: 100%;
      }

      .search-box {
        position: relative;
        margin-bottom: 16px;
      }

      .search-input {
        width: 100%;
        height: 50px;
        background: #1b1b1d;
        border: none;
        border-radius: 16px;
        padding: 0 44px;
        color: var(--text-primary);
        font-size: 16px;
        font-weight: 400;
        outline: none;
      }

      .search-input::placeholder {
        color: var(--text-secondary);
      }

      .search-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        color: #8d8d8d;
      }

      .search-clear {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        color: var(--text-secondary);
        cursor: pointer;
        display: none;
      }

      .search-clear.visible {
        display: block;
      }

      .segment-control {
        display: flex;
        padding: 4px;
        background: var(--bg-surface);
        border-radius: 22px;
        margin-bottom: 16px;
        position: relative;
        overflow: hidden;
      }

      .segment-indicator {
        position: absolute;
        top: 4px;
        left: 4px;
        height: calc(100% - 8px);
        width: 0;
        border-radius: 18px;
        background: #3a76f0;
        transition: transform 200ms ease, width 200ms ease;
        pointer-events: none;
        z-index: 0;
      }

      .segment-button {
        flex: 1;
        height: 46px;
        padding: 0 18px;
        border: none;
        border-radius: 20px;
        background: transparent;
        color: #8d8d8d;
        font-size: 16px;
        font-weight: 400;
        cursor: pointer;
        transition: all 120ms ease;
        position: relative;
        z-index: 1;
        -webkit-tap-highlight-color: transparent;
      }

      .segment-button.active {
        color: #ffffff;
        font-weight: 700;
        background: #3a76f0;
      }

      .section-header {
        font-size: 14px;
        font-weight: 500;
        color: var(--text-secondary);
        margin: 24px 4px 8px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .badge-32 {
        position: relative;
        width: 32px;
        height: 32px;
        border-radius: 999px;
        background: radial-gradient(
            circle at 28% 28%,
            rgba(255, 255, 255, 0.16) 0,
            transparent 55%
          ),
          linear-gradient(
            160deg,
            color-mix(in oklab, var(--bg) 92%, #000 8%),
            var(--bg)
          );
        outline: 1px solid rgba(255, 255, 255, 0.35);
        flex: 0 0 32px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .badge-ico {
        width: 20px;
        height: 20px;
        fill: #fff;
        stroke: none;
      }

      .badge-ico.stroke {
        fill: none;
        stroke: #fff;
        stroke-width: 1.8;
      }

      .badge-fallback {
        font-size: 11px;
        font-weight: 700;
        color: #fff;
        letter-spacing: -0.02em;
      }

      .country-card,
      .menu-card {
        background: #2a2a2d;
        border-radius: 21px;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        gap: 13px;
        margin-bottom: 11px;
        cursor: pointer;
        transition: all 100ms ease;
        min-height: 66px;
      }

      .country-card:active,
      .menu-card:active {
        transform: scale(0.98);
      }

      .country-flag,
      .menu-icon-circle {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: #1b1b1d;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        padding: 6px;
        flex-shrink: 0;
      }

      .menu-icon-circle.green {
        background: var(--green-icon);
      }

      .menu-icon-circle.orange {
        background: var(--orange-icon);
      }

      .menu-icon-circle svg {
        width: 20px;
        height: 20px;
        color: white;
      }

      .country-name,
      .menu-text {
        flex: 1;
        font-size: 17px;
        font-weight: 500;
      }

      .menu-sub-text {
        font-size: 13px;
        color: var(--text-secondary);
        margin-top: 2px;
      }

      .chevron-right {
        width: 19px;
        height: 19px;
        color: #bfbfbf;
        flex-shrink: 0;
      }

      .tariff-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 16px;
      }

      .tariff-flag {
        width: 72px;
        height: 72px;
        border-radius: 50%;
        background: var(--bg-surface);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 34px;
      }

      .tariff-title {
        font-size: 22px;
        font-weight: 600;
      }

      .tariff-subtitle {
        font-size: 14px;
        color: var(--text-secondary);
      }

      .ru-warning {
        display: flex;
        gap: 10px;
        align-items: flex-start;
        background: var(--bg-surface);
        border-radius: 18px;
        padding: 14px 16px;
        margin-bottom: 16px;
        font-size: 14px;
        line-height: 1.5;
      }

      .ru-warning-icon {
        font-size: 20px;
        flex-shrink: 0;
        margin-top: 1px;
      }

      .ru-warning-text {
        color: var(--text-primary);
        flex: 1;
      }

      .tariff-list-wrapper {
        padding-bottom: calc(30px + var(--safe-area-bottom));
      }

      .tariff-card {
        background: var(--bg-surface);
        border-radius: 18px;
        padding: 14px 14px 12px;
        margin-bottom: 10px;
        cursor: pointer;
        transition: all 120ms ease;
        display: grid;
        grid-template-columns: 92px 112px 1fr;
        column-gap: 16px;
        align-items: center;
      }

      .tariff-card.selected {
        border: 1px solid var(--accent-blue);
        box-shadow: 0 0 0 1px rgba(47, 107, 255, 0.24);
      }

      .data-only-info {
        display: flex;
        align-items: center;
        gap: 16px;
        background: #1b1b1d;
        border-radius: 28px;
        padding: 18px 20px;
        margin-top: 14px;
      }

      .speed-limit-banner {
        display: flex;
        align-items: center;
        gap: 16px;
        background: #1b1b1d;
        border-radius: 28px;
        padding: 18px 20px;
        margin-top: 14px;
      }

      .speed-limit-icon {
        width: 28px;
        height: 28px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        color: #c7c7cc;
      }

      .speed-limit-icon svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
      }

      .data-only-icon {
        width: 28px;
        height: 28px;
        color: #c7c7cc;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .data-only-icon svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
      }

      .data-only-content {
        display: flex;
        flex-direction: column;
        gap: 4px;
      }

      .data-only-title {
        font-size: 17px;
        font-weight: 600;
        line-height: 1.25;
        color: #ffffff;
      }

      .data-only-description {
        font-size: 15px;
        font-weight: 400;
        line-height: 1.28;
        color: #8e8e93;
      }

      .region-availability {
        background: #1b1b1d;
        border-radius: 22px;
        padding: 16px 18px;
        margin-top: 10px;
      }

      .region-availability-text {
        font-size: 15px;
        line-height: 1.5;
        color: #d6d6dc;
      }

      .tariff-left {
        display: flex;
        flex-direction: column;
        gap: 2px;
      }

      .tariff-center {
        display: flex;
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
      }

      .tariff-right {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
      }

      .tariff-volume,
      .tariff-price {
        font-size: 18px;
        font-weight: 600;
        color: #fff;
      }

      .tariff-duration,
      .tariff-unit {
        font-size: 13px;
        color: var(--text-secondary);
      }

      .center-title {
        text-align: center;
      }

      .badge-ico-img {
        width: 20px;
        height: 20px;
        object-fit: contain;
      }

      .country-card.global-business .badge-32,
      .country-card.global-global .badge-32 {
        outline: 0;
        background: none;
        overflow: hidden;
      }

      .country-card.global-business .badge-ico-img,
      .country-card.global-global .badge-ico-img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        display: block;
      }

      .countries-skeleton {
        display: flex;
        flex-direction: column;
        gap: 11px;
      }

      .countries-skeleton.hidden {
        display: none;
      }

      .country-skeleton-item {
        background: rgba(255, 255, 255, 0.08);
        border-radius: 21px;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        gap: 13px;
        min-height: 66px;
        overflow: hidden;
        position: relative;
      }

      body[data-app-theme="light"] .country-skeleton-item {
        background: rgba(0, 0, 0, 0.06);
      }

      .skeleton-flag {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        flex-shrink: 0;
        animation: skeleton-pulse 1.2s ease-in-out infinite;
      }

      body[data-app-theme="light"] .skeleton-flag {
        background: rgba(0, 0, 0, 0.1);
      }

      .skeleton-line {
        background: rgba(255, 255, 255, 0.12);
        border-radius: 6px;
        animation: skeleton-pulse 1.2s ease-in-out infinite;
      }

      body[data-app-theme="light"] .skeleton-line {
        background: rgba(0, 0, 0, 0.1);
      }

      .skeleton-line.name {
        width: 120px;
        height: 20px;
        flex: 0 0 auto;
      }

      .skeleton-line.subtitle {
        width: 80px;
        height: 14px;
        margin-top: 4px;
      }

      .skeleton-content {
        display: flex;
        flex-direction: column;
        flex: 1;
      }

      @keyframes skeleton-pulse {
        0%,
        100% {
          opacity: 1;
        }

        50% {
          opacity: 0.5;
        }
      }

      .tariff-skeleton {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-bottom: calc(84px + var(--safe-area-bottom));
      }

      .tariff-skeleton.hidden {
        display: none;
      }

      .tariff-skeleton-item {
        background: rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        padding: 14px 14px 12px;
        display: grid;
        grid-template-columns: 92px 112px 1fr;
        column-gap: 16px;
        align-items: center;
        min-height: 72px;
      }

      body[data-app-theme="light"] .tariff-skeleton-item {
        background: rgba(0, 0, 0, 0.06);
      }

      .tariff-skeleton-left,
      .tariff-skeleton-center,
      .tariff-skeleton-right {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .tariff-skeleton-right {
        align-items: flex-end;
      }

      .skeleton-tariff-line {
        background: rgba(255, 255, 255, 0.12);
        border-radius: 6px;
        animation: skeleton-pulse 1.2s ease-in-out infinite;
      }

      body[data-app-theme="light"] .skeleton-tariff-line {
        background: rgba(0, 0, 0, 0.1);
      }

      .skeleton-tariff-line.volume {
        width: 70px;
        height: 20px;
      }

      .skeleton-tariff-line.duration {
        width: 50px;
        height: 14px;
      }

      .skeleton-tariff-line.price {
        width: 60px;
        height: 20px;
      }

      .skeleton-tariff-line.unit {
        width: 80px;
        height: 14px;
      }

      .skeleton-tariff-radio {
        width: 26px;
        height: 26px;
        border: 2px solid rgba(255, 255, 255, 0.12);
        border-radius: 50%;
        animation: skeleton-pulse 1.2s ease-in-out infinite;
      }

      body[data-app-theme="light"] .skeleton-tariff-radio {
        border-color: rgba(0, 0, 0, 0.1);
      }

      .esims-skeleton,
      .orders-skeleton {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .esims-skeleton.hidden,
      .orders-skeleton.hidden {
        display: none;
      }

      .esim-skeleton-card,
      .order-skeleton-card {
        background: rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        padding: 16px;
      }

      body[data-app-theme="light"] .esim-skeleton-card,
      body[data-app-theme="light"] .order-skeleton-card {
        background: rgba(0, 0, 0, 0.06);
      }

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

      .skeleton-esim-flag {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        flex-shrink: 0;
        animation: skeleton-pulse 1.2s ease-in-out infinite;
      }

      body[data-app-theme="light"] .skeleton-esim-flag {
        background: rgba(0, 0, 0, 0.1);
      }

      .esim-skeleton-title-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .skeleton-esim-line {
        background: rgba(255, 255, 255, 0.12);
        border-radius: 6px;
        animation: skeleton-pulse 1.2s ease-in-out infinite;
      }

      body[data-app-theme="light"] .skeleton-esim-line {
        background: rgba(0, 0, 0, 0.1);
      }

      .skeleton-esim-line.title {
        width: 120px;
        height: 18px;
      }

      .skeleton-esim-line.plan {
        width: 180px;
        height: 18px;
        margin-bottom: 12px;
      }

      .skeleton-esim-line.detail {
        width: 100%;
        height: 14px;
      }

      .skeleton-esim-status {
        width: 60px;
        height: 24px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.12);
        animation: skeleton-pulse 1.2s ease-in-out infinite;
      }

      body[data-app-theme="light"] .skeleton-esim-status {
        background: rgba(0, 0, 0, 0.1);
      }

      .esim-skeleton-details {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 14px;
      }

      .radio {
        width: 26px;
        height: 26px;
        border: 2px solid var(--text-secondary);
        border-radius: 50%;
        position: relative;
        transition: all 120ms ease;
        flex-shrink: 0;
      }

      .tariff-card.selected .radio,
      .radio.selected {
        border-color: var(--accent-blue);
        background: var(--accent-blue);
      }

      .tariff-card.selected .radio::after,
      .radio.selected::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 10px;
        height: 10px;
        background: white;
        border-radius: 50%;
      }

      #page-checkout {
        height: calc(100vh - var(--tabbar-h) - var(--safe-area-bottom));
        overflow: hidden;
      }

      body.tab-hidden #page-checkout {
        height: calc(100vh - var(--safe-area-bottom));
      }

      .checkout-wrapper {
        padding-bottom: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
      }

      .checkout-card {
        background: var(--bg-surface);
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 16px;
      }

      .checkout-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
      }

      .checkout-country {
        font-size: 16px;
        font-weight: 600;
      }

      .checkout-tariff {
        font-size: 14px;
        color: var(--text-secondary);
        margin-top: 4px;
      }

      .checkout-flag {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
      }

      .divider {
        height: 1px;
        background: var(--stroke-hair);
        margin: 12px 0;
      }

      .checkout-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .checkout-breakdown {
        display: flex;
        flex-direction: column;
        gap: 8px;
      }

      .checkout-total-label {
        font-size: 14px;
        font-weight: 500;
        color: var(--text-secondary);
        line-height: 1.3;
      }

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

      .checkout-deposit-value {
        font-size: 15px;
        font-weight: 600;
        color: var(--accent-blue);
      }

      .checkout-total-value {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
      }

      .checkout-old-total {
        color: var(--text-secondary);
        text-decoration: line-through;
        font-weight: 500;
      }

      .switch-row {
        background: var(--bg-surface);
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
      }

      .switch-info {
        flex: 1;
      }

      .switch-title {
        font-size: 16px;
        font-weight: 500;
        margin-bottom: 4px;
      }

      .switch-description {
        font-size: 13px;
        color: var(--text-secondary);
        line-height: 1.4;
      }

      .switch {
        position: relative;
        width: 38px;
        height: 22px;
        background: var(--stroke-hair);
        border-radius: 11px;
        cursor: pointer;
        transition: all 160ms cubic-bezier(0.2, 0.9, 0.2, 1);
        flex-shrink: 0;
      }

      .switch.active {
        background: var(--accent-blue);
      }

      .switch-thumb {
        position: absolute;
        top: 2px;
        left: 2px;
        width: 18px;
        height: 18px;
        background: white;
        border-radius: 50%;
        transition: all 160ms cubic-bezier(0.2, 0.9, 0.2, 1);
      }

      .switch.active .switch-thumb {
        left: 18px;
      }

      .promo-card {
        background: var(--bg-surface);
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 16px;
      }

      .promo-input-wrapper {
        display: flex;
        gap: 8px;
        border: 1px solid transparent;
        transition: border-color 100ms;
      }

      .promo-input {
        flex: 1;
        background: transparent;
        border: none;
        padding: 0;
        color: var(--text-primary);
        font-size: 15px;
        height: 36px;
      }

      .promo-input::placeholder {
        color: var(--text-secondary);
      }

      .promo-button {
        width: 48px;
        height: 36px;
        border: none;
        background: var(--accent-blue);
        color: white;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
      }

      .promo-message {
        margin-top: 8px;
        font-size: 13px;
        animation: fadeIn 140ms ease;
      }

      .promo-message.success {
        color: var(--success);
      }

      .promo-message.error {
        color: var(--danger);
      }

      .balance-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--success);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: white;
        flex-shrink: 0;
      }

      .balance-row {
        display: flex;
        align-items: center;
      }

      .payment-card {
        background: var(--bg-surface);
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        transition: all 100ms ease;
      }

      .payment-card:active {
        transform: scale(0.98);
      }

      .payment-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--accent-blue);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }

      .payment-icon.has-image {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
      }

      .payment-icon.has-image svg {
        display: none;
      }

      .payment-info {
        flex: 1;
      }

      .payment-label {
        font-size: 16px;
        font-weight: 500;
        margin-bottom: 2px;
      }

      .payment-value {
        font-size: 14px;
        color: var(--text-secondary);
      }

      .bottom-sheet-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1000;
        display: none;
        animation: fadeIn 140ms ease;
      }

      .bottom-sheet-overlay.visible {
        display: block;
      }

      .bottom-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-base);
        border-radius: 24px 24px 0 0;
        padding: 20px 16px;
        padding-bottom: calc(20px + var(--safe-area-bottom));
        z-index: 1001;
        transform: translateY(100%);
        transition: transform 260ms ease-out;
        max-height: 90vh;
        overflow-y: auto;
      }

      .bottom-sheet.visible {
        transform: translateY(0);
      }

      .drag-handle {
        width: 36px;
        height: 4px;
        background: var(--drag-handle);
        border-radius: 2px;
        margin: 0 auto 16px;
      }

      .bottom-sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
      }

      .bottom-sheet-title {
        flex: 1;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: var(--text-secondary);
      }

      .close-button {
        width: 24px;
        height: 24px;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        font-size: 20px;
      }

      .payment-option {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        background: var(--bg-surface);
        border-radius: 12px;
        margin-bottom: 8px;
        cursor: pointer;
        transition: all 100ms ease;
      }

      .payment-option:active {
        transform: scale(0.98);
      }

      .payment-option-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: 20px;
        background-size: cover;
        background-position: center;
      }

      .payment-option-icon.sbp {
        background: url("https://i.postimg.cc/bwKChKXZ/SPB.png");
        border-radius: 50%;
      }

      .payment-option-icon.visa_mc {
        background: url("https://i.postimg.cc/GpKyQyxM/visa-master.png");
        border-radius: 50%;
      }

      .payment-option-icon.rf_card {
        background: url("https://i.postimg.cc/gjn8r2RT/RF.jpg");
        border-radius: 50%;
      }

      .payment-option-icon.sbp,
      .payment-option-icon.visa_mc,
      .payment-option-icon.rf_card {
        margin-right: 8px;
        background-repeat: no-repeat;
      }

      .payment-option-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 50%;
      }

      .payment-option-name {
        flex: 1;
        font-size: 16px;
        font-weight: 500;
      }

      .bottom-button-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(15, 16, 18, 0.85);
        backdrop-filter: blur(8px);
        padding: 10px 16px;
        padding-bottom: calc(12px + var(--safe-area-bottom));
        z-index: 45;
        pointer-events: none;
        transition: opacity 0.2s, transform 0.2s;
      }

      .bottom-button-panel.hidden {
        opacity: 0;
        transform: translateY(100%);
        pointer-events: none;
      }

      body[data-app-theme="light"] .bottom-button-panel {
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(8px);
      }

      @supports (padding: max(0px)) {
        .ios .bottom-button-panel {
          padding-bottom: calc(16px + var(--safe-area-bottom));
        }
      }

      .btn {
        width: 100%;
        min-height: 52px;
        height: 56px;
        border: none;
        border-radius: 20px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 100ms ease;
        pointer-events: all;
      }

      .btn-primary {
        background: var(--accent-blue);
        color: white;
      }

      .btn-primary:active:not(:disabled) {
        transform: scale(0.98);
        opacity: 0.9;
      }

      .payment-waiting-secondary {
        margin-top: 12px;
        background: transparent;
        border: 1px solid var(--stroke-hair);
        color: var(--text-primary);
      }

      .payment-waiting-secondary:active:not(:disabled) {
        transform: scale(0.98);
        opacity: 0.9;
      }

      .btn:disabled {
        background: var(--disabled-bg);
        color: var(--text-secondary);
        cursor: not-allowed;
        opacity: 0.6;
      }

      .payment-waiting-overlay {
        position: fixed;
        inset: 0;
        z-index: 10010;
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
        background: var(--bg-base);
        padding: 32px 24px calc(32px + var(--safe-area-bottom));
        text-align: center;
        overflow: hidden;
      }

      .payment-waiting-overlay.visible {
        display: flex;
      }

      .payment-waiting-icon {
        width: 100px;
        height: 100px;
        border-radius: 24px;
        object-fit: cover;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
      }


      .payment-waiting-spinner {
        width: 28px;
        height: 28px;
        border: 3px solid rgba(159, 163, 178, 0.25);
        border-top-color: var(--accent-blue);
        border-radius: 50%;
        animation: loader-spin 1s linear infinite;
      }

      .payment-waiting-title {
        font-size: 22px;
        font-weight: 700;
        color: var(--text-primary);
      }

      .payment-waiting-desc {
        font-size: 15px;
        line-height: 1.6;
        color: var(--text-secondary);
        max-width: 320px;
        margin: 0 auto;
      }

      .payment-waiting-button {
        max-width: 320px;
        width: 100%;
      }

      .tab-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #0f1012;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 10px 16px;
        padding-bottom: calc(10px + var(--safe-area-bottom));
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06);
        z-index: 40;
      }

      .ios .tab-bar {
        transform: translateY(25px);
      }

      @supports (padding: max(0px)) {
        .ios .tab-bar {
          padding-bottom: calc(14px + var(--safe-area-bottom));
        }
      }

      .tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        cursor: pointer;
        flex: 1;
        padding: 8px;
        transition: all 120ms ease;
      }

      .tab-icon {
        width: 24px;
        height: 24px;
        color: #7a7f8a;
        transition: all 120ms ease;
      }

      .tab.active .tab-icon {
        color: var(--accent-blue);
      }

      .tab-label {
        font-size: 11px;
        color: #7a7f8a;
        transition: all 120ms ease;
      }

      .tab.active .tab-label {
        color: var(--text-primary);
      }

      .referral-banner {
        background: var(--accent-purple);
        border-radius: 24px;
        padding: 18px;
        margin-bottom: 16px;
        display: flex;
        gap: 12px;
        align-items: center;
        cursor: pointer;
      }

      .referral-text {
        flex: 1;
        color: white;
        font-size: 14px;
        line-height: 1.5;
        font-weight: 500;
      }

      .referral-icon {
        font-size: 40px;
        flex-shrink: 0;
      }

      .referral-hero {
        background: linear-gradient(
          135deg,
          rgba(58, 118, 240, 0.12),
          rgba(146, 107, 255, 0.16)
        );
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 24px;
        padding: 18px;
        margin-bottom: 16px;
      }

      .referral-hero-title {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 10px;
      }

      .referral-hero-desc {
        font-size: 15px;
        color: var(--text-secondary);
        line-height: 1.45;
      }

      .referral-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 12px;
      }

      .referral-stat-card {
        background: var(--bg-surface);
        border-radius: 18px;
        padding: 14px;
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .referral-stat-ico {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 18px;
        flex-shrink: 0;
      }

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

      .referral-stat-value {
        font-size: 16px;
        font-weight: 600;
        color: var(--text-primary);
      }

      .referral-code-card {
        background: var(--bg-surface);
        border-radius: 18px;
        padding: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
      }

      .referral-code-label {
        font-size: 13px;
        color: var(--text-secondary);
        margin-bottom: 4px;
      }

      .referral-code-value {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-primary);
      }

      .referral-copy {
        border: none;
        background: var(--accent-blue);
        color: white;
        border-radius: 12px;
        padding: 10px 14px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }

      .referral-steps-card {
        background: var(--bg-surface);
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 20px;
      }

      .referral-step {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        padding: 10px 0;
      }

      .referral-step + .referral-step {
        border-top: 1px solid var(--stroke-hair);
      }

      .referral-step-ico {
        font-size: 20px;
        flex-shrink: 0;
      }

      .referral-step-title {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 4px;
      }

      .referral-step-desc {
        font-size: 13px;
        color: var(--text-secondary);
        line-height: 1.4;
      }

      .referral-bottom-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 12px 18px;
        padding-bottom: calc(12px + var(--safe-area-bottom));
        background: rgba(10, 11, 14, 0.9);
        backdrop-filter: blur(8px);
        z-index: 50;
      }

      .referral-bottom-btn {
        width: 100%;
        height: 56px;
        border: none;
        border-radius: 16px;
        background: linear-gradient(135deg, #3a76f0, #5e5cff);
        color: white;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
      }

      body[data-app-theme="light"] .referral-bottom-bar {
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(8px);
      }

      .balance-manage-card {
        background: #101218;
        border-radius: 26px;
        padding: 20px;
        margin-bottom: 20px;
      }

      body[data-app-theme="light"] .balance-manage-card {
        background: #ffffff;
      }

      .balance-title {
        font-size: 17px;
        font-weight: 700;
        margin-bottom: 16px;
      }

      .balance-amount-control {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        margin-bottom: 16px;
        padding-bottom: 14px;
        border-bottom: 1px solid #2a2c33;
      }

      .amount-btn {
        height: 44px;
        padding: 0 20px;
        border: none;
        background: var(--accent-blue);
        color: white;
        border-radius: 22px;
        font-size: 18px;
        font-weight: 700;
        cursor: pointer;
        transition: all 100ms ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        min-width: 64px;
      }

      .balance-amount-control .amount-btn {
        padding: 0;
        width: 48px;
        min-width: 48px;
        height: 48px;
        flex: 0 0 48px;
        border-radius: 14px;
      }

      .amount-btn:active {
        transform: scale(0.95);
      }

      .amount-display {
        flex: 1 1 auto;
        width: auto;
        min-width: 140px;
        text-align: center;
        font-size: 34px;
        font-weight: 700;
        background: transparent;
        border: none;
        outline: none;
        color: var(--text-primary);
        -moz-appearance: textfield;
      }

      .amount-display::-webkit-outer-spin-button,
      .amount-display::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }

      .quick-amounts {
        display: flex;
        gap: 14px;
        margin-bottom: 16px;
        flex-wrap: nowrap;
        justify-content: center;
      }

      .quick-amount-btn {
        flex: 0 0 auto;
        height: 44px;
        border: none;
        background: var(--accent-blue);
        color: white;
        border-radius: 22px;
        font-size: 16px;
        font-weight: 700;
        padding: 0 20px;
        cursor: pointer;
        transition: all 100ms ease;
      }

      .quick-amount-btn:active {
        transform: scale(0.95);
      }

      .history-item {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 14px 16px;
        background: var(--bg-surface);
        border-radius: 16px;
        margin-bottom: 8px;
      }

      .history-amount {
        font-size: 18px;
        font-weight: 600;
        color: var(--success);
      }

      .history-date {
        font-size: 12px;
        color: var(--text-secondary);
        margin-top: 2px;
      }

      .history-desc {
        font-size: 14px;
        color: var(--text-secondary);
        text-align: right;
      }

      .balance-skeleton {
        background: linear-gradient(
          90deg,
          rgba(255, 255, 255, 0.04),
          rgba(255, 255, 255, 0.08),
          rgba(255, 255, 255, 0.04)
        );
        background-size: 200% 100%;
        animation: shimmer 1.3s ease-in-out infinite;
        border-radius: 12px;
        display: inline-block;
        color: transparent;
      }

      body[data-app-theme="light"] .balance-skeleton {
        background: linear-gradient(
          90deg,
          rgba(0, 0, 0, 0.06),
          rgba(0, 0, 0, 0.12),
          rgba(0, 0, 0, 0.06)
        );
      }

      .balance-skeleton.small {
        width: 70px;
        height: 16px;
      }

      .balance-skeleton.medium {
        width: 110px;
        height: 22px;
      }

      .header-balance-skeleton {
        width: 90px;
        height: 20px;
      }

      @keyframes shimmer {
        0% {
          background-position: 200% 0;
        }

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

      .selection-card {
        background: var(--bg-surface);
        border-radius: 18px;
        padding: 14px 16px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        border: 1px solid transparent;
        transition: all 120ms ease;
      }

      .selection-card.selected {
        border: 1px solid var(--accent-blue);
        box-shadow: 0 0 0 1px rgba(47, 107, 255, 0.24);
      }

      .selection-card:active {
        transform: scale(0.98);
      }

      .selection-text {
        font-size: 16px;
        font-weight: 500;
      }

      .help-list-card {
        background: var(--bg-surface);
        border-radius: 20px;
        padding: 4px;
        margin-bottom: 12px;
      }

      .help-item {
        padding: 14px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        transition: all 100ms ease;
        border-radius: 16px;
      }

      .help-item:active {
        background: rgba(255, 255, 255, 0.05);
      }

      .help-item + .help-item {
        border-top: 1px solid var(--stroke-hair);
      }

      .help-item-text {
        flex: 1;
        font-size: 15px;
        line-height: 1.4;
      }

      .content-detail {
        padding: 0;
        background: transparent;
        border-radius: 0;
        margin-bottom: 4px;
        margin-top: 0;
      }

      .content-detail-text {
        font-size: 16px;
        line-height: 1.6;
        color: var(--text-primary);
      }

      .content-detail-text p {
        margin: 0 0 14px 0;
      }

      .content-detail-text p:last-child {
        margin-bottom: 0;
      }

      .content-detail-text section p:last-child {
        margin-bottom: 0;
      }

      .content-detail-text strong {
        font-weight: 700;
      }

      .help-qr-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 12px;
      }

      .help-qr-grid img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 16px;
        border: 1px solid var(--stroke-hair);
        background: var(--bg-surface);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
      }

      body[data-app-theme="light"] .help-qr-grid img {
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
      }

      body.mobile-device #page-help-detail.no-scroll {
        height: calc(100vh - var(--tabbar-h) - var(--safe-area-bottom));
        overflow: hidden;
      }

      body.mobile-device.tab-hidden #page-help-detail.no-scroll {
        height: calc(100vh - var(--safe-area-bottom));
      }

      body.mobile-device #page-help-detail.no-scroll .container {
        height: 100%;
        overflow: hidden;
      }

      @keyframes fadeIn {
        from {
          opacity: 0;
        }

        to {
          opacity: 1;
        }
      }

      .page {
        display: none;
        animation: fadeIn 220ms ease;
      }

      .page.active {
        display: block;
      }

      .empty-state {
        text-align: center;
        padding: 24px 12px;
      }

      .empty-icon {
        font-size: 40px;
        margin-bottom: 10px;
        opacity: 0.5;
      }

      .empty-text {
        color: var(--text-secondary);
        margin-bottom: 4px;
        font-size: 14px;
      }

      .toast {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        top: calc(10px + var(--safe-area-top, 0px));
        background: var(--success);
        color: white;
        padding: 12px 24px;
        border-radius: 12px;
        font-weight: 500;
        z-index: 2000;
        display: none;
        animation: fadeIn 200ms ease;
      }

      .toast.visible {
        display: block;
      }

      .hidden {
        display: none !important;
      }

      .tab-content {
        padding-bottom: 80px;
      }

      .app-loader {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: var(--bg-base);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 12px;
      }

      .app-loader.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
      }

      .app-loader-spinner {
        width: 48px;
        height: 48px;
        border: 4px solid rgba(255, 255, 255, 0.18);
        border-top-color: var(--accent-blue);
        border-radius: 50%;
        animation: loader-spin 1s linear infinite;
      }

      body[data-app-theme="light"] .app-loader-spinner {
        border: 4px solid rgba(0, 0, 0, 0.12);
        border-top-color: var(--accent-blue);
      }

      .app-loader-text {
        display: none !important;
      }

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

      .inline-spinner {
        width: 14px;
        height: 14px;
        border: 2px solid rgba(255, 255, 255, 0.18);
        border-top-color: var(--accent-blue);
        border-radius: 50%;
        display: inline-block;
        animation: loader-spin 1s linear infinite;
        vertical-align: -2px;
        margin-right: 6px;
      }

      .pending-esim-card {
        opacity: 0.95;
      }

      .cards-list {
        display: grid;
        gap: 10px;
      }

      .info-card {
        background: rgba(255, 255, 255, 0.06);
        border-radius: 16px;
        padding: 12px;
      }

      .info-card-title {
        font-weight: 700;
        margin-bottom: 6px;
      }

      .info-card-row {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        font-size: 13px;
        padding: 2px 0;
        opacity: 0.9;
      }

      .info-card-row span:first-child {
        opacity: 0.7;
      }

      .info-card-actions {
        display: flex;
        gap: 8px;
        margin: 10px 0;
      }

      .info-btn {
        flex: 1;
        border: 0;
        border-radius: 12px;
        padding: 10px 12px;
        font-weight: 600;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.1);
        color: inherit;
      }

      .hidden {
        display: none !important;
      }

      .profile-summary {
        background: rgba(255, 255, 255, 0.06);
        border-radius: 16px;
        padding: 12px;
        margin: 12px 0;
      }

      .profile-row {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        padding: 6px 0;
        font-size: 14px;
      }

      .profile-label {
        opacity: 0.7;
      }

      .profile-value {
        text-align: right;
        max-width: 65%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .order-card {
        background: var(--bg-surface);
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
      }

      body[data-app-theme="light"] .order-card {
        background: #ffffff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
      }

      .order-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
      }

      .order-card-left {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        min-width: 0;
      }

      .order-flag {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.05);
      }

      body[data-app-theme="light"] .order-flag {
        background: #f9fafb;
      }

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

      .order-card-title {
        font-size: 17px;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.3;
      }

      .order-card-price {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-primary);
        flex-shrink: 0;
        margin-left: 12px;
      }

      .order-card-details {
        display: flex;
        flex-direction: column;
        gap: 8px;
      }

      .order-detail-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
      }

      .order-label {
        font-size: 14px;
        color: var(--text-secondary);
        font-weight: 400;
      }

      .order-value {
        font-size: 14px;
        color: var(--text-primary);
        font-weight: 500;
        text-align: right;
      }

      .esim-card {
        background: var(--bg-surface);
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
      }

      body[data-app-theme="light"] .esim-card {
        background: #ffffff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
      }

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

      .esim-flag {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.05);
      }

      /* My eSIM: use the same SVG sprites for regions/global as in the catalog */
      .esim-flag .esim-flag-ico {
        width: 28px;
        height: 28px;
        fill: #fff;
      }


      body[data-app-theme="light"] .esim-flag {
        background: #f9fafb;
      }

      .esim-card-title-wrapper {
        flex: 1;
        min-width: 0;
      }

      .esim-card-country {
        font-size: 17px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 2px;
      }

      .esim-card-status {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 500;
        background: var(--stroke-hair);
        color: var(--text-secondary);
      }

      body[data-app-theme="light"] .esim-card-status {
        background: #f3f4f6;
      }

      .esim-card-plan {
        font-size: 17px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 12px;
      }

      .esim-card-details {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 14px;
      }

      .esim-detail-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
      }

      .esim-label {
        font-size: 14px;
        color: var(--text-secondary);
        font-weight: 400;
      }

      .esim-value {
        font-size: 14px;
        color: var(--text-primary);
        font-weight: 500;
        text-align: right;
        word-break: break-all;
      }

      .esim-install-btn {
        width: auto;
        display: inline-block;
        padding: 12px 24px;
        background: var(--accent-blue);
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 100ms ease;
      }

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

      .esim-detail-section {
        background: var(--bg-surface);
        border-radius: 20px;
        padding: 16px;
        margin-bottom: 16px;
      }

      body[data-app-theme="light"] .esim-detail-section {
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      }

      .esim-detail-section-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 14px;
      }

      .esim-install-device-btn {
        width: 100%;
        padding: 16px;
        background: var(--accent-blue);
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 100ms ease;
      }

      .esim-install-device-btn:active {
        transform: scale(0.98);
      }

      .esim-qr-container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
        background: rgba(173, 216, 230, 0.1);
        border-radius: 16px;
        margin: 16px 0;
      }

      body[data-app-theme="light"] .esim-qr-container {
        background: #e6f3f7;
      }

      .esim-qr-code {
        width: 240px;
        height: 240px;
        background: white;
        padding: 16px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .esim-qr-code img {
        width: 100%;
        height: 100%;
        object-fit: contain;
      }

      .esim-qr-code canvas {
        width: 100% !important;
        height: 100% !important;
        image-rendering: pixelated;
      }

      .esim-instructions {
        list-style: none;
        padding: 0;
        margin: 12px 0 0 0;
      }

      .esim-instructions li {
        font-size: 14px;
        color: var(--text-secondary);
        line-height: 1.6;
        margin-bottom: 10px;
        padding-left: 8px;
        position: relative;
      }

      .esim-instructions li::before {
        content: "•";
        position: absolute;
        left: -8px;
        color: var(--text-secondary);
      }

      .esim-manual-data {
        margin-top: 12px;
      }

      .esim-data-field {
        margin-bottom: 16px;
      }

      .esim-data-label {
        font-size: 16px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 8px;
      }

      .esim-data-value-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px;
        background: rgba(173, 216, 230, 0.1);
        border-radius: 12px;
      }

      body[data-app-theme="light"] .esim-data-value-wrapper {
        background: #e6f3f7;
      }

      .esim-data-value {
        flex: 1;
        font-size: 15px;
        color: var(--text-primary);
        font-weight: 500;
        word-break: break-all;
      }

      .esim-copy-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: transparent;
        color: var(--accent-blue);
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 100ms ease;
      }

      .esim-copy-btn:active {
        transform: scale(0.95);
      }

      .esim-checklist {
        list-style: none;
        padding: 0;
        margin: 12px 0 0 0;
      }

      .esim-checklist li {
        font-size: 14px;
        color: var(--text-secondary);
        line-height: 1.6;
        margin-bottom: 10px;
        padding-left: 8px;
        position: relative;
      }

      .esim-checklist li::before {
        content: "•";
        position: absolute;
        left: -8px;
        color: var(--text-secondary);
      }

      .esim-support-text {
        text-align: center;
        font-size: 14px;
        color: var(--text-secondary);
        margin-top: 20px;
        padding-bottom: 20px;
      }

      .esim-support-link {
        color: var(--accent-blue);
        text-decoration: none;
        font-weight: 500;
      }


/* Banner shown after balance checkout purchase (only on redirect to My eSIMs) */
.purchase-processing-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin: 14px 0 14px 0;
  border-radius: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--stroke-hair);
}

.purchase-processing-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(159, 163, 178, 0.35);
  border-top-color: rgba(159, 163, 178, 0.95);
  animation: purchaseSpin 0.9s linear infinite;
  flex: 0 0 auto;
}

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

.purchase-processing-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.2;
}

.purchase-processing-desc {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.25;
}


.esim-created-banner {
  padding: 16px 18px;
  margin: 14px 0 14px 0;
  border-radius: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--stroke-hair);
  text-align: center;
}


.esim-created-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.2;
}

.esim-created-desc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.35;
}
