    :root {
      --bg: #0d0d0d;
      --card-bg: #161616;
      --fire: #ff5500;
      --gold: #ffd000;
      --sky: #00aaff;
      --text: #ffffff;
      --muted: #8e8e93;
      --border: #262626;
      --highlight: rgba(255, 85, 0, 0.15);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      background-color: var(--bg);
      color: var(--text);
      font-family: 'Oswald', sans-serif;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      padding: 0 14px max(14px, env(safe-area-inset-bottom)) 14px;
      overflow-x: hidden;
    }

    .top-bar-sticky {
      position: -webkit-sticky;
      position: sticky;
      top: 0;
      z-index: 100;
      background-color: var(--bg);
      padding-top: max(14px, env(safe-area-inset-top));
      padding-bottom: 2px;
      margin-left: -14px;
      margin-right: -14px;
      padding-left: 14px;
      padding-right: 14px;
    }

    #authGateView {
      flex: 1;
      justify-content: center;
    }

    /* ================= СПЛЕШ-ЭКРАН ЗАПУСКА ================= */
    #splashScreen {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: #0a0a0a;
      z-index: 99999;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    }

    #splashScreen.fade-out {
      opacity: 0;
      transform: scale(1.06);
      pointer-events: none;
    }

    .splash-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    .splash-emblem {
      width: 86px;
      height: 86px;
      border-radius: 26px;
      background: radial-gradient(circle, rgba(255, 85, 0, 0.25) 0%, rgba(20, 20, 20, 0.9) 70%);
      border: 1.5px solid var(--fire);
      box-shadow: 0 0 35px rgba(255, 85, 0, 0.4), inset 0 0 15px rgba(255, 208, 0, 0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 42px;
      margin-bottom: 18px;
      animation: enginePulse 1.8s infinite ease-in-out;
    }

    @keyframes enginePulse {
      0% { transform: scale(1); box-shadow: 0 0 25px rgba(255, 85, 0, 0.35); }
      50% { transform: scale(1.06); box-shadow: 0 0 50px rgba(255, 85, 0, 0.7), inset 0 0 25px rgba(255, 208, 0, 0.5); }
      100% { transform: scale(1); box-shadow: 0 0 25px rgba(255, 85, 0, 0.35); }
    }

    .splash-brand {
      font-family: 'Oswald', sans-serif;
      font-weight: 700;
      font-size: 28px;
      letter-spacing: 2px;
      text-transform: uppercase;
      background: linear-gradient(135deg, var(--fire), var(--gold));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 4px;
    }

    .splash-tagline {
      font-size: 11px;
      color: var(--muted);
      letter-spacing: 3px;
      text-transform: uppercase;
      margin-bottom: 26px;
      font-weight: 500;
    }

    .splash-loader {
      width: 140px;
      height: 3px;
      background: #1c1c1c;
      border-radius: 3px;
      overflow: hidden;
      position: relative;
    }

    .splash-bar {
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, var(--fire), var(--gold), transparent);
      animation: ignitionSweep 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes ignitionSweep {
      0% { left: -100%; }
      100% { left: 100%; }
    }

    /* ================= ВЕРХНЯЯ ПАНЕЛЬ ================= */
    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    .brand {
      font-family: 'Oswald', sans-serif;
      font-size: 24px;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      background: linear-gradient(135deg, var(--fire), var(--gold));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .lang-toggle {
      background: rgba(255, 85, 0, 0.1);
      border: 1px solid var(--border);
      border-radius: 14px;
      display: flex;
      overflow: hidden;
    }

    .lang-btn {
      background: transparent;
      border: none;
      color: var(--muted);
      font-family: 'Oswald', sans-serif;
      font-size: 11px;
      font-weight: 700;
      padding: 4px 10px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .lang-btn.active {
      background: var(--fire);
      color: #fff;
    }

    /* Сегментные вкладки (доступны только для активных водителей) */
    .nav-tabs {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 5px;
      background: #121212;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 3px;
      margin-bottom: 14px;
    }

    .nav-tab {
      background: transparent;
      border: none;
      color: var(--muted);
      font-family: 'Oswald', sans-serif;
      font-size: 11px;
      padding: 8px 1px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      padding: 8px 2px;
      border-radius: 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      white-space: nowrap;
      transition: all 0.2s ease;
    }

    .nav-tab.active {
      background: var(--fire);
      color: #fff;
      box-shadow: 0 3px 10px rgba(255, 85, 0, 0.3);
    }

    /* Контейнеры экранов */
    .view-container {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-bottom: 14px;
    }

    /* Карточки */
    .main-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px 16px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    .card-title {
      font-family: 'Oswald', sans-serif;
      font-size: 19px;
      font-weight: 700;
      letter-spacing: 0.5px;
      margin-bottom: 2px;
      display: flex;
      align-items: center;
      gap: 8px;
      text-transform: uppercase;
    }

    .card-subtitle {
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 14px;
      font-weight: 400;
    }

    /* Элементы Кабины */
    .driver-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .driver-avatar {
      width: 48px;
      height: 48px;
      min-width: 48px;
      max-width: 48px;
      min-height: 48px;
      max-height: 48px;
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(255, 85, 0, 0.2), rgba(255, 208, 0, 0.2));
      border: 1px solid var(--fire);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      overflow: hidden;
      flex-shrink: 0;
      box-sizing: border-box;
      position: relative;
    }

    .driver-avatar img {
      width: 48px !important;
      height: 48px !important;
      max-width: 48px !important;
      max-height: 48px !important;
      object-fit: cover !important;
      border-radius: 13px !important;
      display: block !important;
    }

    .driver-info { flex: 1; }

    .driver-name {
      font-family: 'Oswald', sans-serif;
      font-size: 22px;
      font-weight: 700;
      letter-spacing: 0.5px;
      line-height: 1.1;
      color: var(--text);
    }

    .role-badge {
      display: inline-block;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      padding: 2px 7px;
      border-radius: 6px;
      margin-top: 3px;
      background: rgba(255, 208, 0, 0.12);
      border: 1px solid var(--gold);
      color: var(--gold);
    }

    .stats-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 4px;
    }

    .stat-card {
      background: #111111;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px 14px;
      position: relative;
      overflow: hidden;
    }

    .stat-card::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 3px;
    }

    .stat-card.honor::after { background: linear-gradient(90deg, var(--sky), #0055ff); }
    .stat-card.luck::after { background: linear-gradient(90deg, var(--gold), var(--fire)); }

    .stat-label {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 2px;
    }

    .stat-value {
      font-family: 'Oswald', sans-serif;
      font-size: 26px;
      font-weight: 700;
      letter-spacing: 0.5px;
      line-height: 1.1;
    }

    .stat-card.honor .stat-value { color: var(--sky); }
    .stat-card.luck .stat-value { color: var(--gold); }

    .stat-sub {
      font-size: 10px;
      color: var(--muted);
      margin-top: 2px;
    }

    .meta-card {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 10px;
    }

    .meta-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 13px;
    }

    .meta-label { color: var(--muted); font-size: 12px; }
    .meta-value { font-weight: 600; color: #eaeaea; font-family: monospace; }

    .copy-btn {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--sky);
      font-size: 11px;
      font-family: 'Oswald', sans-serif;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 6px;
      cursor: pointer;
      margin-left: 6px;
    }

    /* ================= HUD КАРТОЧКА СТАТУСА ДНЯ ================= */
    .hud-card {
      background: linear-gradient(145deg, rgba(26, 26, 26, 0.95), rgba(16, 16, 16, 0.95));
      border: 1px solid rgba(255, 85, 0, 0.3);
      border-left: 3px solid var(--fire);
      border-radius: 14px;
      padding: 12px 14px;
      margin-top: 10px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
      position: relative;
      overflow: hidden;
    }

    .hud-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
      padding-bottom: 6px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .hud-title-box {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .hud-icon {
      font-size: 14px;
      color: var(--fire);
    }

    .hud-title {
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      color: #eaeaea;
    }

    .hud-date-badge {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.5px;
      background: rgba(255, 85, 0, 0.15);
      color: var(--fire);
      border: 1px solid rgba(255, 85, 0, 0.3);
      padding: 2px 7px;
      border-radius: 6px;
    }

    .hud-rows {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .hud-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
    }

    .hud-row-label {
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
    }

    .hud-row-icon {
      font-size: 12px;
    }

    .hud-row-val {
      font-weight: 600;
      font-size: 12px;
      color: #ffffff;
      text-align: right;
    }

    .hud-row-val.active {
      color: #00e676;
    }

    .hud-row-val.inactive {
      color: #777777;
    }

    .hud-row-val.timer-accent {
      color: var(--gold);
      font-family: monospace;
      font-size: 13px;
    }

    /* ================= КАРТОЧКА ЭКИПАЖА / MOONRIDE ================= */
    .crew-card {
      background: linear-gradient(145deg, rgba(24, 24, 28, 0.95), rgba(15, 15, 18, 0.95));
      border: 1px solid rgba(255, 208, 0, 0.25);
      border-left: 3px solid var(--gold);
      border-radius: 14px;
      padding: 12px 14px;
      margin-top: 10px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    }

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

    .crew-title-box {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .crew-icon {
      font-size: 14px;
      color: var(--gold);
    }

    .crew-title {
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      color: #eaeaea;
    }

    .crew-status-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 6px;
      letter-spacing: 0.5px;
    }

    .crew-status-badge.badge-recruiting {
      background: rgba(255, 170, 0, 0.15);
      color: #ffaa00;
      border: 1px solid rgba(255, 170, 0, 0.3);
    }

    .crew-status-badge.badge-active {
      background: rgba(0, 230, 118, 0.15);
      color: #00e676;
      border: 1px solid rgba(0, 230, 118, 0.3);
    }

    .crew-status-badge.badge-qualified {
      background: rgba(0, 170, 255, 0.15);
      color: var(--sky);
      border: 1px solid rgba(0, 170, 255, 0.3);
    }

    .crew-status-badge.badge-locked {
      background: rgba(255, 85, 0, 0.15);
      color: var(--fire);
      border: 1px solid rgba(255, 85, 0, 0.3);
    }

    .crew-info-text {
      font-size: 12px;
      color: #dddddd;
      margin-bottom: 4px;
      line-height: 1.3;
    }

    .crew-sub-text {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.3;
    }

    .crew-progress-box {
      margin: 8px 0;
    }

    .crew-progress-label {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 4px;
    }

    .crew-bar-bg {
      background: #1e1e24;
      height: 7px;
      border-radius: 4px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .crew-bar-fill {
      background: linear-gradient(90deg, var(--fire), var(--gold));
      height: 100%;
      border-radius: 4px;
      transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .crew-action-btn {
      width: 100%;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #eaeaea;
      padding: 7px 10px;
      border-radius: 8px;
      font-family: 'Oswald', sans-serif;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.6px;
      cursor: pointer;
      margin-top: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: background 0.2s ease;
    }

    .crew-action-btn:active {
      background: rgba(255, 255, 255, 0.1);
    }

    /* Списки (Рейтинг и Царь Горы) */
    .rank-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .rank-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #111111;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 14px;
      transition: all 0.2s ease;
    }

    .rank-row.highlight-self {
      border: 1px solid var(--fire);
      background: rgba(255, 85, 0, 0.08);
    }

    .rank-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .rank-num {
      font-family: 'Oswald', sans-serif;
      font-weight: 700;
      font-size: 15px;
      width: 20px;
      text-align: center;
      color: var(--muted);
    }

    .rank-icon { font-size: 17px; }
    .rank-name { font-weight: 600; font-size: 14px; color: var(--text); }

    .rank-dist {
      font-family: 'Oswald', sans-serif;
      font-weight: 700;
      font-size: 16px;
      letter-spacing: 0.5px;
      color: var(--sky);
    }

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

    .user-rank-footer {
      background: rgba(0, 170, 255, 0.08);
      border: 1px solid rgba(0, 170, 255, 0.3);
      border-radius: 12px;
      padding: 10px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 13px;
    }

    .user-rank-footer .label { color: var(--text); font-weight: 600; }
    .user-rank-footer .val { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 17px; color: var(--gold); }

    .empty-state {
      text-align: center;
      color: var(--muted);
      font-size: 13px;
      padding: 24px 10px;
    }

    /* Кнопка действия */
    .cta-btn {
      background: linear-gradient(135deg, var(--fire), #ff2200);
      color: #fff;
      border: none;
      border-radius: 14px;
      padding: 13px;
      font-family: 'Oswald', sans-serif;
      font-size: 17px;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      width: 100%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 5px 18px rgba(255, 85, 0, 0.35);
      margin-top: 10px;
    }

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

    /* ================= ЗАЩИТНЫЙ ЭКРАН (GATE) ================= */
    .gate-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 30px 20px;
      text-align: center;
      box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
      margin: auto 0;
    }

    .gate-icon {
      font-size: 48px;
      margin-bottom: 14px;
    }

    .gate-title {
      font-family: 'Oswald', sans-serif;
      font-size: 24px;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      color: var(--text);
      margin-bottom: 12px;
    }

    .gate-line-main {
      font-size: 15px;
      font-weight: 600;
      color: #f0f0f0;
      margin-bottom: 6px;
      line-height: 1.4;
    }

    .gate-line-sub {
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 16px;
      line-height: 1.4;
    }

    .gate-action-text {
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.5px;
      color: var(--gold);
      margin-bottom: 22px;
      text-transform: uppercase;
    }

    .footer {
      text-align: center;
      font-size: 10px;
      color: #444;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-top: 14px;
    }

    /* ================= WALLET STYLES ================= */
    .wallet-card {
      background: linear-gradient(135deg, #1f1f23 0%, #121214 50%, #1a1a20 100%);
      border: 1px solid rgba(255, 208, 0, 0.35);
      border-radius: 16px;
      padding: 20px 18px;
      margin-bottom: 16px;
      position: relative;
      overflow: hidden;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    }
    .wallet-card::before {
      content: '';
      position: absolute;
      top: -50%;
      right: -20%;
      width: 220px;
      height: 220px;
      background: radial-gradient(circle, rgba(255, 208, 0, 0.12) 0%, transparent 70%);
      pointer-events: none;
    }
    .wallet-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 18px;
    }
    .wallet-chip-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .wallet-chip {
      width: 34px;
      height: 26px;
      background: linear-gradient(135deg, #e6c875 0%, #b89738 100%);
      border-radius: 5px;
      border: 1px solid #8d7023;
      box-shadow: inset 0 1px 2px rgba(255,255,255,0.4);
      position: relative;
    }
    .wallet-chip::after {
      content: '';
      position: absolute;
      top: 5px;
      left: 5px;
      right: 5px;
      bottom: 5px;
      border: 1px dashed rgba(0,0,0,0.35);
      border-radius: 2px;
    }
    .wallet-badge-type {
      font-family: 'Oswald', sans-serif;
      font-size: 11px;
      letter-spacing: 2px;
      text-transform: uppercase;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 6px;
      transition: all 0.3s ease;
    }
    .wallet-badge-type.tier-platinum {
      color: #e5e9f0;
      background: rgba(229, 233, 240, 0.15);
      border: 1px solid rgba(229, 233, 240, 0.45);
      box-shadow: 0 0 12px rgba(229, 233, 240, 0.25);
    }
    .wallet-badge-type.tier-golden {
      color: #ffd000;
      background: rgba(255, 208, 0, 0.14);
      border: 1px solid rgba(255, 208, 0, 0.35);
      box-shadow: 0 0 10px rgba(255, 208, 0, 0.2);
    }
    .wallet-badge-type.tier-standard {
      color: #888888;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.12);
    }
    .wallet-card-brand {
      font-family: 'Oswald', sans-serif;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 1.5px;
      color: #ffffff;
      opacity: 0.85;
    }
    .wallet-balance-box {
      margin-bottom: 20px;
    }
    .wallet-balance-title {
      font-size: 11px;
      letter-spacing: 1px;
      text-transform: uppercase;
      color: #888888;
      margin-bottom: 4px;
    }
    .wallet-balance-value {
      font-family: 'Oswald', sans-serif;
      font-size: 34px;
      font-weight: 700;
      color: #ffd000;
      line-height: 1.1;
      text-shadow: 0 0 16px rgba(255, 208, 0, 0.3);
    }
    .wallet-balance-currency {
      font-size: 14px;
      color: #aaaaaa;
      font-weight: 500;
      margin-left: 4px;
    }
    .wallet-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      padding-top: 12px;
    }
    .wallet-holder-label {
      font-size: 9px;
      letter-spacing: 1px;
      color: #777777;
      text-transform: uppercase;
      margin-bottom: 2px;
    }
    .wallet-holder-name {
      font-family: 'Oswald', sans-serif;
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 1px;
      color: #ffffff;
      text-transform: uppercase;
    }
    .wallet-card-id {
      font-family: 'Roboto Condensed', monospace;
      font-size: 12px;
      color: #888888;
      letter-spacing: 1px;
    }

    /* Action Buttons */
    .wallet-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 16px;
    }
    .wallet-action-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 12px 8px;
      border-radius: 10px;
      font-family: 'Oswald', sans-serif;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.5px;
      cursor: pointer;
      transition: all 0.2s ease;
      border: none;
    }
    .wallet-btn-withdraw {
      background: #1f1f23;
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: #ffffff;
    }
    .wallet-btn-withdraw:active {
      background: #28282d;
      transform: scale(0.98);
    }
    .wallet-btn-transfer {
      background: linear-gradient(135deg, #ff5500 0%, #d44000 100%);
      color: #ffffff;
      box-shadow: 0 4px 12px rgba(255, 85, 0, 0.3);
    }
    .wallet-btn-transfer:active {
      transform: scale(0.98);
    }

    /* History Feed */
    .wallet-history-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 16px;
    }
    .wallet-history-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      padding-bottom: 8px;
    }
    .wallet-history-title {
      font-family: 'Oswald', sans-serif;
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 1px;
      color: var(--text);
      text-transform: uppercase;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .wallet-history-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .wallet-tx-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 12px;
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 8px;
      transition: background 0.15s ease;
    }
    .wallet-tx-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .wallet-tx-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      flex-shrink: 0;
    }
    .wallet-tx-icon.income {
      background: rgba(0, 230, 118, 0.12);
      color: #00e676;
      border: 1px solid rgba(0, 230, 118, 0.25);
    }
    .wallet-tx-icon.expense {
      background: rgba(255, 85, 0, 0.12);
      color: #ff5500;
      border: 1px solid rgba(255, 85, 0, 0.25);
    }
    .wallet-tx-details {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .wallet-tx-desc {
      font-size: 13px;
      font-weight: 600;
      color: #ffffff;
      line-height: 1.2;
    }
    .wallet-tx-time {
      font-size: 10px;
      color: #777777;
    }
    .wallet-tx-amount {
      font-family: 'Oswald', sans-serif;
      font-size: 15px;
      font-weight: 700;
      text-align: right;
      white-space: nowrap;
    }
    .wallet-tx-amount.income {
      color: #00e676;
    }
    .wallet-tx-amount.expense {
      color: #ff5500;
    }
    .wallet-history-empty {
      text-align: center;
      padding: 24px 10px;
      color: #666666;
      font-size: 12px;
    }

    /* Modal Overlay */
    .wallet-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      z-index: 1000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .wallet-modal-card {
      background: #18181c;
      border: 1px solid rgba(255, 208, 0, 0.3);
      border-radius: 14px;
      padding: 22px 18px;
      width: 100%;
      max-width: 320px;
      text-align: center;
      box-shadow: 0 10px 30px rgba(0,0,0,0.8);
      animation: modalFadeIn 0.2s ease-out;
    }
    @keyframes modalFadeIn {
      from { opacity: 0; transform: scale(0.92); }
      to { opacity: 1; transform: scale(1); }
    }
    .wallet-modal-icon {
      font-size: 36px;
      margin-bottom: 12px;
    }
    .wallet-modal-title {
      font-family: 'Oswald', sans-serif;
      font-size: 16px;
      font-weight: 700;
      color: #ffffff;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      margin-bottom: 8px;
    }
    .wallet-modal-desc {
      font-size: 13px;
      color: #aaaaaa;
      line-height: 1.4;
      margin-bottom: 18px;
    }
    .wallet-modal-btn {
      width: 100%;
      padding: 10px;
      border-radius: 8px;
      font-family: 'Oswald', sans-serif;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.5px;
      border: none;
      cursor: pointer;
      margin-bottom: 6px;
    }
    .wallet-modal-btn-primary {
      background: linear-gradient(135deg, #ff5500 0%, #d44000 100%);
      color: #fff;
    }
    .wallet-modal-btn-secondary {
      background: #25252b;
      color: #888888;
      border: 1px solid rgba(255, 255, 255, 0.08);
    }


/* In-App FinTrac Bank Sheet (Telegram Internal) */
.fintrac-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: #090d16;
  display: flex;
  flex-direction: column;
}
.fintrac-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  height: 48px;
  box-sizing: border-box;
}
.fintrac-back-btn {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.fintrac-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.5px;
}
.fintrac-external-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #94a3b8;
}
.fintrac-frame {
  flex: 1;
  width: 100%;
  height: calc(100% - 48px);
  border: none;
  background: #090d16;
}
