:root{--bs-primary:#D32F2F;--bs-primary-rgb:211,47,47;--bs-link-color:#D32F2F;--bs-link-color-rgb:211,47,47;--bs-link-hover-color:#B71C1C;
--bs-body-font-family:"Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;--bs-body-bg:#f6f6f7}
.btn-primary{--bs-btn-bg:#D32F2F;--bs-btn-border-color:#D32F2F;--bs-btn-hover-bg:#B71C1C;--bs-btn-hover-border-color:#B71C1C;--bs-btn-active-bg:#9A1717;--bs-btn-active-border-color:#9A1717;--bs-btn-disabled-bg:#D32F2F;--bs-btn-disabled-border-color:#D32F2F}
.btn-outline-primary{--bs-btn-color:#D32F2F;--bs-btn-border-color:#D32F2F;--bs-btn-hover-bg:#D32F2F;--bs-btn-hover-border-color:#D32F2F;--bs-btn-active-bg:#B71C1C}
.nav-pills .nav-link.active,.page-link.active{background:#D32F2F}
.page-link{color:#D32F2F}
.navbar .nav-link.active{font-weight:600;border-bottom:2px solid #fff}
h1,h2,h3,h4,h5{color:#B71C1C}
.card{border:1px solid #e3e3e6;box-shadow:none}
.card-header{background:#fff;border-bottom:1px solid #e3e3e6;font-weight:600;color:#B71C1C}
.table{--bs-table-bg:#fff}
.table thead th{background:#fafafa;border-bottom:2px solid #e3e3e6;font-size:.8rem;text-transform:uppercase;color:#666}
.login-bg{background:#f6f6f7;display:flex;align-items:center;justify-content:center;min-height:100vh}
.login-card{width:100%;max-width:380px;overflow:hidden}.login-head{background:#D32F2F}
/* ---- Alerta SLA: parpadeo rojo brillante <-> rosa pálido ---- */
@keyframes pulse{0%,100%{background:#FFE4EC;color:#B0002A}50%{background:#FF1744;color:#fff}}
.alerta-sla,tr.alerta-sla>td{animation:pulse 1s ease-in-out infinite}
.alerta-sla .bi-bell-fill{animation:campana .6s ease-in-out infinite alternate}
@keyframes campana{from{transform:rotate(-18deg)}to{transform:rotate(18deg)}}
/* ---- Pipeline ---- */
body.pagina-completa{overflow:hidden}
.pipe-wrap{display:flex;flex-direction:column;height:calc(100vh - 66px)}
.chat-split{flex:1;display:flex;min-height:0;background:#fff;border:1px solid #e3e3e6;border-radius:.5rem;overflow:hidden}
.lead-list{width:340px;max-width:40%;border-right:1px solid #e3e3e6;overflow-y:auto}
.lead-item{padding:.65rem .8rem;border-bottom:1px solid #f0f0f2;cursor:pointer}
.lead-item:hover{background:#fafafa}.lead-item.activo{background:#fdecea;border-left:3px solid #D32F2F}
.lead-item .ultimo{font-size:.8rem;color:#777;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-panel{flex:1;display:flex;flex-direction:column;min-width:0}
.chat-head{padding:.6rem .9rem;border-bottom:1px solid #e3e3e6;background:#fafafa}
#mensajes{flex:1;overflow-y:auto;padding:1rem;background:#efeae2}
.msg{max-width:75%;margin-bottom:.5rem;padding:.45rem .7rem;border-radius:.6rem;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.08);white-space:pre-wrap;word-wrap:break-word}
.msg.out{margin-left:auto;background:#fde0de}.msg .hora{display:block;font-size:.68rem;color:#888;text-align:right}
.msg img{max-width:100%;border-radius:.4rem;display:block;margin-bottom:.3rem}
.composer{border-top:1px solid #e3e3e6;padding:.6rem;background:#fff;position:relative}
#sugerencias{position:absolute;bottom:100%;left:.6rem;right:.6rem;max-height:220px;overflow-y:auto;background:#fff;border:1px solid #e3e3e6;border-radius:.4rem;box-shadow:0 -4px 12px rgba(0,0,0,.08);z-index:20}
#sugerencias button{display:block;width:100%;text-align:left;border:0;background:#fff;padding:.45rem .7rem;border-bottom:1px solid #f0f0f2}
#sugerencias button:hover{background:#fdecea}
.kanban{flex:1;display:flex;gap:.6rem;overflow-x:auto;min-height:0}
.kcol{min-width:250px;width:250px;background:#fff;border:1px solid #e3e3e6;border-radius:.5rem;display:flex;flex-direction:column}
.kcol h6{padding:.6rem .8rem;margin:0;border-bottom:2px solid #D32F2F;font-size:.85rem}
.kcol .kbody{padding:.5rem;overflow-y:auto;flex:1;min-height:80px}
.kcard{background:#fff;border:1px solid #e3e3e6;border-radius:.4rem;padding:.5rem .6rem;margin-bottom:.5rem;cursor:pointer;font-size:.85rem}
.kcard:hover{border-color:#D32F2F}
/* ---- Embudo ---- */
.embudo-fila{display:flex;align-items:center;margin-bottom:.5rem}
.embudo-fila .etq{width:190px;font-size:.85rem}
.embudo-barra{height:34px;background:#D32F2F;color:#fff;border-radius:.3rem;display:flex;align-items:center;padding:0 .6rem;font-weight:600;min-width:46px;transition:filter .2s}
.embudo-barra:hover{filter:brightness(1.15)}
.reco-card{border-left:6px solid #D32F2F;background:#fff}
@media(max-width:768px){.lead-list{width:100%;max-width:100%}.chat-split{flex-direction:column}.pipe-wrap{height:auto}}
