/* === Baichen design system — base + components === */

/* ---------- App shell ---------- */
.bc-app {
  display: grid;
  grid-template-columns: var(--bc-sidebar-w) 1fr;
  height: 100vh;
  background: var(--bc-canvas);
  transition: grid-template-columns 320ms var(--bc-ease);
}
.bc-app[data-sidebar="collapsed"] { --bc-sidebar-w: 64px; }
.bc-app[data-sidebar="collapsed"] .bc-label,
.bc-app[data-sidebar="collapsed"] .bc-logo-wordmark,
.bc-app[data-sidebar="collapsed"] .bc-sidebar-label,
.bc-app[data-sidebar="collapsed"] .bc-nav-item-badge { display: none; }
.bc-app[data-sidebar="collapsed"] .bc-nav-item { justify-content: center; padding: 9px 6px; }
.bc-app[data-sidebar="collapsed"] .bc-sidebar-head { justify-content: center; }

.bc-main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.bc-workspace { flex: 1; overflow: auto; position: relative; background: var(--bc-canvas); }

/* Page enter animation */
.bc-page-enter { animation: bcPageEnter 340ms var(--bc-ease-out); }
@keyframes bcPageEnter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Sidebar ---------- */
.bc-sidebar {
  background: var(--bc-panel);
  border-right: 1px solid var(--bc-line);
  display: flex;
  flex-direction: column;
  padding: 10px 10px 8px;
  overflow: hidden;
}
.bc-sidebar-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px 16px;
}
.bc-logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--bc-brand-500), var(--bc-brand-700));
  color: #fff; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--bc-shadow-1);
  flex-shrink: 0;
}
.bc-logo-wordmark { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; overflow: hidden; }
.bc-logo-wordmark b { font-size: 13.5px; font-weight: 600; color: var(--bc-ink); letter-spacing: -0.01em; white-space: nowrap; }
.bc-logo-wordmark i { font-size: 10px; font-style: normal; color: var(--bc-ink-4); letter-spacing: 0.04em; white-space: nowrap; }

.bc-sidebar-section { margin-top: 4px; }
.bc-sidebar-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--bc-ink-4);
  padding: 8px 10px 4px;
}

.bc-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7.5px 10px; margin: 1px 0;
  border-radius: var(--bc-r-md);
  font-size: 13px; font-weight: 500; color: var(--bc-ink-2);
  cursor: pointer;
  transition: background 140ms var(--bc-ease), color 140ms var(--bc-ease);
  position: relative;
}
.bc-nav-item:hover { background: var(--bc-fill); }
.bc-nav-item[data-active="true"] {
  background: var(--bc-accent-soft);
  color: var(--bc-brand-600);
}
.bc-nav-item[data-active="true"]::before {
  content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 3px; background: var(--bc-brand-500); border-radius: 0 2px 2px 0;
}
.bc-nav-item-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bc-nav-item-badge {
  margin-left: auto;
  background: var(--bc-brand-500); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 9px;
  min-width: 16px; text-align: center;
}
.bc-sidebar-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--bc-line);
}

/* ---------- Topbar ---------- */
.bc-topbar {
  height: var(--bc-topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  background: color-mix(in oklch, var(--bc-panel) 80%, transparent);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid var(--bc-line);
  flex-shrink: 0;
  position: sticky; top: 0; z-index: 10;
}
.bc-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--bc-ink-3);
}
.bc-breadcrumb b { color: var(--bc-ink); font-weight: 600; }
.bc-breadcrumb span:hover { color: var(--bc-ink); cursor: pointer; }
.bc-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* ---------- Buttons ---------- */
.bc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--bc-r-md);
  background: var(--bc-panel);
  color: var(--bc-ink);
  font-family: inherit; font-size: 13px; font-weight: 500;
  border: 0; cursor: pointer;
  box-shadow: var(--bc-shadow-1);
  transition: background 140ms var(--bc-ease), transform 140ms var(--bc-ease), box-shadow 140ms var(--bc-ease);
  user-select: none;
  white-space: nowrap;
}
.bc-btn:hover { background: var(--bc-fill); }
.bc-btn:active { transform: scale(0.97); }
.bc-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bc-accent-ring); }
.bc-btn--sm { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.bc-btn--lg { height: 40px; padding: 0 18px; font-size: 14px; }
.bc-btn--icon { width: 32px; padding: 0; }
.bc-btn--icon.bc-btn--sm { width: 26px; }
.bc-btn--ghost { background: transparent; box-shadow: none; color: var(--bc-ink-2); }
.bc-btn--ghost:hover { background: var(--bc-fill); color: var(--bc-ink); }
.bc-btn--primary {
  background: var(--bc-brand-500); color: #fff;
  box-shadow: 0 1px 2px rgba(154,99,57,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}
.bc-btn--primary:hover { background: var(--bc-brand-600); }
.bc-btn--danger { background: var(--bc-danger); color: #fff; }
.bc-btn--danger:hover { background: color-mix(in oklch, var(--bc-danger) 85%, black); }
.bc-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.bc-kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 4px; background: var(--bc-fill-2); color: var(--bc-ink-3);
  font-family: var(--bc-font-mono); font-size: 10.5px; font-weight: 500;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.06);
}

/* ---------- Inputs ---------- */
.bc-input {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px;
  background: var(--bc-panel);
  border-radius: var(--bc-r-md);
  box-shadow: inset 0 0 0 1px var(--bc-line-2);
  transition: box-shadow 140ms var(--bc-ease);
}
.bc-input:focus-within { box-shadow: inset 0 0 0 1.5px var(--bc-brand-500), 0 0 0 3px var(--bc-accent-ring); }
.bc-input input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 13px; color: var(--bc-ink);
  min-width: 0;
}
.bc-input input::placeholder { color: var(--bc-ink-4); }
.bc-textarea {
  width: 100%; resize: vertical; min-height: 80px;
  padding: 10px 12px; border: 0;
  background: var(--bc-panel); color: var(--bc-ink);
  font-family: inherit; font-size: 13px; line-height: 1.6;
  border-radius: var(--bc-r-md);
  box-shadow: inset 0 0 0 1px var(--bc-line-2);
  transition: box-shadow 140ms var(--bc-ease);
  outline: none;
}
.bc-textarea:focus { box-shadow: inset 0 0 0 1.5px var(--bc-brand-500), 0 0 0 3px var(--bc-accent-ring); }
.bc-label { font-size: 11px; font-weight: 600; color: var(--bc-ink-3); display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Segment ---------- */
.bc-segment {
  display: inline-flex;
  background: var(--bc-fill);
  border-radius: var(--bc-r-md);
  padding: 2px;
  box-shadow: inset 0 0 0 1px var(--bc-line);
}
.bc-segment button {
  border: 0; background: transparent;
  padding: 5px 12px;
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--bc-ink-3); cursor: pointer;
  border-radius: 5px;
  transition: all 140ms var(--bc-ease);
}
.bc-segment button:hover { color: var(--bc-ink); }
.bc-segment button[aria-selected="true"] {
  background: var(--bc-panel);
  color: var(--bc-ink);
  box-shadow: var(--bc-shadow-1);
}

/* ---------- Tags ---------- */
.bc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 7px;
  background: var(--bc-fill);
  color: var(--bc-ink-2);
  font-size: 10.5px; font-weight: 600;
  border-radius: 9px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.bc-tag-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bc-tag--success { background: var(--bc-success-soft); color: var(--bc-success); }
.bc-tag--warning { background: var(--bc-warning-soft); color: var(--bc-warning); }
.bc-tag--danger  { background: var(--bc-danger-soft);  color: var(--bc-danger); }
.bc-tag--info    { background: var(--bc-info-soft);    color: var(--bc-info); }
.bc-tag--brand   { background: var(--bc-accent-soft);  color: var(--bc-brand-600); }

/* ---------- Cards ---------- */
.bc-card {
  background: var(--bc-panel);
  border-radius: var(--bc-r-xl);
  box-shadow: var(--bc-shadow-1);
  padding: 18px;
}
.bc-card--lg { padding: 22px; border-radius: var(--bc-r-2xl); box-shadow: var(--bc-shadow-2); }
.bc-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.bc-card-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--bc-ink); letter-spacing: -0.01em; }
.bc-card-sub { margin: 2px 0 0; font-size: 11.5px; color: var(--bc-ink-4); }

/* ---------- Page ---------- */
.bc-page { padding: 28px 32px 40px; max-width: 1440px; margin: 0 auto; }
.bc-page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; gap: 20px; }
.bc-page-title { margin: 4px 0 2px; font-size: 26px; font-weight: 600; letter-spacing: -0.025em; color: var(--bc-ink); }
.bc-page-sub { margin: 0; font-size: 13px; color: var(--bc-ink-3); max-width: 640px; }
.bc-eyebrow { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bc-ink-4); }
.bc-hstack { display: inline-flex; align-items: center; gap: 8px; }
.bc-divider { height: 1px; background: var(--bc-line); margin: 14px 0; }
.bc-divider--v { width: 1px; height: 20px; background: var(--bc-line-2); margin: 0 2px; }

/* ---------- Table ---------- */
.bc-table-wrap { border-radius: var(--bc-r-xl); overflow: hidden; background: var(--bc-panel); box-shadow: var(--bc-shadow-1); }
.bc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bc-table thead th {
  background: var(--bc-fill);
  color: var(--bc-ink-3);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--bc-line);
  position: sticky; top: 0; z-index: 1;
}
.bc-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--bc-line); color: var(--bc-ink); }
.bc-table tbody tr:last-child td { border-bottom: 0; }
.bc-table tbody tr { transition: background 100ms; }
.bc-table tbody tr:hover { background: var(--bc-fill); }
.bc-cell--num { text-align: right; font-variant-numeric: tabular-nums; }
.bc-cell--muted { color: var(--bc-ink-3); }
.bc-cell--editable { position: relative; }
.bc-cell--editable::after { content: '⌥'; position: absolute; top: 3px; right: 4px; font-size: 9px; opacity: 0; transition: opacity 120ms; color: var(--bc-ink-4); }
.bc-cell--editable:hover::after { opacity: 0.6; }
.bc-cell--low-conf {
  background: var(--bc-warning-soft);
  color: var(--bc-warning);
  font-weight: 600;
  position: relative;
}

/* ---------- Upload ---------- */
.bc-upload {
  border-radius: var(--bc-r-lg);
  background: var(--bc-fill);
  padding: 28px 20px; text-align: center;
  cursor: pointer;
  transition: background 180ms var(--bc-ease), transform 180ms var(--bc-ease);
  border: 1.5px dashed var(--bc-line-2);
}
.bc-upload:hover { background: var(--bc-accent-soft); border-color: var(--bc-brand-300); }
.bc-upload[data-active="true"] {
  background: var(--bc-accent-soft);
  border-color: var(--bc-brand-500);
  transform: scale(1.01);
}
.bc-upload-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bc-panel); color: var(--bc-brand-500);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 8px; box-shadow: var(--bc-shadow-1);
}
.bc-upload-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--bc-ink); }
.bc-upload-sub { margin: 2px 0 0; font-size: 11px; color: var(--bc-ink-4); }

/* ---------- Stepper (vertical, case flow) ---------- */
.bc-step {
  padding: 10px 12px;
  border-radius: var(--bc-r-md);
  margin-bottom: 4px;
  transition: all 220ms var(--bc-ease);
}
.bc-step-head { display: flex; align-items: center; gap: 10px; }
.bc-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bc-fill-2); color: var(--bc-ink-3);
  font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 220ms var(--bc-ease);
}
.bc-step[data-state="done"] .bc-step-num { background: var(--bc-brand-500); color: #fff; }
.bc-step[data-state="done"] .bc-step-num-text::before { content: '✓'; font-size: 12px; }
.bc-step[data-state="done"] .bc-step-num-text { visibility: hidden; position: relative; }
.bc-step[data-state="done"] .bc-step-num-text::before { visibility: visible; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.bc-step[data-state="active"] .bc-step-num { background: var(--bc-brand-500); color: #fff; box-shadow: 0 0 0 4px var(--bc-accent-ring); }
.bc-step-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bc-step-eyebrow { font-size: 10px; color: var(--bc-ink-4); letter-spacing: 0.08em; text-transform: uppercase; }
.bc-step-title { font-size: 13.5px; font-weight: 600; color: var(--bc-ink); letter-spacing: -0.01em; }
.bc-step-status { font-size: 11px; color: var(--bc-ink-4); }
.bc-step-body { margin-top: 10px; padding-left: 32px; }
.bc-step[data-state="idle"] .bc-step-body { display: none; }

/* ---------- Tabs ---------- */
.bc-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--bc-line); }
.bc-tab {
  padding: 10px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--bc-ink-3); cursor: pointer;
  border-radius: var(--bc-r-sm) var(--bc-r-sm) 0 0;
  transition: all 140ms var(--bc-ease);
  display: inline-flex; align-items: center; gap: 6px;
  position: relative;
}
.bc-tab:hover { color: var(--bc-ink); background: var(--bc-fill); }
.bc-tab[aria-selected="true"] { color: var(--bc-ink); font-weight: 600; }
.bc-tab[aria-selected="true"]::after {
  content: '';
  position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; background: var(--bc-brand-500); border-radius: 2px 2px 0 0;
}
.bc-tab-count {
  background: var(--bc-fill-2); color: var(--bc-ink-3);
  font-size: 10px; padding: 1px 5px; border-radius: 8px;
  font-weight: 600; font-variant-numeric: tabular-nums;
}

/* ---------- Cmdk ---------- */
.bc-cmdk-backdrop {
  position: fixed; inset: 0;
  background: color-mix(in oklch, var(--bc-ink) 35%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 100; animation: bcFadeIn 220ms var(--bc-ease);
  padding-top: 15vh;
}
.bc-cmdk {
  width: min(560px, 90vw);
  margin: 0 auto;
  background: var(--bc-panel);
  border-radius: var(--bc-r-xl);
  box-shadow: var(--bc-shadow-4);
  overflow: hidden;
  animation: bcScaleIn 260ms var(--bc-ease-out);
}
.bc-cmdk-search {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bc-line);
  color: var(--bc-ink-3);
}
.bc-cmdk-search input {
  flex: 1; border: 0; outline: 0;
  font-family: inherit; font-size: 15px;
  color: var(--bc-ink); background: transparent;
}
.bc-cmdk-search input::placeholder { color: var(--bc-ink-4); }
.bc-cmdk-search kbd {
  font-family: var(--bc-font-mono); font-size: 10.5px;
  color: var(--bc-ink-4); background: var(--bc-fill); padding: 2px 6px; border-radius: 4px;
}
.bc-cmdk-list { max-height: 46vh; overflow: auto; padding: 6px; }
.bc-cmdk-group-label {
  font-size: 10.5px; font-weight: 600; color: var(--bc-ink-4);
  padding: 10px 10px 6px; letter-spacing: 0.06em; text-transform: uppercase;
}
.bc-cmdk-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 13px; color: var(--bc-ink); cursor: pointer;
  transition: background 80ms;
}
.bc-cmdk-item[data-selected="true"] { background: var(--bc-accent-soft); }
.bc-cmdk-item-icon { color: var(--bc-ink-3); width: 18px; display: inline-flex; }
.bc-cmdk-item[data-selected="true"] .bc-cmdk-item-icon { color: var(--bc-brand-500); }
.bc-cmdk-item-kbd {
  margin-left: auto; font-family: var(--bc-font-mono);
  font-size: 10.5px; color: var(--bc-ink-4);
}

@keyframes bcFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bcScaleIn { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- Drawer ---------- */
.bc-drawer-backdrop {
  position: fixed; inset: 0;
  background: color-mix(in oklch, var(--bc-ink) 30%, transparent);
  backdrop-filter: blur(4px);
  z-index: 90; animation: bcFadeIn 220ms var(--bc-ease);
}
.bc-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 400px; max-width: 95vw;
  background: var(--bc-panel);
  border-left: 1px solid var(--bc-line);
  box-shadow: var(--bc-shadow-4);
  z-index: 91;
  display: flex; flex-direction: column;
  animation: bcSlideInRight 320ms var(--bc-ease-out);
}
@keyframes bcSlideInRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.bc-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--bc-line);
}
.bc-drawer-head h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.bc-drawer-body { flex: 1; overflow: auto; padding: 16px 20px; }

/* ---------- Tooltip ---------- */
.bc-tooltip {
  position: fixed;
  background: var(--bc-ink);
  color: #fff;
  font-size: 11.5px; font-weight: 500;
  padding: 5px 9px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  white-space: nowrap;
  animation: bcTooltipIn 140ms var(--bc-ease-out);
}
[data-theme="dark"] .bc-tooltip { background: #f5f1e8; color: #1c1a16; }
@keyframes bcTooltipIn { from { opacity: 0; transform: translate(var(--tx, -50%), calc(var(--ty, -100%) + 4px)); } }

/* ---------- Toast ---------- */
.bc-toast-host {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 300; pointer-events: none;
}
.bc-toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--bc-panel);
  color: var(--bc-ink);
  padding: 10px 14px 10px 14px;
  border-radius: var(--bc-r-lg);
  box-shadow: var(--bc-shadow-3);
  font-size: 13px;
  min-width: 240px; max-width: 400px;
  pointer-events: auto;
  animation: bcToastIn 320ms var(--bc-ease-spring);
}
@keyframes bcToastIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } }

/* ---------- Popover ---------- */
.bc-popover {
  position: fixed;
  background: var(--bc-panel);
  border-radius: var(--bc-r-lg);
  box-shadow: var(--bc-shadow-3);
  padding: 6px;
  min-width: 220px;
  z-index: 200;
  animation: bcScaleIn 220ms var(--bc-ease-out);
}
.bc-popover-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 13px; color: var(--bc-ink); cursor: pointer;
  transition: background 100ms;
}
.bc-popover-item:hover { background: var(--bc-fill); }
.bc-popover-divider { height: 1px; background: var(--bc-line); margin: 4px 6px; }

/* ---------- Help overlay ---------- */
.bc-help {
  width: min(560px, 92vw);
  max-height: 80vh;
  margin: 5vh auto 0;
  background: var(--bc-panel);
  border-radius: var(--bc-r-xl);
  box-shadow: var(--bc-shadow-4);
  animation: bcScaleIn 280ms var(--bc-ease-out);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.bc-help-head { padding: 18px 22px; border-bottom: 1px solid var(--bc-line); display: flex; justify-content: space-between; align-items: flex-start; }
.bc-help-body { padding: 18px 22px; overflow: auto; }

/* ---------- Row hover actions ---------- */
.bc-row-actions { display: inline-flex; gap: 4px; opacity: 0; transition: opacity 140ms; }
.bc-has-row-actions:hover .bc-row-actions { opacity: 1; }

/* ---------- Sparkline ---------- */
.bc-spark { height: 20px; width: 56px; display: block; }
.bc-spark path { stroke: var(--bc-brand-500); stroke-width: 1.4; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.bc-spark path.area { fill: var(--bc-accent-soft); stroke: none; opacity: 0.6; }

/* ---------- Progress ---------- */
.bc-progress {
  height: 6px; background: var(--bc-fill-2); border-radius: 3px; overflow: hidden; position: relative;
}
.bc-progress-bar {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bc-brand-400), var(--bc-brand-500));
  border-radius: 3px;
  transition: width 400ms var(--bc-ease);
}

/* ---------- Spinner / Pulse ---------- */
.bc-spinner { width: 14px; height: 14px; border: 1.5px solid var(--bc-line-2); border-top-color: var(--bc-brand-500); border-radius: 50%; animation: bcSpin 700ms linear infinite; display: inline-block; }
@keyframes bcSpin { to { transform: rotate(360deg); } }
.bc-pulse { animation: bcPulse 2s var(--bc-ease) infinite; }
@keyframes bcPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Skeleton */
.bc-skeleton {
  background: linear-gradient(90deg, var(--bc-fill) 0%, var(--bc-fill-2) 50%, var(--bc-fill) 100%);
  background-size: 200% 100%;
  animation: bcShimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes bcShimmer { to { background-position: -200% 0; } }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bc-line-2); border-radius: 5px; border: 2px solid var(--bc-canvas); }
::-webkit-scrollbar-thumb:hover { background: var(--bc-ink-5); }

/* Focus ring default */
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bc-accent-ring); border-radius: 6px; }
