/* ==========================================================================
   BridgeBI — BBDrop: the card-style option list, everywhere
   --------------------------------------------------------------------------
   Reference: "stat mini card component" by @uAghazadae, Collect UI
   (/designs/card-ui-design-inspiration/9ad36656-…). It is a VIDEO, not a still
   — the design IS the menu: a light stat card whose header label opens a DARK
   popover of options (Referrers / Campaigns / UTM sources / UTM medium), and
   the card's rows morph to the new dataset on pick.

   Measured off the source frames (the capture is zoomed, so the ratios are the
   truth and the pixel sizes are derived from them at a 13.5px row label):

     panel    #252529      hover chip #3A3A3C     label ink #EAEAEC
     radius   8.9% of panel width  → 20px here
     row pitch / label size = 2.7  → 36-38px rows
     no borders, no dividers, no icons: fill and radius do all the work

   The status colours (up/down) and the check are BridgeBI's own — the
   reference has no selected state because its menu never shows one.

   Two halves:

   1. THE OPTION LIST (`.bbd*`) — a floating card that replaces the OS popup
      of every native <select>. `dropdown.js` portals it to <body>, so it is
      never clipped by a modal's overflow and never inherits a panel's font.

   2. THE CLOSED CONTROL + the app's own menu surfaces — brought to the same
      radius / hairline / shadow language so an open list and the control it
      came out of read as one object.

   HARD RULE — specificity, not !important. The app's own select rules live in
   index.html's inline <style> (`.ia-select`, `.ib-select`, `.cg-sel`, …), all
   of them a single class = (0,1,0). The base selector here is
   `select:not([data-bbdrop="off"]):not([multiple])` = (0,2,1), which wins on
   weight instead of on force — so a page that needs a different width or font
   can still say so with two classes and be heard. This file must therefore be
   the LAST stylesheet in <head>; put it after spy.css.

   `[data-bbdrop="off"]` on a select (or `[data-bbdrop-off]` on any ancestor)
   opts out of BOTH halves: the CSS stops matching and the JS stops binding.
   ========================================================================== */

:root {
  /* The panel is DARK IN BOTH THEMES, on purpose. It is what the reference is:
     a dark object floating over a light page. It also solves a problem the app
     has 57 times over — a white menu opening out of a white toolbar onto a
     white card has to fight for its edges with shadow alone, and on the warm
     #F5F3EE page a white panel is nearly the same value as the page. One
     identity in both themes also means the menu never becomes the one element
     that "changes shape" when Miguel flips the theme. */
  --bbd-panel:     #252529;                     /* the opaque fallback */
  /* LIQUID GLASS. The panel is not a colour, it is a MATERIAL: a translucent
     slab that takes its colour from whatever it is over, plus the two things
     that make glass read as glass — a bright top edge where light catches the
     bevel, and a dim bottom edge where it does not. Blur alone looks like a
     frosted rectangle; the edges are what give it thickness.
     `saturate` matters as much as `blur`: without it the dashboard's navy and
     gold go grey under the panel and it reads as smoked plastic. */
  /* .58 was measured against the gold KPI bar and the navy card: the row text
     nearly vanished where the bright band showed through. Legibility outranks
     the effect — .74 with a heavier blur still bleeds the colour behind it
     (that is what makes it glass) while keeping 12.5px type readable over
     anything on this dashboard. */
  --bbd-glass:     rgba(26, 26, 31, .74);
  --bbd-blur:      blur(30px) saturate(175%) contrast(104%);
  --bbd-sheen:     rgba(255, 255, 255, .13);    /* the top bevel */
  --bbd-sheen-lo:  rgba(255, 255, 255, .04);    /* the bottom one */
  --bbd-line:      rgba(255, 255, 255, .085);   /* group dividers, inside dark */
  --bbd-edge:      rgba(255, 255, 255, .12);    /* the panel's own 1px ring */
  --bbd-ink:       #EAEAEC;
  --bbd-body:      #C4C4C9;
  --bbd-muted:     #8E8E93;
  --bbd-hover:     #3A3A3C;
  --bbd-press:     #46464A;
  --bbd-field:     rgba(255, 255, 255, .065);

  --bbd-pill:      rgba(58, 222, 129, .18);
  --bbd-pill-ink:  #3ADE81;
  --bbd-up:        #3ADE81;
  --bbd-down:      #FF7B85;

  /* 8.9% of the panel's width in the reference. At a 200–400px menu that is
     18–36px; 20px is the stop that survives both without the corner eating the
     first row. Rows are one stop down and rounder than the app's 8px controls —
     in the reference the hover chip's radius is nearly half the row height. */
  --bbd-r-panel:   20px;
  --bbd-r-row:     14px;
  --bbd-r-ctrl:    12px;   /* the closed control, which stays light */

  /* On a dark panel the hairline goes INSIDE (a white ring, low alpha) and the
     blur does the lifting. Three stops so the shadow has a near edge and a far
     one — a single blur reads as a drop shadow from 2012. */
  --bbd-shadow:
    0 0 0 1px var(--bbd-edge),
    0 2px 6px rgba(9, 12, 20, .18),
    0 14px 34px -10px rgba(9, 12, 20, .34),
    0 34px 64px -28px rgba(9, 12, 20, .42);

  /* Above every stacking context in the app (max in use: 999999, the boot
     loader). A list that opens behind a modal reads as a dead control. */
  --bbd-z: 1000100;
}

/* Dark theme: same panel, deeper shadow. The page behind it is #0B1220, so the
   blur has to be darker than the page or the panel floats on nothing. */
html[data-bb-theme="dark"] {
  /* Over a #0B1220 page the glass has to be darker than the page or it glows,
     and the bevel has to be brighter or it disappears. */
  --bbd-glass:     rgba(14, 18, 28, .78);
  --bbd-sheen:     rgba(255, 255, 255, .16);
  --bbd-edge:      rgba(255, 255, 255, .13);
  --bbd-shadow:
    0 0 0 1px var(--bbd-edge),
    0 2px 6px rgba(0, 0, 0, .45),
    0 16px 36px -10px rgba(0, 0, 0, .60),
    0 36px 70px -28px rgba(0, 0, 0, .65);
}

/* ==========================================================================
   1 · THE FLOATING LIST
   ========================================================================== */

.bbd {
  position: fixed;
  top: 0; left: 0;
  z-index: var(--bbd-z);
  display: flex;
  flex-direction: column;
  min-width: 190px;
  max-width: 340px;
  background: var(--bbd-glass);
  -webkit-backdrop-filter: var(--bbd-blur);
  backdrop-filter: var(--bbd-blur);
  border-radius: var(--bbd-r-panel);
  /* The bevel is drawn with insets so it follows the radius exactly; a border
     cannot do the top-bright / bottom-dim split that reads as thickness. */
  box-shadow:
    inset 0 1px 0 var(--bbd-sheen),
    inset 0 -1px 0 var(--bbd-sheen-lo),
    inset 0 0 0 1px var(--bbd-edge),
    var(--bbd-shadow);
  padding: 5px;
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--bbd-body);
  /* The card is the whole point: nothing inside may paint over its corners. */
  overflow: hidden;
  /* `isolation` gives the sheen overlay its own compositing context, so it
     cannot blend with the page showing THROUGH the glass. */
  isolation: isolate;
  transform-origin: top center;
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  transition: opacity .13s ease, transform .16s cubic-bezier(.23, 1, .32, 1);
  will-change: transform, opacity;
}
.bbd.is-up { transform-origin: bottom center; transform: translateY(6px) scale(.985); }
.bbd.is-in { opacity: 1; transform: none; }

/* The specular highlight: a soft light source at the top-left corner and a
   faint one at the bottom-right, so the slab looks curved rather than flat.
   `::before` and not an extra node, because the panel's innerHTML is rebuilt on
   every open and a node would have to be re-inserted every time. */
.bbd::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 8% -10%, rgba(255, 255, 255, .10), transparent 55%),
    radial-gradient(90% 70% at 110% 115%, rgba(255, 255, 255, .05), transparent 60%);
  z-index: 0;
}
/* Everything real sits above the sheen. */
.bbd > *:not(.bbd-fade) { position: relative; z-index: 1; }

/* No backdrop-filter (older Firefox, or a browser with it disabled): fall back
   to the opaque panel. A translucent panel with NO blur behind it is unreadable
   over a dashboard — the numbers behind it show through the numbers on it. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bbd { background: var(--bbd-panel); }
  .bbd::before { display: none; }
}
/* Someone who asked for less motion did not ask for less material, but a 26px
   blur under a scrolling page is the one place where "cheap" beats "pretty" on
   a Mac driving two 4K displays. */
@media (prefers-reduced-transparency: reduce) {
  .bbd { background: var(--bbd-panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .bbd::before { display: none; }
}

/* A clamped list ends with a row sliced flush against the panel's edge, which
   reads as a rendering fault rather than as "there is more". dropdown.js sets
   `.has-more` / `.has-back` from the list's own scroll position, and the fades
   are drawn as overlays on the PANEL (not a mask on the list) so the rounded
   corner keeps its edge and the scrollbar is not faded out along with it. */
.bbd-fade {
  position: absolute;
  left: 5px; right: 5px;
  height: 34px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .14s ease;
  z-index: 3;
}
.bbd-fade.is-top {
  top: 0;
  background: linear-gradient(to bottom, var(--bbd-glass) 26%, transparent);
  border-radius: var(--bbd-r-panel) var(--bbd-r-panel) 0 0;
}
.bbd-fade.is-bot {
  bottom: 0;
  background: linear-gradient(to top, var(--bbd-glass) 26%, transparent);
  border-radius: 0 0 var(--bbd-r-panel) var(--bbd-r-panel);
}
.bbd.has-back .bbd-fade.is-top { opacity: 1; }
.bbd.has-more .bbd-fade.is-bot { opacity: 1; }
/* With a header + filter box above it, a top fade would sit over the filter
   box instead of over the first row. */
.bbd:has(.bbd-head) .bbd-fade.is-top { display: none; }

/* Header — shown only when the list is long enough to carry a filter box. A
   short menu with a title bar is a dialog, not a menu. */
/* min-width:0 on BOTH the row and the label: a flex child's default
   min-width:auto refuses to shrink below its content, so `text-overflow:
   ellipsis` never engages and the header pushes the whole panel wider than the
   control it belongs to. That is what made a 130px select open a 370px menu. */
.bbd-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 6px 10px 5px;
}
.bbd-head-l {
  min-width: 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bbd-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bbd-head-n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--bbd-muted);
  flex: none;
}

.bbd-search {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 1px 1px 5px;
  padding: 6px 9px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .10);
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow .14s ease, background .14s ease;
}
.bbd-search:focus-within {
  background: rgba(255, 255, 255, .10);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22);
}
/* responsive.css sets `svg { max-width: 100% }`, which resolves to 0 for an
   icon inside a flex row — the documented BridgeBI trap. Explicit box, and
   max-width off. */
.bbd-search svg {
  width: 13px; height: 13px; max-width: none; flex: none;
  color: var(--bbd-muted);
}
.bbd-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--bbd-ink);
}
/* beautiful.css gives every text input `--bb-sh-focus`, a 4px ring. Inside a
   box that already draws its own focus ring that lands as TWO concentric
   outlines. (0,3,0) beats its `input[type="text"]:focus` at (0,2,1). */
.bbd-search input:focus, .bbd-search input:focus-visible {
  box-shadow: none;
  outline: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.bbd-search input::placeholder { color: var(--bbd-muted); font-weight: 500; }

/* `flex: 1 1 auto` + `min-height: 0` is what lets dropdown.js clamp the whole
   panel's max-height and have the LIST take the scroll. Without min-height the
   flex item refuses to shrink below its content and the panel overflows the
   viewport instead. */
.bbd-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0 2px 2px;
  margin: 0 -2px -2px;
}
/* The default bar is a light-grey slab that reads as a stripe of another app
   pasted onto the panel, and it sits ON the rounded corner. Thin, translucent,
   clipped to the padding box so the radius still owns the edge. Chromium needs
   the -webkit-* rules; `scrollbar-color` covers Firefox. */
.bbd .bbd-list { scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.bbd .bbd-list::-webkit-scrollbar { width: 6px; height: 6px; }
.bbd .bbd-list::-webkit-scrollbar-track { background: transparent; }
.bbd .bbd-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .16);
  border: 0;
  border-radius: 99px;
  background-clip: padding-box;
}
.bbd .bbd-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .30); }
.bbd .bbd-list::-webkit-scrollbar-corner { background: transparent; }

/* Group label. The 1px rule above it is the card's own divider, reused: the
   only structural line in the reference shot. */
.bbd-grp {
  padding: 11px 10px 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--bbd-muted);
}
.bbd-grp + .bbd-o { margin-top: 0; }
.bbd-grp.has-rule { margin-top: 6px; border-top: 1px solid var(--bbd-line); }

/* Option row. Explicit padding because index.html carries a bare
   `button { padding: 10px 16px }` — inheriting it makes every row 46px tall. */
.bbd-o {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--bbd-r-row);
  background: none;
  box-shadow: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--bbd-body);
  text-align: left;
  cursor: pointer;
  transition: background .1s ease, color .1s ease;
}
.bbd-o:hover { background: rgba(255, 255, 255, .10); color: var(--bbd-ink); }
/* The keyboard cursor paints only once a key has been pressed (`data-kb`).
   Opening with the mouse puts the cursor on the CURRENT value, and filling
   that row would make it read as hovered — two rows appearing to be under the
   pointer at once. The mint check already says which one is selected. */
.bbd[data-kb] .bbd-o.is-on { background: rgba(255, 255, 255, .10); color: var(--bbd-ink); }
.bbd-o:active { background: rgba(255, 255, 255, .16); }
.bbd-o.is-sel { color: var(--bbd-ink); font-weight: 650; }
.bbd-o[disabled] { color: var(--bbd-muted); cursor: default; opacity: .7; }
.bbd-o[disabled]:hover { background: none; color: var(--bbd-muted); }

.bbd-o-t {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Secondary value on the right of a row — the reference's "3,842" column.
   Monospaced + tabular per the Northbridge design system: every number in
   this app is JetBrains Mono so columns of them line up. */
.bbd-o-m {
  flex: none;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--bbd-body);
}
.bbd-o.is-sel .bbd-o-m { color: var(--bbd-ink); }

/* Delta, straight off the reference: arrow + signed percent, green up / red
   down. Fed by `data-delta` on the <option>; absent everywhere today, which is
   the point — a row can carry its trend the day a caller has one. */
.bbd-o-d {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 600;
}
.bbd-o-d svg { width: 11px; height: 11px; max-width: none; flex: none; }
.bbd-o-d.is-up   { color: var(--bbd-up); }
.bbd-o-d.is-down { color: var(--bbd-down); }
.bbd-o-d.is-flat { color: var(--bbd-muted); }

/* The mint check pill — the reference's "+2.1%" badge, doing a job here:
   it is the only element that says which row is the current value. */
/* A filled green disc beside one row is a sticker: at 20px it out-shouts the
   label it is marking, and the reference has no selected state at all. The
   smallest mark that answers "which one is on" is a bare check in the positive
   ink — no chip, no ring. */
.bbd-o-c {
  flex: none;
  display: grid;
  place-items: center;
  width: 14px; height: 14px;
  color: var(--bbd-pill-ink);
  opacity: 0;
  transform: scale(.8);
  transition: opacity .12s ease, transform .16s cubic-bezier(.23, 1, .32, 1);
}
.bbd-o-c svg { width: 14px; height: 14px; max-width: none; }
.bbd-o.is-sel .bbd-o-c { opacity: 1; transform: none; }

/* A swatch — used by any caller whose options are colours or platforms. */
.bbd-o-sw {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.bbd-empty {
  padding: 16px 10px 18px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--bbd-muted);
}

/* Sheet mode. Below 560px a 380px card anchored to a 28px control is a worse
   object than a sheet: the finger covers the anchor, and the list would sit
   under the keyboard the moment the filter box takes focus. */
.bbd.is-sheet {
  top: auto !important;
  left: 10px !important;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 4px 8px 8px;
  border-radius: 22px;
  transform-origin: bottom center;
  transform: translateY(14px) scale(.99);
}
.bbd.is-sheet.is-in { transform: none; }
.bbd.is-sheet::before {
  content: '';
  width: 38px; height: 4px;
  margin: 6px auto 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .22);
  flex: none;
}
.bbd.is-sheet .bbd-o { padding: 12px 12px; font-size: 15px; }
.bbd.is-sheet .bbd-list { max-height: min(60vh, 460px); }

.bbd-veil {
  position: fixed;
  inset: 0;
  z-index: calc(var(--bbd-z) - 1);
  background: rgba(12, 18, 30, .28);
  opacity: 0;
  transition: opacity .16s ease;
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.bbd-veil.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .bbd, .bbd-o-c, .bbd-veil { transition: none; }
  .bbd, .bbd.is-sheet { transform: none; }
}

/* ==========================================================================
   2 · THE CLOSED CONTROL
   --------------------------------------------------------------------------
   Only the properties that make it match the list: the OS arrow off, our
   chevron on, the card's radius and hairline. Deliberately NO width, height,
   font-size, or vertical padding — those belong to the 57 call sites, and
   overriding them here would relayout half the app to fix a corner.
   ========================================================================== */

select:not([data-bbdrop="off"]):not([multiple]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: var(--bbd-r-ctrl);
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.75 6 7.75l3-3' stroke='%235C5C5C' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 11px 11px;
  cursor: pointer;
  transition: box-shadow .14s ease, border-color .14s ease;
}
html[data-bb-theme="dark"] select:not([data-bbdrop="off"]):not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.75 6 7.75l3-3' stroke='%23A3AEC0' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Open state: the chevron flips, and that is nearly all of it.
   It used to add an outer 2px halo ON TOP of the app's own 1px border, which on
   a white field read as two nested rounded rectangles with different radii —
   the "pill looks weird" in Miguel's screenshot. A control that is open needs
   to look ENGAGED, not outlined twice: one accent border, one very soft lift,
   nothing outside the box. */
/* THE OPEN CONTROL IS THE SAME MATERIAL AS THE PANEL. A white pill with black
   text sitting on top of a dark glass slab reads as two unrelated objects —
   which is exactly what looked wrong. While the list is open the control turns
   to glass too, so the pair reads as one thing that opened. It reverts the
   instant it closes, and nothing about its size changes, so no layout moves. */
select[data-bbdrop-open] {
  background-color: var(--bbd-glass) !important;
  -webkit-backdrop-filter: var(--bbd-blur);
  backdrop-filter: var(--bbd-blur);
  color: var(--bbd-ink) !important;
  border-color: transparent !important;
  box-shadow:
    inset 0 1px 0 var(--bbd-sheen),
    inset 0 0 0 1px var(--bbd-edge),
    0 2px 8px -2px rgba(9, 12, 20, .22) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 7.25 6 4.25l3 3' stroke='%23EAEAEC' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  select[data-bbdrop-open] { background-color: var(--bbd-panel) !important; }
}


/* ==========================================================================
   3 · THE APP'S OWN MENU SURFACES
   --------------------------------------------------------------------------
   These are hand-built popovers, not selects, so the JS cannot reach them —
   but they are dropdowns to the person using them, and a 10px corner beside
   an 18px one reads as two design systems. Radius, hairline and shadow only;
   their internals stay theirs.

   NOT in this list, checked one by one: `.bp-drop`, `.md-drop`, `.vd-drop` and
   `.cpl-dropzone` are FILE dropzones — a dashed intake box, not a menu. Giving
   them a menu's shadow would make an empty upload target look like an open
   list. `.bb-menu` IS here even though nothing uses it yet: it is the menu
   primitive beautiful.css documents, so the next hand-built menu inherits the
   card instead of restating a 10px corner.
   ========================================================================== */

/* 3a · MENUS OF OPTIONS — these become the reference's dark popover.
   They are the same gesture as a <select>: point at a thing, pick one of N.
   Leaving them white would mean two different-looking answers to the same
   question on the same screen. Each one's INTERNALS are re-inked below,
   individually, because every one of them hard-codes navy or --text on its
   own rows — a dark panel with those untouched is unreadable, not merely
   off-palette. */
.bb-menu,
.bp-menu,
.bb-user-menu,
.cmp-pin-dropdown,
.init-move-menu,
.byprogram-ctx-menu {
  background: var(--bbd-glass);
  -webkit-backdrop-filter: var(--bbd-blur);
  backdrop-filter: var(--bbd-blur);
  border: 0;
  border-radius: var(--bbd-r-panel);
  box-shadow:
    inset 0 1px 0 var(--bbd-sheen),
    inset 0 -1px 0 var(--bbd-sheen-lo),
    inset 0 0 0 1px var(--bbd-edge),
    var(--bbd-shadow);
  color: var(--bbd-ink);
  padding: 6px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bb-menu, .bp-menu, .bb-user-menu,
  .cmp-pin-dropdown, .init-move-menu, .byprogram-ctx-menu { background: var(--bbd-panel); }
}
@media (prefers-reduced-transparency: reduce) {
  .bb-menu, .bp-menu, .bb-user-menu,
  .cmp-pin-dropdown, .init-move-menu, .byprogram-ctx-menu {
    background: var(--bbd-panel);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

.bb-menu button, .bp-menu button, .bb-user-menu-item,
.init-move-item, .cmp-pin-init-item, .byprogram-ctx-menu .ctx-item {
  border-radius: var(--bbd-r-row);
  color: var(--bbd-body);
  background: none;
}
.bb-menu button:hover, .bp-menu button:hover, .bb-user-menu-item:hover,
.init-move-item:hover, .cmp-pin-init-item:hover, .byprogram-ctx-menu .ctx-item:hover {
  background: rgba(255, 255, 255, .10);
  color: var(--bbd-ink);
}
/* "this is the current one" — brighter ink, never a fill, so it cannot be
   confused with the hover chip. */
.bb-menu button.is-selected, .bp-menu button.bp-on, .init-move-item.current {
  background: none;
  color: var(--bbd-ink);
  font-weight: 650;
}
.bb-menu-check, .init-move-item .mm-check { color: var(--bbd-pill-ink); }

/* Section labels and the little header lines each menu carries. */
.bb-menu-label, .init-move-menu-title, .bp-menu-h i, .bb-user-menu-mail,
.cmp-pin-empty { color: var(--bbd-muted); }
.bp-menu-h, .bb-user-menu-name { color: var(--bbd-ink); }
.bp-menu-h, .bb-user-menu-head { border-bottom-color: var(--bbd-line); }
.init-move-sep { background: var(--bbd-line); }
/* A destructive row keeps being destructive — but --red (#B23B3B) has no
   contrast on #252529, so it moves to the tint that does. */
.bb-user-menu-item.danger { color: var(--bbd-down); }
.bb-user-menu-item.danger:hover { background: rgba(255, 123, 133, .14); color: var(--bbd-down); }
.bb-user-menu-item svg { opacity: .8; }

/* 3b · CONTENT PANELS — an alert list, a checkbox grid, a funnel readout, the
   highlight palette. They are not lists of options, so they stay LIGHT cards
   and take only the geometry: same radius, same layered shadow, no border. A
   dark panel here would make a 520px-tall wall of alerts read as a modal. */
.notification-dropdown,
.kpi-picker,
.funnel-popover,
.bb-hl-pop {
  border-radius: var(--bbd-r-panel);
  box-shadow:
    0 0 0 1px rgba(16, 24, 40, .07),
    0 1px 2px rgba(16, 24, 40, .05),
    0 12px 28px -8px rgba(16, 24, 40, .16),
    0 32px 60px -26px rgba(16, 24, 40, .20);
  border-color: transparent;
}
/* The notification panel's arrow is drawn from two 1px borders in a rotated
   square; leaving them on a transparent-bordered panel leaves a floating
   chevron with nothing behind it. */
.notification-dropdown::before { border-color: rgba(16, 24, 40, .08); }
.notification-dropdown-header { border-radius: var(--bbd-r-panel) var(--bbd-r-panel) 0 0; }
.kpi-picker-item { border-radius: var(--bbd-r-row); }

@media (max-width: 560px) {
  .notification-dropdown, .kpi-picker { border-radius: 22px; }
}
