/* QUIN Flow · Panel · Manual de marca Agencia Quin
   Teal #00A89D · Negro #0D0D0D · Teal claro #4ECDC4 · Teal oscuro #007A72 · Gris #6B6B6B · Gris claro #F5F5F5
   Montserrat (alojada aquí mismo)
   Módulos (maqueta aprobada): computador = menú lateral; celular = barra abajo con los mismos cinco. */

@font-face { font-family: Montserrat; font-weight: 400; font-display: swap; src: url(fuentes/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url(fuentes/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 600; font-display: swap; src: url(fuentes/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(fuentes/montserrat-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(fuentes/montserrat-latin-800-normal.woff2) format('woff2'); }

:root {
  --teal: #00A89D; --teal-claro: #4ECDC4; --teal-oscuro: #007A72; --teal-suave: #E6F6F5;
  --negro: #0D0D0D; --gris: #6B6B6B; --gris-medio: #9A9A9A; --gris-mano: #C9C9C9; --linea: #E8E8E8; --linea-suave: #F2F2F2;
  --fondo: #F5F5F5; --blanco: #FFFFFF;
  --rojo: #C1121F; --rojo-suave: #FDECEC; --ambar: #C2410C; --ambar-suave: #FFF1E8; --verde: #15803D; --verde-suave: #EAF6EE;
  --radio: 14px; --sombra: 0 1px 2px rgba(13,13,13,.06), 0 4px 16px rgba(13,13,13,.06);
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
  --alto-tabbar: 62px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Montserrat, system-ui, sans-serif; font-size: 15px; color: var(--negro); background: var(--fondo); line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; }
a { color: inherit; }

/* ── Íconos (máscaras SVG, color = currentColor) ── */
.ico, .icono-btn::before, .buscar-icono, .btn-wa::before, .mano::before, .lapiz::before {
  display: inline-block; width: 20px; height: 20px; background: currentColor; flex: none;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
:root {
  --i-cerrar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
  --i-buscar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
  --i-sonido: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9H4z'/%3E%3Cpath d='M16 9a4 4 0 010 6M18.5 6.5a8 8 0 010 11'/%3E%3C/svg%3E");
  --i-mudo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9H4z'/%3E%3Cpath d='M17 9l5 5M22 9l-5 5'/%3E%3C/svg%3E");
  --i-wa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 00-8.6 15.1L2 22l5-1.3A10 10 0 1012 2zm0 18.2a8.2 8.2 0 01-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1112 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.7.8-.8 1-.3.2-.5.1a6.7 6.7 0 01-3.3-2.9c-.2-.4.3-.4.7-1.2.1-.1 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 00-.7.3 3 3 0 00-.9 2.2 5.2 5.2 0 001.1 2.8 11.9 11.9 0 004.6 4c1.7.7 2.3.8 3.2.7a2.7 2.7 0 001.8-1.3 2.2 2.2 0 00.1-1.3c0-.1-.2-.2-.4-.3z'/%3E%3C/svg%3E");
  --i-alerta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3l10 18H2L12 3z'/%3E%3Cpath d='M12 10v5M12 18v.5'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
  --i-pedidos: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12l1 4H5l1-4z'/%3E%3Cpath d='M5 7h14v13a1 1 0 01-1 1H6a1 1 0 01-1-1V7z'/%3E%3Cpath d='M9 11a3 3 0 006 0'/%3E%3C/svg%3E");
  --i-embudos: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18M6 10h12M9 15h6'/%3E%3Ccircle cx='12' cy='20' r='1.2' fill='black'/%3E%3C/svg%3E");
  --i-productos: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3l-5 3 2 4 2-1v12h10V9l2 1 2-4-5-3c0 1.7-1.8 3-4 3S8 4.7 8 3z'/%3E%3C/svg%3E");
  --i-resultados: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E");
  --i-ajustes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 11-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 110-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 114 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 110 4h-.1a1.7 1.7 0 00-1.5 1z'/%3E%3C/svg%3E");
  --i-editar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16v4z'/%3E%3C/svg%3E");
  --i-duplicar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V5a1 1 0 00-1-1H5a1 1 0 00-1 1v10a1 1 0 001 1h3'/%3E%3C/svg%3E");
  --i-ver: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  --i-mas: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --i-mano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='9' cy='6' r='1.6'/%3E%3Ccircle cx='15' cy='6' r='1.6'/%3E%3Ccircle cx='9' cy='12' r='1.6'/%3E%3Ccircle cx='15' cy='12' r='1.6'/%3E%3Ccircle cx='9' cy='18' r='1.6'/%3E%3Ccircle cx='15' cy='18' r='1.6'/%3E%3C/svg%3E");
}
.i-pedidos { --i: var(--i-pedidos); } .i-embudos { --i: var(--i-embudos); } .i-productos { --i: var(--i-productos); }
.i-resultados { --i: var(--i-resultados); } .i-ajustes { --i: var(--i-ajustes); } .i-mas { --i: var(--i-mas); }
.i-editar { --i: var(--i-editar); } .i-duplicar { --i: var(--i-duplicar); } .i-ver { --i: var(--i-ver); }

.icono-btn { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: inherit; flex: none; }
.icono-btn:hover { background: rgba(255,255,255,.08); }
.icono-btn::before { content: ''; width: 22px; height: 22px; }
.icono-cerrar::before { --i: var(--i-cerrar); }
.btn-sonido::before { --i: var(--i-mudo); }
.btn-sonido[aria-pressed="true"]::before { --i: var(--i-sonido); color: var(--teal-claro); }
.icono-caja { width: 38px; height: 38px; background: var(--blanco); border: 1px solid var(--linea); color: var(--negro); }
.icono-caja:hover { background: var(--blanco); border-color: var(--teal); }
.icono-caja::before { width: 20px; height: 20px; }
.icono-caja.btn-sonido[aria-pressed="true"]::before { color: var(--teal); }

/* ── Botones y campos ── */
.btn { border: 1px solid transparent; border-radius: 10px; padding: 10px 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; white-space: nowrap; text-decoration: none; }
.btn .ico { width: 16px; height: 16px; }
.btn-primario { background: var(--teal); color: var(--blanco); font-weight: 700; }
.btn-primario:hover { background: var(--teal-oscuro); }
.btn-oscuro { background: var(--negro); color: var(--blanco); }
.btn-claro { background: var(--blanco); border-color: var(--linea); color: var(--negro); }
.btn-claro:hover { border-color: var(--teal); }
.btn-bloque { width: 100%; }
.btn-chico { padding: 7px 10px; font-size: 12px; min-height: 34px; font-weight: 700; }
.btn:disabled { opacity: .5; cursor: default; }
.apagado, .apagado:hover { opacity: .5; cursor: not-allowed; border-color: var(--linea); }
.btn-primario.apagado:hover { background: var(--teal); }
.btn-wa { background: var(--teal); color: var(--blanco); }
.btn-wa::before { content: ''; --i: var(--i-wa); }
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo > span { font-size: 13px; font-weight: 600; color: var(--gris); }
.campo input, .campo select, .campo textarea { width: 100%; border: 1px solid var(--linea); border-radius: 10px; padding: 11px 12px; background: var(--blanco); min-height: 44px; }
.campo input[type="color"] { padding: 3px; width: 64px; }
.campo textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.aviso { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.aviso-error { background: var(--rojo-suave); color: var(--rojo); }
.aviso-info { background: var(--teal-suave); color: var(--teal-oscuro); }

/* ── Entrada ── */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--blanco); }
.login-caja { width: 100%; max-width: 360px; }
.login-logo { display: block; margin: 0 auto 10px; height: auto; }
.login-titulo { text-align: center; font-weight: 800; font-size: 28px; letter-spacing: .5px; }
.login-titulo span { color: var(--teal); }
.login-sub { text-align: center; color: var(--gris); margin: 4px 0 24px; }

/* ── Marca QUIN Flow ── */
.marca { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.marca-texto { font-size: 16px; }
.marca-texto b { font-weight: 800; color: var(--blanco); }
.marca-texto i { font-style: normal; font-weight: 500; color: var(--teal-claro); }

/* ── Menú lateral (computador) ── */
.lateral { display: none; }
.lateral-nav { display: grid; gap: 4px; flex: 1; align-content: start; }
.nav { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--gris-mano); font-weight: 600; font-size: 14px; text-decoration: none; }
.nav > span:not(.ico) { flex: 1; }
.nav:hover { background: #161616; color: var(--blanco); }
.nav[aria-current="page"] { background: #1C1C1C; color: var(--blanco); box-shadow: inset 3px 0 0 var(--teal); }
.nav[aria-current="page"] .ico { color: var(--teal-claro); }
.insignia { background: var(--teal); color: var(--blanco); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; line-height: 1.4; }
.yo { display: flex; gap: 10px; align-items: center; padding: 10px; border: 0; border-top: 1px solid #222; background: none; color: var(--blanco); text-align: left; cursor: pointer; width: 100%; border-radius: 0; }
.yo:hover { background: #161616; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; font-weight: 800; flex: none; }
.yo-texto { display: grid; min-width: 0; }
.yo-texto b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yo-texto small { color: var(--gris-medio); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Barra superior (celular) ── */
.barra { position: sticky; top: 0; z-index: 20; background: var(--negro); color: var(--blanco); display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 8px 14px; }
.barra .marca { flex: 1; }
.en-vivo { font-size: 11px; color: var(--gris-medio); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.en-vivo i { width: 7px; height: 7px; border-radius: 50%; background: var(--gris-medio); }
.en-vivo.si i { background: var(--teal-claro); box-shadow: 0 0 0 3px rgba(78,205,196,.25); }
.en-vivo.si { color: var(--teal-claro); }
.en-vivo.no { color: #F59E0B; } .en-vivo.no i { background: #F59E0B; }

/* ── Barra inferior (celular) ── */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--blanco); border-top: 1px solid var(--linea); display: grid; grid-template-columns: repeat(5, 1fr); min-height: calc(var(--alto-tabbar) + var(--seguro-abajo)); padding: 6px 2px calc(6px + var(--seguro-abajo)); }
.tbi { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--gris-medio); font-size: 10.5px; font-weight: 600; text-decoration: none; position: relative; min-width: 0; }
.tbi .ico { width: 22px; height: 22px; }
.tbi[aria-current="page"] { color: var(--teal); }
.tbi .insignia { position: absolute; top: -2px; left: calc(50% + 4px); font-size: 9.5px; padding: 0 5px; }

/* ── Contenido y cabeza de cada módulo ── */
.contenido { padding-bottom: calc(var(--alto-tabbar) + var(--seguro-abajo) + 16px); min-width: 0; }
.cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px 8px; }
.cabeza h1 { font-size: 20px; font-weight: 800; }
.cabeza p { margin: 3px 0 0; color: var(--gris); font-size: 13px; }
.cabeza-acc { display: flex; gap: 10px; align-items: center; }
.cabeza .en-vivo { font-size: 12px; }
.cabeza .en-vivo.si { color: var(--teal-oscuro); } .cabeza .en-vivo.si i { background: var(--teal); box-shadow: 0 0 0 3px rgba(0,168,157,.2); }
.volver { border: 0; background: none; padding: 0; color: var(--teal-oscuro); font-weight: 700; font-size: 13px; cursor: pointer; margin-bottom: 4px; }
@media (max-width: 1023.98px) { .solo-pc { display: none !important; } }

/* ── Chips de estado ── */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px 4px; scrollbar-width: none; background: var(--fondo); position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 10; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--linea); background: var(--blanco); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; white-space: nowrap; }
.chip b { font-weight: 700; color: var(--gris); }
.chip[aria-pressed="true"] { background: var(--negro); border-color: var(--negro); color: var(--blanco); }
.chip[aria-pressed="true"] b { color: var(--teal-claro); }
.punto { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ── Herramientas ── */
.herramientas { display: flex; gap: 8px; padding: 8px 14px; }
.buscar { flex: 1; position: relative; }
.buscar input { width: 100%; border: 1px solid var(--linea); border-radius: 10px; padding: 10px 12px 10px 38px; background: var(--blanco); min-height: 42px; }
.buscar-icono { position: absolute; left: 12px; top: 11px; --i: var(--i-buscar); color: var(--gris-medio); }
.contador { background: var(--teal); color: var(--blanco); border-radius: 999px; font-size: 11px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
.resumen { padding: 0 14px 6px; font-size: 13px; color: var(--gris); display: flex; justify-content: space-between; gap: 8px; }
.resumen button { border: 0; background: none; color: var(--teal-oscuro); font-weight: 700; cursor: pointer; padding: 0; }
.chips, .herramientas, .resumen { max-width: 900px; margin-left: auto; margin-right: auto; }

/* ── Pedidos: piezas comunes ── */
.pedido { cursor: pointer; position: relative; }
.pedido.nuevo-llegado { animation: llegada 1.6s ease-out; }
@keyframes llegada { from { background: var(--teal-suave); } to { background: var(--blanco); } }
.pedido.seleccionado { outline: 2px solid var(--teal); outline-offset: -2px; }
.wa-btn { width: 46px; height: 46px; border-radius: 12px; border: 0; background: var(--teal); color: var(--blanco); display: grid; place-items: center; cursor: pointer; align-self: start; }
.wa-btn .ico { --i: var(--i-wa); width: 24px; height: 24px; }
.wa-btn.hecho { background: var(--teal-suave); color: var(--teal-oscuro); }
.wa-btn:disabled { background: var(--linea); color: var(--gris-medio); cursor: not-allowed; }
.sel-caja { width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--linea); background: var(--blanco); display: grid; place-items: center; }
.sel-caja .ico { --i: var(--i-check); color: var(--blanco); width: 22px; height: 22px; }
.pedido.seleccionado .sel-caja { background: var(--teal); border-color: var(--teal); }
.estado { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px; color: var(--blanco); background: var(--c, var(--gris)); white-space: nowrap; }
.etiqueta { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 8px; color: var(--c, var(--gris)); background: var(--blanco); border: 1px solid var(--c, var(--linea)); white-space: nowrap; }
.origen { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 8px; background: var(--fondo); color: var(--negro); white-space: nowrap; }
.origen-facebook { background: #E8EEF9; color: #1D4ED8; } .origen-instagram { background: #FBE9F2; color: #A21C5B; }
.origen-tiktok { background: var(--negro); color: var(--blanco); } .origen-desconocido { color: var(--gris-medio); }
.embudo-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--teal-oscuro); background: var(--teal-suave); border-radius: 6px; padding: 2px 7px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.embudo-pill .ico { width: 13px; height: 13px; }
.alerta { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 8px; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.alerta::before { content: ''; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--i-alerta) center/contain no-repeat; mask: var(--i-alerta) center/contain no-repeat; }
.alerta-roja { background: var(--rojo-suave); color: var(--rojo); }
.alerta-ambar { background: var(--ambar-suave); color: var(--ambar); }
.vacio { text-align: center; color: var(--gris); padding: 40px 20px; }

/* ── Pedidos en celular: tarjetas ── */
.lista { display: grid; gap: 10px; padding: 4px 14px 120px; max-width: 900px; margin: 0 auto; }
.tarjeta { background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px; border-left: 4px solid var(--c, var(--linea)); }
.p-cuerpo { min-width: 0; display: grid; gap: 3px; }
.p-fila { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.p-nombre { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-total { font-weight: 800; white-space: nowrap; }
.p-total.falta { color: var(--rojo); font-weight: 600; font-size: 13px; }
.p-meta { font-size: 13px; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-producto { font-size: 13.5px; font-weight: 700; }
.p-tallas { font-size: 12.5px; color: var(--gris); }
.p-pie { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }

/* ── Pedidos en computador: una fila con columnas ── */
.tabla { background: var(--blanco); border-radius: 12px; box-shadow: var(--sombra); overflow: hidden; }
.th, .renglon { display: grid; grid-template-columns: 50px 1.1fr 1.55fr 1fr 1fr 120px; gap: 14px; align-items: center; padding: 11px 14px; }
.th { background: #FAFAFA; border-bottom: 1px solid var(--linea); font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gris); padding: 9px 14px 9px 18px; }
.renglon { border-bottom: 1px solid #F0F0F0; border-left: 4px solid var(--c, var(--linea)); background: var(--blanco); }
.renglon:last-child { border-bottom: 0; }
.renglon:hover { background: #FAFAFA; }
.renglon .wa-btn, .renglon .sel-caja { width: 40px; height: 40px; border-radius: 11px; align-self: center; }
.renglon .wa-btn .ico { width: 22px; height: 22px; }
.td { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; justify-items: start; }
.t1 { font-size: 13.5px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t1.falta { color: var(--rojo); font-weight: 600; font-size: 12.5px; }
.t1-producto { font-size: 12.5px; white-space: normal; }
.t2 { font-size: 12px; color: var(--gris); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t3 { font-size: 11px; color: var(--gris-medio); }
.fin { text-align: right; justify-items: end; }
.fila-pills { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; max-width: 100%; }
.renglon .estado, .renglon .etiqueta, .renglon .origen, .renglon .alerta, .renglon .embudo-pill { font-size: 10.5px; }
.renglon .origen, .renglon .etiqueta, .renglon .embudo-pill { border-radius: 5px; }

/* ── Embudos ── */
.grid-embudos { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 4px 14px 24px; }
.emb { background: var(--blanco); border-radius: var(--radio); border: 1px solid var(--linea); display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 12px; }
.mini { background: var(--fondo); border-radius: 12px; padding: 8px; display: grid; gap: 5px; justify-items: center; align-content: start; border: 1px solid #EEE; }
.mini-foto { width: 100%; height: 70px; border-radius: 8px; background: var(--c, var(--linea)); }
.mini-titulo { font-size: 10px; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.mini-estrellas { font-size: 8px; color: #F59E0B; letter-spacing: 1px; }
.mini-precio { font-size: 10px; font-weight: 700; }
.mini-btn { width: 100%; background: var(--teal); color: var(--blanco); font-size: 8.5px; font-weight: 700; text-align: center; border-radius: 5px; padding: 4px; }
.emb-cuerpo { display: grid; gap: 8px; align-content: start; min-width: 0; }
.emb-fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.emb-fila b { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publicado { font-size: 11px; font-weight: 700; color: var(--verde); background: var(--verde-suave); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.publicado.borrador { color: var(--gris); background: #F0F0F0; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: #FAFAFA; border-radius: 10px; padding: 9px; }
.kpis b { font-size: 15px; font-weight: 800; display: block; white-space: nowrap; }
.kpis small { font-size: 10.5px; color: var(--gris); }
.emb-acc { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Próximamente (Productos, Resultados) ── */
.pronto { margin: 8px 14px; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); padding: 36px 20px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.pronto-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--teal-suave); color: var(--teal-oscuro); display: grid; place-items: center; }
.pronto-ico .ico { width: 26px; height: 26px; }
.pronto b { font-size: 17px; font-weight: 800; }
.pronto p { margin: 0; color: var(--gris); font-size: 13.5px; max-width: 420px; }

/* ── Ajustes ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #E0E0E0; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 13px; color: var(--gris); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; border-radius: 0; }
.tab:hover { color: var(--negro); }
.tab[aria-selected="true"] { color: var(--negro); border-bottom-color: var(--teal); }
.dos-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.card { background: var(--blanco); border-radius: var(--radio); border: 1px solid var(--linea); padding: 6px 0 8px; }
.card-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 16px 10px; }
.card-cabeza h3 { font-size: 16px; font-weight: 800; }
.card-cabeza p { margin: 3px 0 0; font-size: 12px; color: var(--gris); }
.card-cuerpo { padding: 10px 16px 8px; }
.ed { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 10px; border-top: 1px solid var(--linea-suave); font-size: 13.5px; background: var(--blanco); }
.ed > b { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mano { border: 0; background: none; padding: 0; width: 26px; height: 30px; display: grid; place-items: center; color: var(--gris-mano); cursor: grab; touch-action: none; flex: none; border-radius: 6px; }
.mano::before { content: ''; --i: var(--i-mano); width: 16px; height: 16px; }
.mano:hover { color: var(--gris); }
.arrastrando { background: var(--teal-suave); box-shadow: 0 6px 18px rgba(13,13,13,.14); position: relative; z-index: 2; }
.arrastrando .mano { cursor: grabbing; }
.col-p { width: 16px; height: 16px; border-radius: 5px; flex: none; background: var(--c, var(--linea)); }
.cnt { font-size: 12px; color: var(--gris-medio); white-space: nowrap; }
.ins { font-size: 10.5px; font-weight: 700; color: var(--verde); background: var(--verde-suave); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.lapiz { border: 0; background: none; width: 30px; height: 30px; display: grid; place-items: center; color: var(--gris); cursor: pointer; border-radius: 8px; flex: none; }
.lapiz::before { content: ''; --i: var(--i-editar); width: 16px; height: 16px; }
.lapiz:hover { background: var(--fondo); color: var(--negro); }
.menu-aj { margin: 6px 14px 12px; background: var(--blanco); border-radius: var(--radio); border: 1px solid var(--linea); overflow: hidden; }
.ma { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-top: 1px solid var(--linea-suave); width: 100%; background: var(--blanco); text-align: left; cursor: pointer; text-decoration: none; }
.menu-aj > .ma:first-child, .menu-aj > div:first-child > .ma:first-child { border-top: 0; }
.ma-texto { flex: 1; display: grid; min-width: 0; }
.ma-texto b { font-size: 14px; }
.ma-texto small { color: var(--gris); font-size: 12px; }
.flecha { color: var(--gris-mano); font-size: 22px; line-height: 1; }
.ma-salir .ma-texto b { color: var(--rojo); }
.nuevo-fila { display: flex; gap: 6px; align-items: center; justify-content: center; color: var(--teal-oscuro); font-weight: 700; padding: 12px; border: 0; border-top: 1px solid var(--linea-suave); background: var(--blanco); width: 100%; cursor: pointer; }
.nuevo-fila .ico { width: 16px; height: 16px; }
.caja-aj { margin: 6px 14px 12px; }
.lista-datos { display: grid; gap: 0; }
.dato-fila { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--linea-suave); font-size: 13.5px; }
.dato-fila:first-child { border-top: 0; }
.dato-fila b { font-weight: 700; }
.dato-fila span { color: var(--gris); font-size: 12.5px; overflow-wrap: anywhere; }

/* ── Selección múltiple ── */
.barra-seleccion { position: fixed; left: 0; right: 0; bottom: calc(var(--alto-tabbar) + var(--seguro-abajo)); z-index: 30; background: var(--negro); color: var(--blanco); display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; }
.barra-seleccion span { flex: 1; font-weight: 600; }

/* ── Hoja inferior ── */
.velo { position: fixed; inset: 0; background: rgba(13,13,13,.45); z-index: 40; }
.hoja { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; background: var(--blanco); border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: subir .2s ease-out; }
@keyframes subir { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.hoja-cabeza { display: flex; align-items: center; gap: 8px; padding: 14px 10px 10px 18px; border-bottom: 1px solid var(--linea); }
.hoja-cabeza h2 { flex: 1; font-size: 17px; font-weight: 800; }
.hoja-cuerpo { overflow-y: auto; padding: 16px 18px calc(24px + var(--seguro-abajo)); }
@media (min-width: 720px) {
  .hoja { left: auto; top: 0; width: 460px; max-height: none; border-radius: 0; animation: lado .2s ease-out; }
  @keyframes lado { from { transform: translateX(30px); } to { transform: none; } }
}
.bloque { margin-bottom: 20px; }
.bloque h3 { font-size: 12px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 0; }
.datos dt { color: var(--gris); }
.datos dd { margin: 0; font-weight: 600; word-break: break-word; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion { border: 1px solid var(--linea); background: var(--blanco); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.opcion[aria-pressed="true"] { background: var(--c, var(--negro)); border-color: var(--c, var(--negro)); color: var(--blanco); }
.historial { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.historial li { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.historial time { color: var(--gris); }
.historial small { color: var(--gris); display: block; }
.menu-lista { display: grid; gap: 6px; }
.menu-lista button { text-align: left; justify-content: flex-start; }
.ayuda { font-size: 12.5px; color: var(--gris); margin: -6px 0 12px; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Aviso flotante ── */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--alto-tabbar) + 16px + var(--seguro-abajo)); z-index: 60; background: var(--negro); color: var(--blanco); padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--sombra); max-width: calc(100% - 32px); }
.toast.error { background: var(--rojo); }

/* ════════ Computador: menú lateral fijo, cada pedido es una fila con columnas ════════ */
@media (min-width: 1024px) {
  body { font-size: 14px; }
  .app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
  .lateral { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; background: var(--negro); color: var(--blanco); padding: 18px 12px; }
  .lateral .marca { padding: 0 6px; }
  .lateral .marca-texto { font-size: 19px; }
  .barra, .tabbar { display: none; }
  .contenido { padding: 22px 26px 40px; }
  .modulo { max-width: 1240px; margin: 0 auto; }
  .cabeza { padding: 0; margin-bottom: 14px; }
  .cabeza h1 { font-size: 24px; }
  .chips { position: static; padding: 2px 0 10px; background: none; max-width: none; }
  .chip { font-size: 12.5px; padding: 6px 12px; }
  .herramientas { padding: 0; margin-bottom: 8px; max-width: none; }
  .herramientas .btn { font-weight: 700; font-size: 13px; }
  .resumen { padding: 0; margin-bottom: 8px; font-size: 12px; max-width: none; }
  .lista { max-width: none; padding: 0; gap: 0; margin-bottom: 40px; }
  .lista.tarjetas { gap: 10px; }
  .grid-embudos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0; }
  .emb { grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 14px; }
  .chips { flex-wrap: wrap; overflow: visible; }
  body.con-seleccion .toast { bottom: 84px; }
  .mini-foto { height: 78px; }
  .pronto { margin: 0; }
  .barra-seleccion { left: 220px; bottom: 0; padding-bottom: 10px; }
  .toast { bottom: 24px; left: calc(50% + 110px); }
}
@media (min-width: 1024px) and (hover: hover) {
  .tarjeta { transition: box-shadow .15s, transform .15s; }
  .tarjeta:hover { box-shadow: 0 2px 4px rgba(13,13,13,.08), 0 10px 28px rgba(13,13,13,.10); transform: translateY(-1px); }
}
@media (max-width: 760px) { .dos-col { grid-template-columns: 1fr; } }
.btn-exportar-cel { margin-top: 14px; }
.ayuda-cel { margin: -2px 16px 10px; }
/* Embudos en celular: vista previa a la izquierda; números y botones a todo el ancho */
@media (max-width: 1023.98px) {
  .emb { grid-template-columns: 84px minmax(0, 1fr); row-gap: 8px; }
  .emb-cuerpo { display: contents; }
  .mini { grid-row: 1 / span 3; }
  .mini-foto { height: 52px; }
  .emb-fila, .emb-cuerpo > .t2 { grid-column: 2; }
  .kpis, .emb-acc { grid-column: 1 / -1; }
}

/* Ajustes tras la revisión visual */
.emb-fila .publicado { flex: none; }
.kpis small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.renglon .etiqueta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fila-pills > * { min-width: 0; }
.embudo-pill { min-width: 0; }
.recorta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
body.con-seleccion .toast { bottom: calc(var(--alto-tabbar) + var(--seguro-abajo) + 78px); }
@media (min-width: 1024px) { body.con-seleccion .toast { bottom: 84px; } }
/* Zonas táctiles de al menos 40 px en celular */
@media (max-width: 1023.98px) {
  .resumen button { padding: 11px 0 11px 12px; margin: -11px 0; }
  .volver { padding: 11px 12px 11px 0; margin: -11px 0 -7px; }
  .ma .mano, .ed .mano { width: 40px; height: 40px; }
  .btn-chico { min-height: 40px; }
  .chip { min-height: 38px; }
}
.renglon .alerta { white-space: normal; }   /* en pantallas de 1024 px el aviso baja de línea en vez de cortarse */
