/* Marca tomada de branding-onbrands y de la versión clara del panel de captación. */
@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url('/fonts/inter-latin.woff2') format('woff2')}
@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url('/fonts/inter-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+2020-202F,U+2C60-2C7F,U+A720-A7FF}
body,button,input,select,textarea,.page-heading h1,#gestion h2,.management-form .dlg-cab h2,.crm-avatar,.sequence-time,.sequence-time small{font-family:Inter,system-ui,sans-serif}
.sidebar-brand{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 4px;padding:22px 16px 17px;align-items:center;min-height:104px}
.onbrands-logo{display:block;grid-column:1;width:132px;max-width:100%;height:auto;object-fit:contain}
.sidebar-brand .marca{grid-column:1;display:flex;flex-direction:column;gap:3px}
.sidebar-brand .marca strong{font-size:12px;font-weight:650}.sidebar-brand .marca span{font-size:10.5px}
.sidebar-brand .menu-close{grid-column:2;grid-row:1}
#gestion .page-heading h1{letter-spacing:-.035em;font-weight:750}
/* La acción principal concentra el acento; la navegación usa un tinte discreto. */
#gestion .primary-action,.primary-action,#enviar,.attention-actions>button:first-child:not(.sec),.management-form button[type=submit]{background:#57beb0!important;color:#0c0e13!important;font-weight:650;border:1px solid transparent;box-shadow:0 1px 2px #0c0e1310}
#gestion .primary-action:hover,.attention-actions>button:first-child:not(.sec):hover,.management-form button[type=submit]:hover{background:#6dc8bb!important;filter:none}
#navegacion .nav-icon{fill:none}
.page-section-icon,#gestion[data-vista] .page-section-icon{background:#eaf6f3;color:#216f61;border:1px solid #cbe8e1}
#gestion .kpi[data-tone=info]{background:#fff!important;border-color:var(--linea)}
#gestion .kpi[data-tone=success]{background:#eaf6f3!important;border-color:#cbe8e1}
#gestion .kpi .metric-symbol,#gestion .kpi[data-tone=success] .metric-symbol{background:#def1eb;color:#216f61}
#gestion .kpi[data-tone=wait] .metric-symbol{background:#ffe0a5;color:#754607}
#gestion .kpi[data-tone=risk] .metric-symbol{background:#f5cdd6;color:#92293c}
#gestion .kpi[data-tone=success] strong{color:#216f61!important}
#gestion .daily-column i,.recovery-flow .done{background:var(--brand-gradient)}
#gestion .notice{background:#edf7f4;border-color:#cbe8e1;color:#31594f}
#gestion .card,#gestion .crm-directory{box-shadow:0 1px 2px #0c0e1305,0 4px 16px #0c0e1305}
#gestion tbody tr:hover{background:#f1f8f5}
.conversation-row:hover{background:#f1f8f5}.convs li.sel{background:#e0f2ec}
#gestion .sequence-step .card{box-shadow:0 2px 6px #0c0e1308;border:1px solid var(--linea)}
.closing-flow li{border-left:0;padding-left:0}
::selection{background:#b6e4db;color:#0c0e13}
@media(max-width:820px){.sidebar-brand{padding:20px 18px 16px}.onbrands-logo{width:144px}}

/* Marco de navegación carbón, contenido claro: la marca no se convierte en un bloque verde. */
:root[data-theme=light]{--fondo:#f4f5f7;--sidebar-fondo:#111419;--linea:#e0e4e8;--suave:#f0f2f4;--texto:#15191f;--tenue:#535d68;--muy-tenue:#67727e}
.sidebar{background:#111419;border-right:1px solid #242a32;color:#e7ebef}
.sidebar-brand{padding:25px 16px 22px;gap:20px 4px;min-height:124px}
.onbrands-logo{width:128px}
.sidebar .marca strong{font-size:12px;color:#e7ebef;font-weight:600}
.sidebar .marca span{font-size:11px;color:#a4aeba}
#navegacion{padding:0 9px 14px;gap:3px;scrollbar-color:#3c454f #111419}
#navegacion button{min-height:35px;padding:8px 9px;font-size:12px;font-weight:450;color:#bac3ce;border-radius:6px}
#navegacion .nav-label{color:#939daa;font-size:10px;font-weight:500;letter-spacing:.02em;margin:23px 9px 8px}
#navegacion .nav-label:first-child{margin-top:0}
#navegacion button.on{background:#20332f;color:#91dfd0;font-weight:600;box-shadow:none;border:0}
#navegacion button.on .nav-icon{color:#6ccaba}
#navegacion button:not(.on):hover{background:#20262e;color:#f4f6f8}
#navegacion .nav-administration{margin-top:22px;padding-top:10px;border:0;border-top:1px solid #2b303b;border-radius:0}
#navegacion .nav-administration>summary{padding:10px 9px;color:#a4aeba;font-size:11px;font-weight:500;border:0}
#navegacion .nav-administration>summary:hover{background:#20262e;color:#f4f6f8}
#navegacion .nav-administration>div{padding-top:5px}
.sidebar-footer{color:#939daa;font-size:10px;border:0;padding:14px 18px}
.sidebar .menu-close{color:#dfe5eb;background:#242b34}
.sidebar :where(button,summary):focus-visible{outline:2px solid #57beb0;outline-offset:2px}
.app-layout>.barra{min-height:56px;border-bottom-color:#e5e8ec}
.page-location{font-size:12px}.page-location #contextoActual{color:#67727e}
#gestion>.page-heading{min-height:72px;margin-bottom:24px}
#gestion .page-heading h1{font-size:27px;font-weight:680;letter-spacing:-.035em;line-height:1.25}
.page-heading-copy{gap:12px}
.page-section-icon,#gestion[data-vista] .page-section-icon{width:28px;height:30px;margin-top:3px;background:transparent;color:#384c48;border:0;border-radius:0}
.page-section-icon svg{width:22px;height:22px}
.page-eyebrow{font-size:10px;color:#67727e;font-weight:500;margin-bottom:6px}
#gestion .page-heading p{color:#535d68;font-size:12.5px}
#gestion .card{border-radius:10px;border-color:#e0e4e8;padding:20px;box-shadow:0 1px 2px #11141904}
#gestion .card h2{font-size:14px;font-weight:600;margin-bottom:12px;letter-spacing:-.015em}
#gestion .section-tabs{gap:22px;margin-bottom:20px;border-bottom-color:#dce1e6}
#gestion .section-tabs button{font-size:12px;font-weight:500}
#gestion .section-tabs button.on{color:#216f61;font-weight:650}
#gestion .settings-grid{gap:16px}
#gestion[data-vista="configuracion"]>.settings-grid .card{padding:20px;gap:8px}
#gestion[data-vista="configuracion"]>.settings-grid .card>p{margin:4px 0;line-height:1.65}
#gestion[data-vista="configuracion"]>.settings-grid .card>.nota{margin-top:8px}
#gestion[data-vista="configuracion"]>.settings-grid .card>button{margin-top:8px}
#gestion .kpi{border-radius:9px;box-shadow:none;padding:18px 48px 18px 18px}
#gestion .kpi[data-tone=success]{background:#fff!important;border-color:#d2e2dc}
#gestion .kpi .metric-symbol,#gestion .kpi[data-tone=success] .metric-symbol{width:26px;height:26px;border-radius:6px;background:#edf7f3;color:#216f61}
#gestion .kpi strong{font-size:28px;letter-spacing:-1px;font-weight:650}
#gestion .crm-directory{border-radius:10px;box-shadow:0 1px 2px #11141904}
#gestion .crm-directory-heading{padding:16px 20px}
#gestion th{background:#f7f8fa;color:#535d68;font-size:11px;font-weight:550;border-bottom:1px solid #e0e4e8}
#gestion .crm-table td{padding-block:14px}
#gestion .notice{background:#f5faf8;border-color:#d7e6df;color:#405b53}
.workspace-subnav button[aria-current="page"],.crm-quickviews button[aria-pressed="true"]{background:#edf6f2;color:#216f61;box-shadow:inset 0 0 0 1px #c1d9cf}
.convs li.sel{background:#edf5f1}.conversation-row:hover{background:#f5f8f6}
.mensajes{background:#f0f2f4}.m.out{background:#e0efe8}.m.out.humano{background:#e6edf9}
.ficha .attention-card{background:color-mix(in srgb,var(--phase-bg) 30%,#fff)}
@media(max-width:820px){.sidebar-brand{padding:22px 18px 18px;min-height:118px}.onbrands-logo{width:140px}}
@media(max-width:700px){#gestion .page-heading h1{font-size:24px}#gestion .card{padding:18px}.page-section-icon{display:none}}

/* Menú: elemento activo con el degradado del portal de clientes OnBrands. */
#navegacion button.on{background:linear-gradient(100deg,#2A8D79 0%,#57BEB0 100%);color:#fff;font-weight:650;text-shadow:0 1px 2px rgba(0,0,0,.28);box-shadow:0 8px 24px -10px rgba(87,190,176,.7)}
#navegacion button.on .nav-icon{color:#fff}
#navegacion button.on:hover{filter:brightness(1.05)}

/* Estadísticas visuales */
.st-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:18px}
.st-kpi{background:#fff;border:1px solid #e0e4e8;border-radius:10px;padding:16px 18px;display:flex;flex-direction:column;gap:6px}
.st-kpi>span{font-size:12px;color:#535d68;font-weight:500}
.st-kpi>strong{font-size:30px;font-weight:680;letter-spacing:-.03em;color:#15191f;line-height:1.1}
.st-delta{font-size:11.5px;color:#67727e;font-weight:500}
.st-delta span{color:#67727e;font-weight:400}
.st-delta.up{color:#1f7a4d}.st-delta.down{color:#aa3548}
.st-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px}
.st-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:16px}
.st-total{font-size:20px;font-weight:650;color:#216f61}
.st-chart{width:100%;height:auto;display:block}
.st-grid{stroke:#e9ecef;stroke-width:1}
.st-tick{font-size:10px;fill:#67727e;font-family:Inter,system-ui,sans-serif}
.st-bar{fill:#57BEB0}
.st-hit{fill:transparent}
.st-col:hover .st-bar{fill:#2A8D79}.st-col:hover .st-hit{fill:#f1f8f5}
.st-hbars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.st-hbars li{display:grid;grid-template-columns:minmax(90px,38%) 1fr auto;gap:10px;align-items:center;font-size:12.5px}
.st-hlabel{display:flex;align-items:center;gap:7px;color:#15191f;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.st-hlabel .tag-dot{flex:none}
.st-track{height:10px;background:#eef1f3;border-radius:5px;overflow:hidden}
.st-track b{display:block;height:100%;background:linear-gradient(90deg,#2A8D79,#57BEB0);border-radius:5px}
.st-hbars strong{font-weight:650;color:#15191f;font-variant-numeric:tabular-nums;white-space:nowrap}
.st-hbars strong small{font-weight:400;color:#67727e}
.st-hbars li:hover .st-track b{filter:brightness(.92)}
.st-vacio{color:#67727e;font-size:12.5px;margin:4px 0}
.st-seg{display:grid;grid-template-columns:110px 1fr;gap:20px;align-items:start}
.st-seg p{margin:0 0 14px;font-size:13px;color:#535d68}.st-seg p strong{color:#15191f}
.st-ring{width:110px;height:110px}
.st-ring circle{fill:none;stroke-width:11}
.st-ring-bg{stroke:#eef1f3}.st-ring-fg{stroke:#57BEB0;stroke-linecap:round}
.st-ring text{font-size:20px;font-weight:700;fill:#15191f;font-family:Inter,system-ui,sans-serif}
.st-funnel{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-direction:column;gap:8px}
.st-funnel li{display:grid;grid-template-columns:minmax(90px,32%) 1fr 40px;gap:10px;align-items:center;font-size:12.5px}
.st-funnel-bar{background:linear-gradient(90deg,#2A8D79,#57BEB0);color:#fff;font-weight:650;border-radius:6px;padding:6px 10px;min-width:34px;text-shadow:0 1px 2px rgba(0,0,0,.25)}
.st-funnel small{color:#67727e;text-align:right}
@media(max-width:1100px){.st-grid3{grid-template-columns:1fr 1fr}}
@media(max-width:820px){.st-grid2,.st-grid3{grid-template-columns:1fr}.st-seg{grid-template-columns:1fr}.st-ring{margin:0 auto}}

/* Las cabeceras de tabla no heredan el fondo carbón del menú. */
#gestion th,#gestion .crm-table th{background:#f7f8fa;color:#535d68;border-block:1px solid #e0e4e8}
/* Filtros y subvistas activos: negro con texto blanco, como pastilla seleccionada. */
.workspace-subnav button[aria-current="page"],.crm-quickviews button[aria-pressed="true"]{background:#15191f;color:#fff;border-color:#15191f;box-shadow:none;font-weight:600}
.workspace-subnav button[aria-current="page"]:hover,.crm-quickviews button[aria-pressed="true"]:hover{background:#2a3038;color:#fff}
.crm-quickviews button:not([aria-pressed="true"]):hover,.workspace-subnav button:not([aria-current="page"]):hover{background:#f0f2f4;color:#15191f}

/* Sistema de botones unificado */
#gestion .page-heading .toolbar{gap:8px;align-items:center}
#gestion .page-heading .toolbar>button,#gestion .page-heading .toolbar>.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:38px;padding:0 16px;border-radius:9px;font-size:13px;font-weight:600;line-height:1;text-decoration:none}
/* Principal: degradado de marca, como el menú activo */
#gestion .primary-action,.primary-action,.management-form button[type=submit],.attention-actions>button:first-child:not(.sec){background:linear-gradient(100deg,#2A8D79 0%,#57BEB0 100%)!important;color:#fff!important;font-weight:600;border:0!important;text-shadow:0 1px 1px rgba(0,0,0,.18);box-shadow:0 1px 2px rgba(17,20,25,.08),0 6px 16px -8px rgba(42,141,121,.6)!important}
#gestion .primary-action:hover,.primary-action:hover,.management-form button[type=submit]:hover,.attention-actions>button:first-child:not(.sec):hover{background:linear-gradient(100deg,#257d6b 0%,#4cb0a2 100%)!important;filter:none}
/* Secundario: blanco con borde definido */
#gestion .page-heading .toolbar>button.sec,#gestion .page-heading .toolbar>.button.sec,.management-form .dlg-pie button.sec{background:#fff;color:#15191f;border:1px solid #d3d9df;box-shadow:0 1px 2px rgba(17,20,25,.04)}
#gestion .page-heading .toolbar>button.sec:hover,#gestion .page-heading .toolbar>.button.sec:hover,.management-form .dlg-pie button.sec:hover{background:#f5f7f8;border-color:#b8c1c9}
/* Aplicar / Filtrar / Buscar: neutro oscuro, a la altura de los campos */
#gestion .filter-form>button,#gestion .crm-search-row button.crm-search-submit,#gestion .crm-search-submit{background:#15191f;color:#fff;font-weight:600;height:39px;padding:0 18px;border-radius:8px;border:0}
#gestion .filter-form>button:hover,#gestion .crm-search-submit:hover{background:#2a3038;filter:none}
/* Enlaces dentro de tablas: color de marca, sin azul del navegador */
#gestion td a:not(.button){color:#216f61;font-weight:600;text-decoration:none}
#gestion td a:not(.button):hover{text-decoration:underline}
/* Botones pequeños en tablas y tarjetas: mismo secundario, más compacto */
#gestion td button.sec,#gestion .card .toolbar button.sec,#gestion .card .toolbar>.button.sec{background:#fff;color:#15191f;border:1px solid #d9dee3;border-radius:7px;padding:6px 11px;font-size:12px;font-weight:500}
#gestion td button.sec:hover,#gestion .card .toolbar button.sec:hover{background:#f5f7f8;border-color:#b8c1c9}

/* Desplegables: flecha propia con aire a la derecha, en vez de la nativa pegada al borde */
select:not([multiple]):not([size]),#gestion select:not([multiple]):not([size]),.management-form select:not([multiple]):not([size]){-webkit-appearance:none!important;appearance:none!important;padding-right:38px!important;background-color:#fff!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23535d68' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 14px center!important;background-size:12px!important;cursor:pointer}
select:not([multiple]):not([size]):hover{border-color:#b8c1c9}
input[type=date],input[type=datetime-local],input[type=time]{padding-right:12px}
input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=time]::-webkit-calendar-picker-indicator{margin-right:2px;opacity:.6;cursor:pointer}

/* Recursos: tarjetas con vista previa */
.res-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.res-card{border:1px solid #e0e4e8;border-radius:10px;overflow:hidden;background:#fff;display:flex;flex-direction:column;transition:box-shadow .16s,border-color .16s}
.res-card:hover{border-color:#c9d2d8;box-shadow:0 6px 18px -10px rgba(17,20,25,.25)}
.res-preview{aspect-ratio:16/10;background:#f1f4f5;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}
.res-preview img,.res-preview video{width:100%;height:100%;object-fit:cover;display:block;background:#0c0e13}
.res-audio{flex-direction:column;gap:12px;background:linear-gradient(135deg,#e6f4f1,#f4f7f8);padding:14px}
.res-audio svg{width:30px;height:30px;fill:none;stroke:#2A8D79;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.res-audio audio{width:100%;height:34px}
.res-doc span{font-size:15px;font-weight:700;color:#535d68;background:#fff;border:1px solid #d9dee3;border-radius:8px;padding:12px 14px}
.res-body{padding:12px 14px 14px;display:flex;flex-direction:column;gap:5px;flex:1}
.res-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.res-title h3{font-size:13px;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#15191f}
.res-ia{flex:none;font-size:10.5px;font-weight:600;color:#fff;background:linear-gradient(100deg,#2A8D79,#57BEB0);border-radius:999px;padding:3px 8px}
.res-body small{color:#67727e;font-size:11px}
.res-uso{font-size:12px;color:#405b53;line-height:1.45;margin:4px 0 0}.res-uso.muted{color:#8a929c}
.res-actions{display:flex;gap:6px;margin-top:auto;padding-top:10px}
#gestion .res-actions .button.sec,#gestion .res-actions button.sec{background:#fff;color:#15191f;border:1px solid #d9dee3;border-radius:7px;padding:6px 11px;font-size:12px;font-weight:500;text-decoration:none}
#gestion .res-actions .button.sec:hover,#gestion .res-actions button.sec:hover{background:#f5f7f8;border-color:#b8c1c9}

/* Compositor del chat: una sola caja, accesos en iconos y envío redondo */
#composer{background:#fff;border-top:1px solid #e6e9ec;padding:12px 20px 14px}
.cmp-box{border:1px solid #d6dce1;border-radius:14px;background:#fff;transition:border-color .15s,box-shadow .15s}
.cmp-box:focus-within{border-color:#57BEB0;box-shadow:0 0 0 3px rgba(87,190,176,.16)}
#composer .cmp-box textarea{display:block;width:100%;border:0!important;outline:0;box-shadow:none!important;background:transparent;resize:none;padding:12px 14px 4px;font:inherit;font-size:14px;line-height:1.45;color:#15191f;min-height:44px;max-height:160px}
#composer .cmp-box textarea::placeholder{color:#8a929c}
.cmp-bar{display:flex;align-items:center;gap:2px;padding:4px 6px 6px 8px}
#composer .cmp-tool{display:inline-flex;align-items:center;gap:6px;background:transparent;border:0;color:#535d68;font-size:12px;font-weight:500;padding:6px 9px;border-radius:8px}
#composer .cmp-tool:hover:not(:disabled){background:#f0f3f4;color:#15191f;filter:none}
.cmp-tool svg,.draft-attachment svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cmp-hint{margin-left:auto;margin-right:10px;color:#8a929c;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#composer #enviar.cmp-send{flex:none;width:36px;height:36px;min-height:0;padding:0;border-radius:50%!important;display:inline-flex;align-items:center;justify-content:center;background:#e6eaed!important;color:#8a929c!important;box-shadow:none!important;text-shadow:none;border:0!important;transition:background .15s,transform .1s}
#composer #enviar.cmp-send.listo{background:linear-gradient(135deg,#2A8D79,#57BEB0)!important;color:#fff!important;box-shadow:0 4px 12px -4px rgba(42,141,121,.55)!important}
#composer #enviar.cmp-send.listo:hover{transform:translateY(-1px);filter:brightness(1.05)}
#composer #enviar.cmp-send:active{transform:scale(.95)}
.cmp-send svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.cmp-spin{width:16px;height:16px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:cmpgira .7s linear infinite}
@keyframes cmpgira{to{transform:rotate(360deg)}}
#composer .draft-attachment{display:flex;align-items:center;gap:8px;margin:10px 12px 0;padding:7px 10px;background:#f1f8f5;border:1px solid #d2e6de;border-radius:9px;font-size:12px;color:#216f61}
#composer .draft-attachment span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
#composer .draft-attachment button{background:transparent;border:0;color:#535d68;padding:0 4px;font-size:16px}
@media(max-width:700px){#composer{padding:10px 12px}.cmp-tool span,.cmp-hint{display:none}}

/* Automatizaciones: tarjeta de conexión con GHL */
.ghl-card{margin-bottom:16px}
.ghl-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ghl-flow>div{background:#f7f9fa;border:1px solid #e6eaed;border-radius:9px;padding:14px 16px}
.ghl-flow h3{font-size:12px;font-weight:650;margin:0 0 8px;color:#15191f}
.ghl-flow ul{margin:0;padding-left:16px;display:flex;flex-direction:column;gap:5px;font-size:12.5px;color:#405b53;line-height:1.45}
.ghl-flow code{font-size:11px;background:#fff;border:1px solid #e0e4e8;border-radius:4px;padding:1px 4px}
@media(max-width:900px){.ghl-flow{grid-template-columns:1fr}}

/* Secundarios en todo el panel: blanco con borde, nunca el gris relleno */
button.sec:not(.cmp-tool):not(.on):not([aria-pressed="true"]):not([aria-current="page"]),a.button.sec{background:#fff;color:#15191f;border:1px solid #d9dee3;font-weight:500;box-shadow:0 1px 1px rgba(17,20,25,.03)}
button.sec:not(.cmp-tool):not(.on):not([aria-pressed="true"]):not([aria-current="page"]):hover:not(:disabled),a.button.sec:hover{background:#f5f7f8;border-color:#b8c1c9;filter:none}
/* Las pestañas de sección siguen siendo texto subrayado, sin caja */
#gestion .section-tabs button.sec,#gestion .section-tabs button{background:transparent!important;border:0!important;border-bottom:2px solid transparent!important;box-shadow:none!important;border-radius:0}
#gestion .section-tabs button.on{border-bottom-color:#216f61!important}
/* Botón de vincular WhatsApp como acción principal */
#btnNuevo{background:linear-gradient(100deg,#2A8D79 0%,#57BEB0 100%);color:#fff;font-weight:600;border:0;border-radius:9px;padding:9px 16px;font-size:13px;text-shadow:0 1px 1px rgba(0,0,0,.18);box-shadow:0 6px 16px -8px rgba(42,141,121,.6)}
/* Horas de los seguimientos en el verde de marca, no en azul */
#gestion .sequence-time{color:#216f61}

/* WhatsApp: líneas */
#conexiones .connection-intro{background:#f5faf8;border:1px solid #d7e6df;border-radius:10px;padding:14px 16px;margin-bottom:18px;font-size:12.5px;color:#405b53}
#conexiones:has(.num) .connection-intro{display:none}
#conexiones .conexiones-panel{background:transparent;border:0;padding:0;box-shadow:none}
#conexiones .col-cab{display:flex;align-items:center;justify-content:space-between;padding:0 0 14px;border:0;background:transparent}
#conexiones .col-cab h2{font-size:14px;font-weight:600}
#listaNumeros{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px}
.num,#conexiones .num{background:#fff;border:1px solid #e0e4e8;border-radius:12px;padding:18px;display:flex;flex-direction:column;gap:14px;box-shadow:0 1px 2px #11141905;margin:0}
.num-head{display:flex;align-items:center;gap:12px}
.num-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#eef1f3;color:#8a929c;flex:none}
.num-avatar svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.num-avatar.ok{background:linear-gradient(135deg,#2A8D79,#57BEB0);color:#fff}
.num-avatar.wait{background:#fff1d7;color:#845009}.num-avatar.mal{background:#fce2e7;color:#aa3548}
.num-id{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.num-id strong{font-size:14px;font-weight:650;color:#15191f}.num-id span{font-size:12px;color:#67727e;font-variant-numeric:tabular-nums}
.num-pill{font-size:11px;font-weight:600;padding:4px 10px;border-radius:999px;background:#eef1f3;color:#535d68;white-space:nowrap}
.num-pill.ok{background:#e0f2e9;color:#1f7a4d}.num-pill.wait{background:#fff1d7;color:#845009}.num-pill.mal{background:#fce2e7;color:#aa3548}
.num-motivo{font-size:12px;color:#aa3548;margin:-6px 0 0}
.num-test{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff8e8;border:1px solid #f1dfb2;border-radius:9px;padding:10px 12px}
.num-test.abierta{background:#f1f8f5;border-color:#d2e6de}
.num-test div{display:flex;flex-direction:column;gap:2px;min-width:0}
.num-test b{font-size:12px;color:#15191f}.num-test span{font-size:11.5px;color:#535d68;line-height:1.4}
.num-qr{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px;border:1px dashed #c9d2d8;border-radius:10px}
.num-qr img{width:220px;height:220px}.num-qr p{font-size:12px;color:#535d68;text-align:center;margin:0}
.num-uso{display:flex;flex-direction:column;gap:7px}
.num-uso-top{display:flex;justify-content:space-between;font-size:12px;color:#535d68}.num-uso-top b{color:#15191f;font-variant-numeric:tabular-nums}
.num-bar{height:8px;background:#eef1f3;border-radius:4px;overflow:hidden}.num-bar i{display:block;height:100%;background:linear-gradient(90deg,#2A8D79,#57BEB0);border-radius:4px}
.num-stats{display:flex;gap:16px;font-size:12px;color:#67727e}.num-stats b{color:#15191f}
.num-ajustes,#conexiones .num-ajustes{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-top:0;padding-top:12px;border-top:1px solid #eef1f3}
.num-ajustes>label:not(.num-switch){display:flex;flex-direction:column;gap:4px;font-size:11px;color:#67727e}
.num-ajustes input[type=number]{width:76px;padding:6px 8px;border:1px solid #d3d9df;border-radius:7px;font-size:13px;background:#fff}
.num-switch{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:#15191f;margin-left:auto;cursor:pointer;padding-bottom:6px}
.num-switch input{position:absolute;opacity:0;width:1px;height:1px}
.num-switch span{width:34px;height:20px;border-radius:999px;background:#cfd6db;position:relative;transition:background .15s}
.num-switch span::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s}
.num-switch input:checked+span{background:#2A8D79}.num-switch input:checked+span::after{transform:translateX(14px)}
.num-switch input:focus-visible+span{outline:2px solid #57BEB0;outline-offset:2px}
.num-botones{display:flex;gap:8px;align-items:center}
.num-botones .num-principal{background:linear-gradient(100deg,#2A8D79,#57BEB0);color:#fff;border:0;border-radius:8px;padding:7px 14px;font-weight:600}
.num-botones .num-desvincular{margin-left:auto;background:transparent;border:1px solid transparent;color:#aa3548;border-radius:8px;padding:6px 10px;font-weight:500}
.num-botones .num-desvincular:hover{background:#fce2e7;border-color:#f3c3cd}
@media(max-width:700px){#conexiones #listaNumeros{grid-template-columns:1fr}}

/* Estado del sistema: tira de estado compacta y menú de acciones */
.sys-status{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));background:#fff;border:1px solid #e0e4e8;border-radius:10px;margin-bottom:18px;overflow:hidden}
.sys-item{display:flex;align-items:center;gap:10px;padding:14px 16px;border-right:1px solid #eef1f3;font-size:12.5px;color:#535d68}
.sys-item:last-child{border-right:0}
.sys-item i{width:8px;height:8px;border-radius:50%;background:#c9d0d6;flex:none}.sys-item i.ok{background:#2f9e6b;box-shadow:0 0 0 3px #e0f2e9}
.sys-item b{margin-left:auto;font-weight:600;color:#15191f;font-size:12px;white-space:nowrap}
.menu-mas{position:relative}
.menu-mas>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;height:38px;padding:0 16px;border-radius:9px;font-size:13px;font-weight:600}
.menu-mas>summary::-webkit-details-marker{display:none}
.menu-mas>summary::after{content:"";width:7px;height:7px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:rotate(45deg) translateY(-2px);margin-left:9px}
.menu-mas>div{position:absolute;right:0;top:calc(100% + 6px);z-index:20;background:#fff;border:1px solid #e0e4e8;border-radius:10px;box-shadow:0 12px 32px -12px rgba(17,20,25,.3);padding:6px;display:flex;flex-direction:column;min-width:220px}
#gestion .menu-mas>div button,#gestion .menu-mas>div button.sec{background:transparent!important;border:0!important;box-shadow:none!important;text-align:left;justify-content:flex-start;padding:9px 12px;border-radius:7px;font-size:13px;font-weight:500;height:auto}
#gestion .menu-mas>div button:hover{background:#f1f4f5!important}
@media(max-width:700px){.sys-item{border-right:0;border-bottom:1px solid #eef1f3}}
.menu-mas>summary{background:#fff;border:1px solid #d9dee3;color:#15191f}.menu-mas>summary:hover{background:#f5f7f8;border-color:#b8c1c9}.menu-mas[open]>summary{background:#f5f7f8}

/* Pipeline: columnas a todo el ancho y tarjetas más legibles */
#gestion .kanban{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;align-items:start}
#gestion .kanban-col{background:#f4f6f7;border-radius:10px;padding:10px;min-height:260px}
#gestion .kanban-col h3{display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:650;margin:0 0 10px;padding:9px 11px;border-radius:7px}
#gestion .kanban-col h3 span{float:none;background:rgba(255,255,255,.75);color:inherit;font-weight:650;border-radius:999px;padding:1px 8px;font-size:11px}
#gestion .opportunity{border:1px solid #e3e7ea;border-radius:9px;padding:11px 12px;margin-bottom:8px;box-shadow:0 1px 2px #11141906;cursor:grab;transition:border-color .15s,box-shadow .15s,transform .1s}
#gestion .opportunity:hover{border-color:#bcd7cd;box-shadow:0 6px 16px -10px rgba(17,20,25,.35);transform:translateY(-1px)}
#gestion .opportunity b{font-size:13px;font-weight:600;color:#15191f}
#gestion .opportunity small{margin-top:3px;color:#8a929c}
#gestion .opportunity span{display:inline-block;margin-top:8px;font-size:10.5px;font-weight:600;color:#535d68;background:#f0f3f4;border-radius:999px;padding:2px 8px}

/* Ficha lateral más compacta */
#ficha .bloque{padding:16px 18px}
#ficha .bloque h2{font-size:12.5px;margin-bottom:10px}
#ficha .lead-brief dl{display:grid;gap:7px;margin:0 0 8px}
#ficha .lead-brief dl>div{display:grid;grid-template-columns:90px 1fr;gap:8px;font-size:12.5px}
#ficha .lead-brief dt{color:#67727e}#ficha .lead-brief dd{margin:0;color:#15191f}
#ficha .brief-empty{font-size:12.5px;color:#8a929c;margin:0 0 8px}
#ficha .lead-brief .phase-guide{margin-top:6px}
#ficha details.bloque>summary{font-size:12.5px;font-weight:600}

/* Ficha: una sola línea entre bloques; desplegables internos sin bordes */
#ficha .bloque{border:0!important;border-top:1px solid #eef1f3!important}
#ficha .ficha-heading+.bloque{border-top:0!important}
#ficha .bloque details:not(.bloque),#ficha .phase-guide,#ficha .technical-tags{border:0!important;padding:0!important;margin:12px 0 0!important;background:none!important;box-shadow:none!important}
#ficha .bloque.lead-brief>details:not(.bloque){display:inline-block;margin-right:20px!important}
#ficha .bloque.lead-brief>details:not(.bloque)[open]{display:block;margin-right:0!important}
#ficha summary{list-style:none;display:inline-flex;align-items:center;gap:6px;cursor:pointer}
#ficha summary::-webkit-details-marker{display:none}
#ficha .bloque details:not(.bloque)>summary{font-size:12px;font-weight:500;color:#216f61}
#ficha .bloque details:not(.bloque)>summary::before{content:"";width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
#ficha .bloque details:not(.bloque)[open]>summary::before{transform:rotate(45deg)}
#ficha .technical-tags>summary{color:#67727e!important;font-size:11.5px!important}
#ficha details.bloque>summary{display:flex;justify-content:space-between;width:100%;font-size:12.5px;font-weight:600;color:#15191f}
#ficha details.bloque>summary::after{content:"";width:7px;height:7px;border-right:1.7px solid #8a929c;border-bottom:1.7px solid #8a929c;transform:rotate(45deg) translateY(-2px);transition:transform .15s}
#ficha details.bloque[open]>summary::after{transform:rotate(-135deg)}
#ficha details.bloque:hover>summary{color:#216f61}

/* Bandeja: filtros en una sola fila de pastillas */
.bandeja .col-cab{padding:0 16px 12px!important;border:0!important;background:transparent!important}
.bandeja .filtros#filtros{display:flex!important;flex-wrap:nowrap;gap:6px;overflow-x:auto;scrollbar-width:none;padding:2px 0;background:transparent!important;border:0!important;box-shadow:none!important}
.bandeja .filtros#filtros::-webkit-scrollbar{display:none}
.bandeja #filtros button{flex:none;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:999px!important;border:1px solid #dfe3e7!important;background:#fff!important;color:#405b53!important;font-size:12px;font-weight:500;box-shadow:none!important;white-space:nowrap}
.bandeja #filtros button:hover{border-color:#b8c1c9!important;color:#15191f!important}
.bandeja #filtros button.on{background:#15191f!important;border-color:#15191f!important;color:#fff!important;font-weight:600}
.bandeja #filtros .filter-status-dot{width:6px;height:6px;border-radius:50%;background:#2f9e6b}
.bandeja #filtros .contador:empty{display:none}
.bandeja #filtros .contador{min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ffb02e;color:#3a2600;font-size:10.5px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.bandeja .col-cab{display:block!important}.bandeja .filtros#filtros{flex-direction:row!important;grid-template-columns:none!important;width:100%}.bandeja #filtros button{width:auto!important;min-width:0!important;margin:0!important;flex:0 0 auto!important}
.bandeja .filtros#filtros{flex-wrap:wrap!important;overflow:visible!important;row-gap:6px}.bandeja #filtros button{height:28px;padding:0 10px;font-size:11.5px}

/* Lista de chats compacta: 3 líneas, estado como punto en el avatar */
.convs .conversation-row{padding:11px 14px!important;gap:11px!important;align-items:flex-start}
.convs .contact-avatar{position:relative;flex:none}
.cv-dot{position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;border:2px solid #fff;background:#c9d0d6}
.cv-dot.ok{background:#2f9e6b}.cv-dot.wait{background:#f0a020}.cv-dot.pause{background:#8a97a6}.cv-dot.off{background:#d5dade}
.convs li.sel .cv-dot{border-color:#edf5f1}
.convs .conversation-body{gap:3px!important;min-width:0}
.convs .c-preview{margin:0!important}
.cv-meta{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;overflow:hidden;margin-top:4px;font-size:11px;color:#67727e;white-space:nowrap}
.cv-meta>*{flex:none}
.cv-meta .cv-etapa{overflow:hidden;text-overflow:ellipsis;flex:0 1 auto;min-width:0}
.cv-wait{background:#fff1d7;color:#845009;font-weight:600;border-radius:999px;padding:2px 8px;font-size:10.5px}
.cv-owner{margin-left:auto;color:#535d68;overflow:hidden;text-overflow:ellipsis;flex:0 1 auto;min-width:0}

/* Cabecera del chat: fase y etapa junto al nombre, sin franja aparte */
.chat-cab .quien{display:flex;flex-direction:column;gap:2px;min-width:0}
.chat-cab .quien-top{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}
.chat-cab .quien-top strong{font-size:15px;font-weight:650}
.chat-cab .quien-estado{display:inline-flex;align-items:center;gap:8px;font-size:11.5px}
.chat-cab .quien-sub{font-size:12px;color:#67727e}
.chat-cab .conversation-id{display:inline-flex;align-self:flex-start}
@media(max-width:700px){.chat-cab .quien-estado{display:none}}

/* Estado vacío del chat */
.empty-chat-icon{width:52px;height:52px;border-radius:14px;background:#edf6f2;color:#2A8D79;display:inline-flex;align-items:center;justify-content:center;font-size:0}
.empty-chat-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chat .vacio h2{font-size:16px;font-weight:650;margin-top:14px}.chat .vacio p{max-width:300px;color:#67727e;font-size:13px}

/* Estados vacíos */
.empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;padding:36px 20px;gap:6px;background:#fff;border:1px dashed #d3dade;border-radius:12px;margin-bottom:14px}
.card .empty-state{border:0;padding:24px 12px;margin:0}
.empty-state-icon{width:46px;height:46px;border-radius:12px;background:#edf6f2;color:#2A8D79;display:flex;align-items:center;justify-content:center;margin-bottom:6px}
.empty-state-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.empty-state h3{font-size:14px;font-weight:650;margin:0;color:#15191f}
.empty-state p{font-size:12.5px;color:#67727e;max-width:420px;margin:0 0 8px;line-height:1.5}
#gestion td.empty{text-align:center;color:#8a929c;padding:28px 12px;font-size:12.5px}
.empty-state button{background:linear-gradient(100deg,#2A8D79,#57BEB0)!important;color:#fff!important;border:0!important;border-radius:9px;padding:9px 16px;font-weight:600;font-size:13px}

/* Etiquetas: tarjetas de altura pareja y acciones en menú */
#gestion[data-vista="etiquetas"] .rule-grid{align-items:stretch}
#gestion[data-vista="etiquetas"] .rule-grid>.card{display:flex;flex-direction:column}
.tag-desc{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;font-size:12.5px;line-height:1.5;color:#405b53}
.tag-actions{margin-top:auto;padding-top:10px;display:flex;align-items:center;gap:6px}
.menu-mini>summary{width:32px;height:32px;padding:0!important;justify-content:center;font-size:16px;letter-spacing:1px;line-height:1}
.menu-mini>summary::after{display:none}
.menu-mini>div{left:0;right:auto;min-width:210px}
.tpl-card .tpl-bubble{margin:14px 14px 0;background:#e0efe8;border-radius:12px 12px 12px 4px;padding:10px 12px;font-size:12.5px;line-height:1.5;color:#15191f;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.tpl-card .res-body h3{font-size:13px;font-weight:600;margin:0}
.chat-cab .quien{flex-direction:row!important;flex-wrap:wrap;align-items:center;column-gap:8px;row-gap:3px}
.chat-cab .quien-top{flex:1 0 100%;flex-wrap:nowrap!important;overflow:hidden}
.chat-cab .quien-top strong{display:inline!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-cab .quien-estado{flex:none}
.chat-cab .quien-sub{display:inline!important}
.chat-cab .quien .conversation-id{margin:0!important;padding:0!important;font-size:11px;align-self:center}

/* Cabecera del chat: más aire entre nombre, estado y datos */
.chat-cab{padding-top:14px!important;padding-bottom:14px!important}
.chat-cab .quien{row-gap:6px!important;column-gap:10px!important}
.chat-cab .quien-top{gap:14px!important}
.chat-cab .quien-estado{gap:6px!important;padding-left:14px;border-left:1px solid #e3e7ea}
.chat-cab .quien-estado>*{font-size:11px!important}
.chat-cab .quien-estado .etapa,.chat-cab .quien-estado [data-etapa]{background:var(--etapa-fondo,#f0f3f4);color:var(--etapa-color,#405b53);border-radius:999px;padding:3px 9px}
.chat-cab .quien-sub{color:#8a929c!important}
.chat-cab .quien .conversation-id{color:#8a929c;padding-left:10px!important;border-left:1px solid #e3e7ea!important;border-radius:0}

/* Probar conversación */
.probar-pasos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}
.probar-pasos>div{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #e0e4e8;border-radius:10px;padding:14px 16px;font-size:12.5px;color:#405b53}
.probar-pasos b{width:28px;height:28px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#2A8D79,#57BEB0);color:#fff;font-size:12px}
.probar-lista{display:flex;flex-direction:column}
#gestion .probar-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:#fff!important;border:0!important;border-bottom:1px solid #eef1f3!important;border-radius:0!important;padding:12px 4px!important;color:#15191f!important;box-shadow:none!important}
#gestion .probar-item:hover{background:#f6faf8!important}
.probar-item>span:nth-child(2){display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.probar-item b{font-size:13px;font-weight:600}.probar-item small{font-size:12px;color:#67727e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.probar-item i{font-style:normal;font-size:11px;color:#535d68;background:#f0f3f4;border-radius:999px;padding:2px 9px}
@media(max-width:700px){.probar-pasos{grid-template-columns:1fr}}
.chat-cab .quien-estado{border-left:0!important;padding-left:0!important;margin-left:6px}

/* Mensajes agrupados por autor y eventos internos como separador fino */
.mensajes .m.seguido{margin-top:-5px}
.mensajes .m.out.seguido{border-top-right-radius:4px}
.mensajes .m.in.seguido{border-top-left-radius:4px}
.mensajes .message-author{font-size:10.5px;font-weight:650;letter-spacing:.02em;margin-bottom:2px}
.mensajes .history-event{align-self:stretch;max-width:none;width:100%;border:0!important;background:transparent!important;padding:0!important;margin:6px 0!important;text-align:center}
.mensajes .history-event>summary{list-style:none;display:flex;align-items:center;gap:10px;font-size:10.5px;color:#8a929c;cursor:pointer}
.mensajes .history-event>summary::-webkit-details-marker{display:none}
.mensajes .history-event>summary::before,.mensajes .history-event>summary::after{content:"";flex:1;height:1px;background:#dfe3e7}
.mensajes .history-event>summary span{background:#e8ecee;border-radius:999px;padding:3px 10px;color:#535d68;font-weight:500}
.mensajes .history-event>summary time{margin-left:0!important;order:0}
.mensajes .history-event[open]>p{background:#fff;border:1px solid #e3e7ea;border-radius:9px;padding:9px 12px;margin:8px auto 0!important;max-width:520px;font-size:12px;text-align:left;color:#405b53}
#filtro-metricas .rango-fechas{display:contents}
#filtro-metricas .rango-fechas[hidden]{display:none}

/* Ajustes del setter */
.set-hero{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #d2e6de;border-radius:12px;padding:16px 18px;margin-bottom:16px}
.set-hero.off{border-color:#f1dfb2;background:#fffaf0}
.set-hero-dot{width:12px;height:12px;border-radius:50%;background:#2f9e6b;box-shadow:0 0 0 5px #e0f2e9;flex:none}
.set-hero.off .set-hero-dot{background:#f0a020;box-shadow:0 0 0 5px #fff1d7}
.set-hero>div{flex:1;display:flex;flex-direction:column;gap:2px}.set-hero b{font-size:14px;color:#15191f}.set-hero small{font-size:12px;color:#67727e}
#gestion .set-card{padding:18px 20px}
#gestion .set-card .card-title{margin-bottom:6px}
.set-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;border-top:1px solid #eef1f3}
.set-row:first-of-type{border-top:0}
.set-row>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.set-row b{font-size:13px;font-weight:550;color:#15191f}.set-row small{font-size:11.5px;color:#8a929c}
.set-val{font-size:13px;font-weight:600;color:#15191f;white-space:nowrap;font-variant-numeric:tabular-nums}
.set-pill{font-size:11px;font-weight:600;border-radius:999px;padding:3px 10px;background:#eef1f3;color:#67727e;white-space:nowrap}.set-pill.on{background:#e0f2e9;color:#1f7a4d}
.set-dias{display:flex;gap:4px}.set-dias i{font-style:normal;width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:600;background:#eef1f3;color:#a0a8b0}.set-dias i.on{background:#2A8D79;color:#fff}
#gestion[data-vista="configuracion"] .settings-grid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}

/* Seguimientos: botones iguales y texto largo recortado */
#gestion .sequence-step .toolbar .sec:first-child{color:#15191f;background:#fff;font-weight:500}
#gestion .sequence-step .prose{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer}
#gestion .sequence-step .prose.abierto{display:block;-webkit-line-clamp:unset}
#gestion .page-eyebrow,#conexiones .page-eyebrow{display:none}

/* Ventanas de formularios */
dialog:has(>.management-form){padding:0;border:0;border-radius:16px;box-shadow:0 30px 80px -20px rgba(17,20,25,.45);overflow:hidden}
dialog:has(>.management-form)::backdrop{background:rgba(17,20,25,.45);backdrop-filter:blur(2px)}
.management-form{display:flex;flex-direction:column;gap:18px!important;max-height:88vh;overflow:auto;padding:0 24px!important;background:#fff;scroll-padding:80px}
.management-form>.dlg-cab{position:sticky;top:0;z-index:3;background:#fff;margin:0 -24px;padding:18px 24px 14px;border-bottom:1px solid #eef1f3;display:flex;align-items:center;justify-content:space-between}
.management-form .dlg-cab h2{font-family:Inter,system-ui,sans-serif!important;font-size:17px;font-weight:700;letter-spacing:-.02em;margin:0}
.management-form .dlg-cab button{width:32px;height:32px;padding:0;border-radius:8px;font-size:16px}
.management-form>.dlg-pie{position:sticky;bottom:0;z-index:3;background:#fff;margin:auto -24px 0;padding:14px 24px 18px;border-top:1px solid #eef1f3;display:flex;justify-content:flex-end;gap:8px}
.management-form>.dlg-pie button{height:38px;padding:0 18px;border-radius:9px;font-size:13px;font-weight:600}
.management-form .form-error:empty{display:none}
.management-form .form-error{color:#aa3548;background:#fce2e7;border-radius:8px;padding:8px 12px;font-size:12.5px;margin:0}
/* Secciones: título y separador, sin caja */
.management-form fieldset{border:0!important;padding:0!important;margin:0!important;min-width:0}
.management-form fieldset+fieldset{padding-top:18px!important;border-top:1px solid #eef1f3!important}
.management-form legend{float:left;width:100%;padding:0!important;margin:0 0 12px;font-size:11px!important;font-weight:700!important;letter-spacing:.06em;text-transform:uppercase;color:#2A8D79!important}
.management-form legend+*{clear:both}
.management-form .form-grid{gap:14px 16px!important}
/* Campos */
.management-form label{font-size:12px!important;font-weight:500;color:#405b53!important;gap:6px!important}
.management-form input:not([type=checkbox]):not([type=radio]),.management-form select,.management-form textarea{background:#fff!important;border:1px solid #d3d9df!important;border-radius:9px!important;padding:9px 11px!important;font-size:13.5px!important;color:#15191f!important;box-shadow:none!important}
.management-form input:focus,.management-form select:focus,.management-form textarea:focus{outline:0!important;border-color:#57BEB0!important;box-shadow:0 0 0 3px rgba(87,190,176,.16)!important}
.management-form textarea{line-height:1.5}
/* Casillas como interruptores */
.management-form .check{display:flex!important;flex-direction:row!important;align-items:center;gap:10px!important;padding:6px 0!important;font-size:13px!important;color:#15191f!important;cursor:pointer}
.management-form .check input[type=checkbox]{-webkit-appearance:none;appearance:none;flex:none;width:34px!important;height:20px;margin:0;border-radius:999px;background:#cfd6db;position:relative;cursor:pointer;transition:background .15s;border:0!important;padding:0!important}
.management-form .check input[type=checkbox]::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .15s}
.management-form .check input[type=checkbox]:checked{background:#2A8D79}
.management-form .check input[type=checkbox]:checked::after{transform:translateX(14px)}
.management-form .check input[type=checkbox]:focus-visible{outline:2px solid #57BEB0;outline-offset:2px}
.management-form .nota{font-size:12px;color:#67727e;background:#f6f8f9;border-radius:8px;padding:10px 12px;margin:0;line-height:1.5}
.management-form .weekday-options{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center;grid-column:1/-1}
.management-form .weekday-options>span{width:100%;font-size:12px;font-weight:500;color:#405b53}
.crm-tags-organized .technical-tags,.crm-table .technical-tags{display:none!important}

/* Pruebas de IA: lotes legibles */
.lote-resumen{display:flex;align-items:baseline;gap:10px;margin-bottom:14px}.lote-resumen b{font-size:26px;font-weight:700;color:#216f61;letter-spacing:-.02em}.lote-resumen span{font-size:12.5px;color:#535d68}
.lote-lista{display:flex;flex-direction:column;border:1px solid #e6eaed;border-radius:10px;overflow:hidden;margin-bottom:10px}
.lote{display:flex;align-items:center;gap:12px;padding:11px 14px;border-top:1px solid #eef1f3;background:#fff}
.lote:first-child{border-top:0}.lote:hover{background:#f8faf9}
.lote-dot{width:9px;height:9px;border-radius:50%;flex:none;background:#2f9e6b}.lote.obs .lote-dot{background:#f0a020}
.lote-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.lote-info b{font-size:13px;font-weight:600;color:#15191f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lote-info small{font-size:11.5px;color:#8a929c}.lote-info em{font-style:normal;color:#216f61;font-weight:600}
.lote-res{font-size:11.5px;font-weight:600;border-radius:999px;padding:3px 10px;white-space:nowrap;background:#e0f2e9;color:#1f7a4d}.lote.obs .lote-res{background:#fff1d7;color:#845009}
.management-form:focus,.management-form:focus-visible,dialog:has(>.management-form):focus{outline:none!important}
.lote-aviso{font-size:12.5px;color:#845009;background:#fff8e8;border:1px solid #f1dfb2;border-radius:9px;padding:10px 12px;margin:0 0 12px}

/* Integraciones */
.integ-card{display:flex;flex-direction:column;gap:10px}
.integ-head{display:flex;align-items:center;gap:10px}.integ-head h2{margin:0!important;flex:1}
.integ-logo{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,#2A8D79,#57BEB0)}
.integ-logo.ghl{background:linear-gradient(135deg,#3a4a5c,#6b7c8f)}
.integ-logo svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.integ-card>p{margin:0;font-size:12.5px;color:#535d68}
.integ-card>button,.integ-card>.toolbar{margin-top:auto;align-self:flex-start}
#gestion .closing-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;list-style:none;padding:0;margin:4px 0 12px;counter-reset:paso}
#gestion .closing-flow li{display:flex;flex-direction:column;gap:3px;background:#f7f9fa;border:1px solid #e6eaed;border-radius:10px;padding:12px 14px}
#gestion .closing-flow strong{font-size:12.5px;color:#15191f}#gestion .closing-flow span{font-size:12px;color:#67727e}
/* Desplegables de las pantallas con flecha propia */
#gestion details>summary{list-style:none;cursor:pointer}
#gestion details>summary::-webkit-details-marker{display:none}
#gestion details:not(.menu-mas)>summary{display:flex;align-items:center;gap:8px;font-weight:600;font-size:13px}
#gestion details:not(.menu-mas)>summary::before{content:"";width:6px;height:6px;border-right:1.7px solid #8a929c;border-bottom:1.7px solid #8a929c;transform:rotate(-45deg);transition:transform .15s;flex:none}
#gestion details:not(.menu-mas)[open]>summary::before{transform:rotate(45deg)}
@media(max-width:800px){#gestion .closing-flow{grid-template-columns:1fr}}

/* Avisos emergentes */
.toast{display:flex;align-items:center;gap:10px;bottom:24px!important;right:24px!important;padding:12px 16px 12px 14px!important;border-radius:12px!important;background:#15191f!important;color:#fff!important;font-size:13px;font-weight:500;box-shadow:0 16px 40px -12px rgba(17,20,25,.5)!important;animation:toastIn .22s ease-out}
.toast::before{content:"";width:18px;height:18px;flex:none;border-radius:50%;background:#2f9e6b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/11px no-repeat}
.toast.error{background:#fff!important;color:#15191f!important;border:1px solid #f3c3cd;box-shadow:0 16px 40px -12px rgba(170,53,72,.35)!important}
.toast.error::before{background:#aa3548 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center/12px no-repeat}
@keyframes toastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.toast{animation:none}}
#gestion .kpi[data-tone=wait],#gestion .kpi[data-tone=risk]{background:#fff!important;border-color:#e0e4e8!important}

/* Menú Mi cuenta */
.cuenta-menu{position:relative}
.cuenta-menu>summary{list-style:none;display:flex;align-items:center;gap:8px;cursor:pointer;padding:4px 10px 4px 4px;border-radius:999px;border:1px solid transparent}
.cuenta-menu>summary::-webkit-details-marker{display:none}
.cuenta-menu>summary:hover,.cuenta-menu[open]>summary{background:#f0f3f4;border-color:#e3e7ea}
.cuenta-avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#2A8D79,#57BEB0);color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.cuenta-nombre{font-size:12.5px;font-weight:500;color:#15191f}
.cuenta-menu>div{position:absolute;right:0;top:calc(100% + 8px);z-index:50;width:250px;background:#fff;border:1px solid #e0e4e8;border-radius:12px;box-shadow:0 16px 40px -14px rgba(17,20,25,.35);padding:6px;display:flex;flex-direction:column}
.cuenta-info{display:flex;flex-direction:column;gap:2px;padding:10px 12px 12px;border-bottom:1px solid #eef1f3;margin-bottom:4px}
.cuenta-info b{font-size:13px;color:#15191f}.cuenta-info small{font-size:11.5px;color:#67727e}
.cuenta-menu>div button{background:transparent!important;border:0!important;color:#15191f!important;text-align:left;padding:9px 12px!important;border-radius:8px;font-size:13px;font-weight:500;box-shadow:none!important}
.cuenta-menu>div button:hover{background:#f1f4f5!important}
.cuenta-menu>div .cuenta-salir{color:#aa3548!important;border-top:1px solid #eef1f3!important;border-radius:0 0 8px 8px;margin-top:4px}
@media(max-width:700px){.cuenta-nombre{display:none}}
