﻿/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== BASE ===== */
body {
  font-family: 'Poppins', sans-serif;
  background: #f4f6f8;
  color: #111;
}

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}


/* ===== MENU ===== */
.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px; /* Un poco más de aire */
  margin-bottom: 8px;
  border-radius: 8px;
  color: #94A3B8; /* Gris azulado (Slate-400) que se ve genial sobre oscuro */
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 500;
}

.menu-svg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.menu a:hover {
  background: rgba(255, 255, 255, 0.05); /* Brillo blanco sutil */
  color: #FFFFFF; /* Texto blanco brillante */
  transform: translateX(4px);
}

.menu a.active {
  background: linear-gradient(90deg, #F97316 0%, #EA580C 100%); /* Degradado Naranja Zenit */
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); /* Sombra naranja suave */
}

/* 3. ÁREA DE CONTENIDO (Main) */
    .main-content {
        flex: 1;
        background-color: var(--bg-main) !important;
        overflow-y: auto !important; /* FORZAMOS EL SCROLL AQUÍ */
        padding: 20px;
        position: relative;
        height: 100vh; /* Ocupa toda la altura disponible */
        box-sizing: border-box;
    }

/* ===== FILTROS ===== */
.filters-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

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

.filter-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
}

.filter-btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover {
  border-color: #F97316;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

/* ===== DASHBOARD ===== */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  border-top: 4px solid #F97316;
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.card-title {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
}

.card-value {
  font-size: 28px;
  font-weight: 600;
  margin-top: 6px;
}

/* ===== SECTIONS ===== */
section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  border-left: 4px solid #F97316;
  transition: all 0.25s ease;
}

section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

h1 {
  margin-bottom: 16px;
}

h2 {
  margin-bottom: 12px;
  font-weight: 500;
}

/* ===== FORM ===== */
input,
select {
  padding: 8px 10px;
  margin: 4px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: 'Poppins', sans-serif;
}

button {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #111;
  color: #F97316;
  cursor: pointer;
  transition: all 0.25s ease;
}

button:hover {
  background: #F97316;
  color: #000;
}

/* ===== TABLE ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px;
  font-size: 13px;
}

th {
  background: #f1f1f1;
}

/* ===== TICKET ===== */
#ticket {
  background: #fafafa;
  padding: 14px;
  border: 1px dashed #999;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.ticket-header {
  text-align: center;
}

.ticket-total {
  text-align: right;
  font-weight: bold;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a; /* Azul Navy profundo */
  color: #ffffff; /* Letras blancas */
  padding: 14px 20px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25); /* Sombra premium para que resalte */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Borde luminoso muy sutil */
  font-weight: 500;
  letter-spacing: 0.3px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PRINT ===== */
@media print {
  body * {
    visibility: hidden;
  }

  #ticket, #ticket * {
    visibility: visible;
  }

  #ticket {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }

  .no-print {
    display: none;
  }
}

/* --- ANIMACIÓN SUBMENÚ PRODUCTOS --- */
#submenu-productos {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
    padding-left: 10px;
    background: transparent;
}

#submenu-productos.open {
    max-height: 200px;
    opacity: 1;
    margin-top: 5px;
}


.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px); /* Efecto de desenfoque premium */
}

.modal-content {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 15px;
    width: 500px;
    border: 1px solid #FB923C;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Rebote suave */
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Asegurar que la tabla de movimientos sea visible */
#sec-movimientos section {
    background: white !important; /* Fondo blanco para contraste */
    color: #333 !important; /* Texto gris oscuro */
}

#sec-movimientos table th {
    color: #1a1a1a;
    border-bottom: 2px solid #eee;
}

#sec-movimientos table td {
    color: #444;
}

/* Corrección para que el detalle de venta brille en la oscuridad */
/* --- ESTILO DETALLE DE MOVIMIENTOS (AZUL NAVY) --- */
#detalle-contenido {
    color: #000080 !important; /* Azul Navy */
}

#detalle-contenido, 
#detalle-contenido *, 
#detalle-contenido span, 
#detalle-contenido p, 
#detalle-contenido strong, 
#detalle-contenido h2 {
    color: #000033 !important;      /* Navy Profundo */
    font-family: 'Poppins', sans-serif !important; /* Forzamos Poppins */
    -webkit-font-smoothing: antialiased; /* Suaviza la letra */
}

/* El SKU un poco más discreto pero manteniendo la fuente */
#detalle-contenido small {
    color: #555 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.85em;
    font-weight: 400;
}

/* Ajuste del contenedor de productos para que no brille el fondo */
#detalle-contenido div[style*="background:#f9f9f9"] {
    background-color: #f2f4f6 !important; /* Gris azulado muy tenue */
    border: 1px solid #ddd;
}

/* El fondo gris de la lista de productos */
#detalle-contenido div[style*="background:#f9f9f9"] {
    background-color: #f1f1f1 !important;
    border: 1px solid #ddd;
}

/* --- TARJETAS DASHBOARD PREMIUM --- */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Sombra muy suave */
    display: flex;
    justify-content: space-between; /* Texto a la izq, Icono a la der */
    align-items: center;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-3px);
}

.kpi-info h3 {
    font-size: 0.9rem;
    color: #888; /* Gris suave para el título */
    margin: 0 0 5px 0;
    font-weight: 500;
}

.kpi-info p {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

/* --- ICONOS DE BURBUJA --- */
.icon-bubble {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Variantes de Color (Estilo Imagen 2) */
.bubble-blue {
    background-color: #e3f2fd; /* Fondo Azul muy claro */
    color: #1976d2;            /* Icono Azul fuerte */
}

.bubble-green {
    background-color: #e8f5e9; /* Fondo Verde muy claro */
    color: #2e7d32;            /* Icono Verde fuerte */
}

.bubble-orange {
    background-color: #fff3e0; /* Fondo Naranja muy claro */
    color: #ef6c00;            /* Icono Naranja fuerte */
}

/* --- ESTILOS DEL MODAL DE CONFIRMACIÓN (FIX) --- */
.modal-confirm {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Fondo oscuro */
    z-index: 9999; /* ¡Muy por encima de todo! */
    justify-content: center;
    align-items: center;
}

.modal-confirm.active, 
.modal-confirm[style*="display: flex"] {
    display: flex !important; /* Forzar visibilidad si JS lo activa */
}

.modal-confirm-content, 
.modal-content { /* Soporte para ambos nombres por si acaso */
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 10000; /* Encima del fondo oscuro */
    animation: aparecer 0.3s ease-out;
}

/* Animación de entrada suave */
@keyframes aparecer {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Estilos de botones del modal */
.btn-yes {
    background: #27ae60;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    margin: 10px;
}

.btn-no {
    background: #e74c3c;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    margin: 10px;
}

/* --- CORRECCIÓN DEFINITIVA DEL MODAL --- */

/* 1. Fondo Oscuro (El Overlay) */
.modal-confirm[style*="display: flex"] {
    background-color: rgba(0, 0, 0, 0.85) !important; /* Negro semitransparente fuerte */
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 9999 !important; /* Encima de todo */
}

/* 2. La Caja Blanca (El Contenido) */
.modal-confirm-content, 
.modal-content {
    background-color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important; /* Quitamos transformaciones que puedan moverlo */
    animation: none !important; /* Adiós animaciones conflictivas */
    box-shadow: 0 0 50px rgba(0,0,0,0.5) !important; /* Sombra fuerte para que resalte */
    border: 2px solid #333 !important; /* Borde para asegurar que se vea */
    color: #333 !important; /* Texto oscuro */
}

/* 3. Asegurar que los textos internos se vean */
.modal-confirm-content h2,
.modal-confirm-content p {
    color: #000 !important;
    opacity: 1 !important;
}

/* --- ESTILOS DEL MODAL DE DETALLE (HISTORIAL) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Fondo oscuro */
    z-index: 20000; /* ¡Por encima de todo! */
    display: none;
    justify-content: center;
    align-items: center;
}

/* Forzar que se vea cuando JS lo activa */
.modal-overlay[style*="display: flex"] {
    display: flex !important;
}

/* El contenido blanco del detalle */
.modal-overlay .modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    color: #333; /* Texto negro obligatorio */
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    position: relative;
    max-height: 90vh; /* Para que no se salga si es muy largo */
    overflow-y: auto; /* Scroll si es necesario */
}

/* Ajuste para que el texto dentro no sea blanco invisible */
#detalle-contenido {
    color: #333 !important;
    text-align: left;
}

/* FORZAR TEXTO NEGRO EN EL DETALLE */
#detalle-contenido,
#detalle-contenido table,
#detalle-contenido td {
    color: #333333 !important;
}

/* --- ESTILOS DE LA BANDEJA DESLIZANTE --- */
.fila-principal {
    cursor: pointer;
    transition: background 0.15s ease;
}
.fila-principal:hover {
    background: rgba(74, 127, 232, 0.06) !important;
}

/* La fila oculta (El cajón) */
.fila-detalle {
    display: none;
    transition: background 0.15s ease;
}

/* El contenido del cajón */
.drawer-content {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #FB923C; /* Borde amarillo marca de la casa */
}

/* Inputs dentro del cajón */
.stock-control-group {
    display: flex;
    gap: 15px;
    align-items: center;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.input-stock {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: bold;
}

.btn-filtro {
    background: white; border: 1px solid #ddd; padding: 6px 12px; border-radius: 4px; cursor: pointer; color: #555;
}
.btn-filtro.active {
    background: #2c3e50; color: white; border-color: #2c3e50;
}

/* PESTAÑAS DE CATEGORÍA */
.tab-categoria {
    background: #ecf0f1;
    color: #7f8c8d;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab-categoria:hover {
    background: #bdc3c7;
    color: #2c3e50;
}

.tab-categoria.active {
    background: #1a1a1a;
    color: #FB923C; /* Amarillo Vitality */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* FICHA TRADER (COMPACTA Y ANCHA) */
.trader-card {
    background: white;
    border: 1px solid #ecf0f1;
    border-left: 4px solid #34495e; /* Identidad Azul */
    border-radius: 6px;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    height: 70px; /* Altura fija controlada */
    position: relative;
    overflow: hidden;
}

.trader-card:hover {
    transform: translateX(5px); /* Efecto de deslizamiento sutil */
    border-left-color: #FB923C; /* Cambia a amarillo al tocar */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.tc-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tc-nombre {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
    margin-bottom: 2px;
}

.tc-sku {
    font-size: 0.75em;
    color: #95a5a6;
    letter-spacing: 0.5px;
}

.tc-precio-box {
    text-align: right;
}

.tc-precio {
    font-weight: 800;
    color: #2c3e50;
    font-size: 1.1em;
}

.tc-stock-dot {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 5px;
}

/* --- BOTÓN FLOTANTE ELIMINAR --- */
#btn-flotante-eliminar:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
}

/* --- ICONO ELIMINAR (MODO SELECCIÓN MASIVA) --- */
.icono-eliminar-prod {
    font-size: 22px;   /* mismo tamaño visual que el recuadro 28px del img-prod-icon */
    flex-shrink: 0;
    cursor: pointer;
    transition: color 0.15s ease, filter 0.2s ease, transform 0.15s ease;
}
.icono-eliminar-prod:hover {
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.55));
    transform: scale(1.12);
}

/* --- ICONO IMAGEN EN TABLA AJUSTES MASIVOS --- */
.img-prod-icon {
    font-size: 1em;
    color: rgba(255,255,255,0.18);
    cursor: pointer;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.img-prod-icon:hover {
    background: rgba(255,255,255,0.09);
    color: rgba(255,255,255,0.35);
    transform: scale(1.08);
}
.img-prod-icon--pending {
    background: #e67e22;
    color: white;
}
.img-prod-icon--pending:hover {
    background: #ca6f1e;
    color: white;
}
.img-prod-icon--ok {
    background: var(--color-principal, #3498db);
    color: white;
    transition: transform 0.15s ease, filter 0.2s ease;
}
.img-prod-icon--ok:hover {
    background: var(--color-principal, #3498db);
    color: white;
    transform: scale(1.08);
    filter: brightness(1.12) drop-shadow(0 0 6px var(--color-principal, #3498db));
}

/* --- PREVIEW FLOTANTE — TABLA AJUSTES MASIVOS --- */
.tabla-img-preview {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 160px;   /* ≈ 2× ancho columna Stock */
    height: 150px;  /* ≈ 3 filas de producto    */
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.18),
        0  4px 12px rgba(0, 0, 0, 0.10),
        0  0   0  1px rgba(255,255,255,0.6) inset;
    background: #eef0f2;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.88) translateY(10px);
    transition:
        opacity  0.28s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.tabla-img-preview.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.tabla-img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- ICONO OJO EN TARJETA POS --- */
.tc-preview-eye {
    font-size: 0.85em;
    color: #c5cdd4;
    cursor: pointer;
    transition: color 0.25s ease, transform 0.2s ease;
    padding: 3px;
    line-height: 1;
}
.tc-preview-eye:hover {
    color: #546e7a;
    transform: scale(1.2);
}

/* --- PANEL DE PREVIEW DE PRODUCTO POS --- */
.pos-preview-panel {
    flex-shrink: 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    margin-left: 0;
    transition: max-width 0.4s ease, opacity 0.35s ease, margin-left 0.35s ease;
    pointer-events: none;
}
.pos-preview-panel.visible {
    max-width: 280px;
    opacity: 1;
    margin-left: 16px;
    pointer-events: auto;
}
.pos-preview-inner {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.05);
    border: 1px solid #f0f2f4;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
}
.pos-preview-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f4f6f8, #eaecee);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c5cdd4;
    font-size: 1.6em;
    flex-shrink: 0;
}
.pos-preview-label {
    font-size: 0.72em;
    font-weight: 700;
    color: #b0bec5;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* EFECTO FADE PARA TRANSICIONES */
.grid-fade {
    animation: fadeIn 0.4s ease-out;
}

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

/* ═══════════════════════════════════════════════
   POS 2.0 — DARK COMMAND CENTER
═══════════════════════════════════════════════ */
#sec-pos {
  background: #0d1117 !important;
  padding: 0 !important;
  overflow: hidden !important;
  flex-direction: column !important;
  /* Altura fija = viewport completo, igual que sec-dashboard/sec-inventario.
     Sin esto, main-content (overflow-y:auto) hace scroll cuando pvl-top-bar crece. */
  height: 100vh !important;
  margin: -20px !important;
  width: calc(100% + 40px) !important;
  box-sizing: border-box !important;
}
.pos2-search-wrap {
  flex-shrink: 0;
  padding: 10px 16px 6px;
  background: #0d1117;
  position: relative;
}
.pos2-search-input {
  width: 100% !important;
  background: #1e2538 !important;
  border: 1.5px solid rgba(255,255,255,0.12) !important;
  border-radius: 11px !important;
  padding: 9px 16px 9px 40px !important;
  font-size: 13px !important;
  color: #f1f5f9 !important;
  font-family: 'Poppins', sans-serif !important;
  outline: none !important;
  transition: all 0.2s !important;
}
.pos2-search-input:focus {
  border-color: #4a7fe8 !important;
  background: #252d42 !important;
  box-shadow: 0 0 0 3px rgba(74,127,232,0.18) !important;
}
.pos2-search-input::placeholder { color: #4a6080 !important; }
.pos2-search-ico {
  position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
  color: #4a6080; pointer-events: none; font-size: 14px;
}
.pos2-chips-bar {
  min-height: 44px;
  background: #161b27;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center;
  padding: 8px 16px;
  flex-shrink: 0;
  overflow-x: auto; scrollbar-width: none;
}
.pos2-chips-bar::-webkit-scrollbar { display: none; }
.pos2-chips-bar > div { display: flex; gap: 6px; align-items: center; min-width: max-content; }
.pos2-chip {
  padding: 4px 14px !important; border-radius: 20px !important;
  font-size: 10px !important; font-weight: 600 !important;
  cursor: pointer !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #64748b !important;
  white-space: nowrap !important; flex-shrink: 0 !important;
  transition: all 0.15s !important;
  background: rgba(255,255,255,0.04) !important;
  background-image: none !important;
  box-shadow: none !important;
  line-height: 1.4 !important;
}
.pos2-chip:hover {
  border-color: rgba(74,127,232,0.4) !important;
  color: #94afd4 !important;
  background: rgba(74,127,232,0.08) !important;
}
.pos2-chip.active {
  background: #4a7fe8 !important;
  background-image: none !important;
  border-color: #4a7fe8 !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(74,127,232,0.3) !important;
}
.pos2-main {
  flex: 1; display: flex; overflow: hidden;
}
.pos2-products-area {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent;
  background: #0d1117;
}
.pos2-products-area::-webkit-scrollbar { width: 4px; }
.pos2-products-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.pos2-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
/* Product card */
.pos2-card {
  background: #161b27;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 13px; overflow: hidden;
  cursor: pointer; transition: all 0.18s;
  position: relative;
  animation: pos2FadeUp 0.22s ease both;
}
.pos2-card:hover {
  border-color: #4a7fe8;
  box-shadow: 0 0 0 1px #4a7fe8, 0 8px 24px rgba(74,127,232,0.2);
  transform: translateY(-2px);
}
.pos2-card.in-cart {
  border-color: #4a7fe8;
  box-shadow: 0 0 0 1px #4a7fe8, 0 4px 20px rgba(74,127,232,0.18);
  background: rgba(74,127,232,0.05);
}
@keyframes pos2FadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.pos2-card-img {
  width: 100%; height: 90px;
  background: #1e2538;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.pos2-card-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(13,17,23,0.4));
  pointer-events: none;
}
.pos2-card-icon {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.pos2-card-icon svg { width: 100%; height: 100%; }
.pos2-hover-add {
  position: absolute; inset: 0;
  background: rgba(74,127,232,0.12);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.18s; z-index: 2;
}
.pos2-card:hover .pos2-hover-add,
.pos2-card.in-cart .pos2-hover-add { opacity: 1; }
.pos2-add-circle {
  width: 34px; height: 34px; border-radius: 50%;
  background: #4a7fe8;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white; font-weight: 700;
  box-shadow: 0 4px 14px rgba(74,127,232,0.4);
}
.pos2-card.in-cart .pos2-add-circle { background: linear-gradient(135deg, #1a3a8a, #4a7fe8); }
.pos2-stock-badge {
  position: absolute; top: 7px; right: 7px;
  font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 6px; z-index: 3;
}
.pos2-stock-badge.ok { background: rgba(74,127,232,0.15); color: #6b9bf0; border: 1px solid rgba(74,127,232,0.25); }
.pos2-stock-badge.low { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.pos2-stock-badge.out { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.2); }
.pos2-card-body { padding: 8px 10px 10px; }
.pos2-card-name { font-size: 11px; font-weight: 700; color: #f1f5f9; line-height: 1.3; margin-bottom: 2px; }
.pos2-card-sku { font-size: 9px; color: #4a6080; margin-bottom: 6px; }
.pos2-card-footer { display: flex; justify-content: space-between; align-items: center; }
.pos2-card-price { font-size: 13px; font-weight: 800; color: #f1f5f9; letter-spacing: -0.3px; }
.pos2-card-qty {
  background: #4a7fe8; color: white;
  width: 22px; height: 22px; border-radius: 6px;
  font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
/* Ticket glass panel */
.pos2-ticket {
  width: 460px; flex-shrink: 0;
  background: rgba(14,18,30,0.95);
  border-left: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.3);
  overflow: hidden;
}
.pos2-ticket-hdr {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0; background: rgba(22,27,39,0.8);
}
.pos2-ticket-top {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.pos2-ticket-title {
  font-size: 10px; font-weight: 800; color: #f1f5f9;
  text-transform: uppercase; letter-spacing: 1.2px;
}
.pos2-ticket-count {
  font-size: 9px; background: rgba(74,127,232,0.25); color: #6b9bf0;
  padding: 2px 8px; border-radius: 10px; font-weight: 700;
}
.pos2-cli-area {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px; padding: 6px 9px;
}
.pos2-cli-search {
  display: flex; align-items: center; gap: 6px;
}
.pos2-cli-search input {
  flex: 1; background: transparent !important;
  border: none !important; font-size: 11px !important;
  color: #f1f5f9 !important; outline: none !important;
  font-family: 'Poppins', sans-serif !important;
}
.pos2-cli-search input::placeholder { color: #4a6080 !important; }
.pos2-cli-display {
  display: flex; align-items: center; gap: 7px; margin-top: 5px;
}
.pos2-cli-av {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #065f46, #10b981);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: white; flex-shrink: 0;
}
.pos2-cli-name { font-size: 10px; font-weight: 600; color: #f1f5f9; flex: 1; }
.pos2-cli-clear { font-size: 13px; color: #4a7fe8; cursor: pointer; }
/* Cart items */
.pos2-ticket-items {
  flex: 1; overflow-y: auto; padding: 6px 12px; scrollbar-width: none;
}
.pos2-ticket-items::-webkit-scrollbar { display: none; }
.pos2-empty-ticket {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; color: #4a6080; gap: 8px;
}
.pos2-empty-ticket p { font-size: 11px; font-weight: 500; }
.pos2-t-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pos2-t-item:last-child { border-bottom: none; }
.pos2-t-info { flex: 1; min-width: 0; }
.pos2-t-name { font-size: 10px; font-weight: 700; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos2-t-price { font-size: 9px; color: #4a6080; }
.pos2-t-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.pos2-t-total { font-size: 11px; font-weight: 800; color: #f1f5f9; }
.pos2-qty-c { display: flex; align-items: center; gap: 4px; }
.pos2-qb {
  width: 18px; height: 18px; border-radius: 5px;
  background: #252d42; border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #94a3b8;
  cursor: pointer; transition: all 0.1s; line-height: 1;
}
.pos2-qb:hover { background: rgba(74,127,232,0.3); border-color: #4a7fe8; color: white; }
.pos2-qn { font-size: 10px; font-weight: 700; color: #f1f5f9; min-width: 14px; text-align: center; }
/* Ticket footer */
.pos2-ticket-ftr { flex-shrink: 0; border-top: 1px solid rgba(255,255,255,0.07); }
.pos2-totals {
  padding: 8px 14px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.pos2-tot-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.pos2-tot-lbl { font-size: 9px; color: #4a6080; }
.pos2-tot-val { font-size: 9px; font-weight: 600; color: #94a3b8; }
.pos2-tot-main { margin-top: 4px; padding-top: 5px; border-top: 1px dashed rgba(255,255,255,0.08); }
.pos2-tot-main .pos2-tot-lbl { font-size: 11px; font-weight: 700; color: #f1f5f9; }
.pos2-tot-main .pos2-tot-val { font-size: 18px; font-weight: 900; color: #6b9bf0; letter-spacing: -0.5px; }
/* Payment section */
.pos2-pago-section { padding: 8px 14px 6px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.pos2-pago-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pos2-pago-lbl { font-size: 9px; font-weight: 600; color: #4a6080; text-transform: uppercase; letter-spacing: 1px; }
.pos2-pago-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pos2-pi label { font-size: 8px; color: #4a6080; display: block; margin-bottom: 2px; }
.pos2-pi input {
  width: 100%; padding: 5px 7px;
  background: #1e2538; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px; font-size: 11px; color: #f1f5f9;
  outline: none; transition: border-color 0.15s;
  font-family: 'Poppins', sans-serif;
}
.pos2-pi input:focus { border-color: #4a7fe8 !important; }
.pos2-pi input:disabled { opacity: 0.35; cursor: not-allowed; }
/* Confirm area */
.pos2-confirm-area { padding: 8px 14px 12px; }
.pos2-restante-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px;
}
.pos2-restante-lbl { font-size: 9px; color: #4a6080; }
.pos2-restante-val { font-size: 12px; font-weight: 700; color: #f87171; }
.pos2-btn-confirm {
  width: 100% !important; padding: 11px !important;
  border-radius: 10px !important; border: none !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #1a3a8a, #2b5ce6, #4a7fe8) !important;
  color: white !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 12px !important; font-weight: 800 !important;
  text-transform: uppercase !important;
  transition: all 0.15s !important;
}
.pos2-btn-confirm:disabled {
  background: #1e2538 !important;
  color: #4a6080 !important;
  cursor: not-allowed !important;
}
.pos2-btn-jornada {
  width: 100% !important; padding: 7px !important;
  border-radius: 8px !important;
  background: rgba(248,113,113,0.07) !important;
  color: #f87171 !important;
  border: 1px solid rgba(248,113,113,0.18) !important;
  margin-top: 6px !important; cursor: pointer !important;
  font-size: 10px !important; font-weight: 600 !important;
  font-family: 'Poppins', sans-serif !important;
}
/* Fiado label */
#lbl-estado-fiado { font-size: 8px !important; color: #f87171 !important; }

/* ESTILOS PAGOS POS (VERSIÓN COMPACTA) */
.btn-pago-label {
    background: #e0e0e0;
    border: none;
    padding: 6px 10px; /* Reducido de 8px a 6px */
    border-radius: 4px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    width: 85px; /* Un poco más angosto */
    text-align: left;
    font-size: 0.8em; /* Letra un poco más chica */
    transition: background 0.2s;
}
.btn-pago-label:hover {
    background: #dcdcdc;
}

.input-pago {
    width: 100%;
    padding: 6px 10px 6px 25px; /* Reducido de 8px a 6px */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.95em;
    outline: none;
    height: 30px; /* Altura forzada para que sean finos */
}
.input-pago:focus {
    border-color: #3498db;
    background: #fdfdfd;
}

/* BOTÓN COBRAR ACTIVO */
.btn-cobrar-activo {
    background: #27ae60 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3);
    transform: scale(1.02);
}

/* Estilo para la calculadora de apertura/cierre */
#monto-apertura-input:focus, #monto-declarado-input:focus {
    border-color: #FB923C;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
}

/* Animación para que el candado "vibre" sutilmente si intentan ver el saldo */
@keyframes protected-shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

.blindado-active i {
    animation: protected-shake 0.5s ease-in-out infinite;
}

.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #27ae60; }
input:checked + .slider:before { transform: translateX(24px); }

@keyframes flotar {
        0% { transform: translateX(-50%) rotate(-10deg) translateY(0px); }
        50% { transform: translateX(-50%) rotate(-10deg) translateY(-10px); }
        100% { transform: translateX(-50%) rotate(-10deg) translateY(0px); }
    }
    
    /* Adaptaciones para Modo Oscuro del Ranking */
    body.dark-mode #sec-ranking h1 {
        /* En oscuro quizás quieras que el texto brille más */
        text-shadow: 0 0 20px rgba(241, 196, 15, 0.3);
    }
    body.dark-mode #nombre-top-1, body.dark-mode #xp-top-1,
    body.dark-mode #nombre-top-2, body.dark-mode #xp-top-2,
    body.dark-mode #nombre-top-3, body.dark-mode #xp-top-3 {
        color: white !important;
    }

/* --- NUEVO PANEL PREMIUM DE PRODUCTOS --- */
.premium-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    padding: 20px;
    margin-bottom: 30px;
    gap: 20px;
    align-items: stretch; /* Estira las columnas al mismo alto */
}

/* Modo Oscuro para el panel */
body.dark-mode .premium-panel {
    background: #1c1c1e;
    border: 1px solid #333;
}

.col-left { flex: 0.8; }
.col-right { flex: 1.2; display: flex; flex-direction: column; justify-content: center; gap: 15px; }

/* Efecto Deshabilitado (Gris hasta que creas producto) */
.col-right.disabled { opacity: 0.4; pointer-events: none; filter: grayscale(1); transition: all 0.3s; }
.col-right.active { opacity: 1; pointer-events: all; filter: grayscale(0); }

.vertical-divider { width: 1px; background: #eee; margin: 0 10px; }
body.dark-mode .vertical-divider { background: #333; }

/* Inputs Limpios y Modernos */
.input-premium {
    width: 100%; padding: 10px 12px; border: 1px solid #eee; border-radius: 6px;
    background: #fdfdfd; transition: all 0.2s;
}
.input-premium:focus { border-color: #3498db; background: white; outline: none; }
.main-input { font-weight: bold; font-size: 1.1em; color: #2c3e50; }

body.dark-mode .input-premium { background: #2c2c2e; border-color: #444; color: white; }
body.dark-mode .main-input { color: white; }

.form-grid-compact {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px;
}

.btn-premium-create {
    width: 100%; padding: 12px; background: #2c3e50; color: white; border: none;
    border-radius: 6px; font-weight: bold; cursor: pointer; transition: 0.2s;
}
.btn-premium-create:hover { background: #34495e; transform: translateY(-1px); }

/* Selector y Variantes (Lado Derecho) */
.select-premium { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 6px; font-weight: 500; }
body.dark-mode .select-premium { background: #2c2c2e; border-color: #444; color: white; }

.manual-variant-box { display: flex; gap: 8px; }
.input-mini { flex: 1; padding: 8px; border: 1px solid #eee; border-radius: 4px; }
body.dark-mode .input-mini { background: #2c2c2e; border-color: #444; color: white; }

.btn-mini-add { background: #27ae60; color: white; border: none; padding: 0 15px; border-radius: 4px; cursor: pointer; }

/* Chips de Acción Rápida (Botones ovalados) */
.btn-action-chip {
    background: #eef2f7; color: #34495e; border: 1px solid #dfe6e9;
    padding: 6px 12px; border-radius: 20px; font-size: 0.85em; font-weight: 600;
    cursor: pointer; transition: 0.2s;
}
.btn-action-chip:hover { background: #dfe6e9; border-color: #b2bec3; }
body.dark-mode .btn-action-chip { background: #2c2c2e; color: #ddd; border-color: #444; }

/* --- BUSCADOR MASIVO (TAGS) DE LA BARRA INFERIOR --- */
.massive-curve-module {
    display: flex; align-items: center; gap: 5px;
    background: white; padding: 4px; border-radius: 25px; border: 1px solid #ddd;
    min-width: 300px; position: relative;
    margin-right: 15px; /* Separación del botón guardar */
}
body.dark-mode .massive-curve-module { background: #1c1c1e; border-color: #444; }

.tag-search-container {
    flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding-left: 8px;
}
.tags-wrapper { display: flex; gap: 4px; }

.tag-pill {
    background: #3498db; color: white; font-size: 0.75em; padding: 2px 8px;
    border-radius: 12px; display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.tag-remove { cursor: pointer; opacity: 0.7; font-weight: bold; }
.tag-remove:hover { opacity: 1; }

#input-curve-search {
    border: none; outline: none; background: transparent; flex: 1; min-width: 80px; font-size: 0.9em;
}
body.dark-mode #input-curve-search { color: white; }

/* MENÚ DESPLEGABLE TRASLÚCIDO (Hacia abajo) */
.glass-dropdown {
    position: absolute;
    top: 110%; /* Cae hacia abajo */
    left: 0; right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-height: 200px; overflow-y: auto; z-index: 1000;
}
body.dark-mode .glass-dropdown {
    background: rgba(28, 28, 30, 0.95);
    border-color: #444;
}

.dropdown-item {
    padding: 8px 12px; cursor: pointer; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 0.9em;
}
body.dark-mode .dropdown-item { color: #ddd; border-bottom-color: #333; }
.dropdown-item:hover { background: rgba(52, 152, 219, 0.1); color: #3498db; }

.btn-magic-wand {
    background: #8e44ad; color: white; border: none; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.btn-magic-wand:hover { transform: scale(1.1); box-shadow: 0 0 10px rgba(142, 68, 173, 0.4); }

/* --- PANEL GENERAL --- */
.premium-panel {
    background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex; padding: 20px; margin-bottom: 30px; gap: 20px; align-items: stretch;
}
.col-left { flex: 0.8; }
.col-right { flex: 1.2; display: flex; flex-direction: column; justify-content: center; }
.col-right.disabled { opacity: 0.5; pointer-events: none; filter: grayscale(1); transition: 0.3s; }
.col-right.active { opacity: 1; pointer-events: all; filter: grayscale(0); }
.vertical-divider { width: 1px; background: #eee; margin: 0 10px; }

/* --- INPUTS --- */
.input-premium { width: 100%; padding: 10px; border: 1px solid #eee; border-radius: 6px; margin-bottom: 5px; }
.btn-premium-create { width: 100%; padding: 12px; background: #2c3e50; color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; }
.form-grid-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }

/* --- SELECTOR NOTION --- */
.selector-notion-wrapper { border: 1px solid #ddd; border-radius: 6px; padding: 5px; background: #fff; }
.input-notion-search { border: none; outline: none; width: 100%; padding: 8px 8px 8px 30px; background: transparent; }
.cola-tags-area { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.notion-tag { background: #3498db; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.8em; display: flex; align-items: center; gap: 5px; }
.dropdown-notion { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid #eee; z-index: 1000; max-height: 200px; overflow-y: auto; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.item-notion-result { padding: 10px; cursor: pointer; border-bottom: 1px solid #f9f9f9; }
.item-notion-result:hover { background: #f0f0f0; }

/* --- ZONA INFERIOR (SPLIT) --- */
.label-rapido { font-size: 0.7em; color: #95a5a6; font-weight: 700; margin-bottom: 5px; text-transform: uppercase; }

/* --- CONTENEDOR INFERIOR (MÁS ALTO) --- */
.bottom-actions-container {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 90px; /* ANTES: 60px | AHORA: 90px para más comodidad */
    transition: all 0.3s ease;
}

/* Wrapper de botones (Centrados verticalmente) */
.botones-wrapper { 
    display: flex; 
    flex-direction: column; /* Opcional: Si prefieres uno arriba del otro si hay espacio, o déjalo en row */
    gap: 5px; 
    flex-shrink: 0; 
}

/* --- GRILLA INLINE (MÁS ESPACIOSA) --- */
.grid-inline {
    flex-grow: 1;
    background: #fff;
    border: 1px solid var(--brand-color);
    border-radius: 8px;
    padding: 10px 15px !important; /* Más relleno interno */
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Sombra más suave */
    animation: slideInRight 0.3s ease-out;
    overflow: hidden; /* Evita scroll vertical del contenedor */
}

/* Header de la grilla */
.grid-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em; /* Letra un poco más grande */
    font-weight: 700;
    color: var(--brand-color);
    margin-bottom: 8px; /* Más separación con los inputs */
}

/* Contenedor de celdas */
.grid-cells-inline {
    display: flex;
    gap: 8px; /* Más espacio entre cuadraditos */
    overflow-x: auto;
    padding-bottom: 5px; /* Espacio para la scrollbar horizontal si aparece */
    align-items: center;
}

/* CELDAS Y INPUTS (MÁS GRANDES) */
.cell-group { 
    min-width: 45px; /* Más anchos */
    text-align: center; 
}

.cell-label { 
    font-size: 0.75em; /* Etiqueta más legible */
    margin-bottom: 4px; 
    display: block; 
    color: #7f8c8d;
    font-weight: 600;
}

.cell-input { 
    width: 100%; 
    height: 40px; /* ANTES: 30px | AHORA: 40px (Más clicable) */
    font-size: 1.1em; /* Números grandes y claros */
    padding: 0; 
    text-align: center; 
    border-radius: 6px;
    border: 1px solid #dce4ec;
    background: #fdfdfd;
    transition: all 0.2s;
}

.cell-input:focus { 
    border-color: var(--brand-color); 
    background: #fff; 
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15); 
    transform: translateY(-1px);
}

/* Botón check más grande */
.btn-check-grid { 
    width: 40px; /* Iguala la altura del input */
    height: 40px; 
    border: none; 
    background: #27ae60; 
    color: white; 
    border-radius: 6px; 
    cursor: pointer; 
    margin-top: auto; 
    font-size: 1.1em;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 6px rgba(39, 174, 96, 0.2);
}
.btn-check-grid:hover { background: #219150; transform: scale(1.05); }

/* --- CONTENEDOR PRINCIPAL --- */
.bottom-actions-container {
    display: flex;
    align-items: center;
    gap: 0; /* Quitamos el gap del flex porque usaremos el margen del separador */
    height: 90px;
    position: relative;
}

/* --- WRAPPER DE BOTONES --- */
.botones-wrapper {
    display: flex;
    gap: 8px; /* Espacio entre botones */
    flex-shrink: 0; /* Evita que se aplasten */
}

/* --- LA NUEVA LÍNEA SUTIL (DIVISOR) --- */
.vertical-separator-mini {
    width: 1px;
    height: 60%; /* No llega hasta los bordes, queda flotando elegante */
    background-color: #e0e0e0; /* Gris muy suave */
    margin: 0 30px; /* 🔥 AQUÍ ESTÁ EL "AIRE": 30px a cada lado */
}

/* --- GRILLA (AJUSTADA) --- */
.grid-inline {
    flex-grow: 1; /* Ocupa todo el resto a la derecha */
    background: #fff;
    border: 1px solid var(--brand-color);
    border-radius: 8px;
    padding: 10px 20px !important; /* Más espacio interno */
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    animation: slideInRight 0.3s ease-out;
    overflow: hidden;
}

/* Modo Oscuro para la línea */
body.dark-mode .vertical-separator-mini {
    background-color: #444;
}

/* --- CONTENEDOR FLEX LATERAL (MÁS ALTO) --- */
.bottom-actions-container {
    display: flex;
    align-items: center; 
    height: 100px; /* Aumentado para dar aire y que entren los textos */
    position: relative;
    margin-top: 10px;
}

/* --- BOTONES (IZQUIERDA) --- */
.botones-side-wrapper {
    flex: 0 0 35%; /* Ancho controlado */
    display: flex;
    gap: 8px;
    height: 100%; 
    align-items: center; /* Centrados verticalmente */
}

.chip-gen {
    flex: 1; 
    padding: 12px 5px; /* Más altos */
    background: #f4f6f8;
    border: 1px solid #e0e0e0;
    color: #555;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.chip-gen:hover { background: #e2e6ea; border-color: #cbd5e0; }
.chip-gen.active { 
    background: var(--brand-color); 
    color: white; 
    border-color: var(--brand-color); 
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.25);
}

/* --- SEPARADOR --- */
.vertical-separator-large {
    width: 1px;
    height: 70%;
    background-color: #e0e0e0;
    margin: 0 20px; 
    flex-shrink: 0;
}

/* --- GRILLA (DERECHA) --- */
.grid-side {
    flex: 1; 
    background: white;
    border: 1px solid var(--brand-color);
    border-radius: 8px;
    padding: 10px 15px !important;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrar contenido verticalmente */
    height: 100%; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    animation: slideInRight 0.3s ease-out;
    position: relative;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.grid-header-side {
    position: absolute;
    top: 8px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    font-weight: 800;
    color: var(--brand-color);
    text-transform: uppercase;
    opacity: 0.8;
}
.grid-header-side i { cursor: pointer; color: #ccc; transition: 0.2s; }
.grid-header-side i:hover { color: #e74c3c; transform: scale(1.2); }

.grid-cells-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    margin-top: 15px; /* Espacio para el header */
    padding-bottom: 5px;
}

/* GRUPO DE CELDA (Etiqueta + Input) */
.cell-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

/* ETIQUETA DE TALLE (S, M, L...) */
.cell-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4a7fe8;
    color: white;
    font-size: 8px;
    font-weight: 700;
    border-radius: 5px;
    padding: 2px 6px;
    min-width: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* INPUTS */
.cell-input {
    width: 48px;
    text-align: center;
    padding: 6px 4px;
    font-size: 12px;
    border: 1px solid #dce4ec;
    border-radius: 6px;
    font-weight: bold;
    color: #2c3e50;
    background: #fdfdfd;
}
.cell-input:focus { border-color: var(--brand-color); background: #fff; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); }

/* BOTÓN CHECK */
.btn-check-grid { 
    width: 38px; height: 38px; 
    border: none; background: #27ae60; color: white; 
    border-radius: 6px; cursor: pointer; 
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 6px rgba(39, 174, 96, 0.2);
    transition: 0.2s;
}
.btn-check-grid:hover { transform: scale(1.05); background: #219150; }

/* --- AJUSTE DE ALTURA Y VISIBILIDAD --- */
.bottom-actions-container {
    height: 115px !important; /* Más altura para que no haya scroll */
    margin-top: 15px;
}

.grid-side {
    padding: 15px !important;
}

/* ===== SIDEBAR ZENIT SUITE (PREMIUM NAVY VERSION) ===== */
/* ================================================= */
/* ===== ZENIT SUITE: SIDEBAR & MENÚ (FINAL) ===== */
/* ================================================= */

/* 1. ESTRUCTURA Y FONDO NAVY */
/* ===== SIDEBAR ZENIT SUITE (PREMIUM) ===== */
/* ===== SIDEBAR ZENIT SUITE (ULTRA PREMIUM) ===== */
/* ===== SIDEBAR ZENIT SUITE (ULTRA PREMIUM) ===== */
.sidebar {
  width: 260px;
  height: 100vh;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 80%) !important; 
  color: #ffffff !important;
  padding: 35px 25px;
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.1), 
    10px 0 30px rgba(0, 0, 0, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  
  /* 🐛 CORRECCIÓN: Permitir scroll vertical, ocultar horizontal */
  overflow-y: auto; 
  overflow-x: hidden; 
  
  z-index: 100;
}

/* El destello superior (Mantenerlo, ayuda al brillo) */
.sidebar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* ======================================================= */
/* 💎 SCROLLBAR PREMIUM PARA LA SIDEBAR NAVY               */
/* ======================================================= */
.sidebar::-webkit-scrollbar {
    width: 6px; /* Barra delgada y elegante */
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1); /* Carril ligeramente oscuro */
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2); /* Thumb translúcido */
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4); /* Brillo al pasar el mouse */
}

/* 2. LOGO (BRAND CONTAINER) */
.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  cursor: pointer;
  padding-left: 5px;
}

.brand-logo {
  width: 48px;
  height: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.text-zenit {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.text-suite {
  font-size: 14px;
  font-weight: 400;
  color: #94A3B8; /* Gris azulado elegante */
  align-self: flex-end;
  margin-top: -4px;
}

/* 3. MENÚ DE NAVEGACIÓN (Estilo Zenit) */
.menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu a {
  display: flex !important; /* Para alinear iconos si los pones */
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  color: #94A3B8 !important; /* Texto gris suave */
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 500;
  background: transparent;
  margin-bottom: 2px;
}

/* Hover: Se ilumina en blanco sutil */
.menu a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  transform: translateX(5px);
}

/* Activo: Naranja Zenit Vibrante */
.menu a.active {
  background: linear-gradient(90deg, #F97316 0%, #EA580C 100%) !important;
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

/* Submenús */
#submenu-productos {
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.1);
    margin-left: 15px;
    margin-top: 5px;
}

/* ======================================================= */
/* ===== EFECTO BOTONES PREMIUM (GLASS OVERLAY) ===== */
/* ======================================================= */

/* Seleccionamos todos los elementos que deben verse "3D" */
button, 
.btn-primary, 
.tab-categoria.active, 
.btn-cobrar-activo,
.menu a.active,
input[type="submit"] {
    
    /* 1. LA MAGIA: DEGRADADO TRANSPARENTE */
    /* Luz blanca suave arriba (15%) -> Sombra negra suave abajo (20%) */
    /* Esto se "fusiona" con el color de fondo que ya tenga el botón */
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.2) 100%) !important;
    
    /* 2. DETALLES DE LUJO */
    /* Sombra externa suave + Brillo interno en el borde superior (inset) */
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.15), 
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
        
    /* Un borde sutil para definir la forma */
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    
    /* Aseguramos transición suave */
    transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

/* EFECTO AL PRESIONAR (CLICK) */
/* El botón se "hunde" visualmente */
button:active, 
.btn-primary:active,
.btn-cobrar-activo:active {
    transform: translateY(2px) !important; /* Se mueve 2px abajo */
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.1), 
        inset 0 2px 5px rgba(0, 0, 0, 0.2) !important; /* Sombra interna */
    
    /* Invertimos el degradado para oscurecerlo al tocar */
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%) !important;
}

/* ======================================================= */
/* ===== MÓDULO CATEGORÍAS (ZENIT PREMIUM) ===== */
/* ======================================================= */

.categories-wrapper {
    max-width: 950px; /* Evita que se estire demasiado en pantallas grandes */
    margin: 20px 0;   /* Alineado a la izquierda con espacio superior */
    padding-right: 20px;
}

/* Encabezado del Módulo */
.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* FILA DE CATEGORÍA (NIVEL 1) */
.category-row {
    background: linear-gradient(to bottom, #1e3a8a 0%, #0f172a 100%) !important; /* Navy Zenit */
    margin-bottom: 12px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
}

.category-row:hover {
    transform: translateX(5px); /* Desplazamiento sutil premium */
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
}

/* Contenido Principal de la Fila */
.category-main-content {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    color: white;
}

.category-drag-handle {
    color: rgba(255, 255, 255, 0.3);
    margin-right: 20px;
    font-size: 1.2em;
    cursor: grab;
}

.category-info {
    flex-grow: 1;
}

.category-name {
    font-weight: 700;
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

.category-count {
    font-size: 0.8em;
    color: #94A3B8; /* Gris Slate */
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}


/* ESTILO DE LOS CHIPS (TAGS) */
.sub-tag {
    background: #475569; /* Gris Slate suave */
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-tag:hover {
    background: #64748b;
    transform: scale(1.05);
}

/* DRAWER LATERAL DE EDICIÓN */
.drawer-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 20000; /* Por encima de todo */
    display: flex;
    justify-content: flex-end; /* Alineado a la derecha */
}

.drawer-panel {
    width: 350px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}
.drawer-header h3 { margin: 0; color: #2c3e50; }

.drawer-body { padding: 20px; }

.drawer-body label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #34495e;
    font-size: 0.9em;
}

.input-group {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
}

.btn-save {
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    width: 40px;
    cursor: pointer;
}

.divider {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

.btn-delete-full {
    width: 100%;
    background: #fff5f5;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-delete-full:hover {
    background: #e74c3c;
    color: white;
}

/* Modo Oscuro para el Drawer */
body.dark-mode .drawer-panel, body.dark-mode .drawer-header {
    background-color: #1c1c1e;
    border-color: #333;
}
body.dark-mode .drawer-header h3 { color: white; }
body.dark-mode .input-group input { 
    background: #2c2c2e; 
    color: white; 
    border-color: #444; 
}
body.dark-mode .btn-delete-full {
    background: #2c0b0b;
    border-color: #e74c3c;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 40px;
}

.chip-sub {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.chip-sub:hover {
    background: #e2e8f0;
}

.chip-delete {
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.9em;
    transition: color 0.2s;
}

.chip-delete:hover {
    color: #ef4444;
}

/* Clase que se añade al elemento que estás arrastrando */
.dragging {
    opacity: 0.5;
    border: 2px dashed #3498db !important;
    background-color: #f0f8ff !important;
    transform: scale(0.98);
}

/* El cursor debe indicar que se puede mover */
.category-row {
    cursor: grab; /* Manito abierta */
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-row:active {
    cursor: grabbing; /* Manito cerrada al agarrar */
}

/* styles.css */

/* ESTA ES LA CLAVE: 
   Hacemos que la tarjeta que estamos moviendo (la "sombra" que queda en la lista)
   sea totalmente invisible para el ratón. Así el ratón "pisa" el fondo
   y el cálculo de posición es estable. 
*/
.draggable-cat.dragging {
    opacity: 0.5;
    background-color: #f0f9ff !important;
    border: 2px dashed #3498db !important;
    
    /* LA CLAVE MÁGICA: */
    pointer-events: none !important; 
}

/* Estilo Popover Premium */
.popover-zenit {
    position: absolute;
    width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border: 1px solid #f0f0f0;
    z-index: 10000;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

.popover-header {
    background: #f8f9fa;
    padding: 10px 15px;
    font-size: 0.85em;
    font-weight: 700;
    color: #7f8c8d;
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popover-body {
    padding: 0;
}

.sucursal-row {
    padding: 12px 15px;
    border-bottom: 1px solid #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #2c3e50;
}
.sucursal-row:last-child { border-bottom: none; }

.btn-transferir {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background: #e3f2fd;
    color: #3498db;
    font-weight: 600;
    font-size: 0.8em;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}
.btn-transferir:hover { background: #3498db; color: white; }

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

.tab-gasto {
    margin: 0;
    padding-bottom: 12px;
    cursor: pointer;
    color: #95a5a6; /* Gris clarito por defecto */
    border-bottom: 3px solid transparent; /* Borde invisible */
    transition: all 0.3s ease; /* Suavidad */
    font-size: 1.1em;
    font-weight: 600;
}

/* Al pasar el mouse por encima (Hover) -> Azul Navy */
.tab-gasto:hover {
    color: #2c3e50; 
}

/* Cuando está seleccionado (Active) -> Azul Navy + Línea Azul */
.tab-gasto.active {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
}

/* ESTILOS MENU DESPLEGABLE GASTOS */
.grupo-concepto {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
}
.grupo-concepto:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.titulo-grupo {
    font-size: 0.75em;
    font-weight: 700;
    color: #95a5a6;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.grid-opciones {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.opcion-chip {
    padding: 4px 10px;
    background: #f4f6f8;
    border-radius: 12px;
    font-size: 0.8em;
    color: #555;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.opcion-chip:hover {
    background: #e1e8ed;
    color: #2c3e50;
}

/* Estado seleccionado dentro del dropdown */
.opcion-chip.selected {
    background: #2c3e50;
    color: white;
    box-shadow: 0 2px 5px rgba(44, 62, 80, 0.3);
}

/* Input Group Zenit (Refinamiento) */
.input-group-zenit {
    display: flex; 
    align-items: center; 
    border: 1px solid #e0e0e0; 
    border-radius: 8px; 
    background: #fff;
    transition: border 0.3s;
}
.input-group-zenit:focus-within {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* --- PERSONALIZACIÓN REPORTES BI (ZENIT PRO) --- */

/* 1. Tarjeta ENTRADAS (Verde) */
#sec-finanzas-reportes .card-kpi-finanzas:nth-of-type(1) {
    border-left: 5px solid #27ae60 !important;
}
#kpi-entradas {
    color: #27ae60 !important;
}

/* 2. Tarjeta SALIDAS (Rojo) */
#sec-finanzas-reportes .card-kpi-finanzas:nth-of-type(2) {
    border-left: 5px solid #e74c3c !important;
}
/* El ID kpi-salidas ya suele ser rojo, pero esto lo asegura */
#kpi-salidas {
    color: #e74c3c !important;
}

/* 3. Tarjeta RESULTADO (Azul Claro) */
#sec-finanzas-reportes .card-kpi-finanzas:nth-of-type(3) {
    border-left: 5px solid #3498db !important;
}
#kpi-resultado {
    color: #3498db !important; /* Azul claro estilo Zenit */
}

/* --- ESTILO HISTORIAL DE MOVIMIENTOS (ZENIT STYLE) --- */

#detalle-contenido {
    font-family: 'Poppins', sans-serif !important;
    text-align: left;
}

.detalle-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.detalle-header h2 {
    color: #2c3e50 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    margin: 0;
}

.detalle-meta p {
    color: #64748b !important; /* Gris Navy suave */
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.detalle-meta strong {
    color: #2c3e50 !important;
}

/* Contenedor de la lista */
.detalle-lista-container {
    background: #f8fafc; /* Fondo muy suave tipo cobranzas */
    border-radius: 12px;
    padding: 5px;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

/* Filas de productos */
.movimiento-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    margin: 5px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.movimiento-info {
    display: flex;
    flex-direction: column;
}

.movimiento-nombre {
    color: #2c3e50 !important;
    font-weight: 600 !important;
    font-size: 0.95rem;
}

.movimiento-sku {
    color: #94a3b8 !important;
    font-size: 0.75rem;
    font-weight: 400;
}

.movimiento-cantidad {
    font-weight: 700;
    font-size: 1rem;
    padding: 4px 10px;
    border-radius: 6px;
}

.texto-positivo {
    color: #10b981 !important; /* Esmeralda */
    background: #ecfdf5;
}

.texto-negativo {
    color: #ef4444 !important; /* Rojo soft */
    background: #fef2f2;
}

/* Productos sin stock en la lista de selección */
.producto-card.sin-stock {
    opacity: 0.5;
    filter: grayscale(1);
    cursor: not-allowed;
    pointer-events: none; /* Bloquea el clic totalmente */
}

.badge-stock-agotado {
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
}

button,
.menu a,
.sidebar a,
.submenu-item {
  min-height: 44px;
}

* {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    transition: left 0.25s ease;
    z-index: 1000;
  }

  .sidebar.open {
    left: 0;
  }
}

@media (max-width: 768px) {
  .card,
  .panel,
  .form-group {
    padding: 16px;
  }
}

input,
select {
  height: 44px;
  font-size: 16px; /* evita zoom en iOS */
}

html {
  -webkit-overflow-scrolling: touch;
}

button,
.menu a,
.sidebar a,
.submenu-item,
input,
select {
  min-height: 44px;
}

input,
select,
textarea {
  font-size: 16px;
}
/* ============================= */
/* 📱 MODO MOVIL SIDEBAR */
/* ============================= */

@media (max-width: 768px) {

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* oculto fuera */
    width: 260px;
    height: 100vh;
    z-index: 2000;
    transition: left 0.25s ease;
  }

  .sidebar.open {
    left: 0;
  }

  /* overlay oscuro */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

.btn-menu-mobile {
  display: none;
  background: transparent;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}

@media (max-width: 768px) {
  .btn-menu-mobile {
    display: block;
  }
}

/* =========================================
   📱 ZENIT POS — MODO MÓVIL PROFESIONAL
   ========================================= */

@media (max-width: 768px) {

  /* contenedor principal del POS */
  #sec-pos > div[style*="display: flex"] {
    flex-direction: column !important;
    height: auto !important;
  }

  /* columna productos */
  #sec-pos > div[style*="display: flex"] > div[style*="flex: 3"] {
    flex: none !important;
    width: 100% !important;
  }

  /* columna ticket */
  #sec-pos > div[style*="display: flex"] > div[style*="flex: 2"] {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    margin-top: 15px;
  }

  /* grilla de productos más cómoda */
  #grilla-productos-pos {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  /* buscador más táctil */
  #pos-search {
    font-size: 16px !important;
  }
}

/* =========================================
   📱 ZENIT — RESPONSIVE GLOBAL
   ========================================= */

@media (max-width: 768px) {

  /* ===== Layout principal ===== */
  .app-layout {
    flex-direction: column;
  }

  .main-content {
    padding: 14px !important;
    width: 100% !important;
    overflow-x: hidden;
  }

  /* ===== Secciones ===== */
  .content-section {
    padding: 0 !important;
  }

  /* ===== Cards / paneles ===== */
  .card,
  .panel,
  .module-card,
  .form-container {
    padding: 14px !important;
    border-radius: 12px;
  }

  /* ===== Grillas genéricas ===== */
  .grid,
  .cards-grid,
  .productos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  /* ===== Tablas ===== */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* ===== Inputs ===== */
  input,
  select,
  textarea {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  /* ===== Botones ===== */
  button,
  .btn {
    min-height: 44px;
    padding: 10px 14px;
  }

}
/* =====================================================
   📱 ZENIT MOBILE CLEAN UI — FOUNDATION
   Solo afecta pantallas <= 768px
   ===================================================== */

@media (max-width: 768px) {

  /* ===== Base visual ===== */
  body {
    font-size: 15px;
    line-height: 1.35;
  }

  /* ===== Main content respira ===== */
  .main-content {
    padding: 12px !important;
  }

  /* ===== Títulos más claros ===== */
  h1, h2, h3 {
    margin-bottom: 10px;
    line-height: 1.2;
  }

  /* =====================================================
     🧱 CARDS Y CONTENEDORES — MÁS LIMPIOS
     ===================================================== */

  .card,
  .panel,
  .module-card,
  .form-container,
  .content-section > div {
    border-radius: 14px !important;
    padding: 14px !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  }

  /* =====================================================
     🔘 BOTONES — TÁCTILES DE VERDAD
     ===================================================== */

  button,
  .btn,
  .btn-primary,
  .btn-secondary {
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
  }

  /* botones importantes más anchos */
  .btn-primary,
  .btn-confirmar,
  .btn-guardar {
    width: 100%;
  }

  /* feedback táctil */
  button:active,
  .btn:active {
    transform: scale(0.97);
  }

  /* =====================================================
     🧾 INPUTS — MOBILE FRIENDLY
     ===================================================== */

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
    border-radius: 10px;
    padding: 10px 12px;
  }

  /* =====================================================
     🧩 MENÚ — MÁS AIRE
     ===================================================== */

  .sidebar a,
  .menu a,
  .submenu-item {
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 15px;
  }

  /* =====================================================
     🧱 GRIDS — MENOS APRETADAS
     ===================================================== */

  .grid,
  .cards-grid,
  .productos-grid {
    gap: 14px !important;
  }

  /* =====================================================
     📊 TABLAS — SCROLLABLE LIMPIO
     ===================================================== */

  table {
    border-radius: 10px;
    overflow: hidden;
  }

  /* =====================================================
     ✨ MICRO-AJUSTES DE RESPIRACIÓN
     ===================================================== */

  .form-group {
    margin-bottom: 14px;
  }

  .section-title {
    margin-bottom: 12px;
  }

}
/* =====================================================
   📱 ZENIT — MOBILE APP BAR
   ===================================================== */

.mobile-appbar {
  display: none;
}

@media (max-width: 768px) {

  .mobile-appbar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 1200;
    background: #0f172a; /* tu dark */
    color: white;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .mobile-appbar-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
  }

  /* el botón dentro del appbar */
  .mobile-appbar .btn-menu-mobile {
    display: block;
    font-size: 22px;
  }

  /* empuja el contenido hacia abajo */
  .main-content {
    padding-top: 10px !important;
  }

}
/* =====================================================
   📱 ZENIT — MOBILE BOTTOM NAV
   ===================================================== */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {

  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1400;
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* cada item */
  .mb-nav-item {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
  }

  .mb-nav-item .mb-icon {
    font-size: 18px;
  }

  .mb-nav-item.active {
    color: white;
  }

  .mb-nav-item:active {
    transform: scale(0.92);
  }

  /* empuja el contenido para que no lo tape */
  .main-content {
    padding-bottom: 80px !important;
  }

}
/* =====================================================
   📱 ZENIT — MOBILE VISUAL POLISH (POS HYBRID)
   ===================================================== */

@media (max-width: 768px) {

  /* =========================================
     🔝 APP BAR — MÁS COMPACTA
     ========================================= */

  .mobile-appbar {
    padding: 10px 14px !important;
    min-height: 52px;
    background: #0b1220; /* más profesional */
  }

  .mobile-appbar-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
  }

  .mobile-appbar .btn-menu-mobile {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
  }

  /* =========================================
     📱 BOTTOM NAV — ESTILO APP REAL
     ========================================= */

  .mobile-bottom-nav {
    height: 60px !important;
    background: #0b1220;
    border-top: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
  }

  .mb-nav-item {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    gap: 2px;
  }

  .mb-nav-item .mb-icon {
    font-size: 17px;
  }

  .mb-nav-item.active {
    color: #ffffff;
  }

  /* =========================================
     🧱 PRODUCT CARDS — MÁS MODERNAS
     ========================================= */

  #grilla-productos-pos > div {
    border-radius: 14px !important;
    padding: 14px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
    border: 1px solid rgba(15,23,42,0.06);
    transition: transform 0.15s ease;
  }

  #grilla-productos-pos > div:active {
    transform: scale(0.97);
  }

  /* =========================================
     🔤 JERARQUÍA TIPOGRÁFICA POS
     ========================================= */

  #grilla-productos-pos strong {
    font-size: 15px;
    font-weight: 700;
  }

  #grilla-productos-pos small {
    font-size: 12px;
    opacity: 0.75;
  }

  /* =========================================
     🔘 BOTÓN PRINCIPAL POS
     ========================================= */

  .btn-confirmar,
  .btn-primary {
    border-radius: 14px !important;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
  }

  /* =========================================
     🧾 BUSCADOR POS MÁS LIMPIO
     ========================================= */

  #pos-search {
    border-radius: 14px !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(15,23,42,0.15);
  }

}
/* =====================================================
   📱 ZENIT — MOBILE VISUAL POLISH (POS HYBRID)
   ===================================================== */

@media (max-width: 768px) {

  /* =========================================
     🔝 APP BAR — MÁS COMPACTA
     ========================================= */

  .mobile-appbar {
    padding: 10px 14px !important;
    min-height: 52px;
    background: #0b1220; /* más profesional */
  }

  .mobile-appbar-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
  }

  .mobile-appbar .btn-menu-mobile {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
  }

  /* =========================================
     📱 BOTTOM NAV — ESTILO APP REAL
     ========================================= */

  .mobile-bottom-nav {
    height: 60px !important;
    background: #0b1220;
    border-top: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
  }

  .mb-nav-item {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    gap: 2px;
  }

  .mb-nav-item .mb-icon {
    font-size: 17px;
  }

  .mb-nav-item.active {
    color: #ffffff;
  }

  /* =========================================
     🧱 PRODUCT CARDS — MÁS MODERNAS
     ========================================= */

  #grilla-productos-pos > div {
    border-radius: 14px !important;
    padding: 14px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
    border: 1px solid rgba(15,23,42,0.06);
    transition: transform 0.15s ease;
  }

  #grilla-productos-pos > div:active {
    transform: scale(0.97);
  }

  /* =========================================
     🔤 JERARQUÍA TIPOGRÁFICA POS
     ========================================= */

  #grilla-productos-pos strong {
    font-size: 15px;
    font-weight: 700;
  }

  #grilla-productos-pos small {
    font-size: 12px;
    opacity: 0.75;
  }

  /* =========================================
     🔘 BOTÓN PRINCIPAL POS
     ========================================= */

  .btn-confirmar,
  .btn-primary {
    border-radius: 14px !important;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
  }

  /* =========================================
     🧾 BUSCADOR POS MÁS LIMPIO
     ========================================= */

  #pos-search {
    border-radius: 14px !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(15,23,42,0.15);
  }

}

/* =========================================
   📱 ZENIT MOBILE HYBRID MODE
   NO ROMPE DESKTOP
========================================= */

@media (max-width: 768px) {

  /* ===== APPBAR MOBILE ===== */
  .mobile-appbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }

  /* ===== SIDEBAR MOBILE ===== */
  .sidebar {
    position: fixed !important;
    left: -280px;
    top: 0;
    height: 100%;
    width: 260px;
    z-index: 2000;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }

  /* ===== OVERLAY ===== */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  /* ===== MAIN CONTENT MOBILE ===== */
  .main-content {
    padding: 14px !important;
  }

  /* ===== CARDS MÁS TOUCH ===== */
  .trader-card {
    height: auto;
    padding: 14px;
    border-radius: 10px;
  }

  /* ===== BOTONES MÁS GRANDES ===== */
  button,
  .btn-tab-finanzas,
  .tab-categoria {
    min-height: 44px;
  }

  /* ===== GRID MÁS LIMPIO ===== */
  .kpi-container {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

}

/* =====================================================
   📱 ZENIT — MOBILE LAYOUT REFLOW v2
   CAMBIO ESTRUCTURAL REAL (solo móvil)
===================================================== */

@media (max-width: 768px) {

  /* ===============================
     🧱 APP LAYOUT → VERTICAL REAL
     =============================== */

  .app-layout {
    flex-direction: column !important;
  }

  /* ===============================
     📂 SIDEBAR fuera del flujo
     =============================== */

  .sidebar {
    position: fixed !important;
  }

  /* ===============================
     📄 MAIN CONTENT FULL WIDTH
     =============================== */

  .main-content {
    width: 100% !important;
    padding: 16px 14px 90px 14px !important;
    margin-left: 0 !important;
  }

  /* ===============================
     🧩 TODAS LAS SECCIONES RESPIRAN
     =============================== */

  .content-section {
    padding: 0 !important;
  }

  .content-section > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ===============================
     🧱 CONTENEDORES FLEX → COLUMNA
     (esto es CLAVE)
     =============================== */

  .content-section div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 14px !important;
    height: auto !important;
  }

  /* ===============================
     📊 KPI y grids → una columna
     =============================== */

  .kpi-container {
    grid-template-columns: 1fr !important;
  }

  /* ===============================
     🧾 FORMULARIOS MÁS LIMPIOS
     =============================== */

  .form-group {
    margin-bottom: 16px !important;
  }

  /* ===============================
     🔘 BOTONES FULL WIDTH EN MÓVIL
     =============================== */

  .btn-primary,
  .btn-confirmar,
  .btn-guardar {
    width: 100% !important;
  }

  /* ===============================
     🧱 CARDS MÁS RESPIRABLES
     =============================== */

  .card,
  .module-card,
  .form-container {
    padding: 16px !important;
    border-radius: 14px !important;
  }

}

/* =====================================================
   📱 ZENIT MOBILE HOME
   ===================================================== */

.mobile-home {
  display: none;
}

@media (max-width: 768px) {

  .mobile-home {
    display: block;
    padding: 10px 4px 90px 4px;
  }

  /* header */
  .mh-header h2 {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .mh-header p {
    opacity: 0.7;
    margin-bottom: 18px;
  }

  /* hero button */
  .mh-hero {
    width: 100%;
    min-height: 64px;
    border-radius: 16px;
    border: none;
    background: #2563eb;
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    box-shadow: 0 14px 30px rgba(37,99,235,0.35);
  }

  .mh-hero:active {
    transform: scale(0.97);
  }

  /* grid */
  .mh-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* cards */
  .mh-card {
    background: white;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 16px;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    min-height: 90px;
  }

  .mh-card:active {
    transform: scale(0.96);
  }

  .mh-icon {
    font-size: 24px;
  }

}
/* =========================================
   📱 OCULTAR BOTTOM NAV (nuevo modelo)
========================================= */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

/* =========================================
   📱 FAB HOME — ZENIT
========================================= */

.fab-home {
  display: none;
}

@media (max-width: 768px) {

  .fab-home {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: #2563eb;
    color: white;
    font-size: 24px;
    box-shadow: 0 12px 30px rgba(37,99,235,0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .fab-home:active {
    transform: scale(0.92);
  }
}

/* =========================================
   📱 POS MOBILE PRO — SEARCH STICKY
========================================= */

@media (max-width: 768px) {

  #pos-search,
  .pos-search-container {
    position: sticky;
    top: 56px; /* debajo del appbar */
    z-index: 1200;
    background: white;
    padding-bottom: 8px;
  }

}

/* =========================================
   📱 POS MOBILE PRO — PRODUCT GRID
========================================= */

@media (max-width: 768px) {

  #grilla-productos-pos {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    padding-bottom: 80px;
  }

  /* cards más táctiles */
  #grilla-productos-pos > div {
    min-height: 110px;
    border-radius: 16px !important;
    padding: 14px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

}

/* =========================================
   📱 POS MOBILE PRO — QUICK TICKET
========================================= */

.btn-ticket-rapido {
  display: none;
}

@media (max-width: 768px) {

  .btn-ticket-rapido {
    width: 100%;
    margin: 8px 0 12px 0;
    min-height: 44px;
    border-radius: 12px;
    border: none;
    background: #0f172a;
    color: white;
    font-weight: 600;
  }

}

/* =========================================
   📱 POS MOBILE PRO — SELLER SPACING
========================================= */

@media (max-width: 768px) {

  #sec-pos {
    padding: 8px !important;
  }

  #sec-pos h2,
  #sec-pos h3 {
    margin-bottom: 10px;
  }

}
/* =====================================================
   📱 ZENIT POS — MOBILE FORCE OVERRIDE
   (pisa inline sin romper desktop)
===================================================== */

@media (max-width: 768px) {

  /* ===== BUSCADOR POS ===== */
  #pos-search {
    padding: 14px 16px 14px 44px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
  }

  /* ===== CATEGORÍAS EN FILA HORIZONTAL ===== */
  #pos-categorias-container {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }

  #pos-categorias-container button {
    min-width: 120px !important;
    border-radius: 999px !important;
    padding: 12px 16px !important;
  }

  /* ===== GRID PRODUCTOS MOBILE ===== */
  #grilla-productos-pos {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  #grilla-productos-pos > div {
    min-height: 110px !important;
    border-radius: 16px !important;
    padding: 12px !important;
  }

  /* ===== BOTÓN SIGUIENTES ===== */
  #btn-siguientes-productos,
  button[onclick*="siguientes"] {
    width: 100% !important;
    border-radius: 14px !important;
  }

}

/* =====================================================
   📱 ZENIT POS — MOBILE STRUCTURE OVERRIDE
   ESTE ES EL CAMBIO GRANDE
===================================================== */

@media (max-width: 768px) {

  /* 🔥 contenedor principal del POS */
  #sec-pos > div[style*="display: flex"] {
    flex-direction: column !important;
    height: auto !important;
    gap: 14px !important;
  }

  /* 🔥 panel productos */
  #sec-pos > div[style*="display: flex"] > div:first-child {
    width: 100% !important;
    flex: none !important;
  }

  /* 🔥 panel ticket */
  #sec-pos > div[style*="display: flex"] > div:last-child {
    width: 100% !important;
    flex: none !important;
    position: static !important;
    max-height: none !important;
  }

}

/* =====================================================
   ZENIT MOBILE V2 — CAPA AISLADA (NO ROMPE DESKTOP)
   ===================================================== */

/* Root mobile oculto por defecto */
.zenit-mobile-root {
  display: none;
}

/* Activar SOLO en mobile */
@media (max-width: 768px) {

  /* Ocultamos layout desktop */
  .app-layout {
    display: none !important;
  }

  /* Mostramos mobile */
  .zenit-mobile-root {
    display: block;
    height: 100vh;
    background: var(--bg-main);
  }

  .zenit-mobile {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }

  /* ================= APPBAR ================= */

  .zm-appbar {
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
  }

  .zm-title {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    color: var(--text-primary);
  }

  .zm-appbar button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
  }

  /* ================= CONTENT ================= */

  .zm-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 96px;
    background: var(--bg-main);
    transition: background 0.2s ease, padding 0.2s ease;
  }

  .zm-content.zm-on-home {
    padding: 0;
    background: #0a0f1e;
  }

  /* ================= BOTTOM NAV — isotipo único ================= */

  .zm-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: transparent;
    z-index: 1000;
    pointer-events: none;
    transition: background 0.3s ease;
  }

  .zm-bottom-nav.zm-nav-home {
    background: linear-gradient(to top, rgba(10,15,30,0.98) 60%, transparent);
  }

  @keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0   rgba(74,127,232,0.55), 0 0 22px rgba(74,127,232,0.2); }
    50%  { box-shadow: 0 0 0 7px rgba(74,127,232,0.08), 0 0 32px rgba(74,127,232,0.35); }
    100% { box-shadow: 0 0 0 0   rgba(74,127,232,0.55), 0 0 22px rgba(74,127,232,0.2); }
  }

  .zm-home-btn {
    pointer-events: all;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(13,27,62,0.92);
    border: 1px solid rgba(255,255,255,0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease;
    animation: pulse-ring 2.5s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
  }

  .zm-home-btn:active { transform: scale(0.92); }

  .zm-btn-shine {
    position: absolute;
    top: 0; left: 0;
    width: 45%; height: 100%;
    border-radius: 50%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
  }

  .zm-home-btn img {
    width: 30px; height: 30px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 1;
  }
}

/* =====================================================
   ZENIT MOBILE PLACEHOLDER (PROVISIONAL)
   ===================================================== */

.zm-placeholder {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid var(--border-color);
}

.zm-placeholder h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.zm-placeholder p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* =====================================================
   ZENIT MOBILE HOME — PREMIUM
   ===================================================== */

.zm-home {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ================= KPIs ================= */

.zm-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.zm-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.zm-kpi-card .label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 2px;
}

.zm-kpi-card .value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ================= HERO BUTTON ================= */

.zm-hero-sale {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: none;
  background: var(--text-primary);
  color: var(--bg-card);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.zm-hero-sale:active {
  transform: scale(0.98);
}

/* ================= QUICK GRID ================= */

.zm-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.zm-quick-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.zm-quick-card i {
  font-size: 1.1rem;
  opacity: 0.85;
}

.zm-quick-card:active {
  transform: scale(0.97);
}

/* ================= ACTIVITY ================= */

.zm-activity h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.zm-activity-empty {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* =====================================================
   POS MOBILE OPTIMIZATION (SOLO MOBILE)
   ===================================================== */

@media (max-width: 768px) {

  /* cuando el POS está en modo mobile */
  .zm-pos-mobile {
    padding: 0 !important;
  }

  /* contenedores internos más compactos */
  .zm-pos-mobile section,
  .zm-pos-mobile .card,
  .zm-pos-mobile .content-section {
    border-radius: 12px !important;
  }

  /* botones más tocables */
  .zm-pos-mobile button {
    min-height: 44px;
    font-size: 0.95rem;
  }

  /* inputs cómodos para pulgar */
  .zm-pos-mobile input,
  .zm-pos-mobile select {
    min-height: 42px;
    font-size: 16px; /* 👈 evita zoom en iOS */
  }

  /* tablas más respirables */
  .zm-pos-mobile table {
    font-size: 0.85rem;
  }

  /* mejorar área de ticket si existe */
  .zm-pos-mobile #lista-carrito {
    border-radius: 12px;
  }

}

/* =========================================
   UI PREMIUM: DATA GRID MASIVO
========================================= */
/* Contenedor relativo para el buscador */
.excel-search-wrapper {
    position: relative;
    display: inline-block;
    width: 300px;
}

/* El panel desplegable estilo Excel */
.excel-dropdown-panel {
    display: none; /* Oculto por defecto */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 5px;
    overflow: hidden;
    flex-direction: column;
}

/* Lista de checkboxes con scroll */
.excel-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.excel-checkbox-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9em;
    color: #2c3e50;
}

.excel-checkbox-item:hover {
    background: #f8f9fa;
}

.excel-checkbox-item input {
    margin-right: 10px;
    cursor: pointer;
}

/* Acciones del panel (Aplicar / Seleccionar Todo) */
.excel-dropdown-actions {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.btn-aplicar-excel {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.btn-aplicar-excel:hover { background: #2980b9; }

/* El Badge (Contador rojo) para el botón de Guardar */
.btn-guardar-masivo {
    position: relative;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    border: none !important;
    background: linear-gradient(135deg, #1a3a8a, #4a7fe8) !important;
    color: white !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
}
.btn-guardar-masivo:hover {
    filter: brightness(1.1) !important;
    opacity: 1 !important;
}

.badge-pendientes {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 0.75em;
    font-weight: bold;
    height: 20px;
    min-width: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.badge-pendientes.activo {
    opacity: 1;
    transform: scale(1);
}

/* 🔥 FIX 1: Eliminar contorno celeste de los checkboxes del Excel */
.check-item-excel, #check-todos-excel {
    outline: none !important;
    box-shadow: none !important;
    accent-color: #3498db; /* Color de tu marca */
}
.check-item-excel:focus, #check-todos-excel:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ===== ENCABEZADO TICKET ACTUAL ===== */
.ticket-header-navy {
    background: #0f172a; /* Azul Navy */
    color: #ffffff;      /* Letras blancas */
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
}

.badge-items-navy {
    background: #ffffff; /* Fondo blanco para contraste */
    color: #0f172a;      /* Número en Azul Navy */
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 800;
}

/* ===== VISOR DE IMÁGENES POS (EFECTO PREMIUM) ===== */
#pos-visor-imagen {
    position: fixed;
    bottom: 30px; /* Altura alineada con los botones inferiores */
    left: calc(60% - 100px); /* Centrado relativo en el canal entre las columnas */
    width: 200px;
    height: 200px;
    background: #ffffff;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid #eee;
    z-index: 10000;
    pointer-events: none; /* Previene bloqueos de clics accidentales en capas inferiores */
    
    /* Estado inicial oculto y desplazado */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#pos-visor-imagen.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#pos-visor-img-src {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Icono minimalista del ojo en la tarjeta del producto */
.icon-eye-preview {
    color: #95a5a6;
    cursor: pointer;
    font-size: 1.1em;
    transition: color 0.2s ease;
}

.icon-eye-preview:hover {
    color: #3498db;
}


/* =====================================================
   MERCADO PAGO — PANEL QR
   Tres estados: validar / esperando / validado
===================================================== */

/* Botón "Validar con QR" — estado inicial */
.mp-btn-validar {
    width: 100%;
    padding: 9px 14px;
    background: var(--color-principal, #3498db);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: filter 0.18s ease;
}

.mp-btn-validar:hover {
    filter: brightness(1.1);
}

/* Botón "Esperando validación..." — deshabilitado mientras llega el pago */
.mp-btn-esperando {
    width: 100%;
    padding: 9px 14px;
    background: #95a5a6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    opacity: 0.85;
}

/* Contenedor del QR: fondo blanco limpio con sombra suave */
#mp-qr-container {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    display: inline-flex;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

/* El canvas que genera qrcode.js */
#mp-qr-canvas canvas,
#mp-qr-canvas img {
    display: block;
    border-radius: 6px;
}

/* Botón "Cancelar" — rojo, debajo del QR */
.mp-btn-cancelar {
    width: 100%;
    padding: 7px 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.18s ease;
}

.mp-btn-cancelar:hover {
    background: #c0392b;
}

/* Ícono check del estado validado */
.mp-validado-check {
    animation: mpCheckPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes mpCheckPop {
    from { transform: scale(0.4); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* Transición suave al cambiar de sección dentro del panel */
#mp-estado-validar,
#mp-estado-esperando,
#mp-estado-ok {
    transition: opacity 0.2s ease;
}

/* =====================================================
   ZENIT MOBILE — CONCEPTO C "TILE PREMIUM"
   ===================================================== */

/* ===== BACKGROUND MOBILE ===== */
@media (max-width: 768px) {
  .zm-content { background: #f2f2f7; }
}

/* ===== APP BAR DINÁMICA ===== */
.zm-appbar-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: #111827;
  font-size: 1.05em;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  min-height: unset;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.zm-appbar-btn:active { background: rgba(0,0,0,0.07); }

/* ===== SECCIONES BASE ===== */
.zm-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 88px;
}

/* ===== SALUDO EN HOME ===== */
.zm-greeting {
  font-size: 1.2em;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
  padding: 2px 0 4px;
}

/* ===== TILES ===== */
.zm-tile {
  border: none;
  border-radius: 18px;
  cursor: pointer;
  display: flex;
  padding: 18px 20px;
  text-align: left;
  transition: transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.zm-tile:active { transform: scale(0.97); }

/* Tile héroe: ancho completo, oscuro */
.zm-tile-hero {
  width: 100%;
  min-height: 82px;
  background: #111827;
  color: #ffffff;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
}
.zm-tile-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.zm-tile-icon-sm {
  font-size: 1.3em;
  opacity: 0.8;
}
.zm-tile-arr {
  font-size: 0.85em;
  opacity: 0.35;
}

/* Tiles claros */
.zm-tile-light {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 114px;
}

/* Fila de tiles */
.zm-tile-row {
  display: flex;
  gap: 10px;
}
.zm-tile-row .zm-tile { flex: 1; }

/* Icono en tiles claros */
.zm-tile-icon {
  font-size: 1.5em;
  color: #111827;
  opacity: 0.75;
}

/* Textos de tiles */
.zm-tile-title {
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: inherit;
  display: block;
}
.zm-tile-hero .zm-tile-title {
  font-size: 1.02em;
  letter-spacing: -0.01em;
}
.zm-tile-sub {
  font-size: 0.68em;
  opacity: 0.4;
  font-weight: 400;
  margin-top: 2px;
}

/* ===== BARRA DE BÚSQUEDA ===== */
.zm-search-bar {
  position: sticky;
  top: 0;
  background: #f2f2f7;
  padding: 0 0 8px;
  z-index: 10;
}
.zm-search-inner {
  position: relative;
  display: flex;
  align-items: center;
}
.zm-search-inner > i {
  position: absolute;
  left: 12px;
  color: #a0a0a8;
  font-size: 0.85em;
  pointer-events: none;
}
.zm-search-inner input {
  width: 100%;
  padding: 11px 14px 11px 36px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  background: #e5e5ea;
  outline: none;
  color: #111827;
  min-height: unset;
  transition: background 0.15s, box-shadow 0.15s;
}
.zm-search-inner input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 1.5px #111827;
}

/* ===== ETIQUETA DE DÍA ===== */
.zm-day-label {
  font-size: 0.68em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #8e8e93;
  padding: 2px 0;
}

/* ===== LISTA DE CARDS ===== */
.zm-card-list {
  display: flex;
  flex-direction: column;
}

/* ===== CARD DE PRODUCTO ===== */
.zm-product-card {
  background: white;
  border-radius: 14px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.zm-product-card:active { transform: scale(0.98); }

.zm-product-img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #f2f2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  color: #c7c7cc;
  font-size: 1em;
}
.zm-product-img img { width: 100%; height: 100%; object-fit: cover; }
.zm-product-info { flex: 1; min-width: 0; }
.zm-prod-nombre {
  font-weight: 600;
  color: #111827;
  font-size: 0.88em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zm-prod-sku { font-size: 0.72em; color: #8e8e93; margin-top: 2px; }
.zm-prod-price { font-size: 0.92em; font-weight: 700; color: #111827; margin-top: 4px; }

/* ===== BADGES DE STOCK ===== */
.zm-stock-badge {
  font-size: 0.68em;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}
.zm-stock-ok  { background: #d1fae5; color: #065f46; }
.zm-stock-low { background: #fef3c7; color: #92400e; }
.zm-stock-out { background: #fee2e2; color: #991b1b; }

/* ===== CARD DE CLIENTE ===== */
.zm-client-card {
  background: white;
  border-radius: 14px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.zm-client-card:active { transform: scale(0.98); }
.zm-client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #111827;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82em;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}
.zm-client-info { flex: 1; min-width: 0; }
.zm-cli-nombre {
  font-weight: 600;
  color: #111827;
  font-size: 0.88em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zm-cli-sub { font-size: 0.73em; color: #8e8e93; margin-top: 3px; }
.zm-client-badge {
  font-size: 0.67em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  flex-shrink: 0;
}
.zm-cli-ok    { background: #d1fae5; color: #065f46; }
.zm-cli-block { background: #fee2e2; color: #991b1b; }

/* ===== CARD DE VENTA ===== */
.zm-venta-card {
  background: white;
  border-radius: 14px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
  margin-bottom: 8px;
}
.zm-venta-meta { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; min-width: 36px; }
.zm-venta-num { font-size: 0.75em; font-weight: 700; color: #111827; }
.zm-venta-hora { font-size: 0.68em; color: #8e8e93; margin-top: 1px; }
.zm-venta-mid { flex: 1; min-width: 0; }
.zm-venta-cliente {
  font-size: 0.86em;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zm-venta-vendedor { font-size: 0.7em; color: #8e8e93; margin-top: 2px; }
.zm-venta-total { font-size: 0.9em; font-weight: 700; color: #111827; flex-shrink: 0; }

/* ===== CARD DE MOVIMIENTO ===== */
.zm-mov-card {
  background: white;
  border-radius: 14px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
  margin-bottom: 8px;
}
.zm-mov-badge {
  font-size: 0.62em;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.zm-mov-ingreso   { background: #d1fae5; color: #065f46; }
.zm-mov-ajuste    { background: #e0e7ff; color: #3730a3; }
.zm-mov-eliminado { background: #fee2e2; color: #991b1b; }
.zm-mov-otro      { background: #f3f4f6; color: #374151; }
.zm-mov-info { flex: 1; min-width: 0; }
.zm-mov-desc {
  font-size: 0.84em;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zm-mov-meta-txt { font-size: 0.7em; color: #8e8e93; margin-top: 2px; }
.zm-mov-cant { font-size: 0.88em; font-weight: 700; color: #111827; flex-shrink: 0; }

/* ===== FAB ===== */
.zm-fab {
  position: fixed;
  bottom: 80px;
  right: 18px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #111827;
  color: white;
  border: none;
  font-size: 1.2em;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.zm-fab:active { transform: scale(0.9); }

/* ===== MENÚ MÁS (estilo iOS list) ===== */
.zm-mas-list {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}
.zm-mas-row {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid #f2f2f7;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  color: #111827;
  font-size: 0.88em;
  font-weight: 500;
  transition: background 0.12s;
  min-height: unset;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.zm-mas-row:last-child { border-bottom: none; }
.zm-mas-row:active { background: #f2f2f7; }
.zm-mas-row > i:first-child { width: 20px; text-align: center; opacity: 0.65; }
.zm-mas-row span { flex: 1; }
.zm-mas-arrow { opacity: 0.2; font-size: 0.78em; }

/* ===== ESTADO VACÍO ===== */
.zm-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 24px;
  color: #a0a0a8;
  font-size: 0.85em;
  font-weight: 500;
  text-align: center;
}
.zm-empty-state > i { font-size: 1.9em; opacity: 0.45; }

/* ===== MODAL CLIENTE EN MOBILE ===== */
@media (max-width: 768px) {
  #modal-perfil-cliente .modal-content {
    width: 96% !important;
    max-width: 96% !important;
    border-radius: 16px !important;
  }
  #perfil-grid {
    display: flex !important;
    flex-direction: column !important;
    max-height: 62vh !important;
    min-height: unset !important;
    overflow-y: auto;
  }
  #perfil-grid > div:first-child {
    border-right: none !important;
    border-bottom: 1px solid #f2f2f7;
  }
}


/* Lista de cards */
.zm-card-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ===== CARD DE PRODUCTO ===== */
.zm-product-card {
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 9px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.zm-product-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.zm-product-img {
  width: 50px;
  height: 50px;
  border-radius: 9px;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  color: #bdc3c7;
  font-size: 1.2em;
}
.zm-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.zm-product-info {
  flex: 1;
  min-width: 0;
}
.zm-prod-nombre {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.92em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zm-prod-sku {
  font-size: 0.75em;
  color: #95a5a6;
  margin-top: 2px;
}
.zm-prod-price {
  font-size: 1em;
  font-weight: 700;
  color: var(--color-principal, #2c3e50);
  margin-top: 4px;
}

/* ===== BADGES DE STOCK ===== */
.zm-stock-badge {
  font-size: 0.72em;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}
.zm-stock-ok  { background: #27ae6018; color: #27ae60; }
.zm-stock-low { background: #f39c1218; color: #e67e22; }
.zm-stock-out { background: #e74c3c18; color: #e74c3c; }

/* ===== CARD DE CLIENTE ===== */
.zm-client-card {
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 9px;
  cursor: pointer;
  transition: transform 0.15s;
}
.zm-client-card:active {
  transform: scale(0.98);
}
.zm-client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #34495e;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88em;
  flex-shrink: 0;
}
.zm-client-info {
  flex: 1;
  min-width: 0;
}
.zm-cli-nombre {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.92em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zm-cli-dni {
  font-size: 0.75em;
  color: #95a5a6;
  margin-top: 2px;
}
.zm-cli-tel {
  font-size: 0.78em;
  color: #7f8c8d;
  margin-top: 2px;
}
.zm-client-badge {
  font-size: 0.7em;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}
.zm-cli-ok    { background: #27ae6018; color: #27ae60; }
.zm-cli-block { background: #e74c3c18; color: #e74c3c; }

/* ===== FAB ===== */
.zm-fab {
  position: fixed;
  bottom: 76px;
  right: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #2c3e50;
  color: white;
  border: none;
  font-size: 1.35em;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: transform 0.18s, background 0.18s;
}
.zm-fab:active {
  transform: scale(0.9);
  background: #34495e;
}


/* =====================================================
   ZENIT MOBILE HOME — DISEÑO NAVY (MOCKUP V3)
   ===================================================== */

:root {
  --zm-bg:      #0d1b3e;
  --zm-surface: #152040;
  --zm-surf2:   #1a2a52;
  --zm-accent:  #4a7fe8;
  --zm-gold:    #f59e0b;
  --zm-green:   #10b981;
  --zm-red:     #f87171;
  --zm-text:    #f1f5f9;
  --zm-text3:   #4a6080;
  --zm-border:  rgba(255,255,255,0.07);
}

.zm-sec-dark {
  background: radial-gradient(ellipse at 30% 20%, #1a2a5e 0%, #0a0f1e 70%);
  min-height: 100%;
  padding-bottom: 104px;
  font-family: 'Poppins', sans-serif;
  gap: 0; /* override .zm-sec gap — el home maneja su propio spacing */
}

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

@keyframes shimmer {
  0%   { transform: translateX(-150%) skewX(-15deg); }
  100% { transform: translateX(350%)  skewX(-15deg); }
}

/* HEADER */
.zm-home-header {
  padding: 16px 24px 12px;
  display: flex; justify-content: space-between; align-items: center;
  animation: fadeUp 0.3s ease both;
}
.zm-logo-wrap { display: flex; align-items: center; gap: 10px; }
.zm-logo-img { width: 36px; height: 36px; object-fit: contain; filter: brightness(0) invert(1); }
.zm-logo-text { font-size: 20px; font-weight: 700; color: var(--zm-text); font-family: 'Poppins', sans-serif; line-height: 1; }
.zm-logo-text span { font-weight: 300; font-size: 10px; color: var(--zm-text3); display: block; letter-spacing: 2px; text-transform: uppercase; margin-top: 1px; }
.zm-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--zm-accent), #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: white;
  box-shadow: 0 0 16px rgba(74,127,232,0.3); font-family: 'Poppins', sans-serif;
}

/* SALUDO */
.zm-greeting-block { padding: 0 24px 18px; animation: fadeUp 0.4s 0.03s ease both; }
.zm-greeting-sub { font-size: 11px; color: var(--zm-text3); font-weight: 400; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1.5px; font-family: 'Poppins', sans-serif; }
.zm-greeting-name { font-size: 24px; font-weight: 700; color: var(--zm-text); line-height: 1.15; font-family: 'Poppins', sans-serif; }

/* STATS STRIP */
.zm-stats-strip {
  margin: 0 24px 20px; background: var(--zm-surface); border-radius: 20px;
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--zm-border); position: relative; overflow: hidden;
  animation: fadeUp 0.4s 0.06s ease both;
}
.zm-stats-strip::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--zm-accent), transparent); opacity: 0.6;
}
.zm-stat-item { text-align: center; }
.zm-stat-value { font-size: 18px; font-weight: 700; color: var(--zm-text); line-height: 1; margin-bottom: 4px; font-family: 'Poppins', sans-serif; }
.zm-stat-value.green { color: var(--zm-green); }
.zm-stat-value.gold  { color: var(--zm-gold); }
.zm-stat-value.red   { color: var(--zm-red); }
.zm-stat-label { font-size: 10px; color: var(--zm-text3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; font-family: 'Poppins', sans-serif; }
.zm-stat-divider { width: 1px; height: 36px; background: var(--zm-border); }

/* MAIN ACTION */
.zm-main-action {
  margin: 0 24px 20px;
  background: linear-gradient(135deg, #1a3a8a 0%, #2d5fc4 45%, #4a7fe8 100%);
  border-radius: 24px; padding: 22px 24px; position: relative; overflow: hidden;
  cursor: pointer; transition: transform 0.15s ease;
  box-shadow: 0 8px 32px rgba(45,95,196,0.4), 0 0 0 1px rgba(255,255,255,0.08);
  animation: fadeUp 0.4s 0.1s ease both; -webkit-tap-highlight-color: transparent;
  min-height: 130px; display: flex; flex-direction: column; justify-content: center;
}
.zm-main-action:active { transform: scale(0.97); }
.zm-shine {
  position: absolute; top: 0; left: 0; width: 35%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  animation: shimmer 3.5s ease-in-out infinite; pointer-events: none;
}
.zm-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.zm-orb1 { top: -30px; right: -20px; width: 110px; height: 110px; background: rgba(255,255,255,0.07); }
.zm-orb2 { bottom: -25px; right: 70px; width: 70px; height: 70px; background: rgba(255,255,255,0.04); }
.zm-action-label { font-size: 10px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 6px; font-weight: 500; font-family: 'Poppins', sans-serif; }
.zm-action-title { font-size: 28px; font-weight: 800; color: white; line-height: 1; margin-bottom: 8px; letter-spacing: -0.5px; font-family: 'Poppins', sans-serif; }
.zm-action-sub { font-size: 12px; color: rgba(255,255,255,0.55); font-weight: 400; font-family: 'Poppins', sans-serif; }
.zm-action-arrow {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; background: rgba(255,255,255,0.12); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 16px; color: white;
  border: 1px solid rgba(255,255,255,0.15);
}

/* MODULES */
.zm-section-title { padding: 0 24px 12px; font-size: 11px; font-weight: 600; color: var(--zm-text3); text-transform: uppercase; letter-spacing: 2px; font-family: 'Poppins', sans-serif; animation: fadeUp 0.4s 0.15s ease both; }
.zm-modules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 24px 24px; animation: fadeUp 0.4s 0.2s ease both; }
.zm-module-card {
  background: var(--zm-surface); border-radius: 20px; padding: 18px 16px;
  border: 1px solid var(--zm-border); cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  position: relative; overflow: hidden; min-height: 108px;
  display: flex; flex-direction: column; justify-content: space-between;
  -webkit-tap-highlight-color: transparent;
}
.zm-module-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); }
.zm-module-card:active { transform: scale(0.96); background: var(--zm-surf2); }
.zm-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.zm-card-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.zm-card-icon.blue   { background: rgba(74,127,232,0.15); color: #4a7fe8; }
.zm-card-icon.green  { background: rgba(16,185,129,0.15); color: #10b981; }
.zm-card-icon.gold   { background: rgba(245,158,11,0.15); color: #f59e0b; }
.zm-card-icon.purple { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.zm-card-name { font-size: 14px; font-weight: 700; color: var(--zm-text); font-family: 'Poppins', sans-serif; margin-bottom: 2px; }
.zm-card-detail { font-size: 10px; color: var(--zm-text3); font-family: 'Poppins', sans-serif; }
.zm-card-badge-mod { font-size: 9px; font-weight: 600; padding: 3px 7px; border-radius: 20px; white-space: nowrap; }
.zm-card-badge-mod.gold-b { background: rgba(245,158,11,0.12); color: var(--zm-gold); border: 1px solid rgba(245,158,11,0.2); }
.zm-card-badge-mod.red-b  { background: rgba(248,113,113,0.12); color: var(--zm-red); border: 1px solid rgba(248,113,113,0.2); }

/* DESKTOP NOTICE */
.zm-desktop-notice {
  background: var(--zm-surface); border: 1px solid var(--zm-border); border-radius: 16px;
  padding: 20px 18px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 10px; margin-bottom: 12px;
  color: var(--zm-text3); font-family: 'Poppins', sans-serif; font-size: 13px;
}
.zm-desktop-notice i { font-size: 2em; color: var(--zm-accent); opacity: 0.7; }

/* =====================================================
   ZNV — NUEVA VENTA (módulo mobile)
   Namespace: .znv-* para no colisionar con .zm-*
   ===================================================== */

.znv-sec {
  background: #0d1b3e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', sans-serif;
  color: #e2e8f0;
  position: relative;
}

/* TOP NAV */
.znv-top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,27,62,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(74,127,232,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.znv-back-btn {
  background: linear-gradient(135deg, #1a3a8a, #4a7fe8) !important;
  border: none !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  min-height: unset !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff !important;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(74,127,232,0.4) !important;
  box-sizing: border-box;
  transform: none !important;
  opacity: 1;
}
.znv-back-btn:hover { background: linear-gradient(135deg, #1a3a8a, #4a7fe8) !important; color: #fff !important; transform: none !important; opacity: 1; }
.znv-back-btn:active { opacity: 0.85 !important; transform: none !important; }
.znv-nav-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}
.znv-nav-badge {
  background: #4a7fe8;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  min-width: 28px;
  text-align: center;
}

/* SCROLL CONTAINER */
.znv-screen {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 120px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* SEARCH SECTION */
.znv-search-section { display: flex; flex-direction: column; gap: 10px; }
.znv-search-wrap { display: flex; gap: 8px; align-items: center; }
.znv-search-input-wrap {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(74,127,232,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}
.znv-search-input-wrap i { color: rgba(226,232,240,0.4); font-size: 14px; }
.znv-search-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  padding: 11px 0;
}
.znv-search-input-wrap input::placeholder { color: rgba(226,232,240,0.35); }
.znv-scanner-btn {
  background: rgba(74,127,232,0.15) !important;
  border: 1px solid rgba(74,127,232,0.3) !important;
  border-radius: 12px !important;
  width: 44px !important;
  height: 44px !important;
  min-height: unset !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: #4a7fe8 !important;
  box-sizing: border-box;
}
.znv-scanner-btn:hover { background: rgba(74,127,232,0.15) !important; color: #4a7fe8 !important; transform: none !important; opacity: 1; }
.znv-scanner-btn:active { background: rgba(74,127,232,0.3) !important; }

/* CHIPS CATEGORÍAS */
.znv-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.znv-chips-row::-webkit-scrollbar { display: none; }
.znv-chip {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 20px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 500;
  color: rgba(226,232,240,0.7) !important;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: unset !important;
  box-sizing: border-box;
}
/* active = clase que pone el JS; activo = clase alternativa */
.znv-chip.active,
.znv-chip.activo {
  background: rgba(74,127,232,0.25) !important;
  border-color: rgba(74,127,232,0.5) !important;
  color: #4a7fe8 !important;
  font-weight: 600;
}
.znv-chip:hover { background: rgba(74,127,232,0.1) !important; color: rgba(226,232,240,0.9) !important; transform: none !important; opacity: 1; }

/* ETIQUETA DE SECCIÓN */
.znv-section-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(226,232,240,0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: -6px;
}

/* GRID DE PRODUCTOS */
.znv-productos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.znv-prod-card {
  background: rgba(21,32,64,0.8);
  border: 1px solid rgba(74,127,232,0.12);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, transform 0.15s;
}
.znv-prod-card.selected { border: 1px solid #4a7fe8; background: rgba(74,127,232,0.08); }
.znv-prod-card:active { transform: scale(0.97); }
.znv-prod-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: rgba(255,255,255,0.04); }
.znv-prod-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  font-size: 28px;
  color: rgba(226,232,240,0.2);
}
.znv-prod-body { padding: 8px 9px 10px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.znv-prod-name {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.znv-prod-sku { font-size: 10px; color: rgba(226,232,240,0.35); }
.znv-prod-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.znv-prod-price { font-size: 13px; font-weight: 700; color: #4a7fe8; }
.znv-prod-add {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #4a7fe8;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.2s;
  flex-shrink: 0;
}
.znv-prod-add:hover { background: #4a7fe8 !important; color: #fff !important; transform: none !important; }
.znv-prod-add:active { background: #2563eb !important; }
.znv-prod-actions { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.znv-prod-check {
  width: 26px !important; height: 26px !important; min-height: unset !important;
  padding: 0 !important; border-radius: 8px !important; border: none !important;
  background: #10b981 !important; color: #fff !important; font-size: 13px !important;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  cursor: default; flex-shrink: 0; box-sizing: border-box;
}
.znv-prod-check:hover { background: #10b981 !important; color: #fff !important; transform: none !important; opacity: 1; }
.znv-prod-remove {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 24px !important; height: 24px !important; min-height: unset !important;
  padding: 0 !important; border-radius: 6px !important;
  border: 1px solid rgba(248,113,113,0.35) !important;
  background: rgba(13,27,62,0.85) !important; color: #f87171 !important;
  font-size: 11px !important; font-weight: 700; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
  box-sizing: border-box; z-index: 2;
}
.znv-prod-remove:hover { background: rgba(248,113,113,0.2) !important; color: #f87171 !important; transform: none !important; opacity: 1; }
.znv-prod-remove:active { background: rgba(248,113,113,0.4) !important; }
.znv-prod-stock-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 20px;
  background: rgba(248,113,113,0.15);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.2);
}
.znv-prod-stock-badge.ok { background: rgba(16,185,129,0.12); color: #34d399; border-color: rgba(16,185,129,0.2); }
.znv-empty { grid-column: 1/-1; text-align: center; padding: 40px 20px; color: rgba(226,232,240,0.3); font-size: 13px; }

/* DIVISOR */
.znv-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(74,127,232,0.2), transparent); margin: 2px 0; }

/* CARRITO */
#znv-carrito-section { display: flex; flex-direction: column; gap: 10px; }
.znv-carrito-item {
  background: rgba(21,32,64,0.8);
  border: 1px solid rgba(74,127,232,0.12);
  border-radius: 12px;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Emoji icono del producto */
.znv-item-emoji { font-size: 22px; flex-shrink: 0; }
/* Bloque de nombre + precio — crece y puede hacer wrap */
.znv-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.znv-item-name { font-size: 13px; font-weight: 500; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.znv-item-price { font-size: 11px; color: rgba(226,232,240,0.45); }
/* Total del ítem */
.znv-item-total { font-size: 13px; font-weight: 700; color: #4a7fe8; white-space: nowrap; flex-shrink: 0; min-width: 52px; text-align: right; }
/* Aliases por si hay HTML legacy */
.znv-item-nombre { flex: 1; font-size: 13px; font-weight: 500; color: #e2e8f0; }
.znv-item-precio { font-size: 12px; color: rgba(226,232,240,0.5); margin-top: 2px; }
.znv-item-sub { font-size: 13px; font-weight: 700; color: #4a7fe8; white-space: nowrap; }
.znv-qty-ctrl { display: flex; align-items: center; gap: 6px; background: transparent; padding: 2px 0; flex-shrink: 0; }
.znv-qty-btn {
  width: 26px !important;
  height: 26px !important;
  min-height: unset !important;
  padding: 0 !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8 !important;
  background: #1a2a52 !important;
  box-sizing: border-box;
  transform: none !important;
  opacity: 1;
}
.znv-qty-btn:hover { background: #1a2a52 !important; color: #94a3b8 !important; transform: none !important; opacity: 1; }
.znv-qty-btn:active { background: #223266 !important; color: #94a3b8 !important; }
.znv-qty-num { font-size: 14px; font-weight: 700; color: #fff; min-width: 20px; text-align: center; }

/* CLIENTE */
.znv-cliente-section { display: flex; flex-direction: column; gap: 8px; }
.znv-cliente-card {
  background: rgba(21,32,64,0.8);
  border: 1px solid rgba(74,127,232,0.12);
  border-radius: 14px;
  padding: 14px;
}
.znv-cliente-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.znv-cliente-title { font-size: 12px; font-weight: 600; color: rgba(226,232,240,0.5); text-transform: uppercase; letter-spacing: 0.6px; }
.znv-cliente-link { font-size: 12px; color: #4a7fe8; cursor: pointer; }
.znv-sin-cliente { display: flex; align-items: center; gap: 10px; color: rgba(226,232,240,0.4); font-size: 13px; cursor: pointer; }
.znv-sin-cliente i { font-size: 22px; }
.znv-cliente-info { display: flex; align-items: center; gap: 10px; }
.znv-cli-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a7fe8, #6c5ce7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.znv-cli-nombre { font-size: 14px; font-weight: 600; color: #e2e8f0; }
.znv-cli-dni { font-size: 11px; color: rgba(226,232,240,0.4); }

/* MÉTODO DE PAGO */
.znv-pago-section { display: flex; flex-direction: column; gap: 8px; }
.znv-pago-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.znv-pago-opt {
  background: rgba(21,32,64,0.8);
  border: 1px solid rgba(74,127,232,0.12);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.znv-pago-opt i { font-size: 20px; color: rgba(226,232,240,0.5); transition: color 0.2s; }
.znv-pago-opt span { font-size: 11px; font-weight: 600; color: rgba(226,232,240,0.5); transition: color 0.2s; }
.znv-pago-opt.activo { border-color: rgba(74,127,232,0.5); background: rgba(74,127,232,0.12); }
.znv-pago-opt.activo i, .znv-pago-opt.activo span { color: #4a7fe8; }

/* RESUMEN */
.znv-resumen-section { display: flex; flex-direction: column; gap: 8px; }
.znv-resumen-card {
  background: rgba(21,32,64,0.8);
  border: 1px solid rgba(74,127,232,0.12);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.znv-resumen-row { display: flex; justify-content: space-between; align-items: center; }
.znv-resumen-label { font-size: 13px; color: rgba(226,232,240,0.5); }
.znv-resumen-val { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.znv-resumen-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 2px 0; }
.znv-total-row { display: flex; justify-content: space-between; align-items: center; }
.znv-total-label { font-size: 15px; font-weight: 700; color: #e2e8f0; }
.znv-total-val { font-size: 20px; font-weight: 800; color: #4a7fe8; }

/* IVA TOGGLE */
.znv-toggle-row { display: flex; align-items: center; justify-content: space-between; }
.znv-toggle-label { font-size: 13px; color: rgba(226,232,240,0.5); }
.znv-toggle { position: relative; display: inline-block; width: 38px; height: 22px; }
.znv-toggle input { opacity: 0; width: 0; height: 0; }
.znv-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}
.znv-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}
.znv-toggle input:checked + .znv-toggle-slider { background: #4a7fe8; }
.znv-toggle input:checked + .znv-toggle-slider::before { transform: translateX(16px); }

/* BOTTOM BAR FIJO */
.znv-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(10,15,30,0.98) 30%);
  z-index: 90;
}
.znv-confirm-btn {
  width: 100%;
  padding: 16px !important;
  min-height: unset !important;
  border: none !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #1a3a8a, #4a7fe8) !important;
  color: #fff !important;
  font-family: 'Poppins', sans-serif;
  font-size: 15px !important;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(74,127,232,0.4);
  transition: opacity 0.2s, transform 0.15s;
}
.znv-confirm-btn:hover { background: linear-gradient(135deg, #1a3a8a, #4a7fe8) !important; color: #fff !important; transform: none !important; opacity: 1; }
.znv-confirm-btn .znv-shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}
.znv-confirm-btn:disabled {
  background: rgba(255,255,255,0.08);
  color: rgba(226,232,240,0.3);
  box-shadow: none;
  cursor: not-allowed;
}
.znv-confirm-btn:disabled .znv-shine { display: none; }
.znv-confirm-btn:not(:disabled):active { transform: scale(0.98); }
.znv-confirm-total { font-size: 13px; font-weight: 600; opacity: 0.85; }

/* SCANNER OVERLAY */
.znv-scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.znv-scanner-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0.8), transparent);
  display: flex;
  align-items: center;
  gap: 12px;
}
.znv-scanner-title { color: #fff; font-size: 16px; font-weight: 600; font-family: 'Poppins', sans-serif; }
#znv-scanner-video { width: 100%; height: 100%; object-fit: cover; display: block; }
#znv-scanner-canvas { display: none; }
.znv-scanner-frame-wrap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  pointer-events: none;
}
.znv-scanner-frame {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(74,127,232,0.7);
  border-radius: 20px;
  position: relative;
  box-shadow: 0 0 0 1000px rgba(0,0,0,0.45);
}
.znv-scanner-line {
  position: absolute;
  left: 10px; right: 10px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4a7fe8, transparent);
  animation: scan-line 2s ease-in-out infinite;
}
@keyframes scan-line {
  0%, 100% { top: 20%; }
  50% { top: 80%; }
}
.znv-scanner-hint {
  position: absolute;
  bottom: 40px; left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
}
.znv-scanner-close {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: 50px;
  cursor: pointer;
}

/* MODAL CLIENTE */
.znv-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: flex-end;
}
.znv-modal-inner {
  background: #152040;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 1px solid rgba(74,127,232,0.2);
}
.znv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.znv-modal-title { font-size: 16px; font-weight: 700; color: #e2e8f0; font-family: 'Poppins', sans-serif; }
.znv-modal-close {
  background: rgba(255,255,255,0.08);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #e2e8f0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.znv-modal-search { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.znv-modal-search input {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(74,127,232,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e2e8f0;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.znv-modal-search input::placeholder { color: rgba(226,232,240,0.35); }
.znv-modal-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.znv-cli-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; cursor: pointer; transition: background 0.15s; }
.znv-cli-row:active { background: rgba(74,127,232,0.08); }
.znv-cli-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a7fe8, #6c5ce7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.znv-cli-nombre { font-size: 14px; font-weight: 600; color: #e2e8f0; }
.znv-cli-dni { font-size: 12px; color: rgba(226,232,240,0.4); }

/* =====================================================
   ZNV — MODAL DE PAGO PARCIAL/MÚLTIPLE
   ===================================================== */
.znv-pago-modal-inner {
  max-height: 75vh;
}
.znv-pago-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 8px;
  gap: 10px;
}
.znv-pago-modal-icono { font-size: 36px; }
.znv-pago-pendiente-label { font-size: 11px; color: rgba(226,232,240,0.45); text-transform: uppercase; letter-spacing: 0.6px; }
.znv-pago-pendiente-monto { font-size: 28px; font-weight: 800; color: #4a7fe8; }
.znv-pago-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(74,127,232,0.3);
  border-radius: 14px;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
  gap: 6px;
}
.znv-pago-currency { font-size: 18px; font-weight: 700; color: rgba(226,232,240,0.5); }
.znv-pago-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  padding: 14px 0;
  width: 100%;
  min-height: unset !important;
}
.znv-pago-shortcuts {
  display: flex;
  gap: 8px;
  width: 100%;
}
.znv-pago-short-btn {
  flex: 1;
  padding: 10px !important;
  min-height: unset !important;
  background: rgba(74,127,232,0.12) !important;
  border: 1px solid rgba(74,127,232,0.25) !important;
  border-radius: 10px !important;
  color: #4a7fe8 !important;
  font-family: 'Poppins', sans-serif;
  font-size: 13px !important;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.znv-pago-short-btn:hover { background: rgba(74,127,232,0.22) !important; transform: none !important; opacity: 1; }
.znv-pago-short-btn:active { background: rgba(74,127,232,0.35) !important; }
/* Lista de pagos dentro del modal */
.znv-pago-lista-wrap {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.znv-pago-lista-titulo { font-size: 11px; color: rgba(226,232,240,0.4); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 4px; }
.znv-pago-lista-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: #e2e8f0;
}
.znv-pago-lista-row span:first-child { flex: 1; }
.znv-pago-del-btn {
  background: transparent !important;
  border: none !important;
  color: rgba(248,113,113,0.7) !important;
  font-size: 14px !important;
  min-height: unset !important;
  padding: 2px 4px !important;
  cursor: pointer;
  border-radius: 4px !important;
}
.znv-pago-del-btn:hover { color: #f87171 !important; background: rgba(248,113,113,0.1) !important; transform: none !important; opacity: 1; }
/* Footer del modal */
.znv-pago-modal-footer { padding: 12px 20px 20px; }
/* Tags de pagos ingresados bajo la grilla de métodos */
#znv-pagos-ingresados {
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.znv-pago-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(74,127,232,0.1);
  border: 1px solid rgba(74,127,232,0.25);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: #e2e8f0;
}
.znv-pago-tag-del {
  background: transparent !important;
  border: none !important;
  color: rgba(248,113,113,0.7) !important;
  font-size: 13px !important;
  min-height: unset !important;
  padding: 2px 6px !important;
  cursor: pointer;
  border-radius: 4px !important;
}
.znv-pago-tag-del:hover { color: #f87171 !important; background: rgba(248,113,113,0.1) !important; transform: none !important; opacity: 1; }
/* Borde azul en método activo (con pagos ingresados) */
.znv-pago-opt.activo {
  border-color: #4a7fe8 !important;
  background: rgba(74,127,232,0.12) !important;
}
.znv-pago-opt.activo .znv-pago-icon,
.znv-pago-opt.activo .znv-pago-label { color: #4a7fe8; }


/* ══════════════════════════════════════════════════════
   MÓDULO VENTAS — HISTORIAL (zh-*)
   Prefijo: zh-  (ventas-historial)
   Navy design: --bg:#0d1b3e  --surface:#152040  --surface2:#1a2a52
   --accent:#4a7fe8  --green:#10b981  --purple:#a78bfa
   ══════════════════════════════════════════════════════ */

/* Contenedor raíz */
.zh-sec {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #0d1b3e;
}

/* ── Top Nav ── */
.zh-top-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  background: #0d1b3e;
}
.zh-nav-back {
  width: 36px !important;
  height: 36px !important;
  min-height: unset !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  color: white !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  box-shadow: 0 4px 12px rgba(74,127,232,0.4) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}
.zh-nav-back:hover { transform: none !important; opacity: 0.9 !important; }
.zh-nav-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zh-nav-cal-btn {
  width: 36px !important;
  height: 36px !important;
  min-height: unset !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #152040 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  position: relative !important;
  flex-shrink: 0 !important;
}
.zh-nav-cal-btn:hover { background: #1a2a52 !important; transform: none !important; }
.zh-nav-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #0d1b3e;
}

/* ── Scrollable screen wrapper ── */
#zh-screen-historial {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
}
#zh-screen-historial::-webkit-scrollbar { display: none; }

#zh-screen-detalle {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0d1b3e;
}

/* ── Período strip ── */
.zh-periodo-strip {
  margin: 14px 16px 0;
  background: linear-gradient(135deg,#1a3a8a 0%,#2d5fc4 50%,#4a7fe8 100%);
  border-radius: 20px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(45,95,196,0.35);
  flex-shrink: 0;
}
.zh-periodo-strip::before {
  content: '';
  position: absolute; top: -20px; right: -20px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
@keyframes zh-shimmer {
  0%   { transform: translateX(-150%) skewX(-15deg); }
  100% { transform: translateX(350%)  skewX(-15deg); }
}
.zh-shine {
  position: absolute; top: 0; left: 0;
  width: 30%; height: 100%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.1),transparent);
  animation: zh-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
.zh-periodo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.zh-periodo-label {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.zh-periodo-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 11px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.zh-periodo-total {
  font-size: 28px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
}
.zh-periodo-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}
.zh-periodo-stats {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.zh-pstat { display: flex; }
.zh-pstat-num {
  font-size: 16px;
  font-weight: 700;
  color: white;
}
.zh-pstat-lbl {
  font-size: 9px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.zh-stat-sep {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* ── Search + chips row ── */
.zh-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 10px;
  flex-shrink: 0;
}
.zh-search-wrap {
  flex: 2;
  position: relative;
}
.zh-search-ico {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}
.zh-search-wrap input {
  width: 100%;
  background: #152040 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 14px !important;
  padding: 10px 12px 10px 36px !important;
  font-size: 12px !important;
  color: #f1f5f9 !important;
  font-family: 'Poppins', sans-serif !important;
  outline: none !important;
  min-height: unset !important;
}
.zh-search-wrap input::placeholder { color: #4a6080; }
.zh-chips-wrap {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.zh-chips-wrap::-webkit-scrollbar { display: none; }
.zh-chip {
  padding: 10px 12px !important;
  border-radius: 24px !important;
  white-space: nowrap !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #4a6080 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: unset !important;
  line-height: 1 !important;
  font-family: 'Poppins', sans-serif !important;
}
.zh-chip:hover { transform: none !important; }
.zh-chip.zh-active,
.zh-chip[data-active="1"] {
  background: #4a7fe8 !important;
  border-color: #4a7fe8 !important;
  color: white !important;
}
.zh-chip.zh-green.zh-active,
.zh-chip.zh-green[data-active="1"] {
  background: rgba(16,185,129,0.2) !important;
  border-color: rgba(16,185,129,0.4) !important;
  color: #10b981 !important;
}
.zh-chip.zh-purple.zh-active,
.zh-chip.zh-purple[data-active="1"] {
  background: rgba(167,139,250,0.2) !important;
  border-color: rgba(167,139,250,0.4) !important;
  color: #a78bfa !important;
}

/* ── List header ── */
.zh-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 8px;
  flex-shrink: 0;
}
.zh-list-label {
  font-size: 10px;
  font-weight: 600;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.zh-list-count {
  font-size: 11px;
  color: #4a6080;
}

/* ── Lista de ventas ── */
.zh-ventas-list {
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* ── Venta row card ── */
.zh-venta-row {
  background: #152040;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.zh-venta-row:active { transform: scale(0.98); background: #1a2a52; }
.zh-venta-row::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.06),transparent);
}
/* Borde izquierdo por estado */
.zh-venta-row::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 16px 0 0 16px;
}
.zh-venta-row.completada::before,
.zh-venta-row.pagada::before    { background: #10b981; }
.zh-venta-row.nota_credito::before { background: #a78bfa; }

.zh-venta-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 7px;
}
.zh-venta-num {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}
.zh-venta-monto {
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.3px;
}
.zh-venta-monto.nc { color: #a78bfa; }

.zh-venta-mid {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}
.zh-venta-cliente { font-size: 11px; color: #94a3b8; font-weight: 500; }
.zh-venta-sep     { font-size: 10px; color: #4a6080; }
.zh-venta-fecha   { font-size: 11px; color: #4a6080; }

.zh-venta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.zh-venta-items { font-size: 10px; color: #4a6080; }

.zh-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
}
.zh-badge.completada,
.zh-badge.pagada {
  background: rgba(16,185,129,0.12);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.2);
}
.zh-badge.nota_credito {
  background: rgba(167,139,250,0.12);
  color: #a78bfa;
  border: 1px solid rgba(167,139,250,0.2);
}

/* ── Empty / Loading ── */
.zh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: #4a6080;
  font-size: 13px;
}
.zh-empty i { font-size: 28px; }

/* ══════════════════════════════════════
   DETALLE DE VENTA
   ══════════════════════════════════════ */
.zh-det-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-bottom: 32px;
  background: #0d1b3e;
}
.zh-det-body::-webkit-scrollbar { display: none; }

/* Estado hero */
.zh-det-estado-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 16px 0;
}
.zh-det-estado-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}
.zh-det-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.zh-det-dot.completada,
.zh-det-dot.pagada    { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.6); }
.zh-det-dot.nota_credito { background: #a78bfa; box-shadow: 0 0 6px rgba(167,139,250,0.6); }

.zh-det-estado-txt {
  font-size: 13px;
  font-weight: 600;
}
.zh-det-estado-txt.completada,
.zh-det-estado-txt.pagada    { color: #10b981; }
.zh-det-estado-txt.nota_credito { color: #a78bfa; }
.zh-det-fecha-txt {
  font-size: 11px;
  color: #4a6080;
}

/* Monto hero */
.zh-det-monto-wrap {
  margin: 10px 16px 0;
}
.zh-det-monto {
  font-size: 34px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -1px;
  line-height: 1;
}
.zh-det-monto.nc { color: #a78bfa; }
.zh-det-monto-sub {
  font-size: 11px;
  color: #4a6080;
  margin-top: 3px;
}

/* Card genérica */
.zh-det-card {
  margin: 12px 16px 0;
  background: #152040;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
}
.zh-det-card-title {
  font-size: 9px;
  font-weight: 600;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 12px 14px 0;
  margin-bottom: 10px;
}

/* Cliente */
.zh-det-cliente-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 14px;
}
.zh-det-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg,#2d5fc4,#6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.zh-det-cli-nombre {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}
.zh-det-cli-sub {
  font-size: 10px;
  color: #4a6080;
  margin-top: 2px;
}

/* Productos list */
.zh-det-prod-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.zh-det-prod-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #1a2a52;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.zh-det-prod-info { flex: 1; min-width: 0; }
.zh-det-prod-nom {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zh-det-prod-sku { font-size: 10px; color: #4a6080; }
.zh-det-prod-total {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  flex-shrink: 0;
}

/* Totales dentro de productos */
.zh-det-total-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.zh-det-total-lbl { font-size: 11px; color: #4a6080; }
.zh-det-total-val { font-size: 11px; color: #f1f5f9; font-weight: 600; }
.zh-det-grand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(135deg,rgba(74,127,232,0.08),rgba(74,127,232,0.04));
  border-top: 1px solid rgba(74,127,232,0.15);
}
.zh-det-grand-lbl { font-size: 13px; font-weight: 600; color: #94a3b8; }
.zh-det-grand-val { font-size: 18px; font-weight: 800; color: #f1f5f9; letter-spacing: -0.3px; }

/* Grid pago + comprobante */
.zh-det-grid {
  margin: 12px 16px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.zh-det-grid-card {
  background: #152040;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 12px 14px;
}
.zh-det-grid-title {
  font-size: 9px;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-bottom: 6px;
}
.zh-det-grid-ico  { font-size: 14px; margin-bottom: 2px; }
.zh-det-grid-val  { font-size: 12px; font-weight: 700; color: #f1f5f9; }

/* Botones NC + Email */
.zh-det-actions {
  margin: 14px 16px 0;
}
.zh-btn-nc {
  width: 100% !important;
  padding: 14px !important;
  background: rgba(167,139,250,0.1) !important;
  border: 1px solid rgba(167,139,250,0.25) !important;
  border-radius: 16px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #a78bfa !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
  min-height: unset !important;
}
.zh-btn-nc:hover  { background: rgba(167,139,250,0.18) !important; transform: none !important; }
.zh-btn-nc:active { transform: scale(0.98) !important; }

.zh-btn-email {
  width: 100% !important;
  padding: 14px !important;
  background: rgba(74,127,232,0.08) !important;
  border: 1px solid rgba(74,127,232,0.2) !important;
  border-radius: 16px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #6b9bf0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: unset !important;
}
.zh-btn-email:hover  { background: rgba(74,127,232,0.14) !important; transform: none !important; }
.zh-btn-email:active { transform: scale(0.98) !important; }

/* disabled estado NC */
.zh-btn-nc.disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* ── Modal período (bottom sheet) ── */
.zh-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.55) !important;
  z-index: 9999 !important;
  align-items: flex-end;
  justify-content: center;
  /* display lo maneja el JS con style="display:none/flex" */
}
.zh-modal-sheet {
  background: #152040;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 12px 20px 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
.zh-modal-handle {
  width: 40px; height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.15);
  margin: 0 auto 18px;
}
.zh-modal-titulo {
  font-size: 13px;
  font-weight: 600;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

/* Opciones de período */
.zh-periodo-opt {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  min-height: unset !important;
  margin-bottom: 4px !important;
  transition: background 0.15s !important;
  color: #f1f5f9 !important;
}
.zh-periodo-opt:hover { background: rgba(255,255,255,0.05) !important; transform: none !important; }
.zh-periodo-opt:active { background: rgba(255,255,255,0.08) !important; transform: none !important; }
.zh-periodo-opt.activo { background: rgba(74,127,232,0.12) !important; }

.zh-periodo-opt-ico {
  font-size: 18px;
  flex-shrink: 0;
}
.zh-periodo-opt-lbl {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #f1f5f9 !important;
  flex: 1 !important;
  text-align: left !important;
}
.zh-periodo-opt-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: white;
}
.zh-periodo-opt.activo .zh-periodo-opt-check {
  background: #4a7fe8;
  border-color: #4a7fe8;
}
.zh-periodo-opt.activo .zh-periodo-opt-check::after {
  content: '✓';
}

/* Inputs de rango personalizado */
#zh-rango-inputs {
  margin-top: 8px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}
.zh-rango-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.zh-rango-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.zh-rango-lbl {
  font-size: 10px;
  font-weight: 600;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.zh-rango-input {
  background: #1a2a52 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 10px !important;
  padding: 9px 10px !important;
  font-size: 12px !important;
  color: #f1f5f9 !important;
  font-family: 'Poppins', sans-serif !important;
  outline: none !important;
  width: 100% !important;
  min-height: unset !important;
  color-scheme: dark;
}
.zh-rango-apply {
  width: 100% !important;
  padding: 12px !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  border: none !important;
  border-radius: 12px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: white !important;
  cursor: pointer !important;
  min-height: unset !important;
  box-shadow: 0 4px 14px rgba(74,127,232,0.35) !important;
}
.zh-rango-apply:hover { opacity: 0.9 !important; transform: none !important; }
.zh-rango-apply:active { transform: scale(0.98) !important; }

/* ══════════════════════════════════════════════════════
   MÓDULO CLIENTES (zc-*)
   Navy design: --bg:#0d1b3e  --surface:#152040  --surface2:#1a2a52
   CF=azul  RI=verde  MO=dorado
   ══════════════════════════════════════════════════════ */

.zc-sec {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #0d1b3e;
  position: relative;
}

/* ── Top Nav ── */
.zc-top-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  background: #0d1b3e;
}
.zc-nav-btn {
  width: 36px !important;
  height: 36px !important;
  min-height: unset !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  color: white !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  box-shadow: 0 4px 12px rgba(74,127,232,0.4) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  font-weight: 700 !important;
}
.zc-nav-btn:hover  { transform: none !important; opacity: 0.9 !important; }
.zc-nav-btn:active { transform: scale(0.95) !important; }

/* El botón + del top nav hereda el mismo estilo */
.zc-nav-btn-add { font-size: 20px !important; }

.zc-nav-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Pantalla lista (scrollable) ── */
#zc-screen-lista {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  padding-bottom: 100px; /* espacio para FAB + paginador */
}
#zc-screen-lista::-webkit-scrollbar { display: none; }

/* ── Pantalla detalle ── */
#zc-screen-detalle {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0d1b3e;
}
.zc-det-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-bottom: 32px;
}
.zc-det-body::-webkit-scrollbar { display: none; }

/* ── Search + chips row ── */
.zc-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 10px;
  flex-shrink: 0;
}
.zc-search-wrap {
  flex: 1.4;
  position: relative;
}
.zc-search-ico {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}
.zc-search-wrap input {
  width: 100%;
  background: #152040 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 14px !important;
  padding: 10px 12px 10px 36px !important;
  font-size: 12px !important;
  color: #f1f5f9 !important;
  font-family: 'Poppins', sans-serif !important;
  outline: none !important;
  min-height: unset !important;
}
.zc-search-wrap input::placeholder { color: #4a6080; }

.zc-chips-wrap {
  flex: 1;
  display: flex;
  gap: 5px;
  overflow-x: visible;
}
.zc-chip-mini {
  padding: 10px 8px !important;
  border-radius: 22px !important;
  white-space: nowrap !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #4a6080 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  line-height: 1 !important;
  cursor: pointer !important;
  min-height: unset !important;
  font-family: 'Poppins', sans-serif !important;
}
.zc-chip-mini:hover { transform: none !important; }
.zc-chip-mini.zc-active {
  background: #4a7fe8 !important;
  border-color: #4a7fe8 !important;
  color: white !important;
}
.zc-chip-mini.zc-chip-green {
  background: rgba(16,185,129,0.1) !important;
  border-color: rgba(16,185,129,0.25) !important;
  color: #10b981 !important;
}
.zc-chip-mini.zc-chip-green.zc-active {
  background: rgba(16,185,129,0.25) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
}
.zc-chip-mini.zc-chip-gold {
  background: rgba(245,158,11,0.1) !important;
  border-color: rgba(245,158,11,0.25) !important;
  color: #f59e0b !important;
}
.zc-chip-mini.zc-chip-gold.zc-active {
  background: rgba(245,158,11,0.25) !important;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

/* ── List header ── */
.zc-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 16px 8px;
  flex-shrink: 0;
}
.zc-list-label {
  font-size: 10px;
  font-weight: 600;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.zc-list-count {
  font-size: 11px;
  color: #4a6080;
}

/* ── Lista clientes ── */
.zc-clientes-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* ── Cliente row card ── */
.zc-cliente-row {
  background: #152040;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.zc-cliente-row:active { transform: scale(0.98); background: #1a2a52; }
.zc-cliente-row::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.06),transparent);
}

.zc-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
}
/* Gradientes por condición */
.zc-av-cf { background: linear-gradient(135deg,#1e3a8a,#4a7fe8); }
.zc-av-ri { background: linear-gradient(135deg,#065f46,#10b981); }
.zc-av-mo { background: linear-gradient(135deg,#92400e,#f59e0b); }

.zc-cli-info { flex: 1; min-width: 0; }
.zc-cli-name {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zc-cli-cuit  { font-size: 10px; color: #4a6080; margin-bottom: 6px; }
.zc-cli-btm   { display: flex; align-items: center; gap: 6px; }

/* Fiscal badges */
.zc-fiscal {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}
.zc-fiscal.cf { background: rgba(74,127,232,0.12); color: #6b9bf0; border: 1px solid rgba(74,127,232,0.2); }
.zc-fiscal.ri { background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.zc-fiscal.mo { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.2); }

.zc-cli-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.zc-cli-total  { font-size: 13px; font-weight: 800; color: #f1f5f9; letter-spacing: -0.3px; }
.zc-cli-ventas { font-size: 9px; color: #4a6080; text-align: right; }

/* ── Empty ── */
.zc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: #4a6080;
  font-size: 13px;
}
.zc-empty i { font-size: 28px; }

/* ── Paginador ── */
.zc-paginator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  flex-shrink: 0;
}
.zc-pag-btn {
  min-width: 34px !important;
  height: 34px !important;
  min-height: unset !important;
  padding: 0 8px !important;
  border-radius: 10px !important;
  background: #152040 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  font-family: 'Poppins', sans-serif !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.zc-pag-btn:hover { background: #1a2a52 !important; transform: none !important; }
.zc-pag-btn.activa {
  background: #4a7fe8 !important;
  border-color: #4a7fe8 !important;
  color: white !important;
}
.zc-pag-dots {
  color: #4a6080;
  font-size: 12px;
  padding: 0 2px;
  letter-spacing: 2px;
}

/* ── FAB ── */
@keyframes zc-pulse { 0%{box-shadow:0 0 0 0 rgba(74,127,232,0.5),0 8px 24px rgba(74,127,232,0.45)} 50%{box-shadow:0 0 0 7px rgba(74,127,232,0.08),0 8px 32px rgba(74,127,232,0.5)} 100%{box-shadow:0 0 0 0 rgba(74,127,232,0.5),0 8px 24px rgba(74,127,232,0.45)} }
@keyframes zc-shimmer { 0%{transform:translateX(-150%) skewX(-15deg)} 100%{transform:translateX(350%) skewX(-15deg)} }

.zc-fab {
  position: absolute !important;
  bottom: 16px !important;
  right: 16px !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: white !important;
  cursor: pointer !important;
  border: none !important;
  overflow: hidden !important;
  min-height: unset !important;
  padding: 0 !important;
  z-index: 10 !important;
  animation: zc-pulse 2.5s ease-in-out infinite !important;
}
.zc-fab:hover  { transform: none !important; }
.zc-fab:active { transform: scale(0.95) !important; animation: none !important; }
.zc-fab-shine {
  position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.15),transparent);
  animation: zc-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

/* ══════════════════════════════════════
   DETALLE CLIENTE
   ══════════════════════════════════════ */

/* Hero */
.zc-det-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px 0;
}
.zc-det-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(74,127,232,0.3);
}
.zc-det-nombre {
  font-size: 20px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.3px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats grid 3 cols */
.zc-det-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 14px 16px 0;
}
.zc-stat-card {
  background: #152040;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 10px 12px;
  position: relative;
  overflow: hidden;
}
.zc-stat-line {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  opacity: 0.5;
}
.zc-stat-val {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.zc-stat-lbl {
  font-size: 8px;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

/* Sección genérica */
.zc-det-section { margin: 14px 16px 0; }
.zc-det-section-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.zc-section-lbl {
  font-size: 9px;
  font-weight: 600;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.zc-ver-todas {
  font-size: 11px;
  color: #6b9bf0;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

/* Info card (datos fiscales) */
.zc-info-card {
  background: #152040;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
}
.zc-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.zc-info-row:last-child { border-bottom: none; }
.zc-info-lbl { font-size: 11px; color: #4a6080; }
.zc-info-val { font-size: 12px; font-weight: 600; color: #f1f5f9; }
.zc-info-val.green { color: #10b981; }
.zc-info-val.blue  { color: #6b9bf0; }
.zc-info-val.gold  { color: #f59e0b; }

/* Historial items */
.zc-hist-list { display: flex; flex-direction: column; gap: 8px; }
.zc-hist-item {
  background: #152040;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.zc-hist-item:active { background: #1a2a52; }
.zc-hist-bar { width: 3px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.zc-hist-info { flex: 1; min-width: 0; }
.zc-hist-num   { font-size: 11px; font-weight: 700; color: #f1f5f9; }
.zc-hist-fecha { font-size: 10px; color: #4a6080; margin-top: 2px; }
.zc-hist-monto { font-size: 13px; font-weight: 800; color: #f1f5f9; flex-shrink: 0; }
.zc-hist-monto.nc { color: #a78bfa; }

/* Acciones */
.zc-det-actions { margin: 14px 16px 0; display: flex; flex-direction: column; gap: 10px; }

.zc-btn-primary {
  width: 100% !important;
  padding: 15px !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  border-radius: 16px !important;
  border: none !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: white !important;
  cursor: pointer !important;
  box-shadow: 0 6px 20px rgba(74,127,232,0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: unset !important;
}
.zc-btn-primary:hover  { opacity: 0.9 !important; transform: none !important; }
.zc-btn-primary:active { transform: scale(0.98) !important; }

.zc-btn-secondary {
  width: 100% !important;
  padding: 14px !important;
  background: rgba(74,127,232,0.08) !important;
  border: 1px solid rgba(74,127,232,0.2) !important;
  border-radius: 16px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #6b9bf0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: unset !important;
}
.zc-btn-secondary:hover  { background: rgba(74,127,232,0.14) !important; transform: none !important; }
.zc-btn-secondary:active { transform: scale(0.98) !important; }


/* ═══════════════════════════════════════════════════════════════
   MÓDULO AJUSTES (aj-*)
   ═══════════════════════════════════════════════════════════════ */

.aj-sec {
  --aj-bg:      #0d1b3e;
  --aj-surface: #152040;
  --aj-surface2:#1a2a52;
  --aj-accent:  #4a7fe8;
  --aj-accent2: #6b9bf0;
  --aj-gold:    #f59e0b;
  --aj-green:   #10b981;
  --aj-red:     #f87171;
  --aj-text:    #f1f5f9;
  --aj-text2:   #94a3b8;
  --aj-text3:   #4a6080;
  --aj-border:  rgba(255,255,255,0.07);
  --aj-border2: rgba(255,255,255,0.12);
  /* display lo maneja zmNavTo con style="display:flex/none" */
  flex-direction: column !important;
  background: var(--aj-bg) !important;
  position: relative !important;
  overflow: hidden !important;
}

.aj-top-nav {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 20px 14px !important;
  border-bottom: 1px solid var(--aj-border) !important;
  background: var(--aj-bg) !important;
  flex-shrink: 0 !important;
}
.aj-nav-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  border: none !important;
  color: white !important;
  font-size: 18px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(74,127,232,0.4) !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  min-height: unset !important;
}
.aj-nav-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--aj-text) !important;
  flex: 1 !important;
}

.aj-screen {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
}
.aj-screen::-webkit-scrollbar { display: none !important; }

.aj-user-hero {
  margin: 18px 20px 0 !important;
  background: linear-gradient(135deg,#1a3a8a 0%,#2d5fc4 50%,#4a7fe8 100%) !important;
  border-radius: 24px !important;
  padding: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 6px 24px rgba(45,95,196,0.35) !important;
}
.aj-shine {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width: 30% !important; height: 100% !important;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.1),transparent) !important;
  animation: aj-shimmer 4s ease-in-out infinite !important;
  pointer-events: none !important;
}
@keyframes aj-shimmer {
  0%   { transform: translateX(-150%) skewX(-15deg); }
  100% { transform: translateX(350%)  skewX(-15deg); }
}
.aj-avatar {
  width: 58px !important;
  height: 58px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.15) !important;
  border: 2px solid rgba(255,255,255,0.25) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  color: white !important;
  flex-shrink: 0 !important;
}
.aj-user-info { flex: 1 !important; min-width: 0 !important; position: relative !important; z-index: 1 !important; }
.aj-user-name { font-size: 17px !important; font-weight: 800 !important; color: white !important; margin-bottom: 6px !important; letter-spacing: -0.3px !important; }
.aj-user-role {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(255,255,255,0.15) !important;
  border-radius: 10px !important;
  padding: 3px 10px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: white !important;
}
.aj-edit-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.15) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 1 !important;
  padding: 0 !important;
  min-height: unset !important;
}

.aj-section-lbl {
  padding: 18px 20px 8px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: var(--aj-text3) !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
}

.aj-card {
  margin: 0 20px !important;
  background: var(--aj-surface) !important;
  border: 1px solid var(--aj-border) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}
.aj-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  cursor: pointer !important;
  border-bottom: 1px solid var(--aj-border) !important;
  transition: background 0.15s !important;
}
.aj-row:last-child { border-bottom: none !important; }
.aj-row:active { background: var(--aj-surface2) !important; }
.aj-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 11px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 17px !important;
}
.aj-icon-blue   { background: rgba(74,127,232,0.15)  !important; }
.aj-icon-green  { background: rgba(16,185,129,0.15)  !important; }
.aj-icon-gold   { background: rgba(245,158,11,0.15)  !important; }
.aj-icon-purple { background: rgba(167,139,250,0.15) !important; }
.aj-row-label { flex: 1 !important; }
.aj-row-name { font-size: 13px !important; font-weight: 600 !important; color: var(--aj-text) !important; }
.aj-row-sub  { font-size: 10px !important; color: var(--aj-text3) !important; margin-top: 1px !important; }
.aj-arrow    { font-size: 18px !important; color: var(--aj-text3) !important; }

.aj-logo-card {
  margin: 0 20px !important;
  background: var(--aj-surface) !important;
  border: 1px solid var(--aj-border) !important;
  border-radius: 18px !important;
  padding: 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
}
.aj-logo-card:active { background: var(--aj-surface2) !important; }
.aj-logo-preview {
  width: 56px !important;
  height: 56px !important;
  border-radius: 14px !important;
  flex-shrink: 0 !important;
  background: var(--aj-surface2) !important;
  border: 1px solid var(--aj-border2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.aj-logo-preview img { width: 100% !important; height: 100% !important; object-fit: contain !important; }
.aj-logo-info { flex: 1 !important; }
.aj-logo-name { font-size: 13px !important; font-weight: 700 !important; color: var(--aj-text) !important; margin-bottom: 3px !important; }
.aj-logo-sub  { font-size: 10px !important; color: var(--aj-text3) !important; }
.aj-logo-change-btn {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--aj-accent2) !important;
  background: rgba(74,127,232,0.1) !important;
  border: 1px solid rgba(74,127,232,0.2) !important;
  border-radius: 10px !important;
  padding: 5px 12px !important;
  flex-shrink: 0 !important;
}

.aj-toggle {
  width: 38px !important;
  height: 22px !important;
  border-radius: 11px !important;
  background: var(--aj-surface2) !important;
  position: relative !important;
  flex-shrink: 0 !important;
  transition: background 0.2s !important;
  cursor: pointer !important;
}
.aj-toggle.active { background: var(--aj-accent) !important; box-shadow: 0 0 8px rgba(74,127,232,0.4) !important; }
.aj-toggle-knob {
  position: absolute !important;
  top: 3px !important; left: 3px !important;
  width: 16px !important; height: 16px !important;
  border-radius: 50% !important;
  background: white !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
  transition: left 0.2s !important;
}
.aj-toggle.active .aj-toggle-knob { left: 19px !important; }

.aj-version-row {
  margin: 0 20px !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: var(--aj-surface) !important;
  border: 1px solid var(--aj-border) !important;
  border-radius: 16px !important;
}
.aj-version-left { display: flex !important; align-items: center !important; gap: 10px !important; }
.aj-version-logo {
  width: 36px !important; height: 36px !important;
  border-radius: 10px !important;
  background: var(--aj-surface2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.aj-version-name { font-size: 13px !important; font-weight: 700 !important; color: var(--aj-text) !important; }
.aj-version-num  { font-size: 10px !important; color: var(--aj-text3) !important; margin-top: 1px !important; }
.aj-version-badge {
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 10px !important;
  background: rgba(16,185,129,0.12) !important;
  color: var(--aj-green) !important;
  border: 1px solid rgba(16,185,129,0.2) !important;
}

.aj-logout-btn {
  margin: 0 20px !important;
  padding: 15px !important;
  border-radius: 16px !important;
  background: rgba(248,113,113,0.08) !important;
  border: 1px solid rgba(248,113,113,0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  width: calc(100% - 40px) !important;
  transition: background 0.15s !important;
  min-height: unset !important;
  color: var(--aj-red) !important;
  font-family: 'Poppins', sans-serif !important;
}
.aj-logout-btn:active { background: rgba(248,113,113,0.15) !important; }
.aj-logout-label { font-size: 14px !important; font-weight: 700 !important; color: var(--aj-red) !important; }

.aj-subscreen {
  position: absolute !important;
  inset: 0 !important;
  background: var(--aj-bg) !important;
  flex-direction: column !important;
  z-index: 10 !important;
  /* display lo maneja el JS con style="display:flex/none" */
}
.aj-sub-nav {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 20px 14px !important;
  border-bottom: 1px solid var(--aj-border) !important;
  background: var(--aj-bg) !important;
  flex-shrink: 0 !important;
}
.aj-form-body {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 24px 20px !important;
  scrollbar-width: none !important;
}
.aj-form-body::-webkit-scrollbar { display: none !important; }
.aj-field-group { margin-bottom: 20px !important; }
.aj-field-label {
  display: block !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--aj-text3) !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  margin-bottom: 8px !important;
}
.aj-field-input {
  width: 100% !important;
  background: var(--aj-surface) !important;
  border: 1px solid var(--aj-border2) !important;
  border-radius: 12px !important;
  padding: 13px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--aj-text) !important;
  font-family: 'Poppins', sans-serif !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.aj-field-input:focus { border-color: var(--aj-accent) !important; }
.aj-field-input::placeholder { color: var(--aj-text3) !important; }
.aj-field-hint {
  font-size: 11px !important;
  color: var(--aj-text3) !important;
  margin: -12px 0 20px 4px !important;
}
.aj-save-btn {
  width: 100% !important;
  padding: 16px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  border: none !important;
  color: white !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  margin-top: 8px !important;
  min-height: unset !important;
  box-shadow: 0 4px 16px rgba(74,127,232,0.35) !important;
  font-family: 'Poppins', sans-serif !important;
}
.aj-save-btn:active { transform: scale(0.98) !important; }

.aj-lang-row { gap: 14px !important; }
.aj-lang-flag { font-size: 22px !important; }
.aj-lang-check {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--aj-accent2) !important;
  width: 20px !important;
  text-align: center !important;
}

.aj-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.6) !important;
  z-index: 100 !important;
  align-items: flex-end !important;
  justify-content: center !important;
}
.aj-modal-sheet {
  background: var(--aj-surface) !important;
  border-radius: 28px 28px 0 0 !important;
  padding: 28px 24px 40px !important;
  width: 100% !important;
  text-align: center !important;
}
.aj-modal-icon  { font-size: 36px !important; margin-bottom: 12px !important; }
.aj-modal-title { font-size: 18px !important; font-weight: 800 !important; color: var(--aj-text) !important; margin-bottom: 8px !important; }
.aj-modal-sub   { font-size: 13px !important; color: var(--aj-text2) !important; margin-bottom: 24px !important; }
.aj-modal-btn-danger {
  width: 100% !important;
  padding: 15px !important;
  border-radius: 14px !important;
  background: rgba(248,113,113,0.15) !important;
  border: 1px solid rgba(248,113,113,0.3) !important;
  color: var(--aj-red) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  margin-bottom: 10px !important;
  min-height: unset !important;
  font-family: 'Poppins', sans-serif !important;
}
.aj-modal-btn-cancel {
  width: 100% !important;
  padding: 15px !important;
  border-radius: 14px !important;
  background: var(--aj-surface2) !important;
  border: 1px solid var(--aj-border2) !important;
  color: var(--aj-text2) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  min-height: unset !important;
  font-family: 'Poppins', sans-serif !important;
}

.zm-avatar { cursor: pointer !important; }


/* ═══════════════════════════════════════════════════════════════
   MÓDULO CATÁLOGO v2 (kc-*)
   ═══════════════════════════════════════════════════════════════ */

.kc-sec {
  --kc-bg:      #0d1b3e;
  --kc-surface: #152040;
  --kc-surface2:#1a2a52;
  --kc-surface3:#1e3060;
  --kc-accent:  #4a7fe8;
  --kc-accent2: #6b9bf0;
  --kc-gold:    #f59e0b;
  --kc-green:   #10b981;
  --kc-red:     #f87171;
  --kc-text:    #f1f5f9;
  --kc-text2:   #94a3b8;
  --kc-text3:   #4a6080;
  --kc-border:  rgba(255,255,255,0.07);
  --kc-border2: rgba(255,255,255,0.12);
  /* display lo maneja zmNavTo */
  flex-direction: column !important;
  background: var(--kc-bg) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* ── Top Nav ────────────────────────────────────── */
.kc-top-nav {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 20px 14px !important;
  border-bottom: 1px solid var(--kc-border) !important;
  background: var(--kc-bg) !important;
  flex-shrink: 0 !important;
}
.kc-nav-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: var(--kc-surface) !important;
  border: 1px solid var(--kc-border2) !important;
  color: var(--kc-text) !important;
  font-size: 16px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  min-height: unset !important;
  position: relative !important;
}
.kc-nav-btn:active { background: var(--kc-surface2) !important; }
.kc-nav-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--kc-text) !important;
  flex: 1 !important;
}
.kc-nav-actions { display: flex !important; gap: 8px !important; }
.kc-nav-dot {
  position: absolute !important;
  top: 6px !important; right: 6px !important;
  width: 7px !important; height: 7px !important;
  border-radius: 50% !important;
  background: var(--kc-gold) !important;
  border: 2px solid var(--kc-bg) !important;
}

/* ── Pantalla con scroll ────────────────────────── */
.kc-screen {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  display: flex !important;
  flex-direction: column !important;
}
.kc-screen::-webkit-scrollbar { display: none !important; }

/* ── Stats strip ───────────────────────────────── */
.kc-stats-strip {
  margin: 14px 20px 0 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 8px !important;
}
.kc-stat-card {
  background: var(--kc-surface) !important;
  border: 1px solid var(--kc-border) !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  position: relative !important;
  overflow: hidden !important;
}
.kc-stat-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg,transparent,var(--kc-accent),transparent) !important;
  opacity: 0.4 !important;
}
.kc-stat-num { font-size: 18px !important; font-weight: 800 !important; color: var(--kc-text) !important; line-height: 1 !important; }
.kc-stat-num.kc-gold { color: var(--kc-gold) !important; }
.kc-stat-num.kc-red  { color: var(--kc-red) !important; }
.kc-stat-lbl { font-size: 9px !important; color: var(--kc-text3) !important; text-transform: uppercase !important; letter-spacing: 0.8px !important; margin-top: 3px !important; font-weight: 600 !important; }

/* ── Buscador ──────────────────────────────────── */
.kc-search-section {
  padding: 14px 20px 0 !important;
}
.kc-search-wrap {
  position: relative !important;
}
.kc-search-ico {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 16px !important;
  pointer-events: none !important;
}
.kc-search-input {
  width: 100% !important;
  background: var(--kc-surface) !important;
  border: 1px solid var(--kc-border2) !important;
  border-radius: 14px !important;
  padding: 12px 14px 12px 44px !important;
  font-size: 13px !important;
  color: var(--kc-text) !important;
  font-family: 'Poppins', sans-serif !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.kc-search-input::placeholder { color: var(--kc-text3) !important; }
.kc-search-input:focus { border-color: var(--kc-accent) !important; }

/* ── Toggle disponibles ─────────────────────────── */
.kc-toggle-row {
  margin: 12px 20px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: var(--kc-surface) !important;
  border: 1px solid var(--kc-border) !important;
  border-radius: 14px !important;
  padding: 11px 16px !important;
  cursor: pointer !important;
}
.kc-toggle-label { font-size: 12px !important; font-weight: 600 !important; color: var(--kc-text2) !important; }
.kc-toggle {
  width: 42px !important; height: 24px !important;
  border-radius: 12px !important;
  background: var(--kc-surface2) !important;
  position: relative !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
  flex-shrink: 0 !important;
}
.kc-toggle.active { background: var(--kc-accent) !important; box-shadow: 0 0 8px rgba(74,127,232,0.4) !important; }
.kc-toggle-knob {
  position: absolute !important;
  top: 3px !important; left: 3px !important;
  width: 18px !important; height: 18px !important;
  border-radius: 50% !important;
  background: white !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
  transition: left 0.2s !important;
}
.kc-toggle.active .kc-toggle-knob { left: 21px !important; }
.kc-toggle-sm { width: 38px !important; height: 22px !important; border-radius: 11px !important; }
.kc-toggle-sm .kc-toggle-knob { width: 16px !important; height: 16px !important; }
.kc-toggle-sm.active .kc-toggle-knob { left: 19px !important; }

/* ── Chips filtros activos ──────────────────────── */
.kc-chips-row {
  display: flex !important;
  gap: 8px !important;
  padding: 4px 20px 14px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
.kc-chips-row::-webkit-scrollbar { display: none !important; }
.kc-chip {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
  padding: 7px 14px !important;
  border-radius: 24px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  min-height: 36px !important;
}
.kc-chip.cat   { background: rgba(74,127,232,0.1) !important; border: 1px solid rgba(74,127,232,0.25) !important; color: var(--kc-accent2) !important; }
.kc-chip.price { background: rgba(16,185,129,0.1) !important; border: 1px solid rgba(16,185,129,0.25) !important; color: var(--kc-green) !important; }
.kc-chip.talle { background: rgba(245,158,11,0.1) !important; border: 1px solid rgba(245,158,11,0.25) !important; color: var(--kc-gold) !important; }
.kc-chip-x { opacity: 0.7 !important; margin-left: 2px !important; }

/* ── Header lista ──────────────────────────────── */
.kc-list-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0 20px 8px !important;
}
.kc-list-label { font-size: 10px !important; font-weight: 600 !important; color: var(--kc-text3) !important; text-transform: uppercase !important; letter-spacing: 1.5px !important; }
.kc-list-count { font-size: 11px !important; color: var(--kc-text3) !important; }

/* ── Lista productos ────────────────────────────── */
.kc-prod-list {
  padding: 0 20px 100px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.kc-prod-row {
  background: var(--kc-surface) !important;
  border: 1px solid var(--kc-border) !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  cursor: pointer !important;
  transition: background 0.15s, transform 0.15s !important;
  position: relative !important;
  overflow: hidden !important;
}
.kc-prod-row::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.06),transparent) !important;
}
.kc-prod-row:active { transform: scale(0.98) !important; background: var(--kc-surface2) !important; }

.kc-prod-thumb {
  width: 52px !important;
  height: 52px !important;
  border-radius: 12px !important;
  flex-shrink: 0 !important;
  background: var(--kc-surface2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 26px !important;
  overflow: hidden !important;
}
.kc-prod-thumb img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

.kc-prod-info { flex: 1 !important; min-width: 0 !important; overflow: hidden !important; }
.kc-prod-name {
  display: block !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--kc-text) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-bottom: 2px !important;
}
.kc-prod-sku-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 7px !important;
}
.kc-prod-sku { font-size: 10px !important; color: var(--kc-text3) !important; font-weight: 500 !important; }
.kc-prod-cat {
  font-size: 9px !important;
  color: var(--kc-text3) !important;
  background: var(--kc-surface2) !important;
  padding: 2px 7px !important;
  border-radius: 8px !important;
}
.kc-talles-wrap { display: flex !important; gap: 4px !important; flex-wrap: wrap !important; }
.kc-talle-pill {
  padding: 3px 7px !important;
  border-radius: 8px !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  border: 1px solid var(--kc-border2) !important;
  color: var(--kc-text2) !important;
  background: var(--kc-surface2) !important;
}
.kc-talle-pill.low { background: rgba(245,158,11,0.12) !important; color: var(--kc-gold) !important; border-color: rgba(245,158,11,0.25) !important; }
.kc-talle-pill.out { background: rgba(248,113,113,0.1) !important; color: var(--kc-red) !important; border-color: rgba(248,113,113,0.2) !important; text-decoration: line-through !important; opacity: 0.7 !important; }

.kc-prod-right {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  min-width: 80px !important;
}
.kc-prod-price { font-size: 14px !important; font-weight: 800 !important; color: var(--kc-text) !important; letter-spacing: -0.3px !important; }
.kc-stock-badge {
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 10px !important;
}
.kc-stock-badge.ok  { background: rgba(16,185,129,0.12) !important; color: var(--kc-green) !important; border: 1px solid rgba(16,185,129,0.2) !important; }
.kc-stock-badge.low { background: rgba(245,158,11,0.12) !important; color: var(--kc-gold) !important; border: 1px solid rgba(245,158,11,0.2) !important; }
.kc-stock-badge.out { background: rgba(248,113,113,0.1) !important; color: var(--kc-red) !important; border: 1px solid rgba(248,113,113,0.2) !important; }

.kc-empty {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 40px 20px !important;
  color: var(--kc-text3) !important;
  font-size: 13px !important;
  text-align: center !important;
}
.kc-empty i { font-size: 32px !important; opacity: 0.4 !important; }

/* ── FAB ───────────────────────────────────────── */
.kc-fab {
  position: absolute !important;
  bottom: 24px !important; right: 24px !important;
  width: 52px !important; height: 52px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 26px !important;
  color: white !important;
  cursor: pointer !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(74,127,232,0.45) !important;
  overflow: hidden !important;
  min-height: unset !important;
  animation: kc-pulse 2.5s ease-in-out infinite !important;
  z-index: 5 !important;
}
.kc-fab-shine {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width: 40% !important; height: 100% !important;
  border-radius: 50% !important;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.15),transparent) !important;
  animation: kc-shimmer 3s ease-in-out infinite !important;
  pointer-events: none !important;
}
@keyframes kc-shimmer { 0%{transform:translateX(-150%) skewX(-15deg)} 100%{transform:translateX(350%) skewX(-15deg)} }
@keyframes kc-pulse { 0%{box-shadow:0 0 0 0 rgba(74,127,232,0.5),0 8px 24px rgba(74,127,232,0.45)} 50%{box-shadow:0 0 0 7px rgba(74,127,232,0.08),0 8px 32px rgba(74,127,232,0.5)} 100%{box-shadow:0 0 0 0 rgba(74,127,232,0.5),0 8px 24px rgba(74,127,232,0.45)} }

/* ── Drawer filtros ─────────────────────────────── */
.kc-drawer-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.6) !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: flex-end !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease !important;
}
.kc-drawer-overlay.visible {
  opacity: 1 !important;
  pointer-events: all !important;
}
.kc-drawer {
  width: 100% !important;
  background: var(--kc-bg) !important;
  border-radius: 28px 28px 0 0 !important;
  padding: 0 0 32px !important;
  border-top: 1px solid var(--kc-border2) !important;
  max-height: 82% !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 101 !important;
  position: relative !important;
  transform: translateY(20px) !important;
  transition: transform 0.25s ease !important;
}
.kc-drawer-overlay.visible .kc-drawer {
  transform: translateY(0) !important;
}
.kc-drawer-handle {
  width: 36px !important; height: 4px !important;
  border-radius: 4px !important;
  background: var(--kc-border2) !important;
  margin: 12px auto 0 !important;
  flex-shrink: 0 !important;
}
.kc-drawer-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--kc-text) !important;
  padding: 16px 24px 0 !important;
  flex-shrink: 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}
.kc-drawer-clear { font-size: 12px !important; color: var(--kc-red) !important; font-weight: 600 !important; cursor: pointer !important; }
.kc-drawer-body { overflow-y: auto !important; padding: 16px 24px !important; flex: 1 !important; scrollbar-width: none !important; }
.kc-drawer-body::-webkit-scrollbar { display: none !important; }

.kc-drawer-toggle-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: var(--kc-surface) !important;
  border: 1px solid var(--kc-border) !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  margin-bottom: 4px !important;
  cursor: pointer !important;
}
.kc-drawer-toggle-lbl { font-size: 13px !important; font-weight: 600 !important; color: var(--kc-text2) !important; }

.kc-filter-title {
  font-size: 10px !important;
  font-weight: 600 !important;
  color: var(--kc-text3) !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  margin: 16px 0 12px !important;
}
.kc-filter-title:first-child { margin-top: 0 !important; }

/* Categorías */
.kc-cat-list { display: flex !important; flex-direction: column !important; gap: 4px !important; }
.kc-cat-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 11px 14px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
}
.kc-cat-item:active { background: var(--kc-surface2) !important; }
.kc-cat-check {
  width: 20px !important; height: 20px !important;
  border-radius: 6px !important;
  border: 1.5px solid var(--kc-border2) !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: white !important;
}
.kc-cat-check.checked { background: var(--kc-accent) !important; border-color: var(--kc-accent) !important; }
.kc-cat-name { font-size: 13px !important; color: var(--kc-text2) !important; font-weight: 500 !important; flex: 1 !important; }
.kc-cat-count { font-size: 11px !important; color: var(--kc-text3) !important; }

/* Talles grid */
.kc-talle-grid { display: flex !important; gap: 8px !important; flex-wrap: wrap !important; }
.kc-talle-opt {
  width: 44px !important; height: 44px !important;
  border-radius: 12px !important;
  background: var(--kc-surface) !important;
  border: 1.5px solid var(--kc-border2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--kc-text3) !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
}
.kc-talle-opt.selected { background: rgba(74,127,232,0.15) !important; border-color: var(--kc-accent) !important; color: var(--kc-accent2) !important; }

/* Precio range */
.kc-price-range { display: flex !important; align-items: center !important; gap: 10px !important; }
.kc-price-input {
  flex: 1 !important;
  background: var(--kc-surface) !important;
  border: 1px solid var(--kc-border2) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  color: var(--kc-text) !important;
  font-family: 'Poppins', sans-serif !important;
  outline: none !important;
}
.kc-price-input::placeholder { color: var(--kc-text3) !important; }
.kc-price-sep { color: var(--kc-text3) !important; font-size: 13px !important; flex-shrink: 0 !important; }

/* Apply btn */
.kc-drawer-apply {
  margin: 16px 24px 0 !important;
  padding: 15px !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  border-radius: 16px !important;
  border: none !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: white !important;
  cursor: pointer !important;
  box-shadow: 0 6px 20px rgba(74,127,232,0.4) !important;
  flex-shrink: 0 !important;
  min-height: unset !important;
  width: calc(100% - 48px) !important;
}
.kc-drawer-apply:active { transform: scale(0.98) !important; }

/* ── znv Mobile MP Integration ───────────────────────────── */
.znv-mp-header-left {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
}
#znv-mp-zone {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}
.znv-mp-btn-v {
  font-size: 11px !important;
  font-weight: 700 !important;
  background: var(--brand-color, #4a7fe8) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 4px 14px !important;
  min-height: unset !important;
  cursor: pointer !important;
  letter-spacing: 0.2px !important;
}
.znv-mp-btn-c {
  font-size: 11px !important;
  font-weight: 700 !important;
  background: rgba(248,113,113,0.12) !important;
  color: #f87171 !important;
  border: 1px solid rgba(248,113,113,0.3) !important;
  border-radius: 20px !important;
  padding: 4px 14px !important;
  min-height: unset !important;
  cursor: pointer !important;
}
#znv-mp-qr-wrap {
  width: 160px !important;
  height: 160px !important;
  margin: 0 auto 8px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #fff !important;
  padding: 6px !important;
  box-sizing: border-box !important;
}
#znv-mp-qr-canvas img,
#znv-mp-qr-canvas canvas {
  width: 148px !important;
  height: 148px !important;
}
#znv-mp-label-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}
.znv-mp-spin {
  display: inline-block !important;
  width: 13px !important;
  height: 13px !important;
  border: 2px solid rgba(74,127,232,0.25) !important;
  border-top-color: var(--brand-color, #4a7fe8) !important;
  border-radius: 50% !important;
  animation: znv-mp-rotate 0.75s linear infinite !important;
  flex-shrink: 0 !important;
}
@keyframes znv-mp-rotate { to { transform: rotate(360deg); } }

/* ===================================================
   INVENTARIO 2.0 — Dark Glassmorphism
   =================================================== */
:root {
  --inv-bg: #0d1117;
  --inv-surface: #161b27;
  --inv-glass: rgba(22,27,39,0.98);
  --inv-border: rgba(255,255,255,0.07);
  --inv-text: #e2e8f0;
  --inv-muted: #64748b;
  --inv-accent: #4a7fe8;
  --inv-accent2: #6b9bf0;
}

#sec-inventario {
  background: var(--inv-bg) !important;
  color: var(--inv-text);
}

#sec-inventario .inv-layout-wrapper {
  display: flex;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

/* ---- SIDEBAR ---- */
.inv-sidebar {
  width: 252px;
  min-width: 252px;
  background: var(--inv-glass);
  border-right: 1px solid var(--inv-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 15px;
}
.inv-sidebar::-webkit-scrollbar { width: 3px; }
.inv-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.inv-sb-title {
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--inv-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.inv-sb-section { margin-bottom: 18px; }

.inv-sb-label {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--inv-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.inv-sb-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 11px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid var(--inv-border);
}
.inv-sb-toggle-label { font-size: 0.85em; color: var(--inv-text); }

.inv-filter-cats-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 200px;
  overflow-y: auto;
}
.inv-filter-cats-wrap::-webkit-scrollbar { width: 3px; }
.inv-filter-cats-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); }

.inv-sb-cat-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.84em;
  color: var(--inv-text);
  transition: background 0.13s;
}
.inv-sb-cat-item:hover { background: rgba(74,127,232,0.1); }
.inv-sb-cat-item input[type="checkbox"] {
  accent-color: var(--inv-accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.inv-sb-cat-item.active {
  color: var(--inv-accent2);
  background: rgba(74,127,232,0.12);
}

#inv-filter-talles .filter-chip {
  background: rgba(255,255,255,0.05) !important;
  color: var(--inv-muted) !important;
  border: 1px solid var(--inv-border) !important;
  border-radius: 20px !important;
  font-size: 0.78em !important;
  cursor: pointer !important;
  transition: all 0.14s !important;
}
#inv-filter-talles .filter-chip.active {
  background: rgba(74,127,232,0.18) !important;
  color: var(--inv-accent2) !important;
  border-color: var(--inv-accent) !important;
}

.inv-sb-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.inv-sb-price-inp {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--inv-border);
  color: var(--inv-text);
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 0.83em;
  outline: none;
  width: 100%;
  font-family: inherit;
}
.inv-sb-price-inp::placeholder { color: var(--inv-muted); }
.inv-sb-price-inp:focus { border-color: var(--inv-accent); }

.inv-sb-btn-apply {
  width: 100%;
  padding: 8px;
  background: rgba(74,127,232,0.12);
  border: 1px solid rgba(74,127,232,0.25);
  color: var(--inv-accent2);
  border-radius: 7px;
  font-size: 0.81em;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.13s;
}
.inv-sb-btn-apply:hover { background: rgba(74,127,232,0.22); }

.inv-sb-btn-clear {
  width: 100%;
  padding: 9px;
  background: rgba(239,68,68,0.09);
  border: 1px solid rgba(239,68,68,0.18);
  color: #fc8181;
  border-radius: 8px;
  font-size: 0.81em;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  font-family: inherit;
  transition: background 0.13s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.inv-sb-btn-clear:hover { background: rgba(239,68,68,0.17); }

.inv-sb-divider { height: 1px; background: var(--inv-border); margin: 14px 0; }

/* ---- RESULTS PANEL ---- */
.inv-results-panel {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
  background: var(--inv-bg);
}
.inv-results-panel::-webkit-scrollbar { width: 5px; }
.inv-results-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.inv-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.inv-search-wrap { flex: 1; position: relative; }
.inv-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--inv-muted);
  pointer-events: none;
}
.inv-search-inp {
  width: 100%;
  background: var(--inv-surface);
  border: 1px solid var(--inv-border);
  color: var(--inv-text);
  border-radius: 10px;
  padding: 10px 13px 10px 40px;
  font-size: 0.88em;
  outline: none;
  font-family: inherit;
  transition: border 0.14s;
}
.inv-search-inp::placeholder { color: var(--inv-muted); }
.inv-search-inp:focus { border-color: var(--inv-accent); }

.inv-view-toggle {
  display: flex;
  gap: 3px;
  background: var(--inv-surface);
  border: 1px solid var(--inv-border);
  border-radius: 8px;
  padding: 3px;
}
.inv-vbtn {
  padding: 6px 9px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--inv-muted);
  cursor: pointer;
  transition: all 0.14s;
  display: flex;
  align-items: center;
  line-height: 1;
}
.inv-vbtn.active { background: var(--inv-accent); color: white; }

.inv-btn-export {
  padding: 9px 13px;
  background: rgba(34,197,94,0.09);
  border: 1px solid rgba(34,197,94,0.22);
  color: #4ade80;
  border-radius: 8px;
  font-size: 0.81em;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.13s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.inv-btn-export:hover { background: rgba(34,197,94,0.17); }

.inv-stats-bar {
  font-size: 0.8em;
  color: var(--inv-muted);
  margin-bottom: 14px;
}
.inv-stat-val { color: var(--inv-text); font-weight: 600; }

/* ---- GRID CARDS ---- */
#inv-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 13px;
}

.pcard {
  background: var(--inv-surface);
  border: 1px solid var(--inv-border);
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  animation: invFadeUp 0.3s ease both;
}
.pcard:hover {
  transform: translateY(-3px);
  border-color: rgba(74,127,232,0.35);
  box-shadow: 0 8px 24px rgba(0,0,0,0.38);
}
.pcard-img-wrap {
  height: 100px;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.pcard-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.pcard-icon { width: 44px; height: 44px; opacity: 0.45; }
.pcard-stock-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 0.68em;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.pcard-stock-badge.ok  { background: rgba(34,197,94,0.2);  color: #4ade80; border: 1px solid rgba(34,197,94,0.3);  }
.pcard-stock-badge.low { background: rgba(245,158,11,0.2); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.pcard-stock-badge.zero{ background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }

.pcard-body {
  padding: 11px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pcard-name {
  font-size: 0.86em;
  font-weight: 600;
  color: var(--inv-text);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pcard-sku  { font-size: 0.7em;  color: var(--inv-muted);   font-family: monospace; }
.pcard-cat  { font-size: 0.7em;  color: var(--inv-accent2); margin-top: 1px; }
.pcard-price{ font-size: 0.92em; font-weight: 700; color: var(--inv-text); margin-top: auto; padding-top: 7px; }

.pcard-variants { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.pcard-vtag {
  font-size: 0.67em;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: var(--inv-muted);
  border: 1px solid var(--inv-border);
}
.pcard-vtag.has-stock { color: var(--inv-accent2); background: rgba(74,127,232,0.1); border-color: rgba(74,127,232,0.2); }

/* ---- TABLE VIEW ---- */
.inv-table-wrap {
  background: var(--inv-surface);
  border: 1px solid var(--inv-border);
  border-radius: 13px;
  overflow: hidden;
}
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table thead { background: rgba(255,255,255,0.04); }
.inv-table th {
  padding: 12px 15px;
  text-align: left;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--inv-muted);
  border: none; border-bottom: 1px solid var(--inv-border);
}
.inv-table td {
  padding: 12px 15px;
  font-size: 0.87em;
  color: var(--inv-text);
  border: none; border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: middle;
}
.inv-table tr:last-child td { border-bottom: none; }
.inv-table tbody tr {
  transition: background 0.12s;
  animation: invFadeUp 0.22s ease both;
}
.inv-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.inv-td-name { font-weight: 600; }
.inv-td-sku  { font-size: 0.78em; color: var(--inv-muted); font-family: monospace; margin-top: 2px; }
.inv-td-cat  { color: var(--inv-accent2); font-size: 0.84em; }
.inv-td-price{ font-weight: 700; text-align: right; }

.inv-stock-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.76em;
  padding: 2px 8px;
  border-radius: 20px;
  margin: 2px 2px 2px 0;
}
.inv-stock-chip.ok  { background: rgba(34,197,94,0.1);  color: #4ade80; border: 1px solid rgba(34,197,94,0.2);  }
.inv-stock-chip.low { background: rgba(245,158,11,0.1); color: #fcd34d; border: 1px solid rgba(245,158,11,0.2); }
.inv-stock-chip.zero{ background: rgba(239,68,68,0.08); color: #f87171; border: 1px solid rgba(239,68,68,0.15); }

#inv-empty-state { text-align: center; padding: 60px 20px; color: var(--inv-muted); }
#inv-empty-state svg { display: block; margin: 0 auto 14px; opacity: 0.25; }
#inv-empty-state p { font-size: 0.9em; }

@keyframes invFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pcard:nth-child(1){animation-delay:0ms}  .pcard:nth-child(2){animation-delay:25ms}
.pcard:nth-child(3){animation-delay:50ms} .pcard:nth-child(4){animation-delay:75ms}
.pcard:nth-child(5){animation-delay:100ms}.pcard:nth-child(6){animation-delay:125ms}
.pcard:nth-child(7){animation-delay:150ms}.pcard:nth-child(8){animation-delay:175ms}
.pcard:nth-child(9){animation-delay:200ms}.pcard:nth-child(10){animation-delay:225ms}
/* === END INVENTARIO 2.0 === */

/* ===================================================
   INVENTARIO 2.0 — Bugfix Pack (5 fixes)
   =================================================== */

/* ----- BUG 1: Global th { background:#f1f1f1 } override ----- */
.inv-table-wrap .inv-table th {
  background: rgba(255,255,255,0.04) !important;
  color: var(--inv-muted) !important;
}
.inv-table-wrap .inv-table thead,
.inv-table-wrap .inv-table thead tr {
  background: rgba(255,255,255,0.04) !important;
}

/* ----- BUG 2: Sort select ----- */
.inv-sort-sel {
  display: block !important;
  background-color: var(--inv-surface) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  border: 1px solid var(--inv-border) !important;
  border-radius: 8px !important;
  padding: 7px 26px 7px 10px !important;
  font-size: 0.8em !important;
  color: var(--inv-text) !important;
  font-family: inherit !important;
  outline: none !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.inv-sort-sel option {
  background: var(--inv-surface);
  color: var(--inv-text);
}

/* ----- BUG 3: Cancel global button glass effect for inventory ----- */
#sec-inventario .inv-vbtn,
#sec-inventario .inv-btn-export,
#sec-inventario .inv-sb-btn-apply,
#sec-inventario .inv-sb-btn-clear,
#sec-inventario .inv-sort-sel {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
#sec-inventario .inv-vbtn {
  background-color: transparent !important;
  border: none !important;
  color: var(--inv-muted) !important;
}
#sec-inventario .inv-vbtn.active {
  background-color: var(--inv-accent) !important;
  color: white !important;
  border: none !important;
}
#sec-inventario .inv-btn-export {
  background-color: rgba(34,197,94,0.09) !important;
  border: 1px solid rgba(34,197,94,0.22) !important;
  color: #4ade80 !important;
}
#sec-inventario .inv-btn-export:hover {
  background-color: rgba(34,197,94,0.17) !important;
}
#sec-inventario .inv-sb-btn-apply {
  background-color: rgba(74,127,232,0.12) !important;
  border: 1px solid rgba(74,127,232,0.25) !important;
  color: var(--inv-accent2) !important;
}
#sec-inventario .inv-sb-btn-apply:hover {
  background-color: rgba(74,127,232,0.22) !important;
}
#sec-inventario .inv-sb-btn-clear {
  background-color: rgba(239,68,68,0.09) !important;
  border: 1px solid rgba(239,68,68,0.18) !important;
  color: #fc8181 !important;
}
#sec-inventario .inv-sb-btn-clear:hover {
  background-color: rgba(239,68,68,0.17) !important;
}

/* ----- BUG 4: Remove white frame from .main-content ----- */
#sec-inventario {
  margin: -20px !important;
  padding: 0 !important;
  width: calc(100% + 40px) !important;
  box-sizing: border-box !important;
}
#sec-inventario .inv-layout-wrapper {
  height: 100vh !important;
}

/* ----- BUG 5: Sidebar section labels, close button, user footer ----- */
.menu-section-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  padding: 14px 14px 4px;
  pointer-events: none;
  user-select: none;
}

.sidebar-close-btn {
  width: 26px !important;
  height: 26px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(255,255,255,0.35) !important;
  transition: all 0.15s !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}
.sidebar-close-btn:hover {
  border-color: rgba(239,68,68,0.4) !important;
  color: #f87171 !important;
  background: transparent !important;
}
.sidebar-close-btn svg {
  width: 12px !important;
  height: 12px !important;
  pointer-events: none !important;
}

.brand-container {
  justify-content: space-between !important;
}

.sidebar-user-footer {
  margin-top: auto;
  padding: 14px 14px 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
  background-image: none !important;
  box-shadow: none !important;
}
.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2d5fc4, #6366f1) !important;
  background-image: none !important;
  box-shadow: none !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white !important;
  flex-shrink: 0;
  text-transform: uppercase;
}
.sidebar-user-name {
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 9px;
  color: rgba(255,255,255,0.35);
  text-transform: capitalize;
}
/* === END BUGFIX PACK === */

/* ===================================================
   ZENIT SUITE — Global & Multi-module fixes
   =================================================== */

/* ----- GLOBAL: DM Mono for numeric/code fields ----- */
.pcard-sku, .inv-td-sku, .pcard-price, .inv-td-price,
td.precio, .mono, .sku { font-family: 'DM Mono','Courier New',monospace; }

/* ----- GLOBAL: zn-btn-* utility classes ----- */
.zn-btn-primary {
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 14px; border-radius:9px;
  background:linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  background-image:none !important; border:none !important;
  color:white !important; font-family:'Poppins',sans-serif !important;
  font-size:11px !important; font-weight:700 !important;
  cursor:pointer !important; transition:all 0.15s !important;
  text-decoration:none !important; box-shadow:none !important;
}
.zn-btn-primary:hover {
  transform:translateY(-1px) !important;
  box-shadow:0 4px 14px rgba(74,127,232,0.35) !important;
  color:white !important;
}
.zn-btn-ghost {
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 13px; border-radius:9px;
  background:rgba(255,255,255,0.04) !important;
  background-image:none !important;
  border:1px solid rgba(255,255,255,0.12) !important;
  color:#94a3b8 !important; font-family:'Poppins',sans-serif !important;
  font-size:11px !important; font-weight:700 !important;
  cursor:pointer !important; transition:all 0.15s !important;
  text-decoration:none !important; box-shadow:none !important;
}
.zn-btn-ghost:hover { border-color:#4a7fe8 !important; color:#6b9bf0 !important; background:rgba(74,127,232,0.06) !important; }
.zn-btn-danger {
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 13px; border-radius:9px;
  background:rgba(248,113,113,0.1) !important; background-image:none !important;
  border:1px solid rgba(248,113,113,0.2) !important; color:#f87171 !important;
  font-family:'Poppins',sans-serif !important; font-size:11px !important;
  font-weight:700 !important; cursor:pointer !important;
  transition:all 0.15s !important; box-shadow:none !important;
}
.zn-btn-danger:hover { background:rgba(248,113,113,0.18) !important; }

/* ----- POS: white frame fix (same pattern as inventory) ----- */
#sec-pos {
  margin: -20px !important;
  padding: 0 !important;
  width: calc(100% + 40px) !important;
  height: 100vh !important;
  box-sizing: border-box !important;
}

/* ----- Inventory scroll: min-height:0 on flex chain ----- */
.inv-results-panel { min-height: 0 !important; }

/* ----- Inventory + POS chips/badges — SOLID colors ----- */
.pcard-vtag.has-stock { background:#1e3a6e !important; color:#93c5fd !important; border:none !important; }
.inv-stock-chip.ok   { background:#1a4731 !important; color:#4ade80 !important; border:none !important; }
.inv-stock-chip.low  { background:#78350f !important; color:#fcd34d !important; border:none !important; }
.inv-stock-chip.zero { background:#7f1d1d !important; color:#fca5a5 !important; border:none !important; }
.pcard-stock-badge.ok  { background:#1a4731 !important; color:#4ade80 !important; border:none !important; }
.pcard-stock-badge.low { background:#78350f !important; color:#fcd34d !important; border:none !important; }
.pcard-stock-badge.zero{ background:#7f1d1d !important; color:#fca5a5 !important; border:none !important; }

/* ----- Movimientos sections: dark layout ----- */
#sec-mov-ventas,
#sec-mov-stock {
  background: var(--inv-bg,#0d1117) !important;
  margin: -20px !important;
  padding: 0 !important;
  width: calc(100% + 40px) !important;
  min-height: 100vh !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}

.mov-layout { max-width: 1100px; margin: 0 auto; padding: 24px 26px; font-family: 'Poppins', sans-serif; }

.mov-header {
  display:flex; align-items:center; gap:12px; margin-bottom:18px;
}
.mov-title { font-size:22px; font-weight:700; color:var(--inv-text,#e2e8f0); font-family:'Poppins',sans-serif; }

.mov-filters-bar {
  display:flex; flex-wrap:wrap; gap:8px; align-items:center;
  background:var(--inv-surface,#161b27);
  border:1px solid var(--inv-border,rgba(255,255,255,0.07));
  border-radius:11px; padding:12px 14px; margin-bottom:14px;
}
.mov-filter-inp {
  background:rgba(255,255,255,0.05); border:1px solid var(--inv-border,rgba(255,255,255,0.07));
  color:var(--inv-text,#e2e8f0); border-radius:8px; padding:8px 12px;
  font-size:13px; outline:none; font-family:'Poppins',sans-serif; min-width:100px;
}
.mov-filter-inp::placeholder { color:var(--inv-muted,#64748b); }
.mov-filter-inp:focus { border-color:var(--inv-accent,#4a7fe8); }
.mov-filter-sel {
  background:rgba(255,255,255,0.05) !important; background-image:none !important;
  border:1px solid var(--inv-border,rgba(255,255,255,0.07)) !important;
  color:var(--inv-text,#e2e8f0); border-radius:8px; padding:8px 12px;
  font-size:13px; outline:none; font-family:'Poppins',sans-serif;
  box-shadow:none !important;
}
.mov-btn-rapido {
  padding:7px 14px; border-radius:7px;
  border:1px solid var(--inv-border,rgba(255,255,255,0.07)) !important;
  background:rgba(255,255,255,0.04) !important; background-image:none !important;
  color:var(--inv-muted,#64748b); font-size:13px; font-weight:600;
  cursor:pointer; font-family:'Poppins',sans-serif; transition:all 0.13s; box-shadow:none !important;
}
.mov-btn-rapido:hover {
  background:rgba(74,127,232,0.15) !important;
  border-color:var(--inv-accent,#4a7fe8) !important; color:var(--inv-accent2,#6b9bf0) !important;
}
.mov-btn-clear {
  padding:7px 14px; border-radius:7px;
  border:1px solid rgba(239,68,68,0.2) !important;
  background:rgba(239,68,68,0.08) !important; background-image:none !important;
  color:#fc8181; font-size:13px; font-weight:600;
  cursor:pointer; font-family:'Poppins',sans-serif; transition:all 0.13s; box-shadow:none !important;
}
.mov-btn-clear:hover { background:rgba(239,68,68,0.16) !important; }

.mov-table-wrap {
  background:var(--inv-surface,#161b27);
  border:1px solid var(--inv-border,rgba(255,255,255,0.07));
  border-radius:12px; overflow:hidden;
}
.mov-table { width:100%; border-collapse:collapse; font-family:'Poppins',sans-serif; }
.mov-table thead { background:rgba(255,255,255,0.03); }
.mov-table th {
  padding:12px 16px; text-align:left; font-size:12px;
  font-weight:700; letter-spacing:0.08em; text-transform:uppercase;
  color:var(--inv-muted,#64748b) !important;
  background:rgba(255,255,255,0.03) !important;
  border:none; border-bottom:1px solid rgba(255,255,255,0.07);
  font-family:'Poppins',sans-serif;
}
.mov-table td {
  padding:13px 16px; font-size:14px;
  color:var(--inv-text,#e2e8f0);
  border:none; border-bottom:1px solid rgba(255,255,255,0.06);
  vertical-align:middle; font-family:'Poppins',sans-serif;
}
.mov-table tr:last-child td { border-bottom:none; }
.mov-table tbody tr { transition:background 0.12s; }
.mov-table tbody tr:hover { background:rgba(74,127,232,0.04); }

.mov-badge {
  padding:4px 11px; border-radius:20px; font-size:12px;
  font-weight:700; display:inline-block; font-family:'Poppins',sans-serif;
}
.mov-badge.venta   { background:rgba(34,197,94,0.15);  color:#4ade80;  border:1px solid rgba(34,197,94,0.2); }
.mov-badge.ingreso { background:rgba(74,127,232,0.15); color:#6b9bf0;  border:1px solid rgba(74,127,232,0.2); }
.mov-badge.egreso  { background:rgba(245,158,11,0.15); color:#fcd34d;  border:1px solid rgba(245,158,11,0.2); }
.mov-badge.ajuste  { background:rgba(245,158,11,0.15); color:#fcd34d;  border:1px solid rgba(245,158,11,0.2); }
.mov-badge.elim    { background:rgba(239,68,68,0.12);  color:#f87171;  border:1px solid rgba(239,68,68,0.2); }

.mov-btn-ver {
  padding:6px 14px;
  background:rgba(74,127,232,0.1) !important; background-image:none !important;
  border:1px solid rgba(74,127,232,0.2) !important; color:var(--inv-accent2,#6b9bf0);
  border-radius:7px; font-size:13px; font-weight:600;
  cursor:pointer; font-family:'Poppins',sans-serif; transition:all 0.13s; box-shadow:none !important;
}
.mov-btn-ver:hover { background:rgba(74,127,232,0.2) !important; }

.mov-muted { font-size:13px; color:var(--inv-muted,#64748b); margin-top:2px; font-family:'Poppins',sans-serif; }
.mov-strong { font-weight:600; color:var(--inv-text,#e2e8f0); }

#paginacion-mov-ventas, #paginacion-mov-stock {
  padding:14px; display:flex; justify-content:center; align-items:center; gap:10px;
  font-family:'Poppins',sans-serif; font-size:13px;
}

/* ----- Sidebar collapse → main-content fills width ----- */
.main-content.sidebar-collapsed { margin-left:0 !important; }
/* === END GLOBAL FIX === */

/* ============================================================
   DASHBOARD 2.0 — DARK GLASSMORPHISM
   ============================================================ */
#sec-dashboard {
  margin: -20px !important;
  width: calc(100% + 40px) !important;
  min-height: 100vh !important;
  background: var(--inv-bg, #0d1117) !important;
  color: #f1f5f9 !important;
  display: flex;
  flex-direction: column !important;
  overflow: hidden !important;
}
.dash-topbar {
  min-height: 54px;
  background: #161b27;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.dash-page-t {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  margin-right: 4px;
  flex-shrink: 0;
}
.dash-filter-group { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.dash-fb {
  padding: 8px 18px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  background: #1e2538 !important;
  background-color: #1e2538 !important;
  background-image: none !important;
  color: #94a3b8 !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  white-space: nowrap !important;
  min-height: unset !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 1 !important;
}
.dash-fb:hover  { border-color: rgba(74,127,232,0.4) !important; color: #6b9bf0 !important; background: rgba(74,127,232,0.06) !important; background-color: rgba(74,127,232,0.06) !important; transform: none !important; opacity: 1 !important; }
.dash-fb.active { background: rgba(74,127,232,0.14) !important; background-color: rgba(74,127,232,0.14) !important; border-color: rgba(74,127,232,0.4) !important; color: #6b9bf0 !important; }
.dash-topbar-r  { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Filter selects — misma estética pill que los botones de fecha */
.dash-df-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px !important;
  height: 38px;
  box-sizing: border-box;
  overflow: hidden;
  background: #1e2538;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 20px;
  transition: border-color 0.15s;
  cursor: pointer;
}
.dash-df-wrap:hover { border-color: rgba(74,127,232,0.3); }
.dash-df-wrap > svg:first-child { color: #64748b; flex-shrink: 0; }
.dash-df-arrow { color: #64748b; flex-shrink: 0; pointer-events: none; }
.dash-df-select {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  min-width: 100px;
  max-width: 140px;
  height: 100%;
  padding: 0;
}
.dash-df-select:focus,
.dash-df-select:focus-visible { outline: none !important; box-shadow: none !important; }
.dash-df-select option { background: #1e2538; color: #f1f5f9; }

/* Inputs de fecha inline (dentro del topbar, visibles solo con Personalizado) */
.dash-date-inp {
  background: #1e2538;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 7px;
  padding: 4px 8px;
  color: #94a3b8;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  outline: none;
  height: 28px;
  cursor: pointer;
}
.dash-date-inp:focus { border-color: rgba(74,127,232,0.4); color: #f1f5f9; }
.dash-date-sep { font-size: 10px; color: #4a6080; }
.dash-apply-btn {
  background: rgba(74,127,232,0.14) !important;
  border: 1px solid rgba(74,127,232,0.4) !important;
  color: #6b9bf0 !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  font-family: 'Poppins', sans-serif !important;
  white-space: nowrap !important;
  min-height: unset !important;
  box-shadow: none !important;
  height: 28px !important;
}

/* Grid body */
.dash-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr) 320px;
  grid-template-rows: auto auto;
  gap: 14px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.dash-body::-webkit-scrollbar { width: 4px; }
.dash-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

/* KPI cards */
.dash-kpi {
  background: #161b27;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
  animation: invFadeUp 0.25s ease both;
}
.dash-kpi:hover { border-color: rgba(255,255,255,0.12); }
.dash-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.dash-kpi.kv::before { background: linear-gradient(90deg, #4a7fe8, #6b9bf0); }
.dash-kpi.kt::before { background: linear-gradient(90deg, #10b981, #34d399); }
.dash-kpi.ku::before { background: linear-gradient(90deg, #a78bfa, #c4b5fd); }
.dash-kpi.ko::before { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.dash-kpi-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.dash-kpi-val {
  font-size: 26px;
  font-weight: 800;
  color: #f1f5f9;
  font-family: 'DM Mono', 'Courier New', monospace;
  line-height: 1;
}
.dash-kpi-val.money::before {
  content: '$';
  font-size: 14px;
  font-weight: 600;
  color: #4a6080;
  vertical-align: super;
  margin-right: 2px;
}
.dash-kpi-meta {
  font-size: 10px;
  color: #4a6080;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dash-kpi-ico {
  position: absolute;
  right: 14px; top: 14px;
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-kpi-ico.blue   { background: rgba(74,127,232,0.18); }
.dash-kpi-ico.green  { background: rgba(16,185,129,0.15); }
.dash-kpi-ico.purple { background: rgba(167,139,250,0.15); }
.dash-kpi-ico.gold   { background: rgba(245,158,11,0.15); }
.dash-kpi-ico svg { width: 16px; height: 16px; }

/* Chart cards */
.dash-cc {
  background: #161b27;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: invFadeUp 0.25s ease both;
}
.dash-cc-head {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-cc-t  { font-size: 12px; font-weight: 700; color: #f1f5f9; }
.dash-cc-s  { font-size: 9px; color: #4a6080; margin-top: 2px; }
.dash-cc-body { padding: 16px; flex: 1; }

/* Span helpers for dash grid */
.dash-span2 { grid-column: span 2; }
.dash-span4 { grid-column: span 4; }
.dash-side  { grid-column: 5; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 14px; }

/* Top productos rows */
.dash-tp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.dash-tp-row:last-child { border-bottom: none; }
.dash-tp-rank  { width: 20px; font-size: 10px; font-weight: 700; color: #4a6080; font-family: 'DM Mono', monospace; flex-shrink: 0; }
.dash-tp-name  { font-size: 11px; color: #94a3b8; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 10px; }
.dash-tp-val   { font-size: 11px; font-weight: 700; color: #10b981; font-family: 'DM Mono', monospace; flex-shrink: 0; }
.dash-empty    { font-size: 11px; color: #4a6080; font-style: italic; padding: 14px 0; text-align: center; }

/* Progress bars (vendedor / sucursal cards) */
.dash-vnd-row { display: flex; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.07); gap: 0; }
.dash-vnd-row:last-child { border-bottom: none; }
.dash-vnd-rank { width: 20px; font-size: 10px; font-weight: 700; color: #4a6080; font-family: 'DM Mono', monospace; flex-shrink: 0; }
.dash-vnd-name { font-size: 11px; color: #94a3b8; width: 110px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-vnd-bar-wrap { flex: 1; height: 4px; background: #252d42; border-radius: 2px; overflow: hidden; margin: 0 10px; }
.dash-vnd-bar     { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.dash-vnd-bar.blue  { background: linear-gradient(90deg, #1a3a8a, #4a7fe8); }
.dash-vnd-bar.green { background: linear-gradient(90deg, #065f46, #10b981); }
.dash-vnd-val  { font-size: 11px; font-weight: 700; color: #10b981; font-family: 'DM Mono', monospace; flex-shrink: 0; }

/* Canvas chart area */
#graficoVentas { max-height: 180px; }

/* ============================================================
   CLIENTES 2.0 — DARK GLASSMORPHISM
   ============================================================ */
#sec-clientes {
  margin: -20px !important; width: calc(100% + 40px) !important;
  min-height: 100vh !important; background: #0d1117 !important;
  color: #f1f5f9 !important; display: flex; font-family: 'Poppins', sans-serif;
  flex-direction: column !important; overflow: hidden !important;
}
.cli2-toolbar {
  padding: 14px 24px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; background: #161b27;
}
.cli2-search-wrap { flex: 1; max-width: 400px; position: relative; }
.cli2-search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #4a6080; }
.cli2-search-inp {
  width: 100%; background: #1e2538; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 9px 12px 9px 36px; font-size: 13px;
  color: #f1f5f9; font-family: 'Poppins', sans-serif; outline: none; transition: all 0.2s;
}
.cli2-search-inp:focus { border-color: #4a7fe8; box-shadow: 0 0 0 3px rgba(74,127,232,0.15); }
.cli2-search-inp::placeholder { color: #4a6080; }
.cli2-stat-badge { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; background: #1e2538; border: 1px solid rgba(255,255,255,0.12); }
.cli2-sb-val { font-size: 16px; font-weight: 800; color: #f1f5f9; font-family: 'Poppins', sans-serif; }
.cli2-sb-lbl { font-size: 12px; color: #4a6080; font-family: 'Poppins', sans-serif; }
.cli2-btn-new {
  display: flex !important; align-items: center !important; gap: 7px !important;
  padding: 9px 18px !important; border-radius: 10px !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  background-image: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  border: none !important; color: white !important; font-family: 'Poppins',sans-serif !important;
  font-size: 13px !important; font-weight: 700 !important; cursor: pointer !important;
  margin-left: auto !important; box-shadow: none !important;
}
.cli2-btn-new:hover { transform: translateY(-1px) !important; box-shadow: 0 5px 16px rgba(74,127,232,0.4) !important; }
.cli2-table-wrap { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }
.cli2-table-wrap::-webkit-scrollbar { width: 4px; }
.cli2-table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
.cli2-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: 'Poppins', sans-serif; }
.cli2-table thead { position: sticky; top: 0; z-index: 2; background: #161b27; }
.cli2-table th {
  padding: 12px 20px !important; text-align: left !important; font-size: 11px !important;
  font-weight: 700 !important; color: #4a6080 !important; text-transform: uppercase !important;
  letter-spacing: 1.2px !important; border: none !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  background: #161b27 !important; width: 25% !important; white-space: nowrap !important;
  font-family: 'Poppins', sans-serif !important;
}
.cli2-table td { padding: 0; border: none !important; }
.cli2-td-inner { display: flex; align-items: center; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); height: 66px; transition: background 0.1s; }
.cli2-table tr:hover .cli2-td-inner { background: rgba(74,127,232,0.04); }
.cli2-av { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: white; flex-shrink: 0; font-family: 'Poppins', sans-serif; }
.cli2-info { display: flex; flex-direction: column; gap: 2px; margin-left: 10px; }
.cli2-name { font-size: 14px; font-weight: 700; color: #f1f5f9; font-family: 'Poppins', sans-serif; }
.cli2-dni  { font-size: 12px; color: #4a6080; font-family: 'Poppins', sans-serif; }
.cli2-contact-item { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #94a3b8; font-family: 'Poppins', sans-serif; }
.cli2-contact-item + .cli2-contact-item { margin-top: 3px; }
.cli2-contact-item svg { width: 13px; height: 13px; color: #4a6080; flex-shrink: 0; }
.cli2-cta-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; font-family: 'Poppins', sans-serif; }
.cli2-cta-ok    { background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.cli2-cta-block { background: rgba(248,113,113,0.10); color: #f87171; border: 1px solid rgba(248,113,113,0.18); }
.cli2-cta-badge svg { width: 12px; height: 12px; }
.cli2-act-btns { display: flex; gap: 6px; align-items: center; }
.cli2-btn-ver {
  display: flex !important; align-items: center !important; gap: 5px !important;
  padding: 7px 13px !important; border-radius: 8px !important;
  background: rgba(74,127,232,0.15) !important; background-image: none !important;
  color: #6b9bf0 !important; border: 1px solid rgba(74,127,232,0.2) !important;
  cursor: pointer !important; font-family: 'Poppins',sans-serif !important;
  font-size: 12px !important; font-weight: 700 !important; box-shadow: none !important; transition: all 0.15s !important;
}
.cli2-btn-ver:hover { background: rgba(74,127,232,0.25) !important; }
.cli2-btn-del {
  display: flex !important; align-items: center !important; gap: 5px !important;
  padding: 7px 10px !important; border-radius: 8px !important;
  background: rgba(248,113,113,0.08) !important; background-image: none !important;
  color: #f87171 !important; border: 1px solid rgba(248,113,113,0.15) !important;
  cursor: pointer !important; font-family: 'Poppins',sans-serif !important;
  font-size: 12px !important; font-weight: 700 !important; box-shadow: none !important; transition: all 0.15s !important;
}
.cli2-btn-del:hover { background: rgba(248,113,113,0.18) !important; }

/* MODAL DETALLE CLIENTE 2.0 */
#modal-cli2 { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 5000; display: none; align-items: center; justify-content: center; padding: 20px; }
#modal-cli2.open { display: flex; }
.cli2-modal-box { background: #161b27; border: 1px solid rgba(255,255,255,0.07); border-radius: 20px; width: 100%; max-width: 520px; overflow: hidden; animation: invFadeUp 0.2s ease both; }
.cli2-modal-header { display: flex; align-items: flex-start; gap: 14px; padding: 20px 56px 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.07); position: relative; }
.cli2-modal-av { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg,#1a3a8a,#4a7fe8); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: white; flex-shrink: 0; font-family: 'Poppins',sans-serif; }
.cli2-modal-info { flex: 1; }
.cli2-modal-nombre { font-size: 17px; font-weight: 800; color: #f1f5f9; font-family: 'Poppins',sans-serif; }
.cli2-modal-meta   { font-size: 13px; color: #4a6080; margin-top: 2px; font-family: 'Poppins',sans-serif; }
.cli2-modal-badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.cli2-modal-actions { display: flex; gap: 6px; align-items: center; }
.cli2-modal-close { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 7px; background: rgba(255,255,255,0.05) !important; background-image: none !important; border: 1px solid rgba(255,255,255,0.07) !important; color: #4a6080; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: none !important; padding: 0 !important; transition: all 0.15s; }
.cli2-modal-close:hover { background: rgba(248,113,113,0.1) !important; border-color: rgba(248,113,113,0.3) !important; color: #f87171; }
.cli2-modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,0.07); }
.cli2-modal-section { background: #161b27; padding: 16px 18px; }
.cli2-msec-title { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #4a6080; margin-bottom: 12px; font-family: 'Poppins',sans-serif; }
.cli2-msec-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.cli2-msec-ico { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cli2-msec-ico.blue  { background: rgba(74,127,232,0.12); color: #6b9bf0; }
.cli2-msec-ico.teal  { background: rgba(16,185,129,0.1);  color: #10b981; }
.cli2-msec-ico.red   { background: rgba(248,113,113,0.1); color: #f87171; }
.cli2-msec-ico.green { background: rgba(16,185,129,0.1);  color: #10b981; }
.cli2-msec-val { font-size: 14px; font-weight: 600; color: #f1f5f9; font-family: 'Poppins',sans-serif; }
.cli2-msec-lbl { font-size: 12px; color: #4a6080; margin-top: 1px; font-family: 'Poppins',sans-serif; }
.cli2-modal-historial { padding: 14px 18px 18px; }
.cli2-mhis-title { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #4a6080; margin-bottom: 10px; font-family: 'Poppins',sans-serif; }
.cli2-mhis-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.cli2-mhis-date  { font-size: 13px; color: #4a6080; font-family: 'Poppins',sans-serif; flex-shrink: 0; width: 60px; }
.cli2-mhis-prod  { font-size: 13px; color: #94a3b8; flex: 1; margin: 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Poppins',sans-serif; }
.cli2-mhis-monto { font-size: 13px; font-weight: 700; color: #10b981; font-family: 'Poppins',sans-serif; flex-shrink: 0; }
.cli2-mhis-empty { font-size: 13px; color: #4a6080; font-style: italic; padding: 8px 0; text-align: center; font-family: 'Poppins',sans-serif; }

/* Condición fiscal — chips en tabla */
.cli2-cond-chip { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; margin-left: 4px; font-family: 'Poppins',sans-serif; }
.cli2-cond-cf { background: rgba(74,127,232,0.15); color: #6b9bf0; border: 1px solid rgba(74,127,232,0.25); }
.cli2-cond-ri { background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.22); }
.cli2-cond-mo { background: rgba(245,158,11,0.13); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
/* Avatares con color fiscal */
.cli2-av-cf { background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important; }
.cli2-av-ri { background: linear-gradient(135deg,#065f46,#10b981) !important; }
.cli2-av-mo { background: linear-gradient(135deg,#78350f,#f59e0b) !important; }
/* Modal avatar fiscal */
.cli2-modal-av.cf { background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important; }
.cli2-modal-av.ri { background: linear-gradient(135deg,#065f46,#10b981) !important; }
.cli2-modal-av.mo { background: linear-gradient(135deg,#78350f,#f59e0b) !important; }
/* Sección condición fiscal en modal (reemplaza historial) */
.cli2-modal-condicion { padding: 14px 18px 18px; border-top: 1px solid rgba(255,255,255,0.06); }
.cli2-cond-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.cli2-cond-sel { flex: 1; background: #1e2538 !important; background-image: none !important; border: 1px solid rgba(255,255,255,0.1) !important; border-radius: 8px !important; padding: 8px 12px !important; color: #f1f5f9 !important; font-family: 'Poppins',sans-serif !important; font-size: 13px !important; outline: none !important; cursor: pointer !important; box-shadow: none !important; }
.cli2-btn-cond-save { padding: 8px 16px !important; border-radius: 8px !important; background: rgba(74,127,232,0.15) !important; background-image: none !important; border: 1px solid rgba(74,127,232,0.25) !important; color: #6b9bf0 !important; font-size: 13px !important; font-weight: 700 !important; cursor: pointer !important; font-family: 'Poppins',sans-serif !important; box-shadow: none !important; transition: all 0.15s !important; }
.cli2-btn-cond-save:hover { background: rgba(74,127,232,0.28) !important; }
/* Paginador de clientes */
/* ── Nuevo Cliente modal (znc-) ─────────────────────────────── */
.znc-field { display: flex; flex-direction: column; gap: 5px; }
.znc-lbl { font-size: 12px; font-weight: 700; color: #4a6080; text-transform: uppercase; letter-spacing: .5px; font-family: 'Poppins',sans-serif; }
.znc-inp { background: rgba(255,255,255,.04) !important; border: 1px solid rgba(255,255,255,.09) !important; border-radius: 9px !important; padding: 9px 11px !important; color: #e2e8f0 !important; font-size: 13px !important; font-family: 'Poppins',sans-serif !important; outline: none !important; width: 100% !important; transition: border-color .15s; box-shadow: none !important; }
.znc-inp:focus { border-color: rgba(74,127,232,.5) !important; }
.znc-inp::placeholder { color: #374860 !important; }
.znc-sel { cursor: pointer !important; appearance: auto !important; }
/* ── /znc- ───────────────────────────────────────────────────── */
.cli2-paginator { display: flex; justify-content: center; gap: 5px; padding: 10px 16px 14px; align-items: center; flex-wrap: wrap; }
.cli2-pag-btn { min-width: 32px; height: 32px; border-radius: 7px; background: rgba(255,255,255,0.04) !important; background-image: none !important; border: 1px solid rgba(255,255,255,0.07) !important; color: #64748b !important; font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Poppins',sans-serif; display: inline-flex; align-items: center; justify-content: center; box-shadow: none !important; transition: all 0.13s; padding: 0 10px !important; }
.cli2-pag-btn.active { background: #4a7fe8 !important; border-color: #4a7fe8 !important; color: white !important; }
.cli2-pag-btn:hover:not(.active) { background: rgba(255,255,255,0.08) !important; color: #94a3b8 !important; }
.cli2-pag-info { font-size: 13px; color: #4a6080; padding: 0 4px; font-family: 'Poppins',sans-serif; }

/* ============================================================
   PROVEEDORES / COMPRAS — DARK THEME OVERRIDE
   ============================================================ */
#sec-proveedores {
  background: var(--inv-bg,#0d1117) !important;
  margin: -20px !important; padding: 20px 26px !important;
  width: calc(100% + 40px) !important; min-height: 100vh !important;
  box-sizing: border-box !important;
}
/* Título y botones */
#sec-proveedores h2 { color: #e2e8f0 !important; border-bottom-color: #4a7fe8 !important; }
#sec-proveedores h2[style*="color: #95a5a6"] { color: #4a6080 !important; }
/* Contenedores blancos → dark surface */
#vista-proveedores > div,
#vista-ordenes > div {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
/* Search bar */
#buscador-proveedores {
  background: #1e2538 !important; border: 1px solid rgba(255,255,255,0.1) !important;
  color: #f1f5f9 !important; border-radius: 8px !important;
}
#buscador-proveedores::placeholder { color: #4a6080 !important; }
#buscador-proveedores:focus { border-color: #4a7fe8 !important; box-shadow: 0 0 0 3px rgba(74,127,232,0.15) !important; }
/* Table heads y bodies */
#vista-proveedores table thead,
#vista-ordenes table thead {
  background: rgba(255,255,255,0.03) !important; color: #4a6080 !important;
}
#vista-proveedores table th,
#vista-ordenes table th {
  background: rgba(255,255,255,0.03) !important; color: #4a6080 !important;
  font-size: 0.7em !important; letter-spacing: 0.07em !important; text-transform: uppercase !important;
  border: none !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  padding: 11px 15px !important; font-weight: 700 !important;
}
#vista-proveedores table td,
#vista-ordenes table td {
  color: #e2e8f0 !important;
  border: none !important; border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  padding: 11px 15px !important; background: transparent !important;
}
#vista-proveedores table tr,
#vista-ordenes table tr { border: none !important; }
#vista-proveedores table tr:last-child td,
#vista-ordenes table tr:last-child td { border-bottom: none !important; }
#vista-proveedores table tbody tr:hover td,
#vista-ordenes table tbody tr:hover td { background: rgba(74,127,232,0.04) !important; }
/* Saldo en rojo/verde del proveedor */
#lista-proveedores-body td [style*="color:#e74c3c"] { color: #f87171 !important; }
#lista-proveedores-body td [style*="color:#27ae60"] { color: #10b981 !important; }
/* Nombre y razón social en la tabla */
#lista-proveedores-body td [style*="color:#2c3e50"] { color: #f1f5f9 !important; }
#lista-proveedores-body td [style*="color:#95a5a6"] { color: #4a6080 !important; }
#lista-proveedores-body td [style*="color:#555"]    { color: #94a3b8 !important; }

/* ============================================================
   AJUSTES 2.0 — DARK GLASSMORPHISM
   ============================================================ */
#sec-ajustes {
  margin: -20px !important; width: calc(100% + 40px) !important;
  min-height: 100vh !important; background: #0d1117 !important;
  color: #f1f5f9 !important; display: flex; font-family: 'Poppins', sans-serif;
  flex-direction: column !important; overflow: hidden !important;
}
.aj2-body { flex: 1; overflow: hidden; display: flex; }
.aj2-nav { width: 260px; flex-shrink: 0; background: #161b27; border-right: 1px solid rgba(255,255,255,0.07); overflow-y: auto; scrollbar-width: none; padding: 16px 0; }
.aj2-nav::-webkit-scrollbar { display: none; }
.aj2-acc-section { margin-bottom: 4px; }
.aj2-acc-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; cursor: pointer; transition: background 0.15s; }
.aj2-acc-head:hover { background: rgba(255,255,255,0.03); }
.aj2-acc-head-l { display: flex; align-items: center; gap: 10px; }
.aj2-acc-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.aj2-acc-icon.blue   { background: rgba(74,127,232,0.18); color: #6b9bf0; }
.aj2-acc-icon.green  { background: rgba(16,185,129,0.15); color: #10b981; }
.aj2-acc-icon.gold   { background: rgba(245,158,11,0.15); color: #f59e0b; }
.aj2-acc-icon.purple { background: rgba(167,139,250,0.15); color: #a78bfa; }
.aj2-acc-icon.red    { background: rgba(248,113,113,0.12); color: #f87171; }
.aj2-acc-icon svg { width: 16px; height: 16px; }
.aj2-acc-title { font-size: 14px; font-weight: 700; color: #f1f5f9; font-family: 'Poppins', sans-serif; }
.aj2-acc-sub   { font-size: 12px; color: #4a6080; font-family: 'Poppins', sans-serif; }
.aj2-acc-arrow { font-size: 12px; color: #4a6080; transition: transform 0.2s; display: inline-block; }
.aj2-acc-arrow.open { transform: rotate(180deg); }
.aj2-acc-body { overflow: hidden; max-height: 0; transition: max-height 0.25s ease; }
.aj2-acc-body.open { max-height: 300px; }
.aj2-acc-item { display: flex; align-items: center; gap: 8px; padding: 9px 18px 9px 60px; font-size: 13px; color: rgba(255,255,255,0.35); cursor: pointer; transition: all 0.15s; border-left: 2px solid transparent; margin-left: 16px; font-family: 'Poppins', sans-serif; }
.aj2-acc-item:hover { color: rgba(255,255,255,0.65); background: rgba(255,255,255,0.03); }
.aj2-acc-item.active { color: #6b9bf0; border-left-color: #4a7fe8; background: rgba(74,127,232,0.07); }
.aj2-acc-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; margin-left: -13px; }
.aj2-content { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }
.aj2-content::-webkit-scrollbar { width: 4px; }
.aj2-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
.aj2-hero { background: linear-gradient(135deg,rgba(74,127,232,0.08) 0%,rgba(107,155,240,0.04) 100%); border-bottom: 1px solid rgba(255,255,255,0.07); padding: 24px 32px; display: flex; align-items: center; gap: 20px; }
.aj2-hero-ico { width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0; background: rgba(74,127,232,0.18); border: 1px solid rgba(74,127,232,0.25); display: flex; align-items: center; justify-content: center; }
.aj2-hero-ico svg { width: 26px; height: 26px; color: #6b9bf0; }
.aj2-hero-t { font-size: 22px; font-weight: 800; color: #f1f5f9; font-family: 'Poppins', sans-serif; }
.aj2-hero-s { font-size: 13px; color: #4a6080; margin-top: 3px; font-family: 'Poppins', sans-serif; }
.aj2-sections { padding: 24px 32px; display: flex; flex-direction: column; gap: 20px; }
.aj2-section-group { background: #161b27; border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; overflow: hidden; }
.aj2-sg-head { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.07); display: flex; align-items: center; gap: 8px; }
.aj2-sg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.aj2-sg-dot.blue   { background: #4a7fe8; }
.aj2-sg-dot.green  { background: #10b981; }
.aj2-sg-dot.gold   { background: #f59e0b; }
.aj2-sg-dot.purple { background: #a78bfa; }
.aj2-sg-title { font-size: 13px; font-weight: 700; color: #f1f5f9; font-family: 'Poppins', sans-serif; }
.aj2-sr { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.1s; }
.aj2-sr:last-child { border-bottom: none; }
.aj2-sr:hover { background: rgba(255,255,255,0.02); }
.aj2-sr-l { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.aj2-sr-ico { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.aj2-sr-ico.blue   { background: rgba(74,127,232,0.15); color: #6b9bf0; }
.aj2-sr-ico.green  { background: rgba(16,185,129,0.12); color: #10b981; }
.aj2-sr-ico.gold   { background: rgba(245,158,11,0.12); color: #f59e0b; }
.aj2-sr-ico.purple { background: rgba(167,139,250,0.12); color: #a78bfa; }
.aj2-sr-ico.red    { background: rgba(248,113,113,0.1); color: #f87171; }
.aj2-sr-ico svg { width: 15px; height: 15px; }
.aj2-sr-t { font-size: 14px; font-weight: 600; color: #f1f5f9; font-family: 'Poppins', sans-serif; }
.aj2-sr-s { font-size: 12px; color: #4a6080; margin-top: 2px; font-family: 'Poppins', sans-serif; }
.aj2-sr-r { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.aj2-inp { background: #1e2538; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 8px 12px; color: #f1f5f9; font-family: 'Poppins',sans-serif; font-size: 14px; outline: none; transition: all 0.15s; width: 200px; }
.aj2-inp:focus { border-color: #4a7fe8; box-shadow: 0 0 0 3px rgba(74,127,232,0.15); }
.aj2-inp::placeholder { color: #4a6080; }
.aj2-toggle { width: 38px !important; height: 20px !important; min-height: 20px !important; min-width: 38px !important; max-height: 20px !important; border-radius: 10px !important; background: #252d42 !important; background-color: #252d42 !important; border: none !important; cursor: pointer !important; position: relative; transition: background 0.2s; flex-shrink: 0; background-image: none !important; box-shadow: none !important; padding: 0 !important; line-height: 1 !important; }
.aj2-toggle.on { background: #4a7fe8 !important; }
.aj2-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,0.5); transition: all 0.2s; }
.aj2-toggle.on::after { left: 21px; background: white; }
.aj2-logo-wrap { width: 90px; height: 90px; border-radius: 50%; background: #1e2538; border: 2px dashed rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; position: relative; flex-shrink: 0; }
.aj2-logo-wrap:hover { border-color: #4a7fe8; }
.aj2-logo-wrap img { width: 100%; height: 100%; object-fit: cover; display: none; }
.aj2-logo-placeholder { color: #4a6080; }
.aj2-color-row { display: flex; gap: 10px; align-items: center; }
.aj2-sw { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; flex-shrink: 0; }
.aj2-sw.active { border-color: white; box-shadow: 0 0 0 2px rgba(255,255,255,0.3); transform: scale(1.1); }
.aj2-tbl { width: 100%; border-collapse: collapse; font-family: 'Poppins', sans-serif; }
.aj2-tbl th { padding: 12px 16px !important; font-size: 11px !important; font-weight: 700 !important; color: #4a6080 !important; text-transform: uppercase !important; letter-spacing: 1px !important; background: rgba(255,255,255,0.03) !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important; text-align: left !important; font-family: 'Poppins', sans-serif !important; }
.aj2-tbl td { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 14px; color: #f1f5f9; font-family: 'Poppins', sans-serif; }
.aj2-tbl tr:last-child td { border-bottom: none; }
.aj2-pin-dots { display: flex; gap: 4px; align-items: center; }
.aj2-pin-dot { width: 8px; height: 8px; border-radius: 50%; background: #4a6080; }
.aj2-role-badge { display: inline-flex; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; font-family: 'Poppins', sans-serif; }
.aj2-role-badge.admin  { background: rgba(74,127,232,0.15); color: #6b9bf0; }
.aj2-role-badge.encarg { background: rgba(245,158,11,0.12); color: #f59e0b; }
.aj2-role-badge.cajero { background: rgba(16,185,129,0.12); color: #10b981; }
.aj2-save-btn {
  display: flex !important; align-items: center !important; justify-content: center !important;
  gap: 8px !important; width: 100% !important; padding: 14px !important;
  border-radius: 12px !important; border: none !important;
  background: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  background-image: linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  color: white !important; font-family: 'Poppins',sans-serif !important;
  font-size: 14px !important; font-weight: 700 !important; cursor: pointer !important;
  box-shadow: none !important; margin-top: 8px !important;
}
.aj2-save-btn:hover { opacity: 0.9 !important; }
.aj2-new-user-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.aj2-field-label { font-size: 12px; font-weight: 700; color: #4a6080; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 5px; font-family: 'Poppins', sans-serif; }
.aj2-btn-add {
  display: flex !important; align-items: center !important; justify-content: center !important;
  gap: 7px !important; width: 100% !important; padding: 11px !important;
  border-radius: 9px !important; border: none !important;
  background: rgba(74,127,232,0.18) !important; background-image: none !important;
  color: #6b9bf0 !important; font-family: 'Poppins',sans-serif !important;
  font-size: 13px !important; font-weight: 700 !important; cursor: pointer !important;
  box-shadow: none !important;
}
.aj2-btn-add:hover { background: rgba(74,127,232,0.28) !important; }
.aj2-sub-panel { display: none; }
.aj2-sub-panel.active { display: block; }


/* ============================================================
   TICKET HÍBRIDO — Idea2 (header+items) + Idea3 (pagos)
   ============================================================ */

/* Línea de luz superior del ticket */
.pos2-ticket { position: relative; }
.pos2-ticket::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74,127,232,0.5), transparent);
  pointer-events: none;
  z-index: 1;
}

/* -- Header rediseñado (Idea 2) -- */
.pos2-ticket-hdr {
  padding: 14px 16px 12px !important;
  background: rgba(17,24,39,0.98) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
.pos2-ticket-top { margin-bottom: 12px !important; }
.pos2-ticket-title {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  letter-spacing: 0.3px !important;
  text-transform: none !important;
}
.pos2-ticket-count {
  font-size: 10px !important;
  background: rgba(74,127,232,0.18) !important;
  color: #6b9bf0 !important;
  border: 1px solid rgba(74,127,232,0.25) !important;
}

/* Ocultar el area de cliente vieja */
.pos2-cli-area { background: transparent !important; border: none !important; padding: 0 !important; }
.pos2-cli-display { display: none !important; }

/* Nueva fila DNI + avatar bubble */
.pos2-cli-row2 { display: flex; align-items: flex-start; gap: 9px; }
.pos2-cli-av2 {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1a2a52, #2a4a8a);
  border: 1px solid rgba(74,127,232,0.3);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #6b9bf0;
  position: relative;
}
.pos2-cli-pulse {
  position: absolute; inset: -4px;
  border-radius: 15px;
  border: 1px solid rgba(74,127,232,0.3);
  animation: pos2Pulse 2.5s infinite;
}
@keyframes pos2Pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 0; transform: scale(1.15); }
}
.pos2-cli-right { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pos2-cli-search {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 8px !important;
  padding: 7px 10px !important;
  display: flex !important; align-items: center !important;
}
.pos2-cli-search input { font-size: 12px !important; color: #e2e8f0 !important; }
.pos2-cli-search input::placeholder { color: #2a3a58 !important; }
.pos2-cli-sub {
  display: flex; align-items: center; justify-content: space-between; padding: 0 2px;
}
.pos2-cli-name { font-size: 10px !important; font-weight: 600 !important; color: #7a9fd4 !important; flex: 1 !important; }
.pos2-cli-clear {
  font-size: 10px !important; color: #3a5580 !important; cursor: pointer !important;
  padding: 2px 5px !important; border-radius: 4px !important;
}
.pos2-cli-clear:hover { color: #ef4444 !important; }

/* Nuevo cliente form (slide-down Idea 2) */
#form-cliente-nuevo-pos {
  margin-top: 10px !important;
  background: rgba(241,196,15,0.04) !important;
  border: 1px solid rgba(241,196,15,0.18) !important;
  border-radius: 10px !important;
  padding: 11px !important;
  display: none;
}
#form-cliente-nuevo-pos.pos2-nc-open { display: block !important; }
.pos2-nc-header { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.pos2-nc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f1c40f; box-shadow: 0 0 6px rgba(241,196,15,0.6); flex-shrink: 0;
}
.pos2-nc-title {
  font-size: 9px; font-weight: 700; color: #f1c40f; letter-spacing: 0.5px; text-transform: uppercase;
}
.pos2-nc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pos2-nc-inp {
  background: rgba(255,255,255,0.04) !important; border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 7px !important; padding: 6px 9px !important; color: #e2e8f0 !important;
  font-size: 11px !important; outline: none !important; font-family: 'Poppins', sans-serif !important;
  width: 100% !important;
}
.pos2-nc-inp::placeholder { color: #2a3a58 !important; }
.pos2-nc-inp.full { grid-column: span 2 !important; }
.pos2-nc-sel { cursor: pointer !important; appearance: auto !important; }
.pos2-nc-save {
  grid-column: span 2 !important;
  background: rgba(241,196,15,0.12) !important; background-image: none !important;
  border: 1px solid rgba(241,196,15,0.28) !important; border-radius: 7px !important;
  color: #f1c40f !important; font-size: 9px !important; font-weight: 700 !important;
  cursor: pointer !important; padding: 7px !important; letter-spacing: 1px !important;
  text-transform: uppercase !important; width: 100% !important; box-shadow: none !important; margin-top: 2px;
}
.pos2-nc-save:hover { background: rgba(241,196,15,0.22) !important; }

/* Items lista */
.pos2-ticket-items { padding: 6px 14px !important; }
.pos2-t-name { font-size: 11px !important; font-weight: 600 !important; color: #c0cfe8 !important; }
.pos2-t-price { font-size: 9px !important; color: #3a5580 !important; }
.pos2-t-total { font-size: 12px !important; font-weight: 800 !important; color: #e2e8f0 !important; }

/* Totales */
.pos2-totals { padding: 10px 16px 8px !important; border-bottom: 1px solid rgba(255,255,255,0.05) !important; }
.pos2-tot-main .pos2-tot-lbl { font-size: 12px !important; font-weight: 700 !important; color: #94afd4 !important; }
.pos2-tot-main .pos2-tot-val {
  font-size: 22px !important; font-weight: 900 !important;
  background: linear-gradient(135deg, #e2e8f0, #6b9bf0) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ---- FOOTER PAGOS (Idea 3 — dark blue background) ---- */
.pos2-ticket-ftr {
  background: #101520 !important;
  border-top: 1px solid rgba(74,127,232,0.12) !important;
}
.pos2-pago-section { padding: 10px 16px 8px !important; border-bottom: 1px solid rgba(255,255,255,0.04) !important; }
.pos2-pago-hdr { margin-bottom: 8px !important; }
.pos2-pago-lbl { font-size: 9px !important; font-weight: 700 !important; color: #3a5580 !important; letter-spacing: 2px !important; }

/* Filas horizontales de pago (Idea 3) */
.pos2-pago-inputs {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}
.pos2-pi {
  display: flex !important; align-items: center !important; gap: 8px !important;
}
.pos2-pi label {
  font-size: 9px !important; font-weight: 700 !important;
  text-transform: uppercase !important; letter-spacing: 0.5px !important;
  min-width: 96px !important; display: flex !important; align-items: center !important; gap: 6px !important;
  margin-bottom: 0 !important;
}
.pos2-pi label::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.pos2-pi.efe label { color: #22c55e !important; }
.pos2-pi.efe label::before { background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,0.6); }
.pos2-pi.tra label { color: #3b82f6 !important; }
.pos2-pi.tra label::before { background: #3b82f6; box-shadow: 0 0 5px rgba(59,130,246,0.6); }
.pos2-pi.tar label { color: #a855f7 !important; }
.pos2-pi.tar label::before { background: #a855f7; box-shadow: 0 0 5px rgba(168,85,247,0.6); }
.pos2-pi.ctc label { color: #f59e0b !important; }
.pos2-pi.ctc label::before { background: #f59e0b; box-shadow: 0 0 5px rgba(245,158,11,0.6); }
.pos2-pi input {
  flex: 1 !important; background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.07) !important; border-radius: 7px !important;
  padding: 5px 9px !important; color: #e2e8f0 !important;
  font-size: 12px !important; font-weight: 600 !important; text-align: right !important;
}
.pos2-pi input:focus { border-color: rgba(74,127,232,0.4) !important; }
.pos2-pi input:disabled { opacity: 0.2 !important; cursor: not-allowed !important; }

/* Confirm area en dark blue */
.pos2-confirm-area { padding: 8px 16px 14px !important; }
.pos2-restante-row { margin-bottom: 8px !important; }
.pos2-restante-lbl { font-size: 10px !important; color: #3a5580 !important; }
.pos2-restante-val { font-size: 14px !important; font-weight: 800 !important; color: #4a7fe8 !important; }


/* ============================================================
   POS GRID LAYOUT — ticket arranca en chips bar
   Cálculo: 460px × 0.8 (zoom) × 1.5 (50% más ancho) = 552px
   ============================================================ */

/* POS LAYOUT — flexbox anidado (sin grid, más predecible) */
/* sec-pos ya tiene display:flex + flex-direction:column en inline style */
.pos2-body-row {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.pos2-left-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
/* pos2-main dentro de left-col ocupa el resto */
.pos2-left-col .pos2-main {
  flex: 1;
  display: flex !important;
  overflow: hidden !important;
  min-height: 0;
}
/* Ticket ocupa columna derecha — arranca al nivel de los chips */
.pos2-body-row > .pos2-ticket {
  width: 552px !important;
  flex-shrink: 0;
  height: 100% !important;
  min-height: 0;
  border-left: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* ============================================================
   TICKET — compactado inteligente para más espacio en items
   Factor: × 0.8 en padding/márgenes, mismas proporciones
   ============================================================ */

/* Header compacto */
.pos2-ticket-hdr {
  padding: 10px 14px 9px !important;
}
.pos2-ticket-top {
  margin-bottom: 9px !important;
}
.pos2-cli-av2 {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
  font-size: 11px !important;
}
.pos2-cli-pulse {
  inset: -3px !important;
  border-radius: 12px !important;
}
.pos2-cli-right { gap: 3px !important; }
.pos2-cli-search {
  padding: 5px 9px !important;
}
.pos2-cli-search input {
  font-size: 11px !important;
}

/* Nuevo cliente form compacto */
#form-cliente-nuevo-pos {
  margin-top: 8px !important;
  padding: 9px !important;
}
.pos2-nc-grid { gap: 4px !important; }
.pos2-nc-inp {
  padding: 5px 8px !important;
  font-size: 10px !important;
}
.pos2-nc-save {
  padding: 5px !important;
  font-size: 8px !important;
}

/* Items: padding generoso para air, sin scroll */
.pos2-ticket-items {
  padding: 4px 12px !important;
  overflow-y: auto !important;
}
.pos2-t-item {
  padding: 7px 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
.pos2-t-name { font-size: 11px !important; }
.pos2-t-price { font-size: 9px !important; }
.pos2-t-total { font-size: 11px !important; }
.pos2-qb {
  width: 17px !important;
  height: 17px !important;
}
.pos2-qn { font-size: 10px !important; }

/* Empty state */
.pos2-empty-ticket { gap: 7px !important; }
.pos2-empty-ticket p { font-size: 10px !important; }

/* Totales compactos */
.pos2-totals {
  padding: 8px 14px 6px !important;
}
.pos2-tot-row { margin-bottom: 1px !important; }
.pos2-tot-lbl { font-size: 9px !important; }
.pos2-tot-val { font-size: 9px !important; }
.pos2-tot-main .pos2-tot-lbl { font-size: 11px !important; }
.pos2-tot-main .pos2-tot-val { font-size: 19px !important; }

/* Pagos compactos */
.pos2-pago-section {
  padding: 7px 14px 6px !important;
}
.pos2-pago-hdr { margin-bottom: 6px !important; }
.pos2-pago-inputs { gap: 4px !important; }
.pos2-pi { gap: 7px !important; }
.pos2-pi label {
  font-size: 8px !important;
  min-width: 82px !important;
  gap: 5px !important;
}
.pos2-pi label::before { width: 5px !important; height: 5px !important; }
.pos2-pi input {
  padding: 4px 8px !important;
  font-size: 11px !important;
}

/* Confirmar compacto */
.pos2-confirm-area {
  padding: 6px 14px 10px !important;
}
.pos2-restante-row { margin-bottom: 6px !important; }
.pos2-restante-lbl { font-size: 9px !important; }
.pos2-restante-val { font-size: 12px !important; }
.pos2-btn-confirm {
  padding: 10px !important;
  font-size: 11px !important;
  margin-bottom: 5px !important;
}
.pos2-btn-jornada {
  padding: 7px !important;
  font-size: 9px !important;
}

/* ============================================================
   CAMBIO 2 — Botones paginación POS
   ============================================================ */
.pos2-pag-btn {
  background: rgba(255,255,255,0.04) !important;
  background-image: none !important;
  border: 1px solid rgba(74,127,232,0.25) !important;
  color: #6b9bf0 !important;
  border-radius: 20px !important;
  padding: 5px 18px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  box-shadow: none !important;
}
.pos2-pag-btn:hover {
  background: rgba(74,127,232,0.12) !important;
  border-color: rgba(74,127,232,0.5) !important;
  color: #94b8f8 !important;
}
.pos2-pag-btn--back {
  color: #4a6080 !important;
  border-color: rgba(255,255,255,0.08) !important;
}

/* ============================================================
   CAMBIO 3 — Topbar: search + jornada pill + avatar
   ============================================================ */
.pos2-topbar {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  background: #0d1117;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
/* Search ocupa solo la columna izquierda */
.pos2-topbar > .pos2-search-wrap {
  flex: 1;
  min-width: 0;
  border-bottom: none;
  padding: 8px 16px;
}
/* Right: ancho igual al ticket, contiene pill + avatar */
.pos2-topbar-right {
  width: 552px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px;
  gap: 10px;
  background: rgba(10,14,26,0.9);
  border-left: 1px solid rgba(255,255,255,0.08);
}
.pos2-jornada-pill {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 12px !important;
  background: rgba(74,127,232,0.1) !important;
  background-image: none !important;
  border: 1px solid rgba(74,127,232,0.3) !important;
  border-radius: 20px !important;
  color: #6b9bf0 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}
.pos2-jornada-pill:hover {
  background: rgba(74,127,232,0.2) !important;
  border-color: rgba(74,127,232,0.5) !important;
}
.pos2-jornada-pill i { font-size: 10px !important; color: #4a7fe8 !important; }
.pos2-topbar-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a2a52, #2a4a8a);
  border: 1.5px solid rgba(74,127,232,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #6b9bf0;
  cursor: pointer; flex-shrink: 0;
}

/* ============================================================
   CAMBIO 4 — Badge colores condición fiscal
   ============================================================ */
.pos2-cli-av2.cf { background: linear-gradient(135deg,#1a3a8a,#2a5ac8) !important; color: #93c5fd !important; }
.pos2-cli-av2.ri { background: linear-gradient(135deg,#14532d,#166534) !important; color: #86efac !important; }
.pos2-cli-av2.mo { background: linear-gradient(135deg,#78350f,#92400e) !important; color: #fcd34d !important; }

/* ============================================================
   ZCAT — Gestión de Categorías (Idea 3)
   ============================================================ */
.zcat-page { max-width: 1000px; margin: 0 auto; padding: 28px; }

/* Header */
.zcat-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.zcat-title { font-size:22px; font-weight:900; color:#f1f5f9; }
.zcat-subtitle { font-size:12px; color:#4a6080; margin-top:2px; }
.zcat-header-right { display:flex; gap:10px; align-items:center; }
.zcat-search {
  display:flex; align-items:center; gap:8px;
  background:#161b27; border:1.5px solid rgba(255,255,255,0.11);
  border-radius:10px; padding:8px 12px; width:260px; transition:border-color .2s;
}
.zcat-search:focus-within { border-color:#4a7fe8; box-shadow:0 0 0 3px rgba(74,127,232,0.18); }
.zcat-search input { background:transparent; border:none; flex:1; font-size:11px; color:#f1f5f9; font-family:'Poppins',sans-serif; outline:none; }
.zcat-search input::placeholder { color:#4a6080; }
.zcat-btn-new {
  display:flex !important; align-items:center !important; gap:7px !important;
  padding:9px 16px !important; border-radius:10px !important;
  background:linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  background-image:linear-gradient(135deg,#1a3a8a,#4a7fe8) !important;
  border:none !important; color:white !important; font-family:'Poppins',sans-serif !important;
  font-size:11px !important; font-weight:700 !important; cursor:pointer !important;
  box-shadow:0 3px 12px rgba(74,127,232,0.3) !important; white-space:nowrap !important;
  transition:all .15s !important;
}
.zcat-btn-new:hover { transform:translateY(-1px) !important; }

/* Summary bar */
.zcat-summary {
  display:flex; align-items:center; flex-wrap:wrap; gap:10px;
  padding:10px 16px; background:#161b27; border:1px solid rgba(255,255,255,0.07);
  border-radius:12px; margin-bottom:16px;
}
.zcat-sb-item { display:flex; align-items:center; gap:6px; }
.zcat-sb-dot { width:8px; height:8px; border-radius:50%; }
.zcat-sb-txt { font-size:10px; color:#4a6080; }
.zcat-sb-val { font-size:10px; font-weight:700; color:#94a3b8; font-family:'DM Mono',monospace; }
.zcat-sb-sep { width:1px; height:14px; background:rgba(255,255,255,0.11); }

/* Table */
.zcat-table { background:#161b27; border:1px solid rgba(255,255,255,0.07); border-radius:14px; overflow:hidden; animation:zcatFadeUp .2s ease; }
@keyframes zcatFadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.zcat-thead {
  display:grid; grid-template-columns:36px 1fr 80px 120px 90px 120px;
  padding:10px 16px; border-bottom:1px solid rgba(255,255,255,0.07);
  background:rgba(255,255,255,0.02);
}
.zcat-th { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:#4a6080; }
.zcat-th-r { text-align:right; }
.zcat-th-c { text-align:center; }

/* Row */
.zcat-row {
  display:grid; grid-template-columns:36px 1fr 80px 120px 90px 120px;
  align-items:center; padding:11px 16px;
  border-bottom:1px solid rgba(255,255,255,0.07);
  transition:background .1s; cursor:pointer; position:relative;
}
.zcat-row:hover { background:rgba(255,255,255,0.025); }
.zcat-row.expanded { background:rgba(74,127,232,0.04); border-left:3px solid #4a7fe8; }
.zcat-row.inactive { opacity:.5; }

.zcat-drag { font-size:12px; color:#4a6080; cursor:grab; opacity:.4; }
.zcat-name-cell { min-width:0; }
.zcat-name { font-size:12px; font-weight:700; color:#f1f5f9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zcat-slug { font-size:9px; color:#4a6080; }
.zcat-name-edit {
  display:none; background:#1e2538; border:1.5px solid rgba(255,255,255,0.11);
  border-radius:7px; padding:5px 9px; font-size:12px; color:#f1f5f9;
  font-family:'Poppins',sans-serif; outline:none; width:100%;
}
.zcat-name-edit:focus { border-color:#4a7fe8; }
.zcat-row.editing .zcat-name { display:none; }
.zcat-row.editing .zcat-slug { display:none; }
.zcat-row.editing .zcat-name-edit { display:block; }

.zcat-prods { font-size:12px; font-weight:700; color:#94a3b8; text-align:right; }
.zcat-subcats-cell { text-align:center; }
.zcat-sub-btn {
  display:inline-flex !important; align-items:center !important; gap:4px !important;
  padding:3px 10px !important; border-radius:14px !important;
  background:#1e2538 !important; background-image:none !important;
  border:1px solid rgba(255,255,255,0.11) !important;
  font-size:9px !important; font-weight:700 !important; color:#4a6080 !important;
  cursor:pointer !important; transition:all .15s !important; box-shadow:none !important;
}
.zcat-sub-btn.has-subs { background:rgba(74,127,232,0.1) !important; border-color:rgba(74,127,232,0.2) !important; color:#6b9bf0 !important; }
.zcat-sub-btn:hover { border-color:#4a7fe8 !important; color:#6b9bf0 !important; }

.zcat-toggle-cell { display:flex; justify-content:center; }
.zcat-tog {
  width:34px; height:18px; border-radius:9px; border:none !important;
  cursor:pointer !important; position:relative; transition:background .2s;
  background-image:none !important;
}
.zcat-tog.on { background:#4a7fe8 !important; }
.zcat-tog.off { background:#252d42 !important; }
.zcat-tog::after { content:''; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:white; transition:transform .2s; box-shadow:0 1px 4px rgba(0,0,0,.3); }
.zcat-tog.on::after { transform:translateX(16px); }

.zcat-actions-cell { display:flex; align-items:center; gap:5px; justify-content:flex-end; }
.zcat-act-btn {
  width:28px !important; height:28px !important; border-radius:7px !important;
  background:rgba(255,255,255,0.03) !important; background-image:none !important;
  border:1px solid rgba(255,255,255,0.11) !important;
  color:#4a6080 !important; font-size:12px !important; cursor:pointer !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  transition:all .15s !important; box-shadow:none !important;
}
.zcat-act-btn:hover { border-color:#6b9bf0 !important; color:#6b9bf0 !important; }
.zcat-act-btn.del:hover { border-color:#f87171 !important; color:#f87171 !important; }

/* Subrow panel */
.zcat-subrow {
  display:none; background:rgba(74,127,232,0.03);
  border-bottom:1px solid rgba(74,127,232,0.08);
  animation:zcatSlideDown .18s ease;
}
.zcat-subrow.show { display:block; }
@keyframes zcatSlideDown { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }
.zcat-subrow-inner { padding:10px 100px 14px 100px; }
.zcat-subrow-title { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:#4a6080; margin-bottom:8px; }
.zcat-subrow-list { display:flex; flex-direction:column; gap:5px; margin-bottom:10px; }
.zcat-sr-item {
  display:flex; align-items:center; gap:10px;
  padding:7px 12px; background:#1e2538;
  border:1px solid rgba(255,255,255,0.07); border-radius:8px;
  transition:border-color .12s;
}
.zcat-sr-item:hover { border-color:rgba(74,127,232,0.25); }
.zcat-sr-line { width:12px; height:1px; background:rgba(255,255,255,0.11); flex-shrink:0; }
.zcat-sr-name { flex:1; font-size:11px; font-weight:600; color:#94a3b8; }
.zcat-sr-cnt { font-size:9px; color:#4a6080; background:#252d42; padding:1px 7px; border-radius:7px; }
.zcat-sr-tog {
  width:28px; height:16px; border-radius:8px; border:none !important;
  cursor:pointer !important; position:relative; transition:background .2s;
  background-image:none !important;
}
.zcat-sr-tog.on { background:#4a7fe8 !important; }
.zcat-sr-tog.off { background:#252d42 !important; }
.zcat-sr-tog::after { content:''; position:absolute; top:2px; left:2px; width:12px; height:12px; border-radius:50%; background:white; transition:transform .2s; }
.zcat-sr-tog.on::after { transform:translateX(12px); }
.zcat-sr-del {
  width:22px !important; height:22px !important; border-radius:5px !important;
  background:rgba(248,113,113,0.06) !important; background-image:none !important;
  border:1px solid rgba(248,113,113,0.12) !important; color:#f87171 !important;
  font-size:10px !important; cursor:pointer !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  box-shadow:none !important;
}

/* Add sub form */
.zcat-sraf { display:none; gap:6px; align-items:center; }
.zcat-sraf.show { display:flex; }
.zcat-sraf-input {
  flex:1; background:#1e2538; border:1.5px solid rgba(255,255,255,0.11);
  border-radius:7px; padding:6px 10px; font-size:11px; color:#f1f5f9;
  font-family:'Poppins',sans-serif; outline:none;
}
.zcat-sraf-input:focus { border-color:#4a7fe8; }
.zcat-sraf-input::placeholder { color:#4a6080; }
.zcat-sraf-save {
  padding:6px 12px !important; border-radius:7px !important; background:#4a7fe8 !important;
  background-image:none !important; border:none !important; color:white !important;
  font-family:'Poppins',sans-serif !important; font-size:11px !important;
  font-weight:700 !important; cursor:pointer !important;
}
.zcat-sraf-cancel {
  padding:6px 10px !important; border-radius:7px !important;
  background:rgba(255,255,255,0.03) !important; background-image:none !important;
  border:1px solid rgba(255,255,255,0.11) !important; color:#4a6080 !important;
  font-size:11px !important; cursor:pointer !important; font-family:'Poppins',sans-serif !important;
}
.zcat-btn-add-sr {
  display:flex !important; align-items:center !important; gap:5px !important;
  padding:5px 12px !important; border-radius:7px !important;
  background:rgba(74,127,232,0.07) !important; background-image:none !important;
  border:1px dashed rgba(74,127,232,0.25) !important;
  color:#6b9bf0 !important; font-family:'Poppins',sans-serif !important;
  font-size:10px !important; font-weight:600 !important; cursor:pointer !important;
  transition:all .15s !important; box-shadow:none !important;
}
.zcat-btn-add-sr:hover { background:rgba(74,127,232,0.12) !important; }

/* Add row bottom */
.zcat-addrow {
  display:flex; align-items:center; gap:12px; padding:11px 16px;
  cursor:pointer; border-top:1px dashed rgba(255,255,255,0.11); transition:background .12s;
}
.zcat-addrow:hover { background:rgba(74,127,232,0.04); }
.zcat-plus-circle {
  width:30px; height:30px; border-radius:8px;
  background:rgba(74,127,232,0.1); border:1px solid rgba(74,127,232,0.2);
  display:flex; align-items:center; justify-content:center;
  font-size:16px; color:#6b9bf0;
}
.zcat-add-txt { font-size:12px; font-weight:600; color:#4a6080; }
.zcat-addrow:hover .zcat-add-txt { color:#6b9bf0; }
.zcat-addrow-form {
  display:none; padding:10px 16px; gap:10px; align-items:center;
  border-top:1px dashed rgba(74,127,232,0.25); background:rgba(74,127,232,0.04);
}
.zcat-addrow-form.show { display:flex; }
.zcat-caf-input {
  flex:1; background:#1e2538; border:1.5px solid rgba(255,255,255,0.11);
  border-radius:8px; padding:8px 12px; font-size:12px; color:#f1f5f9;
  font-family:'Poppins',sans-serif; outline:none;
}
.zcat-caf-input:focus { border-color:#4a7fe8; }
.zcat-caf-input::placeholder { color:#4a6080; }
.zcat-caf-save {
  padding:8px 16px !important; border-radius:8px !important; background:#4a7fe8 !important;
  background-image:none !important; border:none !important; color:white !important;
  font-family:'Poppins',sans-serif !important; font-size:12px !important;
  font-weight:700 !important; cursor:pointer !important;
}
.zcat-caf-cancel {
  padding:8px 12px !important; border-radius:8px !important;
  background:rgba(255,255,255,0.03) !important; background-image:none !important;
  border:1px solid rgba(255,255,255,0.11) !important; color:#4a6080 !important;
  font-size:11px !important; cursor:pointer !important; font-family:'Poppins',sans-serif !important;
}


/* ============================================================
   ZCAT — Correcciones v2
   ============================================================ */

/* 1. Fondo oscuro en la sección */
#sec-productos-categorias { background: #0d1117 !important; }

/* 2. Ocultar slug */
.zcat-slug { display: none !important; }

/* 4+5. Reset padding del button global para todos los elementos zcat */
.zcat-tog, .zcat-sr-tog, .zcat-act-btn, .zcat-sub-btn,
.zcat-sraf-save, .zcat-sraf-cancel, .zcat-btn-add-sr,
.zcat-caf-save, .zcat-caf-cancel, .zcat-btn-new {
  box-sizing: border-box !important;
  min-height: 0 !important;
  line-height: 1 !important;
}

/* Toggle switch — tamaño exacto, sin padding */
.zcat-tog {
  width: 36px !important; height: 20px !important;
  border-radius: 10px !important;
  padding: 0 !important; flex-shrink: 0 !important;
}
.zcat-tog::after {
  top: 3px !important; left: 3px !important;
  width: 14px !important; height: 14px !important;
}
.zcat-tog.on::after { transform: translateX(16px) !important; }

.zcat-sr-tog {
  width: 30px !important; height: 17px !important;
  border-radius: 9px !important;
  padding: 0 !important; flex-shrink: 0 !important;
}
.zcat-sr-tog::after {
  top: 2px !important; left: 2px !important;
  width: 13px !important; height: 13px !important;
}
.zcat-sr-tog.on::after { transform: translateX(13px) !important; }

/* Sub-btn — píldora */
.zcat-sub-btn {
  padding: 4px 12px !important;
  border-radius: 20px !important;
  height: auto !important;
}

/* Action buttons — cuadrados con curva */
.zcat-act-btn {
  width: 28px !important; height: 28px !important;
  border-radius: 7px !important;
  padding: 0 !important; flex-shrink: 0 !important;
}

/* Drag-over visual */
.zcat-row.drag-over {
  background: rgba(74,127,232,0.08) !important;
  outline: 2px solid rgba(74,127,232,0.4) !important;
  outline-offset: -2px !important;
}
.zcat-row[draggable="true"] { cursor: grab !important; }
.zcat-row[draggable="true"]:active { cursor: grabbing !important; }

/* Fondo del contenedor principal — toda la app es dark theme */
.main-content {
  background-color: #0d1117 !important;
}

/* ================================================================
   PVL â€” POS Vista Lista (facturero)
   Namespace: pvl-*  |  No pisar nada de pos2-*
   ================================================================ */
.pvl-view-toggle{display:flex;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);border-radius:8px;overflow:hidden}
.pvl-vt{width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;cursor:pointer;color:#4a6080;transition:all .15s}
.pvl-vt svg{width:13px;height:13px}
.pvl-vt:hover{color:#94a3b8}
.pvl-vt.active{background:rgba(74,127,232,.18);color:#6b9bf0}
.pvl-top-bar{display:flex;flex-shrink:0;align-items:stretch;border-bottom:1px solid rgba(255,255,255,.07);background:#161b27;overflow:hidden;}
.pvl-top-cliente{width:65%;flex-shrink:0;padding:12px 20px 10px;border-right:1px solid rgba(255,255,255,.07);display:flex;flex-direction:column;gap:7px;overflow:hidden;}
.pvl-top-search{flex:1;padding:12px 20px 10px;display:flex;flex-direction:column;gap:0;background:#0d1117;}
.pvl-tkt-meta{display:flex;align-items:center;justify-content:space-between;margin-bottom:2px}
.pvl-tkt-id{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:1.5px;color:#4a6080}
.pvl-tkt-num{font-size:10px;font-weight:700;color:#6b9bf0;font-family:'DM Mono',monospace}
.pvl-dni-row{position:relative}
.pvl-dni-input{width:100%;background:#1e2538;border:1.5px solid rgba(255,255,255,.11);border-radius:10px;padding:9px 36px 9px 13px;font-size:12px;color:#f1f5f9;font-family:'Poppins',sans-serif;outline:none;transition:all .2s}
.pvl-dni-input:focus{border-color:#4a7fe8;box-shadow:0 0 0 3px rgba(74,127,232,.22)}
.pvl-dni-input::placeholder{color:#4a6080}
.pvl-dni-ico{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:13px;opacity:.35;pointer-events:none}
.pvl-cli-found{display:none;align-items:center;gap:10px;padding:8px 12px;background:rgba(16,185,129,.07);border:1px solid rgba(16,185,129,.22);border-radius:10px}
.pvl-cli-found.show{display:flex;animation:pvlFadeUp .18s ease}
@keyframes pvlFadeUp{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
.pvl-cli-av{width:38px;height:38px;border-radius:50%;flex-shrink:0;background:linear-gradient(135deg,#065f46,#10b981);display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:800;color:white;letter-spacing:.5px}
.pvl-cli-name{font-size:14px;font-weight:700;color:#f1f5f9}
.pvl-cli-meta{font-size:11px;color:#94a3b8;margin-top:2px;display:flex;gap:5px;align-items:center}
.pvl-cli-badge{font-size:7px;font-weight:700;padding:1px 5px;border-radius:3px;background:rgba(16,185,129,.15);color:#6ee7b7;border:1px solid rgba(16,185,129,.2)}
.pvl-cli-x{width:20px;height:20px;border-radius:5px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.11);display:flex;align-items:center;justify-content:center;font-size:9px;color:#4a6080;cursor:pointer;flex-shrink:0;margin-left:auto}
.pvl-new-cli{display:none;padding:9px 11px;background:rgba(74,127,232,.05);border:1px solid rgba(74,127,232,.2);border-radius:10px}
.pvl-new-cli.show{display:block;animation:pvlFadeUp .18s ease}
.pvl-nc-lbl{font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.9px;color:#6b9bf0;margin-bottom:7px}
.pvl-nc-grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:5px;margin-bottom:6px}
.pvl-nc-f{display:flex;flex-direction:column;gap:2px}
.pvl-nc-f label{font-size:8px;font-weight:600;color:#4a6080;text-transform:uppercase;letter-spacing:.5px}
.pvl-nc-f input,.pvl-nc-inp-sel{background:#1e2538;border:1px solid rgba(255,255,255,.11);border-radius:7px;padding:6px 8px;font-size:11px;color:#f1f5f9;font-family:'Poppins',sans-serif;outline:none;width:100%}
.pvl-nc-f input:focus,.pvl-nc-inp-sel:focus{border-color:#4a7fe8}
.pvl-nc-f input::placeholder{color:#4a6080}
.pvl-nc-inp-sel{cursor:pointer;appearance:auto}
.pvl-nc-btns{display:flex;gap:5px}
.pvl-nc-save{flex:1;padding:7px;border-radius:7px;background:#4a7fe8!important;border:none!important;color:white!important;font-family:'Poppins',sans-serif;font-size:11px;font-weight:700;cursor:pointer}
.pvl-nc-skip{padding:7px 12px;border-radius:7px;background:rgba(255,255,255,.04)!important;border:1px solid rgba(255,255,255,.11)!important;color:#4a6080!important;font-size:11px;cursor:pointer;font-family:'Poppins',sans-serif}

/* ── FORM COMPACTO: mismo espacio que tkt-meta + dni-row ────────────────
   3 cols: col1=nombre/apellido · col2=dni/condicion · col3=botones (span 2 filas)
   Los botones comparten el ancho: Guardar 70% | ✕ 30%                          */
.pvl-top-cliente:has(.pvl-new-cli.show) .pvl-tkt-meta{display:none!important}
.pvl-top-cliente:has(.pvl-new-cli.show) .pvl-dni-row{display:none!important}

.pvl-new-cli.show{
  flex:1!important;display:flex!important;flex-direction:column!important;
  background:transparent!important;border:none!important;border-radius:0!important;
  padding:0 0 4px 0!important;overflow:hidden!important;animation:pvlFadeUp .18s ease;
}
.pvl-nc-lbl{display:none!important}
.pvl-nc-grid{
  flex:1!important;display:grid!important;
  grid-template-columns:1fr 1fr 1fr 1fr!important;
  grid-template-rows:1fr 1fr!important;
  gap:3px!important;margin:0!important;
}
.pvl-nc-inp{
  height:100%!important;width:100%!important;box-sizing:border-box!important;
  padding:0 8px!important;font-size:11px!important;min-height:unset!important;
  border-radius:6px!important;background:#1e2538!important;
  border:1px solid rgba(255,255,255,.14)!important;color:#f1f5f9!important;
  font-family:'Poppins',sans-serif!important;outline:none!important;
}
.pvl-nc-inp::placeholder{color:#3a506a!important;font-size:10px!important}
.pvl-nc-inp:focus{border-color:#4a7fe8!important}
.pvl-nc-inp-sel{cursor:pointer!important;appearance:auto!important}
.pvl-nc-btns{
  grid-column:4!important;grid-row:1/3!important;
  display:flex!important;flex-direction:row!important;
  gap:3px!important;align-items:stretch!important;min-height:unset!important;
}
.pvl-nc-save{
  flex:7!important;height:100%!important;padding:0 5px!important;
  box-sizing:border-box!important;border-radius:6px!important;
  background:#4a7fe8!important;border:none!important;color:white!important;
  font-family:'Poppins',sans-serif!important;font-size:11px!important;
  font-weight:700!important;cursor:pointer!important;min-height:unset!important;
  line-height:1.2!important;
}
.pvl-nc-skip{
  flex:3!important;height:100%!important;padding:0!important;
  box-sizing:border-box!important;border-radius:6px!important;
  background:rgba(255,255,255,.05)!important;border:1px solid rgba(255,255,255,.12)!important;
  color:#ef4444!important;font-size:16px!important;font-weight:700!important;
  cursor:pointer!important;min-height:unset!important;
  font-family:'Poppins',sans-serif!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
}
/* ── /FORM COMPACTO ──────────────────────────────────────────────────── */

.pvl-sh-label{display:none}
.pvl-search-wrap{position:relative}
.pvl-search-input{width:100%;background:#1e2538;border:1.5px solid rgba(255,255,255,.11);border-radius:10px;padding:9px 16px 9px 36px;font-size:12px;font-weight:600;color:#f1f5f9;font-family:'Poppins',sans-serif;outline:none;transition:all .2s}
.pvl-search-input:focus{border-color:#4a7fe8;box-shadow:0 0 0 3px rgba(74,127,232,.22)}
.pvl-search-input::placeholder{color:#4a6080;font-weight:400;font-size:11px}
.pvl-si-ico{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:14px;opacity:.35;pointer-events:none}
.pvl-cats-wrap{display:flex;flex-wrap:nowrap;gap:5px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}
.pvl-cats-wrap::-webkit-scrollbar{display:none}
.pvl-cat-chip{padding:4px 10px;border-radius:14px;font-size:9px;font-weight:600;cursor:pointer;border:1px solid rgba(255,255,255,.11);color:#4a6080;transition:all .15s;background:#161b27}
.pvl-cat-chip:hover{border-color:rgba(74,127,232,.35);color:#94a3b8}
.pvl-cat-chip.active{background:rgba(74,127,232,.13);border-color:rgba(74,127,232,.4);color:#6b9bf0}
.pvl-main{flex:1;display:flex;overflow:hidden;min-height:0}
.pvl-ticket-col{flex:0 0 65%;display:flex;flex-direction:column;background:#161b27;border-right:1px solid rgba(255,255,255,.07);overflow:hidden}
.pvl-tbl-header{display:grid;grid-template-columns:28px 1fr 90px 90px 80px 28px;padding:6px 16px;border-bottom:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.015);flex-shrink:0;gap:8px}
.pvl-th{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#4a6080}
.pvl-th-r{text-align:right}
.pvl-th-c{text-align:center}
.pvl-tkt-items{flex:1;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.11) transparent}
.pvl-tkt-items::-webkit-scrollbar{width:3px}
.pvl-tkt-items::-webkit-scrollbar-thumb{background:rgba(255,255,255,.11);border-radius:4px}
.pvl-tkt-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;opacity:.15}
.pvl-te-ico{font-size:38px}
.pvl-te-txt{font-size:12px;color:#4a6080;font-weight:500}
.pvl-t-item{display:grid;grid-template-columns:28px 1fr 90px 90px 80px 28px;align-items:center;gap:8px;padding:10px 16px;border-bottom:1px solid rgba(255,255,255,.05);transition:background .1s}
.pvl-t-item:hover{background:rgba(255,255,255,.02)}
.pvl-t-num{font-size:9px;font-weight:700;color:#4a6080;text-align:center}
.pvl-t-name-cell{min-width:0}
.pvl-t-name{font-size:12px;font-weight:700;color:#f1f5f9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pvl-t-sku{font-size:9px;color:#4a6080;margin-top:1px}
.pvl-t-unit-price{font-size:11px;color:#4a6080;text-align:right}
.pvl-qty-c{display:flex;align-items:center;justify-content:center;gap:3px}
.pvl-qb{width:22px;height:22px;border-radius:6px;background:rgba(255,255,255,.04)!important;border:1px solid rgba(255,255,255,.11)!important;color:#94a3b8!important;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .12s;flex-shrink:0;padding:0!important;min-height:unset!important}
.pvl-qb:hover{border-color:rgba(74,127,232,.5)!important;color:#6b9bf0!important}
.pvl-qn{font-size:12px;font-weight:700;width:22px;text-align:center;color:#f1f5f9}
.pvl-t-total{font-size:12px;font-weight:800;color:#f1f5f9;text-align:right}
.pvl-t-del{width:22px;height:22px;border-radius:5px;background:transparent!important;border:1px solid transparent!important;color:#4a6080!important;font-size:11px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .12s;opacity:0;padding:0!important;min-height:unset!important}
.pvl-t-item:hover .pvl-t-del{opacity:1!important;border-color:rgba(248,113,113,.25)!important;background:rgba(248,113,113,.07)!important;color:#f87171!important}
.pvl-tkt-footer{flex-shrink:0;border-top:1px solid rgba(255,255,255,.07)}
.pvl-desc-row{display:flex;align-items:center;gap:6px;padding:5px 16px;border-bottom:1px solid rgba(255,255,255,.05)}
.pvl-desc-lbl{font-size:9px;color:#4a6080;flex-shrink:0}
.pvl-desc-chips{display:flex;gap:3px}
.pvl-dc{padding:2px 8px;border-radius:8px;font-size:9px;font-weight:700;cursor:pointer;background:#1e2538;border:1px solid rgba(255,255,255,.11);color:#4a6080;transition:all .15s}
.pvl-dc:hover{border-color:rgba(74,127,232,.3);color:#6b9bf0}
.pvl-dc.active{background:rgba(74,127,232,.14);border-color:#4a7fe8;color:#6b9bf0}
.pvl-desc-custom{width:50px;background:#1e2538;border:1px solid rgba(255,255,255,.11);border-radius:6px;padding:2px 6px;font-size:9px;font-weight:700;color:#f1f5f9;outline:none;text-align:center}
.pvl-desc-custom:focus{border-color:#4a7fe8}
.pvl-desc-custom::placeholder{color:#4a6080;font-weight:400}
.pvl-totals{display:flex;align-items:center;justify-content:space-between;padding:5px 16px;border-bottom:1px solid rgba(255,255,255,.05)}
.pvl-tot-left{display:flex;gap:14px;align-items:center}
.pvl-tot-row{display:flex;align-items:center;gap:5px}
.pvl-tot-lbl{font-size:9px;color:#4a6080}
.pvl-tot-val{font-size:9px;font-weight:600;color:#94a3b8}
.pvl-tv-green{color:#10b981}
.pvl-tot-right{display:flex;align-items:baseline;gap:6px}
.pvl-tot-main-lbl{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#4a6080}
.pvl-tot-main-val{font-size:20px;font-weight:900;color:#6b9bf0;letter-spacing:-1px;line-height:1}
.pvl-pagos-row{display:grid;grid-template-columns:repeat(4,1fr) 1fr;gap:5px;padding:6px 16px 4px}
.pvl-pago-item{background:#1e2538;border:1.5px solid rgba(255,255,255,.11);border-radius:9px;padding:6px 9px;cursor:pointer;transition:all .15s;display:flex;flex-direction:column;justify-content:center;gap:3px;min-height:44px;min-width:0;overflow:hidden}
.pvl-pago-item:hover{border-color:rgba(74,127,232,.35)}
.pvl-pi-top{display:flex;align-items:center;gap:4px}
.pvl-pi-ico{font-size:11px}
.pvl-pi-name{font-size:9px;font-weight:600;color:#4a6080;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pvl-pi-inp{background:transparent;border:none;border-bottom:1px solid rgba(255,255,255,.11);padding:1px 0;font-size:11px;font-weight:700;color:#f1f5f9;outline:none;width:100%}
.pvl-pi-inp::placeholder{color:#4a6080;font-size:9px;font-weight:400}
.pvl-pi-remove{margin-left:auto;cursor:pointer;color:#f87171;font-size:9px}
.pvl-pi-bot{display:grid;grid-template-columns:68% 30%;gap:4px;margin-top:4px;align-items:center}
.pvl-pago-add{background:#1e2538;border:1.5px dashed rgba(255,255,255,.11);border-radius:9px;padding:6px 9px;cursor:pointer;transition:all .15s;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:44px;min-width:0;overflow:hidden}
.pvl-pago-add:hover{border-color:rgba(74,127,232,.4);background:rgba(74,127,232,.04)}
.pvl-pago-add-ico{font-size:14px;color:#4a6080}
.pvl-pago-add-txt{font-size:8px;font-weight:600;color:#4a6080;text-align:center;line-height:1.3}
.pvl-pago-add:hover .pvl-pago-add-ico,.pvl-pago-add:hover .pvl-pago-add-txt{color:#6b9bf0}
.pvl-btn-confirm{min-height:44px!important;border-radius:9px!important;border:none!important;cursor:pointer;background:linear-gradient(135deg,#1a3a8a,#2b5ce6,#4a7fe8)!important;color:white!important;font-family:'Poppins',sans-serif;font-size:11px!important;font-weight:800!important;box-shadow:0 3px 12px rgba(74,127,232,.22);display:flex!important;align-items:center!important;justify-content:center!important;position:relative;overflow:hidden;transition:all .15s;padding:0!important}
.pvl-btn-confirm:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 5px 18px rgba(74,127,232,.5)}
.pvl-btn-confirm:disabled{background:rgba(255,255,255,.07)!important;color:#4a6080!important;cursor:not-allowed;box-shadow:none}
.pvl-shine{position:absolute;top:0;left:0;width:25%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.13),transparent);animation:pvlShimmer 3s ease-in-out infinite;pointer-events:none}
.pvl-btn-confirm:disabled .pvl-shine{display:none}
@keyframes pvlShimmer{0%{transform:translateX(-150%) skewX(-15deg)}100%{transform:translateX(350%) skewX(-15deg)}}
.pvl-restante-row{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:3px 16px 6px;font-size:9px}
.pvl-restante-lbl{color:#4a6080}
.pvl-restante-val{font-weight:800;color:#f1f5f9}
.pvl-search-col{flex:1;display:flex;flex-direction:column;overflow:hidden;background:#0d1117}
.pvl-results-area{flex:1;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.11) transparent}
.pvl-results-area::-webkit-scrollbar{width:3px}
.pvl-results-area::-webkit-scrollbar-thumb{background:rgba(255,255,255,.11);border-radius:4px}
.pvl-idle-state{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;opacity:.13;pointer-events:none;padding-bottom:40px}
.pvl-idle-ico{font-size:48px}
.pvl-idle-txt{font-size:13px;color:#4a6080;font-weight:600;text-align:center;line-height:1.6}
.pvl-res-list{display:flex;flex-direction:column;gap:5px;padding:12px 16px 20px}
.pvl-res-count{font-size:9px;color:#4a6080;margin-bottom:4px}
.pvl-res-item{display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:10px;border:1px solid rgba(255,255,255,.07);background:#161b27;cursor:pointer;transition:all .15s}
.pvl-res-item:hover{border-color:rgba(74,127,232,.35);background:rgba(74,127,232,.04)}
.pvl-res-item.in-cart{border-color:rgba(74,127,232,.4);background:rgba(74,127,232,.06)}
.pvl-ri-info{flex:1;min-width:0}
.pvl-ri-name{font-size:11px;font-weight:700;color:#f1f5f9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pvl-ri-sub{font-size:8px;color:#4a6080;margin-top:1px;display:flex;gap:4px;align-items:center}
.pvl-ri-cat{font-size:7px;padding:1px 5px;border-radius:3px;background:#252d42;color:#4a6080}
.pvl-ri-right{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex-shrink:0}
.pvl-ri-price{font-size:12px;font-weight:800;color:#f1f5f9}
.pvl-ri-stock{font-size:8px;font-weight:700;padding:2px 6px;border-radius:5px}
.pvl-ri-stock.ok{background:rgba(74,127,232,.12);color:#6b9bf0;border:1px solid rgba(74,127,232,.18)}
.pvl-ri-stock.low{background:rgba(245,158,11,.1);color:#f59e0b;border:1px solid rgba(245,158,11,.2)}
.pvl-ri-stock.out{background:rgba(248,113,113,.08);color:#f87171;border:1px solid rgba(248,113,113,.15)}
.pvl-ri-add{width:28px;height:28px;border-radius:7px;flex-shrink:0;background:rgba(74,127,232,.1)!important;border:1px solid rgba(74,127,232,.2)!important;color:#6b9bf0!important;font-size:15px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;padding:0!important;min-height:unset!important}
.pvl-ri-add:hover{background:rgba(74,127,232,.25)!important}
.pvl-ri-add.in{background:#4a7fe8!important;border-color:#4a7fe8!important;color:white!important;font-size:11px}
@keyframes pvlRowAdd{0%{background:rgba(74,127,232,.2)}100%{background:transparent}}
.pvl-t-item.just-added{animation:pvlRowAdd .4s ease}
.pvl-modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(4px);z-index:9990;align-items:center;justify-content:center}
.pvl-modal-overlay.show{display:flex}
.pvl-modal-box{background:#161b27;border:1px solid rgba(255,255,255,.11);border-radius:14px;padding:18px 20px;width:290px;animation:pvlModalIn .18s ease}
@keyframes pvlModalIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
.pvl-modal-title{font-size:12px;font-weight:800;color:#f1f5f9;margin-bottom:4px}
.pvl-modal-sub{font-size:10px;color:#4a6080;margin-bottom:14px}
.pvl-modal-opts{display:flex;flex-direction:column;gap:6px}
.pvl-modal-opt{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;background:#1e2538;border:1px solid rgba(255,255,255,.11);cursor:pointer;transition:all .15s}
.pvl-modal-opt:hover{border-color:#4a7fe8;background:rgba(74,127,232,.07)}
.pvl-mo-ico{font-size:16px}
.pvl-mo-name{font-size:12px;font-weight:600;color:#f1f5f9}
.pvl-mo-desc{font-size:9px;color:#4a6080}
.pvl-modal-close{margin-top:12px;width:100%;padding:8px;border-radius:8px;background:rgba(255,255,255,.04)!important;border:1px solid rgba(255,255,255,.11)!important;color:#4a6080!important;font-family:'Poppins',sans-serif;font-size:11px;cursor:pointer}
.pvl-modal-close:hover{color:#94a3b8!important}
#sec-pos.pvl-lista-activa > .pos2-topbar > .pos2-search-wrap{display:none!important}

/* ── PVL FIXES v2 ─────────────────────────────────────────────── */

/* Issue #1: topbar — right section stays pinned right when search is hidden */
#sec-pos.pvl-lista-activa .pos2-topbar-right{margin-left:auto;width:auto}

/* Issue #2: toggle buttons — match pos2 theme pill style */
.pvl-view-toggle{display:flex;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:10px;overflow:hidden;padding:2px;gap:2px}
.pvl-vt{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:transparent;border:none!important;border-radius:8px!important;cursor:pointer;color:#4a6080;transition:all .15s;min-height:unset!important;padding:0!important}
.pvl-vt svg{width:14px;height:14px}
.pvl-vt:hover{color:#94a3b8;background:rgba(255,255,255,.06)!important}
.pvl-vt.active{background:rgba(74,127,232,.22)!important;color:#6b9bf0!important}

/* Issue #3: ticket body fills height — footer stays fixed at bottom */
#pos-vista-lista{display:none;flex:1;flex-direction:column;overflow:hidden;min-height:0}
.pvl-ticket-col{display:flex!important;flex-direction:column!important;overflow:hidden!important}
.pvl-tkt-items{flex:1!important;overflow-y:auto!important;min-height:0!important}
.pvl-tkt-footer{flex-shrink:0!important;margin-top:auto}

/* Issue #5: payment input font size + remove spinner arrows */
.pvl-pi-inp{font-size:16px!important;font-weight:800!important;color:#f1f5f9!important;width:100%}
.pvl-pi-bot .pvl-pi-inp{width:auto!important}
.pvl-pi-inp::-webkit-outer-spin-button,
.pvl-pi-inp::-webkit-inner-spin-button{-webkit-appearance:none!important;appearance:none!important;margin:0}
.pvl-pi-inp[type=number]{-moz-appearance:textfield!important;appearance:textfield!important}
/* Also fix the two fixed payment inputs (efe, tar) in HTML */
#pvl-pago-efe,#pvl-pago-tar{font-size:16px!important;font-weight:800!important}
#pvl-pago-efe::-webkit-outer-spin-button,#pvl-pago-efe::-webkit-inner-spin-button,
#pvl-pago-tar::-webkit-outer-spin-button,#pvl-pago-tar::-webkit-inner-spin-button{-webkit-appearance:none!important;appearance:none!important}
#pvl-pago-efe[type=number],#pvl-pago-tar[type=number]{-moz-appearance:textfield!important;appearance:textfield!important}

/* Total value — larger */
.pvl-tot-main-val{font-size:26px!important}

/* Issue #6: restante size matches payment inputs */
.pvl-restante-val{font-size:18px!important;font-weight:800!important}

/* Issue #8: pagination bar styles */
.pvl-res-nav{display:flex;align-items:center;justify-content:space-between;padding:0 4px 6px;flex-shrink:0}
.pvl-res-paginator{display:flex;align-items:center;gap:6px}
.pvl-pg-btn{width:24px;height:24px;border-radius:6px;background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.11)!important;color:#94a3b8!important;font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .12s;padding:0!important;min-height:unset!important}
.pvl-pg-btn:hover:not(:disabled){border-color:rgba(74,127,232,.4)!important;color:#6b9bf0!important}
.pvl-pg-btn:disabled{opacity:.3;cursor:not-allowed}
.pvl-pg-num{font-size:9px;font-weight:700;color:#4a6080;white-space:nowrap}

/* ── PVL FIXES v3 ── */
/* Reducir brecha entre buscador cliente y encabezado del ticket */
.pvl-top-cliente{padding:6px 16px 4px!important;gap:4px!important;}
.pvl-top-search{padding:6px 16px 4px!important;gap:3px!important;}
.pvl-tkt-meta{display:flex;align-items:center;gap:6px}
.pvl-tbl-header{padding:4px 16px!important}

/* Botón autocompletar en fila restante */
.pvl-restante-row{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:3px 16px 6px;font-size:9px}
.pvl-auto-btn{background:rgba(74,127,232,.13)!important;border:1px solid rgba(74,127,232,.3)!important;color:#6b9bf0!important;border-radius:6px!important;padding:2px 8px!important;font-size:9px!important;font-weight:700!important;cursor:pointer;min-height:unset!important;font-family:'Poppins',sans-serif}
.pvl-auto-btn:hover{background:rgba(74,127,232,.22)!important;border-color:rgba(74,127,232,.5)!important}

/* Avatar cliente por condición fiscal */
.pvl-av-cf{background:rgba(59,130,246,.25)!important;color:#60a5fa!important;border-color:rgba(59,130,246,.4)!important}
.pvl-av-ri{background:rgba(34,197,94,.25)!important;color:#4ade80!important;border-color:rgba(34,197,94,.4)!important}
.pvl-av-mo{background:rgba(202,138,4,.25)!important;color:#facc15!important;border-color:rgba(202,138,4,.4)!important}

/* Botón autocompletar dentro de cada slot */
.pvl-pi-auto{background:rgba(74,127,232,.13)!important;border:1px solid rgba(74,127,232,.3)!important;color:#6b9bf0!important;border-radius:6px!important;padding:0 4px!important;font-size:9px!important;font-weight:700!important;cursor:pointer;min-height:26px!important;font-family:'Poppins',sans-serif;text-align:center;width:100%!important;transition:all .12s}
.pvl-pi-auto:hover{background:rgba(74,127,232,.25)!important;border-color:rgba(74,127,232,.55)!important}

/* Botón solicitar validación QR */
.pvl-qr-btn{width:100%!important;background:linear-gradient(135deg,rgba(74,127,232,.18),rgba(74,127,232,.08))!important;border:1px solid rgba(74,127,232,.35)!important;color:#6b9bf0!important;border-radius:6px!important;padding:5px 8px!important;font-size:10px!important;font-weight:700!important;cursor:pointer;min-height:unset!important;font-family:'Poppins',sans-serif;text-align:center}
.pvl-qr-btn:hover{background:linear-gradient(135deg,rgba(74,127,232,.28),rgba(74,127,232,.15))!important;border-color:rgba(74,127,232,.55)!important}

/* ============================================================
   CARDS MODE — Mejoras UI (2026-03)
   ============================================================ */

/* 1. Chips de categoría — espaciado vertical correcto */
.pos2-chips-bar { overflow-y: hidden !important; }
.pos2-chip { flex-shrink: 0 !important; display: inline-flex !important; align-items: center !important; }

/* 2. Botón modo imagen en topbar */
.pos-img-mode-btn {
  width: 30px !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  color: #4a6080 !important;
  transition: all 0.15s !important;
  flex-shrink: 0 !important;
  min-height: unset !important;
  padding: 0 !important;
}
.pos-img-mode-btn:hover { color: #6b9bf0 !important; border-color: rgba(74,127,232,0.4) !important; background: rgba(74,127,232,0.08) !important; }
.pos-img-mode-btn svg { width: 13px !important; height: 13px !important; }

/* 3. Imagen real en tarjetas — dos modos */
.pos2-card-img-el {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
}
.pos2-img-cover  { object-fit: cover !important; }
.pos2-img-contain {
  object-fit: contain !important;
  padding: 6px !important;
  background: #1e2538 !important;
}
/* Asegurar que pos2-card-img tenga position relative para la imagen absoluta */
.pos2-card-img { position: relative !important; }

/* 4. Header cliente — nueva fila compacta */
.pos2-cli-row2 { align-items: center !important; }

/* Input DNI compacto — misma altura que avatar */
.pos2-cli-search--compact {
  height: 34px !important;
  padding: 0 8px !important;
  display: flex !important;
  align-items: center !important;
}
.pos2-cli-search--compact input {
  height: 100% !important;
  padding: 0 !important;
  font-size: 11px !important;
}

/* Meta ticket inline (al final de la línea) */
.pos2-tkt-inline-meta {
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  padding-left: 4px !important;
}
.pos2-tkt-inline-meta .pos2-ticket-count { font-size: 11px !important; padding: 3px 8px !important; }
.pos2-tkt-inline-meta .pos2-ticket-title {
  font-size: 7px !important;
  font-weight: 700 !important;
  color: #3a5580 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
}

/* Nombre cliente + limpiar debajo de la fila principal */
.pos2-cli-sub--below {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 5px !important;
  padding: 0 2px !important;
}

/* 5. Slots de pago — fila horizontal de 4 (2 fijos + 2 dinámicos) */
.pos2-pagos-row-cards {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 5px !important;
  padding: 8px 12px 6px !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
/* Slot dinámico (+ agregar) */
.pos2-pslot-add {
  background: #1e2538 !important;
  border: 1.5px dashed rgba(255,255,255,0.11) !important;
  border-radius: 9px !important;
  padding: 6px 4px !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  min-height: 56px !important;
  transition: all 0.15s !important;
}
.pos2-pslot-add:hover { border-color: rgba(74,127,232,0.4) !important; background: rgba(74,127,232,0.04) !important; }
.pos2-pslot-add-ico { font-size: 14px !important; color: #4a6080 !important; line-height: 1 !important; }
.pos2-pslot-add-txt { font-size: 8px !important; font-weight: 600 !important; color: #4a6080 !important; text-align: center !important; line-height: 1.3 !important; }
.pos2-pslot-add:hover .pos2-pslot-add-ico,.pos2-pslot-add:hover .pos2-pslot-add-txt { color: #6b9bf0 !important; }
/* Botón quitar slot dinámico */
.pos2-pslot-rm { margin-left: auto !important; font-size: 9px !important; color: #4a6080 !important; cursor: pointer !important; padding: 0 2px !important; flex-shrink: 0 !important; }
.pos2-pslot-rm:hover { color: #f87171 !important; }
.pos2-pslot {
  background: #1e2538 !important;
  border: 1.5px solid rgba(255,255,255,0.09) !important;
  border-radius: 9px !important;
  padding: 6px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  transition: border-color 0.15s !important;
  min-width: 0 !important;
}
.pos2-pslot:focus-within { border-color: rgba(74,127,232,0.4) !important; }
.pos2-pslot-top {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}
.pos2-pslot-ico { font-size: 11px !important; flex-shrink: 0 !important; }
.pos2-pslot-name {
  font-size: 8px !important;
  font-weight: 700 !important;
  color: #4a6080 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.pos2-pslot-row {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}
.pos2-pslot-auto {
  background: rgba(74,127,232,0.13) !important;
  border: 1px solid rgba(74,127,232,0.3) !important;
  color: #6b9bf0 !important;
  border-radius: 5px !important;
  width: 22px !important;
  height: 22px !important;
  min-height: unset !important;
  padding: 0 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.12s !important;
}
.pos2-pslot-auto:hover { background: rgba(74,127,232,0.25) !important; border-color: rgba(74,127,232,0.55) !important; }
.pos2-pslot-inp {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  padding: 2px 2px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  outline: none !important;
  font-family: 'Poppins', sans-serif !important;
  width: 100% !important;
  min-width: 0 !important;
}
.pos2-pslot-inp::placeholder { color: #2a3a58 !important; font-size: 10px !important; font-weight: 400 !important; }
.pos2-pslot-inp::-webkit-outer-spin-button,
.pos2-pslot-inp::-webkit-inner-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
.pos2-pslot-inp[type=number] { -moz-appearance: textfield !important; appearance: textfield !important; }
.pos2-pslot-inp:disabled { opacity: 0.3 !important; cursor: not-allowed !important; }

/* Color accent por método */
.pos2-pslot.efe .pos2-pslot-name { color: #22c55e !important; }
.pos2-pslot.efe { border-color: rgba(34,197,94,0.15) !important; }
.pos2-pslot.efe:focus-within { border-color: rgba(34,197,94,0.45) !important; }
.pos2-pslot.tar .pos2-pslot-name { color: #a855f7 !important; }
.pos2-pslot.tar { border-color: rgba(168,85,247,0.12) !important; }
.pos2-pslot.tar:focus-within { border-color: rgba(168,85,247,0.4) !important; }
.pos2-pslot.tra .pos2-pslot-name { color: #3b82f6 !important; }
.pos2-pslot.tra { border-color: rgba(59,130,246,0.12) !important; }
.pos2-pslot.tra:focus-within { border-color: rgba(59,130,246,0.4) !important; }
.pos2-pslot.ctc .pos2-pslot-name { color: #f59e0b !important; }
.pos2-pslot.ctc { border-color: rgba(245,158,11,0.12) !important; }

/* ============================================================
   PRODUCTOS — dark navy (igual que movimientos/clientes)
   ============================================================ */
#sec-productos {
  background: #0d1117 !important;
  margin: -20px !important;
  width: calc(100% + 40px) !important;
  min-height: 100vh !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}
.prod-layout {
  max-width: 1200px; margin: 0 auto; padding: 24px 28px; box-sizing: border-box;
}
.prod-section-header {
  display: flex; align-items: center; gap: 13px;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.prod-section-icon {
  width: 38px; height: 38px; background: rgba(255,255,255,0.05);
  border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.prod-section-icon svg { stroke: #94a3b8 !important; }
.prod-section-title { font-size: 1.05em; font-weight: 700; color: #e2e8f0 !important; display: block; }
.prod-section-sub { font-size: 0.76em; color: #64748b; margin-top: 2px; display: block; }

/* Panel de creación */
#sec-productos .premium-panel {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
#sec-productos .premium-panel h3 { color: #e2e8f0 !important; }
#sec-productos .vertical-divider { background: rgba(255,255,255,0.07) !important; }
#sec-productos .input-premium,
#sec-productos .input-mini,
#sec-productos .input-notion-search {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #e2e8f0 !important;
}
#sec-productos .input-premium::placeholder,
#sec-productos .input-mini::placeholder,
#sec-productos .input-notion-search::placeholder { color: #4a6080 !important; }
#sec-productos select.input-premium {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #e2e8f0 !important;
}
#sec-productos select.input-premium option { background: #1e2535; color: #e2e8f0; }
#sec-productos .chip-gen {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #94a3b8 !important;
}
#sec-productos .chip-gen:hover {
  background: rgba(74,127,232,0.15) !important;
  border-color: rgba(74,127,232,0.4) !important;
  color: #6b9bf0 !important;
}
#sec-productos .grid-header-side { color: #e2e8f0 !important; }

/* Toolbar ajustes masivos */
.toolbar-edicion-masiva {
  display: flex; flex-wrap: wrap; gap: 15px; align-items: center;
  justify-content: space-between; margin-bottom: 20px;
  background: #161b27 !important; padding: 15px 20px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07) !important; box-shadow: none !important;
}
#sec-productos .toolbar-edicion-masiva select,
#sec-productos .toolbar-edicion-masiva input[type="text"],
#sec-productos .toolbar-edicion-masiva input[type="number"] {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #e2e8f0 !important;
}
#sec-productos .excel-dropdown-panel {
  background: #1e2535 !important;
  border-color: rgba(255,255,255,0.1) !important;
}
#sec-productos .excel-checkbox-list label,
#sec-productos .excel-dropdown-panel span { color: #94a3b8 !important; }

/* Tabla de productos */
.prod-table-wrap {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-top: none !important;
  border-radius: 0 0 12px 12px; overflow: hidden; box-shadow: none !important;
}
.prod-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.prod-thead th {
  padding: 11px 14px !important; text-align: left;
  font-size: 0.7em !important; font-weight: 700 !important;
  letter-spacing: 0.08em !important; text-transform: uppercase !important;
  color: #64748b !important; background: rgba(255,255,255,0.03) !important;
  border: none !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  white-space: nowrap !important; vertical-align: middle !important;
}
.prod-table td {
  padding: 11px 14px !important; font-size: 0.86em !important;
  color: #e2e8f0 !important; border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  vertical-align: middle !important; background: transparent !important;
  overflow: visible !important;
}
.prod-table tbody tr:hover td { background: rgba(74,127,232,0.06) !important; }
.prod-table tbody tr:hover td div[style*="background:white"],
.prod-table tbody tr:hover td div[style*="background: white"] { background: rgba(255,255,255,0.05) !important; }
.prod-table tbody tr:last-child td { border-bottom: none !important; }

/* Focus azul en wrapper de precio/costo */
.input-masivo { outline: none !important; }
.input-masivo:focus { outline: none !important; border: none !important; box-shadow: none !important; }
.masivo-price-wrap:focus-within {
  border-color: #4a7fe8 !important;
  box-shadow: none !important;
}

/* Eliminar flechas spinner en todos los inputs numéricos de la grilla */
.input-masivo::-webkit-inner-spin-button,
.input-masivo::-webkit-outer-spin-button,
.input-stock::-webkit-inner-spin-button,
.input-stock::-webkit-outer-spin-button,
#tabla-gestion-productos input[type="number"]::-webkit-inner-spin-button,
#tabla-gestion-productos input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}
.input-masivo,
.input-stock,
#tabla-gestion-productos input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* ============================================================
   AUDITORÍA — dark navy (igual que movimientos/clientes)
   ============================================================ */
#sec-auditoria {
  background: #0d1117 !important;
  margin: -20px !important;
  width: calc(100% + 40px) !important;
  min-height: 100vh !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}
.audit-layout {
  max-width: 980px; margin: 0 auto; padding: 24px 28px; box-sizing: border-box;
}
.audit-config-card {
  max-width: 480px; margin: 40px auto;
  background: #161b27 !important; padding: 40px; border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important; text-align: center;
  border: 1px solid rgba(255,255,255,0.07) !important;
}
.audit-config-card h2 { color: #e2e8f0 !important; margin-bottom: 10px; }
.audit-config-card p { color: #94a3b8 !important; margin-bottom: 30px; }
.audit-config-card > i { color: #6b9bf0 !important; }
.audit-config-card label { color: #94a3b8 !important; }
.audit-config-card select {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #e2e8f0 !important;
}
.audit-config-card select option { background: #1e2535; color: #e2e8f0; }
.audit-config-divider { margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.07) !important; padding-top: 20px; }

.audit-btn-start {
  width: 100% !important; background: #4a7fe8 !important; color: white !important;
  padding: 15px !important; border: none !important; border-radius: 8px !important;
  font-size: 1.1em !important; font-weight: bold !important; cursor: pointer !important;
  transition: background 0.2s !important; letter-spacing: 0.03em !important;
}
.audit-btn-start:hover { background: #3a6fd8 !important; }
.audit-btn-history {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #94a3b8 !important; padding: 8px 18px !important;
  border-radius: 6px !important; cursor: pointer !important; transition: 0.2s !important;
  font-size: 0.88em !important;
}
.audit-btn-history:hover { background: rgba(255,255,255,0.1) !important; color: #e2e8f0 !important; }

/* Panel de auditoría activa */
.audit-run-wrapper { max-width: 900px; margin: 0 auto; box-sizing: border-box; }
.audit-run-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; background: #161b27 !important; padding: 20px 24px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
.audit-run-title { margin: 0; color: #e2e8f0 !important; font-size: 1.25em; }
.audit-run-subtitle { color: #64748b !important; font-size: 0.85em; margin-top: 3px; display: block; }
.audit-run-counter-val { color: #e2e8f0 !important; font-size: 2.2em; font-weight: 800; line-height: 1; text-align: right; }
.audit-run-counter-lbl { font-size: 0.72em; color: #64748b !important; text-transform: uppercase; text-align: right; margin-top: 3px; }
.audit-run-footer { margin-top: 30px; text-align: center; padding-bottom: 40px; }

.audit-input-wrap { position: relative; margin-bottom: 25px; }
#audit-input-master {
  width: 100%; padding: 20px 20px 20px 60px; font-size: 1.5em;
  border: 2px solid rgba(74,127,232,0.5) !important; border-radius: 10px;
  background: rgba(255,255,255,0.04) !important; color: #e2e8f0 !important;
  box-shadow: 0 4px 12px rgba(74,127,232,0.12) !important; outline: none; box-sizing: border-box;
}
.audit-input-icon {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.5em; color: #4a7fe8 !important;
}
#audit-sugerencias {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #1e2535 !important; border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 0 0 8px 8px; max-height: 200px;
  overflow-y: auto; z-index: 100; box-shadow: 0 10px 20px rgba(0,0,0,0.4) !important;
}
#sec-auditoria #audit-card-active {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
#sec-auditoria #audit-prod-nombre { color: #e2e8f0 !important; }
#sec-auditoria #audit-prod-sku { color: #64748b !important; }
#sec-auditoria .audit-value { color: #e2e8f0 !important; }
#sec-auditoria .audit-label { color: #64748b !important; }
#sec-auditoria .audit-stat-card.system { background: rgba(255,255,255,0.04) !important; }
#sec-auditoria .audit-stat-card.counted { background: rgba(39,174,96,0.12) !important; border-color: rgba(46,204,113,0.4) !important; }
#sec-auditoria .audit-stat-card.diff { background: rgba(255,255,255,0.03) !important; border-color: rgba(255,255,255,0.07) !important; }

.audit-btn-finish {
  background: rgba(231,76,60,0.85) !important; color: white !important;
  padding: 12px 32px !important; border: none !important;
  border-radius: 8px !important; font-weight: bold !important;
  cursor: pointer !important; transition: background 0.2s !important;
  font-size: 1em !important; letter-spacing: 0.03em !important;
}
.audit-btn-finish:hover { background: #e74c3c !important; }

/* Modal historial auditorías */
#sec-auditoria .modal-overlay .modal-content {
  background: #161b27 !important; color: #e2e8f0 !important;
}
#sec-auditoria .audit-filters-bar {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
}
#sec-auditoria .audit-filters-bar input,
#sec-auditoria .audit-filters-bar select {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #e2e8f0 !important;
}
#sec-auditoria #panel-ajuste-detalle {
  border-top-color: rgba(255,255,255,0.07) !important;
}
#sec-auditoria #panel-ajuste-detalle table thead {
  background: rgba(255,255,255,0.04) !important;
}
#sec-auditoria #panel-ajuste-detalle table th,
#sec-auditoria #panel-ajuste-detalle table td {
  color: #e2e8f0 !important; border-color: rgba(255,255,255,0.07) !important;
  background: transparent !important;
}

#pagination-audit {
  display: flex; justify-content: center; align-items: center;
  gap: 12px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.07) !important;
}
#pagination-audit button {
  background: rgba(74,127,232,0.2) !important; color: #6b9bf0 !important;
  border: 1px solid rgba(74,127,232,0.3) !important;
  padding: 7px 14px !important; border-radius: 6px !important; cursor: pointer !important;
  font-size: 0.82em !important; transition: background 0.2s !important;
}
#pagination-audit button:hover { background: rgba(74,127,232,0.4) !important; }
#pagination-audit span { font-weight: 600; color: #64748b !important; font-size: 0.85em; }

/* ============================================================
   PNV — Quick-add bar + Variantes bar + Toolbar (PRODUCTOBASEIDEA)
   ============================================================ */

/* --- Quick-add bar --- */
.pnv-quick-bar {
  background: #161b27;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 14px 14px 0 0;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.pnv-qb-label {
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.5px; color: #4a6080; white-space: nowrap; flex-shrink: 0;
}
.pnv-qb-sep {
  width: 1px; height: 16px; background: rgba(255,255,255,0.11); flex-shrink: 0;
}
.pnv-qi {
  background: #1e2538 !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 8px !important;
  padding: 7px 10px !important;
  font-size: 11px !important;
  color: #f1f5f9 !important;
  font-family: 'Poppins', sans-serif !important;
  outline: none; transition: all 0.15s;
}
.pnv-qi:focus {
  border-color: #4a7fe8 !important;
  box-shadow: 0 0 0 3px rgba(74,127,232,0.2) !important;
}
.pnv-qi::placeholder { color: #4a6080 !important; font-size: 10px !important; }
.pnv-qi:-webkit-autofill,
.pnv-qi:autofill {
  -webkit-box-shadow: 0 0 0 1000px #1e2538 inset !important;
  box-shadow: 0 0 0 1000px #1e2538 inset !important;
  -webkit-text-fill-color: #f1f5f9 !important;
}
.pnv-qi-nombre { width: 200px; }
.pnv-qi-sku { width: 90px; font-family: 'DM Mono', monospace !important; font-size: 10px !important; }
.pnv-qi-num { width: 80px; font-family: 'DM Mono', monospace !important; }
.pnv-qi-sel { cursor: pointer; width: 130px; }
.pnv-btn-add {
  padding: 7px 16px !important; border-radius: 8px !important; border: none !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #1a3a8a, #4a7fe8) !important;
  color: white !important; font-family: 'Poppins', sans-serif !important;
  font-size: 11px !important; font-weight: 700 !important;
  white-space: nowrap !important; transition: all 0.15s !important;
  flex-shrink: 0 !important; letter-spacing: 0.03em !important;
}
.pnv-btn-add:hover { box-shadow: 0 3px 12px rgba(74,127,232,0.4) !important; opacity: 1 !important; transform: none !important; }
.pnv-sesion-chips { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }

/* --- Variantes bar --- */
.pnv-var-bar {
  background: #161b27;
  border: 1px solid rgba(255,255,255,0.11);
  border-top: none;
  display: flex; align-items: stretch;
  min-height: 72px; margin-bottom: 12px;
  overflow: visible;
  position: relative;
}
.pnv-var-bar.disabled { opacity: 0.4; pointer-events: none; filter: grayscale(0.4); transition: all 0.3s; }
.pnv-var-bar.active { opacity: 1; pointer-events: all; filter: none; }
.pnv-vbar-half {
  flex: 1; display: flex; align-items: center;
  gap: 8px; padding: 10px 16px; flex-wrap: nowrap;
  min-width: 0; overflow: visible;
}
.pnv-vbar-left { border-right: 1px solid rgba(255,255,255,0.07); }
.pnv-vbar-right { justify-content: center; padding-left: 0; padding-right: 0; }
.pnv-vbar-divider { display: none; }
.pnv-vb-lbl {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: #4a6080; flex-shrink: 0;
}
.pnv-vb-genbtns { display: flex; gap: 5px; }
.pnv-vbg {
  padding: 5px 11px !important; border-radius: 8px !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  background: #1e2538 !important; font-size: 10px !important; font-weight: 600 !important;
  color: #4a6080 !important; cursor: pointer !important; transition: all 0.15s !important;
  display: flex !important; align-items: center !important; gap: 4px !important;
}
.pnv-vbg:hover {
  border-color: rgba(74,127,232,0.3) !important; color: #94a3b8 !important;
  opacity: 1 !important; transform: none !important;
}
.pnv-vbg.active {
  background: rgba(74,127,232,0.1) !important; border-color: #4a7fe8 !important;
  color: #6b9bf0 !important;
}
.pnv-manual-row { display: flex; align-items: center; gap: 5px; }
.pnv-btn-mini {
  padding: 6px 10px !important; border-radius: 7px !important; border: none !important;
  background: #4a7fe8 !important; color: white !important; font-size: 12px !important;
  cursor: pointer !important; flex-shrink: 0 !important; transition: all 0.15s !important;
}
.pnv-btn-mini:hover { background: #3a6fd8 !important; opacity: 1 !important; transform: none !important; }
#grid-velocidad-container { display: flex; justify-content: center; align-items: center; }
.pnv-grid-header {
  position: static; height: 0; overflow: visible; margin: 0; padding: 0;
}
.pnv-grid-header i {
  position: absolute; top: -8px; right: -8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.3);
  color: #f87171; font-size: 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.pnv-grid-header i:hover { background: rgba(248,113,113,0.3); }
.pnv-grid-cells { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 6px; overflow: visible; }

/* --- Toolbar PNV --- */
.pnv-toolbar {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 0 !important;
  border-bottom: none !important;
  padding: 10px 16px !important;
  display: flex !important; align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important; gap: 7px !important; margin-bottom: 0;
}
.pnv-tb-left {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.pnv-tb-btn {
  padding: 6px 12px !important; border-radius: 7px !important;
  border: 1px solid rgba(255,255,255,0.11) !important; background: #1e2538 !important;
  color: #94a3b8 !important; font-family: 'Poppins', sans-serif !important;
  font-size: 10px !important; font-weight: 600 !important; cursor: pointer !important;
  transition: all 0.15s !important; display: flex !important; align-items: center !important;
  gap: 5px !important; white-space: nowrap !important;
}
.pnv-tb-btn:hover {
  border-color: rgba(74,127,232,0.35) !important; color: #6b9bf0 !important;
  opacity: 1 !important; transform: none !important;
}
.pnv-tb-primary {
  background: rgba(74,127,232,0.08) !important;
  border-color: rgba(74,127,232,0.25) !important; color: #6b9bf0 !important;
}
.pnv-tb-gold {
  background: rgba(245,158,11,0.07) !important;
  border-color: rgba(245,158,11,0.22) !important; color: #f59e0b !important;
}
.pnv-tb-sep {
  width: 1px; height: 14px; background: rgba(255,255,255,0.11); flex-shrink: 0;
}
.pnv-tb-inp {
  background: #1e2538 !important; border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 7px !important; padding: 6px 10px !important; font-size: 11px !important;
  color: #f1f5f9 !important; font-family: 'Poppins', sans-serif !important;
  outline: none !important; width: 190px !important;
}
.pnv-tb-inp::placeholder { color: #4a6080 !important; }
.pnv-tb-inp:focus { border-color: #4a7fe8 !important; box-shadow: none !important; }
.pnv-tb-sel {
  background: #1e2538 !important; border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 7px !important; padding: 6px 10px !important; font-size: 11px !important;
  color: #f1f5f9 !important; font-family: 'Poppins', sans-serif !important;
  outline: none !important; cursor: pointer !important;
}
.pnv-tb-pct { display: flex; align-items: center; gap: 4px; }
.pnv-tb-pct-inp {
  width: 48px !important; background: #1e2538 !important;
  border: 1px solid rgba(255,255,255,0.11) !important; border-radius: 7px !important;
  padding: 6px 7px !important; font-size: 11px !important; color: #f1f5f9 !important;
  font-family: 'DM Mono', monospace !important; outline: none !important; text-align: center !important;
}
.pnv-tb-pct span { font-size: 10px; color: #4a6080; }
.pnv-tb-save { margin-left: 0; }
.var-scroll-inner::-webkit-scrollbar { display: none !important; }

/* ============================================================
   GASTOS — DARK THEME (paleta idéntica a Proveedores)
   ============================================================ */
#sec-finanzas-gastos {
  background: var(--inv-bg,#0d1117) !important;
  margin: -20px !important; padding: 20px 26px !important;
  width: calc(100% + 40px) !important; min-height: 100vh !important;
  box-sizing: border-box !important;
}
/* Panel carga rápida */
#sec-finanzas-gastos > div:first-child {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
/* Mitad izquierda del panel */
#sec-finanzas-gastos > div:first-child > div:first-child {
  background: #161b27 !important;
  border-right-color: rgba(255,255,255,0.08) !important;
}
/* Label "Nuevo Gasto" */
#sec-finanzas-gastos > div:first-child > div:first-child > div:first-child {
  color: #6b9bf0 !important;
}
/* Tooltip feedback — sin saltos de línea */
#quick-feedback {
  white-space: nowrap !important;
  max-width: none !important;
  overflow: visible !important;
}
/* Wrapper monto $ */
#sec-finanzas-gastos .input-group-zenit {
  background: #1e2538 !important;
  border-color: rgba(255,255,255,0.1) !important;
}
#sec-finanzas-gastos .input-group-zenit span { color: #10b981 !important; }
#quick-monto {
  background: transparent !important;
  color: #f1f5f9 !important;
}
/* Botón selector de concepto */
#btn-selector-concepto {
  background: #1e2538 !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #4a6080 !important;
}
#txt-concepto-selec { color: #4a6080 !important; }
/* Botón agregar (+) */
#sec-finanzas-gastos button[onclick="guardarGastoQuick()"] {
  background: rgba(74,127,232,0.18) !important;
  border: 1px solid rgba(74,127,232,0.35) !important;
  color: #6b9bf0 !important;
}
/* Input detalle */
#quick-detalle {
  border-bottom-color: rgba(255,255,255,0.12) !important;
  color: #f1f5f9 !important;
}
#quick-detalle::placeholder { color: #4a6080 !important; }
/* Dropdown conceptos */
#dropdown-conceptos {
  background: #1e2538 !important;
  border-color: rgba(255,255,255,0.1) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}
#dropdown-conceptos .grupo-concepto {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}
#dropdown-conceptos > div .grupo-concepto > div:first-child,
#dropdown-conceptos > .grupo-concepto > div:first-child {
  color: #4a6080 !important;
}
/* Chips de concepto */
#sec-finanzas-gastos .opcion-chip {
  background: rgba(255,255,255,0.06) !important;
  color: #94a3b8 !important;
}
#sec-finanzas-gastos .opcion-chip:hover  { background: rgba(74,127,232,0.18) !important; color: #6b9bf0 !important; }
#sec-finanzas-gastos .opcion-chip.selected { background: rgba(74,127,232,0.22) !important; color: #6b9bf0 !important; }
/* Sugerencias detalle */
#sugerencias-detalle {
  background: #1e2538 !important;
  border-color: rgba(255,255,255,0.1) !important;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.5) !important;
}
/* Tabs filtro de gasto */
#sec-finanzas-gastos .tab-gasto {
  color: #4a6080 !important;
  border-bottom-color: transparent !important;
}
#sec-finanzas-gastos .tab-gasto:hover { color: #94a3b8 !important; }
#sec-finanzas-gastos .tab-gasto.active {
  color: #f1f5f9 !important;
  border-bottom-color: #4a7fe8 !important;
}
/* Tabla principal */
#sec-finanzas-gastos > div:last-child {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
#sec-finanzas-gastos table thead {
  background: rgba(255,255,255,0.03) !important;
  border-bottom-color: rgba(255,255,255,0.07) !important;
}
#sec-finanzas-gastos table th {
  background: rgba(255,255,255,0.03) !important;
  color: #4a6080 !important;
  font-size: 0.7em !important; letter-spacing: 0.07em !important; text-transform: uppercase !important;
  border: none !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  padding: 11px 15px !important; font-weight: 700 !important;
}
#sec-finanzas-gastos table td {
  color: #e2e8f0 !important;
  border: none !important; border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  padding: 11px 15px !important; background: transparent !important;
}
#sec-finanzas-gastos table tr { border: none !important; }
#sec-finanzas-gastos table tr:last-child td { border-bottom: none !important; }
#sec-finanzas-gastos table tbody tr:hover td { background: rgba(74,127,232,0.04) !important; }

/* ============================================================
   REPORTES (Business Intelligence) — DARK THEME
   ============================================================ */
#sec-finanzas-reportes {
  background: var(--inv-bg,#0d1117) !important;
  margin: -20px !important; padding: 20px 26px !important;
  width: calc(100% + 40px) !important; min-height: 100vh !important;
  box-sizing: border-box !important;
}
/* Encabezado */
#sec-finanzas-reportes h2 { color: #e2e8f0 !important; }
#sec-finanzas-reportes h3 { color: #e2e8f0 !important; }
#sec-finanzas-reportes > div:first-child > div:first-child > p { color: #4a6080 !important; }
/* Barra de filtros */
#sec-finanzas-reportes > div:first-child > div:last-child {
  background: #161b27 !important;
  border-color: rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
/* Botones filtro */
#sec-finanzas-reportes .btn-filtro {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  color: #64748b !important;
}
#sec-finanzas-reportes .btn-filtro.active {
  background: rgba(74,127,232,0.2) !important;
  border-color: rgba(74,127,232,0.4) !important;
  color: #6b9bf0 !important;
}
/* Rango personalizado */
#contenedor-fechas-bi {
  background: #1e2538 !important;
}
#bi-mes-inicio, #bi-mes-fin {
  background: #0d1117 !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #f1f5f9 !important;
}
#sec-finanzas-reportes button[onclick="aplicarRangoBI()"] {
  background: rgba(74,127,232,0.18) !important;
  border: 1px solid rgba(74,127,232,0.35) !important;
  color: #6b9bf0 !important;
}
/* KPI cards */
#sec-finanzas-reportes .card-kpi-finanzas {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
#sec-finanzas-reportes .card-kpi-finanzas > span { color: #4a6080 !important; }
/* Contenedores gráficos */
#sec-finanzas-reportes > div:nth-child(3) > div {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
/* Sección inferior (stock + breakeven) */
#sec-finanzas-reportes > div:nth-child(4) > div {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
/* Stock inmóvil title mantiene rojo pero más brillante en dark */
#sec-finanzas-reportes > div:nth-child(4) > div:first-child > h3 {
  color: #f87171 !important;
  border-bottom-color: rgba(255,255,255,0.08) !important;
}
/* Breakeven chart bg */
#sec-finanzas-reportes > div:nth-child(4) > div:last-child > div {
  background: #0d1117 !important;
}
#sec-finanzas-reportes > div:nth-child(4) > div:last-child > p { color: #4a6080 !important; }
#sec-finanzas-reportes > div:nth-child(4) > div:last-child strong { color: #e2e8f0 !important; }
/* Tabla stock inmóvil */
#sec-finanzas-reportes table thead {
  background: rgba(255,255,255,0.03) !important;
}
#sec-finanzas-reportes table th {
  background: rgba(255,255,255,0.03) !important;
  color: #4a6080 !important;
  font-size: 0.7em !important; letter-spacing: 0.07em !important;
  border: none !important;
  padding: 10px !important; font-weight: 700 !important;
}
#sec-finanzas-reportes table td {
  color: #e2e8f0 !important;
  border: none !important; border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  background: transparent !important;
}
#sec-finanzas-reportes table tbody tr:hover td { background: rgba(74,127,232,0.04) !important; }

/* ============================================================
   COBRANZAS / CTA CTE — DARK THEME
   ============================================================ */
#sec-cobranzas {
  background: var(--inv-bg,#0d1117) !important;
  margin: -20px !important; padding: 20px 26px !important;
  width: calc(100% + 40px) !important; min-height: 100vh !important;
  box-sizing: border-box !important;
}
/* Encabezado */
#sec-cobranzas h1 { color: #e2e8f0 !important; }
#sec-cobranzas > div:first-child > div > p { color: #4a6080 !important; }
/* Botón actualizar tablero */
#sec-cobranzas button[onclick="cargarDashboardCobranzas()"] {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #94a3b8 !important;
}
/* Tarjetas de estado — dark bg, se preservan los border-top de color */
#sec-cobranzas > div:nth-child(2) > div {
  background: #161b27 !important;
  box-shadow: none !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
}
/* Montos en las tarjetas (navy inline → light) */
#cob-total-verde, #cob-total-amarillo, #cob-total-rojo {
  color: #e2e8f0 !important;
}
/* Texto secundario en tarjetas */
#cob-clientes-verde { color: #4a6080 !important; }
#cob-clientes-amarillo { color: #4a6080 !important; }
/* Panel principal (buscador + tabla) */
#sec-cobranzas > div:nth-child(3) {
  background: #161b27 !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}
/* Buscador */
#busqueda-cobranzas {
  background: #1e2538 !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #f1f5f9 !important;
}
#busqueda-cobranzas::placeholder { color: #4a6080 !important; }
#busqueda-cobranzas:focus {
  border-color: #4a7fe8 !important;
  box-shadow: 0 0 0 3px rgba(74,127,232,0.15) !important;
}
/* Select de estado */
#sec-cobranzas select {
  background: #1e2538 !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #f1f5f9 !important;
}
/* Tabla */
#sec-cobranzas table thead {
  background: rgba(255,255,255,0.03) !important;
  color: #4a6080 !important;
}
#sec-cobranzas table th {
  background: rgba(255,255,255,0.03) !important;
  color: #4a6080 !important;
  font-size: 0.7em !important; letter-spacing: 0.07em !important; text-transform: uppercase !important;
  border: none !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  padding: 11px 15px !important; font-weight: 700 !important;
}
#sec-cobranzas table td {
  color: #e2e8f0 !important;
  border: none !important; border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  padding: 11px 15px !important; background: transparent !important;
}
#sec-cobranzas table tr { border: none !important; }
#sec-cobranzas table tr:last-child td { border-bottom: none !important; }
#sec-cobranzas table tbody tr:hover td { background: rgba(74,127,232,0.04) !important; }

/* ============================================================
   REPORTES — ajustes dark mode para breakeven y paginador
   ============================================================ */
/* Breakeven chart container */
#sec-finanzas-reportes > div:nth-child(4) > div:last-child > div {
  background: transparent !important;
}
/* Mensaje breakeven */
#sec-finanzas-reportes .be-msg { color: #4a6080 !important; }
#sec-finanzas-reportes .be-msg strong { color: #e2e8f0 !important; }
/* Paginador stock inmóvil */
#pag-clavos button {
  min-width: 28px !important; height: 28px !important;
  border-radius: 7px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  color: #64748b !important;
  font-size: 11px !important; font-weight: 600 !important;
  cursor: pointer !important; font-family: 'Poppins',sans-serif !important;
  padding: 0 8px !important; box-shadow: none !important;
  transition: all 0.13s !important;
}
#pag-clavos button:hover:not([disabled]) {
  background: rgba(255,255,255,0.08) !important;
  color: #94a3b8 !important;
}
#pag-clavos button:disabled { opacity: 0.35 !important; cursor: default !important; }

/* ============================================================
   BONIFICACIÓN / RANKING  (bnf-)
   Paleta dark-navy idéntica al resto del sistema
   ============================================================ */
.bnf-section {
  padding: 24px;
  padding-bottom: 60px;
  background: transparent;
  font-family: 'Poppins', sans-serif;
}

/* Header */
.bnf-mod-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.bnf-title {
  font-size: 22px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bnf-sub {
  font-size: 13px;
  color: #4a6080;
  margin-top: 3px;
  font-family: 'Poppins', sans-serif;
}
.bnf-per-btns { display: flex; gap: 6px; }
/* Especificidad alta con #sec-ranking para ganar al global button { !important } */
#sec-ranking .bnf-per-btn {
  padding: 6px 16px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  background: rgba(255,255,255,0.05) !important;
  color: #64748b !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all .15s !important;
  line-height: 1.4 !important;
  transform: none !important;
  opacity: 1 !important;
}
#sec-ranking .bnf-per-btn.active {
  background: rgba(74,127,232,0.2) !important;
  border-color: rgba(74,127,232,0.4) !important;
  color: #6b9bf0 !important;
}
#sec-ranking .bnf-per-btn:hover:not(.active) {
  background: rgba(255,255,255,0.08) !important;
  color: #94a3b8 !important;
  transform: none !important;
  opacity: 1 !important;
}

/* Barra de meta */
.bnf-meta-bar {
  background: #161b27;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}
.bnf-mb-user { display: flex; align-items: center; gap: 10px; }
.bnf-mb-av {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a3a8a, #4a7fe8);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: white;
  flex-shrink: 0;
}
.bnf-mb-name { font-size: 15px; font-weight: 800; color: #f1f5f9; }
.bnf-mb-pos { font-size: 13px; color: #6b9bf0; font-weight: 700; margin-top: 1px; font-family: 'Poppins', sans-serif; }
.bnf-mb-prog-top {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px;
}
.bnf-mb-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #4a6080; }
.bnf-mb-pct { font-size: 14px; font-weight: 800; color: #f59e0b; font-family: 'Poppins', sans-serif; }
.bnf-mb-track { height: 7px; border-radius: 6px; background: #252d42; position: relative; }
.bnf-mb-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  position: relative; transition: width .7s ease;
}
.bnf-mb-fill::after {
  content: ''; position: absolute; right: 0; top: -4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}
.bnf-mb-nums { text-align: right; flex-shrink: 0; }
.bnf-mb-val { font-size: 17px; font-weight: 900; font-family: 'Poppins', sans-serif; color: #f59e0b; }
.bnf-mb-meta { font-size: 12px; color: #4a6080; margin-top: 2px; font-family: 'Poppins', sans-serif; }

/* Podio */
.bnf-podio {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.bnf-pod-card {
  background: #161b27;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  position: relative; overflow: hidden;
  transition: all .15s;
}
.bnf-pod-card:hover { border-color: rgba(74,127,232,0.25); transform: translateY(-1px); }
.bnf-p1 { border-color: rgba(245,158,11,0.3); background: linear-gradient(135deg, rgba(245,158,11,0.06), transparent); }
.bnf-p2 { border-color: rgba(148,163,184,0.18); }
.bnf-p3 { border-color: rgba(180,123,75,0.18); }
.bnf-pod-rank { font-size: 28px; font-weight: 900; font-family: 'Poppins', sans-serif; flex-shrink: 0; line-height: 1; }
.bnf-pod-av {
  width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: white; flex-shrink: 0;
}
.bnf-av-gold   { background: linear-gradient(135deg, #92400e, #f59e0b); }
.bnf-av-blue   { background: linear-gradient(135deg, #1e3a5f, #4a7fe8); }
.bnf-av-bronze { background: linear-gradient(135deg, #3d2b1f, #b47b4b); }
.bnf-pod-info { flex: 1; min-width: 0; }
.bnf-pod-name { font-size: 15px; font-weight: 800; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bnf-pod-vsub { font-size: 12px; color: #4a6080; margin-top: 3px; }
.bnf-pod-right { text-align: right; flex-shrink: 0; }
.bnf-pod-monto { font-size: 17px; font-weight: 900; font-family: 'Poppins', sans-serif; color: #f1f5f9; }
.bnf-gold   { color: #f59e0b !important; }
.bnf-bronze { color: #b47b4b !important; }
.bnf-pod-badge { font-size: 12px; font-family: 'Poppins', sans-serif; margin-top: 3px; }
.bnf-up { color: #10b981; }

/* Tabla general */
.bnf-tabla-wrap {
  background: #161b27;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 12px;
  overflow: hidden;
}
.bnf-tw-head {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.1);
}
.bnf-tw-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #4a6080; }
.bnf-tw-cnt {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 5px;
  background: #252d42; color: #4a6080; font-family: 'Poppins', sans-serif;
}

/* Tabla clasificación — todo con !important para vencer th,td global */
#sec-ranking .bnf-rtable {
  width: 100% !important;
  border-collapse: collapse !important;
  font-family: 'Poppins', sans-serif !important;
  margin-top: 0 !important;
}
#sec-ranking .bnf-rtable thead tr {
  background: rgba(0,0,0,0.18) !important;
}
#sec-ranking .bnf-rtable th {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  color: #4a6080 !important;
  background: rgba(0,0,0,0.18) !important;
  padding: 10px 16px !important;
  text-align: left !important;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  white-space: nowrap !important;
}
#sec-ranking .bnf-rtable th.r { text-align: right !important; }
#sec-ranking .bnf-rtable td {
  padding: 12px 16px !important;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  vertical-align: middle !important;
  font-size: 14px !important; /* base; clases específicas lo sobreescriben */
  background: transparent !important;
}
#sec-ranking .bnf-rtable tbody tr:last-child td {
  border-bottom: none !important;
}
#sec-ranking .bnf-rtable tbody tr { transition: background .12s; }
#sec-ranking .bnf-rtable tbody tr:hover td {
  background: rgba(74,127,232,0.04) !important;
}

/* Celda posición */
#sec-ranking .bnf-tr-pos {
  font-size: 14px !important; font-weight: 800 !important;
  font-family: 'Poppins', sans-serif !important;
  width: 36px !important; white-space: nowrap !important;
}
/* Avatar inicial */
#sec-ranking .bnf-tr-av {
  width: 36px !important; height: 36px !important; border-radius: 8px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  font-size: 13px !important; font-weight: 800 !important; color: white !important;
  flex-shrink: 0 !important;
}
/* Nombre */
#sec-ranking .bnf-tr-name {
  font-size: 14px !important; font-weight: 700 !important; color: #f1f5f9 !important;
  display: flex !important; align-items: center !important; gap: 6px !important;
}
#sec-ranking .bnf-badge-yo {
  font-size: 11px !important; font-weight: 700 !important;
  text-transform: uppercase !important; letter-spacing: .5px !important;
  padding: 2px 7px !important; border-radius: 4px !important;
  background: rgba(245,158,11,0.15) !important; color: #f59e0b !important;
}

/* Alineación columnas — th y td deben coincidir */
#sec-ranking .bnf-rtable th.r   { text-align: right !important; }
#sec-ranking .bnf-rtable td.r   { text-align: right !important; }
#sec-ranking .bnf-rtable th.c   { text-align: center !important; }
#sec-ranking .bnf-rtable td.c   { text-align: center !important; }

/* Tipografía números — Poppins 700, unificada con el resto de la sección */
#sec-ranking .bnf-tr-num,
#sec-ranking .bnf-rtable td.bnf-tr-num {
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: 'Poppins', sans-serif !important;
  color: #94a3b8 !important;
  letter-spacing: 0 !important;
}
#sec-ranking .bnf-tr-monto,
#sec-ranking .bnf-rtable td.bnf-tr-monto {
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: 'Poppins', sans-serif !important;
  color: #f1f5f9 !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}

/* Columna % Meta — barra full-width + número */
#sec-ranking .bnf-meta-cell {
  min-width: 160px !important;
  width: 220px !important;
}
#sec-ranking .bnf-meta-pct-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}
#sec-ranking .bnf-meta-pct-num {
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: 'Poppins', sans-serif !important;
  min-width: 48px !important;
  text-align: right !important;
  flex-shrink: 0 !important;
}
#sec-ranking .bnf-meta-track {
  height: 5px !important;
  border-radius: 4px !important;
  background: #252d42 !important;
  flex: 1 !important;
  border: none !important;
}
#sec-ranking .bnf-meta-fill {
  height: 100% !important;
  border-radius: 4px !important;
  transition: width .5s ease !important;
}

/* Dark-mode override: ya es dark-native */
body.dark-mode #sec-ranking h1 { text-shadow: none; }
body.dark-mode #nombre-top-1, body.dark-mode #xp-top-1,
body.dark-mode #nombre-top-2, body.dark-mode #xp-top-2,
body.dark-mode #nombre-top-3, body.dark-mode #xp-top-3 { color: inherit !important; }
