
/* InmoPlus ERP 6.4.0 — una sola identidad visual */
body.inmoplus-platform-app .imp-unified-app,body.inmoplus-platform-app .imp-app-context{display:none!important}
.ipx-module-app{min-height:100vh!important}
.ipx-module-content{padding-bottom:110px!important}
.ipx-module-heading{margin:0 0 18px;padding:20px 22px;border-radius:20px;background:linear-gradient(135deg,#005c67,#087985);color:#fff;box-shadow:0 14px 30px rgba(0,92,103,.16)}
.ipx-module-heading span{display:block;color:#b9e77f;font-size:12px;font-weight:900;letter-spacing:.12em}.ipx-module-heading h1{margin:5px 0 0!important;color:#fff!important;font-size:clamp(28px,5vw,42px)!important;line-height:1.08!important}
.ipx-module-workspace{min-width:0}.ipx-module-workspace>.imp-layout,.ipx-module-workspace .imp-layout__sidebar,.ipx-module-workspace .imp-layout__topbar,.ipx-module-workspace .imp-layout__bottom{display:none!important}
.ipx-module-workspace .imp-layout__workspace,.ipx-module-workspace .imp-layout__content{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
.ipx-module-workspace>*,.ipx-module-workspace form,.ipx-module-workspace table{max-width:100%}
.ipx-sidebar .ipx-nav a{display:flex;align-items:center;gap:14px}.ipx-sidebar .ipx-nav a svg{flex:0 0 auto}
@media(max-width:767px){.ipx-module-content{padding:18px 14px 110px!important}.ipx-module-heading{padding:18px}.ipx-module-heading h1{font-size:30px!important}.ipx-module-workspace input,.ipx-module-workspace select,.ipx-module-workspace textarea,.ipx-module-workspace button{max-width:100%!important}.ipx-module-workspace table{display:block;overflow-x:auto}}

/* ==========================================================
 * InmoPlus Shared Library 1.2.1 — Mobile shell hard fix
 * Autoridad final: cabecera realmente fija + logo no recortado.
 * Se ubica al final de la cadena para vencer estilos heredados.
 * ========================================================== */
@media (max-width:1023px){
  html:has(body.inmoplus-role-dashboard-active),
  html:has(body.inmoplus-client-portal-active),
  html:has(body.inmoplus-platform-app){
    margin-top:0!important;
    padding-top:0!important;
  }

  body.inmoplus-role-dashboard-active #wpadminbar,
  body.inmoplus-client-portal-active #wpadminbar,
  body.inmoplus-platform-app #wpadminbar{
    display:none!important;
  }

  body.inmoplus-role-dashboard-active .ipx-topbar,
  body.inmoplus-client-portal-active .ipx-topbar,
  body.inmoplus-client-portal-active .inm-client-topbar,
  body.inmoplus-platform-app .ipx-topbar{
    position:fixed!important;
    inset:0 0 auto 0!important;
    top:0!important;
    left:0!important;
    right:0!important;
    width:100vw!important;
    height:64px!important;
    min-height:64px!important;
    margin:0!important;
    padding:0 14px!important;
    transform:none!important;
    translate:none!important;
    z-index:2147482000!important;
    isolation:isolate!important;
  }

  body.inmoplus-role-dashboard-active .ipx-main,
  body.inmoplus-client-portal-active .ipx-main,
  body.inmoplus-client-portal-active .inm-client-main,
  body.inmoplus-platform-app .ipx-main{
    padding-top:64px!important;
  }

  body.inmoplus-role-dashboard-active .ipx-brand,
  body.inmoplus-client-portal-active .ipx-brand,
  body.inmoplus-platform-app .ipx-brand{
    width:100%!important;
    height:126px!important;
    min-height:126px!important;
    padding:18px 10px 16px!important;
    overflow:visible!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  body.inmoplus-role-dashboard-active .ipx-brand img,
  body.inmoplus-client-portal-active .ipx-brand img,
  body.inmoplus-platform-app .ipx-brand img{
    display:block!important;
    width:auto!important;
    height:auto!important;
    max-width:min(100%,280px)!important;
    max-height:92px!important;
    aspect-ratio:auto!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0 auto!important;
    padding:0!important;
    border:0!important;
    transform:none!important;
    clip-path:none!important;
  }

  .ipx-sidebar,.inm-client-sidebar{
    padding-top:0!important;
  }
}

/* ==========================================================
 * InmoPlus Shared Library 1.3.0 — Hero actions canonicals
 * Autoridad visual para cabeceras de todos los módulos ERP.
 * Evita botones sin contraste dentro de paneles verde petróleo.
 * ========================================================== */
body.inmoplus-role-dashboard-active,
body.inmoplus-client-portal-active,
body.inmoplus-platform-app{
  --ipx-hero-bg-1:#005c67;
  --ipx-hero-bg-2:#087985;
  --ipx-hero-accent:#80c342;
  --ipx-hero-accent-hover:#70b335;
  --ipx-hero-text:#ffffff;
  --ipx-hero-muted:#d7f1f3;
  --ipx-hero-border:rgba(255,255,255,.72);
}

body.inmoplus-role-dashboard-active :is(
  .inm-crm-hero,.inm-agenda2-hero,.exp360-hero,.inm-neg-head,
  .inm-con-head,.inm-pay-head,.inm-delivery-head,.inm-close-head,
  .inm-com-hero,.inm-commerce-hero,.inm-msg-hero,.inm-agent-hero,
  .inm-client-hero,.inm-rp-hero,.inm-exec-hero,.inm-tr-hero,
  .inm-exp-front__hero,.inm-master-file__hero,.inma-hero
),
body.inmoplus-platform-app :is(
  .inm-crm-hero,.inm-agenda2-hero,.exp360-hero,.inm-neg-head,
  .inm-con-head,.inm-pay-head,.inm-delivery-head,.inm-close-head,
  .inm-com-hero,.inm-commerce-hero,.inm-msg-hero,.inm-agent-hero,
  .inm-client-hero,.inm-rp-hero,.inm-exec-hero,.inm-tr-hero,
  .inm-exp-front__hero,.inm-master-file__hero,.inma-hero
){
  background:linear-gradient(135deg,var(--ipx-hero-bg-1),var(--ipx-hero-bg-2))!important;
  color:var(--ipx-hero-text)!important;
}

body.inmoplus-role-dashboard-active :is(
  .inm-crm-hero,.inm-agenda2-hero,.exp360-hero,.inm-neg-head,
  .inm-con-head,.inm-pay-head,.inm-delivery-head,.inm-close-head,
  .inm-com-hero,.inm-commerce-hero,.inm-msg-hero,.inm-agent-hero,
  .inm-client-hero,.inm-rp-hero,.inm-exec-hero,.inm-tr-hero,
  .inm-exp-front__hero,.inm-master-file__hero,.inma-hero
) :is(h1,h2,h3),
body.inmoplus-platform-app :is(
  .inm-crm-hero,.inm-agenda2-hero,.exp360-hero,.inm-neg-head,
  .inm-con-head,.inm-pay-head,.inm-delivery-head,.inm-close-head,
  .inm-com-hero,.inm-commerce-hero,.inm-msg-hero,.inm-agent-hero,
  .inm-client-hero,.inm-rp-hero,.inm-exec-hero,.inm-tr-hero,
  .inm-exp-front__hero,.inm-master-file__hero,.inma-hero
) :is(h1,h2,h3){
  color:var(--ipx-hero-text)!important;
  opacity:1!important;
}

body.inmoplus-role-dashboard-active :is(
  .inm-crm-hero,.inm-agenda2-hero,.exp360-hero,.inm-neg-head,
  .inm-con-head,.inm-pay-head,.inm-delivery-head,.inm-close-head,
  .inm-com-hero,.inm-commerce-hero,.inm-msg-hero,.inm-agent-hero,
  .inm-client-hero,.inm-rp-hero,.inm-exec-hero,.inm-tr-hero,
  .inm-exp-front__hero,.inm-master-file__hero,.inma-hero
) > div:first-child > :is(small,.eyebrow,.inm-rp-eyebrow),
body.inmoplus-platform-app :is(
  .inm-crm-hero,.inm-agenda2-hero,.exp360-hero,.inm-neg-head,
  .inm-con-head,.inm-pay-head,.inm-delivery-head,.inm-close-head,
  .inm-com-hero,.inm-commerce-hero,.inm-msg-hero,.inm-agent-hero,
  .inm-client-hero,.inm-rp-hero,.inm-exec-hero,.inm-tr-hero,
  .inm-exp-front__hero,.inm-master-file__hero,.inma-hero
) > div:first-child > :is(small,.eyebrow,.inm-rp-eyebrow){
  color:#b9e77f!important;
  font-weight:850!important;
  letter-spacing:.08em!important;
}

body.inmoplus-role-dashboard-active :is(
  .inm-crm-hero,.inm-agenda2-hero,.exp360-hero,.inm-neg-head,
  .inm-con-head,.inm-pay-head,.inm-delivery-head,.inm-close-head,
  .inm-com-hero,.inm-commerce-hero,.inm-msg-hero,.inm-agent-hero,
  .inm-client-hero,.inm-rp-hero,.inm-exec-hero,.inm-tr-hero,
  .inm-exp-front__hero,.inm-master-file__hero,.inma-hero
) p,
body.inmoplus-platform-app :is(
  .inm-crm-hero,.inm-agenda2-hero,.exp360-hero,.inm-neg-head,
  .inm-con-head,.inm-pay-head,.inm-delivery-head,.inm-close-head,
  .inm-com-hero,.inm-commerce-hero,.inm-msg-hero,.inm-agent-hero,
  .inm-client-hero,.inm-rp-hero,.inm-exec-hero,.inm-tr-hero,
  .inm-exp-front__hero,.inm-master-file__hero,.inma-hero
) p{
  color:var(--ipx-hero-muted)!important;
  opacity:1!important;
}

/* Acciones superiores: borde blanco y texto blanco, siempre legibles. */
body.inmoplus-role-dashboard-active :is(
  .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
  .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
) :is(a,button),
body.inmoplus-platform-app :is(
  .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
  .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
) :is(a,button){
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:46px!important;
  padding:11px 16px!important;
  border:1.5px solid var(--ipx-hero-border)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.07)!important;
  color:#fff!important;
  font-weight:800!important;
  line-height:1.15!important;
  text-decoration:none!important;
  opacity:1!important;
  box-shadow:none!important;
  text-shadow:none!important;
  transition:background .16s ease,color .16s ease,border-color .16s ease,transform .16s ease!important;
}
body.inmoplus-role-dashboard-active :is(
  .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
  .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
) :is(a,button):hover,
body.inmoplus-platform-app :is(
  .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
  .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
) :is(a,button):hover{
  background:var(--ipx-hero-accent)!important;
  border-color:var(--ipx-hero-accent)!important;
  color:#17330a!important;
  transform:translateY(-1px)!important;
}
body.inmoplus-role-dashboard-active :is(
  .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
  .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
) :is(a,button):focus-visible,
body.inmoplus-platform-app :is(
  .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
  .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
) :is(a,button):focus-visible{
  outline:3px solid rgba(185,231,127,.45)!important;
  outline-offset:3px!important;
}

/* Acción primaria explícita: verde InmoPlus con texto oscuro legible. */
body.inmoplus-role-dashboard-active :is(
  .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
  .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
) :is(.primary,.inm-btn-primary,[data-variant="primary"]),
body.inmoplus-platform-app :is(
  .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
  .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
) :is(.primary,.inm-btn-primary,[data-variant="primary"]){
  background:var(--ipx-hero-accent)!important;
  border-color:var(--ipx-hero-accent)!important;
  color:#17330a!important;
}

@media(max-width:640px){
  body.inmoplus-role-dashboard-active :is(
    .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
    .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
  ),
  body.inmoplus-platform-app :is(
    .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
    .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
  ){
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body.inmoplus-role-dashboard-active :is(
    .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
    .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
  ) :is(a,button),
  body.inmoplus-platform-app :is(
    .inm-crm-actions,.inm-agenda2-actions,.exp360-actions,.inm-neg-head-actions,
    .inm-client-actions,.inm-rp-actions,.inm-exp-actions,.inm-master-actions
  ) :is(a,button){
    width:100%!important;
  }
}
