/* ===========================================
   ITGB 2026 - Estilos de la Calculadora
   =========================================== */

/* Resultado principal */
.resultado-impuesto {
  background: linear-gradient(135deg, #1e3a5f 0%, #2b4caf 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  text-align: center;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(43, 76, 175, 0.3);
}

.resultado-impuesto .etiqueta {
  display: block;
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.resultado-impuesto .monto {
  display: block;
  font-size: 32px;
  font-weight: 700;
}

/* Resultado exento */
.resultado-exento {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  text-align: center;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.resultado-exento .icono {
  font-size: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resultado-exento .texto {
  font-size: 20px;
  font-weight: 600;
}

.detalle-exento {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 15px 20px;
  color: #065f46;
  text-align: center;
}

.detalle-exento p {
  margin: 0;
}

/* Desglose del cálculo */
.desglose {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 25px;
  margin-top: 20px;
}

.desglose h4 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.desglose-seccion {
  margin-bottom: 20px;
}

.desglose-titulo {
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.tabla-desglose {
  width: 100%;
  border-collapse: collapse;
}

.tabla-desglose td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.tabla-desglose tr:last-child td {
  border-bottom: none;
}

.tabla-desglose .valor {
  text-align: right;
  font-family: 'Roboto Mono', 'Consolas', monospace;
  font-weight: 500;
  color: #1e293b;
}

.tabla-desglose .resta {
  color: #dc2626;
}

.tabla-desglose tr.total {
  background: #e0e7ff;
  border-radius: 6px;
}

.tabla-desglose tr.total td {
  font-weight: 600;
  color: #1e3a8a;
  border-bottom: none;
}

.tabla-desglose tr.total td:first-child {
  border-radius: 6px 0 0 6px;
}

.tabla-desglose tr.total td:last-child {
  border-radius: 0 6px 6px 0;
}

.tramo-info {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px 15px;
  color: #334155;
  font-size: 14px;
}

/* Fórmula */
.formula {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 15px;
  font-size: 14px;
  color: #92400e;
  margin-top: 15px;
}

.formula-titulo {
  font-weight: 600;
  margin-right: 8px;
}

/* Form styling */
#itgb-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #374151;
}

#itgb-form select,
#itgb-form input[type="number"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#itgb-form select:focus,
#itgb-form input[type="number"]:focus {
  outline: none;
  border-color: #2b4caf;
  box-shadow: 0 0 0 3px rgba(43, 76, 175, 0.1);
}

#itgb-form .leyenda-valuacion {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: -10px;
  margin-bottom: 15px;
}

/* Botones */
.botones-form {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-calcular {
  flex: 1;
  background: linear-gradient(135deg, #2b4caf 0%, #1e3a8a 100%);
  color: white;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-calcular:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 76, 175, 0.4);
}

.btn-borrar {
  background: #f3f4f6;
  color: #374151;
  padding: 14px 24px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-borrar:hover {
  background: #e5e7eb;
}

/* Responsive */
@media (max-width: 600px) {
  .desglose {
    padding: 15px;
  }
  
  .resultado-impuesto .monto {
    font-size: 26px;
  }
  
  .botones-form {
    flex-direction: column;
  }
  
  .tabla-desglose td {
    padding: 8px 10px;
    font-size: 14px;
  }
}
