/* CSS Minimalista e Expandido para Cotações */

/* Cards de Cotação - Minimalistas e Expandidos */
.cotacao-cards {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.cotacao-card {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  flex: 1;
  min-width: 280px;
  max-width: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cotacao-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cotacao-card h3 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 1.1em;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cotacao-card h3 img {
  width: 24px;
  height: 24px;
}

.cotacao-preco {
  font-size: 2em;
  font-weight: bold;
  color: #27ae60;
  margin: 10px 0 5px 0;
  line-height: 1.1;
}

.cotacao-unidade {
  color: #7f8c8d;
  font-size: 0.9em;
  margin-bottom: 8px;
  position: relative;
}

.cotacao-status {
  color: #95a5a6;
  font-size: 0.85em;
  font-style: italic;
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
  margin-top: 10px;
}

/* Alternador de Unidades - Discreto */
.unidade-alternador {
  display: inline-block;
  margin-left: 10px;
  font-size: 0.8em;
}

.unidade-alternador select {
  padding: 2px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9em;
  background: white;
  cursor: pointer;
  color: #666;
}

.unidade-alternador select:focus {
  outline: none;
  border-color: #007bff;
}

/* Calculadora Expandida */
.calculadora-simples {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 25px;
  margin: 25px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  width: 100%;
  max-width: none;
}

.calculadora-titulo {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.3em;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.calculadora-titulo img {
  width: 20px;
  height: 20px;
}

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

.calc-campo {
  margin-bottom: 15px;
}

.calc-campo label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #495057;
  font-size: 0.95em;
}

.calc-campo input,
.calc-campo select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
  background: white;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.calc-campo input:focus,
.calc-campo select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

.calc-campo select {
  cursor: pointer;
}

/* Resultado da Calculadora */
.calc-resultado {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 20px;
  margin-top: 20px;
  border: 1px solid #e9ecef;
}

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

.resultado-item {
  background: white;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  border: 1px solid #dee2e6;
}

.resultado-label {
  font-size: 0.85em;
  color: #6c757d;
  margin-bottom: 4px;
  font-weight: 500;
}

.resultado-valor {
  font-size: 1.3em;
  font-weight: bold;
  margin: 0;
}

.resultado-percentual {
  font-size: 0.8em;
  color: #6c757d;
  font-style: italic;
  margin-top: 2px;
}

.resultado-receita {
  color: #007bff;
}

.resultado-custo {
  color: #fd7e14;
}

.resultado-lucro {
  color: #28a745;
}

.resultado-prejuizo {
  color: #dc3545;
}

.resultado-conversao {
  background: #e3f2fd;
  color: #1976d2;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9em;
  font-weight: 500;
}

/* Conversor de Unidades */
.unit-converter {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
    padding: 20px;
    margin: 20px 8px;
    width: 96%;
}

.unit-converter h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 1.1em;
  text-align: center;
}

.converter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.converter-row input,
.converter-row select {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1em;
}

.converter-result {
  font-weight: bold;
  color: #007bff;
  min-width: 120px;
}

.unit-converter small {
  display: block;
  text-align: center;
  color: #6c757d;
  font-size: 0.85em;
}

/* Responsividade */
@media (max-width: 768px) {
  .cotacao-cards {
    flex-direction: column;
    gap: 10px;
  }
  
  .cotacao-card {
    min-width: auto;
    margin: 0 10px;
  }
  
  .cotacao-preco {
    font-size: 1.8em;
  }
  
  .calculadora-simples {
        padding: 19px 15px;
        margin: -13px 8px;
        width: 96%;
  }
  
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .resultado-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .converter-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .converter-row input,
  .converter-row select {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .cotacao-preco {
    font-size: 1.6em;
  }
  
  .calculadora-titulo {
    font-size: 1.1em;
  }
  
  .calc-campo input,
  .calc-campo select {
    font-size: 0.95em;
    padding: 8px 10px;
  }
  
  .resultado-valor {
    font-size: 1.1em;
  }
}

/* Animações suaves */
.cotacao-card,
.calculadora-simples {
  animation: fadeInUp 0.4s ease-out;
}

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

/* Estados de hover */
.calc-campo input:hover,
.calc-campo select:hover {
  border-color: #007bff;
}

/* Print styles */
@media print {
  .cotacao-card,
  .calculadora-simples {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .unidade-alternador {
    display: none;
  }
}


/* Histórico com Identidade Visual do Site */
.historico-container {
  margin: 30px 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}

.historico-container h3 {
  background: linear-gradient(135deg, #8B4513, #A0522D);
  color: white;
  margin: 0;
  padding: 20px;
  font-size: 1.2em;
  font-weight: 600;
}

.tabela-wrapper {
  overflow-x: auto;
  padding: 0;
}

.tabela-historico-simples {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  background: #fff;
}

.tabela-historico-simples thead th {
  background: #f8f9fa;
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.tabela-historico-simples tbody td {
  padding: 12px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
}

.tabela-historico-simples tbody tr:hover {
  background: #f8f9fa;
}

.tabela-historico-simples tbody tr:last-child td {
  border-bottom: none;
}

.variacao {
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.9em;
  display: inline-block;
  min-width: 60px;
  text-align: center;
}

.variacao.positiva {
  color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.variacao.negativa {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

.historico-nota {
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.historico-nota small {
  color: #6c757d;
  font-style: italic;
  font-size: 0.85em;
}

@media (max-width: 768px) {
  .historico-container {
    margin: 20px 0;
    border-radius: 8px;
  }
  
  .historico-container h3 {
    font-size: 1.1em;
    padding: 15px;
  }
  
  .tabela-historico-simples {
    font-size: 0.85em;
  }
  
  .tabela-historico-simples thead th,
  .tabela-historico-simples tbody td {
    padding: 10px 8px;
  }
  
  .variacao {
    font-size: 0.8em;
    padding: 3px 6px;
    min-width: 50px;
  }
  
  .historico-nota {
    padding: 12px 15px;
  }
}

