/* TurboBatch permanent app branding + larger customer/farm branding */
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 340px;
  max-width: 52vw;
}

/* TurboBatch logo: permanent application brand */
.app-header .brand .app-logo {
  height: 52px;
  max-width: 280px;
  width: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Customer/farm brand: secondary but clearly visible */
.farm-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid var(--tb-border);
  padding-left: 14px;
  min-width: 0;
  max-width: 430px;
  flex: 1 1 auto;
}

/* Customer logo — larger in the header */
.farm-brand-pill img,
.farm-brand-pill img[data-farm-logo] {
  display: block;
  max-height: 42px;
  max-width: 175px;
  width: auto;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.farm-brand-pill span[data-farm] {
  color: var(--tb-muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.farm-switcher {
  width: auto !important;
  max-width: 240px;
  padding: 8px 12px;
  border-radius: 999px;
}

/* Auth pages always use TurboBatch branding */
.auth-card img {
  max-width: 340px !important;
  max-height: 110px !important;
  object-fit: contain;
}

/* Header date fit fix */
.status-date strong,
#raceClockDate {
  white-space: normal !important;
  overflow-wrap: anywhere;
  font-size: clamp(13px, 1.35vw, 18px) !important;
  line-height: 1.12 !important;
}
.status-card.status-date { min-width: 0; }

@media (max-width: 1180px) {
  .app-header .brand {
    max-width: 100%;
    flex-wrap: wrap;
  }
  .farm-brand-pill {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .app-header .brand {
    min-width: 0;
    width: 100%;
  }
  .app-header .brand .app-logo {
    height: 44px;
    max-width: 230px;
  }
  .farm-brand-pill {
    width: 100%;
    border-left: 0;
    padding-left: 0;
  }
  .farm-brand-pill img,
  .farm-brand-pill img[data-farm-logo] {
    max-height: 38px;
    max-width: 165px;
  }
}
