/* PEM SySO UX V2 Preview · presentation bundle
 * Generated from canonical presentation sources on branch ux-v2-full-redesign.
 * This bundle replaces the accumulated runtime tag stack for authenticated surfaces.
 */
/* ===== frontend/product_shell.css ===== */
:root{
  --pem-shell-sidebar:264px;
  --pem-shell-sidebar-collapsed:76px;
  --pem-shell-topbar:64px;
  --pem-shell-border:#dfe7f0;
  --pem-shell-bg:#f5f8fc;
  --pem-shell-navy:#0c2b50;
  --pem-shell-navy-2:#082442;
  --pem-shell-blue:#0b73e0;
  --pem-shell-text:#10284a;
  --pem-shell-muted:#70829a;
}

/* Desktop principal: cabecera de marca fija y scroll independiente del menú. */
.sidebar{overflow:hidden!important;padding:0!important;display:flex!important;flex-direction:column!important}
.sidebar>.brand{flex:0 0 auto;margin:0;padding:18px 16px 16px!important;background:linear-gradient(180deg,var(--pem-shell-navy),var(--pem-shell-navy));position:relative;z-index:3;cursor:pointer;border-bottom:1px solid rgba(255,255,255,.08)}
.sidebar>.brand:focus-visible{outline:3px solid rgba(70,169,255,.65);outline-offset:-3px}
.pem-sidebar-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:10px 10px 14px;scrollbar-gutter:stable;overscroll-behavior:contain}
.pem-sidebar-scroll::-webkit-scrollbar,.pem-global-nav::-webkit-scrollbar{width:8px}.pem-sidebar-scroll::-webkit-scrollbar-thumb,.pem-global-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.18);border-radius:999px}
.pem-sidebar-footer{flex:0 0 auto;border-top:1px solid rgba(255,255,255,.08);padding:8px 10px 10px;background:var(--pem-shell-navy-2)}
.pem-sidebar-toggle{width:100%;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;border-radius:10px;padding:9px;cursor:pointer;font-weight:700;display:flex;align-items:center;justify-content:center;gap:8px}
.pem-sidebar-toggle:hover{background:rgba(255,255,255,.12)}
.pem-sidebar-toggle .pem-toggle-label{font-size:12px}
.pem-sidebar-collapsed .app-shell{grid-template-columns:var(--pem-shell-sidebar-collapsed) 1fr!important}
.pem-sidebar-collapsed .sidebar .brand>div:last-child,.pem-sidebar-collapsed .sidebar .nav-btn>span:last-child,.pem-sidebar-collapsed .pem-toggle-label,.pem-sidebar-collapsed .pem-lockup{display:none!important}
.pem-sidebar-collapsed .sidebar .brand{justify-content:center;padding-left:8px!important;padding-right:8px!important}
.pem-sidebar-collapsed .sidebar .brand .shield{width:54px!important;flex-basis:54px!important}
.pem-sidebar-collapsed .sidebar .nav-btn{justify-content:center;padding-left:8px!important;padding-right:8px!important}.pem-sidebar-collapsed .sidebar .nav-icon{width:auto!important;font-size:18px}

/* Shell compartido de superficies internas standalone. */
body.pem-standalone-shell{min-height:100vh;padding-left:var(--pem-shell-sidebar);padding-top:var(--pem-shell-topbar);background:var(--pem-shell-bg)!important;transition:padding-left .18s ease}
body.pem-standalone-shell.pem-sidebar-collapsed{padding-left:var(--pem-shell-sidebar-collapsed)}
.pem-global-sidebar{position:fixed;inset:0 auto 0 0;width:var(--pem-shell-sidebar);z-index:1200;background:linear-gradient(180deg,var(--pem-shell-navy),var(--pem-shell-navy-2));color:#fff;display:flex;flex-direction:column;transition:width .18s ease;box-shadow:8px 0 24px rgba(8,36,66,.08)}
.pem-sidebar-collapsed .pem-global-sidebar{width:var(--pem-shell-sidebar-collapsed)}
.pem-global-brand{height:94px;flex:0 0 94px;padding:17px 14px;display:flex;align-items:center;gap:10px;cursor:pointer;border-bottom:1px solid rgba(255,255,255,.08);background:var(--pem-shell-navy);overflow:hidden}
.pem-global-brand:focus-visible{outline:3px solid rgba(70,169,255,.65);outline-offset:-3px}.pem-global-logo{width:58px;height:54px;flex:0 0 58px;border-radius:9px;background:#fff url('/static/pem_syso_mark.png') center/contain no-repeat}.pem-global-brand-copy{min-width:0;white-space:nowrap}.pem-global-brand-copy b{font-size:20px}.pem-global-brand-copy b span{color:#46a9ff}.pem-global-brand-copy small{display:block;margin-top:4px;font-size:12px;line-height:1.3;text-transform:uppercase;letter-spacing:.06em;opacity:.76}
.pem-global-nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:10px;overscroll-behavior:contain;scrollbar-gutter:stable}.pem-global-link{width:100%;border:0;background:transparent;color:#dce9f8;text-decoration:none;border-radius:10px;padding:10px 11px;display:flex;align-items:center;gap:11px;margin-bottom:4px;cursor:pointer;font:inherit;text-align:left}.pem-global-link:hover,.pem-global-link.active{background:#1266bd;color:#fff}.pem-global-link .pem-nav-icon{width:22px;text-align:center;flex:0 0 22px}.pem-global-link .pem-nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pem-global-footer{flex:0 0 auto;padding:9px 10px 11px;border-top:1px solid rgba(255,255,255,.08);background:var(--pem-shell-navy-2)}
.pem-sidebar-collapsed .pem-global-brand{justify-content:center;padding-left:8px;padding-right:8px}.pem-sidebar-collapsed .pem-global-brand-copy,.pem-sidebar-collapsed .pem-global-link .pem-nav-label,.pem-sidebar-collapsed .pem-global-footer .pem-toggle-label{display:none}.pem-sidebar-collapsed .pem-global-link{justify-content:center;padding-left:8px;padding-right:8px}.pem-sidebar-collapsed .pem-global-link .pem-nav-icon{width:auto;font-size:18px}

.pem-global-topbar{position:fixed;z-index:1150;top:0;left:var(--pem-shell-sidebar);right:0;height:var(--pem-shell-topbar);background:rgba(255,255,255,.97);backdrop-filter:blur(10px);border-bottom:1px solid var(--pem-shell-border);display:flex;align-items:center;gap:14px;padding:0 22px;transition:left .18s ease}.pem-sidebar-collapsed .pem-global-topbar{left:var(--pem-shell-sidebar-collapsed)}.pem-global-context{font-weight:800;color:var(--pem-shell-text);white-space:nowrap;max-width:230px;overflow:hidden;text-overflow:ellipsis}.pem-global-search{position:relative;flex:1;max-width:520px}.pem-global-search input{width:100%;border:1px solid var(--pem-shell-border);border-radius:10px;background:#fff;padding:9px 36px 9px 36px;color:var(--pem-shell-text);outline:none}.pem-global-search input:focus{border-color:#70b5f6;box-shadow:0 0 0 3px #eaf4ff}.pem-global-search:before{content:'';position:absolute;left:12px;top:11px;width:14px;height:14px;border:2px solid var(--pem-shell-muted);border-radius:50%;box-sizing:border-box;pointer-events:none}.pem-global-search:after{content:'';position:absolute;left:24px;top:24px;width:6px;height:2px;background:var(--pem-shell-muted);border-radius:2px;transform:rotate(45deg);transform-origin:left center;pointer-events:none}.pem-global-search-kbd{position:absolute;right:9px;top:8px;border:1px solid var(--pem-shell-border);background:#f7f9fc;border-radius:6px;padding:1px 5px;color:var(--pem-shell-muted);font-size:12px}.pem-global-identity{margin-left:auto;text-align:right;min-width:0}.pem-global-identity b,.pem-global-identity small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pem-global-identity b{font-size:13px}.pem-global-identity small{font-size:12px;color:var(--pem-shell-muted);margin-top:2px}

.pem-search-results{position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;border:1px solid var(--pem-shell-border);border-radius:12px;box-shadow:0 16px 40px rgba(15,45,85,.18);overflow:hidden;max-height:360px;overflow-y:auto;z-index:3000}.pem-search-results[hidden]{display:none!important}.pem-search-option{width:100%;border:0;background:#fff;color:var(--pem-shell-text);padding:10px 12px;display:flex;gap:10px;align-items:center;text-align:left;cursor:pointer}.pem-search-option:hover,.pem-search-option[aria-selected="true"]{background:#eef6ff}.pem-search-option small{display:block;color:var(--pem-shell-muted);font-size:12px;margin-top:2px}

body.pem-standalone-shell>.brand,body.pem-standalone-shell main .brand,body.pem-standalone-shell .org-top .brand{display:none!important}
body.pem-standalone-shell #pemStandaloneSession{display:none!important}
body.pem-standalone-shell main,body.pem-standalone-shell>.shell,body.pem-standalone-shell>.org-shell{box-sizing:border-box}
body.pem-standalone-shell .top{margin-top:0}
body.pem-standalone-shell .pem-redundant-home{display:none!important}

/* Densidad y aprovechamiento del viewport por tipo de módulo. */
body.pem-route-wide>main,body.pem-route-wide>.shell,body.pem-route-wide>.org-shell{width:min(100%,1500px)!important;max-width:1500px!important;margin-left:auto!important;margin-right:auto!important}
body.pem-route-medium>main,body.pem-route-medium>.shell{width:min(100%,1280px)!important;max-width:1280px!important;margin-left:auto!important;margin-right:auto!important}
body.pem-route-reports .filters{grid-template-columns:repeat(4,minmax(0,1fr))!important}
body.pem-route-follow-up>main,body.pem-route-follow-up>.shell{width:min(100%,1320px)!important;max-width:1320px!important}
body.pem-route-plan .card,body.pem-route-legal .card,body.pem-route-reports .card{box-shadow:0 6px 18px rgba(15,45,85,.05)}

/* Dashboard principal: más densidad sin sacrificar legibilidad. */
body:not(.pem-standalone-shell) .view{max-width:1580px!important;padding:22px 24px!important}.desktop-dashboard .kpi-grid{gap:11px!important}.desktop-dashboard .kpi{padding:13px 14px!important}.desktop-dashboard .kpi .value{margin-top:8px!important;font-size:27px!important}.desktop-dashboard .card{padding:15px!important}.desktop-dashboard .dashboard-grid,.desktop-dashboard .section-grid{gap:13px!important}

@media(max-width:1450px){body.pem-route-reports .filters{grid-template-columns:repeat(3,minmax(0,1fr))!important}.pem-global-topbar{padding-left:16px;padding-right:16px}.pem-global-context{max-width:170px}}
@media(max-width:1100px){:root{--pem-shell-sidebar:230px}.pem-global-identity small{display:none}.pem-global-search{max-width:none}}
@media(max-width:900px){body.pem-standalone-shell,body.pem-standalone-shell.pem-sidebar-collapsed{padding-left:0;padding-top:58px}.pem-global-sidebar{display:none}.pem-global-topbar,.pem-sidebar-collapsed .pem-global-topbar{left:0;height:58px;padding:0 12px}.pem-global-context{display:none}.pem-global-identity{display:none}.pem-global-search-kbd{display:none}.pem-global-search{max-width:none}.sidebar{display:none!important}.app-shell,.pem-sidebar-collapsed .app-shell{display:block!important}.topbar{height:62px!important}.pem-sidebar-toggle{display:none!important}}
@media(max-width:760px){body.pem-route-reports .filters{display:grid!important;grid-template-columns:1fr!important}.pem-global-search input{font-size:16px}.pem-search-results{position:fixed;left:10px;right:10px;top:62px;max-height:55vh}}

/* UAT explicit standalone density: same visual formula proven on Riesgos/Acciones. */
@media(min-width:901px){
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions){font-size:15px}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions)>main,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions)>.shell,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions)>.org-shell{padding:14px!important}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) h1{font-size:1.65rem!important;line-height:1.18!important;margin:.2rem 0 .45rem!important}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) h2{font-size:1.15rem!important;line-height:1.22!important;margin:.25rem 0 .55rem!important}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) h3{font-size:1rem!important;line-height:1.25!important}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .card,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .create,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .moc,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .panel{border-radius:14px!important;padding:13px!important;margin-top:10px!important;margin-bottom:10px!important}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .form,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .grid,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .panels{gap:8px!important}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) input,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) select,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) textarea{padding:8px 9px!important;border-radius:8px!important}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) textarea{min-height:64px}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .btn{padding:8px 13px!important;min-height:36px}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .notice,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .banner,
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .callout{padding:10px 12px!important;margin:10px 0!important}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .tabs{margin:10px 0!important;gap:8px!important}
  body.pem-standalone-shell:not(.pem-route-risks):not(.pem-route-actions) .tab{padding:8px 14px!important}
}


/* ===== frontend/uat_exhaustive_density.css ===== */
/* UAT exhaustive desktop density
   Keep navigation geometry unchanged; compact only the working canvas so more
   operational information fits in a 100% browser zoom viewport. */
@media (min-width:901px){
  body.pem-standalone-shell{font-size:14px}

  body.pem-standalone-shell>main,
  body.pem-standalone-shell>.shell,
  body.pem-standalone-shell>.org-shell,
  body.pem-standalone-shell>.doc-shell{
    padding:10px 12px!important;
  }

  body.pem-standalone-shell h1{
    font-size:1.45rem!important;
    line-height:1.15!important;
    margin:.15rem 0 .35rem!important;
  }
  body.pem-standalone-shell h2{
    font-size:1.05rem!important;
    line-height:1.2!important;
    margin:.2rem 0 .45rem!important;
  }
  body.pem-standalone-shell h3{
    font-size:.96rem!important;
    line-height:1.2!important;
    margin:.2rem 0 .4rem!important;
  }
  body.pem-standalone-shell p{margin:.35rem 0 .55rem!important}

  body.pem-standalone-shell .card,
  body.pem-standalone-shell .create,
  body.pem-standalone-shell .moc,
  body.pem-standalone-shell .panel,
  body.pem-standalone-shell .revision,
  body.pem-standalone-shell .doc-item{
    padding:10px!important;
    margin-top:7px!important;
    margin-bottom:7px!important;
    border-radius:11px!important;
  }

  body.pem-standalone-shell .form,
  body.pem-standalone-shell .form-grid,
  body.pem-standalone-shell .grid,
  body.pem-standalone-shell .stack,
  body.pem-standalone-shell .panels,
  body.pem-standalone-shell .two,
  body.pem-standalone-shell .doc-grid{
    gap:7px!important;
  }
  body.pem-standalone-shell .doc-grid{margin-top:10px!important}

  body.pem-standalone-shell input:not([type="checkbox"]):not([type="radio"]),
  body.pem-standalone-shell select,
  body.pem-standalone-shell textarea{
    min-height:34px!important;
    padding:6px 8px!important;
    border-radius:7px!important;
    font-size:14px!important;
  }
  body.pem-standalone-shell textarea{min-height:54px!important}
  body.pem-standalone-shell label{gap:3px!important;line-height:1.2!important}

  body.pem-standalone-shell .btn,
  body.pem-standalone-shell button:not(.pem-global-back):not(.pem-sidebar-toggle):not(.pem-search-option){
    min-height:33px;
    padding:6px 10px!important;
  }
  body.pem-standalone-shell .notice,
  body.pem-standalone-shell .banner,
  body.pem-standalone-shell .callout{
    padding:8px 10px!important;
    margin:7px 0!important;
  }
  body.pem-standalone-shell .tabs{margin:7px 0!important;gap:6px!important}
  body.pem-standalone-shell .tab{padding:6px 11px!important}

  /* Empty-state cards should not consume a large part of the viewport. */
  body.pem-route-imports .empty,
  body.pem-route-documents .empty{
    min-height:0!important;
    padding:12px!important;
    margin:6px 0!important;
  }
  body.pem-route-imports .card:has(.empty),
  body.pem-route-documents .card:has(.empty){
    min-height:0!important;
    padding:10px!important;
  }

  /* Once the shared shell exists, MOC no longer needs a second navigation row. */
  body.pem-route-moc main.shell>.top>.actions{display:none!important}

  /* Organization / QR: thumbnails are operational references, not hero art. */
  body.pem-route-organization .point img.qr-thumb{
    width:108px!important;
    height:108px!important;
    padding:4px!important;
    margin:7px auto!important;
  }

  /* Root dashboard: compact only content; sidebar and topbar retain their
     current approved dimensions. Extra selector specificity intentionally
     wins over older UAT inline density rules. */
  html body:not(.pem-standalone-shell) .view{
    max-width:1600px!important;
    padding:12px 16px 18px!important;
  }
  html body:not(.pem-standalone-shell) .hero{
    margin-bottom:9px!important;
  }
  html body:not(.pem-standalone-shell) .hero h1{
    font-size:24px!important;
    line-height:1.15!important;
  }
  html body:not(.pem-standalone-shell) .security-note{
    margin:-1px 0 8px!important;
    padding:7px 10px!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .kpi-grid{
    gap:8px!important;
    margin-bottom:9px!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .kpi{
    min-height:86px!important;
    padding:8px 10px!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .kpi .label{
    font-size:13px!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .kpi .value{
    font-size:25px!important;
    margin-top:4px!important;
  }
  /* Agreed dashboard hierarchy: critical-risk value must command attention
     without making every KPI equally large. */
  html body:not(.pem-standalone-shell) .desktop-dashboard .kpi-grid>.kpi:first-child .label{
    font-size:14px!important;
    font-weight:800!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .kpi-grid>.kpi:first-child .value{
    font-size:34px!important;
    line-height:1!important;
    font-weight:850!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .kpi small{
    font-size:11px!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .card{
    padding:10px!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .card h2{
    font-size:16px!important;
    margin-bottom:7px!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .row{
    padding:6px 0!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .dashboard-grid,
  html body:not(.pem-standalone-shell) .desktop-dashboard .section-grid{
    gap:9px!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard .section-grid{
    margin-top:9px!important;
  }
  html body:not(.pem-standalone-shell) .desktop-dashboard select,
  html body:not(.pem-standalone-shell) .desktop-dashboard input{
    min-height:36px!important;
    padding:6px 8px!important;
  }
}

/* QR print preview is a responsive preview, not a physical-size canvas.
   Keep the selected centimetres for @media print, but scale the on-screen
   preview to the available browser viewport so 10/15 cm never spill outside. */
@media screen{
  body.pem-route-organization .qr-print-overlay{
    padding:12px!important;
    align-items:center!important;
    overflow:auto!important;
  }
  body.pem-route-organization .qr-print-modal{
    width:min(920px,calc(100vw - 24px))!important;
    max-height:calc(100vh - 24px)!important;
    overflow:auto!important;
    padding:14px!important;
  }
  body.pem-route-organization .qr-print-grid{
    grid-template-columns:minmax(220px,290px) minmax(0,1fr)!important;
    gap:12px!important;
  }
  body.pem-route-organization .qr-print-preview-wrap{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
    padding:10px!important;
    display:grid!important;
    place-items:start center!important;
  }
  body.pem-route-organization .qr-print-sheet{
    box-sizing:border-box!important;
    width:min(100%,520px)!important;
    min-width:0!important;
    max-width:100%!important;
    padding:16px!important;
  }
  body.pem-route-organization .qr-print-code{
    width:min(var(--qr-size),320px,34vw)!important;
    height:min(var(--qr-size),320px,34vw)!important;
    max-width:100%!important;
  }
  body.pem-route-organization .qr-print-top{
    font-size:16px!important;
    margin-bottom:10px!important;
  }
  body.pem-route-organization .qr-print-bottom,
  body.pem-route-organization .qr-print-context{
    font-size:13px!important;
  }
}

@media screen and (max-width:760px){
  body.pem-route-organization .qr-print-grid{grid-template-columns:1fr!important}
  body.pem-route-organization .qr-print-code{
    width:min(var(--qr-size),260px,72vw)!important;
    height:min(var(--qr-size),260px,72vw)!important;
  }
}

@media print{
  body.qr-printing .qr-print-code{
    width:var(--qr-size)!important;
    height:var(--qr-size)!important;
    max-width:none!important;
  }
  body.qr-printing .qr-print-sheet{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
  }
}

/* ===== frontend/uat_directed_closure_v3.css ===== */
/* Directed UAT closure V3
   Desktop information density, semantic KPI states, QR preview containment. */

@media (min-width: 1100px) {
  body.pem-root-dashboard-v3 .view {
    max-width: 1680px !important;
    padding: 7px 12px 10px !important;
  }

  body.pem-root-dashboard-v3 .hero {
    min-height: 0 !important;
    margin: 0 0 4px !important;
    gap: 8px !important;
    align-items: center !important;
  }
  body.pem-root-dashboard-v3 .hero h1 {
    font-size: 19px !important;
    line-height: 1.05 !important;
    margin: 0 !important;
  }
  body.pem-root-dashboard-v3 .hero p {
    font-size: 11px !important;
    line-height: 1.15 !important;
    margin: 2px 0 0 !important;
  }
  body.pem-root-dashboard-v3 .hero .btn,
  body.pem-root-dashboard-v3 .context-pills .pill {
    min-height: 30px !important;
    padding: 5px 9px !important;
    font-size: 12px !important;
  }

  body.pem-root-dashboard-v3 .security-note {
    padding: 4px 8px !important;
    margin: 0 0 4px !important;
    border-radius: 7px !important;
    font-size: 10.5px !important;
    line-height: 1.15 !important;
  }

  /* Filtros ejecutivos: one compact control strip rather than a large card. */
  body.pem-root-dashboard-v3 #view > .card {
    padding: 5px 8px !important;
    margin: 0 0 5px !important;
    border-radius: 9px !important;
    box-shadow: none !important;
  }
  body.pem-root-dashboard-v3 #view > .card .card-head {
    margin: 0 0 3px !important;
    align-items: center !important;
  }
  body.pem-root-dashboard-v3 #view > .card .card-head h2 {
    font-size: 12.5px !important;
    margin: 0 !important;
  }
  body.pem-root-dashboard-v3 #view > .card .card-head p {
    display: none !important;
  }
  body.pem-root-dashboard-v3 #view > .card label {
    font-size: 10.5px !important;
    line-height: 1.05 !important;
  }
  body.pem-root-dashboard-v3 #view > .card select,
  body.pem-root-dashboard-v3 #view > .card input {
    min-height: 28px !important;
    height: 28px !important;
    padding: 3px 7px !important;
    border-radius: 6px !important;
    font-size: 11.5px !important;
  }
  body.pem-root-dashboard-v3 #view > .card .badge {
    padding: 2px 6px !important;
    font-size: 9.5px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi-grid {
    grid-template-columns: repeat(8, minmax(108px, 1fr)) !important;
    gap: 5px !important;
    margin: 0 0 5px !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .kpi {
    min-height: 61px !important;
    padding: 5px 7px !important;
    border-radius: 9px !important;
    box-shadow: 0 4px 12px rgba(30,60,100,.055) !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .kpi .label {
    gap: 4px !important;
    font-size: 10.5px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .kpi .value {
    font-size: 21px !important;
    line-height: 1 !important;
    margin-top: 3px !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .kpi small {
    font-size: 8.5px !important;
    line-height: 1 !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .kpi-grid > .kpi:first-child .label {
    font-size: 11.5px !important;
    font-weight: 850 !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .kpi-grid > .kpi:first-child .value {
    font-size: 31px !important;
    line-height: .9 !important;
    font-weight: 900 !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .kpi.pem-zero-ok .value,
  body.pem-root-dashboard-v3 .desktop-dashboard .tone-green .value {
    color: var(--green) !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .dashboard-grid,
  body.pem-root-dashboard-v3 .desktop-dashboard .section-grid {
    gap: 5px !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .section-grid {
    margin-top: 5px !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .card {
    padding: 6px 8px !important;
    border-radius: 9px !important;
    box-shadow: 0 4px 12px rgba(30,60,100,.05) !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .card h2 {
    font-size: 12.5px !important;
    margin: 0 0 3px !important;
    line-height: 1.1 !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .card-head p,
  body.pem-root-dashboard-v3 .desktop-dashboard .row-sub {
    font-size: 9px !important;
    line-height: 1.1 !important;
    margin-top: 1px !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .row {
    gap: 5px !important;
    padding: 2px 0 !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .row-title {
    font-size: 10.5px !important;
    line-height: 1.08 !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .badge {
    padding: 2px 5px !important;
    font-size: 9px !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .progress-list {
    gap: 3px !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .progress-line {
    grid-template-columns: 138px 1fr 40px !important;
    gap: 5px !important;
    font-size: 9.5px !important;
    line-height: 1.05 !important;
  }
  body.pem-root-dashboard-v3 .desktop-dashboard .bar {
    height: 5px !important;
  }

  /* Keep recent activity useful but bounded so the initial dashboard stays dashboard-like. */
  body.pem-root-dashboard-v3 .desktop-dashboard > .card:last-child .list {
    max-height: 108px !important;
    overflow: auto !important;
  }
}

/* Root SPA internal views need explicit navigation actions. */
.pem-root-nav-v3 {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}
.pem-root-nav-v3 .btn { white-space: nowrap; }

/* Canonical risk/action selectors should remain compact and visually identical to native controls. */
form select[data-pem-canonical-location-v3="true"],
form select[data-pem-canonical-responsible-v3="true"] {
  width: 100%;
}

/* Organization / QR: operational reference size, not hero artwork. */
.point img.qr-thumb {
  width: 108px !important;
  height: 108px !important;
  padding: 4px !important;
  margin: 6px auto !important;
}

/* Screen preview must always fit the browser viewport. Physical centimetres are restored in @media print. */
@media screen {
  .qr-print-overlay {
    padding: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: auto !important;
  }
  .qr-print-modal {
    box-sizing: border-box !important;
    width: min(900px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
    overflow: auto !important;
    padding: 10px !important;
    border-radius: 12px !important;
  }
  .qr-print-head h2 { font-size: 17px !important; }
  .qr-print-grid {
    grid-template-columns: minmax(205px, 270px) minmax(0, 1fr) !important;
    gap: 8px !important;
    margin-top: 7px !important;
  }
  .qr-print-controls { gap: 6px !important; }
  .qr-print-controls input,
  .qr-print-controls select {
    margin-top: 2px !important;
    padding: 6px !important;
    min-height: 31px !important;
  }
  .qr-print-size-note,
  .qr-print-local-note {
    font-size: 11px !important;
    padding: 5px !important;
  }
  .qr-print-preview-wrap {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px !important;
    overflow: hidden !important;
    display: grid !important;
    place-items: center !important;
  }
  .qr-print-sheet {
    box-sizing: border-box !important;
    width: min(100%, 470px) !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 10px !important;
    margin: 0 auto !important;
  }
  .qr-print-code {
    width: min(var(--qr-size), 285px, 30vw) !important;
    height: min(var(--qr-size), 285px, 30vw) !important;
    max-width: 100% !important;
    max-height: 42vh !important;
  }
  .qr-print-top {
    font-size: 14px !important;
    margin-bottom: 6px !important;
  }
  .qr-print-context,
  .qr-print-bottom {
    font-size: 11px !important;
    margin-top: 5px !important;
  }
  .qr-print-context strong { font-size: 13px !important; }
}

@media screen and (max-width: 760px) {
  .qr-print-grid { grid-template-columns: 1fr !important; }
  .qr-print-code {
    width: min(var(--qr-size), 240px, 68vw) !important;
    height: min(var(--qr-size), 240px, 68vw) !important;
  }
}

@media print {
  body.qr-printing .qr-print-code {
    width: var(--qr-size) !important;
    height: var(--qr-size) !important;
    max-width: none !important;
    max-height: none !important;
  }
  body.qr-printing .qr-print-sheet {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

.pem-capability-disabled-v3 {
  opacity: .82;
}
.pem-capability-disabled-v3 [type="submit"] {
  display: none !important;
}


/* ===== frontend/dashboard_executive_density_v4.css ===== */
/* Dashboard executive density V4
   Goal: make the desktop home behave like an at-a-glance dashboard at 100% zoom,
   while keeping detail available inside bounded cards instead of forcing page scroll. */

@media (min-width: 900px) {
  body.pem-root-dashboard-v3 .view {
    max-width: none !important;
    padding: 5px 8px 8px !important;
  }

  body.pem-root-dashboard-v3 .hero {
    min-height: 0 !important;
    margin: 0 0 3px !important;
    gap: 6px !important;
    align-items: center !important;
  }

  body.pem-root-dashboard-v3 .hero h1 {
    font-size: 17px !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  body.pem-root-dashboard-v3 .hero p {
    font-size: 10px !important;
    line-height: 1.05 !important;
    margin: 1px 0 0 !important;
  }

  body.pem-root-dashboard-v3 .hero .btn,
  body.pem-root-dashboard-v3 .context-pills .pill {
    min-height: 27px !important;
    padding: 4px 7px !important;
    font-size: 11px !important;
  }

  body.pem-root-dashboard-v3 .security-note {
    padding: 3px 7px !important;
    margin: 0 0 3px !important;
    border-radius: 6px !important;
    font-size: 9.5px !important;
    line-height: 1.05 !important;
  }

  /* The filter block becomes a compact control strip. The date is already visible in the hero. */
  body.pem-root-dashboard-v3 #view > .card {
    padding: 4px 7px !important;
    margin: 0 0 4px !important;
    border-radius: 7px !important;
    box-shadow: none !important;
  }

  body.pem-root-dashboard-v3 #view > .card > .card-head {
    display: none !important;
  }

  body.pem-root-dashboard-v3 #view > .card label {
    font-size: 9.5px !important;
    line-height: 1 !important;
  }

  body.pem-root-dashboard-v3 #view > .card select,
  body.pem-root-dashboard-v3 #view > .card input {
    min-height: 25px !important;
    height: 25px !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    font-size: 10.5px !important;
  }

  /* Eight executive KPIs must stay on one row on normal desktop widths. */
  body.pem-root-dashboard-v3 .desktop-dashboard {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    align-items: stretch !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi-grid {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(8, minmax(76px, 1fr)) !important;
    gap: 4px !important;
    margin: 0 !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi {
    min-height: 54px !important;
    padding: 4px 6px !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 10px rgba(30,60,100,.05) !important;
    overflow: hidden !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi .label {
    gap: 3px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    white-space: normal !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi .value {
    font-size: 19px !important;
    line-height: .95 !important;
    margin-top: 2px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi small {
    font-size: 7.5px !important;
    line-height: 1 !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi-grid > .kpi:first-child .label {
    font-size: 10px !important;
    font-weight: 850 !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi-grid > .kpi:first-child .value {
    font-size: 27px !important;
    line-height: .85 !important;
    font-weight: 900 !important;
  }

  /* Flatten the old vertical sections into one two-column executive grid. */
  body.pem-root-dashboard-v3 .desktop-dashboard .dashboard-grid,
  body.pem-root-dashboard-v3 .desktop-dashboard .section-grid {
    display: contents !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .card {
    min-width: 0 !important;
    max-height: 126px !important;
    overflow: auto !important;
    padding: 5px 7px !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 10px rgba(30,60,100,.045) !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .card h2 {
    font-size: 11.5px !important;
    margin: 0 0 2px !important;
    line-height: 1.05 !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .card-head {
    margin: 0 0 2px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .card-head p,
  body.pem-root-dashboard-v3 .desktop-dashboard .row-sub {
    font-size: 8px !important;
    line-height: 1.05 !important;
    margin-top: 0 !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .row {
    gap: 4px !important;
    padding: 1px 0 !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .row-title {
    font-size: 9px !important;
    line-height: 1.05 !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .badge {
    padding: 1px 4px !important;
    font-size: 8px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .progress-list {
    gap: 2px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .progress-line {
    grid-template-columns: 118px 1fr 34px !important;
    gap: 4px !important;
    font-size: 8.5px !important;
    line-height: 1 !important;
  }

  /* The percentage already communicates the metric. Hide numerator/denominator
     micro-copy (for example 8/8) to keep the dashboard visually clean. */
  body.pem-root-dashboard-v3 .desktop-dashboard .progress-line > span > small {
    display: none !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .bar {
    height: 4px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard > .card:last-child {
    grid-column: 1 / -1 !important;
    max-height: 92px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard > .card:last-child .list {
    max-height: 66px !important;
    overflow: auto !important;
  }
}

/* Narrow desktop fallback: preserve one-row KPIs before switching to mobile UI. */
@media (min-width: 760px) and (max-width: 899px) {
  body.pem-root-dashboard-v3 .desktop-dashboard .kpi-grid {
    grid-template-columns: repeat(8, minmax(64px, 1fr)) !important;
    gap: 3px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi {
    padding: 4px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi .label {
    font-size: 8px !important;
  }

  body.pem-root-dashboard-v3 .desktop-dashboard .kpi .value {
    font-size: 17px !important;
  }
}


/* ===== frontend/product_shell_mobile.css ===== */
.pem-mobile-menu-button{display:none;border:1px solid var(--pem-shell-border);background:#fff;color:var(--pem-shell-text);border-radius:9px;width:38px;height:38px;align-items:center;justify-content:center;font-size:20px;cursor:pointer;flex:0 0 38px}.pem-mobile-backdrop{display:none;position:fixed;inset:0;background:rgba(3,22,43,.48);z-index:1190}.sidebar>.pem-lockup{display:none!important}@media(max-width:900px){.pem-mobile-menu-button{display:inline-flex}.pem-global-sidebar{display:flex!important;width:min(84vw,310px)!important;transform:translateX(-105%);transition:transform .2s ease;box-shadow:14px 0 35px rgba(3,22,43,.24)}.pem-global-brand{height:82px;flex-basis:82px}.pem-mobile-menu-open .pem-global-sidebar{transform:translateX(0)}.pem-mobile-menu-open .pem-mobile-backdrop{display:block}.pem-mobile-menu-open{overflow:hidden}.pem-global-topbar{gap:10px}.pem-global-search{min-width:0}.pem-global-footer .pem-sidebar-toggle{display:none!important}}@media(max-width:560px){.pem-global-topbar{padding:0 10px}.pem-global-search:before{left:10px}.pem-global-search input{padding-left:32px;padding-right:10px}.pem-global-sidebar{width:min(88vw,300px)!important}}


/* ===== frontend/enterprise_design_system.css ===== */
/* PEM SySO ENTERPRISE DESIGN SYSTEM · Phase A foundation
   Precedence: security/integrity/function/accessibility > enterprise UI > legacy visual polish.
   This file is the canonical visual foundation for authenticated PEM SySO surfaces. */
:root{
  --pem-color-primary-950:#071d36;
  --pem-color-primary-900:#0c2b50;
  --pem-color-primary-800:#103b69;
  --pem-color-primary-700:#145a9d;
  --pem-color-primary-600:#0b73e0;
  --pem-color-primary-500:#2487e8;
  --pem-color-primary-200:#b9dcfb;
  --pem-color-primary-100:#eaf4ff;
  --pem-color-primary-050:#f4f9ff;
  --pem-color-text:#10233f;
  --pem-color-text-strong:#091a31;
  --pem-color-muted:#65778d;
  --pem-color-subtle:#66778b;
  --pem-color-canvas:#f3f6fa;
  --pem-color-surface:#ffffff;
  --pem-color-surface-muted:#f8fafc;
  --pem-color-border:#dfe7f0;
  --pem-color-border-strong:#ccd7e4;
  --pem-color-success:#137548;
  --pem-color-success-bg:#e8f7ef;
  --pem-color-warning:#a85d00;
  --pem-color-warning-bg:#fff3dd;
  --pem-color-danger:#c92e2a;
  --pem-color-danger-bg:#fdebea;
  --pem-color-info:#176fca;
  --pem-color-info-bg:#e9f3ff;
  --pem-color-neutral:#65778d;
  --pem-color-neutral-bg:#eef3f7;

  --pem-font:Inter,"Segoe UI",Roboto,Arial,sans-serif;
  --pem-font-size-page:26px;
  --pem-font-size-section:17px;
  --pem-font-size-card:15px;
  --pem-font-size-body:14px;
  --pem-font-size-label:12px;
  --pem-font-size-meta:12px;
  --pem-font-size-kpi:28px;
  --pem-line-body:1.45;

  --pem-space-1:4px;
  --pem-space-2:8px;
  --pem-space-3:12px;
  --pem-space-4:16px;
  --pem-space-5:20px;
  --pem-space-6:24px;
  --pem-space-7:32px;
  --pem-space-8:40px;

  --pem-radius-xs:5px;
  --pem-radius-sm:7px;
  --pem-radius-md:9px;
  --pem-radius-lg:11px;
  --pem-radius-xl:13px;
  --pem-shadow-xs:0 1px 2px rgba(10,41,75,.04);
  --pem-shadow-sm:0 5px 18px rgba(10,41,75,.06);
  --pem-shadow-md:0 14px 34px rgba(10,41,75,.10);

  --pem-control-h-sm:34px;
  --pem-control-h:40px;
  --pem-control-h-lg:44px;
  --pem-sidebar-w:252px;
  --pem-sidebar-collapsed:56px;
  --pem-topbar-h:64px;
  --pem-content-max:1720px;
  --pem-detail-panel:360px;
  --pem-z-topbar:1150;
  --pem-z-sidebar:1200;
  --pem-z-overlay:3000;
}

html.pem-enterprise-ui,html.pem-enterprise-ui body{background:var(--pem-color-canvas);color:var(--pem-color-text);font-family:var(--pem-font);}
html.pem-enterprise-ui body{font-size:var(--pem-font-size-body);line-height:var(--pem-line-body);}
html.pem-enterprise-ui *{scrollbar-color:#c5d1df transparent;}
html.pem-enterprise-ui *:focus-visible{outline:3px solid rgba(36,135,232,.28);outline-offset:2px;}
html.pem-enterprise-ui a{color:var(--pem-color-primary-700);}

/* ---------- global product shell ---------- */
html.pem-enterprise-ui .app-shell{grid-template-columns:var(--pem-sidebar-w) minmax(0,1fr);}
html.pem-enterprise-ui.pem-sidebar-collapsed .app-shell{grid-template-columns:var(--pem-sidebar-collapsed) minmax(0,1fr)!important;}
html.pem-enterprise-ui .sidebar,
html.pem-enterprise-ui .pem-global-sidebar{
  width:var(--pem-sidebar-w);
  background:linear-gradient(180deg,#0c2f56 0%,#082747 58%,#071f3a 100%)!important;
  border-right:1px solid rgba(255,255,255,.06);
  box-shadow:4px 0 18px rgba(7,29,54,.08);
}
html.pem-enterprise-ui .sidebar>.brand,
html.pem-enterprise-ui .pem-global-brand{
  min-height:84px!important;
  height:auto!important;
  padding:14px 14px 13px!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  background:transparent!important;
}
html.pem-enterprise-ui .brand b,
html.pem-enterprise-ui .pem-global-brand-copy b{font-size:20px!important;letter-spacing:-.025em;font-weight:800;}
html.pem-enterprise-ui .brand small,
html.pem-enterprise-ui .pem-global-brand-copy small{font-size:12px!important;letter-spacing:.07em;line-height:1.35;color:#a9bdd3;opacity:1!important;}
html.pem-enterprise-ui .brand .shield,
html.pem-enterprise-ui .pem-global-logo{border-radius:8px!important;box-shadow:0 2px 8px rgba(0,0,0,.13)!important;}
html.pem-enterprise-ui .pem-sidebar-scroll,
html.pem-enterprise-ui .pem-global-nav{padding:10px 9px 14px!important;}
html.pem-enterprise-ui .nav-btn,
html.pem-enterprise-ui .pem-global-link{
  min-height:40px;
  padding:9px 10px!important;
  gap:10px!important;
  border-radius:8px!important;
  color:#cfdeed!important;
  font-size:13px!important;
  font-weight:620!important;
  transition:background .14s ease,color .14s ease,box-shadow .14s ease;
}
html.pem-enterprise-ui .nav-btn:hover,
html.pem-enterprise-ui .pem-global-link:hover{background:rgba(255,255,255,.075)!important;color:#fff!important;}
html.pem-enterprise-ui .nav-btn.active,
html.pem-enterprise-ui .pem-global-link.active{
  background:linear-gradient(90deg,#155ea8,#166fca)!important;
  color:#fff!important;
  box-shadow:inset 3px 0 0 #5cb2ff,0 3px 10px rgba(2,19,38,.16)!important;
}
html.pem-enterprise-ui .nav-icon,
html.pem-enterprise-ui .pem-nav-icon{width:20px!important;min-width:20px;display:grid!important;place-items:center;color:currentColor;}
html.pem-enterprise-ui .pem-enterprise-icon{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
html.pem-enterprise-ui .pem-sidebar-toggle{min-height:38px;border-radius:8px!important;font-size:12px!important;background:rgba(255,255,255,.045)!important;}

html.pem-enterprise-ui .pem-nav-section-label{
  margin:15px 10px 6px;
  color:#7895b3;
  font-size:12px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  user-select:none;
}
html.pem-enterprise-ui .pem-nav-section-label:first-child{margin-top:5px;}
html.pem-enterprise-ui .pem-nav-group-toggle{
  width:100%;
  min-height:34px;
  margin:11px 0 3px;
  padding:7px 9px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#87a3bf;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font:inherit;
  font-size:12px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.075em;
  text-transform:uppercase;
  text-align:left;
  cursor:pointer;
}
html.pem-enterprise-ui .pem-nav-group-toggle:hover,
html.pem-enterprise-ui .pem-nav-group-toggle:focus-visible{background:rgba(255,255,255,.055);color:#d9e7f5;}
html.pem-enterprise-ui .pem-nav-group-chevron{width:16px;height:16px;display:grid;place-items:center;transition:transform .16s ease;flex:0 0 16px;}
html.pem-enterprise-ui .pem-nav-group-chevron .pem-enterprise-icon{width:14px;height:14px;}
html.pem-enterprise-ui .pem-nav-group-toggle.collapsed .pem-nav-group-chevron{transform:rotate(-90deg);}
html.pem-enterprise-ui [data-pem-nav-group-collapsed="true"]{display:none!important;}
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-nav-section-label,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-nav-section-label,
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-nav-group-toggle,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-nav-group-toggle{display:none!important;}
html.pem-enterprise-ui.pem-sidebar-collapsed [data-pem-nav-group][hidden],
html.pem-enterprise-ui .pem-sidebar-collapsed [data-pem-nav-group][hidden]{display:flex!important;}
html.pem-enterprise-ui.pem-sidebar-collapsed .nav-btn,
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-link{justify-content:center!important;padding-left:8px!important;padding-right:8px!important;}

html.pem-enterprise-ui .topbar,
html.pem-enterprise-ui .pem-global-topbar{
  height:var(--pem-topbar-h)!important;
  min-height:var(--pem-topbar-h)!important;
  background:rgba(255,255,255,.985)!important;
  border-bottom:1px solid var(--pem-color-border)!important;
  box-shadow:0 1px 0 rgba(10,41,75,.02)!important;
  backdrop-filter:blur(12px);
}
html.pem-enterprise-ui .topbar{padding:0 20px!important;gap:12px!important;}
html.pem-enterprise-ui .pem-global-topbar{left:var(--pem-sidebar-w)!important;padding:0 20px!important;gap:12px!important;}
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-topbar{left:var(--pem-sidebar-collapsed)!important;}
html.pem-enterprise-ui .search.pem-global-search,
html.pem-enterprise-ui .pem-global-search,
html.pem-enterprise-ui .topbar .search{max-width:560px!important;position:relative;}
html.pem-enterprise-ui .search.pem-global-search,
html.pem-enterprise-ui .topbar .search{
  width:min(560px,45vw)!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:inherit!important;
}
html.pem-enterprise-ui .pem-global-search:before{display:none!important;content:none!important;}
html.pem-enterprise-ui .pem-enterprise-search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);display:grid;place-items:center;color:var(--pem-color-subtle);pointer-events:none;z-index:2;}
html.pem-enterprise-ui .pem-enterprise-search-icon .pem-enterprise-icon{width:17px;height:17px;}
html.pem-enterprise-ui .search.pem-global-search input,
html.pem-enterprise-ui .pem-global-search input,
html.pem-enterprise-ui .search input{
  width:100%!important;
  height:40px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:8px!important;
  background:#fbfcfe!important;
  color:var(--pem-color-text)!important;
  font-size:13px!important;
  box-shadow:none!important;
  padding:0 72px 0 44px!important;
}
html.pem-enterprise-ui .search.pem-global-search input:focus,
html.pem-enterprise-ui .pem-global-search input:focus{background:#fff!important;border-color:#95c4f1!important;box-shadow:0 0 0 3px rgba(36,135,232,.10)!important;}
html.pem-enterprise-ui .pem-global-search-kbd{
  top:50%!important;
  right:9px!important;
  transform:translateY(-50%);
  background:#fff!important;
  border-color:var(--pem-color-border)!important;
  color:var(--pem-color-subtle)!important;
  font-size:12px!important;
}
html.pem-enterprise-ui .demo-context label{color:var(--pem-color-subtle)!important;font-size:12px!important;font-weight:750;}
html.pem-enterprise-ui .demo-context select{height:38px!important;border-radius:8px!important;border-color:var(--pem-color-border)!important;background:#fff!important;color:var(--pem-color-text)!important;font-size:12px!important;}
html.pem-enterprise-ui .avatar{width:36px;height:36px;background:var(--pem-color-primary-700)!important;box-shadow:none!important;}
html.pem-enterprise-ui .user b{font-size:13px;}
html.pem-enterprise-ui .user small{font-size:12px;color:var(--pem-color-muted)!important;}
html.pem-enterprise-ui .bell{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:transparent!important;color:var(--pem-color-text)!important;}
html.pem-enterprise-ui .bell .pem-enterprise-icon{width:18px;height:18px;}

/* ---------- content hierarchy ---------- */
html.pem-enterprise-ui .view{max-width:var(--pem-content-max)!important;padding:18px 22px 28px!important;margin:0 auto!important;}
html.pem-enterprise-ui body.pem-standalone-shell>main,
html.pem-enterprise-ui body.pem-standalone-shell>.shell,
html.pem-enterprise-ui body.pem-standalone-shell>.org-shell,
html.pem-enterprise-ui body.pem-standalone-shell>.doc-shell{max-width:var(--pem-content-max)!important;width:100%!important;margin:0 auto!important;padding:18px 22px 28px!important;}
html.pem-enterprise-ui .hero{align-items:flex-start!important;margin:0 0 16px!important;gap:16px!important;}
html.pem-enterprise-ui .hero h1,
html.pem-enterprise-ui body.pem-standalone-shell h1{font-size:var(--pem-font-size-page)!important;line-height:1.14!important;letter-spacing:-.025em!important;color:var(--pem-color-text-strong)!important;font-weight:820!important;margin:0!important;}
html.pem-enterprise-ui .hero p{margin:5px 0 0!important;color:var(--pem-color-muted)!important;font-size:13px!important;line-height:1.45!important;max-width:900px;}
html.pem-enterprise-ui h2{color:var(--pem-color-text-strong);letter-spacing:-.012em;}
html.pem-enterprise-ui .security-note{
  margin:0 0 12px!important;
  padding:9px 12px!important;
  border-radius:8px!important;
  border:1px solid #d8e8f8!important;
  background:#f5faff!important;
  color:#466985!important;
  font-size:12px!important;
}

/* ---------- component system: buttons and controls ---------- */
html.pem-enterprise-ui .btn,
html.pem-enterprise-ui button.btn,
html.pem-enterprise-ui a.btn{
  min-height:38px;
  padding:8px 13px!important;
  border:1px solid var(--pem-color-border-strong)!important;
  border-radius:8px!important;
  background:#fff!important;
  color:var(--pem-color-text)!important;
  font-size:13px!important;
  font-weight:720!important;
  box-shadow:var(--pem-shadow-xs)!important;
  text-decoration:none;
}
html.pem-enterprise-ui .btn:hover{background:#f7faff!important;border-color:#b8c8d8!important;}
html.pem-enterprise-ui .btn.primary{background:var(--pem-color-primary-600)!important;border-color:var(--pem-color-primary-600)!important;color:#fff!important;box-shadow:0 3px 8px rgba(11,115,224,.16)!important;}
html.pem-enterprise-ui .btn.primary:hover{background:#0869ce!important;border-color:#0869ce!important;}
html.pem-enterprise-ui .btn.danger{background:var(--pem-color-danger)!important;border-color:var(--pem-color-danger)!important;color:#fff!important;}
html.pem-enterprise-ui .btn.ghost{background:transparent!important;border-color:transparent!important;box-shadow:none!important;}
html.pem-enterprise-ui .btn:disabled{opacity:.48!important;cursor:not-allowed!important;box-shadow:none!important;}
html.pem-enterprise-ui input,
html.pem-enterprise-ui select,
html.pem-enterprise-ui textarea{
  border:1px solid var(--pem-color-border-strong)!important;
  border-radius:8px!important;
  background:#fff!important;
  color:var(--pem-color-text)!important;
  font-family:var(--pem-font)!important;
  font-size:13px!important;
}
html.pem-enterprise-ui input:not([type="checkbox"]):not([type="radio"]),
html.pem-enterprise-ui select{min-height:38px;padding:8px 10px!important;}
html.pem-enterprise-ui textarea{padding:9px 10px!important;min-height:88px;}
html.pem-enterprise-ui input:focus,
html.pem-enterprise-ui select:focus,
html.pem-enterprise-ui textarea:focus{border-color:#89bdeb!important;box-shadow:0 0 0 3px rgba(36,135,232,.10)!important;outline:0!important;}
html.pem-enterprise-ui input:disabled,
html.pem-enterprise-ui select:disabled,
html.pem-enterprise-ui textarea:disabled{background:#f3f6f9!important;color:#7d8b9a!important;cursor:not-allowed;}

/* ---------- component system: surfaces ---------- */
html.pem-enterprise-ui .card,
html.pem-enterprise-ui .panel,
html.pem-enterprise-ui .create,
html.pem-enterprise-ui .moc{
  border:1px solid var(--pem-color-border)!important;
  border-radius:var(--pem-radius-lg)!important;
  background:var(--pem-color-surface)!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui .card{padding:16px!important;}
html.pem-enterprise-ui .card h2{font-size:var(--pem-font-size-card)!important;line-height:1.3!important;margin:0 0 11px!important;}
html.pem-enterprise-ui .card-head{align-items:flex-start!important;gap:12px!important;}
html.pem-enterprise-ui .card-head p{font-size:12px!important;color:var(--pem-color-muted)!important;}
html.pem-enterprise-ui .row{border-bottom:1px solid #e8eef4!important;}
html.pem-enterprise-ui .row-title{font-size:13px!important;font-weight:700!important;color:var(--pem-color-text)!important;}
html.pem-enterprise-ui .row-sub{font-size:12px!important;color:var(--pem-color-muted)!important;}
html.pem-enterprise-ui .empty,
html.pem-enterprise-ui .pem-enterprise-empty-state{
  padding:24px 18px!important;
  color:var(--pem-color-muted)!important;
  background:var(--pem-color-surface-muted);
  border:1px dashed #d9e2ec;
  border-radius:9px;
  text-align:center;
}
html.pem-enterprise-ui .pem-enterprise-disabled-state{
  padding:24px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:none!important;
  display:grid;
  gap:9px;
  max-width:780px;
}
html.pem-enterprise-ui .pem-enterprise-disabled-state h2{margin:0!important;font-size:20px!important;}
html.pem-enterprise-ui .pem-enterprise-disabled-state p{margin:0!important;color:var(--pem-color-muted)!important;line-height:1.5;}
html.pem-enterprise-ui .pem-enterprise-disabled-state .pem-master-actions{margin-top:5px;}
html.pem-enterprise-ui body.pem-enterprise-ppe-disabled .grid{display:none!important;}

/* ---------- semantic state system ---------- */
html.pem-enterprise-ui .badge{border-radius:999px!important;padding:4px 8px!important;font-size:12px!important;line-height:1.35!important;font-weight:750!important;background:var(--pem-color-neutral-bg)!important;color:var(--pem-color-neutral)!important;}
html.pem-enterprise-ui .badge.green{background:var(--pem-color-success-bg)!important;color:#0f7549!important;}
html.pem-enterprise-ui .badge.orange{background:var(--pem-color-warning-bg)!important;color:#9b5a05!important;}
html.pem-enterprise-ui .badge.red{background:var(--pem-color-danger-bg)!important;color:#a82421!important;}
html.pem-enterprise-ui .badge.blue{background:var(--pem-color-info-bg)!important;color:#115fae!important;}
html.pem-enterprise-ui .badge.neutral{background:var(--pem-color-neutral-bg)!important;color:var(--pem-color-neutral)!important;}
html.pem-enterprise-ui .dot{width:8px!important;height:8px!important;}
html.pem-enterprise-ui .dot.green{background:var(--pem-color-success)!important;}
html.pem-enterprise-ui .dot.orange{background:var(--pem-color-warning)!important;}
html.pem-enterprise-ui .dot.red{background:var(--pem-color-danger)!important;}
html.pem-enterprise-ui .dot.neutral{background:#9aa9b8!important;}
html.pem-enterprise-ui .tone-green .value{color:var(--pem-color-success)!important;}
html.pem-enterprise-ui .tone-orange .value{color:var(--pem-color-warning)!important;}
html.pem-enterprise-ui .tone-red .value{color:var(--pem-color-danger)!important;}
html.pem-enterprise-ui .tone-blue .value{color:var(--pem-color-primary-600)!important;}
html.pem-enterprise-ui .tone-neutral .value{color:var(--pem-color-neutral)!important;}

/* ---------- KPI system ---------- */
html.pem-enterprise-ui .kpi-grid{gap:12px!important;margin:0 0 12px!important;}
html.pem-enterprise-ui .kpi{
  min-height:98px!important;
  padding:13px 14px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:var(--pem-radius-lg)!important;
  box-shadow:var(--pem-shadow-xs)!important;
  background:#fff!important;
  transform:none!important;
}
html.pem-enterprise-ui .kpi:hover{border-color:#c7d7e7!important;box-shadow:var(--pem-shadow-sm)!important;}
html.pem-enterprise-ui .kpi .label{font-size:12px!important;color:#53677f!important;gap:7px!important;line-height:1.25!important;}
html.pem-enterprise-ui .kpi .label>span:first-child{width:30px;height:30px;border-radius:7px;display:grid;place-items:center;background:var(--pem-color-primary-050);color:var(--pem-color-primary-600);font-size:16px!important;}
html.pem-enterprise-ui .kpi .value{font-size:var(--pem-font-size-kpi)!important;line-height:1!important;margin:8px 0 4px!important;font-weight:820!important;letter-spacing:-.025em;}
html.pem-enterprise-ui .kpi small{font-size:12px!important;color:var(--pem-color-muted)!important;}
html.pem-enterprise-ui .kpi-grid.compact{max-width:none!important;}

/* Dashboard: preserve every real KPI without micro-text compression. */
html.pem-enterprise-ui body.pem-root-dashboard-v3 .desktop-dashboard{display:grid;gap:12px;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .desktop-dashboard>.kpi-grid{margin-bottom:0!important;}
@media(min-width:1280px){
  html.pem-enterprise-ui body.pem-root-dashboard-v3 .desktop-dashboard>.kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .dashboard-grid,
html.pem-enterprise-ui body.pem-root-dashboard-v3 .section-grid{gap:12px!important;margin-top:0!important;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .desktop-dashboard .card{min-height:0!important;max-height:none!important;overflow:visible!important;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .desktop-dashboard .list{gap:0!important;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .desktop-dashboard .row{padding:8px 0!important;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .progress-list{gap:9px!important;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .progress-line{grid-template-columns:minmax(150px,190px) minmax(90px,1fr) 50px!important;gap:8px!important;font-size:12px!important;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .bar{height:6px!important;background:#edf2f7!important;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .bar span{background:linear-gradient(90deg,#176fca,#2d8dea)!important;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .view>.card{padding:11px 13px!important;margin-bottom:12px!important;box-shadow:none!important;}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .view>.card label{font-size:12px!important;color:var(--pem-color-muted)!important;font-weight:700;}

/* ---------- enterprise tables ---------- */
html.pem-enterprise-ui .table-wrap{
  overflow:auto!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui table{border-collapse:separate!important;border-spacing:0!important;min-width:820px;}
html.pem-enterprise-ui th{
  position:sticky;top:0;z-index:2;
  padding:10px 11px!important;
  background:#f7f9fc!important;
  color:#5e7187!important;
  border-bottom:1px solid var(--pem-color-border)!important;
  font-size:12px!important;
  text-transform:uppercase;
  letter-spacing:.03em;
  font-weight:760!important;
}
html.pem-enterprise-ui td{padding:10px 11px!important;border-bottom:1px solid #e9eef4!important;font-size:12px!important;vertical-align:middle!important;}
html.pem-enterprise-ui tbody tr{transition:background .12s ease,box-shadow .12s ease;}
html.pem-enterprise-ui tbody tr:hover{background:#f7fbff!important;}
html.pem-enterprise-ui tbody tr.pem-selected{background:#edf6ff!important;box-shadow:inset 3px 0 0 var(--pem-color-primary-600);}
html.pem-enterprise-ui td a{color:#155fa8;text-decoration:none;font-weight:650;}
html.pem-enterprise-ui td a:hover{text-decoration:underline;}

/* ---------- master/detail ---------- */
html.pem-enterprise-ui .pem-master-detail{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,var(--pem-detail-panel));gap:12px;align-items:start;}
html.pem-enterprise-ui .pem-master-list{min-width:0;}
html.pem-enterprise-ui .pem-master-panel{position:sticky;top:78px;border:1px solid var(--pem-color-border);border-radius:10px;background:#fff;box-shadow:var(--pem-shadow-xs);min-height:260px;overflow:hidden;}
html.pem-enterprise-ui .pem-master-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:14px 15px;border-bottom:1px solid var(--pem-color-border);background:#fbfcfe;}
html.pem-enterprise-ui .pem-master-panel-head small{display:block;color:var(--pem-color-muted);font-size:12px;text-transform:uppercase;letter-spacing:.06em;font-weight:750;margin-bottom:3px;}
html.pem-enterprise-ui .pem-master-panel-head h2{font-size:18px!important;margin:0!important;}
html.pem-enterprise-ui .pem-master-panel-body{padding:15px;display:grid;gap:14px;}
html.pem-enterprise-ui .pem-master-panel-section{display:grid;gap:5px;}
html.pem-enterprise-ui .pem-master-panel-section>span{font-size:12px;text-transform:uppercase;letter-spacing:.055em;color:var(--pem-color-subtle);font-weight:760;}
html.pem-enterprise-ui .pem-master-panel-section p{margin:0;font-size:13px;line-height:1.5;color:var(--pem-color-text);}
html.pem-enterprise-ui .pem-master-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
html.pem-enterprise-ui .pem-master-meta>div{padding:9px;border-radius:8px;background:#f7f9fc;border:1px solid #e8eef4;min-width:0;}
html.pem-enterprise-ui .pem-master-meta span{display:block;font-size:12px;color:var(--pem-color-subtle);text-transform:uppercase;letter-spacing:.04em;font-weight:720;}
html.pem-enterprise-ui .pem-master-meta b{display:block;margin-top:4px;font-size:12px;white-space:normal;overflow-wrap:anywhere;}
html.pem-enterprise-ui .pem-master-actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:2px;}
html.pem-enterprise-ui .pem-record-row{cursor:pointer;}

/* ---------- forms ---------- */
html.pem-enterprise-ui .form-grid,
html.pem-enterprise-ui .form,
html.pem-enterprise-ui .grid{gap:12px!important;}
html.pem-enterprise-ui label{color:#41566f;font-size:12px;}
html.pem-enterprise-ui .form-grid label{font-size:12px!important;font-weight:680!important;gap:6px!important;}
html.pem-enterprise-ui .form-error{border:1px solid #efc5c2!important;background:#fff7f6!important;color:#9b2622!important;}
html.pem-enterprise-ui .notice,
html.pem-enterprise-ui .banner,
html.pem-enterprise-ui .callout{border-radius:9px!important;}

/* ---------- tabs / breadcrumb / stepper / filter bar ---------- */
html.pem-enterprise-ui .tabs,
html.pem-enterprise-ui .pem-tabs{display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--pem-color-border);margin:0 0 16px!important;}
html.pem-enterprise-ui .tab,
html.pem-enterprise-ui .pem-tab{min-height:40px;padding:9px 12px!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:transparent!important;color:var(--pem-color-muted)!important;font-size:12px!important;font-weight:720!important;box-shadow:none!important;text-decoration:none;}
html.pem-enterprise-ui .tab.active,
html.pem-enterprise-ui .pem-tab.active{color:var(--pem-color-primary-700)!important;border-bottom-color:var(--pem-color-primary-600)!important;}
html.pem-enterprise-ui .pem-breadcrumb{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:0 0 9px;color:var(--pem-color-muted);font-size:12px;}
html.pem-enterprise-ui .pem-breadcrumb a{text-decoration:none;color:var(--pem-color-muted);}
html.pem-enterprise-ui .pem-breadcrumb a:hover{color:var(--pem-color-primary-700);}
html.pem-enterprise-ui .pem-filter-bar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;padding:12px;border:1px solid var(--pem-color-border);border-radius:9px;background:#fff;}
html.pem-enterprise-ui .pem-stepper{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin:0 0 16px;}
html.pem-enterprise-ui .pem-step{padding:10px 11px;border:1px solid var(--pem-color-border);border-radius:8px;background:#fff;color:var(--pem-color-muted);font-size:12px;font-weight:700;}
html.pem-enterprise-ui .pem-step.active{border-color:#9dc8ef;background:var(--pem-color-primary-050);color:var(--pem-color-primary-700);}
html.pem-enterprise-ui .pem-step.complete{border-color:#b8dfcb;background:var(--pem-color-success-bg);color:#0f7549;}

/* ---------- route normalization moved out of JS-injected style ---------- */
html.pem-enterprise-ui body.pem-route-documents>main.shell,
html.pem-enterprise-ui body.pem-route-clearance>main.shell,
html.pem-enterprise-ui body.pem-route-ppe>main.shell,
html.pem-enterprise-ui body.pem-route-organization>.org-shell,
html.pem-enterprise-ui body.pem-route-organization>main{max-width:var(--pem-content-max)!important;}
html.pem-enterprise-ui body.pem-route-documents .card,
html.pem-enterprise-ui body.pem-route-clearance .card,
html.pem-enterprise-ui body.pem-route-ppe .card,
html.pem-enterprise-ui body.pem-route-organization .card{box-shadow:var(--pem-shadow-xs)!important;}

/* UAT closure: enterprise navigation owns duplicate root controls. */
html.pem-enterprise-ui .pem-enterprise-nav-duplicate-hidden{display:none!important;}
html.pem-enterprise-ui .pem-enterprise-nd{color:var(--pem-color-neutral)!important;}

/* ---------- Phase B flagship views ---------- */
html.pem-enterprise-ui .pem-flagship-view{display:grid;gap:12px;}
html.pem-enterprise-ui .pem-flagship-view>.hero{margin-bottom:0!important;}
html.pem-enterprise-ui .pem-eyebrow{display:inline-flex;align-items:center;min-height:24px;margin:0 0 7px;padding:3px 8px;border-radius:999px;background:var(--pem-color-info-bg);color:var(--pem-color-info);font-size:12px;font-weight:800;letter-spacing:.065em;text-transform:uppercase;}
html.pem-enterprise-ui .pem-page-header{align-items:center!important;}
html.pem-enterprise-ui .pem-page-header>.btn,
html.pem-enterprise-ui .pem-page-header>a.btn{margin-left:auto;}

html.pem-enterprise-ui .pem-kpi-svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-content{display:grid;gap:12px;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-kpis{display:grid;gap:10px;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-primary,
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-secondary{grid-template-columns:repeat(4,minmax(0,1fr))!important;margin:0!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-primary .kpi{min-height:112px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-secondary .kpi{min-height:94px!important;background:#fbfcfe!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-filter-bar{display:grid;grid-template-columns:minmax(170px,.85fr) minmax(200px,1fr) minmax(200px,1fr) auto;align-items:end;margin-bottom:0;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-filter-bar label{display:grid;gap:5px;font-weight:700;color:var(--pem-color-muted);}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-period-badge{align-self:center;white-space:nowrap;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid,
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-analysis-grid{gap:12px!important;margin:0!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid .card,
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-analysis-grid .card,
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-activity{min-height:0!important;max-height:none!important;overflow:visible!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard [data-view].row{cursor:pointer;}
html.pem-enterprise-ui body.pem-root-view-dashboard .card-head .btn.ghost{min-height:32px;padding:5px 8px!important;color:var(--pem-color-primary-700)!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-activity .row-title a{text-decoration:none;color:var(--pem-color-text);}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-activity .row-title a:hover{color:var(--pem-color-primary-700);}

html.pem-enterprise-ui .pem-record-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
html.pem-enterprise-ui .pem-summary-metric{min-height:88px;padding:13px 14px;border:1px solid var(--pem-color-border);border-radius:var(--pem-radius-lg);background:#fff;box-shadow:var(--pem-shadow-xs);display:grid;align-content:center;gap:4px;}
html.pem-enterprise-ui .pem-summary-metric>span{font-size:12px;color:var(--pem-color-muted);font-weight:720;}
html.pem-enterprise-ui .pem-summary-metric>b{font-size:24px;line-height:1;color:var(--pem-color-text-strong);font-weight:820;}
html.pem-enterprise-ui .pem-summary-metric>small{font-size:12px;color:var(--pem-color-subtle);}
html.pem-enterprise-ui .pem-summary-metric.tone-red>b{color:var(--pem-color-danger);}
html.pem-enterprise-ui .pem-summary-metric.tone-orange>b{color:var(--pem-color-warning);}
html.pem-enterprise-ui .pem-summary-metric.tone-green>b{color:var(--pem-color-success);}
html.pem-enterprise-ui .pem-summary-metric.tone-blue>b{color:var(--pem-color-primary-600);}
html.pem-enterprise-ui .pem-summary-metric.tone-neutral>b{color:var(--pem-color-neutral);}
html.pem-enterprise-ui .pem-record-filter-bar{margin:0;}
html.pem-enterprise-ui .pem-record-filter-bar label{display:grid;gap:5px;font-weight:700;color:var(--pem-color-muted);}
html.pem-enterprise-ui .pem-record-filter-bar .pem-filter-grow{flex:1 1 340px;}
html.pem-enterprise-ui .pem-record-filter-bar .pem-filter-grow input{width:100%;}
html.pem-enterprise-ui .pem-filter-count{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 10px;border-radius:999px;background:var(--pem-color-neutral-bg);color:var(--pem-color-muted);font-size:12px;font-weight:750;white-space:nowrap;}
html.pem-enterprise-ui .pem-flagship-tabs{margin:0!important;}
html.pem-enterprise-ui .pem-cases-view .table-wrap,
html.pem-enterprise-ui .pem-risks-view .table-wrap{max-height:calc(100vh - 330px);}
html.pem-enterprise-ui .pem-master-detail .table-wrap{max-height:calc(100vh - 330px);}
html.pem-enterprise-ui .pem-enterprise-empty-state b{display:block;color:var(--pem-color-text);margin-bottom:4px;}
html.pem-enterprise-ui .pem-enterprise-empty-state span{display:block;font-size:12px;}

@media(max-width:1180px){
  html.pem-enterprise-ui .pem-master-detail{grid-template-columns:1fr;}
  html.pem-enterprise-ui .pem-master-panel{position:static;}
  html.pem-enterprise-ui body.pem-root-dashboard-v3 .desktop-dashboard>.kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-primary,
  html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-secondary{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html.pem-enterprise-ui .pem-record-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:900px){
  :root{--pem-sidebar-w:230px;}
  html.pem-enterprise-ui .pem-global-topbar{left:0!important;}
  html.pem-enterprise-ui .view,
  html.pem-enterprise-ui body.pem-standalone-shell>main,
  html.pem-enterprise-ui body.pem-standalone-shell>.shell,
  html.pem-enterprise-ui body.pem-standalone-shell>.org-shell,
  html.pem-enterprise-ui body.pem-standalone-shell>.doc-shell{padding:14px!important;}
  html.pem-enterprise-ui .hero h1,html.pem-enterprise-ui body.pem-standalone-shell h1{font-size:23px!important;}
  html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:760px){
  html.pem-enterprise-ui body{font-size:14px;}
  html.pem-enterprise-ui .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html.pem-enterprise-ui .pem-master-meta{grid-template-columns:1fr 1fr;}
  html.pem-enterprise-ui .table-wrap{border-radius:9px!important;}
  html.pem-enterprise-ui .pem-filter-bar{display:grid;grid-template-columns:1fr;align-items:stretch;}
  html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-filter-bar,
  html.pem-enterprise-ui .pem-record-summary{grid-template-columns:1fr;}
  html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-primary,
  html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-secondary{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html.pem-enterprise-ui .pem-page-header{align-items:flex-start!important;}
  html.pem-enterprise-ui .pem-page-header>.btn,
  html.pem-enterprise-ui .pem-page-header>a.btn{margin-left:0;}
  html.pem-enterprise-ui .pem-cases-view .table-wrap,
  html.pem-enterprise-ui .pem-risks-view .table-wrap,
  html.pem-enterprise-ui .pem-master-detail .table-wrap{max-height:none;}
}


/* ==========================================================================
   Visual closure 2026-09-18 · density, shell consistency and semantic help
   ========================================================================== */

/* A collapsed sidebar must actually collapse its physical width, not only the grid track. */
html.pem-enterprise-ui.pem-sidebar-collapsed .sidebar,
html.pem-enterprise-ui .pem-sidebar-collapsed .sidebar,
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-sidebar,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-global-sidebar{
  width:var(--pem-sidebar-collapsed)!important;
  min-width:var(--pem-sidebar-collapsed)!important;
}
html.pem-enterprise-ui.pem-sidebar-collapsed .sidebar>.brand,
html.pem-enterprise-ui .pem-sidebar-collapsed .sidebar>.brand,
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-brand,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-global-brand{
  min-height:64px!important;
  padding:10px 7px!important;
  justify-content:center!important;
}
html.pem-enterprise-ui.pem-sidebar-collapsed .sidebar>.brand>div:last-child,
html.pem-enterprise-ui .pem-sidebar-collapsed .sidebar>.brand>div:last-child{display:none!important;}
html.pem-enterprise-ui.pem-sidebar-collapsed .nav-btn,
html.pem-enterprise-ui .pem-sidebar-collapsed .nav-btn,
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-link,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-global-link{
  min-height:38px!important;
  width:40px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding:8px!important;
  justify-content:center!important;
}
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-sidebar-scroll,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-sidebar-scroll,
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-nav,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-global-nav{padding-left:5px!important;padding-right:5px!important;}
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-sidebar-toggle,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-sidebar-toggle{width:44px!important;margin-left:auto!important;margin-right:auto!important;padding:7px!important;}

/* Search owns a dedicated icon slot. No glyph may overlap the placeholder. */
html.pem-enterprise-ui .search.pem-global-search,
html.pem-enterprise-ui .pem-global-search,
html.pem-enterprise-ui .topbar .search.pem-global-search{
  display:block!important;
  position:relative!important;
  box-sizing:border-box!important;
}
html.pem-enterprise-ui .pem-enterprise-search-icon{
  left:15px!important;
  width:18px!important;
  height:18px!important;
}
html.pem-enterprise-ui .search.pem-global-search input,
html.pem-enterprise-ui .pem-global-search input,
html.pem-enterprise-ui .topbar .search.pem-global-search input{
  box-sizing:border-box!important;
  padding-left:48px!important;
  padding-right:70px!important;
  text-indent:0!important;
}
html.pem-enterprise-ui .pem-global-search:before,
html.pem-enterprise-ui .search.pem-global-search:before,
html.pem-enterprise-ui .topbar .search.pem-global-search:before{display:none!important;content:none!important;}

/* One help language across the entire product: compact information icon, never a raw '?'. */
html.pem-enterprise-ui .pem-help-trigger{
  width:24px!important;
  min-width:24px!important;
  height:24px!important;
  min-height:24px!important;
  padding:0!important;
  display:inline-grid!important;
  place-items:center!important;
  vertical-align:middle!important;
  border:1px solid #bfd0e2!important;
  border-radius:50%!important;
  background:#f8fbfe!important;
  color:#53708e!important;
  box-shadow:none!important;
  line-height:1!important;
}
html.pem-enterprise-ui .pem-help-trigger .pem-enterprise-icon{width:13px!important;height:13px!important;}
html.pem-enterprise-ui .pem-help-trigger:hover,
html.pem-enterprise-ui .pem-help-trigger:focus-visible{background:#eef6ff!important;border-color:#86b8e6!important;color:var(--pem-color-primary-700)!important;}

/* Dashboard: administrative chrome is compact; attention and exceptions get the space. */
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-header{margin-bottom:0!important;min-height:0!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-header h1{font-size:20px!important;line-height:1.1!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-header p{margin-top:3px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .security-note{padding:7px 10px!important;margin-bottom:8px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-filter-bar{
  padding:9px 11px!important;
  gap:9px!important;
}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-filter-bar label{gap:3px!important;font-size:12px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-filter-bar select{min-height:34px!important;height:34px!important;padding-top:5px!important;padding-bottom:5px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-primary .kpi{min-height:82px!important;padding:10px 12px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-kpi-grid-secondary .kpi{min-height:72px!important;padding:9px 11px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .kpi .label>span:first-child{width:26px!important;height:26px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .kpi .value{font-size:25px!important;margin:5px 0 2px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .kpi small{font-size:12px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid .card{min-height:0!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-analysis-grid{align-items:start!important;}

/* Record hubs: dense executive summaries; Cases may use a fifth operational metric. */
html.pem-enterprise-ui .pem-summary-metric{min-height:72px!important;padding:10px 12px!important;gap:3px!important;}
html.pem-enterprise-ui .pem-summary-metric>b{font-size:22px!important;}
html.pem-enterprise-ui .pem-record-summary.pem-record-summary-five{grid-template-columns:repeat(5,minmax(0,1fr))!important;}

/* Root/standalone page headings keep one visual rhythm. */
html.pem-enterprise-ui .pem-page-header,
html.pem-enterprise-ui body.pem-standalone-shell .top{min-height:0!important;}
html.pem-enterprise-ui .pem-page-header h1,
html.pem-enterprise-ui body.pem-standalone-shell h1{max-width:900px;}

/* Personas is a true product hub, not a plain page of links. */
html.pem-enterprise-ui body.pem-root-people #view{max-width:1320px!important;padding:18px 22px 28px!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-header{margin:0 0 12px!important;padding:0 0 11px!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-hub{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-card{
  display:grid!important;
  grid-template-columns:34px 1fr!important;
  gap:11px!important;
  min-height:112px!important;
  padding:14px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:inherit!important;
  text-decoration:none!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-root-people .pem-people-card-index{
  display:grid!important;place-items:center!important;width:32px!important;height:32px!important;
  border-radius:8px!important;background:#edf5fd!important;color:var(--pem-color-primary-700)!important;
  font-size:12px!important;font-weight:820!important;text-decoration:none!important;
}
html.pem-enterprise-ui body.pem-root-people .pem-people-card h2{margin:0 0 4px!important;font-size:15px!important;text-decoration:none!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-card p{margin:0 0 8px!important;font-size:12px!important;line-height:1.4!important;text-decoration:none!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-card-action{font-size:12px!important;font-weight:760!important;text-decoration:none!important;}

@media(max-width:1180px){
  html.pem-enterprise-ui .pem-record-summary.pem-record-summary-five{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media(max-width:760px){
  html.pem-enterprise-ui .pem-record-summary.pem-record-summary-five{grid-template-columns:1fr 1fr!important;}
  html.pem-enterprise-ui body.pem-root-people .pem-people-hub{grid-template-columns:1fr!important;}
}

html.pem-enterprise-ui body.pem-root-view-dashboard .desktop-dashboard .row-title{font-size:12px!important;line-height:1.25!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .desktop-dashboard .row-sub{font-size:12px!important;line-height:1.25!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .desktop-dashboard .badge{font-size:12px!important;padding:3px 6px!important;}
html.pem-enterprise-ui body.pem-root-view-dashboard .desktop-dashboard .progress-line{font-size:12px!important;line-height:1.2!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-card-index svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}


/* ==========================================================================
   Final visual consistency · fixed Home dock outside the scrolling module list
   ========================================================================== */
html.pem-enterprise-ui .sidebar>.pem-sidebar-home-link,
html.pem-enterprise-ui .pem-global-sidebar>.pem-sidebar-home-link{
  flex:0 0 auto!important;
  margin:8px 9px 4px!important;
  width:calc(100% - 18px)!important;
  min-height:40px!important;
  box-sizing:border-box!important;
}
html.pem-enterprise-ui .pem-sidebar-scroll #desktopNav>[data-view="dashboard"],
html.pem-enterprise-ui .pem-global-nav>[data-pem-module="dashboard"]{display:none!important;}
html.pem-enterprise-ui.pem-sidebar-collapsed .sidebar>.pem-sidebar-home-link,
html.pem-enterprise-ui .pem-sidebar-collapsed .sidebar>.pem-sidebar-home-link,
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-sidebar>.pem-sidebar-home-link,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-global-sidebar>.pem-sidebar-home-link{
  width:40px!important;
  min-width:40px!important;
  margin:7px auto 4px!important;
  padding:8px!important;
  justify-content:center!important;
}
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-sidebar-home-link>span:last-child,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-sidebar-home-link>span:last-child,
html.pem-enterprise-ui.pem-sidebar-collapsed .pem-sidebar-home-link .pem-nav-label,
html.pem-enterprise-ui .pem-sidebar-collapsed .pem-sidebar-home-link .pem-nav-label{display:none!important;}

/* UX V2 · identidad y legibilidad operativa */
html.pem-enterprise-ui .pem-v2-edition{display:inline-flex;align-items:center;min-height:24px;margin-left:8px;padding:3px 8px;border:1px solid #b9d7f5;border-radius:999px;background:#eef6ff;color:#0f5fa8;font-size:12px;font-weight:800;letter-spacing:.02em;vertical-align:middle}
html.pem-enterprise-ui .pem-global-context{display:flex;align-items:center;gap:6px;max-width:360px}
@media(max-width:900px){html.pem-enterprise-ui .pem-v2-edition{margin-left:0}}


/* ===== frontend/enterprise_module_layouts.css ===== */
/* PEM SySO · Enterprise module layouts
   Canonical composition layer for authenticated domain surfaces.
   Foundation/tokens/components live in enterprise_design_system.css.
   This file must not encode business rules or replace canonical engines. */

/* ---------- shared standalone composition ---------- */
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-inspections > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-findings > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-actions > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-moc > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-plan > main{
  max-width:var(--pem-content-max)!important;
  width:100%!important;
  margin:0 auto!important;
  padding:20px 24px 32px!important;
}
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-inspections .top,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-findings .top,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-actions .top,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-moc .top,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-plan .top{
  margin:0 0 14px!important;
  padding:0!important;
  min-height:0!important;
  border:0!important;
  background:transparent!important;
}
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-inspections .top>.brand,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-findings .top>.brand,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-actions .top>.brand,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-moc .top .brand,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-plan .top>.brand{display:none!important;}
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-inspections .top>a[href="/"],
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-findings .top>a[href="/"],
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-actions .top a[href="/"],
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-moc .top a[href="/"],
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-plan .top a[href="/"]{display:none!important;}
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-inspections h1,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-findings h1,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-actions h1,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-moc h1,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-plan h1{
  font-size:var(--pem-font-size-page)!important;
  line-height:1.15!important;
  letter-spacing:-.025em!important;
  color:var(--pem-color-text-strong)!important;
  font-weight:820!important;
}
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-inspections .muted,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-findings .muted,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-actions .muted,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-moc .muted,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-plan .muted{color:var(--pem-color-muted)!important;}

/* ---------- Inspecciones ---------- */
html.pem-enterprise-ui body.pem-route-inspections .shell{max-width:1280px!important;}
html.pem-enterprise-ui body.pem-route-inspections #app.card{
  max-width:1100px;
  margin:0 auto;
  padding:20px!important;
  border-radius:var(--pem-radius-lg)!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-route-inspections #app>h1{margin:8px 0 6px!important;}
html.pem-enterprise-ui body.pem-route-inspections .context{
  margin:14px 0!important;
  padding:13px 14px!important;
  border:1px solid #dbe7f3!important;
  border-radius:9px!important;
  background:#f7fbff!important;
}
html.pem-enterprise-ui body.pem-route-inspections .context>b{display:block;color:var(--pem-color-text-strong);font-size:14px;margin-bottom:3px;}
html.pem-enterprise-ui body.pem-route-inspections .formline{margin:14px 0!important;gap:6px!important;}
html.pem-enterprise-ui body.pem-route-inspections .item{
  margin-top:9px!important;
  padding:13px 14px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html.pem-enterprise-ui body.pem-route-inspections .item.critical{
  border-left:3px solid var(--pem-color-danger)!important;
  background:linear-gradient(90deg,#fff8f7 0,#fff 22%)!important;
}
html.pem-enterprise-ui body.pem-route-inspections .item h3{font-size:13px!important;line-height:1.4!important;margin:0 0 9px!important;color:var(--pem-color-text)!important;}
html.pem-enterprise-ui body.pem-route-inspections .item-grid{grid-template-columns:180px minmax(0,1fr)!important;gap:9px!important;}
html.pem-enterprise-ui body.pem-route-inspections .actions{margin-top:16px!important;}
html.pem-enterprise-ui body.pem-route-inspections .uat-inspection-card{
  min-height:132px!important;
  padding:16px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-route-inspections .uat-inspection-card:hover{border-color:#b9cee2!important;box-shadow:var(--pem-shadow-sm)!important;}
html.pem-enterprise-ui body.pem-route-inspections .uat-inspection-card h2,
html.pem-enterprise-ui body.pem-route-inspections .uat-inspection-card h3{font-size:14px!important;color:var(--pem-color-text-strong)!important;}

/* ---------- Hallazgos ---------- */
html.pem-enterprise-ui body.pem-route-findings .shell{max-width:1360px!important;}
html.pem-enterprise-ui body.pem-route-findings .top{justify-content:flex-end!important;}
html.pem-enterprise-ui body.pem-route-findings #summary.grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0 0 12px!important;
}
html.pem-enterprise-ui body.pem-route-findings #summary .metric{
  min-height:90px;
  padding:13px 14px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:var(--pem-radius-lg)!important;
  background:#fff!important;
  box-shadow:var(--pem-shadow-xs)!important;
  display:grid;
  align-content:center;
  gap:4px;
}
html.pem-enterprise-ui body.pem-route-findings #summary .metric b{font-size:25px!important;line-height:1!important;color:var(--pem-color-text-strong)!important;margin:2px 0!important;}
html.pem-enterprise-ui body.pem-route-findings #summary .metric small{font-size:10px!important;color:var(--pem-color-subtle)!important;}
html.pem-enterprise-ui body.pem-route-findings main>.card{margin-top:0!important;padding:17px!important;}
html.pem-enterprise-ui body.pem-route-findings main>.card>.headrow{
  align-items:flex-end!important;
  margin-bottom:10px!important;
  padding-bottom:12px;
  border-bottom:1px solid var(--pem-color-border);
}
html.pem-enterprise-ui body.pem-route-findings main>.card>.headrow h1{margin:0!important;}
html.pem-enterprise-ui body.pem-route-findings #statusFilter{min-width:210px;}
html.pem-enterprise-ui body.pem-route-findings .list{gap:9px!important;margin-top:10px!important;}
html.pem-enterprise-ui body.pem-route-findings .finding{
  padding:14px 15px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html.pem-enterprise-ui body.pem-route-findings .finding.critical{border-left:3px solid var(--pem-color-danger)!important;background:linear-gradient(90deg,#fff8f7 0,#fff 18%)!important;}
html.pem-enterprise-ui body.pem-route-findings .finding h3{margin:5px 0!important;font-size:14px!important;color:var(--pem-color-text)!important;}
html.pem-enterprise-ui body.pem-route-findings .finding p{margin:6px 0!important;}
html.pem-enterprise-ui body.pem-route-findings .finding .panel{padding:12px!important;border-radius:9px!important;background:#f8fafc!important;border:1px solid var(--pem-color-border)!important;}
html.pem-enterprise-ui body.pem-route-findings .finding .actions{margin-top:11px!important;}
html.pem-enterprise-ui body.pem-route-findings .finding .form{gap:9px!important;}

/* ---------- Acciones / CAPA ---------- */
html.pem-enterprise-ui body.pem-route-actions .shell{max-width:1320px!important;}
html.pem-enterprise-ui body.pem-route-actions .top{justify-content:flex-end!important;}
html.pem-enterprise-ui body.pem-route-actions .tabs{
  margin:0 0 14px!important;
  border-bottom:1px solid var(--pem-color-border)!important;
}
html.pem-enterprise-ui body.pem-route-actions .tab{
  min-height:40px!important;
  padding:9px 12px!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--pem-color-muted)!important;
  box-shadow:none!important;
}
html.pem-enterprise-ui body.pem-route-actions .tab.active{color:var(--pem-color-primary-700)!important;border-bottom-color:var(--pem-color-primary-600)!important;}
html.pem-enterprise-ui body.pem-route-actions #capaSection{display:grid;grid-template-columns:minmax(420px,.9fr) minmax(0,1.1fr);gap:12px;align-items:start;}
html.pem-enterprise-ui body.pem-route-actions #capaSection[hidden]{display:none!important;}
html.pem-enterprise-ui body.pem-route-actions #capaSection>.card{margin:0!important;}
html.pem-enterprise-ui body.pem-route-actions #capaSection>.card:first-child{position:sticky;top:78px;}
html.pem-enterprise-ui body.pem-route-actions #actionForm{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--pem-color-border);
  gap:10px!important;
}
html.pem-enterprise-ui body.pem-route-actions #actionForm label{
  padding:0;
  color:#41566f!important;
  font-size:11px!important;
  font-weight:720!important;
}
html.pem-enterprise-ui body.pem-route-actions #actionForm label.full{
  padding:10px 0 0;
  border-top:1px solid #edf1f5;
}
html.pem-enterprise-ui body.pem-route-actions #actionForm label.full:first-child{border-top:0;padding-top:0;}
html.pem-enterprise-ui body.pem-route-actions #actionList{gap:9px!important;}
html.pem-enterprise-ui body.pem-route-actions #actionList>.item{
  padding:13px 14px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:9px!important;
  background:#fff!important;
}
html.pem-enterprise-ui body.pem-route-actions #actionList .panel{background:#f8fafc!important;border:1px solid #e7edf3!important;border-radius:8px!important;padding:10px 11px!important;}
html.pem-enterprise-ui body.pem-route-actions .verify-wait{background:var(--pem-color-warning-bg)!important;color:#8a5707!important;border:1px solid #f0d8a8!important;}

/* ---------- MOC ---------- */
html.pem-enterprise-ui body.pem-route-moc .shell{max-width:1440px!important;}
html.pem-enterprise-ui body.pem-route-moc .top{align-items:center!important;}
html.pem-enterprise-ui body.pem-route-moc .top>div:first-child>.brand{display:none!important;}
html.pem-enterprise-ui body.pem-route-moc .top>div:first-child>h1{margin:0!important;}
html.pem-enterprise-ui body.pem-route-moc .top>div:first-child>p{margin:5px 0 0!important;}
html.pem-enterprise-ui body.pem-route-moc .top>.actions{margin-left:auto;}
html.pem-enterprise-ui body.pem-route-moc .notice{
  position:relative;
  margin:0 0 12px!important;
  padding:13px 14px!important;
  border:1px solid #d8e8f8!important;
  border-radius:9px!important;
  background:#f5faff!important;
  color:#3d607f!important;
  font-size:12px!important;
}
html.pem-enterprise-ui body.pem-route-moc .notice:before{content:none!important;display:none!important;}
html.pem-enterprise-ui body.pem-route-moc .create{
  margin:0 0 12px!important;
  padding:15px 16px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-route-moc .create summary{cursor:pointer;color:var(--pem-color-text-strong);font-size:14px;}
html.pem-enterprise-ui body.pem-route-moc .moc{
  margin:0 0 12px!important;
  padding:16px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-route-moc .moc-head{padding-bottom:11px;border-bottom:1px solid var(--pem-color-border);}
html.pem-enterprise-ui body.pem-route-moc .moc-head h2{font-size:17px!important;margin:3px 0!important;}
html.pem-enterprise-ui body.pem-route-moc .code{font-size:10px!important;letter-spacing:.055em;text-transform:uppercase;color:var(--pem-color-primary-700)!important;}
html.pem-enterprise-ui body.pem-route-moc .badge2{background:var(--pem-color-neutral-bg)!important;color:var(--pem-color-neutral)!important;font-size:10px!important;font-weight:760!important;}
html.pem-enterprise-ui body.pem-route-moc .gate{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  margin:12px 0!important;
  padding:0!important;
  background:transparent!important;
}
html.pem-enterprise-ui body.pem-route-moc .gate>div{
  min-height:58px;
  display:flex;
  align-items:center;
  padding:9px 10px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:8px!important;
  background:#f8fafc!important;
  color:var(--pem-color-muted)!important;
  font-size:11px!important;
  font-weight:700;
}
html.pem-enterprise-ui body.pem-route-moc .gate>div.ok{background:var(--pem-color-success-bg)!important;border-color:#b8dfcb!important;color:#0f7549!important;}
html.pem-enterprise-ui body.pem-route-moc .gate>div.warn{background:var(--pem-color-warning-bg)!important;border-color:#eed6a3!important;color:#8c5909!important;}
html.pem-enterprise-ui body.pem-route-moc .gate>div.stop{background:var(--pem-color-danger-bg)!important;border-color:#edc1be!important;color:#a82421!important;}
html.pem-enterprise-ui body.pem-route-moc .panels{gap:9px!important;}
html.pem-enterprise-ui body.pem-route-moc .panel{padding:12px!important;border:1px solid var(--pem-color-border)!important;border-radius:9px!important;background:#fff!important;}
html.pem-enterprise-ui body.pem-route-moc .panel h3{margin:0 0 9px!important;font-size:13px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-moc .risk{padding:9px 10px!important;border:1px solid #e5ebf2!important;border-radius:8px!important;background:#f8fafc!important;}
html.pem-enterprise-ui body.pem-route-moc .legacy{opacity:1!important;border-style:dashed!important;}

/* ---------- Plan SySO ---------- */
html.pem-enterprise-ui body.pem-route-plan .shell{max-width:var(--pem-content-max)!important;}
html.pem-enterprise-ui body.pem-route-plan .top{justify-content:flex-end!important;margin-bottom:10px!important;}
html.pem-enterprise-ui body.pem-route-plan .top-actions{margin-left:auto;}
html.pem-enterprise-ui body.pem-route-plan .hero{
  margin:0 0 12px!important;
  padding-bottom:12px;
  border-bottom:1px solid var(--pem-color-border);
  align-items:center!important;
}
html.pem-enterprise-ui body.pem-route-plan .hero h1{display:block!important;margin:0 0 5px!important;}
html.pem-enterprise-ui body.pem-route-plan .hero p{margin:0!important;}
html.pem-enterprise-ui body.pem-route-plan .kpis{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0 0 12px!important;
}
html.pem-enterprise-ui body.pem-route-plan .kpis .kpi{
  min-height:70px!important;
  padding:9px 11px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-route-plan .kpis .kpi b{font-size:21px!important;line-height:1!important;margin-top:4px!important;}
html.pem-enterprise-ui body.pem-route-plan main>.card{padding:14px!important;}
html.pem-enterprise-ui body.pem-route-plan .toolbar{
  margin:0 0 12px!important;
  padding-bottom:11px;
  border-bottom:1px solid var(--pem-color-border);
}
html.pem-enterprise-ui body.pem-route-plan .view-switch{padding:3px;border:1px solid var(--pem-color-border);border-radius:9px;background:#f7f9fc;}
html.pem-enterprise-ui body.pem-route-plan .view-btn{min-height:32px!important;padding:5px 10px!important;border:0!important;background:transparent!important;box-shadow:none!important;}
html.pem-enterprise-ui body.pem-route-plan .view-btn.active{background:#fff!important;color:var(--pem-color-primary-700)!important;box-shadow:var(--pem-shadow-xs)!important;}
html.pem-enterprise-ui body.pem-route-plan .month-grid{gap:5px!important;}
html.pem-enterprise-ui body.pem-route-plan .weekday{padding:6px!important;color:var(--pem-color-muted)!important;font-size:10px!important;text-transform:uppercase;letter-spacing:.04em;}
html.pem-enterprise-ui body.pem-route-plan .day{
  min-height:88px!important;
  max-height:150px!important;
  overflow:auto!important;
  padding:7px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:9px!important;
  background:#fff!important;
}
html.pem-enterprise-ui body.pem-route-plan .day.today{outline:2px solid #8abcea!important;outline-offset:-1px;background:#f8fbff!important;}
html.pem-enterprise-ui body.pem-route-plan .day.out{opacity:.42!important;background:#f8fafc!important;}
html.pem-enterprise-ui body.pem-route-plan .day-num{font-size:11px!important;color:var(--pem-color-muted)!important;}
html.pem-enterprise-ui body.pem-route-plan .occ{
  padding:6px 7px!important;
  margin:4px 0!important;
  border-radius:6px!important;
  border-left-width:3px!important;
  font-size:10.5px!important;
  line-height:1.3!important;
  background:#f4f7fb!important;
}
html.pem-enterprise-ui body.pem-route-plan .occ.vencida{background:#fff4f3!important;border-left-color:var(--pem-color-danger)!important;}
html.pem-enterprise-ui body.pem-route-plan .occ.bloqueada{background:#fff7e8!important;border-left-color:var(--pem-color-warning)!important;}
html.pem-enterprise-ui body.pem-route-plan .occ.completada{background:#eef9f3!important;border-left-color:var(--pem-color-success)!important;}
html.pem-enterprise-ui body.pem-route-plan .occ.encurso{background:#eef6ff!important;border-left-color:var(--pem-color-info)!important;}
html.pem-enterprise-ui body.pem-route-plan .week-col{border-color:var(--pem-color-border)!important;border-radius:9px!important;}
html.pem-enterprise-ui body.pem-route-plan .row{border:1px solid var(--pem-color-border)!important;border-radius:8px!important;box-shadow:none!important;}
html.pem-enterprise-ui body.pem-route-plan .dialog{z-index:var(--pem-z-overlay)!important;background:rgba(7,29,54,.48)!important;backdrop-filter:blur(2px);}
html.pem-enterprise-ui body.pem-route-plan .dialog-card{border-radius:12px!important;border:1px solid var(--pem-color-border)!important;box-shadow:var(--pem-shadow-md)!important;}
html.pem-enterprise-ui body.pem-route-plan .detail{border:1px solid #e6ecf2!important;border-radius:8px!important;background:#f8fafc!important;}
html.pem-enterprise-ui body.pem-route-plan .requirements,
html.pem-enterprise-ui body.pem-route-plan .evidence-box{border-color:var(--pem-color-border)!important;background:#f8fafc!important;border-radius:9px!important;}

/* ---------- responsive C1 ---------- */
@media(max-width:1180px){
  html.pem-enterprise-ui body.pem-route-actions #capaSection{grid-template-columns:1fr;}
  html.pem-enterprise-ui body.pem-route-actions #capaSection>.card:first-child{position:static;}
  html.pem-enterprise-ui body.pem-route-moc .gate{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html.pem-enterprise-ui body.pem-route-plan .kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media(max-width:760px){
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-inspections > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-findings > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-actions > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-moc > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-plan > main{padding:14px!important;}
  html.pem-enterprise-ui body.pem-route-findings #summary.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html.pem-enterprise-ui body.pem-route-inspections .item-grid{grid-template-columns:1fr!important;}
  html.pem-enterprise-ui body.pem-route-moc .gate{grid-template-columns:1fr!important;}
  html.pem-enterprise-ui body.pem-route-moc .panels{grid-template-columns:1fr!important;}
  html.pem-enterprise-ui body.pem-route-plan .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html.pem-enterprise-ui body.pem-route-plan .month-grid{grid-template-columns:repeat(7,minmax(92px,1fr))!important;overflow:auto;}
}

/* ==========================================================================
   Fase C2 · Personas / Inteligencia / Cumplimiento
   ========================================================================== */

/* ---------- shared standalone C2 ---------- */
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-follow-up > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-imports > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-reports > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-organization > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-cause > main{
  max-width:var(--pem-content-max)!important;
  width:100%!important;
  margin:0 auto!important;
  padding:20px 24px 32px!important;
}
html.pem-enterprise-ui body.pem-route-follow-up .top>.brand,
html.pem-enterprise-ui body.pem-route-imports .top .brand,
html.pem-enterprise-ui body.pem-route-reports .top .brand,
html.pem-enterprise-ui body.pem-route-organization .org-top .brand,
html.pem-enterprise-ui body.pem-route-cause .top .brand{display:none!important;}
html.pem-enterprise-ui body.pem-route-imports .top,
html.pem-enterprise-ui body.pem-route-reports .top,
html.pem-enterprise-ui body.pem-route-cause .top,
html.pem-enterprise-ui body.pem-route-organization .org-top{
  margin:0 0 14px!important;
  padding:0 0 13px!important;
  border-bottom:1px solid var(--pem-color-border)!important;
  background:transparent!important;
  min-height:0!important;
}
html.pem-enterprise-ui body.pem-route-imports .top h1,
html.pem-enterprise-ui body.pem-route-reports .top h1,
html.pem-enterprise-ui body.pem-route-organization .org-top h1,
html.pem-enterprise-ui body.pem-route-cause .top h1{
  margin:0 0 5px!important;
  font-size:var(--pem-font-size-page)!important;
  line-height:1.15!important;
  color:var(--pem-color-text-strong)!important;
  letter-spacing:-.025em!important;
}

/* ---------- Personas ---------- */
html.pem-enterprise-ui body.pem-root-people #view{max-width:1180px;margin:0 auto;padding:24px!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-header{margin:0 0 16px!important;padding:0 0 15px!important;border-bottom:1px solid var(--pem-color-border);}
html.pem-enterprise-ui body.pem-root-people .pem-people-header h1{margin:3px 0 5px!important;font-size:var(--pem-font-size-page)!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-header p{margin:0!important;color:var(--pem-color-muted)!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-hub{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
html.pem-enterprise-ui body.pem-root-people .pem-people-card{display:grid;grid-template-columns:42px 1fr;gap:13px;min-height:150px;padding:18px;border:1px solid var(--pem-color-border);border-radius:11px;background:#fff;color:inherit;text-decoration:none;box-shadow:var(--pem-shadow-xs);transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;}
html.pem-enterprise-ui body.pem-root-people .pem-people-card:hover{border-color:#adc7df;box-shadow:var(--pem-shadow-sm);transform:translateY(-1px);}
html.pem-enterprise-ui body.pem-root-people .pem-people-card-index{display:grid;place-items:center;width:38px;height:38px;border-radius:9px;background:#edf5fd;color:var(--pem-color-primary-700);font-size:10px;font-weight:820;letter-spacing:.04em;}
html.pem-enterprise-ui body.pem-root-people .pem-people-card h2{margin:1px 0 6px!important;font-size:16px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-card p{margin:0 0 13px!important;color:var(--pem-color-muted)!important;font-size:12px!important;line-height:1.5!important;}
html.pem-enterprise-ui body.pem-root-people .pem-people-card-action{color:var(--pem-color-primary-700);font-size:11px;font-weight:760;}

/* ---------- Seguimiento ---------- */
html.pem-enterprise-ui body.pem-route-follow-up .shell{max-width:1280px!important;}
html.pem-enterprise-ui body.pem-route-follow-up .top{display:none!important;}
html.pem-enterprise-ui body.pem-route-follow-up main>.card{margin:0!important;padding:18px!important;border-radius:11px!important;box-shadow:var(--pem-shadow-xs)!important;}
html.pem-enterprise-ui body.pem-route-follow-up main>.card>h1{margin:0 0 5px!important;font-size:var(--pem-font-size-page)!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-follow-up #summary{display:inline-flex;align-items:center;min-height:28px;margin:4px 0 11px;padding:5px 9px;border-radius:7px;background:#f2f6fa;color:#546a80!important;font-size:11px!important;font-weight:650;}
html.pem-enterprise-ui body.pem-route-follow-up #list{display:grid;gap:9px;}
html.pem-enterprise-ui body.pem-route-follow-up .case{margin:0!important;padding:14px 15px!important;border:1px solid var(--pem-color-border)!important;border-radius:9px!important;background:#fff!important;box-shadow:none!important;}
html.pem-enterprise-ui body.pem-route-follow-up .case:hover{border-color:#b7cadc!important;}
html.pem-enterprise-ui body.pem-route-follow-up .case .head{align-items:center!important;}
html.pem-enterprise-ui body.pem-route-follow-up .case h3{margin:4px 0!important;font-size:14px!important;line-height:1.35!important;color:var(--pem-color-text)!important;}
html.pem-enterprise-ui body.pem-route-follow-up .case .meta{font-size:10.5px!important;}
html.pem-enterprise-ui body.pem-route-follow-up .case .actions{margin-top:10px!important;padding-top:9px;border-top:1px solid #edf1f5;}

/* ---------- Importación masiva ---------- */
html.pem-enterprise-ui body.pem-route-imports .shell{max-width:1400px!important;}
html.pem-enterprise-ui body.pem-route-imports .top>div:first-child{max-width:760px;}
html.pem-enterprise-ui body.pem-route-imports .top .actions{margin-left:auto;}
html.pem-enterprise-ui body.pem-route-imports main>.grid{grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr)!important;gap:12px!important;}
html.pem-enterprise-ui body.pem-route-imports .card{margin:0 0 12px!important;padding:16px!important;border:1px solid var(--pem-color-border)!important;border-radius:10px!important;box-shadow:var(--pem-shadow-xs)!important;}
html.pem-enterprise-ui body.pem-route-imports .card h2{margin:0 0 6px!important;font-size:15px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-imports #uploadForm{margin-top:12px;padding-top:12px;border-top:1px solid var(--pem-color-border);}
html.pem-enterprise-ui body.pem-route-imports .domainnote{margin-top:10px!important;padding:10px 11px!important;border:1px solid #dbe7f3;border-radius:8px!important;background:#f7fbff!important;color:#526b84!important;font-size:11px!important;}
html.pem-enterprise-ui body.pem-route-imports .batch{padding:10px 0!important;border-bottom:1px solid #e9eef4!important;}
html.pem-enterprise-ui body.pem-route-imports #workspace{margin-top:0!important;}
html.pem-enterprise-ui body.pem-route-imports #workspace>h3{margin:14px 0 8px!important;padding-top:12px;border-top:1px solid var(--pem-color-border);font-size:13px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-imports .mapping{gap:7px!important;}
html.pem-enterprise-ui body.pem-route-imports .mapping label{padding:8px;border:1px solid #e5ebf2;border-radius:8px;background:#f9fbfd;}
html.pem-enterprise-ui body.pem-route-imports .metrics{gap:8px!important;margin:10px 0!important;}
html.pem-enterprise-ui body.pem-route-imports .metric{padding:11px 12px!important;border:1px solid var(--pem-color-border)!important;border-radius:8px!important;background:#fff!important;}
html.pem-enterprise-ui body.pem-route-imports .metric b{font-size:20px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-imports .tablewrap{border-color:var(--pem-color-border)!important;border-radius:8px!important;}
html.pem-enterprise-ui body.pem-route-imports .preview th{background:#f6f8fb!important;color:#53677c!important;font-size:10px!important;text-transform:uppercase;letter-spacing:.03em;}

/* ---------- Centro de Reportes ---------- */
html.pem-enterprise-ui body.pem-route-reports .shell{max-width:1400px!important;}
html.pem-enterprise-ui body.pem-route-reports .top>div:first-child{max-width:820px;}
html.pem-enterprise-ui body.pem-route-reports .card{margin:0 0 12px!important;padding:16px!important;border:1px solid var(--pem-color-border)!important;border-radius:10px!important;box-shadow:var(--pem-shadow-xs)!important;}
html.pem-enterprise-ui body.pem-route-reports .card h2{margin:0 0 10px!important;font-size:15px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-reports .filters{gap:9px!important;padding:12px;border:1px solid #e5ebf2;border-radius:9px;background:#f9fbfd;}
html.pem-enterprise-ui body.pem-route-reports .filters label{font-size:10.5px!important;font-weight:700!important;color:#53677c!important;}
html.pem-enterprise-ui body.pem-route-reports .metrics{gap:8px!important;margin-top:12px!important;}
html.pem-enterprise-ui body.pem-route-reports .metric{min-height:78px;padding:11px 12px!important;border:1px solid var(--pem-color-border)!important;border-radius:8px!important;background:#fff!important;display:grid;align-content:center;}
html.pem-enterprise-ui body.pem-route-reports .metric b{font-size:22px!important;line-height:1.05!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-reports .metric.pem-overdue-alert b{color:#c92e2a!important;}
html.pem-enterprise-ui body.pem-route-reports .tablewrap{border-color:var(--pem-color-border)!important;border-radius:8px!important;max-height:520px;}
html.pem-enterprise-ui body.pem-route-reports .table th{background:#f6f8fb!important;color:#53677c!important;font-size:10px!important;text-transform:uppercase;letter-spacing:.03em;}
html.pem-enterprise-ui body.pem-route-reports .report-list{gap:8px!important;}
html.pem-enterprise-ui body.pem-route-reports .report{padding:11px 12px!important;border:1px solid var(--pem-color-border)!important;border-radius:8px!important;background:#fff!important;align-items:center;}
html.pem-enterprise-ui body.pem-route-reports .report b{font-size:12px!important;color:var(--pem-color-text)!important;}

/* ---------- Organización / QR ---------- */
html.pem-enterprise-ui body.pem-route-organization .org-shell{max-width:1440px!important;}
html.pem-enterprise-ui body.pem-route-organization .org-top{align-items:flex-end!important;}
html.pem-enterprise-ui body.pem-route-organization .notice,
html.pem-enterprise-ui body.pem-route-organization .warning{margin:0 0 10px!important;padding:11px 12px!important;border-radius:8px!important;font-size:11px!important;line-height:1.45!important;}
html.pem-enterprise-ui body.pem-route-organization #manageSection{margin:14px 0 18px;padding:14px;border:1px solid var(--pem-color-border);border-radius:10px;background:#f8fafc;}
html.pem-enterprise-ui body.pem-route-organization #manageSection>h2{margin:0 0 10px!important;font-size:14px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-organization .manage{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;margin:0!important;}
html.pem-enterprise-ui body.pem-route-organization .manage .card{padding:12px!important;border:1px solid #dfe7ef!important;border-radius:8px!important;box-shadow:none!important;}
html.pem-enterprise-ui body.pem-route-organization .manage .card h3{margin:0 0 8px!important;font-size:12px!important;color:#304b67!important;}
html.pem-enterprise-ui body.pem-route-organization main>section:last-of-type>h2{font-size:15px!important;margin:0 0 10px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-organization .org-grid{gap:10px!important;}
html.pem-enterprise-ui body.pem-route-organization .site-card{padding:15px!important;border:1px solid var(--pem-color-border)!important;border-radius:10px!important;box-shadow:var(--pem-shadow-xs)!important;}
html.pem-enterprise-ui body.pem-route-organization .sector{margin-top:10px!important;padding:11px!important;border-left:3px solid #c5d9ed!important;border-radius:8px!important;background:#f8fbfe!important;}
html.pem-enterprise-ui body.pem-route-organization .area{margin-top:8px!important;padding:10px!important;border-radius:8px!important;}
html.pem-enterprise-ui body.pem-route-organization .points{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important;gap:8px!important;}
html.pem-enterprise-ui body.pem-route-organization .point{padding:11px!important;border-radius:8px!important;border:1px solid #e1e8ef!important;}
html.pem-enterprise-ui body.pem-route-organization .point img.qr-thumb{width:120px!important;height:120px!important;margin:8px auto!important;}
html.pem-enterprise-ui body.pem-route-organization .public-note{padding:7px 8px!important;border-radius:7px!important;font-size:9.5px!important;line-height:1.4!important;}
html.pem-enterprise-ui body.pem-route-organization .qr-print-modal{border-radius:12px!important;border:1px solid var(--pem-color-border)!important;}

/* ---------- Causa / CAPA / recurrencia ---------- */
html.pem-enterprise-ui body.pem-route-cause .shell{max-width:1360px!important;}
html.pem-enterprise-ui body.pem-route-cause .top>div:first-child{max-width:800px;}
html.pem-enterprise-ui body.pem-route-cause .summary{gap:9px!important;margin:0 0 12px!important;}
html.pem-enterprise-ui body.pem-route-cause .summary .metric{min-height:82px;padding:12px 13px!important;border:1px solid var(--pem-color-border)!important;border-radius:9px!important;box-shadow:var(--pem-shadow-xs)!important;}
html.pem-enterprise-ui body.pem-route-cause .summary .metric b{font-size:23px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-cause .case-context{margin:0 0 11px!important;padding:11px 12px!important;border:1px solid #d2e3f4!important;border-radius:8px!important;background:#f6fbff!important;}
html.pem-enterprise-ui body.pem-route-cause .cause{margin:0 0 11px!important;padding:15px!important;border:1px solid var(--pem-color-border)!important;border-radius:10px!important;box-shadow:var(--pem-shadow-xs)!important;}
html.pem-enterprise-ui body.pem-route-cause .cause-head{padding-bottom:10px;border-bottom:1px solid var(--pem-color-border);}
html.pem-enterprise-ui body.pem-route-cause .cause-head h2{margin:3px 0!important;font-size:16px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-cause .cause-code{font-size:10px!important;letter-spacing:.04em;text-transform:uppercase;color:var(--pem-color-primary-700)!important;}
html.pem-enterprise-ui body.pem-route-cause .panel{margin-top:9px!important;padding-top:9px!important;border-top:1px solid #e7edf3!important;}
html.pem-enterprise-ui body.pem-route-cause .links{gap:8px!important;}
html.pem-enterprise-ui body.pem-route-cause .link{padding:12px!important;border:1px solid #e1e8ef!important;border-radius:8px!important;background:#fbfcfe!important;}
html.pem-enterprise-ui body.pem-route-cause .candidate{padding:8px 9px!important;border-radius:7px!important;background:#fff!important;}
html.pem-enterprise-ui body.pem-route-cause .empty{padding:26px!important;border:1px dashed #c8d5e2!important;border-radius:9px!important;background:#fbfcfe!important;}

/* ---------- responsive C2 ---------- */
@media(max-width:1180px){
  html.pem-enterprise-ui body.pem-route-organization .manage{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html.pem-enterprise-ui body.pem-route-imports main>.grid{grid-template-columns:1fr!important;}
}
@media(max-width:760px){
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-follow-up > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-imports > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-reports > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-organization > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-cause > main{padding:14px!important;}
  html.pem-enterprise-ui body.pem-root-people #view{padding:14px!important;}
  html.pem-enterprise-ui body.pem-root-people .pem-people-hub{grid-template-columns:1fr;}
  html.pem-enterprise-ui body.pem-route-imports .form,
  html.pem-enterprise-ui body.pem-route-imports .mapping,
  html.pem-enterprise-ui body.pem-route-imports .metrics,
  html.pem-enterprise-ui body.pem-route-reports .filters,
  html.pem-enterprise-ui body.pem-route-reports .metrics,
  html.pem-enterprise-ui body.pem-route-reports .report-list,
  html.pem-enterprise-ui body.pem-route-organization .manage,
  html.pem-enterprise-ui body.pem-route-cause .summary{grid-template-columns:1fr!important;}
  html.pem-enterprise-ui body.pem-route-imports .top,
  html.pem-enterprise-ui body.pem-route-reports .top,
  html.pem-enterprise-ui body.pem-route-organization .org-top,
  html.pem-enterprise-ui body.pem-route-cause .top{align-items:flex-start!important;}
}


/* ---------- creation disclosures: Riesgos / Acciones ---------- */
html.pem-enterprise-ui body.pem-route-risks .pem-create-disclosure,
html.pem-enterprise-ui body.pem-route-actions .pem-create-disclosure{
  margin:0 0 12px!important;
  padding:0!important;
  overflow:hidden;
}
html.pem-enterprise-ui body.pem-route-risks .pem-create-disclosure>summary,
html.pem-enterprise-ui body.pem-route-actions .pem-create-disclosure>summary{
  min-height:52px;
  padding:11px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  list-style:none;
  color:var(--pem-color-text-strong);
}
html.pem-enterprise-ui body.pem-route-risks .pem-create-disclosure>summary::-webkit-details-marker,
html.pem-enterprise-ui body.pem-route-actions .pem-create-disclosure>summary::-webkit-details-marker{display:none;}
html.pem-enterprise-ui body.pem-route-risks .pem-create-disclosure>summary:before,
html.pem-enterprise-ui body.pem-route-actions .pem-create-disclosure>summary:before{
  content:'+';
  width:24px;
  height:24px;
  flex:0 0 24px;
  display:grid;
  place-items:center;
  border-radius:7px;
  background:var(--pem-color-primary-050);
  color:var(--pem-color-primary-700);
  font-size:17px;
  font-weight:760;
  order:-1;
}
html.pem-enterprise-ui body.pem-route-risks .pem-create-disclosure[open]>summary:before,
html.pem-enterprise-ui body.pem-route-actions .pem-create-disclosure[open]>summary:before{content:'−';}
html.pem-enterprise-ui body.pem-route-risks .pem-create-disclosure>summary b,
html.pem-enterprise-ui body.pem-route-actions .pem-create-disclosure>summary b{display:block;font-size:14px;}
html.pem-enterprise-ui body.pem-route-risks .pem-create-disclosure>summary small,
html.pem-enterprise-ui body.pem-route-actions .pem-create-disclosure>summary small{display:block;margin-top:2px;color:var(--pem-color-muted);font-size:11px;font-weight:500;}
html.pem-enterprise-ui body.pem-route-risks .pem-create-disclosure-body,
html.pem-enterprise-ui body.pem-route-actions .pem-create-disclosure-body{padding:0 14px 14px;border-top:1px solid var(--pem-color-border);}
html.pem-enterprise-ui body.pem-route-risks .pem-create-disclosure-body .form,
html.pem-enterprise-ui body.pem-route-actions .pem-create-disclosure-body .form{margin-top:12px!important;}

/* Plan month view stays compact and only busy days consume extra space internally. */
html.pem-enterprise-ui body.pem-route-plan .day::-webkit-scrollbar{width:6px;}
html.pem-enterprise-ui body.pem-route-plan .day::-webkit-scrollbar-thumb{background:#c9d5e2;border-radius:999px;}


/* ==========================================================================
   Final visual consistency · Organización / QR density
   Preserve all content while reducing vertical card height.
   ========================================================================== */
html.pem-enterprise-ui body.pem-route-organization .point{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 96px!important;
  grid-template-areas:
    "head qr"
    "instructions qr"
    "actions actions"
    "note note"!important;
  gap:7px 10px!important;
  align-items:start!important;
  padding:10px!important;
}
html.pem-enterprise-ui body.pem-route-organization .point>.point-row{grid-area:head!important;}
html.pem-enterprise-ui body.pem-route-organization .point>img.qr-thumb{
  grid-area:qr!important;
  width:88px!important;
  height:88px!important;
  margin:0!important;
  justify-self:end!important;
}
html.pem-enterprise-ui body.pem-route-organization .point>.muted{
  grid-area:instructions!important;
  min-height:0!important;
  font-size:10.5px!important;
  line-height:1.35!important;
}
html.pem-enterprise-ui body.pem-route-organization .point>.point-actions{
  grid-area:actions!important;
  margin-top:1px!important;
  gap:6px!important;
}
html.pem-enterprise-ui body.pem-route-organization .point>.point-actions .btn{
  min-height:32px!important;
  padding:6px 9px!important;
  font-size:10.5px!important;
}
html.pem-enterprise-ui body.pem-route-organization .point>.public-note{
  grid-area:note!important;
  margin-top:0!important;
  padding:6px 8px!important;
  font-size:9.5px!important;
  line-height:1.35!important;
}
@media(max-width:760px){
  html.pem-enterprise-ui body.pem-route-organization .point{
    grid-template-columns:minmax(0,1fr) 82px!important;
  }
  html.pem-enterprise-ui body.pem-route-organization .point>img.qr-thumb{
    width:76px!important;
    height:76px!important;
  }
}


/* ===== frontend/enterprise_governance_layouts.css ===== */
/* PEM SySO · Enterprise governance layouts
   Fase C3: Legal/Competencias, Control documental, EPP/Ropa y Readiness de sesión.
   Sólo composición visual. No codifica reglas de negocio ni sustituye motores canónicos. */

/* ---------- shared governance composition ---------- */
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-legal > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-documents > main,
html.pem-enterprise-ui body.pem-standalone-shell.pem-route-ppe > main,
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm){
  width:100%!important;
  max-width:var(--pem-content-max)!important;
  margin:0 auto!important;
  padding:20px 24px 32px!important;
}
html.pem-enterprise-ui body.pem-route-legal .top>.brand,
html.pem-enterprise-ui body.pem-route-ppe .top>.brand,
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .top>.brand{display:none!important;}
html.pem-enterprise-ui body.pem-route-legal .top a[href="/"],
html.pem-enterprise-ui body.pem-route-ppe .top a[href="/"],
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .top a[href="/"]{display:none!important;}

/* ---------- Legal / Competencias ---------- */
html.pem-enterprise-ui body.pem-route-legal .shell{max-width:1420px!important;}
html.pem-enterprise-ui body.pem-route-legal .top{margin:0 0 12px!important;align-items:center!important;}
html.pem-enterprise-ui body.pem-route-legal .top h1{margin:0!important;font-size:var(--pem-font-size-page)!important;}
html.pem-enterprise-ui body.pem-route-legal .top p{margin:5px 0 0!important;}
html.pem-enterprise-ui body.pem-route-legal .tabs{
  gap:0!important;
  margin:0 0 14px!important;
  border-bottom:1px solid var(--pem-color-border)!important;
}
html.pem-enterprise-ui body.pem-route-legal .tabs button{
  min-height:40px!important;
  padding:9px 13px!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--pem-color-muted)!important;
  font-weight:720!important;
}
html.pem-enterprise-ui body.pem-route-legal .tabs button.active{
  color:var(--pem-color-primary-700)!important;
  border-bottom-color:var(--pem-color-primary-600)!important;
  background:transparent!important;
}
html.pem-enterprise-ui body.pem-route-legal .summary{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin:0 0 12px!important;}
html.pem-enterprise-ui body.pem-route-legal .summary .metric{
  min-height:88px;
  padding:13px 14px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:var(--pem-radius-lg)!important;
  box-shadow:var(--pem-shadow-xs)!important;
  display:grid;
  align-content:center;
  gap:4px;
}
html.pem-enterprise-ui body.pem-route-legal .summary .metric b{font-size:24px!important;color:var(--pem-color-text-strong)!important;line-height:1!important;}
html.pem-enterprise-ui body.pem-route-legal .card,
html.pem-enterprise-ui body.pem-route-legal .item{
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-route-legal #legal>.card:first-of-type{margin-bottom:10px!important;padding:13px 15px!important;}
html.pem-enterprise-ui body.pem-route-legal #legal>.card:first-of-type summary{cursor:pointer;color:var(--pem-color-text-strong);}
html.pem-enterprise-ui body.pem-route-legal .item{margin:0 0 9px!important;padding:14px 15px!important;}
html.pem-enterprise-ui body.pem-route-legal .item h2{font-size:15px!important;margin:3px 0!important;}
html.pem-enterprise-ui body.pem-route-legal .code{font-size:10px!important;letter-spacing:.055em;text-transform:uppercase;color:var(--pem-color-primary-700)!important;}
html.pem-enterprise-ui body.pem-route-legal .pill{font-size:10px!important;font-weight:760!important;border-radius:999px!important;}
html.pem-enterprise-ui body.pem-route-legal .grid{grid-template-columns:minmax(420px,.9fr) minmax(0,1.1fr)!important;gap:12px!important;}
html.pem-enterprise-ui body.pem-route-legal .form{gap:9px!important;}
html.pem-enterprise-ui body.pem-route-legal .form label{font-size:11px!important;font-weight:700!important;color:#41566f!important;}
html.pem-enterprise-ui body.pem-route-legal .state-row{padding:9px 0!important;}
html.pem-enterprise-ui body.pem-route-legal #tasks>.card:first-child{
  margin-bottom:12px!important;
  padding:12px 14px!important;
  border-left:3px solid var(--pem-color-primary-500)!important;
  background:#f7fbff!important;
}

/* ---------- Control documental ---------- */
html.pem-enterprise-ui body.pem-route-documents .doc-shell{max-width:1440px!important;padding:20px 24px 32px!important;}
html.pem-enterprise-ui body.pem-route-documents .doc-head{margin-bottom:14px!important;align-items:center!important;}
html.pem-enterprise-ui body.pem-route-documents .doc-head h1{margin:0!important;font-size:var(--pem-font-size-page)!important;}
html.pem-enterprise-ui body.pem-route-documents .doc-head .muted.small{display:none!important;}
html.pem-enterprise-ui body.pem-route-documents .doc-head p{margin:5px 0 0!important;}
html.pem-enterprise-ui body.pem-route-documents .doc-head button[onclick*="location.href='/'"]{display:none!important;}
html.pem-enterprise-ui body.pem-route-documents .doc-grid{
  grid-template-columns:minmax(330px,.72fr) minmax(0,1.55fr)!important;
  gap:12px!important;
  margin-top:0!important;
  align-items:start!important;
}
html.pem-enterprise-ui body.pem-route-documents .doc-grid>.stack{
  align-content:start!important;
  align-self:start!important;
}
html.pem-enterprise-ui body.pem-route-documents .card{
  padding:15px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-route-documents .stack{gap:10px!important;}
html.pem-enterprise-ui body.pem-route-documents .doc-grid>.stack:first-child>.card:first-child{
  padding:12px 14px!important;
}
html.pem-enterprise-ui body.pem-route-documents .doc-grid>.stack:first-child>.card:first-child h2{font-size:14px!important;margin:0 0 8px!important;}
html.pem-enterprise-ui body.pem-route-documents .doc-item{
  padding:11px 12px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:8px!important;
  box-shadow:none!important;
}
html.pem-enterprise-ui body.pem-route-documents .doc-item.active{
  outline:0!important;
  border-color:var(--pem-color-primary-500)!important;
  background:#f5faff!important;
  box-shadow:inset 3px 0 0 var(--pem-color-primary-600)!important;
}
html.pem-enterprise-ui body.pem-route-documents #detailCard>h2:first-child{font-size:18px!important;margin:0 0 4px!important;}
html.pem-enterprise-ui body.pem-route-documents .revision{
  padding:11px 12px!important;
  border-left:3px solid #d7dee6!important;
  border-radius:7px!important;
  background:#f8fafc!important;
}
html.pem-enterprise-ui body.pem-route-documents .revision.current{border-left-color:var(--pem-color-success)!important;background:var(--pem-color-success-bg)!important;}
html.pem-enterprise-ui body.pem-route-documents #summary.notice{margin:4px 0 0!important;padding:9px 10px!important;border:1px solid #dbe7f3!important;background:#f7fbff!important;}
html.pem-enterprise-ui body.pem-route-documents .form-grid{gap:9px!important;}
html.pem-enterprise-ui body.pem-route-documents label{font-size:11px!important;color:#41566f!important;}

/* ---------- EPP / Ropa ---------- */
html.pem-enterprise-ui body.pem-route-ppe .shell{max-width:1420px!important;}
html.pem-enterprise-ui body.pem-route-ppe .top{margin:0 0 12px!important;justify-content:flex-end!important;}
html.pem-enterprise-ui body.pem-route-ppe>.pem-global-sidebar+main .notice,
html.pem-enterprise-ui body.pem-route-ppe main>.notice{
  margin:0 0 12px!important;
  padding:12px 14px!important;
  border:1px solid #d8e8f8!important;
  border-radius:9px!important;
  background:#f6fbff!important;
  color:#41617e!important;
  font-size:12px!important;
}
html.pem-enterprise-ui body.pem-route-ppe .grid{grid-template-columns:300px minmax(0,1fr)!important;gap:12px!important;}
html.pem-enterprise-ui body.pem-route-ppe .card{
  padding:15px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-route-ppe .card h2{font-size:15px!important;margin:0 0 8px!important;}
html.pem-enterprise-ui body.pem-route-ppe .person-box{padding:10px 11px!important;border-radius:8px!important;background:#f8fafc!important;}
html.pem-enterprise-ui body.pem-route-ppe .metrics{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin:0 0 12px!important;}
html.pem-enterprise-ui body.pem-route-ppe .metric{
  min-height:86px;
  padding:12px 13px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  box-shadow:var(--pem-shadow-xs)!important;
  display:grid;
  align-content:center;
  gap:4px;
}
html.pem-enterprise-ui body.pem-route-ppe .metric b{font-size:20px!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-route-ppe .form{gap:9px!important;}
html.pem-enterprise-ui body.pem-route-ppe .form label{font-size:11px!important;font-weight:700!important;color:#41566f!important;}
html.pem-enterprise-ui body.pem-route-ppe .delivery{
  padding:12px 13px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:9px!important;
  box-shadow:none!important;
}
html.pem-enterprise-ui body.pem-route-ppe .history{gap:8px!important;}
html.pem-enterprise-ui body.pem-route-ppe .empty{padding:22px!important;border-radius:9px!important;background:#fafcfe!important;}

/* ---------- Readiness / credenciales ---------- */
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm){max-width:1260px!important;}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .top{margin:0 0 12px!important;justify-content:flex-end!important;}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .card{
  margin-top:10px!important;
  padding:16px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:10px!important;
  box-shadow:var(--pem-shadow-xs)!important;
}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .card:first-of-type{
  border-top:3px solid var(--pem-color-primary-600)!important;
}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) h1{font-size:var(--pem-font-size-page)!important;margin:0 0 5px!important;}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) h2{font-size:16px!important;margin:0 0 8px!important;}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .metric{
  min-height:82px;
  padding:12px 13px!important;
  border:1px solid var(--pem-color-border)!important;
  border-radius:9px!important;
  display:grid;
  align-content:center;
  gap:4px;
}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .metric b{font-size:22px!important;line-height:1!important;color:var(--pem-color-text-strong)!important;}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .row{padding:9px 0!important;}
html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) #credentialForm{
  grid-template-columns:minmax(260px,1fr) minmax(280px,1fr) auto!important;
  gap:10px!important;
  align-items:end!important;
}

@media(max-width:1000px){
  html.pem-enterprise-ui body.pem-route-legal .grid,
  html.pem-enterprise-ui body.pem-route-documents .doc-grid,
  html.pem-enterprise-ui body.pem-route-ppe .grid{grid-template-columns:1fr!important;}
  html.pem-enterprise-ui body.pem-route-legal .summary,
  html.pem-enterprise-ui body.pem-route-ppe .metrics,
  html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:720px){
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-legal > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-documents > main,
  html.pem-enterprise-ui body.pem-standalone-shell.pem-route-ppe > main,
  html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm){padding:12px 10px 24px!important;}
  html.pem-enterprise-ui body.pem-route-legal .summary,
  html.pem-enterprise-ui body.pem-route-ppe .metrics,
  html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) .grid,
  html.pem-enterprise-ui body.pem-standalone-shell main.shell:has(#credentialForm) #credentialForm{grid-template-columns:1fr!important;}
}

/* ==========================================================================
   UX V2 final release candidate · canonical responsive and accessibility pass
   ========================================================================== */
html.pem-enterprise-ui,
html.pem-enterprise-ui body{max-width:100%;overflow-x:hidden;}
html.pem-enterprise-ui .main,
html.pem-enterprise-ui .view,
html.pem-enterprise-ui #view,
html.pem-enterprise-ui main,
html.pem-enterprise-ui .card,
html.pem-enterprise-ui .panel,
html.pem-enterprise-ui .grid,
html.pem-enterprise-ui .stack{min-width:0;}

/* Operational text is never microcopy. */
html.pem-enterprise-ui .muted,
html.pem-enterprise-ui small,
html.pem-enterprise-ui label,
html.pem-enterprise-ui .meta,
html.pem-enterprise-ui .code,
html.pem-enterprise-ui .pill,
html.pem-enterprise-ui .row-sub,
html.pem-enterprise-ui .public-note,
html.pem-enterprise-ui .warning{font-size:12px!important;color:#52677d;}
html.pem-enterprise-ui th{font-size:12px!important;color:#4d6278!important;}
html.pem-enterprise-ui td,
html.pem-enterprise-ui .row-title{font-size:13px!important;}

/* Canonical action geometry. */
html.pem-enterprise-ui .pem-action-bar,
html.pem-enterprise-ui .pem-form-actions,
html.pem-enterprise-ui .actions,
html.pem-enterprise-ui .detail-actions,
html.pem-enterprise-ui .item-actions{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;
}
html.pem-enterprise-ui .pem-icon-button{
  width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;
  padding:0!important;display:inline-grid!important;place-items:center!important;font-size:20px!important;
}
html.pem-enterprise-ui button:focus-visible,
html.pem-enterprise-ui a:focus-visible,
html.pem-enterprise-ui [tabindex]:focus-visible{outline:3px solid #8fc7fa!important;outline-offset:2px!important;}

/* Canonical file picker without exposing the browser-native chrome as layout. */
html.pem-enterprise-ui .pem-file-upload{display:grid;gap:6px;padding:12px;border:1px dashed #9fb6cb;border-radius:10px;background:#f8fbfe;}
html.pem-enterprise-ui .pem-file-upload input[type=file]{width:100%;min-height:44px;padding:7px!important;background:#fff;}
html.pem-enterprise-ui .pem-file-upload input[type=file]::file-selector-button{
  min-height:32px;margin-right:10px;padding:6px 10px;border:1px solid #b8c8d8;border-radius:7px;
  background:#eef6ff;color:#0b5faa;font:700 12px Inter,Segoe UI,Arial,sans-serif;cursor:pointer;
}

html.pem-enterprise-ui .pem-invalid-context,
html.pem-enterprise-ui .pem-empty-state{
  padding:24px 18px;border:1px dashed #bdcad7;border-radius:10px;background:#f8fafc;text-align:center;
}
html.pem-enterprise-ui .pem-invalid-context h2,
html.pem-enterprise-ui .pem-empty-state h2{margin:0 0 7px;font-size:18px;}
html.pem-enterprise-ui .pem-invalid-context p,
html.pem-enterprise-ui .pem-empty-state p{margin:0 auto 14px;max-width:620px;color:#52677d;}
html.pem-enterprise-ui .pem-view-skeleton{min-height:560px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-content:start;}
html.pem-enterprise-ui .pem-view-skeleton span{display:block;min-height:108px;border:1px solid #e1e8ef;border-radius:10px;background:linear-gradient(90deg,#f5f7fa,#eef3f7,#f5f7fa);background-size:200% 100%;animation:pem-skeleton 1.2s ease-in-out infinite;}
html.pem-enterprise-ui .pem-view-skeleton span:first-child{grid-column:1/-1;min-height:82px;}
@keyframes pem-skeleton{to{background-position:-200% 0;}}
html.pem-enterprise-ui .pem-export-menu{position:relative;}
html.pem-enterprise-ui .pem-export-menu>summary{list-style:none;cursor:pointer;}
html.pem-enterprise-ui .pem-export-menu>summary::-webkit-details-marker{display:none;}
html.pem-enterprise-ui .pem-export-options{position:absolute;right:0;top:calc(100% + 6px);z-index:20;min-width:150px;padding:7px;display:grid;gap:5px;border:1px solid var(--pem-color-border);border-radius:9px;background:#fff;box-shadow:var(--pem-shadow-md);}
html.pem-enterprise-ui .pem-form-section{display:grid;gap:2px;margin:8px 0 0;padding:10px 0 6px;border-top:1px solid var(--pem-color-border);}
html.pem-enterprise-ui .pem-form-section:first-child{margin-top:0;border-top:0;padding-top:0;}
html.pem-enterprise-ui .pem-form-section b{font-size:14px;color:var(--pem-color-text-strong);}
html.pem-enterprise-ui .pem-form-section span{font-size:12px;color:var(--pem-color-muted);}

@media(max-width:760px){
  html.pem-enterprise-ui body{padding-bottom:calc(72px + env(safe-area-inset-bottom));}
  html.pem-enterprise-ui .mobile-nav{
    width:100vw;max-width:100vw;height:calc(68px + env(safe-area-inset-bottom));
    padding-bottom:env(safe-area-inset-bottom);grid-template-columns:repeat(5,minmax(0,1fr));overflow:hidden;
  }
  html.pem-enterprise-ui .mobile-nav .nav-btn{
    min-width:0;width:100%;padding:6px 2px!important;font-size:12px!important;line-height:1.1;
    border-radius:0!important;background:#fff!important;box-shadow:none!important;
  }
  html.pem-enterprise-ui .mobile-nav .nav-btn.active{background:#eef6ff!important;color:#075fad!important;box-shadow:inset 0 3px 0 #0b73df!important;}
  html.pem-enterprise-ui .mobile-nav .nav-icon{font-size:19px!important;line-height:1;}

  /* Cases becomes a mobile record list. The full detail remains one tap away. */
  html.pem-enterprise-ui .pem-cases-view .pem-master-detail{display:block!important;}
  html.pem-enterprise-ui .pem-cases-view .pem-master-panel{display:none!important;}
  html.pem-enterprise-ui .pem-cases-view .table-wrap{overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important;}
  html.pem-enterprise-ui .pem-cases-view table{display:block!important;min-width:0!important;width:100%!important;}
  html.pem-enterprise-ui .pem-cases-view thead{display:none!important;}
  html.pem-enterprise-ui .pem-cases-view tbody{display:grid!important;gap:10px!important;}
  html.pem-enterprise-ui .pem-cases-view tbody tr{
    display:grid!important;grid-template-columns:1fr auto!important;gap:7px 12px!important;width:100%!important;
    padding:14px!important;border:1px solid var(--pem-color-border)!important;border-radius:10px!important;background:#fff!important;
  }
  html.pem-enterprise-ui .pem-cases-view tbody td{display:grid!important;grid-template-columns:106px minmax(0,1fr)!important;gap:8px!important;padding:0!important;border:0!important;min-width:0!important;}
  html.pem-enterprise-ui .pem-cases-view tbody td:before{content:attr(data-label);font-size:12px;font-weight:700;color:#5b6f84;}
  html.pem-enterprise-ui .pem-cases-view tbody td:nth-child(1),
  html.pem-enterprise-ui .pem-cases-view tbody td:nth-child(3){grid-column:1/-1;}
  html.pem-enterprise-ui .pem-cases-view tbody td:nth-child(4),
  html.pem-enterprise-ui .pem-cases-view tbody td:nth-child(5),
  html.pem-enterprise-ui .pem-cases-view tbody td:nth-child(6),
  html.pem-enterprise-ui .pem-cases-view tbody td:nth-child(8),
  html.pem-enterprise-ui .pem-cases-view tbody td:nth-child(9),
  html.pem-enterprise-ui .pem-cases-view tbody td:nth-child(10){display:none!important;}

  /* Mobile Plan is an agenda, never a seven-column desktop calendar. */
  html.pem-enterprise-ui body.pem-route-plan .view-switch [data-view="month"],
  html.pem-enterprise-ui body.pem-route-plan .view-switch [data-view="week"]{display:none!important;}
  html.pem-enterprise-ui body.pem-route-plan .row{grid-template-columns:1fr!important;min-height:44px;}

  html.pem-enterprise-ui .pem-action-bar,
  html.pem-enterprise-ui .pem-form-actions,
  html.pem-enterprise-ui .actions,
  html.pem-enterprise-ui .detail-actions{display:grid;grid-template-columns:1fr;width:100%;}
  html.pem-enterprise-ui .pem-action-bar .btn,
  html.pem-enterprise-ui .pem-form-actions .btn,
  html.pem-enterprise-ui .actions .btn,
  html.pem-enterprise-ui .detail-actions .btn{width:100%;min-height:44px;}

  /* Dashboards expose critical information first; secondary blocks are compact. */
  html.pem-enterprise-ui .desktop-dashboard{gap:10px!important;}
  html.pem-enterprise-ui .desktop-dashboard .card{padding:13px!important;}
  html.pem-enterprise-ui .pem-dashboard-activity{margin-bottom:8px!important;}
  html.pem-enterprise-ui .pem-view-skeleton{min-height:620px;grid-template-columns:repeat(2,minmax(0,1fr));}
  html.pem-enterprise-ui .pem-export-menu{width:100%;}
  html.pem-enterprise-ui .pem-export-menu>summary{width:100%;min-height:44px;display:flex;align-items:center;justify-content:center;}
  html.pem-enterprise-ui .pem-export-options{position:static;margin-top:6px;box-shadow:none;}
}

/* Explicit operational typography floor for dense metrics and Plan cells. */
html.pem-enterprise-ui .metric span,
html.pem-enterprise-ui .metric small,
html.pem-enterprise-ui .tier small,
html.pem-enterprise-ui .mini-row span,
html.pem-enterprise-ui .lag-item span,
html.pem-enterprise-ui .eyebrow,
html.pem-enterprise-ui body.pem-route-plan .weekday,
html.pem-enterprise-ui body.pem-route-plan .day-num,
html.pem-enterprise-ui body.pem-route-plan .occ{font-size:12px!important;line-height:1.35!important;}

/* Stage C/D pre-D visual closure: one professional topbar geometry across root and standalone modules. */
.pem-standardized-topbar .pem-global-search{max-width:none;min-width:220px}
.pem-standardized-topbar .pem-global-identity{margin-left:0;text-align:left;max-width:210px}
.pem-global-company{display:flex;align-items:center;gap:8px;min-width:0;max-width:230px;color:var(--pem-shell-text);margin-left:auto}
.pem-global-company>span{font-size:11px;font-weight:700;color:var(--pem-shell-muted);white-space:nowrap}
.pem-global-company>b{font-size:12px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pem-company-copy{display:grid;gap:1px;min-width:0}
.pem-company-copy small{font-size:11px;font-weight:700;color:var(--pem-shell-muted);line-height:1.1}
.pem-company-copy b{font-size:12px;font-weight:800;color:var(--pem-shell-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:205px}
.pem-root-session-company{max-width:none}
.pem-root-session-company .pem-session-logout{min-height:32px!important;padding:6px 10px!important}
.pem-global-avatar{width:36px;height:36px;min-width:36px;border-radius:50%;display:grid;place-items:center;background:var(--pem-color-primary-700,#145a9d);color:#fff;font-size:12px;font-weight:800;letter-spacing:.02em;box-shadow:none}
.pem-global-bell{width:36px;height:36px;min-width:36px;border:0;border-radius:50%;background:transparent;color:#24415f;display:grid;place-items:center;cursor:pointer}
.pem-global-bell:hover{background:#eef5fc}
.pem-standardized-topbar .pem-global-identity b{font-size:13px;font-weight:800;color:var(--pem-shell-text)}
.pem-standardized-topbar .pem-global-identity small{font-size:11px;color:var(--pem-shell-muted);margin-top:1px}
@media(max-width:1180px){
  .pem-standardized-topbar .pem-global-company>span{display:none}
  .pem-standardized-topbar .pem-global-company{max-width:170px}
  .pem-standardized-topbar .pem-global-identity{max-width:145px}
}
@media(max-width:900px){
  .pem-standardized-topbar .pem-global-company,
  .pem-standardized-topbar .pem-global-bell,
  .pem-standardized-topbar .pem-global-avatar,
  .pem-standardized-topbar .pem-global-identity{display:none!important}
  .pem-standardized-topbar .pem-global-search{max-width:none;min-width:0}
}

.pem-global-bell,.top-actions .bell{position:relative}
.pem-notification-count{position:absolute;right:-3px;top:-3px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#b3261e;color:#fff;font:800 10px/16px system-ui,-apple-system,Segoe UI,sans-serif;text-align:center;box-sizing:border-box}
.pem-notification-count[hidden]{display:none!important}

/* Final closure: deterministic pyramid drill-down context. */
.pem-pyramid-drilldown-context{
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  margin:0 0 14px;padding:10px 12px;border:1px solid #cfe0f1;border-radius:10px;background:#f5faff;color:#234a72;
}
.pem-pyramid-drilldown-context[hidden]{display:none!important}
.pem-pyramid-drilldown-context>div{display:grid;gap:2px;min-width:0}
.pem-pyramid-drilldown-context b{font-size:12px;color:#103b69}
.pem-pyramid-drilldown-context span{font-size:12px;color:#526b84}

/* Final closure: prevent previous SPA view ghosting during async module switches. */
html.pem-enterprise-ui #view.pem-view-switching{visibility:hidden!important;opacity:0!important;pointer-events:none!important;transition:none!important}
