/* Sistema Sana Tu Deuda V9.0.1 · Meta→Mis Leads + selección CRM visible */

/* Leads */
#advisorViewLeads .advisorTableWrap{max-height:calc(100dvh - 355px);min-height:280px;overflow:auto!important;overscroll-behavior:contain}
#advisorViewLeads .leadTable8148{min-width:1180px}
#advisorViewLeads tr.leadSelected81645>td,
#advisorViewLeads tr.selected>td{background:#eaf8ff!important;box-shadow:inset 0 1px #9bdff5,inset 0 -1px #9bdff5}
#advisorViewLeads .leadPager8148{position:sticky;bottom:0;background:#fff;z-index:4;border-top:1px solid #e5eef8}
.stdV9LeadError{margin-top:10px}.stdV9LeadError button{border:0;border-radius:12px;padding:10px 16px;background:#008fbd;color:#fff;font-weight:800;cursor:pointer}

/* CRM selección múltiple */
#viewCRM tr[data-crm-row]{cursor:pointer}
#viewCRM tr[data-crm-row].stdRowSelected>td{background:#d7efff!important;background-color:#d7efff!important;border-top-color:#59b9ed!important;border-bottom-color:#59b9ed!important;box-shadow:inset 0 2px #59b9ed,inset 0 -2px #59b9ed!important}
#viewCRM tr[data-crm-row].stdRowSelected>td:first-child{box-shadow:inset 5px 0 #0784ca,inset 0 2px #59b9ed,inset 0 -2px #59b9ed!important}
#viewCRM tr[data-crm-row].stdRowSelected>td:last-child{box-shadow:inset -2px 0 #59b9ed,inset 0 2px #59b9ed,inset 0 -2px #59b9ed!important}
#viewCRM tr[data-crm-row].stdRowSelected{outline:2px solid rgba(7,132,202,.35)!important;outline-offset:-2px}
.stdV9CrmBulk{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:10px 12px;margin:10px 0;border:1px solid #bee8f7;border-radius:14px;background:#f2fbff;box-shadow:0 8px 20px rgba(14,45,96,.06)}
.stdV9CrmBulkCount{display:flex;align-items:baseline;gap:6px;color:#0e2d60;min-width:125px}.stdV9CrmBulkCount b{font-size:20px}.stdV9CrmBulk label{display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:800;color:#475569}.stdV9CrmBulk select{min-width:220px;height:38px;border:1px solid #cfe0ef;border-radius:10px;background:#fff;padding:0 10px}.stdV9CrmBulk button{height:38px;border:0;border-radius:10px;padding:0 15px;background:#0e2d60;color:#fff;font-weight:800;cursor:pointer}.stdV9CrmBulk button:last-child{background:#fff;color:#0e2d60;border:1px solid #cfe0ef}

/* Diálogo CRM: nunca debe arrancar fuera del viewport */
#dlgCliente.stdDialog,#dlgCliente{width:min(1180px,calc(100vw - 24px))!important;max-width:1180px!important;max-height:calc(100dvh - 16px)!important;margin:auto!important;overflow:hidden!important}
#dlgCliente .dlgHead{padding:12px 16px!important;min-height:64px}
#dlgCliente .dlgHead h3{font-size:22px!important;line-height:1.1!important}
#dlgCliente .dlgBody{padding:10px 16px 12px!important;overflow:hidden!important;transform-origin:top left}
#dlgCliente .clientTabs{margin-bottom:8px!important}
#dlgCliente .detailGrid{gap:8px!important;margin-bottom:8px!important}
#dlgCliente .detailField{padding:9px 11px!important;border-radius:13px!important}
#dlgCliente .detailField small{font-size:10px!important}
#dlgCliente .detailField b{margin-top:3px!important}
#dlgCliente .waBox{padding:9px 12px!important;margin-bottom:8px!important;border-radius:14px!important}
#dlgCliente .movementGroups{gap:8px!important;margin-top:7px!important}
#dlgCliente .movementGroup{padding:9px!important;border-radius:13px!important}
#dlgCliente .movementGroup>span{margin-bottom:6px!important;font-size:10px!important}
#dlgCliente .movementBtn{min-height:36px!important;padding:7px 10px!important}
#dlgCliente .stdClientModalActions{margin:0 0 7px!important}
#dlgCliente .stdV9DialogScrollable{overflow:auto!important;max-height:calc(100dvh - 86px)!important}

/* Títulos/íconos de Configuración */
#pageTitle .titleIcon svg{width:25px!important;height:25px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;stroke-linecap:round!important;stroke-linejoin:round!important}
#mainNav [data-view="mail"] svg,#mainNav [data-view="activity"] svg{fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;stroke-linecap:round!important;stroke-linejoin:round!important}

/* Última acción CRM: semáforo solicitado */
#viewCRM .lastAction .dot.red{background:#ef4444!important;box-shadow:0 0 0 3px rgba(239,68,68,.14)!important}
#viewCRM .lastAction .dot.green{background:#16a34a!important;box-shadow:0 0 0 3px rgba(22,163,74,.14)!important}
#viewCRM .lastAction .dot.blue{background:#2563eb!important;box-shadow:0 0 0 3px rgba(37,99,235,.14)!important}

@media(max-width:900px){
  #dlgCliente.stdDialog,#dlgCliente{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}
  #dlgCliente .dlgBody{zoom:1!important;overflow:auto!important;max-height:calc(100dvh - 65px)!important}
  #advisorViewLeads .advisorTableWrap{max-height:calc(100dvh - 320px)}
}
