/* Estilos Generales y Tipografía - Mega House POS */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  -webkit-tap-highlight-color: transparent;
}

input, textarea, select {
  user-select: text;
}

/* Scrollbars estilizadas */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.8);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Animaciones suaves */
.fade-in {
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Estilo para etiquetas y códigos */
.font-mono-code {
  font-family: var(--font-mono);
}

/* Previsualización Ticket Térmico 80mm */
.ticket-preview {
  background: #ffffff;
  color: #111827;
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
  width: 80mm;
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  border-top: 4px solid #2563eb;
  position: relative;
  font-size: 11px;
  line-height: 1.35;
}

.ticket-divider {
  border-top: 1px dashed #6b7280;
  margin: 8px 0;
}

.ticket-double-divider {
  border-top: 2px dashed #111827;
  margin: 10px 0;
}

/* Previsualización Nota de Venta Formato Legal / Carta */
.nota-legal-preview {
  background: #ffffff;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  width: 216mm; /* Tamaño Carta estándar (8.5 x 11 pulgadas) */
  max-width: 100%;
  margin: 0 auto;
  padding: 12mm 14mm;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.35;
  box-sizing: border-box;
}

/* Reglas de Impresión */
@media print {
  body * {
    visibility: hidden;
  }

  #seccion-impresion, #seccion-impresion * {
    visibility: visible;
  }

  #seccion-impresion {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
  }

  .no-print {
    display: none !important;
  }
}

/* Estilos de Insignias y Tarjetas */
.badge-deuda {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.badge-pagada {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.badge-parcial {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-anulada {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}