/* =========================================================
   TRV V45 · responsive/guide hotfix
   Generated from V44 stable base.
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden}
.trv43-shell,.trv43-content,.trv43-main,.trv43-primary-row,.trv43-nav-row,.trv43-nav-scroll,.trv43-nav{min-width:0!important;max-width:100%!important}
.trv43-main>*{min-width:0!important;max-width:100%!important}
.module-hero,.section,.panel,.module-records,.record44,.record37,.exec40-brief,.exec40-map,.exec40-inbox,.exec40-semaphore,.exec40-payables,.exec40-trend{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}

/* Guide always uses the viewport, never a transformed/scrolling ancestor. */
.guide-shade,.guide-focus,.guide-card{position:fixed!important}
.guide-shade{inset:auto;pointer-events:auto}
.guide-focus{pointer-events:none!important}
.guide-card{z-index:7200!important;box-sizing:border-box!important;max-width:min(440px,calc(100vw - 24px))!important;max-height:calc(100svh - 24px)!important;overflow:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
.guide-card .guide-actions{position:sticky!important;bottom:0!important;z-index:4!important;background:linear-gradient(180deg,rgba(8,18,28,.70),rgba(8,18,28,.98) 32%)!important;padding-bottom:max(14px,env(safe-area-inset-bottom))!important}
html[data-theme="light"] .guide-card .guide-actions{background:linear-gradient(180deg,rgba(248,250,252,.72),rgba(248,250,252,.98) 32%)!important}

/* iPad / compact desktop: avoid the narrow-column collapse seen in V44. */
@media (max-width:1180px){
  .trv43-topbar{height:auto!important;min-height:0!important;position:sticky!important;top:0!important}
  .trv43-primary-row{height:auto!important;min-height:68px!important;grid-template-columns:minmax(0,1fr) auto!important;padding:10px 14px 8px!important;gap:10px!important}
  .trv43-brand{display:none!important}
  .trv43-heading{min-width:0!important}.trv43-heading h1{font-size:24px!important;white-space:normal!important}
  .trv43-quick-actions{min-width:0!important;justify-content:flex-end!important;flex-wrap:wrap!important}
  .trv43-quick-actions .scenario{min-width:190px!important;max-width:360px!important;width:min(38vw,360px)!important}
  .trv43-nav-row{height:auto!important;grid-template-columns:minmax(0,1fr)!important;padding:0 14px 10px!important;gap:8px!important}
  .trv43-nav-scroll{overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch!important;padding-bottom:4px!important}
  .trv43-nav{width:max-content!important;min-width:100%!important;justify-content:flex-start!important}
  .trv43-search{display:none!important}
  .trv43-main{padding:18px 14px 120px!important}
  .module-cluster-popover{position:fixed!important;left:12px!important;right:12px!important;top:146px!important;width:auto!important;max-height:calc(100svh - 170px)!important;overflow:auto!important}
  .module-cluster-grid{grid-template-columns:repeat(4,minmax(105px,1fr))!important}
}

@media (max-width:820px){
  .trv43-primary-row{display:grid!important;grid-template-columns:minmax(0,1fr)!important}
  .trv43-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
  .trv43-heading h1{font-size:22px!important}
  .trv43-quick-actions{justify-content:stretch!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;width:100%!important}
  .trv43-quick-actions .scenario{width:100%!important;min-width:0!important;max-width:none!important}
  .access-user-chip{max-width:170px!important;min-width:0!important}
  .trv43-nav-row{padding-top:4px!important}
  .module-cluster-popover{top:154px!important}
  .module-cluster-grid{grid-template-columns:repeat(3,minmax(92px,1fr))!important;gap:10px!important}
  .guide-card{left:12px!important;right:12px!important;bottom:12px!important;top:auto!important;width:auto!important;max-width:none!important;max-height:min(62svh,620px)!important}
}

@media (max-width:560px){
  .trv43-quick-actions{grid-template-columns:minmax(0,1fr) auto!important}.access-user-chip{grid-column:1/-1!important;justify-self:end!important}
  .module-cluster-grid{grid-template-columns:repeat(2,minmax(100px,1fr))!important}
  .module-cluster-popover{top:196px!important}
  .trv43-main{padding-left:10px!important;padding-right:10px!important}
}
