`;
});
container.innerHTML = html;
}
- container.classList.add('active');
- totals.classList.add('hidden');
+ container.style.display = '';
+ totals.style.display = 'none';
} catch (e) {
console.error('Search error:', e);
}
@@ -317,13 +361,16 @@ const POS = (() => {
}
function hideSearchResults() {
- document.getElementById('searchResults').classList.remove('active');
- document.getElementById('totalsPanel').classList.remove('hidden');
+ const sr = document.getElementById('searchResults');
+ const tp = document.getElementById('totalsPanel');
+ if (sr) sr.style.display = 'none';
+ if (tp) tp.style.display = '';
}
// ─── Customer Search ─────────────────
function setupCustomerSearch() {
const input = document.getElementById('customerSearch');
+ if (!input) return;
input.addEventListener('input', () => {
clearTimeout(customerSearchTimeout);
customerSearchTimeout = setTimeout(() => searchCustomers(input.value.trim()), 300);
@@ -347,14 +394,14 @@ const POS = (() => {
const ac = document.getElementById('customerAutocomplete');
if (data.data.length === 0) {
- ac.innerHTML = '
';
} else {
let html = '';
data.data.forEach(c => {
const tiers = { 1: 'Mostrador', 2: 'Taller', 3: 'Mayoreo' };
- html += `
-
${c.name}
-
${c.rfc || ''} | ${c.phone || ''} | ${tiers[c.price_tier] || 'P1'} | Credito: ${fmt(c.credit_balance)}/${fmt(c.credit_limit)}
+ html += `
+
${c.name}
+
${c.rfc || ''} | ${c.phone || ''} | ${tiers[c.price_tier] || 'P1'} | Credito: ${fmt(c.credit_balance)}/${fmt(c.credit_limit)}
`;
});
ac.innerHTML = html;
@@ -377,7 +424,7 @@ const POS = (() => {
`Credito: ${fmt(customer.credit_balance)} / ${fmt(customer.credit_limit)}`;
document.getElementById('customerSelected').style.display = '';
- // Show vehicle info
+ // Show vehicle info banner
if (customer.vehicle_info && customer.vehicle_info.length > 0) {
const v = customer.vehicle_info[0];
document.getElementById('vehicleInfo').textContent =
@@ -385,7 +432,7 @@ const POS = (() => {
document.getElementById('vehicleBanner').classList.add('visible');
}
- // Fetch full customer detail to get recent purchase info
+ // Fetch full customer detail
try {
const detail = await api(`/pos/api/customers/${customer.id}`);
if (detail.recent_purchases && detail.recent_purchases.length > 0) {
@@ -393,18 +440,19 @@ const POS = (() => {
const daysAgo = Math.floor((Date.now() - new Date(last.created_at).getTime()) / 86400000);
const daysText = daysAgo === 0 ? 'hoy' : daysAgo === 1 ? 'hace 1 dia' : `hace ${daysAgo} dias`;
document.getElementById('lastPurchaseInfo').textContent =
- `Ultima compra: ${fmt(last.total)} ${daysText}`;
+ `${fmt(last.total)} ${daysText}`;
document.getElementById('vehicleBanner').classList.add('visible');
}
} catch (e) {
console.warn('Could not fetch customer detail:', e);
}
- // Re-apply prices based on customer tier
- cart.forEach(item => {
- // Fetch updated price for this customer tier (would need to re-query)
- // For now, prices stay as-is (they were set at add time)
- });
+ // Update CFDI hint
+ const cfdiHint = document.getElementById('cfdiHint');
+ if (cfdiHint && customer.rfc) {
+ cfdiHint.textContent = `RFC: ${customer.rfc}`;
+ document.getElementById('cfdiCheck').checked = !!customer.rfc;
+ }
renderCart();
}
@@ -412,20 +460,25 @@ const POS = (() => {
function clearCustomer() {
currentCustomer = null;
document.getElementById('customerSelected').style.display = 'none';
- document.getElementById('customerSearchWrap').querySelector('input').style.display = '';
- document.getElementById('customerSearchWrap').querySelector('input').value = '';
+ const searchInput = document.getElementById('customerSearch');
+ if (searchInput) {
+ searchInput.style.display = '';
+ searchInput.value = '';
+ }
document.getElementById('vehicleBanner').classList.remove('visible');
+ const cfdiHint = document.getElementById('cfdiHint');
+ if (cfdiHint) cfdiHint.textContent = '';
renderCart();
}
// ─── New Customer Modal ──────────────
function showNewCustomerModal() {
- document.getElementById('newCustomerModal').classList.add('active');
- document.getElementById('ncName').focus();
+ document.getElementById('newCustomerModal').classList.add('open');
+ setTimeout(() => document.getElementById('ncName').focus(), 100);
}
function closeNewCustomerModal() {
- document.getElementById('newCustomerModal').classList.remove('active');
+ document.getElementById('newCustomerModal').classList.remove('open');
}
async function saveNewCustomer() {
@@ -462,7 +515,6 @@ const POS = (() => {
body: JSON.stringify(body),
});
- // Select the new customer
selectCustomer({
id: result.id,
name: body.name,
@@ -475,6 +527,7 @@ const POS = (() => {
});
closeNewCustomerModal();
+ showToast('Cliente creado');
} catch (e) {
alert('Error al crear cliente: ' + e.message);
}
@@ -482,40 +535,88 @@ const POS = (() => {
// ─── Payment ─────────────────────────
function checkout() {
- if (cart.length === 0) { alert('Carrito vacio'); return; }
+ if (cart.length === 0) { showToast('Carrito vacio'); return; }
if (!currentRegister) { alert('No hay caja abierta. Abra una caja primero.'); return; }
paymentMethod = 'efectivo';
const total = getTotal();
+ // Populate modal
document.getElementById('modalTotal').textContent = fmt(total);
- document.getElementById('cashReceived').value = '';
- document.getElementById('changeDisplay').textContent = 'Cambio: $0.00';
- document.getElementById('changeDisplay').className = 'change-display positive';
- document.getElementById('paymentRef').value = '';
+ document.getElementById('modalItemCount').textContent = `${getItemCount()} productos`;
+ document.getElementById('modalCustomerName').textContent =
+ currentCustomer ? currentCustomer.name : 'Publico General';
- // Reset payment method buttons
- document.querySelectorAll('.pm-btn').forEach(b => b.classList.remove('active'));
- document.querySelector('.pm-btn[data-method="efectivo"]').classList.add('active');
+ // Reset inputs
+ document.getElementById('cashReceived').value = '';
+ document.getElementById('changeDisplay').textContent = '$0.00';
+ document.getElementById('changeDisplay').className = 'cambio-amount positive';
+ const payRef = document.getElementById('paymentRef');
+ if (payRef) payRef.value = '';
+
+ // Populate quick amounts
+ const quickContainer = document.getElementById('quickAmounts');
+ if (quickContainer) {
+ const rounded = Math.ceil(total);
+ const amounts = [rounded, Math.ceil(total / 100) * 100, Math.ceil(total / 500) * 500, Math.ceil(total / 1000) * 1000];
+ const unique = [...new Set(amounts)].slice(0, 4);
+ quickContainer.innerHTML = unique.map(a =>
+ `
`
+ ).join('');
+ }
+
+ // Set ref amount
+ const refAmount = document.getElementById('refAmount');
+ if (refAmount) refAmount.value = fmt(total);
+
+ // Reset payment tabs
+ document.querySelectorAll('.pago-tab').forEach(t => t.classList.remove('active'));
+ document.querySelector('.pago-tab[data-method="efectivo"]').classList.add('active');
+ document.getElementById('cashPayment').classList.add('active');
document.getElementById('cashPayment').style.display = '';
+ document.getElementById('refPayment').classList.remove('active');
document.getElementById('refPayment').style.display = 'none';
+ document.getElementById('mixedPayment').classList.remove('active');
document.getElementById('mixedPayment').style.display = 'none';
- document.getElementById('paymentModal').classList.add('active');
+ // Reset confirm button
+ const confirmBtn = document.getElementById('btnConfirmPayment');
+ confirmBtn.disabled = false;
+ confirmBtn.textContent = `Confirmar Pago — ${fmt(total)}`;
+
+ document.getElementById('paymentModal').classList.add('open');
setTimeout(() => document.getElementById('cashReceived').focus(), 100);
}
function selectPaymentMethod(method, btn) {
paymentMethod = method;
- document.querySelectorAll('.pm-btn').forEach(b => b.classList.remove('active'));
- btn.classList.add('active');
- document.getElementById('cashPayment').style.display = method === 'efectivo' ? '' : 'none';
- document.getElementById('refPayment').style.display = (method === 'transferencia' || method === 'tarjeta') ? '' : 'none';
- document.getElementById('mixedPayment').style.display = method === 'mixto' ? '' : 'none';
+ // Update tabs
+ document.querySelectorAll('.pago-tab').forEach(t => t.classList.remove('active'));
+ if (btn) btn.classList.add('active');
+
+ // Show/hide tab content
+ const tabs = {
+ efectivo: 'cashPayment',
+ transferencia: 'refPayment',
+ tarjeta: 'refPayment',
+ mixto: 'mixedPayment',
+ };
+
+ ['cashPayment', 'refPayment', 'mixedPayment'].forEach(id => {
+ const el = document.getElementById(id);
+ if (el) {
+ const isActive = el.id === tabs[method];
+ el.classList.toggle('active', isActive);
+ el.style.display = isActive ? '' : 'none';
+ }
+ });
if (method === 'efectivo') document.getElementById('cashReceived').focus();
- if (method === 'transferencia' || method === 'tarjeta') document.getElementById('paymentRef').focus();
+ if (method === 'transferencia' || method === 'tarjeta') {
+ const ref = document.getElementById('paymentRef');
+ if (ref) ref.focus();
+ }
}
function updateChange() {
@@ -523,8 +624,13 @@ const POS = (() => {
const received = parseFloat(document.getElementById('cashReceived').value) || 0;
const change = received - total;
const el = document.getElementById('changeDisplay');
- el.textContent = `Cambio: ${fmt(Math.abs(change))}`;
- el.className = 'change-display ' + (change >= 0 ? 'positive' : 'negative');
+ if (change >= 0) {
+ el.textContent = fmt(change);
+ el.className = 'cambio-amount positive';
+ } else {
+ el.textContent = '-' + fmt(Math.abs(change));
+ el.className = 'cambio-amount negative';
+ }
}
function updateMixedTotal() {
@@ -534,13 +640,13 @@ const POS = (() => {
sum += parseFloat(input.value) || 0;
});
const remaining = total - sum;
- document.getElementById('mixedRemaining').textContent =
- remaining > 0 ? `Faltante: ${fmt(remaining)}` : `Cubierto (${fmt(sum)})`;
- document.getElementById('mixedRemaining').style.color = remaining > 0 ? '#c62828' : '#2e7d32';
+ const el = document.getElementById('mixedRemaining');
+ el.textContent = remaining > 0 ? `Faltante: ${fmt(remaining)}` : `Cubierto (${fmt(sum)})`;
+ el.style.color = remaining > 0 ? 'var(--color-error)' : 'var(--color-success)';
}
function closePaymentModal() {
- document.getElementById('paymentModal').classList.remove('active');
+ document.getElementById('paymentModal').classList.remove('open');
}
async function confirmPayment() {
@@ -584,10 +690,12 @@ const POS = (() => {
amount_paid: amountPaid,
payment_details: paymentDetails,
reference: reference,
+ generate_cfdi: document.getElementById('cfdiCheck').checked,
};
- document.getElementById('btnConfirmPayment').disabled = true;
- document.getElementById('btnConfirmPayment').textContent = 'Procesando...';
+ const confirmBtn = document.getElementById('btnConfirmPayment');
+ confirmBtn.disabled = true;
+ confirmBtn.textContent = 'Procesando...';
try {
const sale = await api('/pos/api/sales', {
@@ -596,6 +704,7 @@ const POS = (() => {
});
lastSaleId = sale.id;
+ lastSaleData = sale;
closePaymentModal();
showTicket(sale);
@@ -605,11 +714,12 @@ const POS = (() => {
clearCustomer();
renderCart();
+ showToast(`Venta #${sale.id} completada`);
} catch (e) {
alert('Error al procesar venta: ' + e.message);
} finally {
- document.getElementById('btnConfirmPayment').disabled = false;
- document.getElementById('btnConfirmPayment').textContent = 'Confirmar Pago';
+ confirmBtn.disabled = false;
+ confirmBtn.textContent = 'Confirmar Pago';
}
}
@@ -623,7 +733,7 @@ const POS = (() => {
const available = (currentCustomer.credit_limit || 0) - (currentCustomer.credit_balance || 0);
if (currentCustomer.credit_limit > 0 && total > available) {
- if (!confirm(`Credito insuficiente. Disponible: ${fmt(available)}, Total: ${fmt(total)}. Continuar de todas formas?`)) {
+ if (!confirm(`Credito insuficiente. Disponible: ${fmt(available)}, Total: ${fmt(total)}. Continuar?`)) {
return;
}
}
@@ -650,6 +760,7 @@ const POS = (() => {
});
lastSaleId = sale.id;
+ lastSaleData = sale;
showTicket(sale);
cart = [];
selectedRow = -1;
@@ -662,7 +773,7 @@ const POS = (() => {
// ─── Quotation ───────────────────────
async function saveQuotation() {
- if (cart.length === 0) { alert('Carrito vacio'); return; }
+ if (cart.length === 0) { showToast('Carrito vacio'); return; }
const body = {
items: cart.map(item => ({
@@ -680,7 +791,7 @@ const POS = (() => {
method: 'POST',
body: JSON.stringify(body),
});
- alert(`Cotizacion #${result.id} guardada. Total: ${fmt(result.total)}\nValida hasta: ${result.valid_until}`);
+ showToast(`Cotizacion #${result.id} guardada. Total: ${fmt(result.total)}`);
} catch (e) {
alert('Error: ' + e.message);
}
@@ -718,13 +829,7 @@ const POS = (() => {
method: 'POST',
body: JSON.stringify(body),
});
- alert(
- `Apartado #${result.id} creado.\n` +
- `Total: ${fmt(result.total)}\n` +
- `Anticipo: ${fmt(result.amount_paid)}\n` +
- `Restante: ${fmt(result.remaining)}\n` +
- `Vence: ${result.expires_at}`
- );
+ showToast(`Apartado #${result.id} creado. Restante: ${fmt(result.remaining)}`);
cart = [];
selectedRow = -1;
clearCustomer();
@@ -736,64 +841,108 @@ const POS = (() => {
// ─── Ticket ──────────────────────────
function showTicket(sale) {
- const lines = [];
- lines.push('========================================');
- lines.push(' NEXUS POS');
- lines.push('========================================');
- lines.push(`Venta #${sale.id}`);
- lines.push(`Fecha: ${new Date(sale.created_at).toLocaleString('es-MX')}`);
- if (currentCustomer) {
- lines.push(`Cliente: ${currentCustomer.name}`);
- if (currentCustomer.rfc) lines.push(`RFC: ${currentCustomer.rfc}`);
- } else {
- lines.push('Cliente: Publico General');
- }
- lines.push('----------------------------------------');
-
- (sale.items || []).forEach(item => {
- lines.push(`${item.name}`);
- let line = ` ${item.quantity} x ${fmt(item.unit_price)}`;
- if (item.discount_pct > 0) line += ` (-${item.discount_pct}%)`;
- line += ` ${fmt(item.subtotal)}`;
- lines.push(line);
+ const dateStr = new Date(sale.created_at).toLocaleString('es-MX', {
+ year: 'numeric', month: 'short', day: 'numeric',
+ hour: '2-digit', minute: '2-digit'
});
- lines.push('----------------------------------------');
- lines.push(`Subtotal: ${fmt(sale.subtotal).padStart(12)}`);
- if (sale.discount_total > 0) {
- lines.push(`Descuento: -${fmt(sale.discount_total).padStart(12)}`);
- }
- lines.push(`IVA: ${fmt(sale.tax_total).padStart(12)}`);
- lines.push('========================================');
- lines.push(`TOTAL: ${fmt(sale.total).padStart(12)}`);
- lines.push('========================================');
+ const customerName = currentCustomer ? currentCustomer.name : 'Publico General';
+ const customerRfc = currentCustomer && currentCustomer.rfc ? currentCustomer.rfc : '';
- if (sale.payment_method === 'efectivo') {
- lines.push(`Efectivo: ${fmt(sale.amount_paid).padStart(12)}`);
- lines.push(`Cambio: ${fmt(sale.change_given).padStart(12)}`);
- } else {
- lines.push(`Pago: ${sale.payment_method}`);
- }
+ let itemsHtml = '';
+ (sale.items || []).forEach(item => {
+ const itemTotal = (item.unit_price * item.quantity * (1 - (item.discount_pct || 0) / 100));
+ itemsHtml += `
+
+ ${item.quantity}
+ ${item.name || ''}
+ ${fmt(item.unit_price)}
+ ${fmt(item.subtotal || itemTotal)}
+
`;
+ });
- lines.push('');
- lines.push(' Gracias por su compra!');
- lines.push('');
+ const ticketHtml = `
+
NEXUS AUTOPARTS
+
Tu conexion con las refacciones
+
+ Sucursal: ${currentRegister ? currentRegister.branch_name || '' : ''}
+ RFC: NAU210315XX1
+
+
+
+ VENTA: V-${sale.id}
+ ${dateStr}
+
+
+ Cliente: ${customerName}
+ ${customerRfc ? `RFC: ${customerRfc}` : ''}
+
+
+
+ Cant
+ Descripcion
+ P. Unit
+ Importe
+
+
+ ${itemsHtml}
+
+
+
+ Subtotal:${fmt(sale.subtotal)}
+
+ ${sale.discount_total > 0 ? `
Descuento:-${fmt(sale.discount_total)}
` : ''}
+
+ IVA 16%:${fmt(sale.tax_total)}
+
+
+ TOTAL:${fmt(sale.total)}
+
+
+
+
+
+ Forma de pago:${sale.payment_method || paymentMethod}
+
+ ${sale.payment_method === 'efectivo' ? `
+
+ Recibido:${fmt(sale.amount_paid)}
+
+
+ Cambio:${fmt(sale.change_given || 0)}
+
` : ''}
+
+
+
+ `;
- document.getElementById('ticketPreview').textContent = lines.join('\n');
- document.getElementById('ticketModal').classList.add('active');
+ // Set both print area and preview
+ const printArea = document.getElementById('ticketContent');
+ if (printArea) printArea.innerHTML = ticketHtml;
+ const preview = document.getElementById('ticketPreviewContent');
+ if (preview) preview.innerHTML = ticketHtml;
+
+ document.getElementById('ticketModal').classList.add('open');
}
function closeTicketModal() {
- document.getElementById('ticketModal').classList.remove('active');
+ document.getElementById('ticketModal').classList.remove('open');
}
function printTicket() {
+ // Make print area visible for @media print
+ const area = document.getElementById('ticketPrintArea');
+ if (area) area.style.display = 'block';
window.print();
+ setTimeout(() => { if (area) area.style.display = 'none'; }, 500);
}
// ─── Last Sale ───────────────────────
async function showLastSale() {
- if (!lastSaleId) { alert('No hay venta reciente'); return; }
+ if (!lastSaleId) { showToast('No hay venta reciente'); return; }
try {
const sale = await api(`/pos/api/sales/${lastSaleId}`);
showTicket(sale);
@@ -804,15 +953,12 @@ const POS = (() => {
// ─── Drawer ──────────────────────────
function openDrawer() {
- // Cash drawer open command (ESC/POS compatible)
- // In a real implementation, this would send the command to the printer
- alert('Comando enviado al cajon de efectivo.');
+ showToast('Comando enviado al cajon de efectivo.');
}
// ─── Keyboard Shortcuts ──────────────
function setupKeyboard() {
document.addEventListener('keydown', (e) => {
- // Don't intercept when typing in inputs
const tag = e.target.tagName;
const inInput = tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT';
@@ -845,12 +991,20 @@ const POS = (() => {
break;
case 'Escape':
e.preventDefault();
- if (document.getElementById('paymentModal').classList.contains('active')) {
+ if (document.getElementById('paymentModal').classList.contains('open')) {
closePaymentModal();
- } else if (document.getElementById('newCustomerModal').classList.contains('active')) {
+ } else if (document.getElementById('newCustomerModal').classList.contains('open')) {
closeNewCustomerModal();
- } else if (document.getElementById('ticketModal').classList.contains('active')) {
+ } else if (document.getElementById('ticketModal').classList.contains('open')) {
closeTicketModal();
+ } else if (document.querySelector('.confirm-overlay.active')) {
+ // Close cancel modal
+ const overlay = document.getElementById('overlay-cancelar-venta');
+ const dialog = document.getElementById('modal-cancelar-venta');
+ if (overlay && overlay.classList.contains('active')) {
+ overlay.classList.remove('active');
+ dialog.classList.remove('active');
+ }
} else {
hideSearchResults();
}
diff --git a/pos/templates/pos.html b/pos/templates/pos.html
index 67772a2..f2ef0f8 100644
--- a/pos/templates/pos.html
+++ b/pos/templates/pos.html
@@ -34,7 +34,7 @@
flex-direction: column;
}
- /* Dot-grid for modern theme (applied to body shell) */
+ /* Dot-grid for modern theme */
[data-theme="modern"] body,
[data-theme="modern"].pos-shell {
background-color: var(--color-bg-base);
@@ -129,47 +129,8 @@
font-weight: var(--font-weight-bold);
}
- /* Theme switcher inside status bar */
- .theme-switcher {
- display: flex;
- align-items: center;
- gap: var(--space-2);
- background-color: var(--color-surface-1);
- border: 1px solid var(--color-border);
- border-radius: var(--radius-full);
- padding: 2px;
- }
-
- .theme-btn {
- display: flex;
- align-items: center;
- gap: var(--space-1);
- padding: 3px var(--space-3);
- border: none;
- border-radius: var(--radius-full);
- font-family: var(--font-body);
- font-size: 0.68rem;
- font-weight: var(--font-weight-semibold);
- letter-spacing: var(--tracking-wide);
- text-transform: uppercase;
- cursor: pointer;
- transition: var(--transition-fast);
- background: transparent;
- color: var(--color-text-muted);
- }
-
- .theme-btn.active {
- background-color: var(--color-primary);
- color: var(--color-text-inverse);
- box-shadow: var(--shadow-sm);
- }
-
- [data-theme="industrial"] .theme-btn.active {
- color: #000;
- }
-
/* =====================================================================
- MAIN CONTENT — split layout
+ MAIN CONTENT -- split layout
===================================================================== */
.pos-shell {
@@ -187,7 +148,7 @@
}
/* =====================================================================
- LEFT PANEL — Product Browser (60%)
+ LEFT PANEL -- Product Browser (60%)
===================================================================== */
.panel-products {
@@ -244,9 +205,7 @@
transition: var(--transition-fast);
}
- .search-input::placeholder {
- color: var(--color-text-muted);
- }
+ .search-input::placeholder { color: var(--color-text-muted); }
.search-input:focus {
border-color: var(--color-border-focus);
@@ -260,11 +219,8 @@
}
.btn-scan {
- width: 48px;
- height: 48px;
- display: flex;
- align-items: center;
- justify-content: center;
+ width: 48px; height: 48px;
+ display: flex; align-items: center; justify-content: center;
background-color: var(--btn-secondary-bg);
border: 1.5px solid var(--btn-secondary-border);
border-radius: var(--radius-md);
@@ -279,26 +235,13 @@
box-shadow: var(--shadow-accent);
}
- [data-theme="industrial"] .btn-scan {
- clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
- }
-
- [data-theme="modern"] .btn-scan {
- border-radius: var(--radius-lg);
- }
-
/* Quick category buttons */
.categories-row {
- display: flex;
- align-items: center;
- gap: var(--space-2);
+ display: flex; align-items: center; gap: var(--space-2);
padding: var(--space-3) var(--space-5);
border-bottom: 1px solid var(--color-border);
- overflow-x: auto;
- flex-shrink: 0;
- scrollbar-width: none;
+ overflow-x: auto; flex-shrink: 0; scrollbar-width: none;
}
-
.categories-row::-webkit-scrollbar { display: none; }
.category-label {
@@ -312,9 +255,7 @@
}
.cat-btn {
- display: flex;
- align-items: center;
- gap: var(--space-2);
+ display: flex; align-items: center; gap: var(--space-2);
padding: var(--space-2) var(--space-4);
border: 1.5px solid var(--color-border);
border-radius: var(--radius-sm);
@@ -323,990 +264,736 @@
font-size: var(--text-body-sm);
font-weight: var(--font-weight-semibold);
color: var(--color-text-secondary);
- cursor: pointer;
- white-space: nowrap;
+ cursor: pointer; white-space: nowrap;
transition: var(--transition-fast);
- letter-spacing: var(--tracking-snug);
}
-
.cat-btn:hover {
- border-color: var(--color-primary);
- color: var(--color-primary);
+ border-color: var(--color-primary); color: var(--color-primary);
background-color: var(--color-primary-muted);
}
-
.cat-btn.active {
- border-color: var(--color-primary);
- background-color: var(--color-primary);
+ border-color: var(--color-primary); background-color: var(--color-primary);
color: var(--color-text-inverse);
}
-
[data-theme="industrial"] .cat-btn.active { color: #000; }
-
- [data-theme="modern"] .cat-btn {
- border-radius: var(--radius-full);
- }
-
- [data-theme="industrial"] .cat-btn {
- clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
- }
+ [data-theme="modern"] .cat-btn { border-radius: var(--radius-full); }
/* Product grid */
.product-grid-wrap {
- flex: 1;
- overflow-y: auto;
+ flex: 1; overflow-y: auto;
padding: var(--space-4) var(--space-5);
scrollbar-width: thin;
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
-
.product-grid-wrap::-webkit-scrollbar { width: 6px; }
.product-grid-wrap::-webkit-scrollbar-track { background: var(--scrollbar-track); }
- .product-grid-wrap::-webkit-scrollbar-thumb {
- background-color: var(--scrollbar-thumb);
- border-radius: var(--radius-full);
- }
- .product-grid-wrap::-webkit-scrollbar-thumb:hover {
- background-color: var(--scrollbar-thumb-hover);
- }
+ .product-grid-wrap::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: var(--radius-full); }
.product-grid {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: var(--space-3);
- }
-
- @media (max-width: 1100px) {
- .product-grid {
- grid-template-columns: repeat(2, 1fr);
- }
+ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
}
+ @media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
/* Product card */
.product-card {
- position: relative;
- display: flex;
- flex-direction: column;
+ position: relative; display: flex; flex-direction: column;
padding: var(--space-4);
background-color: var(--color-surface-1);
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
- cursor: pointer;
- transition: var(--transition-fast);
- overflow: hidden;
+ cursor: pointer; transition: var(--transition-fast); overflow: hidden;
}
-
.product-card:hover {
- border-color: var(--color-primary);
- box-shadow: var(--shadow-md);
- transform: translateY(-1px);
+ border-color: var(--color-primary); box-shadow: var(--shadow-md); transform: translateY(-1px);
}
+ .product-card:hover .product-card__add { opacity: 1; transform: scale(1); }
- .product-card:hover .product-card__add {
- opacity: 1;
- transform: scale(1);
- }
-
- [data-theme="industrial"] .product-card {
- clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
- background-color: var(--color-surface-1);
- border-color: #2a2a2a;
- }
-
- [data-theme="industrial"] .product-card:hover {
- border-color: var(--color-primary);
- box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
- }
-
- [data-theme="modern"] .product-card {
- border-radius: var(--radius-lg);
- background-color: #fff;
- box-shadow: var(--shadow-sm);
- }
-
- [data-theme="modern"] .product-card:hover {
- box-shadow: var(--shadow-lg);
- }
+ [data-theme="industrial"] .product-card { background-color: var(--color-surface-1); border-color: #2a2a2a; }
+ [data-theme="industrial"] .product-card:hover { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md); }
+ [data-theme="modern"] .product-card { border-radius: var(--radius-lg); background-color: #fff; box-shadow: var(--shadow-sm); }
+ [data-theme="modern"] .product-card:hover { box-shadow: var(--shadow-lg); }
.product-card__category {
- font-size: var(--text-caption);
- font-weight: var(--font-weight-semibold);
- letter-spacing: var(--tracking-widest);
- text-transform: uppercase;
- color: var(--color-primary);
- margin-bottom: var(--space-1);
+ font-size: var(--text-caption); font-weight: var(--font-weight-semibold);
+ letter-spacing: var(--tracking-widest); text-transform: uppercase;
+ color: var(--color-primary); margin-bottom: var(--space-1);
}
-
.product-card__name {
- font-family: var(--font-heading);
- font-size: var(--text-body);
- font-weight: var(--heading-weight-primary);
- line-height: var(--leading-h5);
- color: var(--color-text-primary);
- margin-bottom: var(--space-1);
- letter-spacing: var(--heading-tracking-h5);
+ font-family: var(--font-heading); font-size: var(--text-body);
+ font-weight: var(--heading-weight-primary); line-height: var(--leading-h5);
+ color: var(--color-text-primary); margin-bottom: var(--space-1);
}
-
- [data-theme="industrial"] .product-card__name {
- font-size: 1.05rem;
- letter-spacing: 0.01em;
- }
-
.product-card__oem {
- font-family: var(--font-mono);
- font-size: var(--text-caption);
- color: var(--color-text-muted);
- margin-bottom: var(--space-3);
+ font-family: var(--font-mono); font-size: var(--text-caption);
+ color: var(--color-text-muted); margin-bottom: var(--space-3);
}
-
.product-card__footer {
- display: flex;
- align-items: flex-end;
- justify-content: space-between;
- margin-top: auto;
- gap: var(--space-2);
+ display: flex; align-items: flex-end; justify-content: space-between;
+ margin-top: auto; gap: var(--space-2);
}
-
.product-card__price {
- font-family: var(--font-mono);
- font-size: 1.1rem;
- font-weight: var(--font-weight-bold);
- color: var(--color-text-primary);
- line-height: 1;
+ font-family: var(--font-mono); font-size: 1.1rem;
+ font-weight: var(--font-weight-bold); color: var(--color-text-primary); line-height: 1;
}
-
- .product-card__stock {
- font-size: var(--text-caption);
- color: var(--color-text-muted);
- margin-top: 2px;
- }
-
+ .product-card__stock { font-size: var(--text-caption); color: var(--color-text-muted); margin-top: 2px; }
.product-card__stock.low { color: var(--color-warning); }
.product-card__stock.out { color: var(--color-error); }
.product-card__add {
- width: 32px;
- height: 32px;
- border: none;
- border-radius: var(--radius-sm);
- background-color: var(--color-primary);
- color: var(--color-text-inverse);
- font-size: 1.2rem;
- font-weight: var(--font-weight-bold);
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- opacity: 0.75;
- transform: scale(0.95);
- transition: var(--transition-fast);
- flex-shrink: 0;
+ width: 32px; height: 32px; border: none; border-radius: var(--radius-sm);
+ background-color: var(--color-primary); color: var(--color-text-inverse);
+ font-size: 1.2rem; font-weight: var(--font-weight-bold);
+ display: flex; align-items: center; justify-content: center;
+ cursor: pointer; opacity: 0.75; transform: scale(0.95);
+ transition: var(--transition-fast); flex-shrink: 0;
}
-
- .product-card__add:hover {
- background-color: var(--color-primary-hover);
- opacity: 1;
- transform: scale(1.08) !important;
- }
-
+ .product-card__add:hover { background-color: var(--color-primary-hover); opacity: 1; transform: scale(1.08) !important; }
[data-theme="industrial"] .product-card__add { color: #000; }
[data-theme="modern"] .product-card__add { border-radius: var(--radius-md); }
- /* Add flash animation */
@keyframes card-flash {
0% { background-color: var(--color-primary-muted); }
100% { background-color: transparent; }
}
-
- .product-card.added {
- animation: card-flash 0.4s ease forwards;
- }
+ .product-card.added { animation: card-flash 0.4s ease forwards; }
/* =====================================================================
- RIGHT PANEL — Cart / Ticket (40%)
+ RIGHT PANEL -- Cart / Ticket (40%)
===================================================================== */
.panel-cart {
- display: flex;
- flex-direction: column;
- width: 40%;
- min-width: 320px;
- background-color: var(--color-surface-1);
- overflow: hidden;
- position: relative;
- }
-
- [data-theme="modern"] .panel-cart {
- background-color: #fff;
- box-shadow: -4px 0 20px rgba(26, 26, 46, 0.06);
- }
-
- [data-theme="industrial"] .panel-cart {
- background-color: #141414;
- border-left: 1px solid #2a2a2a;
+ display: flex; flex-direction: column; width: 40%; min-width: 320px;
+ background-color: var(--color-surface-1); overflow: hidden; position: relative;
}
+ [data-theme="modern"] .panel-cart { background-color: #fff; box-shadow: -4px 0 20px rgba(26,26,46,0.06); }
+ [data-theme="industrial"] .panel-cart { background-color: #141414; border-left: 1px solid #2a2a2a; }
/* Cart header */
.cart-header {
padding: var(--space-4) var(--space-5);
border-bottom: 1px solid var(--color-border);
- flex-shrink: 0;
- background-color: var(--color-surface-2);
- }
-
- [data-theme="industrial"] .cart-header {
- background-color: #1a1a1a;
- border-bottom-color: var(--color-primary-muted);
+ flex-shrink: 0; background-color: var(--color-surface-2);
}
+ [data-theme="industrial"] .cart-header { background-color: #1a1a1a; border-bottom-color: var(--color-primary-muted); }
.cart-header__top {
- display: flex;
- align-items: center;
- justify-content: space-between;
+ display: flex; align-items: center; justify-content: space-between;
margin-bottom: var(--space-3);
}
.cart-header__sale-id {
- font-family: var(--font-heading);
- font-size: var(--text-h5);
- font-weight: var(--heading-weight-primary);
- color: var(--color-text-primary);
- letter-spacing: var(--heading-tracking-h5);
- display: flex;
- align-items: center;
- gap: var(--space-2);
+ font-family: var(--font-heading); font-size: var(--text-h5);
+ font-weight: var(--heading-weight-primary); color: var(--color-text-primary);
+ display: flex; align-items: center; gap: var(--space-2);
}
-
.cart-header__sale-id::before {
- content: '';
- display: block;
- width: 4px;
- height: 20px;
- background-color: var(--color-primary);
- border-radius: 2px;
- flex-shrink: 0;
- }
-
- [data-theme="industrial"] .cart-header__sale-id {
- font-size: 1.35rem;
- letter-spacing: 0.03em;
+ content: ''; display: block; width: 4px; height: 20px;
+ background-color: var(--color-primary); border-radius: 2px; flex-shrink: 0;
}
.cart-header__status {
- font-size: var(--text-caption);
- font-weight: var(--font-weight-semibold);
- letter-spacing: var(--tracking-wider);
- text-transform: uppercase;
- color: var(--color-success);
- background-color: rgba(34, 197, 94, 0.12);
- padding: 3px var(--space-3);
- border-radius: var(--radius-full);
- border: 1px solid rgba(34, 197, 94, 0.25);
+ font-size: var(--text-caption); font-weight: var(--font-weight-semibold);
+ letter-spacing: var(--tracking-wider); text-transform: uppercase;
+ color: var(--color-success); background-color: rgba(34,197,94,0.12);
+ padding: 3px var(--space-3); border-radius: var(--radius-full);
+ border: 1px solid rgba(34,197,94,0.25);
}
/* Customer row */
.customer-row {
- display: flex;
- align-items: center;
- gap: var(--space-3);
+ display: flex; align-items: center; gap: var(--space-3);
}
-
.customer-icon {
- width: 34px;
- height: 34px;
- border-radius: var(--radius-full);
- background-color: var(--color-primary-muted);
- border: 1.5px solid var(--color-primary);
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--color-primary);
- flex-shrink: 0;
+ width: 34px; height: 34px; border-radius: var(--radius-full);
+ background-color: var(--color-primary-muted); border: 1.5px solid var(--color-primary);
+ display: flex; align-items: center; justify-content: center;
+ color: var(--color-primary); flex-shrink: 0;
}
-
- .customer-info {
- flex: 1;
- min-width: 0;
- }
-
+ .customer-info { flex: 1; min-width: 0; }
.customer-info__name {
- font-size: var(--text-body-sm);
- font-weight: var(--font-weight-semibold);
- color: var(--color-text-primary);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold);
+ color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
-
- .customer-info__label {
- font-size: var(--text-caption);
- color: var(--color-text-muted);
- }
-
+ .customer-info__label { font-size: var(--text-caption); color: var(--color-text-muted); }
.btn-change-customer {
- padding: var(--space-1) var(--space-3);
- border: 1px solid var(--color-border);
- border-radius: var(--radius-full);
- background: transparent;
- font-family: var(--font-body);
- font-size: var(--text-caption);
- font-weight: var(--font-weight-semibold);
- color: var(--color-text-muted);
- cursor: pointer;
- transition: var(--transition-fast);
- white-space: nowrap;
+ padding: var(--space-1) var(--space-3); border: 1px solid var(--color-border);
+ border-radius: var(--radius-full); background: transparent;
+ font-family: var(--font-body); font-size: var(--text-caption);
+ font-weight: var(--font-weight-semibold); color: var(--color-text-muted);
+ cursor: pointer; transition: var(--transition-fast); white-space: nowrap;
}
+ .btn-change-customer:hover { border-color: var(--color-primary); color: var(--color-primary); }
- .btn-change-customer:hover {
- border-color: var(--color-primary);
- color: var(--color-primary);
+ /* Banner Cliente */
+ .banner-cliente {
+ padding: var(--space-3) var(--space-4);
+ border-bottom: 2px solid var(--color-primary);
+ background: var(--color-primary-muted);
+ display: none;
}
+ .banner-cliente.visible { display: block; }
+ .banner-top { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
+ .banner-avatar {
+ width: 36px; height: 36px; border-radius: var(--radius-full);
+ background: var(--color-primary); display: flex; align-items: center; justify-content: center;
+ font-family: var(--font-heading); font-size: var(--text-body-sm);
+ font-weight: var(--font-weight-bold); color: var(--color-text-inverse); flex-shrink: 0;
+ }
+ .banner-name-block { flex: 1; min-width: 0; }
+ .banner-name {
+ font-family: var(--font-heading); font-size: var(--text-body);
+ font-weight: var(--heading-weight-primary); color: var(--color-text-primary);
+ line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
+ }
+ .banner-rfc {
+ font-family: var(--font-mono); font-size: var(--text-caption);
+ color: var(--color-text-muted); letter-spacing: var(--tracking-wide);
+ }
+ .banner-close {
+ width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
+ background: transparent; border: 1px solid var(--color-border);
+ border-radius: var(--radius-md); cursor: pointer;
+ color: var(--color-text-muted); font-size: 14px; transition: var(--transition-fast); flex-shrink: 0;
+ }
+ .banner-close:hover { background: var(--color-surface-2); color: var(--color-text-primary); }
+ .banner-info {
+ display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-2);
+ }
+ .banner-info-item {
+ padding: var(--space-2) var(--space-3); background: var(--color-bg-elevated);
+ border: 1px solid var(--color-border); border-radius: var(--radius-md);
+ }
+ .banner-info-label {
+ font-size: 10px; color: var(--color-text-muted); text-transform: uppercase;
+ letter-spacing: var(--tracking-widest); font-weight: var(--font-weight-semibold);
+ }
+ .banner-info-value {
+ font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold);
+ color: var(--color-text-primary); margin-top: 1px;
+ }
+ .banner-info-value.credit-ok { color: var(--color-success); }
+ .banner-info-value.credit-low { color: var(--color-warning-dark); }
+ .banner-info-value.credit-none { color: var(--color-error); }
/* Cart items list */
.cart-items {
- flex: 1;
- overflow-y: auto;
- padding: var(--space-3) var(--space-4);
- scrollbar-width: thin;
- scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
+ flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-4);
+ scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
-
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: transparent; }
- .cart-items::-webkit-scrollbar-thumb {
- background-color: var(--scrollbar-thumb);
- border-radius: var(--radius-full);
- }
+ .cart-items::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: var(--radius-full); }
.cart-empty {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- height: 120px;
- color: var(--color-text-muted);
- font-size: var(--text-body-sm);
- gap: var(--space-2);
- opacity: 0.6;
+ display: flex; flex-direction: column; align-items: center; justify-content: center;
+ height: 120px; color: var(--color-text-muted); font-size: var(--text-body-sm); gap: var(--space-2); opacity: 0.6;
}
.cart-item {
- display: flex;
- align-items: center;
- gap: var(--space-3);
- padding: var(--space-3) var(--space-2);
- border-bottom: 1px solid var(--color-border);
+ display: flex; align-items: center; gap: var(--space-3);
+ padding: var(--space-3) var(--space-2); border-bottom: 1px solid var(--color-border);
transition: var(--transition-fast);
animation: item-slide-in 0.2s ease;
}
-
@keyframes item-slide-in {
from { opacity: 0; transform: translateX(10px); }
to { opacity: 1; transform: translateX(0); }
}
-
- .cart-item:hover {
- background-color: var(--color-primary-muted);
- border-radius: var(--radius-sm);
- }
-
+ .cart-item:hover { background-color: var(--color-primary-muted); border-radius: var(--radius-sm); }
.cart-item:last-child { border-bottom: none; }
- .cart-item__qty-ctrl {
- display: flex;
- align-items: center;
- gap: var(--space-1);
- flex-shrink: 0;
- }
-
+ .cart-item__qty-ctrl { display: flex; align-items: center; gap: var(--space-1); flex-shrink: 0; }
.qty-btn {
- width: 26px;
- height: 26px;
- border: 1px solid var(--color-border-strong);
- border-radius: var(--radius-sm);
- background-color: var(--color-surface-3);
- color: var(--color-text-primary);
- font-size: 0.9rem;
- font-weight: var(--font-weight-bold);
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: var(--transition-fast);
- line-height: 1;
+ width: 26px; height: 26px; border: 1px solid var(--color-border-strong);
+ border-radius: var(--radius-sm); background-color: var(--color-surface-3);
+ color: var(--color-text-primary); font-size: 0.9rem; font-weight: var(--font-weight-bold);
+ cursor: pointer; display: flex; align-items: center; justify-content: center;
+ transition: var(--transition-fast); line-height: 1;
}
-
- .qty-btn:hover {
- border-color: var(--color-primary);
- background-color: var(--color-primary);
- color: var(--color-text-inverse);
- }
-
+ .qty-btn:hover { border-color: var(--color-primary); background-color: var(--color-primary); color: var(--color-text-inverse); }
[data-theme="industrial"] .qty-btn:hover { color: #000; }
-
.qty-display {
- font-family: var(--font-mono);
- font-size: var(--text-body-sm);
- font-weight: var(--font-weight-bold);
- color: var(--color-text-primary);
- min-width: 24px;
- text-align: center;
- }
-
- .cart-item__info {
- flex: 1;
- min-width: 0;
+ font-family: var(--font-mono); font-size: var(--text-body-sm);
+ font-weight: var(--font-weight-bold); color: var(--color-text-primary); min-width: 24px; text-align: center;
}
+ .cart-item__info { flex: 1; min-width: 0; }
.cart-item__name {
- font-size: var(--text-body-sm);
- font-weight: var(--font-weight-semibold);
- color: var(--color-text-primary);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold);
+ color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
-
- .cart-item__unit {
- font-family: var(--font-mono);
- font-size: var(--text-caption);
- color: var(--color-text-muted);
- }
-
+ .cart-item__unit { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--color-text-muted); }
.cart-item__total {
- font-family: var(--font-mono);
- font-size: var(--text-body-sm);
- font-weight: var(--font-weight-bold);
- color: var(--color-text-primary);
- text-align: right;
- min-width: 72px;
+ font-family: var(--font-mono); font-size: var(--text-body-sm);
+ font-weight: var(--font-weight-bold); color: var(--color-text-primary); text-align: right; min-width: 72px;
}
-
.cart-item__remove {
- width: 24px;
- height: 24px;
- border: none;
- border-radius: var(--radius-sm);
- background: transparent;
- color: var(--color-text-muted);
- font-size: 1rem;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: var(--transition-fast);
- flex-shrink: 0;
- line-height: 1;
+ width: 24px; height: 24px; border: none; border-radius: var(--radius-sm);
+ background: transparent; color: var(--color-text-muted); font-size: 1rem;
+ cursor: pointer; display: flex; align-items: center; justify-content: center;
+ transition: var(--transition-fast); flex-shrink: 0; line-height: 1;
}
+ .cart-item__remove:hover { background-color: rgba(239,68,68,0.15); color: var(--color-error); }
- .cart-item__remove:hover {
- background-color: rgba(239, 68, 68, 0.15);
- color: var(--color-error);
+ /* Columnas Costo/Margen (hidden by default, visible with permission) */
+ .cart-item__cost, .cart-item__margin {
+ display: none; font-family: var(--font-mono); font-size: var(--text-caption);
+ text-align: right; min-width: 56px; flex-shrink: 0;
}
+ .cart-item__cost { color: var(--color-text-muted); }
+ .cart-item__margin { font-weight: var(--font-weight-bold); }
+ .cart-item__margin.margin-high { color: var(--color-success); }
+ .cart-item__margin.margin-mid { color: var(--color-warning); }
+ .cart-item__margin.margin-low { color: var(--color-error); }
+
+ body.show-cost-columns .cart-item__cost,
+ body.show-cost-columns .cart-item__margin { display: block; }
+
+ .margin-summary {
+ display: none; padding: var(--space-2) var(--space-5);
+ border-top: 1px dashed var(--color-border);
+ font-size: var(--text-caption); color: var(--color-text-muted);
+ }
+ body.show-cost-columns .margin-summary { display: flex; justify-content: space-between; }
+ .margin-summary__value { font-family: var(--font-mono); font-weight: var(--font-weight-bold); }
+
+ .cost-toggle {
+ display: flex; align-items: center; gap: var(--space-2);
+ padding: var(--space-1) var(--space-3); border: 1px solid var(--color-border);
+ border-radius: var(--radius-sm); background: transparent;
+ color: var(--color-text-muted); font-size: 10px; font-family: var(--font-body);
+ letter-spacing: var(--tracking-wide); text-transform: uppercase;
+ cursor: pointer; transition: var(--transition-fast);
+ }
+ .cost-toggle:hover { border-color: var(--color-primary); color: var(--color-text-accent); }
+ .cost-toggle.active { background: var(--color-primary-muted); border-color: var(--color-primary); color: var(--color-text-accent); }
/* Cart footer (totals + payment) */
.cart-footer {
- flex-shrink: 0;
- border-top: 1px solid var(--color-border);
+ flex-shrink: 0; border-top: 1px solid var(--color-border);
background-color: var(--color-surface-2);
}
+ [data-theme="industrial"] .cart-footer { background-color: #1a1a1a; border-top-color: var(--color-primary-muted); }
- [data-theme="industrial"] .cart-footer {
- background-color: #1a1a1a;
- border-top-color: var(--color-primary-muted);
- }
-
- .totals-block {
- padding: var(--space-3) var(--space-5) var(--space-2);
- }
-
- .totals-row {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: var(--space-1) 0;
- }
-
- .totals-row__label {
- font-size: var(--text-body-sm);
- color: var(--color-text-muted);
- }
-
- .totals-row__value {
- font-family: var(--font-mono);
- font-size: var(--text-body-sm);
- color: var(--color-text-secondary);
- }
-
- .totals-row--total {
- margin-top: var(--space-2);
- padding-top: var(--space-2);
- border-top: 1px solid var(--color-border);
- }
+ .totals-block { padding: var(--space-3) var(--space-5) var(--space-2); }
+ .totals-row { display: flex; justify-content: space-between; align-items: center; padding: var(--space-1) 0; }
+ .totals-row__label { font-size: var(--text-body-sm); color: var(--color-text-muted); }
+ .totals-row__value { font-family: var(--font-mono); font-size: var(--text-body-sm); color: var(--color-text-secondary); }
+ .totals-row--total { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--color-border); }
.totals-row--total .totals-row__label {
- font-family: var(--font-heading);
- font-size: var(--text-body-lg);
- font-weight: var(--heading-weight-primary);
- color: var(--color-text-primary);
- letter-spacing: var(--tracking-wide);
- text-transform: uppercase;
+ font-family: var(--font-heading); font-size: var(--text-body-lg);
+ font-weight: var(--heading-weight-primary); color: var(--color-text-primary);
+ letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
-
.totals-row--total .totals-row__value {
- font-family: var(--font-mono);
- font-size: 1.5rem;
- font-weight: var(--font-weight-bold);
- color: var(--color-primary);
+ font-family: var(--font-mono); font-size: 1.5rem;
+ font-weight: var(--font-weight-bold); color: var(--color-primary);
}
- /* Discount row */
- .discount-row {
- display: flex;
- align-items: center;
- gap: var(--space-3);
- padding: 0 var(--space-5) var(--space-3);
- }
-
- .discount-label {
- font-size: var(--text-caption);
- font-weight: var(--font-weight-semibold);
- color: var(--color-text-muted);
- text-transform: uppercase;
- letter-spacing: var(--tracking-wider);
- white-space: nowrap;
- }
-
- .discount-input {
- flex: 1;
- height: 30px;
- padding: 0 var(--space-3);
- background-color: var(--color-bg-base);
- border: 1px solid var(--color-border);
- border-radius: var(--radius-sm);
- font-family: var(--font-mono);
- font-size: var(--text-body-sm);
- color: var(--color-text-primary);
- outline: none;
- transition: var(--transition-fast);
- }
-
- .discount-input:focus {
- border-color: var(--color-border-focus);
- box-shadow: var(--shadow-focus);
- }
-
- [data-theme="modern"] .discount-input {
- border-radius: var(--radius-md);
- }
-
- .discount-input::placeholder { color: var(--color-text-muted); }
-
- /* Payment method buttons */
- .payment-methods {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: var(--space-2);
- padding: 0 var(--space-5) var(--space-3);
- }
-
- .pay-btn {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 3px;
- padding: var(--space-2) var(--space-2);
- border: 1.5px solid var(--color-border);
- border-radius: var(--radius-sm);
- background: transparent;
- font-family: var(--font-body);
- font-size: var(--text-caption);
- font-weight: var(--font-weight-semibold);
- letter-spacing: var(--tracking-wide);
- text-transform: uppercase;
- color: var(--color-text-muted);
- cursor: pointer;
- transition: var(--transition-fast);
- }
-
- .pay-btn:hover {
- border-color: var(--color-primary);
- color: var(--color-primary);
- background-color: var(--color-primary-muted);
- }
-
- .pay-btn.selected {
- border-color: var(--color-primary);
- background-color: var(--color-primary-muted);
- color: var(--color-primary);
- box-shadow: var(--shadow-accent);
- }
-
- .pay-btn__icon {
- font-size: 1.1rem;
- }
-
- [data-theme="modern"] .pay-btn {
- border-radius: var(--radius-md);
- }
-
- [data-theme="industrial"] .pay-btn {
- clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
- }
-
- /* Main CTA button */
+ /* COBRAR Button */
.btn-cobrar {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: var(--space-3);
- width: calc(100% - var(--space-10));
- margin: 0 var(--space-5) var(--space-3);
- height: 56px;
- background-color: var(--btn-primary-bg);
- border: none;
+ display: flex; align-items: center; justify-content: center; gap: var(--space-3);
+ width: calc(100% - var(--space-10)); margin: var(--space-3) var(--space-5);
+ height: 56px; background-color: var(--btn-primary-bg); border: none;
border-radius: var(--radius-md);
- font-family: var(--font-heading);
- font-size: 1.2rem;
+ font-family: var(--font-heading); font-size: 1.2rem;
font-weight: var(--heading-weight-primary);
- letter-spacing: var(--tracking-widest);
- text-transform: uppercase;
- color: var(--btn-primary-text);
- cursor: pointer;
- transition: var(--transition-fast);
- box-shadow: var(--shadow-md);
- }
-
- .btn-cobrar:hover {
- background-color: var(--btn-primary-bg-hover);
- transform: translateY(-1px);
- box-shadow: var(--shadow-lg);
- }
-
- .btn-cobrar:active {
- background-color: var(--btn-primary-bg-active);
- transform: translateY(0);
- }
-
- .btn-cobrar:disabled {
- opacity: 0.4;
- cursor: not-allowed;
- transform: none;
- }
-
- [data-theme="industrial"] .btn-cobrar {
- clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
- }
-
- [data-theme="modern"] .btn-cobrar {
- border-radius: var(--radius-lg);
+ letter-spacing: var(--tracking-widest); text-transform: uppercase;
+ color: var(--btn-primary-text); cursor: pointer;
+ transition: var(--transition-fast); box-shadow: var(--shadow-md);
}
+ .btn-cobrar:hover { background-color: var(--btn-primary-bg-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
+ .btn-cobrar:active { background-color: var(--btn-primary-bg-active); transform: translateY(0); }
+ .btn-cobrar:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
+ [data-theme="industrial"] .btn-cobrar { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
+ [data-theme="modern"] .btn-cobrar { border-radius: var(--radius-lg); }
/* Secondary actions row */
.secondary-actions {
- display: flex;
- gap: var(--space-2);
- padding: 0 var(--space-5) var(--space-4);
+ display: flex; gap: var(--space-2); padding: 0 var(--space-5) var(--space-4);
}
-
.btn-secondary-action {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: var(--space-1);
- height: 34px;
- border: 1px solid var(--color-border);
- border-radius: var(--radius-sm);
- background: transparent;
- font-family: var(--font-body);
- font-size: var(--text-caption);
- font-weight: var(--font-weight-semibold);
- letter-spacing: var(--tracking-wide);
- text-transform: uppercase;
- color: var(--color-text-muted);
- cursor: pointer;
+ flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--space-1);
+ height: 34px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
+ background: transparent; font-family: var(--font-body); font-size: var(--text-caption);
+ font-weight: var(--font-weight-semibold); letter-spacing: var(--tracking-wide);
+ text-transform: uppercase; color: var(--color-text-muted); cursor: pointer;
transition: var(--transition-fast);
}
-
- .btn-secondary-action:hover {
- border-color: var(--color-border-strong);
- color: var(--color-text-secondary);
- background-color: var(--color-surface-3);
- }
-
- .btn-secondary-action.danger:hover {
- border-color: var(--color-error);
- color: var(--color-error);
- background-color: rgba(239, 68, 68, 0.08);
- }
-
- [data-theme="modern"] .btn-secondary-action {
- border-radius: var(--radius-md);
- }
+ .btn-secondary-action:hover { border-color: var(--color-border-strong); color: var(--color-text-secondary); background-color: var(--color-surface-3); }
+ .btn-secondary-action.danger:hover { border-color: var(--color-error); color: var(--color-error); background-color: rgba(239,68,68,0.08); }
+ [data-theme="modern"] .btn-secondary-action { border-radius: var(--radius-md); }
/* =====================================================================
- NUMPAD OVERLAY
+ F-KEYS FOOTER BAR
===================================================================== */
+ .fkeys-footer {
+ position: fixed; bottom: 0; left: 0; right: 0;
+ background: var(--color-surface-2); border-top: 2px solid var(--color-primary);
+ padding: var(--space-2) var(--space-4);
+ display: flex; align-items: center; justify-content: center; gap: var(--space-1);
+ z-index: var(--z-sticky); box-shadow: var(--shadow-lg);
+ }
+ .fkey {
+ display: flex; align-items: center; gap: var(--space-1);
+ padding: var(--space-2) var(--space-3); background: transparent;
+ border: 1px solid var(--color-border); border-radius: var(--radius-md);
+ cursor: pointer; transition: var(--transition-fast); white-space: nowrap; flex-shrink: 0;
+ }
+ .fkey:hover { background: var(--color-primary-muted); border-color: var(--color-primary); }
+ .fkey:active { background: var(--color-primary); transform: scale(0.96); }
+ .fkey:active .fkey-label { color: var(--color-text-inverse); }
+ .fkey:active .fkey-key { background: rgba(0,0,0,0.2); color: var(--color-text-inverse); border-color: transparent; }
+ .fkey-key {
+ display: inline-flex; align-items: center; justify-content: center;
+ min-width: 28px; height: 22px; padding: 0 var(--space-2);
+ background: var(--color-bg-base); border: 1px solid var(--color-border-strong);
+ border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 11px;
+ font-weight: var(--font-weight-bold); color: var(--color-text-accent); line-height: 1;
+ }
+ .fkey-label {
+ font-size: var(--text-caption); font-weight: var(--font-weight-semibold);
+ color: var(--color-text-secondary);
+ }
+ .fkey-sep { width: 1px; height: 24px; background: var(--color-border); margin: 0 var(--space-1); flex-shrink: 0; }
+ .fkey.highlight {
+ background: var(--color-primary-muted); border-color: var(--color-primary);
+ }
+ .fkey.highlight .fkey-key {
+ background: var(--color-primary); color: var(--color-text-inverse); border-color: var(--color-primary);
+ }
+ .fkey.highlight .fkey-label { color: var(--color-text-accent); font-weight: var(--font-weight-bold); }
- .numpad-overlay {
- position: fixed;
- inset: 0;
- background-color: var(--overlay-backdrop);
- display: flex;
- align-items: flex-end;
- justify-content: center;
+ /* =====================================================================
+ MODAL DE PAGO
+ ===================================================================== */
+ .modal-overlay {
+ position: fixed; inset: 0;
+ background: var(--overlay-backdrop);
+ display: flex; align-items: center; justify-content: center;
z-index: var(--z-modal);
- opacity: 0;
- pointer-events: none;
- transition: opacity var(--duration-normal) var(--ease-in-out);
+ opacity: 0; pointer-events: none;
+ transition: var(--transition-normal);
+ }
+ .modal-overlay.open { opacity: 1; pointer-events: auto; }
+
+ .modal-pago {
+ background: var(--color-bg-elevated); border: 1px solid var(--color-border);
+ border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
+ width: 560px; max-width: 95vw; max-height: 90vh; overflow-y: auto;
+ transform: translateY(20px); transition: var(--transition-normal);
+ }
+ .modal-overlay.open .modal-pago { transform: translateY(0); }
+
+ .modal-header {
+ display: flex; align-items: center; justify-content: space-between;
+ padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--color-border);
+ }
+ .modal-header h3 {
+ font-family: var(--font-heading); font-size: var(--text-h4);
+ font-weight: var(--heading-weight-primary); color: var(--color-text-primary);
+ }
+ .modal-close {
+ width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
+ background: transparent; border: 1px solid var(--color-border);
+ border-radius: var(--radius-md); cursor: pointer;
+ color: var(--color-text-muted); font-size: 18px; transition: var(--transition-fast);
+ }
+ .modal-close:hover { background: var(--color-surface-2); color: var(--color-text-primary); }
+
+ .total-banner {
+ background: var(--color-primary-muted); border-bottom: 2px solid var(--color-primary);
+ padding: var(--space-4) var(--space-6);
+ display: flex; align-items: center; justify-content: space-between;
+ }
+ .total-label {
+ font-size: var(--text-body); font-weight: var(--font-weight-semibold);
+ color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: var(--tracking-wide);
+ }
+ .total-amount {
+ font-family: var(--font-mono); font-size: var(--text-h3);
+ font-weight: var(--font-weight-bold); color: var(--color-text-accent);
}
- .numpad-overlay.visible {
- opacity: 1;
- pointer-events: all;
+ .items-summary {
+ padding: var(--space-3) var(--space-6); border-bottom: 1px solid var(--color-border);
+ font-size: var(--text-body-sm); color: var(--color-text-muted); display: flex; gap: var(--space-4);
}
- .numpad-panel {
- width: 360px;
- background-color: var(--color-surface-2);
- border: 1px solid var(--color-border-strong);
- border-bottom: none;
- border-radius: var(--radius-lg) var(--radius-lg) 0 0;
- padding: var(--space-5);
- transform: translateY(100%);
- transition: transform var(--duration-normal) var(--ease-out);
+ .pago-tabs {
+ display: flex; border-bottom: 2px solid var(--color-border); padding: 0 var(--space-6);
}
-
- .numpad-overlay.visible .numpad-panel {
- transform: translateY(0);
+ .pago-tab {
+ padding: var(--space-3) var(--space-5); font-family: var(--font-body);
+ font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold);
+ background: transparent; border: none; color: var(--color-text-muted);
+ cursor: pointer; border-bottom: 2px solid transparent;
+ margin-bottom: -2px; transition: var(--transition-fast);
+ display: flex; align-items: center; gap: var(--space-2);
}
+ .pago-tab:hover { color: var(--color-text-primary); }
+ .pago-tab.active { color: var(--color-text-accent); border-bottom-color: var(--color-primary); }
- [data-theme="industrial"] .numpad-panel {
- border-radius: var(--radius-sm) var(--radius-sm) 0 0;
- background-color: #1e1e1e;
- border-color: var(--color-primary-muted);
+ .tab-content { padding: var(--space-6); display: none; }
+ .tab-content.active { display: block; }
+
+ .form-group { margin-bottom: var(--space-4); }
+ .form-label {
+ display: block; font-size: var(--text-caption); font-weight: var(--font-weight-semibold);
+ color: var(--color-text-secondary); margin-bottom: var(--space-2);
+ text-transform: uppercase; letter-spacing: var(--tracking-wide);
}
-
- .numpad-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: var(--space-4);
- }
-
- .numpad-title {
- font-family: var(--font-heading);
- font-size: var(--text-h6);
- font-weight: var(--heading-weight-primary);
- text-transform: uppercase;
- letter-spacing: var(--tracking-widest);
- color: var(--color-text-primary);
- }
-
- .numpad-close {
- width: 28px;
- height: 28px;
- border: 1px solid var(--color-border);
- border-radius: var(--radius-full);
- background: transparent;
- color: var(--color-text-muted);
- font-size: 1rem;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
+ .form-input {
+ width: 100%; padding: var(--space-3) var(--space-4);
+ font-family: var(--font-body); font-size: var(--text-body);
+ background: var(--color-bg-base); color: var(--color-text-primary);
+ border: 1px solid var(--color-border); border-radius: var(--radius-md);
transition: var(--transition-fast);
}
-
- .numpad-close:hover {
- border-color: var(--color-error);
- color: var(--color-error);
+ .form-input:focus { outline: none; border-color: var(--color-border-focus); box-shadow: var(--shadow-focus); }
+ .form-input-lg {
+ font-family: var(--font-mono); font-size: var(--text-h3);
+ font-weight: var(--font-weight-bold); text-align: right;
+ padding: var(--space-4) var(--space-5);
}
- .numpad-display {
- background-color: var(--color-bg-base);
- border: 1px solid var(--color-border);
- border-radius: var(--radius-sm);
+ .cambio-display {
+ background: var(--color-surface-2); border: 1px solid var(--color-border);
+ border-radius: var(--radius-md); padding: var(--space-4) var(--space-5);
+ display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-4);
+ }
+ .cambio-label { font-size: var(--text-body-sm); color: var(--color-text-secondary); font-weight: var(--font-weight-semibold); }
+ .cambio-amount { font-family: var(--font-mono); font-size: var(--text-h4); font-weight: var(--font-weight-bold); }
+ .cambio-amount.positive { color: var(--color-success); }
+ .cambio-amount.negative { color: var(--color-error); }
+
+ .quick-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); margin-top: var(--space-3); }
+ .quick-btn {
+ padding: var(--space-2) var(--space-3); font-family: var(--font-mono); font-size: var(--text-body-sm);
+ font-weight: var(--font-weight-semibold); background: var(--color-surface-2);
+ color: var(--color-text-primary); border: 1px solid var(--color-border);
+ border-radius: var(--radius-md); cursor: pointer; transition: var(--transition-fast); text-align: center;
+ }
+ .quick-btn:hover { background: var(--color-primary-muted); border-color: var(--color-primary); }
+
+ .split-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-3); align-items: end; margin-bottom: var(--space-3); }
+ .split-method {
+ padding: var(--space-2) var(--space-3); font-size: var(--text-body-sm);
+ font-weight: var(--font-weight-semibold); background: var(--color-surface-2);
+ color: var(--color-text-secondary); border-radius: var(--radius-md);
+ text-align: center; border: 1px solid var(--color-border);
+ }
+ .split-remaining {
+ background: var(--color-surface-2); border-radius: var(--radius-md);
padding: var(--space-3) var(--space-4);
- font-family: var(--font-mono);
- font-size: 1.8rem;
- font-weight: var(--font-weight-bold);
- color: var(--color-primary);
- text-align: right;
- margin-bottom: var(--space-4);
- min-height: 60px;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- letter-spacing: var(--tracking-wide);
+ display: flex; align-items: center; justify-content: space-between;
+ font-size: var(--text-body-sm); margin-top: var(--space-3);
+ }
+ .split-remaining .amount { font-family: var(--font-mono); font-weight: var(--font-weight-bold); color: var(--color-text-accent); }
+
+ .cfdi-check {
+ display: flex; align-items: center; gap: var(--space-3);
+ padding: var(--space-4) var(--space-6); border-top: 1px solid var(--color-border);
+ background: var(--color-surface-1);
+ }
+ .cfdi-check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--color-primary); cursor: pointer; }
+ .cfdi-check label { font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-secondary); cursor: pointer; }
+ .cfdi-check .cfdi-hint { font-size: var(--text-caption); color: var(--color-text-muted); margin-left: auto; }
+
+ .modal-footer {
+ padding: var(--space-4) var(--space-6); border-top: 1px solid var(--color-border);
+ display: flex; gap: var(--space-3); justify-content: flex-end;
}
- .numpad-grid {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: var(--space-2);
+ .btn {
+ display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
+ padding: var(--space-3) var(--space-6); font-family: var(--font-body); font-size: var(--text-body);
+ font-weight: var(--font-weight-semibold); line-height: 1;
+ border: 2px solid transparent; border-radius: var(--radius-md);
+ cursor: pointer; transition: var(--transition-fast); white-space: nowrap;
}
+ .btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
+ .btn:active { transform: scale(0.97); }
+ .btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
+ .btn-primary:hover { background: var(--btn-primary-bg-hover); }
+ .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
+ .btn-ghost { background: transparent; color: var(--color-text-muted); border-color: var(--color-border); }
+ .btn-ghost:hover { background: var(--color-surface-2); }
+ .btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-body-lg); }
- .numpad-key {
- height: 52px;
- border: 1px solid var(--color-border);
- border-radius: var(--radius-sm);
- background-color: var(--color-surface-3);
- font-family: var(--font-mono);
- font-size: 1.1rem;
- font-weight: var(--font-weight-semibold);
- color: var(--color-text-primary);
- cursor: pointer;
- transition: var(--transition-fast);
- display: flex;
- align-items: center;
- justify-content: center;
+ .ref-field { display: flex; gap: var(--space-3); align-items: end; }
+ .ref-field .form-group { flex: 1; }
+ .form-hint { font-size: var(--text-caption); color: var(--color-text-muted); margin-top: var(--space-1); }
+ .status-indicator {
+ display: flex; align-items: center; gap: var(--space-2);
+ padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
+ font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold);
}
+ .status-indicator.pending { background: var(--color-warning-light); color: var(--color-warning-dark); }
+ .status-indicator.confirmed { background: var(--color-success-light); color: var(--color-success-dark); }
- .numpad-key:hover {
- background-color: var(--color-primary-muted);
- border-color: var(--color-primary);
- color: var(--color-primary);
+ .terminal-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
+ .terminal-card {
+ padding: var(--space-4); background: var(--color-surface-2); border: 2px solid var(--color-border);
+ border-radius: var(--radius-md); cursor: pointer; transition: var(--transition-fast); text-align: center;
}
+ .terminal-card:hover { border-color: var(--color-primary); }
+ .terminal-card.selected { border-color: var(--color-primary); background: var(--color-primary-muted); }
+ .terminal-card .terminal-name { font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); }
+ .terminal-card .terminal-type { font-size: var(--text-caption); color: var(--color-text-muted); margin-top: var(--space-1); }
- .numpad-key:active {
- transform: scale(0.95);
+ /* =====================================================================
+ MODAL CONFIRMACION
+ ===================================================================== */
+ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
+ @keyframes scaleIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
+ @keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
+ @keyframes scaleOut { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(0.92); } }
+
+ .confirm-overlay {
+ position: fixed; inset: 0; background: var(--overlay-backdrop);
+ z-index: calc(var(--z-modal) + 1); display: none; animation: fadeIn 0.2s ease-out forwards;
}
+ .confirm-overlay.active { display: block; }
+ .confirm-overlay.closing { animation: fadeOut 0.2s ease-in forwards; }
- .numpad-key.key-0 { grid-column: span 2; }
-
- .numpad-key.key-clear {
- background-color: rgba(239, 68, 68, 0.1);
- border-color: rgba(239, 68, 68, 0.3);
- color: var(--color-error);
+ .confirm-dialog {
+ position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
+ z-index: calc(var(--z-modal) + 2);
+ background: var(--color-bg-elevated); border: 1px solid var(--color-border);
+ border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
+ width: 90%; max-width: 420px; padding: var(--space-6); text-align: center;
+ display: none; animation: scaleIn 0.25s ease-out forwards;
}
+ .confirm-dialog.active { display: block; }
+ .confirm-dialog.closing { animation: scaleOut 0.2s ease-in forwards; }
- .numpad-key.key-enter {
- background-color: var(--color-primary);
- border-color: var(--color-primary);
- color: var(--color-text-inverse);
- font-family: var(--font-heading);
- font-size: 0.85rem;
- letter-spacing: var(--tracking-wider);
- text-transform: uppercase;
+ .modal__icon {
+ width: 56px; height: 56px; border-radius: var(--radius-full);
+ display: flex; align-items: center; justify-content: center;
+ font-size: 26px; margin: 0 auto var(--space-4);
}
-
- [data-theme="industrial"] .numpad-key.key-enter { color: #000; }
-
- .numpad-key.key-enter:hover {
- background-color: var(--color-primary-hover);
+ .modal__icon--warning { background: var(--color-warning-light); }
+ .modal__title {
+ font-family: var(--font-heading); font-size: var(--text-h4);
+ font-weight: var(--heading-weight-primary); color: var(--color-text-primary); margin-bottom: var(--space-2);
}
+ .modal__desc {
+ font-size: var(--text-body-sm); color: var(--color-text-muted);
+ line-height: 1.6; margin-bottom: var(--space-6); padding: 0 var(--space-2);
+ }
+ .modal__actions { display: flex; gap: var(--space-3); justify-content: center; }
+ .modal__btn {
+ flex: 1; max-width: 180px; padding: var(--space-3) var(--space-4);
+ font-family: var(--font-body); font-size: var(--text-body-sm); font-weight: 600;
+ border-radius: var(--radius-md); cursor: pointer; transition: var(--transition-fast);
+ border: 1px solid transparent;
+ }
+ .modal__btn--secondary {
+ background: var(--btn-secondary-bg); color: var(--btn-secondary-text); border-color: var(--btn-secondary-border);
+ }
+ .modal__btn--secondary:hover { background: var(--btn-secondary-bg-hover); }
+ .modal__btn--danger {
+ background: var(--btn-danger-bg, var(--color-error)); color: var(--btn-danger-text, #fff);
+ border-color: var(--btn-danger-bg, var(--color-error));
+ }
+ .modal__btn--danger:hover { opacity: 0.9; }
- [data-theme="modern"] .numpad-key {
- border-radius: var(--radius-md);
+ /* =====================================================================
+ TICKET TERMICO (hidden, for print)
+ ===================================================================== */
+ .ticket-print-area { display: none; }
+
+ .ticket {
+ background: #ffffff; color: #000000;
+ font-family: 'Courier New', 'Consolas', monospace;
+ font-size: 11px; line-height: 1.4; padding: 12px; text-align: left;
+ border: 1px dashed #ccc;
+ }
+ .ticket-80 { width: 302px; }
+ .ticket .store-name { font-size: 14px; font-weight: bold; text-align: center; margin-bottom: 2px; }
+ .ticket .store-tagline { font-size: 9px; text-align: center; color: #555; margin-bottom: 4px; }
+ .ticket .store-info { font-size: 9px; text-align: center; color: #333; margin-bottom: 6px; line-height: 1.3; }
+ .ticket .divider { border: none; border-top: 1px dashed #999; margin: 6px 0; }
+ .ticket .divider-double { border: none; border-top: 2px solid #333; margin: 6px 0; }
+ .ticket .ticket-row { display: flex; justify-content: space-between; }
+ .ticket .folio-line { font-size: 10px; font-weight: bold; display: flex; justify-content: space-between; margin-bottom: 4px; }
+ .ticket .total-section { margin-top: 4px; }
+ .ticket .total-line { display: flex; justify-content: space-between; font-size: 11px; }
+ .ticket .total-line.grand { font-size: 14px; font-weight: bold; margin-top: 2px; padding-top: 2px; border-top: 1px solid #333; }
+ .ticket .payment-section { margin-top: 4px; font-size: 10px; }
+ .ticket .footer-section { text-align: center; margin-top: 8px; font-size: 9px; color: #555; }
+ .ticket .footer-section .thanks { font-size: 11px; font-weight: bold; color: #000; margin-bottom: 2px; }
+ .ticket-80 .item-line-wide {
+ display: grid; grid-template-columns: auto 1fr auto auto;
+ gap: 8px; align-items: baseline; font-size: 10px; margin-bottom: 3px;
+ }
+ .ticket-80 .item-line-wide .qty { font-weight: bold; min-width: 24px; text-align: right; }
+ .ticket-80 .item-line-wide .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .ticket-80 .item-line-wide .price { text-align: right; min-width: 55px; }
+ .ticket-80 .item-line-wide .subtotal { text-align: right; font-weight: bold; min-width: 60px; }
+
+ @media print {
+ body * { display: none !important; }
+ .ticket-print-area, .ticket-print-area * { display: block !important; }
+ .ticket-print-area { position: fixed; top: 0; left: 0; }
+ .ticket { border: none; box-shadow: none; padding: 4px; }
+ .ticket .item-line-wide { display: grid !important; }
+ .ticket .ticket-row, .ticket .folio-line, .ticket .total-line { display: flex !important; }
}
/* =====================================================================
TOAST NOTIFICATION
===================================================================== */
-
.toast-container {
- position: fixed;
- bottom: var(--space-6);
- left: 50%;
- transform: translateX(-50%);
- z-index: var(--z-toast);
- display: flex;
- flex-direction: column;
- gap: var(--space-2);
- pointer-events: none;
+ position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
+ z-index: var(--z-toast); display: flex; flex-direction: column;
+ gap: var(--space-2); pointer-events: none;
}
-
.toast {
padding: var(--space-3) var(--space-5);
- background-color: var(--color-surface-3);
- border: 1px solid var(--color-border);
- border-left: 3px solid var(--color-primary);
- border-radius: var(--radius-md);
- font-size: var(--text-body-sm);
- font-weight: var(--font-weight-semibold);
- color: var(--color-text-primary);
- box-shadow: var(--shadow-lg);
- white-space: nowrap;
+ background-color: var(--color-surface-3); border: 1px solid var(--color-border);
+ border-left: 3px solid var(--color-primary); border-radius: var(--radius-md);
+ font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold);
+ color: var(--color-text-primary); box-shadow: var(--shadow-lg); white-space: nowrap;
animation: toast-in 0.25s ease, toast-out 0.3s ease 1.7s forwards;
}
-
- @keyframes toast-in {
- from { opacity: 0; transform: translateY(10px); }
- to { opacity: 1; transform: translateY(0); }
- }
-
- @keyframes toast-out {
- from { opacity: 1; transform: translateY(0); }
- to { opacity: 0; transform: translateY(-6px); }
- }
+ @keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
+ @keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-6px); } }
/* =====================================================================
- RESPONSIVE — tablet/small desktop
+ RESPONSIVE
===================================================================== */
-
@media (max-width: 900px) {
- .pos-main {
- flex-direction: column;
- }
-
- .panel-products,
- .panel-cart {
- width: 100%;
- min-width: 0;
- }
-
- .panel-products {
- border-right: none;
- border-bottom: 1px solid var(--color-border);
- max-height: 55%;
- }
-
- .panel-cart {
- max-height: 45%;
- }
-
- .product-grid {
- grid-template-columns: repeat(2, 1fr);
- }
-
+ .pos-main { flex-direction: column; }
+ .panel-products, .panel-cart { width: 100%; min-width: 0; }
+ .panel-products { border-right: none; border-bottom: 1px solid var(--color-border); max-height: 55%; }
+ .panel-cart { max-height: 45%; }
+ .product-grid { grid-template-columns: repeat(2, 1fr); }
.status-bar__center { display: none; }
+ .fkeys-footer { flex-wrap: wrap; }
}
- @media (max-width: 600px) {
- .product-grid {
- grid-template-columns: repeat(2, 1fr);
- }
-
- .payment-methods {
- grid-template-columns: repeat(3, 1fr);
- }
-
- .status-bar { padding: 0 var(--space-3); }
- .search-row { padding: var(--space-3); }
- .categories-row { padding: var(--space-2) var(--space-3); }
+ @media (max-width: 768px) {
+ .fkeys-footer { flex-wrap: wrap; gap: var(--space-1); padding: var(--space-2); }
+ .fkey { padding: var(--space-1) var(--space-2); }
+ .fkey-label { font-size: 10px; }
+ .fkey-key { min-width: 24px; height: 20px; font-size: 10px; }
+ .fkey-sep { display: none; }
}
- /* =====================================================================
- UTILITY
- ===================================================================== */
-
.sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- padding: 0;
- margin: -1px;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- border: 0;
+ position: absolute; width: 1px; height: 1px; padding: 0;
+ margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
+
+ /* Add padding at bottom so content isn't hidden by fixed fkeys bar */
+ body { padding-bottom: 50px; }
-
+
-
-
-
-
-
-
HR
-
Hugo Reyes
+
--
+
Empleado