/* ─── Punto de Venta (pos-*) ──────────────────────────────────────────────── */
:root {
    --pos-surface:   rgba(255,255,255,0.9);
    --pos-border:    rgba(0,0,0,0.07);
    --pos-text:      #1a1a1a;
    --pos-soft:      #5c6b7e;
    --pos-radius:    16px;
    --pos-green:     #059669;
    --pos-red:       #ba1a1a;
}
.dark {
    --pos-surface:   rgba(28,28,28,0.94);
    --pos-border:    rgba(255,255,255,0.1);
    --pos-text:      #ededed;
    --pos-soft:      #8097b0;
    --pos-green:     #34d399;
    --pos-red:       #ffb4ab;
}

.pos-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: start;
}

/* ── Columna principal ── */
.pos-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.pos-search-bar {
    display: flex; align-items: center; gap: 10px;
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: 14px; padding: 4px 8px 4px 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.pos-search-ico { color: var(--wk-primary); font-size: 24px; flex-shrink: 0; }
.pos-search-input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 16px; font-family: inherit; color: var(--pos-text); padding: 12px 0;
}
.pos-search-clear {
    width: 34px; height: 34px; border-radius: 9px; border: none; cursor: pointer;
    background: transparent; color: var(--pos-soft); display: flex; align-items: center; justify-content: center;
}
.pos-search-clear:hover { background: rgba(186,26,26,0.08); color: var(--pos-red); }

/* ── Resultados de búsqueda ── */
.pos-results {
    background: var(--pos-surface); border: 1px solid var(--pos-border);
    border-radius: 14px; overflow: hidden; max-height: 320px; overflow-y: auto;
}
.pos-result {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 16px; border: none; cursor: pointer; background: transparent;
    border-bottom: 1px solid var(--pos-border); text-align: left; transition: background .12s;
}
.pos-result:last-child { border-bottom: none; }
.pos-result:hover:not(:disabled) { background: rgba(var(--wk-primary-rgb),0.07); }
.pos-result:disabled { opacity: .5; cursor: not-allowed; }
.pos-result-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pos-result-name { font-size: 14px; font-weight: 700; color: var(--pos-text); }
.pos-result-meta { font-size: 11.5px; color: var(--pos-soft); display: flex; align-items: center; gap: 8px; }
.pos-result-price { font-size: 15px; font-weight: 800; color: var(--wk-primary); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pos-stock { font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.pos-stock.ok  { background: rgba(16,185,129,.14); color: #047857; }
.pos-stock.low { background: rgba(245,158,11,.18); color: #b45309; }
.pos-stock.out { background: rgba(220,38,38,.14);  color: #b91c1c; }
.pos-stock.svc { background: rgba(var(--wk-primary-rgb),.12); color: var(--pos-text); }
.pos-empty-results { padding: 22px; text-align: center; color: var(--pos-soft); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ── Carrito ── */
.pos-cart {
    background: var(--pos-surface); border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius); overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}
.pos-cart-head {
    display: flex; align-items: center; gap: 10px; padding: 14px 18px;
    border-bottom: 1px solid var(--pos-border); font-weight: 800; color: var(--pos-text); font-size: 15px;
}
.pos-cart-head .material-symbols-outlined { color: var(--wk-primary); }
.pos-cart-count {
    background: rgba(var(--wk-primary-rgb),0.12); color: var(--wk-primary);
    border-radius: 999px; min-width: 24px; height: 22px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.pos-cart-clear {
    margin-left: auto; border: none; background: transparent; color: var(--pos-soft);
    font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.pos-cart-clear:hover { color: var(--pos-red); }

.pos-cart-empty { padding: 48px 24px; text-align: center; color: var(--pos-soft); }
.pos-cart-empty .material-symbols-outlined { font-size: 44px; opacity: .4; }
.pos-cart-empty p { font-size: 13.5px; margin: 10px 0 0; }

.pos-cart-list { display: flex; flex-direction: column; }
.pos-line {
    display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px;
    padding: 12px 18px; border-bottom: 1px solid var(--pos-border);
}
.pos-line:last-child { border-bottom: none; }
.pos-line.warn { background: rgba(220,38,38,0.05); }
.pos-line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pos-line-name { font-size: 14px; font-weight: 700; color: var(--pos-text); }

/* Editor de precio por línea — chip claramente editable */
.pos-price-edit {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; cursor: text;
    padding: 4px 8px; border-radius: 9px;
    border: 1.5px solid rgba(var(--wk-primary-rgb),0.35);
    background: rgba(var(--wk-primary-rgb),0.07);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.pos-price-edit:hover { background: rgba(var(--wk-primary-rgb),0.12); }
.pos-price-edit:focus-within {
    border-color: var(--wk-primary);
    box-shadow: 0 0 0 3px rgba(var(--wk-primary-rgb),0.18);
    background: rgba(var(--wk-primary-rgb),0.1);
}
.pos-price-cur { font-size: 13px; font-weight: 800; color: var(--wk-primary); }
.pos-price-input {
    width: 58px; padding: 0; border: none; outline: none; background: transparent;
    color: var(--pos-text); font-size: 14px; font-weight: 800;
    text-align: right; font-variant-numeric: tabular-nums; font-family: inherit;
}
.pos-price-uxu { font-size: 10.5px; font-weight: 600; color: var(--pos-soft); }
.pos-price-pencil { font-size: 14px !important; color: var(--wk-primary); opacity: .55; margin-left: 1px; }
.pos-price-edit:focus-within .pos-price-pencil { opacity: 1; }

.pos-price-edit.err {
    border-color: rgba(186,26,26,0.55);
    background: rgba(186,26,26,0.06);
}
.pos-price-edit.err .pos-price-cur,
.pos-price-edit.err .pos-price-pencil { color: var(--pos-red); }
.pos-line-stockwarn { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800; color: var(--pos-red); }
.pos-line-stockwarn .material-symbols-outlined { font-size: 13px; }

.pos-line-qty { display: flex; align-items: center; gap: 4px; }
.pos-qty-btn {
    width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--pos-border); background: transparent; color: var(--pos-text);
    display: flex; align-items: center; justify-content: center;
}
.pos-qty-btn:hover { background: rgba(var(--wk-primary-rgb),0.1); color: var(--wk-primary); }
.pos-qty-btn .material-symbols-outlined { font-size: 16px; }
.pos-qty-input {
    width: 48px; text-align: center; border: 1px solid var(--pos-border); border-radius: 8px;
    padding: 5px 4px; font-size: 14px; font-weight: 700; background: transparent; color: var(--pos-text);
    -moz-appearance: textfield;
}
.pos-qty-input::-webkit-outer-spin-button, .pos-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pos-line-total { font-size: 14.5px; font-weight: 800; color: var(--pos-text); min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.pos-line-del { width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: var(--pos-soft); cursor: pointer; }
.pos-line-del:hover { background: rgba(186,26,26,0.08); color: var(--pos-red); }
.pos-line-del .material-symbols-outlined { font-size: 18px; }

/* ── Panel de cobro ── */
.pos-pay { position: sticky; top: 88px; }
.pos-pay-card {
    background: var(--pos-surface); border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius); padding: 18px; box-shadow: 0 8px 28px rgba(0,0,0,0.07);
    display: flex; flex-direction: column; gap: 16px;
}
.pos-pay-title { font-size: 17px; font-weight: 800; color: var(--pos-text); font-family: 'Manrope', sans-serif; }

.pos-pay-totals { display: flex; flex-direction: column; gap: 7px; }
.pos-pay-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--pos-soft); }
.pos-pay-row span:last-child { font-variant-numeric: tabular-nums; }
.pos-pay-total {
    display: flex; justify-content: space-between; align-items: baseline;
    border-top: 1px dashed var(--pos-border); padding-top: 10px; margin-top: 4px;
}
.pos-pay-total span:first-child { font-size: 14px; font-weight: 700; color: var(--pos-text); }
.pos-pay-total span:last-child { font-size: 26px; font-weight: 900; color: var(--wk-primary); font-variant-numeric: tabular-nums; font-family: 'Manrope', sans-serif; }

.pos-pay-section { display: flex; flex-direction: column; gap: 7px; }
.pos-pay-label { font-size: 12.5px; font-weight: 700; color: var(--pos-soft); }
.pos-pay-input {
    border: 1px solid var(--pos-border); border-radius: 10px; padding: 10px 12px;
    font-size: 14px; font-family: inherit; background: transparent; color: var(--pos-text); outline: none;
}
.pos-pay-input:focus { border-color: rgba(var(--wk-primary-rgb),0.5); box-shadow: 0 0 0 3px rgba(var(--wk-primary-rgb),0.12); }
.pos-pay-input.money { font-size: 18px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

.pos-pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pos-method {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px; border-radius: 11px; cursor: pointer; font-family: inherit;
    border: 1px solid var(--pos-border); background: transparent; color: var(--pos-soft);
    font-size: 13.5px; font-weight: 700; transition: all .15s;
}
.pos-method .material-symbols-outlined { font-size: 19px; }
.pos-method:hover { border-color: rgba(var(--wk-primary-rgb),0.35); }
.pos-method.on { background: rgba(var(--wk-primary-rgb),0.1); border-color: rgba(var(--wk-primary-rgb),0.45); color: var(--wk-primary); }

.pos-pay-change {
    display: flex; justify-content: space-between; align-items: baseline;
    background: rgba(5,150,105,0.08); border: 1px solid rgba(5,150,105,0.18);
    border-radius: 10px; padding: 9px 12px;
}
.pos-pay-change span:first-child { font-size: 12.5px; font-weight: 700; color: var(--pos-soft); }
.pos-pay-change span:last-child { font-size: 18px; font-weight: 900; color: var(--pos-green); font-variant-numeric: tabular-nums; }
.pos-pay-change.neg { background: rgba(186,26,26,0.06); border-color: rgba(186,26,26,0.16); }
.pos-pay-change.neg span:last-child { color: var(--pos-red); }
.pos-pay-falta { font-size: 12px; font-weight: 700; color: var(--pos-red); text-align: right; }

.pos-pay-error {
    display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
    background: rgba(186,26,26,0.07); border: 1px solid rgba(186,26,26,0.18); color: var(--pos-red);
    padding: 10px 12px; border-radius: 10px;
}
.pos-pay-error .material-symbols-outlined { font-size: 17px; flex-shrink: 0; }

.pos-pay-result {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
    border: 1px solid var(--pos-border);
}
.pos-pay-result .material-symbols-outlined { font-size: 24px; }
.pos-pay-result.ok { background: rgba(5,150,105,0.08); border-color: rgba(5,150,105,0.2); }
.pos-pay-result.ok .material-symbols-outlined { color: var(--pos-green); }
.pos-pay-result.err { background: rgba(186,26,26,0.06); border-color: rgba(186,26,26,0.18); }
.pos-pay-result.err .material-symbols-outlined { color: var(--pos-red); }
.pos-pay-result.pending .material-symbols-outlined { color: var(--wk-primary); }
.pos-pay-result-estado { font-size: 13px; font-weight: 800; color: var(--pos-text); }
.pos-pay-result-nc { font-size: 11px; color: var(--pos-soft); }

.pos-pay-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 15px; border-radius: 13px; border: none; cursor: pointer; font-family: inherit;
    background: linear-gradient(135deg, var(--wk-primary), var(--wk-primary-strong));
    color: var(--wk-on-primary); font-size: 16px; font-weight: 800;
    box-shadow: 0 6px 18px rgba(var(--wk-primary-rgb),0.3); transition: all .2s;
}
.pos-pay-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.pos-pay-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.pos-pay-btn .material-symbols-outlined { font-size: 22px; }

.pos-spin {
    width: 17px; height: 17px; border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff; border-radius: 50%; animation: pos-spin .7s linear infinite;
}
@keyframes pos-spin { to { transform: rotate(360deg); } }
.pos-spin.big { width: 34px; height: 34px; border-width: 3px; border-color: rgba(var(--wk-primary-rgb),0.25); border-top-color: var(--wk-primary); }

/* ── Abrir caja ── */
.pos-abrir-wrap { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.pos-abrir-card {
    width: 100%; max-width: 420px; text-align: center;
    background: var(--pos-surface); border: 1px solid var(--pos-border);
    border-radius: 20px; padding: 32px 28px; box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    display: flex; flex-direction: column; gap: 12px;
}
.pos-abrir-icon {
    width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 4px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(var(--wk-primary-rgb),0.1); border: 1px solid rgba(var(--wk-primary-rgb),0.2);
}
.pos-abrir-icon .material-symbols-outlined { font-size: 30px; color: var(--wk-primary); }
.pos-abrir-title { font-size: 20px; font-weight: 800; color: var(--pos-text); font-family: 'Manrope', sans-serif; }
.pos-abrir-sub { font-size: 13px; color: var(--pos-soft); line-height: 1.5; margin-bottom: 4px; }
.pos-abrir-label { font-size: 12.5px; font-weight: 700; color: var(--pos-soft); text-align: left; }
.pos-abrir-field {
    display: flex; align-items: center; gap: 6px; padding: 10px 14px;
    border: 1.5px solid var(--pos-border); border-radius: 12px; background: transparent;
    transition: border-color .15s, box-shadow .15s;
}
.pos-abrir-field:focus-within { border-color: var(--wk-primary); box-shadow: 0 0 0 3px rgba(var(--wk-primary-rgb),0.15); }
.pos-abrir-field > span { font-size: 18px; font-weight: 800; color: var(--wk-primary); }
.pos-abrir-field input {
    flex: 1; border: none; outline: none; background: transparent; color: var(--pos-text);
    font-size: 20px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; font-family: inherit;
}

/* ── Banner de turno ── */
.pos-turno-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    background: var(--pos-surface); border: 1px solid var(--pos-border);
    border-left: 4px solid var(--wk-primary);
    border-radius: 14px; padding: 12px 18px; margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.pos-turno-info { display: flex; align-items: center; gap: 12px; }
.pos-turno-info .material-symbols-outlined { font-size: 26px; color: var(--wk-primary); }
.pos-turno-title { font-size: 14.5px; font-weight: 800; color: var(--pos-text); }
.pos-turno-meta { font-size: 12px; color: var(--pos-soft); }
.pos-turno-stats { display: flex; align-items: center; gap: 18px; }
.pos-turno-stat { display: flex; flex-direction: column; align-items: flex-end; }
.pos-turno-stat span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--pos-soft); }
.pos-turno-stat strong { font-size: 16px; font-weight: 900; color: var(--pos-text); font-variant-numeric: tabular-nums; }
.pos-turno-close {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 11px;
    border: 1px solid rgba(186,26,26,0.25); background: rgba(186,26,26,0.05); color: var(--pos-red);
    font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all .15s;
}
.pos-turno-close:hover { background: rgba(186,26,26,0.1); }
.pos-turno-close .material-symbols-outlined { font-size: 18px; }

/* ── Modal cierre (arqueo) ── */
.pos-modal-bg {
    position: fixed; inset: 0; z-index: 600; padding: 24px;
    background: rgba(11,28,48,0.45); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}
.pos-modal {
    width: 100%; max-width: 440px; max-height: calc(100vh - 48px); overflow-y: auto;
    background: var(--pos-surface); border: 1px solid var(--pos-border);
    border-radius: 18px; padding: 22px; box-shadow: 0 24px 64px rgba(0,0,0,.25);
    display: flex; flex-direction: column; gap: 14px;
}
.pos-modal-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; color: var(--pos-text); font-family: 'Manrope', sans-serif; }
.pos-modal-title .material-symbols-outlined { color: var(--wk-primary); }

.pos-arqueo { display: flex; flex-direction: column; gap: 6px; background: rgba(70,68,61,0.03); border: 1px solid var(--pos-border); border-radius: 12px; padding: 12px 14px; }
.dark .pos-arqueo { background: rgba(255,255,255,0.02); }
.pos-arqueo-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--pos-soft); }
.pos-arqueo-row span:last-child { font-variant-numeric: tabular-nums; color: var(--pos-text); font-weight: 600; }
.pos-arqueo-row.sub { border-top: 1px dashed var(--pos-border); padding-top: 6px; margin-top: 2px; font-weight: 700; }
.pos-arqueo-row.sub span { color: var(--pos-text); font-weight: 800; }
.pos-arqueo-row.esperado span:last-child { color: var(--wk-primary); font-weight: 900; }

.pos-modal-field { display: flex; flex-direction: column; gap: 6px; }
.pos-modal-field label { font-size: 12.5px; font-weight: 700; color: var(--pos-soft); }
.pos-obs {
    border: 1px solid var(--pos-border); border-radius: 10px; padding: 9px 12px; resize: vertical;
    background: transparent; color: var(--pos-text); font-size: 13.5px; font-family: inherit; outline: none;
}
.pos-obs:focus { border-color: rgba(var(--wk-primary-rgb),0.5); box-shadow: 0 0 0 3px rgba(var(--wk-primary-rgb),0.12); }

.pos-arqueo-dif {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 11px 14px; border-radius: 12px; border: 1px solid var(--pos-border);
}
.pos-arqueo-dif span:first-child { font-size: 12.5px; font-weight: 700; color: var(--pos-soft); text-transform: uppercase; letter-spacing: .05em; }
.pos-arqueo-dif span:last-child { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--pos-text); }
.pos-arqueo-dif.neg { background: rgba(186,26,26,0.06); border-color: rgba(186,26,26,0.2); }
.pos-arqueo-dif.neg span { color: var(--pos-red); }
.pos-arqueo-dif.pos { background: rgba(5,150,105,0.07); border-color: rgba(5,150,105,0.2); }
.pos-arqueo-dif.pos span { color: var(--pos-green); }

.pos-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.pos-btn-light {
    padding: 11px 18px; border-radius: 11px; border: 1px solid var(--pos-border); background: transparent;
    color: var(--pos-soft); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.pos-btn-light:hover { color: var(--pos-text); background: rgba(70,68,61,0.05); }
.pos-pay-btn.slim { padding: 11px 18px; font-size: 14px; }
.pos-modal.wide { max-width: 520px; }

/* ── Lista de ventas del turno ── */
.pos-ventas-list { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; }
.pos-venta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--pos-border); border-radius: 11px; }
.pos-venta-info { min-width: 0; }
.pos-venta-top { display: flex; align-items: center; gap: 10px; }
.pos-venta-hora { font-size: 13px; font-weight: 800; color: var(--pos-text); font-variant-numeric: tabular-nums; }
.pos-venta-pago { font-size: 10.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.pos-venta-pago.efe { background: rgba(5,150,105,.12); color: var(--pos-green); }
.pos-venta-pago.tar { background: rgba(var(--wk-primary-rgb),.12); color: var(--wk-primary); }
.pos-venta-total { font-size: 13.5px; font-weight: 800; color: var(--pos-text); font-variant-numeric: tabular-nums; }
.pos-venta-dte { font-size: 11px; color: var(--pos-soft); margin-top: 2px; font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Enlaces a historial ── */
.pos-hist-link {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    border-radius: 11px; border: 1px solid var(--pos-border); background: transparent;
    color: var(--pos-soft); text-decoration: none; transition: all .15s;
}
.pos-hist-link:hover { color: var(--wk-primary); border-color: rgba(var(--wk-primary-rgb),0.35); background: rgba(var(--wk-primary-rgb),0.06); }
.pos-hist-link .material-symbols-outlined { font-size: 20px; }
.pos-abrir-hist {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 2px;
    color: var(--pos-soft); text-decoration: none; font-size: 13px; font-weight: 600;
}
.pos-abrir-hist:hover { color: var(--wk-primary); }
.pos-abrir-hist .material-symbols-outlined { font-size: 17px; }

/* ── Página historial de cajas ── */
.pos-hist-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pos-hist-title { font-size: 22px; font-weight: 900; color: var(--pos-text); font-family: 'Manrope', sans-serif; }
.pos-hist-sub { font-size: 13px; color: var(--pos-soft); margin-top: 2px; }
.pos-hist-back {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 11px;
    border: 1px solid var(--pos-border); background: var(--pos-surface); color: var(--pos-text);
    text-decoration: none; font-size: 13.5px; font-weight: 700; transition: all .15s;
}
.pos-hist-back:hover { border-color: rgba(var(--wk-primary-rgb),0.35); color: var(--wk-primary); }
.pos-hist-back .material-symbols-outlined { font-size: 18px; }

.pos-hist-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    min-height: 40vh; color: var(--pos-soft);
}
.pos-hist-empty .material-symbols-outlined { font-size: 44px; opacity: .4; }

.pos-hist-card {
    background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: 16px;
    overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}
.pos-hist-tablewrap { overflow-x: auto; }
.pos-hist-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pos-hist-table thead th {
    text-align: left; padding: 12px 14px; font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .05em; color: var(--pos-soft); border-bottom: 1px solid var(--pos-border); white-space: nowrap;
}
.pos-hist-table th.num, .pos-hist-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos-hist-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--pos-border); color: var(--pos-text); white-space: nowrap; }
.pos-hist-table tbody tr:last-child td { border-bottom: none; }
.pos-hist-table tbody tr:hover { background: rgba(var(--wk-primary-rgb),0.04); }
.pos-hist-table td.strong { font-weight: 800; }
.pos-hist-cajero { font-weight: 700; }
.pos-hist-cajero-sub { font-size: 11px; color: var(--pos-soft); }
.pos-hist-dif { font-weight: 800; }
.pos-hist-dif.neg { color: var(--pos-red); }
.pos-hist-dif.pos { color: var(--pos-green); }
.pos-hist-print {
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--pos-border); background: transparent;
    color: var(--pos-soft); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.pos-hist-print:hover { color: var(--wk-primary); border-color: rgba(var(--wk-primary-rgb),0.35); background: rgba(var(--wk-primary-rgb),0.06); }
.pos-hist-print .material-symbols-outlined { font-size: 18px; }

/* ── Responsive ── */
@media (max-width: 980px) {
    .pos-layout { grid-template-columns: 1fr; }
    .pos-pay { position: static; }
}

/* ── Toggle de vista (Buscar / Catálogo) ── */
.pos-viewtoggle { display: inline-flex; gap: 4px; background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: 12px; padding: 4px; align-self: flex-start; }
.pos-viewtoggle button {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px;
    border: none; background: transparent; color: var(--pos-soft); font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit; transition: all .15s;
}
.pos-viewtoggle button .material-symbols-outlined { font-size: 18px; }
.pos-viewtoggle button.on { background: rgba(var(--wk-primary-rgb),0.12); color: var(--wk-primary); }

/* ── Catálogo táctil ── */
.pos-catalogo {
    background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: 14px;
    padding: 14px; display: flex; flex-direction: column; gap: 16px; max-height: 420px; overflow-y: auto;
}
.pos-cat-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--pos-soft); margin-bottom: 8px; }
.pos-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pos-tile {
    display: flex; flex-direction: column; gap: 4px; padding: 11px; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--pos-border); background: rgba(255,255,255,0.5); text-align: left; transition: all .15s; position: relative;
}
.dark .pos-tile { background: rgba(255,255,255,0.03); }
.pos-tile:hover:not(:disabled) { border-color: rgba(var(--wk-primary-rgb),0.4); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.pos-tile:disabled { opacity: .45; cursor: not-allowed; }
.pos-tile-name { font-size: 12.5px; font-weight: 700; color: var(--pos-text); line-height: 1.2; }
.pos-tile-price { font-size: 14px; font-weight: 900; color: var(--wk-primary); font-variant-numeric: tabular-nums; }
.pos-tile-stock { position: absolute; top: 6px; right: 8px; font-size: 10px; font-weight: 800; color: var(--pos-soft); }
.pos-tile-stock.low { color: #b45309; }
.pos-tile-stock.out { color: #b91c1c; }

/* ── Ventas en espera ── */
.pos-espera { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: 12px; padding: 10px 12px; }
.pos-espera-title { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: var(--pos-soft); text-transform: uppercase; letter-spacing: .04em; }
.pos-espera-title .material-symbols-outlined { font-size: 17px; color: var(--wk-primary); }
.pos-espera-chip { display: inline-flex; align-items: center; border: 1px solid rgba(var(--wk-primary-rgb),0.3); border-radius: 999px; overflow: hidden; }
.pos-espera-load { border: none; background: rgba(var(--wk-primary-rgb),0.08); color: var(--wk-primary); font-size: 12.5px; font-weight: 700; padding: 6px 12px; cursor: pointer; font-family: inherit; font-variant-numeric: tabular-nums; }
.pos-espera-load:hover { background: rgba(var(--wk-primary-rgb),0.16); }
.pos-espera-del { border: none; background: transparent; color: var(--pos-soft); cursor: pointer; display: inline-flex; align-items: center; padding: 4px 6px; }
.pos-espera-del:hover { color: var(--pos-red); }
.pos-espera-del .material-symbols-outlined { font-size: 15px; }

/* ── Botón Facturar como CCF ── */
.pos-pay-ccf {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
    padding: 11px; border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 700;
    border: 1px solid var(--pos-border); background: transparent; color: var(--pos-soft); transition: all .15s;
}
.pos-pay-ccf:hover:not(:disabled) { color: var(--wk-primary); border-color: rgba(var(--wk-primary-rgb),0.4); background: rgba(var(--wk-primary-rgb),0.05); }
.pos-pay-ccf:disabled { opacity: .45; cursor: not-allowed; }
.pos-pay-ccf .material-symbols-outlined { font-size: 19px; }

/* ─── Ticket 80mm (solo impresión) ────────────────────────────────────────── */
.pos-ticket { display: none; }

@media print {
    body * { visibility: hidden; }
    .pos-ticket, .pos-ticket * { visibility: visible; }
    .pos-ticket {
        display: block; position: absolute; left: 0; top: 0;
        width: 80mm; padding: 4mm 3mm;
        font-family: 'Courier New', monospace; color: #000; font-size: 11px; line-height: 1.35;
    }
    .pos-ticket-h { text-align: center; font-size: 15px; font-weight: 800; }
    .pos-ticket-sub { text-align: center; font-size: 10px; margin-bottom: 4px; }
    .pos-ticket-meta { font-size: 10px; }
    .pos-ticket-dte { word-break: break-all; }
    .pos-ticket-sep { border-top: 1px dashed #000; margin: 5px 0; }
    .pos-ticket-item { margin-bottom: 3px; }
    .pos-ticket-item-name { font-weight: 700; }
    .pos-ticket-item-row { display: flex; justify-content: space-between; }
    .pos-ticket-row { display: flex; justify-content: space-between; }
    .pos-ticket-row.total { font-weight: 800; font-size: 13px; margin: 3px 0; }
    .pos-ticket-foot { text-align: center; margin-top: 6px; font-size: 10px; }

    @page { size: 80mm auto; margin: 0; }
}
