* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
}

body {
  background: linear-gradient(180deg, #2a5a9c 0%, #6a9fd8 40%, #f0f4fa 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #1a1a1a;
  padding: 24px 16px 100px;
  display: flex;
  justify-content: center;
}

/* Container responsivo (mobile-first) */
.app-container {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

/* Tablet e Desktop */
@media (min-width: 768px) {
  .app-container { max-width: 720px; }
  body { padding: 40px 24px 120px; }
}

@media (min-width: 1200px) {
  .app-container { max-width: 960px; }
}

/* Header do app */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  padding: 8px 0 20px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.app-header .title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.badge-update {
  background: rgba(255,255,255,0.2);
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

/* Carro */
.car-image-container {
  display: flex;
  justify-content: center;
  padding: 10px 0;
  margin-top: -10px;
}

.car-pic {
  width: 100%;
  max-width: 280px;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.3));
}

/* Range + Bateria */
.range-section {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 4px;
  margin-top: -20px;
  margin-bottom: 10px;
}

.range-value {
  font-size: 44px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.range-unit { font-size: 16px; font-weight: 600; color: #fff; }

.battery-badge {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  padding: 4px 14px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* Status Text */
.status-text-row {
  padding: 0 4px;
  color: rgba(255,255,255,0.95);
  font-size: 14px;
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  font-weight: 500;
}

/* Ações rápidas */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.action-circle {
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: 0.2s;
  color: #1a1a1a;
  border: none;
}

.action-circle:active { transform: scale(0.94); }
.action-circle.active { background: #e8f5e9; color: #2FD47C; }

/* Cards brancos */
.white-card {
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* Card Nível */
.level-card { display: flex; flex-direction: column; }

.level-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

.level-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555;
  transition: 0.2s;
}

.level-btn:active { background: #f0f0f0; }

.level-value { font-size: 32px; font-weight: 700; color: #1a1a1a; }
.level-label { text-align: center; font-size: 12px; color: #888; font-weight: 500; }
.fan-icon { text-align: center; font-size: 26px; color: #555; margin-top: 5px; }

/* Card Chave */
.key-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.2s;
}
.key-card:active { background: #f8f9fb; }
.key-icon { font-size: 32px; }
.key-title { font-size: 16px; font-weight: 600; }
.key-subtitle { font-size: 13px; color: #888; }

/* Menu Cards */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (min-width: 600px) {
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

.menu-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  color: inherit;
}

.menu-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.menu-card:active { background: #f8f9fb; }

.menu-card-icon { font-size: 28px; }
.menu-card-text { font-size: 15px; font-weight: 600; line-height: 1.3; }
.menu-card-sub { font-size: 12px; color: #888; margin-top: 2px; font-weight: 400; }

/* Botão Mais Funções */
.more-functions-btn {
  background: #fff;
  border: none;
  border-radius: 40px;
  padding: 18px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  margin-top: 12px;
  width: 100%;
  text-decoration: none;
}

/* Bottom Tab Fixo */
.bottom-tab {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  z-index: 100;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #888;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
  flex: 1;
  max-width: 120px;
  text-decoration: none;
}

.tab-item.active { color: #2a5a9c; }
.tab-icon { font-size: 22px; }

/* Tela interna (fundo claro) */
.screen-light { color: #1a1a1a; }
.screen-light .app-header .title { color: #1a1a1a; text-shadow: none; }
.screen-light .badge-update { background: #e0e8f5; color: #555; }

.screen-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0 20px;
}

.back-btn {
  background: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  border: none;
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-decoration: none;
}

.screen-title { font-size: 22px; font-weight: 700; color: #1a1a1a; }

/* Perfil */
.profile-card {
  text-align: center;
  padding: 32px 20px;
  margin-bottom: 20px;
}

.profile-avatar { font-size: 64px; margin-bottom: 10px; }
.profile-name { font-size: 22px; font-weight: 700; }
.profile-email { font-size: 14px; color: #888; margin-top: 4px; }
.profile-since { font-size: 12px; color: #aaa; margin-top: 2px; }

/* Utilitário */
.text-danger { color: #e74c3c !important; }
.bg-danger-light { background: #fff0f0 !important; }