﻿/* ============================================
   HOROS — Premium SaaS Dashboard
   v1 dimensions preserved · dark default · light theme = color swap only
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

:root {
  /* ============ SIDEBAR (always dark, identity) ============ */
  --sb-bg-1: #1B1D22;
  --sb-bg-2: #17191D;
  --sb-bg-3: #141519;
  --sb-accent: #1F93FF;
  --sb-accent-soft: #7EC8FF;

  /* ============ DARK = DEFAULT ============ */
  --bg: #1A1C20;
  --bg-elev: #1E2025;
  --card: #25272C;
  --card-2: #2C2E33;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);

  /* Text */
  --fg: #ECEDEE;
  --fg-2: #C1C5CD;
  --fg-3: #9EA4B0;
  --fg-4: #6E7684;
  --placeholder: #6E7684;
  --label: #9EA4B0;

  /* Brand */
  --accent: #1F93FF;
  --accent-hover: #1672CC;
  --accent-active: #1060B3;
  --accent-soft: #7EC8FF;
  --accent-glow: rgba(31, 147, 255, 0.30);
  --identity: #1F93FF;

  /* Status */
  --hot: #ff5a4e;
  --hot-soft: rgba(255, 90, 78, 0.14);
  --warm: #f5b544;
  --warm-soft: rgba(245, 181, 68, 0.14);
  --cold: #59c8ff;
  --cold-soft: rgba(89, 200, 255, 0.14);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);
  --danger: #f87171;

  /* Gradients */
  --grad-side: linear-gradient(180deg, var(--sb-bg-1) 0%, var(--sb-bg-2) 55%, var(--sb-bg-3) 100%);
  --grad-glow: none;

  /* Card gradient (used by panels/kpi/leads) */
  --card-grad: linear-gradient(180deg, #25272C 0%, #1E2025 100%);
  --panel-grad: linear-gradient(180deg, #25272C 0%, #1E2025 100%);
  --lead-grad: linear-gradient(180deg, #25272C 0%, #22242A 100%);

  /* Shadows */
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 24px 48px -16px rgba(0, 0, 0, 0.6);

  /* Surface aliases used by messages module */
  --bg-1: #1A1C20;
  --bg-2: #25272C;
  --border: rgba(255, 255, 255, 0.09);

  /* Surfaces / utility */
  --topbar-bg: rgba(26, 28, 32, 0.88);
  --topbar-border: var(--line);
  --search-bg: rgba(255, 255, 255, 0.03);
  --search-bg-focus: rgba(31,147,255,0.04);
  --search-placeholder: rgba(255, 255, 255, 0.32);
  --search-icon: rgba(255, 255, 255, 0.36);
  --kbd-bg: rgba(255, 255, 255, 0.05);
  --kbd-border: rgba(255, 255, 255, 0.06);
  --kbd-fg: rgba(255, 255, 255, 0.5);
  --icon-btn-hover-bg: rgba(255, 255, 255, 0.05);
  --kpi-menu-hover-bg: rgba(255, 255, 255, 0.05);
  --kpi-menu-hover-fg: rgba(255, 255, 255, 0.8);
  --kcol-bg: rgba(255, 255, 255, 0.015);
  --kcol-border: rgba(255, 255, 255, 0.04);
  --kcol-drag-bg: rgba(31,147,255,0.06);
  --kcol-drag-border: rgba(31,147,255,0.3);
  --lead-border: rgba(255, 255, 255, 0.05);
  --lead-border-hover: rgba(255, 255, 255, 0.1);
  --lead-cat-bg: rgba(255, 255, 255, 0.04);
  --lead-cat-border: transparent;
  --score-track: rgba(255, 255, 255, 0.06);
  --ai-insight-bg: rgba(255, 255, 255, 0.02);
  --ai-insight-bg-hover: rgba(255, 255, 255, 0.035);
  --ai-insight-border: rgba(255, 255, 255, 0.04);
  --ai-insight-border-hover: rgba(255, 255, 255, 0.08);
  --ai-cta-bg: rgba(255, 255, 255, 0.04);
  --ai-cta-bg-hover: rgba(31,147,255,0.14);
  --ai-cta-border: rgba(255, 255, 255, 0.06);
  --ai-cta-border-hover: rgba(31,147,255,0.4);
  --table-head-bg: rgba(255, 255, 255, 0.012);
  --table-row-hover: rgba(255, 255, 255, 0.02);
  --table-row-border: rgba(255, 255, 255, 0.04);
  --tag-bg: rgba(255, 255, 255, 0.05);
  --segment-bg: rgba(255, 255, 255, 0.025);
  --segment-active-bg: rgba(255, 255, 255, 0.06);
  --segment-active-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
  --user-card-bg: rgba(255, 255, 255, 0.025);
  --user-card-bg-hover: rgba(255, 255, 255, 0.045);
  --user-card-border: rgba(255, 255, 255, 0.04);
  --sb-thumb: rgba(255, 255, 255, 0.06);
  --sb-thumb-hover: rgba(255, 255, 255, 0.12);
  --avatar-ring: var(--bg);
  --kcol-empty-fg: rgba(255, 255, 255, 0.25);
  --kcol-empty-border: rgba(255, 255, 255, 0.06);

  /* Sizing */
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 60px;
  --radius: 8px;               /* Berry borderRadius (cards e campos) */
  --radius-sm: 8px;
  --radius-lg: 8px;
  --card-hover-shadow: 0 2px 14px 0 rgba(32, 40, 45, 0.08);

  /* Type */
  --font: "Roboto", "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", monospace;

  /* Easing */
  --ease-ui: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  color-scheme: dark;
}

/* ============================================
   LIGHT THEME — color swap only
   ============================================ */
[data-theme="light"] {
  --bg: #F4F6FB;
  --bg-elev: #ECEFF5;
  --card: #FFFFFF;
  --card-2: #EFF2F8;
  --line: #E4E8EF;
  --line-strong: #C8CDD8;

  --bg-1: #F4F6FB;
  --bg-2: #FFFFFF;
  --border: #E4E8EF;

  --fg: #1F2D3D;
  --fg-2: #3D4750;
  --fg-3: #6C757D;
  --fg-4: #8C9BAB;
  --placeholder: #8C9BAB;

  /* Status — keep accent but tinted for light */
  --hot: #ef4444;
  --hot-soft: #fef2f2;
  --warm: #d97706;
  --warm-soft: #fffbeb;
  --cold: #0284c7;
  --cold-soft: #f0f9ff;
  --success: #059669;
  --success-soft: #ecfdf5;
  --danger: #dc2626;

  /* Card gradients become flat white */
  --card-grad: #FFFFFF;
  --panel-grad: #FFFFFF;
  --lead-grad: #FFFFFF;

  /* Shadows — soft drop instead of insets */
  --shadow-sm: 0 1px 2px rgba(31, 45, 61, 0.06), 0 1px 1px rgba(31, 45, 61, 0.04);
  --shadow-md: 0 1px 3px rgba(31, 45, 61, 0.07), 0 4px 12px -2px rgba(31, 45, 61, 0.08);
  --shadow-lg: 0 1px 3px rgba(31, 45, 61, 0.06), 0 12px 28px -8px rgba(31, 45, 61, 0.10);

  /* Surfaces */
  --topbar-bg: rgba(255, 255, 255, 0.97);
  --topbar-border: #E4E8EF;
  --search-bg: #ECEFF5;
  --search-bg-focus: #FFFFFF;
  --search-placeholder: #8C9BAB;
  --search-icon: #8C9BAB;
  --kbd-bg: #FFFFFF;
  --kbd-border: #E4E8EF;
  --kbd-fg: #6C757D;
  --icon-btn-hover-bg: #ECEFF5;
  --kpi-menu-hover-bg: #ECEFF5;
  --kpi-menu-hover-fg: #1F2D3D;
  --kcol-bg: #FFFFFF;
  --kcol-border: #E4E8EF;
  --kcol-drag-bg: #E8F4FF;
  --kcol-drag-border: #7EC8FF;
  --lead-border: #E4E8EF;
  --lead-border-hover: #C8CDD8;
  --lead-cat-bg: #F4F6FB;
  --lead-cat-border: #E4E8EF;
  --score-track: #ECEFF5;
  --ai-insight-bg: #FFFFFF;
  --ai-insight-bg-hover: #F4F6FB;
  --ai-insight-border: #E4E8EF;
  --ai-insight-border-hover: #C8CDD8;
  --ai-cta-bg: #FFFFFF;
  --ai-cta-bg-hover: #F4F6FB;
  --ai-cta-border: #E4E8EF;
  --ai-cta-border-hover: #C8CDD8;
  --table-head-bg: #F4F6FB;
  --table-row-hover: #F4F6FB;
  --table-row-border: #EBF0F6;
  --tag-bg: #ECEFF5;
  --segment-bg: #FFFFFF;
  --segment-active-bg: #FFFFFF;
  --segment-active-shadow: 0 0 0 1px #E4E8EF, 0 1px 2px rgba(31, 45, 61, 0.06);
  --user-card-bg: rgba(255, 255, 255, 0.03);
  --user-card-bg-hover: rgba(255, 255, 255, 0.055);
  --user-card-border: rgba(255, 255, 255, 0.05);
  --sb-thumb: #C8CDD8;
  --sb-thumb-hover: #8C9BAB;
  --avatar-ring: #FFFFFF;
  --kcol-empty-fg: #8C9BAB;
  --kcol-empty-border: #E4E8EF;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

/* ── Embed mode (iframe drawer from Mensagens) ──────────────────────────── */
html.embed-mode .sidebar { display: none !important; }
html.embed-mode .app { grid-template-columns: 1fr !important; }
html.embed-mode .topbar { display: none !important; }
html.embed-mode .main { height: 100vh; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-feature-settings: "ss01", "cv11", "cv02";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  letter-spacing: -0.005em;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

input, textarea {
  font-family: inherit;
  color: inherit;
}

#root {
  height: 100vh;
  width: 100vw;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--sb-thumb);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); background-clip: padding-box; border: 2px solid transparent; }

/* ============================================
   APP SHELL
   ============================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  background: var(--bg);
  transition: grid-template-columns 220ms cubic-bezier(0.4,0,0.2,1);
  background-image: var(--grad-glow);
  background-attachment: fixed;
}
[data-theme="light"] .app { background-image: none; }

/* ============================================
   SIDEBAR (always dark — identity preserved)
   ============================================ */
.sidebar {
  position: relative;
  height: 100vh;
  background: linear-gradient(180deg, #1B1D22 0%, #17191D 50%, #141519 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  z-index: 1;
  color: #fff;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, #1B1D22 0%, #17191D 55%, #141519 100%);
}
[data-theme="light"] .sidebar::before {
  background: none;
}

.sidebar > * { position: relative; z-index: 1; }

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px 18px 22px;
  height: auto;
  min-height: 110px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: transparent;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-text {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: #ffffff;
}

.brand-text .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sb-accent-soft);
  margin-left: 4px;
  vertical-align: middle;
  translate: 0 -2px;
}

.nav-section {
  padding: 18px 12px 8px;
}
.nav-section + .nav-section { padding-top: 12px; }

.nav-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  padding: 0 10px 8px;
  font-weight: 500;
}

.nav-item, a.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  margin-bottom: 3px;
  border-radius: 11px;
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 450;
  cursor: pointer;
  transition: background 140ms var(--ease-ui), color 140ms var(--ease-ui), transform 120ms var(--ease-spring);
  user-select: none;
  position: relative;
  text-decoration: none;
}
.nav-item:active { transform: scale(0.97); }
/* Telas baixas: os itens maiores não podem cortar o fim do menu — espaçamento menor e, se ainda faltar, rolagem */
@media (max-height: 820px) {
  .nav-item, a.nav-item { padding: 9px 14px; }
  .nav-section { padding-top: 12px; }
}
.sidebar { overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }

.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: #ffffff; }
.nav-item:hover .ico { color: #ffffff; opacity: 1; }
.nav-item.active {
  background: rgba(31,147,255,0.18);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: #1F93FF;
  box-shadow: 0 0 12px rgba(31,147,255,0.6);
}
.nav-item .ico { width: 20px; height: 20px; flex-shrink: 0; color: #ffffff; opacity: 1; transition: color 160ms ease; }
.nav-item.active .ico { color: #ffffff; }

.nav-item .badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(31,147,255,0.2);
  color: var(--sb-accent-soft);
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Sidebar toggle button (floating edge pill) ────────────────── */
.sidebar-toggle {
  position: fixed;
  left: var(--sidebar-w);
  top: calc(var(--topbar-h) / 2);
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--bg-1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: left 220ms cubic-bezier(0.4,0,0.2,1), box-shadow 160ms var(--ease-ui), background 140ms var(--ease-ui), transform 120ms var(--ease-spring);
  box-shadow: 0 2px 8px rgba(31,147,255,0.45);
}
.sidebar-toggle:active { transform: translate(-50%, -50%) scale(0.88); }
.sidebar-toggle:hover {
  background: #1480e8;
  box-shadow: 0 3px 12px rgba(31,147,255,0.6);
}
html.embed-mode .sidebar-toggle { display: none !important; }

/* ── Sidebar collapsed state ───────────────────────────────────── */
body.sidebar-collapsed { --sidebar-w: var(--sidebar-w-collapsed); }

.sidebar {
  transition: width 220ms cubic-bezier(0.4,0,0.2,1);
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  max-width: var(--sidebar-w);
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-item > span,
.sidebar.collapsed .nav-item .badge,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .user-meta { display: none; }

.sidebar.collapsed .nav-item { justify-content: center; padding: 12px 8px; }
.sidebar.collapsed .nav-item .ico { margin: 0; }
.sidebar.collapsed .nav-item.active::before { left: -6px; }

.sidebar.collapsed .brand {
  justify-content: center;
  padding: 12px 0;
  min-height: auto;
}
.sidebar.collapsed .nav-section { padding: 10px 6px 4px; }
.sidebar.collapsed .user-card { justify-content: center; padding: 8px; }
.sidebar.collapsed .sidebar-foot { padding: 10px 8px; }

.sidebar .nav-label,
.sidebar .nav-item > span,
.sidebar .brand-text,
.sidebar .user-meta {
  transition: opacity 180ms ease;
  opacity: 1;
}
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-item > span,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .user-meta { opacity: 0; }

/* ── User card ─────────────────────────────────────────────────── */
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 160ms ease;
}
.user-card:hover { background: rgba(255, 255, 255, 0.045); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  color: #fff;
}
.avatar.online::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--avatar-ring);
}
.sidebar .avatar.online::after { border-color: #0e0f24; }

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.user-name {
  font-size: 12.5px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-plan {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 4px;
}
.user-plan .plan-pill {
  background: linear-gradient(135deg, rgba(31,147,255,0.3), rgba(0,125,255,0.3));
  color: #B3DEFF;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

/* ============================================
   MAIN AREA
   ============================================ */
.main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid var(--topbar-border);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
  z-index: 10;
}

.search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--search-bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: border-color 160ms ease, background 160ms ease;
}
.search:focus-within {
  border-color: rgba(31,147,255,0.4);
  background: var(--search-bg-focus);
}
.search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--fg);
}
.search input::placeholder { color: var(--search-placeholder); }
.search .ico { color: var(--search-icon); }
.search .kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 6px;
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-radius: 4px;
  color: var(--kbd-fg);
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--fg-3);
  transition: background 140ms var(--ease-ui), color 140ms var(--ease-ui), transform 120ms var(--ease-spring);
  position: relative;
}
.icon-btn:hover { background: var(--icon-btn-hover-bg); color: var(--fg); }
.icon-btn:active { transform: scale(0.88); transition-duration: 60ms; }
.icon-btn .dot-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 0 2px var(--bg);
}
.icon-btn.ai {
  position: relative;
  color: var(--accent-soft);
}
[data-theme="light"] .icon-btn.ai { color: var(--accent); }
.icon-btn.ai::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  background: radial-gradient(circle, rgba(31,147,255,0.25), transparent 70%);
  z-index: -1;
  animation: pulseGlow 2.4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* THEME TOGGLE */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: var(--segment-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 1px;
  margin-right: 4px;
}
.theme-toggle button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 24px;
  border-radius: 5px;
  color: var(--fg-3);
  transition: background 160ms ease, color 160ms ease;
}
.theme-toggle button:hover { color: var(--fg); }
.theme-toggle button.active {
  background: var(--segment-active-bg);
  color: var(--fg);
  box-shadow: var(--segment-active-shadow);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  background: linear-gradient(180deg, #1F93FF, #1672CC);
  color: #fff;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 0 0 1px rgba(31,147,255,0.4),
    0 6px 16px -6px rgba(31,147,255,0.6);
  transition: transform 180ms var(--ease-spring), box-shadow 180ms var(--ease-spring), filter 140ms var(--ease-ui);
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 0 0 1px rgba(31,147,255,0.5),
    0 8px 24px -6px rgba(31,147,255,0.7);
}
.btn-primary:active {
  transform: scale(0.97) translateY(0);
  filter: brightness(0.96);
  transition-duration: 80ms;
}

/* ============================================
   CONTENT
   ============================================ */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 26px 32px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-wrap: balance;
}
.page-title .greeting {
  background: linear-gradient(90deg, var(--fg) 0%, color-mix(in srgb, var(--fg) 60%, transparent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-title .date {
  font-size: 14px;
  color: var(--fg-4);
  font-weight: 400;
}
.page-sub {
  font-size: 13px;
  color: var(--fg-4);
  margin: 0;
}
.page-sub b { color: var(--fg); font-weight: 500; }

.segment-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--segment-bg);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.segment-tabs button {
  padding: 6px 11px;
  font-size: 12px;
  color: var(--fg-3);
  border-radius: 6px;
  font-weight: 450;
  transition: background 140ms var(--ease-ui), color 140ms var(--ease-ui), transform 100ms var(--ease-spring);
  display: flex;
  align-items: center;
  gap: 6px;
}
.segment-tabs button:hover { color: var(--fg); }
.segment-tabs button:active { transform: scale(0.95); transition-duration: 60ms; }
.segment-tabs button.active {
  background: var(--segment-active-bg);
  color: var(--fg);
  box-shadow: var(--segment-active-shadow);
}
.segment-tabs .seg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
}

/* ============================================
   KPI CARDS
   ============================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.kpi {
  position: relative;
  background: var(--card-grad);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 16px 16px 12px;
  overflow: hidden;
  transition: transform 220ms var(--ease-spring), border-color 180ms var(--ease-ui), box-shadow 220ms var(--ease-spring);
  isolation: isolate;
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 100px at 100% 0%, var(--kpi-glow, rgba(31,147,255,0.18)), transparent 60%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
  transition: opacity 220ms ease;
}
[data-theme="light"] .kpi::before { opacity: 0.5; }
.kpi:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.kpi:hover::before { opacity: 1; }
.kpi > * { position: relative; z-index: 1; }

.kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.kpi-label {
  font-size: 12px;
  font-weight: 450;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-label .ico {
  width: 14px;
  height: 14px;
  color: var(--kpi-color, var(--accent-soft));
  opacity: 0.9;
}
[data-theme="light"] .kpi-label .ico { color: var(--kpi-color, var(--accent)); }
.kpi-menu {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--fg-4);
  transition: background 160ms ease, color 160ms ease;
}
.kpi-menu:hover { background: var(--kpi-menu-hover-bg); color: var(--kpi-menu-hover-fg); }

.kpi-value {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 6px 0 10px;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.kpi-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 6px 2px 5px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
}
.delta.up { color: var(--success); background: var(--success-soft); }
.delta.down { color: var(--danger); background: rgba(248, 113, 113, 0.12); }
.delta .arr { width: 10px; height: 10px; }

.sparkwrap {
  width: 88px;
  height: 32px;
  position: relative;
}

.kpi-sub {
  font-size: 10.5px;
  color: var(--fg-4);
  margin-top: 2px;
}

/* ============================================
   GRID — KANBAN + AI
   ============================================ */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  margin-bottom: 20px;
}

.panel {
  background: var(--panel-grad);
  border: 1px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
}
[data-theme="light"] .panel { box-shadow: var(--shadow-sm); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  font-size: 13.5px;
  font-weight: 550;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
}
.panel-title .count {
  font-size: 11px;
  color: var(--fg-4);
  font-weight: 400;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--tag-bg);
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ghost-btn {
  font-size: 11.5px;
  color: var(--fg-3);
  padding: 5px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 140ms var(--ease-ui), color 140ms var(--ease-ui), transform 120ms var(--ease-spring);
}
.ghost-btn:hover { background: var(--icon-btn-hover-bg); color: var(--fg); }
.ghost-btn:active { transform: scale(0.96); transition-duration: 60ms; }

/* KANBAN */
.kanban {
  padding: 12px 8px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.kanban::-webkit-scrollbar { display: none; }
.kanban-cols {
  display: flex;
  gap: 10px;
  min-width: max-content;
  padding: 0 8px;
}
.kcol {
  width: 232px;
  flex-shrink: 0;
  background: var(--kcol-bg);
  border: 1px solid var(--kcol-border);
  border-radius: 8px;
  padding: 10px;
  transition: background 160ms ease, border-color 160ms ease;
}
.kcol.drag-over {
  background: var(--kcol-drag-bg);
  border-color: var(--kcol-drag-border);
}
.kcol-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.kcol-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--col-color, var(--accent-soft));
  box-shadow: 0 0 8px var(--col-color, var(--accent-soft));
}
.kcol-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: 0.005em;
}
.kcol-count {
  font-size: 10.5px;
  color: var(--fg-4);
  font-variant-numeric: tabular-nums;
}
.kcol-total {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--fg-3);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.kcol-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 60px;
}

.lead {
  background: var(--lead-grad);
  border: 1px solid var(--lead-border);
  border-radius: 9px;
  padding: 10px 11px;
  cursor: grab;
  transition: transform 200ms var(--ease-spring), border-color 150ms var(--ease-ui), box-shadow 200ms var(--ease-spring);
  position: relative;
}
[data-theme="light"] .lead { box-shadow: var(--shadow-sm); }
.lead:active { cursor: grabbing; }
.lead:hover {
  border-color: var(--lead-border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.lead.dragging { opacity: 0.5; transform: rotate(-1.5deg) scale(0.98); }

.lead-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.lead-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
  color: #fff;
}
.lead-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.temp {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.temp.hot { background: var(--hot-soft); color: var(--hot); }
.temp.warm { background: var(--warm-soft); color: var(--warm); }
.temp.cold { background: var(--cold-soft); color: var(--cold); }
.temp svg { width: 10px; height: 10px; }

.lead-cat {
  font-size: 10.5px;
  color: var(--fg-3);
  padding: 1px 6px;
  background: var(--lead-cat-bg);
  border: 1px solid var(--lead-cat-border);
  border-radius: 4px;
  display: inline-block;
}

.lead-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 6px;
}
.lead-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.lead-value .cur {
  font-size: 9.5px;
  color: var(--fg-4);
  font-weight: 400;
  margin-right: 1px;
}
.lead-score {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--fg-3);
}
.score-bar {
  width: 40px;
  height: 3px;
  background: var(--score-track);
  border-radius: 2px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--score-from, #1F93FF), var(--score-to, #7EC8FF));
  border-radius: 2px;
}

.kcol-empty {
  padding: 14px 10px;
  text-align: center;
  font-size: 11px;
  color: var(--kcol-empty-fg);
  border: 1px dashed var(--kcol-empty-border);
  border-radius: 8px;
}

/* AI panel */
.ai-panel {
  display: flex;
  flex-direction: column;
}
.ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.ai-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(200px 80px at 50% 0%, rgba(31,147,255,0.18), transparent 70%);
  pointer-events: none;
  opacity: 0;
}
[data-theme="light"] .ai-head::before { opacity: 0.5; }
.ai-icon-big {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(31,147,255,0.25), rgba(0,125,255,0.2));
  border: 1px solid rgba(31,147,255,0.35);
  display: grid;
  place-items: center;
  color: var(--accent-soft);
  flex-shrink: 0;
  box-shadow: 0 4px 16px -4px rgba(31,147,255,0.35);
}
[data-theme="light"] .ai-icon-big {
  background: linear-gradient(135deg, #1F93FF, #1060B3);
  color: #fff;
  border-color: rgba(31,147,255,0.3);
}
.ai-title-wrap { display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.ai-title {
  font-size: 13px;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fg);
}
.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #34d399;
}
[data-theme="light"] .ai-status { color: var(--success); }
.ai-status .pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
  animation: blink 1.6s ease-in-out infinite;
}
[data-theme="light"] .ai-status .pulse-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.ai-sub {
  font-size: 10.5px;
  color: var(--fg-4);
}

.ai-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.ai-summary-label {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-4);
  font-weight: 500;
  margin-bottom: -2px;
}

.ai-insight {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 11px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--ai-insight-border);
  border-radius: 9px;
  transition: background 160ms ease, border-color 160ms ease;
}
.ai-insight:hover {
  background: var(--ai-insight-bg-hover);
  border-color: var(--ai-insight-border-hover);
}
.ai-insight-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ai-insight-ico.kind-hot { background: var(--hot-soft); color: var(--hot); }
.ai-insight-ico.kind-brand { background: rgba(31,147,255,0.14); color: var(--accent-soft); }
[data-theme="light"] .ai-insight-ico.kind-brand { background: #E8F4FF; color: var(--accent); }
.ai-insight-ico.kind-success { background: var(--success-soft); color: var(--success); }
.ai-insight-text {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.4;
}
.ai-insight-text b { color: var(--fg); font-weight: 550; }
.ai-insight-time {
  font-size: 10px;
  color: var(--fg-4);
  margin-top: 2px;
  font-family: var(--mono);
}

.ai-suggest {
  margin-top: 4px;
  padding: 12px 12px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--ai-insight-border);
  border-radius: 8px;
}
[data-theme="light"] .ai-suggest {
  background: linear-gradient(135deg, #f5f7ff, #E8F4FF);
  border-color: #D6EEFF;
}
.ai-suggest-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
[data-theme="light"] .ai-suggest-title { color: var(--accent-hover); }
.ai-suggest-body {
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.45;
}
.ai-suggest-body b { color: var(--fg); font-weight: 550; }

.ai-cta {
  margin-top: 4px;
  padding: 9px 12px;
  background: var(--ai-cta-bg);
  border: 1px solid var(--ai-cta-border);
  color: var(--fg);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 140ms var(--ease-ui), border-color 140ms var(--ease-ui), transform 120ms var(--ease-spring);
}
.ai-cta:hover { background: var(--ai-cta-bg-hover); border-color: var(--ai-cta-border-hover); }
.ai-cta:active { transform: scale(0.97); transition-duration: 60ms; }

/* ============================================
   CLIENTS TABLE
   ============================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-4);
  padding: 11px 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: var(--table-head-bg);
}
.table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--table-row-border);
  color: var(--fg-2);
  vertical-align: middle;
}
.table tbody tr {
  transition: background 140ms var(--ease-ui);
}
.table tbody tr:hover { background: var(--table-row-hover); }
.table tbody tr:last-child td { border-bottom: none; }

.cell-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cell-name .name { color: var(--fg); font-weight: 500; font-size: 12.5px; line-height: 1.2; }
.cell-name .email { color: var(--fg-4); font-size: 10.5px; }
.cell-name .meta-stack { display: flex; flex-direction: column; gap: 1px; }

.phone {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}

.tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 450;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--tag-bg);
  color: var(--fg-2);
}
[data-theme="light"] .tag { color: var(--fg-3); border: 1px solid var(--line); }

.status-pill {
  font-size: 10.5px;
  padding: 2px 8px 2px 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 450;
}
.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
[data-theme="light"] .status-pill::before { box-shadow: none; }
.status-pill.qualifying { color: var(--cold); background: var(--cold-soft); }
.status-pill.engaged { color: var(--warm); background: var(--warm-soft); }
.status-pill.proposal { color: var(--accent-soft); background: rgba(31,147,255,0.12); }
[data-theme="light"] .status-pill.proposal { color: var(--accent-hover); background: #E8F4FF; }
.status-pill.won { color: var(--success); background: var(--success-soft); }
.status-pill.lost { color: var(--danger); background: rgba(248, 113, 113, 0.10); }

.score-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.score-num {
  font-size: 12px;
  font-weight: 550;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  width: 22px;
}
.score-ring {
  width: 20px;
  height: 20px;
}

.next-action {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.next-action .action-name { color: var(--fg); font-size: 12px; font-weight: 450; }
.next-action .action-when { color: var(--fg-4); font-size: 10.5px; }
.next-action .action-when.due-soon { color: var(--warm); }
.next-action .action-when.due-now { color: var(--hot); }

.row-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

/* ============================================
   SKELETON / SHIMMER (used inline)
   ============================================ */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 100%);
  background-size: 400px 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 6px;
}

/* Lead entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 420ms var(--ease-spring) both; }

/* ScoreRing track per theme */
[data-theme="light"] .score-ring circle:first-of-type { stroke: var(--score-track) !important; }

/* Density */
.app.density-compact { --topbar-h: 52px; }
.app.density-compact .kpi { padding: 12px 14px 10px; }
.app.density-compact .kpi-value { font-size: 26px; }
.app.density-compact .lead { padding: 9px 10px; }
.app.density-compact .table tbody td { padding: 9px 14px; }
.app.density-compact .content { padding: 16px 22px 26px; }


/* ============================================
   CRM PAGE
   ============================================ */

.crm-content { padding: 22px 26px 32px; }

/* CRM Header */
.crm-head { margin-bottom: 18px; }
.crm-head-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.crm-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  color: var(--fg);
  text-wrap: balance;
}
.crm-sub {
  font-size: 13px;
  color: var(--fg-4);
  margin: 0;
  max-width: 580px;
}
.crm-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ghost-btn.lg {
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--segment-bg);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 8px;
}
.ghost-btn.lg:hover { background: var(--icon-btn-hover-bg); }
.ghost-btn.lg:active { transform: scale(0.97); transition-duration: 60ms; }

.crm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Filter pills */
.filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 7px 11px;
  font-size: 12.5px;
  color: var(--fg-3);
  background: var(--segment-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 140ms var(--ease-ui), color 140ms var(--ease-ui), border-color 140ms var(--ease-ui), transform 120ms var(--ease-spring);
}
.filter-pill:hover { color: var(--fg); border-color: var(--line-strong); }
.filter-pill:active { transform: scale(0.97); transition-duration: 60ms; }
.filter-pill.active {
  background: var(--segment-active-bg);
  color: var(--fg);
  box-shadow: var(--segment-active-shadow);
  border-color: transparent;
}
.filter-pill .filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.filter-pill .filter-count {
  font-size: 10.5px;
  color: var(--fg-4);
  font-variant-numeric: tabular-nums;
  background: var(--tag-bg);
  padding: 1px 6px;
  border-radius: 4px;
}
.filter-pill.active .filter-count { background: rgba(31,147,255,0.16); color: var(--accent-soft); }
[data-theme="light"] .filter-pill.active .filter-count { color: var(--accent-hover); }

/* CRM Search */
.crm-search {
  flex: 0 1 380px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--search-bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: border-color 160ms ease, background 160ms ease;
}
.crm-search:focus-within { border-color: rgba(31,147,255,0.4); background: var(--search-bg-focus); }
.crm-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--fg);
}
.crm-search input::placeholder { color: var(--search-placeholder); }
.crm-search .ico { color: var(--search-icon); }
.crm-search .kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 6px;
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-radius: 4px;
  color: var(--kbd-fg);
}

/* CRM Stats — reuse .kpi but tweak spacing */
.crm-stats { margin-top: 18px; margin-bottom: 16px; }

/* CRM Main grid */
.crm-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  margin-bottom: 16px;
}

/* ============================================
   CRM Kanban
   ============================================ */
.crm-kanban-panel { min-height: 0; }
.crm-cols { padding-bottom: 4px; }

.crm-kcol {
  width: 268px;
  background: var(--kcol-bg);
  border: 1px solid var(--kcol-border);
  padding: 12px 10px 10px;
}
.crm-kcol.drag-over {
  background: var(--kcol-drag-bg);
  border-color: var(--col-color, var(--kcol-drag-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--col-color, var(--accent)) 14%, transparent);
}
.crm-kcol-head { margin-bottom: 4px; }
.kcol-sub {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 2px 10px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 10px;
}
.kcol-sub .kcol-total {
  margin-left: 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.kcol-sub .kcol-total .cur {
  font-size: 10px;
  color: var(--fg-4);
  font-weight: 500;
  margin-right: 1px;
}
.kcol-leads-label {
  font-size: 10.5px;
  color: var(--fg-4);
}

/* ============================================
   CRM Lead Card
   ============================================ */
.crm-lead {
  position: relative;
  background: var(--lead-grad);
  border: 1px solid var(--lead-border);
  border-radius: 8px;
  padding: 11px 12px 10px;
  cursor: grab;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  overflow: hidden;
}
[data-theme="light"] .crm-lead { box-shadow: var(--shadow-sm); }
.crm-lead:active { cursor: grabbing; }
.crm-lead:hover {
  border-color: var(--lead-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.crm-lead.dragging { opacity: 0.5; transform: rotate(-1.5deg) scale(0.98); }
@keyframes leadPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(31,147,255,0); }
  30%      { box-shadow: 0 0 0 6px rgba(31,147,255,0.5); }
  60%      { box-shadow: 0 0 0 3px rgba(31,147,255,0.25); }
}
.crm-lead.crm-lead-pulse { animation: leadPulse 2.5s ease; outline: 2px solid #1F93FF; }

/* Faixa colorida de temperatura — topo do card (estilo Pipedrive) */
.crm-lead-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  pointer-events: none;
}

/* Badge de dias na etapa */
.crm-days-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* ── Pipeline strip ──────────────────────────────────────────────────────────── */
.crm-pipe-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.crm-pipe-bars {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.crm-pipe-seg {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: var(--line-strong);
  transition: background 200ms;
}
.crm-pipe-seg.past    { background: rgba(31,147,255,0.32); }
.crm-pipe-seg.current { background: var(--accent); }
.crm-pipe-cur-label {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

/* ── Doc strip (aguardando_docs) ─────────────────────────────────────────────── */
.crm-doc-strip {
  margin-top: 8px;
  padding: 8px 9px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 7px;
}
[data-theme="light"] .crm-doc-strip { background: #f8fafc; border-color: #e2e8f0; }
.crm-doc-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.crm-doc-strip-title {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.crm-doc-strip-count {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mono);
}
.crm-doc-strip-items {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.crm-doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px 2px 4px;
  font-size: 9.5px;
  font-weight: 500;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--fg-4);
  border: 1px solid transparent;
  line-height: 1;
}
.crm-doc-pill.ok {
  background: rgba(52,211,153,0.10);
  color: #34d399;
  border-color: rgba(52,211,153,0.22);
}
[data-theme="light"] .crm-doc-pill { background: #f1f5f9; color: #64748b; }
[data-theme="light"] .crm-doc-pill.ok { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.crm-doc-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fg-4);
  flex-shrink: 0;
}

/* Score badge top-right */
.lead-score-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px 2px 5px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  letter-spacing: -0.005em;
}
.lead-score-badge[data-tier="high"] { color: var(--success); background: var(--success-soft); }
.lead-score-badge[data-tier="mid"]  { color: var(--accent-soft); background: rgba(31,147,255,0.12); }
.lead-score-badge[data-tier="low"]  { color: var(--fg-4); background: var(--tag-bg); }
[data-theme="light"] .lead-score-badge[data-tier="mid"] { color: var(--accent-hover); background: var(--brand-100, #E8F4FF); }
[data-theme="light"] .lead-score-badge[data-tier="high"] { border-color: var(--success-border, transparent); }

.crm-lead-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  margin-top: 5px; /* espaço para a faixa colorida */
  padding-right: 50px; /* leave room for score badge */
}
.lead-avatar.lg {
  width: 30px;
  height: 30px;
  font-size: 10.5px;
}
.lead-avatar.xl {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
  position: relative;
}
.lead-avatar .hero-status {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #34d399;
  border: 2px solid var(--card);
}
.crm-lead-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 1px;
}
.crm-lead-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crm-lead-sub {
  font-size: 10.5px;
  color: var(--fg-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-lead-phone {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  margin-bottom: 9px;
  font-variant-numeric: tabular-nums;
}
.crm-lead-phone .ico { opacity: 0.6; }

.crm-lead-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.crm-lead-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.crm-lead-value .cur {
  font-size: 10px;
  color: var(--fg-4);
  font-weight: 500;
  margin-right: 1px;
}

.crm-lead-progress {
  height: 4px;
  background: var(--score-track);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 9px;
}
.crm-lead-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--p-from, #1F93FF), var(--p-to, #7EC8FF));
  transition: width 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.crm-lead-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 5px;
  font-size: 10px;
  font-weight: 600;
  color: #25d366;
  background: rgba(37, 211, 102, 0.10);
  border-radius: 4px;
  letter-spacing: -0.005em;
}
[data-theme="light"] .wa-pill { background: #ecfdf5; color: #059669; }
.crm-lead-time {
  font-size: 10.5px;
  color: var(--fg-4);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.crm-lead-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

/* Column nav arrows (show on card hover) */
.crm-lead-nav {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  opacity: 0;
  transition: opacity 150ms ease;
}
.crm-lead:hover .crm-lead-nav { opacity: 1; }
.crm-nav-btn {
  flex: 1;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--lead-border);
  background: transparent;
  color: var(--fg-3);
  font-size: 10.5px;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.crm-nav-btn:not(:disabled):hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-color: var(--accent);
}
.crm-nav-btn.fwd:not(:disabled):hover {
  background: color-mix(in srgb, #10b981 10%, transparent);
  color: #10b981;
  border-color: #10b981;
}
.crm-nav-btn:disabled { opacity: 0.25; cursor: not-allowed; }

/* Lead assign button */
.crm-assign-btn {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1px dashed var(--lead-border);
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; flex-shrink: 0;
  transition: border-color 120ms, background 120ms, color 120ms;
}
.crm-assign-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.crm-assign-btn.assigned { border-style: solid; border-color: var(--lead-border); }
.crm-assign-avatar {
  width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.crm-assign-avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.crm-assign-popup {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; min-width: 190px; max-width: 240px;
  z-index: 500; color: #111;
}
.crm-assign-popup-title { font-size: 10px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px 6px; }
.crm-assign-member {
  display: flex; align-items: center; gap: 7px;
  width: 100%; border: none; background: transparent;
  padding: 5px 7px; border-radius: 7px; cursor: pointer;
  font-family: var(--font); text-align: left; transition: background 100ms;
}
.crm-assign-member:hover { background: #f3f4f6; }
.crm-assign-name { font-size: 12px; color: #111; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tag-chip {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}
.tag-chip.tag-vip      { background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(239,68,68,0.16)); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.tag-chip.tag-urgent   { background: rgba(239,68,68,0.14); color: var(--hot); border: 1px solid rgba(239,68,68,0.25); }
.tag-chip.tag-pj       { background: rgba(31,147,255,0.14); color: var(--accent-soft); border: 1px solid rgba(31,147,255,0.25); }
.tag-chip.tag-info     { background: rgba(56,189,248,0.14); color: var(--cold); border: 1px solid rgba(56,189,248,0.25); }
.tag-chip.tag-success  { background: rgba(52,211,153,0.14); color: var(--success); border: 1px solid rgba(52,211,153,0.25); }
.tag-chip.tag-neutral  { background: var(--tag-bg); color: var(--fg-3); border: 1px solid var(--line); }
[data-theme="light"] .tag-chip.tag-vip { background: linear-gradient(135deg, #fffbeb, #fef2f2); color: #b45309; border-color: #fde68a; }
[data-theme="light"] .tag-chip.tag-urgent { background: #fef2f2; color: #b91c1c; }
[data-theme="light"] .tag-chip.tag-pj { background: #E8F4FF; color: var(--accent-hover); }
[data-theme="light"] .tag-chip.tag-info { background: #f0f9ff; color: #0369a1; }
[data-theme="light"] .tag-chip.tag-success { background: #ecfdf5; color: #047857; }

/* ============================================
   CRM AI Panel
   ============================================ */
.crm-ai-panel { display: flex; flex-direction: column; }
.crm-ai-panel .ai-body { gap: 14px; }
.ai-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--ai-insight-border);
  border-radius: 8px;
}
.ai-block-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.ai-block-label .ai-flame,
.ai-block-label .ai-warn,
.ai-block-label .ai-up {
  font-size: 12px;
}

.ai-lead-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
  text-align: left;
}
.ai-lead-row:hover { border-color: var(--line-strong); background: var(--card-hover, var(--bg-2)); }
.ai-lead-row .lead-avatar { width: 28px; height: 28px; font-size: 10px; }
.ai-lead-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.ai-lead-name { font-size: 12.5px; font-weight: 550; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-lead-meta { font-size: 10.5px; color: var(--fg-4); }
.ai-lead-value { font-size: 12px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }

.ai-silent {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ai-silent-count {
  font-size: 22px;
  font-weight: 600;
  color: var(--warm);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ai-silent-text { font-size: 12px; color: var(--fg-3); }
.ai-silent-stack {
  display: flex;
  align-items: center;
}
.ai-silent-stack > * { margin-left: -7px; }
.ai-silent-stack > *:first-child { margin-left: 0; }
.ai-stack-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  border: 2px solid var(--card);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.ai-stack-more {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--fg-3);
  background: var(--tag-bg);
  border: 2px solid var(--card);
}

.ai-opps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-opps li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 140ms ease;
}
.ai-opps li:hover { background: var(--ai-insight-bg-hover); }
.ai-opp-name { flex: 1; font-size: 12px; color: var(--fg-2); font-weight: 500; }
.ai-opp-score { font-size: 11px; color: var(--fg-3); font-weight: 600; font-variant-numeric: tabular-nums; }

.temp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.temp-dot.temp-hot  { background: var(--hot);  box-shadow: 0 0 6px var(--hot); }
.temp-dot.temp-warm { background: var(--warm); box-shadow: 0 0 6px var(--warm); }
.temp-dot.temp-cold { background: var(--cold); box-shadow: 0 0 6px var(--cold); }

/* ============================================
   DRAWER — Customer 360
   ============================================ */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 14, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 80;
  animation: fadeIn 220ms ease both;
}
[data-theme="light"] .drawer-backdrop { background: rgba(15, 23, 42, 0.28); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 92vw;
  background: var(--card);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 90;
  box-shadow: -24px 0 60px -16px rgba(0, 0, 0, 0.4);
  animation: slideIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Escuro: mesma paleta neutra do resto do app (sem azul-marinho) */
[data-theme="dark"] .drawer { background: var(--bg-elev); }
@keyframes slideIn {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.drawer-head {
  position: relative;
  padding: 18px 20px 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--card)) 0%, var(--card) 100%);
}
[data-theme="dark"] .drawer-head { background: var(--panel-grad); }

.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--fg-3);
  background: var(--segment-bg);
  border: 1px solid var(--line);
  transition: background 140ms ease, color 140ms ease;
}
.drawer-close:hover { background: var(--icon-btn-hover-bg); color: var(--fg); }

.drawer-id {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-4);
  font-weight: 600;
  margin-bottom: 14px;
}
.drawer-id-label { color: var(--accent); }
[data-theme="dark"] .drawer-id-label { color: var(--accent-soft); }
.drawer-id-meta {
  font-family: var(--mono);
  background: var(--tag-bg);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
}

.drawer-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.drawer-hero-text { flex: 1; min-width: 0; }
.drawer-hero-name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 3px;
  color: var(--fg);
}
.drawer-hero-meta {
  font-size: 12px;
  color: var(--fg-4);
  margin-bottom: 6px;
}
.drawer-hero-contact {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.drawer-hero-contact span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--fg-3);
  font-family: var(--mono);
}
.drawer-hero-contact span .ico { color: var(--fg-5); opacity: 0.8; }

.drawer-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.hero-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hero-stat-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-4);
}
.hero-stat-value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.hero-stat-value.muted { color: var(--fg-3); font-weight: 500; }
.hero-stat-value.temp-hot  { color: var(--hot); }
.hero-stat-value.temp-warm { color: var(--warm); }
.hero-stat-value.temp-cold { color: var(--cold); }
.hero-stat-value b { font-size: 16px; letter-spacing: -0.02em; }
.hero-progress {
  height: 4px;
  background: var(--score-track);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.hero-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1F93FF, #7EC8FF);
  border-radius: 2px;
}

.drawer-tabs {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line);
  margin: 0 -20px;
  padding: 0 20px;
  overflow-x: auto;
}
.drawer-tab {
  padding: 11px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-4);
  border-radius: 0;
  position: relative;
  white-space: nowrap;
  transition: color 140ms ease;
}
.drawer-tab:hover { color: var(--fg); }
.drawer-tab.active { color: var(--fg); }
.drawer-tab.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}
.drawer-body--chat {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.drawer-pad { padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 14px; }

/* Summary */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.info-row {
  padding: 10px 12px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-4);
}
.info-value {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg);
}
.info-value.highlight { color: var(--accent); }
[data-theme="dark"] .info-value.highlight { color: var(--accent-soft); }

.next-action-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(31,147,255,0.10), rgba(0,125,255,0.04));
  border: 1px solid rgba(31,147,255,0.22);
  border-radius: 8px;
}
[data-theme="light"] .next-action-card {
  background: linear-gradient(135deg, #f5f7ff, #E8F4FF);
  border-color: #D6EEFF;
}
.next-action-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
[data-theme="light"] .next-action-head { color: var(--accent-hover); }
.next-action-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.next-action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.next-action-when {
  font-size: 11.5px;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}
.next-action-when.urgent { color: var(--hot); font-weight: 600; }
.next-action-when.soon   { color: var(--warm); font-weight: 600; }
.next-action-cta {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.btn-primary.sm { padding: 6px 10px; font-size: 11.5px; }
.btn-primary.wide { width: 100%; justify-content: center; }

.obs-card, .empty-card, .docs-card, .credit-card {
  padding: 14px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.obs-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 6px;
  display: block;
}
.obs-text {
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.5;
  margin: 0;
}
.empty-card {
  text-align: center;
  color: var(--fg-4);
  font-size: 12px;
}

/* Chat */
.chat-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 18px;
}
.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-2);
}
[data-theme="dark"] .chat-thread { background: var(--bg); }

/* Horos 360 — Resumo retrátil acima das abas */
.c360-summary-head {
  display: flex;
  border-top: 1px solid var(--line);
  margin: 0 -20px;
  padding: 0 20px;
}
.c360-summary-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg);
  background: none;
  border: none;
  cursor: pointer;
}
.c360-summary-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 30px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.c360-summary {
  margin: 0 -20px;
  max-height: 40vh;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}
.c360-summary .drawer-pad { padding: 14px 16px; gap: 10px; }
.chat-day {
  align-self: center;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-4);
  padding: 3px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 4px;
  font-weight: 600;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 78%;
}
.chat-msg.from-cliente { align-self: flex-start; }
.chat-msg.from-ia      { align-self: center; max-width: 88%; }
.chat-msg.from-corretor { align-self: flex-end; align-items: flex-end; }
.chat-ia-badge {
  align-self: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(31,147,255,0.10);
  border: 1px solid rgba(31,147,255,0.22);
  padding: 1px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
[data-theme="dark"] .chat-ia-badge { color: var(--accent-soft); }
.chat-bubble {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px 6px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg);
}
.from-cliente .chat-bubble {
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.from-ia .chat-bubble {
  background: linear-gradient(135deg, rgba(31,147,255,0.10), rgba(0,125,255,0.04));
  border: 1px dashed rgba(31,147,255,0.30);
  font-style: italic;
  color: var(--fg-2);
}
[data-theme="light"] .from-ia .chat-bubble {
  background: linear-gradient(135deg, #f5f7ff, #E8F4FF);
  border-color: #B3DEFF;
}
.from-corretor .chat-bubble {
  background: linear-gradient(180deg, #1F93FF, #1672CC);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px -4px rgba(31,147,255,0.5);
}
.chat-time {
  align-self: flex-end;
  font-size: 9.5px;
  color: var(--fg-4);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
  letter-spacing: -0.005em;
}
.from-corretor .chat-time { color: rgba(255,255,255,0.7); }
.from-ia .chat-time { color: var(--fg-4); font-style: normal; }
.chat-empty {
  align-self: center;
  font-size: 12px;
  color: var(--fg-4);
  text-align: center;
  padding: 20px;
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.chat-input input {
  flex: 1;
  padding: 8px 12px;
  background: var(--search-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color 140ms ease;
}
.chat-input input:focus { border-color: rgba(31,147,255,0.4); }
.chat-input input::placeholder { color: var(--placeholder); }
.chat-attach, .chat-action {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--fg-3);
  background: var(--segment-bg);
  border: 1px solid var(--line);
  transition: background 140ms ease, color 140ms ease;
}
.chat-attach:hover, .chat-action:hover { background: var(--icon-btn-hover-bg); color: var(--fg); }
.chat-action.send {
  background: linear-gradient(180deg, #1F93FF, #1672CC);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px -4px rgba(31,147,255,0.5);
}
.chat-action.send:hover { filter: brightness(1.08); }

/* Credit */
.credit-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.credit-score-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.credit-score-wrap .score-ring-big text { fill: var(--fg); }
.credit-meta { display: flex; flex-direction: column; gap: 2px; }
.credit-tier {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid;
  background: var(--tag-bg);
}
.credit-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-top: 4px;
}
.credit-fonte {
  font-size: 10.5px;
  color: var(--fg-4);
}
.credit-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.credit-breakdown > div { display: flex; flex-direction: column; gap: 2px; }

.docs-card { display: flex; flex-direction: column; gap: 10px; }
.docs-head { display: flex; align-items: center; justify-content: space-between; }
.docs-progress {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  background: var(--tag-bg);
  padding: 2px 6px;
  border-radius: 4px;
}
.docs-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.docs-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--fg-2);
  padding: 6px 0;
}
.docs-list li.pending { color: var(--fg-4); }
.docs-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tag-bg);
  color: var(--fg-4);
  flex-shrink: 0;
}
.docs-dot.ok { background: var(--success-soft); color: var(--success); }
.docs-pending-tag {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm);
  background: var(--warm-soft);
  padding: 1px 6px;
  border-radius: 4px;
}
.docs-empty { color: var(--fg-4); text-align: center; padding: 12px; font-size: 12px; }

/* Visits */
.visit-list { display: flex; flex-direction: column; gap: 8px; }
.visit-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--ai-insight-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 140ms ease;
}
.visit-item:hover { border-color: var(--line-strong); }
.visit-item.visit-agendada { border-left: 3px solid var(--accent); }
.visit-item.visit-realizada { border-left: 3px solid var(--success); }
.visit-item.visit-cancelada { border-left: 3px solid var(--hot); opacity: 0.7; }
.visit-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  padding: 4px 0;
  border-right: 1px dashed var(--line);
}
.visit-day {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
  text-transform: capitalize;
}
.visit-time {
  font-size: 10.5px;
  color: var(--fg-4);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.visit-body { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.visit-top { display: flex; align-items: center; gap: 8px; }
.visit-status {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
}
.visit-status-agendada  { background: rgba(31,147,255,0.14); color: var(--accent-soft); }
.visit-status-realizada { background: var(--success-soft); color: var(--success); }
.visit-status-cancelada { background: var(--danger-soft); color: var(--danger); }
[data-theme="light"] .visit-status-agendada { color: var(--accent-hover); background: var(--brand-100, #E8F4FF); }
.visit-agent { font-size: 11px; color: var(--fg-3); font-weight: 500; }
.visit-note { font-size: 12px; color: var(--fg-2); line-height: 1.4; margin: 0; }

/* Timeline */
.tl-list { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 12px; padding-bottom: 14px; }
.tl-rail {
  width: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.tl-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--fg-3);
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--bg-2);
}
[data-theme="dark"] .tl-dot { box-shadow: 0 0 0 4px transparent; }
.tl-kind-ai .tl-dot { background: rgba(31,147,255,0.14); color: var(--accent-soft); border-color: rgba(31,147,255,0.3); }
[data-theme="light"] .tl-kind-ai .tl-dot { background: #E8F4FF; color: var(--accent-hover); border-color: #B3DEFF; }
.tl-kind-client .tl-dot { background: var(--cold-soft); color: var(--cold); border-color: var(--cold); border-color: color-mix(in srgb, var(--cold) 30%, transparent); }
.tl-kind-broker .tl-dot { background: var(--warm-soft); color: var(--warm); border-color: color-mix(in srgb, var(--warm) 30%, transparent); }
.tl-kind-system .tl-dot { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }

.tl-line {
  flex: 1;
  width: 2px;
  background: var(--line);
  margin: 2px 0;
  border-radius: 2px;
}
.tl-body { flex: 1; padding-top: 2px; }
.tl-row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.tl-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.tl-kind-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
}
.tl-kind-tag.tl-kind-ai     { color: var(--accent-soft); background: rgba(31,147,255,0.14); }
.tl-kind-tag.tl-kind-client { color: var(--cold); background: var(--cold-soft); }
.tl-kind-tag.tl-kind-broker { color: var(--warm); background: var(--warm-soft); }
.tl-kind-tag.tl-kind-system { color: var(--success); background: var(--success-soft); }
[data-theme="light"] .tl-kind-tag.tl-kind-ai { color: var(--accent-hover); background: #E8F4FF; }
.tl-label {
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.4;
  margin: 0;
}

/* CRM density tweaks */
.app.density-compact .crm-content { padding: 16px 22px 26px; }
.app.density-compact .crm-lead { padding: 9px 10px 8px; }
.app.density-compact .crm-kcol { width: 252px; }

/* ── AI Modal (chat flutuante da topbar) ────────────────────────────────────── */
.ai-modal {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  right: 16px;
  width: 380px;
  height: 520px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 48px -8px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1100;
  animation: aiModalIn 180ms cubic-bezier(0.22,1,0.36,1) both;
}
[data-theme="dark"] .ai-modal { background: #12151e; border-color: rgba(255,255,255,0.08); }
@keyframes aiModalIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 11px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.ai-modal-head-left { display: flex; align-items: center; gap: 9px; }
.ai-modal-head-right { display: flex; align-items: center; gap: 2px; }
.ai-modal-logo { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; }
.ai-modal-title { font-size: 14px; font-weight: 600; color: var(--fg); letter-spacing: -0.01em; }
.ai-modal-expand {
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--fg-4);
  transition: background 120ms ease, color 120ms ease;
}
.ai-modal-expand:hover { background: var(--icon-btn-hover-bg); color: var(--fg); }

.ai-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.ai-modal-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 24px 8px 16px;
}
.ai-modal-empty-title { font-size: 15px; font-weight: 600; color: var(--fg); margin: 0; }
.ai-modal-empty-sub   { font-size: 12.5px; color: var(--fg-4); margin: 0 0 10px; max-width: 240px; line-height: 1.45; }
.ai-modal-quicks { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.ai-modal-quick {
  padding: 8px 12px;
  background: var(--ai-insight-bg, rgba(31,147,255,0.06));
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--fg-2);
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.ai-modal-quick:hover { background: rgba(31,147,255,0.12); border-color: rgba(31,147,255,0.3); color: var(--accent); }

.ai-modal-msg { display: flex; flex-direction: column; gap: 2px; }
.ai-modal-msg--user { align-self: flex-end; align-items: flex-end; max-width: 80%; }
.ai-modal-msg--ai   { align-self: flex-start; align-items: flex-start; width: 100%; }
.ai-modal-bubble {
  background: var(--accent);
  color: #fff;
  padding: 9px 13px;
  border-radius: 8px 8px 4px 8px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}
.ai-modal-ai {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg-2);
  width: 100%;
}
.ai-modal-time {
  font-size: 10px;
  color: var(--fg-4);
  font-variant-numeric: tabular-nums;
  padding: 0 2px;
}
.ai-modal-dots { display: flex; align-items: center; gap: 4px; padding: 4px 0; }
.ai-modal-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-3);
  animation: aiDot 1.2s ease-in-out infinite;
}
.ai-modal-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-modal-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiDot {
  0%,60%,100% { transform: translateY(0); opacity: 0.45; }
  30%          { transform: translateY(-4px); opacity: 1; }
}

.ai-modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.ai-modal-input {
  flex: 1;
  background: var(--search-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--fg);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.ai-modal-input:focus {
  border-color: rgba(31,147,255,0.45);
  box-shadow: 0 0 0 3px rgba(31,147,255,0.10);
}
.ai-modal-input::placeholder { color: var(--placeholder); }
.ai-modal-send {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  transition: filter 140ms ease, transform 140ms ease;
}
.ai-modal-send:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.ai-modal-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; filter: none; }

/* ── Topbar branca no light mode ───────────────────────────────────────────── */

/* ============================================
   KANBAN — seleção em massa (Dashboard + CRM)
   ============================================ */
/* Botão "Selecionar" do cabeçalho */
.kb-hbtn-box {
  width: 14px; height: 14px; border-radius: 4px; display: inline-grid; place-items: center;
  border: 1.5px solid currentColor; color: inherit; opacity: .8;
}
.kb-hbtn-box svg { opacity: 0; transform: scale(.4); transition: all .15s ease; }
.kb-hbtn-box.on { background: var(--accent); border-color: var(--accent); color: #fff; opacity: 1; }
.kb-hbtn-box.on svg { opacity: 1; transform: scale(1); }
.ghost-btn.kb-select-on {
  border-color: var(--accent); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* Cards no modo seleção */
.crm-lead.kb-selectable { cursor: pointer; user-select: none; padding-left: 38px; transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease; }
.crm-lead.kb-selectable:active { cursor: pointer; transform: scale(.985); }
.crm-lead.kb-selectable:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--lead-border)); }
.crm-lead.kb-selectable .crm-days-badge,
.crm-lead.kb-selectable .crm-lead-nav { pointer-events: none; }
.crm-lead.kb-selectable .crm-days-badge { display: none; }
.crm-lead.kb-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 22px -10px var(--accent-glow);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 11%, var(--card)) 0%, color-mix(in srgb, var(--accent) 5%, var(--card)) 100%);
}
.kb-check {
  position: absolute; top: 16px; left: 11px; z-index: 4;
  width: 19px; height: 19px; border-radius: 50%;
  border: 1.6px solid var(--fg-4); background: var(--card);
  display: grid; place-items: center; color: #fff;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.kb-check svg { opacity: 0; transform: scale(.3) rotate(-20deg); transition: all .18s cubic-bezier(.34,1.56,.64,1); }
.crm-lead.kb-selectable:hover .kb-check:not(.on) { border-color: var(--accent); }
.kb-check.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.kb-check.on svg { opacity: 1; transform: scale(1) rotate(0); }

/* Caixinha da coluna (nenhum / alguns / todos) */
.kb-colcheck {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px 2px 4px; border-radius: 7px; border: 1px solid transparent;
  background: none; cursor: pointer; font-family: inherit;
}
.kb-colcheck:hover { border-color: var(--line-strong); background: var(--segment-bg); }
.kb-colcheck-box {
  width: 15px; height: 15px; border-radius: 4px; display: grid; place-items: center;
  border: 1.5px solid var(--fg-4); color: #fff; transition: all .15s ease;
}
.kb-colcheck.some .kb-colcheck-box, .kb-colcheck.all .kb-colcheck-box { background: var(--accent); border-color: var(--accent); }
.kb-colcheck-dash { width: 7px; height: 2px; border-radius: 1px; background: #fff; }
.kb-colcheck-n { font-size: 11px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.kb-colcheck-n.muted { color: var(--fg-3); font-weight: 600; }

/* Barra flutuante de ações */
.kb-bar-wrap {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 1500; display: flex; flex-direction: column; align-items: center; gap: 7px;
  animation: kbBarIn .28s cubic-bezier(.22,1,.36,1) both;
  max-width: calc(100vw - 32px);
}
@keyframes kbBarIn { from { opacity: 0; transform: translate(-50%, 18px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.kb-bar {
  display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--sb-bg-1), var(--sb-bg-3));
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 18px 50px -12px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.25);
  color: #fff; flex-wrap: wrap; justify-content: center;
}
.kb-bar.busy { opacity: .85; }
.kb-bar-count { display: flex; align-items: center; gap: 7px; padding: 0 6px 0 4px; }
.kb-bar-num {
  min-width: 28px; height: 28px; padding: 0 7px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px -4px var(--accent-glow);
}
.kb-bar-lbl { font-size: 12.5px; color: rgba(255,255,255,.75); white-space: nowrap; }
.kb-bar-x { width: 20px; height: 20px; border-radius: 6px; border: none; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); display: grid; place-items: center; cursor: pointer; }
.kb-bar-x:hover { background: rgba(255,255,255,.18); color: #fff; }
.kb-bar-link { background: none; border: none; color: var(--sb-accent-soft); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; white-space: nowrap; font-family: inherit; }
.kb-bar-link span { opacity: .7; font-weight: 500; }
.kb-bar-link:hover { background: rgba(255,255,255,.06); }
.kb-bar-sep { width: 1px; height: 22px; background: rgba(255,255,255,.12); margin: 0 4px; }
.kb-bar-item { position: relative; }
.kb-bar-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  border-radius: 9px; border: none; background: transparent; color: rgba(255,255,255,.92);
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.kb-bar-btn:hover:not(:disabled), .kb-bar-btn.on { background: rgba(255,255,255,.1); color: #fff; }
.kb-bar-btn:disabled { opacity: .38; cursor: not-allowed; }
.kb-bar-btn .kb-caret { opacity: .6; transition: transform .15s; }
.kb-bar-btn.on .kb-caret { transform: rotate(180deg); }
.kb-bar-btn.danger { color: #ff8a80; }
.kb-bar-btn.danger:hover:not(:disabled), .kb-bar-btn.danger.on { background: rgba(255,90,78,.16); color: #ffb4ad; }
.kb-bar-btn.done { background: #fff; color: #111; padding: 0 16px; }
.kb-bar-btn.done:hover:not(:disabled) { background: #e9edf3; color: #111; }
.kb-bar-btn.ghost { background: var(--segment-bg); color: var(--fg-2); border: 1px solid var(--line-strong); }
.kb-bar-btn.solid-danger { background: var(--hot); color: #fff; }
.kb-bar-btn.solid-danger:hover { filter: brightness(1.08); background: var(--hot); }
.kb-bar-btn.solid { background: var(--accent); color: #fff; }
.kb-bar-btn.solid:hover { filter: brightness(1.08); background: var(--accent); color: #fff; }
.kb-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(0,0,0,.2); border-top-color: #111; animation: spin .7s linear infinite; }
.kb-bar-hint {
  font-size: 11px; color: var(--fg-3); background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--line); padding: 3px 10px; border-radius: 20px; backdrop-filter: blur(6px);
  white-space: nowrap;
}
.kb-bar-hint b { color: var(--fg-2); font-weight: 600; }

/* Menus que abrem para cima */
.kb-pop {
  position: absolute; bottom: calc(100% + 12px); left: 0; z-index: 2;
  background: var(--card); color: var(--fg); border: 1px solid var(--line-strong);
  border-radius: 8px; box-shadow: 0 18px 44px -10px rgba(0,0,0,.5);
  padding: 6px; animation: kbPopIn .16s ease both;
}
.kb-pop.right { left: auto; right: 0; }
@keyframes kbPopIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.kb-pop-head { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-4); padding: 6px 8px 6px; }
.kb-pop-search { width: 100%; box-sizing: border-box; margin: 0 0 6px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--search-bg); color: var(--fg); font-size: 12.5px; font-family: inherit; outline: none; }
.kb-pop-search:focus { border-color: var(--accent); }
.kb-pop-list { max-height: min(340px, 50vh); overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.kb-pop-row {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 7px 8px; border-radius: 8px; border: none; background: none; color: var(--fg);
  font-size: 13px; font-family: inherit; cursor: pointer;
}
.kb-pop-row:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.kb-pop-row:disabled { opacity: .45; cursor: default; }
.kb-pop-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 0%, transparent); }
.kb-pop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-pop-meta { font-size: 11px; color: var(--fg-4); white-space: nowrap; }
.kb-pop-av { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; object-fit: cover; }
.kb-pop-empty { font-size: 12px; color: var(--fg-4); padding: 10px 8px; }
.kb-pop-note { margin-top: 6px; padding: 8px 8px 4px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--fg-4); line-height: 1.4; }
.kb-pop-meta svg { color: var(--accent); vertical-align: middle; }
.kb-bar-toast {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  background: var(--card); color: var(--fg); border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); padding: 8px 12px; font-size: 12.5px; white-space: nowrap;
  cursor: pointer; animation: kbPopIn .16s ease both;
}
.kb-pop-foot { display: flex; align-items: center; gap: 9px; margin-top: 6px; padding: 9px 8px 5px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-3); cursor: pointer; }
.kb-pop-foot b { color: var(--fg); }
.kb-switch { width: 30px; height: 17px; border-radius: 8px; background: var(--line-strong); position: relative; flex-shrink: 0; transition: background .15s; }
.kb-switch span { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.kb-switch.on { background: var(--accent); }
.kb-switch.on span { left: 15px; }
.kb-pop-confirm { padding: 8px 8px 4px; }
.kb-pop-confirm-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.kb-pop-confirm-text { font-size: 12px; color: var(--fg-3); line-height: 1.45; margin-bottom: 12px; }
.kb-pop-confirm-btns { display: flex; justify-content: flex-end; gap: 6px; }

/* Espaço no fim do Kanban para a barra não cobrir os últimos cards */
body.kb-selecting .kanban { padding-bottom: 96px; }

@media (max-width: 720px) {
  .kb-bar-wrap { bottom: 12px; }
  .kb-bar-hint { display: none; }
  .kb-bar-lbl { display: none; }
}

/* Horos 360 — mídias e histórico no chat */
.c360-syncing {
  position: sticky;
  top: -18px;
  align-self: center;
  z-index: 2;
  font-size: 11px;
  color: var(--fg-3);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 10px;
}
.c360-media-img {
  display: block;
  max-width: 240px;
  max-height: 260px;
  border-radius: 8px;
  cursor: zoom-in;
  margin-bottom: 2px;
}
.c360-media-audio { width: 230px; height: 36px; }
.c360-media-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: var(--segment-bg);
  color: inherit;
  font-size: 12px;
  cursor: pointer;
}
.c360-media-btn:disabled { cursor: default; opacity: .7; }
.from-corretor .c360-media-btn { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.12); }
.c360-failed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--hot);
  cursor: pointer;
}
.c360-failed:hover { text-decoration: underline; }

/* Horos 360 — respostas rápidas */
.c360-chat-input { position: relative; }
.c360-qr-btn.on { color: var(--accent); border-color: rgba(31,147,255,0.45); }
.c360-qr-pop {
  position: absolute; left: 12px; right: 12px; bottom: calc(100% + 6px); z-index: 30;
  display: flex; flex-direction: column; max-height: 300px;
  background: var(--card); border: 1px solid var(--line-strong, var(--line)); border-radius: 8px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.45); overflow: hidden;
}
.c360-qr-search {
  margin: 8px; padding: 7px 10px; font-size: 13px; outline: none;
  background: var(--search-bg); border: 1px solid var(--line); border-radius: 8px; color: var(--fg);
}
.c360-qr-search:focus { border-color: rgba(31,147,255,0.4); }
.c360-qr-list { overflow-y: auto; padding: 4px; }
.c360-qr-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 7px 9px; border: none; background: none; border-radius: 8px; cursor: pointer; color: var(--fg);
}
.c360-qr-item.active { background: var(--icon-btn-hover-bg); }
.c360-qr-short { font-family: ui-monospace, 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; color: var(--accent); flex-shrink: 0; }
.c360-qr-msg { font-size: 12.5px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.c360-qr-media { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--fg-4); flex-shrink: 0; margin-left: auto; }
.c360-qr-empty { padding: 14px; font-size: 12px; color: var(--fg-4); text-align: center; }
.c360-qr-manage {
  padding: 8px 12px; font-size: 12px; font-weight: 600; color: var(--accent);
  border-top: 1px solid var(--line); text-decoration: none; text-align: center;
}
.c360-qr-manage:hover { background: var(--icon-btn-hover-bg); }
.c360-qr-pending {
  display: flex; align-items: center; gap: 7px; padding: 6px 16px;
  font-size: 12px; color: var(--fg-3); background: var(--card); border-top: 1px solid var(--line);
}
.c360-qr-pending svg { color: var(--accent); flex-shrink: 0; }
.c360-qr-pending.err, .c360-qr-pending.err svg { color: var(--hot); }
.c360-qr-pending-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c360-qr-pending button { background: none; border: none; color: var(--fg-4); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.c360-qr-pending button:hover { color: var(--fg); }
.c360-rec { flex: 1; display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 13px; color: var(--fg-2);
  background: var(--search-bg); border: 1px solid rgba(255,90,78,0.35); border-radius: 8px; font-variant-numeric: tabular-nums; }
.c360-rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hot); animation: c360RecPulse 1s ease-in-out infinite; }
@keyframes c360RecPulse { 50% { opacity: .3; } }
.c360-rec-cancel { margin-left: auto; background: none; border: none; color: var(--fg-4); font-size: 12px; cursor: pointer; }
.c360-rec-cancel:hover { color: var(--hot); }
.chat-action.c360-rec-on { background: var(--hot); color: #fff; border-color: transparent; }
.chat-attach:disabled, .chat-action:disabled { opacity: .45; cursor: default; }

/* Rodízio — etapa de cada corretor no card */
.lead-stages {
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ai-insight-bg);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: default;
}
.lead-stages-head {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 1px;
}
.lead-stages-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--fg-3); }
.lead-stages-row.current { color: var(--fg); font-weight: 600; }
.lead-stages-row.current .lead-stages-col { color: var(--accent); }
.lead-stages-name { white-space: nowrap; }
.lead-stages-col { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-stages-prev {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--warm);
  background: var(--warm-soft);
  border-radius: 6px;
  padding: 2px 7px;
}

/* Relatórios — de quem é o relatório (gestores) */
.rep-scope-select {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--search-bg);
  color: var(--fg);
  font-size: 13px;
  font-family: inherit;
  max-width: 220px;
  cursor: pointer;
}
.rep-scope-select option { background: var(--card); color: var(--fg); }


/* ============================================
   EDITAR FUNIL (KanbanEditModal) — claro e escuro
   ============================================ */
.kem-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; }
.kem-box {
  background: var(--card); color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: 8px; width: 520px; max-width: 92vw; max-height: 85vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.kem-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.kem-title { font-weight: 700; font-size: 15px; color: var(--fg); }
.kem-sub { font-size: 12px; color: var(--fg-3); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.kem-sub-grip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 20px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.kem-close { background: none; border: none; cursor: pointer; color: var(--fg-4); padding: 0 4px; display: flex; }
.kem-close:hover { color: var(--fg); }
.kem-list { flex: 1; overflow-y: auto; padding: 10px 16px; }
.kem-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; margin-bottom: 5px; border-radius: 8px;
  background: var(--bg-elev); border: 1px solid var(--line);
  transition: background .1s, box-shadow .1s, border-color .1s;
}
[data-theme="light"] .kem-row { background: #fff; border-color: #eef0f3; }
.kem-row:not(.drag-active):hover { border-color: var(--line-strong); background: var(--card-2); }
[data-theme="light"] .kem-row:not(.drag-active):hover { background: #f9fafb; }
.kem-row.dragging { opacity: .55; border: 1.5px dashed var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.kem-row.drop-top { box-shadow: 0 -4px 0 -1px var(--accent); }
.kem-row.drop-bottom { box-shadow: 0 4px 0 -1px var(--accent); }
.kem-grip {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 26px; height: 30px; border-radius: 7px; cursor: grab;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
  transition: background .12s, color .12s;
}
.kem-grip:hover { background: var(--accent); color: #fff; }
.kem-grip.grabbing { cursor: grabbing; }
.kem-grip.fixed { cursor: not-allowed; background: var(--segment-bg); color: var(--fg-5, var(--fg-4)); opacity: .5; }
.kem-grip.fixed:hover { background: var(--segment-bg); color: var(--fg-4); }
.kem-color { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line-strong); cursor: pointer; display: block; padding: 0; }
.kem-palette {
  position: absolute; top: 26px; left: 0; z-index: 10; width: 188px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 8px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.kem-swatch { width: 18px; height: 18px; border-radius: 4px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.kem-swatch.on { border-color: var(--fg); }
.kem-input {
  flex: 1; min-width: 0; padding: 5px 9px; font-size: 13px; font-family: inherit;
  color: var(--fg); background: var(--search-bg);
  border: 1px solid var(--line-strong); border-radius: 7px; outline: none;
}
[data-theme="light"] .kem-input { background: #fff; border-color: #e5e7eb; }
.kem-input:focus { border-color: var(--accent); }
.kem-input[readonly] { cursor: default; color: var(--fg-3); background: var(--segment-bg); }
.kem-input[readonly]:focus { border-color: var(--line-strong); }
.kem-badge { font-size: 11px; padding: 2px 7px; border-radius: 20px; flex-shrink: 0; background: var(--segment-bg); color: var(--fg-3); border: 1px solid var(--line); }
.kem-badge.fixed { font-size: 10px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: transparent; }
.kem-arrow { background: none; border: none; cursor: pointer; color: var(--fg-3); padding: 0 2px; font-size: 11px; }
.kem-arrow:hover:not(:disabled) { color: var(--accent); }
.kem-arrow:disabled { cursor: not-allowed; color: var(--line-strong); }
.kem-del { background: none; border: none; cursor: pointer; color: var(--hot); padding: 0 3px; display: flex; }
.kem-del:disabled { cursor: not-allowed; color: var(--line-strong); }
.kem-add {
  display: flex; align-items: center; gap: 6px; width: 100%; margin: 8px 0 6px; padding: 9px 12px;
  background: none; border: 1px dashed var(--line-strong); border-radius: 8px;
  cursor: pointer; color: var(--fg-3); font-size: 13px; font-family: inherit;
}
.kem-add:hover { color: var(--accent); border-color: var(--accent); }
.kem-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); flex-shrink: 0; }
.kem-warn { flex: 1; font-size: 11px; color: var(--warm); display: flex; align-items: center; gap: 4px; }
.kem-btn { border: 1px solid var(--line-strong); background: var(--segment-bg); color: var(--fg-2); border-radius: 8px; padding: 7px 16px; cursor: pointer; font-size: 13px; font-weight: 500; font-family: inherit; }
.kem-btn:hover { color: var(--fg); }
.kem-btn.primary { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; }
.kem-btn.primary:disabled { opacity: .7; cursor: not-allowed; }

/* ============================================
   DISPAROS (broadcast.jsx) — claro e escuro
   ============================================ */
.bc-overlay { position: fixed; inset: 0; z-index: 2100; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.bc-box { width: min(920px, 96vw); height: min(760px, 92vh); display: flex; flex-direction: column; background: var(--card); color: var(--fg); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 24px 64px rgba(0,0,0,.4); overflow: hidden; }
.bc-box.bc-page-mode { width: 100%; flex: 1; min-height: 0; max-width: 100%; border-radius: 0; border: none; box-shadow: none; background: transparent; }
.content.bc-fullpage { padding: 0 !important; overflow-y: auto !important; display: block !important; }
.bc-fullpage .bc-box.bc-page-mode { flex: none; height: min(680px, 82vh); }
.bc-crm-below { border-top: 1px solid var(--line); margin-top: 8px; }
.bc-page-tabs { display: flex; gap: 4px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.bc-ptab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px; border: none; background: none; color: var(--fg-3); font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; transition: color .12s, background .12s; }
.bc-ptab:hover { color: var(--fg); }
.bc-ptab.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.bc-import-lists { display: flex; flex-direction: column; gap: 8px; }
.bc-il-hint { font-size: 12.5px; color: var(--fg-3); margin-bottom: 6px; line-height: 1.5; }
.bc-il-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-elev); }
.bc-il-row:hover { border-color: var(--line-strong); }
.bc-il-icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); flex-shrink: 0; }
.bc-il-info { flex: 1; min-width: 0; }
.bc-il-nome { font-size: 13.5px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-il-meta { font-size: 12px; color: var(--fg-3); margin-top: 2px; }
.bc-il-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bc-il-confirm-text { font-size: 12.5px; color: var(--hot); font-weight: 500; white-space: nowrap; }
.bc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.bc-head-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bc-head-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); flex-shrink: 0; }
.bc-title { font-size: 15px; font-weight: 700; }
.bc-sub { font-size: 11.5px; color: var(--fg-3); margin-top: 2px; }
.bc-back, .bc-close { background: none; border: none; color: var(--fg-3); cursor: pointer; display: flex; padding: 4px; border-radius: 6px; }
.bc-back:hover, .bc-close:hover { color: var(--fg); background: var(--icon-btn-hover-bg); }
.bc-body { flex: 1; overflow-y: auto; padding: 18px 20px; min-height: 0; }

.bc-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--segment-bg); color: var(--fg-2); font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; }
.bc-btn:hover:not(:disabled) { color: var(--fg); border-color: var(--fg-4); }
.bc-btn:disabled { opacity: .45; cursor: not-allowed; }
.bc-btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.bc-btn.primary:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }
.bc-btn.danger { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 40%, transparent); background: none; }
.bc-btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }

.bc-empty { text-align: center; color: var(--fg-3); padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bc-empty.small { padding: 24px; }
.bc-empty-icon { width: 60px; height: 60px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.bc-empty-title { font-size: 16px; font-weight: 700; color: var(--fg); }
.bc-empty-text { font-size: 13px; max-width: 420px; line-height: 1.5; margin-bottom: 6px; }

.bc-list { display: flex; flex-direction: column; gap: 10px; }
.bc-card { border: 1px solid var(--line); background: var(--bg-elev); border-radius: 8px; padding: 14px 16px; cursor: pointer; transition: border-color .12s; }
[data-theme="light"] .bc-card { background: #fff; }
.bc-card:hover { border-color: var(--line-strong); }
.bc-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.bc-card-name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-card-meta { font-size: 11.5px; color: var(--fg-4); margin-top: 2px; }
.bc-card-msg { font-size: 12.5px; color: var(--fg-3); margin: 8px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.bc-file-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--segment-bg); border: 1px solid var(--line); margin-right: 6px; color: var(--fg-2); }
.bc-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.bc-reason { font-size: 11.5px; color: var(--fg-3); }
.bc-actions { display: flex; gap: 6px; }

.bc-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.bc-chip.run { color: var(--success); background: var(--success-soft); }
.bc-chip.sched { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.bc-chip.pause { color: var(--warm); background: var(--warm-soft); }
.bc-chip.done { color: var(--fg-2); background: var(--segment-bg); border: 1px solid var(--line); }
.bc-chip.cancel { color: var(--hot); background: var(--hot-soft); }
.bc-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: bcPulse 1.2s ease-in-out infinite; }
@keyframes bcPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.bc-progress-bar { display: flex; height: 7px; border-radius: 4px; background: var(--score-track, var(--segment-bg)); overflow: hidden; }
.bc-progress-sent { background: linear-gradient(90deg, #1F93FF, #7EC8FF); transition: width .4s ease; }
.bc-progress-fail { background: var(--hot); transition: width .4s ease; }
.bc-progress-nums { display: flex; gap: 12px; font-size: 11.5px; color: var(--fg-2); margin-top: 6px; }
.bc-progress-nums .fail { color: var(--hot); }
.bc-progress-nums .muted { color: var(--fg-4); margin-left: auto; font-variant-numeric: tabular-nums; }

.bc-detail { display: flex; flex-direction: column; gap: 14px; }
.bc-detail-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.bc-tr { display: grid; grid-template-columns: 1.3fr 1fr 90px 1.4fr; gap: 10px; padding: 8px 12px; font-size: 12.5px; border-bottom: 1px solid var(--line); align-items: center; }
.bc-tr:last-child { border-bottom: none; }
.bc-td-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-td-phone { font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); }
.bc-td-st { font-weight: 600; font-size: 11.5px; color: var(--fg-3); }
.bc-td-st.sent { color: var(--success); }
.bc-td-st.failed { color: var(--hot); }
.bc-td-st.sending { color: var(--accent); }
.bc-td-info { font-size: 11px; color: var(--fg-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bc-wizard { display: flex; flex-direction: column; gap: 16px; }
.bc-steps { display: flex; gap: 6px; }
.bc-step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--fg-3); font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; }
.bc-step.on { border-color: var(--accent); color: var(--fg); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.bc-step.done { color: var(--fg-2); }
.bc-step-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--segment-bg); border: 1px solid var(--line-strong); }
.bc-step.on .bc-step-n, .bc-step.done .bc-step-n { background: var(--accent); border-color: var(--accent); color: #fff; }
.bc-pane { display: flex; flex-direction: column; gap: 8px; }
.bc-two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.bc-two > div { display: flex; flex-direction: column; gap: 8px; }
.bc-label { font-size: 12px; font-weight: 700; color: var(--fg-2); margin-top: 8px; }
.bc-label span { font-weight: 400; color: var(--fg-4); }
.bc-muted { color: var(--fg-4); font-size: 12.5px; }
.bc-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--segment-bg); border: 1px solid var(--line); align-self: flex-start; flex-wrap: wrap; }
.bc-seg button { border: none; background: none; color: var(--fg-3); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-family: inherit; }
.bc-seg button.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.bc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 20px; border: 1px solid var(--line-strong); background: none; color: var(--fg-2); font-size: 12.5px; cursor: pointer; font-family: inherit; }
.bc-pick:hover { border-color: var(--fg-4); }
.bc-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--fg); }
.bc-pick-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bc-input, .bc-textarea { width: 100%; box-sizing: border-box; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--search-bg); color: var(--fg); font-size: 13px; font-family: inherit; outline: none; }
.bc-input:focus, .bc-textarea:focus { border-color: var(--accent); }
.bc-input option { background: var(--card); color: var(--fg); }
.bc-textarea { resize: vertical; line-height: 1.5; }
.bc-textarea.mono { font-family: var(--mono); font-size: 12px; }
.bc-vars { display: flex; gap: 6px; flex-wrap: wrap; }
.bc-vars button { border: 1px dashed var(--line-strong); background: none; color: var(--accent); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px; cursor: pointer; font-family: inherit; }
.bc-vars button:hover { border-color: var(--accent); }
.bc-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--segment-bg); font-size: 12.5px; }
.bc-file span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-file button { background: none; border: none; color: var(--fg-3); cursor: pointer; display: flex; }
.bc-count { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 14px 16px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.bc-count-n { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.bc-count-l { font-size: 11.5px; color: var(--fg-3); margin-top: 3px; }
.bc-count-info { font-size: 12px; color: var(--fg-3); }
.bc-sample { margin-top: 4px; color: var(--fg-2); }
.bc-nav { display: flex; justify-content: space-between; margin-top: 14px; }
.bc-nav.full { grid-column: 1 / -1; }
.bc-preview, .bc-bubble-wrap { padding: 16px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); min-height: 120px; }
.bc-bubble { max-width: 90%; margin-left: auto; background: #005c4b; color: #e9edef; padding: 8px 10px; border-radius: 8px 8px 2px 8px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
[data-theme="light"] .bc-bubble { background: #d9fdd3; color: #111b21; }
.bc-bubble-file { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .85; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.15); }
.bc-tip { font-size: 12px; color: var(--fg-3); line-height: 1.5; padding: 10px 12px; border-radius: 8px; background: var(--segment-bg); border: 1px solid var(--line); }
.bc-pace { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bc-pace-opt { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: none; color: var(--fg-2); cursor: pointer; font-family: inherit; }
.bc-pace-opt b { font-size: 13.5px; color: var(--fg); }
.bc-pace-opt span { font-size: 12px; }
.bc-pace-opt small { font-size: 11px; color: var(--fg-4); line-height: 1.35; }
.bc-pace-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.bc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.bc-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--fg-3); }
.bc-hours { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-3); }
.bc-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.bc-summary > div { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-elev); display: flex; flex-direction: column; gap: 3px; }
.bc-summary span { font-size: 11px; color: var(--fg-4); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.bc-summary b { font-size: 14px; }
.bc-warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 12px; line-height: 1.5; color: var(--fg-2); background: var(--warm-soft); border: 1px solid color-mix(in srgb, var(--warm) 35%, transparent); }
.bc-warn svg { color: var(--warm); flex-shrink: 0; margin-top: 2px; }
.bc-error { font-size: 12.5px; color: var(--hot); background: var(--hot-soft); padding: 8px 12px; border-radius: 9px; }

@media (max-width: 720px) {
  .bc-two, .bc-pace, .bc-grid, .bc-summary { grid-template-columns: 1fr; }
  .bc-tr { grid-template-columns: 1fr 1fr; }
  .bc-steps { flex-direction: column; }
}

/* Horos 360 — a conversa sempre tem espaço: o topo (dados + Resumo) ocupa no máximo 55%
   da altura e rola sozinho; o Resumo fica compacto */
.drawer-head { flex-shrink: 1; max-height: 55vh; overflow-y: auto; overscroll-behavior: contain; }
.drawer-body { min-height: 240px; }
.drawer-head .drawer-tabs { position: sticky; bottom: 0; background: inherit; z-index: 2; }
.c360-summary { max-height: 26vh; }
.c360-summary .drawer-pad { padding: 10px 14px; gap: 8px; }
.c360-summary .info-row { padding: 7px 10px; }
.c360-summary .info-value { font-size: 12px; }
@media (max-height: 800px) {
  .drawer-hero { margin-bottom: 10px; }
  .drawer-hero-stats { margin-bottom: 10px; padding: 9px 10px; }
  .drawer-id { margin-bottom: 10px; }
  .c360-summary { max-height: 22vh; }
}

.c360-chat-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 14px; border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--fg-3); background: var(--card); flex-shrink: 0;
}
.c360-chat-bar button {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong);
  background: var(--segment-bg); color: var(--accent); font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 7px; cursor: pointer; font-family: inherit;
}
.c360-chat-bar button:hover { border-color: var(--accent); }


/* Kanban — busca por etapa (lupa no cabeçalho da coluna) */
.kcol-search-btn {
  margin-left: auto; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  border: 1px solid transparent; background: none; color: var(--fg-4); cursor: pointer; flex-shrink: 0;
  opacity: .7; transition: opacity .12s, background .12s, color .12s;
}
.kcol:hover .kcol-search-btn, .kcol-search-btn.open, .kcol-search-btn.active { opacity: 1; }
.kcol-search-btn:hover { background: var(--segment-bg); color: var(--fg); border-color: var(--line); }
.kcol-search-btn.open, .kcol-search-btn.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.kcol-head .kb-colcheck + .kcol-search-btn, .kcol-head .kcol-search-btn + .kb-colcheck { margin-left: 4px; }
.kcol-search {
  display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; padding: 0 6px 0 9px; height: 32px;
  border-radius: 8px; border: 1px solid var(--accent); background: var(--search-bg); color: var(--fg-3);
  animation: fadeIn .15s ease both;
}
.kcol-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; color: var(--fg); font-size: 12.5px; font-family: inherit; }
.kcol-search input::placeholder { color: var(--placeholder); }
.kcol-search-n { font-size: 10.5px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.kcol-search button { width: 20px; height: 20px; border-radius: 5px; border: none; background: none; color: var(--fg-4); display: grid; place-items: center; cursor: pointer; }
.kcol-search button:hover { background: var(--segment-bg); color: var(--fg); }

.bc-two > .bc-nav { flex-direction: row; justify-content: space-between; }

/* ── Kanban: etiquetas do WhatsApp no card (KbWaLabels em data.jsx) ── */
.kbwa-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; }
.kbwa-chip {
  display: inline-flex; align-items: center; max-width: 140px; padding: 1px 7px; border-radius: 999px;
  border: 1px solid; font-size: 10.5px; font-weight: 600; line-height: 16px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kbwa-add {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px;
  border: 1px dashed var(--line-strong, var(--line)); background: transparent; color: var(--fg-4);
  font-size: 10.5px; font-weight: 600; cursor: pointer; transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}
.kbwa-add:hover, .kbwa-add.on { color: var(--accent); border-color: rgba(31,147,255,0.5); background: rgba(31,147,255,0.08); }
.kbwa-pop {
  position: fixed; z-index: 9500; width: 240px; max-height: 320px; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line-strong, var(--line)); border-radius: 8px;
  box-shadow: 0 14px 36px -8px rgba(0,0,0,0.5); overflow: hidden; color: var(--fg);
}
.kbwa-pop-title { padding: 10px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-4); }
.kbwa-pop-list { overflow-y: auto; padding: 0 4px 4px; }
.kbwa-pop-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border: none; border-radius: 8px;
  background: none; color: var(--fg); font-size: 13px; text-align: left; cursor: pointer;
}
.kbwa-pop-item:hover:not(:disabled) { background: var(--icon-btn-hover-bg); }
.kbwa-pop-item:disabled { cursor: default; }
.kbwa-pop-item.on { font-weight: 600; }
.kbwa-pop-item svg { color: var(--accent); flex-shrink: 0; }
.kbwa-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.kbwa-pop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbwa-spin { width: 12px; height: 12px; border: 1.6px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
.kbwa-pop-err { padding: 8px 12px; font-size: 12px; color: var(--hot); border-top: 1px solid var(--line); }

/* Horos 360 — nova visita */
.c360-visit-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.c360-visit-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--fg-4); flex: 1; min-width: 0; }
.c360-visit-form input { padding: 7px 9px; font-size: 13px; color: var(--fg); background: var(--search-bg); border: 1px solid var(--line); border-radius: 8px; outline: none; color-scheme: light dark; }
.c360-visit-form input:focus { border-color: rgba(31,147,255,0.45); }
.c360-visit-row { display: flex; gap: 8px; }
.c360-visit-err { font-size: 12px; color: var(--hot); }
.c360-visit-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Dashboard — últimos clientes: busca e menu "Mais" */
.dash-cli-search { width: 200px; padding: 6px 10px; font-size: 12.5px; color: var(--fg); background: var(--search-bg); border: 1px solid rgba(31,147,255,0.4); border-radius: 8px; outline: none; }
.dash-row-menu, .kb-head-menu {
  position: fixed; z-index: 9500; min-width: 200px; padding: 4px; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line-strong, var(--line)); border-radius: 8px;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.5);
}
.dash-row-menu button, .kb-head-menu button {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: none; border-radius: 7px;
  background: none; color: var(--fg); font-size: 13px; text-align: left; cursor: pointer;
}
.dash-row-menu button:hover, .kb-head-menu button:hover { background: var(--icon-btn-hover-bg); }
.dash-row-menu svg, .kb-head-menu svg { color: var(--fg-3); flex-shrink: 0; }

/* ── Autorização de consulta de crédito (CreditAuthPanel em data.jsx) ── */
.cap-card { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.cap-head { display: flex; align-items: flex-start; gap: 11px; }
.cap-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: rgba(31,147,255,0.12); color: var(--accent); }
.cap-ic.wait { background: rgba(245,181,68,0.14); color: var(--warm); }
.cap-ic.ok { background: rgba(52,211,153,0.14); color: #34d399; }
.cap-title { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.cap-sub { font-size: 12px; color: var(--fg-3); line-height: 1.5; margin-top: 2px; }
.cap-link { display: flex; gap: 6px; }
.cap-link input { flex: 1; min-width: 0; padding: 7px 10px; font-size: 12px; font-family: var(--mono, ui-monospace, monospace); color: var(--fg-2); background: var(--search-bg); border: 1px solid var(--line); border-radius: 8px; outline: none; }
.cap-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cap-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid transparent; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cap-btn:hover:not(:disabled) { filter: brightness(1.08); }
.cap-btn.ghost { background: transparent; color: var(--fg-2); border-color: var(--line); }
.cap-btn.ghost:hover:not(:disabled) { background: var(--icon-btn-hover-bg); filter: none; }
.cap-btn:disabled { opacity: .5; cursor: default; }
.cap-msg { font-size: 12px; }
.cap-msg.ok { color: #34d399; }
.cap-msg.err { color: var(--hot); }
.cap-signed { display: flex; gap: 14px; align-items: center; }
.cap-selfie-lock { width: 84px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; border-radius: 8px; background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.3); color: #34d399; font-size: 10.5px; font-weight: 600; text-align: center; line-height: 1.25; }
.cap-signed-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--fg-2); min-width: 0; }
.cap-signed-meta b, .cap-details b { font-weight: 600; color: var(--fg-4); margin-right: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.cap-linkbtn { align-self: flex-start; background: none; border: none; padding: 0; margin-top: 2px; color: var(--accent); font-size: 12px; cursor: pointer; }
.cap-details { display: flex; flex-direction: column; gap: 5px; padding: 12px; border-radius: 8px; background: var(--search-bg); font-size: 12.5px; color: var(--fg-2); }
.cap-consent { margin-top: 6px; white-space: pre-line; line-height: 1.5; font-size: 12px; color: var(--fg-3); }
.cap-consent b { display: block; margin-bottom: 4px; }
.cap-card.compact .cap-actions .cap-btn { flex: 1 1 auto; justify-content: center; }

/* Equipe — logo da imobiliária (WorkspaceLogo em workspace.jsx) */
.ws-logo { display: flex; align-items: center; gap: 14px; }
.ws-logo-box { width: 132px; height: 56px; flex-shrink: 0; border-radius: 8px; border: 1.5px dashed var(--line-strong); display: grid; place-items: center; color: var(--fg-4); background: var(--card); transition: border-color .14s, color .14s; overflow: hidden; }
.ws-logo-box:hover { border-color: var(--accent); color: var(--accent); }
.ws-logo-box.has { border-style: solid; border-color: var(--line); background: #fff; padding: 6px 10px; display: flex; }
.ws-logo-box img { width: 100%; height: 100%; object-fit: contain; display: block; }   /* ocupa a caixa e encaixa a logo inteira, qualquer proporção */
.ws-logo-spin { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.ws-logo-meta { display: flex; flex-direction: column; gap: 5px; max-width: 320px; }
.ws-logo-actions { display: flex; gap: 8px; }
.ws-logo-actions button { padding: 5px 11px; font-size: 12.5px; font-weight: 600; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--fg-2); cursor: pointer; }
.ws-logo-actions button:hover:not(:disabled) { background: var(--icon-btn-hover-bg); color: var(--fg); }
.ws-logo-actions button.danger:hover:not(:disabled) { color: var(--hot); border-color: rgba(255,90,78,.4); }
.ws-logo-actions button:disabled { opacity: .5; cursor: default; }
.ws-logo-hint { font-size: 12px; color: var(--fg-4); line-height: 1.45; }

/* ── Equipe: card de membro, marca para clientes, perfil (workspace.jsx) ── */
.ws-member { background: var(--card); border: 1px solid var(--border, var(--line)); border-radius: 8px; padding: 13px 16px; display: flex; align-items: center; gap: 12px; min-width: 230px; max-width: 320px; transition: border-color .14s, box-shadow .14s, transform .14s; }
.ws-member.clickable { cursor: pointer; }
.ws-member.clickable:hover, .ws-member.clickable:focus-visible { border-color: rgba(31,147,255,.45); box-shadow: 0 6px 18px -10px rgba(31,147,255,.45); outline: none; }
.ws-member-go { color: var(--fg-4); display: flex; transition: color .14s, transform .14s; }
.ws-member.clickable:hover .ws-member-go { color: var(--accent); transform: translateX(2px); }

.ws-brand { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-bottom: 32px; display: flex; flex-direction: column; gap: 16px; }
.ws-brand-title { font-size: 15px; font-weight: 700; color: var(--fg); }
.ws-brand-sub { font-size: 12.5px; color: var(--fg-3); margin-top: 3px; }
.ws-brand-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr); gap: 20px; }
@media (max-width: 900px) { .ws-brand-grid { grid-template-columns: 1fr; } }
.ws-brand-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ws-brand-field > label { font-size: 12px; font-weight: 600; color: var(--fg-2); }
.ws-brand-row { display: flex; gap: 8px; }
.ws-brand-row input { flex: 1; min-width: 0; padding: 8px 11px; font-size: 13.5px; color: var(--fg); background: var(--search-bg); border: 1px solid var(--line); border-radius: 8px; outline: none; font-family: inherit; }
.ws-brand-row input:focus { border-color: rgba(31,147,255,.5); }
.ws-brand-row button { padding: 0 14px; border-radius: 8px; border: none; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.ws-brand-row button:disabled { opacity: .45; cursor: default; }
.ws-brand-hint { font-size: 12px; color: var(--fg-4); }
.ws-brand-hint.err { color: var(--hot); }
.ws-brand-preview { display: flex; align-items: center; gap: 12px; }
.ws-brand-prev-lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-4); }
.ws-brand-prev-bar { flex: 1; max-width: 460px; height: 52px; padding: 0 16px; background: #fff; border: 1px solid #E4E8EF; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-brand-prev-bar img { height: 20px; display: block; }
.ws-brand-prev-bar .ws-brand-prev-logo { height: auto; max-height: 32px; max-width: 140px; object-fit: contain; }
.ws-brand-prev-name { font-size: 13.5px; font-weight: 600; color: #1F2D3D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ws-drawer-wrap { position: fixed; inset: 0; z-index: 9000; }
.ws-drawer-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: wsFade .18s ease; }
.ws-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--bg-elev, var(--card)); border-left: 1px solid var(--line); overflow-y: auto; padding: 24px 22px 32px; box-shadow: -20px 0 50px -20px rgba(0,0,0,.5); animation: wsSlide .22s cubic-bezier(.16,1,.3,1); }
@keyframes wsFade { from { opacity: 0; } }
@keyframes wsSlide { from { transform: translateX(30px); opacity: 0; } }
.ws-drawer-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg-3); display: grid; place-items: center; cursor: pointer; }
.ws-drawer-x:hover { color: var(--fg); }
.ws-drawer-empty { padding: 60px 10px; text-align: center; color: var(--fg-3); font-size: 13.5px; display: flex; justify-content: center; }
.ws-prof-head { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.ws-prof-name { font-size: 18px; font-weight: 700; color: var(--fg); letter-spacing: -.01em; }
.ws-prof-sub { font-size: 12px; color: var(--fg-3); }
.ws-prof-info { margin-top: 18px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.ws-prof-info > div { display: flex; gap: 10px; padding: 9px 13px; font-size: 13px; color: var(--fg-2); border-bottom: 1px solid var(--line); min-width: 0; word-break: break-word; }
.ws-prof-info > div:last-child { border-bottom: none; }
.ws-prof-info span { width: 130px; flex-shrink: 0; color: var(--fg-4); font-size: 12px; font-weight: 600; }
.ws-prof-sec { margin: 26px 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-4); }
.ws-prof-sub2 { margin: 18px 0 10px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ws-prof-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ws-prof-kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ws-prof-kpis b { font-size: 17px; font-weight: 700; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-prof-kpis span { font-size: 11px; color: var(--fg-4); }
.ws-prof-alert { margin-top: 10px; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--warm); background: rgba(245,181,68,.1); border: 1px solid rgba(245,181,68,.28); border-radius: 8px; padding: 8px 11px; }
.ws-prof-temps { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; font-weight: 600; }
.ws-prof-none { font-size: 12.5px; color: var(--fg-4); }
.ws-prof-stages { display: flex; flex-direction: column; gap: 7px; }
.ws-prof-stage { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 10px; font-size: 12.5px; }
.ws-prof-stage .lbl { color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-prof-stage .bar { height: 8px; border-radius: 99px; background: var(--search-bg); overflow: hidden; }
.ws-prof-stage .bar i { display: block; height: 100%; border-radius: 99px; }
.ws-prof-stage .n { text-align: right; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.ws-prof-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--fg-4); }
.ws-prof-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.ws-prof-legend i.new, .ws-prof-month i.new { background: var(--accent); }
.ws-prof-legend i.closed, .ws-prof-month i.closed { background: #34d399; }
.ws-prof-months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 110px; }
.ws-prof-month { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.ws-prof-month .bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); }
.ws-prof-month .bars i { width: 11px; min-height: 2px; border-radius: 3px 3px 0 0; }
.ws-prof-month span { font-size: 11px; color: var(--fg-4); }
.ws-prof-link { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.ws-prof-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-prof-edit label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fg-2); }
.ws-prof-edit select { padding: 8px 10px; font-size: 13.5px; color: var(--fg); background: var(--search-bg); border: 1px solid var(--line); border-radius: 8px; font-family: inherit; color-scheme: light dark; }
.ws-prof-msg { margin-top: 10px; font-size: 12.5px; }
.ws-prof-msg.ok { color: #34d399; }
.ws-prof-msg.err { color: var(--hot); }
.ws-prof-rmbtn { margin-top: 18px; background: none; border: 1px solid rgba(255,90,78,.35); color: var(--hot); border-radius: 8px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.ws-prof-rm { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-2); padding: 10px 12px; border-radius: 8px; background: rgba(255,90,78,.06); border: 1px solid rgba(255,90,78,.25); }
.ws-prof-rm span { flex: 1 1 100%; }
.ws-prof-rm button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg-2); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.ws-prof-rm button.danger { background: var(--hot); border-color: var(--hot); color: #fff; }

/* ── Ajuste da logo (LogoEditorModal em workspace.jsx) — modal branco, padrão dos modais do app ── */
.logo-ed-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(8,10,14,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: logoEdFade .16s ease; }
@keyframes logoEdFade { from { opacity: 0; } }
@keyframes logoEdPop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.logo-ed { width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; min-height: 0; background: var(--bg-elev, var(--card)); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.35); overflow: hidden; animation: logoEdPop .2s cubic-bezier(.2,.8,.2,1); }
.logo-ed-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.logo-ed-title { font-size: 16px; font-weight: 700; color: var(--fg); }
.logo-ed-sub { margin-top: 2px; font-size: 12px; color: var(--fg-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-ed-x { background: none; border: none; color: var(--fg-3); cursor: pointer; display: flex; padding: 6px; border-radius: 8px; flex-shrink: 0; }
.logo-ed-x:hover { background: var(--icon-btn-hover-bg); color: var(--fg); }
.logo-ed-body { padding: 16px 20px 6px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.logo-ed-load { display: flex; justify-content: center; padding: 60px 0; }
.logo-ed-stage { position: relative; flex-shrink: 0; overflow: hidden; height: 220px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; padding: 24px 28px 58px; transition: background-color .2s; }
.logo-ed-stage.checker { background-color: #fff; background-image: linear-gradient(45deg,#eef0f3 25%,transparent 25%,transparent 75%,#eef0f3 75%), linear-gradient(45deg,#eef0f3 25%,transparent 25%,transparent 75%,#eef0f3 75%); background-size: 18px 18px; background-position: 0 0, 9px 9px; }
.logo-ed-stage.light { background: #fff; }
.logo-ed-stage.dark { background: #16181d; }
/* imagem presa à área da prévia (qualquer tamanho/proporção cabe inteira) */
.logo-ed-stage img { position: absolute; top: 24px; left: 28px; width: calc(100% - 56px); height: calc(100% - 82px); object-fit: contain; display: block; }
.logo-ed-stage-tools { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(20,22,27,.8); backdrop-filter: blur(6px); }
.logo-ed-stage-tools button { display: flex; align-items: center; gap: 6px; padding: 5px 9px; border: none; border-radius: 7px; background: transparent; color: rgba(255,255,255,.7); font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.logo-ed-stage-tools button:hover { color: #fff; }
.logo-ed-stage-tools button.on { background: rgba(255,255,255,.16); color: #fff; }
.logo-ed-stage-tools .sw { width: 11px; height: 11px; border-radius: 3px; border: 1px solid rgba(255,255,255,.4); }
.logo-ed-stage-tools .sw.checker { background: conic-gradient(#fff 25%, #bbb 0 50%, #fff 0 75%, #bbb 0); background-size: 6px 6px; }
.logo-ed-stage-tools .sw.light { background: #fff; }
.logo-ed-stage-tools .sw.dark { background: #16181d; }
.logo-ed-dims { position: absolute; right: 12px; bottom: 15px; font-size: 11px; font-family: var(--mono); color: #8C9BAB; }
.logo-ed-stage.dark .logo-ed-dims { color: rgba(255,255,255,.45); }
.logo-ed-lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-4); margin-bottom: 8px; }
.logo-ed-form { height: 60px; padding: 0 18px; background: #fff; border: 1px solid #E4E8EF; border-radius: 8px; display: flex; align-items: center; gap: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.logo-ed-form .caixa { height: 20px; display: block; }
.logo-ed-form .div { width: 1px; height: 26px; background: #E4E8EF; }
.logo-ed-form .mine { margin-left: auto; max-height: 34px; max-width: 160px; object-fit: contain; display: block; }
.logo-ed-sec { display: flex; flex-direction: column; }
.logo-ed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-ed-seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--search-bg, rgba(127,127,127,.1)); border: 1px solid var(--line); }
.logo-ed-seg button { padding: 6px 16px; border: none; border-radius: 7px; background: transparent; color: var(--fg-3); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .14s, color .14s; }
.logo-ed-seg button.on { background: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(31,147,255,.35); }
.logo-ed-seg button:disabled { opacity: .4; cursor: default; }
.logo-ed-note { margin-top: 6px; font-size: 12px; color: var(--fg-4); line-height: 1.45; }
.logo-ed-tol { margin-top: 14px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--search-bg, transparent); font-size: 13px; font-weight: 600; color: var(--fg-2); }
.logo-ed-tol .v { min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; color: var(--accent); }
.logo-ed-tol input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 12px 0 2px; border-radius: 99px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--accent) 0 var(--p, 50%), var(--line-strong, rgba(127,127,127,.3)) var(--p, 50%) 100%); }
.logo-ed-tol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.logo-ed-tol input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.logo-ed-tol .logo-ed-note { font-weight: 400; }
.logo-ed-err { font-size: 12.5px; color: var(--hot, #ef4444); }
.logo-ed-actions { margin-top: 10px; padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.logo-ed-actions button { padding: 9px 18px; border-radius: 9px; border: none; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.logo-ed-actions button:hover:not(:disabled) { filter: brightness(1.08); }
.logo-ed-actions button.ghost { background: transparent; color: var(--fg-2); border: 1px solid var(--line); }
.logo-ed-actions button.ghost:hover:not(:disabled) { background: var(--icon-btn-hover-bg); filter: none; }
.logo-ed-actions button:disabled { opacity: .55; cursor: default; }
@media (max-width: 520px) { .logo-ed-stage { height: 180px; } .logo-ed-dims { display: none; } }

/* ============================================================================
   MODELO BERRY (codedthemes.gitbook.io/berry) — estrutura, não cores
   Header e sidebar originais do Horos. Do Berry: cards planos sem borda/sombra,
   abas sublinhadas, Roboto, raio 8px.
   ============================================================================ */

/* ── Conteúdo (header original do Horos por cima) ────────────────────────── */
.main { background: var(--bg); }
.content { padding: 20px; }
.app.density-compact .content { padding: 16px; }

/* Cabeçalho da página no formato do card de breadcrumb */
.page-head {
  align-items: center;
  background: var(--card-grad);
  border-radius: 8px;
  padding: 16px 24px;
  margin-bottom: 24px;
}
.page-title { font-size: 20px; font-weight: 600; letter-spacing: 0; }
.page-title .greeting { -webkit-text-fill-color: currentColor; background: none; }

/* ── Cards planos (MainCard) ─────────────────────────────────────────────── */
.kpi-grid, .main-grid { gap: 24px; margin-bottom: 24px; }
.kpi {
  padding: 24px;
  border-color: transparent;
  box-shadow: none;
  transition: box-shadow 200ms ease-in-out;
}
.kpi::before { display: none; }
.kpi:hover { transform: none; border-color: transparent; box-shadow: var(--card-hover-shadow); }
.kpi-label { font-size: 14px; font-weight: 500; }
.kpi-value { font-size: 34px; font-weight: 700; letter-spacing: 0; }

.panel, [data-theme="light"] .panel { border-color: transparent; box-shadow: none; }
.panel-head { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 18px; font-weight: 500; letter-spacing: 0; }

/* ── Abas sublinhadas (MUI Tabs) ─────────────────────────────────────────── */
.segment-tabs {
  padding: 0;
  gap: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.segment-tabs button {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0;
  min-height: 42px;
}
.segment-tabs button:active { transform: none; }
.segment-tabs button.active {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* ── Tabela ──────────────────────────────────────────────────────────────── */
.table thead th { font-size: 14px; font-weight: 500; color: var(--fg); text-transform: none; letter-spacing: 0; }

/* ── Embed (gaveta de Mensagens): sem moldura ────────────────────────────── */
html.embed-mode .app { background: var(--bg); }

/* ── Celular ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .content { padding: 16px; }
}

/* Horos 360 — etapa no funil (troca move o card no Kanban) */
.c360-stage { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.c360-stage-btn {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%;
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--segment-bg); color: var(--fg); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.c360-stage-btn:hover:not(:disabled) { border-color: var(--accent); }
.c360-stage-btn:disabled { cursor: default; opacity: .75; }
.c360-stage-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.c360-stage-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c360-stage-hint { font-size: 11px; font-weight: 500; color: var(--fg-4); }
.c360-stage-err { font-size: 11.5px; color: var(--hot); }
.c360-stage-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; width: min(300px, 100%);
  max-height: 280px; overflow-y: auto; padding: 4px; border-radius: 8px;
  background: var(--bg-elev); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.c360-stage-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px; border-radius: 6px;
  border: 0; background: none; color: var(--fg-2); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer;
}
.c360-stage-opt:hover { background: var(--icon-btn-hover-bg); color: var(--fg); }
.c360-stage-opt.on { color: var(--accent); font-weight: 600; }
.c360-stage-opt .c360-stage-name { flex: 1; }

/* Horos 360 — Resumo com a ficha completa (TabResumo em crm-drawer.jsx) */
.c360-sum-sec { display: flex; flex-direction: column; gap: 6px; }
.c360-sum-title { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); }
.c360-sum-empty { font-size: 12.5px; color: var(--fg-4); }
.c360-sum-empty a { color: var(--accent); }
.info-row.wide { grid-column: 1 / -1; }
.info-value { overflow-wrap: anywhere; }

/* ── Dashboard — painel de motivação (dashboard-motivation.jsx) ─────────── */
.mv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.mv-card { background: var(--card-grad); border-radius: var(--radius); padding: 20px 24px; min-width: 0; display: flex; flex-direction: column; gap: 12px; transition: box-shadow 200ms ease-in-out; }
.mv-card:hover { box-shadow: var(--card-hover-shadow); }
.mv-goal, .mv-self, .mv-coach { grid-column: span 2; }
.mv-stale { grid-column: 1 / -1; }
.mv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.mv-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--fg); }
.mv-ai-chip { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* recomendações numeradas do assistente */
.mv-steps { counter-reset: none; }
.mv-step { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
  color: var(--fg-2); border: 1.5px solid var(--line-strong); font-variant-numeric: tabular-nums; }
.mv-step.k-hot { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 55%, transparent); }
.mv-step.k-up  { color: var(--success); border-color: color-mix(in srgb, var(--success) 55%, transparent); }
.mv-step.k-warn { color: var(--warm); border-color: color-mix(in srgb, var(--warm) 55%, transparent); }
.mv-chip { font-size: 11.5px; font-weight: 500; color: var(--fg-3); background: var(--kbd-bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
.mv-chip.hot { color: var(--hot); background: var(--hot-soft); border-color: transparent; }
.mv-muted { margin: 0; font-size: 13px; color: var(--fg-3); line-height: 1.5; }
.mv-icon-btn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: none; background: transparent; color: var(--fg-3); cursor: pointer; }
.mv-icon-btn:hover { background: var(--icon-btn-hover-bg); color: var(--fg); }
.mv-link { font-size: 12.5px; font-weight: 500; color: var(--accent); text-decoration: none; }
.mv-link:hover { text-decoration: underline; }

/* frase de ritmo / status */
.mv-pace { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--fg-2); padding-left: 10px; border-left: 3px solid var(--line-strong); }
.mv-pace.tone-good { border-left-color: var(--success); }
.mv-pace.tone-bad  { border-left-color: var(--hot); }
.mv-pace.tone-warn { border-left-color: var(--warm); }

/* meta */
.mv-goal-nums { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mv-goal-cur { font-size: 40px; font-weight: 700; line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.mv-goal-of { font-size: 15px; color: var(--fg-3); }
.mv-goal-days { margin-left: auto; font-size: 12.5px; color: var(--fg-3); }
.mv-bar { position: relative; height: 10px; border-radius: 999px; background: var(--line-strong); margin: 6px 0 14px; }
.mv-bar-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; background: var(--accent); transition: width 600ms cubic-bezier(.2,.8,.2,1); }
.mv-goal.tone-good .mv-bar-fill { background: var(--success); }
.mv-goal.tone-bad .mv-bar-fill { background: var(--warm); }
.mv-bar-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--fg); border-radius: 2px; }
.mv-bar-mark span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; font-size: 10.5px; color: var(--fg-3); white-space: nowrap; }
.mv-goal-empty { display: flex; flex-direction: column; gap: 10px; }
.mv-big-q { font-size: 20px; font-weight: 600; color: var(--fg); line-height: 1.3; }
.mv-goal-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mv-goal-form input { width: 84px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--search-bg); color: var(--fg); font: inherit; font-size: 16px; font-weight: 600; }
.mv-goal-form input:focus { outline: none; border-color: var(--accent); }
.mv-goal-form > span { font-size: 13px; color: var(--fg-3); }
.mv-btn { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--fg-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.mv-btn:hover:not(:disabled) { color: var(--fg); border-color: var(--fg-4); }
.mv-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.mv-btn.primary:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }
.mv-btn:disabled { opacity: .5; cursor: default; }

/* ranking */
.mv-rank-mode { font-size: 12px; color: var(--fg-3); margin-top: -6px; }

/* assistente */
.mv-coach-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--fg-4); }
.mv-icon-btn:disabled { opacity: .5; cursor: default; }
.mv-spin { animation: mvSpin 0.9s linear infinite; }
@keyframes mvSpin { to { transform: rotate(360deg); } }
.mv-coach .mv-item-name, .mv-coach .mv-item-sub { white-space: normal; overflow: visible; }
.mv-coach .mv-item { align-items: flex-start; }
.mv-coach .mv-item-go { margin-top: 8px; }
.mv-coach-head { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--fg); }
.mv-coach-skel { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.mv-coach-skel i { display: block; height: 12px; border-radius: 6px; background: var(--line-strong); animation: mvPulse 1.2s ease-in-out infinite; }
.mv-coach-skel i:nth-child(1) { width: 90%; height: 16px; }
.mv-coach-skel i:nth-child(2) { width: 75%; }
.mv-coach-skel i:nth-child(3) { width: 82%; }
.mv-coach-skel i:nth-child(4) { width: 60%; }
@keyframes mvPulse { 50% { opacity: .45; } }
.mv-coach-err { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--fg-3); }
.mv-coach-ask { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--search-bg); }
.mv-coach-ask:focus-within { border-color: var(--accent); }
.mv-coach-ask input { flex: 1; min-width: 0; height: 30px; border: none; background: transparent; color: var(--fg); font: inherit; font-size: 13.5px; outline: none; }
.mv-coach-ask input::placeholder { color: var(--placeholder); }
.mv-coach-send { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border: none; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; }
.mv-coach-send:disabled { opacity: .35; cursor: default; }
/* assistente — conversa dentro do bloco */
.mv-chat { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.mv-chat-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; border: none; background: none; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.mv-chat-back:hover:not(:disabled) { text-decoration: underline; }
.mv-chat-back:disabled { opacity: .5; cursor: default; }
.mv-chat-thread { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
.mv-chat-q { align-self: flex-end; max-width: 85%; padding: 8px 12px; border-radius: 12px 12px 4px 12px; background: var(--accent); color: #fff; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.mv-chat-a { align-self: flex-start; max-width: 100%; padding: 10px 12px; border-radius: 12px 12px 12px 4px; background: var(--kbd-bg); border: 1px solid var(--line); color: var(--fg); font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.mv-chat-a p { margin: 0 0 8px; }
.mv-chat-a p:last-child, .mv-chat-a ul:last-child { margin-bottom: 0; }
.mv-chat-a ul { margin: 0 0 8px; padding-left: 18px; }
.mv-chat-a li { margin: 2px 0; }
.mv-chat-a li::marker { color: var(--accent); }
.mv-chat-a b { font-weight: 600; }
.mv-chat-a.err { color: var(--fg-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mv-chat-a.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.mv-chat-a.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); animation: mvDot 1.1s infinite ease-in-out; }
.mv-chat-a.typing span:nth-child(2) { animation-delay: .15s; }
.mv-chat-a.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mvDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .mv-spin, .mv-coach-skel i, .mv-chat-a.typing span { animation: none; } }

/* você vs mês passado */
.mv-self-rows { display: flex; flex-direction: column; gap: 8px; }
.mv-self-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: baseline; gap: 8px; font-size: 13px; }
.mv-self-lbl { color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-self-cur { font-size: 16px; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.mv-self-prev { font-size: 11.5px; color: var(--fg-4); white-space: nowrap; }
.mv-delta { display: inline-flex; align-items: center; gap: 2px; min-width: 44px; justify-content: flex-end; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mv-delta.up { color: var(--success); }
.mv-delta.down { color: var(--hot); }
.mv-delta.eq { color: var(--fg-4); font-weight: 500; }

/* listas (o que fazer agora / leads esquecidos) */
.mv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mv-item { display: flex; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; width: calc(100% + 16px); border: none; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mv-item:hover { background: var(--icon-btn-hover-bg); }
.mv-item:hover .mv-item-go { color: var(--accent); transform: translateX(2px); }
.mv-item-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; background: var(--kbd-bg); color: var(--fg-3); }
.mv-item-ico.k-reply  { background: var(--cold-soft); color: var(--accent); }
.mv-item-ico.k-credit { background: var(--success-soft); color: var(--success); }
.mv-item-ico.k-hot    { background: var(--hot-soft); color: var(--hot); }
.mv-item-ico.k-docs   { background: var(--warm-soft); color: var(--warm); }
.mv-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mv-item-name { font-size: 13.5px; font-weight: 500; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-item-sub { font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-item-go { color: var(--fg-4); flex-shrink: 0; transition: transform 150ms ease, color 150ms ease; }
.mv-temp { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--fg-4); margin: 0 4px; }
.mv-temp.t-hot { background: var(--hot); }
.mv-temp.t-warm { background: var(--warm); }
.mv-temp.t-cold { background: var(--cold); }
.mv-days { font-size: 12px; font-weight: 600; color: var(--hot); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.mv-stale-sum { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mv-stale-sum b { font-size: 32px; font-weight: 700; line-height: 1; color: var(--fg); }
.mv-stale-sum span { font-size: 13px; color: var(--fg-3); }
.mv-stale-sum strong { color: var(--warm); font-weight: 600; }
.mv-stale-sum em { color: var(--hot); font-style: normal; font-weight: 600; }
.mv-empty { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 8px; background: var(--success-soft); color: var(--fg-2); font-size: 13px; line-height: 1.45; }
.mv-empty .ico { color: var(--success); flex-shrink: 0; }

/* carregando */
.mv-skel { min-height: 150px; position: relative; overflow: hidden; }
.mv-skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--line), transparent); animation: mvShimmer 1.4s infinite; }
@keyframes mvShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .mv-skel::after { animation: none; } .mv-bar-fill { transition: none; } }

/* funil da meta (100 leads = 1 venda) */
.mv-funnel { grid-column: 1 / -1; }
.mv-funnel-base { font-size: 12px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-pace b { color: var(--fg); font-weight: 600; }
.mv-funnel-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.mv-fs { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); min-width: 0; }
.mv-fs-label { font-size: 12px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-fs-nums { display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.mv-fs-nums b { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--fg); }
.mv-fs-nums span { font-size: 13px; color: var(--fg-3); }
.mv-fs-bar { position: relative; height: 6px; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
.mv-fs-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: color-mix(in srgb, var(--accent) var(--fs-mix, 100%), var(--bg)); transition: width 600ms cubic-bezier(.2,.8,.2,1); }
.mv-fs-left { font-size: 11.5px; color: var(--fg-4); }
.mv-fs.ok .mv-fs-left { color: var(--success); }
.mv-fs.ok .mv-fs-bar > span { background: var(--success); }
@media (prefers-reduced-motion: reduce) { .mv-fs-bar > span { transition: none; } }

@media (max-width: 1200px) {
  .mv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mv-funnel-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mv-funnel-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 640px) {
  .mv-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
  .mv-goal, .mv-self, .mv-coach, .mv-stale { grid-column: auto; }
  .mv-card { padding: 16px; }
  .mv-goal-cur { font-size: 34px; }
}

/* ── Mapa de horários "skyline" (HorosHeatmap em data.jsx) ─────────────────── */
.hsky .panel-actions { display: flex; align-items: center; gap: 10px; }
.hsky-body { padding: 16px 24px 14px; }
.hsky-stage-wrap { position: relative; }
.hsky-stage { position: relative; width: 100%; height: 220px; overflow: hidden; border-radius: 8px; }
.hsky-stage:has(canvas:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.hsky-canvas { position: absolute; top: 0; left: 0; display: block; outline: none; max-width: none; }
.hsky-toggle { position: relative; display: inline-flex; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; }
.hsky-toggle-thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: 30px; border-radius: 6px; background: var(--accent); transition: transform 500ms cubic-bezier(0.65, 0, 0.35, 1); }
.hsky-toggle-thumb.r { transform: translateX(100%); }
.hsky-toggle button { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--fg-3); cursor: pointer; transition: color 400ms ease; }
.hsky-toggle button.on { color: #fff; }
.hsky-toggle button:not(.on):hover { color: var(--fg); }
.hsky-toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hsky-corner { position: absolute; display: flex; flex-direction: column; gap: 18px; pointer-events: none; opacity: 0; transition: opacity 300ms cubic-bezier(0.65, 0, 0.35, 1), transform 300ms cubic-bezier(0.65, 0, 0.35, 1); }
.hsky-corner.tr { top: 4px; right: 4px; align-items: flex-end; transform: translateY(-10px); }
.hsky-corner.bl { bottom: 4px; left: 4px; align-items: flex-start; transform: translateY(10px); }
.hsky-corner.on { opacity: 1; transform: none; transition-duration: 600ms; transition-delay: 720ms; }
.hsky-corner.bl.on { transition-delay: 850ms; }

.hsky-stat { min-width: 0; }
.hsky-stat-lbl { font-size: 12.5px; color: var(--fg-3); line-height: 1.2; }
.hsky-stat-main { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.hsky-stat-val { font-weight: 600; color: var(--accent); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hsky-stat-unit { font-size: 14px; color: var(--fg); }
.hsky-stat-sub { margin-top: 3px; font-size: 12px; color: var(--fg-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsky-stat.end { text-align: right; }
.hsky-stat.end .hsky-stat-main { justify-content: flex-end; }

.hsky-stats-row { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 1300ms cubic-bezier(0.65, 0, 0.35, 1), opacity 1300ms cubic-bezier(0.65, 0, 0.35, 1); }
.hsky-stats-row.on { grid-template-rows: 1fr; opacity: 1; }
.hsky-stats-inner { min-height: 0; overflow: hidden; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hsky-stats-row.on .hsky-stats-inner { padding-top: 16px; }

.hsky-tip { position: absolute; top: 0; left: 0; z-index: 20; white-space: nowrap; pointer-events: none; padding: 7px 10px; border-radius: 8px; font-size: 12px; line-height: 1; background: var(--fg); color: var(--bg); box-shadow: 0 6px 18px rgba(0,0,0,0.25); opacity: 0; transition: opacity 150ms ease; }
.hsky-tip.on { opacity: 1; }
.hsky-tip strong { font-weight: 600; }
.hsky-tip span:not(.hsky-tip-arrow) { opacity: 0.75; }
.hsky-tip-arrow { position: absolute; top: 100%; left: var(--arrow, 50%); margin-left: -5px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid var(--fg); }

.hsky-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-4); }
.hsky-hints { position: relative; display: grid; flex: 1; min-width: 0; }
.hsky-hints > span { grid-area: 1 / 1; opacity: 0; transition: opacity 500ms ease; }
.hsky-hints > span.on { opacity: 1; }
.hsky-legend { display: flex; align-items: center; gap: 6px; }
.hsky-swatch { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 3px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(127,127,127,0.14); transition: transform 200ms ease, background-color 500ms ease; }
.hsky-swatch:hover, .hsky-swatch[aria-pressed="true"] { transform: scale(1.25); }
.hsky-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hsky-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
@media (max-width: 720px) {
  .hsky-body { padding: 12px 16px; }
  .hsky-stats-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .hsky-toggle-thumb, .hsky-corner, .hsky-stats-row, .hsky-hints > span, .hsky-swatch { transition: none; }
}

/* ── Ranking: pódio + lista paginada (LeaderboardCard em data.jsx) ───────── */
.lb-card {
  --lb-gold: var(--warm); --lb-silver: #a9b2bf; --lb-bronze: #cd8a4f;
  background: var(--card-grad); border-radius: var(--radius); padding: 20px 24px; min-width: 0;
  display: flex; flex-direction: column; gap: 14px; transition: box-shadow 200ms ease-in-out;
}
.lb-card:hover { box-shadow: var(--card-hover-shadow); }
[data-theme="light"] .lb-card { --lb-silver: #8b95a3; --lb-bronze: #b8743a; }
.lb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lb-head-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lb-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--fg); }
.lb-badge { font-size: 11.5px; font-weight: 500; color: var(--fg-3); background: var(--kbd-bg); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.lb-range { margin: 0; font-size: 12.5px; color: var(--fg-3); }
.lb-select { flex-shrink: 0; max-width: 50%; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--search-bg); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; }
.lb-select:focus-visible { outline: none; border-color: var(--accent); }
/* lista de opções do seletor segue o tema: escuro com letras claras · claro com letras escuras */
.lb-select { color-scheme: dark; }
.lb-select option { background-color: var(--card); color: var(--fg); }
[data-theme="light"] .lb-select { color-scheme: light; }
.lb-zero { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--kbd-bg); border: 1px dashed var(--line-strong); font-size: 12.5px; color: var(--fg-3); text-align: center; }
.lb-empty { margin: 0; padding: 20px 0; text-align: center; font-size: 13px; color: var(--fg-4); }

/* pódio */
.lb-podium { list-style: none; width: 100%; max-width: 440px; margin: 4px auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; }
.lb-pod { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lb-pod-who { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; width: 100%; padding-bottom: 8px; }
.lb-pod-ring { position: relative; display: grid; place-items: center; border-radius: 50%; padding: 3px; background: var(--lb-c, var(--line-strong)); }
.lb-pod-ring .lb-avatar { box-shadow: 0 0 0 2px var(--bg-elev); }
.lb-pod-crown { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); color: var(--lb-gold); line-height: 0; }
.lb-pod-name { max-width: 100%; font-size: 13px; font-weight: 600; color: var(--fg); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.lb-pod-val { font-size: 12.5px; font-weight: 600; color: var(--fg-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-pod-val small { font-size: 11px; font-weight: 400; color: var(--fg-3); }
.lb-pod-step { width: 100%; display: grid; place-items: start center; padding-top: 8px; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--lb-c) 22%, transparent), color-mix(in srgb, var(--lb-c) 4%, transparent));
  border-top: 2px solid var(--lb-c); }
.lb-pod-step span { font-size: 18px; font-weight: 700; color: var(--lb-c); font-variant-numeric: tabular-nums; }
.lb-pod-1 { --lb-c: var(--lb-gold); }
.lb-pod-2 { --lb-c: var(--lb-silver); }
.lb-pod-3 { --lb-c: var(--lb-bronze); }
.lb-pod-1 .lb-pod-step { height: 64px; }
.lb-pod-2 .lb-pod-step { height: 46px; }
.lb-pod-3 .lb-pod-step { height: 34px; }
.lb-pod-1 .lb-pod-who { padding-top: 18px; }
.lb-pod.me .lb-pod-name { color: var(--accent); }
.lb-pod-empty { align-self: stretch; }

/* lista */
.lb-rankings { display: flex; flex-direction: column; gap: 4px; }
.lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; border: 1px solid transparent; transition: background 140ms; }
.lb-row:hover { background: var(--table-row-hover); }
.lb-row.me { background: var(--kcol-drag-bg); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.lb-row-pos { width: 26px; flex-shrink: 0; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.lb-row-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-row-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 500; color: var(--fg); }
.lb-row-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row.me .lb-row-name { font-weight: 600; }
.lb-you { flex-shrink: 0; font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); border-radius: 4px; padding: 1px 6px; }
.lb-row-by { font-size: 11.5px; color: var(--fg-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row-val { flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-row-val small { font-size: 11px; font-weight: 400; color: var(--fg-3); }
.lb-gap { text-align: center; font-size: 12px; line-height: 1; color: var(--fg-4); letter-spacing: 3px; padding: 2px 0; }
.lb-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
.lb-pager-info { font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.lb-pager-btns { display: flex; gap: 4px; }
.lb-pager-btn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--fg-2); cursor: pointer; }
.lb-pager-btn:hover:not(:disabled) { color: var(--fg); background: var(--icon-btn-hover-bg); }
.lb-pager-btn:disabled { opacity: .4; cursor: default; }

/* avatar */
.lb-avatar { display: block; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lb-avatar-ini { display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--lb-av, var(--accent)); }

/* Ranking do Dashboard ocupa 2 colunas, ao lado do Assistente */
.mv-grid > .mv-rank { grid-column: span 2; }
/* Plano individual (Pro/Max): sem ranking → Assistente na largura toda */
html.horos-solo .mv-grid > .mv-coach { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .lb-card { padding: 16px; }
  .mv-grid > .mv-rank { grid-column: auto; }
  .lb-pod-1 .lb-pod-step { height: 52px; }
}

/* ============================================================================
   VISUAL RANKING/MAPA — linguagem do ranking (LeaderboardCard) e do mapa de
   horários aplicada ao app inteiro (pedido do usuário, 2026-10-02).
   html.hx é ligado por horos-ui.js (só nas telas do app, não nas de login).
   ============================================================================ */

/* ── 1. Cards e cabeçalhos: como o card do ranking ───────────────────────── */
.panel { background: var(--card-grad); transition: box-shadow 200ms ease-in-out; }
.panel:hover { box-shadow: var(--card-hover-shadow); }
.panel-head { padding: 20px 24px 8px; border-bottom: 0; }
.panel-title { font-size: 15px; font-weight: 600; }
.panel-title .count {
  font-size: 11.5px; font-weight: 500; color: var(--fg-3); background: var(--kbd-bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}
.panel-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--fg-3); }

/* ── 2a. Seletores: lista de opções segue o tema; selects sem estilo próprio ganham o visual do ranking ── */
html.hx select { color-scheme: dark; }
html.hx[data-theme="light"] select { color-scheme: light; }
html.hx select option, html.hx select optgroup { background-color: var(--card); color: var(--fg); }
html.hx select:not([class]):not([style]):not([multiple]):not([size]) {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--search-bg); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer;
}
html.hx select:not([class]):not([style]):focus-visible { outline: none; border-color: var(--accent); }

/* ── 2b. Abas e filtros segmentados: pílula azul que desliza (como o 2D/3D) ── */
html.hx .hx-seg { position: relative; isolation: isolate; }
html.hx .hx-seg > :not(.hx-seg-thumb) { position: relative; z-index: 1; }
html.hx .hx-seg > button {
  background: transparent !important; box-shadow: none !important; border-color: transparent !important;
  transition: color 400ms ease, transform 120ms var(--ease-spring, ease);
}
html.hx .hx-seg > button:not(.active):not(.on):hover { color: var(--fg); }
html.hx .hx-seg > button.active, html.hx .hx-seg > button.on,
html.hx .hx-seg > button[aria-pressed="true"], html.hx .hx-seg > button[aria-selected="true"] { color: #fff !important; }
html.hx .hx-seg > button.active .filter-dot { box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.hx-seg-thumb {
  position: absolute; top: 0; left: 0; z-index: 0; width: 0; height: 0; opacity: 0; pointer-events: none;
  border-radius: 6px; background: var(--accent);
  transition: transform 500ms cubic-bezier(0.65, 0, 0.35, 1), width 500ms cubic-bezier(0.65, 0, 0.35, 1),
              height 500ms cubic-bezier(0.65, 0, 0.35, 1), opacity 200ms ease;
}
/* filtros de período/categoria viram um controle único, como o 2D/3D */
html.hx .filter-pills.hx-seg { gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--segment-bg); width: fit-content; max-width: 100%; }
html.hx .filter-pills.hx-seg .filter-pill { border: 0; border-radius: 6px; padding: 6px 11px; }
html.hx .rep-mini-tabs .hx-seg-thumb, html.hx .ag-view-tabs .hx-seg-thumb { border-radius: 5px; }
html.hx .bc-seg .hx-seg-thumb { border-radius: 7px; }
html.hx .hn-nc-filters.hx-seg .hx-seg-thumb { border-radius: 20px; }

/* ── 3. Tabelas: linhas como a lista do ranking ──────────────────────────── */
.table thead th { font-size: 12.5px; font-weight: 500; color: var(--fg-3); }
.table tbody td { font-variant-numeric: tabular-nums; }
.table tbody tr { transition: background 140ms ease; }

/* ── 4a. Números de destaque: azul, como as estatísticas do mapa ─────────── */
.kpi-value, .hero-stat-value, .ag-day-stat-value {
  color: var(--accent); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}

/* ── 4b. Rodapés de card: linha + texto discreto, como o do mapa ─────────── */
.panel-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 0 24px; padding: 12px 0 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-4);
}
.kpi-foot { border-top: 1px solid var(--line); padding-top: 12px; }

/* ── 4c. Balão de dica (horos-ui.js troca a dica nativa do title) ────────── */
.hx-tip {
  position: fixed; top: 0; left: 0; z-index: 100000; max-width: min(320px, calc(100vw - 16px));
  padding: 7px 10px; border-radius: 8px; font-size: 12px; line-height: 1.35; white-space: normal;
  background: var(--fg); color: var(--bg); box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  pointer-events: none; opacity: 0; transition: opacity 150ms ease;
}
.hx-tip.on { opacity: 1; }
.hx-tip-arrow {
  position: absolute; top: 100%; left: var(--arrow, 50%); margin-left: -5px; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid var(--fg);
}
.hx-tip.below .hx-tip-arrow { top: auto; bottom: 100%; border-top: 0; border-bottom: 5px solid var(--fg); }

@media (prefers-reduced-motion: reduce) {
  .hx-seg-thumb, .hx-tip, html.hx .hx-seg > button { transition: none; }
}

/* ── Ficha do cliente na metade da tela (horosOpenLeadSheet em data.jsx — todas as telas) ──────────────── */
.cli-sheet-overlay {
  position: fixed; inset: 0; z-index: 9500; background: rgba(0,0,0,0.45); backdrop-filter: blur(2px);
  animation: cli-sheet-fade .18s ease;
}
.cli-sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9501;
  width: 52%; min-width: min(560px, 100vw);
  display: flex; flex-direction: column; background: var(--bg);
  box-shadow: -12px 0 40px rgba(0,0,0,0.3);
  animation: cli-sheet-in .22s cubic-bezier(0.32, 0.72, 0, 1);
}
.cli-sheet-frame { flex: 1; width: 100%; border: none; display: block; }
.cli-sheet-tools { position: absolute; top: 14px; left: -46px; display: flex; flex-direction: column; gap: 8px; }
.cli-sheet-btn {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); color: var(--fg-3); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); text-decoration: none;
}
.cli-sheet-btn:hover { color: var(--fg); }
@media (max-width: 700px) {
  .cli-sheet { width: 100%; min-width: 0; }
  .cli-sheet-tools { left: auto; right: 12px; top: auto; bottom: 16px; flex-direction: row; z-index: 1; }
}
@keyframes cli-sheet-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cli-sheet-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* ============================================================
   KANBAN — visual "kanban-board" (2026-10-03, pedido do usuário)
   Colunas em fundo neutro suave (raio 16), card branco/escuro com borda fina,
   chips no topo, título + nota, divisória e rodapé (dias na etapa · anel do funil · avatar).
   Etiquetas do WhatsApp, documentos e etapa por corretor continuam no card. Vale nos dois Kanbans.
   ============================================================ */
.crm-kcol {
  width: 286px; padding: 12px; border: 0; border-radius: 16px;
  background: color-mix(in srgb, var(--fg) 4%, transparent);
  transition: background .2s ease;
}
.crm-kcol.drag-over { background: color-mix(in srgb, var(--fg) 8%, transparent); border: 0; box-shadow: none; }
.app.density-compact .crm-kcol { width: 264px; }
.crm-kcol .kcol-head { gap: 8px; padding: 0 4px; margin-bottom: 2px; }
.crm-kcol .kcol-dot { width: 8px; height: 8px; box-shadow: none; flex-shrink: 0; }
.crm-kcol .kcol-title { font-size: 13px; font-weight: 500; color: var(--fg); letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-kcol .kcol-count {
  display: inline-grid; place-items: center; height: 18px; min-width: 18px; padding: 0 5px; border-radius: 6px;
  background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--fg-3);
  font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.crm-kcol .kcol-sub { border-bottom: 0; padding: 4px 4px 0; margin-bottom: 12px; }
.crm-kcol .kcol-sub .kcol-total { font-size: 12px; font-weight: 500; color: var(--fg-2); }
.crm-kcol .kcol-body { gap: 8px; }
.crm-kcol .kcol-empty { border-radius: 12px; }

/* Card */
.crm-lead.kbx-card {
  padding: 12px; border-radius: 12px; overflow: visible;
  background: var(--card); border: 1px solid color-mix(in srgb, var(--fg) 8%, transparent);
  box-shadow: 0 1px 2px rgb(0 0 0 / .05);
  transition: transform .2s cubic-bezier(.2,.8,.3,1), box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
}
[data-theme="light"] .crm-lead.kbx-card { box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.crm-lead.kbx-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--fg) 14%, transparent); box-shadow: 0 4px 12px -6px rgb(0 0 0 / .18); }
.crm-lead.kbx-card.dragging { opacity: .4; transform: scale(.98); box-shadow: none; }
.crm-lead.kbx-card.kb-selectable { padding-left: 38px; }
.crm-lead.kbx-card.kb-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.crm-lead.kbx-card .kb-check { top: 13px; }

.kbx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 0; }
.kbx-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px;
  font-size: 11px; line-height: 1; font-weight: 400; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--fg-2);
}
.kbx-chip svg { flex-shrink: 0; color: var(--fg-3); }
.kbx-temp { font-weight: 500; }
.kbx-temp.t-hot  { background: color-mix(in srgb, var(--hot) 12%, transparent);  color: var(--hot); }
.kbx-temp.t-warm { background: color-mix(in srgb, var(--warm) 14%, transparent); color: color-mix(in srgb, var(--warm) 80%, var(--fg)); }
.kbx-temp.t-cold { background: color-mix(in srgb, var(--cold, #59c8ff) 14%, transparent); color: color-mix(in srgb, var(--cold, #59c8ff) 75%, var(--fg)); }
.kbx-temp svg { color: currentColor; }
.kbx-score { font-variant-numeric: tabular-nums; }

.kbx-title { margin: 10px 0 0; font-size: 14px; font-weight: 500; line-height: 1.35; letter-spacing: -0.005em; color: var(--fg); overflow-wrap: anywhere; }
.kbx-note { margin: 4px 0 0; font-size: 12px; line-height: 1.35; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.kbx-card .crm-lead-tags { margin-top: 8px; }
.kbx-card .kbwa-row { margin-top: 10px; }
.kbx-card .lead-stages, .kbx-card .lead-stages-prev { margin-top: 10px; }

.kbx-div { height: 1px; margin-top: 12px; background: color-mix(in srgb, var(--fg) 8%, transparent); }
.kbx-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; min-height: 22px; }
.kbx-foot-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kbx-due { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kbx-due.soon { color: color-mix(in srgb, var(--warm) 85%, var(--fg)); }
.kbx-due.late { color: var(--hot); }
.kbx-ring { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.kbx-ring svg { transform: rotate(-90deg); }
.kbx-ring-bg { stroke: color-mix(in srgb, var(--fg) 12%, transparent); }
.kbx-ring-fg { stroke: var(--accent); transition: stroke-dashoffset .5s cubic-bezier(.2,.8,.3,1); }
.kbx-ring.done .kbx-ring-fg { stroke: var(--success, #34d399); }
.kbx-avatar {
  width: 22px; height: 22px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--card); background: color-mix(in srgb, var(--fg) 14%, var(--card));
  color: var(--fg-2); font-size: 9.5px; font-weight: 600;
}
.kbx-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kbx-card .crm-assign-btn { width: 24px; height: 24px; border-radius: 50%; }
.kbx-card .crm-assign-avatar { width: 22px; height: 22px; font-size: 9.5px; }

/* Ações do card (Dashboard): quietas até passar o mouse */
.kbx-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; z-index: 3; }
.kbx-act {
  height: 24px; min-width: 24px; padding: 0 6px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); background: var(--card); color: var(--fg-3);
  font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.kbx-act:hover { background: var(--bg-2); color: var(--fg); }
.kbx-act.danger { background: var(--hot); border-color: var(--hot); color: #fff; padding: 0 8px; }

/* Voltar / Avançar (CRM) — discretos */
.kbx-card .crm-lead-nav { margin-top: 10px; }
.kbx-card .crm-nav-btn { height: 26px; border-radius: 8px; border-color: color-mix(in srgb, var(--fg) 9%, transparent); font-size: 11px; }
.kbx-card .crm-nav-btn.fwd:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); border-color: var(--accent); }

/* Onde o card vai cair (arrastando de outra coluna) */
.kbx-ph {
  height: 96px; border-radius: 12px; transform-origin: top;
  border: 1px dashed color-mix(in srgb, var(--fg) 24%, transparent); background: color-mix(in srgb, var(--fg) 2%, transparent);
  animation: kbxPh .28s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes kbxPh { from { opacity: 0; transform: scaleY(.7); } to { opacity: 1; transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .kbx-ph { animation: none; } .crm-lead.kbx-card:hover { transform: none; } }

/* Arrastar (framer-motion): card no ar + página sem seleção de texto */
.kbx-float { position: fixed; left: 0; top: 0; z-index: 1500; pointer-events: none; transform-origin: top left; }
.crm-lead.kbx-card.kbx-floating, [data-theme="light"] .crm-lead.kbx-card.kbx-floating {
  box-shadow: 0 16px 32px -12px rgb(0 0 0 / .28); border-color: color-mix(in srgb, var(--fg) 12%, transparent); transform: none; cursor: grabbing;
}
.kbx-floating .kbwa-row, .kbx-floating .crm-lead-nav { display: none; }
body.kb-dragging, body.kb-dragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.crm-lead.kbx-card { cursor: grab; }
.crm-lead.kbx-card.kb-selectable { cursor: pointer; }
.kbx-ph { animation: none; }

/* ============================================================
   KANBAN — restante no design system (Relatórios), 2026-10-03
   Coluna vazia, paginação, busca da coluna, documentos, etapa por corretor,
   etiquetas do WhatsApp e menu de responsável: neutros, uma cor de destaque, raio 7–12.
   ============================================================ */
.crm-kcol .kcol-empty {
  padding: 18px 12px; border-radius: 12px; font-size: 12px; color: var(--fg-4);
  border: 1px dashed color-mix(in srgb, var(--fg) 16%, transparent); background: transparent;
}

/* Paginação da coluna */
.kbx-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 0 2px; font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.kbx-pager b { color: var(--fg); font-weight: 600; }
.kbx-pager button {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); background: var(--card); color: var(--fg-2);
  transition: background .15s, color .15s, border-color .15s;
}
.kbx-pager button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.kbx-pager button:disabled { opacity: .35; cursor: not-allowed; }

/* Busca da coluna */
.crm-kcol .kcol-search { height: 34px; margin: 6px 0 10px; border-radius: 10px; border-color: color-mix(in srgb, var(--fg) 12%, transparent); background: var(--card); }
.crm-kcol .kcol-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.crm-kcol .kcol-search-n { font-weight: 600; }
.crm-kcol .kcol-search-btn { width: 24px; height: 24px; border-radius: 7px; }

/* Documentos (Aguardando docs) */
.kbx-card .crm-doc-strip, [data-theme="light"] .kbx-card .crm-doc-strip {
  margin-top: 10px; padding: 10px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--fg) 4%, transparent);
}
.kbx-card .crm-doc-strip-head { margin-bottom: 8px; }
.kbx-card .crm-doc-strip-title { font-size: 11.5px; font-weight: 500; color: var(--fg-3); text-transform: none; letter-spacing: 0; }
.kbx-card .crm-doc-strip-count { font-family: inherit; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--warm) 85%, var(--fg)); }
.kbx-card .crm-doc-strip-count.done { color: var(--success, #34d399); }
.kbx-card .crm-doc-strip-items { gap: 4px; }
.kbx-card .crm-doc-pill, [data-theme="light"] .kbx-card .crm-doc-pill {
  height: 20px; padding: 0 7px 0 6px; gap: 4px; border-radius: 6px; border: 0; font-size: 10.5px; font-weight: 400;
  background: var(--card); color: var(--fg-3);
}
.kbx-card .crm-doc-pill.ok, [data-theme="light"] .kbx-card .crm-doc-pill.ok { background: var(--card); color: var(--success, #34d399); font-weight: 500; }
.kbx-card .crm-doc-dot { width: 5px; height: 5px; background: color-mix(in srgb, var(--fg) 25%, transparent); }

/* Etapa por corretor (rodízio) */
.kbx-card .lead-stages { padding: 10px; gap: 4px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--fg) 4%, transparent); }
.kbx-card .lead-stages-head { font-size: 11.5px; font-weight: 500; color: var(--fg-3); text-transform: none; letter-spacing: 0; margin-bottom: 2px; }
.kbx-card .lead-stages-row { font-size: 12px; }
.kbx-card .lead-stages-prev {
  height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 500;
  background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--fg-2);
}

/* Etiquetas do WhatsApp — a cor vem da etiqueta (dado do WhatsApp), o chip segue o padrão */
.kbx-card .kbwa-row { gap: 6px; }
.kbx-card .kbwa-chip {
  height: 22px; padding: 0 8px; border: 0; border-radius: 7px; max-width: 160px; line-height: 22px;
  font-size: 11px; font-weight: 500; color: var(--lc); background: color-mix(in srgb, var(--lc) 13%, transparent);
}
.kbx-card .kbwa-add {
  height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 500; gap: 4px;
  border: 1px dashed color-mix(in srgb, var(--fg) 18%, transparent); color: var(--fg-3);
}
.kbx-card .kbwa-add:hover, .kbx-card .kbwa-add.on { color: var(--accent); border-color: var(--accent); background: transparent; }
.kbwa-pop { border-color: var(--line); box-shadow: var(--shadow-lg); padding-bottom: 2px; }
.kbwa-pop-title { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--fg-2); padding: 12px 12px 8px; }
.kbwa-pop-item { border-radius: 6px; }
.kbwa-pop-item:hover:not(:disabled) { background: var(--bg-2); }

/* Menu de responsável (CRM): segue o tema */
.crm-assign-popup { background: var(--card); border-color: var(--line); color: var(--fg); box-shadow: var(--shadow-lg); border-radius: 8px; }
.crm-assign-popup-title { font-size: 12px; font-weight: 600; color: var(--fg-2); text-transform: none; letter-spacing: 0; padding: 4px 7px 8px; }
.crm-assign-member { border-radius: 6px; padding: 6px 8px; }
.crm-assign-member:hover { background: var(--bg-2); }
.crm-assign-name { color: var(--fg); font-size: 12.5px; }
.crm-assign-member .crm-assign-avatar.sm, .crm-assign-avatar {
  background: color-mix(in srgb, var(--fg) 14%, var(--card)) !important; color: var(--fg-2);
}
.kbx-card .crm-assign-btn { border: 1px dashed color-mix(in srgb, var(--fg) 20%, transparent); color: var(--fg-3); }
.kbx-card .crm-assign-btn.assigned { border: 0; padding: 0; }
.kbx-card .crm-assign-btn:hover { color: var(--accent); border-color: var(--accent); }
.kbwa-chip { color: var(--lc, var(--fg-2)); border-color: color-mix(in srgb, var(--lc, var(--fg)) 35%, transparent); background: color-mix(in srgb, var(--lc, var(--fg)) 10%, transparent); }

/* Card do Kanban: dados do lead (telefone, e-mail, região, entrada) — pedido do usuário 2026-10-03 */
.kbx-info { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.kbx-info li { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; line-height: 1.35; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.kbx-info li svg { flex-shrink: 0; color: var(--fg-4); }
.kbx-info li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbx-info li i { font-style: normal; color: var(--fg-4); }
.kbx-money { color: var(--fg); font-weight: 600; }

/* ── Disparo em Massa — assistente com passos na lateral (BcWizard, layout da imagem do usuário 2026-10-03) ── */
.bc-overlay .bc-box:has(.bcw) { width: min(1180px, 96vw); height: min(820px, 94vh); }
.bc-head .bc-head-icon { width: 40px; height: 40px; }
.bc-body.flush { padding: 0; overflow: hidden; display: flex; }
.bcw { flex: 1; min-height: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.bcw-steps { grid-row: 1; padding: 20px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; position: relative; overflow-y: auto; }
.bcw-step {
  position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer;
}
.bcw-step:not(:last-child)::after { content: ""; position: absolute; left: 27px; top: 46px; bottom: -14px; width: 1.5px; background: var(--line-strong); }
.bcw-step.done:not(:last-child)::after { background: color-mix(in srgb, var(--accent) 60%, transparent); }
.bcw-step:hover { background: var(--bg-2); }
.bcw-step.on { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.bcw-step-n {
  position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: var(--fg-2); background: var(--card); border: 1.5px solid var(--line-strong);
}
.bcw-step.on .bcw-step-n { background: var(--accent); border-color: var(--accent); color: #fff; }
.bcw-step.done .bcw-step-n { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.bcw-step-txt { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.bcw-step-txt b { font-size: 14px; font-weight: 600; }
.bcw-step.on .bcw-step-txt b { color: var(--accent); }
.bcw-step-txt small { font-size: 12px; color: var(--fg-3); }
.bcw-main { grid-row: 1; min-width: 0; overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 10px; }
.bcw-h h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.bcw-h p { margin: 4px 0 8px; font-size: 13.5px; color: var(--fg-3); }
.bcw-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bcw-src {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px; border-radius: 8px; border: 1.5px solid var(--line-strong);
  background: var(--card); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s;
}
.bcw-src:hover { border-color: var(--fg-4); }
.bcw-src.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.bcw-src-ico { color: var(--fg-3); flex-shrink: 0; display: grid; }
.bcw-src.on .bcw-src-ico { color: var(--accent); }
.bcw-src-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.bcw-src-txt b { font-size: 14px; font-weight: 600; }
.bcw-src-txt small { font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcw-src-n { flex-shrink: 0; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); font-variant-numeric: tabular-nums; }
.bcw-card { margin-top: 6px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-1); display: flex; flex-direction: column; gap: 12px; }
.bcw-card-h { font-size: 16px; font-weight: 600; }
.bcw-search { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); color: var(--fg-3); }
.bcw-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.bcw-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 13.5px; }
.bcw-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: bcwSpin .7s linear infinite; }
@keyframes bcwSpin { to { transform: rotate(360deg); } }
.bcw-results { margin-top: -4px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); max-height: 240px; overflow-y: auto; padding: 4px; }
.bcw-res, .bcw-add-all {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto 26px; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--fg); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.bcw-add-all { display: flex; color: var(--accent); font-weight: 600; font-size: 12.5px; }
.bcw-res:hover, .bcw-add-all:hover { background: var(--bg-2); }
.bcw-res-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bcw-res-phone { color: var(--fg-3); font-variant-numeric: tabular-nums; }
.bcw-res-kind { font-size: 11px; color: var(--fg-4); }
.bcw-res-act { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--fg-3); border: 1px solid var(--line-strong); }
.bcw-res.in .bcw-res-act { background: var(--accent); border-color: var(--accent); color: #fff; }
.bcw-empty { padding: 14px; text-align: center; font-size: 12.5px; color: var(--fg-4); }
.bcw-sel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; font-size: 14px; }
.bcw-sel-h > span { display: inline-flex; align-items: center; gap: 8px; }
.bcw-sel-h > span svg { color: var(--accent); }
.bcw-sel-act { display: flex; align-items: center; gap: 8px; }
.bcw-link { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; }
.bcw-ghost { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); color: var(--fg-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.bcw-ghost:hover { color: var(--fg); border-color: var(--fg-4); }
.bcw-paste { display: flex; flex-direction: column; gap: 8px; }
.bcw-paste-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--fg-3); }
.bcw-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 200px; overflow-y: auto; }
.bcw-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); font: inherit; font-size: 13px;
}
.bcw-chip > svg { color: #25D366; flex-shrink: 0; }
.bcw-chip > span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcw-chip button { width: 20px; height: 20px; border: 0; border-radius: 5px; background: transparent; color: var(--fg-4); display: grid; place-items: center; cursor: pointer; }
.bcw-chip button:hover { background: var(--bg-2); color: var(--fg); }
.bcw-chip.more { padding: 0 12px; background: var(--bg-2); color: var(--fg-2); cursor: pointer; }
.bcw-chip.more > svg { color: var(--fg-3); }
.bcw-seg { align-self: flex-start; }
.bcw-filters { display: flex; flex-direction: column; gap: 10px; }
.bcw-flabel { font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.bcw-flabel span { font-weight: 400; color: var(--fg-4); }
.bcw-frow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bcw-frow > div { display: flex; flex-direction: column; gap: 8px; }
.bcw-count { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.bcw-count b { font-size: 22px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.bcw-count span { font-size: 13px; color: var(--fg-3); }
.bcw-count small { flex-basis: 100%; font-size: 12px; color: var(--fg-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcw-info { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--bg-2); font-size: 12.5px; color: var(--fg-3); }
.bcw-info svg { flex-shrink: 0; color: var(--fg-4); }
.bcw-review { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bcw-rv { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: var(--bg-1); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bcw-rv.wide { grid-column: 1 / -1; }
.bcw-rv-h { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; }
.bcw-rv-big { font-size: 26px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.bcw-rv-big small { font-size: 14px; font-weight: 500; color: var(--fg-3); }
.bcw-rv-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.bcw-rv-line svg { color: var(--fg-4); flex-shrink: 0; }
.bcw-rv-sub { font-size: 12.5px; color: var(--fg-3); line-height: 1.45; }
.bcw-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--card); }
.bcw-foot-r { display: flex; gap: 8px; }
.bcw-foot .bc-btn { height: 40px; padding: 0 18px; }
@media (max-width: 860px) {
  .bcw { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
  .bcw-steps { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .bcw-step { flex: 0 0 auto; width: auto; }
  .bcw-step::after { display: none; }
  .bcw-step-txt small { display: none; }
  .bcw-main { grid-row: 2; padding: 18px 16px; }
  .bcw-sources, .bcw-review, .bcw-frow { grid-template-columns: 1fr; }
}

/* Disparo — blocos "+ Adicionar" (etapas / etiquetas): escolhido vira bloco e sempre sobra um para adicionar */
.bcw-blocks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bcw-block {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--fg); font: inherit; font-size: 13px;
}
.bcw-block-txt { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcw-block > button { width: 22px; height: 22px; border: 0; border-radius: 5px; background: transparent; color: var(--fg-4); display: grid; place-items: center; cursor: pointer; }
.bcw-block > button:hover { background: var(--bg-2); color: var(--fg); }
.bcw-block.add { padding: 0 14px; border-style: dashed; color: var(--fg-2); cursor: pointer; gap: 6px; background: transparent; }
.bcw-block.add:hover, .bcw-block.add.open { border-color: var(--accent); border-style: solid; color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.bcw-addwrap { position: relative; }
.bcw-pop {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: 280px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg);
}
.bcw-pop-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; margin-bottom: 4px; border-radius: 6px; background: var(--bg-1); border: 1px solid var(--line); color: var(--fg-3); }
.bcw-pop-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 13px; }
.bcw-pop-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.bcw-pop-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--fg); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.bcw-pop-item.hl { background: var(--bg-2); }
.bcw-pop-item small { margin-left: auto; color: var(--fg-4); font-size: 11.5px; }

/* Selo de origem "Meta Ads" (LeadOriginBadge em data.jsx) — Kanban, Horos 360, Mensagens */
.lead-origin { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.lead-origin.meta { color: #0866ff; background: color-mix(in srgb, #0866ff 12%, transparent); }
[data-theme="dark"] .lead-origin.meta, :root:not([data-theme="light"]) .lead-origin.meta { color: #5aa2ff; }
[data-theme="light"] .lead-origin.meta { color: #0866ff; }
.kbx-chips .lead-origin { height: 24px; }
/* Demais origens (2026-10-11): integrações em azul do Horos, origens comuns neutras; logo da marca à esquerda */
.lead-origin.integ { color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); }
.lead-origin.plain { color: var(--fg-2); background: var(--bg-2); }
.lead-origin img { width: 12px; height: 12px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
/* Quem repassou o lead (LeadHandoffNote) */
.lead-handoff { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--fg-3); line-height: 1.35; }
.lead-handoff svg { flex-shrink: 0; color: var(--fg-4); }
.kbx-handoff { font-size: 11px; color: var(--fg-3); display: flex; align-items: center; gap: 5px; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.drawer-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-rp2-origin { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; text-align: center; }
.drawer-hero-handoff { margin-top: 4px; }

/* Disparo — passo Mensagem (layout da 2ª imagem do usuário): resumo na lateral, editor com barra, prévia no celular */
.bcw-aud { margin-top: auto; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--bg-1); display: flex; flex-direction: column; gap: 8px; }
.bcw-aud-top { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.bcw-aud-ico { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); flex-shrink: 0; }
.bcw-aud-top small { display: block; font-size: 12px; color: var(--fg-3); }
.bcw-aud-top b { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.bcw-aud-top b svg { color: var(--success, #34d399); }
.bcw-aud-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--fg-3); padding-left: 10px; border-left: 2px solid var(--accent); }
.bcw-aud-row b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.bcw-aud-row.warn { border-left-color: var(--warm); }
.bcw-aud-note { margin: 2px 0 0; font-size: 11.5px; color: var(--fg-4); line-height: 1.4; }
.bcw-msg-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bcw-panel { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--bg-1); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bcw-panel-h { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.bcw-panel-h b { font-weight: 600; }
.bcw-panel-h svg { color: var(--fg-3); }
.bcw-panel-sub { margin: -4px 0 4px; font-size: 12.5px; color: var(--fg-3); }
.bcw-name { font-size: 13px; }
.bcw-editor { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); display: flex; flex-direction: column; }
.bcw-editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.bcw-editor textarea { min-height: 220px; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 14px; line-height: 1.55; padding: 14px 16px 4px; }
.bcw-count-chars { align-self: flex-end; padding: 0 14px 8px; font-size: 11.5px; color: var(--fg-4); font-variant-numeric: tabular-nums; }
.bcw-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-top: 1px solid var(--line); }
.bcw-toolbar > button, .bcw-tb-pop-wrap > button { height: 32px; min-width: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--fg-2); font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.bcw-toolbar button:hover, .bcw-toolbar button.on { background: var(--bg-2); color: var(--fg); }
.bcw-tb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.bcw-tb-vars { font-size: 12.5px !important; font-weight: 500; border: 1px solid var(--line-strong) !important; }
.bcw-tb-pop-wrap { position: relative; }
.bcw-tb-pop { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 6px; }
.bcw-tb-pop.emoji { display: grid; grid-template-columns: repeat(6, 34px); gap: 2px; }
.bcw-tb-pop.emoji button { width: 34px; height: 34px; border: 0; border-radius: 6px; background: transparent; font-size: 18px; cursor: pointer; }
.bcw-tb-pop.emoji button:hover { background: var(--bg-2); }
.bcw-tb-pop.vars { width: 270px; display: flex; flex-direction: column; gap: 2px; }
.bcw-tb-pop.vars button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.bcw-tb-pop.vars button:hover { background: var(--bg-2); }
.bcw-tb-pop.vars code { font: 12px ui-monospace, monospace; color: var(--accent); }
.bcw-tb-pop.vars span { font-size: 12px; color: var(--fg-3); }
.bcw-tip { display: flex; gap: 12px; padding: 14px; border-radius: 8px; background: var(--bg-2); }
.bcw-tip > svg { color: var(--warm); flex-shrink: 0; margin-top: 2px; }
.bcw-tip b { display: block; font-size: 13px; margin-bottom: 2px; }
.bcw-tip span { font-size: 12.5px; color: var(--fg-3); line-height: 1.5; }
.bcw-phone { align-self: center; width: min(320px, 100%); border-radius: 34px; border: 8px solid #111317; background: #0b141a; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
[data-theme="light"] .bcw-phone { background: #efeae2; }
.bcw-phone-status { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px 4px; font-size: 12px; font-weight: 600; color: #e9edef; background: #1f2c34; }
[data-theme="light"] .bcw-phone-status { color: #111b21; background: #f0f2f5; }
.bcw-phone-sig { display: inline-flex; align-items: flex-end; gap: 2px; }
.bcw-phone-sig i { width: 3px; background: currentColor; border-radius: 1px; }
.bcw-phone-sig i:nth-child(1) { height: 4px; } .bcw-phone-sig i:nth-child(2) { height: 6px; } .bcw-phone-sig i:nth-child(3) { height: 8px; } .bcw-phone-sig i:nth-child(4) { height: 10px; }
.bcw-phone-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; background: #1f2c34; color: #e9edef; }
[data-theme="light"] .bcw-phone-head { background: #f0f2f5; color: #111b21; }
.bcw-phone-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.bcw-phone-who { display: flex; flex-direction: column; min-width: 0; }
.bcw-phone-who b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcw-phone-who small { font-size: 11.5px; opacity: .7; }
.bcw-phone-chat { min-height: 300px; max-height: 380px; overflow-y: auto; padding: 14px 12px 18px; display: flex; flex-direction: column; align-items: flex-end; background-image: var(--wa-doodle, none); }
.bcw-bubble { position: relative; max-width: 88%; padding: 7px 9px 18px; border-radius: 8px 0 8px 8px; background: #005c4b; color: #e9edef; font-size: 13.5px; line-height: 1.45; word-wrap: break-word; box-shadow: 0 1px .5px rgba(0,0,0,.13); }
[data-theme="light"] .bcw-bubble { background: #d9fdd3; color: #111b21; }
.bcw-bubble-ph { opacity: .55; font-style: italic; }
.bcw-bubble-file { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin-bottom: 6px; border-radius: 6px; background: rgba(0,0,0,.15); font-size: 12px; }
.bcw-bubble-meta { position: absolute; right: 8px; bottom: 3px; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; opacity: .7; }
.bcw-bubble-meta svg { color: #53bdeb; }
.bcw-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.bcw-feats > div { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; color: var(--fg-3); }
.bcw-feats span { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-2); color: var(--accent); }
@media (max-width: 1000px) { .bcw-msg-grid { grid-template-columns: 1fr; } }

/* Prévia do disparo: celular "cortado" — só a metade de cima aparece, encostando na linha dos destaques (como na imagem) */
.bcw-phone { display: flex; flex-direction: column; height: 360px; border-bottom: 0; border-radius: 34px 34px 0 0; box-shadow: none; margin-bottom: -10px; }
.bcw-phone-chat { flex: 1; min-height: 0; max-height: none; overflow: hidden; }
.bcw-feats { border-top: 1px solid var(--line-strong); padding-top: 14px; margin-top: 0; }

/* Revisão do disparo: resumos à esquerda, celular (cortado) à direita */
.bcw-review { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.bcw-review-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bcw-rv-msg { padding-bottom: 0; overflow: hidden; }
.bcw-rv-msg .bcw-phone { margin-top: 4px; margin-bottom: 0; }
.bcw-rv-phone-line { height: 0; border-top: 1px solid var(--line-strong); margin: 0 -18px; }
@media (max-width: 860px) { .bcw-review { grid-template-columns: 1fr; } }

/* ── MASCOTE DO HOROS (horos-mascot.js) no menu e no topo ───────────────── */
.nav-mascot { color: inherit; width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.nav-mascot horos-mascot { margin-top: 2px; }
.icon-btn.hx-mascot-btn { overflow: visible; }
.icon-btn.hx-mascot-btn horos-mascot { margin-top: 1px; }
.ai-modal-head-left horos-mascot { margin-right: 2px; }
.ai-modal-empty horos-mascot { margin-bottom: 6px; }
.mv-coach-title horos-mascot { margin: -6px 0 -4px -2px; }
.ai-head horos-mascot.ai-mascot { margin: -4px 2px -6px 0; }

/* ═══ SEQUÊNCIA — fogos da semana + calendário com congelamentos (estilo Duolingo) ═══ */


/* janela */
@keyframes stkFade { from { opacity: 0; } }
@keyframes stkUp { from { opacity: 0; transform: translateY(12px) scale(.98); } }


/* ── Primeiros passos (TourWidget em shell.jsx) — tema claro/escuro ───────────── */
.tour-fab { position: fixed; right: 24px; bottom: 24px; z-index: 9100; width: 52px; height: 52px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: var(--accent);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 38%, transparent), 0 2px 6px rgba(0,0,0,.18);
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s; animation: tourFabIn .45s cubic-bezier(.2,.8,.2,1) both; }
.tour-fab:hover { transform: translateY(-2px) scale(1.04); }
.tour-fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tour-fab.done { background: var(--success); box-shadow: 0 6px 20px color-mix(in srgb, var(--success) 38%, transparent); }
.tour-fab > * { grid-area: 1 / 1; }
.tour-fab .tour-ring circle:last-child { transition: stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1); }
.tour-fab horos-mascot { color: #fff; }
.tour-fab-badge { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--card); color: var(--fg); border: 1px solid var(--line); font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
  font-variant-numeric: tabular-nums; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
@keyframes tourFabIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

.tour-panel, .tour-fab { --tour-soft: color-mix(in srgb, var(--fg) 5%, var(--card)); }
.tour-panel { position: fixed; right: 24px; bottom: 24px; z-index: 9100; width: 360px; max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.28), 0 4px 14px rgba(0,0,0,.08);
  transform-origin: bottom right; animation: tourPanelIn .38s cubic-bezier(.2,.8,.2,1) both; }
@keyframes tourPanelIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

.tour-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 16px 14px 18px; overflow: hidden; }
.tour-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; pointer-events: none;
  background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.tour-panel.is-done .tour-head::before { background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--success) 18%, transparent), transparent 70%); }
.tour-mascot { position: relative; width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center; margin: -4px 0; }
.tour-head-txt { position: relative; flex: 1; min-width: 0; }
.tour-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; color: var(--fg); }
.tour-sub { margin-top: 2px; font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.tour-head-btns { position: relative; display: flex; gap: 2px; align-self: flex-start; }
.tour-icon-btn { width: 28px; height: 28px; display: grid; place-items: center; border: none; border-radius: 8px; background: transparent; color: var(--fg-3); cursor: pointer; }
.tour-icon-btn:hover { background: var(--tour-soft); color: var(--fg); }

.tour-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 0 18px 12px; }
.tour-progress span { height: 4px; border-radius: 999px; background: var(--line-strong); position: relative; overflow: hidden; }
.tour-progress span::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.tour-progress span.on::after { transform: scaleX(1); }
.tour-progress span.next::after { transform: scaleX(.35); opacity: .45; animation: tourNext 1.8s ease-in-out infinite; }
.tour-panel.is-done .tour-progress span::after { background: var(--success); }
@keyframes tourNext { 50% { transform: scaleX(.6); } }

.tour-steps { list-style: none; margin: 0; padding: 4px 10px 6px; display: flex; flex-direction: column; gap: 2px; }
.tour-step { border-radius: 10px; border: 1px solid transparent; transition: background .2s, border-color .2s;
  animation: tourRowIn .4s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 45ms + 80ms); }
@keyframes tourRowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tour-step.open { background: var(--tour-soft); border-color: var(--line); }
.tour-step-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 8px; border: none; background: transparent; color: inherit;
  font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.tour-step:not(.open):not(.ok) .tour-step-row:hover { background: var(--tour-soft); }
.tour-step-row:disabled { cursor: default; }
.tour-step-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tour-check { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); color: var(--fg-3); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; transition: all .25s; }
.tour-step.open .tour-check { border-color: var(--accent); color: var(--accent); }
.tour-step.ok .tour-check { background: var(--success); border-color: var(--success); color: #fff; }
.tour-step.pop .tour-check { animation: tourPop .5s cubic-bezier(.175,.885,.32,1.275); }
@keyframes tourPop { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.tour-step-ic { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; background: var(--tour-soft); color: var(--fg-2); }
.tour-step.open .tour-step-ic { background: var(--card); color: var(--accent); }
.tour-step-label { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 550; color: var(--fg); }
.tour-step.ok .tour-step-label { color: var(--fg-3); font-weight: 500; }
.tour-step.ok .tour-step-ic { opacity: .55; }
.tour-step-done { font-size: 11.5px; font-weight: 600; color: var(--success); }
.tour-step-body { padding: 0 12px 12px 72px; animation: tourBody .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes tourBody { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tour-step-body p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--fg-3); }
.tour-cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border: none; border-radius: 8px;
  background: var(--accent); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: filter .15s, transform .15s; }
.tour-cta:hover { filter: brightness(1.08); }
.tour-cta:active { transform: scale(.98); }
.tour-cta svg { transition: transform .2s; }
.tour-cta:hover svg { transform: translateX(2px); }
.tour-cta.wide { width: 100%; height: 38px; background: var(--success); }
.tour-foot { padding: 6px 18px 16px; display: flex; justify-content: center; }
.tour-link { border: none; background: none; padding: 4px 6px; font: inherit; font-size: 12px; color: var(--fg-4); cursor: pointer; border-radius: 6px; }
.tour-link:hover { color: var(--fg-2); }

/* destaque ao levar até a meta do Dashboard */
.mv-card.tour-flash { box-shadow: 0 0 0 2px var(--accent), var(--card-hover-shadow); transition: box-shadow .3s; }

@media (prefers-reduced-motion: reduce) {
  .tour-fab, .tour-panel, .tour-step, .tour-step-body, .tour-step.pop .tour-check, .tour-progress span.next::after { animation: none; }
}

/* Primeiros passos — aviso na hora em que um passo é concluído (painel minimizado) */
.tour-fab.pop { animation: tourFabPop .6s cubic-bezier(.175,.885,.32,1.275); }
@keyframes tourFabPop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.tour-bubble { position: fixed; right: 88px; bottom: 28px; z-index: 9100; display: flex; align-items: center; gap: 10px; max-width: 300px;
  padding: 10px 14px 10px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg);
  font: inherit; text-align: left; cursor: pointer; box-shadow: 0 14px 36px -10px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.08);
  transform-origin: right center; animation: tourBubble 3.6s cubic-bezier(.2,.8,.2,1) both; }
.tour-bubble b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-bubble small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.tour-bubble > span:last-child { min-width: 0; }
.tour-bubble-ck { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff;
  animation: tourPop .5s .15s cubic-bezier(.175,.885,.32,1.275) both; }
@keyframes tourBubble {
  0% { opacity: 0; transform: translateX(10px) scale(.94); }
  10% { opacity: 1; transform: none; }
  88% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateX(6px); }
}
@media (max-width: 760px) { .tour-bubble { right: 12px; left: 12px; max-width: none; bottom: calc(var(--mtab-h, 0px) + var(--m-safe-b, 0px) + 72px); } }
@media (prefers-reduced-motion: reduce) { .tour-fab.pop, .tour-bubble, .tour-bubble-ck { animation: none; } }

/* painel de metas: falhou depois de várias tentativas */
.mv-failed { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
/* Tela Equipe — assento Premium no perfil do membro (2026-10-06) */
.ws-prof-seat-note { margin-top: -4px; font-size: 12px; color: var(--fg-4); }

/* Disparo em massa — modelo aprovado (WhatsApp oficial) */
.bcw-mode { margin: 2px 0 4px; }
.bcw-tpl { display: flex; flex-direction: column; gap: 10px; }
.bcw-tpl-empty { font-size: 13px; color: var(--fg-3); line-height: 1.5; display: flex; flex-direction: column; gap: 6px; padding: 10px 0; }
.bcw-tpl-empty a { color: var(--accent); }
.bcw-tpl-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; padding-right: 2px; }
.bcw-tpl-item { text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); font: inherit; cursor: pointer; }
.bcw-tpl-item:hover { background: var(--bg-2); }
.bcw-tpl-item.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.bcw-tpl-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.bcw-tpl-top span { font-size: 11.5px; color: var(--fg-4); white-space: nowrap; }
.bcw-tpl-body { margin-top: 4px; font-size: 12.5px; color: var(--fg-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcw-tpl-params { display: flex; flex-direction: column; gap: 10px; }
.bcw-tpl-params label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--fg-3); }
.bcw-tpl-chips { display: flex; gap: 6px; }
.bcw-tpl-chips button { border: 1px solid var(--line); background: var(--bg-2); color: var(--fg-2); border-radius: 6px; padding: 3px 8px; font-family: ui-monospace, monospace; font-size: 11.5px; cursor: pointer; }
.bcw-tpl-chips button:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

/* ═══ TEXTO DA IA FORMATADO (HorosRichText em data.jsx) ═══════════════════════
   Chat da IA, janelinha da IA, Assistente do Dashboard: **negrito**, quebras de linha,
   parágrafos, listas com marcador azul, listas numeradas e títulos. */
.hrt { font-size: inherit; line-height: 1.65; color: inherit; overflow-wrap: anywhere; }
.hrt > :first-child { margin-top: 0 !important; }
.hrt > :last-child { margin-bottom: 0 !important; }
.hrt-p { margin: 0 0 10px; }
.hrt strong { font-weight: 600; color: var(--fg); }
.hrt em { font-style: italic; }
.hrt a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.hrt a.hrt-lead { cursor: pointer; text-decoration-style: dotted; font-weight: 600; }
.hrt a.hrt-lead:hover { text-decoration-style: solid; }
.hrt-code {
  font-family: ui-monospace, 'JetBrains Mono', monospace; font-size: .9em;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px;
}
.hrt-h { margin: 14px 0 6px; font-size: 1.04em; font-weight: 600; color: var(--fg); line-height: 1.4; }
.hrt-hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.hrt-ul, .hrt-ol { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hrt-ul > li, .hrt-ol > li { position: relative; padding-left: 20px; }
.hrt-ul > li::before {
  content: ''; position: absolute; left: 5px; top: .68em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.hrt-ol { counter-reset: hrt var(--hrt-start, 0); }
.hrt-ol > li { counter-increment: hrt; padding-left: 26px; }
.hrt-ol > li::before {
  content: counter(hrt); position: absolute; left: 0; top: .2em;
  min-width: 18px; height: 18px; border-radius: 50%; padding: 0 4px; box-sizing: border-box;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}
/* Disparos — confirmação do Cancelar no próprio botão */
.bc-actions--ask { flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.bc-ask-txt { font-size: 12px; color: var(--danger); max-width: 280px; line-height: 1.35; }

/* ═══ SIMULADOR DE FINANCIAMENTO (fin-simulator.jsx, 2026-10-07) ═══ */
.fsim { display: flex; flex-direction: column; gap: 16px; }
.fsim-modes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fsim-mode { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; font: inherit; }
.fsim-mode b { font-size: 13px; font-weight: 600; }
.fsim-mode span { font-size: 11.5px; color: var(--fg-3); }
.fsim-mode i { margin-top: 4px; font-style: normal; font-size: 10px; font-weight: 600; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--card)); border-radius: 999px; padding: 1px 7px; }
.fsim-mode.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fsim-mode:hover:not(.on) { background: var(--bg-2); }
.fsim-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.fsim-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fsim-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fsim-field > span { font-size: 12px; font-weight: 500; color: var(--fg-3); }
.fsim-field small { font-size: 11px; color: var(--fg-4); line-height: 1.35; }
.fsim-money { display: flex; align-items: center; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-1); overflow: hidden; }
.fsim-money:focus-within { border-color: var(--accent); }
.fsim-money em { font-style: normal; font-size: 12px; color: var(--fg-3); padding: 0 10px; white-space: nowrap; }
.fsim-money input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--fg);
  font-family: inherit; font-weight: 500; font-size: 13.5px; font-variant-numeric: tabular-nums; padding: 0 10px 0 0; }
.fsim-money em + input { padding-left: 0; }
.fsim-money input:first-child { padding-left: 10px; }
.fsim-seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--bg-2); gap: 3px; }
.fsim-seg button { flex: 1; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--fg-2); font-family: inherit; font-weight: 500; font-size: 13px; cursor: pointer; padding: 0 16px; }
.fsim-seg button.on { background: var(--accent); color: #fff; }
.fsim-out { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fsim-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fsim-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card); display: flex; flex-direction: column; gap: 2px; }
.fsim-kpi span { font-size: 11.5px; color: var(--fg-3); }
.fsim-kpi b { font-size: 17px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.fsim-kpi small { font-size: 11.5px; color: var(--fg-4); }
.fsim-alert { font-size: 12.5px; line-height: 1.45; color: var(--fg-2); padding: 8px 12px; border-radius: 8px; background: var(--card);
  border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.fsim-alert--bad { border-left-color: var(--danger); }
.fsim-alert--warn { border-left-color: #d97706; }
.fsim-alert--ok { border-left-color: var(--success); }
.fsim-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fsim-table th { text-align: left; font-weight: 500; color: var(--fg-3); background: var(--bg-2); padding: 6px 10px; }
.fsim-table th:not(:first-child), .fsim-table td:not(:first-child) { text-align: right; }
.fsim-table td { padding: 6px 10px; border-top: 1px solid var(--line); color: var(--fg); font-variant-numeric: tabular-nums; }
.fsim-note { font-size: 11.5px; color: var(--fg-4); line-height: 1.5; }
.fsim-note a { color: var(--accent); }
.fsim-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fsim-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--fg); font-family: inherit; font-weight: 500; font-size: 13px; cursor: pointer; }
.fsim-btn:hover:not(:disabled) { background: var(--bg-2); }
.fsim-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.fsim-btn--primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.06); }
.fsim-btn:disabled { opacity: .5; cursor: default; }
.fsim-saved { font-size: 12px; color: var(--fg-3); }
.fsim-ov { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.fsim-modal { width: min(1080px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fsim-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.fsim-modal-title { font-size: 16px; font-weight: 600; color: var(--fg); }
.fsim-modal-sub { font-size: 12px; color: var(--fg-3); }
.fsim-modal-body { padding: 20px; overflow: auto; }
.fsim-x { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--fg-3); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fsim-x:hover { background: var(--bg-2); color: var(--fg); }
@media (max-width: 1100px) { .fsim-body { grid-template-columns: 1fr; } .fsim-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .fsim-modes { grid-template-columns: 1fr 1fr; }
  .fsim-form { grid-template-columns: 1fr; }
  .fsim-money input { font-size: 16px; }
  .fsim-ov { padding: 0; } .fsim-modal { max-height: 100vh; height: 100%; border-radius: 0; }
}

/* Disparo em massa — "Depois do envio": etapa para onde o lead vai */
.bcw-after {
  display: grid; grid-template-columns: 1fr minmax(200px, 260px); gap: 6px 16px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 12px 14px;
}
.bcw-after-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bcw-after-txt b { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.bcw-after-txt small { font-size: 12px; color: var(--fg-4); line-height: 1.45; }
.bcw-after-pick { position: relative; display: flex; align-items: center; }
.bcw-after-pick .bc-input { width: 100%; }
.bcw-after-dot { position: absolute; left: 11px; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; }
.bcw-after-dot + .bc-input { padding-left: 26px; }
.bcw-after-sug { grid-column: 1 / -1; justify-self: start; font-size: 12.5px; }
@media (max-width: 760px) { .bcw-after { grid-template-columns: 1fr; } }
/* Disparos — leads arquivados por não terem WhatsApp */
.bc-arch-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid #d97706; border-radius: 8px; background: color-mix(in srgb, #d97706 6%, var(--card)); font-size: 12.5px; line-height: 1.45; color: var(--fg-2); }
.bc-arch-note b { color: var(--fg); font-weight: 600; }
.bc-arch-note svg { flex-shrink: 0; margin-top: 1px; color: #d97706; }
.bc-arch-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--bg-2); color: var(--fg-3); font-size: 11px; }

/* ── Disparo em massa: editar disparo pausado (BcEditPanel) ─────────────────── */
.bce { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--card); padding: 14px 16px; margin: 12px 0; display: flex; flex-direction: column; gap: 14px; }
.bce-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bce-title { font-size: 14px; font-weight: 600; color: var(--fg); }
.bce-sub { font-size: 12px; color: var(--fg-4); margin-top: 2px; }
.bce-note { font-size: 12.5px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--success) 10%, var(--card)); color: var(--fg-2); }
.bce-note.err { background: color-mix(in srgb, var(--danger) 10%, var(--card)); }
.bce-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.bce-label { font-size: 11.5px; font-weight: 600; color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; }
.bce-sub2 { font-size: 12.5px; font-weight: 600; color: var(--fg-2); margin-top: 6px; }
.bce-input, .bce-ta { width: 100%; box-sizing: border-box; background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--fg); font: inherit; font-size: 13px; padding: 8px 10px; }
.bce-ta { resize: vertical; line-height: 1.45; }
.bce-input:focus, .bce-ta:focus { outline: none; border-color: var(--accent); }
.bce-input.num { width: 80px; text-align: center; font-variant-numeric: tabular-nums; }
.bce-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg-2); }
.bce-row.end { justify-content: flex-end; }
.bce-row .bce-hint { flex: 1; }
.bce-count { margin-left: auto; font-size: 11.5px; color: var(--fg-4); font-variant-numeric: tabular-nums; }
.bce-prev { display: flex; flex-direction: column; gap: 4px; }
.bce-tpl { font-size: 12.5px; color: var(--fg-3); }
.bce-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg-3); }
.bce-stats b { color: var(--fg); font-variant-numeric: tabular-nums; }
.bce-hint { font-size: 11.5px; color: var(--fg-4); }
.bce-ask { flex: 1; color: var(--fg); }
.bce-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bce-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--fg-2); font-size: 12.5px; cursor: pointer; }
.bce-chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--fg); }
.bce-dot { width: 7px; height: 7px; border-radius: 50%; }
.bc-tr:has(.bc-td-rm) { grid-template-columns: 1.3fr 1fr 90px 1.4fr 24px; }
.bc-td-rm { width: 24px; height: 24px; border-radius: 6px; border: 0; background: transparent; color: var(--fg-3); display: grid; place-items: center; cursor: pointer; }
.bc-td-rm:hover { background: var(--bg-2); color: var(--danger); }
.bc-btn.bc-del { color: var(--fg-3); padding-left: 8px; padding-right: 8px; }
.bc-btn.bc-del:hover { color: var(--danger); }

/* ── Ligar pela Api4Com (Horos 360) ── */
.lead-call { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-call-btn { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--card); color: var(--fg); font-size: 12px; font-weight: 600; cursor: pointer; }
.lead-call-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.lead-call-btn:disabled { opacity: .6; cursor: default; }
.lead-call-msg { font-size: 11.5px; color: var(--fg-3); }
.lead-calls { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.lead-calls-title { font-size: 13px; font-weight: 600; color: var(--fg); padding: 10px 12px 6px; }
.lead-calls-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--fg-3); }
.lead-calls-main { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 12px; }
.lead-calls-main b { color: var(--fg); font-weight: 600; font-size: 12.5px; }
.lead-props { margin-top: 12px; }
.lead-props-row { text-decoration: none; }
.lead-props-row:hover { background: var(--bg-2); }
.lead-props-row .lead-calls-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-props-img { width: 40px; height: 30px; flex: none; border-radius: 5px; overflow: hidden; background: var(--bg-2); display: inline-flex; align-items: center; justify-content: center; color: var(--fg-4); }
.lead-props-img img { width: 100%; height: 100%; object-fit: cover; }
.lead-calls-rec { font-size: 12px; color: var(--accent); text-decoration: none; white-space: nowrap; }

/* ── Enviar e-mail pelo Gmail (Horos 360) ── */
.lem-ov { position: fixed; inset: 0; z-index: 10050; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.lem-box { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; }
.lem-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.lem-x { width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--fg-3); cursor: pointer; display: grid; place-items: center; }
.lem-x:hover { background: var(--bg-2); color: var(--fg); }
.lem-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.lem-muted { font-size: 12.5px; color: var(--fg-3); margin: 0; line-height: 1.5; }
.lem-field { display: flex; flex-direction: column; gap: 5px; }
.lem-field > span { font-size: 12px; color: var(--fg-3); font-weight: 500; }
.lem-field input, .lem-field textarea { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg-1); color: var(--fg); font: inherit; font-size: 13.5px; resize: vertical; }
.lem-field input:focus, .lem-field textarea:focus { outline: none; border-color: var(--accent); }
.lem-err { font-size: 12px; color: var(--danger); }
.lem-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.lem-btn { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); color: var(--fg); font-weight: 600; font-size: 13px; cursor: pointer; }
.lem-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.lem-btn:disabled { opacity: .55; cursor: default; }
@media (max-width: 760px) { .lem-field input, .lem-field textarea { font-size: 16px; } }

/* Motivos de arquivamento editáveis (2026-10-23) */
.arq-sec { font-size: 11.5px; font-weight: 600; color: var(--fg-3); margin: 12px 0 6px; }
.arq-mgr-link { background: none; border: 0; color: var(--accent); font-size: 12.5px; cursor: pointer; padding: 6px 0; text-decoration: underline; }
.arq-mgr-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; margin: 10px 0; }
.arq-mgr-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.arq-mgr-row .arq-opt-txt { flex: 1; min-width: 0; }
.arq-tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; white-space: nowrap; border: 1px solid var(--line); color: var(--fg-3); }
.arq-tag.rec { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.arq-mgr-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.arq-mgr-form input[type=text], .arq-mgr-form input:not([type]) { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-1); color: var(--fg); font-size: 14px; }
.arq-mgr-check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--fg-2); }

.arq-btn:not(.ghost):not(.danger) { background: var(--accent); color: #fff; }
.arq-btn:disabled { opacity: .5; cursor: default; }

.kbx-foot-r { display: flex; align-items: center; gap: 8px; }
.kbx-wa { width: 100%; height: 30px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--fg); border-radius: 999px; background: var(--card); color: var(--fg); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.kbx-wa:hover:not(:disabled) { background: var(--bg-2); }
.kbx-wa:disabled { opacity: .4; cursor: default; }

.bcc { padding: 16px 24px 32px; }
.bcc-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.bcc-sel, .bcc-search { height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-1); color: var(--fg); font-size: 13px; }
.bcc-search { flex: 1; min-width: 160px; }
.bcc-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--card); font-size: 13px; }
.bcc-table { border: 1px solid var(--line); border-radius: 8px; background: var(--card); overflow: hidden; }
.bcc-row { display: grid; grid-template-columns: 28px 1.4fr 1fr 1fr; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.bcc-row.bcc-th { border-top: 0; background: var(--bg-2); color: var(--fg-3); font-size: 12px; cursor: default; }
.bcc-row.on { background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.bcc-name { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcc-list { color: var(--fg-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .bcc { padding: 12px 16px 24px; } .bcc-row { grid-template-columns: 28px 1fr 1fr; } .bcc-row > :nth-child(4) { display: none; } }

.kbx-wa-qr { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; max-height: 84px; overflow: auto; }
.kbx-wa-chip { border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--fg-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.kbx-wa-chip:hover { border-color: var(--accent); color: var(--accent); }
.kbx-wa-files { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--fg-3); }
.kbx-wa-files button { border: 0; background: none; color: var(--fg-3); cursor: pointer; font-size: 16px; }

/* ── FEEDBACK SEMANAL (WeeklyFeedback em shell.jsx) ── */
.fbw { position: fixed; right: 24px; bottom: 24px; z-index: 9200; width: min(380px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--card-hover-shadow, 0 16px 40px rgba(0,0,0,.25)); padding: 18px; color: var(--fg); animation: fbwIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes fbwIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.fbw-title { font-size: 15px; font-weight: 600; margin: 0 24px 2px 0; }
.fbw-sub { font-size: 12.5px; color: var(--fg-3); margin: 0 0 14px; }
.fbw-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border: none; background: none; color: var(--fg-3); border-radius: 6px; cursor: pointer; font-size: 18px; line-height: 1; }
.fbw-x:hover { background: var(--bg-2); color: var(--fg); }
.fbw-faces { display: flex; justify-content: space-between; gap: 6px; }
.fbw-face { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--fg-3); cursor: pointer; font: inherit; font-size: 10.5px; transition: background .15s, color .15s, transform .15s; }
.fbw-face:hover { background: var(--bg-2); color: var(--fg); }
.fbw-face:active { transform: scale(.94); }
.fbw-face.on { background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-color: var(--accent); color: var(--accent); }
.fbw-face svg { width: 28px; height: 28px; }
.fbw-text { width: 100%; box-sizing: border-box; height: 96px; resize: none; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-1); color: var(--fg); font: inherit; font-size: 13.5px; }
.fbw-text:focus { outline: none; border-color: var(--accent); }
.fbw-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.fbw-later { border: none; background: none; color: var(--fg-3); font: inherit; font-size: 12.5px; cursor: pointer; }
.fbw-later:hover { color: var(--fg); }
.fbw-send { border: none; border-radius: 8px; padding: 8px 16px; background: var(--accent); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fbw-send:disabled { opacity: .4; cursor: default; }
.fbw-done { text-align: center; padding: 10px 0 4px; font-size: 14px; font-weight: 600; }
@media (max-width: 760px) { .fbw { right: 16px; bottom: 76px; } }

/* ── Dashboard: lembretes e leads esquecidos ── */
.mv-rem { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.mv-rem-t { font-size: 13px; font-weight: 600; color: var(--fg); }
.mv-rem-t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mv-rem-n { font-size: 12px; font-weight: 400; color: var(--fg-3); }
.mv-rem-list { max-height: 196px; overflow-y: auto; }
.mv-stale-row { display: flex; align-items: center; gap: 4px; }
.mv-stale-row > .mv-item { flex: 1; min-width: 0; }
.mv-stale-acts { display: flex; gap: 2px; flex: none; }
.mv-stale-modal { max-width: 620px; width: 100%; display: flex; flex-direction: column; gap: 12px; max-height: 80vh; }
.mv-stale-q { width: 100%; box-sizing: border-box; background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 13px; color: var(--fg); outline: none; }
.mv-stale-q:focus { border-color: var(--accent); }
.mv-stale-all { flex: 1; min-height: 0; overflow-y: auto; }
button.mv-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

/* ── Equipe → Licenças (Team/Enterprise): uso, compra e quem fica com o Premium ── */
.ws-seats { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-bottom: 24px; }
.ws-seats-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ws-seats-title { font-size: 15px; font-weight: 600; color: var(--fg); }
.ws-seats-sub { font-size: 12.5px; color: var(--fg-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.ws-seats-sub b { color: var(--fg); font-weight: 600; }
.ws-seats-buy { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 8px; white-space: nowrap; }
.ws-seats-buy:hover { background: var(--bg-2); }
.ws-seats-bar { height: 6px; border-radius: 99px; background: var(--bg-2); margin-top: 12px; overflow: hidden; }
.ws-seats-bar > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s; }
.ws-seats-bar.is-full > span { background: var(--danger, #ff5a4e); }
.ws-seats-note { margin-top: 10px; font-size: 12.5px; color: var(--fg-2); border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; }
.ws-seats-prem-head { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--fg); }
.ws-seats-count { font-size: 12px; font-weight: 500; color: var(--fg-3); background: var(--bg-2); border-radius: 99px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
.ws-seats-hint { font-size: 12px; color: var(--fg-4); margin: 4px 0 10px; }
.ws-seats-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; border-top: 1px solid var(--line); }
.ws-seats-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ws-seats-row.is-off { cursor: not-allowed; opacity: .55; }
.ws-seats-name { flex: 1; min-width: 0; font-size: 13.5px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-seats-name small { margin-left: 8px; font-size: 11.5px; color: var(--fg-4); }
.ws-seats-kind { font-size: 12px; color: var(--fg-3); width: 58px; text-align: right; }
.ws-seats-switch { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: inherit; transition: background .2s; flex: none; margin: 0; }
.ws-seats-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ws-seats-switch:checked { background: var(--accent); }
.ws-seats-switch:checked::after { transform: translateX(14px); }
.ws-seats-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ws-seats-inv { font-size: 12.5px; color: var(--fg-2); background: var(--bg-2); border-radius: 8px; padding: 9px 12px; margin-bottom: 14px; }
.ws-seats-inv.is-full { color: var(--danger, #ff5a4e); border-left: 3px solid var(--danger, #ff5a4e); }

/* ============================================
   VÁRIOS FUNIS — abas acima do Kanban do CRM (crm-pipelines.jsx)
   ============================================ */
.pl-tabs { padding: 0 16px; border-bottom: 1px solid var(--line); }
.pl-tabs-scroll { display: flex; align-items: flex-end; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.pl-tabs-scroll::-webkit-scrollbar { display: none; }
.pl-tab { display: flex; align-items: center; flex-shrink: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pl-tab.on { border-bottom-color: var(--accent); }
.pl-tab-btn { display: flex; align-items: center; gap: 7px; padding: 10px 4px 10px 10px; background: none; border: none; cursor: pointer; font: inherit; font-size: 13px; color: var(--fg-3); white-space: nowrap; }
.pl-tab-btn:hover, .pl-tab.on .pl-tab-btn { color: var(--fg); }
.pl-tab.on .pl-tab-name { font-weight: 600; }
.pl-tab-count { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--bg-2); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.pl-tab-entry { font-size: 10px; padding: 1px 6px; border-radius: 99px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pl-tab-more { display: flex; align-items: center; padding: 4px; margin-right: 4px; border: none; background: none; border-radius: 6px; cursor: pointer; color: var(--fg-4); opacity: 0; transition: opacity .12s; }
.pl-tab:hover .pl-tab-more, .pl-tab.on .pl-tab-more, .pl-tab-more:focus-visible { opacity: 1; }
.pl-tab-more:hover { background: var(--bg-2); color: var(--fg); }
.pl-tab-new { display: flex; align-items: center; gap: 5px; flex-shrink: 0; margin: 0 0 6px 6px; padding: 5px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; background: none; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--fg-3); white-space: nowrap; }
.pl-tab-new:hover { color: var(--accent); border-color: var(--accent); }
.pl-menu button:disabled { opacity: .55; cursor: default; }
.pl-menu .pl-menu-danger, .pl-menu .pl-menu-danger svg { color: var(--danger); }
.pl-modal { width: 440px; }
.pl-modal-wide { width: 620px; }
.pl-modal-body { padding: 16px 24px; }
.pl-label { display: block; font-size: 12px; color: var(--fg-3); margin-bottom: 6px; }
.pl-input { width: 100%; box-sizing: border-box; padding: 8px 10px; }
.pl-text { margin: 0 0 12px; font-size: 13px; color: var(--fg-2); line-height: 1.5; }
.pl-rule { flex-wrap: wrap; }
.pl-select { flex: 0 1 190px; }
.pl-rule-and { font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.pl-hint, .pl-empty { font-size: 12px; color: var(--fg-4); padding: 6px 2px; line-height: 1.5; }
.kem-btn.primary.pl-danger { background: var(--danger); }
.pl-move { display: flex; flex-direction: column; padding: 4px; }
.pl-move-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: none; background: none; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; color: var(--fg); text-align: left; }
.pl-move-item:hover:not(:disabled) { background: var(--bg-2); }
.pl-move-item svg { color: var(--fg-3); }
.pl-move-busy { margin-left: auto; font-size: 11px; color: var(--fg-4); }
.c360-stage-btn.c360-pipe-btn { color: var(--fg-2); }
.c360-stage-btn.c360-pipe-btn svg { color: var(--fg-3); flex-shrink: 0; }

/* ── Registrar venda / aluguel ao mover para Fechado (SaleModal em data.jsx) ── */
.sale-box { width: min(640px, 100%); }
.sale-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--bg-2); }
.sale-tabs button { flex: 1; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-3); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sale-tabs button.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.sale-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.sale-grid .lem-field select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg-1); color: var(--fg); font: inherit; font-size: 13.5px; }
.sale-grid .lem-field input:disabled { opacity: .7; }
.sale-hint { font-size: 11.5px; color: var(--fg-4); }
.sale-check { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--fg-2); cursor: pointer; }
.sale-check input { margin-top: 2px; accent-color: var(--accent); }
.sale-sum { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.sale-sum > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--fg-3); }
.sale-sum b { color: var(--fg); font-variant-numeric: tabular-nums; font-weight: 600; }
.sale-sum p { margin: 4px 0 0; font-size: 11.5px; color: var(--fg-4); line-height: 1.45; }
@media (max-width: 760px) { .sale-grid { grid-template-columns: 1fr; } .sale-grid .lem-field select { font-size: 16px; } }
