
/* ==== ESTILO GLOBAL ==== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f7f9fc;
  color: #333;
  margin: 0;
  padding: 0;
}

h2, h3 {
  text-align: center;
  color: #1a237e;
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

/* ==== LOGO ==== */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

#logo {
  width: 160px;
  margin-bottom: 10px;
}

/* ==== CONTENEDORES ==== */
.form-container {
  background: white;
  margin: 30px auto;
  max-width: 900px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.form-container-a {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

.form-container-a-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==== TABLAS ==== */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

th, td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #e3eaf7;
  color: #0d47a1;
}

tr:hover {
  background-color: #f1f1f1;
}

/* ==== INPUTS Y BOTONES ==== */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

input[type="text"]::before,
input[type="text"]::after {
  content: none;
  border: none;
}

button {
  padding: 10px 15px;
  background-color: #0d47a1;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #1565c0;
}

button[type="submit"]:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* ==== ENLACES ==== */
a.btn-volver {
  padding: 10px 15px;
  background-color: #0d47a1;
  color: white;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
  display: inline-block;
  margin-top: 20px;
}

a.btn-volver:hover {
  background-color: #1565c0;
}

/* ==== FORMULARIOS EN LÍNEA ==== */
.form-inline-spaced {
  margin-top: 6px;
}

/* ==== BOTONES PEQUEÑOS / ÍCONOS ==== */
.btn-icon {
  padding: 6px 10px;
  font-size: 16px;
  background-color: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #bbdefb;
  margin: 2px;
}

.btn-icon:hover {
  background-color: #bbdefb;
}

/* ==== NUEVA VENTA - BUSQUEDA ==== */
.busqueda-producto {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.busqueda-producto input[type="text"] {
  width: 250px;
}

.busqueda-producto input[type="number"] {
  width: 80px;
}

/* ==== SELECTS AJUSTADOS ==== */
select[name="metodo_pago"],
select[name="cliente_id"] {
  max-width: 300px;
  width: 100%;
}

.header-productos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.header-productos .titulo h2 {
  margin: 0;
}

.btn-agregar {
  padding: 10px 18px;
  background-color: #28a745;
  color: white;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-agregar:hover {
  background-color: #218838;
}

.btn-volver {
  padding: 10px 15px;
  background-color: #0d47a1;
  color: white;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.btn-volver:hover {
  background-color: #1565c0;
}

/* ==== NUEVA VENTA - FILA DE FORMULARIO ==== */
.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* ==== TOTAL DESTACADO ==== */
.total-box h2 {
  font-size: 28px;
  color: #0d47a1;
  background-color: #e3f2fd;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 20px;
}

.acciones-cliente {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.metodos-pago {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.btn-metodo {
  position: relative;
  text-align: center;
  padding: 15px 10px;
  border: 2px solid #7aa8ee;
  border-radius: 10px;
  cursor: pointer;
  width: 120px;
  font-size: 20px;
  background-color: #e3f2fd;
  transition: background-color 0.3s ease, transform 0.2s;
  user-select: none;
}

.btn-metodo:hover {
  background-color: #85beec;
  transform: scale(1.02);
}

.btn-metodo input[type="radio"] {
  display: none;
}

.btn-metodo span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #333d4d;
  font-weight: bold;
}

.btn-metodo input[type="radio"]:checked + span {
  font-weight: bold;
  color: #ffffff;
}

.btn-metodo:has(input[type="radio"]:checked) {
  background-color: #6a9bf7;
  
}

.total-pagar {
  margin-top: 20px;
  font-size: 28px;
  color: #0d47a1;
  font-weight: bold;
  text-align: center;
  background-color: #e3f2fd;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* ==== PANEL ==== */
.panel-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.08);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
}

.panel-container h2 {
  color: #1a237e;
  margin-bottom: 15px;
}

.panel-container h3 {
  color: #0d47a1;
  margin-bottom: 25px;
}

.panel-botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.panel-botones a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #e3f2fd;
  border-radius: 10px;
  text-decoration: none;
  color: #0d47a1;
  font-weight: bold;
  width: 120px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
  transition: background 0.3s ease, transform 0.2s ease;
}

.panel-botones a:hover {
  background: #bbdefb;
  transform: translateY(-2px);
}

.panel-botones a span {
  font-size: 32px;
  margin-bottom: 8px;
}

.btn-cancelar {
  padding: 10px 15px;
  background-color: #c62828;
  color: white;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  margin-left: 10px;
  transition: background-color 0.3s ease;
}

.btn-cancelar:hover {
  background-color: #b71c1c;
}

.acciones-venta {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.acciones-venta button,
.acciones-venta a.btn-cancelar {
  font-size: 16px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
}

/* ==== AUTOCOMPLETADO ==== */
.autocomplete-box {
  position: absolute;
  background-color: white;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  font-size: 16px;
}

.sugerencia {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.sugerencia:last-child {
  border-bottom: none;
}

.sugerencia:hover {
  background-color: #f1f1f1;
}

.form-container input[type="text"] {
  border: 1px solid #ccc !important;
  box-shadow: none !important;
}
input[type="text"] {
  border: 1px solid #ccc !important;
  border-top: none !important;
  box-shadow: none !important;
}

fieldset {
  border: none;
}
.autocomplete-box {
  position: absolute;
  background-color: white;
  
  max-height: 150px;
  overflow-y: auto;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.sugerencia {
  padding: 8px;
  cursor: pointer;
  font-size: 16px;
}

.sugerencia:hover {
  background-color: #f0f0f0;
}

.centered-button {
  text-align: center;
  margin-bottom: 20px;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
