/* Quitar flechas por defecto en inputs numéricos */
.no-spin-arrows::-webkit-inner-spin-button,
.no-spin-arrows::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.no-spin-arrows {
  -moz-appearance: textfield;
}

/* Banner Obligatorio No Fiscal */
.banner-no-fiscal {
  background-color: #fef3c7; /* bg-amber-100 */
  border-left: 4px solid #f59e0b; /* border-amber-500 */
  color: #78350f; /* text-amber-900 */
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Spinner de carga */
.spinner {
  border: 2px solid rgba(226, 232, 240, 0.8); /* border-slate-200 */
  border-radius: 9999px;
  border-top-color: #4f46e5; /* border-t-indigo-600 */
  width: 1.5rem;
  height: 1.5rem;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =============================================================================
   CAPAS Y NIVELES DE PROFUNDIDAD (Z-INDEX) PARA MODALES ANIDADOS
   ============================================================================= */
#modal-historial-cierres,
#modal-detalle-venta {
  z-index: 50 !important;
}

#modal-ticket-cierre {
  z-index: 60 !important;
}

#modal-detalle-comprobante-caja {
  z-index: 70 !important;
}

#modal-imprimir-forma-libre,
#modal-asociar-factura,
#modal-abono-cxc {
  z-index: 9990 !important;
}

#modal-confirmacion-in-app,
#modal-alerta-in-app {
  z-index: 99999 !important;
}

/* =============================================================================
   SISTEMA DE NOTIFICACIONES TOAST (IN-APP)
   ============================================================================= */

#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100005;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
  max-width: 24rem;
  width: calc(100vw - 2rem);
  transition: top 0.2s ease;
}

body.has-demo-banner #toast-container {
  top: calc(var(--demo-banner-height, 48px) + 0.75rem);
}

.toast-item {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-width: 1px;
  border-style: solid;
  backdrop-filter: blur(8px);
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast-item.toast-salida {
  animation: toastSlideOut 0.25s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
  }
}

/* Tipos de Toasts */
.toast-success {
  background-color: rgba(240, 253, 244, 0.96);
  border-color: #86efac;
  color: #14532d;
}
.toast-success .toast-bar { background-color: #22c55e; }

.toast-error {
  background-color: rgba(254, 242, 242, 0.96);
  border-color: #fca5a5;
  color: #7f1d1d;
}
.toast-error .toast-bar { background-color: #ef4444; }

.toast-warning {
  background-color: rgba(255, 251, 235, 0.96);
  border-color: #fde68a;
  color: #78350f;
}
.toast-warning .toast-bar { background-color: #f59e0b; }

.toast-info {
  background-color: rgba(238, 242, 255, 0.96);
  border-color: #c7d2fe;
  color: #312e81;
}
.toast-info .toast-bar { background-color: #6366f1; }

.toast-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.1875rem;
}

.toast-message {
  font-size: 0.75rem;
  line-height: 1.35;
  opacity: 0.92;
  word-break: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.125rem;
  border-radius: 0.375rem;
  opacity: 0.5;
  transition: opacity 0.15s, background-color 0.15s;
  color: currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.05);
}

.toast-bar {
  height: 100%;
  width: 100%;
  animation: toastProgress linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* =============================================================================
   MODAL DE CONFIRMACIÓN Y ALERTA ENRIQUECIDA (IN-APP)
   ============================================================================= */

.modal-dialog-in-app {
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* =============================================================================
   AGRUPACIÓN DE MONEDAS EN LA MISMA LÍNEA (POS)
   ============================================================================= */

.fila-monedas-pos {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 6px !important;
  width: 100% !important;
}

.item-moneda-pos {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  background-color: var(--input-bg, #ffffff) !important;
  border: 1px solid var(--input-border, #cbd5e1) !important;
  border-radius: 0.5rem !important;
  overflow: hidden !important;
  height: 36px !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.item-moneda-pos:focus-within {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25) !important;
}

.badge-moneda-pos {
  padding: 0 8px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: var(--bg-surface-elevated, #f1f5f9) !important;
  border-right: 1px solid var(--input-border, #cbd5e1) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  color: var(--text-secondary, #475569) !important;
  letter-spacing: 0.025em !important;
  user-select: none !important;
  flex-shrink: 0 !important;
}

.item-moneda-input {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  padding: 0 6px !important;
  font-size: 12px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-weight: 600 !important;
  color: var(--text-primary, #0f172a) !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

/* =============================================================================
   CONTENEDOR DEL TICKET DE COMPRA Y CARRITO EN POS
   ============================================================================= */

/* Columna completa del Ticket de Compra */
.contenedor-ticket-pos {
  display: flex !important;
  flex-direction: column !important;
  max-height: calc(100vh - 5.5rem) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

@media (min-width: 1024px) {
  .contenedor-ticket-pos {
    position: sticky !important;
    top: 1rem !important;
    max-height: calc(100vh - 5.5rem) !important;
  }
}

/* Lista scroleable de ítems dentro del Ticket de Compra (nunca colapsar ni encoger) */
.items-carrito-scroll {
  max-height: 220px !important;
  min-height: 80px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
  flex-shrink: 0 !important;
}

/* Switch toggle universal para Modo Divisas y controles POS */
.toggle-switch-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.toggle-switch-track {
  width: 44px;
  height: 24px;
  background-color: #cbd5e1;
  border: 1.5px solid #94a3b8;
  border-radius: 9999px;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  padding: 2px;
  box-sizing: border-box;
}

.toggle-switch-track.activo {
  background-color: #059669 !important;
  border-color: #047857 !important;
}

.toggle-switch-knob {
  width: 17px;
  height: 17px;
  background-color: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
}

.toggle-switch-track.activo .toggle-switch-knob {
  transform: translateX(19px);
}

/* Scrollbar suave y elegante para el contenedor del ticket de compra y carrito */
.ticket-scrollbar {
  scrollbar-width: thin !important;
  scrollbar-color: #cbd5e1 transparent !important;
}

.ticket-scrollbar::-webkit-scrollbar {
  width: 6px !important;
}

.ticket-scrollbar::-webkit-scrollbar-track {
  background: transparent !important;
}

.ticket-scrollbar::-webkit-scrollbar-thumb {
  background-color: #cbd5e1 !important;
  border-radius: 9999px !important;
}

.ticket-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8 !important;
}

/* =============================================================================
   CONTROLES COMPACTOS DE REPORTES
   ============================================================================= */
.input-filtro-reportes {
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  border: 1px solid var(--input-border, #cbd5e1) !important;
  border-radius: 6px !important;
  background-color: var(--input-bg, #ffffff) !important;
  color: var(--text-primary, #1e293b) !important;
  outline: none !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}
.input-filtro-reportes:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15) !important;
}

.btn-aplicar-compacto {
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}
.btn-aplicar-compacto:hover {
  background-color: #4338ca !important;
}
.btn-aplicar-compacto:active {
  transform: scale(0.98) !important;
}

.btn-limpiar-compacto {
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  background-color: transparent !important;
  color: var(--text-muted, #64748b) !important;
  border: 1px solid var(--border-color, #cbd5e1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}
.btn-limpiar-compacto:hover {
  background-color: var(--bg-surface-elevated, #f1f5f9) !important;
  color: var(--text-primary, #1e293b) !important;
}

/* =============================================================================
   BOTÓN DE TICKET EN ESPERA (POS)
   ============================================================================= */
.btn-espera-pos {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 4px 9px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  transition: all 0.18s ease-in-out !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  user-select: none !important;
  line-height: 1 !important;
}

/* Estado Deshabilitado (Gris / Sin productos en el carrito) */
.btn-espera-pos:disabled,
.btn-espera-pos.is-disabled {
  background-color: #f1f5f9; /* bg-slate-100 */
  color: #94a3b8;            /* text-slate-400 */
  border: 1px solid #cbd5e1; /* border-slate-300 */
  cursor: not-allowed !important;
  opacity: 0.65 !important;
  box-shadow: none !important;
  pointer-events: auto !important;
}

.btn-espera-pos:disabled svg,
.btn-espera-pos.is-disabled svg {
  color: #94a3b8;
  stroke: #94a3b8;
}

/* Estado Activo (Habilitado con productos en el carrito) */
.btn-espera-pos:not(:disabled):not(.is-disabled) {
  background-color: #fffbeb; /* bg-amber-50 */
  color: #b45309;            /* text-amber-700 */
  border: 1px solid #fde68a; /* border-amber-300 */
  cursor: pointer !important;
  opacity: 1 !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.btn-espera-pos:not(:disabled):not(.is-disabled) svg {
  color: #b45309;
  stroke: #b45309;
}

.btn-espera-pos:not(:disabled):not(.is-disabled):hover {
  background-color: #fef3c7; /* bg-amber-100 */
  color: #92400e;            /* text-amber-800 */
  border-color: #f59e0b;     /* border-amber-500 */
  box-shadow: 0 2px 4px 0 rgba(245, 158, 11, 0.15) !important;
}

.btn-espera-pos:not(:disabled):not(.is-disabled):active {
  transform: scale(0.97) !important;
}



/* =============================================================================
   DROPDOWN DE USUARIO EN NAVBAR
   ============================================================================= */

/* Contenedor posicionado relativo para anclar el dropdown */
.usuario-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Badge / trigger — ahora es un botón interactivo */
#usuario-badge {
  cursor: pointer;
  user-select: none;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

#usuario-badge:hover {
  background-color: #e0e7ff !important; /* indigo-100 */
  border-color: #a5b4fc !important;     /* indigo-300 */
  box-shadow: 0 2px 6px 0 rgba(99,102,241,0.15);
}

/* Chevron indicador de dropdown dentro del badge */
.usuario-badge-chevron {
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.25rem;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  color: #818cf8;
  opacity: 0.8;
}

#usuario-badge[aria-expanded="true"] .usuario-badge-chevron {
  transform: rotate(180deg);
}

/* Panel del dropdown */
.usuario-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 14rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 10px 30px -4px rgba(0,0,0,0.12), 0 4px 10px -2px rgba(0,0,0,0.06);
  z-index: 9990;
  overflow: hidden;

  /* Animación de apertura */
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.4,0,0.2,1),
              transform 180ms cubic-bezier(0.4,0,0.2,1);
}

.usuario-dropdown-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Cabecera del dropdown (info del usuario) */
.usuario-dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.usuario-dropdown-header .dd-nombre {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12rem;
}

.usuario-dropdown-header .dd-rol {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Lista de opciones */
.usuario-dropdown-lista {
  padding: 0.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* Ítem del dropdown */
.usuario-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms ease, color 120ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.usuario-dropdown-item:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.usuario-dropdown-item img,
.usuario-dropdown-item svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
  opacity: 0.65;
}

.usuario-dropdown-item.item-peligro {
  color: #64748b;
}

.usuario-dropdown-item.item-peligro:hover {
  background-color: #fff1f2;
  color: #e11d48;
}

.usuario-dropdown-item.item-peligro:hover img {
  opacity: 1;
  filter: invert(18%) sepia(96%) saturate(5000%) hue-rotate(330deg) brightness(80%);
}

.usuario-dropdown-divisor {
  height: 1px;
  background-color: #f1f5f9;
  margin: 0.25rem 0.5rem;
}

/* =============================================================================
   UTILIDADES Y ESTILOS DE BOTONES CON ALTO CONTRASTE (WCAG 2.1 AA/AAA)
   Garantiza que ningún botón quede con texto blanco sobre fondo blanco o gris.
   ============================================================================= */

/* Utilidades de fondo sólido azul */
.bg-blue-600 {
  background-color: #2563eb !important;
  color: #ffffff !important;
}
.bg-blue-700 {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
}
.hover\:bg-blue-700:hover {
  background-color: #1d4ed8 !important;
}
.hover\:bg-blue-800:hover {
  background-color: #1e40af !important;
}
.active\:bg-blue-800:active {
  background-color: #1e40af !important;
}

/* Utilidades de fondo sólido púrpura */
.bg-purple-600 {
  background-color: #9333ea !important;
  color: #ffffff !important;
}
.bg-purple-700 {
  background-color: #7e22ce !important;
  color: #ffffff !important;
}
.hover\:bg-purple-700:hover {
  background-color: #7e22ce !important;
}
.hover\:bg-purple-800:hover {
  background-color: #6b21a8 !important;
}
.active\:bg-purple-800:active {
  background-color: #6b21a8 !important;
}

/* Utilidades de fondo sólido índigo */
.bg-indigo-600 {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}
.bg-indigo-700 {
  background-color: #4338ca !important;
  color: #ffffff !important;
}
.hover\:bg-indigo-700:hover {
  background-color: #4338ca !important;
}
.active\:bg-indigo-800:active {
  background-color: #3730a3 !important;
}

/* Utilidades de fondo sólido esmeralda */
.bg-emerald-600 {
  background-color: #059669 !important;
  color: #ffffff !important;
}
.bg-emerald-700 {
  background-color: #047857 !important;
  color: #ffffff !important;
}
.hover\:bg-emerald-700:hover {
  background-color: #047857 !important;
}

/* Utilidades de fondo sólido rosa */
.bg-rose-600 {
  background-color: #e11d48 !important;
  color: #ffffff !important;
}
.bg-rose-700 {
  background-color: #be123c !important;
  color: #ffffff !important;
}
.hover\:bg-rose-700:hover {
  background-color: #be123c !important;
}

/* Utilidades de fondos translúcidos y bordes */
.bg-slate-100\/90 { background-color: rgba(241, 245, 249, 0.9) !important; }
.bg-slate-50\/90  { background-color: rgba(248, 250, 252, 0.9) !important; }
.bg-slate-50\/80  { background-color: rgba(248, 250, 252, 0.8) !important; }
.bg-white\/90     { background-color: rgba(255, 255, 255, 0.9) !important; }
.bg-white\/95     { background-color: rgba(255, 255, 255, 0.95) !important; }
.border-slate-200\/90 { border-color: rgba(226, 232, 240, 0.9) !important; }
.border-slate-200\/80 { border-color: rgba(226, 232, 240, 0.8) !important; }
.border-slate-200\/70 { border-color: rgba(226, 232, 240, 0.7) !important; }
.border-slate-200\/60 { border-color: rgba(226, 232, 240, 0.6) !important; }

/* Tipografías micro normalizadas */
.text-\[8px\]  { font-size: 8px !important; line-height: 10px !important; }
.text-\[9px\]  { font-size: 9px !important; line-height: 12px !important; }
.text-\[10px\] { font-size: 10px !important; line-height: 14px !important; }
.text-\[11px\] { font-size: 11px !important; line-height: 15px !important; }

/* Botones específicos del modal de detalle de venta en Modo Claro (Garantía de Contraste) */
#btn-despachar-venta {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
}
#btn-despachar-venta:hover {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
}

#btn-asociar-factura-modal {
  background-color: #7e22ce !important;
  color: #ffffff !important;
  border: 1px solid #6b21a8 !important;
}
#btn-asociar-factura-modal:hover {
  background-color: #6b21a8 !important;
  color: #ffffff !important;
}

#btn-imprimir-comprobante {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  border: 1px solid #4338ca !important;
}
#btn-imprimir-comprobante:hover {
  background-color: #4338ca !important;
  color: #ffffff !important;
}

#btn-imprimir-carta-venta,
#btn-imprimir-ticket-venta,
#btn-imprimir-forma-libre-venta {
  background-color: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}
#btn-imprimir-carta-venta:hover,
#btn-imprimir-ticket-venta:hover,
#btn-imprimir-forma-libre-venta:hover {
  background-color: #f8fafc;
  color: #0f172a;
}
#btn-imprimir-carta-venta.ring-2,
#btn-imprimir-ticket-venta.ring-2,
#btn-imprimir-forma-libre-venta.ring-2 {
  background-color: #eef2ff !important;
  color: #3730a3 !important;
  border-color: #6366f1 !important;
}

#btn-cerrar-modal-venta-footer {
  background-color: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}
#btn-cerrar-modal-venta-footer:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* =============================================================================
   MODAL DE TÉRMINOS DE LICENCIA Y RESPONSABILIDAD (WCAG AAA - ALTO CONTRASTE)
   Garantiza legibilidad absoluta y contraste perfecto en Modo Claro y Modo Oscuro
   ============================================================================= */

.modal-terminos-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.modal-terminos-card {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
}
html.dark .modal-terminos-card {
  background-color: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75) !important;
}

.modal-terminos-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(199, 210, 254, 0.25) !important;
}
html.dark .modal-terminos-header {
  background: linear-gradient(135deg, #090d16 0%, #1e1b4b 100%) !important;
  border-bottom: 1px solid #334155 !important;
}

.modal-terminos-subtitulo {
  color: #c7d2fe !important;
}
html.dark .modal-terminos-subtitulo {
  color: #a5b4fc !important;
}

/* Banner de bienvenida / primer uso en la app */
.modal-terminos-banner-bienvenida {
  background-color: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1e3a8a !important;
}
html.dark .modal-terminos-banner-bienvenida {
  background-color: #172554 !important;
  border: 1px solid #1e40af !important;
  color: #dbeafe !important;
}

/* Cláusulas Estándar (1 y 3) */
.modal-terminos-clausula {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}
html.dark .modal-terminos-clausula {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
.modal-terminos-clausula h4 {
  color: #0f172a !important;
  font-weight: 800 !important;
}
html.dark .modal-terminos-clausula h4 {
  color: #ffffff !important;
}
.modal-terminos-clausula p {
  color: #334155 !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
}
html.dark .modal-terminos-clausula p {
  color: #cbd5e1 !important;
}
.modal-terminos-clausula strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}
html.dark .modal-terminos-clausula strong {
  color: #ffffff !important;
}

/* Badge Cláusula 1 (Propiedad de la Data) */
.badge-clausula-1 {
  background-color: #e0e7ff !important;
  color: #312e81 !important;
  border: 1px solid #c7d2fe !important;
}
html.dark .badge-clausula-1 {
  background-color: #312e81 !important;
  color: #e0e7ff !important;
  border: 1px solid #4338ca !important;
}

/* Cláusula 2: Exclusión de Responsabilidad por Pérdida (MÁXIMA ATENCIÓN Y CONTRASTE) */
.modal-terminos-alerta {
  background-color: #fffbeb !important;
  border: 2px solid #d97706 !important;
  color: #451a03 !important;
}
html.dark .modal-terminos-alerta {
  background-color: #241403 !important;
  border: 2px solid #b45309 !important;
  color: #fef3c7 !important;
}
.modal-terminos-alerta h4 {
  color: #92400e !important;
  font-weight: 800 !important;
}
html.dark .modal-terminos-alerta h4 {
  color: #fcd34d !important;
}
.modal-terminos-alerta p {
  color: #78350f !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
}
html.dark .modal-terminos-alerta p {
  color: #fde68a !important;
}
.modal-terminos-alerta strong {
  color: #451a03 !important;
  font-weight: 800 !important;
}
html.dark .modal-terminos-alerta strong {
  color: #ffffff !important;
}

/* Badge Cláusula 2 (Exclusión de Responsabilidad) */
.badge-clausula-2 {
  background-color: #fef3c7 !important;
  color: #78350f !important;
  border: 1px solid #fcd34d !important;
}
html.dark .badge-clausula-2 {
  background-color: #78350f !important;
  color: #fef3c7 !important;
  border: 1px solid #b45309 !important;
}

/* Badge Cláusula 3 (Uso Fiscal) */
.badge-clausula-3 {
  background-color: #d1fae5 !important;
  color: #064e3b !important;
  border: 1px solid #a7f3d0 !important;
}
html.dark .badge-clausula-3 {
  background-color: #064e3b !important;
  color: #a7f3d0 !important;
  border: 1px solid #059669 !important;
}

/* Tres Principios de Diseño Limpio */
.modal-terminos-principios-titulo {
  color: #0f172a !important;
  font-weight: 800 !important;
}
html.dark .modal-terminos-principios-titulo {
  color: #f8fafc !important;
}

.card-principio {
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}
html.dark .card-principio {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
.card-principio-titulo {
  color: #1e1b4b !important;
  font-weight: 800 !important;
  font-size: 12px !important;
}
html.dark .card-principio-titulo {
  color: #818cf8 !important;
}
.card-principio-desc {
  color: #334155 !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
}
html.dark .card-principio-desc {
  color: #cbd5e1 !important;
}

/* Footer del Modal */
.modal-terminos-footer {
  background-color: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}
html.dark .modal-terminos-footer {
  background-color: #0b0f19 !important;
  border-top: 1px solid #1e293b !important;
}

/* Fila de campos de cliente en POS: Cédula, Razón Social y Teléfono en una sola línea equilibrada */
.fila-cliente-inputs {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  width: 100%;
}
.col-cliente-doc {
  width: 155px;
  flex-shrink: 0;
}
.col-cliente-nombre {
  flex: 1;
  min-width: 0;
}
.col-cliente-tel {
  width: 165px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .fila-cliente-inputs {
    flex-direction: column;
    align-items: stretch;
  }
  .col-cliente-doc,
  .col-cliente-tel {
    width: 100%;
  }
}



