/* ============================================================
   B&B Pilot — Vanilla CSS component classes
   Extracted 1:1 from the design system's React components.
   Use these class names directly in plain HTML — no React needed.
   Load AFTER styles.css (needs the design tokens).
   ============================================================ */

/* ---- components/core/Button.jsx ---- */
.bbp-btn {
  --_h: var(--control-h-md);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--_h); padding: 0 18px;
  font-family: var(--font-sans); font-size: var(--text-base); font-weight: 600;
  line-height: 1; white-space: nowrap; cursor: pointer; user-select: none;
  border: 1.5px solid transparent; border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.bbp-btn:active:not(:disabled) { transform: scale(0.97); }
.bbp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.bbp-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.bbp-btn svg { width: 1.15em; height: 1.15em; flex: none; }

.bbp-btn--sm { --_h: var(--control-h-sm); padding: 0 13px; font-size: var(--text-sm); border-radius: var(--radius-sm); }
.bbp-btn--lg { --_h: var(--control-h-lg); padding: 0 24px; font-size: var(--text-md); border-radius: var(--radius-lg); }
.bbp-btn--block { display: flex; width: 100%; }

/* primary — CTA 1 */
.bbp-btn--primary { background: var(--primary); color: var(--text-on-primary); box-shadow: var(--shadow-primary); }
.bbp-btn--primary:hover:not(:disabled) { background: var(--primary-hover); }
.bbp-btn--primary:active:not(:disabled) { background: var(--primary-press); }

/* secondary — CTA 2, white w/ border */
.bbp-btn--secondary { background: var(--surface-card); color: var(--text-strong); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.bbp-btn--secondary:hover:not(:disabled) { background: var(--ink-50); border-color: var(--ink-400); }

/* ghost — quiet */
.bbp-btn--ghost { background: transparent; color: var(--text-body); }
.bbp-btn--ghost:hover:not(:disabled) { background: var(--ink-100); }

/* link — CTA 3, underlined */
.bbp-btn--link { height: auto; padding: 2px 2px; background: transparent; color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; box-shadow: none; }
.bbp-btn--link:hover:not(:disabled) { color: var(--primary-press); }
.bbp-btn--link:active:not(:disabled) { transform: none; }

/* danger */
.bbp-btn--danger { background: var(--danger); color: #fff; }
.bbp-btn--danger:hover:not(:disabled) { background: var(--red-600); }
.bbp-btn--danger:focus-visible { box-shadow: var(--shadow-danger-focus); }

/* accent — honey */
.bbp-btn--accent { background: var(--accent); color: var(--ink-900); }
.bbp-btn--accent:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }

.bbp-btn__spin { width: 1.05em; height: 1.05em; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: bbp-spin 0.6s linear infinite; }
@keyframes bbp-spin { to { transform: rotate(360deg); } }

/* ---- components/core/IconButton.jsx ---- */
.bbp-iconbtn {
  --_s: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--_s); height: var(--_s); flex: none;
  border: 1.5px solid transparent; border-radius: var(--radius-md);
  background: transparent; color: var(--text-body); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.bbp-iconbtn svg { width: 20px; height: 20px; }
.bbp-iconbtn--sm { --_s: 32px; } .bbp-iconbtn--sm svg { width: 17px; height: 17px; }
.bbp-iconbtn--lg { --_s: 48px; } .bbp-iconbtn--lg svg { width: 22px; height: 22px; }
.bbp-iconbtn:hover:not(:disabled) { background: var(--ink-100); color: var(--text-strong); }
.bbp-iconbtn:active:not(:disabled) { transform: scale(0.92); }
.bbp-iconbtn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.bbp-iconbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.bbp-iconbtn--solid { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.bbp-iconbtn--solid:hover:not(:disabled) { background: var(--primary-hover); color: #fff; }
.bbp-iconbtn--outline { border-color: var(--border-strong); background: var(--surface-card); }
.bbp-iconbtn--outline:hover:not(:disabled) { border-color: var(--ink-400); background: var(--ink-50); }

/* ---- components/core/Input.jsx ---- */
.bbp-field { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-sans); }
.bbp-field__label { font-size: var(--text-sm); font-weight: 600; color: var(--text-body); }
.bbp-field__label .req { color: var(--danger); margin-left: 2px; }
.bbp-field__hint { font-size: var(--text-xs); color: var(--text-muted); }
.bbp-field__error { font-size: var(--text-xs); color: var(--danger); font-weight: 600; }

.bbp-input-wrap { position: relative; display: flex; align-items: center; }
.bbp-input-wrap .bbp-input__icon { position: absolute; display: flex; color: var(--text-faint); pointer-events: none; }
.bbp-input-wrap .bbp-input__icon svg { width: 18px; height: 18px; }
.bbp-input-wrap .bbp-input__icon--left { left: 13px; }
.bbp-input-wrap .bbp-input__icon--right { right: 13px; }

.bbp-input {
  width: 100%; height: var(--control-h-md);
  font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-strong);
  background: var(--surface-card); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 0 14px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.bbp-input::placeholder { color: var(--text-faint); }
.bbp-input:hover:not(:disabled):not(:focus) { border-color: var(--ink-400); }
.bbp-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.bbp-input:disabled { background: var(--ink-50); color: var(--text-muted); cursor: not-allowed; }
.bbp-input--has-left { padding-left: 40px; }
.bbp-input--has-right { padding-right: 40px; }
.bbp-input--error { border-color: var(--danger); }
.bbp-input--error:focus { box-shadow: var(--shadow-danger-focus); }
textarea.bbp-input { height: auto; min-height: 88px; padding: 11px 14px; line-height: 1.5; resize: vertical; }

/* ---- components/core/Select.jsx ---- */
.bbp-select-wrap { position: relative; display: flex; align-items: center; }
.bbp-select {
  width: 100%; height: var(--control-h-md); appearance: none;
  font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-strong);
  background: var(--surface-card); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 0 38px 0 14px; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.bbp-select:hover:not(:disabled):not(:focus) { border-color: var(--ink-400); }
.bbp-select:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.bbp-select:disabled { background: var(--ink-50); color: var(--text-muted); cursor: not-allowed; }
.bbp-select-wrap__chevron { position: absolute; right: 13px; pointer-events: none; color: var(--text-muted); display: flex; }
.bbp-select-wrap__chevron svg { width: 18px; height: 18px; }
.bbp-select--sm { height: var(--control-h-sm); font-size: var(--text-sm); border-radius: var(--radius-sm); }

/* ---- components/core/Checkbox.jsx ---- */
.bbp-check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-body); user-select: none; }
.bbp-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.bbp-check__box {
  flex: none; width: 20px; height: 20px; margin-top: 1px;
  border: 1.5px solid var(--border-strong); border-radius: 6px; background: var(--surface-card);
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-spring);
}
.bbp-check__box svg { width: 14px; height: 14px; opacity: 0; transform: scale(0.6); transition: opacity var(--dur-fast), transform var(--dur-fast) var(--ease-spring); }
.bbp-check:hover .bbp-check__box { border-color: var(--ink-400); }
.bbp-check input:checked + .bbp-check__box { background: var(--primary); border-color: var(--primary); }
.bbp-check input:checked + .bbp-check__box svg { opacity: 1; transform: scale(1); }
.bbp-check input:focus-visible + .bbp-check__box { box-shadow: var(--shadow-focus); }
.bbp-check input:disabled ~ * { opacity: 0.5; }
.bbp-check--radio .bbp-check__box { border-radius: 50%; }
.bbp-check--radio input:checked + .bbp-check__box { background: var(--surface-card); border-color: var(--primary); border-width: 6px; }
.bbp-check__text { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.bbp-check__desc { font-size: var(--text-xs); color: var(--text-muted); }

/* ---- components/core/Switch.jsx ---- */
.bbp-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-body); user-select: none; }
.bbp-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.bbp-switch__track {
  position: relative; flex: none; width: 42px; height: 24px; border-radius: var(--radius-pill);
  background: var(--ink-300); transition: background-color var(--dur) var(--ease-out);
}
.bbp-switch__thumb {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-spring);
}
.bbp-switch input:checked + .bbp-switch__track { background: var(--primary); }
.bbp-switch input:checked + .bbp-switch__track .bbp-switch__thumb { transform: translateX(18px); }
.bbp-switch input:focus-visible + .bbp-switch__track { box-shadow: var(--shadow-focus); }
.bbp-switch input:disabled + .bbp-switch__track { opacity: 0.5; }
.bbp-switch--sm .bbp-switch__track { width: 34px; height: 20px; }
.bbp-switch--sm .bbp-switch__thumb { width: 14px; height: 14px; }
.bbp-switch--sm input:checked + .bbp-switch__track .bbp-switch__thumb { transform: translateX(14px); }

/* ---- components/core/SegmentedControl.jsx ---- */
.bbp-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--ink-100); border-radius: var(--radius-md); }
.bbp-seg__opt {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600; color: var(--text-muted);
  padding: 6px 14px; border-radius: var(--radius-sm); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.bbp-seg__opt svg { width: 16px; height: 16px; }
.bbp-seg__opt:hover:not(.is-active) { color: var(--text-body); }
.bbp-seg__opt.is-active { background: var(--surface-card); color: var(--primary); box-shadow: var(--shadow-sm); }
.bbp-seg__opt:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.bbp-seg--lg .bbp-seg__opt { padding: 9px 18px; font-size: var(--text-base); }

/* ---- components/display/Card.jsx ---- */
.bbp-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.bbp-card--pad { padding: var(--space-6); }
.bbp-card--tint { background: var(--surface-tint); border-color: var(--blue-100); }
.bbp-card--flat { box-shadow: none; }
.bbp-card--interactive { cursor: pointer; }
.bbp-card--interactive:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--ink-300); }
.bbp-card--interactive:active { transform: translateY(0); }
.bbp-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.bbp-card__title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); color: var(--text-strong); letter-spacing: -0.01em; }
.bbp-card__subtitle { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }
.bbp-card__body { padding: var(--space-6); }
.bbp-card__footer { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border-subtle); background: var(--ink-50); display: flex; align-items: center; gap: 10px; }

/* ---- components/display/Badge.jsx ---- */
.bbp-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-sans); font-size: var(--text-xs); font-weight: 700;
  line-height: 1; padding: 4px 9px; border-radius: var(--radius-pill);
  letter-spacing: 0.01em; white-space: nowrap;
}
.bbp-badge svg { width: 13px; height: 13px; }
.bbp-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bbp-badge--neutral { background: var(--ink-100); color: var(--ink-600); }
.bbp-badge--primary { background: var(--blue-50); color: var(--blue-700); }
.bbp-badge--success { background: var(--success-soft); color: var(--green-700); }
.bbp-badge--warning { background: var(--warning-soft); color: var(--amber-600); }
.bbp-badge--danger  { background: var(--danger-soft); color: var(--red-700); }
.bbp-badge--accent  { background: var(--accent-soft); color: var(--honey-700); }
.bbp-badge--solid.bbp-badge--primary { background: var(--primary); color: #fff; }
.bbp-badge--solid.bbp-badge--success { background: var(--success); color: #fff; }
.bbp-badge--solid.bbp-badge--danger  { background: var(--danger); color: #fff; }
.bbp-badge--solid.bbp-badge--accent  { background: var(--accent); color: var(--ink-900); }

/* ---- components/display/Tag.jsx ---- */
.bbp-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600; color: var(--text-body);
  background: var(--surface-card); border: 1.5px solid var(--border-subtle);
  padding: 5px 11px; border-radius: var(--radius-pill); white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.bbp-tag__lead { display: flex; color: var(--text-muted); }
.bbp-tag__lead svg { width: 14px; height: 14px; }
.bbp-tag--selectable { cursor: pointer; }
.bbp-tag--selectable:hover { border-color: var(--ink-400); }
.bbp-tag--selected { background: var(--blue-50); border-color: var(--blue-300); color: var(--blue-700); }
.bbp-tag__close {
  display: inline-flex; align-items: center; justify-content: center; margin-right: -3px;
  width: 18px; height: 18px; border: none; background: transparent; border-radius: 50%;
  color: var(--text-muted); cursor: pointer; transition: background-color var(--dur-fast), color var(--dur-fast);
}
.bbp-tag__close:hover { background: var(--ink-200); color: var(--text-strong); }
.bbp-tag__close svg { width: 13px; height: 13px; }

/* ---- components/display/Avatar.jsx ---- */
.bbp-avatar {
  --_s: 40px;
  width: var(--_s); height: var(--_s); flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  font-family: var(--font-display); font-weight: 700; color: #fff; background: var(--blue-500);
  font-size: calc(var(--_s) * 0.4); letter-spacing: -0.01em; user-select: none;
}
.bbp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bbp-avatar--xs { --_s: 24px; } .bbp-avatar--sm { --_s: 32px; }
.bbp-avatar--lg { --_s: 56px; } .bbp-avatar--xl { --_s: 72px; }
.bbp-avatar--square { border-radius: var(--radius-md); }
.bbp-avatar-group { display: inline-flex; }
.bbp-avatar-group .bbp-avatar { box-shadow: 0 0 0 2.5px var(--surface-card); margin-left: -10px; }
.bbp-avatar-group .bbp-avatar:first-child { margin-left: 0; }

/* ---- components/feedback/Banner.jsx ---- */
.bbp-banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-lg);
  font-family: var(--font-sans); font-size: var(--text-sm); line-height: 1.45;
  border: 1px solid transparent;
}
.bbp-banner__icon { flex: none; margin-top: 1px; }
.bbp-banner__icon svg { width: 18px; height: 18px; }
.bbp-banner__body { flex: 1; }
.bbp-banner__title { font-weight: 700; color: var(--text-strong); margin-bottom: 2px; }
.bbp-banner__actions { margin-top: 8px; display: flex; gap: 14px; }
.bbp-banner__close { flex: none; border: none; background: transparent; cursor: pointer; color: currentColor; opacity: 0.55; padding: 2px; border-radius: 6px; }
.bbp-banner__close:hover { opacity: 1; }
.bbp-banner__close svg { width: 16px; height: 16px; }
.bbp-banner--info    { background: var(--blue-50);    border-color: var(--blue-100);    color: var(--blue-800); }
.bbp-banner--info .bbp-banner__icon { color: var(--primary); }
.bbp-banner--success { background: var(--success-soft); border-color: var(--green-100); color: var(--green-700); }
.bbp-banner--success .bbp-banner__icon { color: var(--success); }
.bbp-banner--warning { background: var(--warning-soft); border-color: var(--honey-100); color: var(--amber-600); }
.bbp-banner--warning .bbp-banner__icon { color: var(--warning); }
.bbp-banner--danger  { background: var(--danger-soft);  border-color: var(--red-100);  color: var(--red-700); }
.bbp-banner--danger .bbp-banner__icon { color: var(--danger); }

/* ---- components/feedback/Tooltip.jsx ---- */
.bbp-tip { position: relative; display: inline-flex; }
.bbp-tip__bubble {
  position: absolute; z-index: 60; pointer-events: none;
  background: var(--ink-900); color: #fff; font-family: var(--font-sans);
  font-size: var(--text-xs); font-weight: 600; line-height: 1.35;
  padding: 7px 10px; border-radius: var(--radius-sm); max-width: 220px; width: max-content;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(3px) scale(0.97); transform-origin: center;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.bbp-tip:hover .bbp-tip__bubble, .bbp-tip:focus-within .bbp-tip__bubble { opacity: 1; transform: translateY(0) scale(1); }
.bbp-tip__bubble::after { content: ''; position: absolute; width: 8px; height: 8px; background: var(--ink-900); transform: rotate(45deg); }
.bbp-tip__bubble--top { bottom: calc(100% + 8px); left: 50%; translate: -50% 0; }
.bbp-tip__bubble--top::after { bottom: -4px; left: 50%; margin-left: -4px; }
.bbp-tip__bubble--bottom { top: calc(100% + 8px); left: 50%; translate: -50% 0; }
.bbp-tip__bubble--bottom::after { top: -4px; left: 50%; margin-left: -4px; }
.bbp-tip__bubble--right { left: calc(100% + 8px); top: 50%; translate: 0 -50%; }
.bbp-tip__bubble--right::after { left: -4px; top: 50%; margin-top: -4px; }
.bbp-tip__bubble--left { right: calc(100% + 8px); top: 50%; translate: 0 -50%; }
.bbp-tip__bubble--left::after { right: -4px; top: 50%; margin-top: -4px; }

/* ---- components/feedback/Dialog.jsx ---- */
@keyframes bbp-dlg-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes bbp-ov-in { from { opacity: 0; } to { opacity: 1; } }
.bbp-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(15, 23, 41, 0.45); backdrop-filter: blur(3px);
  animation: bbp-ov-in var(--dur) var(--ease-out);
}
.bbp-dialog {
  background: var(--surface-card); border-radius: var(--radius-2xl); box-shadow: var(--shadow-xl);
  width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
  animation: bbp-dlg-in var(--dur-slow) var(--ease-spring);
}
.bbp-dialog--lg { max-width: 680px; }
.bbp-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.bbp-dialog__title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); color: var(--text-strong); letter-spacing: -0.01em; }
.bbp-dialog__desc { font-size: var(--text-sm); color: var(--text-muted); margin-top: 4px; }
.bbp-dialog__close { flex: none; border: none; background: transparent; cursor: pointer; color: var(--text-muted); padding: 6px; border-radius: var(--radius-sm); transition: background-color var(--dur-fast), color var(--dur-fast); }
.bbp-dialog__close:hover { background: var(--ink-100); color: var(--text-strong); }
.bbp-dialog__close svg { width: 20px; height: 20px; }
.bbp-dialog__body { padding: 18px 24px; overflow-y: auto; font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-body); }
.bbp-dialog__footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; }

/* ---- components/feedback/Toast.jsx ---- */
@keyframes bbp-toast-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
.bbp-toast {
  display: flex; align-items: flex-start; gap: 11px; width: 100%; max-width: 380px;
  background: var(--ink-900); color: #fff; border-radius: var(--radius-lg);
  padding: 13px 14px; box-shadow: var(--shadow-lg); font-family: var(--font-sans);
  animation: bbp-toast-in var(--dur-slow) var(--ease-spring);
}
.bbp-toast__icon { flex: none; margin-top: 1px; display: flex; }
.bbp-toast__icon svg { width: 18px; height: 18px; }
.bbp-toast__body { flex: 1; font-size: var(--text-sm); line-height: 1.4; }
.bbp-toast__title { font-weight: 700; }
.bbp-toast__msg { color: rgba(255,255,255,0.78); margin-top: 1px; }
.bbp-toast__close { flex: none; border: none; background: transparent; color: rgba(255,255,255,0.6); cursor: pointer; padding: 2px; }
.bbp-toast__close:hover { color: #fff; }
.bbp-toast__close svg { width: 15px; height: 15px; }
.bbp-toast--success .bbp-toast__icon { color: #46e08a; }
.bbp-toast--danger  .bbp-toast__icon { color: #ff8a80; }
.bbp-toast--info    .bbp-toast__icon { color: var(--blue-300); }
.bbp-toaster { position: fixed; z-index: 120; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }

/* ---- components/navigation/Tabs.jsx ---- */
.bbp-tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--border-subtle); font-family: var(--font-sans); }
.bbp-tab {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font-size: var(--text-base); font-weight: 600; color: var(--text-muted);
  padding: 11px 14px; position: relative; display: inline-flex; align-items: center; gap: 7px;
  transition: color var(--dur-fast) var(--ease-out);
}
.bbp-tab svg { width: 17px; height: 17px; }
.bbp-tab::after {
  content: ''; position: absolute; left: 8px; right: 8px; bottom: -1.5px; height: 2.5px;
  background: var(--primary); border-radius: 2px 2px 0 0; transform: scaleX(0);
  transition: transform var(--dur) var(--ease-out);
}
.bbp-tab:hover { color: var(--text-body); }
.bbp-tab.is-active { color: var(--primary); }
.bbp-tab.is-active::after { transform: scaleX(1); }
.bbp-tab:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
.bbp-tab__count { font-family: var(--font-mono); font-size: 11px; font-weight: 500; background: var(--ink-100); color: var(--text-muted); padding: 1px 6px; border-radius: var(--radius-pill); }
.bbp-tab.is-active .bbp-tab__count { background: var(--blue-50); color: var(--blue-700); }

/* ---- components/domain/PriceDelta.jsx ---- */
.bbp-delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500;
  font-size: var(--text-sm); line-height: 1; padding: 3px 7px; border-radius: var(--radius-sm);
}
.bbp-delta svg { width: 13px; height: 13px; }
.bbp-delta--up   { color: var(--price-up);   background: var(--success-soft); }
.bbp-delta--down { color: var(--price-down); background: var(--danger-soft); }
.bbp-delta--flat { color: var(--price-flat); background: var(--ink-100); }
.bbp-delta--plain { background: transparent; padding: 0; }

/* ---- components/domain/TensionBadge.jsx ---- */
.bbp-tension {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-size: var(--text-xs); font-weight: 700;
  padding: 4px 10px 4px 8px; border-radius: var(--radius-pill); color: var(--ink-900);
  border: 1px solid rgba(15,23,41,0.06); white-space: nowrap;
}
.bbp-tension__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bbp-tension__bars i { width: 3px; border-radius: 1px; background: var(--ink-900); opacity: 0.25; }
.bbp-tension__bars i.on { opacity: 0.9; }
.bbp-tension__bars i:nth-child(1){height:4px}
.bbp-tension__bars i:nth-child(2){height:7px}
.bbp-tension__bars i:nth-child(3){height:10px}
.bbp-tension__bars i:nth-child(4){height:13px}

/* ---- components/domain/StatTile.jsx ---- */
.bbp-stat {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: 18px 20px; box-shadow: var(--shadow-sm);
  font-family: var(--font-sans); min-width: 0;
}
.bbp-stat__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bbp-stat__label { font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); }
.bbp-stat__icon { display: flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: var(--radius-md); background: var(--blue-50); color: var(--primary); }
.bbp-stat__icon svg { width: 17px; height: 17px; }
.bbp-stat__value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-3xl); font-weight: 500; color: var(--text-strong); line-height: 1; letter-spacing: -0.02em; }
.bbp-stat__value .unit { font-size: var(--text-lg); color: var(--text-muted); margin-left: 3px; }
.bbp-stat__foot { display: flex; align-items: center; gap: 8px; font-size: var(--text-xs); color: var(--text-muted); }

/* ---- components/domain/HeatmapCell.jsx ---- */
.bbp-heatcell {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 1 / 1; min-width: 0; padding: 8px 9px; border-radius: var(--radius-md);
  border: 1.5px solid transparent; cursor: pointer; font-family: var(--font-sans);
  color: var(--ink-900); text-align: left; background: var(--ink-50);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.bbp-heatcell:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); z-index: 2; }
.bbp-heatcell--selected { border-color: var(--ink-900); }
.bbp-heatcell--muted { opacity: 0.45; }
.bbp-heatcell__day { font-size: var(--text-xs); font-weight: 700; opacity: 0.7; }
.bbp-heatcell__price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-lg); font-weight: 500; letter-spacing: -0.02em; }
.bbp-heatcell__mine { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; margin-top: 1px; padding: 1px 5px; border-radius: var(--radius-pill); background: rgba(15,23,41,0.82); color: #fff; width: max-content; }
.bbp-heatcell__dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; }

/* ---- components/domain/CompetitorRow.jsx ---- */
.bbp-comp {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: var(--radius-lg); background: var(--surface-card);
  border: 1px solid var(--border-subtle); font-family: var(--font-sans);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.bbp-comp--interactive { cursor: pointer; }
.bbp-comp--interactive:hover { border-color: var(--ink-300); box-shadow: var(--shadow-sm); }
.bbp-comp__thumb { flex: none; width: 44px; height: 44px; border-radius: var(--radius-md); object-fit: cover; background: var(--blue-50); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.bbp-comp__thumb svg { width: 20px; height: 20px; }
.bbp-comp__main { flex: 1; min-width: 0; }
.bbp-comp__name { font-size: var(--text-base); font-weight: 700; color: var(--text-strong); display: flex; align-items: center; gap: 7px; }
.bbp-comp__name .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbp-comp__meta { display: flex; align-items: center; gap: 10px; font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.bbp-comp__meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-300); }
.bbp-comp__stars { color: var(--honey-500); font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.bbp-comp__stars svg { width: 12px; height: 12px; }
.bbp-comp__price { text-align: right; flex: none; }
.bbp-comp__price-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-lg); font-weight: 500; color: var(--text-strong); }
.bbp-comp__avail { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-xs); font-weight: 600; margin-top: 2px; justify-content: flex-end; }
.bbp-comp__avail .d { width: 7px; height: 7px; border-radius: 50%; }


/* ===== Alert (bandeau inline) ===== */
.bbp-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  margin-bottom: 16px;
}
.bbp-alert--danger { background: var(--danger-soft); color: var(--danger); }
.bbp-alert--success { background: var(--success-soft); color: var(--success, #16a34a); }

/* ===== Progress bar ===== */
.bbp-progress {
  background: var(--ink-100);
  border-radius: var(--radius-sm, 4px);
  height: 20px;
  overflow: hidden;
  margin-top: 12px;
}
.bbp-progress__fill {
  height: 100%;
  transition: width 0.3s ease;
}
.bbp-progress__fill--success { background: var(--success); }
.bbp-progress__fill--danger { background: var(--danger); }
/* ===== Table row (Gmail-style hover) ===== */
.bbp-table-row {
  transition: background-color var(--dur-fast) var(--ease-out);
}
.bbp-table-row:hover {
  background: var(--ink-50);
}
.bbp-table-row {
  position: relative;
}
.bbp-row-actions {
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  padding: 4px 6px;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
  z-index: 5;
}
.bbp-table-row:hover .bbp-row-actions {
  opacity: 1;
}

/* ---- B&B Pilot V44h : indicateur glissant des onglets (bbp-onglets.js) ---- */
/* Le script ajoute .bbp-glisse au conteneur et un <span class="bbp-glisse__barre"> qui suit l'onglet is-active. */
.bbp-glisse { position: relative; }
.bbp-glisse__barre {
  position: absolute; left: 0; pointer-events: none; opacity: 0;
  transition: transform calc(var(--dur) * 1.5) var(--ease-out), width calc(var(--dur) * 1.5) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.bbp-tabs.bbp-glisse .bbp-tab::after { display: none; }
.bbp-tabs .bbp-glisse__barre { bottom: -1.5px; height: 2.5px; background: var(--primary); border-radius: 2px 2px 0 0; }
.bbp-seg.bbp-glisse .bbp-seg__opt { position: relative; z-index: 1; }
.bbp-seg.bbp-glisse .bbp-seg__opt.is-active { background: transparent; box-shadow: none; }
.bbp-seg.bbp-glisse .bbp-seg__opt.is-active:focus-visible { box-shadow: var(--shadow-focus); }
.bbp-seg .bbp-glisse__barre { top: 0; z-index: 0; background: var(--surface-card); box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { .bbp-glisse__barre { transition: none; } }
