/* Mi Loyverse · estilos. IDÉNTICO a Loyverse, solo con nuestros colores (13-oct-2026).
   Fuentes de verdad:
   - Caja: recursos de la app real (LoyversePOS-2.75.apk: layouts, dimens, colors) y capturas oficiales de iPhone/iPad.
   - Back Office: medido en vivo (ShellBay/InventoryRequests/docs/LOYVERSE-DESIGN.md) y la cuenta real de Julio.
   - Dashboard: capturas oficiales de la app de iPhone.
   Plano: sin sombras de barra ni difuminados (como Loyverse en iPhone/iPad). La única sombra es la de las tarjetas del
   Back Office y la de los diálogos, como en Loyverse.
   Mapa de colores de Loyverse → nuestra paleta:
     primary #4CAF50 (barra de la caja y del Back Office) → --caja
     accent #7CB342 (SAVE / CHARGE, botones llenos)         → --cobrar  (texto --cobrartx)
     verde de enlaces y activo #4BAF4F                       → --acento
     índigo del Dashboard                                    → --dash
     fondo #F5F5F5 / #F1F1F1                                 → --fondo                                                */
@font-face { font-family: Roboto; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/roboto-400.woff2) format('woff2'); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/roboto-500.woff2) format('woff2'); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/roboto-700.woff2) format('woff2'); }

:root, [data-tema="tinta"] { --caja:#1F2A44; --dash:#0F766E; --cobrar:#FF6B4A; --cobrartx:#fff; --acento:#FF6B4A; --fondo:#F4F5F8; }
[data-tema="berenjena"] { --caja:#4C2A85; --dash:#3949AB; --cobrar:#2DD4A7; --cobrartx:#10231C; --acento:#7C4DFF; --fondo:#F5F3FA; }
[data-tema="terracota"] { --caja:#B5482F; --dash:#3D5A4C; --cobrar:#B5482F; --cobrartx:#fff; --acento:#B5482F; --fondo:#F6EFE6; }
[data-tema="grafito"] { --caja:#2B2D31; --dash:#2952CC; --cobrar:#FF7A00; --cobrartx:#fff; --acento:#FF7A00; --fondo:#F3F3F4; }
[data-tema="oceano"] { --caja:#0B3C5D; --dash:#1B6A80; --cobrar:#D9A441; --cobrartx:#1A1405; --acento:#D9A441; --fondo:#F4F6F8; }
:root {
  --tx: rgba(0,0,0,.87); --mu: rgba(0,0,0,.54); --dis: rgba(0,0,0,.38); --div: rgba(0,0,0,.12); --ico: rgba(0,0,0,.54);
  --gris: #EEEEEE; --gris-on: #E0E0E0; --sel: #F2F2F2; --hover: #F7F7F7;
  --mal: #F44336; --ok: #43A047; --amb: #FB8C00;
  --sh-tarjeta: 0 2px 5px rgba(0,0,0,.15); --sh-boton: 0 2px 5px rgba(0,0,0,.26);
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  --font: Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: #fff; color: var(--tx); font: 14px/20px var(--font); touch-action: manipulation; -webkit-font-smoothing: antialiased; overflow: hidden; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font-size: 16px; } /* 16 px: el iPhone no hace zoom al tocar un campo */
::selection { background: color-mix(in srgb, var(--cobrar) 30%, transparent); }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.oculto { display: none !important; }
#app { position: fixed; inset: 0; display: flex; flex-direction: column; background: #fff; }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.mu { color: var(--mu); } .okc { color: var(--ok); } .malc { color: var(--mal); } .ambc { color: var(--amb); }
.r { text-align: right !important; white-space: nowrap; }

/* ---------- barra superior (Toolbar de Loyverse: 56 dp, color de la sección, plana) ---------- */
.top { flex: none; display: flex; align-items: center; padding: var(--top) 4px 0; height: calc(56px + var(--top)); background: var(--caja); color: #fff; position: relative; z-index: 3; }
.top.dash { background: var(--dash); }
.top.blanca { background: #fff; color: var(--tx); border-bottom: 1px solid var(--div); }
.top.blanca .ib { color: var(--ico); }
.top h1 { flex: 1; min-width: 0; font-size: 20px; line-height: 24px; font-weight: 500; padding-left: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 10px; }
.top .ib + h1 { padding-left: 20px; }
.ib { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; color: inherit; }
.ib:active { background: rgba(127,127,127,.18); }
.tb { height: 48px; padding: 0 12px; font-size: 14px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; border-radius: 2px; flex: none; }
.tb:active { background: rgba(127,127,127,.18); }
.top.blanca .tb { color: var(--acento); }
.cuenta { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 5px; border: 1.5px solid currentColor; border-radius: 3px; font-size: 13px; line-height: 1; font-weight: 500; }
.estado-sync { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; opacity: .85; padding: 0 6px; }
.estado-sync svg { width: 18px; height: 18px; }

/* ---------- botones (ButtonFillGreen / ButtonFillGray / planos) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 36px; padding: 0 16px; border-radius: 2px; background: var(--cobrar); color: var(--cobrartx); font-size: 14px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.btn.gris { background: var(--gris); color: var(--tx); }
.btn.gris:active { background: var(--gris-on); }
.btn.plano { background: none; color: var(--tx); }
.btn.plano.ac, .btn.ac { background: none; color: var(--acento); }
.btn.mal { background: var(--mal); color: #fff; }
.btn.alto { height: 48px; width: 100%; }
.btn.alto56 { height: 56px; width: 100%; }
.btn:disabled { opacity: .38; }
.btn:active:not(:disabled) { filter: brightness(.93); }
.btn svg.i { width: 24px; height: 24px; }
.bo .btn:not(.plano):not(.ac):not(.gris) { box-shadow: var(--sh-boton); } /* el Back Office web sí lleva sombra en el botón principal */

/* ---------- campos (Material: solo línea inferior) ---------- */
.campo { display: block; margin: 0 0 20px; }
.campo > span { display: block; font-size: 12px; color: var(--mu); line-height: 16px; }
.campo input, .campo select, .campo textarea { width: 100%; border: 0; border-bottom: 1px solid rgba(0,0,0,.42); background: transparent; padding: 6px 0 7px; outline: 0; border-radius: 0; -webkit-appearance: none; appearance: none; }
.campo select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5'%3E%3Cpath d='M0 0l5 5 5-5z' fill='%23757575'/%3E%3C/svg%3E") no-repeat right 4px center; padding-right: 20px; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-bottom: 2px solid var(--acento); padding-bottom: 6px; }
.campo small { display: block; font-size: 12px; color: var(--mu); margin-top: 4px; }
.etq-ac { display: block; font-size: 14px; font-weight: 500; color: var(--acento); line-height: 24px; }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; border-bottom: 1px solid var(--div); cursor: pointer; }
.toggle input { -webkit-appearance: none; appearance: none; width: 36px; height: 14px; border-radius: 7px; background: rgba(0,0,0,.26); position: relative; flex: none; cursor: pointer; transition: background .15s; }
.toggle input::after { content: ''; position: absolute; top: -3px; left: -2px; width: 20px; height: 20px; border-radius: 50%; background: #FAFAFA; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .15s, background .15s; }
.toggle input:checked { background: color-mix(in srgb, var(--acento) 50%, transparent); }
.toggle input:checked::after { transform: translateX(20px); background: var(--acento); }
.errores { color: var(--mal); margin: -8px 0 14px; font-size: 13px; }

/* ---------- listas y tablas ---------- */
.lista > * { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--div); width: 100%; text-align: left; }
.lista > *:last-child { border-bottom: 0; }
.lista .t { flex: 1; min-width: 0; }
.lista .t b { display: block; font-size: 16px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista .t small { display: block; color: var(--mu); font-size: 14px; }
.lista .der { text-align: right; white-space: nowrap; font-size: 16px; }
.subtit { display: flex; align-items: center; height: 48px; padding: 0 16px; font-size: 14px; font-weight: 500; color: var(--acento); border-bottom: 1px solid var(--div); }
.vacio { padding: 40px 16px; text-align: center; color: var(--mu); font-size: 16px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { font-size: 13px; font-weight: 500; color: var(--mu); text-align: left; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--div); white-space: nowrap; }
table.t td { height: 56px; padding: 0 16px; border-bottom: 1px solid var(--div); }
table.t tr.cl { cursor: pointer; } table.t tr.cl:hover td { background: var(--hover); }
table.t tfoot td { font-weight: 500; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; vertical-align: 0; }
.tabla-scroll { overflow-x: auto; }

/* ---------- inicio ---------- */
.inicio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: calc(24px + var(--top)) 16px calc(24px + var(--bot)); background: var(--fondo); }
.inicio h1 { font-size: 24px; line-height: 32px; font-weight: 400; text-align: center; }
.inicio p { color: var(--mu); text-align: center; max-width: 420px; }
.partes { display: grid; gap: 1px; width: min(420px, 100%); background: var(--div); border-radius: 2px; overflow: hidden; box-shadow: var(--sh-tarjeta); }
.parte { display: flex; align-items: center; gap: 16px; padding: 16px; background: #fff; text-align: left; }
.parte:active { background: var(--hover); }
.parte i { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.parte b { display: block; font-size: 16px; font-weight: 400; }
.parte small { color: var(--mu); font-size: 14px; }

/* ---------- PIN (view_pin_panel: fondo blanco, logo, "Enter PIN", teclado) ---------- */
.pin { flex: 1; display: flex; flex-direction: column; background: #fff; padding-top: var(--top); padding-bottom: var(--bot); }
.pin-cab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 8px 16px 20px; position: relative; min-height: 0; }
.pin-cab .ib { position: absolute; left: 4px; top: 4px; color: var(--ico); }
.pin-logo { width: 64px; height: 64px; border-radius: 14px; }
.pin-tienda { font-size: 16px; color: var(--mu); margin-top: 8px; }
.pin-msg { font-size: 14px; color: var(--tx); margin-top: 20px; }
.puntos { display: flex; gap: 16px; margin-top: 12px; height: 14px; }
.puntos i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--dis); }
.puntos i.on { background: var(--caja); border-color: var(--caja); }
.puntos.mal { animation: temblor .35s; }
@keyframes temblor { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pin .pista { font-size: 12px; color: var(--mu); text-align: center; max-width: 320px; margin-top: 14px; }
.teclado { flex: 2; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; border-top: 1px solid var(--div); max-height: 420px; }
.teclado button { font-size: 24px; color: rgba(0,0,0,.87); display: flex; align-items: center; justify-content: center; }
.teclado button:active { background: var(--gris); }
.teclado button.txt { font-size: 14px; font-weight: 500; text-transform: uppercase; color: var(--mu); }
@media (min-width: 600px) { .teclado { width: 420px; margin: 0 auto; border: 1px solid var(--div); border-bottom: 0; } }

/* ---------- caja: venta ---------- */
.pos { flex: 1; display: flex; min-height: 0; background: #fff; }
.pos-izq { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pos-der { width: 320px; flex: none; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--div); background: #fff; }
/* Botón doble SAVE/OPEN TICKETS | CHARGE (ReceiptButtonsView: accent, 56 dp, texto 16 sp, divisor) */
.cobro-doble { flex: none; padding: 8px; }
.pos-der .cobro-doble { padding: 8px 16px 16px; }
.doble { display: flex; height: 56px; border-radius: 2px; overflow: hidden; background: var(--cobrar); color: var(--cobrartx); }
.doble button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; line-height: 20px; color: inherit; }
.doble button + button { border-left: 1px solid rgba(0,0,0,.18); }
.doble button span { font-size: 16px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.doble button:active { background: rgba(0,0,0,.1); }
.doble button:disabled { opacity: .6; }
/* Fila de filtro ("All items ▾" | lupa) */
.filtro { flex: none; display: flex; align-items: center; height: 56px; padding-left: 16px; border-top: 1px solid var(--div); border-bottom: 1px solid var(--div); background: #fff; }
.filtro .sel { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 56px; font-size: 16px; color: var(--tx); text-align: left; }
.filtro .sel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filtro .sel svg { width: 18px; height: 18px; color: var(--ico); }
.filtro .vdiv { width: 1px; height: 32px; background: var(--div); margin: 0 4px 0 8px; }
.filtro .ib { color: var(--ico); }
.filtro input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 56px; }
/* Rejilla de artículos (item_product_color_grid: color entero, nombre al centro, 2 líneas, sin precio) */
.rejilla { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: max-content; gap: 2px; padding: 2px 2px calc(2px + var(--bot)); align-content: start; background: #fff; }
.tile { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 0 12px; text-align: center; color: #fff; font-size: 16px; line-height: 20px; overflow: hidden; position: relative; }
.tile span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.tile.osc { color: rgba(0,0,0,.87); }
.tile:active::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.12); }
.pestanas { flex: none; display: flex; height: calc(56px + var(--bot)); padding-bottom: var(--bot); background: #fff; border-top: 1px solid var(--div); overflow-x: auto; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas button { flex: none; min-width: 112px; padding: 0 16px; font-size: 14px; font-weight: 500; text-transform: uppercase; color: var(--mu); border-top: 2px solid transparent; }
.pestanas button.on { color: var(--caja); border-top-color: var(--caja); }
/* Ticket (item_receipt: nombre 16 + " x 2", modificadores 14 gris, precio a la derecha) */
.lineas { flex: 1; min-height: 0; }
.ln { display: flex; gap: 16px; align-items: flex-start; padding: 10px 16px; min-height: 48px; width: 100%; text-align: left; font-size: 16px; line-height: 22px; }
.ln:active { background: var(--hover); }
.ln .t { flex: 1; min-width: 0; }
.ln .c { color: var(--mu); }
.ln small { display: block; font-size: 14px; line-height: 18px; color: var(--mu); margin-top: 4px; }
.ln .m { white-space: nowrap; }
.tots { flex: none; border-top: 1px solid var(--div); padding: 8px 16px; }
.tots div { display: flex; justify-content: space-between; font-size: 14px; color: var(--mu); line-height: 28px; }
.tots div.tot { font-size: 16px; font-weight: 500; color: var(--tx); line-height: 32px; }
.solo-tab { display: none !important; }
@media (min-width: 600px) and (min-height: 480px) {
  .solo-tel { display: none !important; }
  .solo-tab { display: flex !important; }
  .archivo-det.solo-tab { display: block !important; }
  .rejilla { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 4px; padding: 4px; background: var(--fondo); }
  .tile { font-size: 16px; }
}
@media (min-width: 1100px) { .pos-der { width: 400px; } }
@media not ((min-width: 600px) and (min-height: 480px)) { .pos-der { display: none; } }

/* ---------- cobro (fragment_payment) y venta terminada (fragment_payment_finished) ---------- */
.pago { flex: 1; display: flex; min-height: 0; }
.pago-cont { flex: 1; min-width: 0; }
.pago-in { max-width: 560px; margin: 0 auto; padding: 0 16px calc(24px + var(--bot)); }
.monto { text-align: center; padding: 16px 0 24px; }
.monto b { display: block; font-size: 34px; line-height: 44px; font-weight: 400; }
.monto small { display: block; font-size: 16px; color: var(--mu); margin-top: 4px; }
.efectivo-in { width: 100%; border: 0; border-bottom: 1px solid rgba(0,0,0,.42); padding: 8px 0 7px; outline: 0; font-size: 16px; background: none; border-radius: 0; }
.efectivo-in:focus { border-bottom: 2px solid var(--acento); padding-bottom: 6px; }
.medio { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 56px; margin-top: 16px; border-radius: 2px; background: var(--gris); color: var(--tx); font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; }
.medio:active { background: var(--gris-on); }
.medio svg { color: var(--ico); }
.listo { flex: 1; display: flex; flex-direction: column; align-items: stretch; padding: 0 16px calc(24px + var(--bot)); }
.listo .in { width: min(560px, 100%); margin: 0 auto; }
.pagado { display: flex; align-items: stretch; justify-content: center; padding-top: 48px; }
.pagado > div { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.pagado .izq { align-items: flex-end; text-align: right; padding-right: 32px; }
.pagado .derc { align-items: flex-start; padding-left: 32px; border-left: 1px solid var(--div); }
.pagado b { font-size: 34px; line-height: 44px; font-weight: 400; }
.pagado small { font-size: 16px; color: var(--mu); }
.pagado.solo > div { align-items: center; text-align: center; padding: 0; border: 0; }
.listo .btn.alto { margin-top: 48px; }
.tarjeta-msg { text-align: center; color: var(--mu); margin-top: 16px; font-size: 14px; }

/* ---------- recibos (archivo) ---------- */
.archivo { flex: 1; display: flex; min-height: 0; }
.archivo-lista { width: 100%; min-height: 0; }
.archivo-det { flex: 1; min-width: 0; min-height: 0; border-left: 1px solid var(--div); }
@media (min-width: 600px) and (min-height: 480px) { .archivo-lista { width: 360px; flex: none; } }
.fila-rec { display: flex; align-items: center; height: 72px; width: 100%; text-align: left; border-bottom: 1px solid var(--div); }
.fila-rec.on { background: var(--sel); }
.fila-rec svg { margin: 0 32px 0 16px; color: var(--ico); }
.fila-rec .t { flex: 1; min-width: 0; }
.fila-rec .t b { display: block; font-size: 16px; font-weight: 400; }
.fila-rec .t small { display: block; font-size: 14px; color: var(--mu); }
.fila-rec .n { font-size: 16px; color: var(--mu); padding-right: 16px; text-align: right; }
.fila-rec .n em { display: block; font-style: normal; font-size: 14px; color: var(--mal); }
.recibo { max-width: 480px; margin: 0 auto; padding: 24px 16px calc(32px + var(--bot)); font-size: 16px; }
.recibo .tot-gr { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--div); }
.recibo .tot-gr b { display: block; font-size: 34px; line-height: 44px; font-weight: 400; }
.recibo .tot-gr small { font-size: 16px; color: var(--mu); }
.recibo .bloque { padding: 14px 0; border-bottom: 1px solid var(--div); }
.recibo .rr { display: flex; justify-content: space-between; gap: 16px; line-height: 24px; }
.recibo .rr small { display: block; font-size: 14px; color: var(--mu); line-height: 18px; }
.recibo .rr.fuerte { font-weight: 500; }
.recibo .pie-rec { display: flex; justify-content: space-between; color: var(--mu); font-size: 14px; padding-top: 14px; }
.recibo.dev .tot-gr b { color: var(--mal); }

/* ---------- turno (view_shift_current) ---------- */
.turno-in { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(24px + var(--bot)); }
.turno-in .btn.gris { width: 100%; height: 48px; margin-bottom: 12px; }
.datos { padding: 8px 0; font-size: 16px; line-height: 28px; }
.datos .rr { display: flex; justify-content: space-between; }
.datos .rr.fuerte { font-weight: 500; }
.turno-in .subtit { padding: 0; border-bottom: 0; height: 40px; margin-top: 8px; }
.sep { border-top: 1px solid var(--div); margin: 8px 0; }

/* ---------- menú lateral de la caja ---------- */
.velo { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; opacity: 0; pointer-events: none; transition: opacity .2s; }
.velo.on { opacity: 1; pointer-events: auto; }
.cajon { position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 85vw); background: #fff; z-index: 21; transform: translateX(-105%); transition: transform .22s ease; display: flex; flex-direction: column; }
.cajon.on { transform: none; }
.cajon .cab { padding: calc(16px + var(--top)) 16px 16px; background: var(--caja); color: #fff; min-height: calc(120px + var(--top)); display: flex; flex-direction: column; justify-content: flex-end; }
.cajon .cab.dash { background: var(--dash); }
.cajon .cab b { display: block; font-size: 16px; font-weight: 500; }
.cajon .cab small { font-size: 14px; opacity: .8; }
.cajon nav { flex: 1; padding: 8px 0 calc(8px + var(--bot)); }
.cajon nav button { display: flex; align-items: center; gap: 32px; width: 100%; height: 48px; padding: 0 16px; font-size: 14px; font-weight: 500; color: var(--tx); text-align: left; }
.cajon nav button svg { color: var(--ico); }
.cajon nav button:active { background: var(--hover); }
.cajon nav .on { color: var(--acento); background: var(--sel); } .cajon nav .on svg { color: var(--acento); }
.cajon hr { border: 0; border-top: 1px solid var(--div); margin: 8px 0; }

/* ---------- diálogos y avisos ---------- */
.modal-velo { position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 2px; box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14); width: min(480px, 100%); max-height: calc(100% - 32px); display: flex; flex-direction: column; }
.modal h3 { font-size: 20px; line-height: 28px; font-weight: 500; padding: 24px 24px 12px; }
.modal .cuerpo { padding: 0 24px 8px; overflow-y: auto; font-size: 16px; line-height: 24px; color: var(--mu); }
.modal .cuerpo .campo, .modal .cuerpo .opc, .modal .cuerpo .toggle { color: var(--tx); }
.modal .acc { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 8px 8px 24px; flex-wrap: wrap; }
.modal .acc .btn { background: none; color: var(--acento); box-shadow: none; min-width: 64px; padding: 0 8px; }
.modal .acc .btn.mal { color: var(--mal); }
.opc { display: flex; align-items: center; gap: 16px; min-height: 48px; border-bottom: 1px solid var(--div); cursor: pointer; font-size: 16px; }
.opc input { width: 20px; height: 20px; accent-color: var(--acento); flex: none; }
.opc span { flex: 1; }
.cant { display: flex; align-items: center; gap: 8px; }
.cant button { width: 48px; height: 48px; border-radius: 50%; font-size: 24px; color: var(--ico); }
.cant button:active { background: var(--gris); }
.cant input { width: 72px; text-align: center; border: 0; border-bottom: 1px solid rgba(0,0,0,.42); padding: 6px 0; outline: 0; }
.grupo-mod { font-size: 14px; color: var(--acento); font-weight: 500; margin: 16px 0 0; line-height: 24px; }
.menu-flot { position: fixed; z-index: 31; background: #fff; border-radius: 2px; box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14); padding: 8px 0; min-width: 200px; max-height: 70vh; overflow-y: auto; }
.menu-flot button { display: block; width: 100%; height: 48px; padding: 0 16px; text-align: left; font-size: 16px; color: var(--tx); }
.menu-flot button.on { color: var(--acento); }
.menu-flot button:active { background: var(--hover); }
#aviso { position: fixed; left: 50%; bottom: calc(24px + var(--bot)); transform: translate(-50%, 20px); background: #323232; color: #fff; padding: 14px 24px; border-radius: 2px; z-index: 40; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); }
#aviso.on { opacity: 1; transform: translate(-50%, 0); }
#actualizar { position: fixed; left: 0; right: 0; top: 0; z-index: 50; background: #1565C0; color: #fff; display: flex; align-items: center; justify-content: center; gap: 12px; padding: calc(8px + var(--top)) 16px 8px; font-weight: 500; }
#actualizar button { color: #fff; text-decoration: underline; font-weight: 700; }

/* ---------- Back Office (medido en vivo: barra 48, menú 320 / riel 72, filas 56, tablas 56) ---------- */
.bo-app { background: var(--fondo); }
.bo-app .top { height: calc(48px + var(--top)); }
.bo-app .top h1 { font-size: 20px; font-weight: 400; padding-left: 12px; }
.bo { flex: 1; display: flex; min-height: 0; }
.lado { width: 320px; flex: none; background: #fff; box-shadow: var(--sh-tarjeta); overflow-y: auto; overflow-x: hidden; z-index: 2; padding-bottom: 48px; }
.lado .quien { display: flex; align-items: center; height: 64px; border-bottom: 1px solid var(--div); width: 100%; text-align: left; }
.lado .quien .av { margin: 0 18px; }
.av { width: 36px; height: 36px; border-radius: 50%; background: #9E9E9E; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 500; flex: none; }
.lado .quien b { display: block; font-size: 14px; font-weight: 500; }
.lado .quien small { display: block; color: var(--mu); font-size: 12px; line-height: 16px; }
.lado .sec { display: flex; align-items: center; gap: 24px; width: 100%; height: 56px; padding: 0 19px 0 20px; font-size: 14px; font-weight: 500; border-left: 4px solid transparent; border-bottom: 1px solid var(--div); text-align: left; white-space: nowrap; }
.lado .sec:hover { background: var(--hover); }
.lado .sec svg { color: var(--ico); }
.lado .sec.on { background: var(--sel); border-left-color: var(--acento); }
.lado .sec .chev { margin-left: auto; color: var(--dis); width: 20px; height: 20px; }
.lado .grupo { border-bottom: 1px solid var(--div); padding-bottom: 8px; }
.lado .grupo .sec { border-bottom: 0; }
.lado .sub { display: block; width: 100%; text-align: left; padding: 10px 16px 10px 72px; font-size: 14px; line-height: 20px; white-space: nowrap; }
.lado .sub:hover { background: var(--hover); }
.lado .sub.on { color: var(--acento); }
body.riel .lado { width: 72px; }
body.riel .lado .wl, body.riel .lado .sub, body.riel .lado .chev { display: none; }
body.riel .lado .sec { padding: 0; justify-content: center; gap: 0; }
body.riel .lado .grupo { padding-bottom: 0; }
#flyout { position: fixed; left: 72px; width: 226px; background: #fff; border-radius: 2px; box-shadow: var(--sh-tarjeta); padding: 8px 0; z-index: 25; }
#flyout .fyhead { padding: 0 16px 6px; font-size: 12px; color: var(--mu); }
#flyout button { display: block; width: 100%; height: 36px; padding: 0 16px; text-align: left; font-size: 14px; }
#flyout button:hover { background: var(--hover); }
#flyout button.on { color: var(--acento); font-weight: 500; }
.contenido { flex: 1; min-width: 0; padding: 24px 24px calc(48px + var(--bot)); }
.contenido .ancho { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.contenido .angosto { max-width: 704px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.card { background: #fff; box-shadow: var(--sh-tarjeta); border-radius: 2px; }
.pad { padding: 16px 24px; }
.herr { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--div); flex-wrap: wrap; }
.busca { display: flex; align-items: center; gap: 8px; margin-left: auto; height: 40px; width: 240px; border-bottom: 1px solid rgba(0,0,0,.42); color: var(--ico); }
.busca input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; color: var(--tx); }
.busca svg { width: 20px; height: 20px; }
.herr select { height: 36px; border: 0; border-bottom: 1px solid rgba(0,0,0,.42); background: transparent; padding: 0 4px; font-size: 14px; }
.doc-tit { font-size: 28px; line-height: 36px; font-weight: 400; }
.volver { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: var(--tx); align-self: flex-start; }
.volver svg { width: 20px; height: 20px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { padding: 16px 24px; border-right: 1px solid var(--div); }
.kpi:last-child { border-right: 0; }
.kpi small { display: block; color: var(--mu); font-size: 13px; }
.kpi b { display: block; font-size: 24px; line-height: 32px; font-weight: 400; }
.kpi em { font-style: normal; font-size: 13px; }
.rangos { display: flex; gap: 4px; flex-wrap: wrap; }
.rangos button { height: 32px; padding: 0 12px; border-radius: 16px; color: var(--mu); font-weight: 500; }
.rangos button.on { background: var(--caja); color: #fff; }
.barras { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding: 8px 0 0; }
.barras .b { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.barras .b i { display: block; width: 100%; max-width: 36px; background: color-mix(in srgb, var(--cobrar) 35%, #fff); border: 1px solid var(--cobrar); border-bottom: 0; min-height: 1px; }
.barras .b span { font-size: 10px; line-height: 12px; color: var(--mu); white-space: nowrap; }
.sw-col { display: block; width: 40px; height: 40px; border-radius: 2px; outline-offset: 2px; }
input:checked + .sw-col { outline: 3px solid var(--acento); }
@media (max-width: 899px) {
  .lado { position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 85vw) !important; transform: translateX(-105%); transition: transform .22s; z-index: 21; padding-top: var(--top); }
  .lado.on { transform: none; }
  body.riel .lado .wl, body.riel .lado .sub, body.riel .lado .chev { display: revert; }
  body.riel .lado .sec { padding: 0 19px 0 20px; justify-content: flex-start; gap: 24px; }
  .contenido { padding: 12px 8px calc(48px + var(--bot)); }
  .fila2 { grid-template-columns: 1fr; }
  .busca { width: 100%; margin: 0; }
  .ocultable { display: none; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--div); }
  table.t th, table.t td { padding: 0 10px; }
}
@media (min-width: 900px) { .solo-movil { display: none !important; } }

/* ---------- Dashboard (capturas oficiales de la app de iPhone) ---------- */
.dash-app { background: #fff; }
.dtop { flex: none; background: var(--dash); color: #fff; padding-top: var(--top); }
.dtop .fila { display: flex; align-items: center; height: 56px; padding: 0 4px; }
.dtop .titulo { flex: 1; min-width: 0; text-align: center; }
.dtop .titulo b { display: block; font-size: 18px; font-weight: 500; line-height: 22px; }
.dtop .titulo small { display: block; font-size: 12px; line-height: 16px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtop .hueco { width: 48px; flex: none; }
.dfecha { display: flex; align-items: center; height: 48px; padding: 0 4px; }
.dfecha .lbl { flex: 1; text-align: center; font-size: 16px; font-weight: 500; height: 48px; }
.dfecha .ib:disabled { opacity: .35; }
.dcont { flex: 1; min-height: 0; }
.dsec { padding: 16px 16px 8px; text-align: center; font-size: 16px; font-weight: 500; width: 100%; }
.anillos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 12px 8px; }
.anillo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.anillo svg { width: 96px; height: 96px; }
.anillo .v { font-size: 15px; font-weight: 500; margin-top: 6px; }
.anillo .l { font-size: 12px; color: var(--mu); }
.anillo .c { font-size: 12px; font-weight: 500; }
.grafico { padding: 8px 16px 20px; border-bottom: 1px solid var(--div); }
.grafico .ejes { display: flex; gap: 6px; }
.grafico .y { display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; color: var(--mu); text-align: right; min-width: 34px; height: 160px; }
.grafico .barras { flex: 1; height: 160px; gap: 3px; border-bottom: 1px solid var(--div); padding: 0; overflow: visible; }
.grafico .barras .b { position: relative; }
.grafico .barras .b span { position: absolute; bottom: -16px; }
.dhead { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 16px; font-size: 16px; font-weight: 500; width: 100%; }
.dhead em { font-style: normal; color: var(--acento); font-size: 14px; font-weight: 500; text-transform: uppercase; }
.dlista > * { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 16px; border-top: 1px solid var(--div); }
.dlista .t { flex: 1; min-width: 0; }
.dlista .t b { display: block; font-size: 16px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlista .t small { display: block; font-size: 14px; color: var(--mu); }
.dlista .der { font-size: 16px; white-space: nowrap; text-align: right; }
.dlista .der small { display: block; font-size: 12px; color: var(--mu); }
.circ { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.resumen-filas > div { display: flex; justify-content: space-between; align-items: center; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--div); font-size: 16px; }
.resumen-filas > div.fuerte { font-weight: 500; }
.dnav { flex: none; display: flex; background: #fff; border-top: 1px solid var(--div); padding-bottom: var(--bot); }
.dnav button { flex: 1; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--mu); }
.dnav button svg { width: 24px; height: 24px; }
.dnav button.on { color: var(--dash); }
@media (min-width: 700px) { .dcont > * { max-width: 680px; margin-left: auto; margin-right: auto; } }
