/* ═══════════════════════════════════════════════════════════════════════════
   Vantastic CloudERP — POS nuevo · estilos propios (29/10/2026, copia del POS nuevo de MONOXTO Hybrid).
   Mismo archivo que Vantastic.MONOXTO.Net8.MainBlazorHybrid/wwwroot/css/pos-nuevo.css, sin cambios en las reglas.
   Aislamiento: todo selector cuelga de .pb-root (PosBienvenida) o .pos-root (PosNuevoPage); no toca el shell
   ni ninguna otra página. Lo enlazan solo esas dos páginas (<link> con @Assets, como el resto del módulo).
   Al final: ajuste propio de CloudERP (pantalla completa sobre el shell, debajo de las capas de modales).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ══ Invitación (PosBienvenida.razor) ══ */
/* Invitación al POS nuevo — Cobalt Elegante (25/10/2026) */
.pb-root {
    --em-cobalt: #1a4fba; --em-cobalt-deep: #0f3494; --em-cobalt-light: #2d6ae0;
    --em-cobalt-pale: #e8eef9; --em-cobalt-subtle: #f0f4fb;
    --pb-fg: #14213d; --pb-muted: #5d6b86; --pb-line: #d8e1f1;
    min-height: 100vh; height: 100vh; overflow: auto; display: flex; align-items: center; justify-content: center;
    padding: 14px; background: linear-gradient(160deg, #0a1f5c 0%, #050f2e 100%);
    font-size: 13px; color: var(--pb-fg);
}
.pb-root .pb-card {
    width: 100%; max-width: 1180px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
@media (max-width: 900px) { .pb-root .pb-card { grid-template-columns: 1fr; } }

.pb-root .pb-izq {
    padding: 26px; display: grid; gap: 14px; align-content: start; color: #fff;
    background: linear-gradient(160deg, var(--em-cobalt-deep), var(--em-cobalt) 70%, var(--em-cobalt-light));
}
.pb-root .pb-izq h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.15; }
.pb-root .pb-izq p { margin: 0; opacity: .9; max-width: 52ch; }
.pb-root .pb-badge { justify-self: start; background: #16a34a; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.pb-root .pb-novedades { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.pb-root .pb-novedades li { display: flex; gap: 9px; align-items: flex-start; background: rgba(255,255,255,.1); border-radius: 9px; padding: 9px 10px; font-size: 12.5px; }
.pb-root .pb-novedades li i { margin-top: 3px; font-size: 12px; }
.pb-root .pb-novedades b { display: block; font-size: 13px; }

.pb-root .pb-der { padding: 22px; display: grid; gap: 10px; align-content: start; }
.pb-root .pb-der h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--em-cobalt-deep); }
.pb-root .pb-hint { background: var(--em-cobalt-subtle); border-radius: 8px; padding: 8px 10px; color: var(--pb-muted); }
.pb-root .pb-hint b { color: var(--pb-fg); }
.pb-root .pb-variantes { display: grid; gap: 8px; }

.pb-root .pb-var {
    display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left;
    border: 1.5px solid var(--pb-line); border-radius: 12px; padding: 9px 12px; background: #fff; color: var(--pb-fg); cursor: pointer;
}
.pb-root .pb-var:hover { border-color: var(--em-cobalt); }
.pb-root .pb-var.on { border-color: var(--em-cobalt); background: var(--em-cobalt-pale); box-shadow: 0 0 0 3px rgba(26,79,186,.12); }
.pb-root .pb-var:focus-visible { outline: 2px solid var(--em-cobalt); outline-offset: 2px; }
.pb-root .pb-ic { width: 48px; height: 48px; border-radius: 11px; background: var(--em-cobalt-subtle); display: grid; place-items: center; color: var(--em-cobalt); font-size: 20px; }
.pb-root .pb-var.on .pb-ic { background: var(--em-cobalt); color: #fff; }
.pb-root .pb-txt b { display: block; font-size: 14px; }
.pb-root .pb-txt small { display: block; color: var(--pb-muted); font-size: 12px; line-height: 1.35; }
.pb-root .pb-tag { font-size: 10.5px; font-weight: 700; color: var(--em-cobalt); background: var(--em-cobalt-pale); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }

.pb-root .pb-abrir {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border: none; border-radius: 8px;
    background: var(--em-cobalt); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.pb-root .pb-legacy { border-style: dashed; }
.pb-root .pb-legacy.ult { border-color: var(--em-cobalt); }
.pb-root .pb-pie { margin: 0; font-size: 12px; color: var(--pb-muted); }
.pb-root .btn-hover { transition: filter .12s, transform .12s; }
.pb-root .btn-hover:hover { filter: brightness(1.08); }
.pb-root .btn-hover:active { transform: translateY(1px); }


/* ══ Punto de venta (PosPage.razor) ══ */
/* POS nuevo — variante estándar (Fase C, 25/10/2026). Todo toma las variables --p-* de la paleta del usuario
   (PosPaletas.cs). Botones según la guía de Ivan: icon-only 31×31, texto+icono 31 px, colores fijos. */
.pos-root {
    --ok: #16a34a; --bad: #dc2626; --warn: #d97706;
    position: relative; height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
    background: var(--p-bg); color: var(--p-fg); font-size: 13px; outline: none; overflow: hidden;
}
.pos-root .num { font-variant-numeric: tabular-nums; font-family: "IBM Plex Mono", Consolas, monospace; }

/* barra superior */
.pos-root .pos-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 12px; background: var(--p-top); color: var(--p-topfg); }
.pos-root .pos-top-tit { font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.pos-root .pos-sp { flex: 1; }
.pos-root .pos-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); background: transparent; color: inherit; padding: 3px 10px; border-radius: 99px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.pos-root .pos-chip:hover { background: color-mix(in srgb, currentColor 12%, transparent); }

.pos-root .pos-main { display: grid; grid-template-columns: minmax(0, 1fr) 390px; min-height: 0; }
@media (max-width: 980px) { .pos-root .pos-main { grid-template-columns: 1fr; overflow: auto; } }

/* catálogo */
.pos-root .pos-cat { min-width: 0; min-height: 0; padding: 10px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--p-line); }
.pos-root .pos-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pos-root .pos-search { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; background: var(--p-surface); border: 1.5px solid var(--p-line); border-radius: 8px; padding: 0 10px; height: 38px; min-width: 0; color: var(--p-muted); }
.pos-root .pos-search:focus-within { border-color: var(--p-acc); }
.pos-root .pos-search input { border: none; outline: none; background: transparent; flex: 1; min-width: 0; height: 100%; color: var(--p-fg); font-size: 14px; }
.pos-root .pos-sel { height: 31px; border-radius: 5px; border: 1px solid var(--p-line); background: var(--p-surface); color: var(--p-fg); padding: 0 8px; font-size: 12.5px; }
.pos-root .pos-seg { display: inline-flex; border: 1px solid var(--p-line); border-radius: 6px; overflow: hidden; }
.pos-root .pos-seg button { border: none; background: var(--p-surface); color: var(--p-muted); padding: 0 10px; height: 29px; cursor: pointer; font-size: 12px; font-weight: 600; }
.pos-root .pos-seg button.on { background: var(--p-accsoft); color: var(--p-acc); }
.pos-root .pos-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; flex: none; }
.pos-root .pos-catb { border: 1px solid var(--p-line); background: var(--p-surface); color: var(--p-fg); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pos-root .pos-catb.on { background: var(--p-acc); color: var(--p-accink); border-color: var(--p-acc); }

.pos-root .pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; align-content: start; overflow: auto; min-height: 0; padding: 2px; }
.pos-root .pos-card { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 5px; cursor: pointer; text-align: left; color: var(--p-fg); }
.pos-root .pos-card:hover { border-color: var(--p-acc); box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.pos-root .pos-card .ph { aspect-ratio: 4 / 3; border-radius: 7px; background: var(--p-s2); display: grid; place-items: center; overflow: hidden; }
.pos-root .pos-card .ph img { width: 100%; height: 100%; object-fit: contain; }
.pos-root .pos-card .ph .ini,
.pos-root .pos-thumb .ini { font-weight: 700; font-size: 22px; color: var(--p-muted); }
.pos-root .pos-card .nm { font-weight: 600; font-size: 12.5px; line-height: 1.25; min-height: 2.5em; }
.pos-root .pos-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.pos-root .pos-card .pr { font-weight: 600; font-size: 14px; color: var(--p-acc); }
.pos-root .pos-card .stk { font-size: 11px; color: var(--p-muted); }
.pos-root .pos-grid.sinfoto .ph { display: none; }
.pos-root .pos-grid.sinfoto .nm { min-height: 0; }
.pos-root .pos-flags { display: flex; gap: 3px; flex-wrap: wrap; min-height: 16px; }
.pos-root .flag { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: var(--p-accsoft); color: var(--p-acc); }
.pos-root .flag.rx { background: #fde2e2; color: #b91c1c; }
.pos-root .flag.low { background: #fef3c7; color: #92400e; }
.pos-root .flag.bad { background: #fee2e2; color: #b91c1c; }

.pos-root .pos-tabla { overflow: auto; min-height: 0; border: 1px solid var(--p-line); border-radius: 8px; background: var(--p-surface); }
.pos-root .pos-tabla table,
.pos-root .tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pos-root .pos-tabla th,
.pos-root .tbl th { position: sticky; top: 0; background: var(--p-s2); text-align: left; font-weight: 600; color: var(--p-muted); font-size: 11.5px; padding: 7px 8px; border-bottom: 1px solid var(--p-line); white-space: nowrap; cursor: pointer; }
.pos-root .pos-tabla td,
.pos-root .tbl td { padding: 7px 8px; border-bottom: 1px solid var(--p-line); }
.pos-root .pos-tabla tbody tr { cursor: pointer; }
.pos-root .pos-tabla tbody tr:hover td { background: var(--p-accsoft); }
.pos-root .r { text-align: right; }
.pos-root .pos-thumb { width: 32px; height: 32px; border-radius: 6px; background: var(--p-s2); display: grid; place-items: center; overflow: hidden; }
.pos-root .pos-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pos-root .pos-thumb .ini { font-size: 12px; }

.pos-root .pos-vacio { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--p-muted); padding: 40px 16px; }
.pos-root .pos-vacio i { font-size: 30px; opacity: .55; }
.pos-root .pos-vacio b { color: var(--p-fg); }

/* botones */
.pos-root .pos-ib { width: 31px; height: 31px; border-radius: 6px; border: none; display: inline-grid; place-items: center; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); cursor: pointer; flex: none; }
.pos-root .tb { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; height: 31px; font-size: 13px; font-weight: 600; border: none; border-radius: 6px; color: #fff; cursor: pointer; white-space: nowrap; }
.pos-root .tb.ghost { background: var(--p-s2); color: var(--p-fg); border: 1px solid var(--p-line); }
.pos-root .pos-ib:hover,
.pos-root .tb:hover { filter: brightness(1.08); }
.pos-root .pos-mini { border: 1px solid var(--p-line); background: var(--p-surface); color: var(--p-acc); border-radius: 4px; font-size: 11px; padding: 0 6px; cursor: pointer; margin-left: 4px; }

/* carrito */
.pos-root .pos-cart { display: flex; flex-direction: column; background: var(--p-surface); min-width: 0; min-height: 0; }
.pos-root .pos-cart-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--p-line); }
.pos-root .pos-cart-h h3 { margin: 0; font-size: 15px; font-weight: 700; }
.pos-root .pos-cliente { margin: 10px 12px 0; padding: 9px 10px; border-radius: 9px; background: var(--p-s2); border: 1px dashed var(--p-line); display: flex; gap: 10px; align-items: center; cursor: pointer; text-align: left; color: var(--p-fg); }
.pos-root .pos-cliente .av { width: 32px; height: 32px; border-radius: 50%; background: var(--p-acc); color: var(--p-accink); display: grid; place-items: center; font-weight: 700; flex: none; }
.pos-root .pos-cliente b { display: block; }
.pos-root .pos-cliente small { display: block; color: var(--p-muted); }
.pos-root .pos-cliente .quitar { margin-left: auto; color: var(--p-muted); padding: 4px; }
.pos-root .pos-lineas { flex: 1; overflow: auto; min-height: 120px; padding: 6px 0; }
.pos-root .pos-linea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 12px; border-bottom: 1px solid var(--p-line); }
.pos-root .pos-linea .t { font-weight: 600; }
.pos-root .pos-linea .amt { font-weight: 600; text-align: right; }
.pos-root .pos-linea .m { font-size: 11.5px; color: var(--p-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.pos-root .pos-linea .m span { background: var(--p-s2); border-radius: 4px; padding: 0 5px; }
.pos-root .pos-linea .m .link { cursor: pointer; color: var(--p-acc); }
.pos-root .pos-linea .m .link.falta { color: var(--bad); font-weight: 600; }
.pos-root .pos-linea .m .rx { background: #fde2e2; color: #b91c1c; }
.pos-root .qty { display: flex; align-items: center; gap: 4px; }
.pos-root .qty button { width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--p-line); background: var(--p-surface); color: var(--p-fg); cursor: pointer; font-weight: 700; line-height: 1; }
.pos-root .qty button:disabled,
.pos-root .qty input:disabled { opacity: .45; cursor: not-allowed; }
.pos-root .qty input { width: 56px; height: 24px; border: 1px solid var(--p-line); border-radius: 5px; background: var(--p-surface); color: var(--p-fg); text-align: center; font-size: 12px; }
.pos-root .qty .x { border-color: transparent; color: var(--bad); }
.pos-root .pos-tot { padding: 10px 12px; border-top: 1px solid var(--p-line); display: grid; gap: 3px; font-size: 12.5px; }
.pos-root .pos-tot > div { display: flex; justify-content: space-between; align-items: center; }
.pos-root .pos-tot .big { font-size: 22px; font-weight: 700; padding-top: 4px; }
.pos-root .pos-tot .big span:first-child { font-size: 15px; }
.pos-root .pos-docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px 10px; }
.pos-root .pos-docs button { border: 1.5px solid var(--p-line); background: var(--p-surface); color: var(--p-fg); border-radius: 8px; padding: 6px 4px; cursor: pointer; font-weight: 700; font-size: 12px; display: grid; gap: 1px; justify-items: center; }
.pos-root .pos-docs button small { font-weight: 500; color: var(--p-muted); font-size: 10.5px; }
.pos-root .pos-docs button.on { border-color: var(--p-acc); background: var(--p-accsoft); color: var(--p-acc); }
.pos-root .pos-hint,
.pos-root .hint { font-size: 12px; color: var(--p-muted); background: var(--p-s2); border-radius: 8px; padding: 8px 10px; }
.pos-root .pos-hint { margin: 0 12px 10px; }
.pos-root .pos-pay { margin: 0 12px 12px; height: 50px; border: none; border-radius: 10px; background: var(--p-acc); color: var(--p-accink); font-weight: 700; font-size: 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; }
.pos-root .pos-pay:disabled { opacity: .45; cursor: not-allowed; }
.pos-root .pos-pay kbd { font-size: 11px; border: 1px solid currentColor; border-radius: 4px; padding: 1px 5px; opacity: .8; background: transparent; color: inherit; }

/* atajos: fila de teclado */
.pos-root .pos-fkeys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 210px; gap: 12px; padding: 8px 10px; background: var(--p-surface); border-top: 1px solid var(--p-line); }
.pos-root .pos-fblock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; min-width: 0; }
.pos-root .pos-fk { --k: var(--p-acc); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 1px 6px; align-content: center; height: 50px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--p-line); background: var(--p-s2); color: var(--p-fg); cursor: pointer; text-align: left; min-width: 0; box-shadow: inset 0 3px 0 var(--k); }
.pos-root .pos-fk:hover { border-color: var(--k); }
.pos-root .pos-fk kbd { font-size: 11px; font-weight: 600; color: var(--k); background: transparent; padding: 0; }
.pos-root .pos-fk i { color: var(--p-muted); grid-row: 1; grid-column: 2; justify-self: end; font-size: 13px; }
.pos-root .pos-fk span { grid-column: 1 / -1; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-root .pos-fk.doc { --k: #1a56db; }
.pos-root .pos-fk.caja { --k: #64748b; }
.pos-root .pos-fk.pay { --k: #16a34a; background: #16a34a; border-color: #16a34a; color: #fff; }
.pos-root .pos-fk.pay kbd,
.pos-root .pos-fk.pay i { color: #fff; }
.pos-root .pos-fk.on { background: #e8effd; border-color: #1a56db; color: #0f2f7a; }
.pos-root .pos-fextra { display: grid; grid-template-rows: 1fr 1fr; gap: 5px; }
.pos-root .pos-fx { display: flex; align-items: center; gap: 6px; border: 1px solid var(--p-line); background: var(--p-s2); color: var(--p-fg); border-radius: 7px; padding: 0 8px; font-size: 12px; font-weight: 600; cursor: pointer; min-width: 0; }
.pos-root .pos-fx i { color: var(--p-muted); }
.pos-root .pos-fx kbd { margin-left: auto; font-size: 10px; color: var(--p-muted); background: transparent; padding: 0; }
@media (max-width: 1100px) { .pos-root .pos-fkeys { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pos-root .pos-fextra { grid-template-rows: none; grid-template-columns: 1fr 1fr; } }

.pos-root .pos-status { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 5px 12px; font-size: 11.5px; color: var(--p-muted); background: var(--p-surface); border-top: 1px solid var(--p-line); }
.pos-root .pos-status b { color: var(--p-fg); font-weight: 600; }

/* ventanas (Cobalt Elegante: radio 14, cabecera en degradé) */
.pos-root .pos-ovl { position: absolute; inset: 0; background: rgba(10,15,30,.45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.pos-root .pos-modal { background: var(--p-surface); color: var(--p-fg); border-radius: 14px; width: min(640px, 100%); max-height: calc(100% - 20px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.pos-root .pos-modal.wide { width: min(1040px, 100%); }
.pos-root .pos-modal .mh { background: linear-gradient(120deg, var(--p-top), var(--p-acc)); color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.pos-root .pos-modal .mh h3 { margin: 0; font-size: 16px; font-weight: 700; }
.pos-root .pos-modal .mh p { margin: 0; font-size: 12px; opacity: .85; }
.pos-root .pos-modal .mh .x { margin-left: auto; background: rgba(255,255,255,.18); border: none; color: #fff; width: 31px; height: 31px; border-radius: 6px; cursor: pointer; }
.pos-root .pos-modal .mb { padding: 14px 16px; overflow: auto; display: grid; gap: 12px; }
.pos-root .pos-modal .mb.cierre { padding: 0; }
.pos-root .pos-modal .mf { padding: 10px 16px; border-top: 1px solid var(--p-line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; background: var(--p-s2); }
.pos-root .pos-modal .mf .cuenta { margin-right: auto; color: var(--p-muted); }
.pos-root .g2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.pos-root .g3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.pos-root .opt { border: 1.5px solid var(--p-line); border-radius: 10px; padding: 10px 12px; background: var(--p-surface); color: var(--p-fg); cursor: pointer; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pos-root .opt:hover,
.pos-root .opt.on { border-color: var(--p-acc); background: var(--p-accsoft); }
.pos-root .opt b { display: block; }
.pos-root .opt small { color: var(--p-muted); }
.pos-root .opt .num { font-weight: 600; color: var(--p-acc); }
.pos-root .fld { display: grid; gap: 4px; min-width: 0; }
.pos-root .fld label { font-size: 11.5px; font-weight: 600; color: var(--p-muted); }
.pos-root .fld input,
.pos-root .fld select { height: 34px; border: 1px solid var(--p-line); border-radius: 5px; background: var(--p-surface); color: var(--p-fg); padding: 0 9px; width: 100%; min-width: 0; }
.pos-root input.cant { width: 90px; height: 30px; border: 1px solid var(--p-line); border-radius: 5px; background: var(--p-surface); color: var(--p-fg); text-align: right; padding: 0 6px; }
.pos-root .eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--p-acc); font-weight: 700; margin-bottom: 4px; }
.pos-root .toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--p-line); cursor: pointer; }
.pos-root .toggle b { display: block; }
.pos-root .toggle small { color: var(--p-muted); }
.pos-root .sw { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: var(--p-line); position: relative; cursor: pointer; flex: none; }
.pos-root .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.pos-root .sw:checked { background: var(--p-acc); }
.pos-root .sw:checked::after { transform: translateX(18px); }
.pos-root .pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos-root .pal { border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; padding: 0; background: none; text-align: left; }
.pos-root .pal.on { border-color: var(--p-acc); }
.pos-root .pal .pv { height: 64px; display: grid; grid-template-rows: 14px 1fr; }
.pos-root .pal .pv .bd { display: grid; grid-template-columns: 1fr 34%; gap: 4px; padding: 5px; }
.pos-root .pal .pv .bd i { border-radius: 4px; display: block; }
.pos-root .pal .lbl { padding: 6px 8px; font-size: 12px; font-weight: 600; background: var(--p-s2); color: var(--p-fg); display: flex; justify-content: space-between; }
.pos-root .pal .lbl small { color: var(--p-muted); font-weight: 500; }

.pos-root .pos-lock { position: absolute; inset: 0; z-index: 40; background: var(--p-top); color: var(--p-topfg); display: grid; place-items: center; align-content: center; gap: 12px; }
.pos-root .pos-lock i { font-size: 44px; }
.pos-root .pos-lock h3 { margin: 0; }
.pos-root .pos-busy { position: absolute; inset: 0; z-index: 50; background: rgba(10,15,30,.55); color: #fff; display: grid; place-items: center; align-content: center; gap: 10px; font-weight: 600; }
.pos-root .spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; animation: pos-sp .8s linear infinite; }
@keyframes pos-sp { to { transform: rotate(360deg); } }
.pos-root .pos-toast { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); background: var(--p-fg); color: var(--p-bg); padding: 9px 16px; border-radius: 8px; font-weight: 600; z-index: 45; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* ── Fase E: tallas y colores / zapatería ── */
.pos-root .pos-tallas { display: flex; gap: 5px; overflow-x: auto; align-items: center; flex: none; padding-bottom: 2px; }
.pos-root .pos-tallas .q { font-size: 12px; font-weight: 700; color: var(--p-muted); white-space: nowrap; margin-right: 4px; }
.pos-root .sz { min-width: 40px; height: 34px; border-radius: 7px; border: 1px solid var(--p-line); background: var(--p-surface); color: var(--p-fg); font-weight: 700; cursor: pointer; flex: none; font-variant-numeric: tabular-nums; }
.pos-root .sz.on { background: var(--p-acc); color: var(--p-accink); border-color: var(--p-acc); }
.pos-root .pos-card .pares { font-size: 12px; font-weight: 700; color: var(--p-acc); }
.pos-root .mx-wrap { overflow-x: auto; }
.pos-root .mx { border-collapse: separate; border-spacing: 6px; }
.pos-root .mx th { font-weight: 600; color: var(--p-muted); font-size: 12px; }
.pos-root .mx th.cl { text-align: left; color: var(--p-fg); white-space: nowrap; font-size: 12.5px; }
.pos-root .mcell { position: relative; width: 60px; height: 46px; border-radius: 8px; border: 1.5px solid var(--p-line); background: var(--p-surface); color: var(--p-fg); font-weight: 700; font-size: 15px; cursor: pointer; font-variant-numeric: tabular-nums; }
.pos-root .mcell:hover:not(:disabled) { border-color: var(--p-acc); }
.pos-root .mcell.low { color: #dc2626; border-color: #fca5a5; }
.pos-root .mcell:disabled { text-decoration: line-through; opacity: .45; cursor: not-allowed; background: var(--p-s2); }
.pos-root .mcell small { display: block; font-size: 10px; font-weight: 500; color: var(--p-muted); }
.pos-root .mcell.hl { box-shadow: 0 0 0 3px var(--p-accsoft); border-color: var(--p-acc); }
.pos-root .bdg { position: absolute; top: -8px; right: -8px; background: var(--p-acc); color: var(--p-accink); font-size: 10.5px; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
.pos-root .zcol { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-root .zcol button { border: 1.5px solid var(--p-line); background: var(--p-surface); color: var(--p-fg); border-radius: 99px; padding: 5px 12px; cursor: pointer; font-weight: 600; font-size: 12.5px; }
.pos-root .zcol button.on { border-color: var(--p-acc); background: var(--p-accsoft); color: var(--p-acc); }
.pos-root .zsizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.pos-root .zsizes .mcell { width: 100%; height: 56px; }
.pos-root .warnbox { padding: 9px 12px; border-radius: 9px; border: 1px solid #fca5a5; background: #fef2f2; color: #7f1d1d; font-size: 12.5px; display: grid; gap: 4px; }
.pos-root .warnbox button { border: 1px solid #fca5a5; background: #fff; color: #7f1d1d; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-weight: 600; font-size: 12px; margin-right: 4px; }

/* ══ Panadería (BitPan) y Farmacia (puntos) · 25/10/2026 ══════════════════ */
.pos-root .pos-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.pos-root .pos-scroll > .pos-grid { overflow: visible; flex: none; }
.pos-root .pos-pan-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--p-acc); }
.pos-root .pos-pan-tit { font-weight: 700; font-size: 13px; display: flex; align-items: baseline; gap: 8px; color: var(--p-fg); }
.pos-root .pos-pan-tit i { color: var(--p-acc); }
.pos-root .pos-pan-tit small { font-weight: 400; color: var(--p-muted); font-size: 11.5px; }
.pos-root .pos-pan-tit.otros { margin-top: 4px; color: var(--p-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.pos-root .pos-pan { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; flex: none; }
.pos-root .pan-card { background: var(--p-surface); border: 1.5px solid var(--p-line); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.pos-root .pan-card.on { border-color: var(--p-acc); box-shadow: 0 0 0 3px var(--p-accsoft); }
.pos-root .pan-main { border: none; background: transparent; color: var(--p-fg); padding: 10px; display: grid; gap: 6px; text-align: left; cursor: pointer; position: relative; }
.pos-root .pan-main:hover { background: var(--p-accsoft); }
.pos-root .pan-main .ph { aspect-ratio: 16 / 10; border-radius: 8px; background: var(--p-s2); display: grid; place-items: center; overflow: hidden; }
.pos-root .pan-main .ph img { width: 100%; height: 100%; object-fit: cover; }
.pos-root .pan-main .ph .ini { font-weight: 700; font-size: 28px; color: var(--p-muted); }
.pos-root .pan-main .nm { font-weight: 700; font-size: 15px; line-height: 1.2; }
.pos-root .pan-main .pr { font-weight: 700; font-size: 17px; color: var(--p-acc); }
.pos-root .pan-main .cnt { position: absolute; top: 8px; right: 8px; background: var(--p-acc); color: var(--p-accink); border-radius: 99px; padding: 2px 9px; font-weight: 700; font-size: 13px; }
.pos-root .pan-acc { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--p-line); }
.pos-root .pan-acc button { height: 40px; border: none; background: var(--p-s2); color: var(--p-acc); font-weight: 800; font-size: 16px; cursor: pointer; }
.pos-root .pan-acc button + button { border-left: 1px solid var(--p-line); }
.pos-root .pan-acc button:hover { background: var(--p-acc); color: var(--p-accink); }
.pos-root .pan-lista { max-height: 52vh; overflow: auto; padding-right: 4px; }

.pos-root .pos-pts { margin: 8px 12px 0; padding: 8px 10px; border-radius: 9px; background: var(--p-accsoft); border: 1px solid color-mix(in srgb, var(--p-acc) 35%, transparent); display: flex; gap: 10px; align-items: center; }
.pos-root .pos-pts .ic { width: 28px; height: 28px; border-radius: 50%; background: #d97706; color: #fff; display: grid; place-items: center; flex: none; font-size: 12px; }
.pos-root .pos-pts .tx { flex: 1; min-width: 0; }
.pos-root .pos-pts .tx b { font-size: 14px; }
.pos-root .pos-pts .tx small { display: block; color: var(--p-muted); font-size: 11.5px; }
.pos-root .pos-pts .pos-mini { height: 26px; font-weight: 600; }
.pos-root .pos-tot .ptsd { color: #d97706; font-weight: 600; }
.pos-root .pos-ptsbig { font-size: 28px; font-weight: 700; color: var(--p-acc); margin: 4px 0 8px; }

/* ══ F3 pedidos · Ctrl+E emitidos · F10 promociones · farmacia (26/10/2026) ══ */
.pos-root .pos-card .farma { font-size: 11px; color: var(--p-muted); line-height: 1.25; }
.pos-root .pos-card .gen { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--p-acc); background: var(--p-accsoft); border-radius: 99px; padding: 1px 8px; cursor: pointer; }
.pos-root .pos-card .gen:hover { background: var(--p-acc); color: var(--p-accink); }
.pos-root .pos-pedido { margin: 8px 12px 0; padding: 7px 10px; border-radius: 9px; background: var(--p-s2); border: 1px solid var(--p-line); display: flex; gap: 8px; align-items: center; font-size: 12px; }
.pos-root .pos-pedido i { color: var(--p-acc); }
.pos-root .pos-pedido span { flex: 1; min-width: 0; }
.pos-root .pos-tabla tr.anulado td { text-decoration: line-through; color: var(--p-muted); }
.pos-root .pos-tabla tr.base td { background: var(--p-accsoft); }
.pos-root .pos-tabla .pos-ib + .pos-ib { margin-left: 4px; }
.pos-root .ptag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 8px; background: var(--p-s2); color: var(--p-fg); }
.pos-root .ptag.acu { background: #dcfce7; color: #166534; }
.pos-root .ptag.can { background: #fef3c7; color: #92400e; }
.pos-root .ptag.ven { background: #f3f4f6; color: #4b5563; }
.pos-root .ptag.aju { background: #e0e7ff; color: #3730a3; }
.pos-root .ptag.anu { background: #fee2e2; color: #991b1b; }
.pos-root b.neg { color: #dc2626; }
.pos-root b.pos { color: #16a34a; }

/* ══ "No volver a mostrar" (29/10/2026) ══ */
.pb-root .pb-nomostrar { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; font-size: 12.5px; color: var(--pb-fg); cursor: pointer; user-select: none; }
.pb-root .pb-nomostrar input { width: 16px; height: 16px; accent-color: var(--em-cobalt); cursor: pointer; margin: 0; }
.pb-root .pb-nomostrar b { font-weight: 600; }

/* ══ Editar precio en el carrito · «Cambios de precio» (03/11/2026) ══ */
.pos-root .pos-linea .m .pos-lapiz { border: none; background: var(--p-accsoft); color: var(--p-acc); border-radius: 4px; height: 18px; width: 22px; padding: 0; cursor: pointer; font-size: 10px; display: inline-grid; place-items: center; }
.pos-root .pos-linea .m .pos-lapiz:hover { filter: brightness(.94); }
.pos-root .pos-linea .m s.pos-pori { color: var(--p-muted); background: transparent; padding: 0; }
.pos-root .pos-linea .m span.pos-pedit { background: #fff4d6; color: #92400e; font-weight: 700; }
.pos-root .pos-precio-ori { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; background: var(--p-s2); border-radius: 8px; padding: 10px 12px; }
.pos-root .pos-precio-ori span { font-size: 12px; color: var(--p-muted); font-weight: 600; }
.pos-root .pos-precio-ori b { font-size: 18px; }
.pos-root .pos-precio-dif { border-radius: 8px; padding: 8px 12px; font-weight: 600; font-size: 13px; }
.pos-root .pos-precio-dif.baja { background: #fdeceb; color: #b42318; }
.pos-root .pos-precio-dif.sube { background: #e6f5ee; color: #0f7a4d; }
.pos-root .pos-cp-sel,
.pos-root .pos-cp-fecha { height: 38px; border: 1.5px solid var(--p-line); border-radius: 8px; background: var(--p-surface); color: var(--p-fg); padding: 0 10px; font-size: 13px; }
.pos-root .pos-cp-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--p-muted); cursor: pointer; }
.pos-root .pos-cp-resumen { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-root .pos-cp-resumen div { background: var(--p-s2); border-radius: 8px; padding: 8px 12px; min-width: 120px; }
.pos-root .pos-cp-resumen span { display: block; font-size: 11px; color: var(--p-muted); text-transform: uppercase; letter-spacing: .05em; }
.pos-root .pos-cp-resumen b { font-size: 16px; }
.pos-root .pos-tabla td.baja { color: #b42318; font-weight: 600; }
.pos-root .pos-tabla td.sube { color: #0f7a4d; font-weight: 600; }
.pos-root.pos-cp-pagina { display: block; height: 100vh; overflow: auto; padding: 16px; }
.pos-root.pos-cp-pagina .pos-cp-cab { background: linear-gradient(120deg, var(--p-top), var(--p-acc)); color: #fff; border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; }
.pos-root.pos-cp-pagina .pos-cp-cab h3 { margin: 0; font-size: 16px; font-weight: 700; }
.pos-root.pos-cp-pagina .pos-cp-cab p { margin: 2px 0 0; font-size: 12px; opacity: .85; }
.pos-root.pos-cp-pagina .pos-cp-cuerpo { display: grid; gap: 12px; }
/* ══ Regalos / bonificaciones (transferencias gratuitas) y «ver detalle» de totales (04/11/2026) ══ */
.pos-root .pos-linea.gratis { background: #ecfdf3; box-shadow: inset 3px 0 0 #16a34a; }
.pos-root .pos-linea.gratis .amt { color: #15803d; }
.pos-root .pos-linea .m span.grat { background: #dcfce7; color: #15803d; font-weight: 700; }
.pos-root .pos-tot .grat { color: #15803d; font-weight: 600; }
.pos-root .pos-gratis-op { display: flex; align-items: flex-start; gap: 10px; border: 1.5px solid var(--p-line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.pos-root .pos-gratis-op.on { border-color: #16a34a; background: #ecfdf3; }
.pos-root .pos-gratis-op input { width: 16px; height: 16px; margin-top: 2px; accent-color: #16a34a; }
.pos-root .pos-gratis-op span { display: grid; gap: 2px; }
.pos-root .pos-gratis-op b { color: #15803d; }
.pos-root .pos-gratis-op small { color: var(--p-muted); font-size: 12px; }
.pos-root .pos-precio-dif.gratis { background: #dcfce7; color: #15803d; }
.pos-root .pos-totdet { display: grid; gap: 2px; border: 1px solid var(--p-line); border-radius: 8px; padding: 8px 12px; background: var(--p-surface); }
.pos-root .pos-totdet > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--p-line); font-size: 13px; }
.pos-root .pos-totdet > div:last-child { border-bottom: none; }
.pos-root .pos-totdet .sub { padding-left: 14px; font-size: 12px; color: var(--p-muted); }
.pos-root .pos-totdet .grat { color: #15803d; }
.pos-root .pos-totdet .tot { font-size: 17px; font-weight: 700; padding-top: 8px; }

/* ══ CloudERP (29/10/2026): pantalla completa sobre el shell (ErpLayout) ══
   Por encima de la barra/menú (--z-shell 1200) y de la pantalla de carga (2500); por debajo de --z-modal (3000),
   así MdCobranza, el diálogo de formato, la búsqueda de cliente, los diálogos y los toasts del shell quedan encima. */
.pb-root, .pos-root { position: fixed; inset: 0; z-index: 2501; }
.pb-root { min-height: 0; height: auto; }
.pos-root { height: auto; }
