/* ================================================================ TPV · pantalla completa, táctil y con teclado
 * Dos temas propios (noche y día) con los colores de la marca: azul marino #0B1B2B, azul Enterprise #0B8BC2,
 * azul claro #5CC8F2 y naranja #FFB200. Las ventanas del TPV (cobro, caja, panel…) toman el tema del body.
 * Con «reducir movimiento» del sistema no hay animaciones.
 */
body.tpv-abierto { overflow: hidden; }
.tpv, body[data-tpv-tema] .dialogo-tpv {
  --t-azul: #0B8BC2; --t-azul2: #5CC8F2; --t-marino: #0B1B2B; --t-naranja: #FFB200;
  --t-bien: #3fcf8e; --t-aviso: #f5b042; --t-mal: #f06a5c;
}
.tpv[data-tema="noche"], body[data-tpv-tema="noche"] .dialogo-tpv {
  --t-fondo: #07131f; --t-sup: rgba(20, 38, 56, .78); --t-sup2: rgba(32, 56, 80, .72); --t-sup3: #13263a;
  --t-borde: rgba(120, 170, 210, .16); --t-borde2: rgba(120, 170, 210, .3);
  --t-texto: #eaf3fb; --t-texto2: #a9bccd; --t-tenue: #6f8496; --t-papel: #fbfaf6; --t-papel-texto: #1b2430;
  --t-sombra: 0 10px 30px rgba(0, 0, 0, .35);
}
.tpv[data-tema="dia"], body[data-tpv-tema="dia"] .dialogo-tpv {
  --t-fondo: #eef4f9; --t-sup: rgba(255, 255, 255, .85); --t-sup2: #f3f7fb; --t-sup3: #ffffff;
  --t-borde: rgba(11, 27, 43, .09); --t-borde2: rgba(11, 27, 43, .18);
  --t-texto: #0f1f2e; --t-texto2: #4c6075; --t-tenue: #8496a8; --t-papel: #ffffff; --t-papel-texto: #1b2430;
  --t-sombra: 0 10px 28px rgba(11, 27, 43, .12);
}
.tpv {
  position: fixed; inset: 0; z-index: 900; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  background: var(--t-fondo); color: var(--t-texto); font-family: var(--fuente); overflow: hidden; isolation: isolate;
}
.tpv button { font: inherit; color: inherit; }
.tpv kbd, .dialogo-tpv kbd { font: 600 10px/1 var(--fuente); padding: 3px 5px; border-radius: 5px; border: 1px solid var(--t-borde2); background: var(--t-sup2); color: var(--t-texto2); }
.tpv-cab { grid-row: 1; } .tpv-aviso-con { grid-row: 2; } .tpv-cuerpo { grid-row: 3; } .tpv-movil { grid-row: 4; }
.tpv svg { flex: none; }
.tpv button > svg, .tpv a > svg, .dialogo-tpv button > svg, .dialogo-tpv a > svg, .tpv-dev > svg, .tpv-aviso-con > svg, .tpv-fam > svg { width: 18px; height: 18px; vertical-align: middle; }
.tpv .btn > svg, .dialogo-tpv .btn > svg { margin-right: 6px; }
.tpv .acceso img { width: 18px; height: 18px; }
.tpv-cargando { display: grid; place-items: center; align-content: center; gap: 12px; height: 100vh; background: #07131f; color: #eaf3fb; }
.tpv:has(> .tpv-cargando) { background: #07131f; }
.tpv > .tpv-cargando { grid-row: 1 / -1; height: auto; min-height: 100%; }
.tpv-cargando p { max-width: 420px; text-align: center; margin: 0; }
.tpv-cargando img.quieto { animation: none; }
.tpv-cargando-bot { display: flex; gap: 10px; }
.tpv-cargando .btn:not(.btn-primario) { background: transparent; color: #eaf3fb; border: 1px solid rgba(234, 243, 251, .45); }
.tpv-cargando .btn:not(.btn-primario):hover { background: rgba(234, 243, 251, .1); }
.tpv-cargando img { width: 64px; animation: tpv-gira 2.4s linear infinite; }
@keyframes tpv-gira { to { transform: rotate(360deg); } }

/* fondo con profundidad: degradados de la marca que flotan despacio */
.tpv-fondo { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.tpv-fondo i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: tpv-flota 22s ease-in-out infinite alternate; }
.tpv-fondo i:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: -14vw; background: radial-gradient(circle, #0B8BC2, transparent 70%); }
.tpv-fondo i:nth-child(2) { width: 38vw; height: 38vw; right: -8vw; bottom: -12vw; background: radial-gradient(circle, #5CC8F2, transparent 70%); opacity: .35; animation-delay: -8s; }
.tpv-fondo i:nth-child(3) { width: 26vw; height: 26vw; right: 30vw; top: 40vh; background: radial-gradient(circle, #FFB200, transparent 70%); opacity: .14; animation-delay: -14s; }
.tpv[data-tema="dia"] .tpv-fondo i { opacity: .22; }
@keyframes tpv-flota { to { transform: translate(4vw, 3vh) scale(1.08); } }

/* cabecera */
.tpv-cab { display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-height: 60px;
  background: linear-gradient(180deg, rgba(11, 27, 43, .96), rgba(11, 27, 43, .82)); color: #fff; border-bottom: 1px solid rgba(92, 200, 242, .15); backdrop-filter: blur(10px); }
.tpv-marca { display: flex; align-items: center; gap: 8px; }
.tpv-marca img { width: 36px; height: 36px; filter: drop-shadow(0 0 10px rgba(92, 200, 242, .45)); }
.tpv-marca b { font-family: Sora, var(--fuente); font-size: 19px; letter-spacing: .5px; display: block; line-height: 1; }
.tpv-marca b span { color: #5CC8F2; }
.tpv-marca small { font-size: 10px; opacity: .65; white-space: nowrap; }
.tpv-caja-chip { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff;
  border-radius: 999px; padding: 4px 14px 4px 9px; cursor: pointer; text-align: left; min-height: 42px; }
.tpv-caja-chip i { width: 10px; height: 10px; border-radius: 50%; background: #9aa5b1; flex: none; }
.tpv-caja-chip.abierta i { background: var(--t-bien); box-shadow: 0 0 0 4px rgba(63, 207, 142, .22); animation: tpv-late 2.4s infinite; }
.tpv-caja-chip.cerrada i { background: var(--t-mal); }
.tpv-caja-chip b { display: block; font-size: 13px; } .tpv-caja-chip small { font-size: 11px; opacity: .72; }
.tpv-reloj { display: grid; line-height: 1.05; text-align: center; padding: 0 6px; }
.tpv-reloj b { font-family: Sora, var(--fuente); font-size: 18px; font-variant-numeric: tabular-nums; }
.tpv-reloj small { font-size: 10px; opacity: .65; text-transform: capitalize; }
.tpv-con { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; opacity: .85; }
.tpv-con i { width: 8px; height: 8px; border-radius: 50%; background: var(--t-bien); }
.tpv-con.mal { opacity: 1; color: #ffb4a8; font-weight: 700; }
.tpv-con.mal i { background: var(--t-mal); animation: tpv-late 1s infinite; }
@keyframes tpv-late { 50% { opacity: .35; } }
.tpv .hueco { flex: 1; }
.tpv-bot { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px; min-height: 50px; padding: 4px 8px;
  border: 0; border-radius: 12px; background: transparent; color: #fff !important; cursor: pointer; font-size: 11px; transition: background .15s; }
.tpv-bot:hover, .tpv-bot:focus-visible { background: rgba(255, 255, 255, .1); }
.tpv-bot > svg { width: 22px !important; height: 22px !important; }
.tpv-bot kbd { position: absolute; bottom: -2px; right: 2px; font-size: 8px; padding: 1px 3px; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #cfe4f2; }
.tpv-bot b { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--t-naranja); color: #111; font-size: 11px; line-height: 18px; }
.tpv-bot-mini { min-width: 42px; }
.tpv-aviso-con { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: linear-gradient(90deg, #c2412d, #e0593f); color: #fff; font-weight: 600; }

/* cuerpo: catálogo + ticket */
.tpv-cuerpo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(340px, 1fr); gap: 14px; padding: 14px; min-height: 0; }
.tpv-catalogo { display: grid; grid-template-rows: auto auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); gap: 12px; min-height: 0; min-width: 0; }
.tpv-lector { display: flex; align-items: center; gap: 10px; background: var(--t-sup); border: 1px solid var(--t-borde2); border-radius: 18px; padding: 6px 8px 6px 16px;
  box-shadow: var(--t-sombra); backdrop-filter: blur(12px); transition: border-color .15s, box-shadow .15s; }
.tpv-lector:focus-within { border-color: var(--t-azul); box-shadow: 0 0 0 4px rgba(11, 139, 194, .2), var(--t-sombra); }
.tpv-lector input { flex: 1; border: 0; background: transparent; font-size: 20px; padding: 12px 0; color: var(--t-texto); outline: 0; min-width: 0; }
.tpv-lector input::placeholder { color: var(--t-tenue); }
.tpv-lector-ic { color: var(--t-azul2); display: flex; } .tpv-lector-ic svg { width: 24px; height: 24px; }
.tpv-cam { border: 0; background: var(--t-sup2); border-radius: 12px; width: 48px; height: 48px; cursor: pointer; display: grid; place-items: center; }
.tpv-cam svg { width: 22px !important; height: 22px !important; }
.tpv-familias { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.tpv-fam { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--t-borde); background: var(--t-sup); border-radius: 999px;
  padding: 6px 16px 6px 6px; min-height: 44px; cursor: pointer; white-space: nowrap; transition: transform .12s, background .15s, border-color .15s; backdrop-filter: blur(8px); }
.tpv-fam i, .tpv-fam > svg { width: 32px !important; height: 32px !important; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800;
  background: color-mix(in srgb, var(--fam) 25%, transparent); color: var(--fam); padding: 6px; box-sizing: border-box; }
.tpv-fam:hover { transform: translateY(-1px); border-color: var(--fam); }
.tpv-fam.activa { background: var(--fam); border-color: var(--fam); color: #0b1b2b; font-weight: 700; box-shadow: 0 6px 18px color-mix(in srgb, var(--fam) 40%, transparent); }
.tpv-fam.activa i, .tpv-fam.activa > svg { background: rgba(255, 255, 255, .35); color: #0b1b2b; }
.tpv-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; overflow-y: auto; align-content: start; padding: 2px 4px 10px 2px; }
.tpv-art { position: relative; display: grid; grid-template-rows: 112px auto auto; text-align: left; border: 1px solid var(--t-borde); background: var(--t-sup);
  border-radius: 18px; overflow: hidden; cursor: pointer; padding: 0; box-shadow: var(--t-sombra); backdrop-filter: blur(10px);
  transition: transform .15s, box-shadow .2s, border-color .2s; content-visibility: auto; contain-intrinsic-size: 190px; animation: tpv-entra .35s both; animation-delay: calc(var(--i, 0) * 18ms); }
@keyframes tpv-entra { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.tpv-art:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--fam) 60%, transparent); box-shadow: 0 14px 30px rgba(0, 0, 0, .25), 0 0 0 1px color-mix(in srgb, var(--fam) 40%, transparent); }
.tpv-art:active { transform: scale(.96); }
.tpv-art-foto { position: relative; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--fam) 40%, var(--t-sup3)), color-mix(in srgb, var(--fam) 10%, var(--t-sup3))); overflow: hidden; }
.tpv-art-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpv-art-ini { font-family: Sora, var(--fuente); font-weight: 800; font-size: 32px; color: rgba(255, 255, 255, .85); text-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.tpv-stock { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; backdrop-filter: blur(6px); }
.tpv-stock.ok { background: rgba(63, 207, 142, .9); color: #062616; }
.tpv-stock.bajo { background: rgba(245, 176, 66, .95); color: #2c1b00; }
.tpv-stock.sin { background: rgba(240, 106, 92, .95); color: #fff; }
.tpv-art-nom { padding: 10px 12px 0; font-size: 13.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.tpv-art-pie { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 6px 12px 12px; }
.tpv-precio { font-family: Sora, var(--fuente); font-size: 22px; letter-spacing: -.5px; }
.tpv-precio sup { font-size: 12px; top: -.6em; margin-left: 1px; }
.tpv-art-pie small { font-size: 10px; color: var(--t-tenue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpv-art-fav { position: absolute; top: 8px; right: 8px; color: var(--t-naranja); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.tpv-art-fav svg { fill: currentColor; width: 18px; height: 18px; }
.tpv-art-mas { position: absolute; right: 10px; top: 84px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700;
  background: var(--t-azul); color: #fff; box-shadow: 0 6px 14px rgba(11, 139, 194, .45); transform: scale(.6); opacity: 0; transition: transform .18s, opacity .18s; }
.tpv-art:hover .tpv-art-mas, .tpv-art:focus-visible .tpv-art-mas { transform: scale(1); opacity: 1; }
.tpv-vuela { position: fixed; z-index: 2000; border-radius: 18px; overflow: hidden; pointer-events: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--fam, #0B8BC2), #fff); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.tpv-vuela img { width: 100%; height: 100%; object-fit: cover; }
.tpv-vuela .tpv-stock { display: none; }

/* estados vacíos ilustrados */
.tpv-vacio { display: grid; place-items: center; gap: 10px; color: var(--t-texto2); padding: 30px 16px; text-align: center; grid-column: 1 / -1; }
.tpv-vacio svg { width: 120px; height: 96px; }
.tpv-vacio .v1 { fill: color-mix(in srgb, var(--t-azul) 18%, transparent); stroke: var(--t-azul2); stroke-width: 2; }
.tpv-vacio .v2 { fill: color-mix(in srgb, var(--t-naranja) 18%, transparent); stroke: var(--t-naranja); stroke-width: 2; }
.tpv-vacio .v3 { fill: var(--t-azul); opacity: .85; }
.tpv-vacio .v4 { stroke: var(--t-tenue); stroke-width: 3; stroke-linecap: round; fill: none; }
.tpv-vacio .v5 { stroke: #fff; stroke-width: 3; stroke-linecap: round; }

/* el ticket: un recibo de papel que va creciendo */
.tpv-ticket { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 0; min-width: 0; }
.tpv-cliente { grid-row: 1; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--t-sup); border: 1px solid var(--t-borde); backdrop-filter: blur(10px); }
.tpv-dev { grid-row: 2; } .tpv-papel { grid-row: 3; } .tpv-acciones { grid-row: 4; }
.tpv-cliente > div { flex: 1; min-width: 0; }
.tpv-cliente b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpv-cliente small { display: block; font-size: 12px; color: var(--t-texto2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpv-cli-av { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; font-family: Sora, var(--fuente); font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--fam, #0B8BC2), color-mix(in srgb, var(--fam, #0B8BC2) 50%, #0B1B2B)); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.tpv-cli-av.contado { background: linear-gradient(135deg, #0B8BC2, #5CC8F2); }
.tpv-cat { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(245, 176, 66, .2); color: var(--t-aviso); }
.tpv-cliente .btn { min-height: 40px; }
.tpv-dev { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(245, 176, 66, .16); color: var(--t-aviso); font-size: 13px; font-weight: 600; }
.tpv-papel { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; background: var(--t-papel); color: var(--t-papel-texto);
  border-radius: 6px 6px 0 0; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); padding-bottom: 14px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, radial-gradient(circle 7px at 10px 100%, transparent 98%, #000) bottom / 20px 10px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, radial-gradient(circle 7px at 10px 100%, transparent 98%, #000) bottom / 20px 10px repeat-x; }
.tpv-papel-cab { text-align: center; padding: 14px 14px 10px; border-bottom: 2px dashed #d8d4ca; }
.tpv-papel-cab b { display: block; font-family: Sora, var(--fuente); letter-spacing: .5px; }
.tpv-papel-cab small { font-size: 11px; color: #6b7280; }
.tpv-lineas { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; }
.tpv-lin { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 10px 14px 10px 16px; border-bottom: 1px dotted #e3dfd5; position: relative; }
.tpv-lin-txt { grid-column: 1 / -1; }
.tpv-lin-imp { justify-self: end; }
.tpv-lin::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--fam); }
.tpv-lin.nueva { animation: tpv-imprime .5s ease-out; }
@keyframes tpv-imprime { from { opacity: 0; transform: translateY(-10px); background: rgba(11, 139, 194, .14); } to { background: transparent; } }
.tpv-lin.neg .tpv-lin-imp { color: #c2412d; }
.tpv-lin-txt { min-width: 0; }
.tpv-lin-txt b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpv-lin-txt small { font-size: 11.5px; color: #6b7280; }
.tpv-dto { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #fff1cc; color: #8a5a05; }
.tpv-sinstock { color: #c2412d; font-weight: 600; }
.tpv-lin-cant { display: flex; align-items: center; border: 1px solid #e3dfd5; border-radius: 12px; overflow: hidden; background: #fff; }
.tpv-lin-cant button { width: 40px; height: 40px; border: 0; background: #f4f1ea; color: #1b2430 !important; font-size: 20px; cursor: pointer; }
.tpv-lin-cant button:active { background: #e8e3d8; }
.tpv-lin-cant input { width: 46px; height: 40px; border: 0; text-align: center; font-size: 15px; background: #fff; color: #1b2430; }
.tpv-lin-imp { min-width: 78px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.tpv-lin-mas { border: 0; background: transparent; color: #9aa3ad !important; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; }
.tpv-lin-mas:hover { background: #f4f1ea; }
.tpv-lin-vacio .tpv-vacio { color: #6b7280; }
.tpv-totales { padding: 10px 16px 6px; border-top: 2px dashed #d8d4ca; }
.tpv-tot-fila { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tpv-tot-fila span { color: #6b7280; font-size: 12px; }
.tpv-ahorro { color: #1f6b3f !important; font-weight: 700; background: #e6f4ec; padding: 2px 8px; border-radius: 999px; }
.tpv-tot-grande span { font-size: 15px; font-weight: 700; color: #1b2430; text-transform: uppercase; letter-spacing: 1px; }
.tpv-total { font-family: Sora, var(--fuente); font-size: 40px; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.tpv-totales > small { color: #6b7280; font-size: 11px; }
.tpv-acciones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.9fr); gap: 8px; }
.tpv-acciones .btn { min-height: 58px; min-width: 0; padding: 4px 8px; flex-direction: column; gap: 3px; font-size: 12px; border-radius: 14px;
  background: var(--t-sup); color: var(--t-texto); border: 1px solid var(--t-borde); backdrop-filter: blur(8px); }
.tpv-acciones .btn > svg { margin: 0; width: 20px; height: 20px; }
.tpv-cobrar { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; border-radius: 16px; min-height: 58px; padding: 0 18px;
  background: linear-gradient(135deg, #0B8BC2, #0a6e9b 60%, #0B1B2B); color: #fff !important; font-size: 18px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 26px rgba(11, 139, 194, .45); position: relative; overflow: hidden; }
.tpv-cobrar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%); transform: translateX(-100%); animation: tpv-brillo 3.5s infinite; }
@keyframes tpv-brillo { 60%, 100% { transform: translateX(100%); } }
.tpv-cobrar kbd { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .3); margin-left: 6px; }
.tpv-cobrar b { font-family: Sora, var(--fuente); font-size: 22px; }
.tpv-cobrar:disabled, .tpv-cobrar-movil:disabled { filter: grayscale(1); opacity: .6; cursor: not-allowed; }
.tpv-movil { display: none; }

/* ventanas del TPV */
body[data-tpv-tema] .dialogo-tpv { background: var(--t-fondo); color: var(--t-texto); }
body[data-tpv-tema] .dialogo-tpv .dialogo-cuerpo { background: var(--t-fondo); color: var(--t-texto); }
body[data-tpv-tema] .dialogo-tpv .tpv-nota, body[data-tpv-tema] .dialogo-tpv .cp-sub { color: var(--t-texto2); }
body[data-tpv-tema] .dialogo-tpv input, body[data-tpv-tema] .dialogo-tpv select { background: var(--t-sup3); color: var(--t-texto); border-color: var(--t-borde2); }
body[data-tpv-tema="noche"] .dialogo-tpv .btn:not(.btn-primario) { background: var(--t-sup2); color: var(--t-texto); border-color: var(--t-borde2); }
body[data-tpv-tema="noche"] .dialogo-tpv .tabla { color: var(--t-texto); }
body[data-tpv-tema="noche"] .dialogo-tpv .tabla th, body[data-tpv-tema="noche"] .dialogo-tpv .tabla td { border-color: var(--t-borde); background: transparent; color: var(--t-texto); }
.dialogo-tpv { width: min(560px, calc(100vw - 24px)); }
.dialogo-tpv-ancho { width: min(1100px, calc(100vw - 24px)); }
.dialogo-tpv-panel { width: min(1320px, calc(100vw - 16px)); }
.dialogo-tpv .tpv-form { display: grid; gap: 12px; padding: 16px 20px; }
.tpv-nota { color: var(--t-texto2, var(--texto-2)); font-size: 13px; margin: 6px 0; }
.tpv-sub { margin: 10px 0 2px; }
.tpv-grande input { font-size: 26px; padding: 12px 14px; font-family: Sora, var(--fuente); }
.tpv-stock-alm { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tpv-stock-alm span { border: 1px solid var(--t-borde2, var(--borde)); border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.tpv-stock-alm span.suyo { border-color: #0B8BC2; }
.tpv-stock-alm span b { margin-left: 6px; }
.tpv-series { display: grid; gap: 6px; padding: 12px 20px; max-height: 50vh; overflow-y: auto; }
.tpv-serie { display: flex; gap: 10px; align-items: center; border: 1px solid var(--t-borde2, var(--borde)); border-radius: 12px; padding: 8px 10px; }
.tpv-serie input[inputmode] { width: 80px; }
.tpv-serie small { display: block; color: var(--t-texto2, var(--texto-2)); }
.tpv-clientes, .tpv-aparcadas { list-style: none; margin: 0; padding: 0 20px 16px; display: grid; gap: 6px; max-height: 55vh; overflow-y: auto; }
.tpv-clientes button, .tpv-aparcadas button[data-id] { width: 100%; text-align: left; border: 1px solid var(--t-borde2, var(--borde)); background: var(--t-sup3, var(--superficie));
  color: var(--t-texto, var(--texto)); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: grid; }
.tpv-aparcadas li { display: flex; gap: 6px; align-items: center; }
.tpv-aparcadas button[data-id] { grid-template-columns: 1fr auto; }
.tpv-aparcadas small, .tpv-clientes small { color: var(--t-texto2, var(--texto-2)); font-size: 12px; }
.tpv-aparcadas em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-weight: 700; }
.tpv-cajas { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 16px 20px 20px; }
.tpv-caja-op { display: grid; gap: 4px; text-align: left; border: 2px solid var(--t-borde2, var(--borde)); border-radius: 16px; padding: 16px; background: var(--t-sup3, var(--superficie)); color: var(--t-texto, var(--texto)); cursor: pointer; transition: transform .12s, border-color .15s; }
.tpv-caja-op:hover { transform: translateY(-2px); border-color: #0B8BC2; }
.tpv-caja-op.abierta { border-color: var(--t-bien, #2e9e5b); }
.tpv-caja-op small { color: var(--t-texto2, var(--texto-2)); }
.tpv-caja-op em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--t-texto2, var(--texto-2)); }
.tpv-caja-op.abierta em { color: var(--t-bien, #2e9e5b); }
.tpv-pestanas { display: flex; gap: 4px; padding: 8px 20px 0; border-bottom: 1px solid var(--t-borde, var(--borde)); overflow-x: auto; }
.tpv-pestanas button { border: 0; background: transparent; color: var(--t-texto2, var(--texto-2)); padding: 12px 14px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tpv-pestanas button.activa { color: var(--t-texto, var(--texto)); border-bottom-color: #0B8BC2; font-weight: 700; }
.tpv-caja-cuerpo { padding: 16px 20px; max-height: 72vh; overflow-y: auto; }

/* billetes y monedas dibujados */
.tpv-billete { position: relative; width: 92px; height: 52px; border-radius: 6px; border: 0; cursor: pointer; overflow: hidden; color: #fff !important;
  background: linear-gradient(135deg, var(--bil), color-mix(in srgb, var(--bil) 55%, #000)); box-shadow: 0 4px 10px rgba(0, 0, 0, .25), inset 0 0 0 2px rgba(255, 255, 255, .25);
  display: grid; place-items: center; transition: transform .12s; }
.tpv-billete i { font-style: normal; font-family: Sora, var(--fuente); font-weight: 800; font-size: 22px; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); z-index: 1; }
.tpv-billete em { position: absolute; left: 6px; top: 4px; font-style: normal; font-size: 7px; letter-spacing: 1px; opacity: .8; }
.tpv-billete s { position: absolute; right: -12px; top: -12px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); }
.tpv-billete:active, .tpv-moneda-d:active { transform: scale(.94); }
.tpv-moneda-d { position: relative; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-content: center; line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3), inset 0 -3px 0 rgba(0, 0, 0, .18), inset 0 2px 0 rgba(255, 255, 255, .35); transition: transform .12s; color: #3a2a00 !important; }
.tpv-moneda-d i { font-style: normal; font-weight: 800; font-size: 16px; } .tpv-moneda-d em { font-style: normal; font-size: 9px; }
.tpv-moneda-d.oro { background: radial-gradient(circle at 35% 30%, #fff1a8, #e2b93b 55%, #b8891a); }
.tpv-moneda-d.cobre { background: radial-gradient(circle at 35% 30%, #ffd2b0, #c8743c 55%, #8f4a1f); color: #3b1a05 !important; }
.tpv-moneda-d.bi1 { background: radial-gradient(circle, #e9e9ee 0 46%, #d9b44a 48% 100%); }
.tpv-moneda-d.bi2 { background: radial-gradient(circle, #e2b93b 0 46%, #e9e9ee 48% 100%); }
.tpv-billetes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tpv-billetes .tpv-exacto, .tpv-billetes .tpv-borrar { min-height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--t-borde2); background: var(--t-sup2); font-weight: 700; cursor: pointer; }
.tpv-cajon { position: relative; height: 54px; margin: 6px 0 12px; border-radius: 12px; background: linear-gradient(180deg, #2a3b4d, #1a2836); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1); }
.tpv-cajon-frente { position: absolute; inset: 10px 8% 0; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #34495e, #22313f); }
.tpv-cajon-frente i { position: absolute; left: 50%; top: 14px; width: 60px; height: 8px; margin-left: -30px; border-radius: 4px; background: #5CC8F2; opacity: .7; }
.tpv-monedas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.tpv-moneda { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; border: 1px solid var(--t-borde2, var(--borde)); border-radius: 14px; padding: 8px; background: var(--t-sup, var(--superficie-2)); }
.tpv-moneda .tpv-billete { width: 64px; height: 38px; } .tpv-moneda .tpv-billete i { font-size: 16px; }
.tpv-moneda .tpv-moneda-d { width: 40px; height: 40px; } .tpv-moneda .tpv-moneda-d i { font-size: 12px; }
.tpv-moneda-ctl { display: flex; align-items: center; border: 1px solid var(--t-borde2, var(--borde)); border-radius: 10px; overflow: hidden; }
.tpv-moneda-ctl button { width: 30px; height: 36px; border: 0; background: var(--t-sup2, var(--superficie-2)); cursor: pointer; font-size: 18px; color: var(--t-texto, var(--texto)); }
.tpv-moneda-ctl input { width: 100%; min-width: 0; height: 36px; border: 0 !important; text-align: center; font-size: 15px; }
.tpv-suma { text-align: right; font-size: 15px; }
.tpv-es { display: grid; grid-template-columns: 160px 1fr auto; gap: 10px; align-items: end; }
.tpv-es-bot { display: flex; gap: 6px; }
.tpv-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tpv-cuadre { display: flex; flex-wrap: wrap; gap: 18px; padding: 14px; margin: 12px 0; border-radius: 14px; background: var(--t-sup2, var(--superficie-2)); font-size: 16px; }
.tpv-cuadre .bien b { color: var(--t-bien); } .tpv-cuadre .mal b { color: var(--t-mal); }
.tpv-cuadra { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.tpv-cuadra.bien { background: rgba(63, 207, 142, .15); color: var(--t-bien); }
.tpv-cuadra.mal { background: rgba(240, 106, 92, .15); color: var(--t-mal); }
.tpv-cuadra.aviso { background: rgba(245, 176, 66, .15); color: var(--t-aviso); }
.tpv-cerrada { text-align: center; }
.tpv-cerrada > svg { width: 56px; height: 56px; color: var(--t-bien); }
.tpv-medios-barras .tpv-fp-f.efectivo i::after { background: linear-gradient(90deg, #3fcf8e, #5CC8F2); }
.tpv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.tpv-kpi { border: 1px solid var(--t-borde, var(--borde)); border-radius: 16px; padding: 12px 14px; background: var(--t-sup, var(--superficie)); text-align: left; }
.tpv-kpi small { display: block; color: var(--t-texto2, var(--texto-2)); font-size: 12px; }
.tpv-kpi b { font-family: Sora, var(--fuente); font-size: 22px; font-variant-numeric: tabular-nums; }
.tpv-kpi em { display: block; font-style: normal; font-size: 12px; color: var(--t-texto2, var(--texto-2)); }
.tpv-kpi em.sube { color: var(--t-bien); } .tpv-kpi em.baja { color: var(--t-mal); }
.tpv-kpi.destacado { border-color: #0B8BC2; background: linear-gradient(135deg, rgba(11, 139, 194, .22), rgba(92, 200, 242, .06)); }
.tpv-kpi.mal b { color: var(--t-mal); } .tpv-kpi.bien b { color: var(--t-bien); }
.tpv-kpis.grandes .tpv-kpi b { font-size: 26px; } .tpv-kpis.grandes .tpv-kpi.destacado b { font-size: 38px; }
.tpv-tabla { width: 100%; }
.tpv-filtro { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 12px 20px; }
.tpv-lista { padding: 0 20px 16px; }
.tpv-acc { display: inline-flex; gap: 2px; }

/* cobro a pantalla completa (vw y vh divididos por --zoom, como los demás diálogos a pantalla completa: con la app al 80 % llena igual) */
.dialogo-tpv-cobro { width: calc(100vw / var(--zoom, 1)) !important; height: calc(100vh / var(--zoom, 1)); max-width: none; max-height: none; margin: 0; border-radius: 0 !important; padding: 0; }
.dialogo-tpv-cobro .dialogo-cuerpo { min-height: calc(100vh / var(--zoom, 1)); display: grid; grid-template-rows: auto 1fr;
  background: radial-gradient(1200px 600px at 80% 20%, rgba(11, 139, 194, .25), transparent 60%), radial-gradient(800px 500px at 10% 90%, rgba(255, 178, 0, .08), transparent 60%), var(--t-fondo); }
.tpv-cobro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 20px; padding: 20px 24px 24px; min-height: 0; }
.tpv-cobro-izq { display: grid; align-content: start; gap: 16px; }
.tpv-cobro-der { display: grid; align-content: center; justify-items: center; gap: 8px; text-align: center; padding: 20px; border-radius: 24px;
  background: var(--t-sup); border: 1px solid var(--t-borde); box-shadow: var(--t-sombra); }
.tpv-cobro-et { margin: 0; color: var(--t-texto2); text-transform: uppercase; letter-spacing: 2px; font-size: 13px; font-weight: 700; }
.tpv-cobro-total { margin: 0; font-family: Sora, var(--fuente); font-size: clamp(44px, 7vw, 84px); font-weight: 800; letter-spacing: -2px; color: var(--t-texto); }
.tpv-cobro-cambio { margin-top: 10px; }
.tpv-cambio { margin: 0; text-align: center; font-family: Sora, var(--fuente); font-size: clamp(54px, 9vw, 108px); font-weight: 800; letter-spacing: -2px;
  color: var(--t-bien); text-shadow: 0 0 40px rgba(63, 207, 142, .35); font-variant-numeric: tabular-nums; }
.tpv-cambio.mal { color: var(--t-mal); text-shadow: 0 0 40px rgba(240, 106, 92, .3); }
.tpv-cobro-bot { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.tpv-medios { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.tpv-medio { display: grid; place-items: center; gap: 6px; min-height: 84px; border: 2px solid var(--t-borde2); border-radius: 18px; background: var(--t-sup); color: var(--t-texto) !important; cursor: pointer; transition: transform .12s, border-color .15s, background .15s; }
.tpv-medio:hover { transform: translateY(-2px); }
.tpv-medio.activo { border-color: #0B8BC2; background: linear-gradient(135deg, rgba(11, 139, 194, .3), rgba(92, 200, 242, .08)); box-shadow: 0 8px 22px rgba(11, 139, 194, .3); }
.tpv-medio svg { width: 30px !important; height: 30px !important; }
.tpv-mixto { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tpv-doc-tipo { display: flex; flex-wrap: wrap; gap: 16px; }
.tpv-doc-tipo label { display: inline-flex; gap: 8px; align-items: center; }
.tpv-confirmar { display: inline-flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 28px; border: 0; border-radius: 18px; font-size: 20px; font-weight: 700;
  background: linear-gradient(135deg, #3fcf8e, #0B8BC2); color: #fff !important; cursor: pointer; box-shadow: 0 12px 30px rgba(11, 139, 194, .4); }
.tpv-confirmar kbd { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .35); }
.tpv-confirmar svg { width: 24px !important; height: 24px !important; }
.tpv-confirmar.cargando { opacity: .7; cursor: progress; }
.tpv-confirmar:disabled { opacity: .6; }
.tpv-datafono { position: relative; width: 150px; height: 210px; margin: 6px auto; border-radius: 22px; background: linear-gradient(180deg, #24364a, #101c29); box-shadow: 0 16px 34px rgba(0, 0, 0, .35); }
.tpv-datafono i { position: absolute; left: 14px; right: 14px; top: 16px; height: 70px; border-radius: 10px; background: linear-gradient(135deg, #5CC8F2, #0B8BC2); }
.tpv-datafono b { position: absolute; left: 0; right: 0; top: 40px; text-align: center; color: #fff; font-family: Sora, var(--fuente); font-size: 18px; }
.tpv-datafono span { position: absolute; left: 22px; right: 22px; bottom: 22px; height: 80px; background: repeating-linear-gradient(90deg, #2f4560 0 30px, transparent 30px 37px), repeating-linear-gradient(0deg, #101c29 0 4px, transparent 4px 26px); border-radius: 8px; opacity: .9; }

/* venta hecha: celebración y vista previa del ticket */
.tpv-hecho { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(7, 19, 31, .7); backdrop-filter: blur(6px); animation: tpv-aparece .25s; overflow: hidden; }
@keyframes tpv-aparece { from { opacity: 0; } }
.tpv-confeti { position: absolute; inset: 0; pointer-events: none; }
.tpv-hecho-caja { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 24px; width: min(860px, calc(100vw / var(--zoom, 1) - 24px)); max-height: calc(100vh / var(--zoom, 1) - 40px);
  background: var(--t-sup3); color: var(--t-texto); border-radius: 26px; padding: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: tpv-sube .4s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tpv-sube { from { transform: translateY(30px) scale(.95); opacity: 0; } }
.tpv-hecho-izq { text-align: center; display: grid; align-content: center; }
.tpv-hecho-ok { width: 84px; height: 84px; margin: 0 auto; }
.tpv-hecho-ok circle { fill: none; stroke: var(--t-bien); stroke-width: 3; stroke-dasharray: 160; stroke-dashoffset: 160; animation: tpv-traza .5s forwards; }
.tpv-hecho-ok path { fill: none; stroke: var(--t-bien); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: tpv-traza .35s .4s forwards; }
@keyframes tpv-traza { to { stroke-dashoffset: 0; } }
.tpv-hecho h2 { margin: 8px 0 4px; font-family: Sora, var(--fuente); }
.tpv-hecho-cambio-txt { margin: 0; color: var(--t-texto2); text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 700; }
.tpv-hecho-cambio { margin: 0 0 8px; font-family: Sora, var(--fuente); font-size: 64px; font-weight: 800; color: var(--t-bien); font-variant-numeric: tabular-nums; }
.tpv-hecho-doc { color: var(--t-texto2); }
.tpv-hecho-bot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.tpv-hecho-bot .btn { min-height: 48px; }
.tpv-hecho-der { overflow-y: auto; max-height: calc(100vh / var(--zoom, 1) - 100px); }
.tpv-recibo { background: #fff; color: #111; font: 11.5px/1.4 'Sora', system-ui, sans-serif; padding: 16px 16px 22px; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); transform: rotate(1.2deg); animation: tpv-saleticket .7s ease-out;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, radial-gradient(circle 6px at 8px 100%, transparent 98%, #000) bottom / 16px 8px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, radial-gradient(circle 6px at 8px 100%, transparent 98%, #000) bottom / 16px 8px repeat-x; }
@keyframes tpv-saleticket { from { transform: translateY(-40px) rotate(1.2deg); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.tpv-recibo .c { text-align: center; } .tpv-recibo .logo { width: 34px; height: 34px; } .tpv-recibo .emp { font-weight: 800; font-size: 13px; }
.tpv-recibo .l { display: flex; justify-content: space-between; gap: 6px; } .tpv-recibo hr { border: 0; border-top: 1px dashed #999; margin: 6px 0; }
.tpv-recibo table { width: 100%; border-collapse: collapse; } .tpv-recibo td { padding: 1px 0; vertical-align: top; } .tpv-recibo .n { text-align: right; white-space: nowrap; }
.tpv-recibo .tot { font-size: 16px; font-weight: 800; } .tpv-recibo .peq { font-size: 9.5px; } .tpv-recibo .qr svg { width: 110px; height: 110px; }
.tpv-imprimir { position: fixed; width: 0; height: 0; border: 0; left: -10px; }

/* cámara */
.tpv-camara { position: absolute; inset: 0; z-index: 6; background: #000; display: grid; place-items: center; }
.tpv-camara video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpv-cam-marco { position: relative; width: min(80vw, 420px); height: 160px; border: 3px solid rgba(255, 255, 255, .9); border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
.tpv-cam-marco i { position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: #f06a5c; animation: tpv-late 1s infinite; }
.tpv-camara p { position: absolute; top: 20px; color: #fff; font-weight: 700; }
.tpv-camara .btn { position: absolute; bottom: 30px; }

/* panel «Hoy» */
.tpv-panel { padding: 16px 20px 20px; max-height: 80vh; overflow-y: auto; }
.tpv-panel-fecha { margin-left: auto; margin-right: 8px; }
.tpv-panel-cab { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 14px; }
.tpv-panel-cab .tpv-kpis { margin: 0; }
.tpv-anillo { position: relative; width: 132px; height: 132px; }
.tpv-anillo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tpv-anillo circle { fill: none; stroke-width: 12; }
.tpv-anillo .fondo { stroke: var(--t-sup2); }
.tpv-anillo .valor { stroke: url(#tpv-grad) #0B8BC2; stroke: #0B8BC2; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 6px rgba(11, 139, 194, .6)); }
.tpv-anillo .valor.logrado { stroke: #3fcf8e; filter: drop-shadow(0 0 8px rgba(63, 207, 142, .7)); }
.tpv-anillo div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tpv-anillo b { font-family: Sora, var(--fuente); font-size: 26px; } .tpv-anillo small { font-size: 11px; color: var(--t-texto2); }
.tpv-panel-rej { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.tpv-panel-rej section { border: 1px solid var(--t-borde); border-radius: 18px; padding: 14px 16px; background: var(--t-sup); min-width: 0; }
.tpv-panel-rej h4 { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tpv-ley { font-weight: 400; font-size: 12px; color: var(--t-texto2); display: inline-flex; gap: 6px; align-items: center; text-transform: none; }
.tpv-ley i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.tpv-ley i.hoy { background: linear-gradient(180deg, #5CC8F2, #0B8BC2); }
.tpv-ley i.sem { height: 10px; background: rgba(169, 188, 205, .25); border: 1px dashed var(--t-tenue); margin-left: 8px; }
.tpv-graf svg { width: 100%; height: auto; }
.tpv-graf .tpv-barra path { fill: #0B8BC2; animation: tpv-crece-y .7s both cubic-bezier(.2, .8, .2, 1); animation-delay: calc(var(--i) * 40ms); transform-origin: bottom; transform-box: fill-box; }
.tpv-graf .tpv-barra.ahora path { fill: #5CC8F2; }
.tpv-graf .tpv-barra:hover path, .tpv-graf .tpv-barra:focus path { fill: #FFB200; }
@keyframes tpv-crece-y { from { transform: scaleY(0); } }
.tpv-graf .eje { font-size: 10px; fill: var(--t-tenue); text-anchor: middle; }
.tpv-graf .rejilla { stroke: var(--t-borde); stroke-width: 1; }
.tpv-graf path.fantasma { fill: rgba(169, 188, 205, .14); }
.tpv-graf polyline.sem { fill: none; stroke: var(--t-tenue); stroke-width: 2; stroke-dasharray: 5 4; }
.tpv-podio { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin-bottom: 10px; }
.tpv-podio-p { display: grid; gap: 4px; text-align: center; font-size: 12px; min-width: 0; }
.tpv-podio-p b { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; }
.tpv-podio-p small { color: var(--t-texto2); font-size: 11px; }
.tpv-podio-p i { display: block; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 40%, #0B1B2B)); animation: tpv-crece-y .8s both; transform-origin: bottom; }
.tpv-podio-p.p1 { --c: #FFB200; } .tpv-podio-p.p1 i { height: 86px; }
.tpv-podio-p.p2 { --c: #b9c6d2; } .tpv-podio-p.p2 i { height: 60px; animation-delay: .1s; }
.tpv-podio-p.p3 { --c: #c8743c; } .tpv-podio-p.p3 i { height: 44px; animation-delay: .2s; }
.tpv-medalla { justify-self: center; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-style: normal; color: #0B1B2B; background: var(--c, #FFB200); box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
em.tpv-medalla { display: inline-grid; width: 20px; height: 20px; margin-right: 6px; font-size: 11px; vertical-align: middle; }
em.tpv-medalla.m1 { --c: #FFB200; } em.tpv-medalla.m2 { --c: #b9c6d2; } em.tpv-medalla.m3 { --c: #c8743c; }
.tpv-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tpv-top li, .tpv-fp-f { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; font-size: 13px; }
.tpv-top li span, .tpv-fp-f span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpv-top li small, .tpv-fp-f small { margin-left: 6px; color: var(--t-texto2); }
.tpv-top li i, .tpv-fp-f i, .tpv-dep i { grid-column: 1 / -1; grid-row: 2; height: 7px; border-radius: 4px; background: var(--t-sup2); position: relative; overflow: hidden; display: block; }
.tpv-top li i::after, .tpv-fp-f i::after, .tpv-dep i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, #0B8BC2, #5CC8F2); border-radius: 4px; animation: tpv-crece .9s ease-out; }
@keyframes tpv-crece { from { width: 0; } }
.tpv-fp-f { margin-bottom: 12px; }
.tpv-dep { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.tpv-dep span:nth-child(2) { display: grid; gap: 3px; } .tpv-dep small { color: var(--t-texto2); font-size: 11px; }
.tpv-dep-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--fam); }
.tpv-cp { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--t-borde); font-size: 13px; }
.tpv-cp i { width: 10px; height: 10px; border-radius: 50%; background: var(--t-tenue); }
.tpv-cp.abierta i { background: var(--t-bien); box-shadow: 0 0 0 3px rgba(63, 207, 142, .2); }
.tpv-cp.cerrada i { background: var(--t-mal); }
.tpv-cp small { display: block; color: var(--t-texto2); }
.tpv-directo ul { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: hidden; }
.tpv-directo li { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--t-borde); font-size: 13px; align-items: center;
  animation: tpv-entra .4s both; animation-delay: calc(var(--i) * 30ms); }
.tpv-directo li.cae { animation: tpv-cae .7s cubic-bezier(.2, 1.4, .4, 1) both; background: linear-gradient(90deg, rgba(63, 207, 142, .18), transparent); border-radius: 8px; }
@keyframes tpv-cae { from { transform: translateY(-40px); opacity: 0; } }
.tpv-directo li small { display: block; color: var(--t-texto2); }
.tpv-directo b.neg { color: var(--t-mal); }
.tpv-pulso { width: 10px; height: 10px; border-radius: 50%; background: var(--t-bien); box-shadow: 0 0 0 0 rgba(63, 207, 142, .5); animation: tpv-pulso 1.6s infinite; }
@keyframes tpv-pulso { to { box-shadow: 0 0 0 10px rgba(63, 207, 142, 0); } }
.tpv-calor-sec { grid-column: 1 / -1; }
.tpv-calor { display: grid; grid-template-columns: 70px repeat(var(--cols), minmax(18px, 1fr)); gap: 3px; font-size: 10px; color: var(--t-texto2); overflow-x: auto; }
.tpv-calor .h { text-align: center; } .tpv-calor .d { white-space: nowrap; text-transform: capitalize; }
.tpv-calor i { height: 18px; border-radius: 4px; background: rgba(11, 139, 194, calc(.06 + var(--a) * .94)); }
.tpv-calor i:hover { outline: 2px solid #FFB200; }
.tpv-term input { width: 100%; min-width: 60px; }
.tpv-interruptor { position: relative; display: inline-block; width: 40px; height: 22px; }
.tpv-interruptor input { opacity: 0; width: 0; height: 0; }
.tpv-interruptor span { position: absolute; inset: 0; border-radius: 11px; background: var(--borde-fuerte); cursor: pointer; transition: background .15s; }
.tpv-interruptor span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.tpv-interruptor input:checked + span { background: var(--bien); }
.tpv-interruptor input:checked + span::before { transform: translateX(18px); }
.tpv-interruptor input:focus-visible + span { outline: 2px solid #0B8BC2; outline-offset: 2px; }

/* tableta vertical y móvil */
@media (max-width: 1280px) {
  .tpv-bot kbd, .tpv-kbd-q { display: none; }
  .tpv-cobrar { padding: 0 12px; font-size: 16px; } .tpv-cobrar kbd { display: none; }
}
@media (max-width: 900px) {
  .tpv-cuerpo { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 10px; }
  .tpv-cuerpo[data-movil="productos"] .tpv-ticket { display: none; }
  .tpv-cuerpo[data-movil="ticket"] .tpv-catalogo { display: none; }
  .tpv-movil { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(11, 27, 43, .95); border-top: 1px solid rgba(92, 200, 242, .2); }
  .tpv-movil button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 52px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .06); color: #eaf3fb !important; cursor: pointer; }
  .tpv-movil button.activo { background: rgba(11, 139, 194, .35); font-weight: 700; }
  .tpv-movil .tpv-cobrar-movil { background: linear-gradient(135deg, #0B8BC2, #0a6e9b); font-weight: 700; }
  .tpv-acciones .tpv-cobrar { display: none; }
  .tpv-acciones { grid-template-columns: repeat(4, 1fr); }
  .tpv-panel-rej, .tpv-panel-cab { grid-template-columns: 1fr; }
  .tpv-anillo { justify-self: center; }
  .tpv-bot span { display: none; } .tpv-bot { min-width: 44px; }
  .tpv-reloj { display: none; }
  .tpv-cobro { grid-template-columns: 1fr; padding: 14px; }
  .tpv-cobro-der { order: -1; padding: 14px; }
  .tpv-hecho-caja { grid-template-columns: 1fr; overflow-y: auto; }
  .tpv-hecho-der { max-height: none; }
}
@media (max-width: 560px) {
  .tpv-marca div, .tpv-con span { display: none; }
  .tpv-cab { gap: 4px; padding: 6px 8px; }
  .tpv-caja-chip small { display: none; }
  .tpv-bot-mini { display: none; }
  .tpv-rejilla { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
  .tpv-art { grid-template-rows: 84px auto auto; }
  .tpv-art-mas { top: 58px; width: 30px; height: 30px; }
  .tpv-precio { font-size: 18px; }
  .tpv-es { grid-template-columns: 1fr; }
  .tpv-total { font-size: 32px; }
  .tpv-billete { width: 76px; height: 44px; } .tpv-moneda-d { width: 46px; height: 46px; }
  .tpv-hecho-cambio { font-size: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .tpv *, .tpv *::before, .tpv *::after, .dialogo-tpv *, .dialogo-tpv *::before, .dialogo-tpv *::after { animation: none !important; transition: none !important; }
}
@media print { body.tpv-abierto > *:not(.tpv-imprimir) { display: none !important; } }

/* firma del cliente */
.tpv-firma { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; background: rgba(7, 19, 31, .78); backdrop-filter: blur(6px); animation: tpv-aparece .2s; }
.tpv-firma-caja { width: min(1000px, calc(100vw / var(--zoom, 1))); height: min(720px, calc(100vh / var(--zoom, 1))); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 12px; padding: 18px;
  background: #fff; color: #0f1f2e; border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.tpv-firma-caja header { display: flex; align-items: center; gap: 14px; }
.tpv-firma-res { flex: 1; display: grid; } .tpv-firma-res small { color: #4c6075; text-transform: uppercase; letter-spacing: 1.5px; font-size: 11px; font-weight: 700; }
.tpv-firma-res b { font-family: Sora, var(--fuente); font-size: 20px; }
.tpv-firma-total { font-family: Sora, var(--fuente); font-size: 30px; }
.tpv-firma-datos { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.tpv-firma-datos input { font-size: 17px; }
.tpv-firma-pad { position: relative; border-radius: 18px; border: 2px dashed #9fb3c4; overflow: hidden; background: #fff repeating-linear-gradient(0deg, transparent 0 39px, #f1f4f7 39px 40px); }
.tpv-firma-pad canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.tpv-firma-pad .linea { position: absolute; left: 8%; right: 8%; bottom: 22%; border-top: 2px solid #b7c4d0; pointer-events: none; }
.tpv-firma-pad .x { position: absolute; left: 6%; bottom: calc(22% + 6px); color: #9fb3c4; font-size: 26px; pointer-events: none; }
.tpv-firma-pad .pista { position: absolute; right: 16px; top: 12px; color: #b7c4d0; font-size: 13px; pointer-events: none; }
.tpv-firma-caja footer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tpv-firma-caja .hueco { flex: 1; }
.tpv-firma-estado { color: var(--t-bien, #2e9e5b); font-weight: 700; display: flex; gap: 6px; justify-content: center; align-items: center; }
.tpv-firma-estado svg { width: 18px; height: 18px; }
.dialogo-tpv-qr { width: min(640px, calc(100vw - 24px)); }
.tpv-qr { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: center; padding: 18px 20px 22px; }
.tpv-qr-img { background: #fff; padding: 10px; border-radius: 14px; } .tpv-qr-img svg { width: 100%; height: auto; display: block; }
.tpv-qr > div:last-child { display: grid; gap: 10px; }
.tpv-qr input { width: 100%; font-size: 12px; }
.tpv-qr-estado { display: flex; gap: 8px; align-items: center; font-weight: 700; margin: 0; }
.tpv-qr-estado svg { width: 20px; height: 20px; color: var(--t-bien, #2e9e5b); }
.tpv-espera-firma { display: grid; place-items: center; height: 200px; border-radius: 18px; background: linear-gradient(135deg, rgba(11, 139, 194, .2), transparent); }
.tpv-espera-firma svg { width: 90px !important; height: 90px !important; color: #0B8BC2; animation: tpv-late 1.6s infinite; }
.tpv-firma-ver { background: #fff; border-radius: 14px; padding: 14px; text-align: center; } .tpv-firma-ver img { max-width: 100%; max-height: 200px; }
@media (max-width: 640px) {
  .tpv-firma-caja { border-radius: 0; padding: 12px; } .tpv-firma-datos { grid-template-columns: 1fr; } .tpv-firma-total { font-size: 22px; }
  .tpv-qr { grid-template-columns: 1fr; } .tpv-qr-img { max-width: 240px; margin: 0 auto; }
}

.tpv-reglas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.tpv-regla { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--t-borde2, var(--borde)); border-radius: 12px; }
.tpv-regla b { min-width: 80px; } .tpv-regla select { flex: 1; } .tpv-regla input { width: 100px; }
.tpv-tabletas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tpv-tabletas li { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border: 1px solid var(--t-borde2, var(--borde)); border-radius: 12px; }
.tpv-tabletas li span { display: flex; gap: 8px; align-items: center; } .tpv-tabletas svg { width: 20px; height: 20px; }
.tpv-emparejar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.tpv-previa-firma { display: flex; gap: 12px; align-items: center; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); }
.tpv-previa-firma img { width: 140px; height: 60px; object-fit: contain; background: #fff; border-radius: 8px; }
.tpv-previa-firma div { display: grid; gap: 4px; } .tpv-previa-firma small { color: var(--texto-2); }

.tpv-del-pedido { color: #0a6e9b; font-weight: 700; }
.tpv-pedidos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tpv-pedido-op { display: grid; text-align: left; gap: 2px; padding: 12px; border-radius: 14px; border: 1px solid var(--t-borde2, var(--borde)); background: var(--t-sup3, var(--superficie)); color: var(--t-texto, var(--texto)); cursor: pointer; }
.tpv-pedido-op small { color: var(--t-texto2, var(--texto-2)); } .tpv-pedido-op em { font-style: normal; font-weight: 800; }
.tpv-pedido-cab { display: grid; gap: 4px; margin: 10px 0; }
.tpv-ordinaria { display: grid; gap: 10px; padding: 12px; border-radius: 14px; border: 1px dashed var(--t-borde2); }
.tpv-ordinaria-bot { display: flex; gap: 8px; flex-wrap: wrap; }
.tpv-alta { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; align-items: end; }

/* ---------------------------------------------------------------- Enterprise POS como producto aparte (/pos) */
.modo-pos .pos-palabra { font-family: 'Unbounded', 'Source Sans 3', sans-serif; font-weight: 700; font-size: 26px; letter-spacing: -.01em; color: var(--texto, #0B1B2B); white-space: nowrap; }
.modo-pos .pos-palabra b { background: linear-gradient(120deg, #0B8BC2, #22C3A6); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-color-scheme: dark) { .modo-pos:not([data-theme="light"]) .pos-palabra { color: #F2F6FA; } }
.modo-pos[data-theme="dark"] .pos-palabra { color: #F2F6FA; }
.modo-pos #vista-app { display: none !important; }
.tpv-check { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.tpv-sap { border: 1px solid var(--borde, #d5dde6); border-radius: 12px; padding: 12px; margin-top: 8px; }
.tpv-sap-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px 12px; }
.tpv-sap .tpv-tabla input, .tpv-sap .tpv-tabla select { width: 100%; min-width: 0; }
/* cifras grandes que caben en su tarjeta (tableta y móvil) */
.tpv-kpi { min-width: 0; }
.tpv-kpi b { display: block; overflow-wrap: anywhere; }
.tpv-kpis.grandes .tpv-kpi.destacado b { font-size: clamp(24px, 3vw, 38px); }
@media (max-width: 600px) {
  .dialogo-tpv .fc-cab { position: relative; padding-right: 52px; }
  .dialogo-tpv .fc-cab > [data-cerrar] { position: absolute; top: 10px; right: 10px; }
  .tpv-panel-fecha { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- cuadrícula de artículos paginada (no se aplasta nunca) */
.tpv-resultados { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; min-width: 0; gap: 8px; }
.tpv-rejilla { --art-ancho: 156px; --art-alto: 206px; overflow: hidden; grid-auto-rows: var(--art-alto); align-content: start; min-height: 0; touch-action: pan-y; }
.tpv-rejilla > .tpv-vacio, .tpv-rejilla > :not(.tpv-art) { grid-column: 1 / -1; }
.tpv-art { height: var(--art-alto); grid-template-rows: 112px minmax(0, auto) auto; content-visibility: visible; contain-intrinsic-size: none; min-width: 0; }
.tpv-art-nom { min-height: calc(2 * 1.25em); }
.tpv-familias { scrollbar-width: none; overscroll-behavior-x: contain; }
.tpv-familias::-webkit-scrollbar { display: none; }
.tpv-res-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--t-texto2, var(--texto-2)); padding: 0 4px; }
.tpv-res-info b { color: var(--t-texto); }
.tpv-res-limpiar, .tpv-limpiar { border: 0; background: var(--t-sup2); color: var(--t-texto); border-radius: 999px; cursor: pointer; }
.tpv-res-limpiar { padding: 6px 14px; font-weight: 600; }
.tpv-limpiar { width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.tpv-limpiar svg { width: 18px; height: 18px; }
.tpv-lector .puntito { flex: none; }
.tpv-paginador { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.tpv-pag-bot { width: 64px; height: 52px; border-radius: 16px; border: 1px solid var(--t-borde2, var(--borde)); background: var(--t-sup); color: var(--t-texto); font-size: 30px; line-height: 1; cursor: pointer; box-shadow: var(--t-sombra); }
.tpv-pag-bot:disabled { opacity: .35; cursor: default; box-shadow: none; }
.tpv-pag-bot:not(:disabled):active { transform: scale(.95); }
.tpv-pag-centro { display: grid; justify-items: center; gap: 6px; }
.tpv-pag-txt { font-size: 13px; color: var(--t-texto2, var(--texto-2)); }
.tpv-pag-puntos { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tpv-pag-punto { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: var(--t-borde2, #9fb3c4); cursor: pointer; }
.tpv-pag-punto.activo { background: var(--t-azul, #0B8BC2); transform: scale(1.3); }
@media (max-width: 560px) {
  .tpv-rejilla { --art-ancho: 120px; --art-alto: 172px; }
  .tpv-art { grid-template-rows: 84px minmax(0, auto) auto; }
  .tpv-pag-bot { width: 52px; height: 46px; }
}

/* ---------------------------------------------------------------- cobro al momento: el total se comprueba con el servidor */
.tpv-cobro-total.comprobando { opacity: .55; transition: opacity .2s; }
.tpv-comprobando { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 6px; font-size: 13px; color: var(--t-texto2, var(--texto-2)); }
.tpv-comprobando .tpv-pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--t-azul, #0B8BC2); animation: tpv-late 1s ease-in-out infinite; }
@keyframes tpv-late { 50% { opacity: .25; transform: scale(.7); } }
.tpv-comprobando-mal { color: var(--t-mal, #c2412d); font-weight: 600; }
.tpv-ajuste { margin: 0 0 8px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 178, 0, .16); color: var(--t-texto); font-size: 13px; font-weight: 600; text-align: center; }

/* ventanas del POS: la cabecera y el pie quedan fijos y lo de dentro se desplaza (nada se aplasta: p. ej. la tabla de
   cajas propias con las reglas de firma y las tabletas debajo) */
.dialogo-tpv .dialogo-cuerpo > .tpv-form { flex: 1 1 auto; min-height: 0; overflow-y: auto; grid-auto-rows: max-content; align-content: start; }
.dialogo-tpv .tpv-form > .tabla-scroll { min-height: 0; }

/* el globo de depuración (Ctrl + ratón) por encima del POS a pantalla completa y de sus capas */
body.tpv-abierto > .dep-globo, .modo-pos body > .dep-globo { z-index: 2147483000; }
.tpv-firma .dep-globo, .tpv .dep-globo { z-index: 2147483000; }
.tpv-serie-fac { margin: 0 0 8px; font-size: 13px; text-align: center; color: var(--t-texto2, var(--texto-2)); display: flex; gap: 8px; align-items: flex-start; justify-content: center; }
.tpv-serie-fac.mal { padding: 10px 12px; border-radius: 12px; background: rgba(240, 106, 92, .14); color: var(--t-texto); font-weight: 600; text-align: left; }
.tpv-serie-fac svg { width: 18px; height: 18px; flex: none; color: var(--t-mal, #c2412d); }
.tpv-res-info { min-height: 30px; }
/* en tableta el botón Cobrar cabe con su importe (sin desbordar la pantalla) */
.tpv-cobrar { min-width: 0; overflow: hidden; }
.tpv-cobrar > span { white-space: nowrap; }
.tpv-cobrar b { white-space: nowrap; font-size: clamp(16px, 1.6vw, 22px); }
@media (max-width: 1200px) and (min-width: 901px) {
  .tpv-acciones { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 2.2fr); gap: 6px; }
  .tpv-cobrar { flex-direction: column; justify-content: center; gap: 0; padding: 0 8px; }
  .tpv-cobrar > span { font-size: 12px; }
}
.tpv-rejilla.compacta { --art-alto: 158px; }
.tpv-rejilla.compacta .tpv-art { grid-template-rows: 66px minmax(0, auto) auto; }
.tpv-rejilla.compacta .tpv-art-ini { font-size: 24px; }
.tpv-rejilla.compacta .tpv-art-mas { top: 40px; width: 30px; height: 30px; font-size: 18px; }
.tpv-rejilla.compacta .tpv-art-nom { padding-top: 8px; }
.tpv-rejilla.compacta .tpv-art-pie { padding: 4px 12px 10px; }
.tpv-rejilla.compacta .tpv-precio { font-size: 19px; }
.tpv-lector input::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
.tpv-precio { white-space: nowrap; flex: none; }
.tpv-art-pie { flex-wrap: nowrap; min-width: 0; }
.tpv-art-pie small { flex: 1 1 auto; min-width: 0; text-align: right; }

/* ---------------------------------------------------------------- sin conexión, series propias y cobro con tarjeta */
.tpv-con.pendiente i { background: #f5b042; box-shadow: 0 0 0 3px rgba(245, 176, 66, .25); }
.tpv-sincon-nota { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: rgba(245, 176, 66, .16); font-size: 13px; font-weight: 600; }
.tpv-sincon-nota svg { width: 18px; height: 18px; flex: none; }
.tpv-cola-mal { color: var(--t-mal, #c2412d); font-weight: 600; }
.tpv-pas-ok { color: var(--t-bien, #2e9e5b); font-weight: 600; }
.tpv-series { display: grid; gap: 6px; }
.tpv-serie-fila { display: grid; grid-template-columns: minmax(70px, auto) 110px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--t-borde2, var(--borde)); border-radius: 12px; }
.tpv-serie-fila .campo { margin: 0; }
.tpv-serie-cont { font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tpv-pas-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px 12px; }
.tpv-pas-bot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 560px) { .tpv-serie-fila { grid-template-columns: 1fr; } }
.tpv-pasarela .campo, .tpv-pas-rejilla .campo { display: grid; gap: 4px; align-content: start; }
.tpv-pasarela select { width: 100%; min-height: 42px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--t-borde2, var(--borde)); background: var(--t-sup3, #fff); color: inherit; font: inherit; }
.tpv-pasarela > .campo { max-width: 320px; margin-bottom: 8px; }

/* ---------------------------------------------------------------- panel de cajas conectadas */
.dialogo-panel-cajas { width: min(1320px, calc(100vw - 24px)); }
.pc-vistas { display: flex; gap: 6px; margin-left: auto; }
.pc-vistas .btn.activo { background: var(--t-azul, #0B8BC2); color: #fff; border-color: transparent; }
.pc-estado { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.pc-estado i { width: 10px; height: 10px; border-radius: 50%; background: #9fb3c4; }
.pc-estado.ok i { background: #3fcf8e; box-shadow: 0 0 0 3px rgba(63, 207, 142, .25); }
.pc-estado.aviso i { background: #f5b042; }
.pc-estado.mal i { background: #f06a5c; }
.pc-acciones { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pc-acciones .btn { padding: 4px 10px; min-height: 30px; font-size: 12px; }
.pc-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.pc-tarjeta { border: 1px solid var(--t-borde2, var(--borde)); border-left: 5px solid #9fb3c4; border-radius: 14px; padding: 12px; display: grid; gap: 8px; background: var(--t-sup, #fff); }
.pc-tarjeta.ok { border-left-color: #3fcf8e; } .pc-tarjeta.aviso { border-left-color: #f5b042; } .pc-tarjeta.mal { border-left-color: #f06a5c; }
.pc-tarjeta header { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pc-tarjeta header b { font-size: 18px; } .pc-tarjeta header .pc-estado { margin-left: auto; }
.pc-tarjeta dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 0; font-size: 13px; }
.pc-tarjeta dt { color: var(--t-texto2, var(--texto-2)); } .pc-tarjeta dd { margin: 0; overflow-wrap: anywhere; }

/* Gestión documental al cobrar y Enterprise Connect en la tienda (Cajas y terminales) */
.tpv-interruptor-txt { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.tpv-gd-cajas { display: grid; gap: 2px; margin-bottom: 8px; }
.tpv-agente-ajustes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; align-items: end; margin-bottom: 10px; }
.tpv-agente-ajustes .tpv-interruptor-txt, .tpv-agente-ajustes .tpv-nota { grid-column: 1 / -1; }
.tpv-agente-pos .tpv-nota svg { width: 16px; height: 16px; vertical-align: -3px; }
.tpv-pedcli { margin-top: 10px; }
.tpv-pedcli input { font-size: 18px; }

/* firma del cliente: ¿dónde firma?, pasos numerados y el estado en vivo */
.dialogo-tpv-donde { width: min(760px, calc(100vw - 24px)); }
.tpv-dondes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px 20px 22px; }
.tpv-donde { display: grid; gap: 6px; align-content: start; justify-items: start; text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: 16px; border-radius: 16px; border: 2px solid var(--borde, #d5dde5); background: var(--superficie, #fff); min-height: 170px; }
.tpv-donde:hover, .tpv-donde:focus-visible { border-color: #0B8BC2; box-shadow: 0 8px 22px rgba(11, 139, 194, .18); outline: none; }
.tpv-donde.recordado { border-color: #0B8BC2; background: linear-gradient(135deg, rgba(11, 139, 194, .1), transparent); }
.tpv-donde-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(11, 139, 194, .14); color: #0B8BC2; }
.tpv-donde-ic svg { width: 26px; height: 26px; }
.tpv-donde b { font-size: 16px; }
.tpv-donde small { color: var(--texto-2, #4c6075); line-height: 1.35; }
.tpv-donde em { font-style: normal; font-size: 11px; font-weight: 700; color: #0B8BC2; }
.tpv-donde-estado { font-size: 12px; font-weight: 600; }
.tpv-donde-estado.bien { color: var(--t-bien, #2e9e5b); } .tpv-donde-estado.mal { color: #b45309; }
@media (max-width: 640px) { .tpv-dondes { grid-template-columns: minmax(0, 1fr); } .tpv-donde { min-height: 0; } }
.tpv-pasos { margin: 0; padding: 0; list-style: none; counter-reset: paso; display: grid; gap: 8px; }
.tpv-pasos li { counter-increment: paso; position: relative; padding-left: 34px; min-height: 24px; line-height: 1.35; }
.tpv-pasos li::before { content: counter(paso); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #0B8BC2; color: #fff; font-weight: 800; font-size: 13px; }
.tpv-firma .tpv-pasos { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 0 4px; font-size: 13px; }
@media (max-width: 640px) { .tpv-firma .tpv-pasos { grid-auto-flow: row; } }
.tpv-qr-estado.hecho { color: var(--t-bien, #2e9e5b); }
.tpv-enlace summary { cursor: pointer; font-size: 13px; color: var(--texto-2, #4c6075); }
.tpv-enlace[open] { display: grid; gap: 8px; }
.tpv-qr-bot { display: flex; gap: 8px; flex-wrap: wrap; }
