/* PEM SySO UX V2 · canonical release visual contract (R14)
   One release owner for cross-route geometry, density, hierarchy and navigation behavior.
   It intentionally supersedes versioned corrective presentation layers in the packaged Preview. */

/* Root sidebar bootstrap stays hidden only until the canonical nav source is complete. */
html.pem-sidebar-initializing .sidebar{visibility:visible!important}
html.pem-sidebar-initializing .sidebar > :not(.brand){visibility:hidden!important}

/* Desktop platform identity is invariant; tenant requests must not blank its public logo. */
@media(min-width:901px){
 html.pem-sidebar-initializing .sidebar,
 html.pem-enterprise-ui body .pem-global-sidebar[aria-busy="true"]{background:linear-gradient(180deg,#334155,#1e293b 58%,#0f172a)!important}
 body.pem-standalone-shell:has(> .pem-global-sidebar[aria-busy="true"]) > :is(main,.shell,.org-shell,.doc-shell,.audit-shell),
 body.pem-standalone-shell:has(> .pem-global-sidebar[aria-busy="true"]) > :is(main,.shell,.org-shell,.doc-shell,.audit-shell) *{visibility:hidden!important}
 html.pem-enterprise-ui.pem-branding-pending .pem-global-sidebar .pem-global-logo,
 html.pem-enterprise-ui.pem-branding-pending .pem-global-sidebar .pem-global-brand-copy,
 html.pem-enterprise-ui.pem-branding-pending .sidebar > .brand{visibility:visible!important}
}

/* Motion belongs exclusively to PEM_NAV_MOTION, once per navigation. */
html.pem-motion-pending #view,
html.pem-motion-pending body>main,
html.pem-motion-pending .org-shell,
html.pem-motion-pending .doc-shell{visibility:hidden!important}
html.pem-enterprise-ui #view,
html.pem-enterprise-ui body.pem-standalone-shell>main,
html.pem-enterprise-ui body.pem-standalone-shell .org-shell,
html.pem-enterprise-ui body.pem-standalone-shell .doc-shell,
html.pem-enterprise-ui #view>.pem-flagship-view{
  animation:none!important;transition:none!important;
}
html.pem-enterprise-ui [data-pem-motion-host]{animation:none!important;transition:none!important}
html.pem-enterprise-ui body.pem-standalone-shell{transition:none!important}
@media(min-width:901px){
  html.pem-enterprise-ui .sidebar{position:sticky!important;top:0!important;height:100vh!important;align-self:start!important}
}

/* Approved identity. */
html.pem-enterprise-ui .sidebar>.brand .shield,
html.pem-enterprise-ui .pem-global-logo,
html.pem-enterprise-ui .mobile-brand .shield{
  background:#fff url('/static/pem_syso_mark.png') center/contain no-repeat!important;
  color:transparent!important;
  text-indent:-9999px!important;
  overflow:hidden!important;
  border-radius:10px!important;
  box-shadow:0 2px 8px rgba(0,0,0,.14)!important;
}
html.pem-enterprise-ui .sidebar>.brand .shield,
html.pem-enterprise-ui .pem-global-logo{width:64px!important;min-width:64px!important;height:64px!important;min-height:64px!important}
html.pem-enterprise-ui .mobile-brand .shield{width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important}

/* Canonical page header: category + title on the first useful row, support text below. */
html.pem-enterprise-ui body.pem-standalone-shell main.shell{padding-top:10px!important}
html.pem-enterprise-ui body:not(.pem-standalone-shell) #view{padding-top:10px!important}
html.pem-enterprise-ui .pem-release-page-header{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  width:100%!important;
  min-height:0!important;
  height:auto!important;
  margin:0 0 10px!important;
  padding:0 0 9px!important;
  border-bottom:1px solid var(--pem-color-border,#dfe7f0)!important;
  background:transparent!important;
  box-shadow:none!important;
}
html.pem-enterprise-ui .pem-release-page-header-main{
  min-width:0!important;
  max-width:1080px!important;
  flex:1 1 auto!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:baseline!important;
  column-gap:10px!important;
  row-gap:2px!important;
}
html.pem-enterprise-ui .pem-release-page-header h1{
  grid-column:2!important;
  margin:0!important;
  color:#10233f!important;
  font-size:27px!important;
  font-weight:820!important;
  line-height:1.08!important;
  letter-spacing:-.02em!important;
}
html.pem-enterprise-ui .pem-release-page-header p{
  grid-column:1/-1!important;
  margin:2px 0 0!important;
  max-width:960px!important;
  color:#52637a!important;
  font-size:13px!important;
  line-height:1.35!important;
}
html.pem-enterprise-ui .pem-release-eyebrow{
  grid-column:1!important;
  display:inline-flex!important;
  align-items:center!important;
  width:max-content!important;
  max-width:100%!important;
  min-height:14px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#456789!important;
  font-size:11px!important;
  font-weight:820!important;
  line-height:1.15!important;
  letter-spacing:.075em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
}
html.pem-enterprise-ui .pem-release-page-header .actions,
html.pem-enterprise-ui .pem-release-page-header .pem-page-header-actions,
html.pem-enterprise-ui .pem-release-page-header .pem-demo-page-header-actions,
html.pem-enterprise-ui .pem-release-page-header>.context-pills,
html.pem-enterprise-ui .pem-release-page-header>.context-controls{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  flex:0 0 auto!important;
}
html.pem-enterprise-ui body.pem-release-has-breadcrumb main.shell>.pem-breadcrumb{
  display:flex!important;align-items:center!important;min-height:14px!important;margin:0 0 3px!important;padding:0!important;color:#52637a!important;font-size:12px!important;line-height:14px!important
}
html.pem-enterprise-ui body.pem-release-has-breadcrumb .pem-release-page-header-main{grid-template-columns:1fr!important}
html.pem-enterprise-ui body.pem-release-has-breadcrumb .pem-release-page-header h1{grid-column:1!important}
html.pem-enterprise-ui body.pem-release-has-breadcrumb .pem-release-page-header .pem-release-eyebrow{display:none!important}

/* Canonical group navigation. Group headers never disappear after a SPA render. */
html.pem-enterprise-ui .pem-release-nav-group{display:block!important;margin:2px 0!important}
html.pem-enterprise-ui .pem-release-nav-group-toggle{
  width:100%!important;min-height:40px!important;padding:8px 10px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#b9cbe0!important;font:inherit!important;font-size:12px!important;font-weight:820!important;letter-spacing:.035em!important;text-transform:uppercase!important;text-align:left!important;cursor:pointer!important
}
html.pem-enterprise-ui .pem-release-nav-group-toggle:hover,
html.pem-enterprise-ui .pem-release-nav-group-toggle:focus-visible{background:rgba(255,255,255,.055)!important;color:#fff!important;outline:none!important}
html.pem-enterprise-ui .pem-release-nav-chevron{font-size:18px!important;line-height:1!important;flex:0 0 auto!important}
html.pem-enterprise-ui .pem-release-nav-group-items[hidden]{display:none!important}
html.pem-enterprise-ui .pem-release-nav-group-items{display:grid!important;gap:2px!important}

/* Native selects must visibly communicate that they open. */
html.pem-enterprise-ui .pem-dashboard-filter-bar select,
html.pem-enterprise-ui .period-control select,
html.pem-enterprise-ui .filters select,
html.pem-enterprise-ui .context-controls select,
html.pem-enterprise-ui .demo-context select{
  appearance:auto!important;
  -webkit-appearance:menulist!important;
  background-image:none!important;
  padding-right:30px!important;
  text-overflow:ellipsis!important;
  cursor:pointer!important;
}
html.pem-enterprise-ui .pem-dashboard-filter-bar label{min-width:0!important}
html.pem-enterprise-ui .pem-dashboard-filter-bar select{min-width:190px!important;width:100%!important;box-sizing:border-box!important}

/* Compact summary cards across operational surfaces. */
html.pem-enterprise-ui .pem-record-summary{
  display:grid!important;grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:174px!important;justify-content:start!important;align-items:stretch!important;gap:8px!important;width:max-content!important;max-width:100%!important;margin:0!important;overflow:visible!important
}
html.pem-enterprise-ui .pem-summary-metric{
  box-sizing:border-box!important;width:174px!important;min-width:174px!important;max-width:174px!important;min-height:76px!important;height:76px!important;padding:8px 10px 7px!important;display:grid!important;grid-template-rows:auto 1fr auto!important;gap:2px!important
}
html.pem-enterprise-ui .pem-summary-metric>span{font-size:11px!important;line-height:1.15!important;font-weight:760!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.pem-enterprise-ui .pem-summary-metric>b{margin:0!important;display:grid!important;place-items:center!important;font-size:25px!important;line-height:1!important}
html.pem-enterprise-ui .pem-summary-metric>small{align-self:end!important;margin:0!important;font-size:11px!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.pem-enterprise-ui body.pem-route-plan #summary.kpis{display:grid!important;grid-template-columns:repeat(10,minmax(0,1fr))!important;justify-content:stretch!important;gap:7px!important;width:100%!important;max-width:100%!important;margin:8px 0 10px!important}
html.pem-enterprise-ui body.pem-route-plan #summary.kpis .kpi{box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:none!important;height:76px!important;min-height:76px!important;padding:7px 8px!important;display:grid!important;grid-template-rows:minmax(28px,auto) 1fr!important;align-content:stretch!important;gap:2px!important}
html.pem-enterprise-ui body.pem-route-plan #summary.kpis .kpi>span{display:flex!important;align-items:flex-start!important;gap:4px!important;min-height:28px!important;line-height:1.12!important;font-size:11px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
html.pem-enterprise-ui body.pem-route-plan #summary.kpis .kpi>b{margin:0!important;display:grid!important;place-items:center!important;font-size:24px!important;line-height:1!important}
html.pem-enterprise-ui body.pem-route-plan #summary.kpis .kpi>small{display:none!important}

/* Dashboard R14: 10 KPI (5x2) + preventive pyramid, no consequence panel in this band. */
html.pem-enterprise-ui .pem-release-dashboard-band{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(280px,31%)!important;justify-content:start!important;align-items:stretch!important;gap:12px!important;margin:0 0 10px!important}
html.pem-enterprise-ui .pem-dashboard-kpis .pem-release-kpi-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;justify-content:stretch!important;align-items:stretch!important;gap:8px!important;width:100%!important;max-width:100%!important;margin:0!important}
html.pem-enterprise-ui .pem-dashboard-kpis .pem-release-kpi-grid>.kpi{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;height:76px!important;min-height:76px!important;padding:7px 9px 6px!important;display:grid!important;grid-template-rows:auto 1fr auto!important;align-items:stretch!important}
html.pem-enterprise-ui .pem-dashboard-kpis .kpi .label{min-width:0!important;align-items:center!important;gap:5px!important;font-size:11px!important;line-height:1.18!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:break-word!important}
html.pem-enterprise-ui .pem-dashboard-kpis .kpi .label>span:first-child{width:26px!important;height:26px!important;min-width:26px!important;flex:0 0 26px!important}
html.pem-enterprise-ui body .pem-dashboard-view .pem-dashboard-kpis .pem-release-kpi-grid>.kpi>.value{min-height:24px!important;margin:0!important;display:grid!important;place-items:center!important;text-align:center!important;font-size:25px!important;line-height:1.12!important;font-weight:820!important}
html.pem-enterprise-ui .pem-dashboard-kpis .kpi small{margin:0!important;align-self:end!important;font-size:10.5px!important;line-height:1.05!important}
html.pem-enterprise-ui .pem-release-pyramid-card{box-sizing:border-box!important;width:100%!important;min-width:330px!important;max-width:390px!important;height:176px!important;min-height:160px!important;padding:9px 11px!important;overflow:visible!important}
html.pem-enterprise-ui .pem-release-pyramid-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:8px!important;margin-bottom:5px!important}
html.pem-enterprise-ui .pem-release-pyramid-head h2{margin:0!important;font-size:14px!important;line-height:1.15!important}
html.pem-enterprise-ui .pem-release-pyramid-sub{display:block!important;margin-top:2px!important;color:#52637a!important;font-size:9.5px!important;line-height:1.15!important}
html.pem-enterprise-ui .pem-release-pyramid-period{color:#53708e!important;font-size:9px!important;font-weight:750!important;white-space:nowrap!important}
html.pem-enterprise-ui .pem-release-pyramid{display:flex!important;flex-direction:column!important;align-items:center!important;gap:3px!important;margin:0!important}
html.pem-enterprise-ui .pem-release-pyramid-tier{box-sizing:border-box!important;min-height:21px!important;padding:3px 8px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;border:1px solid #dce5ef!important;border-radius:6px!important;background:#f7f9fc!important;color:#10233f!important;text-decoration:none!important}
html.pem-enterprise-ui .pem-release-pyramid-tier:nth-child(1){width:38%!important;background:#fdf0ef!important;border-color:#f0cecb!important}
html.pem-enterprise-ui .pem-release-pyramid-tier:nth-child(2){width:52%!important;background:#fff6e8!important;border-color:#ecd9b9!important}
html.pem-enterprise-ui .pem-release-pyramid-tier:nth-child(3){width:66%!important;background:#f4f8fc!important}
html.pem-enterprise-ui .pem-release-pyramid-tier:nth-child(4){width:83%!important;background:#eef6ff!important}
html.pem-enterprise-ui .pem-release-pyramid-tier:nth-child(5){width:100%!important;background:#eaf4ff!important}
html.pem-enterprise-ui .pem-release-pyramid-tier span{min-width:0!important;overflow:visible!important;text-overflow:clip!important;white-space:normal!important;line-height:1.05!important;font-size:9.5px!important;font-weight:730!important}
html.pem-enterprise-ui .pem-release-pyramid-tier b{flex:0 0 auto!important;font-size:12px!important;line-height:1!important}
html.pem-enterprise-ui .pem-release-pyramid-state{min-height:112px!important;display:grid!important;place-items:center!important;color:#52637a!important;font-size:11px!important;text-align:center!important}
html.pem-enterprise-ui .pem-dashboard-priority-grid{display:grid!important;grid-template-columns:minmax(430px,560px) minmax(360px,1fr)!important;align-items:start!important;gap:12px!important}
html.pem-enterprise-ui .pem-release-top-risks{width:100%!important;max-width:560px!important;min-height:0!important}
html.pem-enterprise-ui .pem-release-top-risks .row{min-height:0!important;padding:6px 0!important;gap:8px!important}
html.pem-enterprise-ui .pem-release-top-risks .row-title{font-size:12px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.pem-enterprise-ui .pem-release-top-risks .row-sub{font-size:10.5px!important;line-height:1.15!important}
html.pem-enterprise-ui .pem-dashboard-view>.security-note{margin:0 0 6px!important;padding:6px 9px!important;font-size:11.5px!important;line-height:1.25!important}
html.pem-enterprise-ui .pem-dashboard-filter-bar{margin:0 0 8px!important;padding:7px 9px!important;min-height:0!important}

/* Long primary navigation labels must remain readable rather than truncated. */
html.pem-enterprise-ui [data-pem-module="audits"]{white-space:normal!important;line-height:1.15!important;min-height:48px!important;align-items:flex-start!important}
html.pem-enterprise-ui [data-pem-module="audits"] .pem-nav-label{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}

/* Risks / actions remain one useful vertical flow. */
html.pem-enterprise-ui body.pem-route-risks #riskSection,
html.pem-enterprise-ui body.pem-route-actions #capaSection{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;align-items:start!important}
html.pem-enterprise-ui body.pem-route-risks #riskSection>.card,
html.pem-enterprise-ui body.pem-route-risks #riskSection>details,
html.pem-enterprise-ui body.pem-route-actions #capaSection>.card,
html.pem-enterprise-ui body.pem-route-actions #capaSection>details{width:100%!important;max-width:none!important;margin-top:0!important}
html.pem-enterprise-ui #riskPreview{max-width:500px!important;color:#52637a!important;font-size:12px!important;font-weight:650!important;line-height:1.3!important;text-align:right!important}

/* Inspections belong to the same page system. */
html.pem-enterprise-ui body.pem-route-inspections #app.pem-release-inspection-shell{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
html.pem-enterprise-ui body.pem-route-inspections #app>.inspection-summary{margin-bottom:10px!important}
html.pem-enterprise-ui body.pem-route-inspections .inspection-toolbar{margin:0 0 10px!important}
html.pem-enterprise-ui body.pem-route-inspections .inspection-point-grid{gap:10px!important}
html.pem-enterprise-ui body.pem-route-inspections .uat-inspection-card{min-height:138px!important;margin:0!important}

/* Investigation analysis fields keep real working room. */
html.pem-enterprise-ui body.pem-route-investigations textarea[name='problem_statement'],
html.pem-enterprise-ui body:has(main.shell .pem-breadcrumb) #newInvestigation textarea[name='problem_statement']{min-height:124px!important;height:auto!important;resize:vertical!important;line-height:1.4!important}

/* Reports, Cause/Actions and Findings use compact metric clusters instead of stretched tiles. */
html.pem-enterprise-ui body.pem-route-reports #metrics.metrics,
html.pem-enterprise-ui body.pem-route-cause .metrics,
html.pem-enterprise-ui body.pem-route-findings #summary.grid{
  display:grid!important;grid-template-columns:repeat(auto-fit,174px)!important;justify-content:start!important;gap:8px!important;width:max-content!important;max-width:100%!important
}
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric,
html.pem-enterprise-ui body.pem-route-cause .metrics>.metric,
html.pem-enterprise-ui body.pem-route-findings #summary>.metric{
  box-sizing:border-box!important;width:174px!important;min-width:174px!important;max-width:174px!important;min-height:76px!important;height:76px!important;padding:8px 10px!important;display:grid!important;align-content:center!important
}
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric b,
html.pem-enterprise-ui body.pem-route-cause .metrics>.metric b,
html.pem-enterprise-ui body.pem-route-findings #summary>.metric b{font-size:25px!important;line-height:1!important;margin-top:4px!important}

/* Organization / QR: use the canvas. Multiple sites and sectors can coexist on desktop. */
html.pem-enterprise-ui body.pem-route-organization .org-shell{max-width:1720px!important}
html.pem-enterprise-ui body.pem-route-organization .org-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(620px,1fr))!important;gap:12px!important;align-items:start!important}
html.pem-enterprise-ui body.pem-route-organization .site-card{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:14px!important}
html.pem-enterprise-ui body.pem-route-organization .site-card>.site-head{grid-column:1/-1!important}
html.pem-enterprise-ui body.pem-route-organization .site-card>.sector{margin-top:0!important;min-width:0!important;padding:12px!important}
html.pem-enterprise-ui body.pem-route-organization .area{padding:10px!important;margin-top:8px!important}
html.pem-enterprise-ui body.pem-route-organization .points{grid-template-columns:1fr!important;gap:8px!important;margin-top:8px!important}
html.pem-enterprise-ui body.pem-route-organization .point{display:grid!important;grid-template-columns:minmax(0,1fr) 96px!important;grid-template-rows:auto auto auto auto!important;column-gap:10px!important;row-gap:6px!important;padding:10px!important;align-items:start!important}
html.pem-enterprise-ui body.pem-route-organization .point>.point-row{grid-column:1!important;grid-row:1!important}
html.pem-enterprise-ui body.pem-route-organization .point>img.qr-thumb{grid-column:2!important;grid-row:1/5!important;width:88px!important;height:88px!important;padding:4px!important;margin:0!important;justify-self:end!important;align-self:start!important}
html.pem-enterprise-ui body.pem-route-organization .point>.muted{grid-column:1!important;margin:0!important}
html.pem-enterprise-ui body.pem-route-organization .point>.point-actions{grid-column:1!important;margin:2px 0 0!important}
html.pem-enterprise-ui body.pem-route-organization .point>.public-note{grid-column:1/-1!important;margin-top:2px!important;padding:6px 8px!important;font-size:10.5px!important;line-height:1.25!important}
html.pem-enterprise-ui body.pem-route-organization .notice,
html.pem-enterprise-ui body.pem-route-organization .warning{padding:9px 11px!important;margin-bottom:9px!important;font-size:11.5px!important;line-height:1.35!important}

/* Indicators: the reading is analysis, never a sixth pyramid tier. */
html.pem-enterprise-ui body.pem-route-indicators .reading,
html.pem-enterprise-ui body.pem-route-indicators .pem-release-reading{
  margin:14px 0 0!important;padding:9px 11px 9px 13px!important;border:0!important;border-top:1px solid #dfe7f0!important;border-left:3px solid #6ca7df!important;border-radius:0!important;background:transparent!important;color:#315875!important
}
html.pem-enterprise-ui body.pem-route-indicators .reading b,
html.pem-enterprise-ui body.pem-route-indicators .pem-release-reading b{color:#103b69!important;margin-bottom:3px!important}
html.pem-enterprise-ui body.pem-route-indicators .metric-label .metric-help~.metric-help{display:none!important}

/* Cause/Actions headline should not dominate the screen. */
html.pem-enterprise-ui body.pem-route-cause .pem-release-page-header h1{max-width:680px!important}

@media(max-width:1450px) and (min-width:901px){
  html.pem-enterprise-ui .pem-release-dashboard-band{grid-template-columns:1fr!important}
  html.pem-enterprise-ui .pem-release-pyramid-card{min-width:0!important;max-width:900px!important;width:100%!important;height:auto!important;min-height:160px!important}
}
@media(max-width:1180px){
  html.pem-enterprise-ui body.pem-route-organization .org-grid{grid-template-columns:1fr!important}
  html.pem-enterprise-ui body.pem-route-organization .site-card{grid-template-columns:1fr!important}
  html.pem-enterprise-ui body.pem-route-organization .site-card>.site-head{grid-column:1!important}
  html.pem-enterprise-ui .pem-dashboard-priority-grid{grid-template-columns:1fr!important}
  html.pem-enterprise-ui .pem-release-top-risks{max-width:none!important}
}
@media(max-width:900px){
  html.pem-enterprise-ui .pem-release-page-header{align-items:flex-start!important;flex-direction:column!important}
  html.pem-enterprise-ui .pem-release-page-header-main{grid-template-columns:1fr!important}
  html.pem-enterprise-ui .pem-release-page-header h1{grid-column:1!important;font-size:24px!important}
  html.pem-enterprise-ui .pem-release-eyebrow{grid-column:1!important}
  html.pem-enterprise-ui .pem-dashboard-kpis .pem-release-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
  html.pem-enterprise-ui .pem-dashboard-kpis .pem-release-kpi-grid>.kpi{width:auto!important;min-width:0!important;max-width:none!important}
  html.pem-enterprise-ui .pem-release-pyramid-card{min-width:0!important;max-width:none!important;width:100%!important;height:auto!important}
  html.pem-enterprise-ui .pem-release-pyramid-tier:nth-child(n){width:100%!important}
  html.pem-enterprise-ui .pem-record-summary{grid-auto-flow:row!important;grid-template-columns:repeat(2,minmax(0,174px))!important;width:100%!important}
}
@media(max-width:620px){
  html.pem-enterprise-ui .pem-dashboard-kpis .pem-release-kpi-grid{grid-template-columns:1fr!important}
  html.pem-enterprise-ui .pem-record-summary{grid-template-columns:1fr!important}
  html.pem-enterprise-ui .pem-summary-metric{width:100%!important;min-width:0!important;max-width:none!important}
  html.pem-enterprise-ui .pem-dashboard-filter-bar select{min-width:0!important}
}

/* Final responsive closure: compact record summaries must wrap instead of widening the page. */
@media(max-width:1180px) and (min-width:901px){
  html.pem-enterprise-ui .pem-record-summary{
    grid-auto-flow:row!important;
    grid-auto-columns:auto!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;
    max-width:100%!important;
  }
  html.pem-enterprise-ui .pem-record-summary>.pem-summary-metric{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
  }
}

/* Standard 768px viewport must enter the mobile navigation/list contract. */
@media(max-width:800px){
  html.pem-enterprise-ui body:not(.pem-standalone-shell){padding-bottom:72px!important}
  html.pem-enterprise-ui .mobile-nav{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    position:fixed!important;
    z-index:50!important;
    bottom:0!important;left:0!important;right:0!important;
    width:100vw!important;max-width:100vw!important;height:68px!important;
    background:#fff!important;border-top:1px solid var(--pem-color-border,#dfe7f0)!important;
  }
  html.pem-enterprise-ui .mobile-nav .nav-btn{
    min-width:0!important;width:100%!important;padding:6px 2px!important;
    display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;
    gap:2px!important;border-radius:0!important;font-size:11px!important;text-align:center!important;
  }
  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}
  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}
}


/* BRAND HOTFIX: canonical full PEM SySO lockup on expanded desktop shells. */
@media (min-width:901px){
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .sidebar>.brand,
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .pem-global-brand{
    justify-content:center!important;
    min-height:72px!important;
    padding:10px 12px!important;
  }
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .sidebar>.brand .shield,
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .pem-global-logo{
    width:190px!important;
    min-width:190px!important;
    max-width:190px!important;
    height:52px!important;
    min-height:52px!important;
    max-height:52px!important;
    flex:0 0 190px!important;
    background:#fff url('/static/pem_syso_logo.png') center/contain no-repeat!important;
    border-radius:10px!important;
  }
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .sidebar>.brand>div:last-child,
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .pem-global-brand-copy{
    display:none!important;
  }
  html.pem-enterprise-ui.pem-sidebar-collapsed .sidebar>.brand .shield,
  html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-logo{
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    flex:0 0 40px!important;
    background:#fff url('/static/pem_syso_mark.png') center/contain no-repeat!important;
  }
}

/* Canonical dashboard KPI links: visually identical to non-link KPI cards. */
html.pem-enterprise-ui .pem-dashboard-kpis a.pem-release-extra-kpi,
html.pem-enterprise-ui .pem-dashboard-kpis a.pem-release-extra-kpi:hover,
html.pem-enterprise-ui .pem-dashboard-kpis a.pem-release-extra-kpi:focus,
html.pem-enterprise-ui .pem-dashboard-kpis a.pem-release-extra-kpi *{
  text-decoration:none!important;
}


/* Canonical reports KPI strip: single-row desktop, semantic dashboard tones, no help glyphs. */
html.pem-enterprise-ui body.pem-route-reports #metrics .pem-approved-info,
html.pem-enterprise-ui body.pem-route-reports #metrics .metric-help,
html.pem-enterprise-ui body.pem-route-reports #metrics .pem-help-trigger{display:none!important}
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-red>b{color:#b3261e!important}
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-amber>b{color:#9a6a00!important}
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-green>b{color:#176b3a!important}
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-blue>b{color:#245c98!important}
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-neutral>b{color:#5f6f80!important}
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-red,
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-amber,
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-green,
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-blue,
html.pem-enterprise-ui body.pem-route-reports #metrics>.metric.pem-report-neutral{background:#fff!important;border-color:#e0e7ef!important}
@media(min-width:1181px){
  html.pem-enterprise-ui body.pem-route-reports #metrics.metrics{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;gap:8px!important}
  html.pem-enterprise-ui body.pem-route-reports #metrics>.metric{box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:none!important;height:76px!important;min-height:76px!important;padding:8px 9px!important;display:grid!important;grid-template-rows:minmax(24px,auto) 1fr!important;align-content:stretch!important}
  html.pem-enterprise-ui body.pem-route-reports #metrics>.metric>span{font-size:10.5px!important;line-height:1.1!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  html.pem-enterprise-ui body.pem-route-reports #metrics>.metric>b{margin:0!important;display:grid!important;place-items:center!important;text-align:center!important;font-size:23px!important;line-height:1!important;white-space:nowrap!important}
}


/* Canonical Legal/Competencies semantic KPI number tones. */
html.pem-enterprise-ui body.pem-route-legal .metric.pem-legal-red>b,
html.pem-enterprise-ui body.pem-route-legal .pem-summary-metric.pem-legal-red>b{color:#b3261e!important}
html.pem-enterprise-ui body.pem-route-legal .metric.pem-legal-amber>b,
html.pem-enterprise-ui body.pem-route-legal .pem-summary-metric.pem-legal-amber>b{color:#9a6a00!important}
html.pem-enterprise-ui body.pem-route-legal .metric.pem-legal-green>b,
html.pem-enterprise-ui body.pem-route-legal .pem-summary-metric.pem-legal-green>b{color:#176b3a!important}
html.pem-enterprise-ui body.pem-route-legal .metric.pem-legal-blue>b,
html.pem-enterprise-ui body.pem-route-legal .pem-summary-metric.pem-legal-blue>b{color:#245c98!important}
html.pem-enterprise-ui body.pem-route-legal .metric.pem-legal-neutral>b,
html.pem-enterprise-ui body.pem-route-legal .pem-summary-metric.pem-legal-neutral>b{color:#5f6f80!important}


/* Canonical dashboard entry: hide intermediate base render until release normalization is complete. */
html.pem-enterprise-ui #view.pem-dashboard-settling .pem-dashboard-view{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

html.pem-enterprise-ui body.pem-route-indicators .indicator-layout>aside.side-stack>.card{margin:0!important;min-height:0!important}
html.pem-enterprise-ui body.pem-route-indicators .indicator-layout>aside.side-stack>.card:first-child{margin-top:0!important}

/* Presentation-only semantic tones and Spanish native upload overlay. */
html.pem-enterprise-ui .pem-summary-metric.tone-orange>b{color:#9a6a00!important}
html.pem-enterprise-ui .indicator-summary .metric.pem-motion-neutral>b{color:#5f6f80!important}
.pem-file-control{position:relative;display:flex;align-items:center;gap:12px;min-height:40px;border:1px solid #cbd5df;border-radius:9px;padding:6px;background:#fff}
.pem-file-select{display:inline-flex;padding:7px 12px;border-radius:6px;background:#eef5ff;color:#173d67;font-weight:700;white-space:nowrap}
.pem-file-name{color:#607080;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pem-file-control>input[type=file]{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;opacity:0!important;cursor:pointer}
.pem-file-control:focus-within{outline:2px solid #1266bd;outline-offset:2px}

html.pem-enterprise-ui body.pem-route-plan #summary>.kpi:first-child b{color:#245c98!important}
html.pem-enterprise-ui body.pem-route-ppe .kpi .pem-approved-info,
html.pem-enterprise-ui body.pem-route-ppe .metric .pem-approved-info,
html.pem-enterprise-ui body.pem-route-ppe .kpi .metric-help,
html.pem-enterprise-ui body.pem-route-ppe .metric .metric-help{display:none!important}
.pem-validity-loading{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px 0;min-height:92px}
.pem-validity-loading>span{display:block;border:1px solid #e1e7ef;border-radius:10px;background:linear-gradient(#f8fafc,#eef3f7)}

/* A tab hidden by its controller must stay out of layout. */
html.pem-enterprise-ui body #riskSection[hidden],
html.pem-enterprise-ui body #capaSection[hidden]{display:none!important}

html.pem-enterprise-ui body #uatGate[hidden],
html.pem-enterprise-ui body #uatWorkspace[hidden]{display:none!important}
html.pem-enterprise-ui body #uatWorkspace .hero h1,
html.pem-enterprise-ui body #uatGate .hero h1{color:#fff!important}

/* A header replaced by the approved demo header must stay out of layout.
   Early shell preparation can style it before the replacement arrives. */
html.pem-enterprise-ui .pem-demo-superseded{display:none!important}

/* Desktop module host: the outer navigation remains the same DOM between routes. */
html.pem-persistent-shell-active,html.pem-persistent-shell-active body{overflow:hidden!important}
.pem-persistent-module-frame{position:fixed;inset:0;width:100vw;height:100vh;border:0;background:#f3f6fa;z-index:2500}
html.pem-persistent-shell-active .sidebar,html.pem-persistent-shell-active .pem-global-sidebar{position:fixed!important;inset:0 auto 0 0!important;height:100vh!important;z-index:4000!important}
html.pem-persistent-shell-active .main>.topbar,html.pem-persistent-shell-active .pem-global-topbar{position:fixed!important;top:0!important;left:var(--pem-host-sidebar-width,252px)!important;right:0!important;z-index:3990!important}
html.pem-embedded-module .sidebar,html.pem-embedded-module .pem-global-sidebar,html.pem-embedded-module .main>.topbar,html.pem-embedded-module .pem-global-topbar{opacity:0!important;pointer-events:none!important}
#pemPersistentNavigationStatus{position:fixed;bottom:16px;left:calc(var(--pem-host-sidebar-width,252px) + 16px);z-index:5000;padding:10px 16px;border:1px solid #dfe7f0;border-radius:8px;background:white;color:#12345a;box-shadow:0 3px 12px #1232;font:600 14px system-ui}
#pemPersistentNavigationStatus[hidden]{display:none}
.pem-persistent-module-frame{clip-path:inset(64px 0 0 var(--pem-host-sidebar-width,252px))}

/* Top-layer forms stay within the visible module area of the persistent shell. */
html.pem-embedded-module dialog[open]{position:fixed!important;margin:0!important;left:calc(var(--pem-embedded-sidebar-width,252px) + (100vw - var(--pem-embedded-sidebar-width,252px))/2)!important;right:auto!important;top:80px!important;bottom:auto!important;transform:translateX(-50%)!important;max-width:calc(100vw - var(--pem-embedded-sidebar-width,252px) - 32px)!important;max-height:calc(100vh - 96px)!important;box-sizing:border-box;overflow:auto!important}
html.pem-embedded-module .modal{left:var(--pem-embedded-sidebar-width,252px)!important;top:64px!important;width:calc(100vw - var(--pem-embedded-sidebar-width,252px))!important;height:calc(100vh - 64px)!important}

/* Plan dialogs must honor hidden even though their legacy #id rules force
   display:flex!important; preserve close/Escape, initial hidden state, and focus. */
#occurrenceDialog.dialog[hidden],
#activityDialog.dialog[hidden]{display:none!important}

/* PEM embedded overlay safe rectangle v1. The parent shell clips its iframe under
   the topbar/sidebar. Position only full-screen backdrops inside the unmasked area,
   never inner dialog cards. Geometry comes from parent syncGeometry(). */
@media screen and (min-width:901px){
  html.pem-embedded-module{
    --pem-overlay-safe-top:var(--pem-embedded-header-bottom,64px);
    --pem-overlay-safe-left:var(--pem-embedded-sidebar-width,252px);
  }
  html.pem-embedded-module :is(.modal-backdrop,.uat-modal-v2,.pem-dialog,.pem-risk-shade,.pem-approved-info-modal,.qr-print-overlay){
    position:fixed!important;
    top:var(--pem-overlay-safe-top)!important;
    left:var(--pem-overlay-safe-left)!important;
    right:0!important;
    bottom:0!important;
    width:auto!important;
    height:auto!important;
    box-sizing:border-box!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }
  /* Plan's inline #id rules use inset:0!important; override both axes explicitly. */
  html.pem-embedded-module #occurrenceDialog.dialog,
  html.pem-embedded-module #activityDialog.dialog{
    position:fixed!important;
    top:var(--pem-overlay-safe-top)!important;
    left:var(--pem-overlay-safe-left)!important;
    right:0!important;
    bottom:0!important;
    width:auto!important;
    height:auto!important;
    box-sizing:border-box!important;
    padding:12px!important;
    overflow:auto!important;
    overscroll-behavior:contain;
  }
  html.pem-embedded-module #occurrenceDialog.dialog>.dialog-card,
  html.pem-embedded-module #activityDialog.dialog>.dialog-card{
    min-width:0;
    max-width:100%;
    max-height:calc(100dvh - var(--pem-overlay-safe-top) - 24px)!important;
    overflow-y:auto;
  }
  html.pem-embedded-module :is(.pem-dialog>.pem-dialog-card,.pem-risk-shade>.pem-risk-dialog,.modal-backdrop>.modal-card){
    box-sizing:border-box;
    max-width:100%;
    max-height:calc(100dvh - var(--pem-overlay-safe-top) - 36px)!important;
    overflow-y:auto;
  }
  html.pem-embedded-module .uat-modal-v2>.uat-modal-v2-card{
    min-width:0;
    max-width:100%;
    max-height:calc(100dvh - var(--pem-overlay-safe-top) - 36px)!important;
  }
  html.pem-embedded-module dialog[open]{
    top:calc(var(--pem-overlay-safe-top) + 16px)!important;
    max-height:calc(100dvh - var(--pem-overlay-safe-top) - 32px)!important;
  }
  html.pem-embedded-module .modal{
    top:var(--pem-overlay-safe-top)!important;
    height:calc(100dvh - var(--pem-overlay-safe-top))!important;
  }
}

/* 25/10: un único símbolo de ayuda, sin aro decorativo duplicado.
   El control conserva su explicación y el foco de teclado. */
html.pem-enterprise-ui body.pem-route-indicators .metric-help{
 border:0!important;border-radius:4px!important;box-shadow:none!important;
 background:transparent!important;min-width:24px!important;min-height:24px!important;
 width:24px!important;height:24px!important;padding:3px!important;color:#436a90!important
}
html.pem-enterprise-ui body.pem-route-indicators .metric-help:hover{background:#eef6ff!important;color:#0c65ba!important}
html.pem-enterprise-ui body.pem-route-indicators .metric-help:focus-visible{
 outline:2px solid #0b73e0!important;outline-offset:2px!important
}

/* 26/10/2026: preserve the approved graphite enterprise sidebar and its exact
   width in both root and standalone modules, without changing mobile layouts.
   The navigation JS remains responsible for active selection and group state. */
@media (min-width:901px){
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .sidebar,
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .pem-global-sidebar{
    box-sizing:border-box!important;
    width:var(--pem-sidebar-w,252px)!important;
    min-width:var(--pem-sidebar-w,252px)!important;
    max-width:var(--pem-sidebar-w,252px)!important;
  }
  html.pem-enterprise-ui.pem-sidebar-collapsed .sidebar,
  html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-sidebar{
    box-sizing:border-box!important;
    width:var(--pem-sidebar-collapsed,56px)!important;
    min-width:var(--pem-sidebar-collapsed,56px)!important;
    max-width:var(--pem-sidebar-collapsed,56px)!important;
  }
  html.pem-enterprise-ui .sidebar,
  html.pem-enterprise-ui .pem-global-sidebar{
    background:linear-gradient(180deg,#334155 0%,#1e293b 58%,#0f172a 100%)!important;
  }
  html.pem-enterprise-ui .pem-sidebar-scroll,
  html.pem-enterprise-ui .pem-global-nav{
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .sidebar .nav-btn,
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .pem-global-sidebar .pem-global-link{
    box-sizing:border-box!important;
    max-width:100%!important;
    min-height:40px!important;
  }
  html.pem-enterprise-ui:not(.pem-sidebar-collapsed) body.pem-standalone-shell{
    padding-left:var(--pem-sidebar-w,252px)!important;
  }
  html.pem-enterprise-ui.pem-sidebar-collapsed body.pem-standalone-shell{
    padding-left:var(--pem-sidebar-collapsed,56px)!important;
  }
  html.pem-enterprise-ui .pem-global-topbar{
    left:var(--pem-sidebar-w,252px)!important;
  }
  html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-topbar{
    left:var(--pem-sidebar-collapsed,56px)!important;
  }
  html.pem-enterprise-ui .sidebar .nav-icon svg,
  html.pem-enterprise-ui .pem-global-sidebar .pem-nav-icon svg{
    width:18px!important;height:18px!important;
    max-width:18px!important;max-height:18px!important;
  }
  html.pem-enterprise-ui.pem-sidebar-collapsed .sidebar .nav-icon,
  html.pem-enterprise-ui.pem-sidebar-collapsed .pem-global-sidebar .pem-nav-icon{
    box-sizing:border-box!important;
    width:20px!important;min-width:20px!important;
    display:grid!important;place-items:center!important;
  }
}

/* V26b — Compact four-row management alerts. Both lower Dashboard panels
   retain the same grid width and auto-equal height; do not affect 10 KPIs/pyramid. */
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid > .card:first-child .list .row{
  padding:4px 0!important;min-height:0!important;
}


/* Dashboard load geometry: fixed-header placeholders must not become an
   intrinsic minimum width for the lower content grid. Their captured pixel
   widths can predate the final shell/font layout, before any resize occurs. */
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-content{
  grid-template-columns:minmax(0,1fr)!important;
}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-content > .pem-persistent-placeholder{
  min-width:0!important;max-width:100%!important;
}

/* V03: Only Dashboard lower blocks follow available width/zoom. Leave top KPI grid/pyramid untouched. */
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-content,
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{
  box-sizing:border-box!important;min-width:0!important;max-width:100%!important;width:100%!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{
  box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid .progress-list,
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid .progress-line{
  min-width:0!important;max-width:100%!important;
}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid .progress-line{
  display:grid!important;grid-template-columns:minmax(110px,0.38fr) minmax(0,1fr) minmax(36px,44px)!important;
  align-items:center!important;gap:8px!important;
}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid .progress-line .bar{
  min-width:0!important;max-width:100%!important;overflow:hidden!important;
}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid .progress-line > b{
  justify-self:end!important;white-space:nowrap!important;
}
@media(min-width:1121px){
 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{
   grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
}
@media(max-width:1120px){
 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{
   grid-template-columns:minmax(0,1fr)!important;
 }
}
@media(max-width:560px){
 html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid .progress-line{
   grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px!important;
 }
}

/* Dashboard density: use the existing pyramid canvas without widening it or
   changing the ten KPI cards. Keep both management panels equally tall. */
@media(min-width:901px){
 html.pem-enterprise-ui body.pem-root-view-dashboard .pem-release-pyramid-card{
   display:flex!important;flex-direction:column!important;
   width:100%!important;min-width:0!important;max-width:390px!important;
 }
 html.pem-enterprise-ui body.pem-root-view-dashboard .pem-release-pyramid{
   flex:1 1 auto!important;justify-content:space-between!important;gap:2px!important;
 }
 html.pem-enterprise-ui body.pem-root-view-dashboard .pem-release-pyramid-tier{
   flex:0 0 auto!important;min-height:22px!important;padding:2px 7px!important;
 }
 html.pem-enterprise-ui body.pem-root-view-dashboard .pem-release-pyramid-tier span{
   font-size:10.5px!important;line-height:1.1!important;
 }
 html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-priority-grid > .card:first-child .list{
   gap:0!important;
 }
}

/* WCAG 2.2 AA: dashboard pyramid links must expose 24px+ touch targets.
   Scope the extra height to mobile so desktop management density stays intact. */
@media(max-width:900px){
 html.pem-enterprise-ui body.pem-root-view-dashboard .pem-release-pyramid-tier{
   min-height:28px!important;
 }
}

/* Mobile navigation must clear the fixed dashboard band (z-index:1079),
   while staying below persistent dialogs and the authenticated topbar. */
@media(max-width:760px){
 html.pem-enterprise-ui #mobileNav.mobile-nav{
   z-index:1200!important;
 }
}

html.pem-enterprise-ui .pem-risks-view .pem-risk-six-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 174px), 174px)) !important;
  grid-auto-flow: row !important;
  gap: 8px !important;
  width: 100% !important;
}
.pem-risk-six-cards button { cursor: pointer; font: inherit; }
.pem-risk-six-cards button:hover,
.pem-risk-six-cards button:focus-visible { box-shadow: inset 0 0 0 2px #2475bb; }
.pem-risks-view .pem-record-filter-bar .pem-filter-grow { flex: 1 1 260px; min-width: min(230px, 100%); }
html.pem-enterprise-ui .pem-risks-view .pem-risk-six-cards > .pem-summary-metric {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

.pem-risks-view [data-risk-summary]{display:grid;gap:12px}
.pem-risks-view [data-risk-summary] h2{font-size:1rem;margin:0 0 6px}
html.pem-enterprise-ui .pem-risks-view [data-risk-summary] .pem-summary-metric{
  height:62px!important;min-height:62px!important;
}
.pem-risks-view [data-risk-summary] small{display:block;margin-top:6px}

/* Compactación exclusiva de Riesgos: cinco niveles por fila. */
html.pem-enterprise-ui .pem-risks-view .pem-release-page-header{margin-bottom:4px!important;padding-bottom:5px!important}
html.pem-enterprise-ui .pem-risks-view .pem-flagship-tabs{min-height:36px!important;margin:0 0 4px!important;padding:0!important;align-items:center!important}
html.pem-enterprise-ui .pem-risks-view .pem-flagship-tabs .pem-tab{min-height:36px!important;padding:7px 14px!important}
html.pem-enterprise-ui .pem-risks-view [data-risk-summary]{gap:6px!important;margin:0 0 8px!important}
html.pem-enterprise-ui .pem-risks-view [data-risk-summary] section{margin:0!important;padding:0!important}
html.pem-enterprise-ui .pem-risks-view [data-risk-summary] h2{font-size:16px!important;line-height:1.2!important;margin:0 0 3px!important}
html.pem-enterprise-ui .pem-risks-view .pem-risk-six-cards{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-flow:row!important;justify-content:stretch!important;width:100%!important;gap:8px!important}
html.pem-enterprise-ui .pem-risks-view .pem-risk-six-cards>.pem-summary-metric{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;height:62px!important;min-height:62px!important}
html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar{margin:0 0 6px!important}
html.pem-enterprise-ui .pem-risks-view .table-wrap{margin-top:6px!important}
@media (min-width:761px) and (max-width:1180px){html.pem-enterprise-ui .pem-risks-view .pem-risk-six-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (min-width:761px) and (max-width:1180px){html.pem-enterprise-ui .pem-risks-view [data-risk-block="initial"] .pem-risk-six-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (min-width:431px) and (max-width:760px){html.pem-enterprise-ui .pem-risks-view .pem-risk-six-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (max-width:430px){html.pem-enterprise-ui .pem-risks-view .pem-risk-six-cards{grid-template-columns:1fr!important}}

/* Densidad vertical ajustada en Riesgos: sin alterar módulos vecinos. */
html.pem-enterprise-ui .pem-risks-view{row-gap:5px!important}
html.pem-enterprise-ui .pem-risks-view .pem-flagship-tabs{min-height:32px!important;margin:0!important}
html.pem-enterprise-ui .pem-risks-view .pem-flagship-tabs .pem-tab{min-height:32px!important;padding:5px 11px!important;line-height:20px!important}
html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar{margin:0!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap{margin:-3px 0 0!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap thead th{height:auto!important;min-height:0!important;padding:7px 9px!important;line-height:1.2!important;vertical-align:middle!important}


/* Riesgos 20261114: tarjeta de total integrada en la barra de pestañas,
   sin agregar una sexta tarjeta ni desplazar el bloque de cinco niveles. */
html.pem-enterprise-ui .pem-risks-view .pem-risk-period-total{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  position:absolute;left:50%;top:calc(50% - 3px);transform:translate(-50%,-50%);
  margin:0;padding:4px 12px;min-height:31px;
  background:#eef4f8;border:1px solid #d8e5ed;border-radius:9px;
  color:#244568;white-space:nowrap;box-sizing:border-box;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-period-total span{
  font-size:12px;font-weight:700;line-height:1.2;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-period-total strong{
  font-size:20px;line-height:1;font-weight:820;font-variant-numeric:tabular-nums;
  color:#0b73e0!important;
}
html.pem-enterprise-ui .pem-risks-view [data-risk-summary] section[data-risk-block="residual"] .pem-summary-metric{
  background:#eef4f8!important;border-color:#d8e5ed!important;
}
/* Mantener el contador centrado verticalmente, no apoyado en el borde inferior. */
html.pem-enterprise-ui .pem-risks-view .pem-flagship-tabs{position:relative!important;align-items:center!important;}
html.pem-enterprise-ui .pem-risks-view .pem-risk-filter-clear{
  align-self:center;border:1px solid #c9dcf6;border-radius:8px;
  padding:7px 11px;background:#edf5ff;color:#0b73e0!important;
  text-decoration:none;font-size:12px;font-weight:750;white-space:nowrap;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-filter-clear.is-active{
  background:#fff1f0;border-color:#ebc0bb;color:#b42318!important;
}
@media (max-width:1050px){
  html.pem-enterprise-ui .pem-risks-view .pem-flagship-tabs{flex-wrap:wrap!important;}
  html.pem-enterprise-ui .pem-risks-view .pem-risk-period-total{
    position:static;transform:none;margin:4px auto;max-width:100%;white-space:normal;
  }
}
@media (max-width:480px){
  html.pem-enterprise-ui .pem-risks-view .pem-risk-period-total{width:100%;}
}


/* PEM - barra compacta de Riesgos; misma estructura que Acciones.
   Ninguna fecha personalizada fuerza un salto de línea en escritorio. */
@media(min-width:901px){
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar{
    display:flex!important;flex-wrap:nowrap!important;align-items:flex-end!important;
    gap:7px!important;min-width:0!important;padding:9px 10px!important;
    overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin;
  }
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar>label{
    display:grid!important;flex:1 1 94px!important;min-width:86px!important;
    max-width:none!important;gap:4px;align-self:flex-end!important;
    font-size:12px!important;white-space:nowrap;
  }
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar>.pem-filter-grow{
    flex:0 1 175px!important;min-width:115px!important;max-width:185px!important;
  }
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar>label[data-record-custom]{
    flex:0 0 118px!important;min-width:118px!important;
  }
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar input,
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar select{
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:36px!important;box-sizing:border-box!important;font-size:12px!important;
  }
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar .pem-risk-filter-clear{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    flex:0 0 120px!important;align-self:flex-end!important;
    min-width:120px!important;height:36px!important;box-sizing:border-box!important;
    margin:0!important;padding:4px 8px!important;
  }
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar [hidden]{display:none!important}
}
@media(max-width:900px){
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar>.pem-filter-grow{
    flex:1 1 165px!important;max-width:210px!important;min-width:120px!important;
  }
  html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar .pem-risk-filter-clear{
    align-self:flex-end!important;
  }
}


/* Riesgos — evitar el encadenamiento de scroll hacia la pÃ¡gina.
   El encabezado de columnas clonado debe permanecer fuera del Ã¡rea
   desplazable y ajustarse a la altura real de la ventana. */
@media(min-width:901px){
  html.pem-enterprise-ui .pem-risks-view>.table-wrap,
  html.pem-enterprise-ui .pem-risks-view .pem-master-list>.table-wrap{
    overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    scrollbar-gutter:stable;
    min-height:0!important;
  }
  html.pem-enterprise-ui .pem-risks-view .pem-risk-navigation{
    position:relative!important;
    top:auto!important;
    z-index:14!important;
  }
}


/* Riesgos: la validación de rango no crea una fila roja bajo los filtros. */
html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar [data-record-period-error]{
 display:none!important;
}
html.pem-enterprise-ui .pem-risks-view .pem-record-filter-bar input[aria-invalid="true"]{
 border-color:#b42318!important;box-shadow:0 0 0 1px #b42318!important;
}

/* Riesgos: encabezado de columnas fijo y un solo control horizontal util,
   el scrollbar del listado. La banda superior es solo para sincronizar scrollLeft. */
html.pem-enterprise-ui .pem-risks-view .pem-risk-top-scroll{
  height:0!important;min-height:0!important;max-height:0!important;
  padding:0!important;margin:0!important;border:0!important;
  scrollbar-width:none!important;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-top-scroll::-webkit-scrollbar{
  display:none!important;width:0!important;height:0!important;
}

/* Riesgos: encabezados y celdas densos en ambas vistas, sin cortar texto
   ni modificar el scroll interno aprobado ni el ancho de las columnas. */
html.pem-enterprise-ui .pem-risks-view .table-wrap table thead th,
html.pem-enterprise-ui .pem-risks-view .pem-risk-heading-table thead th,
.pem-risk-table thead th{
  height:auto!important;min-height:0!important;
  padding:6px 7px!important;font-size:12px!important;line-height:1.2!important;
  vertical-align:middle!important;white-space:normal!important;
}
html.pem-enterprise-ui .pem-risks-view .table-wrap table tbody td,
.pem-risk-table tbody td{
  padding:7px 7px!important;line-height:1.3!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
}

/* Riesgos: corregir la regresión de corte de textos observada en Chrome.
   Con ancho suficiente, las 11 columnas caben sin scroll horizontal.
   En pantallas estrechas, el scroll horizontal queda dentro del listado. */
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table {
  width:100%!important;
  min-width:1220px!important;
  table-layout:fixed!important;
}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table :is(th,td) {
  word-break:normal!important;
  overflow-wrap:break-word!important;
  hyphens:none!important;
}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table tbody td:is(:nth-child(1),:nth-child(2),:nth-child(6),:nth-child(7),:nth-child(8),:nth-child(10)) {
  white-space:nowrap!important;
  overflow-wrap:normal!important;
}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(1){width:9%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(2){width:8%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(3){width:12%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(4){width:18%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(5){width:9%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(6){width:7%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(7){width:7%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(8){width:7%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(9){width:8%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(10){width:5%!important}
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table thead th:nth-child(11){width:10%!important}

/* Keep percentage column widths inside the table's available box. */
html.pem-enterprise-ui .pem-risks-view>.table-wrap>table :is(th,td){
  box-sizing:border-box!important;
}


/* Riesgos: el grid no debe expandirse por el ancho intrínseco de la tabla.
   A tamaños estrechos, el desplazamiento horizontal pertenece exclusivamente
   al listado; nunca al documento ni al encabezado global. */
@media(max-width:1250px){
  html.pem-enterprise-ui .pem-risks-view{
    grid-template-columns:minmax(0,1fr)!important;
  }
  html.pem-enterprise-ui .pem-risks-view>.table-wrap,
  html.pem-enterprise-ui .pem-risks-view .pem-master-list>.table-wrap,
  html.pem-enterprise-ui .pem-risks-view .pem-risk-navigation{
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:100%!important;
    width:100%!important;
  }
  html.pem-enterprise-ui .pem-risks-view>.table-wrap{
    overflow-x:auto!important;
  }
}

/* A locked company selector duplicates the company badge. Keep its value
   available to existing session logic, without displaying a disabled control. */
html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .demo-context>label:has(> #tenantSelect:disabled){
  display:none!important;
}
html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .demo-context:has(>label[hidden]>#demoUserSelect):has(#tenantSelect:disabled){
  display:none!important;
}

/* U3 · empresa en topbar del SPA, igual al encabezado standalone.
   Solo presenta nombre del tenant efectivo; no habilita cambiar de empresa. */
html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .pem-root-company-badge{
  display:flex!important;
  align-items:center;
  gap:8px;
  flex:0 1 auto;
  margin-left:auto!important;
  min-width:0;
  max-width:200px;
  color:var(--pem-color-text,#142e4d);
}
html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .pem-root-company-badge[hidden]{
  display:none!important;
}
html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .pem-root-company-badge span{
  font-size:11px;
  color:var(--pem-color-muted,#62758a);
  font-weight:750;
  white-space:nowrap;
}
html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .pem-root-company-badge b{
  font-size:12px;
  font-weight:820;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}
html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar:has(.pem-root-company-badge:not([hidden])) .top-actions{
  margin-left:0!important;
}
@media(max-width:1330px){
  html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .pem-root-company-badge span{display:none}
  html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .pem-root-company-badge{max-width:135px}
}
@media(max-width:1090px){
  html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .pem-root-company-badge{display:none!important}
  html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar .top-actions{margin-left:auto!important}
}

/* Compact release navigation: hide only the visual group caption, preserving
   the accessible name and the chevron on standalone pages without final_release.css. */
@media (min-width:801px) {
  html.pem-enterprise-ui.pem-sidebar-collapsed .pem-release-nav-group-toggle {
    position:relative!important;
    justify-content:center!important;
    min-width:0!important;
    padding:10px 4px!important;
    gap:0!important;
    overflow:hidden!important;
  }
  html.pem-enterprise-ui.pem-sidebar-collapsed .pem-release-nav-group-toggle > span:first-child {
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    margin:-1px!important;
    padding:0!important;
    border:0!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
  }
  html.pem-enterprise-ui.pem-sidebar-collapsed .pem-release-nav-chevron {
    flex:0 0 auto!important;
    font-size:18px!important;
  }
}

/* Dashboard: same typography and dimensions for all ten KPIs from first paint. */
html.pem-enterprise-ui .pem-dashboard-view .pem-dashboard-kpis .pem-release-kpi-grid>.kpi{
  height:76px!important;min-height:76px!important;padding:7px 9px 6px!important
}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .pem-dashboard-view
.pem-dashboard-kpis .kpi-grid>.kpi:first-child .label{
  font-size:11px!important;font-weight:700!important;
  line-height:1.18!important;white-space:normal!important
}
html.pem-enterprise-ui body.pem-root-dashboard-v3 .pem-dashboard-view
.pem-dashboard-kpis .kpi-grid>.kpi:first-child .value{
  font-size:25px!important;font-weight:820!important;line-height:1.12!important
}

@media(min-width:1200px){
 html.pem-enterprise-ui body .pem-dashboard-view .pem-release-dashboard-band{grid-template-columns:minmax(0,1fr) minmax(280px,31%)!important;min-width:0!important;width:100%!important}
 html.pem-enterprise-ui body .pem-dashboard-view .pem-dashboard-kpis{min-width:0!important;width:100%!important}
 html.pem-enterprise-ui body .pem-dashboard-view .pem-dashboard-kpis .kpi-grid.pem-release-kpi-grid.pem-kpi-grid-final{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-auto-flow:row!important;width:100%!important;max-width:100%!important;min-width:0!important}
 html.pem-enterprise-ui body .pem-dashboard-view .pem-dashboard-kpis .kpi-grid.pem-release-kpi-grid.pem-kpi-grid-final>.kpi{width:100%!important;min-width:0!important;max-width:none!important}
 html.pem-enterprise-ui body .pem-dashboard-view .pem-release-pyramid-card{min-width:0!important;max-width:none!important;width:100%!important}
}

/* Keep viewport width reserved even when a filtered list becomes empty. */
html.pem-enterprise-ui:has(body.pem-root-view-dashboard){scrollbar-gutter:stable}
html.pem-enterprise-ui .pem-dashboard-view[data-dashboard-refreshing=true] .pem-dashboard-clear{opacity:1!important;cursor:wait!important}
html.pem-enterprise-ui .pem-dashboard-view .pem-dashboard-refresh-error{padding:8px 12px;margin:0 0 10px;border:1px solid #efc9a9;background:#fff6e9;color:#8d4a0d;border-radius:8px;font-size:13px}

/* REV4 keeps long labels readable when the rail is expanded. */
html.pem-enterprise-ui .pem-release-nav-group[hidden]{display:none!important}
html.pem-enterprise-ui:not(.pem-sidebar-collapsed) .pem-release-nav-group
  :is(.nav-btn>span:last-child,.pem-global-link>.pem-nav-label){
  white-space:normal!important;
  overflow-wrap:anywhere;
  text-overflow:clip!important;
}

/* LAB 2026-11-27: compact executive title and fixed-band clearance. */
@media(min-width:901px){
html.pem-enterprise-ui body.pem-root-view-dashboard #view .pem-dashboard-header .pem-dashboard-heading{gap:0!important}
html.pem-enterprise-ui body.pem-root-view-dashboard #view .pem-dashboard-header .pem-dashboard-heading .pem-eyebrow{font-size:9px!important;line-height:1.05!important;margin:0!important;padding:0!important}
html.pem-enterprise-ui body.pem-root-view-dashboard #view .pem-dashboard-header .pem-dashboard-heading h1{font-size:22px!important;line-height:1.08!important;font-weight:820!important;letter-spacing:-.04em!important;margin:0!important}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-view .pem-dashboard-content{row-gap:8px!important}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-view .pem-release-dashboard-band{margin:0!important}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-content>.pem-persistent-placeholder:has(+.pem-dashboard-priority-grid){margin-bottom:0!important}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-dashboard-content>.pem-dashboard-analysis-grid{margin-top:4px!important}
html.pem-enterprise-ui body.pem-root-view-dashboard .pem-release-dashboard-band.pem-persistent-block::after{content:"";position:absolute;left:0;right:0;bottom:-8px;height:1px;background:#d3e2f1;pointer-events:none}
}
@media(min-width:901px) and (max-width:1250px){
html.pem-enterprise-ui body.pem-root-view-dashboard #view .pem-dashboard-header .pem-dashboard-heading h1{font-size:20px!important}
}

/* LAB 2026-11-27: Risks header and dashboard-size dynamic KPIs. */
html.pem-enterprise-ui .pem-risks-view .pem-release-page-header-main{max-width:none!important}
html.pem-enterprise-ui .pem-risks-view .pem-risk-header-detail{
 grid-column:1/-1!important;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
 align-items:center;gap:10px;min-width:0;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-header-detail>p{
 grid-column:1!important;min-width:0!important;max-width:none!important;margin:0!important;
 white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-header-detail>.pem-risk-period-total{
 position:static!important;transform:none!important;margin:0!important;grid-column:2;justify-self:center;
 min-height:27px;padding:3px 10px;
}
html.pem-enterprise-ui .pem-risks-view [data-risk-summary] .pem-risk-six-cards{
 justify-content:start!important;gap:8px!important;
}
html.pem-enterprise-ui .pem-risks-view [data-risk-summary] .pem-risk-six-cards>.pem-summary-metric{
 box-sizing:border-box!important;height:76px!important;min-height:76px!important;
 padding:7px 9px 6px!important;
}
html.pem-enterprise-ui body #view .pem-risks-view [data-risk-summary] .pem-risk-six-cards>.pem-summary-metric>b{
 font-size:25px!important;
}
@media(min-width:1181px){
 html.pem-enterprise-ui .pem-risks-view [data-risk-summary] .pem-risk-six-cards{
  width:calc(100% - max(280px,31%) - 12px)!important;max-width:100%!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
 }
 html.pem-enterprise-ui .pem-risks-view [data-risk-summary] [data-risk-block="initial"] .pem-risk-six-cards{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
 }
}
@media(max-width:1050px){
 html.pem-enterprise-ui .pem-risks-view .pem-risk-header-detail{
  grid-template-columns:minmax(0,1fr) auto;
 }
}
@media(max-width:760px){
 html.pem-enterprise-ui .pem-risks-view .pem-risk-header-detail{grid-template-columns:minmax(0,1fr)}
 html.pem-enterprise-ui .pem-risks-view .pem-risk-header-detail>.pem-risk-period-total{grid-column:1;justify-self:start;max-width:100%}
}

/* Risks: preserve the original action button and show the complete description on hover/focus. */
html.pem-enterprise-ui .pem-risks-view .pem-release-page-header>a.btn.primary{
 flex:0 0 auto!important;width:auto!important;min-width:max-content!important;white-space:nowrap!important;
}
html.pem-enterprise-ui .pem-risks-view .pem-release-page-header,
html.pem-enterprise-ui .pem-risks-view .pem-release-page-header-main,
html.pem-enterprise-ui .pem-risks-view .pem-risk-header-detail{overflow:visible!important}
html.pem-enterprise-ui .pem-risks-view .pem-risk-description{
 grid-column:1;position:relative;min-width:0;max-width:100%;cursor:help;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-description>p{
 min-width:0!important;max-width:100%!important;margin:0!important;
 white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-description-tooltip{
 display:none;position:absolute;top:calc(100% + 6px);left:0;z-index:1200;
 width:max-content;max-width:min(580px,calc(100vw - 48px));box-sizing:border-box;
 background:#fff;color:#10233f;border:1px solid #d3e2f1;border-radius:8px;
 box-shadow:0 5px 16px #10233f26;padding:8px 12px;font-size:13px;line-height:1.4;
 white-space:normal;overflow-wrap:anywhere;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-description:is(:hover,:focus,:focus-within)>.pem-risk-description-tooltip{display:block!important}

/* LAB: risk change donut, aligned with both approved KPI rows. */
html.pem-enterprise-ui .pem-risks-view [data-risk-summary]{
 display:grid!important;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:12px!important;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-levels{display:grid;gap:6px;min-width:0}
html.pem-enterprise-ui .pem-risks-view [data-risk-summary] .pem-risk-levels .pem-risk-six-cards{width:100%!important;max-width:100%!important}
html.pem-enterprise-ui .pem-risks-view .pem-risk-change-chart{
 box-sizing:border-box;min-width:0;margin:0;background:#fff;border:1px solid #d8e5ed;border-radius:10px;
 padding:10px 12px;display:flex;flex-direction:column;justify-content:center;gap:4px;color:#10233f;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-heading h2{font-size:15px!important;line-height:1.2!important;margin:0!important}
html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-heading>span,.pem-risks-view .pem-risk-chart-foot{font-size:10px;color:#52637a;line-height:1.15}
html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-body{display:grid;grid-template-columns:minmax(80px,112px) minmax(0,1fr);align-items:center;gap:8px}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut{position:relative;width:100%;aspect-ratio:1}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut svg{display:block;width:100%;height:100%;overflow:visible}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut svg [data-risk-change]{cursor:pointer}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut-center b{font-size:23px;font-weight:820;line-height:1;color:#10233f}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut-center small{font-size:9px!important;margin:3px 0 0!important;line-height:1}
html.pem-enterprise-ui .pem-risks-view .pem-risk-change-legend{display:grid;gap:3px;min-width:0}
html.pem-enterprise-ui .pem-risks-view button.pem-risk-change-item{
 display:grid;grid-template-columns:9px minmax(0,1fr) auto;align-items:center;text-align:left;gap:5px;
 min-width:0;min-height:23px;height:auto;border:1px solid transparent;border-radius:5px;background:transparent;
 padding:3px 4px;margin:0;color:#24384f;font:inherit;font-size:11px;line-height:1.18;cursor:pointer;
}
html.pem-enterprise-ui .pem-risks-view button.pem-risk-change-item i{width:8px;height:8px;border-radius:2px}
html.pem-enterprise-ui .pem-risks-view button.pem-risk-change-item span{white-space:normal;overflow-wrap:anywhere}
html.pem-enterprise-ui .pem-risks-view button.pem-risk-change-item b{font-size:14px;font-variant-numeric:tabular-nums}
html.pem-enterprise-ui .pem-risks-view button.pem-risk-change-item:is(:hover,:focus-visible,[aria-pressed="true"]){border-color:#a9c8e4;background:#edf5fc}
html.pem-enterprise-ui .pem-risks-view button.pem-risk-change-item:disabled{opacity:1;cursor:default}
@media(min-width:1181px){
 html.pem-enterprise-ui .pem-risks-view [data-risk-summary]{grid-template-columns:minmax(0,1fr) max(280px,31%)!important}
}
@media(max-width:760px){html.pem-enterprise-ui .pem-risks-view .pem-risk-change-chart{max-width:100%}}

/* LAB: risk chart top alignment with first KPI row. */
@media(min-width:1181px){
html.pem-enterprise-ui .pem-risks-view .pem-risk-change-chart{
 margin-top:22.2px;align-self:stretch;min-height:0;padding:6px 10px;gap:3px;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-body{
 grid-template-columns:minmax(72px,96px) minmax(0,1fr);gap:7px;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-change-legend{gap:2px}
html.pem-enterprise-ui .pem-risks-view button.pem-risk-change-item{min-height:20px;padding:1px 4px}
}

/* LAB: inline risk chart subtitle; retain emphasis on the donut. */
html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-heading{
 display:flex;align-items:baseline;justify-content:space-between;gap:6px;flex-wrap:wrap;min-width:0;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-heading h2{
 font-size:14px!important;line-height:1.15!important;white-space:nowrap;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-heading>span{
 font-size:10px;white-space:nowrap;
}

/* LAB: risk donut visual prominence. */
html.pem-enterprise-ui .pem-risks-view .pem-risk-change-chart{
 justify-content:flex-start;gap:3px;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-body{
 flex:1 1 auto;min-height:0;align-content:center;justify-content:center;
 grid-template-columns:minmax(96px,148px) minmax(0,max-content);
 column-gap:10px;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut{
 width:100%;max-height:148px;aspect-ratio:1;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut svg{
 width:100%;height:100%;overflow:visible;
}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut-center b{font-size:28px}
html.pem-enterprise-ui .pem-risks-view .pem-risk-donut-center small{font-size:11px!important}
html.pem-enterprise-ui .pem-risks-view .pem-risk-change-legend{
 align-self:center;justify-self:center;gap:4px;width:100%;max-width:190px;
}
html.pem-enterprise-ui .pem-risks-view button.pem-risk-change-item{
 font-size:12px;min-height:23px;padding:2px 3px;
}
@media(min-width:1181px){
 html.pem-enterprise-ui .pem-risks-view .pem-risk-change-chart{
  padding:5px 8px;min-height:0;
 }
 html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-body{
  grid-template-columns:minmax(90px,148px) minmax(0,max-content);
 }
}
@media(max-width:480px){
 html.pem-enterprise-ui .pem-risks-view .pem-risk-chart-body{grid-template-columns:minmax(80px,120px) minmax(0,1fr);column-gap:6px}
}

/* LAB: compact Risks filter bar. */
@media(min-width:761px){
html.pem-enterprise-ui body .pem-risks-view .pem-record-filter-bar{
 padding:5px 9px!important;gap:7px!important;align-items:flex-end!important;
}
html.pem-enterprise-ui body .pem-risks-view .pem-record-filter-bar>label{
 font-size:10.5px!important;line-height:1.15!important;gap:3px!important;
}
html.pem-enterprise-ui body .pem-risks-view .pem-record-filter-bar :is(input:not([type="checkbox"]):not([type="radio"]),select){
 box-sizing:border-box!important;height:32px!important;min-height:32px!important;
 padding-top:3px!important;padding-bottom:3px!important;font-size:12px!important;
}
html.pem-enterprise-ui body .pem-risks-view .pem-record-filter-bar .pem-risk-filter-clear{
 box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;
 justify-content:center!important;align-self:flex-end!important;height:32px!important;
 min-height:32px!important;padding:3px 8px!important;font-size:11px!important;
}
}

/* LAB: Events header, dashboard-size metrics, dynamic type chart and compact table. */
html.pem-enterprise-ui body .pem-cases-view .pem-release-page-header-main{max-width:none!important;overflow:visible!important}
html.pem-enterprise-ui body .pem-cases-view .pem-release-page-header{padding-bottom:5px!important;margin-bottom:4px!important;overflow:visible!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-header-detail{grid-column:1/-1!important;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:10px;align-items:center;min-width:0}
html.pem-enterprise-ui body .pem-cases-view .pem-case-description{position:relative;min-width:0;cursor:help}
html.pem-enterprise-ui body .pem-cases-view .pem-case-description>p{margin:0!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-tooltip{display:none;position:absolute;left:0;top:calc(100% + 5px);z-index:1200;max-width:min(580px,calc(100vw - 48px));width:max-content;padding:8px 12px;background:#fff;color:#10233f;border:1px solid #d3e2f1;border-radius:8px;box-shadow:0 5px 16px #10233f26;font-size:13px;line-height:1.4;white-space:normal}
html.pem-enterprise-ui body .pem-cases-view .pem-case-description:is(:hover,:focus,:focus-within)>.pem-case-tooltip{display:block!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-period-total{display:flex!important;align-items:center;gap:10px;justify-content:space-between;min-height:27px;height:auto!important;margin:0!important;padding:3px 10px!important;border:1px solid #d8e5ed!important;border-radius:9px!important;background:#eef4f8!important;color:#244568!important;font-size:12px!important;font-weight:700!important;white-space:nowrap;cursor:pointer}
html.pem-enterprise-ui body .pem-cases-view .pem-case-period-total strong{font-size:20px;line-height:1;color:#0b73e0;font-weight:820}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary.pem-record-summary-five{display:grid!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;gap:8px!important;width:100%!important;max-width:100%!important;justify-content:start!important;grid-template-columns:repeat(5,minmax(0,1fr))!important}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric{box-sizing:border-box!important;height:76px!important;min-height:76px!important;max-height:76px!important;padding:7px 9px 6px!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;display:grid!important;grid-template-rows:auto 1fr auto!important;align-items:center!important}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric>span{font-size:11px!important;line-height:1.15!important}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric>b{font-size:25px!important;line-height:1!important;margin:0!important;text-align:center!important}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric>small{font-size:10px!important;line-height:1.15!important;margin:0!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-chart{grid-column:1/-1;box-sizing:border-box;min-width:0;width:100%;max-width:315px;justify-self:center;background:#fff;border:1px solid #d8e5ed;border-radius:10px;padding:3px 12px 5px;display:flex;flex-direction:column;justify-content:center;gap:2px;color:#10233f}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-chart h2{font-size:11.5px!important;line-height:12px!important;text-align:center;margin:0!important;font-weight:750}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-bars{display:grid;gap:1px;min-width:0}
html.pem-enterprise-ui body .pem-cases-view button.pem-case-type-row{display:grid!important;grid-template-columns:87px minmax(0,1fr) 18px;align-items:center;gap:5px;width:100%;min-width:0!important;min-height:0!important;height:11px!important;max-height:11px!important;padding:0 1px!important;margin:0!important;line-height:11px!important;font-size:10px!important;text-align:left;background:transparent;border:0;border-radius:3px;color:#38506b;cursor:pointer}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-row>span:first-child{white-space:nowrap}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-row>b{font-size:11px!important;line-height:1;text-align:right;margin:0!important;color:#17365a}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-track{height:7px;background:#edf1f5;border-radius:3px;overflow:hidden}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-track>i{display:block;height:100%;border-radius:3px}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-row:is(:hover,:focus-visible,[aria-pressed="true"]){background:#e6eff9;outline:1px solid #739bc5}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-row:disabled{opacity:1;cursor:default}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-chart.has-other .pem-case-type-row{height:10px!important;max-height:10px!important;line-height:10px!important}
@media(min-width:1181px){
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary.pem-record-summary-five{grid-template-columns:repeat(5,minmax(0,calc((100% - max(280px,31%) - 44px)/5))) minmax(0,1fr)!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-chart{grid-column:6;height:76px;min-height:76px;max-height:76px}
}
@media(min-width:761px){
html.pem-enterprise-ui body .pem-cases-view .pem-record-filter-bar{padding:5px 9px!important;gap:7px!important;align-items:flex-end!important;margin:0!important}
html.pem-enterprise-ui body .pem-cases-view .pem-record-filter-bar label{font-size:10.5px!important;line-height:1.15!important;gap:3px!important}
html.pem-enterprise-ui body .pem-cases-view .pem-record-filter-bar :is(input:not([type="checkbox"]):not([type="radio"]),select){box-sizing:border-box!important;height:32px!important;min-height:32px!important;padding-top:3px!important;padding-bottom:3px!important;font-size:12px!important}
html.pem-enterprise-ui body .pem-cases-view .pem-record-filter-bar .pem-case-filter-clear{box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;align-self:flex-end!important;height:32px!important;min-height:32px!important;padding:3px 8px!important;font-size:11px!important}
html.pem-enterprise-ui body .pem-cases-view{row-gap:5px!important}
html.pem-enterprise-ui body .pem-cases-view>.table-wrap{margin:15px 0 0!important;max-height:calc(100vh - 270px)}
html.pem-enterprise-ui body .pem-cases-view .table-wrap thead th{position:sticky!important;top:0!important;z-index:2;background:#f4f7fB!important;padding:6px 8px!important;font-size:12px!important;line-height:1.2!important;height:auto!important;min-height:0!important;white-space:normal!important}
html.pem-enterprise-ui body .pem-cases-view .table-wrap tbody td{padding:6px 8px!important;font-size:12px!important;line-height:1.25!important;vertical-align:middle!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-quick-links{margin-top:3px!important;gap:0!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-quick-links a{font-size:10px!important;font-weight:600!important;color:#365f85!important;line-height:1.15!important;text-decoration:underline!important}
}
html.pem-enterprise-ui body .pem-cases-view .pem-case-description-cell{min-width:0;cursor:help;color:inherit;font-weight:400!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-description-cell>span{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;font-weight:400!important;line-height:1.3!important;overflow-wrap:anywhere}
@media(max-width:1180px){
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary.pem-record-summary-five{grid-template-columns:repeat(3,minmax(0,1fr))!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-chart{min-height:106px;max-width:380px}
html.pem-enterprise-ui body .pem-cases-view button.pem-case-type-row{height:17px!important;max-height:17px!important;line-height:17px!important;font-size:12px!important}
}
@media(max-width:760px){
html.pem-enterprise-ui body .pem-cases-view .pem-case-header-detail{grid-template-columns:minmax(0,1fr)}
html.pem-enterprise-ui body .pem-cases-view .pem-case-period-total{justify-self:start;white-space:normal;max-width:100%}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary.pem-record-summary-five{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* Cases: keep the high-potential indicator and fit five status bars. */
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>[data-record-summary-key="hpri"]{border-left:3px solid #b58c46!important}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>[data-record-summary-key="hpri"]>small{font-size:9px!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-chart{height:76px;min-height:76px;max-height:76px;max-width:270px;padding:3px 7px}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-chart h2{font-size:10.5px!important;line-height:12px!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-bars{gap:1px}
html.pem-enterprise-ui body .pem-cases-view button.pem-case-type-row{grid-template-columns:108px minmax(0,1fr) 6ch;gap:4px;height:10px!important;max-height:10px!important;line-height:10px!important;font-size:10px!important}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-track{height:10px}
@media(min-width:1181px){
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary.pem-record-summary-five{
 --pem-case-card-count:4;
 grid-template-columns:repeat(var(--pem-case-card-count),minmax(0,1fr)) minmax(240px,1.6fr)!important;
}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary.pem-record-summary-five:has(>.pem-case-type-chart[data-case-card-count="5"]){--pem-case-card-count:5}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary.pem-record-summary-five:has(>.pem-case-type-chart[data-case-card-count="6"]){--pem-case-card-count:6}
html.pem-enterprise-ui body .pem-cases-view .pem-case-type-chart{grid-column:auto;max-width:none}
}

/* Cases desktop: viewport-fit table is the sole vertical content scroller. */
@media(min-width:901px) and (min-height:500px){
 html.pem-enterprise-ui:has(.pem-cases-view.pem-case-single-scroll),
 html.pem-enterprise-ui body:has(.pem-cases-view.pem-case-single-scroll){overflow-y:hidden!important;height:100dvh!important;overscroll-behavior-y:none}
 html.pem-enterprise-ui body:has(.pem-case-single-scroll) .main,
 html.pem-enterprise-ui body:has(.pem-case-single-scroll) #view{min-height:0!important;overflow:visible!important}
 html.pem-enterprise-ui body .pem-cases-view.pem-case-single-scroll{grid-template-columns:minmax(0,1fr)!important;min-width:0!important}
 html.pem-enterprise-ui body .pem-cases-view.pem-case-single-scroll .table-wrap{
  box-sizing:border-box!important;min-width:0!important;max-width:100%!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain!important;scrollbar-gutter:stable;
 }
}

/* LAB 2026-11-27: one paint-only outline for interactive KPI cards.
   Explicit scopes: no read-only indicators, charts, Escuela or support. */
html.pem-enterprise-ui body .pem-risks-view [data-risk-summary] .pem-risk-six-cards>button.pem-summary-metric[data-risk-card]:is(:hover,:focus-visible,[aria-pressed="true"]),
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric[data-record-summary-key][role="button"]:is(:hover,:focus-visible,[aria-pressed="true"]),
html.pem-enterprise-ui body.pem-route-findings #summary.grid>.metric.pem-clickable-metric[data-pem-finding-metric]:is(:hover,:focus-visible,[aria-pressed="true"]),
html.pem-action-reference #pemActionSummary button.pem-summary-metric[data-action-status-card]:is(:hover,:focus-visible,[aria-pressed="true"]),
html.pem-enterprise-ui body .pem-investigation-workspace #investigationSummary>button.pem-summary-metric[data-inv-status-card]:is(:hover,:focus-visible,[aria-pressed="true"]),
html.pem-enterprise-ui body.pem-route-plan main.shell #summary.kpis>button.kpi[data-plan-status]:is(:hover,:focus-visible,[aria-pressed="true"]){
 background:#edf5ff!important;
 border-color:#2475bb!important;
 box-shadow:inset 0 0 0 2px #2475bb!important;
 outline:none!important;outline-offset:0!important;
 transform:none!important;
}
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric[data-record-summary-key][role="button"],
html.pem-enterprise-ui body .pem-investigation-workspace #investigationSummary>button.pem-summary-metric[data-inv-status-card]{cursor:pointer!important}
html.pem-enterprise-ui body .pem-investigation-workspace #investigationSummary>button.pem-summary-metric[data-inv-status-card]{font-family:inherit;color:inherit}

/* PEM semantic KPI palette 20261127: value colors only, reviewed surfaces. */
html.pem-enterprise-ui body .pem-risks-view .pem-record-summary>.pem-summary-metric.tone-blue>b,
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric.tone-blue>b,
html.pem-action-reference body #pemActionSummary button.pem-summary-metric[data-action-status-card].tone-blue>b,
html.pem-enterprise-ui body .pem-investigation-workspace #investigationSummary>.pem-summary-metric.tone-blue>b,
html.pem-enterprise-ui body #documentOverview .document-metrics>.pem-summary-metric.tone-blue>b,
html.pem-enterprise-ui body .pem-dashboard-view .pem-dashboard-kpis .kpi-grid>.kpi.tone-blue .value,
html.pem-enterprise-ui body.pem-route-plan main.shell #summary.kpis>.kpi[data-plan-status="Planificada"]>b,
html.pem-enterprise-ui body.pem-route-plan main.shell #summary.kpis>.kpi.info:not([data-plan-status])>b,
html.pem-enterprise-ui body.pem-route-inspections #app .inspection-kpis>.inspection-kpi.inspection-kpi--planned>strong,
html.pem-enterprise-ui body main.pem-indicators-flagship .indicator-summary .metric.info>b,
html.pem-enterprise-ui body .pem-risks-view .pem-risk-period-total strong,
html.pem-enterprise-ui body .pem-cases-view .pem-case-period-total strong,
html.pem-action-reference body #pemActionPeriodCount,
html.pem-enterprise-ui body #pemFindingTotalValue,
html.pem-enterprise-ui body #investigationTotal,
html.pem-enterprise-ui body #documentTotal,
html.pem-enterprise-ui body #pemPlanPeriodTotalValue,
html.pem-enterprise-ui body.pem-route-work-permits .wp-list-header .wp-period-total strong,
html.pem-enterprise-ui body.pem-route-inspections #app .inspection-total strong,
html.pem-enterprise-ui body #mocWorkspace .moc-ui-total strong{color:#2465a4!important}
html.pem-enterprise-ui body .pem-risks-view .pem-record-summary>.pem-summary-metric.tone-green>b,
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric.tone-green>b,
html.pem-action-reference body #pemActionSummary button.pem-summary-metric[data-action-status-card].tone-green>b,
html.pem-enterprise-ui body .pem-investigation-workspace #investigationSummary>.pem-summary-metric.tone-green>b,
html.pem-enterprise-ui body #documentOverview .document-metrics>.pem-summary-metric.tone-green>b,
html.pem-enterprise-ui body .pem-dashboard-view .pem-dashboard-kpis .kpi-grid>.kpi.tone-green .value,
html.pem-enterprise-ui body.pem-route-work-permits .wp-list-header #permitSummary>button.wp-summary-tile[data-summary="EXECUTION"]>strong,
html.pem-enterprise-ui body.pem-route-work-permits .wp-list-header #permitSummary>button.wp-summary-tile[data-summary="CLOSED"]>strong,
html.pem-enterprise-ui body.pem-route-plan main.shell #summary.kpis>.kpi[data-plan-status="Completada"]>b,
html.pem-enterprise-ui body.pem-route-inspections #app .inspection-kpis>.inspection-kpi.inspection-kpi--completed>strong,
html.pem-enterprise-ui body.pem-route-inspections #app .inspection-kpis>.inspection-kpi.inspection-kpi--conformity>strong,
html.pem-enterprise-ui body.moc-ui-view-overview #mocWorkspace .moc-ui-kpi[data-moc-kpi="approved"]>strong,
html.pem-enterprise-ui body.moc-ui-view-overview #mocWorkspace .moc-ui-kpi[data-moc-kpi="closed"]>strong,
html.pem-enterprise-ui body main.pem-indicators-flagship .indicator-summary .metric.ok>b{color:#117047!important}
html.pem-enterprise-ui body .pem-risks-view .pem-record-summary>.pem-summary-metric.tone-red>b,
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric.tone-red>b,
html.pem-action-reference body #pemActionSummary button.pem-summary-metric[data-action-status-card].tone-red>b,
html.pem-enterprise-ui body .pem-investigation-workspace #investigationSummary>.pem-summary-metric.tone-red>b,
html.pem-enterprise-ui body #documentOverview .document-metrics>.pem-summary-metric.tone-red>b,
html.pem-enterprise-ui body .pem-dashboard-view .pem-dashboard-kpis .kpi-grid>.kpi.tone-red .value,
html.pem-enterprise-ui body.pem-route-work-permits .wp-list-header #permitSummary>button.wp-summary-tile[data-summary="EXPIRED"]>strong,
html.pem-enterprise-ui body.pem-route-work-permits .wp-list-header #permitSummary>button.wp-summary-tile[data-summary="NOT_APPROVED"]>strong,
html.pem-enterprise-ui body.pem-route-plan main.shell #summary.kpis>.kpi[data-plan-status="Vencida"]>b,
html.pem-enterprise-ui body.pem-route-inspections #app .inspection-kpis>.inspection-kpi.inspection-kpi--findings>strong,
html.pem-enterprise-ui body main.pem-indicators-flagship .indicator-summary .metric.alert>b{color:#b42318!important}
html.pem-enterprise-ui body .pem-risks-view .pem-record-summary>.pem-summary-metric.tone-orange>b,
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric.tone-orange>b,
html.pem-action-reference body #pemActionSummary button.pem-summary-metric[data-action-status-card].tone-orange>b,
html.pem-enterprise-ui body .pem-investigation-workspace #investigationSummary>.pem-summary-metric.tone-orange>b,
html.pem-enterprise-ui body #documentOverview .document-metrics>.pem-summary-metric.tone-orange>b,
html.pem-enterprise-ui body .pem-dashboard-view .pem-dashboard-kpis .kpi-grid>.kpi.tone-orange .value,
html.pem-enterprise-ui body.pem-route-work-permits .wp-list-header #permitSummary>button.wp-summary-tile[data-summary="APPROVAL"]>strong,
html.pem-enterprise-ui body.pem-route-work-permits .wp-list-header #permitSummary>button.wp-summary-tile[data-summary="ATTENTION"]>strong,
html.pem-enterprise-ui body.pem-route-plan main.shell #summary.kpis>.kpi[data-plan-status="Próxima"]>b,
html.pem-enterprise-ui body.pem-route-plan main.shell #summary.kpis>.kpi[data-plan-status="En curso"]>b,
html.pem-enterprise-ui body.pem-route-plan main.shell #summary.kpis>.kpi[data-plan-status="Bloqueada"]>b,
html.pem-enterprise-ui body.pem-route-inspections #app .inspection-kpis>.inspection-kpi.inspection-kpi--pending>strong,
html.pem-enterprise-ui body.pem-route-inspections #app .inspection-kpis>.inspection-kpi.inspection-kpi--in-progress>strong,
html.pem-enterprise-ui body.moc-ui-view-overview #mocWorkspace .moc-ui-kpi[data-moc-kpi="approval"]>strong,
html.pem-enterprise-ui body.moc-ui-view-overview #mocWorkspace .moc-ui-kpi[data-moc-kpi="verification"]>strong,
html.pem-enterprise-ui body main.pem-indicators-flagship .indicator-summary .metric.warn>b{color:#956000!important}
html.pem-enterprise-ui body .pem-risks-view .pem-record-summary>.pem-summary-metric.tone-neutral>b,
html.pem-enterprise-ui body .pem-cases-view .pem-record-summary>.pem-summary-metric.tone-neutral>b,
html.pem-action-reference body #pemActionSummary button.pem-summary-metric[data-action-status-card].tone-neutral>b,
html.pem-enterprise-ui body .pem-investigation-workspace #investigationSummary>.pem-summary-metric.tone-neutral>b,
html.pem-enterprise-ui body #documentOverview .document-metrics>.pem-summary-metric.tone-neutral>b,
html.pem-enterprise-ui body .pem-dashboard-view .pem-dashboard-kpis .kpi-grid>.kpi.tone-neutral .value,
html.pem-enterprise-ui body.pem-route-work-permits .wp-list-header #permitSummary>button.wp-summary-tile[data-summary="DRAFTS"]>strong,
html.pem-enterprise-ui body.moc-ui-view-overview #mocWorkspace .moc-ui-kpi[data-moc-kpi="preparation"]>strong,
html.pem-enterprise-ui body main.pem-indicators-flagship .indicator-summary .metric.pem-motion-neutral>b{color:#596c83!important}
html.pem-action-reference body #pemActionSummary button.pem-summary-metric[data-action-status-card="due:needs_review"].tone-red>b{color:#956000!important}

/* Sidebar high contrast and Home dock. */
html.pem-enterprise-ui body :is(.sidebar,.pem-global-sidebar)
  :is(.pem-release-nav-group-toggle,.pem-nav-group-toggle):not(:hover):not(:focus-visible){
  color:#f5f9ff!important;
}
html.pem-enterprise-ui body :is(.sidebar,.pem-global-sidebar) .pem-release-nav-chevron{
  font-size:20px!important;
}
html.pem-enterprise-ui body :is(.sidebar,.pem-global-sidebar)
  .pem-nav-group-chevron .pem-enterprise-icon{
  width:16px;height:16px;
}
html.pem-enterprise-ui body :is(.sidebar,.pem-global-sidebar) .pem-release-nav-group-items
  :is(.nav-btn,.pem-global-link):not(.active):not([aria-current=page]):not(:hover):not(:focus-visible)
  >span:last-child,
html.pem-enterprise-ui body :is(.sidebar,.pem-global-sidebar)
  >.pem-sidebar-home-link:not(.active):not([aria-current=page]):not(:hover):not(:focus-visible)>span:last-child{
  color:#dde9f8!important;
}
html.pem-enterprise-ui body :is(.sidebar,.pem-global-sidebar)>.pem-sidebar-home-link{
  min-height:40px!important;
  border:1px solid #889bb3!important;
  border-radius:8px!important;
}
html.pem-enterprise-ui body :is(.sidebar,.pem-global-sidebar)>.pem-sidebar-home-link>span:last-child{
  font-size:15px!important;
}
html.pem-enterprise-ui body :is(.sidebar,.pem-global-sidebar)>.pem-sidebar-home-link
  >:is(.nav-icon,.pem-nav-icon){
  font-size:20px!important;
  line-height:1!important;
}
html.pem-enterprise-ui body :is(.sidebar,.pem-global-sidebar)>.pem-sidebar-home-link
  :is(svg,.pem-enterprise-icon){
  width:20px!important;height:20px!important;
}

/* Referencia de listados: separación simétrica de 8 px alrededor de los filtros. */
html.pem-enterprise-ui #view .pem-risks-view{row-gap:8px!important}
html.pem-enterprise-ui #view .pem-risks-view > [data-risk-summary],
html.pem-enterprise-ui #view .pem-risks-view > .pem-record-filter-bar,
html.pem-enterprise-ui #view .pem-risks-view > .pem-risk-navigation{margin-block:0!important}
html.pem-enterprise-ui #view .pem-risks-view > .pem-record-filter-bar + .table-wrap{margin-block-start:0!important}
html.pem-enterprise-ui #view .pem-risks-view > .pem-risk-navigation + .table-wrap{margin-block-start:-6px!important}

/* PEM LIST FILTER CONTRACT 20261129. Only list/filter controls, not
   data-entry forms, selectors of participants, global search or permissions. */
html body :is(.pem-record-filter-bar,.moc-ui-filters,#filters.wp-filters,.inspection-unified-filters,.mh-filter-grid,#pemFindingFilters,#pemActionFilters,.pem-plan-filter-grid,.contractors-filters,#purchaseFilters,.training-standard-filter,#ppeHistoryFilters,#ppeCatalogFilters,.dossier-toolbar,.audit-period-controls,.pem-users-search,#cmDirectoryFilters,#reviewFilters,.pem-dashboard-filter-bar,.pem-report-summary-card>.filters,.indicator-head){gap:8px!important}
html body :is(.pem-record-filter-bar,.moc-ui-filters,#filters.wp-filters,.inspection-unified-filters,.mh-filter-grid,#pemFindingFilters,#pemActionFilters,.pem-plan-filter-grid,.contractors-filters,#purchaseFilters,.training-standard-filter,#ppeHistoryFilters,#ppeCatalogFilters,.dossier-toolbar,.audit-period-controls,.pem-users-search,#cmDirectoryFilters,#reviewFilters,.pem-dashboard-filter-bar,.pem-report-summary-card>.filters,.indicator-head) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),select){
 box-sizing:border-box!important;height:32px!important;min-height:32px!important;max-height:32px!important;
 block-size:32px!important;min-block-size:32px!important;max-block-size:32px!important;
 font-size:12px!important;padding-block:3px!important;min-width:0!important
}
html body :is(.pem-record-filter-bar,.moc-ui-filters,#filters.wp-filters,.inspection-unified-filters,.mh-filter-grid,#pemFindingFilters,#pemActionFilters,.pem-plan-filter-grid,.contractors-filters,#purchaseFilters,.training-standard-filter,#ppeHistoryFilters,#ppeCatalogFilters,.dossier-toolbar,.audit-period-controls,.pem-users-search,#cmDirectoryFilters,#reviewFilters,.pem-dashboard-filter-bar,.pem-report-summary-card>.filters,.indicator-head) label{gap:3px!important;font-size:10.5px!important;line-height:1.2!important}
html.pem-enterprise-ui body :is(main,#view,#app,#purchaseWorkspace) :is(.pem-risk-filter-clear,.pem-case-filter-clear,[data-dashboard-clear],.inspection-filter-clear,#mocUiReset,#clearPermitFilters,#pemFindingClear,#pemActionClear,#pemPlanClear,#mhClear,#cmResetFilters,#cmDirectoryClear,#clearContractorFilters,#purchaseClear,#clearDocumentFilters,#clearInvestigationFilters,#clearLegalFilters,#competencyClear,#competencyPeopleClear,#workRequirementClear,.clearance-clear,.training-clear,#ppeClearFilters,#ppeCatalogClear,#clearPeople,#clearDocuments,#clearUserSearch,#clearReviewFilters,#auditClearFilters,#reportClearFilters,#indicatorClearFilters){
 box-sizing:border-box!important;display:inline-flex;align-items:center!important;justify-content:center!important;
 flex:0 0 auto!important;min-width:120px!important;width:120px!important;max-width:120px!important;
 height:32px!important;min-height:32px!important;max-height:32px!important;
 block-size:32px!important;min-block-size:32px!important;max-block-size:32px!important;
 padding:3px 7px!important;border:1px solid #c9dcf6!important;border-radius:8px!important;
 font-size:11px!important;font-weight:700!important;line-height:1.2!important;white-space:nowrap!important;text-decoration:none!important;
 opacity:1!important
}
html.pem-enterprise-ui body :is(main,#view,#app,#purchaseWorkspace) :is(.pem-risk-filter-clear,.pem-case-filter-clear,[data-dashboard-clear],.inspection-filter-clear,#mocUiReset,#clearPermitFilters,#pemFindingClear,#pemActionClear,#pemPlanClear,#mhClear,#cmResetFilters,#cmDirectoryClear,#clearContractorFilters,#purchaseClear,#clearDocumentFilters,#clearInvestigationFilters,#clearLegalFilters,#competencyClear,#competencyPeopleClear,#workRequirementClear,.clearance-clear,.training-clear,#ppeClearFilters,#ppeCatalogClear,#clearPeople,#clearDocuments,#clearUserSearch,#clearReviewFilters,#auditClearFilters,#reportClearFilters,#indicatorClearFilters):is(:disabled,[aria-disabled="true"]){
 background:#edf5ff!important;border-color:#c9dcf6!important;color:#0b73e0!important;cursor:default!important
}
html.pem-enterprise-ui body :is(main,#view,#app,#purchaseWorkspace) :is(.pem-risk-filter-clear,.pem-case-filter-clear,[data-dashboard-clear],.inspection-filter-clear,#mocUiReset,#clearPermitFilters,#pemFindingClear,#pemActionClear,#pemPlanClear,#mhClear,#cmResetFilters,#cmDirectoryClear,#clearContractorFilters,#purchaseClear,#clearDocumentFilters,#clearInvestigationFilters,#clearLegalFilters,#competencyClear,#competencyPeopleClear,#workRequirementClear,.clearance-clear,.training-clear,#ppeClearFilters,#ppeCatalogClear,#clearPeople,#clearDocuments,#clearUserSearch,#clearReviewFilters,#auditClearFilters,#reportClearFilters,#indicatorClearFilters):not(:disabled):not([aria-disabled="true"]){
 background:#fff1f0!important;border-color:#ebc0bb!important;color:#b42318!important;cursor:pointer
}
html.pem-enterprise-ui body :is(main,#view,#app,#purchaseWorkspace) :is(.pem-risk-filter-clear,.pem-case-filter-clear,[data-dashboard-clear],.inspection-filter-clear,#mocUiReset,#clearPermitFilters,#pemFindingClear,#pemActionClear,#pemPlanClear,#mhClear,#cmResetFilters,#cmDirectoryClear,#clearContractorFilters,#purchaseClear,#clearDocumentFilters,#clearInvestigationFilters,#clearLegalFilters,#competencyClear,#competencyPeopleClear,#workRequirementClear,.clearance-clear,.training-clear,#ppeClearFilters,#ppeCatalogClear,#clearPeople,#clearDocuments,#clearUserSearch,#clearReviewFilters,#auditClearFilters,#reportClearFilters,#indicatorClearFilters):not(:disabled):not([aria-disabled="true"]):hover{
 background:#ffe4e1!important;border-color:#b42318!important
}
@media(min-width:901px){
 html body :is(.pem-record-filter-bar,.moc-ui-filters,#filters.wp-filters,.inspection-unified-filters,.mh-filter-grid,#pemFindingFilters,#pemActionFilters,.pem-plan-filter-grid,.contractors-filters,#purchaseFilters,.training-standard-filter,#ppeHistoryFilters,#ppeCatalogFilters,.dossier-toolbar,.audit-period-controls,.pem-users-search,#cmDirectoryFilters,#reviewFilters,.pem-dashboard-filter-bar,.pem-report-summary-card>.filters,.indicator-head) label:has(>input[type=search],>input[name=q]){
  flex:0 0 175px!important;width:min(175px,100%)!important;max-width:175px!important;min-width:0!important
 }
 html body :is(.pem-record-filter-bar,.moc-ui-filters,#filters.wp-filters,.inspection-unified-filters,.mh-filter-grid,#pemFindingFilters,#pemActionFilters,.pem-plan-filter-grid,.contractors-filters,#purchaseFilters,.training-standard-filter,#ppeHistoryFilters,#ppeCatalogFilters,.dossier-toolbar,.audit-period-controls,.pem-users-search,#cmDirectoryFilters,#reviewFilters,.pem-dashboard-filter-bar,.pem-report-summary-card>.filters,.indicator-head) :is(input[type=search],input[name=q]){
  width:100%!important;max-width:175px!important;min-width:0!important;box-sizing:border-box!important
 }
 html body :is(#ppeHistoryFilters,#ppeCatalogFilters,.pem-users-search)>input[type=search]{
  flex:0 0 175px!important;width:175px!important;max-width:100%!important
 }
 html body .pem-risks-view .pem-record-filter-bar>.pem-filter-grow{
  flex:0 0 175px!important;width:175px!important;max-width:175px!important;min-width:175px!important
 }
 html body .pem-record-filter-bar:has(.investigation-search)>.investigation-search,
 html body .pem-record-filter-bar:has(.document-search)>.document-search{
  flex:0 0 175px!important;width:175px!important;max-width:175px!important;min-width:0!important
 }
}
@media(max-width:900px){
 html body :is(.pem-record-filter-bar,.moc-ui-filters,#filters.wp-filters,.inspection-unified-filters,.mh-filter-grid,#pemFindingFilters,#pemActionFilters,.pem-plan-filter-grid,.contractors-filters,#purchaseFilters,.training-standard-filter,#ppeHistoryFilters,#ppeCatalogFilters,.dossier-toolbar,.audit-period-controls,.pem-users-search,#cmDirectoryFilters,#reviewFilters,.pem-dashboard-filter-bar,.pem-report-summary-card>.filters,.indicator-head) :is(input[type=search],input[name=q]){width:100%!important;max-width:100%!important}
 html.pem-enterprise-ui body :is(main,#view,#app,#purchaseWorkspace) :is(.pem-risk-filter-clear,.pem-case-filter-clear,[data-dashboard-clear],.inspection-filter-clear,#mocUiReset,#clearPermitFilters,#pemFindingClear,#pemActionClear,#pemPlanClear,#mhClear,#cmResetFilters,#cmDirectoryClear,#clearContractorFilters,#purchaseClear,#clearDocumentFilters,#clearInvestigationFilters,#clearLegalFilters,#competencyClear,#competencyPeopleClear,#workRequirementClear,.clearance-clear,.training-clear,#ppeClearFilters,#ppeCatalogClear,#clearPeople,#clearDocuments,#clearUserSearch,#clearReviewFilters,#auditClearFilters,#reportClearFilters,#indicatorClearFilters){width:auto!important;max-width:100%!important;min-width:112px!important}
}

/* PEM PRIMARY ID STANDARD 20261129. Applies only to explicitly marked
   record identifiers; technical catalog codes and other links are unchanged. */
html body :is(main,#app,#view,#purchaseWorkspace) table:has(>thead>tr>th:first-child[data-pem-primary-id]) > :is(thead,tbody)>tr>:is(th,td):first-child:not([colspan]){
 text-align:left!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important
}
html body :is(main,#app,#view,#purchaseWorkspace) table:has(>thead>tr>th:first-child[data-pem-primary-id]) > tbody>tr>td:first-child:not([colspan]) :is(a,button){
 color:#155d9e!important;font-weight:650!important;text-decoration:none!important;text-align:left!important;
 white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important
}
html body :is(main,#app,#view) .pem-epp-id{
 color:#155d9e!important;font-weight:650!important;text-decoration:none!important;text-align:left!important;
 white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important
}
/* D08: preserve the existing table scroller and keep case states together. */
@media(min-width:901px){
 html.pem-enterprise-ui body .pem-cases-view .pem-record-grid :is(th,td):nth-child(8){white-space:nowrap!important}
 html.pem-enterprise-ui body .pem-cases-view .pem-record-grid td:nth-child(8) .badge{white-space:nowrap!important;overflow-wrap:normal!important}
}


/* Consistent desktop search slot; responsive shrink only when identity needs room. */
@media(min-width:1366px){
 html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar{
  justify-content:flex-start!important;gap:12px!important;padding-inline:20px!important;
 }
 html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar>.search.pem-global-search{
  flex:0 0 560px!important;width:560px!important;max-width:560px!important;min-width:560px!important;margin:0!important;order:0!important;
 }
 /* The fixed page heading already identifies the module. An invisible duplicate
    SPA context must not reserve width or move the global search during scroll. */
 html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar>.pem-spa-context{display:none!important}
 html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar>.search.pem-global-search input{box-sizing:border-box!important;width:100%!important;height:42px!important;min-height:42px!important;max-height:42px!important}
 html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar>.pem-root-company-badge{margin-inline-start:auto!important;min-width:0!important}
 html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar>.top-actions{flex:0 1 auto!important;min-width:0!important}
 html.pem-enterprise-ui body:not(.pem-standalone-shell) .topbar>.pem-nav-geometry-group{margin-inline-start:0!important;flex:0 0 auto!important}
}
html.pem-enterprise-ui .pem-header-description-truncate{
 box-sizing:border-box!important;min-width:0!important;max-width:min(100%,calc((100vw - var(--pem-sidebar-w,252px) - 48px)/2))!important;
 white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
@media(max-width:900px){html.pem-enterprise-ui .pem-header-description-truncate{max-width:100%!important}}
html.pem-enterprise-ui .pem-homologated-total{box-sizing:border-box!important;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:8px!important;width:100%!important;min-height:36px!important;padding:5px 9px!important;border:1px solid #c5d9eb!important;border-radius:8px!important;background:#f5faff!important;color:#145a9d!important;text-align:left!important;font-size:11px!important;font-weight:650!important}
html.pem-enterprise-ui .pem-homologated-total b{font-size:19px!important;line-height:1!important}
html.pem-enterprise-ui .pem-homologated-total:not(:disabled):is(:hover,:focus-visible){box-shadow:inset 0 0 0 2px #2475bb!important;background:#edf5ff!important}

/* Compact authorized-tree/batch searches use the same Hallazgos toolbar geometry. */
html.pem-enterprise-ui .pem-admin-filter{box-sizing:border-box;display:flex!important;flex-wrap:wrap!important;align-items:flex-end!important;gap:8px!important;padding:5px 9px!important;margin:8px 0!important;border:1px solid #d0deed!important;border-radius:9px!important;background:#fff!important}
html.pem-enterprise-ui .pem-admin-filter label{display:grid!important;flex:0 0 175px!important;gap:3px!important;max-width:100%!important;font-size:10.5px!important;line-height:1.15!important;font-weight:700!important;color:#41566f!important}
html.pem-enterprise-ui .pem-admin-filter input[type=search]{box-sizing:border-box!important;width:175px!important;max-width:100%!important;min-width:0!important;height:32px!important;min-height:32px!important;margin:0!important;padding:3px 8px!important;border:1px solid #cbd6e4!important;border-radius:9px!important;background:#fff!important;color:#17365a!important;font-size:12px!important}
html.pem-enterprise-ui .pem-admin-filter button{box-sizing:border-box!important;flex:0 0 120px!important;height:32px!important;min-height:32px!important;margin:0!important;padding:3px 8px!important;font-size:11px!important;white-space:nowrap!important}
html.pem-enterprise-ui .pem-admin-filter button:disabled{color:#0b73e0!important;background:#edf5ff!important;opacity:1!important;border-color:#bad6ff!important}
html.pem-enterprise-ui .pem-admin-filter [role=status]{align-self:center;color:#52637a;font-size:11px}

/* Shared record-grid density, from the work-permit table contract.
   Only homologated grids; do not change regular editor or report preview tables. */
html.pem-enterprise-ui body .pem-record-grid thead th{
 box-sizing:border-box!important;font-size:12px!important;line-height:1.2!important;
 padding:6px 7px!important;height:auto!important;min-height:0!important;
 vertical-align:middle!important;white-space:normal!important;overflow-wrap:normal!important;
}

/* One desktop global search height, including the standalone Users shell. */
@media(min-width:901px){
 html.pem-enterprise-ui body.pem-standalone-shell .pem-global-topbar .pem-global-search input{
  box-sizing:border-box!important;height:42px!important;min-height:42px!important;max-height:42px!important;
 }
}

/* Compact risk status note; never add another row above the scrollable list. */
html.pem-enterprise-ui .pem-risks-view [data-risk-summary] h2{display:flex;align-items:center;gap:8px;min-width:0}
html.pem-enterprise-ui .pem-risks-view .pem-risk-card-note{font-size:11px;font-weight:400;line-height:1.2;color:#526981;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
