/* CRM Outlet de Cascos — diseño propio de Flouxia.
   Asfalto (menú), naranja visor (acción), amarillo reflectivo (alertas), fondo gris cálido. */
:root {
  --asfalto: #14161a;
  --asfalto-2: #1e2127;
  --asfalto-3: #2b2f37;
  --naranja: #f26b1d;
  --naranja-oscuro: #d2560e;
  --naranja-suave: #fff0e6;
  --amarillo: #ffc531;
  --fondo: #f3f2ef;
  --papel: #ffffff;
  --linea: #e4e1dc;
  --texto: #1c1d21;
  --suave: #6d6f76;
  --rojo: #d93a2b;
  --verde: #1f9d5c;
  --azul: #2d6fd6;
  --radio: 12px;
  --sombra: 0 1px 2px rgba(20, 22, 26, .06), 0 4px 14px rgba(20, 22, 26, .05);
  --titulos: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Barlow', system-ui, sans-serif; font-size: 15px; color: var(--texto); background: var(--fondo); line-height: 1.45; }
a { color: var(--naranja-oscuro); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--titulos); font-weight: 700; letter-spacing: .01em; margin: 0 0 .4em; line-height: 1.1; }
h1 { font-size: 30px; text-transform: uppercase; }
h2 { font-size: 20px; }
h2 small { font-family: 'Barlow', sans-serif; font-weight: 500; font-size: 13px; color: var(--suave); }
h3 { font-size: 19px; text-transform: uppercase; }
h4 { font-size: 15px; text-transform: uppercase; color: var(--suave); margin-top: 18px; }
code { background: #f0eeea; padding: 1px 5px; border-radius: 4px; font-size: 13px; word-break: break-all; }
small { font-size: 12.5px; }
.suave { color: var(--suave); }
.rojo { color: var(--rojo); }
.centro { text-align: center; }
.pad { padding: 8px; }
.crecer { flex: 1; min-width: 0; }
.vacio { color: var(--suave); padding: 14px 4px; font-style: italic; }
[hidden] { display: none !important; }

/* Menú lateral */
.menu { position: fixed; inset: 0 auto 0 0; width: 236px; background: var(--asfalto); color: #cfd2d8; display: flex; flex-direction: column; z-index: 30; }
.menu::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 3px; background: repeating-linear-gradient(180deg, var(--naranja) 0 18px, transparent 18px 30px); opacity: .35; }
.marca { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; color: #fff; text-decoration: none !important; }
.marca span { display: flex; flex-direction: column; font-family: var(--titulos); line-height: .95; }
.marca b { font-size: 24px; letter-spacing: .06em; }
.marca small { font-size: 13px; letter-spacing: .22em; color: var(--naranja); font-weight: 700; }
.menu nav { flex: 1; overflow-y: auto; padding: 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.menu nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: #cfd2d8; font-weight: 500; text-decoration: none; }
.menu nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.menu nav a:hover { background: var(--asfalto-2); color: #fff; }
.menu nav a.activo { background: var(--naranja); color: #fff; }
.menu nav a .globo { margin-left: auto; }
.menu nav a.activo .globo { background: #fff; color: var(--naranja-oscuro); }
.menu-grupo { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #7d8189; padding: 16px 10px 6px; }
.menu-pie { padding: 14px 18px; border-top: 1px solid var(--asfalto-3); display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.menu-pie .enlace { background: none; border: 0; color: var(--amarillo); cursor: pointer; font: inherit; }
.menu-boton { display: none; }
.globo { background: var(--naranja); color: #fff; border-radius: 99px; font-size: 11.5px; font-weight: 700; padding: 1px 7px; min-width: 20px; text-align: center; }
.globo-suave { background: var(--asfalto-3); color: #fff; }

/* Contenido */
.contenido { margin-left: 236px; padding: 26px 32px 60px; max-width: 1400px; }
.contenido-ancho { max-width: none; }
.cabeza { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.cabeza p { margin: 0; }
.acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.franja-prueba { background: var(--amarillo); color: var(--asfalto); padding: 8px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.franja-prueba a { color: var(--asfalto); font-weight: 700; text-decoration: underline; }
.avisos { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.aviso { padding: 10px 14px; border-radius: 8px; background: #eef3fb; border-left: 4px solid var(--azul); font-size: 14px; }
.aviso-success { background: #e9f7ef; border-color: var(--verde); }
.aviso-error { background: #fdecea; border-color: var(--rojo); }
.aviso-warning { background: #fff7e0; border-color: var(--amarillo); }

/* Botones y formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border-radius: 8px; border: 1px solid var(--linea); background: var(--papel); color: var(--texto); font: 600 14px 'Barlow', sans-serif; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { border-color: #c9c5bf; background: #faf9f7; }
.btn-primario { background: var(--naranja); border-color: var(--naranja); color: #fff; }
.btn-primario:hover { background: var(--naranja-oscuro); border-color: var(--naranja-oscuro); }
.btn-peligro { color: var(--rojo); }
.btn-chico { padding: 5px 10px; font-size: 13px; }
.btn-ancho { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
input, select, textarea { font: inherit; color: inherit; padding: 8px 10px; border: 1px solid var(--linea); border-radius: 8px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(242, 107, 29, .35); border-color: var(--naranja); }
input[type=checkbox] { width: auto; accent-color: var(--naranja); }
input[type=color] { padding: 2px; height: 38px; }
.campo { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-weight: 600; font-size: 13.5px; }
.campo > span { color: #45474d; }
.campo-check { flex-direction: row; align-items: center; gap: 8px; }
.campo .ayuda { font-weight: 400; color: var(--suave); }
.campo .error { color: var(--rojo); font-weight: 500; }
.con-error input, .con-error select, .con-error textarea { border-color: var(--rojo); }
.rejilla-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.rejilla-campos .campo:has(textarea) { grid-column: 1 / -1; }
.form-angosto { max-width: 720px; }
.en-linea { display: flex; gap: 6px; align-items: center; }
.en-linea input { width: auto; }
.botones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.corto { width: 70px; } .medio { width: 130px; }
.buscador { margin-bottom: 14px; max-width: 420px; }

/* Tarjetas, cifras, tablas */
.tarjeta { background: var(--papel); border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px 20px; margin-bottom: 18px; }
.sin-relleno { padding: 0; overflow-x: auto; }
.tarjeta-fila { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tarjeta-fila > div:first-child { flex: 1; min-width: 220px; }
.rejilla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.rejilla-2 > .tarjeta { margin-bottom: 0; }
.rejilla-2 + .rejilla-2, .rejilla-2 + .tarjeta, .cifras + .rejilla-2 { margin-top: 18px; }
.rejilla-2 { margin-bottom: 18px; }
.cifras { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.cifras-3 { grid-template-columns: repeat(3, 1fr); }
.cifra { background: var(--papel); border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px 18px; display: flex; flex-direction: column; color: var(--texto); text-decoration: none !important; border-top: 3px solid transparent; }
a.cifra:hover { border-top-color: var(--naranja); }
.cifra-numero { font-family: var(--titulos); font-size: 34px; font-weight: 700; line-height: 1; }
.cifra-nombre { color: var(--suave); font-size: 13.5px; margin-top: 6px; }
.cifra-alerta { background: var(--asfalto); color: #fff; border-top-color: var(--amarillo); }
.cifra-alerta .cifra-numero { color: var(--amarillo); }
.cifra-alerta .cifra-nombre { color: #c5c8ce; }
.cifra-destacada { background: var(--naranja); color: #fff; }
.cifra-destacada .cifra-nombre { color: #ffe3d1; }
.mini-cifras { display: flex; gap: 24px; }
.mini-cifras div { display: flex; flex-direction: column; }
.mini-cifras b { font-family: var(--titulos); font-size: 28px; }
.mini-cifras span { font-size: 12.5px; color: var(--suave); max-width: 120px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.sin-corte { white-space: nowrap; }
.tabla td { padding: 10px 12px; border-bottom: 1px solid #f0eeea; vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .num { text-align: right; white-space: nowrap; }
.tabla tfoot td { font-weight: 600; }
.fila-total td { font-size: 17px; }
.fila-clic { cursor: pointer; }
.fila-clic:hover td { background: #faf8f5; }
.apagada { opacity: .55; }
.acciones-fila { display: flex; gap: 6px; justify-content: flex-end; }
.lista-simple { list-style: none; padding: 0; margin: 0; }
.lista-simple li { padding: 7px 0; border-bottom: 1px solid #f0eeea; }
.lista-simple li:last-child { border-bottom: 0; }
.nota-pie { color: var(--suave); font-size: 13.5px; margin: 10px 0 0; }
.enlace-mas { display: inline-block; margin-top: 10px; font-weight: 600; }
.paginas { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 14px; }
.pestanas { display: flex; gap: 4px; flex-wrap: wrap; }
.pestanas button, .pestanas a { border: 0; background: transparent; padding: 6px 10px; border-radius: 99px; font: 600 13px 'Barlow', sans-serif; color: var(--suave); cursor: pointer; text-decoration: none; }
.pestanas .activa { background: var(--asfalto); color: #fff; }
.pestanas-grandes { margin-bottom: 12px; }
.pestanas-grandes a { font-size: 14px; padding: 7px 14px; background: var(--papel); }
.pestanas-grandes a small { color: inherit; opacity: .7; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--color); margin-right: 7px; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: #eceae6; color: #4a4c52; }
.chip-anuncio { background: #ecebff; color: #4b44c8; }
.chip-espera { background: #fff4d6; color: #8a6200; }
.chip-urgente { background: #fde3df; color: var(--rojo); }
.chip-linea { white-space: nowrap; display: inline-block; font-size: 11.5px; font-weight: 600; padding: 0 7px; border-radius: 99px; border: 1px solid var(--color); color: var(--texto); background: color-mix(in srgb, var(--color) 12%, white); }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--color, var(--naranja)) 22%, white); color: color-mix(in srgb, var(--color, var(--naranja)) 75%, black); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* Etapas */
.etapa { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; }
.etapa-nuevo, .fondo-nuevo { background: #e7eefb; color: #2453a3; }
.etapa-cotizado, .fondo-cotizado { background: #fff1cc; color: #8a6200; }
.etapa-interesado, .fondo-interesado { background: #ffe4d1; color: #b44a0c; }
.etapa-pedido, .fondo-pedido { background: #efe4fb; color: #6a35a8; }
.etapa-pagado, .fondo-pagado { background: #dcf3e6; color: #17784a; }
.etapa-enviado, .fondo-enviado { background: #d9f0f3; color: #12707c; }
.etapa-ganado { background: #1f9d5c; color: #fff; }
.etapa-perdido { background: #e9e7e4; color: #6d6f76; }
.fondo-nuevo { background: #6b97e0; } .fondo-cotizado { background: #f0b72f; } .fondo-interesado { background: var(--naranja); }
.fondo-pedido { background: #9a6ad6; } .fondo-pagado { background: #2fae6b; } .fondo-enviado { background: #2aa3b3; }
.borde-nuevo { border-color: #6b97e0 !important; } .borde-cotizado { border-color: #f0b72f !important; } .borde-interesado { border-color: var(--naranja) !important; }
.borde-pedido { border-color: #9a6ad6 !important; } .borde-pagado { border-color: #2fae6b !important; } .borde-enviado { border-color: #2aa3b3 !important; }
.borde-ganado { border-color: var(--verde) !important; } .borde-perdido { border-color: #b9b6b1 !important; }
.estado-pedido { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.estado-pedido.estado-por_pagar { background: #fff1cc; color: #8a6200; }
.estado-pedido.estado-pagado { background: #dcf3e6; color: #17784a; }
.estado-pedido.estado-enviado { background: #d9f0f3; color: #12707c; }
.estado-pedido.estado-entregado { background: var(--verde); color: #fff; }
.estado-pedido.estado-anulado { background: #eee; color: #888; text-decoration: line-through; }

/* Tablero */
.barras-embudo { display: flex; flex-direction: column; gap: 8px; }
.fila-embudo { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 10px; color: var(--texto); text-decoration: none !important; }
.fila-embudo-barra { background: #f2f0ec; border-radius: 6px; height: 22px; overflow: hidden; }
.fila-embudo-barra i { display: block; height: 100%; border-radius: 6px; min-width: 4px; }
.fila-embudo b { text-align: right; font-family: var(--titulos); font-size: 20px; }
.fila-chat-mini { display: flex; align-items: center; gap: 10px; color: var(--texto); text-decoration: none !important; }
.fila-chat-mini small { display: block; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.espera { font-size: 12.5px; font-weight: 700; color: #8a6200; background: #fff4d6; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.espera-alta { color: #fff; background: var(--rojo); }

/* Seguimiento */
.lista-seguimiento { list-style: none; padding: 0; margin: 8px 0 0; max-height: 440px; overflow-y: auto; }
.lista-seguimiento li a { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid #f0eeea; color: var(--texto); text-decoration: none; border-radius: 6px; }
.lista-seguimiento li a:hover { background: #faf8f5; }
.lista-seguimiento small { display: block; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contador { font-family: 'Barlow', sans-serif; font-size: 13px; background: var(--asfalto); color: #fff; border-radius: 99px; padding: 1px 9px; vertical-align: middle; }
.icono-titulo { font-size: 14px; vertical-align: middle; }
.icono-titulo.naranja { color: var(--naranja); } .icono-titulo.azul { color: var(--azul); } .icono-titulo.verde { color: var(--verde); }
.fecha-paso { font-size: 12.5px; font-weight: 600; white-space: nowrap; }

/* Bandeja */
.contenido-bandeja { padding: 0; max-width: none; height: 100vh; display: flex; flex-direction: column; }
.contenido-bandeja .franja-prueba, .contenido-bandeja .avisos { margin: 8px 12px 0; }
.bandeja { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px 1fr 320px; }
.pantalla-bandeja:not(.con-chat) .bandeja { grid-template-columns: 340px 1fr; }
.panel-lista { border-right: 1px solid var(--linea); background: var(--papel); display: flex; flex-direction: column; min-height: 0; }
.filtros-bandeja { padding: 12px; border-bottom: 1px solid var(--linea); display: flex; flex-direction: column; gap: 8px; }
.filtros-bandeja .selects { display: flex; gap: 6px; }
.filtros-bandeja select { padding: 6px 8px; font-size: 13px; }
.lista-chats { overflow-y: auto; flex: 1; }
.item-chat { display: flex; gap: 10px; padding: 11px 12px; border-bottom: 1px solid #f2f0ec; color: var(--texto); text-decoration: none !important; border-left: 3px solid transparent; }
.item-chat:hover { background: #faf8f5; }
.item-chat.actual { background: var(--naranja-suave); border-left-color: var(--naranja); }
.item-chat-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-chat-fila { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.item-chat-fila b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-chat-fila small { color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-chat time { font-size: 12px; color: var(--suave); white-space: nowrap; }
.item-chat.no-leido b, .item-chat.no-leido small { color: var(--texto); font-weight: 700; }
.item-chat.no-leido time { color: var(--naranja-oscuro); font-weight: 700; }
.item-chat-etiquetas { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.panel-chat { display: flex; flex-direction: column; min-height: 0; background: #ebe8e3; background-image: radial-gradient(rgba(20, 22, 26, .045) 1px, transparent 1px); background-size: 18px 18px; }
.panel-vacio { align-items: center; justify-content: center; text-align: center; color: var(--suave); }
.panel-vacio p { max-width: 360px; }
.chat-cabeza { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--papel); border-bottom: 1px solid var(--linea); }
.chat-cabeza small { display: block; color: var(--suave); }
.chat-cabeza .volver { display: none; font-size: 22px; color: var(--texto); padding: 0 6px; }
.select-etapa { width: auto; font-weight: 700; font-size: 13px; padding: 5px 8px; border: 0; }
.ver-ficha { display: none; }
.mensajes { flex: 1; overflow-y: auto; padding: 18px 6%; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 68%; padding: 7px 10px 5px; border-radius: 10px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); align-self: flex-start; position: relative; word-wrap: break-word; }
.msg p { margin: 0; white-space: normal; }
.msg-sale { align-self: flex-end; background: #ffe9d9; }
.msg-celular { background: #f1ede6; }
.msg-automatico { background: #fff7dc; border: 1px dashed #e4b73a; }
.msg-historial { background: #f6f4f0; opacity: .9; }
.msg-quien { display: block; font-size: 11.5px; font-weight: 700; color: var(--naranja-oscuro); margin-bottom: 1px; }
.msg-celular .msg-quien { color: #6d6f76; }
.msg-automatico .msg-quien { color: #8a6200; }
.msg-pie { display: flex; justify-content: flex-end; gap: 6px; font-size: 11px; color: var(--suave); margin-top: 2px; }
.estado-leido { color: #2d8fd6; font-weight: 700; }
.estado-fallido { color: var(--rojo); font-weight: 700; }
.estado-prueba { color: #8a6200; }
.msg-error { display: block; font-size: 12px; color: var(--rojo); }
.msg-imagen { max-width: 260px; max-height: 300px; border-radius: 6px; display: block; margin-bottom: 4px; }
.msg-doc { display: block; padding: 8px; background: rgba(0, 0, 0, .04); border-radius: 6px; margin-bottom: 4px; }
.msg-cargando { font-style: italic; color: var(--suave); font-size: 13px; }
.msg audio { max-width: 260px; }
.ventana { font-size: 12.5px; padding: 6px 14px; text-align: center; }
.ventana-gratis { background: #dcf3e6; color: #17784a; }
.ventana-abierta { background: #eef3fb; color: #2453a3; }
.ventana-cerrada { background: #fff4d6; color: #7a5700; }
.escribir { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; background: var(--papel); }
.escribir-caja { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.escribir textarea { resize: none; max-height: 160px; }
.adjuntar { font-size: 20px; cursor: pointer; padding: 6px; }
.adjunto-nombre { font-size: 12.5px; background: var(--naranja-suave); padding: 3px 8px; border-radius: 6px; cursor: pointer; align-self: flex-start; }
.plantilla-envio { display: flex; gap: 8px; padding: 8px 12px 12px; background: var(--papel); border-top: 1px solid #f2f0ec; }
.plantilla-envio select { font-size: 13px; }
.panel-ficha { background: var(--papel); border-left: 1px solid var(--linea); overflow-y: auto; padding: 16px; position: relative; }
.panel-ficha .campo, .form-ficha label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; font-weight: 600; color: #45474d; margin-bottom: 9px; }
.form-ficha input, .form-ficha select { font-size: 14px; padding: 6px 8px; font-weight: 400; }
.panel-ficha > .btn { margin-top: 10px; }
.panel-ficha h4 { margin-top: 20px; }
.cerrar-ficha { display: none; }
.nota { background: #fff8e6; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; font-size: 14px; }
.nota p { margin: 0 0 3px; }
.nota small { color: var(--suave); }
.form-nota { display: flex; flex-direction: column; gap: 6px; }
.form-nota button { align-self: flex-start; }

/* Embudo */
.tablero-embudo { display: grid; grid-template-columns: repeat(8, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.columna { background: #e9e6e1; border-radius: var(--radio); padding: 8px; min-height: 200px; transition: background .15s; }
.columna.sobre { background: #ffe4d1; }
.columna-cabeza { display: flex; align-items: baseline; gap: 6px; padding: 6px 6px 10px; border-top: 4px solid; border-radius: 4px 4px 0 0; flex-wrap: wrap; }
.columna-cabeza b { font-family: var(--titulos); font-size: 17px; text-transform: uppercase; }
.columna-cabeza span { background: var(--papel); border-radius: 99px; font-size: 12px; font-weight: 700; padding: 0 7px; }
.columna-cabeza small { margin-left: auto; color: var(--suave); font-weight: 600; }
.columna-tarjetas { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.tarjeta-chat { background: var(--papel); border-radius: 8px; padding: 9px 10px; box-shadow: var(--sombra); color: var(--texto); text-decoration: none !important; display: flex; flex-direction: column; gap: 4px; cursor: grab; }
.tarjeta-chat.arrastrando { opacity: .4; }
.tarjeta-chat-fila { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.tarjeta-chat .valor { font-size: 13px; }
.punto-rojo { width: 9px; height: 9px; border-radius: 50%; background: var(--rojo); flex: none; }

/* Pedidos */
.pasos-pedido { display: flex; margin-bottom: 18px; background: var(--papel); border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; }
.paso { flex: 1; padding: 12px 16px; font-weight: 700; color: var(--suave); border-right: 1px solid #f0eeea; display: flex; flex-direction: column; }
.paso small { font-weight: 500; }
.paso-actual { background: var(--asfalto); color: #fff; }
.paso-actual small { color: var(--amarillo); }
.tabla-items input, .tabla-items select { padding: 6px 8px; font-size: 14px; }
.tabla-items .quitar { border: 0; background: none; font-size: 20px; color: var(--rojo); cursor: pointer; }
.total-pedido { font-size: 20px; margin: 6px 0 14px; }
.total-pedido b { font-family: var(--titulos); font-size: 30px; }

/* Líneas */
.tarjetas-lineas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.tarjeta-linea { border-top: 5px solid var(--color); margin: 0; display: flex; flex-direction: column; }
.tarjeta-linea header { display: flex; align-items: center; gap: 6px; }
.tarjeta-linea h2 { margin: 0; }
.tarjeta-linea footer { margin-top: auto; padding-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.estado-linea { font-weight: 700; margin: 10px 0 6px; }
.estado-linea.conectada { color: var(--verde); }
.estado-linea.prueba { color: #b48400; }
.datos { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.datos dt { color: var(--suave); }
.datos dd { margin: 0; }
.pasos-lista li { margin-bottom: 6px; }
details summary { cursor: pointer; font-weight: 600; margin-top: 8px; }

/* Automatización */
.explicacion ul { margin: 0; padding-left: 20px; }
.explicacion li { margin-bottom: 5px; }
.texto-regla { max-width: 320px; color: #45474d; font-size: 13.5px; }
.menu-acciones { position: relative; }
.menu-acciones summary { list-style: none; margin: 0; }
.menu-acciones summary::-webkit-details-marker { display: none; }
.menu-acciones > div { position: absolute; right: 0; top: 110%; background: var(--papel); box-shadow: 0 8px 30px rgba(0, 0, 0, .15); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 5; width: 260px; }
.menu-acciones form { display: flex; gap: 6px; }

/* Productos */
.rejilla-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.tarjeta-producto { background: var(--papel); border-radius: var(--radio); box-shadow: var(--sombra); padding: 12px; display: flex; flex-direction: column; gap: 3px; color: var(--texto); text-decoration: none !important; }
.tarjeta-producto:hover { box-shadow: 0 6px 22px rgba(20, 22, 26, .12); }
.foto-producto { position: relative; aspect-ratio: 1; background: #f2f0ec; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.foto-producto img { width: 100%; height: 100%; object-fit: cover; }
.foto-producto .sin-foto { width: 40%; height: auto; opacity: .35; }
.descuento { position: absolute; top: 8px; left: 8px; background: var(--amarillo); color: var(--asfalto); font-weight: 700; font-size: 13px; padding: 1px 7px; border-radius: 4px; }
.precio { font-family: var(--titulos); font-size: 22px; font-weight: 700; }
.precio s { font-family: 'Barlow', sans-serif; font-size: 13px; color: var(--suave); font-weight: 400; }

/* Entrar */
.pantalla-entrar { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--asfalto); position: relative; overflow: hidden; }
.entrar-fondo span { position: absolute; height: 6px; width: 140%; left: -20%; background: repeating-linear-gradient(90deg, var(--naranja) 0 60px, transparent 60px 100px); opacity: .5; transform: rotate(-12deg); }
.entrar-fondo span:nth-child(1) { top: 18%; }
.entrar-fondo span:nth-child(2) { top: 52%; opacity: .25; background: repeating-linear-gradient(90deg, var(--amarillo) 0 60px, transparent 60px 100px); }
.entrar-fondo span:nth-child(3) { top: 84%; opacity: .35; }
.entrar-caja { position: relative; background: var(--papel); border-radius: 16px; padding: 34px 32px 26px; width: min(410px, 92vw); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.marca-grande { padding: 0 0 18px; color: var(--asfalto); }
.marca-grande b { font-size: 32px; }
.marca-grande small { font-size: 16px; }
.entrar-caja h1 { font-size: 26px; margin-top: 6px; }
.form-entrar { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.form-entrar label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13.5px; }
.pie-entrar { text-align: center; color: var(--suave); font-size: 12px; margin: 18px 0 0; }

/* Celular y tableta */
@media (max-width: 1200px) {
  .bandeja { grid-template-columns: 300px 1fr; }
  .panel-ficha { position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 92vw); z-index: 40; box-shadow: -10px 0 30px rgba(0, 0, 0, .2); transform: translateX(105%); transition: transform .2s; }
  .ficha-abierta .panel-ficha { transform: none; }
  .ver-ficha, .cerrar-ficha { display: inline-flex; }
  .cerrar-ficha { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 26px; cursor: pointer; }
  .cifras { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .menu { transform: translateX(-100%); transition: transform .2s; }
  .menu-abierto .menu { transform: none; box-shadow: 10px 0 40px rgba(0, 0, 0, .3); }
  .menu-boton { display: flex; position: fixed; left: 10px; top: 10px; z-index: 35; width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--asfalto); align-items: center; justify-content: center; }
  .menu-boton svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; fill: none; }
  .menu-abierto .menu-boton { left: 246px; }
  .contenido { margin-left: 0; padding: 62px 14px 40px; }
  .contenido-bandeja { padding: 0; height: 100dvh; }
  .rejilla-2, .cifras, .cifras-3 { grid-template-columns: 1fr; }
  .cifras { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 25px; }
  .bandeja, .pantalla-bandeja:not(.con-chat) .bandeja { grid-template-columns: 1fr; }
  .panel-lista { padding-top: 56px; }
  .con-chat .panel-lista { display: none; }
  .pantalla-bandeja:not(.con-chat) .panel-chat { display: none; }
  .con-chat .menu-boton { display: none; }
  .chat-cabeza .volver { display: block; }
  .chat-cabeza { gap: 8px; padding: 8px 10px; }
  .chat-cabeza .avatar { display: none; }
  .chat-cabeza b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-cabeza small .cel { display: none; }
  .select-etapa { max-width: 112px; }
  .contenido-bandeja .franja-prueba { font-size: 12px; padding: 5px 10px; margin: 6px; }
  .con-chat .contenido-bandeja .franja-prueba { display: none; }
  .mensajes { padding: 12px 10px; }
  .msg { max-width: 86%; }
  .pasos-pedido { flex-direction: column; }
  .mini-cifras { flex-wrap: wrap; }
  .tablero-embudo { grid-template-columns: repeat(8, 240px); }
}
