
:root{--azul:#0e2d60;--azul2:#123f82;--celeste:#19b7e8;--turq:#00b3a1;--ink:#102033;--muted:#637083;--bg:#f4f8fc;--card:#fff;--line:#dfe9f4;--danger:#e5484d;--warn:#d89000;--ok:#12a36a;--purple:#6b35d7;--shadow:0 18px 45px rgba(14,45,96,.10)}
*{box-sizing:border-box}html,body{height:100%;margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:var(--ink);background:radial-gradient(circle at top left,rgba(25,183,232,.16),transparent 34%),linear-gradient(135deg,#eef5fb,#f8fbff)}button,input,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.authOverlay{position:fixed;inset:0;background:rgba(7,17,33,.86);display:flex;align-items:center;justify-content:center;z-index:9999;padding:22px}.authCard{width:min(430px,95vw);background:#fff;border-radius:24px;padding:22px;box-shadow:0 30px 90px rgba(0,0,0,.35)}.authBrand{display:flex;gap:12px;align-items:center;margin-bottom:18px}.authBrand img{width:70px;height:70px;object-fit:contain}.authBrand b{display:block;font-size:24px;color:var(--azul)}.authBrand span{display:block;color:var(--muted);font-size:13px}.authTabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:#eff6fb;border:1px solid #dce9f5;padding:6px;border-radius:16px;margin-bottom:12px}.authTabs button{border:0;background:transparent;border-radius:12px;padding:10px;font-weight:800;color:var(--azul)}.authTabs button.active{background:linear-gradient(135deg,var(--azul),#1560b2);color:#fff;box-shadow:0 10px 20px rgba(14,45,96,.22)}label{display:block;font-size:12px;font-weight:800;color:#344255;margin:10px 0 6px}.authCard input,.filterBar input,.filterBar select,.reportBuilder input,.reportBuilder select{width:100%;border:1px solid #cfdeea;border-radius:14px;padding:11px 12px;background:#fff;outline:none}.authCard input:focus,.filterBar input:focus,.filterBar select:focus,.reportBuilder input:focus,.reportBuilder select:focus{border-color:var(--celeste);box-shadow:0 0 0 4px rgba(25,183,232,.14)}.primary{border:0;border-radius:14px;padding:12px 16px;background:linear-gradient(135deg,var(--celeste),var(--turq));color:#fff;font-weight:900;box-shadow:0 12px 26px rgba(25,183,232,.23)}.wide{width:100%;margin-top:14px}.authMsg{min-height:20px;font-size:13px;color:var(--warn);margin-top:12px}.authCard small{display:block;color:var(--muted);line-height:1.4;margin-top:8px}
.appShell{min-height:100vh;display:grid;grid-template-columns:270px 1fr}.sidebar{height:100vh;position:sticky;top:0;padding:16px;background:rgba(255,255,255,.9);backdrop-filter:blur(15px);border-right:1px solid var(--line);display:flex;flex-direction:column;gap:14px}.brandBlock{display:flex;gap:12px;align-items:center;padding:10px 8px 16px;border-bottom:1px solid var(--line)}.brandBlock img{width:54px;height:54px;object-fit:contain}.brandBlock strong{display:block;font-size:20px;color:var(--azul);letter-spacing:-.02em}.brandBlock span{display:block;font-size:12px;color:var(--muted)}.nav{display:flex;flex-direction:column;gap:6px;flex:1;overflow:auto}.nav button{border:0;background:transparent;color:#314056;display:flex;align-items:center;gap:12px;padding:12px;border-radius:16px;font-weight:800;text-align:left}.nav button svg{width:22px;height:22px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}.nav button.active{background:linear-gradient(135deg,rgba(25,183,232,.17),rgba(0,179,161,.11));color:var(--azul);box-shadow:inset 0 0 0 1px rgba(25,183,232,.24)}.sideFoot{border-top:1px solid var(--line);padding-top:12px}.sync{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);margin-bottom:10px}.sync span:first-child{width:9px;height:9px;border-radius:99px;background:#aaa}.ghostBtn{border:1px solid var(--line);background:#fff;color:var(--azul);padding:10px 13px;border-radius:14px;font-weight:900;box-shadow:0 8px 18px rgba(14,45,96,.06)}.sideFoot .ghostBtn{width:100%}
.main{min-width:0;padding:18px 22px 38px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.topbar h1{font-size:28px;letter-spacing:-.04em;margin:0;color:var(--azul)}.topbar p{margin:4px 0 0;color:var(--muted)}.topActions{display:flex;align-items:center;gap:12px}.userPill{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:8px 12px;box-shadow:0 10px 24px rgba(14,45,96,.08)}.userPill span{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,var(--azul),var(--celeste));color:#fff;font-weight:900}.userPill b{display:block}.userPill small{display:block;color:var(--muted);font-size:11px}.view{display:none}.view.active{display:block}.card{background:rgba(255,255,255,.95);border:1px solid var(--line);border-radius:24px;padding:18px;box-shadow:var(--shadow)}.grid{display:grid;gap:16px}.grid.kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px}.kpi{position:relative;overflow:hidden}.kpi:after{content:"";position:absolute;right:-35px;top:-45px;width:115px;height:115px;border-radius:50%;background:rgba(25,183,232,.10)}.kpi .t{font-size:12px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.04em}.kpi .v{font-size:29px;font-weight:950;color:var(--azul);margin-top:7px}.kpi .s{font-size:12px;color:var(--muted);margin-top:3px}.layout2{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px}.sectionTitle{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.sectionTitle h2{margin:0;color:var(--azul);letter-spacing:-.02em}.sectionTitle p{margin:3px 0 0;color:var(--muted);font-size:13px}.filterBar{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-bottom:14px;align-items:end}.filterBar input{min-width:240px}.filterBar select,.filterBar button{min-height:43px}.tableWrap{overflow:auto;border:1px solid var(--line);border-radius:18px;background:#fff}.stdTable{width:100%;border-collapse:separate;border-spacing:0;min-width:1180px}.stdTable th.respCol,.stdTable td.respCol{min-width:150px}.stdTable th{position:sticky;top:0;background:#f4f9fe;color:#314056;text-align:left;padding:12px;font-size:12px;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--line)}.stdTable td{padding:12px;border-bottom:1px solid #edf2f7;font-size:13px;vertical-align:middle}.stdTable tr:hover td{background:#f9fdff}.pill{display:inline-flex;align-items:center;gap:6px;border:1px solid #dbe7f2;background:#f6fbff;color:var(--azul);border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900}.pill.ok{background:#eafbf2;color:#087a4b;border-color:#bdeece}.pill.warn{background:#fff6e6;color:#995d00;border-color:#ffdca1}.pill.danger{background:#fff0f0;color:#b71c1c;border-color:#ffc7c7}.pill.purple{background:#f4efff;color:#5724bd;border-color:#ddd0ff}.toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.miniBtn{border:1px solid var(--line);background:#fff;border-radius:11px;padding:8px 10px;color:var(--azul);font-weight:900;margin:2px;white-space:nowrap}.miniBtn.primary{background:linear-gradient(135deg,var(--celeste),var(--turq));color:#fff;border:0}.miniBtn.green{background:#16a34a;color:#fff;border:0}.miniBtn.blue{background:#2563eb;color:#fff;border:0}.miniBtn.purple{background:#6b35d7;color:#fff;border:0}.miniBtn.orange{background:#f97316;color:#fff;border:0}.miniBtn.red{background:#ef4444;color:#fff;border:0}.empty{padding:18px;color:var(--muted);text-align:center}.moduleGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.moduleCard{min-height:170px;display:flex;flex-direction:column;justify-content:space-between}.moduleCard svg{width:34px;height:34px;stroke:var(--celeste);stroke-width:2;fill:none}.moduleCard h3{margin:14px 0 8px;color:var(--azul)}.moduleCard p{margin:0;color:var(--muted);line-height:1.45}.activity{display:flex;flex-direction:column;gap:10px}.activityItem{display:flex;gap:10px;padding:11px;border:1px solid var(--line);background:#fff;border-radius:16px}.activityIcon{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:#ecfbff;color:var(--azul);font-weight:900}.stdDialog{width:min(1040px,94vw);border:0;border-radius:24px;padding:0;box-shadow:0 30px 90px rgba(0,0,0,.3)}.stdDialog::backdrop{background:rgba(7,17,33,.55)}.dlgHead{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line)}.dlgHead h3{margin:0;color:var(--azul);font-size:24px}.dlgHead p{margin:4px 0 0;color:var(--muted)}.dlgHead button{border:1px solid var(--line);background:#fff;border-radius:12px;font-size:22px;width:42px;height:42px}.dlgBody{padding:20px}.detailGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.detailField{border:1px solid var(--line);border-radius:16px;padding:13px;background:#f9fcff}.detailField small{display:block;color:var(--muted);font-weight:800;text-transform:uppercase;font-size:11px}.detailField b{display:block;margin-top:5px;color:var(--azul);word-break:break-word}.actionsBox{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 16px}.waBox{background:linear-gradient(135deg,#e8fff4,#effcff);border:1px solid #c9f2df;border-radius:18px;padding:14px;margin-bottom:14px}.movementsBox{background:linear-gradient(135deg,#f7fbff,#eefcff);border-color:#d9edf8}.movementGroups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}.movementGroup{background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px}.movementGroup span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:950;color:var(--muted);margin-bottom:8px}.movementGroup div{display:flex;gap:8px;flex-wrap:wrap}.checkGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.checkGrid label{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px;margin:0}.reportBuilder{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.rightPanel{display:flex;flex-direction:column;gap:16px}.hideForUser{display:block}.userMode .hideForUser{display:none!important}.userMode .grid.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.userMode .layout2{grid-template-columns:1fr}.userMode .filterBar{grid-template-columns:1.5fr 1fr 1fr .8fr}.note{font-size:12px;color:var(--muted);line-height:1.45}.moneyGeneral{font-weight:950;color:var(--azul)}.moneyAlt{font-weight:950;color:var(--purple)}
@media(max-width:1100px){.appShell{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.grid.kpis{grid-template-columns:repeat(2,1fr)}.layout2,.moduleGrid{grid-template-columns:1fr}.filterBar,.reportBuilder,.detailGrid{grid-template-columns:1fr}.stdTable{min-width:1000px}}

.responsableChip{display:inline-flex;max-width:140px;white-space:normal;line-height:1.2;background:#f6fbff;border:1px solid #dbe7f2;border-radius:12px;padding:6px 8px;font-size:12px;font-weight:800;color:var(--azul)}
@media(max-width:1100px){.movementGroups{grid-template-columns:1fr}.filterBar input{min-width:0}}


/* V4.5 ajustes CRM: tabs + movimientos separados */
.clientTabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin:-4px 0 18px;padding-bottom:10px;position:sticky;top:0;background:rgba(255,255,255,.96);z-index:3}
.tabBtn{border:1px solid var(--line);background:#fff;color:var(--azul);font-weight:950;border-radius:14px;padding:10px 14px;box-shadow:0 8px 18px rgba(14,45,96,.05)}
.tabBtn.active{background:linear-gradient(135deg,var(--azul),var(--celeste));color:#fff;border-color:transparent;box-shadow:0 12px 24px rgba(14,45,96,.18)}
.tabPane{display:none;animation:fadeIn .13s ease-out}.tabPane.active{display:block}@keyframes fadeIn{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:none}}
.tabHeader{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin:0 0 12px}.tabHeader h3{margin:0;color:var(--azul);font-size:20px}.tabHeader p{margin:4px 0 0;color:var(--muted);font-size:13px}
.miniBtn.stdBlue{background:linear-gradient(135deg,var(--celeste),#0e9bd2);color:#fff;border:0}.miniBtn.stdGreen{background:linear-gradient(135deg,var(--turq),#16a34a);color:#fff;border:0}.miniBtn.red{background:#ef4444;color:#fff;border:0}
.movementGroups{grid-template-columns:repeat(3,minmax(210px,1fr));gap:14px}.movementGroup{padding:14px}.movementGroup div{gap:10px}.movementGroup .miniBtn{margin:0 0 4px 0}.movementsBox>b{display:block;font-size:18px;color:var(--azul);margin-bottom:2px}.waBox.movementsBox{margin-top:4px}
.creditorGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.creditorCard{border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,#fff,#f8fcff);padding:14px;box-shadow:0 10px 22px rgba(14,45,96,.06)}.creditorCard small{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;font-weight:900;letter-spacing:.04em}.creditorCard b{display:block;color:var(--azul);font-size:16px;margin:5px 0}.creditorCard span{display:block;color:var(--muted);font-size:12px;line-height:1.35}.empty.soft{border:1px dashed var(--line);border-radius:18px;background:#f8fcff;color:var(--muted);padding:18px;text-align:center}
.responsableChip{max-width:none;min-width:120px;display:inline-flex;justify-content:center;text-align:center;padding:7px 10px;border-radius:999px;white-space:nowrap;background:#edf9ff;border-color:#cfeafa}
@media(max-width:900px){.movementGroups{grid-template-columns:1fr}.clientTabs{overflow:auto}.detailGrid{grid-template-columns:1fr 1fr}.tabHeader{display:block}}


/* V4.6 ajustes solicitados */
.sectionTitle p,.tabHeader p{display:none!important}
.crmTable{min-width:1320px}
.crmTable th,.crmTable td{vertical-align:middle}
.stdTable th.respCol,.stdTable td.respCol{width:132px!important;min-width:132px!important;max-width:132px!important;text-align:center;background:transparent!important}
.responsableChip{max-width:112px!important;min-width:0!important;width:auto!important;padding:6px 9px!important;border-radius:999px!important;white-space:normal!important;line-height:1.15!important;text-align:center!important;justify-content:center!important;background:#f1fbff!important;border-color:#cfeafa!important;font-size:11px!important}
.lastAction{min-width:118px;display:flex;flex-direction:column;gap:3px;align-items:flex-start}
.lastAction b{font-size:12px;color:var(--azul);line-height:1.15}
.lastAction small{font-size:11px;color:var(--muted);font-weight:800}
.actionsCell{min-width:110px;white-space:normal}.actionsCell .miniBtn{display:block;width:96px;margin:3px 0;text-align:center;padding:7px 8px}
.movementGroups{gap:16px}.movementGroup{padding:15px}.movementGroup div{gap:10px}.movementGroup .miniBtn{margin:2px 0}

/* V4.7 CRM clean table: responsable + última acción */
.crmTable{min-width:1280px!important;table-layout:fixed!important}
.crmTable th,.crmTable td{padding:14px 12px!important;background:#fff!important}
.crmTable tr:hover td{background:#fbfdff!important}
.crmTable .clientCol{width:210px!important}
.crmTable th.respCol,.crmTable td.respCol{width:170px!important;min-width:170px!important;max-width:170px!important;text-align:left!important;background:#fff!important}
.crmTable .lastCol{width:190px!important;min-width:190px!important}
.crmTable .actCol{width:130px!important}
.responsableChip{display:none!important}
.respSelect{width:150px;border:1px solid #cfdeea;border-radius:10px;background:#fff;color:var(--ink);padding:9px 10px;font-weight:800;outline:none;box-shadow:0 6px 14px rgba(14,45,96,.05)}
.respSelect:focus{border-color:var(--celeste);box-shadow:0 0 0 4px rgba(25,183,232,.14)}
.respState{display:inline-flex;align-items:center;justify-content:center;margin-top:7px;border-radius:999px;padding:4px 9px;font-size:10px;font-weight:950;border:1px solid #dbe7f2;background:#f6fbff;color:var(--muted)}
.respState.assigned{background:#eafbf2;color:#087a4b;border-color:#bdeece}
.respState.empty{background:#f7fbff;color:#526179}
.lastAction{display:grid!important;grid-template-columns:10px 1fr;align-items:start;gap:8px;min-width:170px;line-height:1.25}
.lastAction .dot{width:8px;height:8px;border-radius:99px;margin-top:5px;background:#94a3b8;box-shadow:0 0 0 3px rgba(148,163,184,.12)}
.lastAction .dot.green{background:#14a86b;box-shadow:0 0 0 3px rgba(20,168,107,.13)}
.lastAction .dot.red{background:#e5484d;box-shadow:0 0 0 3px rgba(229,72,77,.13)}
.lastAction .dot.blue{background:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.13)}
.lastAction .dot.orange{background:#f97316;box-shadow:0 0 0 3px rgba(249,115,22,.13)}
.lastAction b{display:block;font-size:12px!important;color:var(--azul)!important;line-height:1.2!important}
.lastAction small{display:block;font-size:11px!important;color:var(--muted)!important;font-weight:800!important;margin-top:2px!important}
.actionsCell{width:130px!important;min-width:130px!important}.actionsCell .miniBtn{display:flex!important;align-items:center;justify-content:center;width:108px!important;margin:4px 0!important;border-radius:10px!important;min-height:31px!important;padding:7px 8px!important}
.actionsCell .miniBtn:first-child{background:#fff!important;color:var(--azul)!important;border:1px solid #dbe7f2!important}
.filterBar input{min-width:260px}.filterBar{grid-template-columns:minmax(260px,1.8fr) repeat(4,minmax(150px,1fr)) minmax(120px,.8fr)!important}
.tabHeader{display:none!important}.sectionTitle p{display:none!important}

/* STD ERP V5 - CRM diseño final */
.dashboardWide{width:100%;}
.layout2{grid-template-columns:1fr!important;}
.rightPanel{display:none!important;}
.cleanTitle p{display:none!important;}
.crmFilters{grid-template-columns:minmax(260px,1.8fr) repeat(4,minmax(150px,1fr)) minmax(130px,.7fr);}
.crmTable{min-width:1320px;}
.crmTable th.clientCol,.crmTable td.clientCol{min-width:210px;}
.crmTable th.respCol,.crmTable td.respCol{min-width:190px!important;width:190px;}
.respControl{display:flex;flex-direction:column;align-items:flex-start;gap:6px;max-width:180px;}
.respSelect{width:170px!important;max-width:170px!important;height:39px!important;border:1px solid #cfdeea;border-radius:11px;background:#fff;color:var(--ink);padding:8px 34px 8px 11px;font-weight:850;outline:none;box-shadow:0 7px 16px rgba(14,45,96,.05);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.respState{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:4px 9px;font-size:10.5px;font-weight:950;border:1px solid #c9e8d4;line-height:1;background:#eafbf2;color:#087a4b;}
.respState.empty{background:#f6fbff;color:#496174;border-color:#dbe7f2;}
.lastCol{min-width:190px!important;width:190px;}
.lastAction{min-width:165px!important;}
.actionsCell{width:142px!important;min-width:142px!important;}
.actionsCell .actionBtn{width:118px!important;min-height:33px!important;gap:7px!important;}
.actionBtn,.movementBtn,.iconBtn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;}
.btnSvg{width:16px;height:16px;stroke:currentColor;stroke-width:2.1;fill:none;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto;}
.actionBtn span,.movementBtn span{line-height:1;}
.actionBtn.view{background:#fff!important;color:var(--azul)!important;border:1px solid #dbe7f2!important;}
.movementGroups{grid-template-columns:repeat(3,minmax(240px,1fr))!important;gap:16px!important;align-items:stretch;}
.movementGroup{min-height:116px;display:flex;flex-direction:column;justify-content:space-between;}
.movementGroup div{display:flex;gap:10px;flex-wrap:wrap;}
.movementBtn{min-height:36px!important;padding:9px 12px!important;border-radius:12px!important;margin:0!important;}
.waBox.movementsBox{background:linear-gradient(135deg,#f8fbff,#eefcff);}
.stdTable td,.stdTable th{white-space:normal;}
@media(max-width:1300px){.crmFilters{grid-template-columns:1fr 1fr 1fr}.crmTable{min-width:1280px}.grid.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.movementGroups{grid-template-columns:1fr!important}}


/* STD ERP V5.1 ajustes: dashboard limpio + iconos centrados */
.dashboardTableWrap{overflow:auto;}
.dashCrmTable{min-width:940px!important;table-layout:auto!important;}
.dashCrmTable th,.dashCrmTable td{padding:13px 12px!important;vertical-align:middle!important;white-space:normal!important;}
.dashCrmTable th:nth-child(1),.dashCrmTable td:nth-child(1){min-width:210px;}
.dashCrmTable th:nth-child(2),.dashCrmTable td:nth-child(2){min-width:160px;}
.dashCrmTable th:nth-child(6),.dashCrmTable td:nth-child(6){min-width:190px;}
.dashCrmTable .actionBtn{width:92px!important;margin:0!important;}
.movementGroup > span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:950;color:var(--muted);margin-bottom:10px;}
.movementBtn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;text-align:center!important;line-height:1!important;color:#fff!important;}
.movementBtn span{display:inline!important;margin:0!important;font-size:12px!important;text-transform:none!important;letter-spacing:0!important;font-weight:900!important;color:inherit!important;line-height:1!important;}
.movementBtn .btnSvg,.actionBtn .btnSvg,.iconBtn .btnSvg{display:block!important;margin:0!important;align-self:center!important;}
.actionBtn{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:7px!important;}
.actionBtn span{display:inline!important;margin:0!important;line-height:1!important;color:inherit!important;font-weight:900!important;}
.stdGreen{background:linear-gradient(135deg,#00b3a1,#16a34a)!important;color:#fff!important;}
.stdBlue{background:linear-gradient(135deg,#19b7e8,#0e9bd2)!important;color:#fff!important;}

/* STD ERP V5.2 - botón correo en comprobantes */
.mailBtn{background:linear-gradient(135deg,#0e2d60,#19b7e8)!important;color:#fff!important;border:0!important;}
.movementGroup:nth-child(2) div{align-items:center;}
.movementGroup:nth-child(2) .movementBtn{min-width:170px;}

/* STD ERP V5.5 - Cobranza diseño aprobado exacto */
#viewCobranza .card{display:none!important}
.cobranzaShell{width:100%;}
#viewCobranza{padding-bottom:28px;}
#pageTitle{font-size:30px!important;letter-spacing:-.8px!important;}
#pageSub{font-size:15px!important;color:#526179!important;}
.cobFilters{display:grid;grid-template-columns:minmax(260px,1.5fr) minmax(190px,1fr) minmax(190px,1fr) minmax(190px,1fr) 120px;gap:14px;margin:8px 0 22px;align-items:stretch;}
.userMode .cobFilters{grid-template-columns:minmax(260px,1.5fr) minmax(190px,1fr) minmax(190px,1fr) 120px;}
.cobFilters label,.searchBox{height:62px;border:1px solid #dbe7f2;border-radius:12px;background:#fff;box-shadow:0 10px 25px rgba(14,45,96,.04);display:flex;align-items:center;}
.cobFilters label{flex-direction:column;align-items:flex-start;justify-content:center;padding:0 16px;gap:2px;}
.cobFilters label span{font-size:11px;font-weight:900;color:#66758d;line-height:1;text-transform:none;}
.cobFilters select{border:0;background:transparent;width:100%;padding:0;color:var(--ink);font-size:14px;font-weight:800;outline:none;}
.searchBox{padding:0 16px;gap:12px;}
.searchBox input{border:0;outline:none;flex:1;height:100%;font-size:14px;font-weight:700;color:var(--ink);background:transparent;}
.searchBox input::placeholder{color:#8592a8;font-weight:700;}
.searchBox .btnSvg{width:20px;height:20px;color:#233b60;opacity:.8;}
.cobClear{height:62px;border:1px solid #dbe7f2;border-radius:12px;background:#fff;color:var(--azul);font-weight:950;font-size:14px;display:flex;align-items:center;justify-content:center;gap:9px;box-shadow:0 10px 25px rgba(14,45,96,.04);cursor:pointer;}
.cobClear .btnSvg{width:17px;height:17px;}
.cobKpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 18px;}
.cobKpi{height:122px;border:1px solid #dbe7f2;border-radius:16px;background:#fff;box-shadow:0 12px 28px rgba(14,45,96,.05);display:flex;align-items:center;gap:16px;padding:22px;position:relative;overflow:hidden;}
.cobKpi:after{content:"";position:absolute;right:-17px;top:-34px;width:92px;height:92px;border-radius:999px;background:rgba(25,183,232,.09);}
.kpiIcon{width:54px;height:54px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;}
.kpiIcon .btnSvg{width:27px;height:27px;stroke-width:2.1;}
.kpiIcon.clients{background:#eaf3ff;color:#1d67d8;}.kpiIcon.saldo{background:#e8fbf1;color:#0ba66c;}.kpiIcon.vista{background:#f1e8ff;color:#6d32d9;}.kpiIcon.calendar{background:#fff4d9;color:#d89200;}.kpiIcon.alert{background:#fff0f0;color:#e5484d;}.kpiIcon.contract{background:#eef7ff;color:#0e76bd;}
.cobKpi span{display:block;font-size:13px;color:#66758d;font-weight:850;line-height:1.1;text-transform:none;}
.cobKpi b{display:block;color:var(--azul);font-size:28px;font-weight:1000;line-height:1;margin:5px 0 6px;letter-spacing:-.7px;}
.cobKpi small{display:block;color:#66758d;font-size:12px;font-weight:700;}
.cobTableWrap{border:1px solid #dbe7f2;border-radius:16px;background:#fff;box-shadow:0 14px 34px rgba(14,45,96,.06);overflow:hidden;}
.cobTableExact{width:100%;border-collapse:collapse;table-layout:fixed;}
.cobTableExact thead th{height:54px;background:#f8fbff;color:#334155;font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.04em;text-align:left;border-bottom:1px solid #dbe7f2;padding:0 18px;white-space:nowrap;}
.cobTableExact tbody td{height:104px;border-bottom:1px solid #edf2f7;padding:16px 18px;color:#0f2345;font-size:13px;font-weight:750;vertical-align:middle;background:#fff;}
.cobTableExact tbody tr:last-child td{border-bottom:0;}
.cobTableExact th:nth-child(1),.cobTableExact td:nth-child(1){width:28%;}.cobTableExact th:nth-child(2),.cobTableExact td:nth-child(2){width:10%;}.cobTableExact th:nth-child(3),.cobTableExact td:nth-child(3){width:12%;}.cobTableExact th:nth-child(4),.cobTableExact td:nth-child(4){width:11%;}.cobTableExact th:nth-child(5),.cobTableExact td:nth-child(5){width:14%;}.cobTableExact th:nth-child(6),.cobTableExact td:nth-child(6){width:11%;}.cobTableExact th:nth-child(7),.cobTableExact td:nth-child(7){width:14%;}
.cobClient{display:flex;align-items:center;gap:15px;min-width:0;}.avatarCob{width:50px;height:50px;border-radius:999px;display:flex;align-items:center;justify-content:center;font-weight:1000;font-size:15px;flex:0 0 auto;}.avatarCob.a0{background:#eaf3ff;color:#1d67d8}.avatarCob.a1{background:#eafbe9;color:#2d9c2d}.avatarCob.a2{background:#f2e8ff;color:#6d32d9}.avatarCob.a3{background:#ffe9ef;color:#ca3747}.avatarCob.a4{background:#fff4d9;color:#d89200}
.cobClient b{display:block;font-size:14px;color:#071d3f;font-weight:1000;line-height:1.18;margin-bottom:4px;}.cobClient small,.cobClient em{display:block;color:#496174;font-size:12px;font-weight:750;line-height:1.35;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px;}
.payDate{display:flex;align-items:flex-start;gap:9px;}.payDate .btnSvg{width:17px;height:17px;color:#233b60;margin-top:1px;}.payDate span{display:block;font-size:12px;color:#0f2345;font-weight:900;margin-bottom:2px;}.payDate b{display:block;font-size:13px;color:#0f2345;font-weight:950;line-height:1.25;}
.statusBadge{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:999px;padding:9px 14px;font-size:12px;font-weight:950;line-height:1;white-space:nowrap;}.statusBadge.ok,.statusBadge.green{background:#e8fbf1!important;color:#0b8f5d!important;border:0!important;}.statusBadge.warn{background:#fff4dc!important;color:#c07a00!important;border:0!important;}.statusBadge.danger,.statusBadge.red{background:#ffe6ec!important;color:#d33b48!important;border:0!important;}
.cobActions{display:grid;grid-template-columns:1fr 20px;grid-template-rows:36px 36px;gap:8px 8px;align-items:center;}.waBtn,.payBtn{height:36px;border-radius:8px;font-size:12px;font-weight:950;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;background:#fff;}.waBtn{border:1px solid #19b978;color:#0a9c62;}.payBtn{border:1px solid #1769e8;color:#1769e8;}.waBtn .btnSvg,.payBtn .btnSvg{width:16px;height:16px;}.moreBtn{grid-row:1 / span 2;grid-column:2;width:20px;height:80px;border:0;background:transparent;color:#071d3f;font-size:24px;font-weight:900;cursor:pointer;}
.cobPager{height:58px;border-top:1px solid #edf2f7;display:flex;align-items:center;justify-content:space-between;padding:0 16px;color:#66758d;font-size:12px;font-weight:750;}.cobPager div{display:flex;gap:8px;align-items:center;}.cobPager button{min-width:34px;height:34px;border:1px solid #dbe7f2;background:#fff;border-radius:8px;color:#0e2d60;font-weight:850;}.cobPager button.active{background:#eaf3ff;border-color:#bfd7ff;color:#1769e8;}
.userMode .cobKpis .cobKpi:nth-child(1),.userMode .cobKpis .cobKpi:nth-child(2),.userMode .cobKpis .cobKpi:nth-child(3),.userMode .cobKpis .cobKpi:nth-child(4){display:flex;}
@media(max-width:1320px){.cobFilters{grid-template-columns:1fr 1fr 1fr}.userMode .cobFilters{grid-template-columns:1fr 1fr}.cobKpis{grid-template-columns:repeat(2,minmax(0,1fr));}.cobTableWrap{overflow:auto}.cobTableExact{min-width:1080px;}}


/* STD ERP V5.7 - Ajuste final: responsable, iconos de cobranza y botones centrados */
.nav button[data-view="cobranza"] svg{
  transform:none!important;
}
.nav button[data-view="cobranza"] svg path{
  stroke-width:2.15!important;
}

/* CRM: evita que Responsable se encime con Plan */
.crmTable{
  min-width:1420px!important;
  table-layout:fixed!important;
}
.crmTable th.clientCol,.crmTable td.clientCol{width:230px!important;min-width:230px!important;}
.crmTable th:nth-child(2),.crmTable td:nth-child(2){width:130px!important;min-width:130px!important;}
.crmTable th:nth-child(3),.crmTable td:nth-child(3){width:120px!important;min-width:120px!important;}
.crmTable th.respCol,.crmTable td.respCol{
  width:210px!important;
  min-width:210px!important;
  max-width:210px!important;
  padding-left:14px!important;
  padding-right:14px!important;
  overflow:visible!important;
  background:#fff!important;
}
.crmTable th:nth-child(5),.crmTable td:nth-child(5){width:95px!important;min-width:95px!important;padding-left:18px!important;}
.crmTable th:nth-child(6),.crmTable td:nth-child(6){width:80px!important;min-width:80px!important;}
.crmTable th:nth-child(7),.crmTable td:nth-child(7){width:110px!important;min-width:110px!important;}
.crmTable th:nth-child(8),.crmTable td:nth-child(8){width:105px!important;min-width:105px!important;}
.crmTable th:nth-child(9),.crmTable td:nth-child(9){width:100px!important;min-width:100px!important;}
.crmTable th.lastCol,.crmTable td.lastCol{width:170px!important;min-width:170px!important;}
.crmTable th.actCol,.crmTable td.actCol{width:126px!important;min-width:126px!important;}
.respControl{
  width:184px!important;
  max-width:184px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:6px!important;
  overflow:hidden!important;
}
.respSelect{
  width:184px!important;
  max-width:184px!important;
  min-width:184px!important;
  height:39px!important;
  box-sizing:border-box!important;
  font-size:12.5px!important;
  line-height:1.1!important;
  padding:8px 30px 8px 11px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.respState{
  margin:0!important;
  max-width:184px!important;
  white-space:nowrap!important;
}

/* Cobranza: icono + en Registrar pago sin encimar */
.payBtn{
  min-width:150px!important;
  padding:0 12px!important;
  gap:9px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.payBtn .btnSvg{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  stroke-width:2.4!important;
  margin:0!important;
}
.payBtn span,.waBtn span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1.05!important;
  margin:0!important;
  color:inherit!important;
}
.waBtn .btnSvg{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
}
.cobActions{
  justify-items:stretch!important;
  align-items:center!important;
}


/* STD ERP V5.8 - CRM limpio sin saldos en tabla; saldos solo dentro de Ver */
#viewCRM .card .grid.kpis,
#viewCRM .crmSummaryCards,
#viewCRM .bigKpis{display:none!important;}
.crmTable{min-width:1260px!important;table-layout:fixed!important;}
.crmTable th.clientCol,.crmTable td.clientCol{width:230px!important;min-width:230px!important;}
.crmTable th:nth-child(2),.crmTable td:nth-child(2){width:145px!important;min-width:145px!important;}
.crmTable th:nth-child(3),.crmTable td:nth-child(3){width:125px!important;min-width:125px!important;}
.crmTable th.respCol,.crmTable td.respCol{width:205px!important;min-width:205px!important;max-width:205px!important;}
.crmTable th:nth-child(5),.crmTable td:nth-child(5){width:100px!important;min-width:100px!important;}
.crmTable th:nth-child(6),.crmTable td:nth-child(6){width:90px!important;min-width:90px!important;}
.crmTable th:nth-child(7),.crmTable td:nth-child(7){width:105px!important;min-width:105px!important;}
.crmTable th.lastCol,.crmTable td.lastCol{width:170px!important;min-width:170px!important;}
.crmTable th.actCol,.crmTable td.actCol{width:130px!important;min-width:130px!important;}
.respControl{width:176px!important;max-width:176px!important;align-items:center!important;}
.respSelect{width:176px!important;max-width:176px!important;min-width:176px!important;}
.respState{align-self:center!important;}

/* Cobranza: icono del menú como moneda, no descarga */
.nav button[data-view="cobranza"] svg{color:currentColor!important;}
#viewCobranza .kpiIcon.saldo .btnSvg{width:28px!important;height:28px!important;}

/* STD ERP V5.9 - CRM final como referencia aprobada: sin cards grandes, responsable limpio */
#viewCRM .card{display:none!important;}
.crmFinalShell{width:100%;border:1px solid #dbe7f2;border-radius:18px;background:#fff;box-shadow:0 14px 34px rgba(14,45,96,.06);padding:18px;margin-top:8px;overflow:hidden;}
.crmFinalHead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;}
.crmFinalHead h2{margin:0;color:var(--azul);font-size:22px;font-weight:1000;letter-spacing:-.35px;}
.crmFiltersFinal{display:grid!important;grid-template-columns:minmax(280px,1.7fr) minmax(150px,.8fr) minmax(150px,.8fr) minmax(150px,.8fr) minmax(150px,.8fr) 116px!important;gap:12px!important;margin-bottom:12px!important;}
.userMode .crmFiltersFinal{grid-template-columns:minmax(280px,1.7fr) minmax(150px,.8fr) minmax(150px,.8fr) 116px!important;}
.crmFiltersFinal input,.crmFiltersFinal select,.crmFiltersFinal button{height:46px!important;border-radius:12px!important;border:1px solid #dbe7f2!important;background:#fff!important;color:#0f2345!important;font-size:14px!important;font-weight:750!important;box-shadow:0 10px 24px rgba(14,45,96,.04)!important;}
.crmFiltersFinal input{padding:0 14px!important;}
.crmFiltersFinal select{padding:0 12px!important;}
.crmFiltersFinal button{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;color:var(--azul)!important;font-weight:950!important;}
.cleanChips{display:flex!important;gap:10px!important;margin:6px 0 14px!important;}
.crmFinalTableWrap{border:1px solid #dbe7f2;border-radius:16px;background:#fff;overflow:auto;}
.crmFinalTable{width:100%;min-width:1240px;border-collapse:collapse;table-layout:fixed;}
.crmFinalTable thead th{height:54px;background:#f8fbff;color:#334155;font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.04em;text-align:left;border-bottom:1px solid #dbe7f2;padding:0 14px;white-space:nowrap;}
.crmFinalTable tbody td{height:86px;border-bottom:1px solid #edf2f7;padding:14px;color:#0f2345;font-size:13px;font-weight:750;vertical-align:middle;background:#fff;overflow:hidden;}
.crmFinalTable tbody tr:last-child td{border-bottom:0;}
.crmFinalTable th:nth-child(1),.crmFinalTable td:nth-child(1){width:240px;}
.crmFinalTable th:nth-child(2),.crmFinalTable td:nth-child(2){width:130px;}
.crmFinalTable th:nth-child(3),.crmFinalTable td:nth-child(3){width:120px;}
.crmFinalTable th:nth-child(4),.crmFinalTable td:nth-child(4){width:130px;}
.crmFinalTable th:nth-child(5),.crmFinalTable td:nth-child(5){width:80px;}
.crmFinalTable th:nth-child(6),.crmFinalTable td:nth-child(6){width:70px;}
.crmFinalTable th:nth-child(7),.crmFinalTable td:nth-child(7){width:110px;}
.crmFinalTable th:nth-child(8),.crmFinalTable td:nth-child(8){width:105px;}
.crmFinalTable th:nth-child(9),.crmFinalTable td:nth-child(9){width:95px;}
.crmFinalTable th:nth-child(10),.crmFinalTable td:nth-child(10){width:160px;}
.crmFinalTable th:nth-child(11),.crmFinalTable td:nth-child(11){width:58px;text-align:center;}
.crmPerson{display:flex;align-items:center;gap:14px;min-width:0;}
.crmPerson b{display:block;font-size:14px;color:#071d3f;font-weight:1000;line-height:1.15;margin-bottom:4px;white-space:normal;}
.crmPerson small,.crmFinalTable td small{display:block;color:#496174;font-size:12px;font-weight:750;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.respClean{width:100%;display:flex;align-items:center;}
.respCleanSelect{width:116px!important;max-width:116px!important;height:32px!important;border:1px solid #dbe7f2!important;border-radius:9px!important;background:#fff!important;color:#0f2345!important;font-size:12px!important;font-weight:800!important;padding:0 22px 0 9px!important;box-sizing:border-box!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.moreDots{width:34px;height:34px;border:0;background:transparent;color:#071d3f;font-size:25px;line-height:1;font-weight:900;cursor:pointer;border-radius:10px;}
.moreDots:hover{background:#f1f7ff;}
.moneyAlt{color:#6d32d9!important;font-weight:1000!important;}.moneyGeneral{font-weight:1000!important;}
.lastAction{display:flex;align-items:flex-start;gap:8px;min-width:0;}.lastAction b{font-size:12px!important;line-height:1.1;white-space:normal;}.lastAction small{font-size:11px!important;line-height:1.2;}.lastAction .dot{flex:0 0 auto;margin-top:3px;}
.nav button[data-view="cobranza"] svg{color:#0e2d60!important;}
.nav button[data-view="cobranza"].active svg{color:#0e2d60!important;}

/* Cobranza: botón registrar pago sin icono encimado */
.payBtn .btnSvg{display:none!important;}
.payBtn:before{content:"+";font-size:20px;font-weight:900;line-height:1;margin-right:2px;}
.cobActions{grid-template-columns:1fr 12px!important;}
.waBtn,.payBtn{white-space:normal;text-align:center;padding:0 8px;}

@media(max-width:1320px){.crmFiltersFinal{grid-template-columns:1fr 1fr 1fr!important}.crmFinalTable{min-width:1240px}.crmFinalShell{overflow:hidden}}

/* V5.10 CRM definitivo: sin saldos en tabla, acciones visibles, responsable limpio */
.crmFinalShell{padding:18px 18px 20px!important;}
.crmFinalTableWrap{overflow-x:auto!important;}
.crmFinalTable{min-width:1160px!important;table-layout:fixed!important;}
.crmFinalTable thead th{height:50px!important;padding:0 12px!important;}
.crmFinalTable tbody td{height:82px!important;padding:12px!important;overflow:hidden!important;}
.crmFinalTable th:nth-child(1),.crmFinalTable td:nth-child(1){width:235px!important;}
.crmFinalTable th:nth-child(2),.crmFinalTable td:nth-child(2){width:125px!important;}
.crmFinalTable th:nth-child(3),.crmFinalTable td:nth-child(3){width:115px!important;}
.crmFinalTable th:nth-child(4),.crmFinalTable td:nth-child(4){width:138px!important;}
.crmFinalTable th:nth-child(5),.crmFinalTable td:nth-child(5){width:82px!important;}
.crmFinalTable th:nth-child(6),.crmFinalTable td:nth-child(6){width:72px!important;}
.crmFinalTable th:nth-child(7),.crmFinalTable td:nth-child(7){width:95px!important;}
.crmFinalTable th:nth-child(8),.crmFinalTable td:nth-child(8){width:150px!important;}
.crmFinalTable th:nth-child(9),.crmFinalTable td:nth-child(9){width:150px!important;}
.respClean{width:120px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;}
.respCleanSelect{width:118px!important;max-width:118px!important;height:32px!important;border-radius:10px!important;padding:0 25px 0 10px!important;line-height:32px!important;}
.actionsStack{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:center!important;gap:6px!important;width:126px!important;margin:0 auto!important;}
.actionsStack .actionBtn{width:126px!important;height:30px!important;min-height:30px!important;margin:0!important;border-radius:9px!important;padding:0 9px!important;font-size:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;}
.actionsStack .actionBtn .btnSvg{width:14px!important;height:14px!important;flex:0 0 auto!important;}
.actionsStack .actionBtn span{line-height:1!important;white-space:nowrap!important;}
.crmPerson{min-width:0!important;}
.crmPerson b{max-width:160px!important;white-space:normal!important;line-height:1.15!important;}
.crmPerson small{max-width:170px!important;}
.lastAction{min-width:0!important;}
.lastAction b{white-space:normal!important;line-height:1.15!important;}
@media(max-width:1320px){.crmFinalTable{min-width:1160px!important}.crmFiltersFinal{grid-template-columns:1.4fr .8fr .8fr .8fr .8fr .65fr!important}}

/* V5.11 - Cobranza: fecha real del mes actual + iconos centrados sin romper CRM */
#viewCobranza .payDate{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:9px!important;
  min-width:130px!important;
  white-space:nowrap!important;
}
#viewCobranza .payDate .btnSvg{
  width:17px!important;
  height:17px!important;
  min-width:17px!important;
  margin:0!important;
  color:#233b60!important;
  stroke-width:2.2!important;
}
#viewCobranza .payDate b{
  display:inline-flex!important;
  align-items:center!important;
  margin:0!important;
  line-height:1!important;
  font-size:13px!important;
  color:#0f2345!important;
  font-weight:950!important;
}
#viewCobranza .cobActions{
  display:grid!important;
  grid-template-columns:minmax(154px,1fr) 14px!important;
  grid-template-rows:36px 36px!important;
  gap:8px 8px!important;
  align-items:center!important;
  justify-items:stretch!important;
}
#viewCobranza .waBtn,
#viewCobranza .payBtn{
  height:36px!important;
  min-height:36px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:0 10px!important;
  line-height:1!important;
  white-space:normal!important;
  text-align:center!important;
}
#viewCobranza .waBtn .btnSvg,
#viewCobranza .payBtn .btnSvg{
  display:block!important;
  width:17px!important;
  height:17px!important;
  min-width:17px!important;
  margin:0!important;
  stroke-width:2.25!important;
}
#viewCobranza .payBtn:before{content:none!important;display:none!important;}
#viewCobranza .waBtn span,
#viewCobranza .payBtn span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  line-height:1.05!important;
}
#viewCobranza .moreBtn{
  width:14px!important;
  grid-row:1 / span 2!important;
  grid-column:2!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}


/* V5.12 - Ajuste visual final solicitado: iconos centrados, botones completos y aportación sin símbolos encimados */
#viewCobranza .cobTableWrap{overflow-x:auto!important;}
#viewCobranza .cobTableExact{min-width:1120px!important;table-layout:fixed!important;}
#viewCobranza .cobTableExact th,#viewCobranza .cobTableExact td{box-sizing:border-box!important;}
#viewCobranza .cobTableExact th:nth-child(1),#viewCobranza .cobTableExact td:nth-child(1){width:25%!important;}
#viewCobranza .cobTableExact th:nth-child(2),#viewCobranza .cobTableExact td:nth-child(2){width:9%!important;}
#viewCobranza .cobTableExact th:nth-child(3),#viewCobranza .cobTableExact td:nth-child(3){width:12%!important;}
#viewCobranza .cobTableExact th:nth-child(4),#viewCobranza .cobTableExact td:nth-child(4){width:10%!important;}
#viewCobranza .cobTableExact th:nth-child(5),#viewCobranza .cobTableExact td:nth-child(5){width:13%!important;}
#viewCobranza .cobTableExact th:nth-child(6),#viewCobranza .cobTableExact td:nth-child(6){width:11%!important;}
#viewCobranza .cobTableExact th:nth-child(7),#viewCobranza .cobTableExact td:nth-child(7){width:20%!important;min-width:210px!important;}
#viewCobranza .cobTableExact tbody td{padding:14px 14px!important;}
#viewCobranza .cobActions{width:100%!important;max-width:198px!important;min-width:188px!important;margin-left:auto!important;grid-template-columns:minmax(158px,1fr) 18px!important;grid-template-rows:38px 38px!important;gap:8px!important;align-items:center!important;}
#viewCobranza .waBtn,#viewCobranza .payBtn{width:100%!important;height:38px!important;min-height:38px!important;border-radius:10px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:0 10px!important;box-sizing:border-box!important;overflow:hidden!important;}
#viewCobranza .waBtn .btnSvg,#viewCobranza .payBtn .btnSvg{width:16px!important;height:16px!important;min-width:16px!important;display:block!important;margin:0!important;}
#viewCobranza .waBtn span,#viewCobranza .payBtn span{line-height:1.05!important;display:block!important;text-align:center!important;white-space:normal!important;}
#viewCobranza .moreBtn{width:18px!important;height:84px!important;font-size:22px!important;line-height:1!important;display:flex!important;align-items:center!important;justify-content:center!important;}
#viewCobranza .payDate .btnSvg{width:16px!important;height:16px!important;min-width:16px!important;}
#viewCobranza .payDate{gap:8px!important;align-items:center!important;}

/* Modal de cliente: botones de movimientos limpios, sin iconos encimados ni recuadros cortados */
#clientDlg .movementGroups{grid-template-columns:repeat(3,minmax(220px,1fr))!important;gap:16px!important;}
#clientDlg .movementGroup{padding:16px!important;overflow:hidden!important;}
#clientDlg .movementGroup div{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:10px!important;}
#clientDlg .movementBtn{width:100%!important;max-width:230px!important;min-height:40px!important;height:40px!important;border-radius:12px!important;padding:0 14px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;box-sizing:border-box!important;overflow:hidden!important;}
#clientDlg .movementBtn .btnSvg{width:17px!important;height:17px!important;min-width:17px!important;display:block!important;margin:0!important;stroke-width:2.35!important;}
#clientDlg .movementBtn span{display:block!important;line-height:1!important;white-space:nowrap!important;font-size:12.5px!important;font-weight:950!important;margin:0!important;color:inherit!important;text-transform:none!important;letter-spacing:0!important;}
#clientDlg .mailBtn{background:linear-gradient(135deg,#0e2d60,#0aa8d7)!important;color:#fff!important;border:0!important;}
@media(max-width:1200px){#clientDlg .movementGroups{grid-template-columns:1fr!important;}#clientDlg .movementBtn{max-width:100%!important;}}


/* V5.13 - Cobranza: iconos de tarjetas corregidos y se quitan tres puntitos sin función */
#viewCobranza .searchBox span .btnSvg{width:18px!important;height:18px!important;stroke-width:2.2!important;color:#51657f!important;}
#viewCobranza .kpiIcon{display:flex!important;align-items:center!important;justify-content:center!important;}
#viewCobranza .kpiIcon .btnSvg{display:block!important;margin:0!important;width:27px!important;height:27px!important;stroke-width:2.15!important;}
#viewCobranza .kpiIcon.clients{background:#eaf3ff!important;color:#1769e8!important;}
#viewCobranza .kpiIcon.saldo{background:#e8fbf1!important;color:#0ba66c!important;}
#viewCobranza .kpiIcon.vista{background:#f1e8ff!important;color:#6d32d9!important;}
#viewCobranza .kpiIcon.calendar{background:#fff4d9!important;color:#d89200!important;}
#viewCobranza .moreBtn{display:none!important;}
#viewCobranza .cobActions{grid-template-columns:1fr!important;grid-template-rows:38px 38px!important;max-width:178px!important;min-width:170px!important;margin-left:auto!important;gap:8px!important;}
#viewCobranza .waBtn,#viewCobranza .payBtn{width:100%!important;}
#viewCobranza .cobTableExact th:nth-child(7),#viewCobranza .cobTableExact td:nth-child(7){width:18%!important;min-width:190px!important;}


/* V6 Usuarios y permisos */
.usersShell{display:flex;flex-direction:column;gap:18px}.usersHead{display:flex;align-items:center;justify-content:space-between;gap:16px}.usersHead h2{margin:0;font-size:26px;color:#0e2d60}.usersHead p{margin:6px 0 0;color:#64748b}.usersGrid{display:grid;grid-template-columns:340px minmax(0,1fr);gap:18px}.usersList{padding:14px;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 180px);overflow:auto}.usersSearch{display:flex;align-items:center;gap:8px;border:1px solid #dbe7f5;background:#f8fbff;border-radius:16px;padding:10px 12px;margin-bottom:4px}.usersSearch svg{width:18px;height:18px;stroke:#0e2d60;fill:none;stroke-width:2}.usersSearch input{border:0;background:transparent;outline:0;width:100%;font:inherit}.userRow{border:1px solid transparent;background:#fff;border-radius:18px;padding:11px;display:grid;grid-template-columns:44px 1fr 10px;align-items:center;gap:10px;text-align:left;cursor:pointer;transition:.18s}.userRow:hover{background:#f7fbff;border-color:#d9e8f8}.userRow.active{background:linear-gradient(180deg,#eff9ff,#fff);border-color:#19b7e8;box-shadow:0 12px 26px rgba(14,45,96,.08)}.userRow b{display:block;color:#0f172a;font-size:13px}.userRow small{display:block;color:#64748b;font-size:11px;margin-top:2px}.userAvatar{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-weight:900;color:#fff;background:#0e2d60;letter-spacing:.3px}.userAvatar.big{width:64px;height:64px;border-radius:22px;font-size:18px}.userAvatar.admin{background:linear-gradient(135deg,#0e2d60,#19b7e8)}.userAvatar.supervisor{background:linear-gradient(135deg,#5b5bd6,#19b7e8)}.userAvatar.user{background:linear-gradient(135deg,#00b3a1,#19b7e8)}.statusDot{width:10px;height:10px;border-radius:999px;background:#e5484d}.statusDot.ok{background:#12a36a}.userEditor{padding:18px;min-width:0}.editorTop{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:16px;border-bottom:1px solid #e7eef8}.editorIdentity{display:flex;align-items:center;gap:14px}.editorIdentity h3{margin:0;font-size:22px;color:#0e2d60}.editorIdentity p{margin:4px 0 0;color:#64748b}.editorBadges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.pill.admin{background:#e7f7ff;color:#0e2d60}.pill.supervisor{background:#eeedff;color:#4f46e5}.pill.user{background:#e6fffa;color:#007f73}.editorControls{display:grid;grid-template-columns:180px 200px auto auto;gap:10px;align-items:end;padding:16px 0}.editorControls label{display:flex;flex-direction:column;gap:6px;color:#475569;font-weight:800;font-size:12px}.editorControls select{height:42px;border:1px solid #d8e6f5;border-radius:14px;padding:0 12px;background:#fff;color:#0f172a;font-weight:700}.permissionMatrix{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.permGroup{border:1px solid #e2ebf7;border-radius:22px;background:#fbfdff;overflow:hidden}.permGroupHead{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border-bottom:1px solid #e7eef8;background:#fff}.permGroupHead h4{margin:0;color:#0e2d60;font-size:15px}.permGroupHead span{font-size:12px;font-weight:900;color:#19b7e8;background:#eaf8fe;border-radius:999px;padding:5px 9px}.permList{display:flex;flex-direction:column}.permSwitch{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;padding:12px 16px;border-bottom:1px solid #edf3fa}.permSwitch:last-child{border-bottom:0}.permSwitch span{font-weight:700;color:#1f2937;font-size:13px}.permSwitch small{display:block;color:#94a3b8;font-weight:600;margin-top:3px}.permSwitch input{display:none}.permSwitch i{width:46px;height:26px;border-radius:999px;background:#dbe5f1;position:relative;box-shadow:inset 0 0 0 1px rgba(15,23,42,.05);transition:.18s}.permSwitch i:before{content:"";position:absolute;width:20px;height:20px;border-radius:50%;background:#fff;left:3px;top:3px;box-shadow:0 3px 8px rgba(15,23,42,.16);transition:.18s}.permSwitch input:checked+i{background:linear-gradient(90deg,#0e2d60,#19b7e8)}.permSwitch input:checked+i:before{transform:translateX(20px)}.permSwitch.locked{background:#f8fafc;opacity:.74}.permSwitch.locked i{background:#e5e7eb}.saveBar{margin-top:16px;border:1px solid #d8e6f5;background:linear-gradient(180deg,#ffffff,#f8fbff);border-radius:18px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#475569}.saveBar b{color:#0e2d60}.emptyAccess{display:grid;place-items:center;min-height:360px;text-align:center;color:#64748b}.emptyAccess h2{color:#0e2d60;margin:0 0 8px}@media(max-width:1100px){.usersGrid{grid-template-columns:1fr}.editorControls{grid-template-columns:1fr 1fr}.permissionMatrix{grid-template-columns:1fr}}@media(max-width:720px){.usersHead,.editorTop,.saveBar{align-items:flex-start;flex-direction:column}.editorControls{grid-template-columns:1fr}.editorBadges{justify-content:flex-start}}

/* V6.1 Usuarios / permisos refinado */
.authCard .resetBtn{margin-top:8px;justify-content:center}.authCard .resetBtn[style*="none"]{display:none!important}
.profileEdit{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0;padding:14px;border:1px solid #e2ebf7;border-radius:20px;background:#f9fcff}.profileEdit label{display:flex;flex-direction:column;gap:6px;color:#475569;font-size:12px;font-weight:900}.profileEdit input{height:42px;border:1px solid #d8e6f5;border-radius:14px;padding:0 12px;background:#fff;color:#0f172a;font-weight:700}.profileEdit .full{grid-column:1/-1}.photoBox{display:flex;align-items:center;gap:12px;border:1px dashed #bfd4ec;border-radius:18px;padding:12px;background:#fff}.photoBox .photoPreview{width:54px;height:54px;border-radius:18px;background:linear-gradient(135deg,#0e2d60,#19b7e8);display:grid;place-items:center;color:#fff;font-weight:950}.photoBox button{white-space:nowrap}.permGroupHead{align-items:center}.permHeadLeft{display:flex;align-items:center;gap:10px;min-width:0}.permHeadLeft h4{white-space:nowrap}.permActions{display:flex;align-items:center;gap:8px}.permSmallBtn{border:1px solid #d8e6f5;background:#fff;color:#0e2d60;border-radius:999px;padding:6px 9px;font-size:11px;font-weight:950}.moduleMaster{display:inline-flex;align-items:center;gap:8px}.moduleMaster input{display:none}.moduleMaster i{width:44px;height:25px;border-radius:999px;background:#dbe5f1;position:relative;transition:.18s}.moduleMaster i:before{content:"";position:absolute;width:19px;height:19px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 3px 8px rgba(15,23,42,.16);transition:.18s}.moduleMaster input:checked+i{background:linear-gradient(90deg,#0e2d60,#19b7e8)}.moduleMaster input:checked+i:before{transform:translateX(19px)}.permGroup.off .permList{opacity:.45;pointer-events:none}.permGroup.off .permSwitch input:checked+i{background:#aebdd0}.saveBar.simple{justify-content:flex-end}.userEditor .ghostBtn.warn{border-color:#ffd0d0;color:#b91c1c;background:#fff6f6}
@media(max-width:720px){.profileEdit{grid-template-columns:1fr}.permGroupHead{align-items:flex-start;flex-direction:column}.permActions{width:100%;justify-content:space-between}}


/* V6.2 permisos: encabezados sin encimarse */
.editorControls{grid-template-columns:180px 200px auto auto;}
.permGroupHead.v62{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:14px 16px 12px;}
.permTitleRow{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;}
.permTitleLeft{display:flex;align-items:center;gap:10px;min-width:0;}
.permTitleLeft h4{margin:0;color:#0e2d60;font-size:15px;line-height:1.2;white-space:normal;overflow:hidden;text-overflow:ellipsis;}
.permCounter{flex:0 0 auto;font-size:12px;font-weight:950;color:#19b7e8;background:#eaf8fe;border-radius:999px;padding:5px 10px;}
.permActions.v62{display:flex;align-items:center;gap:8px;justify-content:flex-end;width:100%;}
.permActions.v62 .permSmallBtn{min-width:70px;text-align:center;}
.permGroupHead.v62>span{display:none;}
@media(max-width:720px){.permGroupHead.v62{align-items:stretch}.permActions.v62{justify-content:flex-start}.editorControls{grid-template-columns:1fr}}

/* STD ERP V6.3 - Usuarios: botones parejos y foto desde avatar */
.editorControls{
  grid-template-columns:180px 200px 190px 230px!important;
  align-items:end!important;
}
.editorControls .primary.iconBtn,
.editorControls .ghostBtn.iconBtn{
  width:100%!important;
  height:44px!important;
  padding:0 14px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  white-space:nowrap!important;
  line-height:1!important;
  border-radius:14px!important;
  font-size:13px!important;
}
.editorControls .iconBtn svg{
  width:17px!important;
  height:17px!important;
  min-width:17px!important;
  display:block!important;
}
.profileEdit{
  grid-template-columns:1fr 1fr!important;
}
.photoBox{display:none!important;}
.avatarEditBtn{
  position:relative;
  border:0;
  padding:0;
  background:transparent;
  border-radius:22px;
  cursor:pointer;
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
}
.avatarEditBtn .userAvatar.big{
  transition:.18s ease;
}
.avatarEditBtn:hover .userAvatar.big{
  filter:brightness(.72);
  transform:scale(.99);
}
.avatarPencil{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:rgba(14,45,96,.54);
  border-radius:22px;
  opacity:0;
  transition:.18s ease;
  pointer-events:none;
}
.avatarPencil svg{
  width:24px!important;
  height:24px!important;
  stroke-width:2.4!important;
}
.avatarEditBtn:hover .avatarPencil{opacity:1;}
@media(max-width:1100px){.editorControls{grid-template-columns:1fr 1fr!important;}}
@media(max-width:720px){.editorControls{grid-template-columns:1fr!important;}}


/* STD ERP V6.4 - Usuarios: avatar con lápiz real y botones sin corte */
.editorControls{
  display:grid!important;
  grid-template-columns:minmax(150px,1fr) minmax(170px,1fr) 180px 240px!important;
  gap:12px!important;
  align-items:end!important;
  overflow:visible!important;
}
.editorControls .primary.iconBtn,
.editorControls .ghostBtn.iconBtn{
  height:46px!important;
  min-height:46px!important;
  padding:0 14px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  line-height:1!important;
  border-radius:15px!important;
}
.editorControls .ghostBtn.iconBtn{font-size:12.5px!important;}
.editorControls .primary.iconBtn{font-size:13px!important;}
.editorControls .iconBtn .btnSvg{width:17px!important;height:17px!important;min-width:17px!important;}
.profileEdit{grid-template-columns:1fr 1fr!important;margin-top:16px!important;}
.photoBox{display:none!important;}
.avatarEditBtn{position:relative!important;border:0!important;background:transparent!important;padding:0!important;border-radius:22px!important;cursor:pointer!important;display:inline-grid!important;place-items:center!important;}
.avatarPencil{position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;color:#fff!important;background:rgba(14,45,96,.58)!important;border-radius:22px!important;opacity:0!important;transition:.18s ease!important;pointer-events:none!important;}
.avatarEditBtn:hover .avatarPencil{opacity:1!important;}
.avatarPencil .btnSvg{width:24px!important;height:24px!important;stroke-width:2.6!important;}
.avatarEditBtn:hover .userAvatar.big{filter:brightness(.72)!important;}
@media(max-width:1180px){.editorControls{grid-template-columns:1fr 1fr!important}.editorControls .primary.iconBtn,.editorControls .ghostBtn.iconBtn{width:100%!important;}}
@media(max-width:720px){.editorControls{grid-template-columns:1fr!important}}

/* STD ERP V6.5 - Ajuste fino de fila Rol/Estatus/Guardar/Restablecer */
.userEditor{
  overflow:hidden!important;
}
.editorControls{
  display:grid!important;
  grid-template-columns: minmax(160px,180px) minmax(190px,220px) minmax(170px,200px) minmax(250px,1fr)!important;
  gap:12px!important;
  align-items:end!important;
  width:100%!important;
  box-sizing:border-box!important;
}
.editorControls label,
.editorControls button{
  min-width:0!important;
  box-sizing:border-box!important;
}
.editorControls .primary.iconBtn,
.editorControls .ghostBtn.iconBtn{
  width:100%!important;
  max-width:none!important;
  height:46px!important;
  min-height:46px!important;
  padding:0 16px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.editorControls .ghostBtn.iconBtn{
  justify-self:stretch!important;
  font-size:13px!important;
}
.editorControls .primary.iconBtn{
  justify-self:stretch!important;
  font-size:13px!important;
}
@media(max-width:1320px){
  .editorControls{grid-template-columns:1fr 1fr!important;}
  .editorControls .primary.iconBtn,.editorControls .ghostBtn.iconBtn{width:100%!important;}
}
@media(max-width:720px){
  .editorControls{grid-template-columns:1fr!important;}
}

/* STD ERP V6.6 - Corrección definitiva fila Rol/Estatus/Guardar/Restablecer */
.userEditor .editorControls{
  display:grid!important;
  grid-template-columns: repeat(4, minmax(0, 1fr))!important;
  gap:12px!important;
  align-items:end!important;
  width:100%!important;
  max-width:100%!important;
  padding:16px 0!important;
  box-sizing:border-box!important;
  overflow:visible!important;
}
.userEditor .editorControls label,
.userEditor .editorControls button{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.userEditor .editorControls select,
.userEditor .editorControls .primary.iconBtn,
.userEditor .editorControls .ghostBtn.iconBtn{
  height:48px!important;
  min-height:48px!important;
  border-radius:16px!important;
}
.userEditor .editorControls .primary.iconBtn,
.userEditor .editorControls .ghostBtn.iconBtn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:0 14px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:13px!important;
  line-height:1!important;
}
.userEditor .editorControls .ghostBtn.iconBtn svg,
.userEditor .editorControls .primary.iconBtn svg{
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
}
@media(max-width:1180px){
  .userEditor .editorControls{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:720px){
  .userEditor .editorControls{grid-template-columns:1fr!important;}
}

/* V6.7 Usuarios y Permisos - alineación final */
#viewUsuarios{padding-top:0}.usersShell{gap:16px}.usersHead{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:2px}.usersHead h2{font-size:26px;line-height:1.05;margin:0;color:#08275a}.usersHead p{font-size:15px;margin:8px 0 0;color:#52627a}.usersHead .savePermsTop{height:54px;min-width:210px;border-radius:14px;font-weight:900;box-shadow:0 14px 26px rgba(0,104,220,.18)}
.usersGrid{grid-template-columns:360px minmax(0,1fr);gap:20px;align-items:start}.usersList{height:calc(100vh - 170px);min-height:720px;padding:18px;border-radius:22px;background:rgba(255,255,255,.86)}.usersSearch{height:50px;border-radius:14px;padding:0 14px;margin-bottom:10px;background:#fbfdff}.usersSearch input{font-size:15px}.userRow{grid-template-columns:50px 1fr 11px;padding:12px;border-radius:16px;min-height:66px}.userRow b{font-size:14px}.userRow small{font-size:12px}.userAvatar{width:48px;height:48px;border-radius:15px}.userAvatar.big{width:78px;height:78px;border-radius:24px;font-size:24px}.userEditor{padding:22px;border-radius:22px;background:rgba(255,255,255,.9)}.editorTop{padding-bottom:22px}.editorIdentity{gap:18px}.editorIdentity h3{font-size:25px;line-height:1.08}.editorIdentity p{font-size:15px}.avatarEditBtn{position:relative;border:0;background:transparent;padding:0;cursor:pointer}.avatarPencil{position:absolute;right:-6px;bottom:4px;width:30px;height:30px;border-radius:999px;background:#fff;border:1px solid #dbe7f5;display:grid;place-items:center;box-shadow:0 8px 18px rgba(15,23,42,.14);opacity:0;transition:.18s}.avatarEditBtn:hover .avatarPencil{opacity:1}.avatarPencil svg{width:15px;height:15px;stroke:#0e2d60;stroke-width:2;fill:none}.profileEdit{border:1px solid #dbe7f5;background:linear-gradient(180deg,#fff,#fbfdff);border-radius:22px;padding:18px;margin-top:20px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.profileEdit label{font-size:12px;color:#52627a;font-weight:900}.profileEdit input{display:block;width:100%;height:50px;margin-top:8px;border:1px solid #dbe7f5;border-radius:14px;padding:0 14px;background:#fff;font-weight:800;color:#0f172a}.editorControls{display:grid;grid-template-columns:170px 190px 180px 240px;gap:12px;align-items:end;padding:20px 0 18px}.editorControls label{font-size:12px;color:#52627a;font-weight:900}.editorControls select{height:48px;border-radius:14px;font-weight:800}.editorControls .primary,.editorControls .ghostBtn{width:100%;height:48px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;gap:10px;white-space:nowrap;font-size:14px;font-weight:900;padding:0 14px;box-sizing:border-box}.editorControls .ghostBtn svg,.editorControls .primary svg{width:18px;height:18px;flex:0 0 auto}.editorControls .resetAction{font-size:13px;padding:0 12px;overflow:hidden;text-overflow:ellipsis}.permissionMatrix{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.permGroup{border-radius:20px;background:#fff}.permGroupHead.v62{padding:16px 18px 12px;display:block}.permTitleRow{display:flex;align-items:center;justify-content:space-between;gap:12px}.permTitleLeft{display:flex;align-items:center;gap:12px;min-width:0}.permTitleLeft h4{font-size:18px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.permCounter{margin-left:auto}.permActions.v62{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.permSmallBtn{min-width:72px;height:34px;border:1px solid #dbe7f5;background:#fff;border-radius:999px;color:#0e2d60;font-weight:900;cursor:pointer}.permSmallBtn:last-child{color:#ef4444;border-color:#fecaca}.permSwitch{padding:15px 18px;min-height:56px}.permSwitch span{font-size:14px}.saveBar.simple{justify-content:flex-end;background:transparent;border:0;padding:18px 0 0}.saveBar.simple .primary{height:50px;border-radius:14px;min-width:200px}
@media(max-width:1300px){.editorControls{grid-template-columns:1fr 1fr}.editorControls .primary,.editorControls .ghostBtn{min-width:0}.usersGrid{grid-template-columns:330px minmax(0,1fr)}}


/* V6.8 Usuarios y Permisos - ajuste final solicitado */
#viewUsuarios .usersHead h2{
  text-transform:none!important;
  letter-spacing:-.035em!important;
}
#viewUsuarios .usersHead{
  align-items:center!important;
}
#viewUsuarios .savePermsTop{
  min-width:220px!important;
  height:54px!important;
  border-radius:16px!important;
  padding:0 24px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:11px!important;
  font-size:15px!important;
  white-space:nowrap!important;
  box-shadow:0 14px 28px rgba(14,93,190,.22)!important;
}
#viewUsuarios .savePermsTop svg{
  width:22px!important;
  height:22px!important;
  stroke:#fff!important;
  stroke-width:2.25!important;
  fill:none!important;
  flex:0 0 22px!important;
}
#viewUsuarios .editorControls{
  grid-template-columns:170px 190px minmax(230px,280px)!important;
  gap:12px!important;
  align-items:end!important;
  justify-content:start!important;
}
#viewUsuarios .editorControls .resetAction{
  width:100%!important;
  max-width:280px!important;
  height:48px!important;
  padding:0 18px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  justify-self:start!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
}
#viewUsuarios .editorControls .resetAction svg{
  display:none!important;
}
#viewUsuarios .saveBar.simple{
  display:none!important;
}
#viewUsuarios .userEditor{
  overflow:hidden!important;
}
@media(max-width:900px){
  #viewUsuarios .editorControls{grid-template-columns:1fr!important;}
  #viewUsuarios .editorControls .resetAction{max-width:none!important;}
  #viewUsuarios .savePermsTop{width:100%!important;}
}

/* V6.9 Usuarios: diseño final alineado, botón reset con llave y módulo usuarios con escudo */
#viewUsuarios .usersHead{align-items:center!important;margin-bottom:18px!important;}
#viewUsuarios .usersHead h2{display:flex;align-items:center;gap:10px;font-size:27px!important;}
#viewUsuarios .usersHead .savePermsTop{height:56px!important;min-width:230px!important;border-radius:14px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:11px!important;line-height:1!important;}
#viewUsuarios .usersHead .savePermsTop svg{width:20px!important;height:20px!important;stroke:#fff!important;fill:none!important;stroke-width:2!important;}
#viewUsuarios .usersGrid{grid-template-columns:360px minmax(0,1fr)!important;gap:22px!important;}
#viewUsuarios .userEditor{padding:22px!important;overflow:hidden!important;}
#viewUsuarios .editorControls{display:grid!important;grid-template-columns:170px 190px 260px!important;gap:12px!important;align-items:end!important;padding:20px 0 18px!important;}
#viewUsuarios .editorControls label{margin:0!important;min-width:0!important;}
#viewUsuarios .editorControls select,
#viewUsuarios .editorControls .resetAction{height:48px!important;min-height:48px!important;border-radius:14px!important;box-sizing:border-box!important;}
#viewUsuarios .editorControls .resetAction{width:260px!important;max-width:260px!important;padding:0 18px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;font-size:13.5px!important;line-height:1!important;align-self:end!important;}
#viewUsuarios .editorControls .resetAction svg.resetKey{width:19px!important;height:19px!important;min-width:19px!important;stroke:#0e2d60!important;stroke-width:2.2!important;fill:none!important;margin:0!important;}
#viewUsuarios .editorControls .resetAction span{display:inline-block!important;overflow:hidden!important;text-overflow:clip!important;white-space:nowrap!important;}
#viewUsuarios .avatarEditBtn{position:relative!important;overflow:visible!important;}
#viewUsuarios .avatarPencil{opacity:1!important;right:-5px!important;bottom:2px!important;width:30px!important;height:30px!important;}
#viewUsuarios .userRow .avatarPencil{opacity:1!important;width:22px!important;height:22px!important;right:-5px!important;bottom:-2px!important;}
#viewUsuarios .permTitleLeft{gap:10px!important;flex:1!important;min-width:0!important;}
#viewUsuarios .permTitleLeft h4{font-size:18px!important;line-height:1.1!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#viewUsuarios .permIcon{width:30px!important;height:30px!important;border-radius:10px!important;display:grid!important;place-items:center!important;background:#eef8ff!important;color:#0e2d60!important;flex:0 0 30px!important;}
#viewUsuarios .permIcon svg{width:18px!important;height:18px!important;stroke:currentColor!important;stroke-width:2!important;fill:none!important;stroke-linecap:round!important;stroke-linejoin:round!important;}
#viewUsuarios .permGroup .permCounter{height:28px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:48px!important;}
#viewUsuarios .permActions.v62{display:flex!important;gap:10px!important;justify-content:flex-end!important;align-items:center!important;margin-top:14px!important;}
#viewUsuarios .permSmallBtn{height:34px!important;min-width:74px!important;padding:0 14px!important;}
#mainNav button[data-view="usuarios"] svg{stroke-width:2.1!important;}
@media(max-width:1280px){#viewUsuarios .usersGrid{grid-template-columns:330px minmax(0,1fr)!important}#viewUsuarios .editorControls{grid-template-columns:1fr 1fr!important}#viewUsuarios .editorControls .resetAction{grid-column:1 / -1!important;width:100%!important;max-width:none!important}}
@media(max-width:760px){#viewUsuarios .usersGrid{grid-template-columns:1fr!important}#viewUsuarios .editorControls{grid-template-columns:1fr!important}#viewUsuarios .editorControls .resetAction{grid-column:auto!important}}

/* STD ERP V6.10 - Ajustes finales header/sidebar/usuario */
.brandBlock{gap:14px!important;padding:14px 8px 18px!important;}
.brandBlock img{width:68px!important;height:68px!important;object-fit:contain!important;}
.brandBlock strong{font-size:23px!important;letter-spacing:-.035em!important;line-height:1!important;}
.brandBlock span{font-size:13px!important;margin-top:3px!important;}
.topbar{align-items:flex-start!important;margin-bottom:20px!important;}
.topActions.hiddenTopActions{display:none!important;}
#pageTitle{display:flex!important;align-items:center!important;gap:10px!important;line-height:1.1!important;}
.titleIcon{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,rgba(25,183,232,.18),rgba(0,179,161,.12));color:#0e2d60;flex:0 0 34px;box-shadow:inset 0 0 0 1px rgba(25,183,232,.22)}
.titleIcon svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:2.15;stroke-linecap:round;stroke-linejoin:round;}
.sideFoot{display:flex!important;flex-direction:column!important;gap:10px!important;}
.sideUserBox{display:flex;align-items:center;gap:11px;padding:12px;border:1px solid #dbe7f5;background:linear-gradient(180deg,#fff,#f8fcff);border-radius:18px;box-shadow:0 10px 22px rgba(14,45,96,.07)}
.sideUserBox>span{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#0e2d60,#19b7e8);color:white;font-weight:950;letter-spacing:.02em;flex:0 0 42px;}
.sideUserBox b{display:block;color:#0e2d60;font-size:14px;line-height:1.1;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sideUserBox small{display:block;color:#64748b;font-size:12px;margin-top:2px;text-transform:capitalize;}
.logoutClean{height:46px!important;border-radius:15px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-weight:950!important;}
.userAvatarWrap{position:relative;display:inline-grid;place-items:center;width:48px;height:48px;}
.userAvatarWrap .userAvatar{grid-area:1/1;}
.userAvatarWrap .rowPencil{position:absolute!important;right:-5px!important;bottom:-3px!important;width:24px!important;height:24px!important;border-radius:999px!important;background:#fff!important;border:1px solid #dbe7f5!important;color:#0e2d60!important;display:grid!important;place-items:center!important;box-shadow:0 6px 14px rgba(15,23,42,.14)!important;opacity:0!important;transition:.16s ease!important;}
.userRow:hover .rowPencil,.userRow.active .rowPencil{opacity:1!important;}
.userAvatarWrap .rowPencil svg{width:13px!important;height:13px!important;stroke:currentColor!important;fill:none!important;stroke-width:2.2!important;}
#viewUsuarios .avatarEditBtn .avatarPencil{opacity:0!important;}
#viewUsuarios .avatarEditBtn:hover .avatarPencil{opacity:1!important;}
#viewUsuarios .editorControls{grid-template-columns:170px 190px 260px!important;align-items:end!important;}
#viewUsuarios .editorControls .resetAction{height:48px!important;align-self:end!important;}
@media(max-width:1100px){.brandBlock img{width:58px!important;height:58px!important}.sideUserBox b{max-width:none}}

/* STD ERP V6.11 - Ajustes finales solicitados: permisos alineados, lápiz solo en avatar grande, botón superior centrado */
#viewUsuarios .usersHead{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:72px!important;
  margin-bottom:18px!important;
}
#viewUsuarios .usersHead>div{min-width:0!important;}
#viewUsuarios .usersHead .savePermsTop{
  align-self:center!important;
  margin:0!important;
  transform:none!important;
  height:56px!important;
  min-width:230px!important;
  padding:0 22px!important;
}

/* Quitar lápiz de la lista izquierda; solo debe aparecer en el avatar grande del editor */
#viewUsuarios .userRow .rowPencil,
#viewUsuarios .userRow:hover .rowPencil,
#viewUsuarios .userRow.active .rowPencil,
#viewUsuarios .userAvatarWrap .rowPencil{
  display:none!important;
  opacity:0!important;
  visibility:hidden!important;
}
#viewUsuarios .avatarEditBtn{
  position:relative!important;
  display:inline-grid!important;
  place-items:center!important;
  overflow:visible!important;
}
#viewUsuarios .avatarEditBtn .avatarPencil{
  display:grid!important;
  place-items:center!important;
  right:-6px!important;
  bottom:5px!important;
  width:32px!important;
  height:32px!important;
  border-radius:999px!important;
  background:#fff!important;
  border:1px solid #dbe7f5!important;
  box-shadow:0 8px 18px rgba(15,23,42,.16)!important;
  color:#0e2d60!important;
  opacity:0!important;
  visibility:hidden!important;
  transition:.16s ease!important;
}
#viewUsuarios .avatarEditBtn:hover .avatarPencil{
  opacity:1!important;
  visibility:visible!important;
}
#viewUsuarios .avatarEditBtn .avatarPencil svg{
  width:16px!important;
  height:16px!important;
  stroke:currentColor!important;
  fill:none!important;
  stroke-width:2.35!important;
}

/* Encabezados de tarjetas de permisos sin brincos ni botones chuecos */
#viewUsuarios .permGroupHead.v62{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
  padding:16px 18px 14px!important;
}
#viewUsuarios .permTitleRow{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  column-gap:12px!important;
  width:100%!important;
}
#viewUsuarios .permTitleLeft{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
  overflow:hidden!important;
}
#viewUsuarios .permTitleLeft h4{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#viewUsuarios .permActions.v62{
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
#viewUsuarios .permSmallBtn{
  height:34px!important;
  min-width:76px!important;
  padding:0 16px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
}

/* Botón Limpiar de filtros en cobranza también centrado por si se revisa ese módulo */
#viewCobranza .cobClear,
.cobClear{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  height:64px!important;
  line-height:1!important;
}
#viewCobranza .cobClear svg,
.cobClear svg{
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
}

@media(max-width:900px){
  #viewUsuarios .usersHead{align-items:stretch!important;flex-direction:column!important;min-height:auto!important;}
  #viewUsuarios .usersHead .savePermsTop{width:100%!important;}
}

/* V6.12 ajuste final: botón Limpiar en Cobranza alineado con filtros */
#viewCobranza .cobFilters{
  display:grid!important;
  grid-template-columns:minmax(280px,1.55fr) minmax(180px,1fr) minmax(180px,1fr) minmax(180px,1fr) 128px!important;
  gap:14px!important;
  align-items:stretch!important;
}
#viewCobranza .cobFilters label,
#viewCobranza .cobFilters .searchBox,
#viewCobranza .cobFilters .cobClear{
  height:62px!important;
  min-height:62px!important;
  max-height:62px!important;
  box-sizing:border-box!important;
  margin:0!important;
}
#viewCobranza .cobFilters .cobClear{
  width:100%!important;
  padding:0 16px!important;
  align-self:stretch!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border-radius:12px!important;
  line-height:1!important;
  white-space:nowrap!important;
  transform:none!important;
}
#viewCobranza .cobFilters .cobClear .btnSvg,
#viewCobranza .cobFilters .cobClear svg{
  width:17px!important;
  height:17px!important;
  flex:0 0 17px!important;
  display:block!important;
}
#viewCobranza .cobFilters .cobClear span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
}
@media(max-width:1320px){
  #viewCobranza .cobFilters{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  #viewCobranza .cobFilters .cobClear{grid-column:auto!important;}
}

/* V6.13 - Vistas personalizadas y filtros en ventana */
.compactControls{align-items:stretch!important;}
.crmFiltersFinal.compactControls{grid-template-columns:minmax(260px,1fr) 150px 210px 125px!important;}
.cobFilters.compactControls{grid-template-columns:minmax(280px,1fr) 150px 210px 125px!important;}
.viewTool,.compactControls .iconBtn{min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap;}
.viewTool svg,.compactControls .iconBtn svg{width:18px;height:18px;}
.dynamicTable,.dynamicCobTable{table-layout:auto!important;min-width:1000px!important;}
.dynamicTable th,.dynamicTable td,.dynamicCobTable th,.dynamicCobTable td{white-space:nowrap;}
.dynamicTable td:first-child,.dynamicCobTable td:first-child{white-space:normal;min-width:240px;}
.dynamicTable td:last-child,.dynamicCobTable td:last-child{min-width:130px;}
.fieldsModal{display:grid;gap:10px;}
.fieldActions{display:flex;justify-content:flex-end;gap:10px;margin-bottom:6px;}
.fieldCheck{height:48px;border:1px solid var(--line);border-radius:14px;background:#fff;display:flex!important;align-items:center;justify-content:space-between;margin:0!important;padding:0 14px;font-size:14px;font-weight:850;color:var(--azul);}
.fieldCheck input{width:21px;height:21px;accent-color:#0b73d9;}
.filterModalGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.filterModalGrid label{border:1px solid var(--line);border-radius:16px;background:#fff;padding:10px 12px;margin:0!important;}
.filterModalGrid label span{display:block;font-size:11px;font-weight:900;color:#66758d;margin-bottom:5px;}
.filterModalGrid select{border:0;background:transparent;width:100%;outline:none;font-weight:850;color:var(--ink);}
.modalActions{display:flex;justify-content:flex-end;gap:12px;margin-top:16px;}
.singleActions{display:flex!important;flex-direction:column!important;gap:8px!important;align-items:stretch!important;justify-content:center!important;grid-template-columns:none!important;grid-template-rows:none!important;}
.singleActions .waBtn,.singleActions .payBtn{width:100%;}
@media(max-width:1200px){.crmFiltersFinal.compactControls,.cobFilters.compactControls{grid-template-columns:1fr 1fr!important}.filterModalGrid{grid-template-columns:1fr}}
/* V7 logic pass: mantener botones limpios al activar funciones */
.movementGroup div:empty::after{content:'Sin acciones disponibles';color:#64748b;font-size:12px;font-weight:700;}
.cobActions.singleActions:empty::after{content:'Sin acciones';color:#64748b;font-size:12px;font-weight:700;}
.detailGrid .detailField{min-width:0;}
.detailField b{word-break:break-word;}

/* V7.3 fixes: modales internos y movimientos limpios */
.stdActionDlg{width:min(620px,94vw);border:0;border-radius:24px;padding:0;box-shadow:0 34px 95px rgba(0,0,0,.34);}
.stdActionDlg::backdrop{background:rgba(7,17,33,.58);backdrop-filter:blur(4px);}
.stdActionCard{background:#fff;border:1px solid var(--line);border-radius:24px;overflow:hidden;}
.stdActionHead{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px 22px 14px;border-bottom:1px solid var(--line);}
.stdActionHead h3{margin:0;color:var(--azul);font-size:24px;letter-spacing:-.025em;}
.stdActionHead p{margin:4px 0 0;color:var(--muted);font-size:13px;}
.stdActionHead button{width:42px;height:42px;border-radius:14px;border:1px solid var(--line);background:#fff;font-size:22px;line-height:1;cursor:pointer;color:#0e2d60;}
.stdActionBody{padding:20px 22px;}
.stdActionFoot{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px;border-top:1px solid var(--line);}
.stdActionFoot button{min-height:42px;border-radius:14px;padding:0 18px;font-weight:950;cursor:pointer;border:1px solid var(--line);}
.stdActionFoot .stdCancel{background:#fff;color:var(--azul);}
.stdActionFoot .stdOk{background:linear-gradient(135deg,var(--celeste),var(--turq));color:#fff;border:0;box-shadow:0 14px 28px rgba(17,169,235,.22);}
.stdActionFoot .stdOk.danger{background:#ef4444;}
.stdNotice{font-size:15px;line-height:1.45;color:#152238;font-weight:700;background:#f8fcff;border:1px solid var(--line);border-radius:16px;padding:16px;}
.stdFormGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px;}
.stdFormGrid label{display:flex;flex-direction:column;gap:7px;color:var(--muted);font-weight:900;font-size:12px;text-transform:uppercase;letter-spacing:.03em;}
.stdFormGrid input{height:46px;border:1px solid var(--line);border-radius:14px;padding:0 13px;font:inherit;font-weight:850;color:#0e2d60;background:#fff;}
.payModalGrid{grid-template-columns:1fr 1fr 1fr;align-items:stretch;}
.stdResume{border:1px solid var(--line);border-radius:16px;background:#f8fcff;padding:12px 14px;display:flex;flex-direction:column;justify-content:center;min-height:64px;}
.stdResume small{color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;}
.stdResume b{margin-top:4px;color:var(--azul);font-size:18px;}
.stdOptionList{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0 14px;}
.stdOption{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:16px;padding:14px;background:#fff;cursor:pointer;}
.stdOption:hover{border-color:#a9dff4;box-shadow:0 12px 24px rgba(14,45,96,.06);}
.stdOption input{margin-top:3px;}
.stdOption span{display:flex;flex-direction:column;gap:3px;}
.stdOption b{color:#0e2d60;}
.stdOption small{color:var(--muted);font-size:12px;line-height:1.3;}
.movementTable th,.movementTable td{white-space:nowrap;}
.movementTable .nowrapDate{white-space:nowrap!important;word-break:normal!important;min-width:112px;}
@media(max-width:720px){.payModalGrid,.stdFormGrid,.stdOptionList{grid-template-columns:1fr}.stdActionFoot{flex-direction:column}.stdActionFoot button{width:100%;}}

/* ===== FIX V7.4 ===== */
.cleanMovementTable td{vertical-align:middle!important;}
.cleanMovementTable .nowrapDate{white-space:nowrap; word-break:normal; min-width:104px;}
.movAmount{display:inline-flex;align-items:center;justify-content:center;min-width:98px;border-radius:999px;padding:6px 10px;font-weight:900;font-variant-numeric:tabular-nums;}
.movAmount.movPos{background:#dcfce7;color:#15803d;border:1px solid #bbf7d0;}
.movAmount.movNeg{background:#fee2e2;color:#b91c1c;border:1px solid #fecaca;}
.movAmount.movNeutral{background:#eef2ff;color:#1e3a8a;border:1px solid #dbeafe;}
.movementPositive{background:rgba(22,163,74,.035)!important;}
.movementNegative{background:rgba(239,68,68,.04)!important;}
.textDanger{color:#dc2626!important;}
.textOk{color:#16a34a!important;}
.fieldsSortable{display:flex;flex-direction:column;gap:8px;margin-top:10px;}
.dragField{cursor:grab;user-select:none;}
.dragField.dragging{opacity:.5;border-style:dashed;}
.dragHandle{width:26px;height:26px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:#eef6ff;color:#0e2d60;font-weight:900;margin-right:8px;}
.fieldCheck.dragField{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;}
.statusBadge.danger{background:#fee2e2!important;color:#b91c1c!important;border-color:#fecaca!important;}
.statusBadge.warn{background:#fef3c7!important;color:#a16207!important;border-color:#fde68a!important;}
.statusBadge.ok{background:#dcfce7!important;color:#15803d!important;border-color:#bbf7d0!important;}


/* ===== FIX V7.5 ===== */
.detailGridV75{grid-template-columns:repeat(4,minmax(150px,1fr));align-items:stretch;}
.detailGridV75 .emailField{grid-column:span 2;}
.detailGridV75 .emailField b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;word-break:normal;}
.clientGeneralHeader{display:flex;justify-content:flex-end;margin:0 0 12px 0;}
.cleanMovementTable .movTypePill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:6px 10px;font-weight:900;background:#eef2ff;color:#1e3a8a;border:1px solid #dbeafe;}
.cleanMovementTable .movTypePill.ok{background:#dcfce7;color:#15803d;border-color:#bbf7d0;}
.cleanMovementTable .movTypePill.danger{background:#fee2e2;color:#b91c1c;border-color:#fecaca;}
.cleanMovementTable tr.movementPositive td{background:rgba(22,163,74,.045)!important;}
.cleanMovementTable tr.movementNegative td{background:rgba(239,68,68,.055)!important;}
.editClientGrid{grid-template-columns:1fr 1fr;}
.editClientGrid .wide2{grid-column:span 2;}
th{position:relative;}
.colResizeHandle{position:absolute;right:0;top:0;width:7px;height:100%;cursor:col-resize;user-select:none;touch-action:none;}
.colResizeHandle:hover{background:rgba(17,169,235,.22);}
body.resizingCols{cursor:col-resize!important;user-select:none!important;}
@media(max-width:760px){.detailGridV75{grid-template-columns:1fr}.detailGridV75 .emailField,.editClientGrid .wide2{grid-column:auto}.editClientGrid{grid-template-columns:1fr}}
/* V7.6 ajustes prueba */
.movementTable tr.movPos{background:rgba(21,183,111,.045)}
.movementTable tr.movNeg{background:rgba(255,59,48,.045)}
.movAmount{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:6px 10px;font-weight:900;min-width:110px}
.movAmount.movPos{background:#e9fbf1;color:#0b8f55;border:1px solid rgba(21,183,111,.18)}
.movAmount.movNeg{background:#fff0f0;color:#d83b3b;border:1px solid rgba(216,59,59,.18)}
.nowrapDate{white-space:nowrap;word-break:normal;line-height:1.1}
.stdActionDlg{margin:auto!important;position:fixed!important;inset:0!important;align-self:center;justify-self:center}

/* V7.8.1 - ajuste real de columnas CRM/Cobranza */
#viewCRM table[data-resizable="1"],#viewCobranza table[data-resizable="1"]{table-layout:fixed!important;}
#viewCRM table[data-resizable="1"] th,#viewCobranza table[data-resizable="1"] th{overflow:visible!important;}
.colResizeHandle{z-index:20;width:12px!important;right:-6px!important;background:transparent;}
.colResizeHandle::after{content:"";position:absolute;right:5px;top:20%;bottom:20%;width:2px;border-radius:2px;background:rgba(11,115,217,.35);opacity:.35;}
.colResizeHandle:hover::after,body.resizingCols .colResizeHandle::after{opacity:1;background:#0b73d9;}

/* V7.9: columnas CRM/Cobranza ajustables y reordenables */
.crmFinalTableWrap,.cobTableWrap{overflow:auto!important;direction:ltr!important;}
#viewCRM table[data-resizable="1"],#viewCobranza table[data-resizable="1"]{margin-left:0!important;margin-right:auto!important;transform:none!important;}
#viewCRM table[data-resizable="1"] th,#viewCobranza table[data-resizable="1"] th{padding-left:28px!important;position:relative!important;}
.colDragHandle{position:absolute;left:7px;top:50%;transform:translateY(-50%);cursor:grab;user-select:none;font-size:13px;letter-spacing:-4px;color:#7b8ba3;z-index:21;padding:8px 4px;}
.colDragHandle:active{cursor:grabbing}.draggingCol{opacity:.55!important;background:#eaf7ff!important;}
.colResizeHandle{position:absolute!important;right:-6px!important;top:0!important;width:14px!important;height:100%!important;cursor:col-resize!important;z-index:30!important;touch-action:none!important;}
.colResizeHandle::after{content:"";position:absolute;right:6px;top:18%;bottom:18%;width:2px;border-radius:2px;background:rgba(11,115,217,.42);opacity:.5;}
.colResizeHandle:hover::after,body.resizingCols .colResizeHandle::after{opacity:1;background:#0b73d9;}

/* V7.8 FIX FINAL: columnas CRM/Cobranza */
#viewCRM .tableWrap,#viewCobranza .cobTableWrap,#viewCobranza .tableWrap{overflow-x:auto!important;overflow-y:visible!important;scroll-behavior:auto!important;}
#viewCRM table[data-resizable="1"],#viewCobranza table[data-resizable="1"]{table-layout:fixed!important;margin-left:0!important;margin-right:0!important;max-width:none!important;}
#viewCRM table[data-resizable="1"] th,#viewCobranza table[data-resizable="1"] th{box-sizing:border-box!important;position:relative!important;padding-left:32px!important;padding-right:18px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#viewCRM table[data-resizable="1"] td,#viewCobranza table[data-resizable="1"] td{box-sizing:border-box!important;overflow:hidden!important;text-overflow:ellipsis!important;}
#viewCRM table[data-resizable="1"] .colDragHandle,#viewCobranza table[data-resizable="1"] .colDragHandle{left:8px!important;letter-spacing:-3px!important;}
#viewCRM table[data-resizable="1"] .colResizeHandle,#viewCobranza table[data-resizable="1"] .colResizeHandle{right:0!important;width:12px!important;}

/* V7.8.2 - columnas independientes con desplazamiento horizontal real */
#viewCRM .tableWrap,
#viewCRM .crmFinalTableWrap,
#viewCobranza .cobTableWrap,
#viewCobranza .tableWrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overflow-anchor:none!important;
  overscroll-behavior-x:contain!important;
  direction:ltr!important;
  position:relative!important;
}
#viewCRM table[data-resizable="1"],
#viewCobranza table[data-resizable="1"]{
  table-layout:fixed!important;
  margin:0!important;
  max-width:none!important;
  transform:none!important;
}
#viewCRM table[data-resizable="1"] th,
#viewCobranza table[data-resizable="1"] th{
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  vertical-align:middle!important;
}
#viewCRM table[data-resizable="1"] td,
#viewCobranza table[data-resizable="1"] td{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.colHeaderLabel{
  display:block!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  line-height:1.2!important;
}
body.resizingCols *{cursor:col-resize!important;}

/* V7.8.3 - Cobranza con scroll horizontal independiente */
#viewCobranza,
#viewCobranza .cobranzaShell{
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
}
#viewCobranza .cobTableWrap{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:visible!important;
}
#viewCobranza .cobTableScroll{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-gutter:stable!important;
  overscroll-behavior-x:contain!important;
  direction:ltr!important;
  position:relative!important;
  -webkit-overflow-scrolling:touch!important;
}
#viewCobranza .cobTableScroll::-webkit-scrollbar{height:13px!important;}
#viewCobranza .cobTableScroll::-webkit-scrollbar-track{background:#eef4f9;border-radius:999px;}
#viewCobranza .cobTableScroll::-webkit-scrollbar-thumb{background:#9eb4c8;border-radius:999px;border:3px solid #eef4f9;}
#viewCobranza .cobTableScroll .cobTableExact[data-resizable="1"]{
  width:max-content!important;
  min-width:100%!important;
  max-width:none!important;
  table-layout:fixed!important;
  margin:0!important;
}
#viewCobranza .cobTableScroll .cobTableExact[data-resizable="1"] th,
#viewCobranza .cobTableScroll .cobTableExact[data-resizable="1"] td{
  flex:none!important;
  box-sizing:border-box!important;
}
#viewCobranza .cobPager{
  width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}

/* ===== V8.0: contenido adaptable en columnas CRM y Cobranza ===== */
#viewCRM table[data-resizable="1"] th,
#viewCobranza table[data-resizable="1"] th{
  height:auto!important;
  min-height:56px!important;
  vertical-align:middle!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
  line-height:1.18!important;
}
#viewCRM table[data-resizable="1"] .colHeaderLabel,
#viewCobranza table[data-resizable="1"] .colHeaderLabel{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
#viewCRM table[data-resizable="1"] td,
#viewCobranza table[data-resizable="1"] td{
  height:auto!important;
  vertical-align:middle!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
#viewCRM table[data-resizable="1"] td > *,
#viewCobranza table[data-resizable="1"] td > *{
  max-width:100%!important;
  min-width:0!important;
}
#viewCRM table[data-resizable="1"] td b,
#viewCRM table[data-resizable="1"] td small,
#viewCRM table[data-resizable="1"] td span:not(.avatarCob):not(.statusBadge),
#viewCobranza table[data-resizable="1"] td b,
#viewCobranza table[data-resizable="1"] td small,
#viewCobranza table[data-resizable="1"] td em,
#viewCobranza table[data-resizable="1"] td span:not(.avatarCob):not(.statusBadge){
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  max-width:none!important;
}
#viewCRM .cobClient,
#viewCobranza .cobClient{align-items:flex-start!important;min-width:0!important;}
#viewCRM .cobClient > div,
#viewCobranza .cobClient > div{min-width:0!important;flex:1 1 auto!important;}
#viewCRM .cobClient small,#viewCRM .cobClient em,
#viewCobranza .cobClient small,#viewCobranza .cobClient em{max-width:none!important;}
#viewCRM .actionStack,#viewCRM .rowActions,#viewCRM .cobActions,
#viewCobranza .actionStack,#viewCobranza .rowActions,#viewCobranza .cobActions{
  white-space:normal!important;
  flex-wrap:wrap!important;
}

/* ===== V8.0: Dashboard · control de ahorro por apartar ===== */
.savingsControlCard{margin-top:18px;overflow:hidden;}
.savingsHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.savingsHeader h2{margin:0;color:var(--azul);}
.savingsHeader p{margin:5px 0 0;color:var(--muted);font-size:13px;}
.savingsTabs{display:flex;gap:8px;flex-wrap:wrap;}
.savingsTab{border:1px solid var(--line);background:#fff;color:var(--azul);border-radius:12px;padding:9px 13px;font-weight:900;cursor:pointer;}
.savingsTab.active{background:linear-gradient(135deg,var(--celeste),var(--turq));color:#fff;border-color:transparent;}
.savingsSummary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0;}
.savingsSummary .miniSummary{border:1px solid var(--line);border-radius:16px;background:#f8fcff;padding:13px 15px;}
.savingsSummary small{display:block;color:var(--muted);font-weight:850;font-size:11px;text-transform:uppercase;letter-spacing:.03em;}
.savingsSummary b{display:block;color:var(--azul);font-size:21px;margin-top:5px;}
.savingsTableWrap{width:100%;overflow-x:auto;overflow-y:hidden;border:1px solid var(--line);border-radius:16px;}
.savingsTable{width:100%;min-width:900px;border-collapse:collapse;table-layout:auto;}
.savingsTable th,.savingsTable td{padding:12px 13px;border-bottom:1px solid var(--line);vertical-align:middle;text-align:left;}
.savingsTable th{background:#f4f9ff;color:#30445d;font-size:11px;text-transform:uppercase;letter-spacing:.025em;white-space:nowrap;}
.savingsTable td{font-size:13px;color:#102642;}
.savingsTable tbody tr:last-child td{border-bottom:0;}
.savingsTable .clientSaving b{display:block;color:#071d3f;}
.savingsTable .clientSaving small{display:block;color:var(--muted);margin-top:3px;}
.savingsCheck{width:20px;height:20px;accent-color:#0b73d9;cursor:pointer;}
.savingsFooter{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-top:14px;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:#f8fcff;}
.savingsFooter .savingTotal small{display:block;color:var(--muted);font-weight:850;text-transform:uppercase;font-size:11px;}
.savingsFooter .savingTotal b{display:block;color:var(--azul);font-size:24px;margin-top:3px;}
.savingsActions{display:flex;gap:9px;flex-wrap:wrap;}
.savingsActions button{min-height:42px;border-radius:13px;padding:0 15px;font-weight:900;cursor:pointer;}
.savingsActions .primarySaving{border:0;background:linear-gradient(135deg,var(--celeste),var(--turq));color:#fff;}
.savingsActions .ghostSaving{border:1px solid var(--line);background:#fff;color:var(--azul);}
.savingsEmpty{padding:28px 16px;text-align:center;color:var(--muted);font-weight:800;}
.savingStatus{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900;}
.savingStatus.pending{background:#fff4d9;color:#9a6500;}
.savingStatus.done{background:#e7faee;color:#168442;}
@media(max-width:820px){.savingsSummary{grid-template-columns:1fr}.savingsFooter{align-items:stretch}.savingsActions{width:100%}.savingsActions button{flex:1 1 180px}}

/* ===== V8.1: módulo Propuestas integrado tal cual ===== */
#viewPropuestas{padding:0!important;min-height:0;}
.propuestasEmbedShell{display:flex;flex-direction:column;gap:12px;min-height:calc(100vh - 124px);height:calc(100vh - 124px);}
.propuestasEmbedNotice{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow);flex:0 0 auto;}
.propuestasEmbedNotice div{min-width:0;}
.propuestasEmbedNotice b{display:block;color:var(--azul);font-size:14px;}
.propuestasEmbedNotice span{display:block;color:var(--muted);font-size:12px;margin-top:3px;}
.propuestasFrame{display:block;width:100%;height:100%;min-height:760px;border:1px solid var(--line);border-radius:18px;background:#f4f7f6;box-shadow:var(--shadow);flex:1 1 auto;}
@media(max-width:820px){.propuestasEmbedShell{height:calc(100vh - 110px)}.propuestasEmbedNotice{align-items:stretch;flex-direction:column}.propuestasEmbedNotice button{width:100%}}


/* ===== Propuestas: integración visual nativa ERP ===== */
#viewPropuestas{padding:0!important;overflow:visible!important;}
.propuestasEmbedShell{gap:10px!important;height:auto!important;min-height:calc(100vh - 118px)!important;}
.propuestasEmbedNotice{box-shadow:none!important;border:1px solid var(--line)!important;background:linear-gradient(135deg,#fff,#f7fbfe)!important;}
.propuestasEmbedNotice b{font-size:15px!important;}
.propuestasFrame{border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;min-height:1800px!important;overflow:visible!important;}

/* Propuestas: altura dinámica para mostrar vista previa e historial completo */
.propuestasEmbedShell{height:auto!important;min-height:0!important;overflow:visible!important;}
.propuestasFrame{height:1200px;min-height:900px!important;overflow:auto!important;}
#viewPropuestas{overflow:visible!important;}


/* ===== Módulo Contratos embebido ===== */
.contratosEmbedShell{display:flex;flex-direction:column;gap:10px;min-height:0;overflow:visible}
.contratosEmbedNotice{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(135deg,#fff,#f7fbfe);box-shadow:none;flex:0 0 auto}
.contratosEmbedNotice div{min-width:0}.contratosEmbedNotice b{display:block;color:var(--azul);font-size:15px}.contratosEmbedNotice span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.contratosFrame{display:block;width:100%;height:1400px;min-height:900px;border:0;background:transparent;overflow:hidden}
@media(max-width:820px){.contratosEmbedNotice{align-items:stretch;flex-direction:column}.contratosEmbedNotice button{width:100%}.contratosFrame{min-height:1200px}}

/* V7.8 contratos: iframe con viewport propio para modales realmente centrados */
#viewContratos{min-height:0!important;overflow:hidden!important;}
.contratosEmbedShell{height:calc(100vh - 118px)!important;min-height:680px!important;overflow:hidden!important;}
.contratosFrame{height:100%!important;min-height:0!important;overflow:auto!important;border-radius:18px!important;}
#viewPropuestas .propuestasEmbedShell{gap:0!important;}


/* V7.8 navegación jerárquica para Propuestas y Contratos */
.navTree{display:flex;flex-direction:column;gap:4px}.navParent{width:100%;position:relative}.navChevron{margin-left:auto;font-size:20px;line-height:1;transition:transform .2s ease}.navTree.open .navChevron{transform:rotate(90deg)}.navChildren{display:none;flex-direction:column;gap:4px;padding-left:20px;margin-left:17px;border-left:1px solid rgba(14,45,96,.14)}.navTree.open .navChildren{display:flex}.navChildren .navLeaf{padding:9px 11px;font-size:13px;border-radius:12px}.navChildren .navLeaf svg{width:17px;height:17px;opacity:.78}.navTree.activeTree>.navParent{color:var(--azul);background:rgba(25,183,232,.07)}.historyEmbedShell{min-height:650px}.historyEmbedShell iframe{min-height:650px!important}

/* ===== MÓDULO LIQUIDACIONES EMBEBIDO ===== */
.liquidacionesEmbedShell{width:100%;min-width:0;background:transparent;border:0;overflow:visible}
.liquidacionesFrame{display:block;width:100%;min-height:900px;border:0;background:transparent;border-radius:0;overflow:auto}
#viewLiquidaciones{overflow:visible;min-width:0}

/* Liquidaciones: módulo nativo con viewport propio */
.liquidacionesEmbedShell{height:calc(100vh - 155px)!important;min-height:720px!important;overflow:hidden!important;border-radius:14px!important;}
.liquidacionesFrame{height:100%!important;min-height:0!important;overflow:auto!important;border-radius:14px!important;}

/* ===== RESULTADOS V7.9 ===== */
.resultsShell{display:grid;gap:18px}.resultsHero{background:linear-gradient(135deg,#081a37,#123d78 72%,#0ea5e9);color:#fff;border-radius:22px;padding:24px 26px;display:flex;justify-content:space-between;align-items:center;gap:20px;box-shadow:0 18px 45px rgba(8,26,55,.18)}.resultsHero h2{margin:3px 0 4px;font-size:30px}.resultsHero p{margin:0;color:#cce6ff}.resultsEyebrow{font-size:11px;font-weight:900;letter-spacing:.14em;color:#7dd3fc}.resultsHeroActions{display:flex;flex-wrap:wrap;gap:9px;align-items:center}.resultsHeroActions input{border:1px solid rgba(255,255,255,.3);background:#fff;color:#10264d;border-radius:11px;padding:11px 13px;font:700 13px Inter}.resultsHeroActions .ghostBtn{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.25);color:#fff}.resultsKpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px}.resultKpi{background:#fff;border:1px solid #dce6f4;border-radius:18px;padding:18px;box-shadow:0 10px 28px rgba(15,35,70,.06);position:relative;overflow:hidden}.resultKpi:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#2563eb}.resultKpi.income:before{background:#16a34a}.resultKpi.tax:before{background:#7c3aed}.resultKpi.expense:before{background:#ef4444}.resultKpi.profit:before{background:#0ea5e9}.resultKpi span{display:block;color:#60728d;font-size:12px;font-weight:800}.resultKpi strong{display:block;font-size:23px;margin:8px 0 5px;color:#10264d}.resultKpi small{color:#7b8aa1}.resultsGrid{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.resultsPanel,.expensePanel,.paymentsPanel{padding:0;overflow:hidden}.resultsPanelHead{padding:18px 20px;border-bottom:1px solid #eaf0f8;display:flex;justify-content:space-between;align-items:center;gap:12px}.resultsPanelHead>div:last-child{display:flex;gap:8px}.resultsPanelHead h3{margin:0;color:#10264d}.resultsPanelHead p{margin:4px 0 0;color:#6b7d97;font-size:12px}.operationGrid{display:grid;grid-template-columns:repeat(5,1fr);padding:18px;gap:10px}.operationGrid>div{background:#f7faff;border:1px solid #e3ebf6;border-radius:14px;padding:14px}.operationGrid span,.operationGrid small{display:block;color:#657892;font-size:11px;font-weight:700}.operationGrid b{font-size:23px;display:block;margin-top:6px}.taxRows{padding:14px 20px}.taxRows>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed #dde6f2}.taxRows .taxTotal b{color:#7c3aed}.taxRows .taxReserve{margin-top:8px;padding:14px;background:#edf8ff;border:1px solid #cfeeff;border-radius:13px}.taxDisclaimer{display:block;padding:0 20px 18px;color:#7a8799;line-height:1.45}.resultsTableWrap{overflow:auto}.resultsTable{width:100%;border-collapse:collapse;min-width:720px}.resultsTable th{font-size:11px;color:#56708f;text-transform:uppercase;letter-spacing:.04em;background:#f8fbff;text-align:left;padding:12px 15px;white-space:nowrap}.resultsTable td{padding:13px 15px;border-top:1px solid #edf2f8;font-size:13px}.resultsTable td small{display:block;color:#73839a;margin-top:3px}.resultTag{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900;background:#eaf2ff;color:#2455a4}.resultTag.fixed{background:#ede9fe;color:#6d28d9}.resultTag.noiva{background:#f1f5f9;color:#64748b}.expenseForm{display:grid;grid-template-columns:1fr 1fr;gap:13px}.expenseForm label span{display:block;font-size:12px;font-weight:800;margin-bottom:6px}.expenseForm input,.expenseForm select{width:100%;padding:11px;border:1px solid #d7e1ee;border-radius:10px}.expenseForm .checkLine{display:flex;align-items:center;gap:8px;padding-top:8px}.expenseForm .checkLine input{width:auto}.fixedList{display:grid;gap:8px;max-height:250px;overflow:auto}.fixedItem{display:flex;justify-content:space-between;align-items:center;border:1px solid #e1e9f4;border-radius:12px;padding:11px}.fixedItem small{display:block;color:#718099;margin-top:4px}@media(max-width:1250px){.resultsKpis{grid-template-columns:repeat(3,1fr)}.operationGrid{grid-template-columns:repeat(3,1fr)}}@media(max-width:850px){.resultsHero,.resultsPanelHead{align-items:flex-start;flex-direction:column}.resultsKpis,.resultsGrid{grid-template-columns:1fr}.operationGrid{grid-template-columns:1fr 1fr}.expenseForm{grid-template-columns:1fr}}

/* ===== Resultados V7.9: identidad STD y lectura limpia ===== */
.resultsHero{background:linear-gradient(135deg,#07152b 0%,#0e2d60 68%,#19b7e8 100%)}
.resultsHero h2{font-size:32px}
.resultsEyebrow{font-size:13px;color:#bcefff}
.resultsHeroActions input{font-size:15px;font-weight:900;padding:12px 15px}
.resultKpi:before,.resultKpi.tax:before{background:#19b7e8}
.resultKpi.income:before,.resultKpi.expense:before{background:#00b3a1}
.resultKpi.profit:before{background:#0e2d60}
.resultKpi span{font-size:14px;color:#425b7c}
.resultKpi strong{font-size:25px}
.resultsPanelHead h3{font-size:18px}
.resultsPanelHead p{font-size:14px;font-weight:800;color:#526987}
.operationGrid span{font-size:13px}
.operationGrid b{color:#0e2d60}
.taxRows>div{font-size:14px}
.taxRows .taxTotal b,.taxRows .taxReserve b{color:#0e2d60}
.taxRows .taxReserve{background:#eefaff;border-color:#bfeafa}
.resultTag{background:#e8f8ff;color:#0e5b85}
.resultTag.fixed{background:#e7fbf8;color:#087d72}
.resultsTable th{font-size:12px}
.resultsTable td{font-size:14px}
.expenseForm label span{font-size:13px}

/* V7.9.1 · KPIs limpios, iconos STD y columnas realmente independientes */
.dashboardCuteKpis .cuteKpi{display:flex!important;align-items:center!important;gap:16px!important;min-height:126px!important;padding:20px!important}
.dashboardCuteKpis .cuteKpi .kpiIcon{flex:0 0 54px;width:54px;height:54px;border-radius:18px;background:linear-gradient(135deg,#e8f2ff,#d7efff);display:grid;place-items:center;color:#0e2d60}
.dashboardCuteKpis .cuteKpi .kpiIcon svg{width:27px;height:27px}
.dashboardCuteKpis .cuteKpi .t{font-size:15px!important;font-weight:900!important;color:#36506f!important;margin:0 0 7px!important}
.dashboardCuteKpis .cuteKpi .v{font-size:29px!important;line-height:1!important}
.dashboardCuteKpis .kpi .s{display:none!important}
#viewCobranza .cobKpi small{display:none!important}
#viewCobranza .cobKpi{min-height:118px!important}
#viewCobranza .cobKpi>div:last-child{display:flex;flex-direction:column;justify-content:center;gap:7px}
#viewCobranza .cobKpi span:not(.kpiIcon){font-size:14px!important;font-weight:900!important;color:#3d5878!important}
#viewCobranza .cobKpi b{font-size:27px!important}
.resultsKpis .resultKpi{display:flex!important;align-items:center!important;gap:14px!important;min-height:124px!important}
.resultsKpis .resultKpi .kpiIcon{flex:0 0 50px;width:50px;height:50px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#eaf4ff,#dff6ff);color:#0e2d60}
.resultsKpis .resultKpi .kpiIcon svg{width:25px;height:25px}
.resultsKpis .resultKpi>div{min-width:0;display:flex;flex-direction:column;gap:7px}
.resultsKpis .resultKpi span:not(.kpiIcon){font-size:14px!important;font-weight:900!important}
.resultsKpis .resultKpi strong{font-size:24px!important}
#viewCRM table.dynamicTable,#viewCobranza table.dynamicCobTable{table-layout:fixed!important;width:max-content!important;min-width:0!important;max-width:none!important}
#viewCRM table.dynamicTable col,#viewCobranza table.dynamicCobTable col{min-width:0!important;max-width:none!important}
#viewCRM .crmFinalTableWrap,#viewCobranza .cobTableScroll{overflow-x:auto!important;overflow-y:visible!important}
body.resizingCols{cursor:col-resize!important;user-select:none!important}

/* V7.9.2 - corrección visual definitiva de anchos CRM/Cobranza */
#viewCRM table[data-resizable="1"] th[data-field="cliente"],
#viewCRM table[data-resizable="1"] td[data-field="cliente"],
#viewCobranza table[data-resizable="1"] th[data-field="cliente"],
#viewCobranza table[data-resizable="1"] td[data-field="cliente"]{min-width:240px!important;}
#viewCRM table[data-resizable="1"] th[data-field="folio"],
#viewCRM table[data-resizable="1"] td[data-field="folio"]{min-width:190px!important;}
#viewCRM table[data-resizable="1"] .crmPerson,
#viewCobranza table[data-resizable="1"] .crmPerson,
#viewCobranza table[data-resizable="1"] .clientCob{min-width:0!important;max-width:100%!important;}
#viewCRM table[data-resizable="1"] .crmPerson>div,
#viewCobranza table[data-resizable="1"] .clientCob>div{min-width:0!important;}
#viewCRM table[data-resizable="1"] .crmPerson b,
#viewCRM table[data-resizable="1"] .crmPerson small,
#viewCobranza table[data-resizable="1"] .clientCob b,
#viewCobranza table[data-resizable="1"] .clientCob small{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;word-break:normal!important;}

/* V7.9.3 · encabezados visibles, límites flexibles y limpieza visual */
#viewCRM table[data-resizable="1"] thead th,
#viewCobranza table[data-resizable="1"] thead th{
  height:62px!important;
  min-height:62px!important;
  padding-top:17px!important;
  padding-bottom:17px!important;
  vertical-align:middle!important;
  font-size:13px!important;
  line-height:1.25!important;
  background:#f5f9ff!important;
  border-top:1px solid #d5e2f2!important;
  border-bottom:2px solid #cbdcf0!important;
}
#viewCRM table[data-resizable="1"] .colHeaderLabel,
#viewCobranza table[data-resizable="1"] .colHeaderLabel{
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-weight:950!important;
  letter-spacing:.015em!important;
}
#viewCRM table[data-resizable="1"] th[data-field="cliente"],
#viewCRM table[data-resizable="1"] td[data-field="cliente"],
#viewCobranza table[data-resizable="1"] th[data-field="cliente"],
#viewCobranza table[data-resizable="1"] td[data-field="cliente"]{min-width:120px!important;}
#viewCRM table[data-resizable="1"] th[data-field="folio"],
#viewCRM table[data-resizable="1"] td[data-field="folio"]{min-width:95px!important;}
#viewCRM table[data-resizable="1"] tbody td,
#viewCobranza table[data-resizable="1"] tbody td{padding-top:17px!important;padding-bottom:17px!important;}
/* Ocultar únicamente textos de ayuda/instrucciones, sin tocar datos de clientes */
.erp-module-note,.inline-note,.field-help,.moduleHelp,.instructionText{display:none!important;}
.resultsPanelHead p,.sectionTitle>div>p,.cardHead>div>p{display:none!important;}
/* Identidad STD en las tarjetas de resultados */
.resultsKpis .resultKpi .kpiIcon{background:linear-gradient(135deg,#e7f2ff,#d9f7fb)!important;color:#0e2d60!important;}
.resultsKpis .resultKpi.profit .kpiIcon{background:linear-gradient(135deg,#e3fbf7,#c9f3ed)!important;color:#008e85!important;}
/* Comisión CRM: columna financiera exclusiva del superadministrador */
.crmFinalTable th[data-field="comision"],
.crmFinalTable td[data-field="comision"]{min-width:145px;text-align:right;white-space:nowrap}
.crmFinalTable .commissionCell{font-variant-numeric:tabular-nums;color:#0b3f78}


/* ===== V8.12 · alineación profesional CRM, Cobranza y tablas operativas ===== */
#viewCRM table[data-resizable="1"] th,
#viewCobranza table[data-resizable="1"] th{
  text-align:center!important;
  vertical-align:middle!important;
  padding-left:24px!important;
  padding-right:24px!important;
}
#viewCRM table[data-resizable="1"] .colHeaderLabel,
#viewCobranza table[data-resizable="1"] .colHeaderLabel{
  display:block!important;
  width:100%!important;
  text-align:center!important;
  line-height:1.25!important;
}
#viewCRM table[data-resizable="1"] td,
#viewCobranza table[data-resizable="1"] td{
  text-align:center!important;
  vertical-align:middle!important;
  padding-left:12px!important;
  padding-right:12px!important;
}
#viewCRM .crmPerson,
#viewCobranza .cobClient{
  justify-content:center!important;
  width:100%!important;
  text-align:left!important;
}
#viewCRM .crmPerson>div,
#viewCobranza .cobClient>div{
  flex:0 1 auto!important;
}
#viewCRM .actionsStack,
#viewCRM .rowActions,
#viewCRM .cobActions,
#viewCobranza .actionsStack,
#viewCobranza .rowActions,
#viewCobranza .cobActions,
#viewCRM .lastAction,
#viewCobranza .payDate{
  justify-content:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
#viewCRM .respClean,
#viewCRM .respCleanSelect{
  width:100%!important;
  text-align:center!important;
  text-align-last:center!important;
}
#viewCRM td[data-field="folio"] small,
#viewCRM td[data-field="cliente"] small,
#viewCobranza td small,
#viewCobranza td em{
  display:block!important;
  text-align:center!important;
}
#viewCRM td[data-field="cliente"] .crmPerson small,
#viewCobranza td[data-field="cliente"] .cobClient small,
#viewCobranza td[data-field="cliente"] .cobClient em{
  text-align:left!important;
}
#viewCRM td[data-field="acciones"] .actionsStack,
#viewCobranza td[data-field="acciones"] .cobActions{
  align-items:center!important;
}
.dashCrmTable th,.dashCrmTable td{
  text-align:center!important;
  vertical-align:middle!important;
}
.dashCrmTable td:first-child>*,.dashCrmTable td:nth-child(2)>*{margin-left:auto;margin-right:auto;}
