/* Arisac Comercial · estilos propios (no usa app.css de Cargas). Colores y tamaños, SOLO como tokens de :root. */
:root {
  --bg: #f7f7fb; --bg-fuera: #e9e9f2; --surface: #ffffff; --fg: #1b1a2e; --muted: #5e5d73; --line: #e1e0ec;
  --indigo: #2d2b8f; --indigo-soft: #ecebf8; --on-indigo: #ffffff;
  --verde: #4f8f1f; --verde-soft: #eaf4e0; --on-verde: #ffffff; --azul: #9bb5e6;
  --compra-fondo: #dbeafe; --compra-linea: #3b82c4; --compra-fg: #123a73; --on-compra: #ffffff;   /* «Lo compra» (1L-B): azul claro con texto oscuro (contraste 9:1) */
  --rojo: #b42318; --rojo-soft: #fdecea; --on-rojo: #ffffff; --velo: rgba(18, 18, 28, .55); --ambar: #9a5b00; --ambar-soft: #fff4dc;
  --sombra: 0 4px 14px rgba(45, 43, 143, .4);
  --f: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-xs: .75rem; --t-s: .8125rem; --t-m: .9375rem; --t-l: 1.0625rem; --t-xl: 1.375rem; --t-kpi: 1.25rem;
  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --e5: 24px; --e6: 40px;
  --r-s: 8px; --r-m: 12px; --r-pill: 99px;
  --on-sec: #ffffff; --on-sec-claro: #1b1a2e; --alto-celda: 5.75rem; --ancho-foto: 8.5rem; --alto-apt: 11rem; --alto-sec: 6.5rem;
  --hoja-max: 88dvh; --alto-btn: 48px; --alto-btn-grande: 64px; --alto-nav: 64px; --fab: 60px; --ancho-col: 480px;
  --ancho-hoja: var(--ancho-col); --ancho-barra: var(--ancho-col); --ancho-tablet: 960px; --ancho-hoja-tablet: 560px; --ancho-barra-tablet: 600px; --ancho-celda: 20rem; --ancho-mini: 6.5rem; --alto-previa: 45dvh;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12121c; --bg-fuera: #0a0a12; --surface: #1c1c2a; --fg: #ececf4; --muted: #a3a2b8; --line: #2f2e42;
    --indigo: #a9a6ff; --indigo-soft: #262447; --on-indigo: #14132b;
    --verde: #8fcf5a; --verde-soft: #1f2c17; --on-verde: #14132b; --azul: #6d86bd;
    --compra-fondo: #17304f; --compra-linea: #6aa6e8; --compra-fg: #cfe3ff; --on-compra: #0b1a2e;
    --rojo: #ff8a80; --rojo-soft: #3a1d1d; --on-rojo: #2a0d0a; --velo: rgba(0, 0, 0, .7); --ambar: #f5c063; --ambar-soft: #352a12;
    --sombra: 0 4px 14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-fuera); color: var(--fg); font: var(--t-m)/1.45 var(--f); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.sprite { position: absolute; }
.ico { width: 20px; height: 20px; flex: none; }

/* columna de móvil, centrada en escritorio */
#app { max-width: var(--ancho-col); min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--bg);
  display: flex; flex-direction: column; position: relative; border-inline: 1px solid var(--line); }
#vista { flex: 1; padding: env(safe-area-inset-top) max(var(--e3), env(safe-area-inset-right)) calc(var(--alto-nav) + var(--fab) + env(safe-area-inset-bottom)) max(var(--e3), env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: var(--e2); outline: none; }

.aviso { position: sticky; top: 0; z-index: 5; background: var(--ambar-soft); color: var(--ambar); text-align: center;
  font-size: var(--t-s); font-weight: 600; padding: calc(var(--e2) + env(safe-area-inset-top)) var(--e3) var(--e2); }
.aviso:not([hidden]) + #vista { padding-top: var(--e1); }

/* cabecera */
.ah { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--e2); padding: var(--e4) var(--e1) var(--e2); }
.ah .s { color: var(--muted); font-size: var(--t-s); }
.ah .t { font-size: var(--t-xl); font-weight: 800; line-height: 1.15; color: var(--fg); overflow-wrap: anywhere; }
.atras { display: inline-flex; align-items: center; gap: var(--e1); min-height: var(--alto-btn); color: var(--indigo); font-weight: 600;
  background: none; border: 0; padding: 0 var(--e2) 0 0; cursor: pointer; align-self: flex-start; }

/* tarjetas y filas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: var(--e3); min-width: 0; }
a.card { display: flex; }
a.card:active { background: var(--indigo-soft); }
.row { display: flex; align-items: center; gap: var(--e2); min-width: 0; }
.grow { flex: 1; min-width: 0; }
.nm { font-weight: 600; overflow-wrap: anywhere; }
.sub { color: var(--muted); font-size: var(--t-s); overflow-wrap: anywhere; }
.cant { color: var(--indigo); font-weight: 800; font-size: var(--t-m); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sec { display: flex; justify-content: space-between; align-items: center; margin: var(--e3) var(--e1) 0; color: var(--muted);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.sec a { color: var(--indigo); min-height: var(--alto-btn); display: inline-flex; align-items: center; }
.hr { background: var(--indigo-soft); color: var(--indigo); font-weight: 700; font-size: var(--t-s); border-radius: var(--r-s);
  padding: var(--e2); min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: var(--e1); margin-top: var(--e1); }
.chip { font-size: var(--t-xs); font-weight: 700; padding: var(--e1) var(--e2); border-radius: var(--r-pill); white-space: nowrap; }
.c-r { background: var(--rojo-soft); color: var(--rojo); } .c-a { background: var(--ambar-soft); color: var(--ambar); }
.chip.tipo { display: inline-flex; align-items: center; gap: var(--e1); } .chip.tipo .ico { width: 14px; height: 14px; }
.c-n { background: var(--line); color: var(--muted); }
.c-v { background: var(--verde-soft); color: var(--verde); } .c-i { background: var(--indigo-soft); color: var(--indigo); }
.c-compra { background: var(--compra-fondo); color: var(--compra-fg); box-shadow: inset 0 0 0 1px var(--compra-linea); font-weight: 800; }
/* L8: la fila de cliente = enlace a la ficha (casi toda) + botón «Añadir a un viaje»; la tarjeta no lleva padding para que el enlace llene la fila */
.card.cli-fila { padding: 0; gap: 0; align-items: stretch; }
.cli-enlace { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--e2); padding: var(--e3); color: inherit; text-decoration: none; border-radius: var(--r-m); }
.cli-enlace:active { background: var(--indigo-soft); }
.cli-fila .ibtn { align-self: center; margin-right: var(--e2); }
.ibtn.pend, .btn.pend { background: var(--ambar-soft); color: var(--ambar); }
.dist { color: var(--muted); font-size: var(--t-s); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kl { color: var(--muted); font-size: var(--t-s); }
.kv { font-size: var(--t-kpi); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.up { color: var(--verde); } .down { color: var(--rojo); }
.kpi { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e2); }
.field { display: flex; justify-content: space-between; gap: var(--e3); padding: var(--e2) 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.field:last-child { border-bottom: 0; }
.field span:first-child { overflow-wrap: anywhere; } .field span:last-child { color: var(--muted); text-align: right; flex: none; }
.nota { color: var(--muted); font-size: var(--t-s); margin: 0 var(--e1); }
.vacio { color: var(--muted); text-align: center; padding: var(--e5) var(--e3); margin: 0; }
.cargando { color: var(--muted); text-align: center; padding: var(--e6) var(--e3); }
.ancla { color: var(--indigo); font-weight: 600; }

/* botones grandes, de un pulgar */
.big { display: flex; gap: var(--e2); }
.btn { flex: 1; min-height: var(--alto-btn-grande); border: 0; border-radius: var(--r-m); padding: var(--e2); background: var(--indigo-soft); color: var(--indigo);
  font-size: var(--t-s); font-weight: 700; line-height: 1.1; text-align: center; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: var(--e1); cursor: pointer; }
.btn .ico { width: 24px; height: 24px; }
.btn.pri { background: var(--indigo); color: var(--on-indigo); }
.btn.ok { background: var(--verde); color: var(--on-verde); }
.btn.fila { min-height: var(--alto-btn); flex-direction: row; }
.btn[aria-disabled="true"] { opacity: .45; cursor: default; }
.ibtn { width: var(--alto-btn); height: var(--alto-btn); border-radius: var(--r-m); background: var(--indigo-soft); color: var(--indigo);
  display: inline-flex; align-items: center; justify-content: center; border: 0; flex: none; }
.ibtn[aria-disabled="true"] { opacity: .35; }
.acciones { display: flex; gap: var(--e1); }

/* formularios */
.campo { display: flex; flex-direction: column; gap: var(--e1); }
.campo label, .vercomo { color: var(--muted); font-size: var(--t-s); font-weight: 600; }
.in { width: 100%; min-height: var(--alto-btn); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface);
  padding: 0 var(--e3); font-size: var(--t-l); }
.in:focus { outline: 3px solid var(--azul); border-color: var(--indigo); }
.vercomo { display: flex; align-items: center; gap: var(--e2); }
.vercomo select { flex: 1; }
.filtros { display: flex; gap: var(--e2); overflow-x: auto; padding-bottom: var(--e1); scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtro { flex: none; min-height: var(--alto-btn); padding: 0 var(--e4); border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: var(--t-m); cursor: pointer; }
.filtro:has(.ico) { display: inline-flex; align-items: center; gap: var(--e1); } .filtro .ico { width: 18px; height: 18px; }
.filtro[aria-pressed="true"] { background: var(--indigo); color: var(--on-indigo); border-color: var(--indigo); }
.error { background: var(--rojo-soft); color: var(--rojo); border-radius: var(--r-m); padding: var(--e3); font-weight: 600; }
.warn { background: var(--ambar-soft); color: var(--ambar); border-radius: var(--r-m); padding: var(--e3); font-size: var(--t-s); font-weight: 600; }

/* login */
.login { margin: auto 0; display: flex; flex-direction: column; gap: var(--e4); padding: var(--e5) var(--e1); }
.login h1 { margin: 0; font-size: var(--t-xl); font-weight: 800; color: var(--indigo); }
.login p { margin: 0; color: var(--muted); }
.marca { width: var(--alto-btn-grande); height: var(--alto-btn-grande); border-radius: var(--r-m); background: var(--indigo); color: var(--on-indigo);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: var(--t-xl); }

/* minigráfica de 24 meses */
.spark { width: 100%; height: auto; display: block; margin-top: var(--e2); }
.sp-act { fill: var(--indigo); } .sp-ant { fill: var(--azul); }
.sp-ejes { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--t-xs); }

/* barra de abajo con el micrófono en el centro */
.barra { position: fixed; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: var(--ancho-barra); z-index: 10; display: flex; justify-content: space-around;
  align-items: center; background: var(--surface); border-top: 1px solid var(--line); border-inline: 1px solid var(--line);
  padding: var(--e1) var(--e1) calc(var(--e1) + env(safe-area-inset-bottom)); min-height: var(--alto-nav); }
.barra a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: var(--alto-btn);
  min-height: var(--alto-btn); flex: 1; color: var(--muted); font-size: var(--t-xs); font-weight: 600; }
.barra a[aria-current="page"] { color: var(--indigo); font-weight: 800; }
.fab { width: var(--fab); height: var(--fab); border-radius: 50%; background: var(--indigo); color: var(--on-indigo); border: 4px solid var(--bg);
  display: flex; align-items: center; justify-content: center; margin-top: calc(var(--fab) / -2); box-shadow: var(--sombra); cursor: pointer; flex: none; }
.fab .ico { width: 26px; height: 26px; }
.toast { position: fixed; left: var(--e4); right: var(--e4); bottom: calc(var(--alto-nav) + var(--fab) + env(safe-area-inset-bottom)); max-width: calc(var(--ancho-hoja) - var(--e5) * 2);
  margin: 0 auto; background: var(--fg); color: var(--bg); border-radius: var(--r-m); padding: var(--e3) var(--e4); font-weight: 600; text-align: center;
  z-index: 20; opacity: 0; pointer-events: none; transform: translateY(var(--e2)); }
.toast.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) { .toast { transition: opacity .2s, transform .2s; } }
.lista { display: contents; }
@media (max-width: 519px) { #app, .barra { border-inline: 0; } }
.sep { border: 0; border-top: 1px dashed var(--line); margin: var(--e2) 0; }
.btn.ancho { width: 100%; }
.atras + .ah { padding-top: 0; }

/* ── 1c · hojas de abajo, micrófono, confirmación, cola sin cobertura ───────────────────────────────────── */
body.con-hoja { overflow: hidden; }
.velo { position: fixed; inset: 0; z-index: 30; background: var(--velo); display: flex; align-items: flex-end; justify-content: center; }
.hoja { width: 100%; max-width: var(--ancho-hoja); max-height: var(--hoja-max); background: var(--bg); border-radius: var(--r-m) var(--r-m) 0 0;
  display: flex; flex-direction: column; box-shadow: var(--sombra); outline: none; }
.hoja-c { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--e2); padding: var(--e3) var(--e3) var(--e2) var(--e4); }
.hoja-c .s { color: var(--muted); font-size: var(--t-s); }
.hoja-c .t { font-size: var(--t-xl); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.hoja-cuerpo { overflow-y: auto; padding: 0 var(--e3) var(--e3); display: flex; flex-direction: column; gap: var(--e2); overscroll-behavior: contain; }
.hoja-pie { display: flex; gap: var(--e2); padding: var(--e2) var(--e3) calc(var(--e3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.hoja-pie .btn { min-height: var(--alto-btn-grande); flex-direction: row; font-size: var(--t-m); }
.hoja-pie .btn.ok, .hoja-pie .btn.rec, .hoja-pie .btn.pri { flex: 2; }
.btn.rec { background: var(--rojo); color: var(--on-rojo); }
.centro { text-align: center; }
.espera { display: flex; flex-direction: column; align-items: center; gap: var(--e2); text-align: center; padding: var(--e5) var(--e3); }
.giro { width: var(--e5); height: var(--e5); border-radius: 50%; border: 3px solid var(--indigo-soft); border-top-color: var(--indigo); }
@media (prefers-reduced-motion: no-preference) { .giro { animation: gira 1s linear infinite; } .punto { animation: late 1.2s ease-in-out infinite; } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes late { 50% { opacity: .35; } }
.rec-fila { display: flex; align-items: center; justify-content: center; gap: var(--e2); }
.punto { width: var(--e3); height: var(--e3); border-radius: 50%; background: var(--rojo); }
.crono { font-size: var(--t-xl); font-weight: 800; font-variant-numeric: tabular-nums; }
.onda { display: flex; align-items: center; justify-content: center; gap: 3px; height: var(--e6); }
.onda i { display: block; width: var(--e1); height: var(--e2); border-radius: 2px; background: var(--indigo); }
.grab .onda { margin-top: var(--e2); }
.ayuda { background: var(--ambar-soft); color: var(--ambar); border-radius: var(--r-m); padding: var(--e3); font-size: var(--t-s); font-weight: 600; }
.ayuda summary { cursor: pointer; min-height: var(--alto-btn); display: flex; align-items: center; }
.ayuda .warn { padding: 0; background: none; }
.pasos { margin: var(--e2) 0 0; padding-left: var(--e5); font-weight: 400; } .pasos li { margin-bottom: var(--e2); }
.lista-cli { display: flex; flex-direction: column; gap: var(--e2); }
button.card.res { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
button.card.res:active { background: var(--indigo-soft); }

/* tarjeta de confirmación (boceto «Registrar visita») */
.chk { display: flex; gap: var(--e1); align-items: flex-start; }
.chk-b { width: var(--alto-btn); min-height: var(--alto-btn); flex: none; background: none; border: 0; padding: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: var(--e1); cursor: pointer; }
.box-c { width: var(--e5); height: var(--e5); border-radius: var(--r-s); background: var(--indigo); color: var(--on-indigo); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.box-c.off { background: transparent; border: 2px solid var(--line); }
.chip[data-editar] { border: 0; cursor: pointer; min-height: var(--alto-btn); display: inline-flex; align-items: center; padding: 0 var(--e3); }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e2); }
.linea { display: grid; grid-template-columns: 1fr 4.5rem 3.5rem auto; gap: var(--e1); align-items: center; margin-bottom: var(--e1); }
.linea .in { padding: 0 var(--e2); font-size: var(--t-m); min-width: 0; }
textarea.in { padding: var(--e3); line-height: 1.4; resize: vertical; min-height: calc(var(--alto-btn) * 2); }
.in[type="date"], .in[type="time"] { padding: 0 var(--e2); }

/* tareas hechas, franja de cola y aviso con «Deshacer» */
.card.row .row.grow { padding: 0; }
.ibtn.hecha { color: var(--verde); background: var(--verde-soft); }
.hecha-ya { opacity: .45; } .hecha-ya .nm, .hecha-ya .sub { text-decoration: line-through; }
.franja-cola { width: 100%; border: 0; text-align: left; cursor: pointer; min-height: var(--alto-btn); margin-top: var(--e2); }
.toast.acc { pointer-events: auto; display: flex; justify-content: space-between; align-items: center; gap: var(--e3); text-align: left; }
.toast-b { background: none; border: 0; color: var(--azul); font-weight: 800; min-height: var(--alto-btn); padding: 0 var(--e2); cursor: pointer; }
.borrador { border-left: 3px solid var(--ambar); }

/* ── 1e · conmutador Clientes | Contactos, hoja de filtros, pistas de la lista ───────────────────────────── */
.seg { display: flex; gap: var(--e1); padding: var(--e1); background: var(--indigo-soft); border-radius: var(--r-m); }
.seg a { flex: 1; min-height: var(--alto-btn); display: flex; align-items: center; justify-content: center; border-radius: var(--r-s);
  color: var(--indigo); font-weight: 600; }
.seg a[aria-current="page"] { background: var(--indigo); color: var(--on-indigo); font-weight: 800; }
.filtro.quitar { color: var(--rojo); }
.opciones { display: flex; flex-wrap: wrap; gap: var(--e2); }
.etq { color: var(--muted); font-size: var(--t-s); font-weight: 600; }
.pistas { margin-top: var(--e1); }
.field.largo { flex-direction: column; gap: 0; }
.field.largo span:last-child { text-align: left; flex: 1 1 auto; }
.oculto { background: var(--ambar-soft); color: var(--ambar); border-radius: var(--r-m); padding: var(--e3); font-weight: 600; }

/* ── 1f · compras del cliente: gráfico de 36 meses, pestañas, líneas e informe en pantalla ──────────────── */
.seg button { flex: 1; min-height: var(--alto-btn); display: flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r-s);
  background: none; color: var(--indigo); font-weight: 600; cursor: pointer; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--indigo); color: var(--on-indigo); font-weight: 800; }
.seg.mini { flex: none; }
.seg.mini button { flex: none; min-width: var(--alto-btn); padding: 0 var(--e3); }
.compras { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
.compras #panel { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
.kv.sm { font-size: var(--t-l); }
.der { text-align: right; flex: none; max-width: 45%; }
.der .sub { overflow-wrap: normal; }
button.card.art { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
button.card.art:active { background: var(--indigo-soft); }
.card.lin.abono { border-left: 3px solid var(--rojo); }
.chip.quitar-art { border: 0; cursor: pointer; min-height: var(--alto-btn); display: inline-flex; align-items: center; padding: 0 var(--e3); }
.g-sel { min-height: var(--alto-btn); display: flex; align-items: center; color: var(--muted); font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.g-sel.on { color: var(--fg); font-weight: 800; font-size: var(--t-l); }
.graf { width: 100%; height: auto; display: block; touch-action: manipulation; }
.graf .gh { fill: transparent; cursor: pointer; }
.graf .gb { outline: none; }
.graf .gb:focus-visible .gh { stroke: var(--azul); stroke-width: 2; }
.graf .gbar.act { fill: var(--indigo); } .graf .gbar.ant { fill: var(--azul); }
.graf .gb.sel .gbar { fill: var(--verde); }
.graf .g-rej { stroke: var(--line); stroke-width: 1; } .graf .g-base { stroke: var(--muted); stroke-width: 1; }
.graf .g-media { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; }
.graf .g-t, .graf .g-x { fill: var(--muted); font-size: 9px; font-family: var(--f); }
.graf .g-x { text-anchor: middle; } .graf .g-x.fin { text-anchor: end; }
.leyenda { display: flex; flex-wrap: wrap; gap: var(--e1) var(--e3); color: var(--muted); font-size: var(--t-xs); margin-top: var(--e1); }
.leyenda i { display: inline-block; width: var(--e3); height: var(--e2); border-radius: 2px; margin-right: var(--e1); }
.l-act { background: var(--indigo); } .l-ant { background: var(--azul); }
.leyenda i.l-med { height: 0; border-top: 2px dashed var(--muted); border-radius: 0; vertical-align: 2px; }

/* informe en pantalla: el papel del cliente, en una columna de móvil (colores solo de tokens, así sigue el modo oscuro) */
.iv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; display: flex; flex-direction: column; min-width: 0; padding-bottom: var(--e1); }
.iv > * { margin: 0; }
.iv-cab { display: flex; align-items: center; gap: var(--e3); background: var(--indigo); color: var(--on-indigo); padding: var(--e4); }
.iv-logo { width: var(--alto-btn); height: var(--alto-btn); border-radius: var(--r-m); background: var(--on-indigo); color: var(--indigo); display: flex; align-items: center;
.iv-logo-img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
  justify-content: center; font-weight: 800; font-size: var(--t-xl); flex: none; }
.iv-emp { font-size: var(--t-s); opacity: .85; }
.iv-tit { font-size: var(--t-xl); font-weight: 800; line-height: 1.1; }
.iv-per { display: flex; flex-direction: column; padding: var(--e3) var(--e4); background: var(--indigo-soft); color: var(--indigo); font-weight: 700; }
.iv-per span { color: var(--muted); font-weight: 400; font-size: var(--t-s); }
.iv > .iv-cli, .iv > .iv-resumen, .iv > .iv-pieletra, .iv > .iv-sec, .iv > .iv-caja, .iv > .iv-cifras, .iv > .iv-nota, .iv > .iv-pie, .iv > .graf, .iv > .leyenda { margin-inline: var(--e4); }
.iv > .iv-cli { margin-top: var(--e3); padding: var(--e3); border: 1px solid var(--line); border-radius: var(--r-m); display: flex; flex-direction: column; gap: var(--e1); }
.iv-k { color: var(--muted); font-size: var(--t-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.iv-cli-nom { font-size: var(--t-l); font-weight: 800; overflow-wrap: anywhere; }
.iv-cli-dat { display: flex; flex-wrap: wrap; gap: var(--e1) var(--e4); color: var(--muted); font-size: var(--t-s); } .iv-cli-dat b { color: var(--fg); }
.iv-cli-dir, .iv-com { color: var(--muted); font-size: var(--t-s); }
.iv-com { border-top: 1px dashed var(--line); padding-top: var(--e2); margin-top: var(--e1); }
.iv > .iv-resumen { margin-top: var(--e3); padding: var(--e3); border-left: 3px solid var(--indigo); background: var(--indigo-soft); border-radius: 0 var(--r-s) var(--r-s) 0; line-height: 1.5; }
.iv > .iv-sec { margin-top: var(--e5); margin-bottom: var(--e2); font-size: var(--t-m); font-weight: 800; color: var(--indigo); padding-bottom: var(--e1); border-bottom: 1px solid var(--line); }
.iv-cifras { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e2); }
.iv-cifra { border: 1px solid var(--line); border-top: 3px solid var(--indigo); border-radius: var(--r-s); padding: var(--e2) var(--e3); min-width: 0; }
.iv-v { font-size: var(--t-kpi); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.iv-s { color: var(--muted); font-size: var(--t-xs); } .iv-s2 { font-weight: 400; }
.iv .up { color: var(--verde); font-weight: 700; } .iv .down { color: var(--rojo); font-weight: 700; }
.iv > .iv-pieletra, .iv > .iv-nota { color: var(--muted); font-size: var(--t-s); margin-top: var(--e2); }
.iv-caja { display: flex; flex-direction: column; }
.iv-fila { padding: var(--e2) 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.iv-fila-t { display: flex; justify-content: space-between; gap: var(--e3); align-items: baseline; }
.iv-nm { font-weight: 600; overflow-wrap: anywhere; }
.iv-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.iv-cant { color: var(--indigo); font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; margin-top: 2px; }
.iv-fila-s { display: flex; justify-content: space-between; gap: var(--e3); color: var(--muted); font-size: var(--t-s); margin-top: 2px; align-items: center; }
.iv-fila.ms { display: flex; justify-content: space-between; gap: var(--e3); font-size: var(--t-s); padding: var(--e1) 0; }
.iv-cod { color: var(--muted); font-size: var(--t-xs); font-weight: 400; }
.iv-barra { flex: 1; max-width: 45%; height: var(--e2); border-radius: var(--e1); overflow: hidden; }
.iv-barra .pista { fill: var(--line); } .iv-barra .val { fill: var(--indigo); }
.iv-grupo { display: flex; justify-content: space-between; gap: var(--e3); margin-top: var(--e2); padding: var(--e2); background: var(--indigo-soft); color: var(--indigo);
  border-radius: var(--r-s); font-weight: 800; font-size: var(--t-s); text-transform: uppercase; letter-spacing: .05em; }
.iv-total { display: flex; justify-content: space-between; gap: var(--e3); padding: var(--e2) 0 0; margin-top: var(--e1); border-top: 2px solid var(--indigo); font-weight: 800; }
.iv > .iv-pie { display: flex; flex-direction: column; gap: 2px; margin-top: var(--e5); margin-bottom: var(--e3); padding-top: var(--e2); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-xs); }
.iv > .graf { width: calc(100% - var(--e4) * 2); }
.iv-fila-s > :last-child:not(:first-child) { white-space: nowrap; flex: none; }

/* ── Fase 2 · Viaje: semanas, semana, día (línea de tiempo), hotel y asistente ──────────────────────────── */
.vj-lista { display: flex; flex-direction: column; gap: var(--e2); }
.vj-mas { flex: none; min-height: var(--alto-btn); padding: 0 var(--e4); }
.vj-mas .ico { width: 20px; height: 20px; }
a.card.vj-sem { flex-direction: column; gap: var(--e1); padding: var(--e4); }
.vj-sem.actual { border-color: var(--indigo); box-shadow: inset 4px 0 0 var(--indigo); }
.vj-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--e2); }
.vj-eti { color: var(--indigo); font-size: var(--t-xs); font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.vj-rango { color: var(--muted); font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.vj-nom { font-size: var(--t-l); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.vj-zona { display: flex; align-items: center; gap: var(--e1); color: var(--muted); font-size: var(--t-s); }
.vj-zona .ico { width: 16px; height: 16px; }
.vj-cifras { display: flex; align-items: flex-end; gap: var(--e5); margin-top: var(--e2); color: var(--muted); }
.vj-cifras > div { display: flex; flex-direction: column; font-size: var(--t-xs); }
.vj-cifras b, .vj-res b { font-size: var(--t-xl); font-weight: 800; line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.vj-cifras > .ico { margin-left: auto; align-self: center; color: var(--muted); }
.vj-barras { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--e2); align-items: end; margin-top: var(--e2); }
.vj-b { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: var(--e1); }
.vj-b i { display: block; width: 100%; border-radius: var(--e1); background: var(--indigo); }
.vj-b i.n0 { height: var(--e1); background: var(--line); } .vj-b i.n1 { height: var(--e2); background: var(--azul); } .vj-b i.n2 { height: var(--e4); }
.vj-b i.n3 { height: var(--e5); } .vj-b i.n4 { height: var(--e6); }
.vj-b em { font-style: normal; font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.vj-b.hoy em { color: var(--indigo); font-weight: 800; }
.vj-pas { margin-top: var(--e1); }
.vj-pas > summary { min-height: var(--alto-btn); display: flex; align-items: center; color: var(--muted); font-size: var(--t-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; padding: 0 var(--e1); }
.vj-pas[open] > summary { margin-bottom: var(--e1); }
a.card.vj-lib { min-height: var(--alto-btn); padding: var(--e2) var(--e3); color: var(--muted); }
a.card.vj-lib .nm { color: var(--fg); font-weight: 600; font-size: var(--t-m); }
.vj-vacio { display: flex; flex-direction: column; align-items: center; gap: var(--e2); text-align: center; padding: var(--e5) var(--e4); }
.vj-vacio .sub { margin: 0; max-width: 28ch; }
.vj-vacio .btn { flex: none; align-self: stretch; }
.vj-vacio-i { width: var(--alto-btn-grande); height: var(--alto-btn-grande); border-radius: 50%; background: var(--indigo-soft); color: var(--indigo); display: flex; align-items: center; justify-content: center; }
.vj-vacio-i .ico { width: 28px; height: 28px; }

.vj-res { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: var(--e3) var(--e2); }
.vj-res > div { display: flex; flex-direction: column; gap: var(--e1); }
.vj-res span { color: var(--muted); font-size: var(--t-xs); }
.vj-res > div + div { border-left: 1px solid var(--line); }
.vj-dia { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.vj-dia.libre { flex-direction: row; align-items: center; gap: var(--e3); padding: var(--e2) var(--e3); background: none; border-style: dashed; }
.vj-dia-l { display: flex; align-items: center; gap: var(--e3); padding: var(--e3); min-width: 0; }
.vj-dia-l:active { background: var(--indigo-soft); }
.vj-dia-l > .ico, .vj-ir { color: var(--muted); flex: none; }
.vj-ir { width: var(--alto-btn); height: var(--alto-btn); display: flex; align-items: center; justify-content: center; }
.vj-fecha { width: var(--alto-btn); flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--indigo-soft); color: var(--indigo); border-radius: var(--r-s); padding: var(--e1) 0; }
.vj-fecha span { font-size: var(--t-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.vj-fecha b { font-size: var(--t-xl); line-height: 1; }
.vj-fecha.hoy { background: var(--indigo); color: var(--on-indigo); }
.vj-dia.libre .vj-fecha { background: var(--bg); color: var(--muted); }
.vj-sh { color: var(--ambar); font-weight: 600; }
.vj-hotel { display: flex; align-items: center; gap: var(--e1); margin-top: var(--e1); font-size: var(--t-s); color: var(--muted); }
.vj-hotel .ico { width: 14px; height: 14px; }
.vj-hotel.falta { color: var(--ambar); font-weight: 600; }
.vj-pie { border-top: 1px dashed var(--line); display: flex; }
.vj-ruta { flex: 1; min-height: var(--alto-btn); display: flex; align-items: center; justify-content: center; gap: var(--e2); color: var(--indigo); font-size: var(--t-s); font-weight: 700; }
.vj-ruta[aria-disabled="true"] { opacity: .4; }

.vj-linea { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.vj-par { display: grid; grid-template-columns: 3.25rem var(--e6) 1fr; padding-bottom: var(--e2); }
.vj-hora { display: flex; flex-direction: column; align-items: flex-end; padding-top: var(--e3); font-variant-numeric: tabular-nums; line-height: 1.2; }
.vj-hora b { font-size: var(--t-m); }
.vj-hora b.sin { color: var(--muted); font-weight: 400; }
.vj-hora span { color: var(--muted); font-size: var(--t-xs); }
.vj-riel { position: relative; display: flex; justify-content: center; }
.vj-riel::before { content: ""; position: absolute; top: 0; bottom: calc(var(--e2) * -1); width: 2px; background: var(--line); }
.vj-par:first-child .vj-riel::before { top: var(--e4); }
.vj-par:last-child .vj-riel::before { bottom: 0; }
.vj-dot { position: relative; margin-top: var(--e3); width: var(--e5); height: var(--e5); border-radius: 50%; background: var(--indigo); color: var(--on-indigo); font-size: var(--t-s); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.vj-dot .ico { width: 14px; height: 14px; }
.vj-dot.ok { background: var(--verde); color: var(--on-verde); }
.vj-dot.sin { background: var(--surface); color: var(--ambar); border: 2px solid var(--ambar); }
.vj-dot.sug { background: var(--surface); color: var(--indigo); border: 2px dashed var(--indigo); margin-top: 0; }
.vj-cuerpo { min-width: 0; display: flex; flex-direction: column; gap: var(--e1); }
.vj-tramo { color: var(--muted); font-size: var(--t-xs); font-variant-numeric: tabular-nums; padding: var(--e1) var(--e1) 0; }
.vj-card { padding: var(--e3) var(--e3) 0; display: flex; flex-direction: column; }
.vj-card > .row { padding-bottom: var(--e2); }
.vj-par.hecha .vj-card { opacity: .6; }
/* la nota de la visita (19-nov): debajo del nombre, entera; sin nota, una línea discreta para apuntarla */
.vj-nota { display: flex; align-items: flex-start; gap: var(--e2); width: 100%; margin: 0 0 var(--e2); padding: var(--e2); border: 0; border-radius: var(--r-s); background: var(--ambar-soft); color: var(--fg); font: inherit; font-size: var(--t-s); line-height: 1.4; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.vj-nota .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ambar); }
button.vj-nota { cursor: pointer; min-height: var(--alto-btn); }
.vj-nota.vacia { background: none; color: var(--indigo); font-weight: 700; font-size: var(--t-xs); padding: 0 var(--e1); align-items: center; }
.vj-nota.vacia .ico { color: var(--indigo); margin-top: 0; }
/* de dónde sale el día: el hotel de anoche (20-nov) */
.vj-salida { padding-bottom: var(--e1); }
.vj-dot.sal { background: var(--ambar-soft); color: var(--ambar); }
.vj-sal { padding: var(--e3) var(--e1) 0; color: var(--muted); font-size: var(--t-s); line-height: 1.3; overflow-wrap: anywhere; }
.vj-sal b { color: var(--fg); }
.vj-corte { display: grid; grid-template-columns: 3.25rem var(--e6) 1fr; padding: var(--e1) 0 var(--e2); }
.vj-corte span { grid-column: 2; }
.vj-corte .nota { grid-column: 3; margin: 0; color: var(--ambar); font-weight: 600; }
.vj-acc { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px dashed var(--line); margin: 0 calc(var(--e3) * -1); }
.vj-a { min-height: var(--alto-btn); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--indigo); font-size: var(--t-xs); font-weight: 700; cursor: pointer; padding: var(--e1); }
.vj-a .ico { width: 20px; height: 20px; }
/* «Otras tareas» del día (18-nov): plegadas y pequeñas, sin tarjeta ni número; la ruta es de las visitas */
.vj-tareas { margin-top: var(--e3); color: var(--muted); font-size: var(--t-xs); }
.vj-tareas summary { cursor: pointer; padding: var(--e2) 0; font-weight: 700; }
.vj-tareas ul { list-style: none; margin: 0; padding: 0; }
.vj-tarea { display: flex; align-items: center; gap: var(--e2); border-top: 1px dashed var(--line); }
.vj-tarea.hecha { opacity: .6; }
.vj-tarea .vj-a { min-height: var(--alto-btn); flex: none; padding: 0 var(--e2); }
/* lo mismo en Hoy (18-nov) */
.hoy-tareas { margin-top: var(--e3); color: var(--muted); font-size: var(--t-xs); }
.hoy-tareas summary { cursor: pointer; padding: var(--e2) 0; font-weight: 700; }
.hoy-tareas ul { list-style: none; margin: 0; padding: 0; }
.hoy-tareas li { display: flex; align-items: center; gap: var(--e2); border-top: 1px dashed var(--line); }
.vj-a.ok { color: var(--verde); }
.vj-a:active { background: var(--indigo-soft); }
.vj-a[aria-disabled="true"] { opacity: .35; cursor: default; }
.vj-ya { grid-column: span 3; min-height: var(--alto-btn); display: flex; align-items: center; justify-content: center; gap: var(--e1); color: var(--verde); font-weight: 700; font-size: var(--t-s); }
.vj-mapa { background: var(--indigo-soft); border-radius: var(--r-m); padding: var(--e2); }
.vj-mapa svg { width: 100%; height: auto; display: block; }
.vj-mapa .leyenda { margin: 0; }
.m-ruta { fill: none; stroke: var(--indigo); stroke-width: 2; stroke-dasharray: 5 4; stroke-linecap: round; }
.m-p { fill: var(--indigo); }
.m-p.ok { fill: var(--verde); }
.m-h { fill: var(--ambar); }
.m-n { fill: var(--on-indigo); font-size: 11px; font-weight: 800; text-anchor: middle; font-family: var(--f); }
.vj-hot { display: flex; flex-direction: column; gap: var(--e2); padding-bottom: 0; }
.vj-hot > .btn { margin-bottom: var(--e3); }
.vj-hot.falta { border-style: dashed; padding-bottom: var(--e3); }
.vj-hot.falta > .btn { margin-bottom: 0; }
.vj-hi { width: var(--alto-btn); height: var(--alto-btn); border-radius: var(--r-m); background: var(--indigo-soft); color: var(--indigo); display: flex; align-items: center; justify-content: center; flex: none; }
.vj-hot-b { display: flex; gap: var(--e2); }
.vj-hot-b .btn { flex: 1; }
.vj-hot .vj-acc { margin-top: var(--e1); }
.vj-cerca { border-style: dashed; }
.vj-add { flex: none; min-width: 5rem; background: var(--verde-soft); color: var(--verde); }
.vj-prog { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--e1); margin: 0 var(--e1) var(--e1); }
.vj-prog span { height: var(--e1); border-radius: var(--e1); background: var(--line); }
.vj-prog span.ok { background: var(--indigo); }
.vj-prog span.ya { background: var(--verde); }
.vj-paso { display: flex; flex-direction: column; gap: var(--e3); }
.vj-nav { margin-top: var(--e2); }
.vj-nav .btn { flex-direction: row; font-size: var(--t-m); }
.vj-nav .pri { flex: 2; }
.vj-nav .btn[disabled] { opacity: .55; }
.vj-aj { display: flex; flex-direction: column; gap: var(--e2); }
.vj-aj summary { min-height: var(--alto-btn); display: flex; align-items: center; color: var(--indigo); font-weight: 600; cursor: pointer; }
.vj-cand { text-align: left; }
.vj-cand .box-c { flex: none; }
.vj-cand[aria-pressed="true"] { border-color: var(--indigo); background: var(--indigo-soft); }
.vj-cand.sin { opacity: .55; }
.vj-rd { display: flex; flex-direction: column; gap: var(--e2); }
.vj-rd > .sec { margin: 0; }
.vj-rf { display: flex; flex-direction: column; gap: var(--e1); padding-top: var(--e2); border-top: 1px dashed var(--line); }
.vj-avisos { display: flex; flex-direction: column; gap: var(--e2); }
.vj-avisos .down { color: var(--rojo); }
/* los avisos de la tarjeta de semana son frases: parten línea dentro de la tarjeta (revisión 15-nov) */
.vj-chips-av .chip { white-space: normal; max-width: 100%; text-align: left; line-height: 1.3; }

/* ── 1g · catálogo y prepedido ───────────────────────────────────────────────────────────────────────── */
.card.cat, .card.pl { display: flex; flex-direction: column; gap: var(--e2); }
.cat-acc { display: flex; justify-content: flex-end; }
.card.cat.compra { background: var(--compra-fondo); border-color: var(--compra-linea); }
.card.cat.compra .sub, .card.cat.compra .nm, .card.cat.compra .kv { color: var(--compra-fg); }
.regla { font-weight: 700; }
.total-bultos { font-weight: 700; color: var(--indigo); }
.campo.tarifa select { min-height: var(--alto-btn); }
.campo.tarifa + .campo.tarifa { margin-top: var(--e2); }   /* «Descuento» pegado a «Tarifa» (1L-B, 16-nov) */
.cat-acc .btn { flex: none; min-width: calc(var(--alto-btn) * 3); }
.paso { display: flex; align-items: center; gap: var(--e3); }
.paso .ibtn { font-size: var(--t-xl); font-weight: 800; line-height: 1; }
.paso-n { min-width: calc(var(--alto-btn) * 1.2); text-align: center; font-size: var(--t-l); font-weight: 800; font-variant-numeric: tabular-nums; }
.carro-barra { position: sticky; bottom: calc(var(--alto-nav) + var(--fab) / 2 + var(--e3) + env(safe-area-inset-bottom)); z-index: 4; display: flex; flex-direction: column; gap: var(--e2); }
/* El sumatorio de KG del prepedido (dueño 16-nov: «muy importante»): siempre pegado al botón del carrito y arriba del prepedido; el aviso de líneas sin peso, en ámbar con texto (nunca solo el color) */
.carro-kg, .kg-fijo { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--e1) var(--e3); background: var(--surface); color: var(--fg); border: 2px solid var(--indigo); border-radius: var(--r-m); padding: var(--e2) var(--e3); box-shadow: var(--sombra); }
.carro-kg b, .kg-fijo b { font-size: var(--t-l); font-weight: 800; font-variant-numeric: tabular-nums; }
.carro-kg .sinpeso, .kg-fijo .sinpeso { color: var(--ambar); font-size: var(--t-s); font-weight: 700; }
.kg-fijo { position: sticky; top: var(--e2); z-index: 3; }
.pl.sin-peso { border-left: var(--e1) solid var(--ambar); }
.kg-linea { font-weight: 700; font-variant-numeric: tabular-nums; }
.kg-linea.sin { color: var(--ambar); }
.carro-barra .btn { box-shadow: var(--sombra); }
.pl-c { align-items: flex-start; }
.pl-c .in { width: 6.5rem; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.pl-c select.in { width: auto; flex: 1; min-width: 0; }
.pl-c .nm { align-self: center; flex: 1; }
.pl-c .der { margin-left: auto; }
/* ── Fase 3 · Gastos: mes, totales, foto del ticket, revisión, lista por días y gerencia ───────────────── */
.gs-amt { font-size: var(--t-xl); font-weight: 800; color: var(--indigo); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-mes { padding: var(--e1) var(--e2); gap: var(--e2); }
.gs-mes .ibtn { background: none; color: var(--indigo); }
.gs-mes .ibtn[aria-disabled="true"] { color: var(--muted); }
.gs-res-c { display: flex; flex-direction: column; gap: var(--e2); }
.gs-res { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.gs-res > div { display: flex; flex-direction: column; gap: var(--e1); padding: 0 var(--e1); min-width: 0; }
.gs-res > div + div { border-left: 1px solid var(--line); }
.gs-res b { font-size: var(--t-l); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.gs-res span { color: var(--muted); font-size: var(--t-xs); }
.gs-est { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e1) var(--e2); padding-top: var(--e2); border-top: 1px dashed var(--line); }
.gs-ok { display: flex; align-items: center; gap: var(--e2); background: var(--verde-soft); color: var(--verde); border-radius: var(--r-m); padding: var(--e3); font-size: var(--t-s); font-weight: 600; }
.gs-ok .ico { flex: none; }
.gs-ok.gs-enviada { background: var(--indigo-soft); color: var(--indigo); }
.gs-dev { display: flex; flex-direction: column; gap: var(--e1); }
.gs-com { font-weight: 400; font-style: italic; overflow-wrap: anywhere; }
.gs-gal { background: none; border: 0; color: var(--indigo); font-weight: 600; font-size: var(--t-s); min-height: var(--alto-btn); cursor: pointer; margin-top: calc(var(--e1) * -1); }
a.card.gs-aprob { align-items: center; gap: var(--e2); color: inherit; }
a.card.gs-aprob > .ico { color: var(--muted); }
.gs-pend { color: var(--ambar); font-weight: 700; }
.gs-hotel { border-style: dashed; gap: var(--e3); }
.gs-sube { flex: none; min-height: var(--alto-btn); padding: 0 var(--e3); font-size: var(--t-s); }
button.card.gs-fila { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
button.card.gs-fila:active { background: var(--indigo-soft); }
.gs-fila.local { border-style: dashed; }
.gs-imp { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-giro { flex: none; width: var(--e4); height: var(--e4); border-width: 2px; }
.gs-enviar { margin-top: var(--e3); }
.gs-rev { display: flex; flex-direction: column; gap: var(--e3); }
.gs-cab { display: flex; gap: var(--e3); align-items: flex-start; }
.gs-cab-c { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--e2); }
.gs-foto { flex: none; width: 5.5rem; align-self: stretch; min-height: 7rem; border-radius: var(--r-s); background: var(--indigo-soft); border: 1px solid var(--line); overflow: hidden; }
.gs-foto img, .gs-mini img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; }
.gs-foto.cargada img, .gs-mini.cargada img { opacity: 1; }
.gs-tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e2); }
.gs-tres .campo, .dos .campo { min-width: 0; }
.gs-tres .in { padding: 0 var(--e2); font-size: var(--t-m); min-width: 0; }
.gs-total { font-size: var(--t-xl); font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.gs-nif { font-weight: 400; }
a.card.gs-liq { flex-direction: column; gap: var(--e3); color: inherit; }
a.card.gs-liq:active { background: var(--indigo-soft); }
a.card.gs-liq > .row > .ico { color: var(--muted); }
a.card.gs-liq .gs-res { padding-top: var(--e3); border-top: 1px dashed var(--line); }
.gs-fila-g { align-items: flex-start; }
.gs-mini { flex: none; width: 3.25rem; height: 4.25rem; padding: 0; border-radius: var(--r-s); background: var(--indigo-soft); border: 1px solid var(--line); overflow: hidden; cursor: pointer; }
.gs-mini.vacia { background: none; border-style: dashed; cursor: default; }
.gs-grande { width: 100%; min-width: 0; max-height: 60dvh; overflow: auto; border-radius: var(--r-s); }
.gs-grande img { width: 100%; max-width: 100%; height: auto; display: block; }
.hoja { min-width: 0; }

/* 1h · Catálogo Arisac: secciones con su color, apartados con foto grande, bloques con su tabla granulometría × formato (cada celda, un botón de dedo) */
.cz { display: flex; flex-direction: column; gap: var(--e3); }
.cz-cuerpo { display: flex; flex-direction: column; gap: var(--e3); }
.cz-cab { display: flex; flex-direction: column; gap: var(--e1); padding: var(--e4); border-radius: var(--r-m); background: var(--sec, var(--indigo)); color: var(--on-sec); }
.cz-cab .s { font-size: var(--t-s); font-weight: 600; opacity: .9; overflow-wrap: anywhere; }
.cz-cab .t { font-size: var(--t-xl); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.cz-cab.clara, .cz-sec.clara { color: var(--on-sec-claro); }
a.cz-sec { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); min-height: var(--alto-sec); padding: var(--e4); border-radius: var(--r-m); background: var(--sec, var(--indigo)); color: var(--on-sec); }
a.cz-sec:active, a.cz-apt:active { filter: brightness(.9); }
.cz-sec .ico { width: 28px; height: 28px; }
.cz-sec-t { display: flex; flex-direction: column; gap: var(--e1); min-width: 0; }
.cz-sec-t b { font-size: var(--t-xl); font-weight: 800; line-height: 1.1; }
.cz-sec-t span { font-size: var(--t-s); font-weight: 600; opacity: .9; }
a.cz-apt { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: var(--alto-apt); border-radius: var(--r-m); overflow: hidden; background: var(--sec, var(--indigo)); color: var(--on-sec); border-bottom: 6px solid var(--sec, var(--indigo)); }
.cz-apt-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cz-apt-t { position: relative; display: flex; flex-direction: column; gap: var(--e1); padding: var(--e5) var(--e4) var(--e4); background: linear-gradient(to top, var(--velo), transparent); }
.cz-apt.sinfoto .cz-apt-t { background: none; }
.cz-apt-t b { font-size: var(--t-l); font-weight: 800; line-height: 1.15; }
.cz-apt-t span { font-size: var(--t-s); font-weight: 600; }
.cz-bloque, .cz-res { display: flex; flex-direction: column; gap: var(--e3); }
.cz-bh { display: flex; align-items: center; gap: var(--e3); }
.cz-foto { flex: none; width: var(--ancho-foto); aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-s); background: var(--indigo-soft); }
.cz-foto.vacia { border: 1px dashed var(--line); }
.cz-bn { margin: 0; font-size: var(--t-l); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.cz-mig { display: flex; flex-direction: column; min-height: var(--alto-btn); justify-content: center; color: var(--muted); font-size: var(--t-s); }
.cz-mig b { color: var(--fg); font-size: var(--t-m); }
.cz-cols, .cz-celdas { display: grid; gap: var(--e2); grid-template-columns: minmax(0, 1fr); }
.cz-cols.n2, .cz-celdas.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cz-cols.n3, .cz-celdas.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cz-cols.n4, .cz-celdas.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cz-col { display: flex; flex-direction: column; padding-bottom: var(--e1); border-bottom: 3px solid var(--sec, var(--indigo)); font-size: var(--t-s); font-weight: 800; color: var(--fg); }
.cz-res .cz-col { border-bottom-color: var(--indigo); }
.cz-ex { font-size: var(--t-xs); font-weight: 500; color: var(--muted); overflow-wrap: anywhere; }
.cz-fila { display: flex; flex-direction: column; gap: var(--e1); padding-top: var(--e2); border-top: 1px dashed var(--line); }
.cz-et { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--e1) var(--e2); font-size: var(--t-m); font-weight: 700; }
.cz-celda { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: var(--alto-celda); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.cz-celda.compra { border-color: var(--compra-linea); background: var(--compra-fondo); }
.cz-celda.sindato { border-style: dashed; }
.cz-celda.sindato .cz-ver { cursor: default; }
.cz-celda.en { background: var(--indigo-soft); border: 2px solid var(--indigo); }
.cz-celda.vacia { align-items: center; justify-content: center; border-style: dashed; background: none; color: var(--muted); }
.cz-celda.nobc { justify-content: center; gap: var(--e1); padding: var(--e2); background: none; border-style: dashed; color: var(--muted); }
.cz-nobc { font-size: var(--t-xs); font-weight: 600; }
.cz-add, .cz-ver { position: relative; flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--e1); min-height: var(--alto-celda); padding: var(--e2); border: 0; border-radius: inherit; background: none; text-align: left; cursor: pointer; min-width: 0; }
.cz-add:active { background: var(--indigo-soft); }
.cz-compra { align-self: flex-start; padding: 1px var(--e2); border-radius: var(--r-pill); background: var(--compra-fg); color: var(--on-compra); font-size: var(--t-xs); font-weight: 800; letter-spacing: .02em; }
.cz-celda.compra .cz-precio, .cz-celda.compra .cz-unid, .cz-celda.compra .cz-cod, .cz-celda.compra .cz-regla { color: var(--compra-fg); }
.cz-regla { font-size: var(--t-xs); font-weight: 700; color: var(--muted); }
.cz-regla.sin { color: var(--ambar); }
.cz-precio { font-size: var(--t-l); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cz-precio.sin { font-size: var(--t-s); font-weight: 600; color: var(--muted); }
.n3 .cz-precio, .n4 .cz-precio { font-size: var(--t-m); }
.cz-unid { margin-top: calc(var(--e1) * -1); font-size: var(--t-xs); color: var(--muted); }
.cz-stock { padding: 2px var(--e2); }
.cz-cod { max-width: calc(100% - 2.5rem); font-size: var(--t-xs); color: var(--muted); overflow-wrap: anywhere; }
.cz-celda.nobc .cz-cod { max-width: 100%; }
.cz-mas { position: absolute; right: var(--e1); bottom: var(--e1); display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 2.25rem; padding: 0 var(--e2); border-radius: var(--r-pill); background: var(--indigo); color: var(--on-indigo); font-size: var(--t-s); font-weight: 800; }
.cz-mas .ico { width: 18px; height: 18px; }
.cz-menos { position: absolute; top: var(--e1); right: var(--e1); width: 2.25rem; height: 2.25rem; border: 1px solid var(--indigo); border-radius: var(--r-pill); background: var(--surface); color: var(--indigo); font-size: var(--t-l); font-weight: 800; line-height: 1; cursor: pointer; }
.cz-menos::after { content: ""; position: absolute; inset: calc(var(--e1) * -1); }
.pl-foto { flex: none; width: 3.5rem; height: 3.5rem; border-radius: var(--r-s); overflow: hidden; background: var(--indigo-soft); }
.pl-foto:empty { display: none; }
.pl-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Viajes con acompañantes (15-nov tarde) ──────────────────────────────────────────────────────────── */
.vj-con { display: flex; align-items: center; gap: var(--e1); color: var(--indigo); font-size: var(--t-s); font-weight: 600; }
.vj-con .ico { width: 16px; height: 16px; }
.vj-banda { gap: var(--e3); }
.vj-banda .vj-ed { flex: none; min-height: var(--alto-btn); padding: 0 var(--e3); }
.vj-chk { display: flex; align-items: center; gap: var(--e3); min-height: var(--alto-btn); font-weight: 600; }
.vj-chk input { width: var(--e5); height: var(--e5); flex: none; accent-color: var(--indigo); }
.vj-chk em { font-style: normal; font-weight: 400; color: var(--muted); }
#vista > .btn { flex: none; }

/* ── Envoltorios de la maqueta de tablet: en el móvil no existen para el diseño (mismo orden y huecos de siempre) ─────────── */
.hoy-g, .hoy-top, .hoy-ag, .hoy-cam, .fi-g, .fi-a, .fi-b, .vj-g, .vj-g-a, .vj-g-b, .vj-g-c, .gs-g, .gs-g-a, .gs-g-b { display: contents; }

/* ── iPad y tablet (15-nov tarde): de 768 px de ancho, y de alto suficiente para no tomar por tablet un móvil apaisado ───────── */
@media (min-width: 768px) and (min-height: 600px) {
  :root { --ancho-col: var(--ancho-tablet); --ancho-hoja: var(--ancho-hoja-tablet); --ancho-barra: var(--ancho-barra-tablet); }
  #vista { padding-inline: max(var(--e5), env(safe-area-inset-left)) max(var(--e5), env(safe-area-inset-right)); gap: var(--e3); }
  .hoja { border-radius: var(--r-m); margin-bottom: var(--e5); }
  .velo { align-items: center; }
  .hoja { margin-bottom: 0; overflow: hidden; }
  .barra { border-radius: var(--r-m) var(--r-m) 0 0; }
  /* Hoy: agenda y atrasadas a un lado; por confirmar, prepedidos, camiones y alertas al otro */
  .hoy-g { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e3) var(--e5); align-items: start; }
  .hoy-top, .hoy-ag, .hoy-cam { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
  .hoy-ag { grid-column: 1; grid-row: 1 / span 2; }
  .hoy-top { grid-column: 2; grid-row: 1; }
  .hoy-cam { grid-column: 2; grid-row: 2; }
  .hoy-top:empty { display: none; }
  /* ficha del cliente: acciones a la izquierda, datos a la derecha */
  .fi-g { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e3) var(--e5); align-items: start; }
  .fi-a, .fi-b { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
  .fi-a { position: sticky; top: var(--e3); }
  /* Viaje día: esquema y hotel a un lado, la línea de tiempo al otro */
  .vj-g { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e3) var(--e5); align-items: start; }
  .vj-g-a, .vj-g-b, .vj-g-c { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
  .vj-g-a { grid-column: 1; grid-row: 1; }
  .vj-g-b { grid-column: 2; grid-row: 1 / span 2; }
  .vj-g-c { grid-column: 1; grid-row: 2; }
  /* Gastos: el resumen del mes fijo a un lado y la lista al otro */
  .gs-g { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e3) var(--e5); align-items: start; }
  .gs-g-a, .gs-g-b { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
  .gs-g-a { position: sticky; top: var(--e3); }
  /* listas en rejilla: Clientes, Contactos, semanas del Viaje y días de una semana */
  .lista, .vj-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--ancho-celda), 1fr)); gap: var(--e2); align-items: stretch; }
  .lista > :not(.card), .vj-lista > :not(.card):not(a) { grid-column: 1 / -1; }
  .lista > .card, .vj-lista > .card, .vj-lista > a.card { min-width: 0; }
  .lista > .card { align-items: flex-start; }
  /* catálogo Arisac: las secciones y los apartados en rejilla; los bloques de producto, a dos columnas */
  .cz-cuerpo { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--ancho-celda), 1fr)); gap: var(--e3); align-items: start; }
  .cz-cuerpo > p, .cz-cuerpo > .vacio { grid-column: 1 / -1; }
  .carro-barra .btn { max-width: var(--ancho-hoja); margin: 0 auto; }
  .login, #vista > .error { max-width: var(--ancho-hoja); margin-inline: auto; width: 100%; }
}

/* ── 1i · Su cuenta: saldo, facturas, pedidos y ofertas del cliente (15-nov-2026) ───────────────────────────────── */
.cu { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
.cu-tabs a { gap: var(--e1); }
.cu-n { min-width: var(--e4); padding: 0 var(--e1); border-radius: var(--r-pill); background: var(--indigo-soft); color: var(--indigo); font-size: var(--t-xs); font-weight: 800; text-align: center; line-height: 1.5; }
.seg a[aria-current="page"] .cu-n { background: var(--on-indigo); color: var(--indigo); }
.cu-g, .cu-saldo { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
.cu-lista, .cu-det, .cu-sa, .cu-sb, .cu-d { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
.cu-det:empty { display: none; }
.cu-g.con-det .cu-lista { display: none; }
.cu-fila[aria-current="true"], .cu-alb[aria-current="true"] { border-color: var(--indigo); background: var(--indigo-soft); }
.cu-fila.abono { border-left: 3px solid var(--rojo); }
.cu-venc { display: flex; flex-direction: column; gap: var(--e2); }
.cu-venc a.row { color: inherit; min-height: var(--alto-btn); }
.cu-serv { display: flex; flex-direction: column; gap: var(--e1); }
.cu-alb { min-height: var(--alto-btn); border-top: 1px dashed var(--line); color: var(--fg); padding: 0 var(--e1); border-radius: var(--r-s); }
.cu-alb .grow { display: flex; align-items: center; gap: var(--e2); font-weight: 600; }
.cu-alb .ico { width: 20px; height: 20px; color: var(--indigo); flex: none; }
.cu-total { font-weight: 800; font-size: var(--t-l); }
.cu-total span:last-child { color: var(--fg); }
.cu-barra { width: 100%; height: var(--e3); display: block; margin: var(--e2) 0; border-radius: var(--r-pill); overflow: hidden; background: var(--line); }
.cu-barra rect.t-al_dia, .cu-ley i.t-al_dia { fill: var(--verde); background: var(--verde); }
.cu-barra rect.t-v1_30, .cu-ley i.t-v1_30 { fill: var(--ambar); background: var(--ambar); }
.cu-barra rect.t-v31_60, .cu-ley i.t-v31_60 { fill: var(--rojo); background: var(--rojo); opacity: .6; }
.cu-barra rect.t-v61, .cu-ley i.t-v61 { fill: var(--rojo); background: var(--rojo); }
.cu-ley { display: flex; align-items: center; gap: var(--e2); min-height: var(--e5); font-variant-numeric: tabular-nums; }
.cu-ley i { width: var(--e3); height: var(--e3); border-radius: 2px; flex: none; }
.cu-ley b { margin-left: auto; }

@media (min-width: 768px) and (min-height: 600px) {
  /* lista a la izquierda y detalle a la derecha; el saldo, en dos columnas */
  .cu-g:not(.solo-saldo) { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e3) var(--e5); align-items: start; }
  .cu-g.con-det .cu-lista { display: flex; }
  .cu-g.solo-saldo { display: block; }
  .cu-det { position: sticky; top: var(--e3); max-height: calc(100dvh - var(--e6)); overflow-y: auto; }
  .cu-vol { display: none; }
  .cu-saldo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e3) var(--e5); align-items: start; }
}

/* ── Correos del cliente (15-nov-2026): el bloque de la ficha y la pantalla #correos; en tablet, lista y lectura a dos columnas como «Su cuenta» ── */
.cr, .cr-g, .cr-lista, .cr-det, .cr-d, .cr-items, .cr-bloque { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
.cr-bloque { margin-top: var(--e2); }
.cr-fila { display: flex; flex-direction: column; align-items: stretch; gap: var(--e1); width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.cr-fila:active { background: var(--indigo-soft); }
.cr-fila[aria-current="true"] { border-color: var(--indigo); background: var(--indigo-soft); }
.cr-l1, .cr-l2 { display: flex; align-items: center; gap: var(--e2); min-width: 0; }
.cr-l1 .nm { flex: 1; min-width: 0; }
.cr-f { flex: none; white-space: nowrap; }
.cr-quien { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-dir { display: inline-flex; align-items: center; gap: var(--e1); flex: none; }
.cr-dir .ico, .cr-clip .ico { width: 14px; height: 14px; }
.cr-clip { flex: none; color: var(--muted); display: inline-flex; }
.cr-vp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cr-texto { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.cr-adj { display: inline-flex; align-items: center; gap: var(--e2); }
.cr-adj .ico { width: 16px; height: 16px; color: var(--muted); }
.cr-det:empty { display: none; }
.ft-vacio { padding: var(--e3); }
@media (min-width: 768px) and (min-height: 600px) {
  .cr-g { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e3) var(--e5); align-items: start; }
  .cr-det { position: sticky; top: var(--e3); max-height: calc(100dvh - var(--e6)); overflow-y: auto; }
  .cr-det:empty { display: block; }
}

/* ── 1j · Fotos del cliente y escáner de tarjetas ── */
.ft-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--ancho-mini), 1fr)); gap: var(--e2); }
.ft { position: relative; display: block; padding: 0; aspect-ratio: 1; border-radius: var(--r-s); background: var(--indigo-soft); border: 1px solid var(--line); overflow: hidden; cursor: pointer; }
.ft img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; }
.ft.cargada img { opacity: 1; }
.ft-pie { position: absolute; inset: auto 0 0 0; padding: var(--e1) var(--e2); font-size: var(--t-xs); font-weight: 700; text-align: left; background: var(--velo); color: var(--on-sec); }
.ft.local { cursor: default; }
.ft.local .chip { position: absolute; inset: auto var(--e1) var(--e1) var(--e1); text-align: center; white-space: normal; }
.ft-previa { display: flex; justify-content: center; background: var(--indigo-soft); border-radius: var(--r-m); overflow: hidden; }
.ft-previa img { max-width: 100%; max-height: var(--alto-previa); object-fit: contain; display: block; }
.ft-visor img { width: 100%; max-height: 70dvh; object-fit: contain; display: block; border-radius: var(--r-m); background: var(--indigo-soft); }
.tj-g { display: flex; flex-direction: column; gap: var(--e2); }
.tj-g .card { display: flex; flex-direction: column; gap: var(--e2); }
.tj-cand, .tj-dir { display: flex; flex-direction: column; gap: var(--e2); }
.tj-op { display: flex; align-items: flex-start; gap: var(--e3); width: 100%; min-height: var(--alto-btn-grande); padding: var(--e3) var(--e4); text-align: left; background: var(--surface); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer; font: inherit; }
.tj-op .grow { display: flex; flex-direction: column; gap: var(--e1); min-width: 0; overflow-wrap: anywhere; }
.tj-op .grow .nm { font-weight: 700; font-size: var(--t-l); }
.tj-op .grow .sub { font-weight: 400; }
.tj-op .chips { margin-top: 0; }
.tj-op .tj-compra { color: var(--fg); font-weight: 700; }
.tj-op .tj-pto { margin-top: var(--e1); }
.tj-op[aria-checked="true"] { border-color: var(--indigo); background: var(--indigo-soft); }
.tj-op[aria-checked="true"] .chip.c-i { background: var(--surface); }
.tj-bus { display: flex; flex-direction: column; gap: var(--e2); }
.tj-fotos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--e3); }
.tj-foto { margin: 0; display: flex; flex-direction: column; gap: var(--e1); }
.tj-foto img { width: 100%; max-height: var(--alto-previa); object-fit: contain; border-radius: var(--r-m); background: var(--indigo-soft); display: block; }
.tj-foto figcaption { font-size: var(--t-s); font-weight: 700; color: var(--muted); text-align: center; }
.tj-foto.vacia { align-items: center; justify-content: center; min-height: var(--alto-sec); border: 2px dashed var(--line); border-radius: var(--r-m); color: var(--muted); font-size: var(--t-s); text-align: center; }
.tj-acc { display: flex; flex-direction: column; gap: var(--e2); }
.tj-pto { flex: none; width: var(--e4); height: var(--e4); border-radius: var(--r-pill); border: 2px solid var(--muted); }
.tj-op[aria-checked="true"] .tj-pto { border-color: var(--indigo); background: var(--indigo); box-shadow: inset 0 0 0 3px var(--indigo-soft); }
.tj-rep { gap: var(--e2); border-color: var(--ambar); }
.tj-ok { display: flex; flex-direction: column; gap: var(--e1); }
.tj-ok .nm { display: flex; align-items: center; gap: var(--e2); }
.tj-ok .ico { color: var(--verde); }
@media (min-width: 768px) and (min-height: 600px) {
  .tj-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .hoja.ancha { max-width: var(--ancho-tablet); }   /* el formulario de la tarjeta, en dos columnas: más ancho que la hoja de siempre */
}
/* ── 1j · J3 · avisos en el móvil ── */
.av-tarjeta { display: flex; flex-direction: column; gap: var(--e2); }
.av-texto { margin: 0; line-height: 1.45; }
.av-pasos { margin: 0; padding-left: var(--e4); color: var(--fg); display: flex; flex-direction: column; gap: var(--e1); font-size: var(--t-s); line-height: 1.4; }
.av-hoy { padding: var(--e2) var(--e2) var(--e2) var(--e3); }
.av-hoy .av-ico { display: inline-flex; align-items: center; justify-content: center; width: var(--alto-btn); height: var(--alto-btn); border-radius: var(--r-pill); background: var(--indigo-soft); color: var(--indigo); flex: none; }
.av-hoy .ibtn { background: none; color: var(--muted); flex: none; }

/* ── 1k · Repaso del cliente, «Escuchar» y semáforo de precio ─────────────────────────────────────────────────────────────── */
.rp { display: flex; flex-direction: column; gap: var(--e2); }
.rp-chips { margin-top: 0; }
.rp-chips .chip { white-space: normal; text-align: left; }
.rp-voz { display: flex; flex-direction: column; gap: var(--e2); }
.rp-voz .btn.fila[disabled] { cursor: progress; }
.rp-texto { background: var(--indigo-soft); border-radius: var(--r-m); padding: var(--e3); font-size: var(--t-l); line-height: 1.5; overflow-wrap: anywhere; }
.rp-sig { display: flex; align-items: flex-start; gap: var(--e1); margin-top: var(--e1); color: var(--indigo); font-size: var(--t-s); font-weight: 600; }
.rp-sig .ico { width: 16px; height: 16px; margin-top: 2px; }
.rp-g, .rp-a, .rp-b { display: contents; }
.sem { display: inline-flex; align-items: center; gap: var(--e1); font-size: var(--t-s); font-weight: 700; }
.sem-p { width: 12px; height: 12px; border-radius: var(--r-pill); background: currentColor; flex: none; }
.sem-v { color: var(--verde); } .sem-a { color: var(--ambar); } .sem-r { color: var(--rojo); } .sem-n { color: var(--muted); }
.sem-n .sem-p { background: none; border: 2px solid currentColor; }
.sem-det { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--e1) var(--e3); padding: var(--e1) 0 var(--e2); border-bottom: 1px dashed var(--line); }
.sem-det:last-child { border-bottom: 0; padding-bottom: 0; }
.field:has(+ .sem-det) { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 768px) and (min-height: 600px) {
  .rp-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--e3) var(--e5); align-items: start; }
  .rp-a, .rp-b { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; }
}

/* ── Mapa de clientes (#mapa, 16-nov-2026): Leaflet se pide al abrirlo; aquí solo su sitio en la pantalla y los marcadores, con tokens ─────────────────────────────── */
:root { --punto: 2.25rem; --punto-leyenda: 1.25rem; --ancho-panel-mapa: 22rem; --alto-mapa: 40dvh; }
a.filtro { display: inline-flex; align-items: center; gap: var(--e1); color: var(--indigo); text-decoration: none; }
.mapa-cab { display: flex; align-items: center; justify-content: space-between; gap: var(--e2); padding-top: var(--e2); }
.mapa-cab .t { font-size: var(--t-xl); font-weight: 800; line-height: 1.15; padding-right: var(--e1); }
.mapa-leyenda { list-style: none; margin: 0; padding: 0 var(--e1); display: flex; flex-wrap: wrap; gap: var(--e1) var(--e3); color: var(--muted); font-size: var(--t-xs); font-weight: 600; }
.mapa-leyenda li { display: inline-flex; align-items: center; gap: var(--e2); }
.mapa-cuerpo { flex: 1; position: relative; display: flex; flex-direction: column; min-height: var(--alto-mapa); gap: var(--e2); }
.mapa-caja { flex: 1; position: relative; isolation: isolate; min-height: var(--alto-mapa); border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); }
.mapa-lienzo { position: absolute; inset: 0; z-index: 0; isolation: isolate; font-family: var(--f); }
.mapa-yo { position: absolute; top: var(--e2); right: var(--e2); z-index: 500; flex: none; width: auto; min-height: var(--alto-btn); padding: 0 var(--e3); background: var(--surface); box-shadow: var(--sombra); font-size: var(--t-m); flex-direction: row; }
.mapa-yo .ico { width: 20px; height: 20px; }
/* en el móvil la hoja flota SOBRE la barra de abajo (el mapa puede quedar medio fuera de pantalla: la hoja siempre a la vista) */
.mapa-panel { position: fixed; left: 50%; transform: translateX(-50%); width: calc(min(100%, var(--ancho-col)) - 2 * var(--e3)); bottom: calc(var(--alto-nav) + var(--e5) + env(safe-area-inset-bottom)); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sombra);
  padding: var(--e3); display: flex; flex-direction: column; gap: var(--e2); max-height: 45dvh; overflow-y: auto; }
.mapa-p-c { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--e2); }
.mapa-p-b { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e2); }
.mapa-p-b [data-anadir], .mapa-p-b .btn:only-child { grid-column: 1 / -1; }
.mapa-p-b .btn { min-height: var(--alto-btn); flex-direction: row; font-size: var(--t-m); padding: 0 var(--e3); }
.mapa-sinred { display: flex; flex-direction: column; gap: var(--e2); padding: var(--e4); background: var(--ambar-soft); border-radius: var(--r-m); }
.mapa-sinred .nm { color: var(--ambar); }
.mapa-sinred .sub { color: var(--fg); margin: 0; }
.leaflet-bar a { width: var(--alto-btn); height: var(--alto-btn); line-height: var(--alto-btn); }
.mp-caja { background: none; border: 0; }
.mp { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: var(--punto); height: var(--punto); border-radius: 50%; background: var(--indigo); color: var(--on-indigo);
  font-size: var(--t-s); font-weight: 800; font-style: normal; box-shadow: 0 0 0 2px var(--surface), var(--sombra); }
.mp-alerta { background: var(--rojo); color: var(--on-rojo); }
.mp-ruta { background: var(--verde); color: var(--on-verde); border-radius: var(--r-s); }
.mp-conalerta { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--rojo); }
.mp-sel { transform: scale(1.3); box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--fg); }
.mg { background: var(--surface); color: var(--indigo); border: 3px solid var(--indigo); }
.mg-alerta { border-color: var(--rojo); color: var(--rojo); }
.mg-ruta { border-color: var(--verde); color: var(--verde); }
.mp-yo { width: var(--punto-leyenda); height: var(--punto-leyenda); background: var(--azul); border: 3px solid var(--indigo); }
.mapa-leyenda .mp { width: var(--punto-leyenda); height: var(--punto-leyenda); font-size: var(--t-xs); box-shadow: none; }
.mapa-leyenda .mg { border-width: 2px; }
@media (min-width: 768px) and (min-height: 600px) {
  .mapa-cuerpo { flex-direction: row; min-height: var(--alto-mapa); }
  .mapa-panel { position: static; transform: none; flex: none; width: var(--ancho-panel-mapa); max-height: none; box-shadow: none; align-self: stretch; }
}

/* ── Viajes por tramos (17-nov-2026, spec 2026-11-17-viajes-por-tramos.md): zonas con sus días y el mapa del paso «Clientes» ── */
.vj-tz { display: flex; flex-direction: column; gap: var(--e2); }
.vj-dchip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: var(--alto-btn); padding: 0 var(--e3); line-height: 1.1; }
.vj-dchip small { font-size: var(--t-xs); font-weight: 600; }
.mp-vj-on { background: var(--indigo); color: var(--on-indigo); }
.mp-vj-off { background: var(--surface); color: var(--indigo); border: 3px solid var(--indigo); }
.mp-vj-pro { background: var(--verde-soft); color: var(--verde); border: 3px solid var(--verde); }
.mp-vj-pro.on { background: var(--verde); color: var(--on-verde); }
