/* ==========================================================================
   BCM DESIGN SYSTEM — COMPONENTS
   Layered on top of Bootstrap 5 utilities + bcm-tokens.css.
   No AdminLTE / CoreUI / Metronic classes anywhere in this file.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body.bcm-app {
  max-width: 100%;
  overflow-x: hidden; /* belt-and-braces: a single overflowing child should
                          never be able to widen the whole page on mobile */
}

body.bcm-app {
  background: var(--bcm-bg);
  color: var(--bcm-ink);
  font-family: var(--bcm-font-body);
  font-size: var(--bcm-fs-base);
}

h1, h2, h3, h4, .bcm-display {
  font-family: var(--bcm-font-display);
  color: var(--bcm-ink);
  letter-spacing: -0.01em;
}

/* M61 — "make this premium": the serif is a deliberate display
   moment (page titles, hero numbers, a member's name on their card)
   — not a wholesale swap of every heading level, which would read
   heavy and inconsistent across the dozens of small in-app headers
   throughout the app. h2-h4 go back to the clean UI sans; h1
   (genuine page titles) keeps the serif. .bcm-card__title has its
   own rule further down, fixed directly there for the same reason. */
h2, h3, h4 {
  font-family: var(--bcm-font-body);
}

/* ---------------------------------------------------------------------- */
/* SHELL: sidebar + topbar + content grid                                  */
/* ---------------------------------------------------------------------- */
.bcm-shell {
  display: grid;
  grid-template-columns: var(--bcm-sidebar-width) 1fr;
  min-height: 100vh;
  transition: grid-template-columns var(--bcm-transition-base);
}
.bcm-main {
  min-width: 0; /* grid items default to min-width:auto — without this,
                   a single unwrappable line anywhere inside (e.g. the
                   dashboard's welcome-banner header row) could force
                   this entire column, and everything in it, wider than
                   the viewport. Same bug class as the topbar fix, one
                   level up the tree. */
}
.bcm-content {
  min-width: 0;
}
.bcm-shell.is-collapsed {
  grid-template-columns: var(--bcm-sidebar-width-collapsed) 1fr;
}

.bcm-sidebar {
  background: var(--bcm-white);
  border-right: 1px solid var(--bcm-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.bcm-sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--bcm-space-3);
  padding: var(--bcm-space-5) var(--bcm-space-4);
}
.bcm-sidebar__brand img {
  height: var(--bcm-logo-sidebar);
  width: auto;
  aspect-ratio: auto;
  object-fit: contain;
  transition: height var(--bcm-transition-base);
}
.is-collapsed .bcm-sidebar__brand img {
  height: var(--bcm-logo-sidebar-collapsed);
}
.bcm-sidebar__brand-text {
  font-family: var(--bcm-font-display);
  font-weight: 700;
  font-size: var(--bcm-fs-md);
  color: var(--bcm-primary);
  line-height: 1.15;
}
.is-collapsed .bcm-sidebar__brand-text,
.is-collapsed .bcm-nav-link__label,
.is-collapsed .bcm-nav-section__title {
  display: none;
}
/* Collapsing only hid the label text above — the link itself kept
   its full-width padding/margin (sized for icon+label side by side),
   so the icon sat left-anchored inside a wider-than-needed box
   instead of centered in the 76px rail, and any nav item with a
   badge or chevron (submenus) still showed them with no label next
   to them to make sense of. Reported as "active icon is big and not
   centred" — the icon glyph itself is unchanged size, what looked
   oversized/off-center was its highlight pill not being centered. */
.is-collapsed .bcm-nav-link {
  justify-content: center;
  padding: 0.6rem 0;
  width: 44px;
  margin-left: auto;
  margin-right: auto;
}
.is-collapsed .bcm-nav-link__badge,
.is-collapsed .bcm-nav-link__chevron {
  display: none;
}

.bcm-nav-search {
  margin: 0 var(--bcm-space-4) var(--bcm-space-3);
}
.bcm-nav-search input {
  border-radius: var(--bcm-radius-pill);
  border: 1px solid var(--bcm-border);
  background: var(--bcm-bg);
  font-size: var(--bcm-fs-sm);
}

.bcm-nav-section__title {
  font-size: var(--bcm-fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bcm-ink-muted);
  padding: var(--bcm-space-4) var(--bcm-space-4) var(--bcm-space-2);
}

.bcm-nav-link {
  display: flex;
  align-items: center;
  gap: var(--bcm-space-3);
  padding: 0.6rem var(--bcm-space-4);
  margin: 2px var(--bcm-space-3);
  border-radius: var(--bcm-radius-sm);
  color: var(--bcm-ink-muted);
  text-decoration: none;
  font-size: var(--bcm-fs-sm);
  font-weight: 500;
  transition: background var(--bcm-transition-fast), color var(--bcm-transition-fast);
  cursor: pointer;
}
.bcm-nav-link i, .bcm-nav-link .bcm-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.bcm-nav-link:hover {
  background: var(--bcm-primary-100);
  color: var(--bcm-primary);
}
.bcm-nav-link.is-active {
  background: var(--bcm-primary);
  color: #fff;
  box-shadow: var(--bcm-shadow-sm);
}
.bcm-nav-link__badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--bcm-radius-pill);
  background: var(--bcm-accent-gold);
  color: #fff;
}
.bcm-nav-link__chevron {
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform var(--bcm-transition-fast);
}
.bcm-nav-group.is-open > .bcm-nav-link .bcm-nav-link__chevron { transform: rotate(90deg); }
.bcm-nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--bcm-transition-base);
}
.bcm-nav-group.is-open .bcm-nav-submenu { max-height: 600px; }
.bcm-nav-submenu .bcm-nav-link { padding-left: calc(var(--bcm-space-4) + 20px + var(--bcm-space-3)); font-size: var(--bcm-fs-sm); }

.bcm-topbar {
  height: var(--bcm-topbar-height);
  background: var(--bcm-white);
  border-bottom: 1px solid var(--bcm-border);
  display: flex;
  align-items: center;
  gap: var(--bcm-space-3);
  padding: 0 var(--bcm-space-5);
  position: sticky;
  top: 0;
  z-index: 20;
  min-width: 0; /* allow this flex row to shrink instead of forcing page overflow */
}
.bcm-topbar__search {
  flex: 1;
  min-width: 0; /* flex items default to min-width:auto — without this the
                   input's intrinsic content width forced the whole topbar,
                   and with it the page, wider than the viewport on mobile */
  max-width: 420px;
}
.bcm-topbar__search input {
  width: 100%;
  border-radius: var(--bcm-radius-pill);
  border: 1px solid var(--bcm-border);
  background: var(--bcm-bg);
  padding: 0.5rem 1rem;
  font-size: var(--bcm-fs-sm);
}
.bcm-topbar__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--bcm-space-3);
  margin-left: auto;
}
.bcm-topbar__icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--bcm-ink-muted);
  transition: background var(--bcm-transition-fast), color var(--bcm-transition-fast);
}
.bcm-topbar__icon-btn:hover { background: var(--bcm-primary-100); color: var(--bcm-primary); }
.bcm-topbar__icon-btn .bcm-dot {
  position: absolute;
  top: 6px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bcm-danger);
  border: 2px solid var(--bcm-white);
}
.bcm-topbar__profile {
  display: flex;
  align-items: center;
  gap: var(--bcm-space-2);
  cursor: pointer;
}
.bcm-topbar__profile--btn {
  background: transparent;
  border: none;
  padding: var(--bcm-space-1) var(--bcm-space-2);
  border-radius: var(--bcm-radius-sm);
  transition: background var(--bcm-transition-fast);
}
.bcm-topbar__profile--btn:hover,
.bcm-topbar__profile--btn:focus-visible {
  background: var(--bcm-primary-100);
}
.bcm-topbar__profile img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bcm-primary-100);
}
.bcm-topbar__profile-menu {
  min-width: 220px;
  padding: var(--bcm-space-2);
  border: 1px solid var(--bcm-border);
  border-radius: var(--bcm-radius-md);
  box-shadow: var(--bcm-shadow-lg);
  font-family: var(--bcm-font-body);
}
.bcm-topbar__profile-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--bcm-space-2);
  padding: var(--bcm-space-2) var(--bcm-space-3);
  border-radius: var(--bcm-radius-sm);
  font-size: var(--bcm-fs-sm);
  color: var(--bcm-ink);
}
.bcm-topbar__profile-menu .dropdown-item:hover,
.bcm-topbar__profile-menu .dropdown-item:focus {
  background: var(--bcm-primary-100);
  color: var(--bcm-primary);
}
.bcm-topbar__profile-menu .dropdown-item.text-danger:hover {
  background: rgba(214, 69, 69, 0.1);
  color: var(--bcm-danger);
}
.bcm-topbar__profile-menu .dropdown-item i {
  width: 16px;
  text-align: center;
  color: var(--bcm-ink-muted);
}

/* M21: notifications dropdown behind the topbar bell — replaces the
   static always-on .bcm-dot that sat there since M1 with no behavior. */
.bcm-notif-badge {
  position: absolute;
  top: 3px; right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bcm-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.bcm-notif-dropdown {
  width: 340px;
  max-width: calc(100vw - 32px);
  padding: 0;
  border: 1px solid var(--bcm-border);
  border-radius: var(--bcm-radius-lg, 12px);
  box-shadow: var(--bcm-shadow-lg);
  overflow: hidden;
}
.bcm-notif-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bcm-border);
  font-weight: 700;
  color: var(--bcm-ink);
  font-size: var(--bcm-fs-sm);
}
.bcm-notif-dropdown__mark-all {
  background: none;
  border: none;
  color: var(--bcm-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.bcm-notif-dropdown__mark-all:hover { text-decoration: underline; }
.bcm-notif-dropdown__items {
  max-height: 360px;
  overflow-y: auto;
}
.bcm-notif-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--bcm-border);
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--bcm-transition-fast);
}
.bcm-notif-item:last-child { border-bottom: none; }
.bcm-notif-item:hover { background: var(--bcm-bg); }
.bcm-notif-item.is-unread { background: var(--bcm-primary-100); }
.bcm-notif-item.is-unread:hover { background: var(--bcm-primary-100); filter: brightness(0.97); }
.bcm-notif-item__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--bcm-ink);
  margin-bottom: 2px;
}
.bcm-notif-item__msg {
  font-size: 12px;
  color: var(--bcm-ink-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}
.bcm-notif-item__time {
  font-size: 11px;
  color: var(--bcm-ink-muted);
}
.bcm-notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--bcm-ink-muted);
  font-size: var(--bcm-fs-sm);
}
.bcm-notif-empty i {
  font-size: 22px;
  display: block;
  margin-bottom: 8px;
  opacity: 0.5;
}

.bcm-breadcrumb {
  font-size: var(--bcm-fs-xs);
  color: var(--bcm-ink-muted);
}
.bcm-breadcrumb a { color: var(--bcm-ink-muted); text-decoration: none; }
.bcm-breadcrumb a:hover { color: var(--bcm-primary); }

.bcm-content {
  padding: var(--bcm-space-6);
}

/* ---------------------------------------------------------------------- */
/* CARDS                                                                    */
/* ---------------------------------------------------------------------- */
.bcm-card {
  background: var(--bcm-white);
  border: 1px solid var(--bcm-border);
  border-radius: var(--bcm-radius-md);
  box-shadow: var(--bcm-shadow-sm);
  padding: var(--bcm-space-5);
  transition: box-shadow var(--bcm-transition-base), transform var(--bcm-transition-base);
}
.bcm-card--hover:hover {
  box-shadow: var(--bcm-shadow-md);
  transform: translateY(-2px);
}
.bcm-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--bcm-space-2);
  margin-bottom: var(--bcm-space-4);
}
.bcm-card__title {
  min-width: 0;
  font-family: var(--bcm-font-body);
  font-size: var(--bcm-fs-md);
  font-weight: 600;
}

/* Gradient stat cards (dashboard top row) */
.bcm-stat-card {
  border-radius: var(--bcm-radius-md);
  padding: var(--bcm-space-5);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--bcm-shadow-md);
  transition: transform var(--bcm-transition-base), box-shadow var(--bcm-transition-base);
  isolation: isolate;
}
.bcm-stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% -10%, rgba(255,255,255,0.25), transparent 55%);
  z-index: -1;
}
.bcm-stat-card:hover { transform: translateY(-4px); box-shadow: var(--bcm-shadow-lg); }
.bcm-stat-card--blue   { background: var(--bcm-grad-blue); }
.bcm-stat-card--purple { background: var(--bcm-grad-purple); }
.bcm-stat-card--orange { background: var(--bcm-grad-orange); }
.bcm-stat-card--green  { background: var(--bcm-grad-green); }
.bcm-stat-card--red    { background: var(--bcm-grad-red); }
.bcm-stat-card--teal   { background: var(--bcm-grad-teal); }

/* M61 — "make this premium": a row of identically-shaped, five
   different-hued gradient tiles is the generic dashboard default —
   it treats every number as equally important, which is rarely
   true. --hero is for the one number a screen actually leads with
   (kept full-weight, brand-anchored — navy/gold, not an arbitrary
   hue); --quiet is for the supporting numbers around it (a plain
   surface, a small brand-colored icon chip, no gradient, no colored
   background competing for attention). A screen typically uses one
   --hero and the rest --quiet, not five of one or the other. */
.bcm-stat-card--hero {
  background: var(--bcm-grad-blue);
}
.bcm-stat-card--hero .bcm-stat-card__value {
  font-size: var(--bcm-fs-3xl);
  font-variant-numeric: tabular-nums;
}
.bcm-stat-card--hero .bcm-stat-card__icon {
  background: rgba(232, 135, 30, 0.28);
}
.bcm-stat-card--quiet {
  background: var(--bcm-white);
  color: var(--bcm-ink);
  border: 1px solid var(--bcm-border);
  box-shadow: none;
}
.bcm-stat-card--quiet::after { display: none; }
.bcm-stat-card--quiet:hover { box-shadow: var(--bcm-shadow-sm); transform: none; }
.bcm-stat-card--quiet .bcm-stat-card__icon {
  background: var(--bcm-primary-100);
  color: var(--bcm-primary);
}
.bcm-stat-card--quiet .bcm-stat-card__label { color: var(--bcm-ink-muted); }
.bcm-stat-card--quiet .bcm-stat-card__trend { background: var(--bcm-primary-100); color: var(--bcm-primary); }

.bcm-stat-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.bcm-stat-card__icon {
  width: 42px; height: 42px;
  border-radius: var(--bcm-radius-sm);
  background: rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.bcm-stat-card__trend {
  font-size: var(--bcm-fs-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--bcm-radius-pill);
  background: rgba(255,255,255,0.18);
}
.bcm-stat-card__trend.is-down { background: rgba(0,0,0,0.18); }
.bcm-stat-card__value {
  font-family: var(--bcm-font-display);
  font-size: var(--bcm-fs-2xl);
  font-weight: 700;
  margin-top: var(--bcm-space-4);
  line-height: 1;
}
.bcm-stat-card__label {
  font-size: var(--bcm-fs-sm);
  opacity: 0.9;
  margin-top: var(--bcm-space-1);
}
.bcm-stat-card__sparkline {
  margin-top: var(--bcm-space-3);
  height: 32px;
  opacity: 0.9;
}

/* ---------------------------------------------------------------------- */
/* BUTTONS                                                                  */
/* ---------------------------------------------------------------------- */
.bcm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: var(--bcm-fs-sm);
  padding: 0.55rem 1.1rem;
  border-radius: var(--bcm-radius-sm);
  border: 1px solid transparent;
  transition: all var(--bcm-transition-fast);
  cursor: pointer;
}
.bcm-btn--primary { background: var(--bcm-primary); color: #fff; }
.bcm-btn--primary:hover { background: var(--bcm-primary-600); }
.bcm-btn--gold { background: var(--bcm-accent-gold); color: #fff; box-shadow: var(--bcm-shadow-glow-gold); }
.bcm-btn--outline { background: transparent; border-color: var(--bcm-border); color: var(--bcm-ink); }
.bcm-btn--outline:hover { border-color: var(--bcm-primary); color: var(--bcm-primary); }
.bcm-btn--ghost { background: transparent; color: var(--bcm-ink-muted); }
.bcm-btn--ghost:hover { background: var(--bcm-primary-100); color: var(--bcm-primary); }
.bcm-btn--danger.bcm-btn--outline { color: var(--bcm-danger); border-color: var(--bcm-danger); }
.bcm-btn--danger.bcm-btn--outline:hover { background: var(--bcm-danger); color: #fff; }
.bcm-btn--sm { padding: 0.35rem 0.75rem; font-size: var(--bcm-fs-xs); }
.bcm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--bcm-space-3);
  padding: var(--bcm-space-4);
  border-top: 1px solid var(--bcm-border);
}
.bcm-pagination__status { font-size: var(--bcm-fs-sm); color: var(--bcm-ink-muted); }


/* ---------------------------------------------------------------------- */
/* BADGES / STATUS PILLS                                                    */
/* ---------------------------------------------------------------------- */
.bcm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--bcm-fs-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--bcm-radius-pill);
}
.bcm-pill--success { background: #E4F6EE; color: var(--bcm-success); }
.bcm-pill--warning { background: #FDF1DF; color: #B5680C; }
.bcm-pill--danger  { background: #FBE8E8; color: var(--bcm-danger); }
.bcm-pill--info    { background: var(--bcm-primary-100); color: var(--bcm-primary); }
.bcm-pill--neutral { background: #EEF1F5; color: var(--bcm-ink-muted); }

/* ---------------------------------------------------------------------- */
/* AUTH PAGES (login / register / forgot / reset / verify)                  */
/* ---------------------------------------------------------------------- */
.bcm-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(44,95,138,0.10), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(232,135,30,0.10), transparent 45%),
    var(--bcm-bg);
  padding: var(--bcm-space-5);
}
.bcm-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bcm-white);
  border-radius: var(--bcm-radius-lg);
  box-shadow: var(--bcm-shadow-lg);
  padding: var(--bcm-space-7) var(--bcm-space-6);
}
.bcm-auth--wide { align-items: flex-start; padding-top: var(--bcm-space-6); padding-bottom: var(--bcm-space-6); }
.bcm-auth-card--wide {
  max-width: 760px;
  padding: var(--bcm-space-6) var(--bcm-space-5);
}
/* PC view: 760px reads as a narrow, phone-width column stranded in
   the middle of a full desktop monitor — reported as the apply form
   "not filling the PC view". Steps the ceiling up in two stages
   rather than jumping straight to full-bleed, so it still reads as
   a deliberate document width (like the physical form it mirrors)
   rather than stretching form fields uncomfortably wide. The sticky
   bar's own max-width is kept in lockstep at each breakpoint so its
   back/logout links stay left/right-aligned with the card edges
   above and below it. */
@media (min-width: 992px) {
  .bcm-auth-card--wide { max-width: 900px; }
  .bcm-apply-stickybar__inner { max-width: 900px; }
}
@media (min-width: 1400px) {
  .bcm-auth-card--wide { max-width: 1100px; }
  .bcm-apply-stickybar__inner { max-width: 1100px; }
}
.bcm-form-section-title {
  font-family: var(--bcm-font-body);
  font-size: var(--bcm-fs-md);
  font-weight: 700;
  color: var(--bcm-primary);
  border-bottom: 2px solid var(--bcm-primary-100);
  padding-bottom: var(--bcm-space-2);
  margin-bottom: var(--bcm-space-4);
}
.bcm-form-label {
  font-size: var(--bcm-fs-sm);
  font-weight: 600;
  color: var(--bcm-ink);
}
.bcm-bank-details {
  background: var(--bcm-primary-100);
  border-radius: var(--bcm-radius-sm);
  padding: var(--bcm-space-4);
}
.bcm-bank-details__title {
  font-weight: 700;
  color: var(--bcm-primary);
  margin-bottom: var(--bcm-space-2);
  font-size: var(--bcm-fs-sm);
}
.bcm-declaration {
  background: var(--bcm-bg);
  border: 1px dashed var(--bcm-border);
  border-radius: var(--bcm-radius-sm);
  padding: var(--bcm-space-4);
}
.bcm-apply-stickybar__link {
  display: inline-flex;
  align-items: center;
  gap: var(--bcm-space-2);
  font-size: var(--bcm-fs-sm);
  font-weight: 600;
  color: var(--bcm-ink-muted);
  text-decoration: none;
  transition: color var(--bcm-transition-fast);
}
.bcm-apply-stickybar__link:hover {
  color: var(--bcm-primary);
}
.bcm-apply-stickybar__link--danger:hover {
  color: var(--bcm-danger);
}
.bcm-apply-stickybar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bcm-white);
  border-bottom: 1px solid var(--bcm-border);
  box-shadow: var(--bcm-shadow-sm);
}
.bcm-apply-stickybar__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--bcm-space-3) var(--bcm-space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bcm-auth-card__back {
  display: inline-flex;
  align-items: center;
  gap: var(--bcm-space-2);
  font-size: var(--bcm-fs-sm);
  font-weight: 600;
  color: var(--bcm-ink-muted);
  text-decoration: none;
  margin-bottom: var(--bcm-space-4);
  transition: color var(--bcm-transition-fast);
}
.bcm-auth-card__back:hover {
  color: var(--bcm-primary);
}
.bcm-auth-card__logo {
  display: block;
  height: var(--bcm-logo-login);
  width: auto;
  margin: 0 auto var(--bcm-space-4);
  object-fit: contain;
}
.bcm-auth-card h1 {
  font-size: var(--bcm-fs-xl);
  text-align: center;
  margin-bottom: var(--bcm-space-1);
}
.bcm-auth-card__subtitle {
  text-align: center;
  color: var(--bcm-ink-muted);
  font-size: var(--bcm-fs-sm);
  margin-bottom: var(--bcm-space-6);
}
.bcm-field {
  position: relative;
  margin-bottom: var(--bcm-space-4);
}
.bcm-field input {
  width: 100%;
  border: 1px solid var(--bcm-border);
  border-radius: var(--bcm-radius-sm);
  padding: 1.1rem 0.9rem 0.4rem;
  font-size: var(--bcm-fs-base);
  background: var(--bcm-bg);
  color: var(--bcm-ink);
  color-scheme: light;
}
.bcm-field input:focus {
  outline: none;
  border-color: var(--bcm-secondary);
  box-shadow: 0 0 0 3px rgba(44,95,138,0.12);
}
.bcm-field label {
  position: absolute;
  left: 0.9rem;
  top: 0.75rem;
  font-size: var(--bcm-fs-base);
  color: var(--bcm-ink-muted);
  transition: all var(--bcm-transition-fast);
  pointer-events: none;
}
.bcm-field input:focus + label,
.bcm-field input:not(:placeholder-shown) + label {
  top: 0.35rem;
  font-size: 0.6875rem;
  color: var(--bcm-secondary);
}
.bcm-field__toggle {
  position: absolute;
  right: 0.8rem;
  top: 0.65rem;
  background: none;
  border: none;
  color: var(--bcm-ink-muted);
  cursor: pointer;
}
.bcm-strength-meter {
  height: 4px;
  border-radius: var(--bcm-radius-pill);
  background: var(--bcm-border);
  overflow: hidden;
  margin-top: 0.4rem;
}
.bcm-strength-meter__fill {
  height: 100%;
  width: 0%;
  transition: width var(--bcm-transition-base), background var(--bcm-transition-base);
}

/* ---------------------------------------------------------------------- */
/* MISC: tables, empty states, "coming soon"                                */
/* ---------------------------------------------------------------------- */
.bcm-table thead th {
  font-size: var(--bcm-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bcm-ink-muted);
  border-bottom: 1px solid var(--bcm-border);
  font-weight: 600;
  padding: var(--bcm-space-3) var(--bcm-space-3);
}
.bcm-table tbody td {
  padding: var(--bcm-space-3);
  border-bottom: 1px solid var(--bcm-border);
  font-size: var(--bcm-fs-sm);
  vertical-align: middle;
}
.bcm-table tbody tr:hover { background: var(--bcm-bg); }

.bcm-coming-soon {
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--bcm-space-8) var(--bcm-space-5);
  color: var(--bcm-ink-muted);
}
.bcm-coming-soon i {
  font-size: 2.5rem;
  color: var(--bcm-secondary);
  margin-bottom: var(--bcm-space-3);
}
.bcm-coming-soon h3 { color: var(--bcm-ink); margin-bottom: var(--bcm-space-2); }

/* M26.1: compact variant for empty states inside a chart card
   (bcm-coming-soon's default space-8 padding is sized for a
   full-width page section, not a card slot). */
.bcm-coming-soon--sm {
  padding: var(--bcm-space-5) var(--bcm-space-3);
}
.bcm-coming-soon--sm i { font-size: 1.5rem; margin-bottom: var(--bcm-space-2); }

.bcm-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--bcm-fs-xs);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--bcm-radius-pill);
  background: var(--bcm-ink);
  color: #fff;
}

/* ---------------------------------------------------------------------- */
/* ALERTS (auth page success/error banners)                                */
/* ---------------------------------------------------------------------- */
.bcm-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--bcm-fs-sm);
  border-radius: var(--bcm-radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: var(--bcm-space-4);
}
.bcm-alert i { margin-top: 0.15rem; }
.bcm-alert--success { background: #E4F6EE; color: #0F6B45; }
.bcm-alert--error   { background: #FBE8E8; color: #A32E2E; }
.bcm-alert--info    { background: var(--bcm-primary-100); color: var(--bcm-primary); }

/* ---------------------------------------------------------------------- */
/* DASHBOARD WIDGETS (Milestone 3)                                         */
/* ---------------------------------------------------------------------- */
.bcm-chart-wrap { position: relative; height: 260px; width: 100%; }
.bcm-chart-wrap canvas { max-width: 100%; }
@media (max-width: 576px) { .bcm-chart-wrap { height: 200px; } }

/* ---------------------------------------------------------------------- */
/* EXPORTABLE MEMBERSHIP CARD (M19.9) — rendered off-screen at fixed high-  */
/* res pixel dimensions, captured via html2canvas, then exported as PDF/   */
/* JPEG or handed to the native share sheet. Deliberately NOT responsive — */
/* this is a print/export surface, not a page layout, so it uses fixed px */
/* throughout rather than the rem-based scale the rest of the UI uses.    */
/* ---------------------------------------------------------------------- */
.bcm-export-card-host {
  position: fixed;
  left: -9999px;
  top: 0;
  pointer-events: none;
}
/* Membership card — ported from an HTML5 prototype the person
   supplied directly (bcm-membership-prototype.html), built around
   the Amelia reference image as sole visual authority. Explicitly
   NOT flex-centering this time — absolute/grid positioning per the
   prototype, matching its "treat the card like a design canvas"
   direction. Rendered and screenshotted with a real headless Chrome
   before shipping (see PROJECT_STATE.md) rather than reasoned about
   blind like the three previous rounds. Class names prefixed
   bcm-export-card__ as in every previous port, for the same reason:
   the source's bare names are generic enough to collide with the
   rest of this shared stylesheet. */
.bcm-export-card {
  width: 1536px;
  height: 760px;
  position: relative;
  overflow: hidden;
  background: #faf8f2;
  border-radius: 32px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.18);
  font-family: Arial, Helvetica, sans-serif;
}
.bcm-export-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16,41,77,0.035) 25%, transparent 25%, transparent 50%, rgba(244,119,33,0.025) 50%, rgba(244,119,33,0.025) 75%, transparent 75%);
  background-size: 80px 80px;
  opacity: 0.35;
  pointer-events: none;
}
.bcm-export-card__brand {
  position: absolute;
  left: 58px;
  top: 42px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 10;
}
.bcm-export-card__logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 5px;
}
.bcm-export-card__brand-copy { display: flex; flex-direction: column; }
.bcm-export-card__brand-title {
  margin: 0;
  color: #10294d;
  font-size: 38px;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -1.1px;
}
.bcm-export-card__tagline {
  margin-top: 12px;
  color: #f47721;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.8px;
}
.bcm-export-card__ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 390px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f47721;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.7px;
  z-index: 20;
  clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
}
.bcm-export-card__photo-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: 640px;
  height: 430px;
  background: #10294d;
  border-radius: 0 0 0 150px;
  overflow: visible;
  z-index: 5;
}
.bcm-export-card__photo-panel::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 230px;
  right: -150px;
  bottom: -125px;
  border: 26px solid #f47721;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 0 100%;
  transform: rotate(-12deg);
  pointer-events: none;
}
.bcm-export-card__photo-panel::after {
  content: "";
  position: absolute;
  width: 430px;
  height: 190px;
  right: -105px;
  bottom: -100px;
  border: 12px solid #fff;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 0 100%;
  transform: rotate(-12deg);
  pointer-events: none;
}
.bcm-export-card__photo {
  position: absolute;
  left: 55px;
  top: 80px;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: #f47721;
  padding: 10px;
  z-index: 12;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  overflow: hidden;
}
.bcm-export-card__photo img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; background: #ccc; }
.bcm-export-card__photo .bcm-export-card__initials {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 88px; font-weight: 900; color: #fff;
  background: #16345e;
}
.bcm-export-card__status {
  position: absolute;
  right: 45px;
  top: 78px;
  color: #fff;
  z-index: 15;
  text-align: right;
}
.bcm-export-card__status-label {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.bcm-export-card__status-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 18px;
}
.bcm-export-card__status-dot { width: 13px; height: 13px; border-radius: 50%; background: #36d65c; }
.bcm-export-card__status.is-expired .bcm-export-card__status-dot { background: #e05353; }
.bcm-export-card__name {
  position: absolute;
  left: 58px;
  right: 680px;
  top: 325px;
  z-index: 20;
  margin: 0;
  color: #10294d;
  font-size: 56px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bcm-export-card__divider {
  position: absolute;
  left: 58px;
  right: 58px;
  top: 410px;
  height: 3px;
  background: #f47721;
  z-index: 10;
}
.bcm-export-card__info-row {
  position: absolute;
  left: 58px;
  right: 58px;
  top: 438px;
  height: 105px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  column-gap: 25px;
  z-index: 10;
}
.bcm-export-card__info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.bcm-export-card__icon {
  width: 45px;
  height: 45px;
  min-width: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f47721;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
}
.bcm-export-card__label {
  display: block;
  margin-bottom: 5px;
  color: #68717d;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.bcm-export-card__value {
  display: block;
  color: #10294d;
  font-size: 19px;
  font-weight: 800;
  white-space: nowrap;
}
.bcm-export-card__qr {
  position: absolute;
  right: 55px;
  top: 310px;
  width: 180px;
  height: 190px;
  padding: 13px;
  background: #fff;
  border-radius: 14px;
  z-index: 30;
  box-shadow: 0 8px 22px rgba(0,0,0,0.15);
  text-align: center;
}
.bcm-export-card__qr img { width: 145px; height: 145px; display: block; margin: 0 auto 5px; object-fit: contain; }
.bcm-export-card__qr span { display: block; color: #10294d; font-size: 11px; font-weight: 900; letter-spacing: 0.5px; }
.bcm-export-card__strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 145px;
  background: #10294d;
  z-index: 25;
  /* Grid with fixed grid-template-columns (as in the prototype) looks
     right with all 4 items present, but doesn't reflow when
     fillOrHideItem() hides one for a legacy member without
     Province/Ward — the hidden item's column stays empty rather than
     the remaining items expanding to fill the row. Found via an
     actual headless-Chrome render, not visible from the CSS alone.
     flex:1 on each visible item is the correct tool for "some number
     of items, evenly fill the row" — this is a different situation
     from the earlier flex-centering mistake (that was about
     vertically centering the main name/divider/info-row block,
     which this isn't). */
  display: flex;
  align-items: center;
  padding: 0 58px;
}
.bcm-export-card__strip .bcm-export-card__info-item {
  flex: 1;
  min-width: 0;
  height: 65px;
  padding-right: 30px;
  border-right: 1px solid rgba(255,255,255,0.18);
  align-items: center;
}
.bcm-export-card__strip .bcm-export-card__info-item:last-child { border-right: none; }
.bcm-export-card__strip .bcm-export-card__icon { background: #f47721; }
.bcm-export-card__strip .bcm-export-card__label { color: #b9c2d0; margin-bottom: 5px; }
.bcm-export-card__strip .bcm-export-card__value { color: #fff; font-size: 18px; }

/* ---------------------------------------------------------------------- */
/* FOUNDER MEMBER CARD (M23.x)                                             */
/* The president's mandate — first 1,000 approved members get a visually
   distinct card. Reuses the base .bcm-export-card canvas/skeleton (same
   1536x760 size, same photo panel, QR, info-row, strip — all still driven
   by the exact same data-slot names bcm-core.js already fills) so the
   export/share/PDF pipeline needed zero JS changes beyond picking which
   <template> to clone. Everything below only overrides what makes this
   card read as a different, more prestigious tier: the corner blob-wash
   background, the leopard emblem badge in place of the round BCM logo +
   org name, and a gold "FOUNDER MEMBER" headline in place of the orange
   ribbon. Adapted from the person's supplied Founder Member Card mockup —
   not a pixel clone (that mockup's rectangular photo frame and hand-drawn
   blob shapes aren't something html2canvas can safely reproduce from raw
   photos/CSS), but the same navy/gold/orange language and leopard badge. */
.bcm-export-card--founder::before {
  background:
    radial-gradient(ellipse 260px 170px at -50px -40px, rgba(232,135,30,0.55), transparent 70%),
    radial-gradient(ellipse 230px 150px at 1610px 40px, rgba(16,41,77,0.5), transparent 70%),
    radial-gradient(ellipse 280px 180px at -40px 830px, rgba(16,41,77,0.42), transparent 70%),
    radial-gradient(ellipse 260px 170px at 1600px 800px, rgba(232,135,30,0.5), transparent 70%);
  opacity: 1;
}
.bcm-export-card__founder-badge {
  position: absolute;
  left: 50px;
  top: 34px;
  width: 132px;
  height: 132px;
  z-index: 15;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25));
}
.bcm-export-card__founder-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bcm-export-card__brand--founder {
  position: absolute;
  left: 202px;
  top: 46px;
  z-index: 15;
  max-width: 950px;
}
.bcm-export-card__founder-title {
  margin: 0;
  color: #E8871E;
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.3px;
}
.bcm-export-card__founder-subtitle {
  margin-top: 12px;
  color: #10294d;
  font-size: 21px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bcm-export-card__divider--founder { background: #c9952f; }
.bcm-export-card--founder .bcm-export-card__photo { background: #10294d; }
.bcm-export-card--founder .bcm-export-card__photo .bcm-export-card__initials { background: #E8871E; }

/* Download/share action row shown under a card preview */
.bcm-card-actions {
  display: flex;
  gap: var(--bcm-space-2);
  margin-top: var(--bcm-space-3);
  flex-wrap: wrap;
}
.bcm-card-actions .bcm-btn { flex: 1 1 auto; justify-content: center; }
.bcm-card-actions[data-busy="true"] { opacity: 0.6; pointer-events: none; }
.bcm-qr-card__download {
  position: absolute;
  top: var(--bcm-space-2);
  right: var(--bcm-space-2);
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--bcm-transition-fast);
}
.bcm-qr-card__download:hover { background: rgba(255,255,255,0.32); }
.bcm-qr-card__download[data-busy="true"] { opacity: 0.6; pointer-events: none; }

.bcm-timeline { list-style: none; margin: 0; padding: 0; }
.bcm-timeline li {
  display: flex;
  gap: var(--bcm-space-3);
  padding-bottom: var(--bcm-space-4);
  position: relative;
}
.bcm-timeline li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px; top: 34px; bottom: 0;
  width: 2px;
  background: var(--bcm-border);
}
.bcm-timeline__icon {
  width: 32px; height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.75rem;
  z-index: 1;
}
.bcm-timeline__icon--blue   { background: var(--bcm-secondary); }
.bcm-timeline__icon--green  { background: var(--bcm-success); }
.bcm-timeline__icon--orange { background: var(--bcm-accent-gold); }
.bcm-timeline__icon--purple { background: var(--bcm-purple); }
.bcm-timeline__icon--red    { background: var(--bcm-danger); }
.bcm-timeline__text { font-size: var(--bcm-fs-sm); color: var(--bcm-ink); }
.bcm-timeline__time { font-size: var(--bcm-fs-xs); color: var(--bcm-ink-muted); margin-top: 2px; }

.bcm-list-row {
  display: flex;
  align-items: center;
  gap: var(--bcm-space-3);
  padding: var(--bcm-space-3) 0;
  border-bottom: 1px solid var(--bcm-border);
}
.bcm-list-row:last-child { border-bottom: none; padding-bottom: 0; }
.bcm-list-row__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bcm-primary-100);
  color: var(--bcm-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: var(--bcm-fs-sm);
  flex-shrink: 0;
  overflow: hidden;
}
.bcm-list-row__avatar img,
.bcm-avatar-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.bcm-list-row__title { font-size: var(--bcm-fs-sm); font-weight: 600; }
.bcm-list-row__meta { font-size: var(--bcm-fs-xs); color: var(--bcm-ink-muted); }

.bcm-event-row {
  display: flex;
  gap: var(--bcm-space-3);
  padding: var(--bcm-space-3) 0;
  border-bottom: 1px solid var(--bcm-border);
}
.bcm-event-row:last-child { border-bottom: none; padding-bottom: 0; }
.bcm-event-row__date {
  min-width: 52px;
  text-align: center;
  background: var(--bcm-primary-100);
  color: var(--bcm-primary);
  border-radius: var(--bcm-radius-sm);
  padding: 0.35rem 0.25rem;
  font-size: var(--bcm-fs-xs);
  font-weight: 700;
  line-height: 1.2;
}
.bcm-event-row__title { font-size: var(--bcm-fs-sm); font-weight: 600; }
.bcm-event-row__meta { font-size: var(--bcm-fs-xs); color: var(--bcm-ink-muted); }

.bcm-announcement + .bcm-announcement { margin-top: var(--bcm-space-3); padding-top: var(--bcm-space-3); border-top: 1px solid var(--bcm-border); }
.bcm-announcement__title { font-size: var(--bcm-fs-sm); font-weight: 600; margin-bottom: 2px; }
.bcm-announcement__excerpt { font-size: var(--bcm-fs-xs); color: var(--bcm-ink-muted); }
.bcm-announcement__date { font-size: var(--bcm-fs-xs); color: var(--bcm-secondary); margin-top: 4px; }

/* ---------------------------------------------------------------------- */
/* SIDEBAR SEARCH + MOBILE BACKDROP (Milestone 4)                          */
/* ---------------------------------------------------------------------- */
.bcm-nav-link--hidden { display: none !important; }
.bcm-nav-section__title--hidden { display: none !important; }

.bcm-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 32, 0.45);
  z-index: 39;
}
.bcm-shell.is-sidebar-open .bcm-sidebar-backdrop { display: block; }

/* ---------------------------------------------------------------------- */
/* MEMBER MANAGEMENT (Milestone 5)                                         */
/* ---------------------------------------------------------------------- */
.bcm-filter-bar {
  display: flex;
  gap: var(--bcm-space-3);
  flex-wrap: wrap;
}
.bcm-filter-bar__search {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.bcm-filter-bar__search i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bcm-ink-muted);
  font-size: 0.85rem;
}
.bcm-filter-bar__search input {
  width: 100%;
  padding-left: 2.4rem;
  border-radius: var(--bcm-radius-sm);
  border: 1px solid var(--bcm-border);
  background: var(--bcm-bg);
  font-size: var(--bcm-fs-sm);
}
.bcm-filter-bar select {
  min-width: 160px;
  border-radius: var(--bcm-radius-sm);
  border: 1px solid var(--bcm-border);
  background: var(--bcm-bg);
  font-size: var(--bcm-fs-sm);
}
@media (max-width: 576px) {
  .bcm-filter-bar select { min-width: 0; flex: 1 1 45%; }
}

.bcm-qr-card {
  background: var(--bcm-grad-blue);
  color: #fff;
  border-radius: var(--bcm-radius-md);
  padding: var(--bcm-space-5);
  text-align: center;
  position: relative;
}
.bcm-qr-card__brand { font-size: var(--bcm-fs-xs); opacity: 0.85; text-transform: uppercase; letter-spacing: 0.06em; }
.bcm-qr-card__name { font-family: var(--bcm-font-display); font-size: var(--bcm-fs-lg); font-weight: 700; margin-top: 0.25rem; }
.bcm-qr-card__no { font-size: var(--bcm-fs-xs); opacity: 0.85; margin-bottom: var(--bcm-space-3); }
.bcm-qr-card__qr {
  width: 96px; height: 96px;
  margin: 0 auto var(--bcm-space-2);
  background: rgba(255,255,255,0.95);
  border-radius: var(--bcm-radius-sm);
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  color: var(--bcm-primary);
}
.bcm-qr-card__note { font-size: 0.6875rem; opacity: 0.75; line-height: 1.3; }
.bcm-qr-card__photo {
  width: 72px; height: 72px;
  margin: 0 auto var(--bcm-space-2);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15);
}
.bcm-qr-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bcm-qr-card__photo .bcm-list-row__avatar { width: 100%; height: 100%; font-size: var(--bcm-fs-lg); background: rgba(255,255,255,0.2); color: #fff; }

/* Founder Member — on-screen preview card (M23.x). The exported
   PNG/PDF gets its own full redesign (.bcm-export-card--founder,
   below); this is just enough visual distinction on the in-app
   preview grid/profile card that staff can tell at a glance without
   opening the export. */
.bcm-qr-card--founder {
  background: linear-gradient(135deg, #10294d 0%, #1B3A5C 55%, #E8871E 130%);
}
.bcm-qr-card__founder-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bcm-accent-gold);
  color: #10294d;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--bcm-radius-pill);
  z-index: 2;
}

/* ---------------------------------------------------------------------- */
/* MEMBER IDENTITY — PHOTO CAPTURE (Milestone 17)                          */
/* ---------------------------------------------------------------------- */
.bcm-photo-capture__preview {
  width: 140px; height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--bcm-space-3);
  border: 3px solid var(--bcm-border);
  background: var(--bcm-primary-100);
  display: grid;
  place-items: center;
}
.bcm-photo-capture__preview img { width: 100%; height: 100%; object-fit: cover; }
.bcm-photo-capture__preview .bcm-list-row__avatar { width: 100%; height: 100%; font-size: var(--bcm-fs-2xl, 2rem); }
.bcm-photo-capture__actions { display: flex; gap: var(--bcm-space-2); justify-content: center; flex-wrap: wrap; }
.bcm-photo-capture__hint { font-size: var(--bcm-fs-xs); color: var(--bcm-ink-muted); text-align: center; margin-top: var(--bcm-space-2); }
.bcm-photo-capture__reason {
  margin-top: var(--bcm-space-3);
  padding: var(--bcm-space-3);
  border-radius: var(--bcm-radius-sm);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  font-size: var(--bcm-fs-sm);
  color: var(--bcm-danger, #dc2626);
}

/* Camera capture modal */
.bcm-camera-modal video,
.bcm-camera-modal canvas {
  width: 100%;
  max-width: 420px;
  border-radius: var(--bcm-radius-md);
  background: #111;
  display: block;
  margin: 0 auto;
}
.bcm-camera-modal canvas { display: none; }
.bcm-camera-modal__actions { display: flex; gap: var(--bcm-space-2); justify-content: center; margin-top: var(--bcm-space-3); }
.bcm-camera-modal__error { font-size: var(--bcm-fs-sm); color: var(--bcm-danger, #dc2626); text-align: center; }

/* Staff photo-verification queue */
.bcm-photo-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--bcm-space-4); }
.bcm-photo-queue__card { text-align: center; }
.bcm-photo-queue__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--bcm-radius-md);
  overflow: hidden;
  background: var(--bcm-primary-100);
  margin-bottom: var(--bcm-space-3);
}
.bcm-photo-queue__img img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.bcm-photo-queue__actions { display: flex; gap: var(--bcm-space-2); justify-content: center; flex-wrap: wrap; margin-top: var(--bcm-space-2); }

.bcm-tabs.nav-tabs { border-bottom: 1px solid var(--bcm-border); }
.bcm-tabs.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--bcm-ink-muted);
  font-size: var(--bcm-fs-sm);
  font-weight: 600;
  padding: 0.6rem 0.25rem;
  margin-right: var(--bcm-space-5);
  border-radius: 0;
}
.bcm-tabs.nav-tabs .nav-link:hover { color: var(--bcm-primary); border-color: transparent; }
.bcm-tabs.nav-tabs .nav-link.active {
  color: var(--bcm-primary);
  background: transparent;
  border-bottom-color: var(--bcm-primary);
}

/* ---------------------------------------------------------------------- */
/* PAGE HEADER (title + primary action — dashboard, screen headers)        */
/* ---------------------------------------------------------------------- */
.bcm-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--bcm-space-3);
}
.bcm-page-header > div:first-child {
  min-width: 0;
  flex: 1 1 240px;
}
.bcm-page-header .bcm-btn {
  flex-shrink: 0;
}
@media (max-width: 576px) {
  .bcm-page-header .bcm-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------------------------------------------------------------------- */
/* FLOATING SCROLL NAV (M19.6) — back-to-top + mobile menu shortcut,        */
/* shown once the user has scrolled past ~1 screen. Lives in the shared    */
/* shell footer so it's available on the dashboard and every ?bcm_screen=  */
/* route, not just one page.                                               */
/* ---------------------------------------------------------------------- */
.bcm-scroll-nav {
  position: fixed;
  right: var(--bcm-space-5);
  /* Sits directly above the chat widget's bubble (.bcm-chat-widget:
     bottom 24px, 60px tall) plus a visual gap. Previously both this
     and .bcm-chat-widget anchored to the exact same bottom-right
     corner (bottom/right: 24px), so the two floating buttons
     rendered stacked on top of each other once both were visible —
     confirmed from the person's screenshot. */
  bottom: calc(24px + 60px + var(--bcm-space-4) + env(safe-area-inset-bottom, 0px));
  z-index: 30; /* above .bcm-topbar (20), below the chat widget (9999) and modals/dropdowns */
  display: flex;
  flex-direction: column;
  gap: var(--bcm-space-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--bcm-transition-base), transform var(--bcm-transition-base), visibility 0s linear var(--bcm-transition-base);
}
.bcm-scroll-nav.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--bcm-transition-base), transform var(--bcm-transition-base);
}
.bcm-scroll-nav__btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--bcm-shadow-lg);
  transition: transform var(--bcm-transition-fast), box-shadow var(--bcm-transition-fast);
}
.bcm-scroll-nav__btn:hover { transform: translateY(-2px); }
.bcm-scroll-nav__btn--top {
  background: var(--bcm-primary);
  color: var(--bcm-white);
}
.bcm-scroll-nav__btn--menu {
  background: var(--bcm-white);
  color: var(--bcm-primary);
  border: 1px solid var(--bcm-border);
}
@media (max-width: 576px) {
  .bcm-scroll-nav { right: var(--bcm-space-4); }
}
@media (max-width: 480px) {
  /* Matches .bcm-chat-widget's own ≤480px breakpoint (bottom: 12px,
     bubble still 60px tall), so clearance stays correct instead of
     reverting to the old same-corner overlap on small screens. */
  .bcm-scroll-nav { bottom: calc(12px + 60px + var(--bcm-space-3) + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------------------------------------------------------------- */
/* WORKFLOW STEPPER (Milestone 6 — Applications)                           */
/* ---------------------------------------------------------------------- */
.bcm-stepper {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.bcm-stepper__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  min-width: 0;
}
.bcm-stepper__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 2px;
  background: var(--bcm-border);
  z-index: 0;
}
.bcm-stepper__step.is-done:not(:last-child)::after { background: var(--bcm-success); }
.bcm-stepper__dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bcm-bg);
  border: 2px solid var(--bcm-border);
  color: var(--bcm-ink-muted);
  font-size: 0.8rem;
  z-index: 1;
  margin-bottom: var(--bcm-space-2);
}
.bcm-stepper__label {
  font-size: var(--bcm-fs-xs);
  font-weight: 600;
  color: var(--bcm-ink-muted);
}
.bcm-stepper__step.is-done .bcm-stepper__dot { background: var(--bcm-success); border-color: var(--bcm-success); color: #fff; }
.bcm-stepper__step.is-done .bcm-stepper__label { color: var(--bcm-ink); }
.bcm-stepper__step.is-active .bcm-stepper__dot { background: var(--bcm-secondary); border-color: var(--bcm-secondary); color: #fff; }
.bcm-stepper__step.is-active .bcm-stepper__label { color: var(--bcm-primary); }
.bcm-stepper__step.is-rejected .bcm-stepper__dot { background: var(--bcm-danger); border-color: var(--bcm-danger); color: #fff; }
.bcm-stepper__step.is-rejected .bcm-stepper__label { color: var(--bcm-danger); }
@media (max-width: 576px) {
  .bcm-stepper__label { font-size: 0.65rem; }
  .bcm-stepper__dot { width: 30px; height: 30px; }
  .bcm-stepper__step:not(:last-child)::after { top: 15px; }
}

/* ---------------------------------------------------------------------- */
/* SEGMENTED CONTROL (Milestone 8 — Reports period selector)               */
/* ---------------------------------------------------------------------- */
.bcm-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  background: var(--bcm-white);
  border: 1px solid var(--bcm-border);
  border-radius: var(--bcm-radius-pill);
  padding: 3px;
}
.bcm-segmented__item {
  border: none;
  background: transparent;
  color: var(--bcm-ink-muted);
  font-size: var(--bcm-fs-sm);
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: var(--bcm-radius-pill);
  transition: background var(--bcm-transition-fast), color var(--bcm-transition-fast);
}
.bcm-segmented__item:hover { color: var(--bcm-primary); }
.bcm-segmented__item.is-active { background: var(--bcm-primary); color: #fff; }
@media (max-width: 576px) {
  .bcm-segmented { width: 100%; }
  .bcm-segmented__item { flex: 1 1 auto; }
}

@media (max-width: 992px) {
  .bcm-shell { grid-template-columns: 1fr; }
  .bcm-sidebar { position: fixed; left: -100%; width: var(--bcm-sidebar-width); z-index: 40; transition: left var(--bcm-transition-base); }
  .bcm-shell.is-sidebar-open .bcm-sidebar { left: 0; box-shadow: var(--bcm-shadow-lg); }
  .bcm-content { padding: var(--bcm-space-4); }
  .bcm-topbar { padding: 0 var(--bcm-space-4); gap: var(--bcm-space-2); }
  .bcm-topbar__actions { gap: var(--bcm-space-2); }
}

@media (max-width: 576px) {
  .bcm-topbar__search { display: none; } /* no room next to the icon
    cluster at this width — reappears at 577px+. Sidebar's own search
    (nav filtering) remains available regardless of viewport width. */
  .bcm-topbar { padding: 0 var(--bcm-space-3); }
  .bcm-content { padding: var(--bcm-space-3); }
  .bcm-stat-card__value { font-size: var(--bcm-fs-xl); }
}

/* ==========================================================
   LIVE CHAT — visitor widget + staff inbox screen
========================================================== */
.bcm-chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  font-family: var(--bcm-font-body, Arial, sans-serif);
}
/* Several elements below (.bcm-chat-widget__panel, .bcm-chat-widget__form,
   .bcm-chat-inbox__detail) set their own `display: flex` for their
   visible state, which — found via an actual headless-Chrome render,
   not obvious from the CSS alone — silently overrides the browser's
   default `[hidden] { display: none }` rule once a more specific
   class selector also sets `display`. Without this, toggling the
   `hidden` attribute in JS did nothing and the panel/form showed
   permanently open. */
.bcm-chat-widget__panel[hidden],
.bcm-chat-widget__form[hidden],
.bcm-chat-inbox__detail[hidden] {
  display: none;
}
.bcm-chat-widget__bubble {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #173F67, #102A47);
  color: #fff;
  font-size: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16,41,77,0.35);
  transition: transform var(--bcm-transition-fast, 140ms);
}
.bcm-chat-widget__bubble:hover { transform: translateY(-2px); }
.bcm-chat-widget__bubble-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #36d65c;
  border: 2px solid #fff;
}
.bcm-chat-widget__panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(16,41,77,0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bcm-chat-widget__header {
  background: linear-gradient(135deg, #F58220, #F7931E);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}
.bcm-chat-widget__header-title { font-weight: 800; font-size: 15px; }
.bcm-chat-widget__header-sub { font-size: 12px; opacity: 0.9; margin-top: 2px; text-transform: capitalize; }
.bcm-chat-widget__header-actions { display: flex; align-items: center; gap: 10px; padding-top: 2px; }
.bcm-chat-widget__icon-btn { background: none; border: none; color: #fff; font-size: 14px; cursor: pointer; opacity: 0.85; }
.bcm-chat-widget__icon-btn:hover { opacity: 1; }
.bcm-chat-widget__close { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; opacity: 0.85; }
.bcm-chat-widget__close:hover { opacity: 1; }
.bcm-chat-widget__typing {
  font-size: 12px;
  font-style: italic;
  color: var(--bcm-ink-muted);
  padding: 2px 4px 6px;
  flex-shrink: 0;
}
.bcm-chat-widget__offline-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bcm-primary-100);
  color: var(--bcm-primary);
  border-radius: var(--bcm-radius-sm);
  padding: 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.bcm-chat-widget__offline-notice i { margin-top: 2px; }
.bcm-chat-widget__offline-notice strong { display: block; margin-bottom: 2px; }
.bcm-chat-widget__body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 16px; overflow-y: auto; }
.bcm-chat-widget__depts { display: flex; flex-direction: column; gap: 8px; }
.bcm-chat-widget__dept {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--bcm-border, #E4E8EE);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--bcm-transition-fast, 140ms);
}
.bcm-chat-widget__dept:hover, .bcm-chat-widget__dept.is-selected { border-color: #F58220; }
.bcm-chat-widget__dept-name { font-weight: 700; font-size: 13.5px; color: #173F67; }
.bcm-chat-widget__dept-status { font-size: 11.5px; color: var(--bcm-ink-muted, #5A6478); font-weight: 600; }
.bcm-chat-widget__dept-status.is-online { color: #1E9E6B; }
.bcm-chat-widget__dept-status.is-online::before { content: "● "; }
.bcm-chat-widget__form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bcm-chat-widget__label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bcm-ink-muted, #5A6478); display: flex; flex-direction: column; gap: 4px; }
.bcm-chat-widget__input, .bcm-chat-widget__textarea {
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 11px;
  border: 1px solid var(--bcm-border, #E4E8EE);
  border-radius: 8px;
  color: #173F67;
  resize: vertical;
}
.bcm-chat-widget__send {
  margin-top: 4px;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: #F58220;
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
}
.bcm-chat-widget__send:hover { background: #e0740f; }
.bcm-chat-widget__messages { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-bottom: 8px; }
.bcm-chat-widget__msg { display: flex; }
.bcm-chat-widget__msg--visitor { justify-content: flex-end; }
.bcm-chat-widget__msg--staff { justify-content: flex-start; }
.bcm-chat-widget__msg-bubble {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
  word-break: break-word;
}
.bcm-chat-widget__msg--visitor .bcm-chat-widget__msg-bubble { background: #F58220; color: #fff; border-bottom-right-radius: 4px; }
.bcm-chat-widget__msg--staff .bcm-chat-widget__msg-bubble { background: #EEF1F5; color: #173F67; border-bottom-left-radius: 4px; }
.bcm-chat-widget__msg-image { display: block; max-width: 100%; border-radius: 10px; margin: 0; }
.bcm-chat-widget__msg-file { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: underline; }
.bcm-chat-widget__reply { display: flex; align-items: center; gap: 8px; padding-top: 10px; flex-shrink: 0; border-top: 1px solid var(--bcm-border, #E4E8EE); margin-top: 8px; }
.bcm-chat-widget__reply-input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--bcm-border, #E4E8EE); border-radius: 999px; font-size: 13.5px; }
.bcm-chat-widget__reply-send { width: 40px; height: 40px; flex-shrink: 0; border: none; border-radius: 50%; background: #173F67; color: #fff; cursor: pointer; }
.bcm-chat-widget__reply-send:hover { background: #102A47; }
.bcm-chat-widget__attach-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--bcm-border, #E4E8EE);
  border-radius: 50%;
  background: none;
  color: var(--bcm-ink-muted, #6B7280);
  cursor: pointer;
  font-size: 14px;
}
.bcm-chat-widget__attach-btn:hover { color: #173F67; border-color: #173F67; }

@media (max-width: 480px) {
  .bcm-chat-widget { right: 12px; bottom: 12px; }
  .bcm-chat-widget__panel { width: calc(100vw - 24px); right: -12px; }
}

/* Staff inbox screen (?bcm_screen=support-chat) */
.bcm-chat-presence-toggle { display: inline-flex; border: 1px solid var(--bcm-border, #E4E8EE); border-radius: 999px; overflow: hidden; }
.bcm-chat-presence-toggle button {
  border: none;
  background: #fff;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bcm-ink-muted, #5A6478);
  cursor: pointer;
}
.bcm-chat-presence-toggle button.is-active { background: #173F67; color: #fff; }
.bcm-chat-presence-toggle button[data-presence-option="online"].is-active { background: #1E9E6B; }
.bcm-chat-presence-toggle button[data-presence-option="away"].is-active { background: #8892A0; }

.bcm-chat-inbox { display: flex; gap: 0; border: 1px solid var(--bcm-border, #E4E8EE); border-radius: 14px; overflow: hidden; min-height: 560px; background: #fff; }
.bcm-chat-inbox__list { width: 300px; flex-shrink: 0; border-right: 1px solid var(--bcm-border, #E4E8EE); overflow-y: auto; max-height: 640px; }
.bcm-chat-inbox__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--bcm-border, #E4E8EE);
  background: #fff;
  cursor: pointer;
}
.bcm-chat-inbox__item:hover { background: var(--bcm-bg, #F5F7FA); }
.bcm-chat-inbox__item.is-active { background: var(--bcm-primary-100, #E3EAF1); }
.bcm-chat-inbox__item.is-unread .bcm-chat-inbox__item-name { font-weight: 800; }
.bcm-chat-inbox__item.is-unread::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #F58220; position: relative; top: -1px; }
.bcm-chat-inbox__item-dept { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #F58220; }
.bcm-chat-inbox__item-name { font-size: 13.5px; color: #173F67; }
.bcm-chat-inbox__item-time { font-size: 11px; color: var(--bcm-ink-muted, #5A6478); }
.bcm-chat-inbox__detail { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bcm-chat-inbox__detail-header { padding: 14px 20px; border-bottom: 1px solid var(--bcm-border, #E4E8EE); font-weight: 700; color: #173F67; font-size: 14px; display: flex; align-items: center; justify-content: space-between; }
.bcm-chat-inbox__detail-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.bcm-chat-inbox__detail-reply { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--bcm-border, #E4E8EE); }
.bcm-chat-inbox__detail-reply input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--bcm-border, #E4E8EE); border-radius: 999px; font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------------- */
/* DARK MODE — raw Bootstrap components                                    */
/* Every .bcm-* component already reads --bcm-* tokens, which already flip
   correctly (see bcm-tokens.css). But this app also uses plain, unstyled
   Bootstrap classes everywhere — forms (18 templates), tables (12), the
   topbar user dropdown, the mobile confirm modal — and Bootstrap 5's own
   CSS never received a dark theme (no data-bs-theme was ever set), so
   every one of those stayed hardcoded to Bootstrap's light defaults:
   white fields, #dee2e6 grey borders, #212529 near-black text. On a dark
   navy page that reads as a wash of stray grey/white boxes rather than a
   real dark theme — this is the fix for that, not a cosmetic tweak. */
[data-bcm-theme="dark"] .form-control,
[data-bcm-theme="dark"] .form-select,
[data-bcm-theme="dark"] textarea.form-control {
  background-color: var(--bcm-white);
  color: var(--bcm-ink);
  border-color: var(--bcm-border);
}
[data-bcm-theme="dark"] .form-control::placeholder { color: var(--bcm-ink-muted); opacity: 1; }
[data-bcm-theme="dark"] .form-control:focus,
[data-bcm-theme="dark"] .form-select:focus {
  background-color: var(--bcm-white);
  color: var(--bcm-ink);
  border-color: var(--bcm-secondary);
  box-shadow: 0 0 0 0.2rem rgba(44, 95, 138, 0.35);
}
[data-bcm-theme="dark"] .form-control:disabled,
[data-bcm-theme="dark"] .form-select:disabled,
[data-bcm-theme="dark"] .form-control[readonly] {
  background-color: var(--bcm-bg);
  color: var(--bcm-ink-muted);
}
[data-bcm-theme="dark"] .form-check-input { background-color: var(--bcm-white); border-color: var(--bcm-border); }
[data-bcm-theme="dark"] .form-check-input:checked { background-color: var(--bcm-secondary); border-color: var(--bcm-secondary); }
[data-bcm-theme="dark"] .form-label,
[data-bcm-theme="dark"] .form-check-label { color: var(--bcm-ink); }
[data-bcm-theme="dark"] .form-text,
[data-bcm-theme="dark"] .text-muted { color: var(--bcm-ink-muted) !important; }
[data-bcm-theme="dark"] .input-group-text { background-color: var(--bcm-bg); color: var(--bcm-ink-muted); border-color: var(--bcm-border); }

[data-bcm-theme="dark"] .table {
  color: var(--bcm-ink);
  border-color: var(--bcm-border);
  --bs-table-bg: transparent;
  --bs-table-color: var(--bcm-ink);
  --bs-table-border-color: var(--bcm-border);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
}
[data-bcm-theme="dark"] .table thead th { color: var(--bcm-ink-muted); border-color: var(--bcm-border); }

[data-bcm-theme="dark"] .dropdown-menu {
  background-color: var(--bcm-white);
  border-color: var(--bcm-border);
  box-shadow: var(--bcm-shadow-lg);
}
[data-bcm-theme="dark"] .dropdown-item { color: var(--bcm-ink); }
[data-bcm-theme="dark"] .dropdown-item:hover,
[data-bcm-theme="dark"] .dropdown-item:focus { background-color: var(--bcm-primary-100); color: var(--bcm-ink); }
[data-bcm-theme="dark"] .dropdown-divider { border-color: var(--bcm-border); }

[data-bcm-theme="dark"] .modal-content {
  background-color: var(--bcm-white);
  color: var(--bcm-ink);
  border-color: var(--bcm-border);
}
[data-bcm-theme="dark"] .modal-header,
[data-bcm-theme="dark"] .modal-footer { border-color: var(--bcm-border); }
[data-bcm-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
