/* V307 — black structural surfaces, navy only on standalone functional cards. */
:root{--ba-structural-black:#06090e}
html,body,main.wrap,#client,#coach,#v133Shell,#v133Main,#v133ClientPage,
#v133Shell .v133-content,#clientDashboardPane,#clientProgramPane,#clientTrackingPane,
#clientProfilePane,#clientVideosPane,#clientMessagesPane,#clientNotificationsPane,
#clientDashboardContent,#clientProgramContent,#clientProfileContent,
#clientWorkspace,#resultsPane,#coachResults,#coachProgramCards,#coachPlanningPane,
#client .ba277-tracking-root,#client .ba-free-wrapper{
 background:var(--ba-structural-black)!important;background-color:var(--ba-structural-black)!important;
 background-image:none!important;box-shadow:none!important;
}
/* Structural wrappers which contain multiple independent cards: no enclosing navy block. */
#clientDashboardPane,#clientProgramPane,#clientProfilePane,#clientVideosPane,
#clientMessagesPane,#clientNotificationsPane,#resultsPane,
#client .card:has(> .card),#client .card:has(> section.card),
#coach .card:has(> .card),#coach .card:has(> section.card),
#client #clientDashboardContent > section:has(> .card),
#client #clientDashboardContent > div:has(> .card),
#client #clientProfileContent > section:has(> .card),
#client #clientProfileContent > div:has(> .card),
#client #clientWorkspace > section:has(> .card),
#client #clientWorkspace > div:has(> .card){
 background:var(--ba-structural-black)!important;background-image:none!important;
 border:0!important;box-shadow:none!important;
}
#clientDashboardPane,#clientProgramPane,#clientProfilePane,#clientVideosPane,
#clientMessagesPane,#clientNotificationsPane,#resultsPane{
 padding-left:0!important;padding-right:0!important;
}
/* Keep individual bordered cards in navy: do not recolor leaf .card elements. */
/* Header action buttons: fixed position on right, but no clipping or squeezed text. */
@media(max-width:760px){
 header{width:100%!important;max-width:100%!important;box-sizing:border-box!important;
  padding:12px 12px!important;gap:8px!important;align-items:flex-start!important}
 header>div:first-child{flex:0 1 39%!important;min-width:0!important;max-width:39%!important}
 header .top-actions{flex:1 1 61%!important;max-width:61%!important;min-width:0!important;
  align-items:stretch!important;overflow:visible!important;box-sizing:border-box!important}
 header #v136TopTools,header #ba300ClientTools{width:100%!important;min-width:0!important;max-width:100%!important;overflow:visible!important}
 header #v136TopTools .v136-top-actions,header #ba300ClientTools{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;width:100%!important;max-width:100%!important;
 }
 header #v136TopTools button,header #ba300ClientTools button{
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:auto!important;min-height:44px!important;box-sizing:border-box!important;
  padding:8px 4px!important;display:flex!important;align-items:center!important;
  justify-content:center!important;flex-wrap:wrap!important;gap:3px!important;
  white-space:normal!important;overflow-wrap:anywhere!important;overflow:visible!important;
  text-overflow:clip!important;font-size:clamp(11px,2.9vw,14px)!important;
  line-height:1.25!important;text-align:center!important;border-radius:12px!important;
 }
}
/* Personal workout is a separate full-screen workflow: hide all persistent nav while active. */
body.ba-free-session-active #baMobileClientNav,
body.ba-free-session-active .ba-mobile-client-nav,
body.ba-free-session-active #coachWorkspaceNav,
body:has(#baFreeOverlay) #baMobileClientNav,
body:has(#baFreeOverlay) .ba-mobile-client-nav,
body:has(#baFreeOverlay) #coachWorkspaceNav{display:none!important;visibility:hidden!important;pointer-events:none!important}
body.ba-free-session-active #baFreeOverlay,body:has(#baFreeOverlay) #baFreeOverlay{z-index:10050!important}
