/* Orchid v503 — public campaign rail sizing and authenticated Brand light palette.
   Public campaign discovery remains its own visual system. The dashboard palette
   below is deliberately restricted to an authenticated, explicitly light Brand
   workspace so it cannot leak into public pages or dark mode. */

/* The campaign discovery surface is a genuine full-width horizontal rail. */
html body.page-brands #brands > .brand-public:not(.is-hidden) > .brand-performance-preview {
  box-sizing:border-box!important;
  width:100dvw!important;
  max-width:100dvw!important;
  min-height:0!important;
  margin:clamp(16px,2vw,26px) calc(50% - 50dvw) 0!important;
  padding:clamp(20px,2.5vw,34px) 0 18px!important;
  gap:0!important;
  overflow:hidden!important;
  border-right:0!important;
  border-left:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
html body.page-brands #brands .brand-performance-preview-title,
html body.page-brands #brands .brand-live-campaign-group > header {
  box-sizing:border-box!important;
  width:100%!important;
  margin-inline:auto!important;
  padding-inline:clamp(18px,4vw,64px)!important;
}
html body.page-brands #brands .brand-performance-preview-title {
  margin-bottom:18px!important;
}
html body.page-brands #brands .brand-performance-live {
  display:none!important;
}
html body.page-brands #brands .brand-live-campaign-group {
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html body.page-brands #brands .brand-live-campaign-group + .brand-live-campaign-group {
  margin-top:24px!important;
  padding-top:24px!important;
  border-top:1px solid var(--platform-line,#deded9)!important;
}
html body.page-brands #brands .brand-live-campaign-group > header {
  align-items:flex-end!important;
  flex-direction:row!important;
  margin-bottom:13px!important;
}
html body.page-brands #brands .brand-live-campaign-shell {
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  padding:0!important;
}
html body.page-brands #brands .brand-live-campaign-shell > .product-scroll-arrow {
  display:none!important;
}
html body.page-brands #brands .brand-performance-live-rail {
  box-sizing:border-box!important;
  display:grid!important;
  grid-auto-flow:column!important;
  grid-auto-columns:clamp(272px,23vw,326px)!important;
  gap:14px!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:2px clamp(18px,4vw,64px) 12px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scroll-padding-inline:clamp(18px,4vw,64px)!important;
  scroll-snap-type:x proximity!important;
  overscroll-behavior-inline:contain!important;
  scrollbar-width:none!important;
  -webkit-overflow-scrolling:touch;
}
html body.page-brands #brands .brand-performance-live-rail::-webkit-scrollbar {
  display:none!important;
}
html body.page-brands #brands .brand-live-campaign-card {
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-rows:142px minmax(0,1fr)!important;
  width:100%!important;
  height:388px!important;
  min-width:0!important;
  max-width:none!important;
  overflow:hidden!important;
  scroll-snap-align:start!important;
}
html body.page-brands #brands .brand-live-campaign-card__cover {
  width:100%!important;
  height:142px!important;
  min-height:0!important;
  object-fit:cover!important;
}
html body.page-brands #brands .brand-live-campaign-card__body {
  min-height:0!important;
  gap:7px!important;
  padding:13px!important;
  overflow:hidden!important;
}
html body.page-brands #brands .brand-live-campaign-card__top em {
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#006349!important;
}
html body.page-brands #brands .brand-live-campaign-card__top em::before {
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}
html body.page-brands #brands .brand-live-campaign-card h3 {
  display:-webkit-box!important;
  overflow:hidden!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:1!important;
}
html body.page-brands #brands .brand-live-campaign-card > div > strong,
html body.page-brands #brands .brand-live-campaign-card p {
  overflow:hidden!important;
}
html body.page-brands #brands .brand-live-campaign-card > div > strong {
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:1!important;
}
html body.page-brands #brands .brand-live-campaign-card__terms {
  flex-wrap:nowrap!important;
  overflow:hidden!important;
}

/* On phones the whole image-and-information card uses a collection-card-sized
   footprint; its campaign styling and information hierarchy remain unchanged. */
@media (max-width:760px) {
  html body.page-brands #brands > .brand-public:not(.is-hidden) > .brand-performance-preview {
    margin-top:12px!important;
    padding:16px 0 12px!important;
  }
  html body.page-brands #brands .brand-performance-preview-title,
  html body.page-brands #brands .brand-live-campaign-group > header {
    padding-inline:14px!important;
  }
  html body.page-brands #brands .brand-performance-preview-title {
    gap:10px!important;
    margin-bottom:14px!important;
  }
  html body.page-brands #brands .brand-performance-preview-title h2 {
    font-size:clamp(22px,7vw,28px)!important;
  }
  html body.page-brands #brands .brand-performance-preview-title p {
    font-size:12px!important;
    line-height:1.45!important;
  }
  html body.page-brands #brands .brand-live-campaign-group > header {
    display:flex!important;
    align-items:flex-end!important;
    flex-direction:row!important;
    gap:10px!important;
    margin-bottom:10px!important;
  }
  html body.page-brands #brands .brand-live-campaign-group > header > div {
    flex:1 1 auto!important;
  }
  html body.page-brands #brands .brand-live-campaign-group > header h3 {
    font-size:22px!important;
  }
  html body.page-brands #brands .brand-live-campaign-group > header small {
    flex:0 0 auto!important;
    padding-bottom:2px!important;
    font-size:10px!important;
  }
  html body.page-brands #brands .brand-performance-live-rail {
    grid-auto-columns:min(82vw,318px)!important;
    gap:10px!important;
    padding:1px 14px 9px!important;
    scroll-padding-inline:14px!important;
  }
  html body.page-brands #brands .brand-live-campaign-card {
    grid-template-rows:112px minmax(0,1fr)!important;
    height:358px!important;
    max-height:358px!important;
    border-radius:14px!important;
  }
  html body.page-brands #brands .brand-live-campaign-card__cover {
    height:112px!important;
  }
  html body.page-brands #brands .brand-live-campaign-card__body {
    gap:6px!important;
    padding:12px!important;
  }
  html body.page-brands #brands .brand-live-campaign-card h3 {
    font-size:18px!important;
    line-height:1.15!important;
  }
  html body.page-brands #brands .brand-live-campaign-card > div > strong {
    font-size:12px!important;
  }
  html body.page-brands #brands .brand-live-campaign-card p {
    min-height:30px!important;
    font-size:11px!important;
    line-height:1.4!important;
  }
  html body.page-brands #brands .brand-live-campaign-card__terms {
    margin-top:auto!important;
  }
  html body.page-brands #brands .brand-live-campaign-card__terms span {
    flex:0 0 auto!important;
    padding:5px 7px!important;
    font-size:9px!important;
  }
  html body.page-brands #brands .brand-live-campaign-card button {
    min-height:36px!important;
    margin-top:1px!important;
  }
}

/* Light-mode Brand dashboard: near-white Orchid green separates navigation,
   secondary panels and controls while primary reading cards stay white. */
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open > .brand-command-centre-shell {
  --brand-command-green-soft:#e9f5ef!important;
  --brand-command-muted:#59675f!important;
  --brand-command-line:#d9e7e0!important;
  --brand-command-soft:#f0f7f3!important;
  --brand-command-surface:#ffffff!important;
  --brand-command-bg:#f7fbf9!important;
  --brand-command-shadow:0 14px 38px rgba(0,99,73,.075)!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open .brand-dashboard-tabs {
  background:rgba(244,250,247,.97)!important;
  border-color:#d9e7e0!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open .brand-dashboard-tabs button:hover {
  background:#e9f5ef!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open .brand-dashboard-tabs button.is-active {
  background:#006349!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open .brand-dashboard-panel {
  background:#f7fbf9!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open :is(
  .brand-command-side-tabs,
  .brand-command-store-tabs,
  .brand-command-integration-steps,
  .brand-command-reward-selector,
  .brand-command-edit-panel
) {
  border-radius:16px!important;
  background:#f0f7f3!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open :is(.brand-command-side-tabs,.brand-command-store-tabs) {
  padding:7px!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open :is(
  .brand-command-side-tabs button,
  .brand-command-store-tab,
  .brand-command-quick,
  .brand-command-setting,
  .brand-command-integration-steps > div,
  .brand-command-creator-card.discover
) {
  background:#f5faf7!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open :is(
  .brand-command-side-tabs button.active,
  .brand-command-store-tab.active
) {
  background:#006349!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open :is(
  .brand-command-grid.two > .brand-command-card:last-child,
  .brand-command-campaign-layout > .brand-command-card:last-child,
  .brand-command-reward-selector,
  .brand-command-integration,
  .brand-command-setting
) {
  background:#f3f9f6!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open .brand-command-kpi {
  background:linear-gradient(180deg,#fff 0%,#f3f9f6 100%)!important;
}
html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open .brand-command-table-wrap th {
  background:#eef7f2!important;
}

@media (max-width:760px) {
  html[data-orchid-theme="light"] body.page-brands:not(.dark-mode) #brands.brand-dashboard-open .brand-dashboard-tabs {
    background:#f2f9f5!important;
  }
}
