/* Componentes de venta (dueño: Diseño, capa 4). Solo tokens. Medidas de Diseño §3.9, §3.10, §5.4 y §5.6 bis. */
.num, .lt-valor, .cot-total, .prod-precio, .cant-valor { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.ok-texto { color: var(--ok-text); }
.enlace { color: var(--accent-text); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

/* Etiqueta de estado (§2.4 bis): tono + ícono + nombre; el color nunca va solo. */
.tag-estado { white-space: nowrap; flex: none; }
.tag-estado.t-warn { background: var(--warn-soft); color: var(--warn-text); }
.tag-estado.t-info { background: var(--info-soft); color: var(--info-text); }
.tag-estado.t-ok { background: var(--ok-soft); color: var(--ok-text); }
.tag-estado.t-apagada { background: var(--raised); color: var(--text-3); }
.semaforo { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; line-height: 1rem; color: var(--text-2); font-weight: 500; }
.semaforo .punto { width: 8px; height: 8px; border-radius: var(--r-full); flex: none; }
.s-rojo .punto { background: var(--danger); } .s-amarillo .punto { background: var(--warn); } .s-verde .punto { background: var(--ok); }

/* Tarjeta de cotización en el chat (§3.10) */
.cot { width: 100%; max-width: 320px; background: var(--surface); border-radius: var(--r-card); padding: 12px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); }
.cot-cab { display: flex; align-items: center; gap: 10px; }
.cot-mini { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.sin-foto { display: inline-flex; align-items: center; justify-content: center; background: var(--raised); color: var(--text-3); }
.cot-id { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cot-estado { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.cot-estado:empty { display: none; }
.cot-saldo { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.cot-senal { color: var(--warn-text); font-weight: 500; }
.cot-lineas { display: flex; flex-direction: column; gap: 2px; font-size: 0.8125rem; line-height: 1.125rem; color: var(--text-2); }
.cot-lineas li { display: flex; gap: 8px; justify-content: space-between; }
.cot-totales { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.cot-total { font-size: 1.25rem; line-height: 1.5625rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.cot-pagada svg.ic { color: var(--ok); }
.cot-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.cot-vistas { display: inline-flex; align-items: center; gap: 4px; }

/* Fila de lista con estado y total a la derecha (P-25) y fila de Por entregar (P-88) */
.fila-fin { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.entrega-pie { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.entrega .enlace { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 768px) { .entrega .enlace { min-height: 24px; } }

/* Tarjeta de producto con foto (P-32) */
.rejilla-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; width: 100%; }
.prod { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); min-width: 0; }
a.prod:hover { border-color: var(--line-strong); }
.prod-foto { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--raised); display: flex; }
.prod-texto { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 12px; min-width: 0; }
.prod-nombre { font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.prod-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.prod-precio { font-weight: 600; }

/* Línea de total y selector de cantidad */
.linea-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; }
.linea-total + .linea-total { border-top: 1px solid var(--line); }
.lt-etiqueta { display: flex; flex-direction: column; color: var(--text-2); }
.linea-total.fuerte .lt-etiqueta { color: var(--text-1); font-weight: 600; }
.linea-total.fuerte .lt-valor { font-size: 1.25rem; line-height: 1.5625rem; font-weight: 600; }
.cant { display: inline-flex; align-items: center; gap: 4px; background: var(--raised); border-radius: var(--r-control); border: 1px solid var(--line-strong); padding: 0 2px; }
.cant-valor { min-width: 32px; text-align: center; font-weight: 600; }
.cant-btn[disabled] { opacity: .4; cursor: not-allowed; }

/* Visor y subir archivo */
.visor-imagen { display: flex; justify-content: center; background: var(--raised); border-radius: var(--r-card); padding: 8px; }
.visor-imagen img { max-width: 100%; max-height: 60dvh; object-fit: contain; }
.visor-archivo { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--raised); border-radius: var(--r-card); min-width: 0; }
.visor-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.subir-zona { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-card); text-align: center; cursor: pointer; color: var(--text-2); }
.subir-zona:hover { background: var(--raised); }
.subir-lista { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.subir-item { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; min-width: 0; }

/* Solo para la muestra de pruebas (pruebas/diseno/muestras/venta.html) */
.muestra-flujo { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.muestra-flujo > .grupo-lista, .muestra-flujo > [data-total], .muestra-flujo > .linea-total, .muestra-flujo > .filtros { align-self: stretch; }
.muestra-flujo > * { max-width: 100%; } /* a 360 nada de la muestra ensancha la página (la lista de filtros medía 364 en 328) */
.muestra-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.muestra-burbuja { background: var(--bubble-out); padding: 4px; border-radius: var(--r-card); max-width: 100%; }
