/* InmoPlus Platform 6.0 — capa canónica y encapsulada */
body.inmoplus-platform-app{
 --imp-primary:#80c342;--imp-primary-dark:#5f9e25;--imp-secondary:#005c67;
 --imp-bg:#f6f8fb;--imp-surface:#fff;--imp-text:#172033;--imp-muted:#64748b;
 --imp-border:#e2e8f0;--imp-radius:16px;--imp-bottom-nav:84px;
 background:var(--imp-bg);color:var(--imp-text);overflow-x:hidden;
}
body.inmoplus-platform-app *,body.inmoplus-platform-app *::before,body.inmoplus-platform-app *::after{box-sizing:border-box}
body.inmoplus-platform-app main,
body.inmoplus-platform-app .site-main,
body.inmoplus-platform-app .entry-content,
body.inmoplus-platform-app .inmoplus-app-content,
body.inmoplus-platform-app .imp-app-content{
 width:min(100%,1440px);max-width:none;margin-inline:auto;
 padding-left:clamp(16px,2.5vw,36px);padding-right:clamp(16px,2.5vw,36px);
 padding-bottom:calc(var(--imp-bottom-nav) + env(safe-area-inset-bottom) + 32px);
}
body.inmoplus-platform-app input:not([type=checkbox]):not([type=radio]),
body.inmoplus-platform-app select,
body.inmoplus-platform-app textarea{
 max-width:100%;min-height:46px;border:1px solid var(--imp-border);border-radius:10px;background:#fff;color:var(--imp-text);
}
body.inmoplus-platform-app textarea{min-height:140px}
body.inmoplus-platform-app button,
body.inmoplus-platform-app .button,
body.inmoplus-platform-app input[type=submit]{min-height:44px;max-width:100%}
body.inmoplus-platform-app img,body.inmoplus-platform-app iframe{max-width:100%;height:auto}
body.inmoplus-platform-app .ipp-top,
body.inmoplus-platform-app .Property Engine-dashboard-sidebar,
body.inmoplus-platform-app .Property Engine-dashboard-header,
body.inmoplus-platform-app .inmoplus-menu4-wrap{display:none!important}
body.inmoplus-platform-app .mce-toolbar-grp,body.inmoplus-platform-app .wp-editor-tools{max-width:100%;overflow-x:auto}
body.inmoplus-platform-app .mce-container,body.inmoplus-platform-app .wp-editor-wrap{max-width:100%!important}
body.inmoplus-platform-app .imp-bottom-nav,
body.inmoplus-platform-app .inmoplus-bottom-nav,
body.inmoplus-platform-app .erp-bottom-nav{z-index:1000}
@media(min-width:1024px){
 body.inmoplus-platform-app main,body.inmoplus-platform-app .site-main,body.inmoplus-platform-app .entry-content,
 body.inmoplus-platform-app .inmoplus-app-content,body.inmoplus-platform-app .imp-app-content{padding-bottom:48px}
 body.inmoplus-platform-app .imp-bottom-nav,body.inmoplus-platform-app .inmoplus-bottom-nav,body.inmoplus-platform-app .erp-bottom-nav{display:none!important}
}
@media(max-width:767px){
 body.inmoplus-platform-app .wp-editor-tabs{display:none!important}
 body.inmoplus-platform-app .mce-toolbar .mce-btn:nth-child(n+9){display:none!important}
 body.inmoplus-platform-app .form-row,body.inmoplus-platform-app .row,body.inmoplus-platform-app [class*=grid]{min-width:0}
 body.inmoplus-platform-app .button,body.inmoplus-platform-app button,body.inmoplus-platform-app input[type=submit]{white-space:normal}
}

/* 6.1.0 — Router y contexto unificados */
.inmoplus-unified-app-page .imp-unified-app{max-width:1600px;margin:0 auto;padding:24px clamp(16px,3vw,40px) 120px;box-sizing:border-box}
.imp-app-context{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px;background:#fff;border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 8px 28px rgba(15,23,42,.06);margin-bottom:16px}
.imp-app-context h1{margin:4px 0 6px;font-size:clamp(24px,3vw,36px);line-height:1.15;color:#0f172a}.imp-app-context p{margin:0;color:#64748b}.imp-eyebrow{font-size:12px;font-weight:800;letter-spacing:.12em;color:#005c67}
.imp-context-switcher{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.imp-context-link{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border:1px solid #dbe4ea;border-radius:999px;background:#fff;color:#334155;text-decoration:none;font-weight:700;font-size:13px}.imp-context-link:hover,.imp-context-link.is-active{background:#005c67;color:#fff;border-color:#005c67}
.imp-breadcrumbs{display:flex;align-items:center;gap:8px;margin:0 4px 16px;color:#64748b;font-size:14px}.imp-breadcrumbs a{color:#005c67;text-decoration:none}.imp-unified-content{min-width:0}.imp-empty-state{padding:40px;text-align:center;background:#fff;border:1px dashed #cbd5e1;border-radius:16px}
.inmoplus-unified-app-page .imp-unified-content .imv2s-shell>header,.inmoplus-unified-app-page .imp-unified-content .inmoplus-role-header,.inmoplus-unified-app-page .imp-unified-content .imp-page-hero:first-child{display:none!important}
@media(max-width:900px){.imp-app-context{display:block;padding:18px}.imp-context-switcher{justify-content:flex-start;margin-top:16px;overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.imp-context-link{white-space:nowrap}.inmoplus-unified-app-page .imp-unified-app{padding:14px 12px calc(110px + env(safe-area-inset-bottom))}}

/* 6.1.3 — Inicio por rol nativo. No reutiliza dashboards heredados. */
.imp-role-home{display:grid;gap:24px;min-width:0}
.imp-role-welcome{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px;border-radius:20px;background:linear-gradient(135deg,#005c67,#087985);color:#fff;box-shadow:0 12px 32px rgba(0,92,103,.18)}
.imp-role-welcome__copy{min-width:0}.imp-role-welcome h2{margin:5px 0 8px;color:#fff;font-size:clamp(26px,4vw,42px);line-height:1.08}.imp-role-welcome p{margin:0;max-width:760px;color:rgba(255,255,255,.84);font-size:16px;line-height:1.55}
.imp-role-kicker{display:block;color:#80c342;font-size:12px;font-weight:900;letter-spacing:.11em;text-transform:uppercase}
.imp-role-profile{display:inline-flex;align-items:center;gap:9px;flex:0 0 auto;min-height:46px;padding:0 16px;border-radius:13px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);color:#fff;text-decoration:none;font-weight:800}.imp-role-profile:hover{background:rgba(255,255,255,.2);color:#fff}
.imp-role-section{padding:24px;border:1px solid #e2e8f0;border-radius:20px;background:#fff;box-shadow:0 8px 28px rgba(15,23,42,.05)}
.imp-role-section__head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}.imp-role-section__head h3{margin:4px 0 0;color:#172033;font-size:clamp(22px,3vw,30px)}.imp-role-section__head p{max-width:520px;margin:0;color:#64748b;line-height:1.5}
.imp-quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.imp-quick-action{display:flex;align-items:center;gap:10px;min-height:56px;padding:12px 15px;border-radius:14px;background:#eef9e8;color:#172033;text-decoration:none;font-weight:800;border:1px solid #d9efcd}.imp-quick-action .dashicons{color:#5f9e25}.imp-quick-action:hover{background:#80c342;color:#0f172a}
.imp-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.imp-module-card{display:grid;grid-template-columns:48px minmax(0,1fr) 24px;align-items:center;gap:14px;min-height:104px;padding:18px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;color:#172033;text-decoration:none;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.imp-module-card:hover{transform:translateY(-2px);border-color:#80c342;box-shadow:0 10px 24px rgba(15,23,42,.08);color:#172033}.imp-module-card__icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#e8f6f7;color:#005c67;font-size:25px}.imp-module-card__body{display:grid;gap:4px;min-width:0}.imp-module-card__body strong{font-size:16px;line-height:1.25}.imp-module-card__body small{color:#64748b;font-size:13px;line-height:1.4}.imp-module-card__arrow{color:#94a3b8}
.imp-role-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:6px 4px 0;color:#64748b;font-size:13px}.imp-logout{display:inline-flex;align-items:center;gap:7px;color:#005c67;text-decoration:none;font-weight:800}
.imp-app-bottom-nav{display:none}
@media(max-width:1023px){.imp-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.imp-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
 .inmoplus-unified-app-page .imp-unified-app{padding:12px 12px calc(102px + env(safe-area-inset-bottom))}
 .imp-app-context{border-radius:18px;padding:18px}.imp-app-context h1{font-size:30px}.imp-app-context p{font-size:15px;line-height:1.45}
 .imp-context-switcher{margin:16px -2px 0;padding:0 2px 6px}.imp-context-link{min-height:42px;padding:0 16px;font-size:14px}
 .imp-breadcrumbs{margin:4px 4px 14px}
 .imp-role-home{gap:16px}.imp-role-welcome{align-items:flex-start;padding:21px 18px;border-radius:18px}.imp-role-welcome h2{font-size:29px}.imp-role-welcome p{font-size:15px}.imp-role-profile{width:46px;height:46px;padding:0;justify-content:center}.imp-role-profile span:last-child{display:none}
 .imp-role-section{padding:18px 15px;border-radius:18px}.imp-role-section__head{display:block;margin-bottom:14px}.imp-role-section__head p{margin-top:7px;font-size:14px}
 .imp-quick-grid,.imp-module-grid{grid-template-columns:1fr;gap:10px}.imp-quick-action{min-height:52px}.imp-module-card{grid-template-columns:44px minmax(0,1fr) 22px;min-height:88px;padding:14px;gap:12px}.imp-module-card__icon{width:44px;height:44px}.imp-module-card__body strong{font-size:16px}.imp-module-card__body small{font-size:13px}
 .imp-role-footer{display:block;text-align:center;padding:2px 0 8px}.imp-role-footer>span{display:block;margin-top:8px}
 .imp-app-bottom-nav{position:fixed;z-index:9999;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(5,1fr);min-height:74px;padding:8px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:rgba(255,255,255,.97);border-top:1px solid #e2e8f0;box-shadow:0 -8px 24px rgba(15,23,42,.09);backdrop-filter:blur(14px)}
 .imp-app-bottom-nav__item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;border-radius:13px;color:#64748b;text-decoration:none;font-size:11px;font-weight:800}.imp-app-bottom-nav__item .dashicons{font-size:24px;width:24px;height:24px}.imp-app-bottom-nav__item.is-active{background:#e8f6f7;color:#005c67}.imp-app-bottom-nav__item:nth-child(3){margin-top:-22px;min-height:68px;border-radius:20px;background:#80c342;color:#fff;box-shadow:0 10px 24px rgba(128,195,66,.32)}
}

/* 6.1.4 — Perfil Access compatible y uso real del ancho móvil */
body.inmoplus-platform-app.inmoplus-canonical-runtime .inmoplus-app-runtime,
body.inmoplus-platform-app.inmoplus-canonical-runtime .inmoplus-app-runtime__content{
 width:100%;max-width:none;margin:0;padding-left:0;padding-right:0;
}
body.inmoplus-platform-app .ipp-shell{width:100%;max-width:none;margin:0}
body.inmoplus-platform-app .ipp-shell .ipp-main{max-width:none}
body.inmoplus-platform-app .ipp-shell .ipp-form,
body.inmoplus-platform-app .ipp-shell .ipp-hero,
body.inmoplus-platform-app .ipp-shell .ipp-main>.ip-alert{width:auto;max-width:1180px}
@media(max-width:700px){
 body.inmoplus-platform-app main,
 body.inmoplus-platform-app .site-main,
 body.inmoplus-platform-app .entry-content,
 body.inmoplus-platform-app .inmoplus-app-content,
 body.inmoplus-platform-app .imp-app-content{padding-left:0;padding-right:0;width:100%}
 .inmoplus-unified-app-page .imp-unified-app{width:100%;max-width:none;padding-left:8px;padding-right:8px}
 .inmoplus-unified-app-page .imp-app-context,
 .inmoplus-unified-app-page .imp-unified-content,
 .inmoplus-unified-app-page .imp-role-home,
 .inmoplus-unified-app-page .imp-role-welcome,
 .inmoplus-unified-app-page .imp-role-section{width:100%;max-width:none}
 body.inmoplus-platform-app .ipp-shell .ipp-form,
 body.inmoplus-platform-app .ipp-shell .ipp-hero,
 body.inmoplus-platform-app .ipp-shell .ipp-main>.ip-alert{width:calc(100% - 16px);max-width:none;margin-left:8px;margin-right:8px}
 body.inmoplus-platform-app .ipp-shell .ipp-card,
 body.inmoplus-platform-app .ipp-shell .ipp-grid,
 body.inmoplus-platform-app .ipp-shell input:not([type=checkbox]):not([type=radio]),
 body.inmoplus-platform-app .ipp-shell select,
 body.inmoplus-platform-app .ipp-shell textarea{width:100%;max-width:none}
 body.inmoplus-platform-app .ipp-shell .ipp-grid{padding:14px;gap:14px}
 body.inmoplus-platform-app .ipp-shell .ipp-hero{border-radius:16px}
}
