/* 🎨 ESTILOS GLOBALES MEJORADOS */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 16px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  color: #333;
  line-height: 1.5;
}
/* Estilos para el logo */
.logo-container {
  text-align: center;
  margin-bottom: 20px;
}

.logo {
  max-width: 200px; /* Ajusta este valor según lo grande que quieras el logo */
  height: auto;
  border-radius: 8px; /* Opcional: esquinas redondeadas */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Opcional: sombra suave */
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05); /* Efecto al pasar el mouse */
}
/* 🏷️ ENCABEZADOS */
h1, h2, h3, h4 {
  color: #5e35b1;
  font-weight: 600;
  margin: 16px 0 12px 0;
}

h1 {
  font-size: 1.8rem;
  text-align: center;
  padding: 12px 0;
  border-bottom: 3px solid #7c4dff;
  margin-bottom: 24px;
}

h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 4px solid #5e35b1;
  padding-left: 12px;
}

/* 📋 CONTENEDORES */
.container, #clientes, #seccion-reportes, #modal-productos > div, #modal-impresion > div, #modal-historial > div {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid #e0e0e0;
}

/* 📥 CAMPOS DE TEXTO COMPACTOS */
input[type="text"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  max-width: 220px; /* ✅ Campos más pequeños */
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: #fafafa;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
select:focus {
  outline: none;
  border-color: #7c4dff;
  background: white;
  box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.2);
}

/* 🔍 BUSCADORES */
#filtro-clientes, #filtro-nombre, #filtro-nombre-modal, #filtro-cliente-modal, #buscadorClientes {
  max-width: 300px !important;
  font-size: 1rem;
  padding: 10px 14px;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
}

#filtro-clientes:focus, #filtro-nombre:focus, #filtro-nombre-modal:focus, #filtro-cliente-modal:focus, #buscadorClientes:focus {
  border-color: #5e35b1;
  background: white;
}

/* 🎛️ BOTONES COMPACTOS Y MODERNOS */
.boton-accion,
.scroll-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: fit-content;
}

.boton-accion {
  background: #5e35b1;
  color: white;
}

.boton-accion:hover {
  background: #7c4dff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(94, 53, 177, 0.3);
}

.boton-accion:active {
  transform: translateY(0);
}

/* Botones de acción específicos */
.boton-accion[style*="background: #4CAF50"] { background: #43a047; }
.boton-accion[style*="background: #2196F3"] { background: #1e88e5; }
.boton-accion[style*="background: #d32f2f"] { background: #c62828; }
.boton-accion[style*="background: #666"] { background: #616161; }

/* 🧾 CLIENTES - ESTILOS COMPACTOS */
.cliente {
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fafafa;
  transition: all 0.2s ease;
}

.cliente:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: white;
}

.cliente-no-deudor {
  opacity: 0.7;
  background: #f9f9f9;
  border-color: #f0f0f0;
}

.cliente-no-deudor:hover {
  transform: none;
  box-shadow: none;
}

/* 📊 TABLAS COMPACTAS */
.tabla-reportes {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 16px;
}

.tabla-reportes th,
.tabla-reportes td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid #e0e0e0;
}

.tabla-reportes th {
  background: #5e35b1;
  color: white;
  font-weight: 500;
}

.tabla-reportes tr:nth-child(even) {
  background: #f9f9f9;
}

.tabla-reportes tr:hover {
  background: #f0f0ff !important;
}

/* 📱 MODALES COMPACTOS */
#modal-productos, #modal-impresion, #modal-historial, #modal-seleccionar-cliente {
  justify-content: flex-start;
  align-items: center;
}

#modal-productos > div,
#modal-impresion > div,
#modal-historial > div,
#modal-seleccionar-cliente > div {
  max-width: 95%;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 16px;
  margin-top: 40px;
}

/* 🛒 CARRITO DE PRODUCTOS EN MODAL */
.producto-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
  margin-bottom: 8px;
  background: #fafafa;
  border-radius: 6px;
}

.precio-personalizado,
.cantidad-display {
  width: 80px !important;
  padding: 6px 8px;
  font-size: 0.85rem;
}

.btn-cantidad {
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  padding: 0;
}

/* 📑 RESUMEN DE TOTAL */
.resumen-total {
  padding: 12px;
  background: #f0f0ff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  justify-content: space-between;
}

/* 🔄 FILTROS EN LÍNEA */
.filtros-reportes {
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filtro-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filtro-item label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #5e35b1;
}

/* 📱 BOTONES FLOTANTES */
.scroll-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.scroll-btn {
  padding: 12px 16px;
  font-size: 0.85rem;
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .container, #clientes, #seccion-reportes {
    padding: 12px;
  }

  input[type="text"],
  input[type="number"],
  input[type="tel"],
  select {
    max-width: 100% !important;
    font-size: 0.9rem;
    padding: 8px 10px;
  }

  .boton-accion {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .producto-item {
    flex-direction: column;
    align-items: stretch;
  }

  .producto-cantidad {
    margin-top: 8px;
    justify-content: flex-start;
    gap: 8px;
  }

  .filtros-reportes {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .botones-derecha {
    flex-direction: column;
    gap: 6px;
  }

  .boton-accion {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .resumen-total {
    font-size: 1rem;
  }
}