/* =========================================================
   1. VARIÁVEIS CYBERPUNK CORPORATIVO
   ========================================================= */
:root {
  /* Obsidian Black & Deep Space */
  --bg-main: #05070A;
  --bg-card: rgba(13, 17, 28, 0.75);
  --bg-card-hover: rgba(24, 32, 50, 0.9);
  
  /* Laranja Oficial FLYEX & Glowing Accents */
  --primary: #FF6B00;
  --primary-gradient: linear-gradient(135deg, #FF7A00 0%, #FF3D00 100%);
  --primary-glow: rgba(255, 107, 0, 0.45);
  --accent-orange: #FF6B00;
  --orange-gradient: linear-gradient(135deg, #FFA040 0%, #FF5500 100%);
  
  /* Cores Secundárias */
  --accent-gold: #FADB5F;
  --accent-green: #00FF88;
  --accent-cyan: #00F0FF;
  
  /* Bordas e Sombras High-Tech Laranja / Ciano */
  --border-color: rgba(255, 107, 0, 0.2);
  --border-bright: rgba(255, 107, 0, 0.45);
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-glow: 0 8px 32px 0 rgba(255, 107, 0, 0.18);
}

body.light-theme {
  --bg-main: #E2E8F0;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(0, 102, 255, 0.2);
  --text-main: #0F172A;
  --text-muted: #64748B;
  --shadow-glow: 0 8px 32px 0 rgba(0, 102, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: #020305;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.015em;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.app-container {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background-color: var(--bg-main);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* =========================================================
   2. GLASSMORPHISM (EFEITO VIDRO HIGH-TECH)
   ========================================================= */
.app-header, .balance-card, .vehicle-card, .referral-box, 
.profile-card, .bottom-nav, .modal-content, .quick-card, .menu-list {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-glow);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Linha de reflexo no topo dos cards (luz direcional) */
.balance-card, .vehicle-card, .modal-content {
  position: relative;
  overflow: hidden;
}

.balance-card::after, .vehicle-card::after, .modal-content::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  z-index: 10;
}

/* =========================================================
   3. TIPOGRAFIA TECNOLÓGICA (SPACE GROTESK & PLUS JAKARTA)
   ========================================================= */
h1, h2, h3, h4, h5,
.balance-amount .value, .stat-value, .m-val, .num, .contract-id, .phone, .phone-number, .currency-prefix {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.03em;
  font-weight: 700;
}

/* Glow no Saldo */
.balance-amount .value {
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
  font-size: 34px;
  font-weight: 800;
  color: var(--text-main);
  transition: filter 0.3s ease, opacity 0.3s ease;
}


.balance-amount .value.blurred {
  filter: blur(6px);
  opacity: 0.6;
  user-select: none;
}

/* Verde Neon para Ganhos */
.stat-value.positive, .status-badge.running, .m-val[style*="color: var(--accent-green)"] {
  color: var(--accent-green) !important;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.45);
}

/* =========================================================
   4. HEADER & TOP BAR
   ========================================================= */
.app-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-wrapper {
  position: relative;
}

/* Avatar Cyberpunk (Rotacionado em Diamante) */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  transform: rotate(45deg);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.avatar i {
  transform: rotate(-45deg);
  color: #000;
  font-size: 16px;
}

.status-indicator.online {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background-color: var(--accent-green);
  border: 2px solid var(--bg-main);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}

.user-level {
  font-size: 11px;
  color: var(--accent-gold);
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--primary);
}

.badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg-main);
}

.badge-dot.pulse {
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* =========================================================
   5. APP CONTENT & BALANCE CARD
   ========================================================= */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 85px 20px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.balance-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(22, 30, 52, 0.88) 0%, rgba(10, 15, 28, 0.96) 100%) !important;
  border: 1px solid rgba(255, 107, 0, 0.25) !important;
  border-top: 1px solid rgba(255, 160, 64, 0.55) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.balance-amount .value {
  background: linear-gradient(135deg, #FFFFFF 35%, #FFB380 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle at top right, rgba(0, 240, 255, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.balance-card > * {
  position: relative;
  z-index: 1;
}

.balance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

.btn-eye {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.balance-amount {
  margin: 12px 0 16px 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.balance-amount .currency {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
}

.balance-stats {
  display: flex;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 14px;
  font-weight: 700;
}

.balance-actions {
  display: flex;
  gap: 10px;
}

/* =========================================================
   6. BOTÕES NEON & SHIMMER POLIDO
   ========================================================= */
.btn {
  position: relative;
  overflow: hidden;
  flex: 1;
  padding: 13px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Outfit', 'Space Grotesk', sans-serif;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 45%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: rotate(25deg);
  animation: btnShimmer 4s infinite cubic-bezier(0.19, 1, 0.22, 1);
}
@keyframes btnShimmer {
  0% { left: -70%; }
  30%, 100% { left: 150%; }
}

.btn-primary {
  background: var(--primary-gradient);
  color: #FFFFFF !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 160, 64, 0.6);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:hover, .btn-primary:active {
  box-shadow: 0 10px 28px rgba(255, 107, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-2px) scale(1.015);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* =========================================================
   7. QUICK ACTIONS GRID (DIAMANTE ICONS)
   ========================================================= */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.quick-card {
  border-radius: var(--radius-md);
  padding: 16px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.quick-card:active, .quick-card:hover {
  transform: translateY(-3px);
  background-color: var(--bg-card-hover);
  border-color: var(--primary);
}

.quick-card span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
}

.quick-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.quick-icon i {
  transform: rotate(-45deg);
}

.icon-gold { background: rgba(250, 219, 95, 0.15); color: #FADB5F; box-shadow: 0 0 10px rgba(250, 219, 95, 0.2); }
.icon-blue { background: rgba(0, 240, 255, 0.15); color: #00F0FF; box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); }
.icon-green { background: rgba(0, 255, 136, 0.15); color: #00FF88; box-shadow: 0 0 10px rgba(0, 255, 136, 0.2); }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; box-shadow: 0 0 10px rgba(168, 85, 247, 0.2); }

/* =========================================================
   8. FLEET BANNER & SECTION
   ========================================================= */
.fleet-banner {
  background: linear-gradient(135deg, #0b1528 0%, #050b14 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.fleet-banner .tag {
  background: rgba(0, 240, 255, 0.15);
  color: var(--primary);
  border: 1px solid var(--border-color);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
}

.fleet-banner h3 {
  margin: 10px 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.fleet-banner p {
  font-size: 12px;
  color: #94a3b8;
  max-width: 80%;
}

.banner-bg-icon {
  position: absolute;
  right: -10px;
  bottom: -15px;
  font-size: 90px;
  opacity: 0.12;
  color: var(--primary);
}

.float-anim {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-heading h4 {
  font-size: 15px;
  font-weight: 700;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-link:hover {
  text-decoration: underline;
}

/* =========================================================
   9. VEHICLE CARDS & PROGRESS
   ========================================================= */
.vehicle-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}

.vehicle-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.vehicle-header h5 {
  font-size: 15px;
  font-weight: 700;
}

.contract-id {
  font-size: 11px;
  color: var(--text-muted);
}

.status-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.status-badge.available { background: rgba(0, 240, 255, 0.15); color: var(--primary); border: 1px solid var(--border-color); }
.status-badge.hot { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-badge.vip { background: rgba(250, 219, 95, 0.15); color: var(--accent-gold); border: 1px solid rgba(250, 219, 95, 0.3); }
.status-badge.running { background: rgba(0, 255, 136, 0.15); color: var(--accent-green); border: 1px solid rgba(0, 255, 136, 0.3); }

.status-badge.running i {
  font-size: 8px;
  margin-right: 4px;
  vertical-align: middle;
  animation: pulse-red 2s infinite;
}

.vehicle-metrics {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.metric .m-title {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.metric .m-val {
  font-size: 14px;
  font-weight: 700;
}

/* Barra de Progresso High-Tech */
.progress-bar {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
  border-radius: 10px;
  position: relative;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* =========================================================
   10. CHIPS DE FILTRO & ABAS
   ========================================================= */
.pane-header {
  margin-bottom: 16px;
}

.pane-header h3 {
  font-size: 20px;
  margin-bottom: 4px;
  font-weight: 700;
}

.pane-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.filter-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--primary);
}

.filter-chip.active {
  background: var(--primary-gradient);
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

/* =========================================================
   11. EQUIPE / AFILIADOS & PERFIL
   ========================================================= */
.referral-box {
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

.copy-field {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.copy-field input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}

.btn-copy {
  background: var(--primary-gradient);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.btn-copy.success {
  background: var(--accent-green);
  color: #000;
}

.copy-feedback {
  font-size: 11px;
  color: var(--accent-green);
  margin-top: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  height: 0;
  overflow: hidden;
  text-align: center;
  font-weight: 600;
}

.copy-feedback.show {
  opacity: 1;
  transform: translateY(0);
  height: 16px;
  margin-top: 10px;
}

.team-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric-box {
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.metric-box .num {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.metric-box .desc {
  font-size: 11px;
  color: var(--text-muted);
}

.team-levels .level-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.team-levels .level-card:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.lvl-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.level-card p {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-card {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  transform: rotate(45deg);
  background: var(--primary-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.avatar-large i {
  transform: rotate(-45deg);
  font-size: 26px;
  color: #000;
}

.account-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  background: rgba(0, 255, 136, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
}

.menu-list {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s ease, padding-left 0.3s ease;
}

.menu-item:hover, .menu-item:active {
  background-color: rgba(0, 240, 255, 0.08);
  padding-left: 24px;
}

.menu-item .arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
}

.menu-item.logout {
  color: #ef4444;
  border-bottom: none;
  transition: all 0.3s ease;
}

.menu-item.logout:hover, .menu-item.logout:active {
  background-color: rgba(239, 68, 68, 0.15);
  padding-left: 24px;
}

.app-version {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 20px;
}

.app-version span {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  opacity: 0.6;
}

/* =========================================================
   12. BOTTOM NAV & MODAIS
   ========================================================= */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(65px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  width: 25%;
  transition: color 0.3s ease;
}

.nav-icon-wrapper {
  position: relative;
  font-size: 18px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn.active {
  color: var(--primary);
}

.nav-btn.active .nav-icon-wrapper {
  transform: translateY(-4px) scale(1.1);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 380px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: scale(0.95) translateY(15px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.open .modal-content {
  transform: scale(1) translateY(0);
}

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

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.preset-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 16px 0;
}

.preset-btn {
  padding: 10px 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  border-color: var(--primary);
}

.preset-btn.active {
  background: var(--primary-gradient);
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.modal-body label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.modal-body input {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  margin-bottom: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-body input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.2);
}

.reward-icon {
  font-size: 50px;
  color: var(--accent-gold);
  margin: 10px 0 20px 0;
  text-shadow: 0 0 20px rgba(250, 219, 95, 0.4);
}

.bounce-anim {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-15px); }
  60% { transform: translateY(-7px); }
}


/* =========================================
   QRCODE PIX DISPLAY & TIMER STYLES
   ========================================= */
.pix-timer-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(250, 219, 95, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(250, 219, 95, 0.3);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.qrcode-wrapper {
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.3);
  border: 2px solid var(--primary);
  margin-bottom: 14px;
}

#qrcode-canvas img, #qrcode-canvas canvas {
  display: block;
  width: 170px !important;
  height: 170px !important;
}

.pix-amount-tag {
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.pix-amount-tag strong {
  color: var(--accent-green);
  font-size: 18px;
  font-family: 'Space Grotesk', monospace;
}


/* =========================================
   PWA INSTALL BANNER STYLES
   ========================================= */
.pwa-install-card {
  position: absolute;
  bottom: 78px;
  left: 16px;
  right: 16px;
  background: linear-gradient(135deg, rgba(13, 17, 28, 0.95) 0%, rgba(20, 28, 46, 0.95) 100%);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(12px);
  z-index: 95;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.pwa-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.pwa-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pwa-info strong {
  font-size: 12px;
  color: #fff;
}

.pwa-info span {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-pwa-action {
  background: var(--primary-gradient);
  color: #000;
  border: none;
  font-weight: 800;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-pwa-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}


/* =========================================================
   NOVA GAMIFICAÇÃO, TELEMETRIA VIVA, EXTRATO & NOTIFICAÇÕES
   ========================================================= */

/* 1. Banner de Carreira no Início (Gamificação) */
.home-career-banner {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, rgba(11, 15, 28, 0.95) 100%);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.home-career-banner:active {
  transform: scale(0.99);
  border-color: var(--primary);
}
.home-career-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.home-career-rank-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-career-rank-icon {
  font-size: 22px;
}
.home-career-rank-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}
.home-career-next-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(250, 219, 95, 0.12);
  border: 1px solid rgba(250, 219, 95, 0.3);
  padding: 3px 8px;
  border-radius: 12px;
}
.home-career-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin: 6px 0;
}
.home-career-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00F0FF, #00FF88);
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.home-career-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* 2. Botão Compartilhar WhatsApp */
.btn-whatsapp-share {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  padding: 12px 16px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-top: 12px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.btn-whatsapp-share:hover, .btn-whatsapp-share:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5) !important;
}
.btn-whatsapp-share i {
  font-size: 18px;
}

/* 3. Telemetria Viva nos Veículos Ativos */
.telemetry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 11px;
}
.telemetry-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.telemetry-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}
.settlement-badge {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--primary);
  font-weight: 700;
  font-size: 11px;
}

/* 4. Extrato Financeiro & Filtros */
.history-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.history-filters::-webkit-scrollbar { display: none; }
.history-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.history-chip.active {
  background: var(--primary-gradient);
  color: #000;
  border-color: transparent;
  font-weight: 800;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: background 0.2s ease;
}
.history-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.history-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.history-icon-circle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.history-icon-income { background: rgba(0, 255, 136, 0.12); color: var(--accent-green); border: 1px solid rgba(0, 255, 136, 0.3); }
.history-icon-commission { background: rgba(0, 240, 255, 0.12); color: var(--primary); border: 1px solid rgba(0, 240, 255, 0.3); }
.history-icon-withdraw { background: rgba(244, 63, 94, 0.12); color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.3); }
.history-icon-bonus { background: rgba(250, 219, 95, 0.12); color: var(--accent-gold); border: 1px solid rgba(250, 219, 95, 0.3); }

.history-item-details strong {
  display: block;
  font-size: 12.5px;
  color: #fff;
}
.history-item-details span {
  font-size: 10.5px;
  color: var(--text-muted);
}
.history-item-amount {
  text-align: right;
}
.history-item-amount strong {
  display: block;
  font-size: 13.5px;
  font-family: 'Space Grotesk', sans-serif;
}
.history-item-amount .btn-receipt-view {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--primary);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* 5. Comprovante Oficial Digital (Receipt) */
.receipt-box {
  background: #0b111e;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
}
.receipt-header {
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  margin-bottom: 16px;
}
.receipt-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1px;
  color: #fff;
}
.receipt-logo span { color: var(--primary); }
.receipt-amount-display {
  text-align: center;
  margin-bottom: 18px;
}
.receipt-amount-display .amount-val {
  font-size: 28px;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--accent-green);
}
.receipt-status-stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 4px;
  text-transform: uppercase;
}
.receipt-field-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.receipt-field-row span { color: var(--text-muted); }
.receipt-field-row strong { color: #fff; text-align: right; word-break: break-all; }

/* 6. Central de Notificações */
.notification-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.notification-card.unread {
  background: rgba(0, 240, 255, 0.04);
  border-color: rgba(0, 240, 255, 0.25);
}
.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.notification-content h6 {
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 3px;
}
.notification-content p {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 4px;
}
.notification-time {
  font-size: 10px;
  color: var(--text-tertiary, #64748B);
}


/* =========================================================
   INTEGRAÇÃO DE CIDADES, PONTOS DE CARREGAMENTO & WIDGETS FLUTUANTES
   ========================================================= */

/* Seletor de Tipo de Produto (Veículo vs Ponto de Carregamento) */
.product-type-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 4px;
  margin-bottom: 14px;
  gap: 4px;
}
.type-toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}
.type-toggle-btn.active {
  background: var(--primary-gradient);
  color: #000;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.35);
}

/* Barra de Filtro de Cidades (Shenzhen, Hangzhou, Xangai, Chengdu) */
.city-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.city-filter-bar::-webkit-scrollbar { display: none; }
.city-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.city-chip.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

/* Badge de Lote e Contagem Regressiva no Card */
.batch-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  flex-wrap: wrap;
  gap: 6px;
}
.batch-tag {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}
.batch-countdown-badge {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Widgets Flutuantes na Lateral Direita (Suporte + Bônus) */
.floating-widgets-container {
  position: absolute;
  right: 14px;
  bottom: 84px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 80;
}
.floating-widget-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(11, 17, 30, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 240, 255, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.25);
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  position: relative;
}
.floating-widget-btn:active, .floating-widget-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.5);
}
.floating-widget-btn i {
  font-size: 18px;
}
.floating-widget-btn span {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 2px;
  letter-spacing: 0.3px;
}
.widget-support {
  color: #229ED9;
  border-color: rgba(34, 158, 217, 0.5);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 15px rgba(34, 158, 217, 0.3);
}
.widget-bonus {
  color: var(--accent-gold);
  border-color: rgba(250, 219, 95, 0.5);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 15px rgba(250, 219, 95, 0.3);
}
.widget-pulse-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
}


/* =========================================================
   MAPA DE TELEMETRIA GPS AO VIVO & RADAR HIGH-TECH
   ========================================================= */
.gps-radar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 240, 255, 0.12);
  position: relative;
}

.gps-radar-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.4);
}

.gps-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gps-title-wrap h5 {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

.live-tag {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fb7185;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  animation: pulse 1.8s infinite;
}

.gps-city-pills {
  display: flex;
  gap: 4px;
}

.gps-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gps-pill.active {
  background: var(--primary-gradient);
  color: #000;
  border-color: transparent;
  font-weight: 800;
}

.gps-map-viewport, #gps-telemetry-map {
  width: 100% !important;
  height: 260px !important;
  min-height: 260px !important;
  background: #060912 radial-gradient(circle at center, rgba(0, 240, 255, 0.08) 0%, #060912 75%) !important;
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
}

/* Custom Leaflet Controls & Popups */
.leaflet-container {
  background: #060912 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.leaflet-popup-content-wrapper {
  background: rgba(11, 17, 30, 0.95) !important;
  backdrop-filter: blur(14px) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  color: #fff !important;
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.25) !important;
  padding: 4px !important;
}

.leaflet-popup-tip {
  background: #0b111e !important;
  border: 1px solid var(--border-color) !important;
}

.leaflet-popup-content {
  margin: 8px 10px !important;
  line-height: 1.4 !important;
}

.vehicle-marker-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-marker-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(11, 15, 28, 0.92);
  border: 2px solid #00F0FF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00F0FF;
  font-size: 13px;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.65);
  transition: transform 0.3s ease;
}

.vehicle-marker-icon.user-car {
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.85);
  background: rgba(0, 255, 136, 0.15);
}

.gps-hud-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  gap: 6px;
}

.hud-item {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.hud-label {
  font-size: 9.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.hud-val {
  font-size: 11.5px;
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
  font-weight: 700;
  margin-top: 2px;
}


/* =========================================================
   MAPA INTELIGENTE 2.0 & OVERLAY DE TELEMETRIA AO VIVO
   ========================================================= */

/* Radar Overlay & Control Buttons */
.gps-map-container-rel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.map-control-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 500;
}

.map-ctrl-btn {
  width: 32px;
  height: 32px;
  background: rgba(11, 17, 30, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.map-ctrl-btn:active {
  transform: scale(0.92);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.map-ctrl-btn.focus-car {
  color: var(--accent-green);
  border-color: rgba(0, 255, 136, 0.4);
}

/* Card Flutuante de Telemetria da Corrida Selecionada (Live Ride HUD) */
.live-ride-hud {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  background: rgba(8, 12, 22, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  z-index: 500;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.15);
  animation: slideUpRide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpRide {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.ride-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.ride-car-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ride-status-pill {
  font-size: 9px;
  font-weight: 800;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: var(--accent-green);
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

.ride-route-text {
  font-size: 10.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.ride-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}

.ride-metric-item {
  font-size: 10px;
  display: flex;
  flex-direction: column;
}

.ride-metric-item span {
  color: var(--text-muted);
  font-size: 9px;
}

.ride-metric-item strong {
  color: #fff;
  font-size: 11px;
  font-family: 'Space Grotesk', sans-serif;
}

/* Radar Sweep Effect */
.radar-sweep-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 240, 255, 0.05) 50%, transparent 100%);
  background-size: 100% 200%;
  animation: radarSweep 4s linear infinite;
  z-index: 400;
}

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

/* Live Global Ticker Strip */
.global-live-ticker {
  background: rgba(0, 240, 255, 0.05);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-icon {
  color: var(--accent-gold);
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}

.ticker-text {
  animation: tickerSlide 25s linear infinite;
  display: inline-block;
  white-space: nowrap;
}

@keyframes tickerSlide {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* =========================================================
   RESPONSIVIDADE MOBILE IMPECÁVEL
   ========================================================= */
@media (max-width: 480px) {
  .app-container {
    max-width: 100% !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .app-header {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px 14px;
  }

  .app-content {
    padding: 12px 12px calc(85px + env(safe-area-inset-bottom, 0px)) 12px;
  }

  .bottom-nav {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    height: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .balance-amount .value {
    font-size: 30px;
  }

  .gps-map-viewport, #gps-telemetry-map {
    height: clamp(240px, 36vh, 300px) !important;
    min-height: 240px !important;
  }

  .floating-widgets-container {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    right: 10px;
    gap: 8px;
  }

  .floating-widget-btn {
    width: 44px;
    height: 44px;
  }

  .product-type-toggle .type-toggle-btn {
    font-size: 11px;
    padding: 8px 10px;
  }

  .filter-chip {
    font-size: 10.5px;
    padding: 5px 10px;
  }
}


/* Botão de Rastreamento de Veículo no Radar GPS */
.btn-track-gps {
  width: 100%;
  margin-top: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.12) 0%, rgba(255, 61, 0, 0.05) 100%);
  border: 1px solid rgba(255, 107, 0, 0.35);
  color: #FFB380;
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.2px;
}
.btn-track-gps:hover, .btn-track-gps:active {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.25) 0%, rgba(255, 61, 0, 0.16) 100%);
  border-color: var(--primary);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.3);
}
.btn-track-gps i {
  font-size: 13px;
  color: var(--primary);
  transition: transform 0.25s ease;
}
.btn-track-gps:hover i {
  transform: scale(1.2);
}


/* =========================================================
   CARD DE EXTRATO DETALHADO ABAIXO DO SALDO (HOME STATEMENT)
   ========================================================= */
.home-statement-card {
  background: linear-gradient(145deg, rgba(16, 23, 40, 0.82) 0%, rgba(10, 15, 26, 0.95) 100%);
  border: 1px solid rgba(255, 107, 0, 0.22);
  border-top: 1px solid rgba(255, 160, 64, 0.45);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 107, 0, 0.08);
  position: relative;
  overflow: hidden;
}

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

.statement-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.statement-icon-glow {
  font-size: 18px;
  color: var(--primary);
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 107, 0, 0.3);
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.25);
}

.statement-title-wrap h5 {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.2px;
}

.statement-subtitle {
  font-size: 10.5px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.btn-statement-all {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-statement-all:hover, .btn-statement-all:active {
  background: rgba(255, 107, 0, 0.15);
  border-color: var(--primary);
  color: #fff;
  transform: translateX(2px);
}

.statement-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.statement-entry-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.statement-entry-item:hover {
  background: rgba(255, 107, 0, 0.06);
  border-color: rgba(255, 107, 0, 0.25);
  transform: translateX(3px);
}

.entry-left-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entry-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.entry-icon-deposit {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.35);
}

.entry-icon-income {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
}

.entry-icon-commission {
  background: rgba(250, 219, 95, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(250, 219, 95, 0.35);
}

.entry-icon-bonus {
  background: rgba(255, 107, 0, 0.15);
  color: var(--primary);
  border: 1px solid rgba(255, 107, 0, 0.35);
}

.entry-details h6 {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px 0;
}

.entry-details span {
  font-size: 10px;
  color: var(--text-muted);
}

.entry-right-col {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.entry-amount-val {
  font-size: 13px;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--accent-green);
}

.btn-entry-receipt {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-entry-receipt:hover {
  color: var(--primary);
  background: rgba(255, 107, 0, 0.1);
}
