/**
 * BeiraByte Business Suite — Stylesheet (pixel-perfect prototype)
 *
 * The marketing site (theme style.css) defines its own --bg / --accent etc.
 * The Suite shells (.bbs-shell) override these with the EXACT prototype
 * tokens so /painel and /app render identically to the prototype mockup.
 *
 * Component classes are copied VERBATIM from the prototype HTML (preserving
 * exact selectors so future updates can diff cleanly against prototype v2+).
 *
 * @since 1.9.1
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PROTOTYPE TOKENS — scoped to .bbs-shell
   These are the EXACT values from beirabyte-business-suite.html :root
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bbs-shell {
  --bg: #0A0617;
  --bg-2: #0F0826;
  --bg-3: #1A0E3D;
  --surface: rgba(255,255,255,0.04);
  --surface-hi: rgba(255,255,255,0.06);
  --surface-hi2: rgba(255,255,255,0.08);
  --line: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.1);
  --line-3: rgba(255,255,255,0.15);
  --line-cyan: rgba(34,198,230,0.18);
  --line-cyan-2: rgba(34,198,230,0.3);
  --line-cyan-3: rgba(34,198,230,0.5);
  --ink: #fff;
  --ink-2: rgba(255,255,255,0.7);
  --ink-3: rgba(255,255,255,0.5);
  --ink-4: rgba(255,255,255,0.5); /* v1.18.0 WCAG AA fix */
  --accent: #22C6E6;
  --accent-2: #1B86A8;
  --warm: #FF9F43;
  --warm-2: #FF6B35;
  --green: #22E690;
  --purple: #7B5CFF;
  --danger: #FF5F57;
  --danger-2: #E24B4A;

  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Reset the marketing-theme bleed inside the shell */
.bbs-shell *,
.bbs-shell *::before,
.bbs-shell *::after { margin: 0; padding: 0; box-sizing: border-box; }

.bbs-shell code,
.bbs-shell .mono { font-family: 'JetBrains Mono', monospace; }

.bbs-shell button { font-family: inherit; cursor: pointer; }
.bbs-shell input,
.bbs-shell textarea,
.bbs-shell select { font-family: inherit; color: inherit; }
.bbs-shell a { color: inherit; text-decoration: none; cursor: pointer; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   REUSABLE COMPONENTS (verbatim from prototype)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bbs-shell .btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: none;
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
}
.bbs-shell .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px -4px rgba(34,198,230,0.4); }
.bbs-shell .btn-ghost { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); }
.bbs-shell .btn-ghost:hover { background: var(--surface-hi); }
.bbs-shell .btn-warm { background: linear-gradient(135deg, var(--warm) 0%, var(--warm-2) 100%); }
.bbs-shell .btn-sm { padding: 6px 12px; font-size: 11px; }
.bbs-shell .btn-lg { padding: 12px 22px; font-size: 13px; }
.bbs-shell .btn-block { display: flex; width: 100%; justify-content: center; }

.bbs-shell .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.bbs-shell .badge-cyan { background: rgba(34,198,230,0.1); border: 1px solid var(--line-cyan-2); color: var(--accent); }
.bbs-shell .badge-warm { background: rgba(255,159,67,0.1); border: 1px solid rgba(255,159,67,0.3); color: var(--warm); }
.bbs-shell .badge-green { background: rgba(34,230,144,0.1); border: 1px solid rgba(34,230,144,0.3); color: var(--green); }
.bbs-shell .badge-purple { background: rgba(123,92,255,0.1); border: 1px solid rgba(123,92,255,0.3); color: var(--purple); }
.bbs-shell .badge-danger { background: rgba(255,95,87,0.1); border: 1px solid rgba(255,95,87,0.3); color: var(--danger); }
.bbs-shell .badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.bbs-shell .card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.bbs-shell .card-hi { background: linear-gradient(135deg, rgba(34,198,230,0.06), rgba(123,92,255,0.04)); border-color: var(--line-cyan-2); }

.bbs-shell .field {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 13px;
  width: 100%;
  outline: none;
  transition: all 0.15s;
}
.bbs-shell .field:focus { border-color: var(--line-cyan-2); background: var(--surface-hi); }

/* v1.9.11: fix dropdown option visibility in dark theme.
   Native <option> elements don't inherit most CSS — they use a narrow allowlist.
   Forcing background + color on <option> is one of the few things browsers actually honor. */
.bbs-shell select.field option,
.bbs-shell select.field optgroup {
  background-color: var(--bg-3); /* v1.18.0: was hardcoded #1A0E3D */
  color: #ffffff;
}
.bbs-shell .field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
  display: block;
}

.bbs-shell .toggle {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.bbs-shell .toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--ink-3);
  border-radius: 50%;
  transition: all 0.2s;
}
.bbs-shell .toggle.on { background: rgba(34,198,230,0.2); border-color: var(--line-cyan-2); }
.bbs-shell .toggle.on::after { left: 18px; background: var(--accent); box-shadow: 0 0 8px rgba(34,198,230,0.5); }

.bbs-shell .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,198,230,0.08);
  border: 1px solid var(--line-cyan-2);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.bbs-shell .section-title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 8px; }
.bbs-shell .section-sub { color: var(--ink-2); font-size: 14px; max-width: 640px; }

/* ━━━ SHELL TOPBAR (replaces prototype's proto-nav) ━━━ */
.bbs-shell .admin-topbar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 56px;
}
.bbs-shell .admin-topbar-left { display: flex; align-items: center; gap: 14px; }
.bbs-shell .admin-logo { font-weight: 800; letter-spacing: -0.01em; font-size: 16px; }
.bbs-shell .admin-logo .b { color: var(--accent); }
.bbs-shell .admin-topbar-sub {
  font-size: 11px;
  color: var(--ink-3);
  padding-left: 14px;
  border-left: 1px solid var(--line-2);
}
.bbs-shell .admin-topbar-actions { display: flex; align-items: center; gap: 14px; }
.bbs-shell .admin-topbar-link { font-size: 12px; color: var(--ink-3); text-decoration: none; }
.bbs-shell .admin-topbar-link:hover { color: var(--ink); }

.bbs-shell .admin-status-pill {
  background: rgba(34,230,144,0.08);
  border: 1px solid rgba(34,230,144,0.25);
  color: var(--green);
  padding: 5px 11px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
.bbs-shell .admin-status-pill .blink {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: bbs-blink 1.5s ease-in-out infinite;
}
@keyframes bbs-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ━━━ v1.22.0: SIDEBAR NAVIGATION ━━━
 * Industry-standard SaaS sidebar pattern (Linear/Notion/Asana/HubSpot/Stripe).
 * Two-tier IA: Workspace (always visible) + Configuração (collapsible).
 * State: full-width (240px) by default, icon-only (60px) when collapsed via topbar toggle.
 * Persisted in localStorage. Mobile (<900px) becomes a slide-over drawer.
 */
.bbs-shell .admin-sidebar {
  position: fixed;
  left: 0;
  top: 56px;
  bottom: 0;
  width: 240px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 16px 0 24px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  transition: width 0.18s ease, transform 0.2s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--line-3) transparent;
}
.bbs-shell .admin-sidebar::-webkit-scrollbar { width: 6px; }
.bbs-shell .admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.bbs-shell .admin-sidebar::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 3px; }

.bbs-shell .admin-sidebar-section { margin-bottom: 20px; padding: 0 12px; }
.bbs-shell .admin-sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 6px 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: default;
  width: 100%;
  font-family: inherit;
}
.bbs-shell .admin-sidebar-section-toggle {
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.bbs-shell .admin-sidebar-section-toggle:hover { background: var(--surface); color: var(--ink-2); }

.bbs-shell .admin-sidebar-chevron {
  width: 14px; height: 14px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.7;
}
.bbs-shell .admin-sidebar-section--collapsible.open .admin-sidebar-chevron { transform: rotate(180deg); }

.bbs-shell .admin-sidebar-section-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.bbs-shell .admin-sidebar-section--collapsible.open .admin-sidebar-section-items {
  max-height: 600px;
}
.bbs-shell .admin-sidebar-section:not(.admin-sidebar-section--collapsible) .admin-sidebar-section-items,
.bbs-shell .admin-sidebar-section:not(.admin-sidebar-section--collapsible) > a {
  max-height: none;
  overflow: visible;
}

.bbs-shell .admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin: 1px 0;
  border-radius: 7px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  position: relative;
  white-space: nowrap;
}
.bbs-shell .admin-sidebar-link:hover { background: var(--surface); color: var(--ink); }
.bbs-shell .admin-sidebar-link.active {
  background: rgba(34, 198, 230, 0.12);
  color: var(--accent);
  box-shadow: inset 2px 0 0 var(--accent);
}

.bbs-shell .admin-sidebar-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: currentColor;
}

.bbs-shell .admin-sidebar-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bbs-shell .admin-sidebar-badge {
  background: var(--warm);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  flex-shrink: 0;
  min-width: 18px;
  text-align: center;
}

.bbs-shell .admin-sidebar-toggle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-3);
  padding: 6px;
  margin-right: 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.bbs-shell .admin-sidebar-toggle:hover { background: var(--surface); color: var(--ink); }

/* Collapsed state: icon-only sidebar (60px), with hover tooltips */
.bbs-shell.admin-sidebar-collapsed .admin-sidebar { width: 60px; }
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-section { padding: 0 8px; }
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-section-label > span,
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-chevron,
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-label,
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-badge { display: none; }
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-section-label { padding: 6px 0 8px; justify-content: center; }
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-section-label::before {
  content: ""; display: block; width: 24px; height: 1px; background: var(--line-2);
}
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-link { padding: 10px; justify-content: center; }
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-section--collapsible .admin-sidebar-section-items {
  max-height: 600px; /* always visible in collapsed mode */
}

/* Tooltip on hover when collapsed */
.bbs-shell.admin-sidebar-collapsed .admin-sidebar-link:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-3);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  border: 1px solid var(--line-2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* ━━━ Legacy admin-nav (kept for backward compatibility, hidden) ━━━ */
.bbs-shell .admin-nav { display: none; }

/* Main content area shifts right to make room for sidebar */
.bbs-shell .admin-content {
  padding: 20px 24px;
  max-width: 1280px;
  margin: 0 0 0 240px;
  transition: margin-left 0.18s ease;
}
.bbs-shell.admin-sidebar-collapsed .admin-content { margin-left: 60px; }

/* ━━━ KPI GRID (verbatim) ━━━ */
.bbs-shell .kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.bbs-shell .kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.bbs-shell .kpi-card.featured { background: linear-gradient(135deg, rgba(34,198,230,0.08), rgba(34,198,230,0.02)); border-color: var(--line-cyan-2); }
.bbs-shell .kpi-label { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.bbs-shell .kpi-card.featured .kpi-label { color: var(--accent); }
.bbs-shell .kpi-card:not(.featured) .kpi-label { color: var(--ink-3); }
.bbs-shell .kpi-value { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.bbs-shell .kpi-meta { font-size: 11px; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.bbs-shell .kpi-meta.up { color: var(--green); }
.bbs-shell .kpi-meta.muted { color: var(--ink-3); }

.bbs-shell .admin-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; }
.bbs-shell .col-section-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.bbs-shell .col-section-title .left { display: flex; align-items: center; gap: 8px; }
.bbs-shell .col-section-title .count { font-size: 10px; color: var(--green); background: rgba(34,230,144,0.1); padding: 2px 8px; border-radius: 100px; font-weight: 700; }

/* ━━━ LIVE LIST (verbatim) ━━━ */
.bbs-shell .live-list { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.bbs-shell .live-item { padding: 11px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: all 0.15s; text-decoration: none; color: inherit; }
.bbs-shell .live-item:last-child { border-bottom: none; }
.bbs-shell .live-item:hover { background: var(--surface-hi); }
.bbs-shell .live-item.urgent { border-left-color: var(--warm); background: rgba(255,159,67,0.04); }
.bbs-shell .live-item.lia { border-left-color: var(--accent); }
.bbs-shell .live-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.bbs-shell .live-avatar.purple { background: linear-gradient(135deg, var(--purple), #5B3FCC); color: var(--ink); }
.bbs-shell .live-avatar.cyan { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--bg); }
.bbs-shell .live-avatar.muted { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-3); }
.bbs-shell .live-info { flex: 1; min-width: 0; }
.bbs-shell .live-name-row { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.bbs-shell .live-name { font-size: 12px; font-weight: 600; }
.bbs-shell .live-tag { font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.bbs-shell .live-tag.urgent { color: var(--warm); background: rgba(255,159,67,0.15); }
.bbs-shell .live-tag.lia { color: var(--accent); background: rgba(34,198,230,0.15); }
.bbs-shell .live-msg { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbs-shell .live-time { font-size: 10px; color: var(--ink-4); }

/* ━━━ PENDING + PROJECTS ━━━ */
.bbs-shell .pending-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.bbs-shell .pending-title { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.bbs-shell .pending-detail { font-size: 11px; color: var(--ink-3); margin-bottom: 12px; }
.bbs-shell .pending-detail strong { color: var(--accent); }
.bbs-shell .pending-actions { display: flex; gap: 6px; }
.bbs-shell .pending-actions .btn { flex: 1; padding: 7px 10px; font-size: 10px; }

.bbs-shell .proj-list { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.bbs-shell .proj-item { padding: 14px; border-bottom: 1px solid var(--line); }
.bbs-shell .proj-item:last-child { border-bottom: none; }
.bbs-shell .proj-item-head { display: flex; justify-content: space-between; margin-bottom: 8px; align-items: flex-start; }
.bbs-shell .proj-id { font-size: 11px; color: var(--ink-3); }
.bbs-shell .proj-name { font-size: 13px; font-weight: 600; margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bbs-shell .proj-subdomain { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--accent); background: rgba(34,198,230,0.06); padding: 2px 7px; border-radius: 4px; font-weight: 500; }
.bbs-shell .proj-status-badge { font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; text-align: right; margin-bottom: 4px; }
.bbs-shell .proj-status-badge.design { color: var(--warm); background: rgba(255,159,67,0.1); }
.bbs-shell .proj-status-badge.dev { color: var(--green); background: rgba(34,230,144,0.1); }
.bbs-shell .proj-status-badge.review { color: var(--warm); background: rgba(255,159,67,0.1); }
.bbs-shell .proj-pct { font-size: 12px; color: var(--accent); font-weight: 700; }
.bbs-shell .proj-progress { height: 5px; background: rgba(255,255,255,0.06); border-radius: 100px; overflow: hidden; margin-bottom: 8px; }
.bbs-shell .proj-progress-fill { height: 100%; border-radius: 100px; }
.bbs-shell .proj-progress-fill.cyan-purple { background: linear-gradient(90deg, var(--accent), var(--purple)); }
.bbs-shell .proj-progress-fill.cyan-green { background: linear-gradient(90deg, var(--accent), var(--green)); }
.bbs-shell .proj-meta { display: flex; justify-content: space-between; font-size: 10px; }
.bbs-shell .proj-meta-left { color: var(--ink-3); }
.bbs-shell .proj-meta-right.green { color: var(--green); }
.bbs-shell .proj-meta-right.warn { color: var(--warm); }

.bbs-shell .insight-card { background: linear-gradient(135deg, rgba(34,230,144,0.08), rgba(34,198,230,0.04)); border: 1px solid rgba(34,230,144,0.25); border-radius: 10px; padding: 14px; display: flex; gap: 12px; margin-top: 12px; }
.bbs-shell .insight-icon { width: 28px; height: 28px; border-radius: 6px; background: rgba(34,230,144,0.15); border: 1px solid rgba(34,230,144,0.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--green); }
.bbs-shell .insight-text { font-size: 11px; color: var(--ink-2); line-height: 1.5; }
.bbs-shell .insight-text strong { color: var(--ink); }

/* ━━━ EMPTY STATES ━━━ */
.bbs-shell .empty {
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
}
.bbs-shell .empty strong { color: var(--ink-2); display: block; margin-bottom: 4px; font-size: 13px; }

/* ━━━ SETTINGS / TOGGLES (verbatim from prototype) ━━━ */
.bbs-shell .settings-wrap { max-width: 1100px; margin: 32px auto; padding: 0 20px 60px; }
.bbs-shell .toggle-group { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 14px; scroll-margin-top: 80px; }
.bbs-shell .toggle-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bbs-shell .toggle-group-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; background: rgba(34,198,230,0.08); }
.bbs-shell .toggle-group-title { font-size: 14px; font-weight: 700; }
.bbs-shell .toggle-group-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.bbs-shell .toggle-group-body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ━━━ v1.22.0: SETTINGS PAGE LAYOUT ━━━
 * Sticky left sub-nav matching Linear/Stripe/Notion settings UX.
 * Search bar at top filters toggle rows in real-time.
 * Operators jump to a category by clicking the sub-nav link (smooth scroll).
 * Below 900px, sub-nav becomes a horizontal scroller above content.
 */
.bbs-shell .settings-layout-v22 { max-width: none; padding: 24px 24px 60px; }
.bbs-shell .settings-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.bbs-shell .settings-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 280px;
  color: var(--ink-3);
  transition: border-color 0.15s, background 0.15s;
}
.bbs-shell .settings-search-wrap:focus-within {
  border-color: var(--line-cyan-2);
  background: var(--surface-hi);
  color: var(--ink-2);
}
.bbs-shell .settings-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 13px;
  outline: none;
  min-width: 0;
}
.bbs-shell .settings-search-input::placeholder { color: var(--ink-4); }
.bbs-shell .settings-search-kbd {
  background: var(--bg-2);
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
}

.bbs-shell .settings-grid-v22 {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: flex-start;
}

.bbs-shell .settings-subnav {
  position: sticky;
  top: 76px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 8px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.bbs-shell .settings-subnav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 4px 12px 8px;
}
.bbs-shell .settings-subnav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.bbs-shell .settings-subnav-link:hover { background: var(--surface-hi); color: var(--ink); }
.bbs-shell .settings-subnav-link.active { background: rgba(34,198,230,0.1); color: var(--accent); }
.bbs-shell .settings-subnav-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 20px; height: 20px;
  align-items: center;
  justify-content: center;
}
.bbs-shell .settings-subnav-icon svg { width: 18px; height: 18px; }
.bbs-shell .settings-subnav-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.bbs-shell .settings-subnav-count {
  background: var(--bg-2);
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 20px;
  text-align: center;
}

.bbs-shell .settings-content-v22 { min-width: 0; }

/* Toggle row dimmed when its parent toggle is off */
.bbs-shell .toggle-row.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.bbs-shell .toggle-row.is-disabled .toggle-row-name::after {
  content: " (parent off)";
  font-size: 10px;
  font-weight: 500;
  color: var(--warm);
}

/* Search hides non-matching rows */
.bbs-shell .toggle-row.is-filtered-out { display: none; }
.bbs-shell .toggle-group.is-empty-after-filter { display: none; }

@media (max-width: 900px) {
  .bbs-shell .settings-grid-v22 { grid-template-columns: 1fr; }
  .bbs-shell .settings-subnav {
    position: static;
    max-height: none;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    padding: 8px;
  }
  .bbs-shell .settings-subnav-label { display: none; }
  .bbs-shell .settings-subnav-link { white-space: nowrap; }
  .bbs-shell .settings-subnav-text { max-width: 100px; }
  .bbs-shell .settings-page-head { gap: 12px; }
  .bbs-shell .settings-search-wrap { min-width: 100%; }
}
.bbs-shell .toggle-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: rgba(0,0,0,0.2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: all 0.15s; }
.bbs-shell .toggle-row:hover { background: var(--surface-hi); }
.bbs-shell .toggle-row-info { flex: 1; }
.bbs-shell .toggle-row-name { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.bbs-shell .toggle-row-desc { font-size: 10px; color: var(--ink-3); line-height: 1.4; }

/* ━━━ AUTH PAGES (login + verify + sent) ━━━ */
.bbs-shell .auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.bbs-shell .auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 24px 80px -32px rgba(0,0,0,0.6);
}
.bbs-shell .auth-brand { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.bbs-shell .auth-brand .b { color: var(--accent); }
.bbs-shell .auth-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 20px; }
.bbs-shell .auth-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; line-height: 1.2; }
.bbs-shell .auth-sub { font-size: 13px; color: var(--ink-2); margin-bottom: 24px; }
.bbs-shell .auth-field { margin-bottom: 16px; }
.bbs-shell .auth-msg { font-size: 12px; padding: 10px 12px; border-radius: 8px; margin-top: 14px; }
.bbs-shell .auth-msg.ok    { background: rgba(34,230,144,0.10); color: var(--green); border: 1px solid rgba(34,230,144,0.25); }
.bbs-shell .auth-msg.error { background: rgba(255,95,87,0.10); color: var(--danger); border: 1px solid rgba(255,95,87,0.25); }
.bbs-shell .auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-3); text-align: center; }
.bbs-shell .auth-foot a { color: var(--accent); }

/* ━━━ DASHBOARD HEADER ━━━ */
.bbs-shell .page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.bbs-shell .page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.bbs-shell .page-head p { font-size: 13px; color: var(--ink-3); margin: 0; }

/* ━━━ v1.22.1: Settings group contextual help ━━━
 * "?" icon next to each toggle group title. Hover/focus to reveal a tooltip
 * with 1-3 sentences explaining what the group does. CSS-only (no JS needed).
 */
.bbs-shell .bbs-help-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-3);
  cursor: help;
  transition: background 0.12s, color 0.12s;
  outline: none;
}
.bbs-shell .bbs-help-trigger:hover,
.bbs-shell .bbs-help-trigger:focus { background: var(--surface-hi); color: var(--accent); }
.bbs-shell .bbs-help-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-3);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  width: 320px;
  text-align: left;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.bbs-shell .bbs-help-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--line-2);
}
.bbs-shell .bbs-help-trigger:hover .bbs-help-tip,
.bbs-shell .bbs-help-trigger:focus .bbs-help-tip {
  opacity: 1;
  pointer-events: auto;
}

/* ━━━ v1.22.4: dashboard utility classes ━━━
 * Replaces inline styles on /painel (dashboard.php) with semantic classes.
 * Same visual outcome, but stylable from CSS instead of being scattered across PHP.
 */
.bbs-shell .urgent-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 95, 87, 0.08);
  border: 1px solid rgba(255, 95, 87, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s, border-color 0.12s;
}
.bbs-shell .urgent-banner:hover {
  background: rgba(255, 95, 87, 0.12);
  border-color: rgba(255, 95, 87, 0.5);
}
.bbs-shell .urgent-banner-icon { font-size: 24px; }
.bbs-shell .urgent-banner-body { flex: 1; }
.bbs-shell .urgent-banner-title { font-size: 13px; font-weight: 700; color: var(--danger); }
.bbs-shell .urgent-banner-sub { font-size: 11px; color: var(--ink-3); }
.bbs-shell .col-section-title.spaced-top { margin-top: 20px; }
.bbs-shell .col-section-title.spaced-top-lg { margin-top: 24px; }
.bbs-shell .quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* ━━━ v1.22.0: LIA PAGE TAB NAV ━━━
 * Sticky horizontal tab bar at the top of /painel/lia. Click → smooth scroll to section.
 */
.bbs-shell .lia-tab-nav {
  position: sticky;
  top: 56px;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  margin: 0 -24px 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.bbs-shell .lia-tab-nav::-webkit-scrollbar { display: none; }
.bbs-shell .lia-tab-link {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.bbs-shell .lia-tab-link:hover { color: var(--ink); }
.bbs-shell .lia-tab-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ━━━ FOOTER STAMP ━━━ */
.bbs-shell .stamp { margin-top: 28px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 11px; color: var(--ink-3); text-align: center; }

/* ━━━ RESPONSIVE (verbatim from prototype) ━━━ */
@media (max-width: 900px) {
  .bbs-shell .admin-grid { grid-template-columns: 1fr; }
  .bbs-shell .kpi-grid { grid-template-columns: 1fr 1fr; }
  .bbs-shell .toggle-group-body { grid-template-columns: 1fr; }
  .bbs-shell .admin-topbar { padding: 10px 16px; }
  .bbs-shell .admin-content { padding: 16px; margin-left: 0; }

  /* v1.22.0: sidebar becomes slide-over drawer on mobile */
  .bbs-shell .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
  }
  .bbs-shell.admin-sidebar-open .admin-sidebar { transform: translateX(0); }
  .bbs-shell.admin-sidebar-collapsed .admin-content { margin-left: 0; }

  /* Backdrop when drawer is open */
  .bbs-shell.admin-sidebar-open::before {
    content: "";
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(0,0,0,0.5);
    z-index: 49;
  }

  /* On mobile the toggle button always opens the drawer (not collapse) */
  .bbs-shell .admin-sidebar-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .bbs-shell .kpi-grid { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PHASE 2.1 — LIA CHAT WIDGET (floating, public site)
   Scoped to .bbs-lia-widget so it has its own token universe
   independent of .bbs-shell (the widget loads on the marketing
   site too where .bbs-shell is not present).
   Tokens are EXACT prototype values.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bbs-lia-widget {
  --bg: #0A0617;
  --bg-2: #0F0826;
  --bg-3: #1A0E3D;
  --surface: rgba(255,255,255,0.04);
  --surface-hi: rgba(255,255,255,0.06);
  --line: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.1);
  --line-cyan: rgba(34,198,230,0.18);
  --line-cyan-2: rgba(34,198,230,0.3);
  --ink: #fff;
  --ink-2: rgba(255,255,255,0.7);
  --ink-3: rgba(255,255,255,0.5);
  --ink-4: rgba(255,255,255,0.5); /* v1.18.0 WCAG AA fix */
  --accent: #22C6E6;
  --accent-2: #1B86A8;
  --warm: #FF9F43;
  --warm-2: #FF6B35;
  --green: #22E690;
  --purple: #7B5CFF;
  --danger: #FF5F57;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bbs-lia-widget *, .bbs-lia-widget *::before, .bbs-lia-widget *::after { box-sizing: border-box; margin: 0; padding: 0; }
.bbs-lia-widget button { font-family: inherit; cursor: pointer; }
.bbs-lia-widget input, .bbs-lia-widget textarea { font-family: inherit; color: inherit; }
.bbs-lia-widget a { color: inherit; }
.bbs-lia-widget code, .bbs-lia-widget .mono { font-family: 'JetBrains Mono', monospace; }

@keyframes bbs-spin { to { transform: rotate(360deg); } }
@keyframes bbs-chat-open { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes bbs-pulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }

/* ━━━ Launcher ━━━ */
.bbs-lia-widget .chat-launcher {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
  z-index: 998;
}
.bbs-lia-widget .chat-btn {
  display: flex; align-items: center; gap: 12px;
  background: rgba(15,8,38,0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-cyan-2);
  border-radius: 100px;
  padding: 8px 18px 8px 8px;
  box-shadow: 0 12px 36px -10px rgba(34,198,230,0.4);
  transition: all 0.2s;
  color: var(--ink);
}
.bbs-lia-widget .chat-btn:hover { transform: translateY(-2px); }
.bbs-lia-widget .chat-btn-avatar { position: relative; width: 42px; height: 42px; flex-shrink: 0; }
.bbs-lia-widget .chat-btn-avatar-halo {
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--purple), var(--warm), var(--green), var(--accent));
  opacity: 0.5; filter: blur(4px);
  animation: bbs-spin 8s linear infinite;
}
.bbs-lia-widget .chat-btn-avatar-inner {
  position: relative; width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-3) 100%);
  border: 1.5px solid var(--line-cyan-2);
  display: flex; align-items: center; justify-content: center;
}
.bbs-lia-widget .chat-btn-badge {
  position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--green);
  border: 2.5px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; color: var(--bg);
}
.bbs-lia-widget .chat-btn-text { display: flex; flex-direction: column; align-items: flex-start; }
.bbs-lia-widget .chat-btn-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.bbs-lia-widget .chat-btn-sub { font-size: 10px; color: var(--ink-3); margin-top: 2px; }

/* ━━━ Window ━━━ */
.bbs-lia-widget .chat-window {
  position: fixed; bottom: 20px; right: 20px;
  width: 400px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  background: linear-gradient(180deg, rgba(20,12,46,0.98) 0%, rgba(10,6,23,0.98) 100%);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  border: 1px solid var(--line-cyan);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 100px -30px rgba(34,198,230,0.4);
  z-index: 999;
  display: none;
  flex-direction: column;
  color: var(--ink);
}
.bbs-lia-widget .chat-window.open { display: flex; animation: bbs-chat-open 0.3s cubic-bezier(0.34,1.56,0.64,1); }
.bbs-lia-widget .chat-window::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,198,230,0.6), transparent);
}

.bbs-lia-widget .chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(34,198,230,0.04);
  display: flex; align-items: center; gap: 12px;
}
.bbs-lia-widget .chat-avatar { position: relative; width: 38px; height: 38px; flex-shrink: 0; }
.bbs-lia-widget .chat-avatar-halo {
  position: absolute; inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--purple), var(--warm), var(--green), var(--accent));
  opacity: 0.6; filter: blur(3px);
}
.bbs-lia-widget .chat-avatar-inner {
  position: relative; width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-3) 100%);
  border: 1.5px solid var(--line-cyan-2);
  display: flex; align-items: center; justify-content: center;
}
.bbs-lia-widget .chat-avatar-status {
  position: absolute; bottom: -1px; right: -1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--green);
  border: 2.5px solid var(--bg-2);
}
.bbs-lia-widget .chat-name-wrap { flex: 1; }
.bbs-lia-widget .chat-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.bbs-lia-widget .chat-name-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(34,198,230,0.1);
  border: 1px solid var(--line-cyan-2);
  padding: 2px 6px;
  border-radius: 100px;
}
.bbs-lia-widget .chat-status { font-size: 10px; color: var(--ink-3); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.bbs-lia-widget .chat-status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.bbs-lia-widget .chat-close {
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-3);
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.bbs-lia-widget .chat-close:hover { color: var(--ink); background: var(--surface-hi); }

.bbs-lia-widget .chat-consent {
  padding: 14px 18px;
  background: rgba(255,159,67,0.04);
  border-bottom: 1px solid var(--line);
}
.bbs-lia-widget .chat-consent-title {
  font-size: 11px; font-weight: 700; color: var(--warm);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.bbs-lia-widget .chat-consent-text { font-size: 11px; color: var(--ink-2); line-height: 1.5; }
.bbs-lia-widget .chat-consent-text a { color: var(--accent); text-decoration: underline; }

.bbs-lia-widget .chat-messages {
  flex: 1; padding: 16px 18px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 240px; max-height: 360px;
}
.bbs-lia-widget .chat-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 90%; }
.bbs-lia-widget .chat-msg.from-bot { align-self: flex-start; }
.bbs-lia-widget .chat-msg.from-user { align-self: flex-end; flex-direction: row-reverse; }
.bbs-lia-widget .chat-msg-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.bbs-lia-widget .chat-msg.from-user .chat-msg-avatar { display: none; }
.bbs-lia-widget .chat-msg-bubble {
  background: linear-gradient(135deg, rgba(34,198,230,0.08), rgba(123,92,255,0.04));
  border: 1px solid var(--line-cyan);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 13px;
  font-size: 12.5px; line-height: 1.5;
  color: var(--ink);
}
.bbs-lia-widget .chat-msg.from-user .chat-msg-bubble {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: none;
  color: var(--bg);
  border-radius: 14px 14px 4px 14px;
  font-weight: 500;
}

/* v1.12.5: operator (human handoff) bubble — visually distinct from Lia's AI bubble */
.bbs-lia-widget .chat-msg.from-operator .chat-msg-avatar-operator {
  background: linear-gradient(135deg, #FF9F43 0%, #FFC371 100%);
  font-size: 14px;
}
.bbs-lia-widget .chat-msg.from-operator .chat-msg-bubble-operator {
  background: rgba(255,159,67,0.10);
  border: 1px solid rgba(255,159,67,0.35);
  border-radius: 14px 14px 14px 4px;
}
.bbs-lia-widget .chat-msg-operator-name {
  font-size: 10px; font-weight: 700;
  color: var(--warm); /* v1.18.0: was hardcoded #FF9F43 */
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 4px;
}

/* v1.12.11/14: Quick-reply chips for AI greeting (one-tap conversation starters)
   Premium glassmorphism design with subtle gradients and microinteractions. */
.bbs-lia-widget .bbs-lia-chips {
  display: flex; flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 4px 34px;
  padding-right: 10px;
  animation: bbsLiaChipsIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes bbsLiaChipsIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger each chip's entrance for a polished cascade */
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip {
  animation: bbsLiaChipIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip:nth-child(1) { animation-delay: 0.05s; }
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip:nth-child(2) { animation-delay: 0.10s; }
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip:nth-child(3) { animation-delay: 0.15s; }
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip:nth-child(4) { animation-delay: 0.20s; }
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip:nth-child(5) { animation-delay: 0.25s; }
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip:nth-child(6) { animation-delay: 0.30s; }
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip:nth-child(7) { animation-delay: 0.35s; }
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip:nth-child(8) { animation-delay: 0.40s; }
.bbs-lia-widget .bbs-lia-chips .bbs-lia-chip:nth-child(9) { animation-delay: 0.45s; }
@keyframes bbsLiaChipIn {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.bbs-lia-widget .bbs-lia-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(34,198,230,0.10) 0%, rgba(123,92,255,0.06) 100%);
  border: 1px solid rgba(34,198,230,0.28);
  color: var(--accent, #22C6E6);
  padding: 7px 13px;
  border-radius: 100px;
  font-size: 12px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.18s ease,
              border-color 0.18s ease,
              box-shadow 0.18s ease;
  white-space: nowrap;
  position: relative;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.bbs-lia-widget .bbs-lia-chip:hover {
  background: linear-gradient(135deg, rgba(34,198,230,0.20) 0%, rgba(123,92,255,0.12) 100%);
  border-color: var(--accent, #22C6E6);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(34,198,230,0.35),
              0 0 0 1px rgba(34,198,230,0.15) inset;
}
.bbs-lia-widget .bbs-lia-chip:active {
  transform: translateY(0) scale(0.98);
}
.bbs-lia-widget .bbs-lia-chip-icon {
  font-size: 14px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}
.bbs-lia-widget .bbs-lia-chip-label {
  line-height: 1;
}

/* WhatsApp chip — green tint to differentiate */
.bbs-lia-widget .bbs-lia-chip-wa {
  background: linear-gradient(135deg, rgba(37,211,102,0.12) 0%, rgba(37,211,102,0.06) 100%);
  border-color: rgba(37,211,102,0.35);
  color: #25D366;
}
.bbs-lia-widget .bbs-lia-chip-wa:hover {
  background: linear-gradient(135deg, rgba(37,211,102,0.22) 0%, rgba(37,211,102,0.12) 100%);
  border-color: #25D366;
  box-shadow: 0 6px 16px -4px rgba(37,211,102,0.35),
              0 0 0 1px rgba(37,211,102,0.20) inset;
}

/* Language switch chip — neutral tint, subtler */
.bbs-lia-widget .bbs-lia-chip-lang {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
}
.bbs-lia-widget .bbs-lia-chip-lang:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.40);
  box-shadow: 0 6px 16px -4px rgba(0,0,0,0.4),
              0 0 0 1px rgba(255,255,255,0.10) inset;
}

.bbs-lia-widget .quick-replies { display: flex; flex-wrap: wrap; gap: 5px; margin-left: 34px; }
.bbs-lia-widget .qr-btn {
  background: rgba(34,198,230,0.08);
  border: 1px solid var(--line-cyan-2);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 100px;
  font-size: 11px; font-weight: 600;
  transition: all 0.15s;
}
.bbs-lia-widget .qr-btn:hover { background: rgba(34,198,230,0.18); }
.bbs-lia-widget .qr-btn.warm {
  background: rgba(255,159,67,0.08);
  border-color: rgba(255,159,67,0.3);
  color: var(--warm);
}
.bbs-lia-widget .qr-btn.warm:hover { background: rgba(255,159,67,0.18); }

.bbs-lia-widget .typing-indicator {
  display: flex; align-items: center; gap: 8px;
  margin-left: 34px;
  color: var(--ink-4); font-size: 11px;
}
.bbs-lia-widget .typing-dots { display: flex; gap: 3px; }
.bbs-lia-widget .typing-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: bbs-pulse 1.4s ease-in-out infinite;
}
.bbs-lia-widget .typing-dot:nth-child(2) { animation-delay: 0.2s; }
.bbs-lia-widget .typing-dot:nth-child(3) { animation-delay: 0.4s; }

.bbs-lia-widget .chat-input-area { padding: 12px 16px 14px; background: rgba(0,0,0,0.3); }
.bbs-lia-widget .chat-input-wrap {
  display: flex; gap: 6px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-cyan);
  border-radius: 100px;
  padding: 5px 5px 5px 14px;
}
.bbs-lia-widget .chat-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 13px; color: var(--ink);
}
.bbs-lia-widget .chat-input:disabled { opacity: 0.5; cursor: not-allowed; }
.bbs-lia-widget .chat-input-btn {
  background: transparent; border: none; color: var(--ink-3);
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.bbs-lia-widget .chat-input-btn:hover { color: var(--ink); }
.bbs-lia-widget .chat-send {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
  color: var(--bg) !important;
  width: 30px; height: 30px;
}
.bbs-lia-widget .chat-disclaimer {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-size: 9px; color: var(--ink-4);
}

@media (max-width: 480px) {
  .bbs-lia-widget .chat-window { width: calc(100vw - 16px); right: 8px; bottom: 8px; }
  /* v1.22.16: push the Lia chat launcher ABOVE the .bb-mobile-cta sticky bar
   * (bottom: 16px + ~56px button + padding = ~88px tall). Previous value of
   * 12px sat directly INSIDE the CTA bar's footprint, so the badge overlapped
   * the right portion of the "Pedir orçamento" button. This was the real
   * fix needed — I'd been patching `.bb-lia-badge` in style.css thinking it
   * was the badge, but the actual rendered widget is `.bbs-lia-widget .chat-launcher`
   * defined in this file (assets/css/suite/suite.css). Different element entirely.
   */
  .bbs-lia-widget .chat-launcher { right: 12px; bottom: 96px; }
}

/* v1.22.16: also push the launcher up on medium mobile (480-768px) where
 * the .bb-mobile-cta is also visible. The default `bottom: 20px` from line 890
 * applies above 480px but below 768px the CTA bar is still there. */
@media (min-width: 481px) and (max-width: 768px) {
  .bbs-lia-widget .chat-launcher { bottom: 100px; }
}

/* ━━━ ADMIN: Lead detail (transcript view) ━━━ */
.bbs-shell .lead-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
@media (max-width: 900px) { .bbs-shell .lead-detail-grid { grid-template-columns: 1fr; } }
.bbs-shell .transcript-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.bbs-shell .transcript-msg { padding: 10px 0; border-bottom: 1px solid var(--line); }
.bbs-shell .transcript-msg:last-child { border-bottom: none; }
.bbs-shell .transcript-role { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.bbs-shell .transcript-role.lia { color: var(--accent); }
.bbs-shell .transcript-role.visitor { color: var(--green); }
.bbs-shell .transcript-body { font-size: 12.5px; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }
.bbs-shell .transcript-time { font-size: 10px; color: var(--ink-4); margin-top: 4px; }

.bbs-shell .lead-side { display: flex; flex-direction: column; gap: 14px; }
.bbs-shell .lead-side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.bbs-shell .lead-side-title { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.bbs-shell .lead-fact { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.bbs-shell .lead-fact:last-child { border-bottom: none; }
.bbs-shell .lead-fact-label { color: var(--ink-3); }
.bbs-shell .lead-fact-value { color: var(--ink); font-weight: 500; text-align: right; max-width: 180px; word-break: break-word; }
.bbs-shell .lead-score-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 100px; overflow: hidden; margin: 8px 0 4px; }
.bbs-shell .lead-score-fill { height: 100%; background: linear-gradient(90deg, var(--warm), var(--accent), var(--green)); border-radius: 100px; }

/* ━━━ ADMIN: Leads list ━━━ */
.bbs-shell .leads-table { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bbs-shell .leads-row { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr 0.6fr 0.6fr 0.4fr; gap: 12px; padding: 12px 16px; align-items: center; border-bottom: 1px solid var(--line); font-size: 12px; text-decoration: none; color: inherit; }
.bbs-shell .leads-row:last-child { border-bottom: none; }
.bbs-shell .leads-row:hover { background: var(--surface-hi); }
.bbs-shell .leads-row.head { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); background: rgba(0,0,0,0.2); }
.bbs-shell .lead-name { font-weight: 600; color: var(--ink); }
.bbs-shell .lead-email-cell { color: var(--ink-2); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.bbs-shell .lead-score-pill { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 10px; font-weight: 700; }
.bbs-shell .lead-score-pill.hot { background: rgba(34,230,144,0.1); color: var(--green); border: 1px solid rgba(34,230,144,0.3); }
.bbs-shell .lead-score-pill.warm { background: rgba(255,159,67,0.1); color: var(--warm); border: 1px solid rgba(255,159,67,0.3); }
.bbs-shell .lead-score-pill.cold { background: rgba(255,255,255,0.05); color: var(--ink-3); border: 1px solid var(--line-2); }
@media (max-width: 900px) {
  .bbs-shell .leads-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 16px; }
  .bbs-shell .leads-row.head { display: none; }
  .bbs-shell .leads-row > *::before { content: attr(data-label) ': '; color: var(--ink-3); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 6px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PHASE 2.3 — PROPOSAL VIEW (verbatim from prototype)
   Used by /app/proposal/{uuid} (public token-gated view).
   Inherits .bbs-shell tokens.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bbs-shell .email-wrap { max-width: 700px; margin: 32px auto; padding: 0 20px; }
.bbs-shell .email-meta { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; font-size: 12px; }
.bbs-shell .email-meta-row { display: flex; justify-content: space-between; padding: 4px 0; gap: 8px; }
.bbs-shell .email-meta-row span:last-child { text-align: right; word-break: break-all; }
.bbs-shell .email-meta-label { color: var(--ink-3); font-weight: 500; flex-shrink: 0; }
.bbs-shell .email-body { background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%); border: 1px solid var(--line-cyan); border-radius: 14px; overflow: hidden; }
.bbs-shell .email-header-brand { padding: 20px 24px; background: rgba(34,198,230,0.04); border-bottom: 1px solid var(--line); text-align: center; }
.bbs-shell .email-section { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.bbs-shell .email-section:last-child { border-bottom: none; }

.bbs-shell .proposal-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.bbs-shell .proposal-greeting { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-bottom: 16px; }
.bbs-shell .proposal-greeting p { margin: 0 0 8px; }
.bbs-shell .proposal-greeting strong { color: var(--ink); }

.bbs-shell .proposal-items { background: rgba(0,0,0,0.3); border-radius: 10px; overflow: hidden; margin: 14px 0; }
.bbs-shell .proposal-item { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; gap: 12px; align-items: flex-start; }
.bbs-shell .proposal-item:last-child { border-bottom: none; }
.bbs-shell .proposal-item.total { background: rgba(34,198,230,0.05); font-weight: 700; }
.bbs-shell .proposal-item-name { color: var(--ink); }
.bbs-shell .proposal-item-desc { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.bbs-shell .proposal-item-price { color: var(--accent); font-weight: 700; flex-shrink: 0; text-align: right; }

.bbs-shell .proposal-cta-row { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .bbs-shell .proposal-cta-row { flex-direction: column; }
  .bbs-shell .proposal-cta-row .btn { width: 100%; justify-content: center; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PHASE 3.1 — ONBOARDING WIZARD + CLIENT PORTAL
   Verbatim from prototype. Scoped to .bbs-shell.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Wizard */
.bbs-shell .wizard-wrap { max-width: 720px; margin: 32px auto; padding: 0 20px; }
.bbs-shell .wizard-header { text-align: center; margin-bottom: 28px; }
.bbs-shell .wizard-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.bbs-shell .wizard-step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.bbs-shell .wizard-step-dot.done { background: var(--green); color: var(--bg); border-color: var(--green); }
.bbs-shell .wizard-step-dot.current { background: var(--accent); color: var(--bg); border-color: var(--accent); box-shadow: 0 0 16px rgba(34,198,230,0.4); }
.bbs-shell .wizard-step-line { width: 40px; height: 2px; background: var(--line-2); align-self: center; }
.bbs-shell .wizard-step-line.done { background: var(--green); }
.bbs-shell .wizard-card { background: var(--surface); border: 1px solid var(--line-cyan); border-radius: 16px; padding: 24px; }
.bbs-shell .wizard-card-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.bbs-shell .wizard-card-sub { font-size: 13px; color: var(--ink-3); margin-bottom: 20px; }

/* Form grid */
.bbs-shell .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bbs-shell .form-cell.full { grid-column: 1 / -1; }
@media (max-width: 640px) { .bbs-shell .form-row { grid-template-columns: 1fr; } }

/* Portal topbar */
.bbs-shell .portal-topbar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.bbs-shell .portal-topbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bbs-shell .portal-topbar-right { display: flex; align-items: center; gap: 14px; }
.bbs-shell .portal-subdomain {
  background: rgba(34,198,230,0.08); border: 1px solid var(--line-cyan-2);
  color: var(--accent);
  padding: 5px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  display: flex; align-items: center; gap: 6px;
}
.bbs-shell .user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}

/* Portal main / hero */
.bbs-shell .portal-main { padding: 24px; max-width: 1280px; margin: 0 auto; }
.bbs-shell .project-hero {
  background: linear-gradient(135deg, rgba(34,198,230,0.06), rgba(123,92,255,0.04));
  border: 1px solid var(--line-cyan-2);
  border-radius: 16px; padding: 22px; margin-bottom: 20px;
}
.bbs-shell .project-hero-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 16px;
  flex-wrap: wrap; gap: 10px;
}
.bbs-shell .project-id {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}
.bbs-shell .project-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.bbs-shell .progress-card { background: rgba(0,0,0,0.3); border-radius: 10px; padding: 14px; }
.bbs-shell .progress-head { display: flex; justify-content: space-between; margin-bottom: 10px; align-items: baseline; }
.bbs-shell .progress-label { font-size: 11px; color: var(--ink-3); }
.bbs-shell .progress-pct { font-size: 16px; font-weight: 700; color: var(--accent); }
.bbs-shell .progress-bar {
  height: 8px; background: rgba(255,255,255,0.06);
  border-radius: 100px; overflow: hidden;
  position: relative; margin-bottom: 10px;
}
.bbs-shell .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  border-radius: 100px;
  transition: width 0.6s ease;
}
.bbs-shell .progress-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); gap: 10px; flex-wrap: wrap; }

/* Portal tabs */
.bbs-shell .portal-tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px; overflow-x: auto;
}
.bbs-shell .portal-tab {
  background: transparent; border: none;
  color: var(--ink-3);
  padding: 10px 14px;
  font-size: 12px; font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  cursor: pointer;
}
.bbs-shell .portal-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.bbs-shell .portal-tab:hover { color: var(--ink); }
.bbs-shell .portal-panel { display: none; }
.bbs-shell .portal-panel.active { display: block; }

/* Portal grid (activity + next-action) */
.bbs-shell .portal-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 900px) { .bbs-shell .portal-grid { grid-template-columns: 1fr; } }

/* Timeline */
.bbs-shell .timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; position: relative; margin-bottom: 24px; }
.bbs-shell .tl-step { position: relative; text-align: center; }
.bbs-shell .tl-step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  font-size: 12px; font-weight: 700;
  position: relative;
}
.bbs-shell .tl-step.done .tl-step-circle { background: var(--green); color: var(--bg); }
.bbs-shell .tl-step.current .tl-step-circle { background: var(--accent); color: var(--bg); box-shadow: 0 0 16px rgba(34,198,230,0.4); }
.bbs-shell .tl-step.todo .tl-step-circle { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-3); }
.bbs-shell .tl-pulse {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg);
  animation: bbs-pulse-scale 1.5s ease-in-out infinite;
}
@keyframes bbs-pulse-scale { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.3); opacity: 1; } }
.bbs-shell .tl-step-name { font-size: 11px; font-weight: 600; }
.bbs-shell .tl-step-date { font-size: 10px; color: var(--ink-4); margin-top: 2px; }

/* Activity feed */
.bbs-shell .activity-feed {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.bbs-shell .activity-item {
  display: flex; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.bbs-shell .activity-item:last-child { border-bottom: none; }
.bbs-shell .activity-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bbs-shell .activity-icon.cyan   { background: rgba(34,198,230,0.12); color: var(--accent); }
.bbs-shell .activity-icon.purple { background: rgba(123,92,255,0.12); color: var(--purple); }
.bbs-shell .activity-icon.warm   { background: rgba(255,159,67,0.12); color: var(--warm); }
.bbs-shell .activity-icon.green  { background: rgba(34,230,144,0.12); color: var(--green); }
.bbs-shell .activity-text { font-size: 12px; font-weight: 500; }
.bbs-shell .activity-meta { font-size: 10px; color: var(--ink-4); margin-top: 2px; }

/* Next action card */
.bbs-shell .next-action-card {
  background: linear-gradient(135deg, rgba(34,198,230,0.08), rgba(123,92,255,0.04));
  border: 1px solid var(--line-cyan-2);
  border-radius: 12px;
  padding: 18px;
}
.bbs-shell .next-action-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.bbs-shell .next-action-desc { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin-bottom: 12px; }

/* Dropzone */
.bbs-shell .dropzone {
  border: 2px dashed var(--line-cyan-2);
  background: rgba(34,198,230,0.03);
  border-radius: 14px;
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.bbs-shell .dropzone:hover, .bbs-shell .dropzone.dragover {
  background: rgba(34,198,230,0.07);
  border-color: var(--accent);
}
.bbs-shell .dropzone-icon { font-size: 28px; margin-bottom: 10px; }

/* Files grid */
.bbs-shell .files-grid { display: flex; flex-direction: column; gap: 10px; }
.bbs-shell .file-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.bbs-shell .file-item.new { border-color: var(--line-cyan-2); background: rgba(34,198,230,0.04); }
.bbs-shell .file-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; letter-spacing: 0.05em;
  flex-shrink: 0; color: var(--ink-2);
}
.bbs-shell .file-icon.pdf { background: rgba(255,95,87,0.1); border-color: rgba(255,95,87,0.3); color: var(--danger); }
.bbs-shell .file-icon.fig { background: rgba(123,92,255,0.1); border-color: rgba(123,92,255,0.3); color: var(--purple); }
.bbs-shell .file-icon.psd { background: rgba(34,198,230,0.1); border-color: var(--line-cyan-2); color: var(--accent); }
.bbs-shell .file-icon.doc, .bbs-shell .file-icon.docx { background: rgba(34,198,230,0.1); color: var(--accent); }
.bbs-shell .file-icon.xls, .bbs-shell .file-icon.xlsx { background: rgba(34,230,144,0.1); color: var(--green); }
.bbs-shell .file-icon.zip { background: rgba(255,159,67,0.1); color: var(--warm); }
.bbs-shell .file-name { flex: 1; min-width: 0; }
.bbs-shell .file-name-text { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbs-shell .file-meta { font-size: 10px; color: var(--ink-4); margin-top: 2px; }
.bbs-shell .new-badge {
  display: inline-block;
  background: rgba(34,198,230,0.15);
  color: var(--accent);
  font-size: 9px; font-weight: 700;
  padding: 1px 6px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* Message thread */
.bbs-shell .msg-thread {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  min-height: 280px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bbs-shell .msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.5;
}
.bbs-shell .msg-bubble.from-me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg);
  border-radius: 14px 14px 4px 14px;
  font-weight: 500;
}
.bbs-shell .msg-bubble.from-them {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(34,198,230,0.08), rgba(123,92,255,0.04));
  border: 1px solid var(--line-cyan);
  border-radius: 14px 14px 14px 4px;
  color: var(--ink);
}
.bbs-shell .msg-time {
  font-size: 10px;
  color: var(--ink-4);
  margin-top: 4px;
  opacity: 0.8;
}
.bbs-shell .msg-bubble.from-me .msg-time { color: rgba(0,0,0,0.55); }

/* Chat input reuse from Lia widget (inherited from earlier CSS) */
.bbs-shell .chat-input-wrap {
  display: flex; gap: 6px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-cyan);
  border-radius: 100px;
  padding: 5px 5px 5px 14px;
}
.bbs-shell .chat-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 13px; color: var(--ink);
}
.bbs-shell .chat-input-btn {
  background: transparent; border: none; color: var(--ink-3);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.bbs-shell .chat-send {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
  color: var(--bg) !important;
}

/* Badges for status */
.bbs-shell .badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.bbs-shell .badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bbs-shell .badge-warm { background: rgba(255,159,67,0.12); color: var(--warm); border: 1px solid rgba(255,159,67,0.3); }
.bbs-shell .badge-green { background: rgba(34,230,144,0.12); color: var(--green); border: 1px solid rgba(34,230,144,0.3); }
.bbs-shell .badge-cold { background: rgba(255,255,255,0.06); color: var(--ink-3); border: 1px solid var(--line-2); }
.bbs-shell .badge-purple { background: rgba(123,92,255,0.12); color: var(--purple); border: 1px solid rgba(123,92,255,0.3); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PHASE 3.3 — PAYMENT METHOD PICKER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.bbs-shell .bbs-pay-method {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-cyan);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.bbs-shell .bbs-pay-method:hover {
  background: rgba(34,198,230,0.06);
  border-color: var(--accent);
  transform: translateX(2px);
}
.bbs-shell .bbs-pay-method-icon {
  font-size: 24px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bbs-shell .bbs-pay-method-info { flex: 1; }
.bbs-shell .bbs-pay-method-name { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.bbs-shell .bbs-pay-method-desc { font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.bbs-shell .bbs-pay-method-arrow {
  color: var(--accent);
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v1.18.0 — PRINT STYLESHEET
   Contracts and proposals print via window.print() and need
   a clean white-on-black inversion plus chrome removal.
   Without this, the dark theme prints as black ink on dark
   pages OR with low-contrast inverted output.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@page {
  size: A4;
  margin: 18mm 16mm;
}

@media print {
  /* Hard-reset shell to white-paper */
  .bbs-shell,
  .bbs-shell body,
  body.bbs-shell-body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  .bbs-shell *,
  .bbs-shell *::before,
  .bbs-shell *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Hide UI chrome — only the document body should print */
  .bbs-shell .admin-topbar,
  .bbs-shell .admin-side,
  .bbs-shell .admin-bottom-nav,
  .bbs-shell .app-shell-nav,
  .bbs-shell .app-bottom-nav,
  .bbs-shell .lead-side,
  .bbs-shell .btn,
  .bbs-shell .btn-ghost,
  .bbs-shell .btn-sm,
  .bbs-shell .btn-lg,
  .bbs-shell button,
  .bbs-shell .pending-actions,
  .bbs-shell .proposal-cta-row,
  .bbs-shell .modal,
  .bbs-shell .toast,
  .bbs-shell .live-time,
  .bbs-shell .activity-meta,
  .bbs-shell nav,
  .bbs-shell .no-print,
  .bbs-lia-widget {
    display: none !important;
  }

  /* Headings and links: black, no underline drift */
  .bbs-shell h1, .bbs-shell h2, .bbs-shell h3, .bbs-shell h4 {
    color: #000 !important;
    page-break-after: avoid;
  }
  .bbs-shell a { color: #000 !important; text-decoration: underline; }
  .bbs-shell a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555 !important;
  }

  /* Page breaks for long contracts/proposals */
  .bbs-shell .contract-section,
  .bbs-shell .proposal-section,
  .bbs-shell .signature-block {
    page-break-inside: avoid;
  }

  /* Force borders to print as thin rules instead of vanishing */
  .bbs-shell .signature-block,
  .bbs-shell table,
  .bbs-shell .contract-meta {
    border-color: #000 !important;
  }

  /* Tighten spacing for paper */
  .bbs-shell .admin-content,
  .bbs-shell .app-content {
    padding: 0 !important;
    max-width: 100% !important;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v1.18.0 — TOUCH TARGET FLOOR (44×44 minimum)
   Bumps small buttons on touch devices to meet iOS+Android
   accessibility minimums. Uses pointer:coarse so desktop
   users keep the compact dense layout.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (pointer: coarse) {
  .bbs-shell .btn,
  .bbs-shell button,
  .bbs-shell .btn-sm,
  .bbs-shell .pending-actions .btn {
    min-height: 44px;
    min-width: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .bbs-shell .btn-sm { font-size: 12px; }
  .bbs-shell .pending-actions .btn { font-size: 11px; }

  /* Form fields too — too small to tap accurately at 36px */
  .bbs-shell .field,
  .bbs-shell input[type="text"],
  .bbs-shell input[type="email"],
  .bbs-shell input[type="password"],
  .bbs-shell input[type="number"],
  .bbs-shell input[type="date"],
  .bbs-shell input[type="time"],
  .bbs-shell select,
  .bbs-shell textarea {
    min-height: 44px;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v1.18.0 — REDUCED MOTION
   Respects OS-level "reduce motion" preference.
   Replaces continuous animations with a single static state,
   keeps essential transitions at near-zero duration.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (prefers-reduced-motion: reduce) {
  .bbs-shell *,
  .bbs-shell *::before,
  .bbs-shell *::after,
  .bbs-lia-widget *,
  .bbs-lia-widget *::before,
  .bbs-lia-widget *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v1.18.0 — UTILITY CLASSES (extracted from inline styles)
   The most-repeated inline patterns from admin templates,
   promoted to classes so future templates reach for them
   instead of growing more inline-style sprawl.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bbs-shell .meta-label {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
}
.bbs-shell .meta-sub {
  font-size: 10px;
  color: var(--ink-4);
  margin-top: 2px;
}
.bbs-shell .meta-sub-3 {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 2px;
}

/* NOTE: .empty class already exists in this stylesheet (line 334).
   No new empty-state utility needed — list views already use it. */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v1.18.0 — TOAST + CONFIRM SYSTEM
   Replaces native browser alert() and confirm() with
   styled in-theme equivalents. Async API: bbs_toast(msg)
   for non-blocking notifications, bbs_confirm(msg) returns
   a Promise<boolean>.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bbs-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}
.bbs-toast {
  background: #1A0E3D;
  color: #fff;
  border: 1px solid var(--line-cyan-2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-family: 'Inter', -apple-system, sans-serif;
  min-width: 280px;
  max-width: 420px;
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  animation: bbsToastIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bbs-toast.bbs-toast-success { border-color: rgba(34, 230, 144, 0.4); }
.bbs-toast.bbs-toast-error   { border-color: rgba(255, 95, 87, 0.5); }
.bbs-toast.bbs-toast-warning { border-color: rgba(255, 159, 67, 0.5); }
.bbs-toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
}
.bbs-toast-success .bbs-toast-icon { background: rgba(34,230,144,0.15); color: #22E690; }
.bbs-toast-error   .bbs-toast-icon { background: rgba(255,95,87,0.15);  color: #FF5F57; }
.bbs-toast-warning .bbs-toast-icon { background: rgba(255,159,67,0.15); color: #FF9F43; }
.bbs-toast-info    .bbs-toast-icon { background: rgba(34,198,230,0.15); color: #22C6E6; }
.bbs-toast-msg { flex: 1; line-height: 1.4; }
.bbs-toast-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}
.bbs-toast-close:hover { color: #fff; }
@keyframes bbsToastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.bbs-toast.bbs-toast-out {
  animation: bbsToastOut 0.2s ease-in forwards;
}
@keyframes bbsToastOut {
  to { opacity: 0; transform: translateX(20px); }
}

.bbs-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 23, 0.7);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: bbsConfirmIn 0.2s ease-out;
}
@keyframes bbsConfirmIn { from { opacity: 0; } to { opacity: 1; } }
.bbs-confirm-modal {
  background: #1A0E3D;
  border: 1px solid var(--line-cyan-2);
  border-radius: 14px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #fff;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.bbs-confirm-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}
.bbs-confirm-msg {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
  line-height: 1.5;
}
.bbs-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.bbs-confirm-btn {
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  min-height: 38px;
}
.bbs-confirm-cancel {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
}
.bbs-confirm-cancel:hover { background: rgba(255,255,255,0.05); color: #fff; }
.bbs-confirm-ok {
  background: linear-gradient(135deg, #22C6E6 0%, #1B86A8 100%);
  color: #0A0617;
}
.bbs-confirm-ok.danger {
  background: linear-gradient(135deg, #FF5F57 0%, #E24B4A 100%);
  color: #fff;
}
@media (pointer: coarse) {
  .bbs-confirm-btn { min-height: 44px; padding: 12px 24px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v1.19.0 — FOCUS-VISIBLE INDICATOR
   WCAG 2.4.7: keyboard-only users must see where focus is.
   :focus-visible (vs :focus) shows the ring only for keyboard
   navigation, not on mouse clicks — so click-and-blur doesn't
   leave an ugly outline on hover-clicked buttons.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bbs-shell button:focus-visible,
.bbs-shell .btn:focus-visible,
.bbs-shell a:focus-visible,
.bbs-shell .toggle:focus-visible,
.bbs-shell [tabindex]:focus-visible,
.bbs-shell .lead-card:focus-visible,
.bbs-shell .leads-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.bbs-shell .field:focus-visible,
.bbs-shell input:focus-visible,
.bbs-shell select:focus-visible,
.bbs-shell textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
/* Ghost buttons need a slightly different ring — accent on transparent
   bg can clash with the ghost border. Use a subtle box-shadow halo. */
.bbs-shell .btn-ghost:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}
/* Toast close + confirm buttons share the same treatment */
.bbs-toast-close:focus-visible,
.bbs-confirm-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v1.19.0 — SKIP TO CONTENT LINK
   First focusable element on every shell page. Visually hidden
   until focused, then slides into view at top-left.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bbs-skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  font-size: 13px;
  font-weight: 700;
  z-index: 100001;
  transition: top 0.15s ease-out;
  text-decoration: none;
}
.bbs-skip-link:focus,
.bbs-skip-link:focus-visible {
  top: 0;
  outline: 2px solid var(--bg);
  outline-offset: -4px;
}
