* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  background: #f2f5f9;
  color: #222;
}

.contenedor {
  width: 850px;
  max-width: 95%;
  margin: 30px auto;
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.15);
}

h1 {
  text-align: center;
  color: #8b1e1e;
  text-decoration: underline;
  margin-bottom: 25px;
}

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

select,
input[type="number"] {
  padding: 8px;
  border: 1px solid #777;
  border-radius: 5px;
}

input[type="number"] {
  width: 80px;
}

button {
  background: linear-gradient(#4d9eea, #1f5c99);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background: linear-gradient(#3a85ca, #174978);
}

.opciones {
  width: 80%;
  margin: 10px auto 20px auto;
}

.opciones p {
  margin: 6px 0 0 25px;
  color: #555;
  font-size: 14px;
}

.tabla-contenedor {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  min-height: 230px;
}

th,
td {
  border: 1px solid #333;
  padding: 10px;
  text-align: center;
}

th {
  background: #e9eef5;
}

td:first-child {
  text-align: left;
}

.totales {
  width: 280px;
  margin-left: auto;
  margin-top: 15px;
}

.totales div {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.totales span {
  width: 90px;
  text-align: right;
  margin-right: 10px;
  font-weight: bold;
}

.totales input {
  flex: 1;
  padding: 8px;
  border: 1px solid #333;
  text-align: right;
  font-weight: bold;
}

.btn-factura {
  margin-top: 15px;
  width: 160px;
  height: 50px;
}
