/* Estilos para a Calculadora de Custos de Produção */

/* Variáveis de cores */
:root {
  --primary-color: #3483fa;
  --primary-hover: #0052a3;
  --secondary-color: #2968c8;
  --accent-color: #ffe600;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e6e6e6;
  --success-color: #39b54a;
  --danger-color: #ff5151;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --light-gray: #ecf0f1;
  --medium-gray: #bdc3c7;
  --dark-gray: #7f8c8d;
  --border-radius: 4px;
  --primary-light: #f5b7b1;
  --primary-dark: #c0392b;
  --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --background-color: #f5f5f5;
  --transition: all 0.3s ease;
  --spacing: 20px;
}

/* Reset e estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Proxima Nova', -apple-system, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Cabeçalho */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2rem;
}

.logo i {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

.menu ul {
  display: flex;
  list-style: none;
}

.menu li {
  margin-left: 1rem;
}

.menu a {
  text-decoration: none;
  color: var(--text-color);
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.menu a:hover, .menu a.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.menu a i {
  margin-right: 0.4rem;
}

/* Conteúdo principal */
main {
  padding: 2rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

h1 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.description {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-light);
}

section {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Formulários */
.form-group {
  margin-bottom: 1rem;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border 0.3s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Estilos para upload de imagem */
.image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#image-preview {
  width: 100%;
  height: 200px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

#image-preview:hover {
  border-color: var(--primary-color);
}

#image-preview i {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.image-actions {
  display: flex;
  gap: 1rem;
  width: 100%;
  justify-content: center;
}

.hidden {
  display: none;
}

/* Botões */
.btn {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn i {
  margin-right: 0.5rem;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-success {
  background-color: var(--success-color);
  color: var(--white);
}

.btn-success:hover {
  background-color: #218838;
}

/* Abas */
.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.8rem 1.2rem;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: 500;
  opacity: 0.7;
  position: relative;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  opacity: 1;
}

.tab-btn.active {
  opacity: 1;
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Tabelas */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.table-container {
  overflow-x: auto;
}

.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.cost-table th {
  background-color: var(--secondary-color);
  padding: 0.8rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-color);
}

.cost-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.cost-table input,
.cost-table select {
  padding: 0.5rem;
}

.row-total {
  font-weight: 600;
}

.total-label {
  text-align: right;
  font-weight: 600;
}

.total-value {
  font-weight: 700;
  color: var(--primary-color);
}

.delete-row {
  background: none;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.delete-row:hover {
  transform: scale(1.2);
}

/* Resumo de custos */
.summary-container {
  background-color: #f9f9f9;
  border-radius: 6px;
  padding: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px dashed var(--border-color);
}

.summary-label {
  font-weight: 500;
}

.summary-value {
  font-weight: 600;
}

.summary-divider {
  border-top: 2px solid var(--border-color);
  margin: 0.8rem 0;
}

.summary-total {
  font-size: 1.2rem;
  font-weight: 700;
}

.summary-total .summary-value {
  color: var(--primary-color);
}

.summary-per-piece {
  font-weight: 700;
}

.summary-per-piece .summary-value {
  color: var(--success-color);
}

/* Botões de ação */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Rodapé */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    padding: 1rem;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  .menu ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .menu li {
    margin: 0.3rem;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .tabs-nav {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
  }
  
  .cost-table th, 
  .cost-table td {
    padding: 0.5rem 0.3rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  section {
    padding: 1rem;
  }
  
  .tab-btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.3rem;
  }
}

/* Calculadora de Custos - Estilos */
.calculator-container {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: 20px auto;
  max-width: 1200px;
  overflow: hidden;
}

.calculator-header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: var(--spacing);
  text-align: center;
}

.calculator-header h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.calculator-header p {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
}

.calculator-content {
  padding: var(--spacing);
}

/* Seção de informações do produto */
.product-info-section, 
.costs-tabs-section,
.summary-section,
.pricing-section {
  margin-bottom: 30px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing);
}

h2 {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
  color: var(--text-color);
  font-size: 20px;
}

h3 {
  margin-bottom: 15px;
  color: var(--text-color);
  font-size: 18px;
}

.product-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text-color);
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--white);
  font-size: 14px;
}

textarea {
  resize: vertical;
  min-height: 70px;
}

/* Upload de imagem */
.upload-section {
  grid-column: 1 / -1;
}

.image-preview-container {
  position: relative;
  width: 100%;
  height: 200px;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background-color: var(--light-gray);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
}

.upload-placeholder i {
  font-size: 40px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

#image-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

#remove-image {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--danger-color);
  z-index: 10;
}

.hidden {
  display: none !important;
}

/* Sistema de abas */
.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.tab-btn i {
  margin-right: 5px;
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
  color: var(--secondary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Tabelas nas abas */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

thead th {
  background-color: var(--light-gray);
  text-align: left;
  padding: 10px;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

tfoot td {
  padding: 10px;
  border-top: 2px solid var(--border-color);
  font-weight: 600;
}

.total-label {
  text-align: right;
}

.tab-actions {
  margin-top: 15px;
  text-align: center;
}

.action-btn {
  padding: 8px 15px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.action-btn i {
  margin-right: 5px;
}

.add-btn {
  background-color: var(--primary-color);
  color: var(--white);
}

.add-btn:hover {
  background-color: var(--secondary-color);
}

.delete-btn {
  background-color: transparent;
  color: var(--danger-color);
  border: none;
  cursor: pointer;
  padding: 5px;
}

.delete-btn:hover {
  color: #ff0000;
}

/* Resumo de custos */
.summary-grid {
  display: flex;
  justify-content: center;
}

.summary-card {
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
  padding: 20px;
  width: 100%;
  max-width: 500px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.summary-item.total {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-color);
  border-bottom: none;
}

.summary-label {
  font-weight: 600;
}

/* Seção de preço */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.slider-group {
  margin-bottom: 20px;
}

.slider-container {
  display: flex;
  align-items: center;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;  
  background: #ddd;
  outline: none;
  margin-right: 15px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%; 
  background: var(--primary-color);
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

.price-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.price-item.total {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-color);
  border-bottom: none;
}

.price-label {
  font-weight: 600;
}

.selling-price-display {
  text-align: center;
  margin-top: 20px;
}

.price-tag {
  background-color: var(--accent-color);
  display: inline-block;
  padding: 15px 30px;
  border-radius: var(--border-radius);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  margin-top: 10px;
  box-shadow: var(--shadow);
}

/* Botões de ação */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.primary-btn, .secondary-btn, .danger-btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.primary-btn {
  background-color: var(--primary-color);
  color: var(--white);
}

.primary-btn:hover {
  background-color: var(--secondary-color);
}

.secondary-btn {
  background-color: var(--light-gray);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.secondary-btn:hover {
  background-color: var(--border-color);
}

.danger-btn {
  background-color: var(--danger-color);
  color: var(--white);
}

.danger-btn:hover {
  background-color: #ff0000;
}

.action-buttons i {
  margin-right: 8px;
}

/* Responsividade */
@media (max-width: 768px) {
  .calculator-container {
    margin: 0;
    border-radius: 0;
  }

  .product-info-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .tabs-header {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
    text-align: center;
  }

  .action-buttons {
    flex-direction: column;
  }

  .primary-btn, .secondary-btn, .danger-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
  }

  table {
    display: block;
    overflow-x: auto;
  }
} 