/* YaTickets · Taquilla v2.1 (26-10-2026) — PANTALLA LIMPIA, no un panel (Xavi 25-10 22:20 / 22:23 / 22:27 / 22:30 / 00:12 / 00:13 / 00:33).
   Barra superior fina, menú de 4, todo el espacio para las carátulas y el ticket; contenido a la IZQUIERDA y cesta a la DERECHA fija. */
:root { --cab: 60px; --rail: 88px; }

/* ---------- barra superior fina ---------- */
#cab { gap: 14px; padding: 0 10px 0 16px; }
#cab .logo { font-size: 18px; }
#cab .logo .ico { width: 24px; height: 24px; }
#cab .puesto { font-size: var(--f-s); color: var(--g600); }
#cab .estado { gap: 6px; }
#cab .estado:empty::after { content: none; }
#cab .yo { padding: 0 14px 0 4px; }
#cab .yo .avatar { width: 40px; height: 40px; }

/* ---------- menú lateral: Vender, Ventas, Caja y Más ---------- */
#rail { gap: 4px; padding: 8px 6px; }
#rail .ri { min-height: 72px; }

/* ---------- inicio limpio: solo carátulas ---------- */
#main { position: relative; }
.pant.limpio { padding: 16px; }
#cab .cab-mas { min-height: 56px; border-radius: 999px; padding: 0 20px; background: var(--g900); color: #fff; border-color: var(--g900); }
#cab .cab-mas:active { background: #000; }
.v-limpio.mosaico { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.mp-fams.mosaico { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin: 14px 0; }
.mp-op { display: flex; flex-wrap: wrap; gap: 10px; }
.barra-v #vInicio { flex: none; }
@media (max-width: 1100px) and (orientation: landscape) { .barra-v .tx-ini, .barra-v .tx-orden { display: none; } }

/* ---------- ticket: columna fija, líneas de abajo a arriba, lo opcional en "Más" ---------- */
#ticket .tk-cab { min-height: 64px; padding: 6px 12px 6px 16px; gap: 8px; flex-wrap: nowrap; overflow: hidden; }
#ticket .tk-cab h2 { white-space: nowrap; }
#ticket .tk-m { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
#ticket .tk-m span { overflow: hidden; text-overflow: ellipsis; }
#ticket .tk-lins { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 100%; }
#ticket .tk-lin { display: flex; flex-direction: column; }
#ticket .tk-lin > .tk-lins { flex: 1 0 auto; }
.lin.nueva { animation: tk-entra .45s ease, tk-luz 1.4s ease; }
@keyframes tk-entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tk-luz { 0%, 40% { background: var(--ac-1); border-color: var(--ac); } 100% { } }
#ticket .tk-pie { gap: 8px; padding: 10px 14px 14px; }
#tkDesglose { grid-template-columns: 1fr auto; }
.tk-mas { display: flex; flex-direction: column; gap: 10px; }

/* ---------- ficha: UNA ventana, contenido a la izquierda, sin barra que cambie de tamaño ---------- */
.ficha.v21 { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
.ficha.v21 .col { gap: 12px; }
.ficha.v21 .f-info { font-size: var(--f-s); color: var(--g600); }
.ficha.v21 .f-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ficha.v21 .selector { min-height: 64px; padding: 6px 16px; }
.ficha.v21 .franjas { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ficha.v21 .franjas::-webkit-scrollbar { height: 0; }
.ficha.v21 .franja { flex: 0 0 172px; min-height: 64px; scroll-snap-align: start; }
.ficha.v21 #fDer { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.ficha.v21 #fDer > .campo, .ficha.v21 #fDer > p { grid-column: 1 / -1; }
.ficha.v21 .tarifa { min-height: 88px; padding: 8px 10px 8px 16px; gap: 10px; }
.ficha.v21 .tarifa > div:first-child { min-width: 0; }
.ficha.v21 .tarifa .tn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha.v21 .tarifa .sub, .ficha.v21 .tarifa .etq { display: block; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ficha.v21 .tarifa .etq { margin-top: 4px !important; padding: 0 10px; }
.ficha.v21 .tarifa .etq .ico { display: none; }
.ficha.v21 .contador { gap: 4px; }
.ficha.v21 .contador output { min-width: 44px; }
.f-res { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; line-height: 1.2; }
.f-res output { font-size: var(--f-l); font-weight: 300; }
#app[data-pant="ficha"] .pant-cab { min-height: 72px; padding-top: 8px; padding-bottom: 8px; }
#app[data-pant="ficha"] .pant { padding-top: 14px; }
.f-cab-img { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; position: relative; flex: none; }
.f-cab-img .car-img { position: absolute; }
.ficha .tarifa .etq.fija { margin-top: 6px; }
.tarifa .contador output.en { color: var(--ac-7); }
.resumen-ficha .f-det { font-size: var(--f-s); color: var(--g600); }

/* ---------- butacas: tira fija arriba (tarifas, número, mejor disponible, lupa) + plano + leyenda; cesta a la derecha ---------- */
.pant.bts { gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.bt-tar { flex: none; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.bt-tar::-webkit-scrollbar { height: 0; }
.bt-tar .b { flex: none; min-width: 0; padding: 6px 16px; }
.bt-tar .tx2 { white-space: nowrap; }
.bt-tira { flex: none; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bt-tira .bt-mejor { flex-wrap: nowrap; }
.bt-tira .b { white-space: nowrap; }
.bt-tira .sp { flex: 1; }
.bt-cuerpo { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.bt-cuerpo .mapa-cont { flex: 1; }
.bt-ov-cupo { left: 10px; bottom: 10px; right: 120px; display: flex; }
.bt-cupo-av { min-height: 56px; max-width: 100%; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 14px; border-radius: 14px; background: rgba(253, 242, 248, .96); color: var(--av-t); font-size: var(--f-s); overflow: hidden; box-shadow: var(--s2); }
.bt-cupo-av .tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-cupo-av.vacio { display: none; }
.bt-cupo-av .b { flex: none; }
.ley-cupo, .leyc { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
/* horizontal ancho: plano grande y la leyenda en una columna a su derecha (no le quita alto al plano) */
@media (orientation: landscape) and (min-width: 1200px) {
  .pant.bts { display: flex !important; flex-direction: column; }
  .pant.bts .bt-tar { display: flex !important; overflow-x: auto; }
  .pant.bts .bt-tar .b { min-width: 0 !important; padding: 6px 16px !important; }
  .pant.bts .bt-mejor { display: flex !important; }
  .bt-cuerpo { flex-direction: row; }
  .bt-cuerpo .bt-ley { flex: none; width: 200px; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; overflow: hidden; }
  .bt-cuerpo .bt-ley .ley, .bt-cuerpo .bt-ley .leyc { min-height: 26px; line-height: 1.2; }
  .bt-cuerpo .bt-ley .bt-m { width: 24px; height: 24px; }
}
@media (orientation: landscape) and (max-width: 1100px) { .bt-tira .bt-mejor .b.pri span, #btLupa span, #btMasOp span { display: none; } }

/* butaca con la forma común (silueta SVG): el botón es transparente y el color lo lleva la silueta */
.bt { position: relative; background: transparent !important; border: 0 !important; border-radius: 10px; color: var(--g900); }
.bt > .yb-silla { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); z-index: 0; }
.bt > .ico, .bt > .bt-n { position: relative; z-index: 1; }
.bt > .ico { width: 18px; height: 18px; margin-top: -4px; }
.bt .bt-n { font-size: 19px; margin-top: -3px; }
.bt.e-libre { --bf: #f1f5f9; --bs: #94a3b8; color: #1d252d; }
.bt.e-vendida { --bf: #475569; --bs: #475569; color: #e2e8f0; }
.bt.e-vendida > .yb-silla { inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); }
.bt.e-reservada { --bf: #cbd5e1; --bs: #64748b; color: #1e293b; }
.bt.e-bloqueada { --bf: #1f2937; --bs: #1f2937; color: #fff; }
.bt.e-invitacion { --bf: #fce7f3; --bs: #db2777; color: #9d174d; }
.bt.e-enlace { --bf: #e3edfd; --bs: #3b82f6; color: #1f5fc4; }
.bt.e-carrito { --bf: #0e7c86; --bs: #0b5f66; color: #fff; }
.bt.e-carrito > .yb-silla { filter: drop-shadow(0 0 3px rgba(14, 124, 134, .55)); }
.bt.e-otro { --bf: #f1f5f9; --bs: #64748b; color: #334155; }
.bt.e-otro > .yb-silla use { stroke-dasharray: 4 3; }
.bt.e-pmr { --bf: #e6f6f7; --bs: #0b5f66; color: #0b5f66; }
.bt.e-sinvis { --bf: #f8fafc; --bs: #64748b; color: #475569; }
.bt.e-sinvis > .yb-silla use { stroke-dasharray: 4 3; }
.bt.e-validada { --bf: #e3f6ea; --bs: #22c55e; color: #157f3d; }
.bt.e-cupo { --bf: #ffffff; --bs: var(--cc, #db2777); color: var(--cc, #db2777); }
.bt.e-cupo > .yb-silla use { stroke-width: 2.6; stroke-dasharray: 5 3; }
.bt .bt-reloj { position: absolute; right: -2px; top: -4px; z-index: 2; width: 18px; height: 18px; border-radius: 50%; background: var(--cc, #db2777); color: #fff; display: grid; place-items: center; }
.bt .bt-reloj .ico { width: 12px; height: 12px; margin: 0; stroke-width: 2.4; }
.bt.cupo-mio > .yb-silla use { stroke: var(--cc); stroke-width: 2.4; }
.bt-m { position: relative; background: transparent !important; border: 0 !important; }
.bt-m > .yb-silla { position: absolute; inset: 0; width: 100%; height: 100%; }
.bt-m > .ico { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: -3px; }
.ley-cupo .bt-m { --bf: #fff; --bs: var(--cc); }
.ley-cupo .bt-m > .yb-silla use { stroke-width: 2.6; stroke-dasharray: 5 3; }

/* ---------- pago en UNA ventana ---------- */
.cb-resumen { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--g200); border-radius: var(--r-b); background: var(--g50); }
.cb-resumen .cb-rl { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: var(--f-s); color: var(--g600); }
.cb-resumen .cb-rl span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-datos { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- vertical 1080x1920: TAMBIÉN contenido a la izquierda y cesta a la derecha (Xavi 00:13 "para TODOS IGUAL") ---------- */
@media (orientation: portrait) {
  #app { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: var(--cab) minmax(0, 1fr) auto; grid-template-areas: "cab cab" "main ticket" "rail rail"; }
  #app.sin-ticket { grid-template-columns: minmax(0, 1fr) 0; }
  #ticket, #ticket.vacio { height: auto; max-height: none; border-top: 0; border-left: 1px solid var(--g200); box-shadow: none; }
  #ticket .tk-lin, #ticket.vacio .tk-lin { display: flex; max-height: none; }
  #ticket.vacio #tkDesglose { display: grid; }
  #ticket .tk-rapido .b { padding: 0 10px; }
  .v-limpio.mosaico { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .bt-tira { gap: 8px; }
  #btMasOp span { display: none; }
  #btMasOp { padding: 0 16px; }
}
}
.cb-modo-cab { display: flex; gap: 8px; margin-left: auto; }
.cb-modo-cab .b { padding: 0 14px; }
.cb-gracias-qr { display: flex; align-items: center; gap: 18px; justify-content: center; flex-wrap: wrap; }
.cb-gracias-qr svg { border-radius: 12px; background: #fff; }
.cb-izq .cb-tit, .cb-der .cb-tit { margin: 6px 0 0; }
.cb-der .cb-metodos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cb-der .cb-metodos .metodo { min-height: 76px; padding: 6px 8px; gap: 4px; }
@media (max-width: 1100px) and (orientation: landscape) { .cb-modo-cab .b span, #cbEnlaces span { display: none; } }
.cb-der .cb-metodos .metodo { min-height: 72px; flex-direction: row; gap: 8px; justify-content: center; }
.cb-der .cb-metodos .metodo .tx2 { display: none; }
.cb-resumen .cb-desglose { border: 0; background: transparent; padding: 6px 0 0; box-shadow: none; margin: 0; border-top: 1px solid var(--g200); border-radius: 0; }
/* pago: que efectivo (entrega, devolver y billetes) quepa a la vista sin desplazar en 1366x768 */
.cb-der { gap: 12px !important; padding-top: 14px !important; }
.cb-der .cb-este { flex-wrap: nowrap; padding-bottom: 8px; }
.cb-der .cb-este .k { flex: 0 1 auto; white-space: nowrap; }
.cb-der .cb-este output { font-size: var(--f-l); flex: 1; }
@media (orientation: landscape) and (max-height: 820px) {
  .cb-der .vueltas .caja-v { padding: 6px 14px; }
  .cb-izq .importe-g output { font-size: 60px; }
}

/* ===================== v2.1 órdenes 00:40-01:04 ===================== */
:root { --ticket: 420px; }
/* menú lateral TURQUESA con iconos y textos en blanco; activo con píldora blanca (00:40) */
#rail { background: linear-gradient(180deg, #14a3b0 0%, #0e7c86 100%); border-right: 0; padding: 10px 6px; gap: 6px; }
#rail .ri { color: #fff; min-height: 72px; }
#rail .ri .ico { stroke: #fff; }
#rail .ri:active { background: rgba(255, 255, 255, .18); }
#rail .ri.sel { background: #fff; color: #0b5f66; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
#rail .ri.sel .ico { stroke: #0e7c86; }
#rail .ri .bdg { background: #db2777; border: 2px solid #fff; }
/* barra superior: ENTRADAS · PRODUCTOS | HOY · MAÑANA · CALENDARIO | aparatos · lupa · hora · usuario · ventana (00:50) */
#cab { gap: 10px; padding: 0 10px 0 12px; }
.cab-tabs { display: flex; gap: 4px; background: var(--g100); padding: 0; border-radius: 16px; }
.cab-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: transparent; color: var(--g600); font: inherit; font-size: var(--f-m); cursor: pointer; }
.cab-tab .ico { width: 22px; height: 22px; }
.cab-tab.sel { background: var(--ac); color: #fff; box-shadow: 0 4px 12px rgba(14, 124, 134, .25); }
.cab-tab.sel .ico { stroke: #fff; }
.cab-dias { display: flex; gap: 6px; }
.cab-dia { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border: 1px solid var(--g200); border-radius: 999px; background: var(--g0); color: var(--g900); font: inherit; font-size: var(--f-s); cursor: pointer; white-space: nowrap; }
.cab-dia .ico { width: 20px; height: 20px; }
.cab-dia.sel { border: 2px solid var(--ac); background: var(--ac-1); color: var(--ac-7); }
.cab-tab, .cab-dia { min-height: 56px; }
#cab .cab-lupa { width: 56px; min-height: 56px; border-radius: 14px; }
#cab .yo .n { display: flex; flex-direction: column; line-height: 1.15; align-items: flex-start; }
#cab .yo .n .r { font-size: 16px; color: var(--g500); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
#cab .cab-ven { width: 56px; min-height: 56px; border-radius: 12px; }
#cab #cabCerrar:active { background: var(--err-1); color: var(--err-t); }
#cab .estado:empty { display: none; }
#cab .estado i { display: inline-block; }
@media (max-width: 1500px) { #cab .yo .n .r { display: none; } }
@media (max-width: 1250px) and (orientation: landscape) { #cab .yo .n, .cab-tab span { display: none; } .cab-tab { padding: 0 14px; } }
@media (max-width: 1100px) and (orientation: landscape) { #cab .reloj { display: none; } .cab-dia { padding: 0 12px; } }
/* aparatos (00:52): una pastilla con un icono por aparato, verde si va bien y rosa si falla */
.cab-ap { display: inline-flex; align-items: center; gap: 4px; min-height: 56px; padding: 0 10px; border: 1px solid var(--g200); border-radius: 14px; background: var(--g0); cursor: pointer; }
.cab-ap .ap { position: relative; display: grid; place-items: center; width: 26px; height: 26px; color: var(--g600); }
.cab-ap .ap .ico { width: 20px; height: 20px; }
.cab-ap .ap::after { content: ''; position: absolute; right: -1px; bottom: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); border: 1.5px solid #fff; }
.cab-ap .ap.mal { color: #be185d; }
.cab-ap .ap.mal::after { background: #db2777; }
.cab-ap.mal { border-color: #f9a8d4; background: var(--av-1); }
@media (max-width: 1250px) { .cab-ap .ap:nth-child(n+4):not(.mal) { display: none; } }
.ap-lista .item { cursor: default; }
.ap-lista .ap-acc { display: flex; gap: 8px; flex-wrap: wrap; }
/* la alerta no tapa la venta: abajo, sobre el mosaico, lejos de la cesta y de PAGAR */
.aviso-perif { top: auto; bottom: 16px; left: calc(var(--rail) + 16px); transform: none; max-width: calc(100vw - var(--rail) - var(--ticket) - 32px); }
.aviso-perif > span { min-width: 0; }
#app.sin-ticket ~ .aviso-perif { max-width: calc(100vw - var(--rail) - 32px); }
.aviso-perif .b { flex: none; }
/* CESTA que cobra (00:45): formas de pago, entrega y PAGAR en la misma columna */
#ticket .tk-acc-but { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px 12px; border-top: 1px solid var(--g100); }
#ticket .tk-acc-but .b, .tk-formas .b, .tk-entrega .chip { flex-direction: column; gap: 2px; padding: 4px 2px; min-height: 56px; font-size: 16px; line-height: 1.1; white-space: nowrap; border-radius: 14px; }
#ticket .tk-acc-but .b .ico, .tk-formas .b .ico { width: 20px; height: 20px; }
.tk-formas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tk-formas .b { min-height: 72px; } /* cobro: 72 px (contrato táctil) */
.tk-formas #tkTarjeta, .tk-formas #tkEfectivo { border-color: var(--g300); }
.tk-pp { display: flex; align-items: center; gap: 6px; font-size: 16px; margin-top: -2px; }
.tk-entrega { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tk-entrega .chip { display: flex; align-items: center; justify-content: center; overflow: hidden; text-overflow: ellipsis; }
.tk-entrega .chip span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#ticket .total-g output { font-size: 46px; }
#ticket .tk-pie { gap: 8px; }
.tk-efectivo { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.tk-efectivo .vueltas .caja-v output { font-size: 40px; }
.tk-billetes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tk-billetes .b { padding: 0 4px; }
#ticket.cobrando .tk-lin { display: block; }
/* gracias en la cesta */
.tk-gracias { display: flex; flex-direction: column; gap: 12px; align-items: stretch; padding: 12px 14px; }
.tk-gracias .tk-g-ico { color: var(--ok-t); display: grid; place-items: center; }
.tk-gracias .tk-g-ico .ico { width: 44px; height: 44px; }
.tk-gracias .cb-cambio { text-align: center; }
.tk-gracias .cb-cambio output { display: block; font-size: 52px; font-weight: 300; color: var(--ok-t); line-height: 1.05; }
.tk-gracias .tk-g-qr { gap: 14px; align-items: center; }
.tk-gracias .tk-g-tot { font-size: var(--f-l); font-weight: 300; }
.tk-gracias .cb-procr .cb-chips { flex-wrap: wrap; }
.cb-procr.llama { animation: tk-luz 1.2s ease 2; border-radius: 14px; }
@media (orientation: portrait) { :root { --ticket: 380px; } #app { grid-template-columns: minmax(0, 1fr) var(--ticket); } }
/* plano: por puntos, fila entera (01:04) */
.bt-ov-modo { display: flex; gap: 8px; }
.bt.ancla > .yb-silla use { stroke: #db2777; stroke-width: 3; }
.bt-fl[data-fila] { cursor: pointer; border-radius: 10px; }
.bt-fl[data-fila]:active { background: var(--ac-1); color: var(--ac-7); }

@media (max-width: 1100px) and (orientation: landscape) { :root { --ticket: 380px; } #btPuntos span { display: none; } }
@media (max-width: 1400px) and (orientation: landscape) { #btPuntos span { display: none; } }
@media (orientation: portrait) { #cab .yo .n, #cab .reloj { display: none; } #cab { gap: 8px; } .cab-dia { padding: 0 14px; } }
#cab { overflow: hidden; }

/* ---------- menú lateral a TODO EL ALTO (Xavi 27-10 21:10): la barra superior empieza a su derecha; arriba la Y en blanco ---------- */
@media (orientation: landscape) {
  #app { grid-template-areas: "rail cab cab" "rail main ticket"; }
  #rail { padding-top: 0; }
  #rail::before { content: "Y" / ""; flex: none; height: var(--cab); display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 500; line-height: 1; }
}

/* ---------- menú superior CENTRADO (Xavi 27-10 21:14): Entradas|Productos + Hoy/Mañana/Calendario en el centro de la barra superior; a la derecha .cab-der (buscar, hora, vendedor, minimizar, cerrar). Si no cabe centrado, se arrima al centro todo lo que puede sin pisar los iconos ---------- */
.cab-der { display: flex; align-items: center; justify-content: flex-end; gap: inherit; min-width: 0; }
#cab:has(> .cab-tabs) { display: grid; grid-template-columns: minmax(0, 1fr) auto auto minmax(max-content, 1fr); align-content: center; }
#cab:has(> .cab-tabs) > .cab-tabs { grid-column: 2; }
#cab:has(> .cab-tabs) > .cab-dias { grid-column: 3; }
#cab:has(> .cab-tabs) > .sp { display: none; }
#cab:has(> .cab-tabs) > .cab-der { grid-column: 4; }

/* ---------- PERIFERICOS-EN-AJUSTES (27-10, Xavi 21:16): sin iconos de aparatos en la barra superior (hueco libre);
   en Ajustes > Periféricos una fila por aparato (verde bien, ámbar aviso, rojo falla) y un punto en Ajustes del menú si algo falla ---------- */
#secPerif .ap-lista { margin-bottom: 12px; }
#secPerif .item { grid-template-columns: 52px 1fr auto; color: var(--g900, #111827); }
#secPerif .item.perif-ok .i-ico { color: var(--ok-t); }
#secPerif .item.perif-av .i-ico { color: #b45309; }
#secPerif .item.perif-mal .i-ico { color: var(--err-t); }
#secPerif .item.perif-mal { box-shadow: inset 4px 0 0 #dc2626; }
#secPerif .item.perif-av { box-shadow: inset 4px 0 0 #f59e0b; }
#secPerif .item:not(.perif-ok) .ap-acc { grid-column: 2 / -1; justify-content: flex-start; align-items: center; }
.etq.amb { background: #fff7ed; color: #9a3412; }
body.perif-mal #rail .ri[data-zona="config"]::after, body.perif-av #rail .ri[data-zona="config"]::after { content: ""; position: absolute; top: 10px; right: calc(50% - 26px); width: 14px; height: 14px; border-radius: 50%; background: #dc2626; border: 2px solid #fff; }
body.perif-av #rail .ri[data-zona="config"]::after { background: #f59e0b; }

/* ---------- TEXTO SIEMPRE en Entradas/Productos (Xavi 27-10 21:40 "han quitado Entradas y aparecen unos iconos"): el texto de las pestañas no se oculta en ningún ancho. Si no cabe, primero fuera el ICONO de esas pestañas (nunca el texto). Reglas anteriores de "solo icono" quedan anuladas aquí ---------- */
#cab .cab-tab span { display: inline; white-space: nowrap; }
#cab .cab-tab { padding: 0 18px; }
@media (max-width: 1180px) and (orientation: landscape) { #cab .cab-tab .ico { display: none; } #cab .cab-tab { padding: 0 16px; } }
/* ---------- SIN ICONOS REPETIDOS (Xavi 27-10 21:28 "Qué sentido tiene repetir iconos" + 21:36, 21:38, 22:12): cada acción en un solo sitio.
   Barra de arriba: [imagotipo] [desplegable Todos/Entradas/Productos/Bonos] [Buscar producto] [Hoy | Mañana | Calendario] ... [hora] [minimizar] [cerrar].
   Fuera la lupa suelta de arriba (Buscar vive en el lateral) y la "Y" suelta del lateral (la marca va arriba). ---------- */
@media (orientation: landscape) { #rail::before { content: none; } #rail { padding-top: 12px; } }
#cab:has(> .cab-tabs) > .cab-imago { grid-column: 1; justify-self: start; }
.cab-imago { display: inline-flex; align-items: center; gap: 10px; flex: none; min-width: 0; color: var(--g900); font-size: 22px; font-weight: 400; white-space: nowrap; }
.cab-imago .isimb { width: 40px; height: 40px; border-radius: 12px; background: var(--ac); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 500; line-height: 1; flex: none; }
#cab .cab-que { display: flex; align-items: center; gap: 8px; background: transparent; border-radius: 0; }
.cab-desp { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px 0 18px; border: 1px solid var(--g200); border-radius: 14px; background: var(--g0); color: var(--g900); font: inherit; font-size: var(--f-m); cursor: pointer; white-space: nowrap; flex: none; }
.cab-desp .ico { width: 22px; height: 22px; }
.cab-desp .ico.s { width: 18px; height: 18px; color: var(--g500); }
.cab-desp.sel { border: 2px solid var(--ac); background: var(--ac-1); color: var(--ac-7); }
.cab-desp[aria-expanded="true"] .ico.s { transform: rotate(180deg); }
.cab-busca { display: flex; align-items: center; gap: 8px; min-height: 56px; width: clamp(170px, 16vw, 280px); padding: 0 14px; border: 1px solid var(--g200); border-radius: 14px; background: var(--g0); color: var(--g500); cursor: text; flex: 0 1 auto; }
.cab-busca:focus-within { border: 2px solid var(--ac); box-shadow: 0 0 0 3px rgba(14, 124, 134, .15); }
.cab-busca .ico { width: 20px; height: 20px; flex: none; }
.cab-busca input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent; color: var(--g900); font: inherit; font-size: var(--f-s); }
.cab-busca input::placeholder { color: var(--g500); }
.cab-menu { position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--g0); border: 1px solid var(--g200); border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.cab-menu button { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 18px; border: 0; border-radius: 12px; background: transparent; color: var(--g900); font: inherit; font-size: var(--f-m); text-align: left; cursor: pointer; }
.cab-menu button .ico { width: 22px; height: 22px; }
.cab-menu button:hover, .cab-menu button:focus-visible { background: var(--g100); outline: 0; }
.cab-menu button.sel { background: var(--ac-1); color: var(--ac-7); }
#cab:has(> .cab-imago) { grid-template-columns: minmax(max-content, 1fr) auto auto minmax(max-content, 1fr); }
@media (max-width: 1250px) and (orientation: landscape) { .cab-imago .inom { display: none; } }
@media (orientation: portrait) { #cab:has(> .cab-imago) { gap: 8px; } .cab-imago { font-size: 20px; gap: 8px; } .cab-busca { width: 220px; padding: 0 10px; } }
.cab-menu-sep { height: 1px; margin: 4px 8px; background: var(--g200); }
/* muñeco de usuario abajo del lateral (Xavi 27-10 21:41), igual que en la taquilla de pruebas */
#rail .ri-yo { flex: none; }
#rail .ri-yo .yo-av { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid currentColor; }
#rail .ri-yo .yo-av .ico { width: 26px; height: 26px; }
#rail .ri-yo > span:last-child { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (orientation: portrait) { #rail .ri-yo { flex: 1; } }

/* ---------- PANTALLA DE CARGA TURQUESA (Xavi 28-10 "la primera página cargando, mejor fondo turquesa") ----------
   Solo en el ARRANQUE (#app sin data-pant = aún no se ha abierto ninguna pantalla): nunca a mitad de venta.
   Mismo turquesa del menú lateral (#rail de este v21.css; tono bajo #0e7c86 para que el blanco cumpla AA).
   Solo mientras carga (#main vacío, antes de pintar ¿Quién eres?). Rueda blanca + "Cargando…" fino, sin emojis. */
@keyframes tqCargaGira { to { transform: rotate(360deg); } }
#app:not([data-pant]):has(#main:empty) { background: #0e7c86; }
#app:not([data-pant]):has(#main:empty) > * { visibility: hidden; }
#app:not([data-pant]):has(#main:empty)::before { content: ""; position: fixed; left: 50%; top: 50%; width: 44px; height: 44px; margin: -40px 0 0 -22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: tqCargaGira .9s linear infinite; }
#app:not([data-pant]):has(#main:empty)::after { content: "Cargando…"; position: fixed; left: 0; right: 0; top: 50%; margin-top: 24px; text-align: center; color: #fff; font-size: 18px; font-weight: 300; }
@media (prefers-reduced-motion: reduce) { #app:not([data-pant]):has(#main:empty)::before { animation-duration: 3s; } }

/* ---------- CARGA CON LOGO EN NEGATIVO (Xavi 28-10 "con el logo YaTickets en NEGATIVO y MÁS GRANDE") ----------
   Va DESPUÉS del bloque de la carga turquesa y solo lo amplía. Logo v3 en blanco (Y y raya caladas: se ve el turquesa),
   SVG en línea (sin esperar descargas), centrado, ~32 % del ancho con tope 512 px (Xavi 28-10 noche: "un poco más pequeña"). Arriba el logo, debajo rueda y texto. */
:root { --tq-logo-w: min(32vw, 512px); --tq-logo-h: calc(var(--tq-logo-w) * 0.3588); }
#app:not([data-pant]):has(#main:empty) { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.84 -0.71 182.33 65.42' role='img' aria-label='YaTickets'%3E%3Cmask id='yc' maskUnits='userSpaceOnUse' x='-3.84' y='-0.71' width='182.33' height='65.42'%3E%3Crect x='-3.84' y='-0.71' width='182.33' height='65.42' fill='%23fff'/%3E%3Cpath d='M11 41.27H34' stroke='%23000' stroke-width='2.4' stroke-dasharray='3.5 3.5' stroke-linecap='round' transform='rotate(-14 24 32)'/%3E%3Cpath d='M4.95 11.95 L15.4 11.95 L23 26.2 L30.6 11.95 L41.05 11.95 L27.75 32.85 L27.75 48.05 L18.25 48.05 L18.25 32.85Z' fill='%23000' transform='rotate(-14 24 32)'/%3E%3C/mask%3E%3Cpath d='M8 4H40A6 6 0 0 1 46 10V30.77A9.5 9.5 0 0 0 46 49.77V54A6 6 0 0 1 40 60H8A6 6 0 0 1 2 54V46.27A6 6 0 0 0 2 34.27V10A6 6 0 0 1 8 4Z' fill='%23fff' mask='url(%23yc)' transform='rotate(-14 24 32)'/%3E%3Cpath d='M47.37 43.12Q46.17 43.12 45.09 42.8Q44 42.48 43.15 41.83Q42.31 41.18 41.81 40.2Q41.31 39.23 41.31 37.91Q41.31 36.15 42.03 35.07Q42.75 34 43.97 33.45Q45.19 32.9 46.76 32.71Q48.33 32.51 50.04 32.51H52.54Q52.54 31.55 52.2 30.83Q51.86 30.1 51.17 29.68Q50.48 29.26 49.4 29.26Q48.7 29.26 48.08 29.44Q47.46 29.61 47.05 29.95Q46.63 30.29 46.48 30.81H41.84Q42.04 29.38 42.75 28.35Q43.47 27.32 44.54 26.66Q45.61 26 46.9 25.68Q48.19 25.36 49.56 25.36Q52.09 25.36 53.71 26.32Q55.33 27.28 56.13 29.11Q56.92 30.95 56.92 33.59V42.88H52.79L52.73 40.65Q51.93 41.81 50.88 42.33Q49.84 42.86 48.89 42.99Q47.95 43.12 47.37 43.12ZM48.42 39.48Q49.57 39.48 50.5 39.02Q51.44 38.56 52.01 37.77Q52.58 36.98 52.58 36V35.58H48.73Q48.26 35.58 47.74 35.66Q47.23 35.73 46.81 35.93Q46.38 36.13 46.12 36.5Q45.86 36.87 45.86 37.5Q45.86 38.17 46.21 38.6Q46.56 39.04 47.15 39.26Q47.74 39.48 48.42 39.48ZM64.02 42.88V23.17H56.48V17.86H77.32V23.17H69.75V42.88ZM80.41 42.88V24.25H86.02V42.88ZM97.72 43.15Q94.88 43.15 92.84 42Q90.79 40.85 89.68 38.71Q88.58 36.57 88.58 33.62Q88.58 30.6 89.72 28.43Q90.86 26.26 92.95 25.08Q95.04 23.9 97.87 23.9Q100.28 23.9 102.13 24.76Q103.99 25.63 105.1 27.26Q106.21 28.89 106.34 31.26H100.92Q100.64 30.13 99.83 29.57Q99.02 29.01 97.89 29.01Q96.45 29.01 95.63 29.73Q94.81 30.45 94.47 31.51Q94.13 32.58 94.13 33.61Q94.13 34.74 94.5 35.76Q94.87 36.78 95.69 37.42Q96.51 38.07 97.85 38.07Q99.05 38.07 99.88 37.5Q100.71 36.94 100.94 35.85H106.54Q106.41 38.27 105.19 39.88Q103.97 41.5 102.03 42.33Q100.08 43.15 97.72 43.15ZM108.9 42.88V17.86H114.51V31.12H116.65L120.88 24.25H127.16L121.31 33.13L127.63 42.88H121.16L116.81 36.11H114.51V42.88ZM137.42 43.15Q134.53 43.15 132.43 41.99Q130.33 40.82 129.2 38.7Q128.06 36.57 128.06 33.67Q128.06 30.77 129.22 28.57Q130.38 26.38 132.5 25.14Q134.61 23.9 137.47 23.9Q139.54 23.9 141.16 24.58Q142.78 25.25 143.91 26.49Q145.05 27.73 145.64 29.41Q146.22 31.1 146.21 33.13Q146.2 33.67 146.16 34.17Q146.11 34.67 145.99 35.22H133.61Q133.7 36.08 134.13 36.82Q134.56 37.57 135.35 38Q136.13 38.44 137.32 38.44Q138.18 38.44 138.86 38.23Q139.54 38.03 140.01 37.66Q140.47 37.3 140.62 36.85H146.13Q145.65 39.05 144.35 40.45Q143.06 41.86 141.25 42.5Q139.44 43.15 137.42 43.15ZM140.9 31.44Q140.89 30.7 140.52 29.99Q140.15 29.29 139.36 28.84Q138.58 28.4 137.36 28.4Q136.14 28.4 135.33 28.86Q134.53 29.32 134.14 30.02Q133.74 30.73 133.71 31.44ZM157.06 42.88Q154.66 42.88 153.1 42.33Q151.54 41.78 150.77 40.42Q150.01 39.06 150.01 36.59V29.25H147.33V24.25H150.01V19.44H155.61V24.25H159.35V29.25H155.61V35.76Q155.61 36.68 155.93 37.27Q156.26 37.86 157.56 37.86H159.16V42.88ZM168.75 43.15Q167.39 43.15 166 42.85Q164.61 42.54 163.41 41.83Q162.22 41.11 161.39 39.88Q160.56 38.64 160.29 36.78H165.96Q166.15 37.34 166.6 37.74Q167.06 38.14 167.7 38.34Q168.34 38.55 169.03 38.55Q169.48 38.55 169.9 38.48Q170.32 38.41 170.65 38.23Q170.99 38.05 171.18 37.77Q171.36 37.5 171.36 37.11Q171.36 36.63 171.06 36.36Q170.75 36.1 170.23 35.94Q169.71 35.78 169.01 35.64Q168.34 35.47 167.63 35.34Q166.92 35.21 166.22 35.05Q164.87 34.72 163.63 34.14Q162.39 33.56 161.61 32.48Q160.83 31.4 160.83 29.61Q160.83 28.03 161.5 26.94Q162.18 25.85 163.31 25.18Q164.44 24.51 165.82 24.21Q167.19 23.9 168.56 23.9Q170.51 23.9 172.18 24.53Q173.84 25.15 174.95 26.51Q176.06 27.86 176.32 30.05H170.93Q170.83 29.34 170.11 28.92Q169.4 28.5 168.35 28.5Q167.96 28.5 167.57 28.58Q167.19 28.65 166.88 28.79Q166.57 28.93 166.39 29.18Q166.2 29.42 166.2 29.76Q166.2 30.03 166.37 30.29Q166.53 30.55 166.89 30.74Q167.26 30.94 167.79 31.06Q168.88 31.31 170.03 31.53Q171.17 31.76 172.19 32.01Q173.35 32.28 174.41 32.8Q175.46 33.32 176.14 34.32Q176.83 35.32 176.83 37.02Q176.83 38.8 176.1 39.98Q175.38 41.17 174.18 41.86Q172.99 42.54 171.56 42.85Q170.14 43.15 168.75 43.15Z' fill='%23fff'/%3E%3Ccircle cx='83.21' cy='18.25' r='3.53' fill='%23fff'/%3E%3C/svg%3E") no-repeat center calc(50% - var(--tq-logo-h) / 2 - 24px) / var(--tq-logo-w) auto, #0e7c86; }
#app:not([data-pant]):has(#main:empty)::before { margin: 24px 0 0 -22px; }
#app:not([data-pant]):has(#main:empty)::after { margin-top: 84px; }
