/* ==========================================================================
   BCDF Enterprise — DESIGN LAYER components  (prefix: bce-)
   --------------------------------------------------------------------------
   The MIS/ERP component vocabulary on top of BCDF core. Reads tokens only.
   Visual principle: "ruled, not boxed" — hierarchy comes from hairlines,
   weight and density; surfaces are flat; the accent is spent on action,
   selection and the current position, nowhere else.

   Contents
     1. Shell (sidebar, topbar, environment, page header)   9. Record detail
     2. Command palette & global search                     10. Workflow / approvals
     3. KPI strip & widgets                                  11. Drawer, modal, confirm, step-up
     4. Charts (SVG conventions)                             12. Notifications, toasts, inbox
     5. Data tables                                          13. Security surfaces (login, MFA, masking)
     6. Status, money, identifiers                           14. States (empty, loading, error, denied)
     7. Filters & toolbars                                   15. Mobile shell
     8. Tabs, timeline, notes                                16. Mockup canvas helpers
   ========================================================================== */

/* ---------------------------------------------------------------------------
   0. Base adjustments for enterprise density
   --------------------------------------------------------------------------- */
.theme-enterprise body, .bce-body { font-family: var(--bc-font-body); font-size: var(--bc-fs-base); color: var(--bc-text-body);
  background: var(--bc-bg-app); line-height: 1.5; font-feature-settings: "cv11", "ss01"; }
.theme-enterprise h1, .theme-enterprise h2, .theme-enterprise h3, .theme-enterprise h4 { font-family: var(--bc-font-display); color: var(--bc-text-strong); letter-spacing: -.01em; margin: 0; }
.theme-enterprise h1 { font-size: var(--bc-fs-h1); font-weight: 600; line-height: 1.25; }
.theme-enterprise h2 { font-size: var(--bc-fs-h2); font-weight: 600; line-height: 1.3; }
.theme-enterprise h3 { font-size: var(--bc-fs-h3); font-weight: 600; }
.theme-enterprise h4 { font-size: var(--bc-fs-h4); font-weight: 600; }
.theme-enterprise a { color: var(--bc-text-accent); text-decoration: none; }
.theme-enterprise a:hover { text-decoration: underline; }
.theme-enterprise .bce-side a, .theme-enterprise .bce-canvas__bar a { color: inherit; }
.theme-enterprise .bce-side a:hover, .theme-enterprise .bce-nav__item:hover { text-decoration: none; }
.theme-enterprise :focus-visible { outline: 0; box-shadow: var(--bc-focus-ring); border-radius: var(--bc-r-sm); }
.theme-enterprise .bc-eyebrow { font-size: var(--bc-fs-2xs); }
.theme-enterprise .bc-i { width: 16px; height: 16px; }
.theme-enterprise .bc-i--sm { width: 14px; height: 14px; } .theme-enterprise .bc-i--md { width: 18px; height: 18px; } .theme-enterprise .bc-i--lg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------------------
   1. Application shell
   --------------------------------------------------------------------------- */
.bce-shell { display: grid; grid-template-columns: var(--bc-sidebar-w) minmax(0, 1fr); min-height: 100vh; background: var(--bc-bg-app); }
.bce-shell.is-collapsed { grid-template-columns: var(--bc-sidebar-w-collapsed) minmax(0, 1fr); }

/* Sidebar — ink navy, one accent rule for the current item */
.bce-side { background: var(--bc-brand-600); color: rgba(255,255,255,.78); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: hidden; }
.bce-side__brand { display: flex; align-items: center; gap: 10px; height: var(--bc-topbar-h); padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.bce-side__brand img, .bce-side__brand svg { height: 24px; width: auto; display: block; }
.bce-side__product { font-size: var(--bc-fs-sm); font-weight: 600; color: #fff; letter-spacing: .01em; white-space: nowrap; }
.bce-side__product small { display: block; font-size: var(--bc-fs-2xs); font-weight: 500; color: rgba(255,255,255,.5); letter-spacing: .08em; text-transform: uppercase; }
.bce-tenant { margin: 12px 12px 4px; padding: 8px 10px; border-radius: var(--bc-r-ctrl); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); display: flex; align-items: center; gap: 10px; cursor: pointer; }
.bce-tenant:hover { background: rgba(255,255,255,.10); }
.bce-tenant__avatar { width: 26px; height: 26px; border-radius: 6px; background: var(--bc-accent-500); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.bce-tenant__name { font-size: var(--bc-fs-sm); font-weight: 600; color: #fff; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bce-tenant__meta { font-size: var(--bc-fs-2xs); color: rgba(255,255,255,.5); white-space: nowrap; }
.bce-tenant .bc-i { margin-left: auto; color: rgba(255,255,255,.5); flex: none; }
.bce-nav { flex: 1 1 auto; overflow-y: auto; padding: 8px 12px 16px; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior: contain; }
/* The sidebar scrolls; its scrollbar is not drawn. `scrollbar-width: thin` still
   paints the platform bar, and a light-grey Windows stripe down a navy panel is
   the one piece of chrome nobody chose. Hiding it reserves no layout width, so
   the nav does not shift, and it matches what .bce-m__scroll and .bc-tabs
   already do in this codebase.

   Scrolling itself is untouched: wheel, trackpad, touch, Page Up/Down, Home,
   End, and tabbing to a link below the fold all still work - the browser
   scrolls a focused element into view whether or not a bar is visible. The cut
   edge of the last item is what signals there is more. */
.bce-nav::-webkit-scrollbar { width: 0; height: 0; }
.bce-nav__group { font-size: var(--bc-fs-2xs); font-weight: 600; letter-spacing: .10em; text-transform: uppercase; color: rgba(255,255,255,.38); padding: 14px 8px 6px; white-space: nowrap; }
.theme-enterprise .bce-nav__item, .bce-nav__item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px 0 10px; border-radius: var(--bc-r-ctrl); color: rgba(255,255,255,.78); font-size: var(--bc-fs-sm); font-weight: 500; text-decoration: none; position: relative; white-space: nowrap; }
.bce-nav__item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.bce-nav__item.is-active { background: rgba(255,255,255,.10); color: #fff; }
.bce-nav__item.is-active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 2px 2px 0; background: var(--bc-accent-400); }
.bce-nav__item .bc-i { flex: none; opacity: .85; }
.bce-nav__count { margin-left: auto; font-size: var(--bc-fs-2xs); font-weight: 600; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; }
.bce-nav__count--alert { background: var(--bc-danger); }
.bce-nav__chev { margin-left: auto; opacity: .5; }
.bce-side__foot { border-top: 1px solid rgba(255,255,255,.08); padding: 10px 12px; display: grid; gap: 6px; }
.bce-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bc-success); box-shadow: 0 0 0 3px rgba(22,163,74,.2); flex: none; }
.bce-status-dot--warn { background: var(--bc-warning); box-shadow: 0 0 0 3px rgba(217,119,6,.2); }
.bce-status-dot--bad { background: var(--bc-danger); box-shadow: 0 0 0 3px rgba(220,38,38,.2); }
.bce-sysstatus { display: flex; align-items: center; gap: 8px; font-size: var(--bc-fs-xs); color: rgba(255,255,255,.65); padding: 4px 8px; }
.bce-side__user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--bc-r-ctrl); }
.bce-side__user:hover { background: rgba(255,255,255,.07); }
.bce-side__user .bc-avatar { width: 28px; height: 28px; font-size: 11px; background: rgba(255,255,255,.14); color: #fff; }
.bce-side__user-name { font-size: var(--bc-fs-sm); font-weight: 600; color: #fff; line-height: 1.2; }
.bce-side__user-role { font-size: var(--bc-fs-2xs); color: rgba(255,255,255,.5); display: flex; align-items: center; gap: 4px; }
.bce-priv { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 5px; border-radius: 3px; background: var(--bc-warning); color: #1C1200; }
/* collapsed state */
.is-collapsed .bce-side__product, .is-collapsed .bce-nav__group, .is-collapsed .bce-nav__item span, .is-collapsed .bce-nav__count, .is-collapsed .bce-nav__chev,
.is-collapsed .bce-tenant__name, .is-collapsed .bce-tenant__meta, .is-collapsed .bce-tenant .bc-i, .is-collapsed .bce-side__user-name, .is-collapsed .bce-side__user-role, .is-collapsed .bce-sysstatus span { display: none; }
.is-collapsed .bce-nav__item { justify-content: center; padding: 0; }
.is-collapsed .bce-tenant { justify-content: center; padding: 8px; }

/* Main column */
.bce-main { min-width: 0; display: flex; flex-direction: column; }
.bce-top { height: var(--bc-topbar-h); background: var(--bc-bg-surface); border-bottom: 1px solid var(--bc-border); display: flex; align-items: center; gap: 12px; padding: 0 20px; position: sticky; top: 0; z-index: var(--bce-z-shell); }
.bce-top__toggle { width: 32px; height: 32px; border-radius: var(--bc-r-ctrl); display: grid; place-items: center; color: var(--bc-text-muted); border: 0; background: transparent; cursor: pointer; }
.bce-top__toggle:hover { background: var(--bc-bg-sunken); color: var(--bc-text-strong); }
.bce-search { flex: 0 1 460px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--bc-border-strong); border-radius: var(--bc-r-ctrl); background: var(--bc-bg-surface); color: var(--bc-text-muted); font-size: var(--bc-fs-sm); cursor: text; }
.bce-search:focus-within { border-color: var(--bc-accent-500); box-shadow: var(--bc-focus-ring); }
.bce-search input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--bc-text-strong); outline: 0; min-width: 0; }
.bce-kbd { font-family: var(--bc-font-mono); font-size: 10px; padding: 1px 5px; border: 1px solid var(--bc-border); border-bottom-width: 2px; border-radius: 4px; color: var(--bc-text-muted); background: var(--bc-bg-sunken); }
.bce-top__right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.bce-top__btn { position: relative; width: 34px; height: 34px; border-radius: var(--bc-r-ctrl); display: grid; place-items: center; color: var(--bc-text-muted); border: 0; background: transparent; cursor: pointer; }
.bce-top__btn:hover { background: var(--bc-bg-sunken); color: var(--bc-text-strong); }
.bce-top__btn .bce-dot { position: absolute; top: 6px; right: 6px; min-width: 8px; height: 8px; border-radius: 999px; background: var(--bc-danger); border: 2px solid var(--bc-bg-surface); }
.bce-top__btn .bce-dot--n { min-width: 16px; height: 16px; font-size: 10px; font-weight: 700; color: #fff; display: grid; place-items: center; top: 2px; right: 2px; padding: 0 3px; }
.bce-quick { height: 32px; padding: 0 10px 0 8px; border-radius: var(--bc-r-ctrl); border: 1px solid var(--bc-border-strong); background: var(--bc-bg-surface); font-size: var(--bc-fs-sm); font-weight: 500; color: var(--bc-text-strong); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bce-quick:hover { background: var(--bc-bg-sunken); }
.bce-daterange { height: 32px; padding: 0 10px; border-radius: var(--bc-r-ctrl); border: 1px solid var(--bc-border-strong); background: var(--bc-bg-surface); font-size: var(--bc-fs-sm); color: var(--bc-text-strong); display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; cursor: pointer; }
.bce-daterange .bc-i { color: var(--bc-text-muted); }
.bce-daterange b { font-weight: 600; }
.bce-daterange small { color: var(--bc-text-muted); }

/* Environment indicator — a 3px band across the top of the main column plus a chip */
.bce-env { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 4px; font-size: var(--bc-fs-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bce-env--dev { background: var(--bc-purple-bg); color: var(--bc-purple-fg); }
.bce-env--uat { background: var(--bc-warning-bg); color: var(--bc-warning-fg); }
.bce-env--prod { background: var(--bc-success-bg); color: var(--bc-success-fg); }
.bce-env i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bce-envband { height: 3px; flex: none; }
.bce-envband--dev { background: var(--bce-env-dev); } .bce-envband--uat { background: var(--bce-env-uat); } .bce-envband--prod { background: var(--bce-env-prod); }
.bce-prodwarn { display: flex; align-items: center; gap: 10px; padding: 6px 20px; background: var(--bc-danger-bg); color: var(--bc-danger-fg); font-size: var(--bc-fs-xs); font-weight: 500; border-bottom: 1px solid rgba(180,35,24,.2); }

/* Page header */
.bce-page { padding: 16px 24px 0; }
.bce-crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--bc-fs-xs); color: var(--bc-text-muted); margin-bottom: 6px; }
.bce-crumbs a { color: var(--bc-text-muted); } .bce-crumbs a:hover { color: var(--bc-text-accent); }
.bce-crumbs .bc-i { width: 12px; height: 12px; opacity: .6; }
.bce-crumbs b { color: var(--bc-text-strong); font-weight: 500; }
.bce-pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--bc-border); }
.bce-pagehead__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bce-pagehead__sub { font-size: var(--bc-fs-sm); color: var(--bc-text-muted); margin-top: 4px; }
.bce-pagehead__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bce-content { padding: 20px 24px 40px; flex: 1 1 auto; }
.bce-content--flush { padding: 0; }
.bce-section { margin-bottom: 20px; }
.bce-sectionhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bce-sectionhead h2 { font-size: var(--bc-fs-h3); }

/* ---------------------------------------------------------------------------
   2. Command palette & global search
   --------------------------------------------------------------------------- */
.bce-palette { width: 640px; max-width: calc(100vw - 32px); background: var(--bc-bg-surface); border-radius: var(--bc-r-lg); box-shadow: var(--bc-sh-xl); overflow: hidden; }
.bce-palette__input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 52px; border-bottom: 1px solid var(--bc-border); font-size: var(--bc-fs-lg); color: var(--bc-text-strong); }
.bce-palette__input input { flex: 1; border: 0; background: transparent; font: inherit; outline: 0; color: inherit; }
.bce-palette__group { padding: 8px 8px 4px; font-size: var(--bc-fs-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--bc-text-muted); }
.bce-palette__item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin: 0 8px; border-radius: var(--bc-r-ctrl); font-size: var(--bc-fs-sm); color: var(--bc-text-body); cursor: pointer; }
.bce-palette__item.is-active, .bce-palette__item:hover { background: var(--bc-accent-50); color: var(--bc-text-strong); }
.bce-palette__item .bc-i { color: var(--bc-text-muted); flex: none; }
.bce-palette__item b { font-weight: 600; color: var(--bc-text-strong); }
.bce-palette__item .bce-kbd { margin-left: auto; }
.bce-palette__foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--bc-border); font-size: var(--bc-fs-2xs); color: var(--bc-text-muted); background: var(--bc-bg-sunken); }
.bce-result { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--bc-border-subtle); }
.bce-result__type { width: 40px; height: 40px; border-radius: var(--bc-r-ctrl); background: var(--bc-bg-sunken); display: grid; place-items: center; color: var(--bc-text-muted); }
.bce-result__title { font-size: var(--bc-fs-sm); font-weight: 600; color: var(--bc-text-strong); }
.bce-result__title mark { background: var(--bc-warning-bg); color: inherit; padding: 0 2px; border-radius: 2px; }
.bce-result__meta { font-size: var(--bc-fs-xs); color: var(--bc-text-muted); }

/* ---------------------------------------------------------------------------
   3. KPI strip & widgets
   --------------------------------------------------------------------------- */
/* The KPI strip is ONE ruled band divided by hairlines — not a row of cards */
.bce-kpis { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); background: var(--bc-bg-surface); border: 1px solid var(--bc-border); border-radius: var(--bc-r-card); overflow: hidden; }
.bce-kpi { padding: 14px 16px; border-right: 1px solid var(--bc-border-subtle); min-width: 0; position: relative; }
.bce-kpi:last-child { border-right: 0; }
.bce-kpi__label { font-size: var(--bc-fs-xs); color: var(--bc-text-muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bce-kpi__value { font-size: 1.375rem; font-weight: 600; color: var(--bc-text-strong); font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.2; margin-top: 4px; white-space: nowrap; }
.bce-kpi__value small { font-size: var(--bc-fs-sm); font-weight: 500; color: var(--bc-text-muted); margin-left: 2px; }
.bce-kpi__delta { display: flex; align-items: center; gap: 6px; font-size: var(--bc-fs-xs); margin-top: 6px; color: var(--bc-text-muted); font-variant-numeric: tabular-nums; }
.bce-delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.bce-delta--up { color: var(--bc-success-fg); } .bce-delta--down { color: var(--bc-danger-fg); } .bce-delta--flat { color: var(--bc-text-muted); }
.bce-delta--up.is-bad { color: var(--bc-danger-fg); } .bce-delta--down.is-good { color: var(--bc-success-fg); }
.bce-chart.bce-kpi__spark, .bce-kpi__spark { position: absolute; right: 14px; bottom: 12px; width: 56px !important; height: 22px !important; opacity: .5; }
.bce-kpi__spark .s1 { stroke-width: 1.5; }
.bce-kpi--alert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bc-danger); }
.bce-kpi--warn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bc-warning); }
.bce-kpi a.bce-drill { position: absolute; inset: 0; border-radius: 0; }
.bce-kpi:hover { background: var(--bc-grey-25); }

.bce-widget { background: var(--bc-bg-surface); border: 1px solid var(--bc-border); border-radius: var(--bc-r-card); display: flex; flex-direction: column; min-width: 0; }
.bce-widget__head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--bc-border-subtle); }
.bce-widget__title { font-size: var(--bc-fs-sm); font-weight: 600; color: var(--bc-text-strong); }
.bce-widget__sub { font-size: var(--bc-fs-xs); color: var(--bc-text-muted); }
.bce-widget__tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.bce-widget__tools .bce-top__btn { width: 28px; height: 28px; }
.bce-widget__body { padding: 12px 16px 16px; flex: 1 1 auto; min-width: 0; }
.bce-widget__body--flush { padding: 0; }
.bce-widget__foot { padding: 8px 16px; border-top: 1px solid var(--bc-border-subtle); font-size: var(--bc-fs-xs); color: var(--bc-text-muted); display: flex; align-items: center; gap: 12px; }
.bce-widget__foot a { margin-left: auto; font-weight: 500; }
.bce-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: var(--bc-fs-xs); color: var(--bc-text-muted); }
.bce-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.bce-legend i.is-line { height: 2px; width: 14px; border-radius: 1px; vertical-align: 3px; }
.bce-dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.bce-dash > * { grid-column: span var(--span, 6); }
/* Attention rail — what needs action, always top-right on dashboards */
.bce-rail { display: grid; gap: 0; }
.bce-rail__item { display: grid; grid-template-columns: 6px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--bc-border-subtle); font-size: var(--bc-fs-sm); }
.bce-rail__item:last-child { border-bottom: 0; }
.bce-rail__item i { width: 6px; height: 6px; border-radius: 50%; background: var(--bc-warning); }
.bce-rail__item i.is-bad { background: var(--bc-danger); } .bce-rail__item i.is-info { background: var(--bc-info); }
.bce-rail__item b { font-weight: 600; color: var(--bc-text-strong); }
.bce-rail__item small { display: block; color: var(--bc-text-muted); font-size: var(--bc-fs-xs); }
.bce-rail__count { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--bc-text-strong); }

/* ---------------------------------------------------------------------------
   4. Charts — inline SVG conventions
   --------------------------------------------------------------------------- */
.bce-chart { width: 100%; height: auto; display: block; font-family: var(--bc-font-body); }
.bce-chart .grid line { stroke: var(--bce-viz-grid); stroke-width: 1; }
.bce-chart .axis text { fill: var(--bce-viz-axis); font-size: 10px; }
.bce-chart .s1 { stroke: var(--bce-viz-1); fill: none; stroke-width: 2; stroke-linejoin: round; }
.bce-chart .s1-area { fill: var(--bce-viz-1); opacity: .08; }
.bce-chart .prev { stroke: var(--bce-viz-prev); fill: none; stroke-width: 1.5; stroke-dasharray: 3 4; }
.bce-chart .b1 { fill: var(--bce-viz-1); } .bce-chart .b2 { fill: var(--bce-viz-2); } .bce-chart .b3 { fill: var(--bce-viz-3); } .bce-chart .b4 { fill: var(--bce-viz-4); } .bce-chart .b5 { fill: var(--bce-viz-5); }
.bce-chart .ok { fill: var(--bc-success); } .bce-chart .warn { fill: var(--bc-warning); } .bce-chart .bad { fill: var(--bc-danger); }
.bce-chart .annot { fill: var(--bc-text-muted); font-size: 10px; }
.bce-chart .annot-line { stroke: var(--bc-text-subtle); stroke-dasharray: 2 3; }
.bce-chart .dot { fill: var(--bc-bg-surface); stroke: var(--bce-viz-1); stroke-width: 2; }
.bce-chart .lbl { fill: var(--bc-text-body); font-size: 11px; } .bce-chart .lbl-b { fill: var(--bc-text-strong); font-size: 11px; font-weight: 600; }
.bce-chart .seq1 { fill: var(--bce-viz-seq-1); } .bce-chart .seq2 { fill: var(--bce-viz-seq-2); } .bce-chart .seq3 { fill: var(--bce-viz-seq-3); } .bce-chart .seq4 { fill: var(--bce-viz-seq-4); } .bce-chart .seq5 { fill: var(--bce-viz-seq-5); }
.bce-chart .seq0 { fill: var(--bc-bg-sunken); }
.bce-hbar { display: grid; grid-template-columns: minmax(80px, 160px) 1fr auto; gap: 8px 12px; align-items: center; font-size: var(--bc-fs-sm); }
.bce-hbar__lbl { color: var(--bc-text-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bce-hbar__track { height: 8px; background: var(--bc-bg-sunken); border-radius: 2px; overflow: hidden; }
.bce-hbar__fill { height: 100%; background: var(--bce-viz-1); border-radius: 2px; }
.bce-hbar__val { font-variant-numeric: tabular-nums; color: var(--bc-text-strong); font-weight: 500; text-align: right; white-space: nowrap; }
.bce-tilemap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.bce-tile { padding: 8px; border-radius: 4px; min-height: 58px; display: flex; flex-direction: column; justify-content: space-between; color: var(--bc-text-strong); }
.bce-tile b { font-size: var(--bc-fs-2xs); font-weight: 600; letter-spacing: .04em; }
.bce-tile span { font-size: var(--bc-fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.bce-tile.seq1 { background: var(--bce-viz-seq-1); } .bce-tile.seq2 { background: var(--bce-viz-seq-2); } .bce-tile.seq3 { background: var(--bce-viz-seq-3); } .bce-tile.seq4 { background: var(--bce-viz-seq-4); } .bce-tile.seq5 { background: var(--bce-viz-seq-5); }
.bce-tile.seq4, .bce-tile.seq5 { color: #fff; }
.bce-tile.is-empty { background: transparent; }

/* ---------------------------------------------------------------------------
   5. Data tables
   --------------------------------------------------------------------------- */
.bce-tablewrap { background: var(--bc-bg-surface); border: 1px solid var(--bc-border); border-radius: var(--bc-r-card); overflow: hidden; }
.bce-tablescroll { overflow: auto; max-height: var(--max-h, none); }
.bce-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--bc-fs-sm); }
.bce-table th { position: sticky; top: 0; z-index: 2; background: var(--bc-bg-sunken); font-size: var(--bc-fs-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bc-text-muted); text-align: left; padding: 0 var(--bce-cell-px); height: 36px; border-bottom: 1px solid var(--bc-border); white-space: nowrap; }
.bce-table th.is-sorted { color: var(--bc-text-strong); }
.bce-table th .bc-i { width: 12px; height: 12px; vertical-align: -2px; margin-left: 2px; }
.bce-table td { padding: 0 var(--bce-cell-px); height: var(--bce-row-h); border-bottom: 1px solid var(--bc-border-subtle); color: var(--bc-text-body); vertical-align: middle; white-space: nowrap; }
/* Density has to reach the tables this application actually renders. It only
   ever targeted .bce-table, a class almost no screen uses, so the toggle in the
   top bar changed nothing anyone could see. .bc-table is the BCDF table and
   .table the Bootstrap-named one behind the compat layer; between them they are
   every table in the product. Padding is what sets row height on those two, so
   the compact rule has to reduce padding rather than set a height. */
[data-density="compact"] .bce-table td { height: var(--bce-row-h-compact); }
[data-density="compact"] :is(.bc-table, .table) :is(td, th) { padding-block: 6px; }
[data-density="compact"] .bc-mis .bc-table :is(td, th) { height: auto; }
.bce-table tbody tr:hover td { background: var(--bc-grey-25); }
.bce-table tbody tr.is-selected td { background: var(--bc-accent-50); }
.bce-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--bc-accent-500); }
.bce-table tbody tr.is-attention td:first-child { box-shadow: inset 3px 0 0 var(--bc-danger); }
.bce-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.bce-table td.wrap { white-space: normal; min-width: 260px; }
.bce-table th.num { text-align: right; }
.bce-table .frozen { position: sticky; left: 0; z-index: 1; background: var(--bc-bg-surface); box-shadow: 1px 0 0 var(--bc-border); }
.bce-table th.frozen { z-index: 3; background: var(--bc-bg-sunken); }
.bce-table .sel { width: 36px; padding-right: 0; }
.bce-table .sel input { width: 15px; height: 15px; accent-color: var(--bc-accent-600); vertical-align: middle; }
.bce-table .act { width: 1%; text-align: right; }
.bce-table .act .bce-top__btn { width: 28px; height: 28px; opacity: 0; }
.bce-table tr:hover .act .bce-top__btn, .bce-table tr:focus-within .act .bce-top__btn { opacity: 1; }
.bce-table tfoot td { background: var(--bc-bg-sunken); font-weight: 600; color: var(--bc-text-strong); border-top: 1px solid var(--bc-border); border-bottom: 0; }
.bce-table .sub { display: block; font-size: var(--bc-fs-2xs); color: var(--bc-text-muted); line-height: 1.2; margin-top: 1px; }
.bce-table .expand td { background: var(--bc-grey-25); height: auto; padding: 12px var(--bce-cell-px) 12px 48px; white-space: normal; }
.bce-table a.rec { color: var(--bc-text-strong); font-weight: 500; } .bce-table a.rec:hover { color: var(--bc-text-accent); }
.bce-tablefoot { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--bc-border); font-size: var(--bc-fs-xs); color: var(--bc-text-muted); background: var(--bc-bg-surface); }
.bce-pager { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.bce-pager button { min-width: 28px; height: 28px; border-radius: var(--bc-r-sm); border: 0; background: transparent; color: var(--bc-text-body); font: inherit; font-size: var(--bc-fs-xs); cursor: pointer; padding: 0 6px; }
.bce-pager button.is-active { background: var(--bc-brand-600); color: #fff; }
.bce-pager button:hover:not(.is-active) { background: var(--bc-bg-sunken); }
.bce-bulk { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bc-accent-50); border-bottom: 1px solid var(--bc-accent-100); font-size: var(--bc-fs-sm); color: var(--bc-text-strong); }
.bce-bulk b { font-weight: 600; }

/* ---------------------------------------------------------------------------
   6. Status, money, identifiers
   --------------------------------------------------------------------------- */
.bce-status { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 4px; font-size: var(--bc-fs-2xs); font-weight: 600; white-space: nowrap; line-height: 1; }
.bce-status .bc-i { width: 12px; height: 12px; }
.bce-status--ok { background: var(--bc-success-bg); color: var(--bc-success-fg); }
.bce-status--warn { background: var(--bc-warning-bg); color: var(--bc-warning-fg); }
.bce-status--bad { background: var(--bc-danger-bg); color: var(--bc-danger-fg); }
.bce-status--info { background: var(--bc-info-bg); color: var(--bc-info-fg); }
.bce-status--neutral { background: var(--bc-neutral-bg); color: var(--bc-neutral-fg); }
.bce-status--accent { background: var(--bc-accent-50); color: var(--bc-accent-700); }
.bce-status--purple { background: var(--bc-purple-bg); color: var(--bc-purple-fg); }
.bce-status--outline { background: transparent; border: 1px solid var(--bc-border-strong); color: var(--bc-text-body); }
.bce-risk { display: inline-flex; align-items: center; gap: 6px; font-size: var(--bc-fs-xs); font-weight: 600; }
.bce-risk__bar { display: inline-flex; gap: 2px; }
.bce-risk__bar i { width: 6px; height: 10px; border-radius: 1px; background: var(--bc-grey-200); }
.bce-risk--low i:nth-child(-n+1) { background: var(--bc-success); } .bce-risk--low { color: var(--bc-success-fg); }
.bce-risk--med i:nth-child(-n+2) { background: var(--bc-warning); } .bce-risk--med { color: var(--bc-warning-fg); }
.bce-risk--high i:nth-child(-n+3) { background: var(--bc-danger); } .bce-risk--high { color: var(--bc-danger-fg); }
.bce-money { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--bce-money-debit); white-space: nowrap; }
.bce-money--cr { color: var(--bce-money-credit); }
.bce-money--cr::before { content: "+"; }
.bce-money--neg { color: var(--bce-money-negative); }
.bce-money--neg::before { content: "−"; }
.bce-money__cur { font-size: .8em; font-weight: 500; color: var(--bc-text-muted); margin-right: 3px; }
.bce-money--lg { font-size: 1.375rem; font-weight: 600; letter-spacing: -.02em; }
.bce-money--xl { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; }
.bce-drcr { display: inline-block; width: 22px; font-size: var(--bc-fs-2xs); font-weight: 700; letter-spacing: .04em; color: var(--bc-text-muted); }
.bce-id { font-family: var(--bc-font-mono); font-size: .92em; color: var(--bc-text-body); letter-spacing: 0; }
.bce-masked { font-family: var(--bc-font-mono); color: var(--bce-money-masked); letter-spacing: .08em; display: inline-flex; align-items: center; gap: 6px; }
.bce-masked button { border: 0; background: transparent; color: var(--bc-text-accent); cursor: pointer; padding: 0; display: inline-flex; }
.bce-masked button .bc-i { width: 14px; height: 14px; }
.bce-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--bc-brand-100); color: var(--bc-brand-600); display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.bce-avatar--sq { border-radius: 6px; }
.bce-entity { display: flex; align-items: center; gap: 10px; }
.bce-entity__name { font-weight: 500; color: var(--bc-text-strong); line-height: 1.2; }
.bce-entity__meta { font-size: var(--bc-fs-2xs); color: var(--bc-text-muted); }
.bce-sla { display: inline-flex; align-items: center; gap: 6px; font-size: var(--bc-fs-xs); font-variant-numeric: tabular-nums; }
.bce-sla__bar { width: 48px; height: 4px; background: var(--bc-grey-200); border-radius: 2px; overflow: hidden; }
.bce-sla__bar i { display: block; height: 100%; background: var(--bc-success); }
.bce-sla--warn .bce-sla__bar i { background: var(--bc-warning); } .bce-sla--bad .bce-sla__bar i { background: var(--bc-danger); } .bce-sla--bad { color: var(--bc-danger-fg); font-weight: 600; }

/* ---------------------------------------------------------------------------
   7. Filters & toolbars
   --------------------------------------------------------------------------- */
.bce-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--bc-border); background: var(--bc-bg-surface); }
.bce-toolbar .bce-search { flex: 0 1 320px; height: 32px; }
.bce-toolbar__right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.bce-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 10px; border-radius: 999px; border: 1px solid var(--bc-border-strong); background: var(--bc-bg-surface); font-size: var(--bc-fs-xs); color: var(--bc-text-body); white-space: nowrap; }
.bce-chip b { font-weight: 600; color: var(--bc-text-strong); }
.bce-chip .bc-i { width: 12px; height: 12px; color: var(--bc-text-muted); cursor: pointer; }
.bce-chip--add { border-style: dashed; color: var(--bc-text-muted); cursor: pointer; }
.bce-chip--view { background: var(--bc-brand-600); color: #fff; border-color: var(--bc-brand-600); }
.bce-chip--view b { color: #fff; }
.bce-density { display: inline-flex; border: 1px solid var(--bc-border-strong); border-radius: var(--bc-r-ctrl); overflow: hidden; }
.bce-density button { height: 30px; width: 32px; border: 0; background: var(--bc-bg-surface); color: var(--bc-text-muted); display: grid; place-items: center; cursor: pointer; }
.bce-density button.is-active { background: var(--bc-bg-sunken); color: var(--bc-text-strong); }
.bce-filterpanel { background: var(--bc-bg-surface); border: 1px solid var(--bc-border); border-radius: var(--bc-r-card); padding: 12px 16px; }
.bce-filterrow { display: grid; grid-template-columns: 180px 140px 1fr 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.bce-segment { display: inline-flex; border: 1px solid var(--bc-border-strong); border-radius: var(--bc-r-ctrl); overflow: hidden; }
.bce-segment button { height: 30px; padding: 0 12px; border: 0; background: var(--bc-bg-surface); color: var(--bc-text-body); font: inherit; font-size: var(--bc-fs-xs); font-weight: 500; cursor: pointer; border-right: 1px solid var(--bc-border-strong); }
.bce-segment button:last-child { border-right: 0; }
.bce-segment button.is-active { background: var(--bc-brand-600); color: #fff; }

/* ---------------------------------------------------------------------------
   8. Tabs, timeline, notes
   --------------------------------------------------------------------------- */
.bce-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--bc-border); overflow-x: auto; }
.bce-tab { padding: 10px 12px; font-size: var(--bc-fs-sm); font-weight: 500; color: var(--bc-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.bce-tab:hover { color: var(--bc-text-strong); text-decoration: none; }
.bce-tab.is-active { color: var(--bc-text-strong); border-bottom-color: var(--bc-accent-600); }
.bce-tab__n { font-size: var(--bc-fs-2xs); padding: 1px 6px; border-radius: 999px; background: var(--bc-bg-sunken); color: var(--bc-text-muted); font-weight: 600; }
.bce-timeline { position: relative; padding-left: 22px; }
.bce-timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--bc-border); }
.bce-tl { position: relative; padding-bottom: 14px; font-size: var(--bc-fs-sm); }
.bce-tl::before { content: ""; position: absolute; left: -20px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--bc-bg-surface); border: 2px solid var(--bc-grey-300); }
.bce-tl--ok::before { border-color: var(--bc-success); background: var(--bc-success); }
.bce-tl--warn::before { border-color: var(--bc-warning); background: var(--bc-warning); }
.bce-tl--bad::before { border-color: var(--bc-danger); background: var(--bc-danger); }
.bce-tl--accent::before { border-color: var(--bc-accent-500); background: var(--bc-accent-500); }
.bce-tl__title { color: var(--bc-text-strong); font-weight: 500; }
.bce-tl__meta { font-size: var(--bc-fs-xs); color: var(--bc-text-muted); margin-top: 2px; }
.bce-tl__meta b { font-weight: 600; color: var(--bc-text-body); }
.bce-tl__body { margin-top: 6px; padding: 8px 10px; background: var(--bc-bg-sunken); border-radius: var(--bc-r-ctrl); font-size: var(--bc-fs-xs); color: var(--bc-text-body); }
.bce-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: var(--bc-fs-sm); }
.bce-dl dt { color: var(--bc-text-muted); font-weight: 400; }
.bce-dl dd { margin: 0; color: var(--bc-text-strong); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.bce-dl--stack { grid-template-columns: 1fr; gap: 10px; }
.bce-dl--stack dt { font-size: var(--bc-fs-2xs); text-transform: uppercase; letter-spacing: .06em; }
.bce-dl--stack dd { margin-top: -6px; }
.bce-note { padding: 10px 12px; border: 1px solid var(--bc-border); border-radius: var(--bc-r-ctrl); font-size: var(--bc-fs-sm); background: var(--bc-bg-surface); }
.bce-note__meta { font-size: var(--bc-fs-xs); color: var(--bc-text-muted); margin-bottom: 4px; }
.bce-note__meta b { color: var(--bc-text-strong); }
.bce-mention { color: var(--bc-text-accent); font-weight: 500; }

/* ---------------------------------------------------------------------------
   9. Record detail standard
   --------------------------------------------------------------------------- */
.bce-record { display: flex; align-items: flex-start; gap: 16px; padding: 16px 24px; background: var(--bc-bg-surface); border-bottom: 1px solid var(--bc-border); flex-wrap: wrap; }
.bce-record__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bce-record__avatar { width: 44px; height: 44px; border-radius: 8px; background: var(--bc-brand-600); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.bce-record__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bce-record__meta { font-size: var(--bc-fs-xs); color: var(--bc-text-muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.bce-record__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bce-record__alerts { width: 100%; display: grid; gap: 6px; }
.bce-record__kpis { width: 100%; }
.bce-record__kpis .bce-kpis { border-radius: var(--bc-r-ctrl); }
.bce-record__kpis .bce-kpi { padding: 10px 14px; }
.bce-record__kpis .bce-kpi__value { font-size: 1.125rem; }
.bce-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.bce-detail--wide { grid-template-columns: minmax(0, 1fr) 380px; }
.bce-detail > * { min-width: 0; }
.bce-panel { min-width: 0; }
.bce-aside { display: grid; gap: 16px; position: sticky; top: calc(var(--bc-topbar-h) + 16px); }
.bce-panel { background: var(--bc-bg-surface); border: 1px solid var(--bc-border); border-radius: var(--bc-r-card); }
.bce-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--bc-border-subtle); font-size: var(--bc-fs-sm); font-weight: 600; color: var(--bc-text-strong); }
.bce-panel__body { padding: 12px 14px; }
.bce-panel__body--flush { padding: 0; }
.bce-related { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--bc-border-subtle); font-size: var(--bc-fs-sm); }
.bce-related:last-child { border-bottom: 0; }
.bce-related .bc-i { color: var(--bc-text-muted); flex: none; }
.bce-related a { color: var(--bc-text-strong); font-weight: 500; }
.bce-related small { margin-left: auto; color: var(--bc-text-muted); font-size: var(--bc-fs-xs); }
.bce-doc { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--bc-border-subtle); font-size: var(--bc-fs-sm); }
.bce-doc:last-child { border-bottom: 0; }
.bce-doc__icon { width: 30px; height: 30px; border-radius: 6px; background: var(--bc-bg-sunken); display: grid; place-items: center; color: var(--bc-text-muted); flex: none; }
.bce-doc__name { color: var(--bc-text-strong); font-weight: 500; } .bce-doc__meta { font-size: var(--bc-fs-2xs); color: var(--bc-text-muted); }

/* ---------------------------------------------------------------------------
   10. Workflow / approvals
   --------------------------------------------------------------------------- */
.bce-flow { display: flex; align-items: flex-start; gap: 0; }
.bce-flow__step { flex: 1; position: relative; padding: 0 8px 0 0; }
.bce-flow__step::after { content: ""; position: absolute; top: 11px; left: 28px; right: 4px; height: 2px; background: var(--bc-border); }
.bce-flow__step:last-child::after { display: none; }
.bce-flow__step.is-done::after { background: var(--bc-success); }
.bce-flow__dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--bc-grey-300); background: var(--bc-bg-surface); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--bc-text-muted); position: relative; z-index: 1; }
.is-done .bce-flow__dot { background: var(--bc-success); border-color: var(--bc-success); color: #fff; }
.is-current .bce-flow__dot { border-color: var(--bc-accent-600); color: var(--bc-accent-700); box-shadow: var(--bc-focus-ring); }
.is-blocked .bce-flow__dot { border-color: var(--bc-danger); color: var(--bc-danger-fg); }
.bce-flow__lbl { font-size: var(--bc-fs-xs); font-weight: 600; color: var(--bc-text-strong); margin-top: 8px; }
.bce-flow__meta { font-size: var(--bc-fs-2xs); color: var(--bc-text-muted); margin-top: 2px; }
.bce-approval { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--bc-border-subtle); cursor: pointer; }
.bce-approval:hover { background: var(--bc-grey-25); }
.bce-approval.is-active { background: var(--bc-accent-50); box-shadow: inset 3px 0 0 var(--bc-accent-500); }
.bce-approval__type { width: 36px; height: 36px; border-radius: 8px; background: var(--bc-bg-sunken); display: grid; place-items: center; color: var(--bc-text-muted); }
.bce-approval__title { font-size: var(--bc-fs-sm); font-weight: 600; color: var(--bc-text-strong); }
.bce-approval__meta { font-size: var(--bc-fs-xs); color: var(--bc-text-muted); margin-top: 2px; }
.bce-approval__amt { text-align: right; }
.bce-approval__amt .bce-money { font-size: var(--bc-fs-base); font-weight: 600; }
.bce-four-eyes { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--bc-r-ctrl); background: var(--bc-info-bg); color: var(--bc-info-fg); font-size: var(--bc-fs-xs); }
.bce-four-eyes .bc-i { flex: none; }

/* ---------------------------------------------------------------------------
   11. Drawer, modal, confirm, step-up
   --------------------------------------------------------------------------- */
.bce-drawer { width: 480px; max-width: 100%; height: 100%; background: var(--bc-bg-surface); border-left: 1px solid var(--bc-border); box-shadow: var(--bc-sh-xl); display: flex; flex-direction: column; }
.bce-drawer__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--bc-border); }
.bce-drawer__head h3 { font-size: var(--bc-fs-h3); }
.bce-drawer__body { padding: 16px; flex: 1 1 auto; overflow: auto; }
.bce-drawer__foot { padding: 12px 16px; border-top: 1px solid var(--bc-border); display: flex; gap: 8px; justify-content: flex-end; background: var(--bc-bg-surface); }
.bce-modal { width: 560px; max-width: calc(100vw - 32px); background: var(--bc-bg-surface); border-radius: var(--bc-r-lg); box-shadow: var(--bc-sh-xl); overflow: hidden; }
.bce-modal--danger { border-top: 3px solid var(--bc-danger); }
.bce-modal__head { padding: 16px 20px 0; }
.bce-modal__head h3 { font-size: var(--bc-fs-h2); }
.bce-modal__sub { font-size: var(--bc-fs-sm); color: var(--bc-text-muted); margin-top: 4px; }
.bce-modal__body { padding: 16px 20px; display: grid; gap: 14px; }
.bce-modal__foot { padding: 12px 20px; border-top: 1px solid var(--bc-border); display: flex; gap: 8px; justify-content: flex-end; background: var(--bc-grey-25); }
.bce-impact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bce-impact div { padding: 10px 12px; background: var(--bc-bg-sunken); border-radius: var(--bc-r-ctrl); font-size: var(--bc-fs-sm); }
.bce-impact small { display: block; font-size: var(--bc-fs-2xs); color: var(--bc-text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.bce-stepup { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--bc-warning); border-radius: var(--bc-r-ctrl); background: var(--bc-warning-bg); }
.bce-stepup__title { display: flex; align-items: center; gap: 8px; font-size: var(--bc-fs-sm); font-weight: 600; color: var(--bc-warning-fg); }
.bce-otp { display: flex; gap: 8px; }
.bce-otp input { width: 40px; height: 44px; text-align: center; font: inherit; font-size: 18px; font-weight: 600; border: 1px solid var(--bc-border-strong); border-radius: var(--bc-r-ctrl); background: var(--bc-bg-surface); color: var(--bc-text-strong); font-variant-numeric: tabular-nums; }
.bce-overlay { background: rgba(15,27,45,.45); }
.bce-typed { font-family: var(--bc-font-mono); font-weight: 600; color: var(--bc-text-strong); background: var(--bc-bg-sunken); padding: 1px 6px; border-radius: 4px; }

/* ---------------------------------------------------------------------------
   12. Notifications, toasts, inbox
   --------------------------------------------------------------------------- */
.bce-notif { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--bc-border-subtle); align-items: start; }
.bce-notif.is-unread { background: var(--bc-accent-50); }
.bce-notif.is-unread .bce-notif__title::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--bc-accent-500); margin-right: 6px; vertical-align: 2px; }
.bce-notif__icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--bc-bg-sunken); color: var(--bc-text-muted); }
.bce-notif__icon.is-bad { background: var(--bc-danger-bg); color: var(--bc-danger-fg); } .bce-notif__icon.is-warn { background: var(--bc-warning-bg); color: var(--bc-warning-fg); } .bce-notif__icon.is-ok { background: var(--bc-success-bg); color: var(--bc-success-fg); } .bce-notif__icon.is-info { background: var(--bc-info-bg); color: var(--bc-info-fg); }
.bce-notif__title { font-size: var(--bc-fs-sm); font-weight: 600; color: var(--bc-text-strong); }
.bce-notif__body { font-size: var(--bc-fs-sm); color: var(--bc-text-body); margin-top: 2px; }
.bce-notif__meta { font-size: var(--bc-fs-2xs); color: var(--bc-text-muted); margin-top: 4px; }
.bce-notif__time { font-size: var(--bc-fs-2xs); color: var(--bc-text-muted); white-space: nowrap; }
.bce-toast { width: 360px; background: var(--bc-brand-600); color: #fff; border-radius: var(--bc-r-card); box-shadow: var(--bc-sh-lg); padding: 12px 14px; display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: start; font-size: var(--bc-fs-sm); }
.bce-toast__title { font-weight: 600; } .bce-toast__body { color: rgba(255,255,255,.75); font-size: var(--bc-fs-xs); margin-top: 2px; }
.bce-toast__act { color: var(--bc-accent-300); font-weight: 600; font-size: var(--bc-fs-xs); white-space: nowrap; }
.bce-toast--ok .bc-i { color: var(--bc-success); } .bce-toast--bad .bc-i { color: var(--bc-danger); }
.bce-toast--progress { grid-template-columns: 1fr auto; }
.bce-progress { height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.bce-progress i { display: block; height: 100%; background: var(--bc-accent-400); }
.bce-timeout { width: 420px; }
.bce-timeout__clock { font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--bc-text-strong); letter-spacing: -.02em; }

/* ---------------------------------------------------------------------------
   13. Security surfaces
   --------------------------------------------------------------------------- */
.bce-auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.bce-auth__brand { background: var(--bc-brand-600); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.bce-auth__brand::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
.bce-auth__brand h1 { color: #fff; font-size: 1.75rem; font-weight: 600; max-width: 18ch; line-height: 1.2; position: relative; }
.bce-auth__brand p { color: rgba(255,255,255,.7); max-width: 40ch; position: relative; }
.bce-auth__facts { display: grid; gap: 10px; font-size: var(--bc-fs-sm); color: rgba(255,255,255,.75); position: relative; }
.bce-auth__facts div { display: flex; align-items: center; gap: 10px; }
.bce-auth__facts .bc-i { color: var(--bc-accent-300); }
.bce-auth__form { display: grid; place-items: center; padding: 48px 24px; background: var(--bc-bg-app); }
.bce-auth__card { width: 400px; max-width: 100%; display: grid; gap: 16px; }
.bce-auth__card h2 { font-size: var(--bc-fs-h1); }
.bce-device { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--bc-border); border-radius: var(--bc-r-ctrl); font-size: var(--bc-fs-sm); background: var(--bc-bg-surface); }
.bce-device .bc-i { color: var(--bc-text-muted); }
.bce-device b { color: var(--bc-text-strong); font-weight: 500; }
.bce-device small { color: var(--bc-text-muted); display: block; font-size: var(--bc-fs-2xs); }
.bce-device .bce-status { margin-left: auto; }

/* ---------------------------------------------------------------------------
   14. States
   --------------------------------------------------------------------------- */
.bce-state { text-align: center; padding: 48px 24px; }
.bce-state__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--bc-bg-sunken); color: var(--bc-text-muted); display: grid; place-items: center; margin: 0 auto 14px; }
.bce-state__icon.is-bad { background: var(--bc-danger-bg); color: var(--bc-danger-fg); } .bce-state__icon.is-warn { background: var(--bc-warning-bg); color: var(--bc-warning-fg); }
.bce-state__title { font-size: var(--bc-fs-h3); font-weight: 600; color: var(--bc-text-strong); }
.bce-state__body { font-size: var(--bc-fs-sm); color: var(--bc-text-muted); max-width: 40ch; margin: 6px auto 16px; }
.bce-skel { background: linear-gradient(90deg, var(--bc-grey-100) 25%, var(--bc-grey-50) 50%, var(--bc-grey-100) 75%); background-size: 200% 100%; animation: bce-shimmer 1.4s linear infinite; border-radius: 4px; }
.bce-skel--text { height: 10px; margin: 6px 0; } .bce-skel--num { height: 18px; width: 60%; } .bce-skel--block { height: 120px; }
@keyframes bce-shimmer { to { background-position: -200% 0; } }
.bce-offline { position: sticky; top: var(--bc-topbar-h); z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 20px; background: var(--bc-warning-bg); color: var(--bc-warning-fg); font-size: var(--bc-fs-sm); border-bottom: 1px solid rgba(138,90,0,.2); }

/* ---------------------------------------------------------------------------
   15. Mobile shell (390px)
   --------------------------------------------------------------------------- */
.bce-m { display: flex; flex-direction: column; height: 100%; background: var(--bc-bg-app); font-size: var(--bc-fs-base); color: var(--bc-text-body); }
.bce-m__top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--bc-brand-600); color: #fff; min-height: 52px; }
.bce-m__top h1 { color: #fff; font-size: var(--bc-fs-h3); flex: 1; }
.bce-m__top .bce-env { background: rgba(255,255,255,.14); color: #fff; }
.bce-m__scroll { flex: 1; overflow-y: auto; scrollbar-width: none; }
.bce-m__body { padding: 14px 16px; display: grid; gap: 12px; }
.bce-m__nav { display: flex; background: var(--bc-bg-surface); border-top: 1px solid var(--bc-border); padding: 6px 4px 10px; }
.bce-m__navitem { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 500; color: var(--bc-text-muted); min-height: 44px; justify-content: center; position: relative; text-decoration: none; }
.bce-m__navitem.is-active { color: var(--bc-text-accent); }
.bce-m__navitem .bc-i { width: 20px; height: 20px; }
.bce-m__navitem .bce-dot--n { position: absolute; top: 2px; right: 22%; min-width: 16px; height: 16px; border-radius: 999px; background: var(--bc-danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 3px; }
.bce-m .bce-kpis { grid-template-columns: 1fr 1fr; }
.bce-m .bce-kpi { border-bottom: 1px solid var(--bc-border-subtle); }
.bce-m .bce-kpi:nth-child(even) { border-right: 0; }
.bce-m .bce-kpi__value { font-size: 1.125rem; }
.bce-m__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bce-m__actions .btn { height: 44px; }

/* ---------------------------------------------------------------------------
   16. Mockup canvas helpers (not shipped)
   --------------------------------------------------------------------------- */
.bce-canvas { background: var(--bc-grey-100); min-height: 100vh; padding: 0; }
.bce-canvas__bar { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; gap: 12px; padding: 8px 20px; background: var(--bc-brand-800); color: rgba(255,255,255,.8); font-size: var(--bc-fs-xs); }
.bce-canvas__bar b { color: #fff; font-weight: 600; }
.bce-canvas__bar a { color: rgba(255,255,255,.7); text-decoration: none; padding: 4px 8px; border-radius: 4px; }
.bce-canvas__bar a:hover { background: rgba(255,255,255,.1); color: #fff; }
.bce-canvas__bar .btn { height: 26px; font-size: 11px; }
.bce-canvas__note { margin: 16px 20px 0; padding: 10px 14px; background: var(--bc-bg-surface); border: 1px solid var(--bc-border); border-left: 3px solid var(--bc-accent-500); border-radius: var(--bc-r-ctrl); font-size: var(--bc-fs-sm); color: var(--bc-text-body); max-width: 1400px; }
.bce-canvas__note b { color: var(--bc-text-strong); }
.bce-frame { margin: 16px 20px 40px; border: 1px solid var(--bc-border-strong); border-radius: var(--bc-r-lg); overflow: hidden; box-shadow: var(--bc-sh-lg); background: var(--bc-bg-app); }
.bce-frame .bce-shell { min-height: 0; }
.bce-frame .bce-side { height: auto; position: static; }
.bce-frame .bce-aside { position: static; }
.bce-overlaydemo { position: relative; }
.bce-overlaydemo__layer { position: absolute; inset: 0; background: rgba(15,27,45,.45); display: grid; place-items: center; padding: 24px; }
.bce-overlaydemo__layer--right { place-items: stretch end; grid-template-columns: 1fr auto; padding: 0; }
.bce-devicerow { display: flex; gap: 32px; flex-wrap: wrap; padding: 24px 20px 40px; align-items: flex-start; }
.bce-devicerow .bc-device__screen { background: var(--bc-bg-app); }
.bce-devicerow .bc-device__status { background: var(--bc-brand-600); color: #fff; }
@media (prefers-reduced-motion: reduce) { .bce-skel { animation: none; } }
