/* BeverageHub global light-surface guard.
   Main application content stays on the same bright visual system as Detailed Report.
   Authentication and navigation are intentionally excluded. */

:root{
  --bh-canvas:#f7f8fa;
  --bh-surface:#fff;
  --bh-surface-soft:#f8fafc;
  --bh-surface-border:#e1e7ee;
  --bh-surface-text:#172033;
  --bh-surface-muted:#667085;
  --bh-surface-active:#faf3f5;
  --bh-surface-active-border:#d7aeba;
}

/* Previously dark KPI/content cards are permanently light. */
.app .stream-card.stream-total,
.app .revenue-kpis article:last-child,
.app .batching-summary .total,
.app .team-sales-v2-kpis article,
.app .team-sales-v2-kpis article.primary,
.app .team-sales-kpis article,
.app .team-sales-kpis article.net{
  background:var(--bh-surface)!important;
  background-color:var(--bh-surface)!important;
  background-image:none!important;
  border-color:var(--bh-surface-border)!important;
  color:var(--bh-surface-text)!important;
  box-shadow:none!important;
}
.app .stream-card.stream-total *,
.app .revenue-kpis article:last-child *,
.app .batching-summary .total *,
.app .team-sales-v2-kpis article *,
.app .team-sales-kpis article *{
  color:inherit!important;
}

/* Content heroes and primary workspaces stay light. */
.app .commercial-hero,
.app .house-tonic-hero,
.app .library-hero,
.app .team-sales-v2-head,
.app .team-sales-hero{
  background:var(--bh-surface)!important;
  background-color:var(--bh-surface)!important;
  background-image:none!important;
  border-color:var(--bh-surface-border)!important;
  color:var(--bh-surface-text)!important;
  box-shadow:none!important;
}
.app .team-sales-v2-head h1,.app .team-sales-v2-head h2,.app .team-sales-v2-head h3,
.app .team-sales-hero h1,.app .team-sales-hero h2,.app .team-sales-hero h3,
.app .commercial-hero h1,.app .commercial-hero h2,.app .commercial-hero h3,
.app .house-tonic-hero h1,.app .house-tonic-hero h2,.app .house-tonic-hero h3,
.app .library-hero h1,.app .library-hero h2,.app .library-hero h3{
  color:var(--bh-surface-text)!important;
}
.app .team-sales-v2-head p,.app .team-sales-v2-head span,
.app .team-sales-hero p,.app .team-sales-hero span,
.app .commercial-hero p,.app .commercial-hero span,
.app .house-tonic-hero p,.app .house-tonic-hero span,
.app .library-hero p,.app .library-hero span{
  color:var(--bh-surface-muted)!important;
}

/* Team Sales: every visible panel/window follows one light surface contract. */
.app .team-sales-source-switch,
.app .team-sales-v2-controls,
.app .team-sales-device-mapping,
.app .team-sales-device-mapping>header,
.app .team-sales-device-mapping .table-wrap,
.app .team-sales-v2-leaderboard,
.app .team-sales-v2-leaderboard>header,
.app .team-sales-v2-days,
.app .team-sales-v2-days>header,
.app .team-sales-item-finder,
.app .team-sales-item-summary>div,
.app .team-sales-item-summary article,
.app .team-sales-toolbar,
.app .team-sales-date,
.app .team-sales-table-panel,
.app .team-sales-table-panel>.panel-head,
.app .team-sales-import-modal,
.app .team-sales-v2-drawer,
.app .team-sales-v2-drawer>header,
.app .team-sales-v2-drawer-kpis article,
.app .team-sales-v2-drawer-meta>div,
.app .team-sales-v2-drawer-products,
.app .team-sales-v2-drawer-products>header,
.app .team-sales-date-popover,
.app .team-sales-date-popover header,
.app .team-sales-date-actions,
.app .team-sales-v2-empty,
.app .team-sales-v2-no-location-sales{
  background:var(--bh-surface)!important;
  background-color:var(--bh-surface)!important;
  background-image:none!important;
  color:var(--bh-surface-text)!important;
  border-color:var(--bh-surface-border)!important;
  box-shadow:none!important;
}

.app .team-sales-v2-leaderboard tbody tr,
.app .team-sales-v2-leaderboard tbody td,
.app .team-sales-v2-days tbody td,
.app .team-sales-table tbody td,
.app .team-sales-device-mapping tbody td,
.app .team-sales-v2-drawer tbody td{
  background:var(--bh-surface)!important;
  background-image:none!important;
  color:var(--bh-surface-text)!important;
}
.app .team-sales-v2-leaderboard tbody tr:hover td,
.app .team-sales-v2-leaderboard tbody tr.is-selected td,
.app .team-sales-table tbody tr:hover td,
.app .team-sales-device-mapping tbody tr:hover td{
  background:var(--bh-surface-active)!important;
}

.app .team-sales-v2-departments button,
.app .team-department-grid .department-card{
  background:var(--bh-surface)!important;
  background-image:none!important;
  color:var(--bh-surface-text)!important;
  border-color:var(--bh-surface-border)!important;
  box-shadow:none!important;
}
.app .team-sales-v2-departments button.active,
.app .team-department-grid .department-card.active{
  background:var(--bh-surface-active)!important;
  background-image:none!important;
  border-color:var(--bh-surface-active-border)!important;
}

/* Inputs, selects and buttons inside Team Sales should look like Detailed Report controls. */
.app .team-sales-page input,
.app .team-sales-page select,
.app .team-sales-page textarea,
.app .team-sales-page button:not(.primary){
  background-color:#fff!important;
}

/* Drawers/popovers use a light shell while keeping the backdrop for focus. */
.app aside.team-sales-v2-drawer{
  background:var(--bh-canvas)!important;
  background-image:none!important;
  color:var(--bh-surface-text)!important;
}
.app .team-sales-v2-drawer-backdrop,
.product-modal-backdrop{
  background:rgba(15,23,42,.28)!important;
}

/* Generic future-proof content rule. */
.app > :not(aside) :where(
  [class$="-card"],[class*="-card "],
  [class$="-panel"],[class*="-panel "],
  [class$="-tile"],[class*="-tile "],
  [class$="-kpi"],[class*="-kpi "],
  [class$="-summary"],[class*="-summary "]
):not([class*="backdrop"]):not([class*="overlay"]){
  background-color:var(--bh-surface)!important;
  background-image:none!important;
  color:var(--bh-surface-text)!important;
}

/* Team Sales uses the same bright canvas as Detailed Report. */
body:has(.team-sales-page),
.app:has(.team-sales-page),
.app:has(.team-sales-page)>main,
.app .team-sales-page,
.app .team-sales-v2-panel,
.app .team-sales-v2-layout{
  background:var(--bh-canvas)!important;
  background-color:var(--bh-canvas)!important;
  background-image:none!important;
}
.app .team-sales-page,
.app .team-sales-v2-panel,
.app .team-sales-v2-layout{
  border-color:transparent!important;
  box-shadow:none!important;
}
.app .team-sales-v2-layout{
  display:block!important;
  width:100%!important;
}
.app .team-sales-v2-days{display:none!important}
.app .team-sales-v2-leaderboard{width:100%!important;max-width:none!important}

/* Brand placement contract: dark burgundy filled surfaces belong to the sidebar only.
   Main workspaces use white / soft light surfaces; burgundy may remain only as a small accent, icon or border. */
.app>main .current-user-trigger,
.app>main .user-task-summary>.current-user-trigger{
  background:#fff!important;
  background-color:#fff!important;
  background-image:none!important;
  border:1px solid var(--bh-surface-border)!important;
  color:var(--bh-surface-text)!important;
  box-shadow:none!important;
}
.app>main .current-user-trigger:hover,
.app>main .user-task-summary>.current-user-trigger:hover{
  background:#f8fafc!important;
  background-image:none!important;
  border-color:#cfd8e3!important;
  box-shadow:none!important;
}
.app>main .current-user-trigger b,
.app>main .current-user-trigger small,
.app>main .user-task-summary>.current-user-trigger b,
.app>main .user-task-summary>.current-user-trigger small{
  color:var(--bh-surface-text)!important;
}
.app>main .user-task-summary>.current-user-trigger small{
  color:var(--bh-surface-muted)!important;
  border-left-color:#d8dee7!important;
}

/* Reporting source switch stays a light control in the workspace. */
.app>main .detail-report-source-switch button{
  background:#e9edf2!important;
  background-color:#e9edf2!important;
  background-image:none!important;
  border:1px solid #d5dde7!important;
  box-shadow:none!important;
}
.app>main .detail-report-source-switch button:hover{
  background:#e2e8f0!important;
  background-image:none!important;
}
.app>main .detail-report-source-switch.is-v2 button{
  background:#e8f1ff!important;
  background-color:#e8f1ff!important;
  background-image:none!important;
  border-color:#c7daf7!important;
}
.app>main .detail-report-source-switch button i{
  background:#fff!important;
  box-shadow:0 1px 3px rgba(15,23,42,.18)!important;
}

/* Other previously burgundy-filled workspace controls are light by rule. */
.app>main .task-notification-head,
.app>main .my-tasks-welcome{
  background:#fff!important;
  background-color:#fff!important;
  background-image:none!important;
  border:1px solid var(--bh-surface-border)!important;
  color:var(--bh-surface-text)!important;
  box-shadow:none!important;
}
.app>main .task-notification-head small,
.app>main .task-notification-head b,
.app>main .my-tasks-welcome small,
.app>main .my-tasks-welcome h2,
.app>main .my-tasks-welcome p{
  color:inherit!important;
}
.app>main .checklist-view-tabs button.active{
  background:#fff!important;
  background-image:none!important;
  border:1px solid var(--bh-surface-active-border)!important;
  color:#6f2038!important;
  box-shadow:inset 0 -2px 0 #6f2038!important;
}

/* Dark navigation is intentionally excluded from the content contract. */
.app>aside,
.app>aside *{
  /* no surface override here */
}

@media(max-width:760px){
  .app .team-sales-v2-leaderboard .team-sales-v2-employee-name{
    width:100%!important;
    padding:0!important;
    background:transparent!important;
    background-image:none!important;
  }
  .app .team-sales-v2-drawer,
  .app .team-sales-date-popover,
  .app .team-sales-import-modal{
    border-radius:12px!important;
  }
}
