/* DIAR-6B.2-R3.1.1 — visual stability, fixed sidebar and responsive closure */
html{scrollbar-gutter:stable}
body[data-native-sidebar-page^="diar-"]{overflow-x:hidden!important}
body[data-native-sidebar-page^="diar-"] .elite-shell,
body[data-native-sidebar-page^="diar-"] .elite-main,
body[data-native-sidebar-page^="diar-"] .diar-premium-page,
body[data-native-sidebar-page^="diar-"] .diar-cases-page{min-width:0!important;max-width:none!important}
body[data-native-sidebar-page^="diar-"] .elite-main{overflow-x:clip!important}
body[data-native-sidebar-page^="diar-"] :is(.diar-platform-hero,.diar-premium-module-grid,.diar-module-header,.premium-feature-grid,.premium-workflow,.premium-role-boundaries,.premium-output-grid,.premium-sheet-grid,.executive-dashboard-header,.executive-kpi-strip,.executive-dashboard-grid,.executive-grid-top,.executive-grid-analytics,.cases-filter-primary,.cases-advanced-grid,.cases-kpi-grid)>*{min-width:0}
body[data-native-sidebar-page^="diar-"] :is(.diar-platform-home,.diar-module-shell,.diar-executive-dashboard,.diar-cases-page){width:100%!important;max-width:none!important}
body[data-native-sidebar-page^="diar-"] :is(h1,h2,h3,p,strong,span,small,em,dd,dt){overflow-wrap:anywhere}

/* P0: sidebar is anchored to the viewport; page content scroll never moves it. */
@media (min-width:761px){
  html[dir="ltr"] body[data-native-sidebar-page^="diar-"] .elite-shell[data-native-shell-contract="R4"]>.elite-sidebar[data-native-sidebar-contract="R4"]{position:fixed!important;inset:0 auto 0 0!important}
  html[dir="rtl"] body[data-native-sidebar-page^="diar-"] .elite-shell[data-native-shell-contract="R4"]>.elite-sidebar[data-native-sidebar-contract="R4"]{position:fixed!important;inset:0 0 0 auto!important}
  body[data-native-sidebar-page^="diar-"] .elite-shell[data-native-shell-contract="R4"]>.elite-sidebar[data-native-sidebar-contract="R4"]{height:100dvh!important;max-height:100dvh!important;transform:none!important;translate:none!important;contain:layout paint;will-change:auto}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav{overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:stable!important;overscroll-behavior:contain!important;scroll-behavior:auto!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav::-webkit-scrollbar{display:block!important;width:6px!important;height:6px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav::-webkit-scrollbar-thumb{background:rgba(91,111,136,.25)!important;border-radius:999px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav::-webkit-scrollbar-track{background:transparent!important}

  /* Neutralize native dynamic density classes so class recalculation cannot resize the menu. */
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .elite-brand,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .elite-brand,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .elite-brand{min-height:76px!important;margin:8px 9px 6px!important;padding:8px 9px!important;border-radius:17px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .elite-brand-mark,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .elite-brand-mark{width:48px!important;height:48px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .elite-brand strong,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .elite-brand strong,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .elite-brand strong{font-size:20px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .elite-brand small,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .elite-brand small,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .elite-brand small{font-size:10.5px!important;line-height:1.25!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .native-nav,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .native-nav{padding:3px 8px 8px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav-group,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .native-nav-group,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .native-nav-group{margin-bottom:4px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav-group-toggle,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .native-nav-group-toggle,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .native-nav-group-toggle{min-height:43px!important;grid-template-columns:32px minmax(0,1fr) 23px 13px!important;padding:4px 7px!important;gap:6px!important;border-radius:14px!important;transform:none!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav-group-icon,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .native-nav-group-icon,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .native-nav-group-icon{width:31px!important;height:31px!important;border-radius:10px!important;font-size:14px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav-group-toggle b,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .native-nav-group-toggle b,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .native-nav-group-toggle b{font-size:13px!important;line-height:1.18!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav-count,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .native-nav-count,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .native-nav-count{min-width:22px!important;height:22px!important;padding-inline:5px!important;font-size:10px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav-item,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .native-nav-item,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .native-nav-item{min-height:33px!important;grid-template-columns:26px minmax(0,1fr) 9px!important;padding:3px 6px!important;margin:1px 0!important;border-radius:10px!important;transform:none!important;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav-item:hover{transform:none!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav-item-icon,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .native-nav-item-icon,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .native-nav-item-icon{width:25px!important;height:25px!important;border-radius:8px!important;font-size:11px!important}
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"] .native-nav-item b,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-compact .native-nav-item b,
  body[data-native-sidebar-page^="diar-"] .elite-sidebar[data-native-sidebar-contract="R4"].native-sidebar-height-ultra .native-nav-item b{font-size:11.7px!important;line-height:1.16!important}

  /* Stable, compact top bar. */
  body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium{position:sticky!important;top:0!important;z-index:80!important;min-height:76px!important;max-height:76px!important;margin-bottom:18px!important;gap:12px!important;flex-wrap:nowrap!important;overflow:hidden!important;background:rgba(255,255,255,.97)!important;backdrop-filter:blur(16px)!important}
  body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-title-block{display:none!important}
  body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-branch-select{min-width:180px!important;width:180px!important}
  body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-search{min-width:0!important;max-width:none!important;flex:1 1 auto!important}
  body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-meta{min-width:88px!important}
  body[data-native-sidebar-page^="diar-"] :is(section,article,header,footer,table){scroll-margin-top:90px}
}

/* Portal: two columns on normal desktops; three only on very wide screens. */
body[data-native-sidebar-page="diar-portal"] .diar-platform-hero{grid-template-columns:minmax(0,1fr) 220px!important;gap:20px!important;min-height:240px!important;padding:26px!important}
body[data-native-sidebar-page="diar-portal"] .diar-context-card{grid-column:1/-1!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;align-self:auto!important;padding:15px 18px!important}
body[data-native-sidebar-page="diar-portal"] .diar-context-card dl{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px 18px!important}
body[data-native-sidebar-page="diar-portal"] .diar-context-card dl div{display:grid!important;gap:3px!important;padding:0!important;border:0!important}
body[data-native-sidebar-page="diar-portal"] .diar-context-card dd{text-align:start!important}
body[data-native-sidebar-page="diar-portal"] .diar-premium-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body[data-native-sidebar-page="diar-portal"] .diar-premium-module{min-height:230px!important}
body[data-native-sidebar-page="diar-portal"] .diar-premium-module ul{padding-inline-start:76px!important}
.diar-access-summary-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(420px,1.35fr) auto;gap:20px;align-items:center;padding:22px;border:1px solid var(--diar-line);border-radius:22px;background:#fff;box-shadow:var(--diar-shadow)}
.access-summary-copy h2{margin:5px 0 6px;font-size:24px}.access-summary-copy p{margin:0;color:var(--diar-muted);line-height:1.55}.access-summary-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.access-summary-list a{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;min-width:0;padding:10px;border:1px solid #e0e8f0;border-radius:12px;color:inherit;text-decoration:none;background:#f8fafc}.access-summary-list strong{font-size:12px}.access-summary-list em{color:#08765d;font-size:10px;font-style:normal;font-weight:850}.access-summary-action{display:inline-flex;align-items:center;justify-content:center;min-height:43px;padding:9px 14px;border-radius:11px;background:#edf5fa;color:var(--diar-navy);font-size:12px;font-weight:850;text-decoration:none;white-space:nowrap}

/* Module status is user-facing, never an implementation release code. */
.diar-module-status{display:inline-flex;align-items:center;justify-content:center;width:max-content;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:900}.diar-module-status.is-available{background:#e4f5ef;color:#08745a}.diar-module-status.is-development{background:#fff2d8;color:#916000}

/* Executive dashboard: filters have their own row and KPIs retain readable widths. */
body[data-native-sidebar-page="diar-executive-overview"] .executive-dashboard-header{grid-template-columns:1fr!important;align-items:start!important;padding:24px 26px!important}
body[data-native-sidebar-page="diar-executive-overview"] .executive-dashboard-controls{grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) minmax(170px,1fr) auto!important;width:100%!important;padding-top:17px!important;border-top:1px solid #dfe8f0!important}
body[data-native-sidebar-page="diar-executive-overview"] .executive-kpi-strip{grid-template-columns:repeat(4,minmax(0,1fr))!important}
body[data-native-sidebar-page="diar-executive-overview"] .executive-kpi-card{min-height:108px!important;padding:15px!important}
body[data-native-sidebar-page="diar-executive-overview"] .executive-kpi-card:nth-child(n+5){grid-column:span 1}
body[data-native-sidebar-page="diar-executive-overview"] .executive-grid-top{grid-template-columns:minmax(0,1.15fr) minmax(300px,.82fr)!important}
body[data-native-sidebar-page="diar-executive-overview"] .readiness-card{grid-column:1/-1!important}
body[data-native-sidebar-page="diar-executive-overview"] .executive-grid-analytics{grid-template-columns:minmax(0,1.4fr) minmax(280px,.8fr) minmax(280px,.8fr)!important}

/* Cases: page never owns horizontal scrolling; only the table viewport does. */
body[data-native-sidebar-page="diar-cases"] .diar-cases-page{overflow:visible!important}
body[data-native-sidebar-page="diar-cases"] .cases-hero{grid-template-columns:minmax(0,1fr) 180px!important;overflow:hidden!important}
body[data-native-sidebar-page="diar-cases"] .cases-filter-primary{grid-template-columns:repeat(4,minmax(0,1fr))!important}
body[data-native-sidebar-page="diar-cases"] .cases-search-field{grid-column:auto!important}
body[data-native-sidebar-page="diar-cases"] .cases-advanced-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
body[data-native-sidebar-page="diar-cases"] .cases-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
body[data-native-sidebar-page="diar-cases"] .cases-table-card{min-width:0!important;overflow:hidden!important}
body[data-native-sidebar-page="diar-cases"] .cases-table-wrap{width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-gutter:stable!important;overscroll-behavior-inline:contain!important}
body[data-native-sidebar-page="diar-cases"] .cases-table{width:max-content!important;min-width:1180px!important;max-width:none!important;table-layout:auto!important}
body[data-native-sidebar-page="diar-cases"] .cases-table th,body[data-native-sidebar-page="diar-cases"] .cases-table td{min-width:120px!important;white-space:normal!important}
body[data-native-sidebar-page="diar-cases"] .cases-table th:first-child,body[data-native-sidebar-page="diar-cases"] .cases-table td:first-child{position:sticky;inset-inline-start:0;z-index:2;background:#fff}
body[data-native-sidebar-page="diar-cases"] .cases-table thead th:first-child{z-index:4;background:#285a67}
body[data-native-sidebar-page="diar-cases"] .cases-contract-footer{grid-template-columns:minmax(240px,.8fr) minmax(360px,1.4fr) minmax(110px,.35fr)!important;overflow:hidden!important}
body[data-native-sidebar-page="diar-cases"] .cases-contract-footer strong{font-size:11px!important;overflow-wrap:anywhere!important}
body[data-native-sidebar-page="diar-cases"] .cases-next-phase{grid-column:1/-1!important}

@media (min-width:1760px){
 body[data-native-sidebar-page="diar-portal"] .diar-platform-hero{grid-template-columns:minmax(0,1.3fr) 250px 300px!important}
 body[data-native-sidebar-page="diar-portal"] .diar-context-card{grid-column:auto!important;grid-template-columns:1fr!important;align-self:stretch!important}
 body[data-native-sidebar-page="diar-portal"] .diar-context-card dl{grid-template-columns:1fr!important}
 body[data-native-sidebar-page="diar-portal"] .diar-premium-module-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 body[data-native-sidebar-page="diar-executive-overview"] .executive-kpi-strip{grid-template-columns:repeat(7,minmax(0,1fr))!important}
}
@media (max-width:1280px){
 body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-meta{display:none!important}
 body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium{gap:9px!important;padding-inline:18px!important}
 .diar-access-summary-card{grid-template-columns:1fr!important}.access-summary-list{grid-template-columns:repeat(3,minmax(0,1fr))}.access-summary-action{justify-self:start}
 body[data-native-sidebar-page="diar-executive-overview"] .executive-grid-analytics{grid-template-columns:1fr 1fr!important}.daily-trend-card{grid-column:1/-1!important;grid-row:auto!important}
 body[data-native-sidebar-page="diar-cases"] .cases-filter-primary,body[data-native-sidebar-page="diar-cases"] .cases-advanced-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (min-width:761px) and (max-width:1100px){
 body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;grid-template-rows:auto auto!important;min-height:126px!important;max-height:126px!important;align-content:center!important}
 body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-branch-select{grid-column:1!important;grid-row:1!important;width:auto!important;min-width:0!important}
 body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-lang{grid-column:2!important;grid-row:1!important}
 body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-user{grid-column:3!important;grid-row:1!important}
 body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium .elite-search{grid-column:1/-1!important;grid-row:2!important;width:100%!important}
}
@media (max-width:1000px){
 body[data-native-sidebar-page="diar-portal"] .diar-platform-hero{grid-template-columns:1fr!important}.diar-platform-visual{display:none!important}.diar-context-card{grid-template-columns:1fr!important}.diar-context-card dl{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-native-sidebar-page="diar-portal"] .diar-premium-module-grid{grid-template-columns:1fr!important}
 .access-summary-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-native-sidebar-page="diar-executive-overview"] .executive-dashboard-controls{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-native-sidebar-page="diar-executive-overview"] .executive-kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-native-sidebar-page="diar-executive-overview"] .executive-grid-top,body[data-native-sidebar-page="diar-executive-overview"] .executive-grid-analytics{grid-template-columns:1fr!important}
 body[data-native-sidebar-page="diar-cases"] .cases-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:760px){
 html{scrollbar-gutter:auto}
 body[data-native-sidebar-page^="diar-"] .elite-main{overflow-x:hidden!important}
 body[data-native-sidebar-page^="diar-"] .elite-topbar--diar-premium{position:relative!important;top:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
 body[data-native-sidebar-page="diar-portal"] .diar-platform-hero{padding:19px!important}.diar-context-card dl{grid-template-columns:1fr!important}.diar-premium-module ul{padding-inline-start:20px!important}
 .access-summary-list{grid-template-columns:1fr}.diar-access-summary-card{padding:18px}
 body[data-native-sidebar-page="diar-executive-overview"] .executive-dashboard-controls,body[data-native-sidebar-page="diar-executive-overview"] .executive-kpi-strip{grid-template-columns:1fr!important}
 body[data-native-sidebar-page="diar-cases"] .cases-hero{grid-template-columns:1fr!important}
 body[data-native-sidebar-page="diar-cases"] .cases-filter-primary,body[data-native-sidebar-page="diar-cases"] .cases-advanced-grid,body[data-native-sidebar-page="diar-cases"] .cases-kpi-grid{grid-template-columns:1fr!important}
 body[data-native-sidebar-page="diar-cases"] .cases-contract-footer{grid-template-columns:1fr!important}
}
@media (prefers-reduced-motion:reduce){body[data-native-sidebar-page^="diar-"] *,body[data-native-sidebar-page^="diar-"] *::before,body[data-native-sidebar-page^="diar-"] *::after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}
