fix: Redisenar terminal POS a interfaz SaaS blanca y solucionar desbordamiento de botones

This commit is contained in:
unknown
2026-10-05 05:57:50 -06:00
parent 472b0e32d3
commit 6aa0ae016b
3 changed files with 526 additions and 184 deletions
+352 -43
View File
@@ -623,18 +623,19 @@ body.dark-mode .floating-cart-bar {
} }
/* ========================================================================== /* ==========================================================================
TERMINAL POS SODA (pos.html) TERMINAL POS SODA (pos.html) - TEMA SAAS PROFESIONAL CLARO (ADMIN-MATCH)
========================================================================== */ ========================================================================== */
.pos-layout { .pos-layout {
display: grid; display: grid;
grid-template-columns: 1fr 420px; grid-template-columns: 1fr 420px;
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
background: #0f172a; background: #f8fafc;
color: #f8fafc; color: #0f172a;
} }
.pos-catalog-pane { .pos-catalog-pane {
background: #f8fafc;
padding: 20px; padding: 20px;
overflow-y: auto; overflow-y: auto;
display: flex; display: flex;
@@ -644,42 +645,141 @@ body.dark-mode .floating-cart-bar {
box-sizing: border-box; box-sizing: border-box;
} }
.pos-header-card {
display: flex;
justify-content: space-between;
align-items: center;
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 14px;
padding: 12px 18px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
flex-wrap: wrap;
gap: 10px;
}
.pos-tabs { .pos-tabs {
display: flex; display: flex;
gap: 10px; gap: 8px;
border-bottom: 2px solid #334155; border-bottom: 1px solid #e2e8f0;
padding-bottom: 12px; padding-bottom: 12px;
} }
.pos-tab-btn { .pos-tab-btn {
background: #1e293b; background: #ffffff;
border: 1px solid #334155; border: 1px solid #cbd5e1;
color: #94a3b8; color: #64748b;
padding: 10px 18px; padding: 9px 16px;
border-radius: 10px; border-radius: 10px;
font-size: 0.95rem; font-size: 0.88rem;
font-weight: 800; font-weight: 700;
cursor: pointer; cursor: pointer;
display: flex; display: inline-flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
transition: all 0.15s ease;
}
.pos-tab-btn:hover {
background: #f1f5f9;
color: #0f172a;
border-color: #94a3b8;
} }
.pos-tab-btn.active { .pos-tab-btn.active {
background: #0284c7; background: #0f172a;
color: white; color: #ffffff;
border-color: #0284c7; border-color: #0f172a;
box-shadow: 0 2px 5px rgba(15, 23, 42, 0.15);
} }
/* Toolbar de categorías y botón + Rápido */
.pos-category-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin-bottom: 14px;
width: 100%;
}
.pos-category-scroll-container {
display: flex;
gap: 8px;
overflow-x: auto;
flex: 1;
min-width: 0;
padding: 2px 2px 6px 2px;
-webkit-overflow-scrolling: touch;
scrollbar-width: thin;
}
.pos-cat-pill {
background: #ffffff;
border: 1px solid #cbd5e1;
color: #475569;
padding: 6px 14px;
border-radius: 20px;
font-size: 0.82rem;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
display: inline-flex;
align-items: center;
gap: 6px;
transition: all 0.15s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.pos-cat-pill:hover {
background: #f8fafc;
border-color: #94a3b8;
color: #0f172a;
}
.pos-cat-pill.active {
background: #0f172a;
color: #ffffff;
border-color: #0f172a;
box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}
.pos-btn-quick-prod {
flex-shrink: 0;
white-space: nowrap;
height: 34px;
padding: 0 14px;
border-radius: 9px;
font-weight: 700;
font-size: 0.82rem;
display: inline-flex;
align-items: center;
gap: 6px;
}
@media (max-width: 768px) {
.pos-category-toolbar {
flex-direction: column;
align-items: stretch;
gap: 8px;
}
.pos-btn-quick-prod {
width: 100%;
height: 38px;
order: -1;
}
}
/* Tarjetas de producto POS */
.pos-products-grid { .pos-products-grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
gap: 14px; gap: 14px;
} }
.pos-prod-card { .pos-prod-card {
background: #1e293b; background: #ffffff;
border: 1px solid #334155; border: 1px solid #e2e8f0;
border-radius: 14px; border-radius: 14px;
padding: 16px; padding: 16px;
cursor: pointer; cursor: pointer;
@@ -687,18 +787,178 @@ body.dark-mode .floating-cart-bar {
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
min-height: 140px; min-height: 140px;
transition: all 0.15s; transition: all 0.15s ease;
box-sizing: border-box; box-sizing: border-box;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
position: relative;
} }
.pos-prod-card:hover { .pos-prod-card:hover {
border-color: #38bdf8; border-color: #0284c7;
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(2, 132, 199, 0.12);
} }
.pos-prod-card .prod-title {
font-size: 0.88rem;
font-weight: 800;
color: #0f172a;
line-height: 1.25;
}
.pos-prod-card .prod-price {
font-size: 1.15rem;
font-weight: 900;
color: #0284c7;
margin-top: 6px;
}
.pos-prod-card.out-of-stock-pos {
opacity: 0.55 !important;
filter: grayscale(85%) !important;
border-color: #fca5a5 !important;
background: #fef2f2 !important;
cursor: not-allowed !important;
}
/* Tarjetas de Pre-órdenes */
.pos-preorder-card {
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 14px;
padding: 14px 16px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
display: flex;
flex-direction: column;
gap: 10px;
transition: all 0.15s ease;
}
.pos-preorder-card:hover {
border-color: #cbd5e1;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.pos-preorder-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
}
.pos-preorder-student {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.pos-preorder-avatar {
width: 42px;
height: 42px;
border-radius: 50%;
border: 2px solid #0284c7;
background: #f1f5f9;
flex-shrink: 0;
object-fit: cover;
}
.pos-preorder-name-row {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.pos-preorder-name {
color: #0f172a;
font-size: 0.95rem;
font-weight: 800;
}
.pos-preorder-grade {
font-size: 0.76rem;
color: #64748b;
font-weight: 600;
}
.pos-preorder-ticket-info {
font-size: 0.74rem;
color: #94a3b8;
margin-top: 2px;
}
.pos-preorder-items-box {
background: #f8fafc;
border: 1px solid #f1f5f9;
border-radius: 8px;
padding: 8px 12px;
display: flex;
align-items: center;
gap: 8px;
font-size: 0.84rem;
color: #0369a1;
font-weight: 700;
}
.pos-preorder-footer {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
border-top: 1px dashed #e2e8f0;
padding-top: 8px;
margin-top: 2px;
}
.pos-preorder-total {
display: flex;
align-items: baseline;
gap: 6px;
}
.pos-preorder-total-label {
font-size: 0.78rem;
color: #64748b;
font-weight: 600;
}
.pos-preorder-total-val {
font-size: 1.05rem;
font-weight: 900;
color: #0f172a;
}
.pos-btn-entregar {
background: #16a34a !important;
color: #ffffff !important;
border-color: #16a34a !important;
font-weight: 800 !important;
height: 34px !important;
padding: 0 16px !important;
}
.pos-btn-entregar:hover {
background: #15803d !important;
border-color: #15803d !important;
}
@media (max-width: 640px) {
.pos-preorder-footer {
flex-direction: column;
align-items: stretch;
gap: 8px;
}
.pos-btn-entregar {
width: 100% !important;
height: 38px !important;
}
}
/* Panel Checkout Derecho */
.pos-checkout-pane { .pos-checkout-pane {
background: #1e293b; background: #ffffff;
border-left: 2px solid #334155; border-left: 1px solid #e2e8f0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
@@ -707,6 +967,35 @@ body.dark-mode .floating-cart-bar {
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
box-shadow: -2px 0 10px rgba(0, 0, 0, 0.03);
}
.pos-cart-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #f1f5f9;
gap: 10px;
}
.pos-qty-btn {
width: 26px;
height: 26px;
background: #f1f5f9;
color: #0f172a;
border: 1px solid #cbd5e1;
border-radius: 6px;
font-weight: 800;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.15s ease;
}
.pos-qty-btn:hover {
background: #e2e8f0;
} }
.scanner-feed-card { .scanner-feed-card {
@@ -808,14 +1097,14 @@ body.dark-mode .floating-cart-bar {
/* BARRA DE PESTAÑAS MÓVIL EN LA CABECERA */ /* BARRA DE PESTAÑAS MÓVIL EN LA CABECERA */
.pos-mobile-nav { .pos-mobile-nav {
display: flex; display: flex;
background: #0b1120; background: #ffffff;
border-bottom: 2px solid #334155; border-bottom: 1px solid #e2e8f0;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 100; z-index: 100;
padding: 8px 10px; padding: 8px 10px;
gap: 8px; gap: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
} }
@@ -827,21 +1116,21 @@ body.dark-mode .floating-cart-bar {
justify-content: center; justify-content: center;
gap: 6px; gap: 6px;
padding: 10px 12px; padding: 10px 12px;
background: #1e293b; background: #ffffff;
border: 1.5px solid #334155; border: 1px solid #cbd5e1;
border-radius: 12px; border-radius: 10px;
color: #94a3b8; color: #475569;
font-size: 0.88rem; font-size: 0.88rem;
font-weight: 800; font-weight: 700;
cursor: pointer; cursor: pointer;
transition: all 0.15s ease; transition: all 0.15s ease;
} }
.pos-mobile-nav-btn.active { .pos-mobile-nav-btn.active {
background: #0284c7; background: #0f172a;
color: #ffffff; color: #ffffff;
border-color: #38bdf8; border-color: #0f172a;
box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
} }
.pos-mobile-nav-badge { .pos-mobile-nav-badge {
@@ -893,22 +1182,23 @@ body.dark-mode .floating-cart-bar {
.pos-mobile-back-btn { .pos-mobile-back-btn {
width: 100%; width: 100%;
padding: 11px 14px; padding: 11px 14px;
background: #0f172a; background: #ffffff;
color: #38bdf8; color: #0f172a;
border: 1.5px solid #334155; border: 1px solid #cbd5e1;
border-radius: 12px; border-radius: 10px;
font-size: 0.88rem; font-size: 0.88rem;
font-weight: 800; font-weight: 700;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 8px; gap: 8px;
box-sizing: border-box; box-sizing: border-box;
transition: all 0.15s ease;
} }
.pos-mobile-back-btn:active { .pos-mobile-back-btn:active {
background: #1e293b; background: #f1f5f9;
} }
/* BARRA FLOTANTE INFERIOR DE ACCESO RÁPIDO */ /* BARRA FLOTANTE INFERIOR DE ACCESO RÁPIDO */
@@ -918,17 +1208,18 @@ body.dark-mode .floating-cart-bar {
left: 12px; left: 12px;
right: 12px; right: 12px;
background: #0f172a; background: #0f172a;
border: 2px solid #0284c7; border: 1px solid #0f172a;
border-radius: 16px; border-radius: 14px;
padding: 10px 16px; padding: 12px 18px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.75), 0 0 18px rgba(2, 132, 199, 0.45); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
z-index: 99; z-index: 99;
cursor: pointer; cursor: pointer;
box-sizing: border-box; box-sizing: border-box;
animation: popUpFloat 0.25s cubic-bezier(0.16, 1, 0.3, 1); animation: popUpFloat 0.25s cubic-bezier(0.16, 1, 0.3, 1);
color: #ffffff;
} }
@keyframes popUpFloat { @keyframes popUpFloat {
@@ -3073,6 +3364,24 @@ body.dark-mode .saas-status-blocked .saas-dot {
background: #f87171; background: #f87171;
} }
.saas-status-pending {
background: #fffbeb;
color: #b45309;
border: 1px solid #fde68a;
}
.saas-status-pending .saas-dot {
background: #d97706;
box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}
body.dark-mode .saas-status-pending {
background: rgba(217, 119, 6, 0.15);
color: #fcd34d;
border-color: rgba(217, 119, 6, 0.3);
}
body.dark-mode .saas-status-pending .saas-dot {
background: #fbbf24;
}
/* Fila de Estudiante Moderna para PC */ /* Fila de Estudiante Moderna para PC */
.admin-student-row { .admin-student-row {
display: flex; display: flex;
+65 -41
View File
@@ -101,11 +101,12 @@ async function loadCatalog() {
function renderPosCategories() { function renderPosCategories() {
const bar = document.getElementById('posCategoriesBar'); const bar = document.getElementById('posCategoriesBar');
if (!bar) return;
bar.innerHTML = ` bar.innerHTML = `
<button class="pos-tab-btn active" style="padding: 6px 12px; font-size: 0.8rem;" onclick="filterPosCat(null, this)">Todos</button> <button class="pos-cat-pill active" onclick="filterPosCat(null, this)">Todos</button>
${posCategories.map(c => ` ${posCategories.map(c => `
<button class="pos-tab-btn" style="padding: 6px 12px; font-size: 0.8rem;" onclick="filterPosCat(${c.id}, this)"> <button class="pos-cat-pill" onclick="filterPosCat(${c.id}, this)">
${c.icono || '🍽️'} ${c.nombre} <span>${c.icono || '🍽️'}</span> ${c.nombre}
</button> </button>
`).join('')} `).join('')}
`; `;
@@ -115,7 +116,7 @@ let currentPosCatId = null;
function filterPosCat(catId, btn) { function filterPosCat(catId, btn) {
currentPosCatId = catId; currentPosCatId = catId;
document.querySelectorAll('#posCategoriesBar .pos-tab-btn').forEach(b => b.classList.remove('active')); document.querySelectorAll('#posCategoriesBar .pos-cat-pill').forEach(b => b.classList.remove('active'));
if (btn) btn.classList.add('active'); if (btn) btn.classList.add('active');
renderPosProducts(catId); renderPosProducts(catId);
} }
@@ -132,16 +133,15 @@ function renderPosProducts(catId) {
return ` return `
<div class="pos-prod-card ${isOutOfStock ? 'out-of-stock-pos' : ''}" <div class="pos-prod-card ${isOutOfStock ? 'out-of-stock-pos' : ''}"
style="${isOutOfStock ? 'opacity: 0.45; filter: grayscale(0.85); cursor: not-allowed; position: relative; border-color: #ef4444;' : ''}"
onclick="${isOutOfStock ? `alert('El producto \\'${prod.nombre.replace(/'/g, "\\'")}\\' se encuentra bloqueado o agotado.')` : `addToPosCart(${prod.id})`}"> onclick="${isOutOfStock ? `alert('El producto \\'${prod.nombre.replace(/'/g, "\\'")}\\' se encuentra bloqueado o agotado.')` : `addToPosCart(${prod.id})`}">
${isOutOfStock ? '<div style="position: absolute; top: 8px; right: 8px; background: #dc2626; color: #ffffff; font-size: 0.65rem; font-weight: 900; padding: 2px 6px; border-radius: 4px; z-index: 2; letter-spacing: 0.5px;">BLOQUEADO</div>' : ''} ${isOutOfStock ? '<div style="position: absolute; top: 10px; right: 10px;"><span class="saas-status-badge saas-status-blocked"><span class="saas-dot"></span>BLOQUEADO</span></div>' : ''}
<div style="font-size: 2.2rem; text-align: center;">${prod.icono || '🥪'}</div> <div style="font-size: 2.2rem; text-align: center; margin-bottom: 6px;">${prod.icono || '🥪'}</div>
<div> <div>
<div style="font-size: 0.88rem; font-weight: 800; color: #ffffff; line-height: 1.2;">${prod.nombre}</div> <div class="prod-title">${prod.nombre}</div>
${prod.cumple_mep ? '<span style="font-size: 0.65rem; color: #34d399;">🌿 MEP Saludable</span>' : ''} ${prod.cumple_mep ? '<span style="font-size: 0.68rem; color: #166534; font-weight: 700; margin-top: 3px; display: inline-flex; align-items: center; gap: 3px;">🌿 MEP Saludable</span>' : ''}
${isOutOfStock ? '<span style="font-size: 0.65rem; color: #f87171; display: block; margin-top: 2px; font-weight: 700;">No disponible</span>' : ''} ${isOutOfStock ? '<span style="font-size: 0.68rem; color: #dc2626; display: block; margin-top: 2px; font-weight: 700;">No disponible</span>' : ''}
</div> </div>
<div style="font-size: 1.1rem; font-weight: 900; color: ${isOutOfStock ? '#94a3b8' : '#38bdf8'}; margin-top: 6px;"> <div class="prod-price" style="color: ${isOutOfStock ? '#94a3b8' : '#0284c7'};">
₡${prod.precio_colones.toLocaleString('es-CR')} ₡${prod.precio_colones.toLocaleString('es-CR')}
</div> </div>
</div> </div>
@@ -320,14 +320,14 @@ function updatePosCartUI() {
return ` return `
<div class="pos-cart-item"> <div class="pos-cart-item">
<div style="flex: 1; min-width: 0; word-break: break-word;"> <div style="flex: 1; min-width: 0; word-break: break-word;">
<strong style="color: #f8fafc; font-size: 0.85rem; display: block; line-height: 1.2;">${item.product.icono ? `${item.product.icono} ` : ''}${item.product.nombre}</strong> <strong style="color: #0f172a; font-size: 0.85rem; display: block; line-height: 1.2;">${item.product.icono ? `${item.product.icono} ` : ''}${item.product.nombre}</strong>
<div style="font-size: 0.74rem; color: #94a3b8; margin-top: 2px;">₡${item.product.precio_colones.toLocaleString('es-CR')} c/u</div> <div style="font-size: 0.74rem; color: #64748b; margin-top: 2px;">₡${item.product.precio_colones.toLocaleString('es-CR')} c/u</div>
</div> </div>
<div style="display: flex; align-items: center; gap: 6px; flex-shrink: 0;"> <div style="display: flex; align-items: center; gap: 6px; flex-shrink: 0;">
<button onclick="changePosQty(${idx}, -1)" style="width: 26px; height: 26px; background: #334155; color: white; border: none; border-radius: 6px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center;">-</button> <button onclick="changePosQty(${idx}, -1)" class="pos-qty-btn">-</button>
<span style="font-weight: 800; min-width: 16px; text-align: center; color: #ffffff; font-size: 0.88rem;">${item.cantidad}</span> <span style="font-weight: 800; min-width: 18px; text-align: center; color: #0f172a; font-size: 0.88rem;">${item.cantidad}</span>
<button onclick="changePosQty(${idx}, 1)" style="width: 26px; height: 26px; background: #334155; color: white; border: none; border-radius: 6px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center;">+</button> <button onclick="changePosQty(${idx}, 1)" class="pos-qty-btn">+</button>
<span style="font-weight: 900; color: #38bdf8; min-width: 58px; text-align: right; font-size: 0.88rem;">₡${subtotal.toLocaleString('es-CR')}</span> <span style="font-weight: 900; color: #0284c7; min-width: 58px; text-align: right; font-size: 0.88rem;">₡${subtotal.toLocaleString('es-CR')}</span>
</div> </div>
</div> </div>
`; `;
@@ -635,18 +635,20 @@ function renderScannedStudent() {
const btnCobrar = document.getElementById('btnCobrarPos'); const btnCobrar = document.getElementById('btnCobrarPos');
if (scannedStudent.tarjeta_bloqueada) { if (scannedStudent.tarjeta_bloqueada) {
document.getElementById('scannedName').innerHTML = `${scannedStudent.nombre_completo} <span style="font-size: 0.72rem; color: #fee2e2; background: #dc2626; padding: 2px 7px; border-radius: 6px; font-weight: 900; margin-left: 6px;">⛔ TARJETA SUSPENDIDA</span>`; document.getElementById('scannedName').innerHTML = `${scannedStudent.nombre_completo} <span style="font-size: 0.72rem; color: #991b1b; background: #fee2e2; border: 1px solid #fecaca; padding: 2px 7px; border-radius: 6px; font-weight: 800; margin-left: 6px;">⛔ SUSPENDIDA</span>`;
if (btnCobrar) { if (btnCobrar) {
btnCobrar.disabled = true; btnCobrar.disabled = true;
btnCobrar.textContent = '⛔ Tarjeta Suspendida'; btnCobrar.textContent = '⛔ Tarjeta Suspendida';
btnCobrar.style.background = '#64748b'; btnCobrar.style.background = '#94a3b8';
btnCobrar.style.cursor = 'not-allowed';
} }
} else { } else {
document.getElementById('scannedName').textContent = scannedStudent.nombre_completo; document.getElementById('scannedName').textContent = scannedStudent.nombre_completo;
if (btnCobrar) { if (btnCobrar) {
btnCobrar.disabled = false; btnCobrar.disabled = false;
btnCobrar.innerHTML = `<span>🔫</span> COBRAR A ${scannedStudent.nombre_completo.split(' ')[0].toUpperCase()} ➔`; btnCobrar.innerHTML = `<span>⚡</span> COBRAR A ${scannedStudent.nombre_completo.split(' ')[0].toUpperCase()} ➔`;
btnCobrar.style.background = 'linear-gradient(135deg, #10b981, #059669)'; btnCobrar.style.background = '#16a34a';
btnCobrar.style.cursor = 'pointer';
} }
} }
@@ -676,8 +678,9 @@ function clearScannedStudent() {
const btnCobrar = document.getElementById('btnCobrarPos'); const btnCobrar = document.getElementById('btnCobrarPos');
if (btnCobrar) { if (btnCobrar) {
btnCobrar.disabled = false; btnCobrar.disabled = false;
btnCobrar.innerHTML = '<span>🔫</span> COBRAR CON PISTOLA QR'; btnCobrar.innerHTML = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg> <span>COBRAR CON PISTOLA QR</span>`;
btnCobrar.style.background = 'linear-gradient(135deg, #0284c7, #0369a1)'; btnCobrar.style.background = '#0f172a';
btnCobrar.style.cursor = 'pointer';
} }
} }
@@ -1012,30 +1015,51 @@ async function loadPreOrders() {
const hora = new Date(ord.creado_en).toLocaleTimeString('es-CR', { hour: '2-digit', minute: '2-digit' }); const hora = new Date(ord.creado_en).toLocaleTimeString('es-CR', { hour: '2-digit', minute: '2-digit' });
const items = Array.isArray(ord.items) ? ord.items : []; const items = Array.isArray(ord.items) ? ord.items : [];
const itemsList = items.map(i => `${i.cantidad}x ${i.icono || '🥪'} ${i.nombre}`).join(', '); const itemsList = items.map(i => `${i.cantidad}x ${i.icono || '🥪'} ${i.nombre}`).join(', ');
const avatarUrl = ord.foto_url || 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=150';
return ` return `
<div style="background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 14px; display: flex; justify-content: space-between; align-items: center;"> <div class="pos-preorder-card">
<div style="display: flex; gap: 12px; align-items: center;"> <div class="pos-preorder-header">
<img src="${ord.foto_url}" style="width: 44px; height: 44px; border-radius: 50%; border: 2px solid #38bdf8;"> <div class="pos-preorder-student">
<div> <img src="${avatarUrl}" class="pos-preorder-avatar" alt="Foto">
<div style="display: flex; align-items: center; gap: 8px;"> <div>
<strong style="color: #ffffff; font-size: 0.95rem;">${ord.estudiante_nombre}</strong> <div class="pos-preorder-name-row">
<span style="font-size: 0.75rem; color: #94a3b8;">${ord.grado} - ${ord.seccion}</span> <strong class="pos-preorder-name">${ord.estudiante_nombre}</strong>
<span class="status-pill status-${ord.estado}">${ord.estado}</span> <span class="pos-preorder-grade">${ord.grado} • ${ord.seccion}</span>
</div>
<div class="pos-preorder-ticket-info">Ticket: ${ord.codigo_orden} • Pedido a las ${hora}</div>
</div> </div>
<div style="font-size: 0.8rem; color: #38bdf8; margin: 2px 0;">📦 ${itemsList}</div> </div>
<div style="font-size: 0.72rem; color: #94a3b8;">Ticket: ${ord.codigo_orden} • Pedido a las ${hora} • Total: ₡${ord.total_colones.toLocaleString('es-CR')}</div> <div>
${ord.estado === 'entregado'
? '<span class="saas-status-badge saas-status-active"><span class="saas-dot"></span>Entregado</span>'
: '<span class="saas-status-badge saas-status-pending"><span class="saas-dot"></span>Pendiente</span>'
}
</div> </div>
</div> </div>
<div> <div class="pos-preorder-items-box">
${ord.estado !== 'entregado' ? ` <span>📦</span>
<button onclick="updateOrderStatus(${ord.id}, 'entregado')" style="padding: 8px 18px; background: #059669; color: white; border: none; border-radius: 8px; font-weight: 800; font-size: 0.88rem; cursor: pointer; display: flex; align-items: center; gap: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: background 0.15s ease;" onmouseover="this.style.background='#047857'" onmouseout="this.style.background='#059669'"> <span style="flex: 1; word-break: break-word;">${itemsList}</span>
Entregado </div>
</button>
` : ` <div class="pos-preorder-footer">
<span style="font-size: 0.82rem; color: #34d399; font-weight: 800; padding: 6px 12px; background: rgba(52, 211, 153, 0.1); border-radius: 6px; border: 1px solid rgba(52, 211, 153, 0.2);">✓ Entregado</span> <div class="pos-preorder-total">
`} <span class="pos-preorder-total-label">Total:</span>
<strong class="pos-preorder-total-val">₡${ord.total_colones.toLocaleString('es-CR')}</strong>
</div>
<div>
${ord.estado !== 'entregado' ? `
<button onclick="updateOrderStatus(${ord.id}, 'entregado')" class="btn-saas pos-btn-entregar">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"/></svg>
<span>Entregado</span>
</button>
` : `
<span class="saas-status-badge saas-status-active" style="padding: 6px 12px; font-size: 0.8rem;">
<span class="saas-dot"></span>Despachado
</span>
`}
</div>
</div> </div>
</div> </div>
`; `;
+109 -100
View File
@@ -38,10 +38,10 @@
to { transform: rotate(360deg); } to { transform: rotate(360deg); }
} }
</style> </style>
<body style="background: #0b1120; color: #f8fafc;" class="pos-mobile-view-catalog"> <body class="pos-mobile-view-catalog" style="background: #f8fafc; color: #0f172a;">
<!-- BANNER DE ADVERTENCIA HTTPS PARA TERMINALES REMOTAS --> <!-- BANNER DE ADVERTENCIA HTTPS PARA TERMINALES REMOTAS -->
<div id="posBannerHttpsWarning" style="display: none; background: linear-gradient(135deg, #b45309, #d97706); color: white; padding: 10px 14px; font-size: 0.8rem; font-weight: 700; text-align: center;"> <div id="posBannerHttpsWarning" style="display: none; background: #b45309; color: white; padding: 10px 14px; font-size: 0.8rem; font-weight: 700; text-align: center;">
🔒 Terminal en HTTP. Para activar la cámara en vivo del dispositivo, se requiere conexión HTTPS: 🔒 Terminal en HTTP. Para activar la cámara en vivo del dispositivo, se requiere conexión HTTPS:
<a id="posLinkHttpsRedirect" href="https://somewhat-ships-looksmart-optical.trycloudflare.com/pos.html" style="margin-left: 8px; color: white; text-decoration: underline; font-weight: 900;"> <a id="posLinkHttpsRedirect" href="https://somewhat-ships-looksmart-optical.trycloudflare.com/pos.html" style="margin-left: 8px; color: white; text-decoration: underline; font-weight: 900;">
🚀 Abrir en HTTPS Seguro ↗ 🚀 Abrir en HTTPS Seguro ↗
@@ -62,28 +62,29 @@
<div class="pos-layout"> <div class="pos-layout">
<!-- PANEL IZQUIERDO: CATÁLOGO TÁCTIL Y COLA DE PRE-ÓRDENES --> <!-- PANEL IZQUIERDO: CATÁLOGO TÁCTIL Y COLA DE PRE-ÓRDENES -->
<div class="pos-catalog-pane"> <div class="pos-catalog-pane">
<div style="display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #334155; padding-bottom: 12px; flex-wrap: wrap; gap: 10px;"> <div class="pos-header-card">
<div style="display: flex; align-items: center; gap: 10px;"> <div style="display: flex; align-items: center; gap: 10px;">
<span style="font-size: 1.8rem;">🥪</span> <span style="font-size: 1.8rem;">🥪</span>
<div> <div>
<h1 style="font-size: 1.25rem; font-weight: 900; color: #ffffff; margin: 0;">RecreoPay <span style="color: #38bdf8;">Terminal Soda</span></h1> <h1 style="font-size: 1.2rem; font-weight: 800; color: #0f172a; margin: 0;">RecreoPay <span style="color: #0284c7;">Terminal Soda</span></h1>
<span style="font-size: 0.78rem; color: #94a3b8;">Soda Escolar • Ventana de Atención Rápida</span> <span style="font-size: 0.76rem; color: #64748b;">Soda Escolar • Ventana de Atención Rápida</span>
</div> </div>
</div> </div>
<div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;">
<span id="pistolaStatusBadge" style="display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; background: #0c4a6e; color: #38bdf8; padding: 4px 10px; border-radius: 20px; font-weight: 800; border: 1px solid #0284c7;" title="Pistola lectora USB/Bluetooth lista para escanear en cualquier momento"> <span id="pistolaStatusBadge" class="saas-status-badge" style="background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; font-weight: 700;" title="Pistola lectora USB/Bluetooth lista para escanear en cualquier momento">
<span>🔫</span> Pistola QR Conectada <span class="saas-dot" style="background: #0284c7;"></span>
Pistola QR Conectada
</span> </span>
<span style="display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; background: #064e3b; color: #34d399; padding: 4px 8px; border-radius: 20px; font-weight: 700;"> <span class="saas-status-badge saas-status-active" title="Conexión en tiempo real activa">
<span style="width: 8px; height: 8px; background: #34d399; border-radius: 50%; display: inline-block;"></span> <span class="saas-dot"></span>
En Línea (SSE) En Línea (SSE)
</span> </span>
<a href="/index.html" style="color: #cbd5e1; font-size: 0.75rem; font-weight: 700; text-decoration: none; border: 1px solid #475569; padding: 4px 8px; border-radius: 8px; background: #1e293b;"> <a href="/index.html" class="btn-saas btn-saas-outline" style="height: 30px; font-size: 0.76rem;">
👨‍🍳 Admin <span>👨‍🍳</span> Admin
</a> </a>
<a href="/index.html" target="_blank" style="color: #38bdf8; font-size: 0.75rem; font-weight: 700; text-decoration: none; border: 1px solid #38bdf8; padding: 4px 8px; border-radius: 8px;"> <a href="/index.html" target="_blank" class="btn-saas btn-saas-outline" style="height: 30px; font-size: 0.76rem; color: #0284c7; border-color: #bae6fd;">
PWA Estudiante ↗ <span>📱</span> PWA Estudiante ↗
</a> </a>
</div> </div>
</div> </div>
@@ -100,12 +101,13 @@
<!-- VISTA 1: CATÁLOGO TÁCTIL DE PRODUCTOS (MOSTRADOR) --> <!-- VISTA 1: CATÁLOGO TÁCTIL DE PRODUCTOS (MOSTRADOR) -->
<div id="viewPosMostrador"> <div id="viewPosMostrador">
<div style="display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;"> <div class="pos-category-toolbar">
<div style="display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 200px;" id="posCategoriesBar"> <div class="pos-category-scroll-container" id="posCategoriesBar">
<!-- Filtros de categorías --> <!-- Filtros de categorías -->
</div> </div>
<button type="button" onclick="openQuickProductModal()" style="background: linear-gradient(135deg, #10b981, #059669); color: white; border: none; padding: 7px 14px; border-radius: 10px; font-weight: 800; font-size: 0.8rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35); flex-shrink: 0; white-space: nowrap;"> <button type="button" onclick="openQuickProductModal()" class="btn-saas btn-saas-primary pos-btn-quick-prod" title="Crear y vender un producto no inventariado al instante">
<span>⚡</span> + Nuevo Rápido <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M12 5v14M5 12h14"/></svg>
<span>+ Nuevo Rápido</span>
</button> </button>
</div> </div>
@@ -116,22 +118,27 @@
<!-- VISTA 2: FILA RÁPIDA DE PRE-ÓRDENES (RETIRO EN RECREO) --> <!-- VISTA 2: FILA RÁPIDA DE PRE-ÓRDENES (RETIRO EN RECREO) -->
<div id="viewPosPreordenes" style="display: none;"> <div id="viewPosPreordenes" style="display: none;">
<div style="background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;"> <div style="background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);">
<div> <div>
<strong style="color: #38bdf8; font-size: 0.95rem;">⚡ Despacho Exclusivo Recreo</strong> <div style="display: flex; align-items: center; gap: 6px;">
<p style="font-size: 0.78rem; color: #94a3b8; margin: 2px 0 0 0;">Los estudiantes con pre-orden retiran en 3 segundos escaneando su QR aquí.</p> <span style="font-size: 1.1rem;">⚡</span>
<strong style="color: #0f172a; font-size: 0.95rem;">Despacho Exclusivo de Recreo</strong>
</div>
<p style="font-size: 0.78rem; color: #64748b; margin: 3px 0 0 0;">Los estudiantes con pre-orden retiran en segundos escaneando su carné aquí.</p>
</div> </div>
<div style="display: flex; gap: 8px; align-items: center;"> <div style="display: flex; gap: 8px; align-items: center; flex-wrap: wrap;">
<button onclick="openPreOrderScanModal()" style="background: linear-gradient(135deg, #0284c7, #0369a1); border: none; color: white; padding: 8px 14px; border-radius: 8px; font-weight: 800; font-size: 0.8rem; cursor: pointer; display: flex; align-items: center; gap: 6px; box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);"> <button onclick="openPreOrderScanModal()" class="btn-saas btn-saas-primary" style="height: 36px; padding: 0 14px;">
<span>📷</span> Escanear QR para Entregar <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
<span>Escanear QR para Entregar</span>
</button> </button>
<button onclick="loadPreOrders()" style="background: #334155; border: none; color: white; padding: 8px 12px; border-radius: 8px; font-weight: 700; cursor: pointer;"> <button onclick="loadPreOrders()" class="btn-saas btn-saas-outline" style="height: 36px; padding: 0 12px;">
🔄 Refrescar <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M3 21v-5h5"/></svg>
<span>Refrescar</span>
</button> </button>
</div> </div>
</div> </div>
<div id="preOrdersList" style="display: flex; flex-direction: column; gap: 10px;"> <div id="preOrdersList" style="display: flex; flex-direction: column; gap: 12px;">
<!-- Lista de pre-órdenes --> <!-- Lista de pre-órdenes -->
</div> </div>
</div> </div>
@@ -142,7 +149,7 @@
<span style="font-size: 1.3rem;">🛒</span> <span style="font-size: 1.3rem;">🛒</span>
<div> <div>
<div style="font-weight: 800; font-size: 0.88rem; color: #ffffff;" id="posFloatingCartText">0 ítems</div> <div style="font-weight: 800; font-size: 0.88rem; color: #ffffff;" id="posFloatingCartText">0 ítems</div>
<div style="font-size: 0.72rem; color: #94a3b8;">Toca para cobrar o escanear QR</div> <div style="font-size: 0.72rem; color: #cbd5e1;">Toca para cobrar o escanear QR</div>
</div> </div>
</div> </div>
<div style="display: flex; align-items: center; gap: 8px;"> <div style="display: flex; align-items: center; gap: 8px;">
@@ -165,65 +172,67 @@
<!-- SECCIÓN DE IDENTIFICACIÓN / ALUMNO EN MOSTRADOR --> <!-- SECCIÓN DE IDENTIFICACIÓN / ALUMNO EN MOSTRADOR -->
<div id="posStudentSection" style="margin-bottom: 12px;"> <div id="posStudentSection" style="margin-bottom: 12px;">
<!-- ESTADO INICIAL: SIN ALUMNO IDENTIFICADO --> <!-- ESTADO INICIAL: SIN ALUMNO IDENTIFICADO -->
<div id="posNoStudentPlaceholder" style="background: #1e293b; border: 1.5px dashed #334155; border-radius: 14px; padding: 14px 16px; text-align: center;"> <div id="posNoStudentPlaceholder" style="background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 14px; padding: 16px; text-align: center;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;">
<span style="font-size: 0.85rem; font-weight: 800; color: #38bdf8;">👤 Alumno en Mostrador</span> <span style="font-size: 0.85rem; font-weight: 800; color: #0f172a;">👤 Alumno en Mostrador</span>
<span style="font-size: 0.7rem; color: #34d399; background: #064e3b; padding: 2px 8px; border-radius: 6px; font-weight: 800;">Caja Lista</span> <span class="saas-status-badge saas-status-active"><span class="saas-dot"></span>Caja Lista</span>
</div> </div>
<p style="font-size: 0.76rem; color: #94a3b8; margin: 0 0 10px 0;"> <p style="font-size: 0.78rem; color: #64748b; margin: 0 0 12px 0;">
Selecciona productos y presiona <strong>Cobrar</strong> para escanear, o identifica primero al estudiante: Selecciona productos y presiona <strong>Cobrar</strong>, o identifica primero al estudiante:
</p> </p>
<button type="button" onclick="openStudentIdModal()" style="padding: 8px 16px; background: #0284c7; color: white; border: none; border-radius: 10px; font-size: 0.8rem; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);"> <button type="button" onclick="openStudentIdModal()" class="btn-saas btn-saas-outline" style="height: 34px; padding: 0 14px; border-color: #cbd5e1;">
<span>📷</span> Identificar Alumno / Ver Saldo <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
<span>Identificar Alumno / Ver Saldo</span>
</button> </button>
</div> </div>
<!-- TARJETA DEL ESTUDIANTE IDENTIFICADO POR QR --> <!-- TARJETA DEL ESTUDIANTE IDENTIFICADO POR QR -->
<div id="studentScannedCard" style="display: none;" class="student-badge-scanned"> <div id="studentScannedCard" style="display: none; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 14px; padding: 12px; margin-bottom: 14px; align-items: center; gap: 12px;">
<img id="scannedAvatar" src="" style="width: 44px; height: 44px; border-radius: 50%; border: 2px solid #38bdf8; background: white; flex-shrink: 0; object-fit: cover;"> <img id="scannedAvatar" src="" style="width: 44px; height: 44px; border-radius: 50%; border: 2px solid #16a34a; background: white; flex-shrink: 0; object-fit: cover;">
<div style="flex: 1; min-width: 0; word-break: break-word;"> <div style="flex: 1; min-width: 0; word-break: break-word;">
<h4 id="scannedName" style="font-size: 0.92rem; font-weight: 800; color: #ffffff; margin: 0; line-height: 1.2;">Nombre del Alumno</h4> <h4 id="scannedName" style="font-size: 0.92rem; font-weight: 800; color: #0f172a; margin: 0; line-height: 1.2;">Nombre del Alumno</h4>
<div id="scannedGrade" style="font-size: 0.74rem; color: #94a3b8; margin-top: 2px;">2° Grado • Sección 2-A</div> <div id="scannedGrade" style="font-size: 0.74rem; color: #64748b; margin-top: 2px;">2° Grado • Sección 2-A</div>
<div style="display: flex; gap: 8px; margin-top: 4px; font-size: 0.74rem; flex-wrap: wrap;"> <div style="display: flex; gap: 10px; margin-top: 4px; font-size: 0.74rem; flex-wrap: wrap;">
<span>Saldo: <strong id="scannedBalance" style="color: #34d399;">₡0</strong></span> <span style="color: #475569;">Saldo: <strong id="scannedBalance" style="color: #16a34a; font-weight: 800;">₡0</strong></span>
<span>Disp. hoy: <strong id="scannedAvailable" style="color: #38bdf8;">₡0</strong></span> <span style="color: #475569;">Disp. hoy: <strong id="scannedAvailable" style="color: #0284c7; font-weight: 800;">₡0</strong></span>
</div> </div>
</div> </div>
<button onclick="clearScannedStudent()" style="background: none; border: none; color: #ef4444; font-size: 1.2rem; cursor: pointer; padding: 4px 8px; flex-shrink: 0;" title="Desconectar alumno">✕</button> <button onclick="clearScannedStudent()" style="background: none; border: none; color: #dc2626; font-size: 1.2rem; cursor: pointer; padding: 4px 8px; flex-shrink: 0;" title="Desconectar alumno">✕</button>
</div> </div>
<!-- ALERTA DE ALERGIAS AL CAJERO --> <!-- ALERTA DE ALERGIAS AL CAJERO -->
<div id="scannedAllergyAlert" style="display: none; background: #7f1d1d; border: 1px solid #ef4444; border-radius: 10px; padding: 8px 12px; margin-top: 10px; font-size: 0.78rem; color: #fecaca;"> <div id="scannedAllergyAlert" style="display: none; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 8px 12px; margin-top: 10px; font-size: 0.78rem; color: #991b1b;">
⚠️ <strong>ALERTA MÉDICA:</strong> <span id="scannedAllergyText"></span> ⚠️ <strong>ALERTA MÉDICA:</strong> <span id="scannedAllergyText"></span>
</div> </div>
</div> </div>
<!-- LISTA DE PRODUCTOS SELECCIONADOS EN CAJA --> <!-- LISTA DE PRODUCTOS SELECCIONADOS EN CAJA -->
<div style="margin-top: 14px;"> <div style="margin-top: 14px;">
<div style="display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 700; color: #94a3b8; border-bottom: 1px solid #334155; padding-bottom: 6px;"> <div style="display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 700; color: #64748b; border-bottom: 1px solid #e2e8f0; padding-bottom: 6px;">
<div style="display: flex; align-items: center; gap: 8px;"> <div style="display: flex; align-items: center; gap: 8px;">
<span>Ítems en Mostrador</span> <span>Ítems en Mostrador</span>
<button type="button" onclick="openQuickProductModal()" style="background: #064e3b; color: #34d399; border: 1px solid #059669; border-radius: 6px; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;"> <button type="button" onclick="openQuickProductModal()" class="btn-saas btn-saas-outline" style="height: 24px; font-size: 0.7rem; padding: 0 8px;">
<span>⚡</span> + Rápido <span>+ Rápido</span>
</button> </button>
</div> </div>
<button onclick="clearPosCart()" style="background: none; border: none; color: #ef4444; font-size: 0.75rem; font-weight: 700; cursor: pointer; padding: 2px 6px;">Limpiar</button> <button onclick="clearPosCart()" style="background: none; border: none; color: #dc2626; font-size: 0.75rem; font-weight: 700; cursor: pointer; padding: 2px 6px;">Limpiar</button>
</div> </div>
<div class="pos-cart-list" id="posCartList"> <div class="pos-cart-list" id="posCartList">
<p style="text-align: center; color: #64748b; padding: 20px; font-size: 0.85rem;">Toca productos del menú para cobrar</p> <p style="text-align: center; color: #94a3b8; padding: 20px; font-size: 0.85rem;">Toca productos del menú para cobrar</p>
</div> </div>
</div> </div>
</div> </div>
<!-- BOTÓN DE COBRO Y TOTAL --> <!-- BOTÓN DE COBRO Y TOTAL -->
<div style="border-top: 2px solid #334155; padding-top: 14px; margin-top: auto;"> <div style="border-top: 1px solid #e2e8f0; padding-top: 14px; margin-top: auto;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px;"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px;">
<span style="font-size: 0.88rem; font-weight: 800; color: #94a3b8; letter-spacing: 0.5px;">TOTAL A DEBITAR:</span> <span style="font-size: 0.88rem; font-weight: 700; color: #64748b; letter-spacing: 0.5px;">TOTAL A DEBITAR:</span>
<span id="posCartTotal" style="font-size: 1.7rem; font-weight: 900; color: #38bdf8;">₡0</span> <span id="posCartTotal" style="font-size: 1.7rem; font-weight: 900; color: #0f172a;">₡0</span>
</div> </div>
<button id="btnCobrarPos" onclick="executePosDebit()" style="width: 100%; padding: 14px; background: linear-gradient(135deg, #0284c7, #0369a1); border: none; border-radius: 14px; color: white; font-size: 1rem; font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4); box-sizing: border-box;"> <button id="btnCobrarPos" onclick="executePosDebit()" style="width: 100%; padding: 13px; background: #0f172a; border: none; border-radius: 12px; color: white; font-size: 0.95rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15); box-sizing: border-box; transition: all 0.15s ease;">
<span>🔫</span> COBRAR CON PISTOLA QR <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
<span>COBRAR CON PISTOLA QR</span>
</button> </button>
</div> </div>
</div> </div>
@@ -231,36 +240,36 @@
<!-- MODAL DE COBRO RÁPIDO CON PISTOLA QR --> <!-- MODAL DE COBRO RÁPIDO CON PISTOLA QR -->
<div class="modal-qr-backdrop" id="modalPistolaCobro" style="display: none;" onclick="closePistolaModal(event)"> <div class="modal-qr-backdrop" id="modalPistolaCobro" style="display: none;" onclick="closePistolaModal(event)">
<div class="modal-qr-card" onclick="event.stopPropagation()" style="max-width: 440px; background: #0f172a; border: 2px solid #38bdf8; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.8); padding: 22px; color: #f8fafc; text-align: center;"> <div class="modal-qr-card" onclick="event.stopPropagation()" style="max-width: 440px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.15); padding: 22px; color: #0f172a; text-align: center;">
<!-- CABECERA --> <!-- CABECERA -->
<div style="display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #334155; padding-bottom: 12px; margin-bottom: 16px;"> <div style="display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f0; padding-bottom: 12px; margin-bottom: 16px;">
<div style="display: flex; align-items: center; gap: 8px;"> <div style="display: flex; align-items: center; gap: 8px;">
<span style="font-size: 1.5rem;" id="pistolaModalIcon">📷</span> <span style="font-size: 1.5rem;" id="pistolaModalIcon">📷</span>
<strong style="font-size: 1.1rem; color: #38bdf8; letter-spacing: 0.5px;" id="pistolaModalTitle">Escanear Carné QR</strong> <strong style="font-size: 1.1rem; color: #0f172a; letter-spacing: 0.5px;" id="pistolaModalTitle">Escanear Carné QR</strong>
</div> </div>
<button type="button" onclick="closePistolaModal()" style="background: none; border: none; font-size: 1.3rem; color: #94a3b8; cursor: pointer;">✕</button> <button type="button" onclick="closePistolaModal()" style="background: none; border: none; font-size: 1.3rem; color: #64748b; cursor: pointer;">✕</button>
</div> </div>
<!-- ESTADO 1: ESPERANDO ESCANEO (DEFAULT) --> <!-- ESTADO 1: ESPERANDO ESCANEO (DEFAULT) -->
<div id="pistolaStateWaiting"> <div id="pistolaStateWaiting">
<!-- TOTAL A COBRAR GIGANTE (SOLO EN MODO COBRO) --> <!-- TOTAL A COBRAR GIGANTE (SOLO EN MODO COBRO) -->
<div id="pistolaTotalContainer" style="background: #1e293b; border: 1.5px solid #0284c7; border-radius: 14px; padding: 12px; margin-bottom: 14px;"> <div id="pistolaTotalContainer" style="background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 12px; margin-bottom: 14px;">
<div style="font-size: 0.78rem; font-weight: 800; color: #94a3b8; text-transform: uppercase;">Monto Total a Cobrar</div> <div style="font-size: 0.78rem; font-weight: 800; color: #64748b; text-transform: uppercase;">Monto Total a Cobrar</div>
<div id="pistolaModalTotal" style="font-size: 2.3rem; font-weight: 900; color: #38bdf8; margin: 4px 0;">₡0</div> <div id="pistolaModalTotal" style="font-size: 2.3rem; font-weight: 900; color: #0284c7; margin: 4px 0;">₡0</div>
<div id="pistolaModalItemCount" style="font-size: 0.75rem; color: #cbd5e1;">0 productos en mostrador</div> <div id="pistolaModalItemCount" style="font-size: 0.75rem; color: #64748b;">0 productos en mostrador</div>
</div> </div>
<!-- CÁMARA BAJO DEMANDA INTEGRADA EN EL MODAL --> <!-- CÁMARA BAJO DEMANDA INTEGRADA EN EL MODAL -->
<div id="modalCameraContainer" style="position: relative; border-radius: 14px; overflow: hidden; background: #000; min-height: 200px; max-height: 230px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; border: 2px solid #0284c7;"> <div id="modalCameraContainer" style="position: relative; border-radius: 14px; overflow: hidden; background: #000; min-height: 200px; max-height: 230px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; border: 2px solid #0284c7;">
<video id="modalScannerVideo" style="width: 100%; height: 210px; object-fit: cover;" autoplay playsinline webkit-playsinline muted></video> <video id="modalScannerVideo" style="width: 100%; height: 210px; object-fit: cover;" autoplay playsinline webkit-playsinline muted></video>
<div class="laser-scan-line"></div> <div class="laser-scan-line"></div>
<div id="modalCameraStatusBadge" style="position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: rgba(15, 23, 42, 0.92); color: #38bdf8; padding: 4px 12px; border-radius: 20px; font-size: 0.74rem; font-weight: 800; border: 1px solid #0284c7; white-space: nowrap; box-shadow: 0 4px 10px rgba(0,0,0,0.5);"> <div id="modalCameraStatusBadge" style="position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: rgba(15, 23, 42, 0.9); color: #ffffff; padding: 4px 12px; border-radius: 20px; font-size: 0.74rem; font-weight: 800; border: 1px solid #0284c7; white-space: nowrap; box-shadow: 0 4px 10px rgba(0,0,0,0.3);">
📷 Apunta el carné a la cámara o dispara pistola 📷 Apunta el carné a la cámara o dispara pistola
</div> </div>
<div id="modalCameraOverlay" style="display: none; position: absolute; inset: 0; background: rgba(15, 23, 42, 0.95); padding: 14px; text-align: center; flex-direction: column; justify-content: center; align-items: center; gap: 8px; z-index: 10;"> <div id="modalCameraOverlay" style="display: none; position: absolute; inset: 0; background: rgba(15, 23, 42, 0.95); padding: 14px; text-align: center; flex-direction: column; justify-content: center; align-items: center; gap: 8px; z-index: 10;">
<span style="font-size: 2rem;">📷</span> <span style="font-size: 2rem;">📷</span>
<div id="modalCameraHelpText" style="font-size: 0.8rem; color: #f8fafc; line-height: 1.35;">Toca el botón para permitir el uso de la cámara</div> <div id="modalCameraHelpText" style="font-size: 0.8rem; color: #f8fafc; line-height: 1.35;">Toca el botón para permitir el uso de la cámara</div>
<button type="button" onclick="startModalCamera(true)" style="padding: 8px 16px; background: #0284c7; color: white; border: none; border-radius: 8px; font-weight: 800; font-size: 0.82rem; cursor: pointer; box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);"> <button type="button" onclick="startModalCamera(true)" class="btn-saas btn-saas-primary" style="height: 36px; padding: 0 16px;">
Permitir Cámara Permitir Cámara
</button> </button>
</div> </div>
@@ -268,16 +277,16 @@
<!-- CAMPO DE ENTRADA ENFOCADO PARA PISTOLA USB --> <!-- CAMPO DE ENTRADA ENFOCADO PARA PISTOLA USB -->
<div style="margin-bottom: 12px;"> <div style="margin-bottom: 12px;">
<input type="text" id="inputPistolaDirectScan" placeholder="Esperando lectura de carné o pistola..." autocomplete="off" style="width: 100%; padding: 10px; border-radius: 10px; border: 1.5px solid #334155; background: #1e293b; color: #f8fafc; font-size: 0.88rem; font-weight: 800; text-align: center; box-sizing: border-box;"> <input type="text" id="inputPistolaDirectScan" placeholder="Esperando lectura de carné o pistola..." autocomplete="off" style="width: 100%; padding: 10px; border-radius: 10px; border: 1.5px solid #cbd5e1; background: #f8fafc; color: #0f172a; font-size: 0.88rem; font-weight: 800; text-align: center; box-sizing: border-box; outline: none;">
</div> </div>
<!-- ACCESOS RÁPIDOS DE PRUEBA --> <!-- ACCESOS RÁPIDOS DE PRUEBA -->
<div style="border-top: 1px dashed #334155; padding-top: 10px; margin-top: 10px;"> <div style="border-top: 1px dashed #e2e8f0; padding-top: 10px; margin-top: 10px;">
<span style="font-size: 0.72rem; color: #94a3b8; display: block; margin-bottom: 6px;">Simulación rápida sin pistola física ni cámara:</span> <span style="font-size: 0.72rem; color: #64748b; display: block; margin-bottom: 6px;">Simulación rápida sin pistola física ni cámara:</span>
<div style="display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;"> <div style="display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;">
<button type="button" onclick="handlePistolBarcodeScan('QR-MATEO-2026-A891')" style="padding: 5px 10px; background: #334155; color: white; border: none; border-radius: 6px; font-size: 0.72rem; font-weight: 700; cursor: pointer;">🧒 Mateo (8a)</button> <button type="button" onclick="handlePistolBarcodeScan('QR-MATEO-2026-A891')" class="btn-saas btn-saas-outline" style="height: 28px; font-size: 0.75rem;">🧒 Mateo (8a)</button>
<button type="button" onclick="handlePistolBarcodeScan('QR-SOFIA-2026-B442')" style="padding: 5px 10px; background: #334155; color: white; border: none; border-radius: 6px; font-size: 0.72rem; font-weight: 700; cursor: pointer;">👧 Sofía (9a)</button> <button type="button" onclick="handlePistolBarcodeScan('QR-SOFIA-2026-B442')" class="btn-saas btn-saas-outline" style="height: 28px; font-size: 0.75rem;">👧 Sofía (9a)</button>
<button type="button" onclick="handlePistolBarcodeScan('QR-NACHO-2026-D902')" style="padding: 5px 10px; background: #334155; color: white; border: none; border-radius: 6px; font-size: 0.72rem; font-weight: 700; cursor: pointer;">🧑 Ignacio (14a)</button> <button type="button" onclick="handlePistolBarcodeScan('QR-NACHO-2026-D902')" class="btn-saas btn-saas-outline" style="height: 28px; font-size: 0.75rem;">🧑 Ignacio (14a)</button>
</div> </div>
</div> </div>
</div> </div>
@@ -285,33 +294,33 @@
<!-- ESTADO 2: PROCESANDO COBRO --> <!-- ESTADO 2: PROCESANDO COBRO -->
<div id="pistolaStateProcessing" style="display: none; padding: 20px 0;"> <div id="pistolaStateProcessing" style="display: none; padding: 20px 0;">
<div style="font-size: 2.8rem; animation: spin 1s infinite linear;">⚡</div> <div style="font-size: 2.8rem; animation: spin 1s infinite linear;">⚡</div>
<h3 style="font-size: 1.15rem; color: #38bdf8; margin: 10px 0 4px 0;">Procesando Débito...</h3> <h3 style="font-size: 1.15rem; color: #0284c7; margin: 10px 0 4px 0;">Procesando Débito...</h3>
<p style="font-size: 0.8rem; color: #94a3b8;" id="pistolaProcessingName">Verificando carné y saldo del alumno...</p> <p style="font-size: 0.8rem; color: #64748b;" id="pistolaProcessingName">Verificando carné y saldo del alumno...</p>
</div> </div>
<!-- ESTADO 3: ÉXITO --> <!-- ESTADO 3: ÉXITO -->
<div id="pistolaStateSuccess" style="display: none; padding: 10px 0;"> <div id="pistolaStateSuccess" style="display: none; padding: 10px 0;">
<div style="font-size: 3rem;">✅</div> <div style="font-size: 3rem;">✅</div>
<h3 style="font-size: 1.3rem; color: #34d399; margin: 6px 0;">¡COBRO EXITOSO!</h3> <h3 style="font-size: 1.3rem; color: #16a34a; margin: 6px 0;">¡COBRO EXITOSO!</h3>
<div style="background: #1e293b; border-radius: 12px; padding: 12px; margin: 12px 0; text-align: left; font-size: 0.82rem;"> <div style="background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 14px; margin: 12px 0; text-align: left; font-size: 0.84rem;">
<div style="display: flex; justify-content: space-between; margin-bottom: 4px;"> <div style="display: flex; justify-content: space-between; margin-bottom: 4px;">
<span style="color: #94a3b8;">Estudiante:</span> <span style="color: #64748b;">Estudiante:</span>
<strong id="pistolaSuccessStudent" style="color: #f8fafc;">-</strong> <strong id="pistolaSuccessStudent" style="color: #0f172a;">-</strong>
</div> </div>
<div style="display: flex; justify-content: space-between; margin-bottom: 4px;"> <div style="display: flex; justify-content: space-between; margin-bottom: 4px;">
<span style="color: #94a3b8;">Ticket:</span> <span style="color: #64748b;">Ticket:</span>
<strong id="pistolaSuccessTicket" style="color: #38bdf8;">-</strong> <strong id="pistolaSuccessTicket" style="color: #0284c7;">-</strong>
</div> </div>
<div style="display: flex; justify-content: space-between; margin-bottom: 4px;"> <div style="display: flex; justify-content: space-between; margin-bottom: 4px;">
<span style="color: #94a3b8;">Monto Cobrado:</span> <span style="color: #64748b;">Monto Cobrado:</span>
<strong id="pistolaSuccessAmount" style="color: #f8fafc;">-</strong> <strong id="pistolaSuccessAmount" style="color: #0f172a;">-</strong>
</div> </div>
<div style="display: flex; justify-content: space-between; border-top: 1px dashed #334155; padding-top: 6px; margin-top: 6px;"> <div style="display: flex; justify-content: space-between; border-top: 1px dashed #bbf7d0; padding-top: 6px; margin-top: 6px;">
<span style="color: #94a3b8;">Nuevo Saldo Disponible:</span> <span style="color: #64748b;">Nuevo Saldo Disponible:</span>
<strong id="pistolaSuccessBalance" style="color: #34d399; font-size: 0.95rem;">-</strong> <strong id="pistolaSuccessBalance" style="color: #16a34a; font-size: 0.95rem;">-</strong>
</div> </div>
</div> </div>
<button type="button" onclick="closePistolaModal()" style="width: 100%; padding: 12px; background: #10b981; color: white; border: none; border-radius: 10px; font-weight: 800; font-size: 0.9rem; cursor: pointer;"> <button type="button" onclick="closePistolaModal()" class="btn-saas btn-saas-primary" style="width: 100%; height: 42px; background: #16a34a; border-color: #16a34a; font-size: 0.92rem; font-weight: 800;">
Listo / Siguiente Alumno (Enter) ➔ Listo / Siguiente Alumno (Enter) ➔
</button> </button>
</div> </div>
@@ -319,9 +328,9 @@
<!-- ESTADO 4: ERROR / ALERTA --> <!-- ESTADO 4: ERROR / ALERTA -->
<div id="pistolaStateError" style="display: none; padding: 10px 0;"> <div id="pistolaStateError" style="display: none; padding: 10px 0;">
<div style="font-size: 3rem;">⛔</div> <div style="font-size: 3rem;">⛔</div>
<h3 style="font-size: 1.2rem; color: #ef4444; margin: 6px 0;" id="pistolaErrorTitle">No se pudo cobrar</h3> <h3 style="font-size: 1.2rem; color: #dc2626; margin: 6px 0;" id="pistolaErrorTitle">No se pudo cobrar</h3>
<p style="font-size: 0.85rem; color: #fca5a5; line-height: 1.4; margin-bottom: 16px;" id="pistolaErrorDesc">Detalle del error</p> <p style="font-size: 0.85rem; color: #991b1b; line-height: 1.4; margin-bottom: 16px;" id="pistolaErrorDesc">Detalle del error</p>
<button type="button" onclick="resetPistolaModalWaiting()" style="padding: 10px 20px; background: #334155; color: white; border: none; border-radius: 10px; font-weight: 800; font-size: 0.85rem; cursor: pointer;"> <button type="button" onclick="resetPistolaModalWaiting()" class="btn-saas btn-saas-outline" style="height: 38px; padding: 0 18px; font-weight: 700;">
🔄 Intentar con otro carné 🔄 Intentar con otro carné
</button> </button>
</div> </div>
@@ -329,44 +338,44 @@
</div> </div>
<!-- MODAL: NUEVO PRODUCTO RÁPIDO EN CALIENTE --> <!-- MODAL: NUEVO PRODUCTO RÁPIDO EN CALIENTE -->
<div id="modalProductoRapido" style="display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.82); z-index: 9999; justify-content: center; align-items: center; padding: 16px; backdrop-filter: blur(5px);"> <div id="modalProductoRapido" style="display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); z-index: 9999; justify-content: center; align-items: center; padding: 16px; backdrop-filter: blur(4px);">
<div style="background: #0f172a; border: 2px solid #10b981; border-radius: 18px; max-width: 420px; width: 100%; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,0.8); position: relative;"> <div style="background: #ffffff; border: 1px solid #e2e8f0; border-radius: 18px; max-width: 420px; width: 100%; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.15); position: relative; color: #0f172a;">
<button type="button" onclick="closeQuickProductModal()" style="position: absolute; top: 14px; right: 14px; background: none; border: none; color: #94a3b8; font-size: 1.4rem; cursor: pointer; padding: 4px 8px; line-height: 1;" title="Cerrar (Esc)">✕</button> <button type="button" onclick="closeQuickProductModal()" style="position: absolute; top: 14px; right: 14px; background: none; border: none; color: #64748b; font-size: 1.4rem; cursor: pointer; padding: 4px 8px; line-height: 1;" title="Cerrar (Esc)">✕</button>
<div style="display: flex; align-items: center; gap: 10px; margin-bottom: 16px;"> <div style="display: flex; align-items: center; gap: 10px; margin-bottom: 16px;">
<span style="font-size: 1.8rem; background: #064e3b; padding: 8px; border-radius: 12px; border: 1px solid #10b981; display: inline-flex;">⚡</span> <span style="font-size: 1.6rem; background: #f0fdf4; padding: 8px; border-radius: 12px; border: 1px solid #bbf7d0; display: inline-flex;">⚡</span>
<div> <div>
<h3 style="font-size: 1.15rem; font-weight: 900; color: #ffffff; margin: 0;">Nuevo Producto Rápido</h3> <h3 style="font-size: 1.15rem; font-weight: 800; color: #0f172a; margin: 0;">Nuevo Producto Rápido</h3>
<span style="font-size: 0.76rem; color: #94a3b8;">Registro instantáneo para cobrar al vuelo</span> <span style="font-size: 0.76rem; color: #64748b;">Registro instantáneo para cobrar al vuelo</span>
</div> </div>
</div> </div>
<form id="formProductoRapido" onsubmit="saveQuickProduct(event)"> <form id="formProductoRapido" onsubmit="saveQuickProduct(event)">
<div style="margin-bottom: 14px;"> <div style="margin-bottom: 14px;">
<label style="display: block; font-size: 0.78rem; font-weight: 700; color: #cbd5e1; margin-bottom: 6px;"> <label style="display: block; font-size: 0.78rem; font-weight: 700; color: #475569; margin-bottom: 6px;">
Nombre del Producto: Nombre del Producto:
</label> </label>
<input type="text" id="inputQuickProdNombre" placeholder="Ej: Empanada de Pollo, Jugo Naranja..." required autocomplete="off" style="width: 100%; padding: 11px 13px; border-radius: 10px; border: 1.5px solid #334155; background: #1e293b; color: #ffffff; font-size: 0.95rem; font-weight: 700; box-sizing: border-box; outline: none;"> <input type="text" id="inputQuickProdNombre" placeholder="Ej: Empanada de Pollo, Jugo Naranja..." required autocomplete="off" style="width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #cbd5e1; background: #f8fafc; color: #0f172a; font-size: 0.92rem; font-weight: 700; box-sizing: border-box; outline: none;">
</div> </div>
<div style="margin-bottom: 18px;"> <div style="margin-bottom: 18px;">
<label style="display: block; font-size: 0.78rem; font-weight: 700; color: #cbd5e1; margin-bottom: 6px;"> <label style="display: block; font-size: 0.78rem; font-weight: 700; color: #475569; margin-bottom: 6px;">
Precio de Venta (₡ Colones): Precio de Venta (₡ Colones):
</label> </label>
<div style="position: relative;"> <div style="position: relative;">
<span style="position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #38bdf8; font-weight: 900; font-size: 1.1rem;">₡</span> <span style="position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #0284c7; font-weight: 900; font-size: 1.1rem;">₡</span>
<input type="number" id="inputQuickProdPrecio" placeholder="1500" required min="1" step="50" style="width: 100%; padding: 11px 13px 11px 32px; border-radius: 10px; border: 1.5px solid #334155; background: #1e293b; color: #ffffff; font-size: 1.15rem; font-weight: 900; box-sizing: border-box; outline: none;"> <input type="number" id="inputQuickProdPrecio" placeholder="1500" required min="1" step="50" style="width: 100%; padding: 10px 12px 10px 32px; border-radius: 10px; border: 1.5px solid #cbd5e1; background: #f8fafc; color: #0f172a; font-size: 1.1rem; font-weight: 900; box-sizing: border-box; outline: none;">
</div> </div>
<span style="font-size: 0.72rem; color: #34d399; margin-top: 6px; display: block;"> <span style="font-size: 0.72rem; color: #16a34a; margin-top: 6px; display: block; font-weight: 600;">
🌿 Sello MEP Saludable asignado automáticamente (sin bloqueo parental) 🌿 Sello MEP Saludable asignado automáticamente (sin bloqueo parental)
</span> </span>
</div> </div>
<div style="display: flex; gap: 10px;"> <div style="display: flex; gap: 10px;">
<button type="button" onclick="closeQuickProductModal()" style="flex: 1; padding: 12px; background: #334155; color: #cbd5e1; border: none; border-radius: 10px; font-weight: 700; font-size: 0.85rem; cursor: pointer;"> <button type="button" onclick="closeQuickProductModal()" class="btn-saas btn-saas-outline" style="flex: 1; height: 38px; font-size: 0.85rem;">
Cancelar (Esc) Cancelar (Esc)
</button> </button>
<button type="submit" id="btnSubmitQuickProd" style="flex: 2; padding: 12px; background: linear-gradient(135deg, #10b981, #059669); color: white; border: none; border-radius: 10px; font-weight: 800; font-size: 0.92rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);"> <button type="submit" id="btnSubmitQuickProd" class="btn-saas btn-saas-primary" style="flex: 2; height: 38px; background: #0f172a; border-color: #0f172a; font-size: 0.88rem; font-weight: 800;">
<span>💾</span> Guardar y Cobrar ➔ <span>💾</span> Guardar y Cobrar ➔
</button> </button>
</div> </div>