/* RESET AGRESIVO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

p {
  margin-bottom: 0.3rem;
  font-size: 1rem;
  color: #444;
}

/* LISTAS */
ul,
ol {
  margin: 0 0 1rem 1.5rem;
}

ul {
  list-style: disc;
}

ol {
  list-style: decimal;
}

li {
  margin-bottom: 0.5rem;
}

/* TABLAS */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th,
td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: #f2f2f2;
  font-weight: bold;
}

/* BOTONES */
button,
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border: none;
  border-radius: 0.25rem;
  background-color: #007aff;
  color: #fff;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-group {
  display: inline-flex;   /* Para mostrar los elementos en línea y permitir alinearlos */
  align-items: center;    /* Alinea verticalmente al centro */
  gap: 0.5rem;            /* Espacio entre botones */
}


button:hover,
.btn:hover {
  background-color: #005bb5;
}

/* IMÁGENES */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* FORMULARIOS */
input,
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #007aff;
  outline: none;
}

/* CONTENEDORES COMUNES */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.m-1 {
  margin: 0.25rem;
}

.m-2 {
  margin: 0.5rem;
}

.m-3 {
  margin: 0.75rem;
}

.m-4 {
  margin: 1rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mt-1 {
  margin-top: 1rem;
}

.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.bold {
  font-weight: bold;
}

.italic {
  font-style: italic;
}

.underline {
  text-decoration: underline;
}

/* ESTILOS ADICIONALES */
/* Clases de sombra */
.shadow-sm {
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.shadow-md {
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
}

.shadow-lg {
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}

/* Clases de radio (bordes redondeados) */
.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 1rem;
}

.rounded-full {
  border-radius: 9999px;
}

/* Estilos para barras de progreso */
.progress-bar {
  display: block;
  width: 100%;
  height: 1rem;
  background-color: #ddd;
  border-radius: var(--border-radius, 0.25rem);
  overflow: hidden;
}

.progress-bar .progress {
  height: 100%;
  background-color: #007aff;
  transition: width 0.3s ease;
}

/* Tarjetas y paneles */
.card {
  width: 250px;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}


.card img {
  max-width: 150px;
  max-height: 150px;
  margin-bottom: 1rem;
}

.card-title {
  padding: 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: #007aff;
}

.card-header {
  font-size: 1rem;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

.card-body {
  padding-top: 0.5rem;
}

form.card {
  width: auto;
  height: auto;
}
/* Clases de colores */
.bg-primary {
  background-color: #007aff;
}

.bg-secondary {
  background-color: #6c757d;
}

.bg-success {
  background-color: #28a745;
}

.bg-danger {
  background-color: #dc3545;
}

.bg-warning {
  background-color: #ffc107;
}

.bg-info {
  background-color: #17a2b8;
}

.bg-light {
  background-color: #f8f9fa;
}

.bg-dark {
  background-color: #343a40;
}

.text-primary {
  color: #007aff;
}

.text-secondary {
  color: #6c757d;
}

.text-success {
  color: #28a745;
}

.text-danger {
  color: #dc3545;
}

.text-warning {
  color: #ffc107;
}

.text-info {
  color: #17a2b8;
}

.text-light {
  color: #f8f9fa;
}

.text-dark {
  color: #343a40;
}

/* Reglas de espaciado avanzado */
.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

/* Estilos para modales */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: white;
  border-radius: var(--border-radius, 0.5rem);
  padding: var(--spacing, 2rem);
  max-width: 500px;
  width: 100%;
}

.modal-header {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.modal-body {
  font-size: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing, 1rem);
}
/* Estilos para el contenedor del nav */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 250px);
  justify-content: center;
  gap: 0.25rem; /* Equivalente a .gap-1 */
}

/* Estilos para los cuadros del nav */
.nav-card {
  width: 250px;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

/* Estilos para las imágenes de los cuadros */
.nav-img {
  max-width: 150px;
  max-height: 150px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.client-card {
  /* Sombra parecida a shadow-md */
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
  /* Borde redondeado parecido a rounded-lg */
  border-radius: 0.5rem;
  /* Relleno parecido a p-4 */
  padding: 1rem;
  /* No forzamos ancho ni alto */
  display: flex;
  flex-direction: column;
  background-color: #fff;
}
/* Estilos opcionales para la previsualización */
#facturaPreview {
  border: 1px solid #ccc;
  padding: 1rem;
  margin-top: 1rem;
  background-color: #f9f9f9;
}
/* Estilos para el dropdown de autocompletado */
#inventoryDropdown {
  position: absolute;
  background-color: #fff;
  border: 1px solid #ccc;
  z-index: 1000;
}
#inventoryDropdown li {
  cursor: pointer;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
}
#inventoryDropdown li:hover {
  background-color: #f0f0f0;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Ajustes para el botón "X" */
.remove-btn {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  /* Si es necesario, se pueden añadir márgenes para separarlo un poco */
}
/* MEDIA QUERIES */

/* Muy pequeño (320px - 375px) */
@media (min-width: 320px) and (max-width: 375px) {
  html {
    font-size: 14px;
  }
}

/* Pequeño (376px - 575px) */
@media (min-width: 376px) and (max-width: 575px) {
  html {
    font-size: 15px;
  }
}

/* Pequeño-Medio (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  html {
    font-size: 16px;
  }
}

/* Medio (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  html {
    font-size: 17px;
  }
}

/* Medio-Grande (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  html {
    font-size: 18px;
  }
}

/* Grande (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  html {
    font-size: 19px;
  }
}

/* 2K Pantallas (1400px - 1919px) */
@media (min-width: 1400px) and (max-width: 1919px) {
  html {
    font-size: 20px;
  }
}

/* 4K Pantallas (1920px - 2559px) */
@media (min-width: 1920px) and (max-width: 2559px) {
  html {
    font-size: 21px;
  }
}

/* 5K Pantallas (2560px y mayores) */
@media (min-width: 2560px) {
  html {
    font-size: 22px;
  }
}