* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 15px;
  background-color: #f9f9f9;
  color: #333;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

h1, h2 {
  text-align: center;
  margin-bottom: 20px;
}

.datos-seccion {
  margin-bottom: 25px;
}

.datos-seccion label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.datos-seccion input[type="text"],
.datos-seccion input[type="email"],
.datos-seccion input[type="tel"],
.datos-seccion input[type="number"],
.datos-seccion input[type="date"] {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.preview-logo img {
  max-width: 120px;
  max-height: 80px;
  margin-top: 10px;
  display: block;
  object-fit: contain;
  border: 1px solid #ddd;
  padding: 5px;
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

table th, table td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}

table th {
  background-color: #f0f0f0;
}

.imagePreview {
  max-width: 100px;
  max-height: 80px;
  display: block;
  margin: 8px auto 0;
  object-fit: contain;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.btn-container {
  text-align: center;
  margin-top: 10px;
}

.btn-container button {
  background-color: #007bff;
  border: none;
  padding: 10px 18px;
  margin: 5px;
  color: white;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-container button:hover {
  background-color: #0056b3;
}

.btnEliminar {
  background-color: #dc3545;
  border: none;
  padding: 6px 12px;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.btnEliminar:hover {
  background-color: #b02a37;
}

.proforma-header {
  display: flex;
  gap: 25px;
  margin-bottom: 20px;
  align-items: center;
}

.proforma-logo {
  max-width: 150px;
  max-height: 100px;
  object-fit: contain;
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 6px;
}

.info-empresa, .info-cliente {
  flex: 1;
}

.info-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1.1rem;
  border-bottom: 1px solid #aaa;
  padding-bottom: 5px;
}

.info-text p {
  margin: 4px 0;
  font-size: 0.95rem;
}

.totales p {
  font-size: 1.1rem;
  margin: 6px 0;
}

.text-right {
  text-align: right;
}

.btns-print-download button {
  background-color: #28a745;
  border: none;
  padding: 10px 15px;
  margin: 0 5px;
  color: white;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
}

.btns-print-download button:hover {
  background-color: #1e7e34;
}

@media (max-width: 700px) {
  .proforma-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-empresa, .info-cliente {
    width: 100%;
  }

  table th, table td {
    font-size: 0.85rem;
    padding: 6px;
  }

  .btn-container button,
  .btns-print-download button {
    width: 100%;
    margin: 6px 0;
  }
}
#resultadoProforma {
  max-width: 800px;
  width: 100%;
  margin: 30px auto;
  border: 1px solid #444;
  padding: 20px;
  background: white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}
