/* FITPLAN V787 - White label audit: brand shell, sidebar footer, topbar and custom logos.
   This file is loaded last and removes legacy hard-coded FitPlan colors from the brand chrome. */

/* Sidebar itself must be a theme surface, never a fixed dark green/black shell. */
.coach-ux-v769 .sidebar{
  background:
    linear-gradient(180deg,
      color-mix(in srgb,var(--theme-surface) 96%,var(--theme-primary) 4%),
      var(--theme-surface))!important;
  border-color:var(--theme-text-09)!important;
  color:var(--theme-text)!important;
  box-shadow:0 18px 48px var(--theme-text-09)!important;
}

/* Large coach identity card in the sidebar. */
.coach-ux-v769 .sidebar .side-brand{
  border:1px solid var(--theme-primary-22)!important;
  border-bottom-color:var(--theme-primary-22)!important;
  background:
    radial-gradient(circle at 14% 8%,var(--theme-primary-18),transparent 39%),
    radial-gradient(circle at 92% 8%,var(--theme-primary2-12),transparent 42%),
    var(--theme-card)!important;
  color:var(--theme-text)!important;
  box-shadow:
    0 18px 44px var(--theme-text-09),
    inset 0 1px 0 var(--theme-text-06)!important;
}
.coach-ux-v769 .sidebar .side-brand:after{
  background:radial-gradient(circle,var(--theme-primary2-18),transparent 68%)!important;
}
.coach-ux-v769 .sidebar .side-brand .logo span{
  color:var(--theme-text)!important;
  text-shadow:none!important;
}
.coach-ux-v769 .sidebar .side-brand .logo span[data-brand-subline]:after,
.coach-ux-v769 .sidebar .side-brand p{
  color:var(--theme-muted)!important;
  text-shadow:none!important;
}

/* Custom uploaded logos get a neutral palette-controlled frame instead of legacy black/green. */
.coach-ux-v769 .logo-mark.has-custom-logo-v750,
.client-ux-v769 .logo-mark.has-custom-logo-v750{
  background:var(--theme-surface)!important;
  border:1px solid var(--theme-text-12)!important;
  color:var(--theme-text)!important;
  box-shadow:
    0 12px 30px var(--theme-primary-12),
    inset 0 1px 0 var(--theme-text-06)!important;
}
.coach-ux-v769 .sidebar .side-brand .logo-mark.has-custom-logo-v750,
.coach-ux-v769 .coach-topbar-brand-v750 .logo-mark.has-custom-logo-v750{
  background:var(--theme-surface)!important;
  border-color:var(--theme-text-12)!important;
  box-shadow:0 12px 30px var(--theme-primary-12)!important;
}
.coach-ux-v769 .coach-brand-img-v750,
.coach-ux-v769 .logo-mark.has-custom-logo-v750 img,
.client-ux-v769 .logo-mark.has-custom-logo-v750 img{
  background:transparent!important;
  filter:drop-shadow(0 8px 16px var(--theme-text-09))!important;
}

/* Compact coach identity in the sticky topbar. */
.coach-ux-v769 .coach-topbar-brand-v750{
  border:1px solid var(--theme-primary-22)!important;
  background:
    linear-gradient(135deg,var(--theme-primary-10),var(--theme-secondary-06)),
    var(--theme-card)!important;
  color:var(--theme-text)!important;
  box-shadow:0 12px 30px var(--theme-text-06)!important;
}
.coach-ux-v769 .coach-topbar-brand-v750 span{
  color:var(--theme-text)!important;
  text-shadow:none!important;
}
.coach-ux-v769 .coach-topbar-brand-v750 .brand-subline-v752{
  color:var(--theme-muted)!important;
}
.coach-ux-v769 .coach-topbar-brand-v750 .logo-mark:not(.has-custom-logo-v750){
  background:linear-gradient(135deg,var(--theme-primary),var(--theme-primary2))!important;
  color:var(--theme-on-primary)!important;
  border-color:var(--theme-primary-28)!important;
}

/* Bottom client-app action: remove the old fixed black gradient. */
.coach-ux-v769 .side-actions{
  border-top:1px solid var(--theme-text-09)!important;
  background:
    linear-gradient(180deg,
      transparent 0%,
      var(--theme-surface-92) 24%,
      var(--theme-surface) 56%,
      var(--theme-surface) 100%)!important;
}
.coach-ux-v769 .side-actions .btn.secondary{
  background:var(--theme-card)!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-text-12)!important;
  box-shadow:0 10px 24px var(--theme-text-06)!important;
}
.coach-ux-v769 .side-actions .btn.secondary:hover,
.coach-ux-v769 .side-actions .btn.secondary:focus-visible{
  background:var(--theme-primary-08)!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-primary-28)!important;
  box-shadow:0 0 0 3px var(--theme-primary-12)!important;
}

/* Sidebar separators/submenus also inherit the theme instead of white/black legacy rgba. */
.coach-ux-v769 .side-submenu-v769,
.coach-ux-v769 .side-submenu-v767{
  border-left-color:var(--theme-text-12)!important;
}
.coach-ux-v769 .side-link.active .nav-badge{
  background:var(--theme-primary)!important;
  color:var(--theme-on-primary)!important;
}

/* Client header/logo shell: when a coach logo is used, its frame follows that coach's palette. */
.client-ux-v769 .topbar .logo,
.client-ux-v769 .topbar .logo span{
  color:var(--theme-text)!important;
}
.client-ux-v769 .topbar .logo-mark.has-custom-logo-v750{
  background:var(--theme-card)!important;
  border-color:var(--theme-primary-22)!important;
}

/* Mobile: the sticky fade is unnecessary, and must never fall back to black. */
@media(max-width:820px){
  .coach-ux-v769 .side-actions{
    background:none!important;
    border-top-color:var(--theme-text-09)!important;
  }
}
