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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background-color: #000;
  color: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* SISTEMA DE APROVAÇÃO */
.modal-pendente {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-pendente-conteudo {
  background: #1a1a1a;
  padding: 40px 30px;
  border-radius: 15px;
  max-width: 400px;
  text-align: center;
  border: 2px solid #ff9800;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  padding: 15px 30px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
}

.codigo-gerado {
  background: #0a0a0a;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  text-align: center;
  border: 2px solid #4caf50;
}

.codigo-valor {
  font-size: 32px;
  font-weight: 700;
  color: #4caf50;
  letter-spacing: 4px;
  margin: 15px 0;
  font-family: 'Courier New', monospace;
}

/* MODAL VEÍCULO */
#modalVeiculo {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
}

.modal-veiculo-conteudo {
  background: #1a1a1a;
  padding: 30px;
  border-radius: 15px;
  max-width: 500px;
  margin: 20px auto;
  border: 2px solid #333;
}

.resumo-veiculo {
  background: #0a0a0a;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border: 1px solid #333;
}

.resumo-veiculo div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: #888;
}

.resumo-veiculo strong {
  color: #fff;
}

/* MAPA DE CALOR */
#telaMapaCalor {
  display: none;
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 100px;
}

.regiao-item {
  background: #1a1a1a;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #333;
}

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

.regiao-nome {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.regiao-percentual {
  font-size: 18px;
  font-weight: 700;
  color: #4caf50;
}

.barra-regiao {
  width: 100%;
  height: 25px;
  background: #0a0a0a;
  border-radius: 5px;
  overflow: hidden;
  margin: 5px 0;
}

.barra-regiao-preenchida {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #45a049);
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.regiao-info {
  display: flex;
  justify-content: space-between;
  color: #888;
  font-size: 13px;
  margin-top: 5px;
}

.status-rastreamento {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 10px;
}

.rastreamento-ativo {
  background: #4caf50;
  color: #fff;
  animation: pulse 2s infinite;
}

.rastreamento-inativo {
  background: #666;
  color: #ccc;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== TELAS ===== */
#telaLogin, #telaCadastro {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

#telaDashboard, #telaHistorico, #telaMeta, #telaGrafico, #telaRetroativo, #telaConfiguracoes {
  display: none;
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

#telaAtivacao, #painelAdmin {
  display: none;
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.container {
  background-color: #1a1a1a;
  padding: 30px;
  border-radius: 15px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  border: 1px solid #333;
}

h1 {
  text-align: center;
  color: #fff;
  margin-bottom: 25px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
}

h2 {
  color: #fff;
  margin: 20px 0 10px;
  font-size: 20px;
  font-weight: 600;
}

h3 {
  color: #fff;
  margin: 15px 0 10px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}

label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  color: #ccc;
  font-weight: 500;
  font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
select {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #333;
  margin-bottom: 10px;
  background: #0a0a0a;
  color: #fff;
  font-size: 16px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #fff;
  background: #111;
}

select {
  cursor: pointer;
}

select option {
  background: #0a0a0a;
  color: #fff;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.checkbox-container {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.checkbox-container input {
  margin-right: 8px;
  width: auto;
  accent-color: #fff;
}

button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background-color: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
}

button:active {
  transform: scale(0.98);
  background-color: #e0e0e0;
}

.link {
  text-align: center;
  margin-top: 15px;
  color: #fff;
  cursor: pointer;
  text-decoration: underline;
}

/* ===== DASHBOARD ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #333;
}

header h1 {
  font-size: 36px;
  margin: 0;
  flex: 1;
}

#boasVindas {
  font-size: 18px;
  margin-bottom: 20px;
  color: #fff;
  font-weight: 600;
}

#dataAtual {
  font-size: 13px;
  color: #888;
  text-transform: lowercase;
  text-align: right;
  white-space: nowrap;
}

.campo {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  margin: 8px 0;
  background: #1a1a1a;
  border-radius: 8px;
  font-size: 16px;
  border: 1px solid #333;
}

.campo span {
  cursor: pointer;
  color: #fff;
  font-weight: 600;
}

.campo span:active {
  opacity: 0.7;
}

.campo-info {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  margin: 5px 0;
  background: #0a0a0a;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid #222;
}

#barraContainer {
  width: 100%;
  background: #1a1a1a;
  border-radius: 10px;
  margin: 15px 0;
  overflow: hidden;
  height: 35px;
  border: 1px solid #333;
}

#barraProgresso {
  height: 100%;
  background: linear-gradient(90deg, #fff, #e0e0e0);
  text-align: center;
  line-height: 35px;
  color: #000;
  font-weight: 700;
  width: 0%;
  transition: width 0.5s ease;
}

#percentualMeta {
  text-align: center;
  margin-bottom: 15px;
  font-size: 14px;
  color: #888;
}

#lucroLiquido {
  font-size: 24px;
}

.btn-secondary {
  background: #1a1a1a;
  color: #fff;
  margin-top: 5px;
  border: 1px solid #333;
}

#opcoesAtalhos {
  display: none;
  margin-top: 15px;
}

#opcoesAtalhos button {
  margin: 5px 0;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
}

/* ===== CONFIGURAÇÕES ===== */
.config-section {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
  margin: 15px 0;
  border: 1px solid #333;
}

.info-calculada {
  background: #0a0a0a;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border: 1px solid #222;
}

.info-calculada p {
  margin: 8px 0;
  font-size: 14px;
  color: #ccc;
  display: flex;
  justify-content: space-between;
}

.info-calculada strong {
  color: #fff;
}

/* ===== HISTÓRICO ===== */
.historico-item {
  background: #1a1a1a;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  border-left: 4px solid #fff;
  border: 1px solid #333;
}

.historico-data {
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.historico-valores {
  font-size: 14px;
  color: #ccc;
}

/* ===== META ===== */
.meta-info {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
  margin: 15px 0;
  text-align: center;
  border: 1px solid #333;
}

.meta-valor {
  font-size: 32px;
  color: #fff;
  margin: 10px 0;
  font-weight: 700;
}

/* ===== GRÁFICO ===== */
#canvasGrafico {
  width: 100%;
  max-width: 100%;
  height: 300px;
  background: #1a1a1a;
  border-radius: 10px;
  margin: 20px 0;
  border: 1px solid #333;
}

.periodo-grafico {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.periodo-grafico button {
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
}

.periodo-grafico button.ativo {
  background: #fff;
  color: #000;
}

/* ===== RETROATIVO ===== */
.form-retroativo {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
  margin: 15px 0;
  border: 1px solid #333;
}

.btn-adicionar {
  background: #fff;
  color: #000;
  margin-top: 15px;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.modal-conteudo {
  background: #1a1a1a;
  max-width: 500px;
  margin: 50px auto;
  padding: 30px;
  border-radius: 15px;
  border: 1px solid #333;
}

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

.modal-fechar {
  cursor: pointer;
  font-size: 24px;
  color: #fff;
  background: none;
  border: none;
  padding: 0;
  width: auto;
}

.opcao-relatorio {
  background: #0a0a0a;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #333;
  transition: all 0.2s;
}

.opcao-relatorio:hover {
  border-color: #fff;
}

.opcao-relatorio h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 5px;
  border: none;
  padding: 0;
}

.opcao-relatorio p {
  color: #888;
  font-size: 14px;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 480px) {
  .container {
    padding: 20px;
  }
  
  h1 {
    font-size: 28px;
  }
  
  header h1 {
    font-size: 32px;
  }
  
  #lucroLiquido {
    font-size: 20px;
  }
  
  .periodo-grafico {
    gap: 5px;
  }
  
  .periodo-grafico button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

.escondido {
  display: none !important;
}

.alerta-sucesso {
  background: #1a1a1a;
  border: 1px solid #fff;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  text-align: center;
  color: #fff;
  animation: fadeIn 0.3s;
}

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

.input-group {
  display: flex;
  gap: 10px;
}

.input-group > div {
  flex: 1;
}
