/* LINKHORA — estilos de la app (iPhone primero; se amplía a tableta y computadora). Colores del ícono oficial. */
:root {
  --navy: #01112c; --navy2: #03143e; --blue: #0449a0; --blue2: #0060d8;
  --silver: #cccfd8; --silver2: #a5b0c0; --gold: #edb329; --gold2: #fcc905; --goldInk: #725a37; --cream: #f7eeb3;
  --bg: #f3f5f8; --card: #fff; --ink: #03143e; --muted: #5c6470; --line: #dde0e7;
  --ok: #1f7a4d; --okBg: #dff1e7; --warn: #a4521a; --warnBg: #f7e7d8; --bad: #a12222;
  --tabH: 64px; --safeB: env(safe-area-inset-bottom, 0px); --safeT: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); overflow-x: hidden; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { touch-action: manipulation; cursor: pointer; }

/* Encabezado */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff;
  padding: calc(8px + var(--safeT)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
.logo { width: 36px; height: 36px; border-radius: 9px; }
.brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 1px; font-size: 18px; letter-spacing: .08em; min-width: 0; }
.brand b { color: var(--silver); } .brand .gold-t { color: var(--gold); }
.brand small { flex-basis: 100%; color: var(--silver2); font-size: 12px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim { margin-left: auto; background: var(--gold); color: var(--navy); font-weight: 700; font-size: 11px; padding: 3px 8px; border-radius: 99px; letter-spacing: .06em; }
.top .link { background: none; border: 1px solid var(--silver2); color: #fff; border-radius: 10px; padding: 0 12px; min-height: 44px; margin-left: auto; }
.sim:not([hidden]) + .link { margin-left: 0; }
.offline { background: var(--warnBg); color: var(--warn); text-align: center; padding: 8px 16px; font-size: 14px; }

/* Pestañas: abajo en el teléfono, a la izquierda en computadora */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--navy); border-top: 1px solid #0b2350;
  padding: 0 env(safe-area-inset-right) var(--safeB) env(safe-area-inset-left); }
.tabs button { flex: 1; min-width: 0; height: var(--tabH); background: none; border: 0; color: var(--silver2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; position: relative; }
.tabs button svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--gold); }
.tabs .badge { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; line-height: 18px; }
main { padding: 12px max(16px, env(safe-area-inset-right)) calc(var(--tabH) + var(--safeB) + 24px) max(16px, env(safe-area-inset-left)); max-width: 1200px; margin: 0 auto; }
main > section { display: none; }
main > section.on { display: block; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { main > section.on { animation: none; } }

/* Bloques */
.title { font-size: 26px; margin: 6px 0 12px; letter-spacing: -.01em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
h2.sub { margin: 18px 2px 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 12px; min-width: 0; }
.stack { display: grid; gap: 10px; }
.stack > .card, .grid > div > .card { margin: 0; }
.grid { display: grid; gap: 12px; margin-bottom: 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.empty { color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 14px; margin: 0; }
.err { color: var(--bad); min-height: 1.4em; }
.row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.between { justify-content: space-between; }
.big { font-size: 22px; font-weight: 700; }
.name { font-size: 18px; font-weight: 650; }

/* Botones táctiles: 44 px mínimo (guía de Apple) */
.primary, .ghost, .chips button, .seg button { min-height: 44px; border-radius: 12px; padding: 0 16px; font-weight: 600; }
.primary { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.primary.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.ghost { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.ghost.danger { color: var(--bad); border-color: #e0b4b4; }
.block { width: 100%; }
button:disabled { opacity: .45; cursor: default; }
button:active:not(:disabled) { transform: scale(.98); }
:focus-visible { outline: 3px solid var(--blue2); outline-offset: 2px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btns > button { flex: 1 1 140px; }

/* Selector de modalidad */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #e8edf5; padding: 4px; border-radius: 14px; }
.seg button { border: 0; background: transparent; color: var(--navy); padding: 0 8px; }
.seg button[aria-checked="true"] { background: var(--gold); color: var(--navy); box-shadow: 0 1px 3px rgba(1,17,44,.25); }
.seg + .muted { margin: 10px 2px 0; }

/* Indicadores */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 4px; }
.kpi { background: var(--navy); color: #fff; border-radius: 16px; padding: 12px 14px; }
.kpi b { display: block; font-size: 28px; color: var(--gold); line-height: 1.1; }
.kpi span { color: var(--silver); font-size: 13px; }

/* Etiquetas */
.tag { display: inline-block; font-size: 13px; padding: 3px 10px; border-radius: 99px; background: #e8edf5; color: var(--navy2); font-weight: 600; white-space: nowrap; }
.tag.ok { background: var(--okBg); color: var(--ok); } .tag.warn { background: var(--warnBg); color: var(--warn); }
.tag.gold { background: var(--cream); color: var(--goldInk); } .tag.off { background: #eceef2; color: #6f747e; }

/* Filtros */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: 0 0 auto; background: #fff; border: 1px solid var(--line); color: var(--navy); font-weight: 500; }
.chips button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chips label { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.chips input { width: 20px; height: 20px; accent-color: var(--navy); }

/* Tarjeta de chofer */
.driver .head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.driver .veh { color: var(--muted); font-size: 14px; }
.zones { display: grid; gap: 8px; margin-top: 12px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 51px; height: 31px; border-radius: 16px; background: #d6dae2; position: relative; margin: 0 4px 0 0; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:disabled { opacity: .5; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.facts div { background: var(--bg); border-radius: 10px; padding: 8px; font-size: 13px; color: var(--muted); }
.facts b { display: block; color: var(--ink); font-size: 15px; }

/* Pedidos */
.stops { margin: 10px 0 0; padding-left: 22px; }
.stops li { margin: 2px 0; } .stops li.done { color: var(--ok); }
.assign { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
select, input:not([type=checkbox]) { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #fff; color: var(--ink); font-size: 16px; }
.field { display: grid; gap: 4px; } .field > span { font-size: 14px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
details.hist summary { font-weight: 500; color: var(--muted); font-size: 14px; }
.log { margin: 0; padding-left: 22px; color: var(--muted); } .log li { margin: 4px 0; }
.offer { border: 2px solid var(--gold); }
.count { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Mapa */
svg#map { width: 100%; height: auto; display: block; background: #eaf0f7; border-radius: 12px; }

/* Entrada */
.login { max-width: 460px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right)) calc(40px + var(--safeB)) max(16px, env(safe-area-inset-left)); text-align: center; }
.login .login-logo { width: 120px; height: 120px; border-radius: 26px; box-shadow: 0 10px 30px rgba(1,17,44,.25); }
.login h1 { margin: 16px 0 4px; } .login h2 { margin-top: 20px; }
.login .card, .login .stack { text-align: left; }
.login > .primary { margin-top: 14px; }

/* Avisos */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabH) + var(--safeB) + 14px); z-index: 40; max-width: calc(100% - 32px);
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 15px; }
.toast.bad { background: var(--bad); }
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(1,17,44,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--safeB)); }
.sheet p { font-size: 17px; margin: 0 0 6px; }
.install { border-color: var(--gold); background: #fffbea; }
.install { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; }
.install p { margin: 0; flex: 1; font-size: 15px; }
.install .close { flex: 0 0 44px; height: 44px; border: 0; background: none; color: var(--navy); font-size: 18px; }

/* Tableta */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Computadora: pestañas a la izquierda, misma lógica y mismos controles */
@media (min-width: 1000px) {
  .tabs { top: 52px; bottom: 0; right: auto; width: 200px; flex-direction: column; justify-content: flex-start; padding: 12px 8px; gap: 4px; border-top: 0; }
  .tabs button { flex: 0 0 auto; height: 48px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
  .tabs button[aria-current="page"] { background: #0b2350; }
  .tabs .badge { position: static; margin-left: auto; }
  main { margin-left: 200px; padding: 20px 28px 40px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toast { bottom: 24px; }
  .sheet-bg { align-items: center; } .sheet { border-radius: 20px; }
}

/* ===== Plataforma LINKHORA: tienda, vendedor, reportes ===== */
.prod { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.prod:first-of-type { border-top: 0; }
.prod .pt { font-weight: 600; } .prod .pm { color: var(--muted); font-size: 13px; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 20px; font-weight: 700; }
.qty b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.sum .tot { font-size: 20px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 6px; }
.lines { margin: 6px 0 0; padding: 0; list-style: none; } .lines li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.code { font-size: 32px; font-weight: 800; letter-spacing: .2em; color: var(--navy); background: var(--cream); border-radius: 12px; padding: 6px 14px; display: inline-block; font-variant-numeric: tabular-nums; }
table.rep { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.rep th, table.rep td { text-align: right; padding: 6px 4px; border-top: 1px solid var(--line); }
table.rep th:first-child, table.rep td:first-child { text-align: left; }
table.rep th { color: var(--muted); font-weight: 600; border-top: 0; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.act { font-size: 14px; padding: 6px 0; border-top: 1px solid var(--line); } .act:first-child { border-top: 0; }
.act.bad { color: var(--bad); }
.notice { background: var(--cream); color: var(--goldInk); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.demo-accts { display: grid; gap: 8px; }
.demo-accts button { text-align: left; }
.inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
textarea { width: 100%; min-height: 70px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font: inherit; }
.mt { margin-top: 10px; }

/* ===== Plataforma v2 (27-nov-2026) · DISEÑO PROVISIONAL: Dorlyn elige el diseño final ===== */
/* Idioma EN/ES */
.lang { margin-left: auto; flex: 0 0 auto; display: inline-flex; border: 1px solid var(--silver2); border-radius: 10px; background: none; padding: 0; min-height: 36px; overflow: hidden; }
.lang span { color: var(--silver2); font-size: 12px; font-weight: 700; padding: 0 9px; display: flex; align-items: center; letter-spacing: .06em; }
.lang span.on { background: var(--gold); color: var(--navy); }
.sim:not([hidden]) ~ .lang { margin-left: 0; }
.top .link { margin-left: 0; flex: 0 0 auto; white-space: nowrap; padding: 0 10px; }
.top .brand { flex: 1 1 0; } .top .sim { flex: 0 0 auto; }
.top .link svg { display: none; width: 22px; height: 22px; }
.brand > b { white-space: nowrap; }
@media (max-width: 420px) { .top .link span { display: none; } .top .link svg { display: block; } .top .link { padding: 0 10px; } }
@media (max-width: 420px) { .top { gap: 7px; } .top .logo { width: 32px; height: 32px; } .lang span { padding: 0 7px; } .top .link { padding: 0 9px; } .brand { font-size: 16px; } }

/* Buscador grande, arriba */
.search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 4px 0 10px; }
.search:has(.mic) { grid-template-columns: minmax(0, 1fr) auto auto; }
.search input { min-height: 50px; font-size: 17px; border: 2px solid var(--navy); border-radius: 14px; }
.search .primary { min-height: 50px; display: flex; align-items: center; justify-content: center; }
.search svg { width: 22px; height: 22px; }
.mic { display: flex; align-items: center; justify-content: center; padding: 0 12px; }
.mic svg { width: 22px; height: 22px; } .mic.on { background: var(--gold); border-color: var(--gold); }
.locbar { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.locbar svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--blue); }
.locbar select { min-height: 36px; padding: 4px 10px; font-size: 14px; flex: 1; }

/* Filas horizontales: tiendas y banners */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 78%); gap: 10px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
.scard { display: flex; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.scard.on { border: 2px solid var(--gold); }
.slogo { flex: 0 0 52px; height: 52px; border-radius: 14px; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; overflow: hidden; }
.slogo img { width: 100%; height: 100%; object-fit: cover; }
.sbody { display: grid; gap: 4px; min-width: 0; } .sbody b { font-size: 16px; }
.sbody .primary { min-height: 38px; margin-top: 4px; }
.banner { position: relative; display: grid; min-height: 150px; border-radius: 16px; overflow: hidden; background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.banner > div { position: relative; display: grid; gap: 4px; align-content: end; padding: 14px; }
.banner small { color: var(--gold); font-weight: 700; } .banner b { font-size: 20px; } .banner .soc { font-size: 12px; color: var(--silver); }
.banner .primary { justify-self: start; min-height: 38px; }
.bannerprev { width: 100%; max-height: 160px; object-fit: cover; border-radius: 12px; }
.cats { margin-bottom: 6px; } .cats button { min-height: 38px; font-size: 14px; }

/* Cuadrícula de productos (estilo marketplace) */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.pimg { position: relative; aspect-ratio: 1; background: #eef2f7; display: flex; align-items: center; justify-content: center; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg span:not(.ribbon) { font-size: 44px; font-weight: 800; color: var(--silver2); }
.ribbon { position: absolute; top: 8px; left: 8px; background: var(--navy); color: var(--gold); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.ribbon.sale { left: auto; right: 8px; background: var(--bad); color: #fff; }
.pbody { padding: 10px; display: grid; gap: 4px; flex: 1; align-content: start; }
.pbody .pt { font-weight: 600; font-size: 15px; line-height: 1.25; }
.price { font-size: 19px; font-weight: 800; color: var(--navy); } .price s { font-size: 13px; color: var(--muted); font-weight: 500; }
.pm { color: var(--muted); font-size: 13px; }
.stars { color: var(--gold); font-size: 14px; letter-spacing: 1px; } .stars small { color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stars.none { color: var(--muted); font-size: 12px; letter-spacing: 0; }
.pbody .add { min-height: 40px; margin-top: 4px; }
.pgrid.sm { margin-top: 6px; }
.qty.sm button { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }

/* Opciones de entrega: tiempo y costo antes de pagar */
.opts { display: grid; gap: 8px; }
.opt { text-align: left; display: grid; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink); min-height: 56px; }
.opt span { font-size: 13px; color: var(--muted); }
.opt.on { border: 2px solid var(--gold); background: #fffbea; }

/* Etapas del pedido: confirmada → preparando → lista → en camino → entregada */
.steps { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 0; margin: 8px 0; counter-reset: s; }
.steps li { font-size: 11px; text-align: center; color: var(--muted); border-top: 4px solid var(--line); padding-top: 4px; }
.steps li.done { border-color: var(--ok); color: var(--ok); }
.steps li.now { border-color: var(--gold); color: var(--navy); font-weight: 700; }
.rate { display: inline-flex; gap: 2px; } .rate button { border: 0; background: none; color: var(--gold); font-size: 20px; min-width: 30px; min-height: 30px; padding: 0; }

/* Mapa en vivo simulado */
.minimap { width: 100%; height: auto; display: block; background: #eaf0f7; border-radius: 12px; margin-top: 8px; }
.minimap .pulse { animation: pulse 1.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .05; } }
@media (prefers-reduced-motion: reduce) { .minimap .pulse { animation: none; } }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 3px 0 8px; }
.dot.gold { background: var(--gold); } .dot.navy { background: var(--navy); } .dot.blue { background: var(--blue2); }

/* Asistente */
.chat { display: grid; gap: 8px; margin-bottom: 10px; }
.msg { background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 12px; max-width: 88%; }
.msg.me { justify-self: end; background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 14px 14px 4px 14px; }
.chatbox { position: sticky; bottom: calc(var(--tabH) + var(--safeB) + 8px); background: var(--bg); padding-top: 6px; }

/* Caja y productos */
.seg.three { grid-template-columns: repeat(3, 1fr); }
.receipt { white-space: pre-wrap; font: 14px/1.4 ui-monospace, Menlo, monospace; background: #fffef6; border: 1px dashed var(--line); border-radius: 10px; padding: 12px; margin: 0; }
.prep { flex: 0 0 90px; } .prep input { min-height: 44px; }
.warnbox { border-color: var(--warn); background: #fff8f2; }
.prodrow { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; }
.prodrow img, .prodrow .ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #eef2f7; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--silver2); font-size: 24px; }
.photo { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; }
.photo > img, .photo > span { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; background: #eef2f7; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; text-align: center; }
.filebtn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 12px; padding: 0 14px; font-weight: 600; cursor: pointer; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }
label.switch.card { margin-bottom: 12px; }

@media (min-width: 640px) {
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hscroll { grid-auto-columns: minmax(260px, 40%); }
}
@media (min-width: 1000px) {
  .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hscroll { grid-auto-columns: minmax(260px, 28%); }
  .chatbox { bottom: 12px; }
}
/* Imprimir solo el recibo */
@media print {
  .top, .tabs, .btns, .toast, .search, .chips, .offline { display: none !important; }
  main { margin: 0; padding: 0; } .card { border: 0; }
}

/* ===== Paquete completo (28-nov-2026) · diseño provisional ===== */
.deal { display: grid; gap: 4px; align-content: start; background: #fff; border: 2px dashed var(--gold); border-radius: 16px; padding: 12px; }
.deal .big { font-size: 26px; font-weight: 800; color: var(--bad); } .deal small { color: var(--muted); }
.deal.coupon { border-color: var(--blue); } .deal .primary { min-height: 38px; }
.tag.verified { background: #e3f0ff; color: var(--blue); }
.member { border: 2px solid var(--gold); background: linear-gradient(135deg, #fffdf3, #fff); }
.idpics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; } .idpics img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.sheet.cam video { width: 100%; max-height: 50vh; border-radius: 12px; background: #000; object-fit: cover; }
/* Etiquetas: todas con EL MISMO código (mismo destino), una por funda o paquete */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.label { display: grid; gap: 4px; justify-items: center; background: #fff; border: 1px dashed #999; border-radius: 8px; padding: 10px; break-inside: avoid; }
.label svg { width: 100%; height: auto; max-height: 80px; } .label b { font-size: 22px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.label span, .label small { font-size: 13px; color: #333; }
.label .brand-l { font-size: 14px; letter-spacing: .2em; } .label em { font-size: 11px; color: #555; font-style: normal; text-align: center; }
@media print { .noprint { display: none !important; } .labels { grid-template-columns: repeat(2, 1fr); } .label { border: 1px solid #000; } }
/* Etiqueta térmica 4 × 6 pulgadas: una por página */
@media print {
  body.print-labels .labels { display: block; }
  body.print-labels .label { width: 4in; height: 6in; box-sizing: border-box; padding: .3in; border: 0; border-radius: 0; align-content: center; gap: .12in; break-after: page; page-break-after: always; }
  body.print-labels .label svg { max-height: 1.7in; } body.print-labels .label b { font-size: 34pt; }
  body.print-labels .label .brand-l { font-size: 18pt; } body.print-labels .label span { font-size: 15pt; color: #000; } body.print-labels .label small, body.print-labels .label em { font-size: 12pt; color: #000; }
}

/* Muchas pestañas (dueño): en el teléfono la barra se desliza de lado */
@media (max-width: 999px) { .tabs { overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } .tabs button { flex: 1 0 64px; } }
.btnlink { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700; }
/* Mapa en vivo real (Leaflet + OpenStreetMap) */
.livemap { height: 240px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-top: 8px; z-index: 0; }
.livemap .leaflet-control-attribution { font-size: 10px; }
.ghost.btnlink { border: 1px solid var(--line); color: var(--navy); background: #fff; min-height: 40px; }
