/* Portal de Vendedores SUGLA — pantalla de nivel 1.
   Sistema de diseño: design/DESIGN.md. Tokens: design/tokens.css.
   Tema claro. Mobile-first: 1 columna hasta 640, 2 en tablet, 3 en compu. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* NO BORRAR. La app muestra y esconde pantallas con el atributo `hidden`
   (#login, #app, el menú de la cuenta, el selector de vendedor). Varias de ellas
   tienen un `display` puesto por su clase, y ese `display` le gana al `hidden` del
   navegador: sin esta línea la pantalla de login queda ocupando lugar arriba de
   todo aunque ya hayas entrado. */
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Todos los montos con cifras de ancho fijo (DESIGN.md §4). */
.monto { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--text-muted); }
.small { font-size: 14px; line-height: 20px; }
.caption { font-size: 12px; line-height: 16px; }
.negativo { color: var(--estado-atrasado); }

button { font: inherit; color: inherit; }
.ghost {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 12px; cursor: pointer;
  font-size: 14px; font-weight: 500;
}
.ghost:hover { background: var(--surface-2); }
.ghost:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand-verde); outline-offset: 2px;
}

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: var(--space-6); }
.login-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6); text-align: center; max-width: 380px; width: 100%;
}
.logo-login img { max-width: 200px; height: auto; margin-bottom: var(--space-4); }
.login-box h1 { font-family: var(--font-display); font-size: 24px; line-height: 32px; margin: 0 0 var(--space-2); }
.login-box p { margin: 0 0 var(--space-4); }
#google-btn { display: flex; justify-content: center; }
.dev-emails { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.error { color: var(--estado-atrasado); font-size: 14px; margin-top: var(--space-3); }

/* ---------- Banda de marca (topbar + bienvenida) ---------- */
.banda {
  position: relative; overflow: hidden;
  background: var(--brand-verde); color: #fff;
  padding-bottom: var(--space-6);
}
.banda-tex {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .12; pointer-events: none;
}
.trama-letra {
  font-family: var(--font-display); font-size: 46px; font-weight: 700; fill: #fff;
}

.topbar { position: relative; padding: var(--space-3) var(--space-4) 0; }
.topbar-row { display: flex; align-items: center; gap: var(--space-3); max-width: 1180px; margin: 0 auto; }

/* El logo va sobre chip blanco: el manual prohíbe recolorearlo (pág. 11) y
   sobre el verde saturado no llega al contraste mínimo. */
.marca-chip {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 50%; background: #fff;
}
.marca-chip img { height: 28px; width: auto; display: block; }
.logo-texto { font-family: var(--font-display); font-weight: 600; }

.mes { margin-left: auto; }
.mes select, .vendedor select {
  font: inherit; font-size: 14px; font-weight: 500; color: #fff;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius-sm); padding: 7px 10px;
}
.mes select option, .vendedor select option { color: var(--text); }
.topbar-sub { padding-top: var(--space-3); }
.vendedor { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; color: rgba(255,255,255,.85); }

.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--brand-verde); font-size: 12px; font-weight: 700;
  display: grid; place-items: center; overflow: hidden; padding: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu {
  position: absolute; right: var(--space-4); top: 54px; z-index: 20;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-3); min-width: 210px;
  box-shadow: 0 8px 24px rgba(16, 16, 16, .16); display: grid; gap: var(--space-2);
}

.bienvenida { position: relative; max-width: 1180px; margin: 0 auto; padding: var(--space-3) var(--space-4) 0; }
.bienvenida-nombre {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: 26px; line-height: 1.15; letter-spacing: -.015em;
}
.bienvenida-linea { margin: 6px 0 0; font-size: 15px; opacity: .92; }
.bienvenida-linea strong { font-weight: 700; }
@media (min-width: 720px) { .bienvenida-nombre { font-size: 30px; } }

/* ---------- Áreas del portal ----------
   Franja propia en un verde un punto más oscuro. No es capricho: sobre la trama de
   "S" el blanco cae a 3,9:1 y no llega al mínimo del DESIGN.md; sobre este verde
   opaco da 5,9:1, y además la trama no se cuela detrás de las pestañas. */
.modulos { position: relative; background: #00734C; margin-top: var(--space-4); }
.modulos-fila {
  display: flex; gap: var(--space-1); max-width: 1180px; margin: 0 auto;
  padding: var(--space-2) var(--space-4);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.modulos-fila::-webkit-scrollbar { display: none; }
.modulo {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 14px; line-height: 20px; font-weight: 600;
  border: 0; background: transparent; color: #fff;
  padding: 7px 12px; border-radius: var(--radius-sm); white-space: nowrap;
}
button.modulo:not(.activo) { cursor: pointer; }
button.modulo:not(.activo):hover { background: rgba(255, 255, 255, .14); }
.modulo.activo { background: #fff; color: var(--brand-verde); }
.modulo.pronto { font-weight: 500; }
.pronto-chip {
  font-size: 10px; line-height: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  background: rgba(255, 255, 255, .22); padding: 2px 5px; border-radius: 4px;
}

/* ---------- Barra de filtros ----------
   Monta sobre la banda verde, igual que antes hacían las tarjetas. */
.barra-filtros { max-width: 1180px; margin: calc(var(--space-6) * -1) auto var(--space-4);
  padding: 0 var(--space-4); position: relative; z-index: 2; }
.filtros-caja { background: var(--surface); border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-3);
  box-shadow: 0 1px 2px rgba(16,16,16,.06), 0 8px 24px rgba(16,16,16,.07); }
.filtros-fila { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  padding-top: var(--space-3); border-top: 1px solid var(--border); }

/* Atajos de período. Píldoras: se entiende de un vistazo cuál está puesto. */
.atajos { display: flex; gap: 6px; flex-wrap: wrap; }
.atajo { border: 1px solid var(--border); background: var(--surface); font: inherit;
  font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 7px 12px;
  border-radius: 999px; cursor: pointer; white-space: nowrap; }
.atajo:hover { background: var(--surface-2); }
.atajo[aria-pressed="true"] { background: var(--brand-verde); border-color: var(--brand-verde); color: #fff; }
.medida { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: flex-end; }
.periodo-fila { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap;
  padding-top: var(--space-3); border-top: 1px solid var(--border); }
#periodo, .periodo-txt { font-family: var(--font-display); font-size: 18px; line-height: 24px;
  font-weight: 600; letter-spacing: -.01em; }
#periodo::first-letter, .periodo-txt::first-letter { text-transform: uppercase; }
#volver-mes { margin-left: auto; }
.topbar-sp { flex: 1; }

/* Barras mes a mes, cuando el período tiene más de un mes. */
.meses { display: flex; align-items: flex-end; gap: 2px; height: 72px; margin-bottom: 4px; }
.mes-barra { flex: 1; min-width: 0; background: var(--color-estado, var(--acento));
  opacity: .75; border-radius: 2px 2px 0 0; }
.mes-barra.vacio { background: var(--surface-2); opacity: 1; height: 2px !important; }
.meses-eje { display: flex; gap: 2px; font-size: 10px; color: var(--text-muted); }
.meses-eje span { flex: 1; min-width: 0; text-align: center; overflow: hidden; white-space: nowrap; }
.filtro { display: flex; align-items: center; gap: 6px; min-width: 0; }
.filtro > span { font-size: 11px; line-height: 15px; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; color: var(--text-muted); }
.filtro input.buscador { font: inherit; font-size: 13px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 10px; width: 200px; max-width: 200px; }
.filtro input.buscador.puesto { border-color: var(--brand-verde); background: #F2FAF6; font-weight: 600; }
.filtro input.buscador::placeholder { color: var(--text-muted); font-weight: 400; }
.filtro select { font: inherit; font-size: 13px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 10px; max-width: 190px; }
/* Un filtro puesto se nota sin tener que leerlo. */
.filtro select.puesto { border-color: var(--brand-verde); background: #F2FAF6; font-weight: 600; }
.limpiar { margin-left: auto; border: 0; background: transparent; font: inherit;
  font-size: 13px; font-weight: 600; color: var(--brand-verde); cursor: pointer; padding: 6px 4px; }
.resumen-filtro { width: 100%; margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.resumen-filtro b { color: var(--text); font-weight: 600; }
@media (max-width: 719px) {
  .filtro { flex: 1 1 46%; }
  .filtro select, .filtro input.buscador { max-width: none; width: 100%; }
  .filtro > span { display: none; }   /* el nombre del filtro va dentro de la opción */
}

/* ---------- Grilla de tarjetas ---------- */
#contenido {
  display: grid; gap: var(--space-4); grid-template-columns: 1fr;
  max-width: 1180px; margin: 0 auto; padding: 0 var(--space-4);
}
@media (min-width: 720px) { #contenido { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { #contenido { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative; overflow: hidden;
  background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-3);
  box-shadow: 0 1px 2px rgba(16, 16, 16, .06), 0 8px 24px rgba(16, 16, 16, .09);
}
/* Filete del color del proveedor. El color de estado siempre tiene prioridad
   sobre el acento (DESIGN.md §3), por eso el acento vive acá y no en el chip. */
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--acento); }
.card[data-prov="saladillo"]  { --acento: var(--prov-saladillo); }
.card[data-prov="macroplast"] { --acento: var(--prov-macroplast); }
.card[data-prov="sugla"]      { --acento: var(--prov-sugla); }
.card { --acento: var(--brand-verde); }

.card-head { display: flex; align-items: center; gap: var(--space-3); min-height: 34px; padding-top: 2px; }
.prov-marca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.prov-logos { display: flex; align-items: center; gap: 10px; }
/* Logos con aire y sin deformar (DESIGN.md §7). */
.prov-logos img { height: 26px; width: auto; max-width: 100px; object-fit: contain; display: block; }
.prov-nombre { margin: 0; font-size: 16px; }

/* Chip de estado: siempre con etiqueta, nunca solo color (DESIGN.md §7). */
.chip {
  margin-left: auto; flex: none;
  font-size: 12px; line-height: 16px; font-weight: 700; padding: 5px 10px;
  border-radius: var(--radius-sm); white-space: nowrap;
  background: var(--surface-2); color: var(--text-muted);
}
.card[data-estado="bien"] .chip      { background: var(--estado-en-ritmo); color: #fff; }
.card[data-estado="atento"] .chip    { background: var(--estado-atento); color: #fff; }
.card[data-estado="atrasado"] .chip  { background: var(--estado-atrasado); color: #fff; }

.hero-valor {
  font-family: var(--font-display); font-weight: 700;
  font-size: 34px; line-height: 1.05; letter-spacing: -.025em;
}
@media (min-width: 380px) { .hero-valor { font-size: 36px; } }
.hero-sub { margin-top: 4px; }
.venta-obj { margin-top: 4px; }

.kpis {
  display: flex; gap: var(--space-4); margin: 0;
  background: var(--surface-2); border-radius: var(--radius-md); padding: var(--space-3);
}
.kpis > div { flex: 1; min-width: 0; }
.kpis dt {
  font-size: 11px; line-height: 15px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.kpis dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpis .cumplido { color: var(--estado-en-ritmo); }

/* ---------- Barra de avance con la marca de hoy ---------- */
.progreso[hidden] { display: none; }
.barra { position: relative; padding-top: 20px; }
.barra-pista { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.barra-relleno {
  height: 100%; width: 0; border-radius: 999px; background: var(--color-estado, var(--acento));
  transition: width 1.1s cubic-bezier(.22, 1, .36, 1);
}
.card[data-estado="bien"]     { --color-estado: var(--estado-en-ritmo); }
.card[data-estado="atento"]   { --color-estado: var(--estado-atento); }
.card[data-estado="atrasado"] { --color-estado: var(--estado-atrasado); }

/* Dónde debería ir hoy, según días hábiles transcurridos. */
.barra-marca { position: absolute; top: 14px; bottom: 0; width: 0; border-left: 2px solid var(--text); }
.barra-marca span {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 10px; line-height: 14px; font-weight: 700; color: #fff; background: var(--text);
  padding: 1px 5px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em;
}
.barra-pie { display: flex; justify-content: space-between; gap: var(--space-2); margin-top: 8px; }
.barra-pct { font-weight: 600; }

/* ---------- Evolución diaria ---------- */
.evolucion-cab, .clientes-cab {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2);
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
  margin-bottom: 6px;
}
.leyenda { text-transform: none; letter-spacing: 0; font-weight: 400; white-space: nowrap; }
.leyenda-i { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin: 0 4px 0 10px; }
.leyenda-real { background: var(--color-estado, var(--acento)); }
.leyenda-ideal { background: repeating-linear-gradient(90deg, rgba(16,16,16,.45) 0 4px, transparent 4px 8px); }

/* `color` alimenta el currentColor del degradado del área. */
.spark { display: block; width: 100%; height: 72px; color: var(--color-estado, var(--acento)); }
.spark-area { stroke: none; }
.spark-linea {
  fill: none; stroke: var(--color-estado, var(--acento)); stroke-width: 2.5;
  stroke-linejoin: round; stroke-linecap: round;
}
.spark-ideal { fill: none; stroke: rgba(16, 16, 16, .3); stroke-width: 1.5; stroke-dasharray: 4 4; }
.spark-punta { fill: var(--color-estado, var(--acento)); stroke: #fff; stroke-width: 2; }

/* Tarjeta con filtro puesto: el objetivo no aplica, así que en su lugar va cuánto
   pesa lo filtrado sobre el mes completo de ese proveedor. */
.chip.parte { background: var(--surface-2); color: var(--text); font-weight: 600; }
.nota-filtro, .nota-objetivo { margin: 0; }
/* Pasado el día 10 sin objetivos: aviso en ámbar (informa, no es un error de la pantalla). */
.nota-objetivo.falta { color: var(--estado-atento); font-weight: 600; }

/* Matriz: una fila por ítem, una columna por marca. Nunca una columna de total. */
.matriz { width: 100%; border-collapse: collapse; font-size: 14px; }
.matriz thead th { font-size: 10px; line-height: 14px; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; color: var(--text-muted);
  padding: 10px var(--space-2) 8px; background: var(--surface-2); text-align: right; white-space: nowrap; }
.matriz thead th:first-child { text-align: left; padding-left: var(--space-4); }
.matriz thead th:last-child, .matriz td:last-child { padding-right: var(--space-4); }
.matriz td { padding: 9px var(--space-2); border-top: 1px solid rgba(16,16,16,.07); vertical-align: middle; }
.matriz td:first-child { padding-left: var(--space-4); max-width: 0; width: 99%; }
.matriz tbody tr:hover { background: #FAFAF8; }
.m-nombre { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-celda { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.m-celda.vacia { color: #C9C9C4; font-weight: 400; }
.m-barra { display: block; height: 3px; border-radius: 999px; margin: 4px 0 0 auto; opacity: .5; background: var(--c); }
.col-0 { --c: var(--prov-saladillo); } .col-1 { --c: var(--prov-macroplast); } .col-2 { --c: var(--prov-sugla); }
.aviso { padding: var(--space-3) var(--space-4); margin: 0; font-size: 12px;
  color: var(--text-muted); border-top: 1px solid var(--border); background: var(--surface-2); }

/* ---------- Detalle del mes ----------
   Antes cada tarjeta llevaba colgando clientes, rubros y provincias. Ahora hay un
   solo panel debajo de las tarjetas: pestañas para elegir qué mirar y un selector
   de proveedor. Nunca se mezclan proveedores: se mira uno a la vez. */
.detalle { max-width: 1180px; margin: var(--space-8) auto 0; padding: 0 var(--space-4); }
.detalle-titulo { font-family: var(--font-display); font-size: 18px; line-height: 24px;
  font-weight: 600; letter-spacing: -.01em; margin: 0 0 var(--space-3); }

.panel { position: relative; background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(16,16,16,.06), 0 8px 24px rgba(16,16,16,.07); overflow: hidden;
  --acento: var(--brand-verde); }
.panel[data-prov="saladillo"]  { --acento: var(--prov-saladillo); }
.panel[data-prov="macroplast"] { --acento: var(--prov-macroplast); }
.panel[data-prov="sugla"]      { --acento: var(--prov-sugla); }
.panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--acento); }

.controles { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.controles .sp { flex: 1; }
.pestanas { display: flex; gap: 2px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; }
.pest { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-muted); padding: 6px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.pest[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,16,16,.10); }
.pest .cuenta { font-weight: 400; opacity: .75; }
.sel-prov { display: flex; align-items: center; gap: var(--space-2); color: var(--text-muted); }
.sel-prov select { font: inherit; font-size: 13px; font-weight: 500; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; }

.tabla-det { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla-det thead th { font-size: 10px; line-height: 14px; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 600; color: var(--text-muted); text-align: right; white-space: nowrap;
  padding: 10px var(--space-2) 8px; background: var(--surface-2); }
.tabla-det thead th:nth-child(2) { text-align: left; }
.tabla-det th:first-child, .tabla-det td:first-child { padding-left: var(--space-4); }
.tabla-det th:last-child, .tabla-det td:last-child { padding-right: var(--space-4); }
.tabla-det td { padding: 9px var(--space-2); border-top: 1px solid rgba(16,16,16,.07); vertical-align: middle; }
.tabla-det tbody tr:hover { background: #FAFAF8; }

.d-rank { width: 26px; color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
/* max-width:0 + width:99% deja que el nombre se recorte y el resto no se mueva. */
.d-nombre { max-width: 0; width: 99%; }
.d-nombre b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-barra { display: block; height: 4px; border-radius: 999px; background: var(--surface-2);
  margin-top: 5px; max-width: 420px; }
.d-barra > span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--acento);
  opacity: .55; transition: width .8s cubic-bezier(.22,1,.36,1); }
.d-monto { text-align: right; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.d-parte { text-align: right; white-space: nowrap; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.d-var { text-align: right; white-space: nowrap; }
.c-var { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.c-var.sube { color: var(--estado-en-ritmo); }
.c-var.baja { color: var(--estado-atrasado); }
.c-var.nuevo { color: var(--brand-azul); }

.ver-mas-det { display: block; width: 100%; border: 0; border-top: 1px solid var(--border);
  background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; color: var(--brand-verde);
  padding: var(--space-3); cursor: pointer; }
.ver-mas-det:hover { background: var(--surface-2); }
.sin-datos { color: var(--text-muted); font-size: 14px; padding: var(--space-6) var(--space-4); margin: 0; text-align: center; }

.pie { max-width: 1180px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8); }
.vacio { grid-column: 1 / -1; background: var(--surface); border-radius: var(--radius-lg);
  padding: var(--space-8); text-align: center; color: var(--text-muted); }
.vacio.error { color: var(--estado-atrasado); }

/* ---------- Esqueleto de carga ---------- */
.card-esq { gap: 12px; }
.sk {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, #F6F6F4 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: sk-brillo 1.3s ease-in-out infinite;
}
@keyframes sk-brillo { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-logo { height: 26px; width: 120px; }
.sk-num { height: 36px; width: 62%; }
.sk-sub { height: 14px; width: 45%; }
.sk-kpis { height: 58px; width: 100%; border-radius: var(--radius-md); }
.sk-barra { height: 12px; width: 100%; border-radius: 999px; }
.sk-spark { height: 72px; width: 100%; }
.sk-fila { height: 16px; width: 100%; }

/* ---------- Menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
  .barra-relleno, .c-barra > span { transition: none; }
  .d-barra > span { transition: none; }
}

/* ---------- Ficha del cliente ----------
   Se abre al tocar una fila del detalle. `dialog` nativo: trae el foco atrapado y
   cerrar con Escape sin escribir nada de eso a mano. */
.ficha {
  width: min(880px, calc(100vw - var(--space-6))); max-height: 88dvh; padding: 0;
  border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text);
  box-shadow: 0 24px 64px rgba(16, 16, 16, .28); overflow: auto;
}
.ficha::backdrop { background: rgba(16, 16, 16, .45); }
.ficha-cab { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start;
  gap: var(--space-4); padding: var(--space-4); background: var(--surface);
  border-bottom: 1px solid var(--border); }
.ficha-quien { flex: 1; min-width: 0; }
.ficha-cab h2 { margin: 0; font-family: var(--font-display); font-size: 18px; line-height: 24px;
  font-weight: 600; letter-spacing: -.01em; }
.ficha-cab p { margin: 2px 0 0; }
.ficha-bloque { padding: var(--space-4); border-bottom: 1px solid var(--border); }
.ficha-bloque:last-child { border-bottom: 0; }
.ficha-marca { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-3); }
.ficha-marca img { height: 22px; width: auto; max-width: 86px; object-fit: contain; }
.ficha-datos { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-left: auto; font-size: 13px; }
.ficha-datos b { font-variant-numeric: tabular-nums; }

/* Barras mes a mes. Un mes sin compra queda como hueco, no se saltea. */
.meses { display: flex; align-items: flex-end; gap: 2px; height: 110px; margin-bottom: 4px; }
.mes-barra { flex: 1; min-width: 0; background: var(--acento); opacity: .75; border-radius: 2px 2px 0 0; }
.mes-barra.vacio { background: var(--surface-2); opacity: 1; height: 2px !important; }
.mes-barra.actual { opacity: 1; outline: 2px solid var(--acento); outline-offset: 1px; }
.meses-eje { display: flex; gap: 2px; font-size: 10px; color: var(--text-muted); }
.meses-eje span { flex: 1; min-width: 0; text-align: center; overflow: hidden; white-space: nowrap; }
.ficha-rubros { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-3); }
.rubro-chip { font-size: 12px; background: var(--surface-2); border-radius: 999px; padding: 4px 10px; }
.rubro-chip b { font-variant-numeric: tabular-nums; }

/* Las filas de cliente del detalle se pueden tocar. */
.tabla-det tbody tr.clicable, .matriz tbody tr.clicable { cursor: pointer; }
.tabla-det tbody tr.clicable:focus-visible, .matriz tbody tr.clicable:focus-visible {
  outline: 2px solid var(--brand-verde); outline-offset: -2px; }

@media (max-width: 719px) {
  .ficha { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .ficha-datos { width: 100%; margin-left: 0; }
}

/* ---------- Área Descuentos ----------
   Registro de descuentos y bonificaciones (docs/diseno-bonificaciones.md). Reusa la
   caja de período, el panel y la tabla del detalle de Ventas. */
.d-contenido { max-width: 1180px; margin: 0 auto; padding: 0 var(--space-4); }
.d-aviso { margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: #FFF7ED; color: var(--estado-atento); font-size: 13px; font-weight: 600; }

.d-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 900px) { .d-kpis { grid-template-columns: repeat(4, 1fr); } }
.d-kpi { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4);
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  box-shadow: 0 1px 2px rgba(16,16,16,.06), 0 8px 24px rgba(16,16,16,.07); }
.d-kpi span { font-size: 11px; line-height: 15px; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 600; color: var(--text-muted); }
.d-kpi b { font-family: var(--font-display); font-size: 24px; line-height: 32px; font-weight: 600;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.d-kpi small { font-size: 12px; color: var(--text-muted); }

.d-dos { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
@media (min-width: 900px) { .d-dos { grid-template-columns: 1fr 1fr; align-items: start; } }
.d-caja { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-4);
  box-shadow: 0 1px 2px rgba(16,16,16,.06), 0 8px 24px rgba(16,16,16,.07); min-width: 0; }
.d-caja h2 { margin: 0; font-family: var(--font-display); font-size: 18px; line-height: 24px;
  font-weight: 600; letter-spacing: -.01em; }
.d-caja h2 .cuenta, .d-remitos summary .cuenta { font-family: var(--font-body); font-size: 13px; font-weight: 600;
  background: var(--surface-2); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.d-ayuda { margin: 4px 0 var(--space-3); font-size: 13px; line-height: 18px; color: var(--text-muted); }
.d-lista { list-style: none; margin: 0; padding: 0; }
.d-item { padding: var(--space-3) 0; border-top: 1px solid var(--border); display: grid; gap: 3px; }
.d-item-cab { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.d-item-cab b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-item-sub, .d-item-num { font-size: 13px; color: var(--text-muted); }
.d-item-num b { color: var(--text); font-variant-numeric: tabular-nums; }
.d-motivos { display: flex; flex-wrap: wrap; gap: 6px; }
/* Atento sobre fondo claro: #B45309 da 5:1 (DESIGN.md §3). */
.d-motivo { font-size: 12px; font-weight: 700; color: var(--estado-atento); background: #FFF7ED;
  border-radius: 999px; padding: 2px 8px; }
.d-nota { color: var(--estado-atento); }

.d-prov { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px;
  background: var(--surface-2); color: var(--text); display: inline-flex; align-items: center; gap: 5px; }
.d-prov::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--brand-verde)); }
.d-prov[data-prov="saladillo"]  { --c: var(--prov-saladillo); }
.d-prov[data-prov="macroplast"] { --c: var(--prov-macroplast); }
.d-prov[data-prov="sugla"]      { --c: var(--prov-sugla); }

.d-remitos { margin-top: var(--space-3); border-top: 1px solid var(--border); padding-top: var(--space-3); }
.d-remitos summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.d-mini { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.d-fila-mini { display: flex; align-items: center; gap: var(--space-2); padding: 6px 0;
  border-top: 1px solid rgba(16,16,16,.07); }
.d-fila-mini > span:first-child { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.d-mini-nombre { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.d-detalle { padding: 0; margin-top: var(--space-6); }
.d-sols td { vertical-align: top; }
.d-fecha { white-space: nowrap; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.d-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 3px;
  font-size: 12px; color: var(--text-muted); }
.d-sols .d-monto small { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.d-sols .d-monto small.d-nota { color: var(--estado-atento); }
.d-estado { text-align: right; white-space: nowrap; }
.d-estado small { display: block; font-size: 11px; color: var(--text-muted); }
.d-est { font-size: 12px; font-weight: 700; }
.d-est.ok { color: var(--estado-en-ritmo); }
.d-est.pend { color: var(--estado-atento); }
.d-est.rech { color: var(--estado-atrasado); }
/* Pedido con más de una solicitud: filete a la izquierda y el acumulado a la vista. */
.d-sols tr.en-grupo td:first-child { box-shadow: inset 3px 0 0 var(--estado-atento); }
.d-grupo { margin-top: 4px; font-size: 12px; color: var(--estado-atento); }
.solo-cel { display: none; }
@media (max-width: 719px) {
  .solo-ancho { display: none; }
  .solo-cel { display: inline; }
}

/* Aviso de carga atrasada en la tarjeta (ámbar: informa, no es un error). */
.aviso-carga { margin: var(--space-2) 0 0; padding: 6px 10px; border-radius: var(--radius-sm);
  background: #FFF7ED; color: var(--estado-atento); font-size: 12px; line-height: 16px; font-weight: 600; }

/* ---------- Ventas: Resumen | Para recuperar ----------
   Píldoras sobre la banda verde. Los vendedores no ven la franja de áreas, así que la
   segunda vista de Ventas va acá, a la vista de todos. */
.vistas { display: inline-flex; gap: 2px; margin-top: var(--space-3); padding: 3px;
  background: rgba(0, 0, 0, .18); border-radius: 999px; }
.vista { border: 0; background: transparent; color: #fff; font: inherit; font-size: 14px;
  font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.vista:hover { background: rgba(255, 255, 255, .12); }
.vista[aria-selected="true"] { background: #fff; color: var(--brand-verde); }

/* Para recuperar: monta sobre la banda como la caja de filtros. */
.rec { max-width: 1180px; margin: calc(var(--space-6) * -1) auto 0; padding: 0 var(--space-4);
  position: relative; z-index: 2; display: grid; gap: var(--space-4); }
.rec-fila { cursor: pointer; border-radius: var(--radius-sm); }
.rec-fila:hover { background: #FAFAF8; }
.rec-fila:focus-visible { outline: 2px solid var(--brand-verde); outline-offset: 2px; }
.rec-cab { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
/* El nombre es lo que importa: si no entra, baja al segundo renglón en vez de cortarse. */
.rec-cab { align-items: flex-start; }
.rec-cab b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.rec-cab .d-prov, .rec-cab .rec-monto { margin-top: 2px; }
.rec-monto { margin-left: auto; flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-monto small { font-weight: 500; font-size: 11px; color: var(--text-muted); margin-left: 1px; }
.rec-extra { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: 12px; }
/* Lo sigue comprando por otro proveedor: el vendedor ya lo visita, es el más fácil. */
.rec-sigue { font-weight: 700; color: var(--estado-en-ritmo); background: #F0FDF4;
  border-radius: 999px; padding: 1px 8px; }
.rec-perdidos summary { cursor: pointer; list-style: revert; }
.rec-perdidos summary h2 { display: inline; }

/* Contraprestación: qué recibimos a cambio. Canje en azul (es un pago), comercial en ámbar
   (margen sin nada a cambio), obra en gris (lo habitual). */
.d-contra { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.d-contra.obra { background: var(--surface-2); color: var(--text-muted); }
.d-contra.canje { background: #EEF2FF; color: var(--brand-azul); }
.d-contra.comercial { background: #FFF7ED; color: var(--estado-atento); }


/* ---------- Área Obras (docs/diseno-obras.md; maquetas del 24/09/2026) ---------- */
.o-contenido { max-width: 640px; margin: calc(var(--space-6) * -1) auto 0; padding: 0 var(--space-4) 96px;
  position: relative; z-index: 2; display: grid; gap: var(--space-3); }
.o-volver { color: #fff; font-weight: 700; text-decoration: none; }
.o-busca, .o-busca-cli, .o-form input, .o-form textarea, .o-form select, .o-sv select {
  font: inherit; font-size: 15px; width: 100%; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; background: #fff; color: var(--text); }
.o-caja { background: var(--surface); border-radius: 14px; padding: 12px 14px; display: block; color: inherit;
  text-decoration: none; box-shadow: 0 1px 2px rgba(16,16,16,.06), 0 6px 18px rgba(16,16,16,.07); }
.o-caja h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.o-aviso, .o-pend { background: #FFF7ED; color: var(--estado-atento); font-size: 13px; font-weight: 600;
  border-radius: 10px; padding: 8px 10px; margin: 0; }
.o-pend { margin-top: 8px; font-size: 12px; }
.o-error { background: #FEF2F2; color: var(--estado-atrasado); font-size: 13px; font-weight: 600;
  border-radius: 10px; padding: 8px 10px; margin: 0; }
.o-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.o-chip { flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 12px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.o-chip[aria-pressed="true"] { background: var(--brand-verde); border-color: var(--brand-verde); color: #fff; }
.o-obra-t { display: flex; align-items: flex-start; gap: 8px; }
.o-obra-t b { font-size: 16px; font-weight: 600; flex: 1; }
.o-etapa { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px;
  background: var(--surface-2); color: var(--text-muted); }
.o-etapa.sanit { background: #E8F5EE; color: var(--brand-verde); }
.o-etapa.nueva { background: #EEF2FF; color: var(--brand-azul); }
.o-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.o-corralon { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; margin-top: 6px; }
.o-corralon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-verde); }
.o-fila { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid rgba(16,16,16,.07);
  color: inherit; text-decoration: none; font-size: 14px; }
.o-fab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 5;
  background: var(--brand-verde); color: #fff; font-weight: 700; border-radius: 999px; padding: 13px 18px;
  text-decoration: none; box-shadow: 0 8px 18px rgba(0,131,87,.35); }
.o-form { display: grid; gap: var(--space-3); }
.o-campo { display: grid; gap: 3px; margin-bottom: 9px; }
.o-campo span { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.o-tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.o-dos { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: end; }
.o-form .o-dos { grid-template-columns: 1fr 1fr; }
.o-opcion { display: block; width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 11px; margin-top: 6px; font: inherit; font-size: 14px; background: #fff; cursor: pointer; }
.o-opcion.sel { border-color: var(--brand-verde); background: #F2FAF6; font-weight: 600; }
.o-opcion small { display: block; color: var(--text-muted); font-size: 12px; font-weight: 400; }
.o-parecidas { background: #EEF2FF; color: var(--brand-azul); border-radius: 10px; padding: 9px 11px;
  font-size: 13px; margin-bottom: 9px; }
.o-parecidas b, .o-parecidas a { display: block; color: inherit; }
.o-etapas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.o-et input { position: absolute; opacity: 0; }
.o-et span { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 12px 8px; text-align: center;
  font-size: 14px; font-weight: 600; background: #fff; cursor: pointer; }
.o-et.clave span { box-shadow: inset 0 0 0 2px #CDEBDD; }
.o-et input:checked + span { background: var(--brand-verde); border-color: var(--brand-verde); color: #fff; }
.o-et input:focus-visible + span { outline: 2px solid var(--brand-verde); outline-offset: 2px; }
.o-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.o-foto { aspect-ratio: 1; border-radius: 10px; border: 0; background: var(--surface-2) center / cover no-repeat; cursor: pointer; }
.o-foto.mas { background: #fff; border: 1.5px dashed var(--border); color: var(--brand-verde); font: inherit;
  font-weight: 700; font-size: 13px; }
.o-pie-fijo { position: sticky; bottom: 0; padding: 18px 0 calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(245,245,245,0), var(--bg) 40%); }
.o-boton { display: block; width: 100%; border: 0; background: var(--brand-verde); color: #fff; text-align: center;
  font: inherit; font-weight: 700; font-size: 16px; border-radius: 12px; padding: 14px; text-decoration: none; cursor: pointer; }
.o-datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; margin: 0 0 8px; }
.o-datos dt { color: var(--text-muted); }
.o-datos dd { margin: 0; font-weight: 600; }
.o-tel, .o-link { color: var(--brand-verde); font-weight: 700; background: none; border: 0; font: inherit; padding: 0; cursor: pointer; }
.o-peligro { color: var(--estado-atrasado); justify-self: start; }
.o-visita { border-left: 2px solid var(--border); padding: 0 0 12px 12px; margin-left: 6px; position: relative; }
.o-visita::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--brand-verde); }
.o-visita.pend::before { background: var(--estado-atento); }
.o-visita.archivada { opacity: .5; }
.o-vcab { font-size: 13px; color: var(--text-muted); }
.o-vcab b { color: var(--text); }
.o-visita p { margin: 4px 0 6px; font-size: 14px; }
.o-mini { display: flex; gap: 4px; flex-wrap: wrap; }
.o-mini img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; display: block; }
.o-solo { border: 1px solid #D9DEFF; }
.o-solo-t { margin: 0 0 4px; font-size: 11px; font-weight: 700; color: var(--brand-azul); text-transform: uppercase; letter-spacing: .05em; }
.o-num { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 5px 0;
  border-top: 1px solid rgba(16,16,16,.07); }
.o-num b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.o-sv { padding: 8px 0; border-top: 1px solid rgba(16,16,16,.07); font-size: 13px; display: grid; gap: 6px; }
.o-toast { position: fixed; left: 16px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30;
  background: #1f1f1f; color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 14px; }

/* Obras 2: contactos, personas con historial, ubicación y "¿Es esta?" (docs/diseno-obras-contactos.md) */
.o-ubic { margin: 0 0 8px; background: #F2FAF6; color: var(--brand-verde); border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.o-ubic.sin { background: var(--surface-2); color: var(--text-muted); }
.o-rol { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid rgba(16,16,16,.07); font-size: 14px; }
.o-rol:first-child { border-top: 0; }
.o-rol > span { color: var(--text-muted); font-size: 13px; padding-top: 2px; }
.o-persona { display: inline-flex; align-items: center; gap: 6px; background: #F2FAF6; border: 1px solid #CDEBDD; border-radius: 999px;
  padding: 4px 6px 4px 10px; font-weight: 600; font-size: 13px; margin: 0 4px 4px 0; }
.o-persona i { font-style: normal; color: var(--text-muted); font-weight: 500; font-size: 12px; }
.o-x { width: 22px; height: 22px; border-radius: 50%; border: 0; background: #fff; color: var(--text-muted); cursor: pointer; font-size: 11px; }
.o-hist { margin-top: 4px; font-size: 12px; line-height: 17px; color: var(--text-muted); border-left: 2px solid var(--border); padding-left: 8px; }
.o-oficios { display: flex; flex-wrap: wrap; gap: 6px; }
.o-of { border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600;
  background: #fff; color: var(--text-muted); cursor: pointer; }
.o-of[aria-pressed="true"] { background: var(--brand-verde); border-color: var(--brand-verde); color: #fff; }
.o-velo { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.28); display: flex; align-items: flex-end; justify-content: center; }
.o-hoja { background: var(--surface); width: 100%; max-width: 640px; max-height: 88dvh; overflow-y: auto; border-radius: 18px 18px 0 0;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.o-hoja h3 { margin: 0; font-size: 16px; }
.o-opcion.o-crear { border-style: dashed; color: var(--brand-verde); font-weight: 700; }
.o-par { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.o-si { flex: none; border: 0; border-radius: 8px; padding: 6px 10px; background: var(--brand-azul); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.o-no { margin-top: 8px; border: 0; border-radius: 8px; padding: 6px 10px; background: #fff; color: var(--brand-azul); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.o-tipo { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 0; white-space: nowrap; }
.o-tipo input { width: auto; padding: 0; margin: 0; }

/* Área Contactos (docs/diseno-contactos.md) */
.c-contenido { max-width: 1180px; margin: calc(var(--space-6) * -1) auto 0; padding: 0 var(--space-4) 96px;
  position: relative; z-index: 2; display: grid; gap: var(--space-3); }
.c-filtros { display: grid; gap: 8px; }
.c-filtros select { font: inherit; font-size: 14px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px;
  background: #fff; color: var(--text); min-width: 0; }
@media (min-width: 720px) { .c-filtros { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.c-marcas { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.c-marca { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--surface-2); color: var(--text-muted); white-space: nowrap; }
.c-marca.sal { background: #E6F6E6; color: #0E6B0E; }
.c-marca.mp { background: #E8F5EE; color: var(--brand-verde); }
.c-marca.no { background: #FFF7ED; color: var(--estado-atento); }
.c-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.c-acc { text-align: center; border-radius: 12px; padding: 11px; font-weight: 700; font-size: 15px; border: 1px solid var(--brand-verde);
  color: var(--brand-verde); background: #fff; text-decoration: none; }
.c-acc.wa { background: var(--brand-verde); color: #fff; }
.c-obra { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(16,16,16,.07);
  font-size: 14px; color: inherit; text-decoration: none; }
.c-obra:first-of-type { border-top: 0; }
.c-obra small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.c-idea { margin: 0; background: #EEF2FF; color: var(--brand-azul); border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.c-check { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 10px;
  font-size: 14px; font-weight: 600; background: #fff; cursor: pointer; }
.c-check input { width: auto; padding: 0; margin: 0; }
.c-otras { margin-top: 8px; }
.c-titulo { margin: 0; font-family: var(--font-display); font-size: 18px; }
.c-tarjetas { display: grid; gap: var(--space-3); }
.c-tabla { display: none; width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); border-radius: 16px; overflow: hidden; }
.c-tabla th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
  font-weight: 600; padding: 10px 10px 6px; border-bottom: 1px solid var(--border); }
.c-tabla td { padding: 9px 10px; border-bottom: 1px solid rgba(16,16,16,.07); vertical-align: top; cursor: pointer; }
.c-tabla td small { display: block; color: var(--text-muted); font-size: 12px; }
.c-tabla .n { text-align: right; }
.c-tabla tr.sel td { background: #F2FAF6; }
.c-lado[hidden] { display: none; }
.o-nombre { color: inherit; text-decoration: none; }
@media (min-width: 900px) {
  .c-dos { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
  .c-tabla { display: table; }
  .c-tarjetas { display: none; }
  .c-lado { display: grid; gap: var(--space-3); position: sticky; top: 12px; }
}
@media (max-width: 899px) { .c-lado { display: none !important; } }

/* Quién entró (solo Fede y Natalio) */
.i-filtros { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; background: var(--surface); border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(16,16,16,.06), 0 6px 18px rgba(16,16,16,.07); }
.i-filtros label { display: grid; gap: 3px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.i-filtros label:first-child { grid-column: 1 / -1; }
.i-filtros select, .i-filtros input { font: inherit; font-size: 14px; border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 10px; background: #fff; color: var(--text); min-width: 0; }
@media (min-width: 720px) { .i-filtros { grid-template-columns: 2fr 1fr 1fr; } .i-filtros label:first-child { grid-column: auto; } }
.i-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0;
  border-top: 1px solid rgba(16,16,16,.07); font-size: 14px; flex-wrap: wrap; }
.i-fila:first-child { border-top: 0; }
.i-fila small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.i-fila .c-marcas { margin-top: 0; }

/* Solicitudes de descuento (docs/diseno-descuentos-portal.md) */
.d-arriba { max-width: 1180px; margin: 0 auto 12px; padding: 0 var(--space-4); display: grid; gap: var(--space-3); }
.d-arriba:empty { display: none; }
.s-botonera { display: flex; gap: 8px; flex-wrap: wrap; }
.bt-ok, .bt-no, .bt-sec { display: inline-block; border-radius: 9px; padding: 7px 12px; font: inherit; font-weight: 700; font-size: 13px;
  cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.bt-ok { background: var(--brand-verde); color: #fff; }
.bt-no { background: #fff; border-color: #F3C4C4; color: var(--estado-atrasado); }
.bt-sec { background: #fff; border-color: var(--brand-verde); color: var(--brand-verde); }
.s-caja h2 { font-family: var(--font-display); font-size: 17px; margin: 0; }
.s-caja h2 small { font-family: var(--font-body); font-size: 13px; color: var(--text-muted); margin-left: 6px; }
.s-tabla-envoltura { overflow-x: auto; }
.s-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.s-tabla th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600;
  padding: 6px 8px; border-bottom: 1px solid var(--border); }
.s-tabla td { padding: 9px 8px; border-bottom: 1px solid rgba(16,16,16,.07); vertical-align: middle; }
.s-tabla td small { display: block; color: var(--text-muted); font-size: 12px; }
.s-tabla .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.s-acc { white-space: nowrap; text-align: right; }
.s-link { color: inherit; text-decoration: none; }
.s-remito { display: inline-flex; gap: 6px; }
.s-remito input { font: inherit; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; width: 130px; }
.s-dos { display: grid; gap: var(--space-3); }
@media (min-width: 900px) { .s-dos { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.s-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.s-seg button { border: 0; border-left: 1px solid var(--border); background: #fff; padding: 8px 12px; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--text-muted); cursor: pointer; }
.s-seg button:first-child { border-left: 0; }
.s-seg button[aria-pressed="true"] { background: var(--brand-verde); color: #fff; }
.s-calc { background: #F2FAF6; border-radius: 10px; padding: 9px 12px; font-size: 13px; display: flex; justify-content: space-between; margin: 0 0 8px; }
.s-calc b { font-size: 16px; color: var(--brand-verde); }
.s-decidir { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.s-decidir .bt-ok, .s-decidir .bt-no { padding: 13px; font-size: 15px; text-align: center; }
.s-nota { width: 100%; font: inherit; font-size: 14px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; }
.s-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.s-ok { color: var(--estado-en-ritmo); font-weight: 700; }
.s-vig { border: 1px solid #F5D9B5; }
.s-vig b { color: var(--estado-atento); }
/* En el celular, cada solicitud es una tarjeta: cliente y %, después fecha, proveedor y bonificación. */
@media (max-width: 700px) {
  .s-lista thead { display: none; }
  .s-lista, .s-lista tbody { display: block; }
  .s-lista tr { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "c c pct" "f p b" "acc acc acc";
    gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(16,16,16,.07); }
  .s-lista td { border: 0; padding: 0; }
  .s-lista .s-c { grid-area: c; } .s-lista .s-pct { grid-area: pct; font-weight: 700; font-size: 15px; }
  .s-lista .s-f { grid-area: f; color: var(--text-muted); } .s-lista .s-p { grid-area: p; }
  .s-lista .s-b { grid-area: b; } .s-lista .s-m { display: none; }
  .s-lista .s-acc { grid-area: acc; text-align: left; }
  .s-lista .s-acc:empty { display: none; }
}

/* Ventas por secciones (docs/diseno-ventas-secciones.md). Colores de marca de Ventas: los dos
   verdes de Saladillo y Macroplast no se distinguen lado a lado (aprobado en las maquetas). */
.v-sal { --c: var(--prov-saladillo); } .v-mac { --c: var(--brand-azul); } .v-sug { --c: var(--brand-lima); }
.secciones { display: flex; gap: 20px; max-width: 1180px; margin: 0 auto; padding: 0 var(--space-4);
  overflow-x: auto; scrollbar-width: none; border-top: 1px solid rgba(255,255,255,.18); }
.secciones::-webkit-scrollbar { display: none; }
.secciones a { color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 10px 0 11px; border-bottom: 3px solid transparent; white-space: nowrap; }
.secciones a[aria-current="page"] { color: #fff; border-bottom-color: var(--brand-lima); }
.v-seccion { max-width: 1180px; margin: 0 auto; padding: 0 var(--space-4) var(--space-6); display: grid; gap: var(--space-3); }
.caja-v { background: var(--surface); border-radius: var(--radius-lg); padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(16,16,16,.06), 0 6px 18px rgba(16,16,16,.07); }
.v-controles { display: grid; gap: 8px; }
.v-busca { width: 100%; font: inherit; font-size: 15px; border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; background: #fff; }
.v-seg { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.v-seg button { flex: 1; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; padding: 8px 6px; color: var(--text-muted); cursor: pointer; }
.v-seg button[aria-pressed="true"] { background: var(--brand-verde); color: #fff; }
.v-cli { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid rgba(16,16,16,.07); color: inherit; text-decoration: none; }
.v-cli:first-child { border-top: 0; }
.v-cli-n { display: flex; gap: 8px; align-items: baseline; }
.v-cli-n small { margin-left: auto; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.v-cli-l { font-size: 12.5px; color: var(--text-muted); }
.v-marcas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.v-m { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; border-radius: 8px; padding: 3px 8px; background: var(--surface-2); }
.v-m::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, #999); }
.v-m.v-no { background: none; border: 1px dashed var(--border); color: var(--text-muted); font-weight: 600; }
.v-m.v-no::before { display: none; }
.v-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.v-tabla th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.v-tabla td { padding: 8px; border-bottom: 1px solid rgba(16,16,16,.07); }
.v-tabla td small { display: block; font-size: 12px; color: var(--text-muted); }
.v-tabla .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v-tabla tr[data-ir] { cursor: pointer; }
.v-tabla tr[data-ir]:hover td { background: #F7FBF9; }
.v-celda { display: inline-grid; gap: 3px; justify-items: end; min-width: 90px; }
.v-celda i { justify-self: stretch; height: 4px; border-radius: 999px; background: var(--c); }
.v-nota { font-size: 12.5px; color: var(--text-muted); margin: 8px 0 0; }
.v-mas { justify-self: center; border: 1px solid var(--brand-verde); color: var(--brand-verde); background: #fff; font: inherit; font-weight: 700; border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.v-volver { color: #fff; font-weight: 700; }
.v-tit { font-family: var(--font-display); font-size: 16px; margin: 0 0 6px; }
.v-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; }
.v-datos div { background: var(--surface-2); border-radius: 10px; padding: 8px; }
.v-datos small { display: block; font-size: 11.5px; color: var(--text-muted); }
.v-datos b { font-size: 15px; }
.v-marca-serie { padding: 8px 0; border-top: 1px solid rgba(16,16,16,.07); }
.v-marca-serie:first-of-type { border-top: 0; }
.v-fila { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.v-sub { font-size: 12px; color: var(--text-muted); }
.v-barras { display: flex; align-items: flex-end; gap: 2px; height: 48px; margin-top: 6px; }
.v-barras i { flex: 1; min-height: 0; background: var(--c); border-radius: 2px 2px 0 0; opacity: .85; }
.v-barras i.v-ult { opacity: 1; outline: 1px solid var(--text); }
.v-eje { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-muted); }
.v-aviso { margin: 8px 0 0; font-size: 13px; font-weight: 600; background: #FFF7ED; color: var(--estado-atento); border-radius: 10px; padding: 8px 10px; }
.v-pest { display: flex; gap: 6px; margin-bottom: 4px; }
.v-pest button { border: 0; font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); cursor: pointer; }
.v-pest button[aria-pressed="true"] { background: var(--text); color: #fff; }
.v-qc-marca h3 { font-size: 14px; margin: 8px 0 2px; }
.v-qc-marca h3 small { font-weight: 500; color: var(--text-muted); }
.v-rank { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 7px 0; border-top: 1px solid rgba(16,16,16,.07); font-size: 13.5px; }
.v-rank small { grid-column: 1 / -1; font-size: 12px; color: var(--text-muted); }
.v-v { font-weight: 700; white-space: nowrap; }
.v-prod { display: grid; gap: var(--space-3); align-items: start; }
.v-rub { padding: 9px 0; border-top: 1px solid rgba(16,16,16,.07); }
.v-rub.abierto { background: #F7FBF9; margin: 0 -14px; padding: 9px 14px; }
.v-rub-cab { display: flex; gap: 8px; align-items: baseline; width: 100%; border: 0; background: none; font: inherit; font-size: 14px; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.v-rub-cab b { flex: 1; }
.v-chev { color: var(--text-muted); font-size: 12px; }
.v-barra { display: block; height: 5px; border-radius: 999px; background: var(--surface-2); margin-top: 5px; position: relative; }
.v-barra i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--c); }
.v-rub > small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.v-arts { margin-top: 8px; border-left: 3px solid var(--c); padding-left: 10px; }
.v-art { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 0; font-size: 13px; border-top: 1px solid rgba(16,16,16,.06); }
.v-art:first-child { border-top: 0; }
.v-art small { grid-column: 1 / -1; font-size: 11.5px; color: var(--text-muted); }
.v-otros { margin-top: 10px; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.v-otros h3 { display: flex; margin: 0 0 4px; font-size: 13px; }
.v-otros h3 span { margin-left: auto; }
.v-otro { display: flex; justify-content: space-between; font-size: 12.5px; padding: 2px 0; }
/* Celular: una lista de tarjetas y una marca por vez. Compu: tabla y marcas lado a lado. */
.v-tabla-caja { display: none; }
@media (min-width: 900px) {
  .v-lista { display: none; }
  .v-tabla-caja { display: block; }
  .v-solo-cel, .v-pest { display: none; }
  .v-oculta-cel { display: block; }
  .v-prod, .v-qc { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-3); }
}
@media (max-width: 899px) { .v-oculta-cel { display: none; } }

/* Comparaciones (docs/diseno-comparaciones.md): el número grande es en cantidad. */
.cmp-contra { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.cmp-contra .v-seg { flex: 1; max-width: 460px; }
.cmp-contra small { display: block; font-size: 11px; font-weight: 500; opacity: .85; }
.cmp-marcas, .cmp-detalle, .cmp-dos { display: grid; gap: var(--space-3); align-items: start; }
.cmp-detalle { scroll-margin-top: 12px; }
.cmp-marca { border-top: 4px solid var(--c); }
.cmp-nom { font-size: 15px; }
.cmp-grande { font-family: var(--font-display); font-size: 34px; line-height: 1; margin: 8px 0 3px; letter-spacing: -.01em; }
.cmp-sube { color: var(--estado-en-ritmo); }
.cmp-baja { color: var(--estado-atrasado); }
.cmp-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 8px; }
.cmp-datos div { background: var(--surface-2); border-radius: 10px; padding: 7px 9px; }
.cmp-datos small { display: block; font-size: 11.5px; color: var(--text-muted); }
.cmp-datos b { font-size: 15px; }
.cmp-antes { font-size: 13px; margin-top: 4px; }
.cmp-link { border: 0; background: none; font: inherit; color: var(--brand-verde); font-weight: 700; font-size: 13.5px; padding: 8px 0 0; cursor: pointer; }
.cmp-mini { display: none; }
.cmp-pt { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 0; border-top: 1px solid rgba(16,16,16,.07); font-size: 13.5px; align-items: baseline; }
.cmp-pt:first-of-type { border-top: 0; }
.cmp-pt small { grid-column: 1 / -1; font-size: 12px; color: var(--text-muted); }
.cmp-tot b { font-family: var(--font-display); font-size: 14.5px; }
.cmp-v { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cmp-riel { grid-column: 1 / -1; display: block; height: 10px; position: relative; background: var(--surface-2); border-radius: 3px; }
.cmp-riel i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.cmp-riel .cmp-marca-c { background: var(--c); }
.cmp-riel .cmp-rojo { background: var(--estado-atrasado); }
.cmp-riel .cmp-verde { background: var(--estado-en-ritmo); }
.cmp-riel .cmp-gris { background: #8A8F96; }
.cmp-riel .cmp-ambar { background: repeating-linear-gradient(45deg, #F5B45A 0 5px, #F8C57F 5px 10px); }
.cmp-rub { padding: 9px 0; border-top: 1px solid rgba(16,16,16,.07); }
.cmp-rub:first-child { border-top: 0; }
.cmp-t { display: flex; gap: 6px; align-items: baseline; font-size: 14px; }
.cmp-t b { flex: 1; }
.cmp-rub > small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.cmp-div { display: block; height: 6px; position: relative; margin-top: 5px; background: var(--surface-2); border-radius: 999px; }
.cmp-div::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: #777; }
.cmp-div i { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.cmp-div i.n { right: 50%; background: var(--estado-atrasado); }
.cmp-div i.p { left: 50%; background: var(--estado-en-ritmo); }
.cmp-chip { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; background: #FFF7ED; color: var(--estado-atento); white-space: nowrap; }
.cmp-pest { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.cmp-pest button { border: 0; font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); cursor: pointer; }
.cmp-pest button[aria-pressed="true"] { background: var(--text); color: #fff; }
.cmp-cli { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 9px 0; border-top: 1px solid rgba(16,16,16,.07); color: inherit; text-decoration: none; }
.cmp-cli:first-child { border-top: 0; }
.cmp-cli small { font-size: 12px; color: var(--text-muted); }
.cmp-cli .cmp-d { text-align: right; }
.cmp-cli .cmp-ancho { grid-column: 1 / -1; }
.cmp-solo-compu { display: none; }
#v-comparaciones[aria-busy="true"] { opacity: .55; transition: opacity .15s; }
@media (min-width: 900px) {
  .cmp-marcas { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .cmp-mini { display: block; margin-top: 8px; }
  .cmp-puente { display: none; }
  .cmp-dos { grid-template-columns: 1.1fr 1fr; }
  .cmp-solo-cel { display: none; }
  .cmp-solo-compu { display: block; }
}

/* Filtros en el celular: hoja que sube desde abajo (docs/diseno-ventas-secciones.md). */
.bt-filtros, .activos, .hoja-cab, .hoja-ver { display: none; }
@media (max-width: 699px) {
  .bt-filtros { display: inline-flex; gap: 4px; align-items: center; margin-left: auto; border: 1px solid var(--brand-verde); color: var(--brand-verde);
    background: #fff; font: inherit; font-weight: 700; font-size: 13px; border-radius: 9px; padding: 6px 10px; cursor: pointer; }
  .bt-filtros em { font-style: normal; background: var(--brand-verde); color: #fff; border-radius: 999px; padding: 0 6px; }
  .activos { display: flex; gap: 6px; flex-wrap: wrap; }
  .activos:empty { display: none; }
  .activos button { border: 0; font: inherit; font-size: 12.5px; font-weight: 600; background: #F2FAF6; color: var(--brand-verde); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
  .hoja-filtros { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-radius: 18px 18px 0 0;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.2);
    transform: translateY(105%); transition: transform .2s ease; max-height: 85vh; overflow: auto; }
  body.filtros-abiertos .hoja-filtros { transform: none; }
  .hoja-cab { display: flex; align-items: center; margin-bottom: 10px; font-family: var(--font-display); font-size: 17px; }
  .hoja-cab .limpiar { margin-left: auto; }
  .hoja-filtros .filtros-fila { display: grid; gap: 10px; }
  .hoja-filtros #limpiar { display: none; }
  .hoja-ver { display: block; width: 100%; margin-top: 12px; border: 0; background: var(--brand-verde); color: #fff; font: inherit; font-weight: 700; font-size: 15px; border-radius: 12px; padding: 12px; cursor: pointer; }
  .velo-filtros { position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.35); }
  /* El período en una sola fila que se desliza (maqueta 1): en cuatro renglones empujaba todo abajo. */
  #atajos { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--space-4) * -1); padding: 0 var(--space-4); }
  #atajos::-webkit-scrollbar { display: none; }
  #atajos .atajo { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .hoja-filtros { transition: none; } }

/* Papelera (docs/diseno-papelera.md). */
.p-pest { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--space-3); }
.p-pest button { border: 0; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); color: var(--text-muted); cursor: pointer; box-shadow: 0 1px 2px rgba(16,16,16,.08); }
.p-pest button[aria-pressed="true"] { background: var(--text); color: #fff; }
.p-fila { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid rgba(16,16,16,.07); }
.p-fila:first-child { border-top: 0; }
.p-que small { display: block; font-size: 12.5px; color: var(--text-muted); }
.p-motivo { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; background: #FFF7ED; color: var(--estado-atento); border-radius: 8px; padding: 6px 8px; }
.p-acc { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 700px) { .p-fila { grid-template-columns: 1fr auto; align-items: center; } }


/* ---------- Mapa del portal (mapa.js; solo Fede y Natalio) ---------- */
.m-revisar { background: #FFF7ED; color: var(--estado-atento); margin-bottom: var(--space-3); }
.m-revisar ul { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; }
.m-bien { color: var(--estado-en-ritmo); margin-bottom: var(--space-3); }
.m-grupo { margin: var(--space-4) 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.m-personas { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.m-persona { min-width: 0; }
.m-persona.fuera { opacity: .75; background: var(--surface-2); }
.m-cab { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.m-cab small { color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.m-rol { margin-left: auto; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--surface-2); color: var(--text-muted); }
.m-rol.todo { background: #E8F5EE; color: var(--brand-verde); }
.m-rol.vendedor { background: #EEF2FF; color: var(--brand-azul); }
.m-rol.tecnico { background: #F3F0FF; color: #5B3FD1; }
.m-rol.admin_ventas { background: #FFF7ED; color: var(--estado-atento); }
.m-rol.cortado { background: var(--estado-atrasado); color: #fff; }
.m-arbol { list-style: none; margin: 8px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--border); }
.m-arbol > li { position: relative; padding: 4px 0 4px 12px; font-size: 13.5px; }
.m-arbol > li::before { content: ""; position: absolute; left: -2px; top: 14px; width: 10px; border-top: 2px solid var(--border); }
.m-alc { color: var(--text-muted); font-size: 12.5px; }
.m-acc { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.m-acc span { font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 2px 7px; }
.m-acc .si { background: #F2FAF6; color: var(--brand-verde); }
.m-acc .no { color: #A3A6AB; text-decoration: line-through; font-weight: 500; }
.m-nota { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: var(--brand-verde); }
.m-hora { margin-top: var(--space-4); }
.m-ley { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-2); }
.m-cols { display: none; }
.m-flujo { display: grid; gap: 4px; margin-bottom: 12px; }
.m-nodo { background: var(--surface); border-radius: 12px; padding: 9px 11px; font-size: 13px; min-width: 0;
  box-shadow: 0 1px 2px rgba(16,16,16,.06), 0 4px 12px rgba(16,16,16,.06); border-left: 4px solid var(--border); overflow-wrap: anywhere; }
.m-nodo b { display: block; font-size: 13.5px; }
.m-nodo small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.m-nodo .m-paso { margin: 0 0 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.m-nodo.origen { border-left-color: var(--brand-verde); }
.m-nodo.pantalla { border-left-color: var(--brand-lima); }
.m-flecha { display: grid; place-items: center; color: #9aa0a6; font-size: 14px; line-height: 1; }
.m-flecha::before { content: "↓"; }
.m-vivo, .m-ley span { display: inline-block; margin-top: 5px; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; }
.m-vivo.ok, .m-ley .ok { background: #E8F5EE; color: var(--estado-en-ritmo); }
.m-vivo.atento, .m-ley .atento { background: #FFF7ED; color: var(--estado-atento); }
.m-vivo.sin_dato, .m-ley .sin_dato { background: var(--surface-2); color: var(--text-muted); }
.m-pie { margin-top: var(--space-4); font-size: 13px; color: var(--text-muted); }
.m-pie p { margin: 2px 0; }
@media (min-width: 720px) {
  .m-cols, .m-flujo { grid-template-columns: 1.25fr 22px 1fr 22px 1fr 22px 1.1fr; align-items: stretch; column-gap: 0; }
  .m-cols { display: grid; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; margin-top: var(--space-2); }
  .m-flecha::before { content: "→"; }
  .m-nodo .m-paso { display: none; }
}
